/* Ferma v5 — lane G: the classic 2010 look (plan/R13-classic-ui.md §2–§4, §8.3), laid over ferma.css.
   Everything is scoped to html.classic (set by js/ui/hud.js), so it outranks ferma.css without touching it.
   Sprites come in as --s-<name> custom properties only when the art set has them (html.has-<name>); each sprite
   has a CSS stand-in, so a missing sheet never shows a hole. Motion respects prefers-reduced-motion / «Kustības: mazāk». */

html.classic{--bar:48px;--wood-a:#E3AA66;--wood-b:#C98D4D;--wood-c:#A86D36;--line:#5A3412;--olive:rgba(60,90,30,.55)}
html.classic #hud [hidden],html.classic #modal [hidden]{display:none!important}
.vh{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0 0 0 0);white-space:nowrap;margin:-1px;padding:0;border:0}
html.classic #hud img{-webkit-user-drag:none;user-select:none}
html.classic #hud .has-img>.fallback{display:none}

/* ================= the bar: one plank from edge to edge (R13 §2.1) ================= */
html.classic #topbar{left:0;right:0;top:0;height:calc(var(--bar) + var(--sat));box-sizing:border-box;padding:var(--sat) 0 0 calc(8px + var(--sal));gap:0;transform:none;align-items:center;
  background:
    repeating-linear-gradient(90deg,transparent 0 178px,rgba(90,52,18,.42) 178px 180px,rgba(255,232,190,.28) 180px 181px,transparent 181px 360px),
    repeating-linear-gradient(0deg,rgba(120,70,25,.09) 0 2px,rgba(255,236,196,.07) 2px 5px,rgba(120,70,25,0) 5px 9px),
    linear-gradient(var(--wood-a),var(--wood-b) 55%,var(--wood-c));
  border-bottom:2px solid var(--line);box-shadow:0 3px 0 rgba(50,25,5,.32),inset 0 2px 0 rgba(255,240,205,.45),inset 0 -3px 0 rgba(90,50,15,.3)}
/* the rosette sits over the bar and hangs below it on its ribbon tails */
html.classic #topbar .rosette{position:relative;flex:none;align-self:flex-start;width:72px;height:84px;margin:-4px 2px 0 0;z-index:3;filter:drop-shadow(0 2px 1px rgba(0,0,0,.35));transform-origin:50% 35%}
html.classic #topbar .rosette .astes{position:absolute;left:15px;top:40px;width:42px;height:44px;background:var(--s-ui_rozete_astes) 50% 0/contain no-repeat}
html.classic:not(.has-ui_rozete_astes) #topbar .rosette .astes{background:linear-gradient(100deg,transparent 0 18%,#2F7FD8 18% 46%,transparent 46% 54%,#2F7FD8 54% 82%,transparent 82%);clip-path:polygon(0 0,100% 0,100% 100%,78% 84%,62% 100%,50% 30%,38% 100%,22% 84%,0 100%)}
html.classic #topbar .rosette .badge{position:absolute;left:3px;top:0;width:66px;height:72px;object-fit:contain}
html.classic #topbar .rosette:not(.has-img)::before{content:"";position:absolute;left:6px;top:2px;width:60px;height:60px;border-radius:50%;background:radial-gradient(#FFF6DA 0 44%,#2F7FD8 46% 70%,#1B4F9A 72%);box-shadow:0 0 0 3px #FFE14A inset}
html.classic #topbar .rosette b{position:absolute;left:0;right:0;top:15px;z-index:1;text-align:center;font:bold italic 28px/1 "Trebuchet MS",Verdana,sans-serif;color:#FFE14A;letter-spacing:-.5px;
  text-shadow:-3px 0 #1B2F6B,3px 0 #1B2F6B,0 -3px #1B2F6B,0 3px #1B2F6B,-2px -2px #1B2F6B,2px -2px #1B2F6B,-2px 2px #1B2F6B,2px 2px #1B2F6B,0 4px 0 #0f1c44}
html.classic #topbar .rosette.pop{animation:clRosPop .5s cubic-bezier(.3,1.6,.5,1)}
/* the fields: sunk into the bar */
html.classic #topbar .plank{position:relative;display:flex;align-items:center;height:34px;padding:0;margin:0 0 0 10px;border:0;border-radius:0;background:none;box-shadow:none}
html.classic #topbar .plank.xp{width:150px;margin-left:2px}
html.classic #topbar .inset{position:relative;height:34px;min-width:0;box-sizing:border-box;border-radius:9px;border:2px solid #3A1D00;padding:0 10px;display:flex;align-items:center;justify-content:center;overflow:hidden;
  box-shadow:inset 0 3px 4px rgba(0,0,0,.45),inset 0 -1px 0 rgba(255,255,255,.22),0 1px 0 rgba(255,236,196,.65)}
html.classic #topbar .inset.dark{width:100%;background:linear-gradient(#2E1A0A,#55341A)}
html.classic #topbar .inset .fill{position:absolute;left:0;top:0;bottom:0;width:0;border-radius:6px 0 0 6px;background:linear-gradient(#8FD8FF,#47AEFF 45%,#2E9CFF 60%,#1F7FE0);
  box-shadow:inset 0 2px 0 rgba(255,255,255,.55),inset -1px 0 0 rgba(255,255,255,.35);transition:width .4s cubic-bezier(.3,1,.5,1)}
html.classic #topbar .inset span{position:relative;z-index:1;font-size:20px;letter-spacing:.3px;line-height:1}
html.classic #topbar .plank .ic{position:relative;z-index:2;flex:none;width:38px;height:38px;margin:0 -16px 0 0;filter:drop-shadow(0 2px 0 rgba(0,0,0,.35))}
html.classic #topbar .inset.green{width:140px;justify-content:flex-end;padding:0 10px 0 22px;background:linear-gradient(#2C7A1E,#3F9E2B 70%,#4DB236)!important}
html.classic #topbar .inset.purple{width:96px;justify-content:flex-end;padding:0 10px 0 22px;background:linear-gradient(#5B2E9E,#7A43CC 70%,#8A4FE0)!important}
html.classic #topbar .inset .ls{position:relative;z-index:1;margin:3px 0 0 4px;font:bold italic 12px/1 "Trebuchet MS",sans-serif;color:#E9FFD9;
  text-shadow:-1px -1px 0 #1d4f08,1px -1px 0 #1d4f08,-1px 1px 0 #1d4f08,1px 1px 0 #1d4f08}
html.classic #topbar .plank.cl-pulse{animation:clPulse .32s cubic-bezier(.3,1.8,.5,1)}

/* ================= the icon row: 7 wood tabs on the bar ================= */
html.classic #topright{right:calc(8px + var(--sar));top:calc(var(--sat) + 2px);height:44px;gap:6px;align-items:center}
html.classic #topright .hudtab{position:relative;flex:none;width:44px;height:44px;padding:0;border:0;border-radius:8px;display:flex;align-items:center;justify-content:center;
  background:var(--s-ui_hud_tab) center/100% 100% no-repeat;box-shadow:none;transition:transform .14s cubic-bezier(.34,1.56,.64,1),filter .12s}
html.classic:not(.has-ui_hud_tab) #topright .hudtab{background:linear-gradient(#E8B26E,#C88A4A 55%,#9C6230);border:2px solid var(--line);box-shadow:inset 0 2px 0 rgba(255,255,255,.35),0 2px 0 rgba(0,0,0,.3)}
html.classic #topright .hudtab img{width:34px;height:34px;margin:0;object-fit:contain;filter:drop-shadow(0 2px 0 rgba(0,0,0,.3))}
html.classic #topright .hudtab:hover{transform:translateY(-2px);filter:brightness(1.08)}
html.classic #topright .hudtab:active{transform:scale(.93)}
html.classic #topright .hudtab em{top:-5px;right:-6px}
html.classic #topright .gohome.wide{width:auto;height:44px;padding:0 12px 0 6px;gap:6px;border-radius:9px;
  background:linear-gradient(#FFC15A,#F08A1C 55%,#C4600A);border:2px solid var(--line);box-shadow:inset 0 2px 0 rgba(255,255,255,.45),0 2px 0 rgba(0,0,0,.3)}
html.classic #topright .gohome.wide img{width:34px;height:34px}
html.classic #topright .gohome.wide span{position:static;font-size:16px;white-space:nowrap}

/* ================= «-- Spiest šeit --» and «+» (lane V, plan/R15 §1.4: the original's plain combo-box prompt) ================= */
html.classic #banner{position:absolute;left:calc(300px + var(--sal));top:calc(var(--bar) + 8px + var(--sat));z-index:4;width:250px;height:32px;padding:0 12px;box-sizing:border-box;
  display:flex;align-items:center;justify-content:center;border-radius:10px;border:3px solid #4A3220;background:#BE9D7C;cursor:pointer;
  box-shadow:inset 0 2px 0 rgba(255,240,215,.25),0 1px 2px rgba(0,0,0,.2);transition:transform .14s cubic-bezier(.34,1.56,.64,1)}
html.classic #banner .lbl{font:bold 16px/1 "Trebuchet MS",Verdana,sans-serif;color:#6E4F33;white-space:nowrap}
html.classic #banner:hover{filter:brightness(1.05)}
html.classic #banner:active{transform:scale(.97)}
html.classic #banner-list{position:absolute;left:calc(300px + var(--sal));top:calc(var(--bar) + 42px + var(--sat));z-index:6;width:250px;box-sizing:border-box;padding:3px;border-radius:8px;
  border:2px solid #8A6440;background:#F6E8D2;box-shadow:0 4px 12px rgba(0,0,0,.25);font:13px/1.25 "Trebuchet MS",Verdana,sans-serif;color:#5A4026}
html.classic #banner-list[hidden]{display:none}
html.classic #banner-list .it{display:block;width:100%;box-sizing:border-box;padding:5px 8px;border:0;border-radius:5px;background:none;text-align:left;font:inherit;color:inherit;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}
html.classic #banner-list .it:hover{background:#EBD3AE}
html.classic #banner-list .it.new{font-weight:bold}
html.classic #banner-list .it.empty{color:#9A7E5E;cursor:default}
html.classic #banner-list .it.all{margin-top:2px;border-top:1px solid #DDC39C;border-radius:0 0 5px 5px;color:#2F6B1E;font-weight:bold}
html.classic #b-more{position:absolute;left:calc(560px + var(--sal));top:calc(var(--bar) + 9px + var(--sat));width:28px;height:28px;padding:0;border-radius:5px;
  border:2px solid rgba(190,205,140,.5);background:rgba(125,145,70,.55);box-shadow:0 1px 2px rgba(0,0,0,.15);transition:transform .14s cubic-bezier(.34,1.56,.64,1),background .3s}
html.classic #b-more i::before,html.classic #b-more i::after{content:"";position:absolute;left:50%;top:50%;width:14px;height:4px;margin:-2px 0 0 -7px;border-radius:2px;background:rgba(215,225,160,.85)}
html.classic #b-more i::after{transform:rotate(90deg)}
html.classic #b-more:hover{background:rgba(150,175,95,.7)}
html.classic #b-more:active{transform:scale(.9)}
html.classic #b-more.lit{border-color:rgba(235,255,215,.85);background:rgba(110,190,70,.9);animation:clPlusLit 2.4s ease-in-out infinite}
html.classic #b-more.lit i::before,html.classic #b-more.lit i::after{background:#fff}
@keyframes clPlusLit{0%,100%{box-shadow:0 1px 2px rgba(0,0,0,.15)}50%{box-shadow:0 0 0 3px rgba(255,235,120,.55),0 1px 2px rgba(0,0,0,.15)}}
/* the house upgrade pergament (lane V, R15 §3): the house now → the next one, small, side by side */
html.classic #modal .pergaments .upg{display:flex;align-items:center;justify-content:center;gap:14px;margin:4px 0 8px}
html.classic #modal .pergaments .upg img{width:150px;height:120px;object-fit:contain;filter:drop-shadow(0 3px 2px rgba(60,30,0,.25))}
html.classic #modal .pergaments .upg b{font-size:28px;color:#8A5A2A}
html.classic #modal .pergaments .ph p.upg-why{color:#A0461E;font-weight:bold}
@media (max-width:640px){html.classic #modal .pergaments .upg img{width:110px;height:88px}}
/* the radio (lane V): a square in the right column, under the camera; its panel opens to the left of the column */
html.classic #rcol #radio-badge.rc{position:relative;left:auto;bottom:auto;padding:6px;filter:none}
html.classic #rcol #radio-badge.rc svg{width:100%;height:100%}
html.classic #rcol #radio-badge.rc .lamp{right:3px;top:3px;width:8px;height:8px}
@media (min-width:961px) and (min-height:521px){html.classic #radiopanel{left:auto;right:calc(76px + var(--sar));top:auto;bottom:calc(140px + var(--sab));animation-name:clDropSm}}

/* ================= right column: Mana ferma, Spēles, kamera, ? ================= */
html.classic #rcol{position:absolute;right:calc(8px + var(--sar));bottom:calc(140px + var(--sab));display:flex;flex-direction:column;align-items:flex-end;gap:8px;pointer-events:none}
html.classic #rcol>*{pointer-events:auto}
html.classic #rcol .rc{position:relative;flex:none;width:56px;height:56px;padding:5px;box-sizing:border-box;border-radius:10px;border:2px solid rgba(235,255,220,.55);
  background:rgba(170,212,145,.5);box-shadow:0 2px 5px rgba(0,0,0,.16);display:flex;align-items:center;justify-content:center;transition:transform .14s cubic-bezier(.34,1.56,.64,1),background .12s}
html.classic #rcol .rc img{width:100%;height:100%;margin:0;object-fit:contain;filter:drop-shadow(0 2px 0 rgba(0,0,0,.25))}
html.classic #rcol .rc svg{width:100%;height:100%;margin:0}
html.classic #rcol .rc:hover{background:rgba(190,230,165,.7);transform:translateY(-2px)}
html.classic #rcol .rc:active{transform:scale(.93)}
html.classic #rcol .rc.small{width:32px;height:32px;padding:2px;border-radius:8px}
html.classic #rcol .rc .q{font:bold 20px/1 "Trebuchet MS",sans-serif;color:#5B4A1A}
html.classic #rcol .rc.has-img .q{display:none}
html.classic #rcol .rc-home{position:relative;display:flex;flex-direction:row-reverse;align-items:center;gap:6px;pointer-events:none}
html.classic #rcol .rc-home>*{pointer-events:auto}
html.classic #rcol #avatar{position:static;width:auto;gap:0;align-items:flex-end;transform:none;pointer-events:none}
html.classic #rcol #avatar .av{display:none}
html.classic #rcol #avatar span{align-self:auto;text-align:right;font-size:13px;max-width:min(200px,26vw)}
html.classic #rcol #avatar small{text-align:right;max-width:min(200px,26vw)}

/* ================= small bar (R13 §2.1): olive glass, 32 px ================= */
html.classic #side{right:calc(8px + var(--sar));bottom:calc(92px + var(--sab));gap:4px;flex-direction:row;align-items:center}
html.classic #side .sb{position:relative;width:32px;height:32px;padding:4px;box-sizing:border-box;border-radius:6px;border:1px solid rgba(205,235,160,.5);background:var(--olive);
  box-shadow:0 1px 3px rgba(0,0,0,.22);backdrop-filter:none;transition:transform .14s cubic-bezier(.34,1.56,.64,1),background .12s}
html.classic #side .sb:hover{background:rgba(80,115,40,.72)}
html.classic #side .sb:active{transform:scale(.9)}
html.classic #side .sb.txt{font:bold 19px/1 "Trebuchet MS",sans-serif;color:#EEF8DC;text-shadow:0 1px 0 rgba(0,0,0,.55)}
html.classic #side .sb svg path{fill:#EEF8DC;stroke:#EEF8DC}
html.classic #side .sb svg path:first-child{stroke:none}
html.classic.has-hud_zoom #side #b-zin,html.classic.has-hud_zoom #side #b-zout{font-size:0;color:transparent;text-shadow:none;background:var(--s-hud_zoom) 2% 50%/196% 92% no-repeat,var(--olive)}
html.classic.has-hud_zoom #side #b-zout{background-position:98% 50%,0 0}

/* ================= tools: pale green tiles, the chosen one in a blue frame that breathes cyan ================= */
html.classic #palette{right:calc(8px + var(--sar));bottom:calc(8px + var(--sab));gap:6px}
html.classic .tool{width:68px;height:68px;padding:6px;box-sizing:border-box;border-radius:8px;border:2px solid rgba(228,248,210,.65);
  background:linear-gradient(rgba(196,230,170,.86),rgba(160,206,134,.82));box-shadow:0 2px 5px rgba(0,0,0,.2),inset 0 1px 0 rgba(255,255,255,.45);
  transition:transform .14s cubic-bezier(.34,1.56,.64,1),box-shadow .2s,border-color .2s}
html.classic .tool img{filter:drop-shadow(0 2px 0 rgba(0,0,0,.22))}
html.classic .tool:hover{transform:translateY(-3px)}
html.classic .tool:active{transform:scale(.93)}
html.classic .tool.sel{border:3px solid #4C86BC;background:linear-gradient(rgba(214,240,246,.92),rgba(172,220,232,.88));transform:translateY(-4px);animation:clBreathe 1.6s ease-in-out infinite}
html.classic .tool.sel:active{transform:translateY(-4px) scale(.93)}
html.classic .tool kbd{color:rgba(30,52,14,.5)}
html.classic .tool .badge{border-color:#4C86BC}

/* ================= the bag: handle + tray (R13 §2.2) — the seed picker in the classic frame ================= */
html.classic #b-tray{position:absolute;left:calc(8px + var(--sal));bottom:calc(8px + var(--sab));width:24px;height:110px;padding:0;border-radius:6px;border:2px solid #6B4423;
  background:var(--s-ui_tray_rokturis_r) center/100% 100% no-repeat,linear-gradient(90deg,#D9A36A,#E9BE86 50%,#C4874C);box-shadow:0 2px 0 rgba(0,0,0,.3);transition:transform .14s cubic-bezier(.34,1.56,.64,1)}
html.classic.has-ui_tray_rokturis_r #b-tray{border:0;background:var(--s-ui_tray_rokturis_r) center/100% 100% no-repeat;box-shadow:none;filter:drop-shadow(0 2px 0 rgba(0,0,0,.3))}
html.classic.has-ui_tray_rokturis_r #b-tray i{display:none}
html.classic #b-tray i{position:absolute;left:7px;top:50%;margin-top:-8px;border:8px solid transparent;border-left:9px solid #FFF1D8;border-right:0;filter:drop-shadow(0 0 1px #5a3412)}
html.classic #b-tray:hover{transform:translateX(2px)}
html.classic #hud:has(#seedpick:not([hidden])) #b-tray{background-image:var(--s-ui_tray_rokturis_l)}
html.classic #friendsbar{left:calc(40px + var(--sal))}
html.classic #hud:has(#seedpick:not([hidden])) #friendsbar{visibility:hidden}
html.classic #seedpick{left:calc(36px + var(--sal));right:auto;bottom:calc(2px + var(--sab));transform:none;height:116px;max-width:min(720px,calc(100vw - 480px));box-sizing:border-box;
  padding:7px 7px 5px;display:flex;flex-wrap:nowrap;align-items:center;justify-content:flex-start;gap:4px;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;border-radius:10px;
  background:#3A2210;border:6px solid #E2B271;box-shadow:inset 0 3px 8px rgba(0,0,0,.6),0 0 0 2px #6B3F1D,0 4px 0 rgba(0,0,0,.3);transform-origin:0 50%;animation:clTrayIn .26s cubic-bezier(.3,1.3,.5,1);z-index:2}
html.classic.has-ui_tray_ramis #seedpick{border-style:solid;border-color:transparent;border-width:9px 11px 15px;border-image:var(--s-ui_tray_ramis) 14% 7.5% 23% fill / 9px 11px 15px stretch;background:#3A2210 padding-box;box-shadow:none}
html.classic #seedpick .seed{position:relative;flex:none;width:72px;height:80px;padding:2px;box-sizing:border-box;border-radius:6px;border:0;background:rgba(255,240,210,.06);
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;color:#FFF3D6;transition:transform .12s cubic-bezier(.34,1.56,.64,1),background .12s;animation:clCell .22s ease-out both}
html.classic #seedpick .seed:nth-child(2){animation-delay:.02s}html.classic #seedpick .seed:nth-child(3){animation-delay:.04s}html.classic #seedpick .seed:nth-child(4){animation-delay:.06s}
html.classic #seedpick .seed:nth-child(5){animation-delay:.08s}html.classic #seedpick .seed:nth-child(6){animation-delay:.1s}html.classic #seedpick .seed:nth-child(7){animation-delay:.12s}html.classic #seedpick .seed:nth-child(8){animation-delay:.14s}
html.classic #seedpick .seed img{width:54px;height:44px;object-fit:contain;filter:drop-shadow(0 2px 0 rgba(0,0,0,.35))}
html.classic #seedpick .seed b{font:bold 11px/1.15 "Trebuchet MS",sans-serif;color:#fff;white-space:nowrap;text-shadow:-1px -1px 0 #1d0e02,1px -1px 0 #1d0e02,-1px 1px 0 #1d0e02,1px 1px 0 #1d0e02}
html.classic #seedpick .seed small{font:bold 11px/1.1 "Trebuchet MS",sans-serif;color:#FFE14A;text-shadow:0 1px 0 #1d0e02}
html.classic #seedpick .seed:hover{background:rgba(255,240,210,.16);transform:translateY(-2px)}
html.classic #seedpick .seed:active{transform:scale(.93)}
html.classic #seedpick .seed.sel{z-index:1;background:rgba(143,243,255,.14);box-shadow:0 0 0 3px var(--cyan),0 0 12px rgba(111,231,255,.8)}
html.classic.has-ui_suna_sel #seedpick .seed.sel{box-shadow:0 0 12px rgba(111,231,255,.6)}
html.classic.has-ui_suna_sel #seedpick .seed.sel::before{content:"";position:absolute;inset:-6px -6px -5px;background:var(--s-ui_suna_sel) center/100% 100% no-repeat;pointer-events:none}
html.classic #seedpick .seed.lock{opacity:.5;filter:grayscale(.6)}
html.classic #seedpick .seed.lock small{color:#FFB09A}

/* ================= toasts: the left column, light green, gold letters (R13 §4.3, as in the original) ================= */
html.classic #toasts{left:calc(8px + var(--sal));top:calc(110px + var(--sat));transform:none;width:min(360px,calc(100vw - 110px));flex-direction:column-reverse;align-items:flex-start;gap:5px}
html.classic .toast{box-sizing:border-box;min-height:0;max-width:100%;padding:5px 10px 6px;border-radius:3px;background:rgba(196,236,172,.82);border:1px solid rgba(255,255,255,.28);
  box-shadow:0 1px 3px rgba(0,0,0,.12);font:bold 16px/1.25 "Trebuchet MS",Verdana,sans-serif;font-style:normal;color:#FFD84A;text-align:left;
  text-shadow:-1px -1px 0 #4A2A00,1px -1px 0 #4A2A00,-1px 1px 0 #4A2A00,1px 1px 0 #4A2A00,0 -1px 0 #4A2A00,0 1px 0 #4A2A00,-1px 0 0 #4A2A00,1px 0 0 #4A2A00,0 2px 1px rgba(40,20,0,.5);
  animation:clToastIn .22s cubic-bezier(.3,1.3,.5,1)}
html.classic .toast.good{background:rgba(190,235,160,.84)}
html.classic .toast.bad{background:rgba(240,180,160,.9);border-color:rgba(140,40,20,.55);color:#FFF0E6;
  text-shadow:-1px -1px 0 #6B1A0A,1px -1px 0 #6B1A0A,-1px 1px 0 #6B1A0A,1px 1px 0 #6B1A0A,0 -1px 0 #6B1A0A,0 1px 0 #6B1A0A,-1px 0 0 #6B1A0A,1px 0 0 #6B1A0A}
html.classic .toast.out{opacity:0;transform:translateX(-14px);transition:opacity .3s,transform .3s}
html.classic .toast.act{padding:5px 6px 5px 12px;gap:10px}
html.classic .toast.act .btn{height:28px;font-size:13px;font-style:normal}

/* ================= tips (R13 §4.4, §3.4) ================= */
.cl-tip{position:fixed;left:0;top:0;z-index:60;box-sizing:border-box;max-width:270px;padding:8px 12px 9px;border-radius:10px;background:rgba(206,233,190,.95);border:1px solid rgba(80,130,50,.55);
  box-shadow:0 4px 14px rgba(0,0,0,.25);color:#1F2A14;font:13px/1.35 "Trebuchet MS",Verdana,sans-serif;text-align:center;pointer-events:none}
.cl-tip[hidden]{display:none}
.cl-tip.in{animation:clTipIn .14s ease-out}
.cl-tip .tt{display:block;font:bold 14px/1.3 "Trebuchet MS",Verdana,sans-serif;color:#141c0c}
.cl-tip .tx{display:block;margin-top:2px}
.cl-tip.card-tip{width:240px;max-width:240px;padding:9px 12px 10px;text-align:left;background:rgba(255,255,255,.95);border-color:#B9A98A;color:#3A3A3A;border-radius:8px}
.cl-tip.card-tip .tt{text-align:center;color:#1F8A2E;font-size:16px;margin-bottom:2px}
.cl-tip.card-tip .lv{display:flex;align-items:center;gap:5px;margin:2px 0 4px;font:bold 15px/1.2 "Trebuchet MS",Verdana,sans-serif;color:#1F6FD6}
.cl-tip.card-tip .lv img{width:15px;height:19px;object-fit:contain}
.cl-tip.card-tip .kv{font-size:13.5px;line-height:1.45;color:#6B6B6B}
.cl-tip.card-tip .kv b{color:#333}
.cl-tip.card-tip .desc{display:block;margin-top:5px;font-size:12.5px;line-height:1.35;color:#555}
.cl-tip.sheet{left:8px!important;right:8px;top:auto!important;bottom:calc(8px + env(safe-area-inset-bottom,0px));width:auto;max-width:none}

/* ================= Bodīte (R13 §3) ================= */
html.classic #modal .panel.bodite{position:relative;width:min(1040px,96vw);height:min(680px,calc(92vh - 40px));max-height:none;margin-top:46px;box-sizing:border-box;display:flex;flex-direction:column;
  padding:0 0 6px;border-radius:14px;border:10px solid #8E5C2C;
  background:repeating-linear-gradient(90deg,rgba(150,95,40,0) 0 118px,rgba(150,95,40,.18) 118px 120px,rgba(255,235,195,.14) 120px 121px,rgba(150,95,40,0) 121px 240px),
    repeating-linear-gradient(0deg,rgba(160,105,50,.06) 0 3px,rgba(255,240,210,.05) 3px 8px),linear-gradient(#E0B079,#D5A167);
  box-shadow:0 0 0 3px #4A2810,inset 0 0 0 2px #E8C08C,inset 0 6px 14px rgba(90,52,18,.25),0 16px 40px rgba(0,0,0,.45);animation:clBoditeIn .32s cubic-bezier(.3,1.5,.5,1) both}
/* the ribbon: two notched ends and a stretched middle, wider than the panel */
html.classic #modal .bodite .lente{position:absolute;left:-7%;right:-7%;top:-62px;height:72px;display:flex;z-index:2;pointer-events:none;animation:clRibbon .45s cubic-bezier(.3,1.5,.5,1) .05s both}
html.classic #modal .bodite .lente .end{flex:none;width:116px;height:100%;background:var(--s-ui_lente_l) right center/100% 100% no-repeat}
html.classic #modal .bodite .lente .end.r{background-image:var(--s-ui_lente_r);background-position:left center}
html.classic #modal .bodite .lente .mid{flex:1;height:100%;margin:0 -3px;background:var(--s-ui_lente_m) center/100% 100% no-repeat}
html.classic:not(.has-ui_lente_m) #modal .bodite .lente .mid{background:linear-gradient(#F2C24B 0 6%,#C9241A 6% 12%,#B01A12 50%,#8C120A 88%,#F2C24B 88% 94%,transparent 94%)}
html.classic:not(.has-ui_lente_l) #modal .bodite .lente .end{background:linear-gradient(#9E1A10,#7A0F08);clip-path:polygon(0 8%,100% 0,100% 100%,0 92%,26% 50%)}
html.classic:not(.has-ui_lente_r) #modal .bodite .lente .end.r{clip-path:polygon(0 0,100% 8%,74% 50%,100% 92%,0 100%)}
html.classic #modal .bodite .lente h2{position:absolute;left:0;right:0;top:9px;margin:0;text-align:center;font:bold 40px/1 "Trebuchet MS",Verdana,sans-serif;font-style:normal;letter-spacing:.5px;color:#FFC93B;
  text-shadow:-3px 0 #6E0E05,3px 0 #6E0E05,0 -3px #6E0E05,0 3px #6E0E05,-2px -2px #6E0E05,2px -2px #6E0E05,-2px 2px #6E0E05,2px 2px #6E0E05,0 5px 0 #4A0802}
html.classic #modal .bodite .stars{position:absolute;left:50%;top:0;width:0;height:0}
html.classic #modal .bodite .st{position:absolute;width:30px;height:30px;margin-left:-15px;font-style:normal;color:#FFD21F;font-size:28px;line-height:30px;text-align:center;animation:clStar .36s cubic-bezier(.3,1.8,.5,1) both}
html.classic #modal .bodite .st img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 2px 0 rgba(90,40,0,.45))}
html.classic #modal .bodite .st.s0{left:-150px;top:-16px;width:25px;height:25px;margin-left:-12px;animation-delay:.18s}
html.classic #modal .bodite .st.s1{left:-76px;top:-34px;animation-delay:.24s}
html.classic #modal .bodite .st.s2{left:0;top:-40px;animation-delay:.3s}
html.classic #modal .bodite .st.s3{left:76px;top:-34px;animation-delay:.36s}
html.classic #modal .bodite .st.s4{left:150px;top:-16px;width:25px;height:25px;margin-left:-12px;animation-delay:.42s}
html.classic #modal .bodite .masc{position:absolute;z-index:3;object-fit:contain;pointer-events:none;filter:drop-shadow(0 3px 2px rgba(0,0,0,.3))}
html.classic #modal .bodite .masc.l{left:9%;top:-74px;width:100px;height:96px;animation:clMascL .4s cubic-bezier(.3,1.4,.5,1) .08s both}
html.classic #modal .bodite .masc.r{right:13%;top:-112px;width:84px;height:140px;animation:clMascR .4s cubic-bezier(.3,1.4,.5,1) .08s both}
html.classic #modal .panel.bodite .x.cl-x{right:-26px;top:-58px;z-index:4}
/* tabs: 2 rows of 5 */
html.classic #modal .bodite .tabs{flex:none;display:grid;grid-template-columns:repeat(5,1fr);gap:8px 12px;padding:24px 34px 10px}
html.classic #modal .bodite .tabs button{height:40px;padding:0 6px;border-radius:7px;border:2px solid #8A5A2B;background:linear-gradient(#FBF2E0,#F2E4C6 60%,#E7D2A6);
  font:bold 15px/1 "Trebuchet MS",Verdana,sans-serif;color:#6B3F1D;box-shadow:0 2px 0 rgba(90,52,18,.4),inset 0 1px 0 #fff;transform:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  transition:transform .12s cubic-bezier(.34,1.56,.64,1),filter .12s}
html.classic #modal .bodite .tabs button:hover{filter:brightness(1.04);transform:translateY(-1px)}
html.classic #modal .bodite .tabs button:active{transform:scale(.95)}
html.classic #modal .bodite .tabs button.on{background:linear-gradient(#EBD6AA,#E0C48E);border:3px solid #5A3412;color:#4A2810;box-shadow:inset 0 2px 4px rgba(0,0,0,.35),0 1px 0 rgba(255,240,210,.6);transform:none}
/* the board and the page arrows */
html.classic #modal .bodite .boardwrap{flex:1;min-height:0;display:grid;grid-template-columns:56px 1fr 56px;gap:10px;align-items:center;padding:0 12px}
html.classic #modal .bodite .board{position:relative;align-self:stretch;min-height:0;box-sizing:border-box;border:6px solid #6B3F1D;border-radius:8px;background:#B9834A;padding:12px;overflow:hidden;
  box-shadow:inset 0 3px 8px rgba(0,0,0,.3),0 1px 0 rgba(255,236,200,.5)}
html.classic #modal .bodite .page{display:grid;grid-template-columns:repeat(var(--cols,4),minmax(0,1fr));grid-template-rows:repeat(var(--rows,2),minmax(0,1fr));gap:12px;height:100%}
html.classic #modal .bodite .board.in-r .page:not([hidden]){animation:clInR .18s ease-out}
html.classic #modal .bodite .board.in-l .page:not([hidden]){animation:clInL .18s ease-out}
html.classic #modal .bodite .arrow{position:relative;width:56px;height:min(220px,60%);padding:0;border-radius:12px;border:6px solid #5E3B1D;
  background:linear-gradient(90deg,#A47448,#D0A77D 45%,#B88A5C 70%,#9A6C40);box-shadow:inset 0 0 0 2px rgba(255,235,200,.35),inset 0 -6px 8px rgba(70,40,10,.25),0 4px 0 rgba(0,0,0,.3);
  transition:transform .14s cubic-bezier(.34,1.56,.64,1),filter .12s,opacity .2s}
html.classic #modal .bodite .arrow i{position:absolute;left:50%;top:50%;width:24px;height:40px;margin:-20px 0 0 -14px;background:#F2D4A8;clip-path:polygon(0 50%,100% 0,100% 100%);filter:drop-shadow(0 0 1px #4a2a10)}
html.classic #modal .bodite .arrow.next i{margin-left:-10px;clip-path:polygon(0 0,100% 50%,0 100%)}
html.classic #modal .bodite .arrow:hover:not([disabled]){filter:brightness(1.08)}
html.classic #modal .bodite .arrow:active:not([disabled]){transform:scale(.93)}
html.classic #modal .bodite .arrow[disabled]{opacity:.4;cursor:default}
html.classic #modal .bodite .pageno{flex:none;height:22px;text-align:center;font:bold 13px/22px "Trebuchet MS",Verdana,sans-serif;color:#5A3412}
/* cards */
html.classic #modal .bodite .card{position:relative;min-width:0;min-height:0;box-sizing:border-box;padding:8px 8px 9px;gap:5px;display:flex;flex-direction:column;align-items:center;justify-content:space-between;
  border-radius:8px;border:3px solid #7A4E28;background:linear-gradient(#FAF4EA,#EFE6D6);box-shadow:inset 0 1px 0 #fff,0 2px 0 rgba(70,40,10,.3);
  transition:transform .15s cubic-bezier(.34,1.56,.64,1),box-shadow .15s}
html.classic #modal .bodite .card:hover{transform:translateY(-4px);box-shadow:inset 0 1px 0 #fff,0 8px 12px rgba(70,40,10,.32)}
html.classic #modal .bodite .card .pic{position:relative;flex:1 1 auto;width:auto;height:auto;aspect-ratio:1;max-height:120px;min-height:48px;max-width:100%;box-sizing:border-box;border-radius:9px;
  border:1px solid #C9B48E;background:#fff;box-shadow:inset 0 0 0 3px #F7F0E2,0 1px 2px rgba(0,0,0,.12);display:flex;align-items:center;justify-content:center;overflow:hidden}
html.classic #modal .bodite .card .pic img{width:86%;height:86%;max-width:none;max-height:none;object-fit:contain;transition:transform .15s ease-out}
html.classic #modal .bodite .card:hover .pic img{transform:scale(1.06)}
html.classic #modal .bodite .card .lockl{position:absolute;left:50%;bottom:6px;transform:translateX(-50%);padding:2px 8px;border-radius:10px;background:#2F63C7;border:1px solid #fff;color:#fff;font:bold 11.5px/1.3 "Trebuchet MS",sans-serif;white-space:nowrap}
html.classic #modal .bodite .card .nm{flex:none;max-width:100%;font:bold 15px/1.2 "Trebuchet MS",Verdana,sans-serif;font-style:normal;color:#2E7D1E;text-shadow:none;text-align:center;margin:0;
  display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden}
html.classic #modal .bodite .card .step{flex:none;display:flex;align-items:center;gap:4px;height:26px}
html.classic #modal .bodite .card .step.none{height:0}
html.classic #modal .bodite .card .step button{position:relative;width:26px;height:26px;padding:0;border-radius:7px;border:2px solid #A14F00;background:linear-gradient(#FFB45A,#F28C1E 60%,#D9700C);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.5),0 1px 0 rgba(0,0,0,.25);transition:transform .12s cubic-bezier(.34,1.56,.64,1)}
html.classic.has-ui_step_up #modal .bodite .card .step button{border:0;box-shadow:none;background:var(--s-ui_step_down) center/100% 100% no-repeat}
html.classic.has-ui_step_up #modal .bodite .card .step button.up{background-image:var(--s-ui_step_up)}
html.classic.has-ui_step_up #modal .bodite .card .step button i{display:none}
html.classic #modal .bodite .card .step button i{position:absolute;left:50%;top:50%;width:12px;height:9px;margin:-4px 0 0 -6px;background:#FFF1DC;clip-path:polygon(0 0,100% 0,50% 100%)}
html.classic #modal .bodite .card .step button.up i{margin-top:-5px;clip-path:polygon(50% 0,100% 100%,0 100%)}
html.classic #modal .bodite .card .step button:active{transform:scale(.88)}
html.classic #modal .bodite .card .step input{width:44px;height:24px;box-sizing:border-box;border-radius:3px;border:1px solid #9A9A9A;background:#fff;text-align:center;font:bold 14px "Trebuchet MS",sans-serif;color:#2a2a2a;box-shadow:inset 0 1px 2px rgba(0,0,0,.18)}
html.classic #modal .bodite .card .caps{flex:none;display:flex;justify-content:center;gap:6px;width:100%}
html.classic #modal .bodite .card .price{position:relative;display:flex;align-items:center;justify-content:center;gap:5px;min-width:0;width:min(150px,92%);height:30px;padding:0 10px 0 6px;box-sizing:border-box;
  border-radius:14px;border:2px solid #8A4A00;background:linear-gradient(#FFD27A 0,#F8B133 35%,#E5891B 80%,#D27610);box-shadow:inset 0 1px 0 rgba(255,250,220,.7),0 2px 0 rgba(90,40,0,.35);
  font:bold 16px/1 "Trebuchet MS",Verdana,sans-serif;color:#fff;cursor:pointer;text-shadow:-1px -1px 0 #6B3300,1px -1px 0 #6B3300,-1px 1px 0 #6B3300,1px 1px 0 #6B3300,0 2px 0 #6B3300;
  transition:transform .12s cubic-bezier(.34,1.56,.64,1),filter .12s}
html.classic #modal .bodite .card .price img{width:22px;height:22px;flex:none;object-fit:contain;filter:drop-shadow(0 1px 0 rgba(0,0,0,.3))}
html.classic #modal .bodite .card .price b{flex:1;text-align:center}
html.classic #modal .bodite .card .price small{font-size:11px;margin-left:-2px}
html.classic #modal .bodite .card .price .coin{width:20px;height:20px;border-radius:50%;background:radial-gradient(circle at 35% 30%,#FFF2A8,#F2B21C 60%,#B97A00);flex:none}
html.classic #modal .bodite .card .price .coin.kr{border-radius:3px;transform:rotate(45deg) scale(.8);background:linear-gradient(135deg,#E6C8FF,#9A5BD6 50%,#5E2A92)}
html.classic #modal .bodite .card .price:hover{filter:brightness(1.08)}
html.classic #modal .bodite .card .price:active{transform:scale(.92)}
html.classic #modal .bodite .card .price.cant b{color:#FFE2D6}
html.classic #modal .bodite .card.lock{opacity:.6;filter:none}
html.classic #modal .bodite .card.lock .pic img{filter:grayscale(.5)}
html.classic #modal .bodite .card.lock .price{cursor:default;filter:grayscale(.35)}
html.classic #modal .bodite .soon{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;height:100%;padding:0;color:#FFF4DC;font:bold italic 34px/1.1 "Trebuchet MS",sans-serif;text-shadow:0 3px 0 #4A2810,-2px 0 #4A2810,2px 0 #4A2810,0 -2px #4A2810}
html.classic #modal .bodite .soon img{width:96px;height:90px;object-fit:contain;animation:clBob 2.4s ease-in-out infinite}
html.classic #modal .bodite .soon small{font-size:15px;font-style:normal;text-shadow:0 1px 0 #4A2810}

/* the red X shared by every classic panel */
html.classic #modal .panel .x.cl-x{position:absolute;right:-14px;top:-14px;width:42px;height:42px;padding:0;border:0;border-radius:6px;font-size:0;
  background:var(--s-ui_x_sarkans) center/100% 100% no-repeat;box-shadow:none;filter:drop-shadow(0 3px 0 rgba(0,0,0,.35));transition:transform .14s cubic-bezier(.34,1.56,.64,1)}
html.classic:not(.has-ui_x_sarkans) #modal .panel .x.cl-x{background:linear-gradient(#F0533A,#C42A12);border:3px solid #fff;font:bold 20px/1 sans-serif;color:#fff}
html.classic:not(.has-ui_x_sarkans) #modal .panel .x.cl-x::before{content:"✕"}
html.classic #modal .panel .x.cl-x:hover{transform:scale(1.06) rotate(3deg)}
html.classic #modal .panel .x.cl-x:active{transform:scale(.9)}

/* ================= the cherry parchment (R13 §4.1) ================= */
html.classic #modal .panel.pergaments{position:relative;width:min(560px,92vw);min-height:230px;max-height:86vh;box-sizing:border-box;display:block;padding:34px 30px 30px;margin-top:40px;
  border-radius:8px;border:3px solid #8A5A2B;background:repeating-linear-gradient(0deg,rgba(170,110,50,.07) 0 3px,rgba(255,240,210,.06) 3px 9px),linear-gradient(#F4D29E,#ECC283 60%,#E2B272);
  box-shadow:inset 0 0 0 2px rgba(255,245,220,.5),0 14px 34px rgba(0,0,0,.45);color:#3A1D00;text-align:center;animation:clDrop .38s cubic-bezier(.3,1.5,.5,1) both}
html.classic.has-ui_pergaments #modal .panel.pergaments{border:28px solid transparent;border-image:var(--s-ui_pergaments) 22% 16% fill / 28px stretch;background:none;box-shadow:none;padding:8px 6px 4px;filter:drop-shadow(0 12px 22px rgba(0,0,0,.4))}
html.classic #modal .pergaments .frame{position:relative;min-height:150px;box-sizing:border-box;padding:24px 26px 20px;border:6px dashed #C8321C;border-radius:4px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px}
html.classic.has-ui_sarkans_ramis #modal .pergaments .frame{border:22px solid transparent;border-image:var(--s-ui_sarkans_ramis) 12% / 22px stretch;padding:10px 14px 8px}
html.classic #modal .pergaments .pt{margin:0;font:bold 24px/1.2 "Trebuchet MS",Verdana,sans-serif;font-style:normal;color:#3A1D00;text-shadow:0 1px 0 rgba(255,240,210,.6);letter-spacing:0}
html.classic #modal .pergaments .pb{margin:0;font:bold 20px/1.35 "Trebuchet MS",Verdana,sans-serif;color:#3A1D00}
html.classic #modal .pergaments .ph{font:16px/1.4 "Trebuchet MS",Verdana,sans-serif;color:#3A1D00;max-height:52vh;overflow:auto;width:100%}
html.classic #modal .pergaments .ph p{margin:4px 0}
html.classic #modal .pergaments .ph .big{display:flex;align-items:center;justify-content:center;gap:8px;font:bold 30px/1 "Trebuchet MS",sans-serif;color:#5B2E9E}
html.classic #modal .pergaments .ph .big img{width:36px;height:36px}
html.classic #modal .pergaments .ph .soon{font:bold italic 22px "Trebuchet MS",sans-serif;color:#C8321C}
html.classic #modal .pergaments .pbtn{display:flex;gap:10px;justify-content:center;margin-top:6px}
html.classic #modal .pergaments .pbtn .btn{height:38px;padding:0 20px;font-size:17px}
html.classic #modal .pergaments .kirsi{position:absolute;left:-74px;top:-104px;width:170px;height:147px;z-index:3;object-fit:contain;pointer-events:none;transform-origin:42% 12%;
  filter:drop-shadow(0 4px 3px rgba(0,0,0,.3));animation:clBob 2.4s ease-in-out infinite}
html.classic #modal .pergaments .kirsi.css b{position:absolute;width:62px;height:58px;border-radius:50%;background:radial-gradient(circle at 35% 30%,#F07ACB,#B0228A 60%,#7A0F5E);box-shadow:inset 0 -4px 0 rgba(0,0,0,.15)}
html.classic #modal .pergaments .kirsi.css b:first-child{left:46px;top:84px}
html.classic #modal .pergaments .kirsi.css b:nth-child(2){left:108px;top:56px}
html.classic #modal .pergaments .kirsi.css s{position:absolute;left:60px;top:8px;width:70px;height:70px;border:5px solid #3D9A2A;border-color:#3D9A2A transparent transparent #3D9A2A;border-radius:50% 0 0 0;transform:rotate(18deg)}
html.classic #modal .pergaments.wide{width:min(640px,94vw)}
html.classic #modal .pergaments ul.awards,html.classic #modal .pergaments ul.bank,html.classic #modal .pergaments ul.help{list-style:none;margin:8px 0 0;padding:0;text-align:left;display:flex;flex-direction:column;gap:4px}
html.classic #modal .pergaments ul.awards li{display:grid;grid-template-columns:96px 1fr 20px;gap:8px;align-items:center;padding:4px 8px;border-radius:6px;background:rgba(255,248,230,.5);font-size:15px}
html.classic #modal .pergaments ul.awards li.got{background:rgba(190,235,160,.6)}
html.classic #modal .pergaments ul.awards li i{font-style:normal;font-weight:bold;color:#2E7D1E}
html.classic #modal .pergaments ul.bank li{display:grid;grid-template-columns:30px 1fr auto;gap:8px;align-items:center;padding:5px 10px;border-radius:6px;background:rgba(255,248,230,.55);font-size:16px}
html.classic #modal .pergaments ul.bank img{width:28px;height:28px;object-fit:contain}
html.classic #modal .pergaments ul.help li{font-size:14.5px;line-height:1.35;padding:3px 4px}
/* the level-up card as a parchment */
html.classic #modal .panel.pergaments.lv-card{width:min(480px,92vw);text-align:center}
html.classic #modal .lv-card .ros{position:relative;left:auto;top:auto;width:84px;height:92px;margin:-4px auto 2px;transform:none;animation:clRosIn .7s cubic-bezier(.3,1.6,.5,1) .12s both}
html.classic #modal .lv-card .ros img{width:100%;height:100%;object-fit:contain}
html.classic #modal .lv-card .ros .ros-css{position:absolute;inset:0 8px 16px;border-radius:50%;background:radial-gradient(#FFF6DA 0 44%,#2F7FD8 46% 70%,#1B4F9A 72%)}
html.classic #modal .lv-card .ros b{position:absolute;left:0;right:0;top:19px;font:bold italic 34px/1 "Trebuchet MS",sans-serif;color:#FFE14A;
  text-shadow:-3px 0 #1B2F6B,3px 0 #1B2F6B,0 -3px #1B2F6B,0 3px #1B2F6B,-2px -2px #1B2F6B,2px -2px #1B2F6B,-2px 2px #1B2F6B,2px 2px #1B2F6B,0 4px 0 #0f1c44}
html.classic #modal .lv-card h2.pt{font-size:26px}
html.classic #modal .lv-card .prize{font:bold 17px/1.4 "Trebuchet MS",Verdana,sans-serif;color:#3A1D00;margin:2px 0}
html.classic #modal .lv-card .unl{margin:4px 0 0;font:bold 14px "Trebuchet MS",sans-serif;color:#5a2600}
html.classic #modal .lv-card ul{margin:6px 0 8px}
html.classic #modal .lv-card li.rw{display:inline-flex;align-items:center;gap:5px}
html.classic #modal .lv-card li.rw img{width:18px;height:18px}

/* ================= «Privatizēt» (R13 §4.2) ================= */
html.classic #modal .panel.apstiprinajums{position:relative;width:min(520px,92vw);max-height:none;box-sizing:border-box;display:block;padding:34px 28px 26px;border-radius:10px;
  background:rgba(228,228,228,.86);border:3px solid #5A5A5A;box-shadow:inset 0 1px 0 #fff,inset 0 0 0 1px rgba(255,255,255,.5),0 12px 30px rgba(0,0,0,.35);
  -webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);text-align:center;animation:clPop .2s ease-out both}
html.classic #modal .apstiprinajums .q{margin:0 0 10px;font:bold 17px/1.45 "Trebuchet MS",Verdana,sans-serif;color:#1E1E1E}
html.classic #modal .apstiprinajums .why{margin:0 auto 6px;padding:6px 12px;display:inline-block;border-radius:6px;background:rgba(150,150,150,.3);color:#333;font:bold 14px/1.3 "Trebuchet MS",sans-serif}
html.classic #modal .apstiprinajums .caps{display:flex;flex-wrap:wrap;gap:16px;justify-content:center;margin-top:16px}
html.classic #modal .apstiprinajums .cap{position:relative;overflow:hidden;min-width:150px;height:44px;padding:0 18px;border-radius:10px;border:2px solid #6E6E6E;
  background:linear-gradient(#F2F2F2,#D7D7D7 45%,#B9B9B9);box-shadow:inset 0 1px 0 #fff,0 2px 0 rgba(0,0,0,.25);display:flex;align-items:center;justify-content:center;gap:8px;
  font:bold 18px/1 "Trebuchet MS",Verdana,sans-serif;color:#222;transition:transform .12s cubic-bezier(.34,1.56,.64,1),filter .12s}
html.classic #modal .apstiprinajums .cap img{width:24px;height:24px;object-fit:contain}
html.classic #modal .apstiprinajums .cap span,html.classic #modal .apstiprinajums .cap img{position:relative;z-index:1}
html.classic #modal .apstiprinajums .cap .prog{position:absolute;left:0;top:0;bottom:0;width:0;background:linear-gradient(#B8F27A,#5BC72E 55%,#3E9A1B)}
html.classic #modal .apstiprinajums .cap.going .prog{animation:clProg .6s linear forwards}
html.classic #modal .apstiprinajums .cap:hover:not([disabled]){filter:brightness(1.05)}
html.classic #modal .apstiprinajums .cap:active:not([disabled]){transform:scale(.94)}
html.classic #modal .apstiprinajums .cap[disabled]{opacity:.5;cursor:default}
html.classic #modal .apstiprinajums.going .cap.no{opacity:.5;pointer-events:none}

/* ================= press squash release (js/ui/kit.js squash) ================= */
html.classic .cl-rel{animation:clRel .18s cubic-bezier(.34,1.56,.64,1)}

/* ================= motion ================= */
@keyframes clRosPop{0%{transform:scale(1)}40%{transform:scale(1.3)}100%{transform:scale(1)}}
@keyframes clRosIn{0%{transform:scale(0) rotate(-40deg)}100%{transform:none}}
@keyframes clPulse{0%{transform:scale(1)}40%{transform:scale(1.12)}100%{transform:scale(1)}}
@keyframes clRel{0%{transform:scale(.93)}60%{transform:scale(1.03)}100%{transform:scale(1)}}
@keyframes clBreathe{0%,100%{box-shadow:0 0 0 2px rgba(143,243,255,.8),0 0 9px 2px rgba(111,231,255,.5)}50%{box-shadow:0 0 0 3px rgba(143,243,255,1),0 0 18px 5px rgba(111,231,255,.85)}}
@keyframes clToastIn{from{transform:translateX(-20px);opacity:0}to{transform:none;opacity:1}}
@keyframes clTipIn{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}
@keyframes clTrayIn{from{transform:scaleX(.2);opacity:0}to{transform:none;opacity:1}}
@keyframes clCell{from{transform:translateY(6px);opacity:0}to{transform:none;opacity:1}}
@keyframes clBoditeIn{0%{transform:scale(.85);opacity:0}70%{transform:scale(1.03);opacity:1}100%{transform:none;opacity:1}}
@keyframes clRibbon{0%{transform:translateY(-30px);opacity:0}60%{transform:translateY(4px);opacity:1}100%{transform:none;opacity:1}}
@keyframes clMascL{from{transform:translateX(-46px) rotate(-14deg);opacity:0}to{transform:none;opacity:1}}
@keyframes clMascR{from{transform:translateX(46px) rotate(14deg);opacity:0}to{transform:none;opacity:1}}
@keyframes clStar{0%{transform:scale(0) rotate(-30deg);opacity:0}70%{transform:scale(1.25);opacity:1}100%{transform:none;opacity:1}}
@keyframes clInR{from{opacity:0;transform:translateX(12px)}to{opacity:1;transform:none}}
@keyframes clInL{from{opacity:0;transform:translateX(-12px)}to{opacity:1;transform:none}}
@keyframes clDrop{0%{transform:translateY(-40px) rotate(-2deg);opacity:0}65%{transform:translateY(5px) rotate(.6deg);opacity:1}100%{transform:none;opacity:1}}
@keyframes clDropSm{from{transform:translateY(-14px);opacity:0}to{transform:none;opacity:1}}
@keyframes clBob{0%,100%{transform:translateY(0) rotate(0)}25%{transform:translateY(-3px) rotate(-2deg)}75%{transform:translateY(3px) rotate(2deg)}}
@keyframes clPop{from{transform:scale(.9);opacity:0}to{transform:none;opacity:1}}
@keyframes clProg{from{width:0}to{width:100%}}
@media (prefers-reduced-motion:reduce){
  html.classic #hud *,html.classic #modal *,.cl-tip{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}
}
html.classic.less-motion #hud *,html.classic.less-motion #modal *,html.less-motion .cl-tip{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}

/* ================= compact: one row (tablets, phones held sideways) — R13 §2.4 landscape ================= */
@media (max-width:960px),(max-height:520px){
  html.classic{--bar:40px}
  html.classic #b-radio{display:block}
  html.classic #b-full{display:none}
  html.classic #topbar .rosette{width:46px;height:56px;margin-top:-3px}
  html.classic #topbar .rosette .badge{left:1px;width:44px;height:48px}
  html.classic #topbar .rosette .astes{left:10px;top:28px;width:26px;height:28px}
  html.classic #topbar .rosette b{top:10px;font-size:19px;text-shadow:-2px 0 #1B2F6B,2px 0 #1B2F6B,0 -2px #1B2F6B,0 2px #1B2F6B,-1px -1px #1B2F6B,1px -1px #1B2F6B,-1px 1px #1B2F6B,1px 1px #1B2F6B,0 3px 0 #0f1c44}
  html.classic #topbar .plank{height:28px;margin-left:8px}
  html.classic #topbar .plank.xp{width:90px;margin-left:2px}
  html.classic #topbar .inset{height:28px;border-radius:7px;padding:0 6px}
  html.classic #topbar .inset span{font-size:15px}
  html.classic #topbar .plank .ic{width:30px;height:30px;margin-right:-12px}
  html.classic #topbar .inset.green{width:104px;padding:0 6px 0 16px}
  html.classic #topbar .inset.purple{width:70px;padding:0 6px 0 16px}
  html.classic #topbar .inset .ls{font-size:10px;margin-left:2px}
  html.classic #topright{top:calc(var(--sat) + 3px);height:34px;gap:4px}
  html.classic #topright .hudtab{width:34px;height:34px}
  html.classic #topright .hudtab img{width:26px;height:26px}
  html.classic #topright .gohome.wide{height:34px;padding:0 8px 0 4px}
  html.classic #topright .gohome.wide img{width:26px;height:26px}
  html.classic #topright .gohome.wide span{font-size:13px}
  html.classic #banner,html.classic #banner-list,html.classic #b-more{display:none}
  html.classic #rcol #radio-badge{display:none}   /* lane V: phones keep the radio in the small bar (#b-radio) */
  html.classic #toasts{top:calc(var(--bar) + 26px + var(--sat));width:min(320px,calc(100vw - 120px))}
  html.classic .toast{font-size:14px;padding:5px 10px 6px;pointer-events:auto;cursor:pointer}
  html.classic #toasts>.toast:first-child:nth-last-child(3){display:none}
  html.classic #rcol{bottom:calc(98px + var(--sab));gap:6px}
  html.classic #rcol .rc{width:40px;height:40px;padding:3px;border-radius:8px}
  html.classic #rcol .rc.small{width:24px;height:24px;padding:1px;border-radius:6px}
  html.classic #rcol .rc .q{font-size:15px}
  html.classic #side{bottom:calc(64px + var(--sab));gap:3px}
  html.classic #side .sb{width:26px;height:26px;padding:3px;border-radius:5px}
  html.classic #side .sb.txt{font-size:16px}
  html.classic #palette{left:auto;right:calc(8px + var(--sar));transform:none;bottom:calc(6px + var(--sab));gap:5px}
  html.classic .tool{width:52px;height:52px;padding:4px;border-radius:7px}
  html.classic .tool.sel{border-width:2px}
  html.classic #b-tray{width:22px;height:70px;bottom:calc(6px + var(--sab))}
  html.classic #seedpick{left:calc(34px + var(--sal));bottom:calc(2px + var(--sab));height:74px;max-width:calc(100vw - 360px - var(--sal) - var(--sar));padding:4px 5px 3px}
  html.classic.has-ui_tray_ramis #seedpick{border-width:6px 7px 10px;border-image-width:6px 7px 10px}
  html.classic.has-ui_suna_sel #seedpick .seed.sel{box-shadow:0 0 0 2px var(--cyan),0 0 8px rgba(111,231,255,.8)}
  html.classic.has-ui_suna_sel #seedpick .seed.sel::before{display:none}
  html.classic #seedpick .seed{width:58px;height:52px}
  html.classic #seedpick .seed img{width:40px;height:30px}
  html.classic #seedpick .seed b{font-size:9.5px}
  html.classic #seedpick .seed small{font-size:9.5px}
  html.classic #hostplate{top:calc(var(--bar) + 8px + var(--sat))}
  /* Bodīte, sideways: 4 × 1 cards, tabs 2 × 5 at 12 px */
  html.classic #modal .panel.bodite{width:calc(100vw - 16px - var(--sal) - var(--sar));height:calc(100vh - 44px);margin-top:36px;border-width:6px;border-radius:10px}
  html.classic #modal .bodite .lente{left:12%;right:12%;top:-38px;height:44px}
  html.classic #modal .bodite .lente .end{width:72px}
  html.classic #modal .bodite .lente h2{top:6px;font-size:26px}
  html.classic #modal .bodite .st{width:20px;height:20px;margin-left:-10px;font-size:18px;line-height:20px}
  html.classic #modal .bodite .st.s0,html.classic #modal .bodite .st.s4{display:none}
  html.classic #modal .bodite .stars{top:20px}
  html.classic #modal .bodite .st.s1{left:-52px;top:-18px}html.classic #modal .bodite .st.s2{top:-24px}html.classic #modal .bodite .st.s3{left:52px;top:-18px}
  html.classic #modal .bodite .masc.l{left:6%;top:-44px;width:56px;height:54px}
  html.classic #modal .bodite .masc.r{right:7%;top:-62px;width:46px;height:78px}
  html.classic #modal .panel.bodite .x.cl-x{right:-4px;top:-40px;width:36px;height:36px}
  html.classic #modal .bodite .tabs{gap:4px 6px;padding:12px 14px 6px}
  html.classic #modal .bodite .tabs button{height:26px;font-size:12px;border-radius:5px}
  html.classic #modal .bodite .tabs button.on{border-width:2px}
  html.classic #modal .bodite .boardwrap{grid-template-columns:36px 1fr 36px;gap:6px;padding:0 6px}
  html.classic #modal .bodite .arrow{width:36px;height:min(120px,80%);border-width:4px;border-radius:9px}
  html.classic #modal .bodite .arrow i{width:14px;height:24px;margin:-12px 0 0 -9px}
  html.classic #modal .bodite .arrow.next i{margin-left:-5px}
  html.classic #modal .bodite .board{padding:8px;border-width:4px}
  html.classic #modal .bodite .page{gap:8px}
  html.classic #modal .bodite .card{padding:5px 6px 6px;gap:3px;border-width:2px}
  html.classic #modal .bodite .card .nm{font-size:13px;-webkit-line-clamp:1;line-clamp:1}
  html.classic #modal .bodite .card .price{height:30px}
  html.classic #modal .bodite .pageno{height:16px;line-height:16px;font-size:12px}
  html.classic #modal .panel.pergaments{margin-top:20px}
  html.classic #modal .pergaments .kirsi{left:-40px;top:-66px;width:112px;height:97px}
  html.classic #modal .pergaments .pb{font-size:17px}
  html.classic #modal .pergaments .pt{font-size:20px}
}
/* wider sideways phones and tablets: the Bodīte board keeps 2 rows when there is height for them */
@media (max-width:960px) and (min-height:521px){
  html.classic #modal .panel.bodite{height:min(680px,calc(100vh - 70px));margin-top:56px}
  html.classic #modal .bodite .lente{top:-50px;height:56px}
  html.classic #modal .bodite .lente h2{top:8px;font-size:32px}
  html.classic #modal .bodite .tabs button{height:32px;font-size:13px}
}

/* ================= phone held upright (R13 §2.4 portrait): two-row bar, centred tools, full-screen Bodīte ================= */
@media (max-width:640px) and (min-height:501px){
  html.classic{--bar:44px}
  html.classic #topbar{height:calc(var(--bar) + 36px + var(--sat));align-items:flex-start;padding-top:calc(var(--sat) + 8px)}
  html.classic #topbar .rosette{width:48px;height:42px;margin-top:-6px}
  html.classic #topbar .rosette .badge{left:1px;width:46px;height:50px}
  html.classic #topbar .rosette b{top:11px;font-size:19px}
  html.classic #topright{left:0;right:0;top:calc(var(--bar) + var(--sat));height:36px;justify-content:center;gap:4px}
  html.classic #topright .hudtab{width:36px;height:36px}
  html.classic #topright .hudtab img{width:27px;height:27px}
  html.classic #topright .gohome.wide{height:34px}
  html.classic #toasts{left:calc(8px + var(--sal));right:calc(60px + var(--sar));width:auto;top:calc(var(--bar) + 42px + var(--sat))}
  html.classic body.visiting #toasts{top:calc(var(--bar) + 92px + var(--sat))}
  html.classic #hostplate{top:calc(var(--bar) + 40px + var(--sat))}
  html.classic #toasts .toast{max-width:100%}
  html.classic #rcol{bottom:calc(112px + var(--sab))}
  html.classic #rcol .rc{width:44px;height:44px}
  html.classic #rcol .rc.small{width:28px;height:28px}
  html.classic #side{bottom:calc(76px + var(--sab))}
  html.classic #side .sb{width:28px;height:28px}
  html.classic #palette{left:50%;right:auto;transform:translateX(-50%);bottom:calc(12px + var(--sab));gap:4px}
  html.classic .tool{width:56px;height:56px}
  html.classic #b-tray{bottom:calc(12px + var(--sab));height:56px;width:22px}
  html.classic #seedpick{left:calc(8px + var(--sal));right:calc(8px + var(--sar));max-width:none;bottom:calc(72px + var(--sab));height:auto;max-height:162px;flex-wrap:wrap;align-content:flex-start;overflow-y:auto;overflow-x:hidden;justify-content:center}
  html.classic #seedpick .seed{width:60px;height:60px}
  html.classic #hud:has(#seedpick:not([hidden])) #side,html.classic #hud:has(#seedpick:not([hidden])) #rcol{visibility:hidden}
  html.classic #seedpick .seed img{width:42px;height:34px}
  html.classic #gift{top:calc(var(--bar) + 150px + var(--sat))}
  /* Bodīte full screen: ribbon 70 %, 3 stars, 56 px mascots, one swipeable strip of tabs, 2 × 2 cards */
  html.classic #modal .panel.bodite{width:100vw;height:100vh;height:100dvh;margin:0;border-radius:0;border-width:0;padding:calc(64px + var(--sat)) 0 calc(6px + var(--sab));box-shadow:none}
  html.classic #modal .bodite .lente{left:15%;right:15%;top:calc(10px + var(--sat));height:48px}
  html.classic #modal .bodite .lente .end{width:64px}
  html.classic #modal .bodite .lente h2{top:7px;font-size:28px}
  html.classic #modal .bodite .st.s1{left:-46px;top:-6px}html.classic #modal .bodite .st.s2{top:-12px}html.classic #modal .bodite .st.s3{left:46px;top:-6px}
  html.classic #modal .bodite .masc.l{left:2px;top:calc(4px + var(--sat));width:56px;height:56px}
  html.classic #modal .bodite .masc.r{right:44px;top:calc(2px + var(--sat));width:40px;height:62px}
  html.classic #modal .panel.bodite .x.cl-x{right:6px;top:calc(12px + var(--sat));width:36px;height:36px}
  html.classic #modal .bodite .tabs{display:flex;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch;gap:6px;padding:8px 10px 8px}
  html.classic #modal .bodite .tabs::-webkit-scrollbar{display:none}
  html.classic #modal .bodite .tabs button{flex:0 0 auto;height:34px;font-size:13px;padding:0 12px;overflow:visible}
  html.classic #modal .bodite .boardwrap{grid-template-columns:28px 1fr 28px;gap:4px;padding:0 4px}
  html.classic #modal .bodite .arrow{width:28px;height:120px;border-width:3px;border-radius:8px}
  html.classic #modal .bodite .card{justify-content:space-evenly}
  html.classic #modal .bodite .card .pic{flex:0 1 auto;width:88%;max-height:150px}
  html.classic #modal .bodite .card .nm{-webkit-line-clamp:2;line-clamp:2;font-size:14px}
  html.classic #modal .bodite .card .price{height:36px;font-size:17px}
  html.classic #modal .bodite .card .step button{width:30px;height:30px}
  html.classic #modal .bodite .card .step input{height:28px}
  html.classic #modal .pergaments .kirsi{left:-18px;top:-70px;width:104px;height:90px}
  html.classic #modal .panel.pergaments{margin-top:48px}
}
/* on wide screens the page arrows stand outside the panel, as in the original */
@media (min-width:1220px) and (min-height:640px){
  html.classic #modal .bodite .boardwrap{grid-template-columns:1fr;padding:0 34px}
  html.classic #modal .bodite .arrow{position:absolute;top:50%;width:66px;height:250px;margin-top:-80px}
  html.classic #modal .bodite .arrow.prev{left:-100px}
  html.classic #modal .bodite .arrow.next{right:-100px}
  html.classic #modal .bodite .arrow i{width:28px;height:48px;margin:-24px 0 0 -16px}
  html.classic #modal .bodite .arrow.next i{margin-left:-12px}
}
/* phones: the radio opens as a bottom sheet (ferma.css) — the small bar with the radio button rides above it, so one more tap closes it */
@media (max-width:760px),(max-height:520px){
  html.classic body.radio-open #side{bottom:calc(40vh + 10px + var(--sab))}
  html.classic body.radio-open #rcol{visibility:hidden}
}
/* narrower desktops: the ribbon and the X stay inside the window */
@media (min-width:961px) and (max-width:1219px){
  html.classic #modal .bodite .lente{left:-3%;right:-3%}
  html.classic #modal .panel.bodite .x.cl-x{right:-6px}
}
/* Bodīte picture tabs (owner 2026-11-10: smarter sizing, icons for the categories): one row of 12, icon over a short name */
html.classic #modal .bodite .tabs{grid-template-columns:repeat(12,minmax(0,1fr));gap:6px;padding:18px 22px 8px}
html.classic #modal .bodite .tabs button{height:64px;padding:5px 2px 4px;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:3px;white-space:normal;overflow:hidden}
html.classic #modal .bodite .tabs button img{flex:none;width:38px;height:32px;object-fit:contain;filter:drop-shadow(0 1px 0 rgba(60,30,0,.3));transition:transform .15s cubic-bezier(.34,1.56,.64,1)}
html.classic #modal .bodite .tabs button span{display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;max-width:100%;font-size:11.5px;line-height:1.08;text-align:center;word-break:normal;hyphens:auto}
html.classic #modal .bodite .tabs button:hover img,html.classic #modal .bodite .tabs button.on img{transform:scale(1.14) translateY(-1px)}
@media (max-width:960px),(max-height:520px){
  html.classic #modal .bodite .tabs{gap:4px;padding:10px 12px 6px}
  html.classic #modal .bodite .tabs button{height:46px;padding:3px 1px 2px;gap:1px;border-radius:6px}
  html.classic #modal .bodite .tabs button img{width:26px;height:22px}
  html.classic #modal .bodite .tabs button span{font-size:9.5px;-webkit-line-clamp:1;line-clamp:1;white-space:nowrap;text-overflow:ellipsis;display:block}
}
@media (max-width:640px) and (min-height:501px){
  html.classic #modal .bodite .tabs{display:flex;overflow-x:auto;gap:6px;padding:8px 10px}
  html.classic #modal .bodite .tabs button{flex:0 0 74px;height:58px;padding:4px 3px 3px}
  html.classic #modal .bodite .tabs button img{width:30px;height:26px}
  html.classic #modal .bodite .tabs button span{font-size:10.5px;white-space:normal;-webkit-line-clamp:2;line-clamp:2;display:-webkit-box}
}
