/* css/sq-skin.css */
/* sq-skin.css — the new look's skin, the owner's pick of 1 Dec 2026: "A · dark fantasy ornamentado" (of three drawn side by side:
   A dark fantasy, B wood and stone, C modern glass), after "ta muito com cara de i.a quero mais pro lado de um mmorpg".
   Dark metal and plum panels with a thin old-gold line, crimson for life and danger, ivory paper inside the windows, the titles in
   a serif ('NC Display', css/sq-fonts.css). The game's own art direction says the same (docs/GUIA-PARA-IAS.md: crimson, ivory,
   old gold, plum shadows).
   Nothing is laid out here that css/sq.css and js/sq/*.js did not lay out: only paint. Every colour is a token on html.sq-on (the
   #mb thumb buttons and the toasts stand outside #sq), so another skin is a block of tokens.
   Two strengths of selector, on purpose:
     the windows   :where(html.sq-on) #sq ...  as strong as css/sq.css's own rule and after it, so it wins over that; a window's
                   own rules (SQ.css, injected later) still win over it, as they did over css/sq.css
     the HUD       html.sq-on #sq .hud ...   stronger than js/sq/hud.js's injected 'hudc' rules (same selector, later in the page)
   Linked after css/sq.css and before css/sq-touch.css (index.html). */

html.sq-on {
  --sk-ink: #100a05;
  --sk-plum-900: #1c1109; --sk-plum-800: #2a1b0f; --sk-plum-700: #392515; --sk-plum-600: #4e331e; --sk-plum-500: #66442a;
  --sk-gold-hi: #f4e2ad; --sk-gold: #d2ad62; --sk-gold-mid: #a8843f; --sk-gold-lo: #6b5023;
  --sk-crimson: #9e1b31; --sk-crimson-hi: #d9465c; --sk-crimson-deep: #5a0d1b;
  --sk-text: #f1e8d6; --sk-text-dim: #c3b69c; --sk-text-mute: #968a76;
  --sk-title: #f0dcaa; --sk-title-dim: #cbb88f; --sk-link: #f0c77a;
  --sk-good: #8fe0a2; --sk-bad: #ff8a9a; --sk-warm: #f0a95e;
  --sk-paper: #f7f2e8; --sk-paper-2: #efe8d9; --sk-paper-3: #e4d9c3; --sk-paper-line: #d3c5a8; --sk-bronze: #ad9061;
  --sk-ink-paper: #37271b; --sk-muted-paper: #7c604b;
  --sk-accent: #9e1b31;
  /* (small values js/sq/hudmore.js picks between: a token each, so its strings hold no loose CSS) */
  --sk-gold-line: rgba(210, 173, 98, 0.45); --sk-seg-off: rgba(244, 226, 173, 0.12);
  --sk-team-b: rgba(47, 116, 207, 0.22); --sk-team-r: rgba(199, 40, 63, 0.24);
  --sk-ring-mine: inset 0 0 0 2px #d2ad62; --sk-ring-team: inset 0 0 0 1px rgba(210, 173, 98, 0.35);
  --sk-plate: linear-gradient(180deg, rgba(57, 37, 21, 0.95), rgba(28, 17, 9, 0.95));
  --sk-plate-solid: linear-gradient(180deg, #3b2717, #1d120a);
  --sk-plate-frame: inset 0 0 0 1px rgba(210, 173, 98, 0.55), inset 0 1px 0 1px rgba(244, 226, 173, 0.08), 0 0 0 1px #100a05, 0 4px 12px rgba(5, 3, 8, 0.5);
  --sk-well: radial-gradient(circle at 50% 36%, #53361f, #1d120a 78%);
  --sk-track: linear-gradient(180deg, #0c0703, #2a1b0f);
  --sk-hp: linear-gradient(180deg, #f2838f 0%, #c8283f 46%, #7d0f22 100%);
  --sk-sp: linear-gradient(180deg, #93cbff 0%, #2f74cf 46%, #173e86 100%);
  --sk-ok-bar: linear-gradient(180deg, #a3e7a0 0%, #3e9e52 50%, #1f5a2c 100%);
  --sk-xp: linear-gradient(180deg, #fbe7ad, #c9993f);
  --sk-jxp: linear-gradient(180deg, #bdf2c8, #4fa46c);
  --sk-primary: linear-gradient(180deg, #f6e3a8 0%, #d4ae62 50%, #a57f33 100%);
  --sk-primary-ink: #2b1c05;
  --sk-bar: linear-gradient(180deg, #533721 0%, #352112 52%, #1e130a 100%);
  --sk-frame: 0 0 0 1px #100a05, 0 0 0 3px #392515, 0 0 0 4px #a8843f, 0 0 0 5px #100a05, 0 12px 30px rgba(5, 3, 8, 0.55);
  --sk-shadow-text: 0 1px 2px rgba(5, 3, 8, 0.95), 0 0 5px rgba(5, 3, 8, 0.75);
  --sk-font-title: 'NC Display', 'Palatino Linotype', 'Book Antiqua', Georgia, serif;
  /* the line pictures of the HUD (assets/ui/sq/hud_*, ui_*: pale blue strokes on a navy line) warmed to ivory and bronze */
  --sk-icon: sepia(0.8) saturate(1.45) hue-rotate(-10deg) brightness(1.04) drop-shadow(0 1px 1px rgba(5, 3, 8, 0.85));
  /* the corner pieces: an old-gold bracket with an inner line and a stud */
  --sk-orn-tl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M1 13V4.5L4.5 1H13' fill='none' stroke='%23d2ad62' stroke-width='1.4'/%3E%3Cpath d='M4 10V6l2-2h4' fill='none' stroke='%23d2ad62' stroke-width='.9' opacity='.55'/%3E%3Ccircle cx='7.6' cy='7.6' r='1' fill='%23f4e2ad'/%3E%3C/svg%3E");
  --sk-orn-tr: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cg transform='matrix(-1 0 0 1 14 0)'%3E%3Cpath d='M1 13V4.5L4.5 1H13' fill='none' stroke='%23d2ad62' stroke-width='1.4'/%3E%3Cpath d='M4 10V6l2-2h4' fill='none' stroke='%23d2ad62' stroke-width='.9' opacity='.55'/%3E%3Ccircle cx='7.6' cy='7.6' r='1' fill='%23f4e2ad'/%3E%3C/g%3E%3C/svg%3E");
  --sk-orn-bl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cg transform='matrix(1 0 0 -1 0 14)'%3E%3Cpath d='M1 13V4.5L4.5 1H13' fill='none' stroke='%23d2ad62' stroke-width='1.4'/%3E%3Cpath d='M4 10V6l2-2h4' fill='none' stroke='%23d2ad62' stroke-width='.9' opacity='.55'/%3E%3C/g%3E%3C/svg%3E");
  --sk-orn-br: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cg transform='matrix(-1 0 0 -1 14 14)'%3E%3Cpath d='M1 13V4.5L4.5 1H13' fill='none' stroke='%23d2ad62' stroke-width='1.4'/%3E%3Cpath d='M4 10V6l2-2h4' fill='none' stroke='%23d2ad62' stroke-width='.9' opacity='.55'/%3E%3C/g%3E%3C/svg%3E");
  /* a gold diamond with a crimson heart: the ends of the action bar and of a banner */
  --sk-orn-gem: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 .5L11.5 6L6 11.5L.5 6Z' fill='%23d2ad62' stroke='%23100a05' stroke-width='.8'/%3E%3Cpath d='M6 3.2L8.8 6L6 8.8L3.2 6Z' fill='%239e1b31'/%3E%3C/svg%3E");
  --sk-corners: var(--sk-orn-tl) left 3px top 3px / 14px 14px no-repeat, var(--sk-orn-tr) right 3px top 3px / 14px 14px no-repeat,
    var(--sk-orn-bl) left 3px bottom 3px / 14px 14px no-repeat, var(--sk-orn-br) right 3px bottom 3px / 14px 14px no-repeat;
}

/* ================================ the windows ================================ */
:where(html.sq-on) #sq .win { background: var(--sk-paper); color: var(--sk-ink-paper); box-shadow: var(--sk-frame); }
:where(html.sq-on) #sq .tb {
  background: var(--sk-orn-tl) left 3px top 3px / 14px 14px no-repeat, var(--sk-orn-tr) right 3px top 3px / 14px 14px no-repeat, var(--sk-bar);
  border-bottom: 2px solid var(--sk-ink); box-shadow: inset 0 -1px 0 var(--sk-gold-mid), inset 0 1px 0 rgba(244, 226, 173, 0.14);
  color: var(--sk-title); font-family: var(--sk-font-title); font-weight: 700; font-size: 16.5px; letter-spacing: 0.02em;
  text-shadow: 0 1px 0 #000, 0 0 6px rgba(0, 0, 0, 0.6);
}
:where(html.sq-on) #sq .tb > img[src*="ui/sq/"] { filter: var(--sk-icon); }
/* (a phone's windows are narrower: the serif a size down, so a long title with its tags keeps the close button in the bar) */
:where(html.mob.sq-on) #sq .tb { font-size: 15px; }
:where(html.sq-on) #sq .tb > .sub { font-family: 'Baloo 2', 'Noto Sans Thai', sans-serif; letter-spacing: 0; color: var(--sk-title-dim);
  min-width: 0; flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* (the serif title is wider: the grey words beside it give way first) */
:where(html.sq-on) #sq .tb > span:not(.tag):not(.kb):not(.pr)[style*="color"], :where(html.sq-on) #sq .tb .mu { color: var(--sk-title-dim) !important; }
:where(html.sq-on) #sq .tb .tag, :where(html.sq-on) #sq .tb .bt, :where(html.sq-on) #sq .tb .pr { font-family: 'Noto Sans Thai', 'Baloo 2', sans-serif; letter-spacing: 0; }
:where(html.sq-on) #sq .tb .kb { background: rgba(0, 0, 0, 0.35); box-shadow: inset 0 0 0 1px var(--sk-gold-lo); color: var(--sk-gold-hi); }
:where(html.sq-on) #sq .wb { border-radius: 2px; background: radial-gradient(circle at 50% 35%, #66442a, #2a1b0f); box-shadow: inset 0 0 0 1px var(--sk-gold-mid), 0 0 0 1px var(--sk-ink); }
:where(html.sq-on) #sq .wb:hover { background: radial-gradient(circle at 50% 35%, #7a2a3c, #3a0f1c); }
:where(html.sq-on) #sq .kb { border-radius: 2px; background: var(--sk-paper); box-shadow: inset 0 0 0 1px var(--sk-paper-line); color: var(--sk-muted-paper); }
:where(html.sq-on) #sq .ft { background: linear-gradient(180deg, var(--sk-paper-2), var(--sk-paper-3)); border-top: 1px solid var(--sk-paper-line); }
:where(html.sq-on) #sq .tabs { background: var(--sk-paper-2); border-bottom: 1px solid var(--sk-paper-line); }
:where(html.sq-on) #sq .tab { background: var(--sk-paper-3); box-shadow: inset 0 0 0 1px var(--sk-paper-line); color: #6f6452; }
:where(html.sq-on) #sq .tab.on { background: var(--sk-paper); color: var(--sk-ink-paper); box-shadow: inset 1px 0 0 var(--sk-paper-line), inset -1px 0 0 var(--sk-paper-line), inset 0 2px 0 var(--sk-accent); }
:where(html.sq-on) #sq .tab.on > b { background: var(--sk-accent); }
:where(html.sq-on) #sq .bt { border-radius: 2px; background: linear-gradient(180deg, #fdf9f1, #ebe1cc); box-shadow: inset 0 0 0 1px var(--sk-bronze), inset 0 1px 0 #ffffff; color: var(--sk-ink-paper); }
:where(html.sq-on) #sq .bt:hover:not(:disabled):not(.away) { background: linear-gradient(180deg, #fffdf8, #f1e7d2); }
:where(html.sq-on) #sq .bt.pr { background: var(--sk-primary); box-shadow: inset 0 0 0 1px #6b4d17, inset 0 1px 0 rgba(255, 255, 255, 0.55); color: var(--sk-primary-ink); }
:where(html.sq-on) #sq .bt.pr:hover:not(:disabled):not(.away) { background: linear-gradient(180deg, #fbebbb 0%, #ddb96d 50%, #b08939 100%); }
:where(html.sq-on) #sq .bt.in { background: #f3e6c6; box-shadow: inset 0 0 0 1px #c9a45a; color: #7a5418; }
:where(html.sq-on) #sq .bt:disabled, :where(html.sq-on) #sq .bt.away { color: #ab9f8b; }
:where(html.sq-on) #sq .bt.pr:disabled, :where(html.sq-on) #sq .bt.pr.away { background: #e8e0d0; box-shadow: inset 0 0 0 1px #cdbfa5; color: #ab9f8b; }
:where(html.sq-on) #sq .box, :where(html.sq-on) #sq .st, :where(html.sq-on) #sq .mo, :where(html.sq-on) #sq .dy { background-color: #fbf8f1; box-shadow: inset 0 0 0 1px #e2d7c0; }
:where(html.sq-on) #sq .cv, :where(html.sq-on) #sq .ln { background-color: #f4eee2; box-shadow: inset 0 0 0 1px #e2d7c0; }
:where(html.sq-on) #sq .sl, :where(html.sq-on) #sq .slot { background-color: #ebe3d3; box-shadow: inset 0 0 0 1px #cbbd9f; }
:where(html.sq-on) #sq .sl.on { background-color: #fffcf5; box-shadow: inset 0 0 0 1.5px var(--sk-gold-mid); }
:where(html.sq-on) #sq .sl.pk, :where(html.sq-on) #sq .slot.pk { box-shadow: inset 0 0 0 2.5px var(--sk-gold), 0 0 0 2px var(--sk-ink); }
:where(html.sq-on) #sq .tag { background: var(--sk-paper-2); box-shadow: inset 0 0 0 1px var(--sk-paper-line); color: var(--sk-ink-paper); }
:where(html.sq-on) #sq .sg { box-shadow: inset 0 0 0 1px var(--sk-bronze); }
:where(html.sq-on) #sq .sg > span { background: linear-gradient(180deg, #fdf9f1, #ebe1cc); border-left-color: var(--sk-paper-line); color: #715744; }
:where(html.sq-on) #sq .sg > span.on { background: var(--sk-bar); color: var(--sk-gold-hi); }
:where(html.sq-on) #sq .vt.on, :where(html.sq-on) #sq .lt.on, :where(html.sq-on) #sq .nv.on { background: #fffcf5; box-shadow: inset 3px 0 0 var(--sk-accent); }
:where(html.sq-on) #sq .vt.on > b { background: var(--sk-accent); }
:where(html.sq-on) #sq .vt, :where(html.sq-on) #sq .lt { border-bottom-color: var(--sk-paper-line); }
:where(html.sq-on) #sq .sw.on, :where(html.sq-on) #sq .ck.on { background: var(--sk-accent); box-shadow: inset 0 0 0 1px var(--sk-crimson-deep); }
:where(html.sq-on) #sq .rd.on { box-shadow: inset 0 0 0 1.5px var(--sk-accent); }
:where(html.sq-on) #sq .rd.on > i { background: var(--sk-accent); }
:where(html.sq-on) #sq .pl, :where(html.sq-on) #sq .sk > .p1 { background: linear-gradient(180deg, #c64459, #8a1529); box-shadow: inset 0 0 0 1px var(--sk-crimson-deep); }
:where(html.sq-on) #sq .br { background: #e6dccb; box-shadow: inset 0 0 0 1px #cdbfa5; }
:where(html.sq-on) #sq .br > i { background: var(--sk-accent); }
:where(html.sq-on) #sq .sk.pk, :where(html.sq-on) #sq .cl.pk, :where(html.sq-on) #sq .mb.pk, :where(html.sq-on) #sq .cv.hot { background: #fbf1dc; box-shadow: inset 0 0 0 1.5px var(--sk-gold-mid); }
:where(html.sq-on) #sq .mu, :where(html.sq-on) #sq .hd, :where(html.sq-on) #sq .note, :where(html.sq-on) #sq .mk { color: var(--sk-muted-paper); }
:where(html.sq-on) #sq .veil { background: rgba(10, 6, 14, 0.45); }
/* (the small turn card of a phone upright, js/sq/core.js turnCheck) */
html.mob.sq-on #sq > .sq-turn > .tc { background: var(--sk-paper) !important; border: 0 !important; box-shadow: var(--sk-frame) !important; }
html.mob.sq-on #sq > .sq-turn > .tc > .tx { color: var(--sk-ink-paper) !important; }

/* ================================ the HUD (js/sq/hud.js, js/sq/hudmore.js) ================================ */
html.sq-on #sq .hud .sh { text-shadow: var(--sk-shadow-text); }
html.sq-on #sq .hud img[src*="ui/sq/hud_"], html.sq-on #sq .hud img[src*="ui/sq/ui_"] { filter: var(--sk-icon); }

/* ---- the hero: a round face in a gold ring, the level a crimson stud under it, the name and the bars on a dark plate ---- */
html.sq-on #sq .hud .uf-plate { position: absolute; left: 44px; top: 6px; width: 230px; height: 70px; box-sizing: border-box; pointer-events: none;
  background: var(--sk-orn-tr) right 3px top 3px / 12px 12px no-repeat, var(--sk-orn-br) right 3px bottom 3px / 12px 12px no-repeat, var(--sk-plate);
  box-shadow: var(--sk-plate-frame); border-radius: 0 3px 3px 0; }
html.sq-on #sq .hud .uf { position: absolute; left: 6px; top: 6px; width: 66px; height: 66px; box-sizing: border-box; padding: 4px; border-radius: 50%;
  background: conic-gradient(from 200deg, #6b5023, #f4e2ad, #c9a45a, #6b5023, #f4e2ad, #a8843f, #6b5023);
  box-shadow: 0 0 0 1px var(--sk-ink), 0 3px 8px rgba(5, 3, 8, 0.65); cursor: pointer; pointer-events: auto; }
html.sq-on #sq .hud .uf:hover { box-shadow: 0 0 0 1px var(--sk-ink), 0 0 10px rgba(244, 226, 173, 0.45); }
html.sq-on #sq .hud .uf-face { position: relative; width: 58px; height: 58px; border-radius: 50%; overflow: hidden; background: var(--sk-well); box-shadow: inset 0 0 0 1px var(--sk-ink); }
html.sq-on #sq .hud .uf-face > canvas { position: absolute; left: 1px; top: 1px; width: 56px; height: 56px; }
html.sq-on #sq .hud .uf-lv { position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); min-width: 16px; height: 16px; padding: 0 5px; border-radius: 8px;
  background: radial-gradient(circle at 50% 30%, #d9465c, #7d0f22); box-shadow: 0 0 0 1px var(--sk-gold), 0 0 0 2px var(--sk-ink);
  font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 11px; line-height: 16px; color: #ffffff; text-align: center; text-shadow: 0 1px 1px #000; }
html.sq-on #sq .hud [data-f="name"] { color: var(--sk-title); font-family: var(--sk-font-title); font-size: 15px; letter-spacing: 0.02em; }
html.sq-on #sq .hud [data-p="tl"] [data-f="job"] { color: var(--sk-text-dim); opacity: 1 !important; }
html.sq-on #sq .hud [data-f="lvs"] { background: transparent !important; padding: 0 !important; color: var(--sk-gold-hi) !important; }

/* ---- bars: a sunk dark track in a thin gold line, a glossy fill ---- */
html.sq-on #sq .hud .qb { background: var(--sk-track); border: 0; border-radius: 2px; box-shadow: 0 0 0 1px var(--sk-ink), 0 0 0 2px var(--sk-gold-lo), inset 0 1px 2px rgba(0, 0, 0, 0.8); }
html.sq-on #sq .hud .qb > [data-f="hpf"] { background: var(--sk-hp); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3); }
html.sq-on #sq .hud .qb > [data-f="spf"] { background: var(--sk-sp); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3); }
html.sq-on #sq .hud .qb > [data-f$="t"] { text-shadow: 0 1px 1px #000, 0 0 3px rgba(0, 0, 0, 0.8); }

/* ---- the slots: a sunk well in a gold rim, the key on a small metal tag ---- */
html.sq-on #sq .hud .qs { border: 0; border-radius: 3px; background: var(--sk-well);
  box-shadow: inset 0 0 0 1px var(--sk-ink), inset 0 0 0 2px rgba(168, 132, 63, 0.95), inset 0 0 0 3px rgba(16, 10, 5, 0.7), inset 0 -8px 10px rgba(0, 0, 0, 0.35), 0 0 0 1px var(--sk-ink), 0 2px 5px rgba(5, 3, 8, 0.55); }
html.sq-on #sq .hud .qs:hover { box-shadow: inset 0 0 0 1px var(--sk-ink), inset 0 0 0 2px var(--sk-gold-hi), inset 0 0 0 3px rgba(16, 10, 5, 0.7), 0 0 0 1px var(--sk-ink), 0 0 8px rgba(244, 226, 173, 0.35); }
html.sq-on #sq .hud .qs > i { left: -3px; top: -4px; padding: 0 3px; border-radius: 2px; font-size: 9.5px; line-height: 12px;
  background: linear-gradient(180deg, #66442a, #322013); color: var(--sk-gold-hi); box-shadow: 0 0 0 1px var(--sk-ink), inset 0 0 0 1px rgba(210, 173, 98, 0.6); }
html.sq-on #sq .hud .qs[data-a="barpg"] { color: var(--sk-gold-hi); }
html.sq-on #sq .hud .qs[data-a="barpg"].p2 { background: radial-gradient(circle at 50% 36%, #7a2a3c, #3a0f1c 80%); }
html.sq-on #sq .hud .qs[data-a="attack"], html.sq-on #sq .hud .qs[data-a="rest"], html.sq-on #sq .hud .qs[data-a="dash"] { border-radius: 50%; }
html.sq-on #sq .hud .qs[data-a="attack"] { background: radial-gradient(circle at 50% 32%, #d9465c, #7d0f22 68%, #4a0814);
  box-shadow: inset 0 0 0 2px var(--sk-ink), inset 0 0 0 4px var(--sk-gold-mid), inset 0 0 0 5px var(--sk-ink), inset 0 -10px 14px rgba(0, 0, 0, 0.35), 0 0 0 1px var(--sk-ink), 0 4px 10px rgba(5, 3, 8, 0.6); }
html.sq-on #sq .hud .qs[data-a="attack"]:hover { box-shadow: inset 0 0 0 2px var(--sk-ink), inset 0 0 0 4px var(--sk-gold-hi), inset 0 0 0 5px var(--sk-ink), 0 0 0 1px var(--sk-ink), 0 0 14px rgba(217, 70, 92, 0.55); }
html.sq-on #sq .hud .qs[data-a="attack"] > i, html.sq-on #sq .hud .qs[data-a="dash"] > i { left: 50%; top: -7px; transform: translateX(-50%); }
html.sq-on #sq .hud .qs > u { border-radius: inherit; }

/* ---- the action bar's tray: a metal shelf behind the skills and the bottles, gems at its ends, the EXP as its foot ---- */
html.sq-on #sq .hud .ab-tray { position: absolute; box-sizing: border-box; pointer-events: none; border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, rgba(57, 37, 21, 0.9), rgba(22, 13, 7, 0.94)); box-shadow: var(--sk-plate-frame); }
html.sq-on #sq .hud .ab-tray::before, html.sq-on #sq .hud .ab-tray::after { content: ""; position: absolute; top: 50%; width: 12px; height: 12px; margin-top: -6px; background: var(--sk-orn-gem) center / 12px 12px no-repeat; }
html.sq-on #sq .hud .ab-tray::before { left: -6px; }
html.sq-on #sq .hud .ab-tray::after { right: -6px; }
html.sq-on #sq .hud .xpb { position: absolute; height: 5px; box-sizing: border-box; overflow: hidden; border-radius: 1px; background: var(--sk-track); box-shadow: 0 0 0 1px var(--sk-ink), inset 0 1px 1px rgba(0, 0, 0, 0.9); }
html.sq-on #sq .hud .xpb > [data-f="xpf"] { background: var(--sk-xp); }
html.sq-on #sq .hud .xpb > [data-f="jxpf"] { background: var(--sk-jxp); }

/* ---- the top right: the menu's cells, the round map in its ring, the place on a plaque ---- */
html.sq-on #sq .hud .mi.mt { border: 0; border-radius: 3px; background: var(--sk-plate); box-shadow: var(--sk-plate-frame); }
html.sq-on #sq .hud .mi.mt:hover { box-shadow: inset 0 0 0 1px var(--sk-gold-hi), 0 0 0 1px var(--sk-ink), 0 0 10px rgba(244, 226, 173, 0.3); }
html.sq-on #sq .hud .mi.mt.on { background: linear-gradient(180deg, #5a2236, #2a190c); box-shadow: inset 0 0 0 1px var(--sk-gold), 0 0 0 1px var(--sk-ink), 0 0 10px rgba(210, 173, 98, 0.35); }
html.sq-on #sq .hud .mi > span { color: var(--sk-text); letter-spacing: 0.01em; }
/* (Premium's cell stays gold, js/sq/premstatus.js: the skin's old gold, its words dark) */
html.sq-on #sq .hud .mi.mt.pj-cell { background: var(--sk-primary); box-shadow: inset 0 0 0 1px #6b4d17, inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 0 0 1px var(--sk-ink), 0 0 9px rgba(210, 173, 98, 0.55); }
html.sq-on #sq .hud .mi.mt.pj-cell > span { color: var(--sk-primary-ink); text-shadow: none; }
/* (the title bars of the menu's pop-up and the opened day's work: js/sq/hud.js gives them their own navy) */
html.sq-on #sq .hud .mp > .tb, html.sq-on #sq .hud .wk.open > .tb { background: var(--sk-orn-tl) left 3px top 3px / 12px 12px no-repeat, var(--sk-orn-tr) right 3px top 3px / 12px 12px no-repeat, var(--sk-bar);
  color: var(--sk-title); box-shadow: inset 0 -1px 0 var(--sk-gold-mid); font-family: var(--sk-font-title); }
html.sq-on #sq .hud .mp > .tb > span { font-family: 'Baloo 2', sans-serif; color: var(--sk-title-dim); }
html.sq-on #sq .hud .mp > .tb, html.sq-on #sq .hud .wk.open > .tb { padding: 0 16px; }
/* (a long name in the pop-up's grid, "Mercado central de Lucro", ran over its neighbour: two lines in its own cell) */
html.sq-on #sq .hud .mp .mi { height: auto; min-height: 48px; }
html.sq-on #sq .hud .mp .mi > span { max-width: 64px; white-space: normal; text-align: center; line-height: 1.05; }
html.sq-on #sq .hud .mi > em { background: var(--sk-gold); color: var(--sk-primary-ink); }
html.sq-on #sq .hud .mi > em.r { background: var(--sk-crimson-hi); color: #ffffff; }
html.sq-on #sq .hud .mi > em.d { background: var(--sk-crimson-hi); box-shadow: 0 0 0 1.5px var(--sk-gold-hi); }
html.sq-on #sq .hud .mp { border: 0; background: var(--sk-plate-solid); box-shadow: var(--sk-frame); }
html.sq-on #sq .hud .mp > .tb { height: 26px; font-size: 15px; }
html.sq-on #sq .hud .mp > div:last-child { background: transparent; }
html.sq-on #sq .hud .mp .mi { border-radius: 3px; }
html.sq-on #sq .hud .mp .mi:hover { background: rgba(210, 173, 98, 0.12); box-shadow: inset 0 0 0 1px rgba(210, 173, 98, 0.45); }
html.sq-on #sq .hud .mm { border-radius: 50%; background: #100a05;
  box-shadow: inset 0 0 0 1px rgba(244, 226, 173, 0.35), 0 0 0 1px var(--sk-ink), 0 0 0 3px var(--sk-gold-mid), 0 0 0 4px var(--sk-ink), 0 5px 12px rgba(5, 3, 8, 0.6); }
html.sq-on #sq .hud .mm:hover { box-shadow: inset 0 0 0 1px rgba(244, 226, 173, 0.5), 0 0 0 1px var(--sk-ink), 0 0 0 3px var(--sk-gold-hi), 0 0 0 4px var(--sk-ink), 0 0 12px rgba(244, 226, 173, 0.3); }
html.sq-on #sq .hud [data-f="zl"] { box-sizing: border-box; padding: 1px 6px; line-height: 1.35; border-radius: 2px; background: var(--sk-plate); box-shadow: var(--sk-plate-frame); }
html.sq-on #sq .hud [data-f="zone"] { color: var(--sk-title); }
html.sq-on #sq .hud .chb { background: var(--sk-plate-solid); border: 0; border-radius: 2px; box-shadow: inset 0 0 0 1px var(--sk-gold-mid), 0 0 0 1px var(--sk-ink); color: var(--sk-gold-hi); }
html.sq-on #sq .hud .chb:hover { background: linear-gradient(180deg, #5a2236, #2a190c); box-shadow: inset 0 0 0 1px var(--sk-gold-hi), 0 0 0 1px var(--sk-ink); }

/* ---- AUTO: an old-gold plate; on, dark with a gold line and a glow ---- */
html.sq-on #sq .hud .ay { border: 0; border-radius: 3px; background: var(--sk-primary); color: var(--sk-primary-ink); letter-spacing: 0.04em;
  box-shadow: inset 0 0 0 1px #6b4d17, inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 0 0 1px var(--sk-ink), 0 3px 6px rgba(5, 3, 8, 0.5); }
html.sq-on #sq .hud .ay > img { filter: brightness(0) opacity(0.78); }
html.sq-on #sq .hud .ay.on { background: var(--sk-plate-solid); color: var(--sk-gold-hi); box-shadow: inset 0 0 0 1px var(--sk-gold), 0 0 0 1px var(--sk-ink), 0 0 12px rgba(210, 173, 98, 0.5); }
html.sq-on #sq .hud .ay.on > img { filter: var(--sk-icon); }

/* ---- the day's work: a dark plate folded and opened ---- */
html.sq-on #sq .hud .wk:not(.open) { background: var(--sk-plate); border: 0; border-radius: 2px; box-shadow: var(--sk-plate-frame); }
html.sq-on #sq .hud .wk.open { background: var(--sk-plate-solid); border: 0; box-shadow: var(--sk-frame); }
html.sq-on #sq .hud .wk.open > .tb { height: 26px; font-size: 15px; }
html.sq-on #sq .hud .wk.open [data-f="work"] { color: var(--sk-text); text-shadow: none; }
html.sq-on #sq .hud .wk.open [data-f="work"] > div + div { border-top: 1px solid rgba(210, 173, 98, 0.22); }
html.sq-on #sq .hud .wk.open [data-f="work"] > div > div + div { color: var(--sk-text-dim) !important; }
html.sq-on #sq .hud .wk.open [data-f="work"] span[style*="Baloo"] { color: var(--sk-gold-hi) !important; }
html.sq-on #sq .hud .wk span[data-a] { border: 0; border-radius: 2px; background: linear-gradient(180deg, #b8304a, #7d0f22); color: #ffffff !important; box-shadow: inset 0 0 0 1px rgba(244, 226, 173, 0.45), 0 0 0 1px var(--sk-ink); }
html.sq-on #sq .hud .wk [data-f="work"] span[data-a="w-step"] { background: var(--sk-primary); color: var(--sk-primary-ink) !important; }
html.sq-on #sq .hud .wk [data-a="w-more"] { border: 0; border-radius: 2px; background: var(--sk-plate-solid); box-shadow: inset 0 0 0 1px var(--sk-gold-mid); color: var(--sk-gold-hi); }

/* ---- the chat: a dark plate with tabs on its edge ---- */
html.sq-on #sq .hud .cwp { background: var(--sk-plate); box-shadow: var(--sk-plate-frame); border-radius: 0 2px 2px 2px; }
html.sq-on #sq .hud .cwt { height: 22px; box-sizing: border-box; padding: 0 9px; border: 0; border-radius: 3px 3px 0 0; font-family: 'Noto Sans Thai', sans-serif; font-weight: 700; font-size: 11.5px; line-height: 22px; white-space: nowrap;
  background: linear-gradient(180deg, #3b2717, #25170d); color: var(--sk-text-dim); box-shadow: inset 0 1px 0 rgba(210, 173, 98, 0.4), inset 1px 0 0 rgba(210, 173, 98, 0.25), inset -1px 0 0 rgba(210, 173, 98, 0.25); }
html.sq-on #sq .hud .cwt.on { background: linear-gradient(180deg, #5a2236, #301d0e); color: var(--sk-gold-hi); box-shadow: inset 0 2px 0 var(--sk-gold), inset 1px 0 0 rgba(210, 173, 98, 0.45), inset -1px 0 0 rgba(210, 173, 98, 0.45); }
html.sq-on #sq .hud .cwt.room { color: #ffb0e0; }
html.sq-on #sq .hud .cwt > .u { font-family: 'Baloo 2', sans-serif; font-weight: 700; color: var(--sk-gold); }
html.sq-on #sq .hud .cwi { flex: 1; min-width: 0; height: 22px; box-sizing: border-box; border: 0; border-radius: 2px; padding: 0 8px; background: rgba(5, 3, 8, 0.55);
  box-shadow: inset 0 0 0 1px rgba(210, 173, 98, 0.45); color: #ffffff; font: 500 13px 'Noto Sans Thai', sans-serif; outline: none; pointer-events: auto; }
html.sq-on #sq .hud .cwi:focus { box-shadow: inset 0 0 0 1px var(--sk-gold-hi), 0 0 6px rgba(244, 226, 173, 0.3); }
html.sq-on #sq .hud .qs.lit { box-shadow: inset 0 0 0 1px var(--sk-ink), inset 0 0 0 2px var(--sk-gold-hi), 0 0 0 1px var(--sk-ink), 0 0 10px rgba(244, 226, 173, 0.4); }

/* ---- js/sq/hudmore.js's plates (the target, the boss, the party, the loot lines...): their own inline paint uses the tokens;
   the kit's words classes (.xl, .mu) were made for white paper ---- */
html.sq-on #sq .hm .xl { color: inherit; }
html.sq-on #sq .hm .mu { color: var(--sk-text-dim); }
html.sq-on #sq .hm .av { box-shadow: inset 0 0 0 1px var(--sk-gold-lo); border-radius: 50%; }

/* ---- the game's own target plate, the one a touch screen shows (#hud .tframe; placed by js/sq/hud.js plateTouch) ---- */
html.mob.sq-on #hud .tframe { border: 0; border-radius: 3px; background: var(--sk-orn-tl) left 3px top 3px / 12px 12px no-repeat, var(--sk-orn-tr) right 3px top 3px / 12px 12px no-repeat, var(--sk-plate); box-shadow: var(--sk-plate-frame); }
html.mob.sq-on #hud .tframe .tname { color: var(--sk-title); -webkit-text-stroke-color: #100a05; }

/* ---- the thumb's own: the utility fan (js/sq/hud.js .ufw; a phone or a tablet only, its places in css/sq-touch.css) ---- */
html.sq-on #sq .hud .ufw { display: none; }
html.mob.sq-on #sq .hud .ufw { display: block; position: absolute; width: calc(46 * var(--tu) / var(--sqk)); height: calc(46 * var(--tu) / var(--sqk)); z-index: 5; }
html.mob.sq-on #sq .hud .ufw .qs { position: absolute; left: 0; top: 0; width: 100%; height: 100%; border-radius: 50%; }
html.mob.sq-on #sq .hud .ufw .qs > img { width: 56%; height: 56%; object-fit: contain; }
html.mob.sq-on #sq .hud .ufw > .fan { position: absolute; right: calc(100% + 10px); top: 0; display: flex; flex-direction: row-reverse; gap: calc(10 * var(--tu) / var(--sqk)); }
html.mob.sq-on #sq .hud .ufw > .fan > .qs { position: relative; flex: none; width: calc(46 * var(--tu) / var(--sqk)); height: calc(46 * var(--tu) / var(--sqk)); }
html.mob.sq-on #sq .hud .ufw > .fan > .qs > span { position: absolute; left: 50%; top: 100%; margin-top: 2px; transform: translateX(-50%); width: calc(54 * var(--tu) / var(--sqk));
  white-space: normal; text-align: center; line-height: 1.05; pointer-events: none;
  font-size: calc(9.5 * var(--tu) / var(--sqk)); font-weight: 700; color: var(--sk-text); text-shadow: var(--sk-shadow-text); }
html.mob.sq-on #sq .hud .ufw > .fan > .qs[hidden] { display: none !important; }
/* (upright the fan opens upward, a column over its button: its row would run off a phone's width) */
html.mob-port.sq-on #sq .hud .ufw > .fan { right: auto; left: 0; top: auto; bottom: calc(100% + 18px); flex-direction: column-reverse; gap: calc(18 * var(--tu) / var(--sqk)); }

/* ---- the painted gold pictures (assets/ui/sq/gold/, js/sq/core.js SQ.ic): already the skin's colours, no warming filter; on the
   gold AUTO button they stay a dark shape, lit again once AUTO is on ---- */
html.sq-on #sq img[src*="ui/sq/gold/"] { filter: drop-shadow(0 1px 1px rgba(5, 3, 8, 0.7)); }
html.sq-on #sq .hud .ay:not(.on) > img[src*="ui/sq/gold/"] { filter: brightness(0) opacity(0.78); }
html.sq-on #sq .hud .ay.on > img[src*="ui/sq/gold/"] { filter: drop-shadow(0 1px 1px rgba(5, 3, 8, 0.7)); }

/* ---- feel (the owner, 1 Dec 2026, "faca as 6"): a press sinks the button a pixel, a skill back from its cooldown flashes gold once,
   a crimson edge rises round the screen while HP is under 30%. One-shot animations and transitions only: nothing loops, and the
   edge is a static gradient whose opacity alone moves ---- */
html.sq-on #sq .hud .qs:active, html.sq-on #sq .hud .mi.mt:active, html.sq-on #sq .hud .ay:active, html.sq-on #sq .hud .chb:active,
:where(html.sq-on) #sq .bt:active:not(:disabled), :where(html.sq-on) #sq .wb:active { transform: translateY(1px); filter: brightness(0.92); }
html.mob.sq-on #mb .mb-attack:active, html.mob.sq-on #mb #mb-skills .hslot:active, html.mob.sq-on #mb .hslot.item:active, html.mob.sq-on #hs-dash.hslot:active { filter: brightness(1.2); }
@keyframes sk-rdy { 0% { box-shadow: inset 0 0 0 2px #fff4c8, 0 0 0 1px #100a05, 0 0 0 rgba(244, 226, 173, 0.9); } 100% { box-shadow: inset 0 0 0 2px rgba(244, 226, 173, 0), 0 0 0 1px #100a05, 0 0 16px rgba(244, 226, 173, 0); } }
html.sq-on #sq .hud .qs.rdy { animation: sk-rdy 0.55s ease-out 1; }
html.sq-on #sq .hud .lowhp { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.5s ease;
  background: radial-gradient(ellipse at center, rgba(90, 13, 27, 0) 55%, rgba(120, 14, 32, 0.38) 82%, rgba(90, 8, 22, 0.62) 100%); }
html.sq-on #sq .hud .lowhp.on { opacity: 1; }
/* (the painted pictures carry more detail than the old strokes: the top row's a little bigger in its 50 px cell) */
html.sq-on #sq .hud .mi.mt > img { width: 28px; height: 28px; }

/* ================================ the equip and bag windows (js/sq/equip.js, js/sq/bag.js) ================================
   The owner, 1 Dec 2026: "bora refinar essas telas agora, quero um visual mmo rpg com o estilo grafico nosso, quero algo realmente
   bonito e facil de usar". The hero on a dark stage between his slots, the slots and the bag's cells sunk wells in an old-gold rim,
   a worn piece's name in its rarity's colour, the bag's kinds on a dark rail; the paper stays for the words around them. */

/* ---- a well: one look for every item cell on a dark panel ---- */
html.sq-on #sq [data-sq="equip"] .eq-stage .sl, html.sq-on #sq [data-sq="bag"] .bag-grid .sl {
  background-color: #20140a; border-radius: 3px;
  box-shadow: inset 0 0 0 1px #100a05, inset 0 0 0 2px rgba(168, 132, 63, 0.75), inset 0 -8px 12px rgba(0, 0, 0, 0.45), 0 1px 0 rgba(244, 226, 173, 0.08); }
html.sq-on #sq [data-sq="equip"] .eq-stage .sl:hover, html.sq-on #sq [data-sq="bag"] .bag-grid .sl[data-k]:hover {
  box-shadow: inset 0 0 0 1px #100a05, inset 0 0 0 2px var(--sk-gold-hi), inset 0 -8px 12px rgba(0, 0, 0, 0.35), 0 0 10px rgba(244, 226, 173, 0.35); cursor: pointer; }
html.sq-on #sq [data-sq="equip"] .eq-stage .sl.on, html.sq-on #sq [data-sq="bag"] .bag-grid .sl.on { box-shadow: inset 0 0 0 1px #100a05, inset 0 0 0 2px var(--sk-gold), inset 0 -8px 12px rgba(0, 0, 0, 0.35); }
html.sq-on #sq [data-sq="bag"] .bag-grid .sl.pk { box-shadow: inset 0 0 0 1px #100a05, inset 0 0 0 2.5px var(--sk-gold-hi), 0 0 0 1px #100a05, 0 0 12px rgba(244, 226, 173, 0.55); }
html.sq-on #sq [data-sq="bag"] .bag-grid span.sl:not([data-k]) { background-color: #190f08; box-shadow: inset 0 0 0 1px #100a05, inset 0 0 0 2px rgba(168, 132, 63, 0.3); }
/* (a cell's words on the dark: the count and the refine in light with a dark edge) */
html.sq-on #sq [data-sq="equip"] .eq-stage .sl > .c, html.sq-on #sq [data-sq="bag"] .bag-grid .sl > .c { color: #fff6df; text-shadow: 0 1px 1px #000, 0 0 2px #000, 0 0 3px #000; }
html.sq-on #sq [data-sq="equip"] .eq-stage .sl > .rf, html.sq-on #sq [data-sq="bag"] .bag-grid .sl > .rf { color: #ffb35c; text-shadow: 0 1px 1px #000, 0 0 2px #000; }
html.sq-on #sq [data-sq="bag"] .bag-grid .sl > .g, html.sq-on #sq [data-sq="equip"] .eq-stage .sl > .g { left: 4px; right: 4px; bottom: 2px; height: 2px; border-radius: 1px; }

/* ---- the equip window: the stage ---- */
html.sq-on #sq [data-sq="equip"] .eq-stage { color: var(--sk-text);
  background: var(--sk-corners),
    radial-gradient(ellipse 150px 120px at 50% 42%, rgba(158, 27, 49, 0.22), rgba(158, 27, 49, 0) 70%),
    radial-gradient(ellipse at 50% 40%, #4e331e 0%, #2c1c10 55%, #1a1008 100%);
  box-shadow: inset 0 0 0 1px #100a05, inset 0 1px 0 rgba(244, 226, 173, 0.12), inset 0 0 28px rgba(0, 0, 0, 0.55); }
/* (the pedestal under the hero's feet: a lit stone disc, its rim old gold) */
html.sq-on #sq [data-sq="equip"] .eq-ped { position: absolute; left: 171px; top: 156px; width: 130px; height: 30px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(ellipse at 50% 40%, rgba(244, 226, 173, 0.32), rgba(210, 173, 98, 0.1) 50%, rgba(0, 0, 0, 0.35) 72%);
  box-shadow: inset 0 0 0 1px rgba(210, 173, 98, 0.45), inset 0 -3px 6px rgba(0, 0, 0, 0.5), 0 6px 14px rgba(0, 0, 0, 0.55); }
html.sq-on #sq [data-sq="equip"] .eq-stage canvas[data-f="hero"] { filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.55)); }
html.sq-on #sq [data-sq="equip"] .eq-stage .eq .k { color: var(--sk-gold); font-weight: 700; letter-spacing: 0.03em; }
html.sq-on #sq [data-sq="equip"] .eq-stage .eq .n { color: var(--sk-text); text-shadow: 0 1px 1px #000; }
html.sq-on #sq [data-sq="equip"] .eq-stage .eq .n.no { color: var(--sk-text-mute); font-style: italic; text-shadow: none; }
html.sq-on #sq [data-sq="equip"] .eq-stage .eq .s { color: #b6d2f5; }
html.sq-on #sq [data-sq="equip"] .eq-stage .mu { color: var(--sk-text-mute); }
html.sq-on #sq [data-sq="equip"] .eq-stage .ok { color: var(--sk-good); }
/* (an empty slot: the shape of what goes in it, sunk and faded; brighter under the pointer, a click opens the bag at it) */
html.sq-on #sq [data-sq="equip"] .eq-stage .sl > img.sil { left: 6px; top: 6px; width: 28px; height: 28px; object-fit: contain; opacity: 0.3; filter: grayscale(0.6) brightness(0.9); }
html.sq-on #sq [data-sq="equip"] .eq-stage .sl:hover > img.sil { opacity: 0.6; filter: none; }
/* (the weapon sets: the worn one a crimson plate, the other a dark metal button) */
html.sq-on #sq [data-sq="equip"] .eqset { display: inline-block; height: 22px; padding: 0 8px; box-sizing: border-box; border-radius: 2px; font-size: 11px; line-height: 22px; text-align: center; white-space: nowrap;
  background: linear-gradient(180deg, #b8304a, #6a1022); color: #fff3dc; box-shadow: inset 0 0 0 1px var(--sk-gold), 0 0 0 1px #100a05; text-shadow: 0 1px 1px #000; }
html.sq-on #sq [data-sq="equip"] .eq-stage .bt { background: var(--sk-plate-solid); color: var(--sk-text-dim); box-shadow: inset 0 0 0 1px rgba(210, 173, 98, 0.55), 0 0 0 1px #100a05; }
html.sq-on #sq [data-sq="equip"] .eq-stage .bt:hover { color: var(--sk-gold-hi); box-shadow: inset 0 0 0 1px var(--sk-gold-hi), 0 0 0 1px #100a05; }
html.sq-on #sq [data-sq="equip"] .eq-stage .th.mu { color: var(--sk-text-dim); }
/* (the foot: each number a small plate, its name in small gold letters over it) */
html.sq-on #sq [data-sq="equip"] .eqst { display: inline-flex; flex-direction: column; align-items: flex-start; justify-content: center; min-width: 52px; height: 30px; padding: 0 8px; box-sizing: border-box; border-radius: 2px;
  background: linear-gradient(180deg, #fbf8f1, #efe7d6); box-shadow: inset 0 0 0 1px #d6c9ae; line-height: 1.05; }
html.sq-on #sq [data-sq="equip"] .eqst > i { font-style: normal; font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: 9.5px; letter-spacing: 0.06em; color: #9a7a35; }
html.sq-on #sq [data-sq="equip"] .eqst > b { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 12.5px; color: var(--sk-ink-paper); white-space: nowrap; }
html.sq-on #sq [data-sq="equip"] > .ft { gap: 5px !important; min-height: 42px; }

/* ---- the bag window: the dark rail of kinds, the grid's panel ---- */
html.sq-on #sq [data-sq="bag"] .bag-rail { background: linear-gradient(90deg, #25170d, #322013); box-shadow: inset -1px 0 0 #100a05, inset -2px 0 0 rgba(168, 132, 63, 0.45); }
html.sq-on #sq [data-sq="bag"] .bag-rail .vt { color: var(--sk-text-dim); border-bottom: 1px solid rgba(210, 173, 98, 0.14); background: transparent; }
html.sq-on #sq [data-sq="bag"] .bag-rail .vt > img { opacity: 0.85; filter: var(--sk-icon); }
html.sq-on #sq [data-sq="bag"] .bag-rail .vt > img[src*="ui/sq/gold/"] { filter: drop-shadow(0 1px 1px rgba(5, 3, 8, 0.7)); }
html.sq-on #sq [data-sq="bag"] .bag-rail .vt:hover { background: rgba(244, 226, 173, 0.06); color: var(--sk-text); }
html.sq-on #sq [data-sq="bag"] .bag-rail .vt.on { background: linear-gradient(90deg, rgba(158, 27, 49, 0.35), rgba(158, 27, 49, 0.08)); color: var(--sk-gold-hi); box-shadow: inset 3px 0 0 var(--sk-crimson-hi); }
html.sq-on #sq [data-sq="bag"] .bag-rail .vt.on > img { opacity: 1; }
html.sq-on #sq [data-sq="bag"] .bag-rail .vt > b { background: #100a05; color: var(--sk-gold); box-shadow: inset 0 0 0 1px rgba(168, 132, 63, 0.5); border-radius: 2px; }
html.sq-on #sq [data-sq="bag"] .bag-rail .vt.on > b { background: var(--sk-crimson); color: #fff3dc; }
html.sq-on #sq [data-sq="bag"] .bag-grid { border-radius: 3px; background: radial-gradient(ellipse at 50% 0%, #3b2717, #20140a 70%);
  box-shadow: inset 0 0 0 1px #100a05, inset 0 0 0 2px rgba(168, 132, 63, 0.4), inset 0 6px 16px rgba(0, 0, 0, 0.5); scrollbar-color: #a8843f #20140a; }
html.sq-on #sq [data-sq="bag"] label:focus-within { box-shadow: inset 0 0 0 1px var(--sk-gold-mid), 0 0 0 2px rgba(210, 173, 98, 0.28) !important; }
/* (the foot in two lines: the five numbers across the window, each plate as wide as the others; สถานะ and บิลด์ under them at the right.
   On one line ATK's "22 + 30~41" and the build button were cut at the window's edge) */
html.sq-on #sq [data-sq="equip"] > .ft { flex-wrap: wrap; row-gap: 6px; padding-top: 7px; padding-bottom: 7px; }
html.sq-on #sq [data-sq="equip"] > .ft > [data-f="foot"] { display: flex !important; gap: 5px; flex: 1 1 100%; }
html.sq-on #sq [data-sq="equip"] .eqst { flex: 1 1 0; min-width: 0; }
html.sq-on #sq [data-sq="equip"] .eqst:first-child { flex-grow: 1.7; }
html.sq-on #sq [data-sq="equip"] [data-f="sum"] { background: linear-gradient(180deg, #fbf8f1, #f3ecdf); }
html.sq-on #sq [data-sq="equip"] [data-f="sum"] > .th.mu { color: #9a7a35; font-weight: 700 !important; letter-spacing: 0.03em; }
html.sq-on #sq [data-sq="equip"] .eq-stage .sl > img.sil { opacity: 0.38; }

/* ---- a piece's rarity on its well's rim (the bag's cell, a worn slot, the card's picture: --rc from js/sq/bag.js, equip.js, wcard.js),
   as an MMO's bag; a plain piece keeps the gold rim. The pointer's and the pick's lights still win ---- */
html.sq-on #sq [data-sq="bag"] .bag-grid .sl[style*="--rc"]:not(.pk):not(:hover), html.sq-on #sq [data-sq="equip"] .eq-stage .sl[style*="--rc"]:not(:hover) {
  box-shadow: inset 0 0 0 1px #100a05, inset 0 0 0 2px var(--rc), inset 0 0 12px color-mix(in srgb, var(--rc) 35%, transparent), inset 0 -8px 12px rgba(0, 0, 0, 0.4); }
:where(html.sq-on) #sq .sl.cdpic { background-color: #20140a; border-radius: 3px;
  box-shadow: inset 0 0 0 1px #100a05, inset 0 0 0 2px var(--rc, #a8843f), inset 0 0 14px color-mix(in srgb, var(--rc, #a8843f) 35%, transparent), 0 2px 6px rgba(5, 3, 8, 0.35); }
html.sq-on #sq [data-sq="bag"] .bag-empty { padding: 6px 0 2px; text-align: center; font-weight: 600; font-size: 11.5px; color: var(--sk-text-dim); letter-spacing: 0.02em; }

/* ================================ the status and skill windows (js/sq/status.js, js/sq/skill.js) ================================
   The owner, 1 Dec 2026, after the equip and bag windows: "Ficou bom, siga". The six stats on a dark plaque with crimson + studs and
   the points left lit in gold; the numbers on light tablets with small bronze names; the skills on a dark spellbook page, their
   icons in wells, the bar's slots wells as the HUD's. */
html.sq-on #sq [data-sq="status"] .st-attr { padding: 4px 9px 9px; border-radius: 3px; color: var(--sk-text);
  background: var(--sk-orn-tl) left 3px top 3px / 12px 12px no-repeat, var(--sk-orn-br) right 3px bottom 3px / 12px 12px no-repeat, radial-gradient(ellipse at 50% 0%, #472e1b, #25170d 75%);
  box-shadow: inset 0 0 0 1px #100a05, inset 0 0 0 2px rgba(168, 132, 63, 0.5), inset 0 6px 16px rgba(0, 0, 0, 0.45); }
html.sq-on #sq [data-sq="status"] .st-attr .sr { height: 31px; border-bottom: 1px solid rgba(210, 173, 98, 0.14); }
html.sq-on #sq [data-sq="status"] .st-attr .sr > img { filter: var(--sk-icon); }
html.sq-on #sq [data-sq="status"] .st-attr .sr > .key { color: var(--sk-gold-hi); font-weight: 800; letter-spacing: 0.03em; }
html.sq-on #sq [data-sq="status"] .st-attr .sr > .nm { color: var(--sk-text-dim); }
html.sq-on #sq [data-sq="status"] .st-attr .sr > .v { color: #ffffff; font-size: 14px; text-shadow: 0 1px 1px #000; }
html.sq-on #sq [data-sq="status"] .st-attr .sr > .gv { color: var(--sk-good); }
html.sq-on #sq [data-sq="status"] .st-attr .sr > .cs { color: var(--sk-text-mute); }
html.sq-on #sq [data-sq="status"] .st-attr .pl { width: 20px; height: 20px; border-radius: 50%; background: radial-gradient(circle at 50% 30%, #d9465c, #7d0f22); box-shadow: inset 0 0 0 1px var(--sk-gold), 0 0 0 1px #100a05; }
html.sq-on #sq [data-sq="status"] .st-attr .pl:hover:not(:disabled), html.sq-on #sq [data-sq="status"] .st-attr .pl.hot { box-shadow: inset 0 0 0 1px var(--sk-gold-hi), 0 0 0 1px #100a05, 0 0 8px rgba(217, 70, 92, 0.6); }
html.sq-on #sq [data-sq="status"] .st-attr .pl > img { filter: brightness(0) invert(1); }
html.sq-on #sq [data-sq="status"] .st-attr .reset-row { border-top-color: rgba(210, 173, 98, 0.28); }
html.sq-on #sq [data-sq="status"] .st-attr .reset-row > .th { color: var(--sk-text-dim); }
html.sq-on #sq [data-sq="status"] .st-attr [data-f="left"] { color: var(--sk-gold-hi) !important; font-size: 22px !important; font-weight: 800; text-shadow: 0 0 10px rgba(244, 226, 173, 0.45), 0 1px 1px #000; }
html.sq-on #sq [data-sq="status"] .st-attr .bt { background: var(--sk-plate-solid); color: var(--sk-text-dim); box-shadow: inset 0 0 0 1px rgba(210, 173, 98, 0.55), 0 0 0 1px #100a05; }
html.sq-on #sq [data-sq="status"] .st-attr .bt:hover { color: var(--sk-gold-hi); }
html.sq-on #sq [data-sq="status"] .st-cells .cv { border-radius: 2px; background: linear-gradient(180deg, #fbf8f1, #f1ebdf); box-shadow: inset 0 0 0 1px #d6c9ae, 0 1px 0 rgba(255, 255, 255, 0.6); }
html.sq-on #sq [data-sq="status"] .st-cells .cv > span:first-child { color: #8a6a2e; font-size: 9.5px; font-weight: 700; letter-spacing: 0.04em; }
html.sq-on #sq [data-sq="status"] .st-cells .cv > b { font-size: 14px; color: var(--sk-ink-paper); }
html.sq-on #sq [data-sq="status"] .st-cells .cv.hot { background: #fbf1dc; box-shadow: inset 0 0 0 1.5px var(--sk-gold-mid); }

html.sq-on #sq [data-sq="skill"] .sk-book { color: var(--sk-text);
  background: var(--sk-orn-tl) left 3px top 3px / 12px 12px no-repeat, var(--sk-orn-bl) left 3px bottom 3px / 12px 12px no-repeat, radial-gradient(ellipse at 50% 0%, #472e1b, #25170d 70%);
  box-shadow: inset 0 0 0 1px #100a05, inset 0 6px 18px rgba(0, 0, 0, 0.45); scrollbar-color: #a8843f #25170d; }
html.sq-on #sq [data-sq="skill"] .sk-book .ln { background: transparent; box-shadow: inset 0 -1px 0 rgba(210, 173, 98, 0.45); color: var(--sk-gold-hi); font-family: var(--sk-font-title); font-size: 14px; letter-spacing: 0.02em; }
html.sq-on #sq [data-sq="skill"] .sk-book .sk { border-top-color: rgba(210, 173, 98, 0.12); border-radius: 3px; }
html.sq-on #sq [data-sq="skill"] .sk-book .sk:hover { background: rgba(244, 226, 173, 0.06); }
html.sq-on #sq [data-sq="skill"] .sk-book .sk.pk { background: linear-gradient(90deg, rgba(158, 27, 49, 0.32), rgba(158, 27, 49, 0.06)); box-shadow: inset 0 0 0 1px var(--sk-gold-mid), inset 3px 0 0 var(--sk-crimson-hi); }
html.sq-on #sq [data-sq="skill"] .sk-book .sk > .ic > img { border-radius: 3px; box-shadow: 0 0 0 1px #100a05, 0 0 0 2px rgba(168, 132, 63, 0.8); }
html.sq-on #sq [data-sq="skill"] .sk-book .sk > .ic > b { background: linear-gradient(180deg, #66442a, #322013); color: var(--sk-gold-hi); box-shadow: 0 0 0 1px #100a05; border-radius: 2px; }
html.sq-on #sq [data-sq="skill"] .sk-book .sk > .n { color: var(--sk-text); }
html.sq-on #sq [data-sq="skill"] .sk-book .sk.lk > .n { color: var(--sk-text-mute); }
html.sq-on #sq [data-sq="skill"] .sk-book .sk > .lv { color: #ffffff; }
html.sq-on #sq [data-sq="skill"] .sk-book .sk > .lv > small, html.sq-on #sq [data-sq="skill"] .sk-book .mu { color: var(--sk-text-mute); }
html.sq-on #sq [data-sq="skill"] .sk-book .sk > .q { color: var(--sk-text-dim) !important; }
html.sq-on #sq [data-sq="skill"] .sk-book .sk > .q.w { color: var(--sk-warm) !important; }
html.sq-on #sq [data-sq="skill"] .sk-book .sk > .p1.off { background: rgba(244, 226, 173, 0.06); box-shadow: inset 0 0 0 1px rgba(210, 173, 98, 0.25); color: var(--sk-text-mute); }
html.sq-on #sq [data-sq="skill"] .sk-acts { flex-wrap: wrap; }
html.sq-on #sq [data-sq="skill"] .sk-acts > .bt { min-width: 0; white-space: normal; line-height: 1.1; }
html.sq-on #sq [data-sq="skill"] > .ft .slot { background-color: #20140a; border-radius: 3px; box-shadow: inset 0 0 0 1px #100a05, inset 0 0 0 2px rgba(168, 132, 63, 0.8), inset 0 -8px 12px rgba(0, 0, 0, 0.4); }
html.sq-on #sq [data-sq="skill"] > .ft .slot.pk { box-shadow: inset 0 0 0 1px #100a05, inset 0 0 0 2.5px var(--sk-gold-hi), 0 0 10px rgba(244, 226, 173, 0.5); }
html.sq-on #sq [data-sq="skill"] > .ft .slot:hover { box-shadow: inset 0 0 0 1px #100a05, inset 0 0 0 2px var(--sk-gold-hi), 0 0 8px rgba(244, 226, 173, 0.35); }
html.sq-on #sq [data-sq="skill"] > .ft .slot > b { background: linear-gradient(180deg, #66442a, #322013); color: var(--sk-gold-hi); box-shadow: 0 0 0 1px #100a05; border-radius: 2px; }
html.sq-on #sq [data-sq="skill"] > .ft .slot > img.e { opacity: 0.45; }
/* (the learn button: its words over its cost, two clean lines instead of three broken ones in Portuguese) */
html.sq-on #sq [data-sq="skill"] .sk-acts > [data-learn] { flex-direction: column; justify-content: center; gap: 0; height: auto !important; min-height: 30px; padding: 2px 6px; }
html.sq-on #sq [data-sq="skill"] .sk-acts > [data-learn] > span { font-size: 9.5px !important; line-height: 1.1; }

/* ================================ every window: the kit's shared pieces (css/sq.css) in the MMO look ================================
   The owner, 1 Dec 2026: "faca todas". What every window builds with, so each one gains at once: an item's cell a sunk dark well in a
   gold rim (as the bag's), bars on a dark track in a gold rim, tables with small bronze heads, switches and checks crimson and gold,
   cards with a soft bevel, headings in bronze, gold scroll bars, the frame's two lower gold corners. As strong as css/sq.css's rules
   (:where) and after them; a window's own rules still win. */
:where(html.sq-on) #sq .win { scrollbar-color: #b39556 rgba(53, 37, 24, 0.08); }
:where(html.sq-on) #sq .win::after { content: ""; position: absolute; left: 3px; right: 3px; bottom: 3px; height: 14px; pointer-events: none; z-index: 5; opacity: 0.85;
  background: var(--sk-orn-bl) left bottom / 14px 14px no-repeat, var(--sk-orn-br) right bottom / 14px 14px no-repeat; }
:where(html.sq-on) #sq .win.folded::after { display: none; }

/* ---- an item's cell and a slot: a dark well ---- */
:where(html.sq-on) #sq .sl, :where(html.sq-on) #sq .slot { background-color: #20140a; border-radius: 3px;
  box-shadow: inset 0 0 0 1px #100a05, inset 0 0 0 2px rgba(168, 132, 63, 0.75), inset 0 -8px 12px rgba(0, 0, 0, 0.45); }
:where(html.sq-on) #sq .sl.on { background-color: #2a1b0f; box-shadow: inset 0 0 0 1px #100a05, inset 0 0 0 2px var(--sk-gold), inset 0 -8px 12px rgba(0, 0, 0, 0.35); }
:where(html.sq-on) #sq .sl.pk:not(.cdpic), :where(html.sq-on) #sq .slot.pk { box-shadow: inset 0 0 0 1px #100a05, inset 0 0 0 2.5px var(--sk-gold-hi), 0 0 0 1px #100a05, 0 0 10px rgba(244, 226, 173, 0.5); }
:where(html.sq-on) #sq button.sl:hover, :where(html.sq-on) #sq .sl[data-k]:hover, :where(html.sq-on) #sq .slot[data-key]:hover { box-shadow: inset 0 0 0 1px #100a05, inset 0 0 0 2px var(--sk-gold-hi), inset 0 -8px 12px rgba(0, 0, 0, 0.35), 0 0 8px rgba(244, 226, 173, 0.35); }
:where(html.sq-on) #sq .sl > .c { color: #fff6df; text-shadow: 0 1px 1px #000, 0 0 2px #000, 0 0 3px #000; }
:where(html.sq-on) #sq .sl > .rf { color: #ffb35c; text-shadow: 0 1px 1px #000, 0 0 2px #000; }
:where(html.sq-on) #sq .sl > img.h, :where(html.sq-on) #sq .slot > img.e { opacity: 0.45; }
:where(html.sq-on) #sq .slot > b { background: linear-gradient(180deg, #66442a, #322013); color: var(--sk-gold-hi); box-shadow: 0 0 0 1px #100a05; }
:where(html.sq-on) #sq .sl > .g { left: 4px; right: 4px; bottom: 2px; height: 2px; border-radius: 1px; }
/* (the card's own picture keeps its rarity rim: after the rules above) */
:where(html.sq-on) #sq .sl.cdpic { background-color: #20140a; box-shadow: inset 0 0 0 1px #100a05, inset 0 0 0 2px var(--rc, #a8843f), inset 0 0 14px color-mix(in srgb, var(--rc, #a8843f) 35%, transparent), 0 2px 6px rgba(5, 3, 8, 0.35); }

/* ---- bars: a dark track in a gold rim, an old-gold fill (a window's own colour, inline, still wins) ---- */
:where(html.sq-on) #sq .br { border-radius: 2px; background: linear-gradient(180deg, #0c0703, #2a1b0f); box-shadow: 0 0 0 1px #100a05, 0 0 0 2px rgba(138, 106, 46, 0.85); }
:where(html.sq-on) #sq .br > i { border-radius: 1px; background: var(--sk-xp); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35); }
:where(html.sq-on) #sq .ln > .br { box-shadow: none; background: rgba(53, 37, 24, 0.15); }

/* ---- tables: small bronze heads, a warm hover, the picked and the hero's own rows ---- */
:where(html.sq-on) #sq .gt th, :where(html.sq-on) #sq .tbl th { color: #8a6a2e; font-weight: 700; letter-spacing: 0.03em; border-bottom: 1px solid var(--sk-gold-mid); }
:where(html.sq-on) #sq .gt tr:hover td { background: rgba(201, 164, 90, 0.08); }
:where(html.sq-on) #sq .gt tr.pk td { background: #fbf1dc; }
:where(html.sq-on) #sq .gt tr.me td { background: #f8e9c4; }

/* ---- switches, checks, radios: crimson and gold ---- */
:where(html.sq-on) #sq .sw { border-radius: 7px; background: #d8ccb2; box-shadow: inset 0 0 0 1px #b9a684, inset 0 1px 2px rgba(0, 0, 0, 0.2); }
:where(html.sq-on) #sq .sw > i { border-radius: 50%; background: linear-gradient(180deg, #ffffff, #e8dfcd); box-shadow: 0 0 0 1px #8a6a2e, 0 1px 1px rgba(0, 0, 0, 0.3); }
:where(html.sq-on) #sq .sw.on { background: linear-gradient(180deg, #c64459, #8a1529); box-shadow: inset 0 0 0 1px #5a0d1b; }
:where(html.sq-on) #sq .sw.on > i { background: var(--sk-primary); box-shadow: 0 0 0 1px #6b4d17, 0 1px 1px rgba(0, 0, 0, 0.35); }
:where(html.sq-on) #sq .ck { border-radius: 2px; background: #fbf8f1; box-shadow: inset 0 0 0 1px var(--sk-bronze); }
:where(html.sq-on) #sq .ck.on { background: linear-gradient(180deg, #c64459, #8a1529); box-shadow: inset 0 0 0 1px var(--sk-gold); }

/* ---- cards, tiles, rows ---- */
:where(html.sq-on) #sq .box, :where(html.sq-on) #sq .qc, :where(html.sq-on) #sq .pc, :where(html.sq-on) #sq .st, :where(html.sq-on) #sq .mo {
  border-radius: 2px; background-color: #fbf8f1; background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0) 40%);
  box-shadow: inset 0 0 0 1px #dccfb3, 0 1px 0 rgba(255, 255, 255, 0.7); }
:where(html.sq-on) #sq .pc.me { background-color: #fbf1dc; box-shadow: inset 0 0 0 1.5px var(--sk-gold-mid); }
:where(html.sq-on) #sq .dy.next { box-shadow: inset 0 0 0 2px var(--sk-gold); background: #fffaf0; }
:where(html.sq-on) #sq .dy.got { background: #eef3e6; box-shadow: inset 0 0 0 1px #c3d6b6; }
:where(html.sq-on) #sq .mb:hover, :where(html.sq-on) #sq .cl:hover, :where(html.sq-on) #sq .it:hover, :where(html.sq-on) #sq .nv:hover:not(.on), :where(html.sq-on) #sq .lt:hover:not(.on) { background-color: rgba(201, 164, 90, 0.09); }
:where(html.sq-on) #sq .ln { border-radius: 2px; background: linear-gradient(90deg, #efe3c8, #f6f0e3 70%); box-shadow: inset 0 0 0 1px #dccfb3, inset 3px 0 0 var(--sk-gold-mid); }
:where(html.sq-on) #sq .hd { color: #8a6a2e; font-weight: 700; letter-spacing: 0.03em; }
:where(html.sq-on) #sq .op > i { background: var(--sk-gold); }
:where(html.sq-on) #sq .sc { color: var(--sk-ink-paper); }
:where(html.sq-on) #sq .kbd { border-radius: 2px; background: linear-gradient(180deg, #fffdf8, #ece3d0); box-shadow: inset 0 0 0 1px var(--sk-bronze), 0 1px 0 var(--sk-bronze); }
:where(html.sq-on) #sq .full { background: var(--sk-ink-paper); color: var(--sk-gold-hi); }
:where(html.sq-on) #sq .win input:focus, :where(html.sq-on) #sq .win textarea:focus, :where(html.sq-on) #sq .win select:focus { outline: none; box-shadow: inset 0 0 0 1px var(--sk-gold-mid), 0 0 0 2px rgba(210, 173, 98, 0.28) !important; }
/* (the bag's expansion card, js/gearbag.js gearExpandCard drawn in the kit's frame: its words were the old dark card's light ones) */
html.sq-on #sq [data-sq="bagmore"] .iv-set .h { color: #8a6a2e; font-weight: 700; }
html.sq-on #sq [data-sq="bagmore"] .iv-set > div:not(.h) { color: var(--sk-ink-paper); }
html.sq-on #sq [data-sq="bagmore"] .iv-set > div.on { color: #8a6a2e; background: #fbf1dc; }
html.sq-on #sq [data-sq="bagmore"] .iv-hint { color: var(--sk-muted-paper); }

/* =====================================================================================================================================
   TAVERNA DE MADEIRA — the remake, the owner's pick B of 1 Dec 2026 of the three Codex drew (docs/arte/concept/remake-*.webp): carved
   dark walnut with brass corner plates and rivets, warm parchment, red lacquer for what matters. The painted pieces are Codex's kit
   (assets/ui/tavern/, cut by tools/tavern-kit.py) stretched as 9-slice frames; the colours above moved from plum to walnut
   (tools/tavern-palette.mjs). This block comes last and wins over the dark-fantasy one where they differ.
   ===================================================================================================================================== */
html.sq-on {
  --tv-wood: url("/assets/ui/tavern/tex-wood.webp");
  --tv-parch: url("/assets/ui/tavern/tex-parchment.webp");
  --tv-plate: url("/assets/ui/tavern/plate.webp") 28 fill / 9px / 0 stretch;
  --tv-slot: url("/assets/ui/tavern/slot.webp") 34 / 5px / 0 stretch;
  --tv-brass-ring: inset 0 0 0 1px #d8ab55, inset 0 0 0 2px rgba(40, 22, 10, 0.55), 0 0 0 1px #24130a, 0 2px 3px rgba(0, 0, 0, 0.35);
  --sk-plate: linear-gradient(180deg, rgba(255, 225, 170, 0.06), rgba(0, 0, 0, 0.22)), url("/assets/ui/tavern/tex-wood.webp") 0 0 / 256px, #3b2416;
  --sk-plate-solid: linear-gradient(180deg, rgba(255, 225, 170, 0.06), rgba(0, 0, 0, 0.25)), url("/assets/ui/tavern/tex-wood.webp") 0 0 / 256px, #34200f;
  --sk-plate-frame: inset 0 0 0 1px #c99a4a, inset 0 0 0 2px rgba(30, 16, 6, 0.6), 0 0 0 1px #1d0f06, 0 4px 10px rgba(0, 0, 0, 0.45);
  --sk-frame: 0 14px 32px rgba(0, 0, 0, 0.55);
  --sk-paper: #f2e3c2; --sk-paper-2: #ead8b2; --sk-paper-3: #e0cba0; --sk-paper-line: #c7ab78; --sk-bronze: #a57d42;
  --sk-ink-paper: #3a2414; --sk-muted-paper: #6e5638;
  --sk-gold-hi: #f6dc94; --sk-gold: #d6a84e; --sk-gold-mid: #b0823a; --sk-gold-lo: #6e4b1c;
}

/* ---- a window: the walnut frame around it (drawn outside its box: its layout is untouched), parchment inside, a wood title bar ---- */
:where(html.sq-on) #sq .win { background: #efdfbd var(--tv-parch) 0 0 / 360px; border: 0 solid transparent;
  border-image: url("/assets/ui/tavern/frame.webp") 54 / 17px / 13px stretch; box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55); color: var(--sk-ink-paper); }
:where(html.sq-on) #sq .win::after { display: none; }
:where(html.sq-on) #sq .tb { background: linear-gradient(180deg, rgba(255, 225, 170, 0.1), rgba(0, 0, 0, 0.28)), var(--tv-wood) 0 0 / 256px, #3a2314;
  border-bottom: 2px solid #1d0f06; box-shadow: inset 0 -1px 0 #c99a4a, inset 0 1px 0 rgba(255, 230, 180, 0.12); color: #f6e2b2; text-shadow: 0 1px 0 #000, 0 0 6px rgba(0, 0, 0, 0.7); }
:where(html.sq-on) #sq .tb > .sub { color: #dcc396; }
:where(html.sq-on) #sq .wb { border-radius: 50%; background: url("/assets/ui/tavern/round.webp") center / 100% 100% no-repeat; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); }
:where(html.sq-on) #sq .wb:hover { filter: brightness(1.15); background: url("/assets/ui/tavern/round.webp") center / 100% 100% no-repeat; }
:where(html.sq-on) #sq .wb[data-sqb="close"], :where(html.sq-on) #sq .wb[aria-label="ปิด"] { background: url("/assets/ui/tavern/attack.webp") center / 100% 100% no-repeat; }
:where(html.sq-on) #sq .wb > img { filter: brightness(0) invert(0.95) drop-shadow(0 1px 1px rgba(0, 0, 0, 0.8)); }
:where(html.sq-on) #sq .tb .kb, :where(html.sq-on) #sq .kb { border-radius: 3px; background: linear-gradient(180deg, #f3d98c, #b88a36); color: #2b1606; box-shadow: 0 0 0 1px #3a220e; }

/* ---- buttons: wood with a brass trim; the primary one polished brass ---- */
:where(html.sq-on) #sq .bt { border-radius: 5px; background: linear-gradient(180deg, rgba(255, 225, 170, 0.16), rgba(0, 0, 0, 0.2)), var(--tv-wood) 0 0 / 220px, #5a3a22;
  box-shadow: var(--tv-brass-ring); color: #f7e8c8; text-shadow: 0 1px 1px rgba(0, 0, 0, 0.7); }
:where(html.sq-on) #sq .bt:hover:not(:disabled):not(.away) { background: linear-gradient(180deg, rgba(255, 225, 170, 0.26), rgba(0, 0, 0, 0.12)), var(--tv-wood) 0 0 / 220px, #6a4628; }
:where(html.sq-on) #sq .bt.pr { background: linear-gradient(180deg, #f8e3a0 0%, #d9ac50 48%, #a97b2c 100%); color: #2b1606; text-shadow: 0 1px 0 rgba(255, 240, 200, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 0 0 1px #8a5f1c, 0 0 0 1px #24130a, 0 2px 3px rgba(0, 0, 0, 0.35); }
:where(html.sq-on) #sq .bt.pr:hover:not(:disabled):not(.away) { background: linear-gradient(180deg, #fff0b8 0%, #e6bb5e 48%, #b78832 100%); }
:where(html.sq-on) #sq .bt.in { background: linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.3)), var(--tv-wood) 0 0 / 220px, #3a2314; color: var(--sk-gold-hi); box-shadow: inset 0 0 0 2px #e2b65c, 0 0 0 1px #24130a; }
:where(html.sq-on) #sq .bt:disabled, :where(html.sq-on) #sq .bt.away, :where(html.sq-on) #sq .bt.pr:disabled, :where(html.sq-on) #sq .bt.pr.away {
  background: linear-gradient(180deg, #a89276, #8a7558); color: #e5d8bf; text-shadow: none; box-shadow: inset 0 0 0 1px #6e5a40, 0 0 0 1px #4a3b28; opacity: 0.8; }
/* (a red word on a wood button: lighter so it reads) */
:where(html.sq-on) #sq .bt[style*="#c7334a"], :where(html.sq-on) #sq .bt[style*="#9e1b31"] { color: #ffb4b4 !important; }

/* ---- tabs: wooden tabs on the parchment, the open one lit with a brass top ---- */
:where(html.sq-on) #sq .tabs { background: linear-gradient(180deg, rgba(110, 75, 28, 0.18), rgba(110, 75, 28, 0.05)); border-bottom: 2px solid #8a5f2a; }
:where(html.sq-on) #sq .tab { border-radius: 6px 6px 0 0; background: linear-gradient(180deg, rgba(255, 225, 170, 0.12), rgba(0, 0, 0, 0.25)), var(--tv-wood) 0 0 / 220px, #4a2e1a;
  color: #dcc396; box-shadow: inset 0 1px 0 rgba(216, 171, 85, 0.55), inset 1px 0 0 rgba(216, 171, 85, 0.3), inset -1px 0 0 rgba(216, 171, 85, 0.3); text-shadow: 0 1px 1px #000; }
:where(html.sq-on) #sq .tab.on { background: linear-gradient(180deg, rgba(255, 225, 170, 0.28), rgba(0, 0, 0, 0.1)), var(--tv-wood) 0 0 / 220px, #6a4628; color: #fbe6b0;
  box-shadow: inset 0 2px 0 #e9bf62, inset 1px 0 0 #c99a4a, inset -1px 0 0 #c99a4a; }
:where(html.sq-on) #sq .tab > b { background: #2a170b; color: var(--sk-gold-hi); }
:where(html.sq-on) #sq .tab.on > b { background: #9e1b31; color: #fff; }

/* ---- an item's cell: a recessed wooden cell with a brass trim ---- */
:where(html.sq-on) #sq .sl, :where(html.sq-on) #sq .slot { border: 0 solid transparent; border-image: var(--tv-slot); background-color: #2a170c; border-radius: 0;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.65); }
:where(html.sq-on) #sq .sl.on { background-color: #3a2212; box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.5), 0 0 0 1px #e2b65c; }
:where(html.sq-on) #sq .sl.pk:not(.cdpic), :where(html.sq-on) #sq .slot.pk { box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5), 0 0 0 2px #f6d27a, 0 0 12px rgba(246, 210, 122, 0.7); }
:where(html.sq-on) #sq button.sl:hover, :where(html.sq-on) #sq .sl[data-k]:hover, :where(html.sq-on) #sq .slot[data-key]:hover { box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.45), 0 0 0 1px #f6d27a, 0 0 10px rgba(246, 210, 122, 0.5); }
:where(html.sq-on) #sq .sl.cdpic { border-image: var(--tv-slot); border-image-width: 7px; box-shadow: inset 0 0 18px color-mix(in srgb, var(--rc, #000) 55%, transparent), 0 2px 6px rgba(0, 0, 0, 0.35); }
/* (a piece's rarity: a glow inside its cell, the line under it) */
html.sq-on #sq [data-sq="bag"] .bag-grid .sl[style*="--rc"]:not(.pk):not(:hover), html.sq-on #sq [data-sq="equip"] .eq-stage .sl[style*="--rc"]:not(:hover) {
  box-shadow: inset 0 0 14px color-mix(in srgb, var(--rc) 60%, transparent), inset 0 0 4px rgba(0, 0, 0, 0.5); }
html.sq-on #sq [data-sq="equip"] .eq-stage .sl, html.sq-on #sq [data-sq="bag"] .bag-grid .sl { background-color: #2a170c; }
html.sq-on #sq [data-sq="bag"] .bag-grid span.sl:not([data-k]) { background-color: #24140a; box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.6); opacity: 0.85; }

/* ---- the dark panels inside windows: walnut planks in a framed plate ---- */
html.sq-on #sq [data-sq="equip"] .eq-stage { border: 0 solid transparent; border-image: url("/assets/ui/tavern/plate.webp") 28 / 9px / 0 stretch;
  background: radial-gradient(ellipse 170px 130px at 50% 44%, rgba(255, 190, 110, 0.22), rgba(255, 190, 110, 0) 70%), linear-gradient(rgba(0, 0, 0, 0.32), rgba(0, 0, 0, 0.32)), var(--tv-wood) 0 0 / 300px, #2a170c;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.55); }
html.sq-on #sq [data-sq="equip"] .eq-ped { background: radial-gradient(ellipse at 50% 40%, rgba(255, 220, 150, 0.38), rgba(214, 168, 78, 0.12) 50%, rgba(0, 0, 0, 0.4) 72%); box-shadow: inset 0 0 0 1px rgba(214, 168, 78, 0.55), inset 0 -3px 6px rgba(0, 0, 0, 0.5), 0 6px 14px rgba(0, 0, 0, 0.55); }
html.sq-on #sq [data-sq="bag"] .bag-rail { background: linear-gradient(90deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.15)), var(--tv-wood) 0 0 / 260px, #2a170c; box-shadow: inset -2px 0 0 #b0823a, inset -3px 0 0 #1d0f06; }
html.sq-on #sq [data-sq="bag"] .bag-rail .vt.on { background: linear-gradient(90deg, rgba(158, 27, 49, 0.45), rgba(158, 27, 49, 0.1)); box-shadow: inset 3px 0 0 #e2b65c; }
html.sq-on #sq [data-sq="bag"] .bag-grid { border: 0 solid transparent; border-image: url("/assets/ui/tavern/plate.webp") 28 / 8px / 0 stretch; border-radius: 0;
  background: linear-gradient(rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0.38)), var(--tv-wood) 0 0 / 300px, #2a170c; box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.6); scrollbar-color: #c99a4a #2a170c; }
html.sq-on #sq [data-sq="status"] .st-attr { border: 0 solid transparent; border-image: url("/assets/ui/tavern/plate.webp") 28 / 9px / 0 stretch;
  background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), var(--tv-wood) 0 0 / 300px, #2a170c; box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5); }
html.sq-on #sq [data-sq="skill"] .sk-book { background: linear-gradient(rgba(0, 0, 0, 0.36), rgba(0, 0, 0, 0.36)), var(--tv-wood) 0 0 / 320px, #2a170c; box-shadow: inset 0 0 26px rgba(0, 0, 0, 0.6); }
html.sq-on #sq [data-sq="skill"] > .ft .slot { border-image: var(--tv-slot); background-color: #2a170c; box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.6); }

/* ---- cards and boxes on the parchment: a lighter sheet with an inked edge ---- */
:where(html.sq-on) #sq .box, :where(html.sq-on) #sq .qc, :where(html.sq-on) #sq .pc, :where(html.sq-on) #sq .st, :where(html.sq-on) #sq .mo, :where(html.sq-on) #sq .cv {
  background-color: rgba(255, 248, 230, 0.55); background-image: none; box-shadow: inset 0 0 0 1px rgba(140, 100, 50, 0.45), 0 1px 0 rgba(255, 255, 255, 0.4); }
:where(html.sq-on) #sq .ft { background: linear-gradient(180deg, rgba(110, 75, 28, 0.1), rgba(110, 75, 28, 0.22)); border-top: 1px solid rgba(138, 95, 42, 0.6); }
html.sq-on #sq [data-sq="equip"] .eqst { background: rgba(255, 248, 230, 0.6); box-shadow: inset 0 0 0 1px rgba(140, 100, 50, 0.5); }
html.sq-on #sq [data-sq="status"] .st-cells .cv { background: rgba(255, 248, 230, 0.6); box-shadow: inset 0 0 0 1px rgba(140, 100, 50, 0.45); }

/* ================================ the HUD in the tavern's wood ================================ */
html.sq-on #sq .hud .uf-plate { border: 0 solid transparent; border-image: var(--tv-plate); background: none; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45); border-radius: 0; }
html.sq-on #sq .hud .uf { left: 3px; top: 3px; width: 72px; height: 72px; padding: 0; background: none; box-shadow: none; }
html.sq-on #sq .hud .uf::after { content: ""; position: absolute; inset: 0; background: url("/assets/ui/tavern/ring.webp") center / 100% 100% no-repeat; pointer-events: none; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6)); }
html.sq-on #sq .hud .uf-face { position: absolute; left: 9px; top: 9px; width: 54px; height: 54px; background: radial-gradient(circle at 50% 35%, #6a4628, #2a170c); box-shadow: none; }
html.sq-on #sq .hud .uf-face > canvas { left: 0; top: 0; width: 54px; height: 54px; }
html.sq-on #sq .hud .uf-lv { z-index: 2; bottom: -5px; }
html.sq-on #sq .hud .qb { border: 0 solid transparent; border-image: url("/assets/ui/tavern/bar.webp") 30 56 / 5px 9px / 4px 7px stretch; box-shadow: none; background: #1a0d05; }
html.sq-on #sq .hud .qs { border: 0 solid transparent; border-image: var(--tv-slot); border-radius: 0; background: #2a170c; box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.6); }
html.sq-on #sq .hud .qs:hover { box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.45), 0 0 0 1px #f6d27a, 0 0 10px rgba(246, 210, 122, 0.5); }
html.sq-on #sq .hud .qs.lit { box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.4), 0 0 0 2px #f6d27a, 0 0 10px rgba(246, 210, 122, 0.6); }
html.sq-on #sq .hud .qs > i { background: linear-gradient(180deg, #f3d98c, #b88a36); color: #2b1606; box-shadow: 0 0 0 1px #3a220e; }
html.sq-on #sq .hud .qs[data-a="attack"], html.sq-on #sq .hud .qs[data-a="rest"], html.sq-on #sq .hud .qs[data-a="dash"], html.sq-on #sq .hud .ufw .qs {
  border-image: none; border-radius: 50%; background: url("/assets/ui/tavern/round.webp") center / 100% 100% no-repeat; box-shadow: 0 3px 6px rgba(0, 0, 0, 0.5); }
html.sq-on #sq .hud .qs[data-a="attack"] { background-image: url("/assets/ui/tavern/attack.webp"); }
html.sq-on #sq .hud .qs[data-a="attack"]:hover, html.sq-on #sq .hud .qs[data-a="rest"]:hover, html.sq-on #sq .hud .qs[data-a="dash"]:hover { filter: brightness(1.12); box-shadow: 0 3px 6px rgba(0, 0, 0, 0.5), 0 0 14px rgba(246, 210, 122, 0.45); }
html.sq-on #sq .hud .ab-tray { border: 0 solid transparent; border-image: var(--tv-plate); background: none; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45); border-radius: 0; }
html.sq-on #sq .hud .ab-tray::before, html.sq-on #sq .hud .ab-tray::after { display: none; }
html.sq-on #sq .hud .mi.mt { border: 0 solid transparent; border-image: var(--tv-plate); border-radius: 0; background: none; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.45); }
html.sq-on #sq .hud .mi.mt:hover { filter: brightness(1.15); }
html.sq-on #sq .hud .mi.mt.on { filter: brightness(1.2); box-shadow: 0 0 0 1px #f6d27a, 0 0 12px rgba(246, 210, 122, 0.5); }
html.sq-on #sq .hud .mi.mt.pj-cell { border-image: url("/assets/ui/tavern/btnpr.webp") 48 fill / 9px / 0 stretch; background: none; }
html.sq-on #sq .hud .mp { border: 0 solid transparent; border-image: url("/assets/ui/tavern/frame.webp") 54 / 15px / 11px stretch; background: var(--sk-plate-solid); }
html.sq-on #sq .hud .ay { border: 0 solid transparent; border-image: url("/assets/ui/tavern/btnpr.webp") 48 fill / 8px / 0 stretch; border-radius: 0; background: none; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.45); color: #2b1606; }
html.sq-on #sq .hud .ay.on { border-image: url("/assets/ui/tavern/btn.webp") 48 fill / 8px / 0 stretch; background: none; color: #fbe6b0; box-shadow: 0 0 12px rgba(246, 210, 122, 0.55); }
html.sq-on #sq .hud .wk:not(.open), html.sq-on #sq .hud .cwp, html.sq-on #sq .hud [data-f="zl"] { border: 0 solid transparent; border-image: var(--tv-plate); background: none; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4); border-radius: 0; }
html.sq-on #sq .hud .wk.open { border: 0 solid transparent; border-image: url("/assets/ui/tavern/frame.webp") 54 / 15px / 11px stretch; background: var(--sk-plate-solid); }
html.sq-on #sq .hud .mp > .tb, html.sq-on #sq .hud .wk.open > .tb { background: linear-gradient(180deg, rgba(255, 225, 170, 0.1), rgba(0, 0, 0, 0.28)), var(--tv-wood) 0 0 / 256px, #3a2314; }
html.sq-on #sq .hud .cwt { background: linear-gradient(180deg, rgba(255, 225, 170, 0.1), rgba(0, 0, 0, 0.3)), var(--tv-wood) 0 0 / 220px, #3a2314; }
html.sq-on #sq .hud .cwt.on { background: linear-gradient(180deg, rgba(255, 225, 170, 0.28), rgba(0, 0, 0, 0.1)), var(--tv-wood) 0 0 / 220px, #6a4628; box-shadow: inset 0 2px 0 #e9bf62, inset 1px 0 0 #c99a4a, inset -1px 0 0 #c99a4a; }
html.sq-on #sq .hud .chb { background: url("/assets/ui/tavern/tex-wood.webp") 0 0 / 160px, #3a2314; box-shadow: inset 0 0 0 1px #c99a4a, 0 0 0 1px #1d0f06; }
/* (the round map: the wooden ring over its edge, a little past its box; the map's picture cut round by itself) */
html.sq-on #sq .hud .mm { overflow: visible !important; border-radius: 50%; background: #1a0d05; box-shadow: none; }
html.sq-on #sq .hud .mm:hover { box-shadow: 0 0 14px rgba(246, 210, 122, 0.45); }
html.sq-on #sq .hud .mm > canvas { clip-path: circle(64px at 86px 86px); }
html.sq-on #sq .hud .mm::after { content: ""; position: absolute; inset: -14px; background: url("/assets/ui/tavern/ring.webp") center / 100% 100% no-repeat; pointer-events: none; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.6)); }

/* ---- the thumb's own buttons (#mb, css/sq-touch.css): round wood and the red lacquer attack ---- */
html.mob.sq-on #mb .mb-attack { background: url("/assets/ui/tavern/attack.webp") center / 100% 100% no-repeat !important; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.55) !important; }
html.mob.sq-on #mb #mb-skills .hslot, html.mob.sq-on #mb #mb-items .hslot.item, html.mob.sq-on #mb .mb-page, html.mob.sq-on #hs-dash.hslot, html.mob.sq-on .hslot.blart {
  background: url("/assets/ui/tavern/round.webp") center / 100% 100% no-repeat !important; box-shadow: 0 3px 6px rgba(0, 0, 0, 0.5) !important; }
html.mob.sq-on #mb #mb-skills .hslot img, html.mob.sq-on #hs-dash.hslot img, html.mob.sq-on .hslot.blart img { left: 14% !important; top: 14% !important; width: 72% !important; height: 72% !important; }
html.mob.sq-on #mb .mb-stick { background: url("/assets/ui/tavern/ring.webp") center / 100% 100% no-repeat, radial-gradient(circle, rgba(42, 23, 12, 0.35) 55%, rgba(42, 23, 12, 0) 72%) !important; box-shadow: none !important; opacity: 0.92; }
html.mob.sq-on #mb .mb-act { border: 0 solid transparent !important; border-image: url("/assets/ui/tavern/btnpr.webp") 48 fill / 10px / 0 stretch !important; background: none !important; box-shadow: 0 3px 6px rgba(0, 0, 0, 0.5) !important; }
@media (max-height: 360px) and (orientation: landscape) { html.mob.sq-on #sq .hud .mm > canvas { clip-path: circle(50px at 67px 67px); } html.mob.sq-on #sq .hud .mm::after { inset: -11px; } }
html.sq-on #sq [data-sq="equip"] [data-f="sum"], html.sq-on #sq [data-sq="equip"] [data-f="fash"] { background: rgba(110, 75, 28, 0.08); border-top-color: rgba(138, 95, 42, 0.45) !important; }
/* (two windows' own tabs, js/sq/petopt.js .po-tab: the tavern's wooden tabs; a "gold" tab's words light on the wood, js/sq/skill.js) */
html.sq-on #sq .po-tab { border-radius: 6px 6px 0 0; background: linear-gradient(180deg, rgba(255, 225, 170, 0.12), rgba(0, 0, 0, 0.25)), var(--tv-wood) 0 0 / 220px, #4a2e1a; color: #dcc396; text-shadow: 0 1px 1px #000; box-shadow: inset 0 1px 0 rgba(216, 171, 85, 0.55); }
html.sq-on #sq .po-tab.po-on { background: linear-gradient(180deg, rgba(255, 225, 170, 0.28), rgba(0, 0, 0, 0.1)), var(--tv-wood) 0 0 / 220px, #6a4628; color: #fbe6b0; box-shadow: inset 0 2px 0 #e9bf62; }
:where(html.sq-on) #sq .tab.gold, :where(html.sq-on) #sq .tab[style*="#a86400"] { color: #ffd27a !important; }

/* =====================================================================================================================================
   IMPACT and CINEMA — the owner of 1 Dec 2026, after the tavern remake: "quero um visual uau", both the impact pack and the cinematic
   entry screens. One-shot animations in the game (a window's pop, a level's plaque, a ready skill's flash); the only looping ones are
   a rare piece's light (in its open window only) and the entry screens' ambience (gone with those screens). Transforms and opacity.
   ===================================================================================================================================== */
@keyframes sq-pop { 0% { opacity: 0; transform: translateY(10px) scale(0.965); } 60% { opacity: 1; transform: translateY(-1px) scale(1.006); } 100% { opacity: 1; transform: none; } }
:where(html.sq-on) #sq > .win.sq-pop { animation: sq-pop 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.2) both; }
@media (prefers-reduced-motion: reduce) { :where(html.sq-on) #sq > .win.sq-pop { animation: none; } }

/* ---- an epic or legend piece: a light sweeps over its cell every few seconds ---- */
@keyframes sq-shine { 0%, 72% { transform: translateX(-130%) skewX(-18deg); } 100% { transform: translateX(230%) skewX(-18deg); } }
:where(html.sq-on) #sq .sl.rhi { overflow: hidden; }
:where(html.sq-on) #sq .sl.rhi::before { content: ""; position: absolute; top: -10%; bottom: -10%; left: 0; width: 45%; pointer-events: none; z-index: 1;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 246, 214, 0.55), rgba(255, 255, 255, 0)); animation: sq-shine 3.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { :where(html.sq-on) #sq .sl.rhi::before { animation: none; display: none; } }

/* ---- a level up: gold rays, a burst of sparks, a wooden plaque that drops in and goes ---- */
html.sq-on #sq .hud .lvup { position: absolute; left: 50%; top: 150px; width: 0; height: 0; pointer-events: none; z-index: 6; }
@keyframes lvup-rays { 0% { opacity: 0; transform: translate(-50%, -50%) scale(0.4) rotate(0deg); } 20% { opacity: 0.95; } 80% { opacity: 0.7; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.25) rotate(40deg); } }
html.sq-on #sq .hud .lvup-rays { position: absolute; left: 0; top: 0; width: 520px; height: 520px; border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(255, 214, 120, 0.42) 0deg 7deg, rgba(255, 214, 120, 0) 7deg 22deg);
  -webkit-mask-image: radial-gradient(circle, #000 18%, rgba(0, 0, 0, 0) 66%); mask-image: radial-gradient(circle, #000 18%, rgba(0, 0, 0, 0) 66%);
  animation: lvup-rays 2.9s ease-out both; }
html.sq-on #sq .hud .lvup.job .lvup-rays { background: repeating-conic-gradient(from 0deg, rgba(150, 230, 170, 0.4) 0deg 7deg, rgba(150, 230, 170, 0) 7deg 22deg); }
@keyframes lvup-plaque { 0% { opacity: 0; transform: translate(-50%, -80%) scale(0.6); } 14% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); } 22% { transform: translate(-50%, -50%) scale(1); } 82% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -40%) scale(0.96); } }
html.sq-on #sq .hud .lvup-plaque { position: absolute; left: 0; top: 0; min-width: 300px; padding: 14px 40px 12px; box-sizing: border-box; text-align: center;
  background: url("/assets/ui/tavern/plaque.webp") center / 100% 100% no-repeat; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.6)); animation: lvup-plaque 3s ease-out both; }
html.sq-on #sq .hud .lvup-plaque > b { display: block; font-family: var(--sk-font-title); font-weight: 700; font-size: 30px; line-height: 1.05; letter-spacing: 0.03em; white-space: nowrap;
  color: #ffe6a0; text-shadow: 0 2px 0 #3a1d08, 0 0 14px rgba(255, 200, 90, 0.75), 0 0 2px #000; }
html.sq-on #sq .hud .lvup-plaque > span { display: block; margin-top: 2px; font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 18px; color: #fff4d6; text-shadow: 0 1px 2px #000; }
html.sq-on #sq .hud .lvup.job .lvup-plaque > b { color: #c9f5cf; text-shadow: 0 2px 0 #12301a, 0 0 14px rgba(120, 230, 150, 0.7), 0 0 2px #000; }
@keyframes lvup-spark { 0% { opacity: 0; transform: translate(0, 0) scale(0.4); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1); } }
html.sq-on #sq .hud .lvup-sp > i { position: absolute; left: -4px; top: -4px; width: 8px; height: 8px; border-radius: 50%;
  background: radial-gradient(circle, #fff8d8, #ffcc55 45%, rgba(255, 170, 40, 0) 70%); animation: lvup-spark 1.3s ease-out both; animation-delay: var(--dl); }
@media (prefers-reduced-motion: reduce) { html.sq-on #sq .hud .lvup-rays, html.sq-on #sq .hud .lvup-sp { display: none; } }

/* ---- the entry screens: embers rising from the fire, its light breathing, a vignette, the panels arriving, the logo floating ---- */
html.sq-on #sq .pg-amb { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
@keyframes pg-glow { 0%, 100% { opacity: 0.55; } 30% { opacity: 0.8; } 55% { opacity: 0.6; } 75% { opacity: 0.9; } }
html.sq-on #sq .pg-amb > .pg-glow { position: absolute; left: 0; right: 0; bottom: 0; height: 60%;
  background: radial-gradient(ellipse 60% 70% at 32% 100%, rgba(255, 140, 40, 0.38), rgba(255, 110, 30, 0.12) 45%, rgba(255, 90, 20, 0) 70%); mix-blend-mode: screen; animation: pg-glow 3.2s ease-in-out infinite; }
html.sq-on #sq .pg-amb > .pg-vig { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 45%, rgba(0, 0, 0, 0) 55%, rgba(8, 4, 2, 0.55) 100%); }
@keyframes pg-ember { 0% { opacity: 0; transform: translate(0, 0) scale(1); } 10% { opacity: 1; } 70% { opacity: 0.8; } 100% { opacity: 0; transform: translate(var(--dx), -620px) scale(0.4); } }
html.sq-on #sq .pg-amb > .pg-em { position: absolute; left: var(--x); bottom: -10px; width: var(--s); height: var(--s); border-radius: 50%;
  background: radial-gradient(circle, #fff3c4, #ffb340 45%, rgba(255, 120, 30, 0) 72%); box-shadow: 0 0 6px rgba(255, 170, 60, 0.8);
  animation: pg-ember var(--t) linear infinite; animation-delay: var(--dl); }
@keyframes pg-in { 0% { opacity: 0; transform: translateY(16px); } 100% { opacity: 1; transform: none; } }
html.sq-on #sq .pg > .win:not([hidden]) { animation: pg-in 0.5s cubic-bezier(0.2, 0.9, 0.3, 1) both; }
html.sq-on #sq .pg > [data-p="bar"]:not([hidden]) { animation: pg-in 0.6s 0.1s cubic-bezier(0.2, 0.9, 0.3, 1) both; }
@keyframes pg-logo { 0%, 100% { transform: translateY(0); filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 0 rgba(255, 200, 90, 0)); }
  50% { transform: translateY(-5px); filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 14px rgba(255, 200, 90, 0.45)); } }
html.sq-on .ss-logo:not([hidden]), html.sq-on .cs-logo:not([hidden]) { animation: pg-logo 5s ease-in-out infinite; }
@keyframes pg-play { 0%, 100% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 0 0 1px #8a5f1c, 0 0 0 1px #24130a, 0 0 10px rgba(255, 200, 90, 0.35); }
  50% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 0 0 1px #8a5f1c, 0 0 0 1px #24130a, 0 0 22px rgba(255, 200, 90, 0.75); } }
html.sq-on #sq .pg [data-p="bar"] .bt.pr, html.sq-on #sq .pg [data-p="server"] .bt.pr { animation: pg-play 2.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { html.sq-on #sq .pg-amb > .pg-em, html.sq-on #sq .pg-amb > .pg-glow, html.sq-on .ss-logo, html.sq-on .cs-logo, html.sq-on #sq .pg .bt.pr { animation: none !important; } }

/* css/cinema.css */
/* cinema.css — the scenes of the story's key moments and their album (js/cinema.js): the painting, the two bars, the words in the
   tavern's walnut and brass; on a phone lying down the words are smaller and the painting keeps most of the screen. */
#cinema { position: fixed; inset: 0; z-index: 64; overflow: hidden; background: #05060f; cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; animation: cineIn .6s both; }
/* (the page's look puts its own Latin face on everything outside its windows, !important: thrice the id is stronger) */
#cinema#cinema#cinema, #cinema#cinema#cinema * { font-family: 'Noto Sans Thai', 'Baloo 2', sans-serif !important; }
#cinema, #cinema * { box-sizing: border-box; }
#cinema#cinema#cinema h2, #cinema#cinema#cinema .cap b { font-family: 'NC Display', 'Noto Sans Thai', serif !important; }
#cinema.off { pointer-events: none; opacity: 0; transition: opacity .5s; }
#cinema .pic { position: absolute; left: 50%; top: 50%; width: max(100vw, 177.78vh); height: max(56.25vw, 100vh); margin-left: calc(max(100vw, 177.78vh) / -2); margin-top: calc(max(56.25vw, 100vh) / -2); background: center / cover no-repeat; opacity: 0; will-change: transform; transition: opacity 1.1s; }
#cinema.on .pic { opacity: 1; }
#cinema.bare { background: radial-gradient(ellipse at 50% 40%, #2a2350, #07060f 75%); }
#cinema .veil { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(3, 4, 14, .5), transparent 20%, transparent 52%, rgba(3, 4, 14, .82)); }
#cinema .bar { position: absolute; left: 0; right: 0; height: 6.5vh; background: #05060f; transform: scaleY(0); transition: transform .9s .1s cubic-bezier(.2, .8, .2, 1); }
#cinema .bar.t { top: 0; transform-origin: top; }
#cinema .bar.b { bottom: 0; transform-origin: bottom; }
#cinema.go .bar { transform: none; }
#cinema h2 { position: absolute; left: 4vw; top: calc(6.5vh + 14px); margin: 0; font-weight: 800; font-size: clamp(24px, 4.6vh, 44px); line-height: 1.15; color: #ffe9b8; text-shadow: 0 2px 0 #2a170a, 0 0 18px rgba(255, 190, 90, .55); opacity: 0; }
#cinema.go h2 { animation: cineTitle 4.6s .5s both; }
#cinema .cap { position: absolute; left: 50%; bottom: 9.5vh; width: min(940px, 88vw); min-height: 84px; display: grid; align-items: center; transform: translateX(-50%); padding: 18px 28px 16px; background: linear-gradient(180deg, rgba(43, 26, 14, .93), rgba(27, 16, 8, .96)); box-shadow: inset 0 0 0 2px #d8b25e, inset 0 0 0 5px rgba(216, 178, 94, .18), 0 10px 40px rgba(0, 0, 0, .5); opacity: 0; }
#cinema .cap.in { animation: cineCap .45s both; }
#cinema .cap b { position: absolute; left: 22px; top: -17px; padding: 3px 18px; background: #57361d; box-shadow: inset 0 0 0 1.5px #d8b25e; color: #ffe9c4; font-weight: 700; font-size: 20px; line-height: 1.35; white-space: nowrap; }
#cinema .cap b[hidden] { display: none; }
#cinema .cap p { margin: 0; font-weight: 600; font-size: clamp(17px, 2.5vh, 23px); line-height: 1.45; color: #fff3dc; text-wrap: balance; }
#cinema .cap.told { background: linear-gradient(90deg, rgba(27, 16, 8, 0), rgba(27, 16, 8, .78) 18%, rgba(27, 16, 8, .78) 82%, rgba(27, 16, 8, 0)); box-shadow: none; text-align: center; }
#cinema .cap.told p { font-style: italic; color: #f7e8cb; text-shadow: 0 1px 4px rgba(0, 0, 0, .8); }
#cinema .dots { position: absolute; left: 0; right: 0; bottom: 4vh; display: flex; justify-content: center; gap: 8px; pointer-events: none; }
#cinema .dots i { width: 9px; height: 9px; transform: rotate(45deg); background: rgba(216, 178, 94, .18); box-shadow: inset 0 0 0 1.5px #b98f45; transition: background .3s; }
#cinema .dots i.on { background: #ffd873; }
#cinema .hint { position: absolute; right: 4vw; bottom: 3.4vh; font-weight: 700; font-size: 14px; color: #e7c98b; opacity: 0; transition: opacity .4s; pointer-events: none; }
#cinema.idle .hint { opacity: .85; animation: cineBlink 1.8s ease-in-out infinite; }
#cinema .tools { position: absolute; right: max(16px, env(safe-area-inset-right)); top: calc(6.5vh + 12px); display: flex; gap: 8px; }
#cinema .tools button { border: 0; cursor: pointer; min-height: 40px; padding: 4px 20px; background: rgba(20, 12, 6, .8); box-shadow: inset 0 0 0 1.5px #b98f45; color: #ffe9c4; font-weight: 700; font-size: 15px; }
#cinema .tools button:hover, #cinema .tools button:focus-visible { background: #57361d; outline: 0; box-shadow: inset 0 0 0 2px #ffd873; }
#cinema .tools .vo { padding: 0; width: 44px; display: grid; place-items: center; }
#cinema .tools .vo[hidden] { display: none; }
#cinema .tools .vo svg { width: 22px; height: 22px; }
#cinema .tools .vo.off { color: #a58d6c; }
html.cine-on #lgstrip, html.cine-on #sgcombo, html.cine-on #lgcall, html.cine-on #toast { visibility: hidden !important; }
@keyframes cineIn { from { opacity: 0; } }
@keyframes cineCap { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes cineTitle { 0% { opacity: 0; letter-spacing: .12em; } 16% { opacity: 1; letter-spacing: 0; } 78% { opacity: 1; } 100% { opacity: 0; } }
@keyframes cineBlink { 50% { opacity: .35; } }
/* a phone lying down (and any low screen) */
@media (max-height: 560px) {
  #cinema .bar { height: 4vh; }
  #cinema h2, #cinema .tools { top: calc(4vh + 8px); }
  #cinema h2 { font-size: 23px; left: max(18px, env(safe-area-inset-left)); }
  #cinema .cap { bottom: 8.5vh; min-height: 58px; padding: 15px 20px 12px; width: min(760px, 86vw); }
  #cinema .cap b { font-size: 16px; top: -15px; left: 16px; padding: 2px 14px; }
  #cinema .cap p { font-size: 16px; line-height: 1.38; }
  #cinema .dots { bottom: 2.6vh; }
  #cinema .dots i { width: 7px; height: 7px; }
  #cinema .hint { bottom: 1.6vh; font-size: 12.5px; }
}
/* a phone standing up: the painting across, the words under it */
@media (max-aspect-ratio: 1/1) {
  #cinema .cap { bottom: 12vh; width: 92vw; }
  #cinema .hint { right: 0; left: 0; text-align: center; bottom: 7vh; }
  #cinema h2 { right: 4vw; top: calc(6.5vh + 62px); text-align: center; }
}
@media (prefers-reduced-motion: reduce) { #cinema .cap.in, #cinema.go h2, #cinema.idle .hint { animation-duration: .01s; animation-iteration-count: 1; } }

/* the album */
#sq [data-sq="cinema"] .cn { background: #f4eee2; padding: 12px 14px 14px; color: #57361d; }
#sq [data-sq="cinema"] .cn-top { display: flex; align-items: baseline; gap: 14px; margin-bottom: 10px; font-weight: 600; font-size: 13px; }
#sq [data-sq="cinema"] .cn-top b { font-weight: 800; font-size: 17px; color: #352518; white-space: nowrap; }
#sq [data-sq="cinema"] .cn-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-height: 470px; overflow: auto; }
#sq [data-sq="cinema"] .cn-grid > * { position: relative; display: block; border: 0; padding: 0 0 8px; background: #fbf6e9; box-shadow: inset 0 0 0 1px #d6c9ae; text-align: center; color: #57361d; }
#sq [data-sq="cinema"] .cn-grid button { cursor: pointer; }
#sq [data-sq="cinema"] .cn-grid button:hover, #sq [data-sq="cinema"] .cn-grid button:focus-visible { box-shadow: inset 0 0 0 2.5px #d8952a; outline: 0; background: #fff8e6; }
#sq [data-sq="cinema"] .cn-grid img, #sq [data-sq="cinema"] .cn-grid .no span { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
#sq [data-sq="cinema"] .cn-grid .no span { display: grid; place-items: center; background: linear-gradient(180deg, #57361d, #2b1a0e); color: #b98f45; font-weight: 800; font-size: 34px; }
#sq [data-sq="cinema"] .cn-grid .no { opacity: .72; }
#sq [data-sq="cinema"] .cn-grid strong { display: block; margin: 6px 6px 0; font-weight: 800; font-size: 14.5px; line-height: 1.2; color: #352518; }
#sq [data-sq="cinema"] .cn-grid em { font-style: normal; font-weight: 600; font-size: 12px; color: #8a5a1b; }
@media (max-width: 900px) { #sq [data-sq="cinema"] .cn-grid { grid-template-columns: repeat(3, 1fr); } }

/* css/sq-nav.css */
/* sq-nav.css — the dock, the rail, the menu's sheet and the HUD's new top (js/sq/nav.js), in the tavern's wood (css/sq-skin.css's last
   block, its --tv-* and --sk-* tokens). Everything stands under html.nav-on: without it (the classic HUD) nothing here is read. */

/* ---- the marks: red something to take, gold points to spend, the ribbon something new ---- */
#sq .nv-r, #sq .nv-g { position: absolute; right: -4px; top: -5px; z-index: 2; min-width: 17px; height: 17px; box-sizing: border-box; padding: 0 4px; border-radius: 9px; font: 800 10.5px/17px 'Baloo 2', sans-serif; text-align: center; pointer-events: none; }
#sq .nv-r { background: radial-gradient(circle at 38% 30%, #ff6b78, #b5122c 70%); color: #fff; box-shadow: 0 0 0 1.5px #d8ab55, 0 1px 3px rgba(0, 0, 0, 0.6); }
#sq .nv-g { background: linear-gradient(180deg, #ffe9a6, #d6a03c); color: #3a2008; box-shadow: 0 0 0 1.5px #4a2c10, 0 1px 3px rgba(0, 0, 0, 0.6); }
#sq .nv-r.d { min-width: 11px; width: 11px; height: 11px; padding: 0; right: -2px; top: -3px; }
#sq .nvb u, #sq .nvi u, #sq .nvs-p u, #sq .nvt u { text-decoration: none; position: absolute; left: 50%; top: -8px; transform: translateX(-50%); z-index: 2; padding: 3px 11px 4px; background: url("/assets/ui/nav/ribbon.webp") center / 100% 200% no-repeat; font: 800 8.5px/10px 'Baloo 2', sans-serif; color: #fff3d0; text-shadow: 0 1px 1px #4a0814; white-space: nowrap; pointer-events: none; }
#sq .nvi u, #sq .nvs-p u { position: static; transform: none; margin-left: auto; }

/* ---- the dock ---- */
html.nav-on #sq .nvd { position: absolute; right: 8px; bottom: 8px; z-index: 0; display: flex; gap: 1px; padding: 5px 7px; pointer-events: auto; border: 0 solid transparent; border-image: var(--tv-plate); filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.45)); }
html.nav-on #sq .nvd[hidden], html.nav-on.mob #sq .nvd { display: none; }
html.nav-on #sq .nvb { position: relative; width: 47px; height: 52px; padding: 2px 0 0; display: flex; flex-direction: column; align-items: center; cursor: pointer; border-radius: 5px; transition: transform 0.12s, background 0.12s; }
html.nav-on #sq .nvb > img { width: 37px; height: 37px; margin-top: -2px; object-fit: contain; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.55)); transition: transform 0.14s cubic-bezier(0.2, 1.4, 0.4, 1); }
html.nav-on #sq .nvb > span { margin-top: 1px; font: 700 9.5px/12px 'Noto Sans', 'Noto Sans Thai', sans-serif; color: #f6e2b2; text-shadow: 0 1px 1px #000, 0 0 3px #000; white-space: nowrap; }
html.nav-on #sq .nvb > i { position: absolute; left: 1px; top: 0; min-width: 12px; padding: 0 3px; border-radius: 3px; background: linear-gradient(180deg, #f3d98c, #b88a36); color: #2b1606; box-shadow: 0 0 0 1px #3a220e; font: normal 800 9px/12px 'Baloo 2', sans-serif; text-align: center; opacity: 0.9; }
html.nav-on #sq .nvb:hover { background: radial-gradient(ellipse at 50% 60%, rgba(246, 210, 122, 0.28), rgba(246, 210, 122, 0) 70%); }
html.nav-on #sq .nvb:hover > img { transform: translateY(-4px) scale(1.12); }
html.nav-on #sq .nvb:active > img { transform: scale(0.94); }
html.nav-on #sq .nvb.on { background: linear-gradient(180deg, rgba(158, 27, 49, 0.6), rgba(158, 27, 49, 0.15)); box-shadow: inset 0 -2px 0 #e9bf62; }
html.nav-on #sq .nvb.lock > img { filter: grayscale(1) brightness(0.5); }
html.nav-on #sq .nvb.lock > span { opacity: 0.45; }
html.nav-on #sq .nvb.lock::after { content: ""; position: absolute; left: 16px; top: 12px; width: 18px; height: 18px; background: url("/assets/ui/nav/lock.webp") center / contain no-repeat; }
@keyframes nv-new { 0%, 100% { filter: drop-shadow(0 0 2px rgba(255, 214, 110, 0.5)); } 50% { filter: drop-shadow(0 0 9px rgba(255, 214, 110, 1)); } }
html.nav-on #sq .nvb.new > img { animation: nv-new 1.6s ease-in-out infinite; }
@keyframes nv-hit { 0% { transform: scale(1); } 30% { transform: scale(1.35); filter: brightness(1.8); } 100% { transform: scale(1); } }
html.nav-on #sq .nv-hit > img { animation: nv-hit 0.8s ease-out; }
/* ---- what stood where the dock is: rest, dash, attack and AUTO one step up; the EXP words on their bars ---- */
html.nav-on:not(.mob) #sq .hud > [data-p="br"] { top: calc(100% - 62px) !important; }
html.nav-on:not(.mob) #sq .hud [data-p="bc"] > .sh:has([data-f="xp"]) { left: -226px !important; top: -22px !important; width: 455px; text-align: center; z-index: 2; pointer-events: none; }
html.nav-on:not(.mob) #sq .hud .xpb { height: 10px; }

/* ---- the top: the old cells and the pop-up out of sight; Eventos, Loja, the search (a PC); the bag and เมนู too (touch) ---- */
html.nav-on #sq .hud [data-f="grid"] > .mi.mt[data-a="pjshop"], html.nav-on #sq .hud [data-f="grid"] > .mi.mt[data-a="topup"], html.nav-on #sq .hud [data-f="grid"] > .mi.mt[data-a="gacha"],
html.nav-on #sq .hud [data-f="grid"] > .mi.mt[data-a="K"], html.nav-on #sq .hud [data-f="grid"] > .mi.mt[data-a="auto"], html.nav-on #sq .hud [data-f="grid"] > .mi.mt.mrow, html.nav-on #sq .hud .mp,
html.nav-on #sq .hud [data-f="grid"] > .nv-off { display: none !important; }
html.nav-on:not(.mob) #sq .hud [data-f="grid"] > .mi.mt[data-a="I"], html.nav-on:not(.mob) #sq .hud [data-f="grid"] > .mi.mt[data-a="menu"] { display: none !important; }
html.nav-on.mob #sq .hud [data-f="grid"] > .mi.mt[data-a="find"] { display: none !important; }
html.nav-on #sq .hud [data-p="tr"] [data-f="grid"] > .mi.mt:is([data-a="events"], [data-a="store"]):not(.nv-off), html.nav-on:not(.mob) #sq .hud [data-p="tr"] [data-f="grid"] > .mi.mt[data-a="find"] { display: flex !important; width: 50px !important; }
html.nav-on:not(.mob) #sq .hud [data-f="grid"] > .mi.mt[data-a="find"] { left: -204px !important; }
html.nav-on:not(.mob) #sq .hud [data-f="grid"] > .mi.mt[data-a="events"] { left: -258px !important; }
html.nav-on:not(.mob) #sq .hud [data-f="grid"] > .mi.mt[data-a="store"] { left: -312px !important; }
/* (three names deep and :not(): over css/sq-touch.css's folded row) */
html.nav-on.mob.sq-on #sq .hud:not(.x):not(.y) [data-p="tr"] [data-f="grid"] > .mi.mt:is([data-a="menu"], [data-a="I"], [data-a="events"], [data-a="store"]):not(.nv-off) { display: flex !important; }
html.nav-on.mob.sq-on #sq .hud:not(.x):not(.y) [data-p="tr"] .mi.mt.mrow, html.nav-on.mob.sq-on #sq .hud:not(.x):not(.y) [data-p="tr"] [data-f="grid"] > .mi.mt:is([data-a="pjshop"], [data-a="topup"], [data-a="gacha"], [data-a="K"], [data-a="auto"], [data-a="find"]) { display: none !important; }
html.nav-on.mob.sq-on #sq .hud:not(.x):not(.y) [data-p="tr"] .mi.mt[data-a="menu"] { left: -204px !important; width: 50px !important; }
html.nav-on.mob.sq-on #sq .hud:not(.x):not(.y) [data-p="tr"] .mi.mt[data-a="I"] { left: -258px !important; width: 50px !important; }
html.nav-on.mob.sq-on #sq .hud:not(.x):not(.y) [data-p="tr"] .mi.mt[data-a="events"] { left: -312px !important; width: 50px !important; }
html.nav-on.mob.sq-on #sq .hud:not(.x):not(.y) [data-p="tr"] .mi.mt[data-a="store"] { left: -366px !important; width: 50px !important; }
html.nav-on #sq .hud [data-f="grid"] > .mi.mt > img { width: 30px; height: 30px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6)); }
@keyframes nv-glow { 0%, 100% { box-shadow: 0 2px 5px rgba(0, 0, 0, 0.45); } 50% { box-shadow: 0 0 16px rgba(255, 206, 96, 0.95); } }
html.nav-on #sq .hud .mi.mt.nv-glow { animation: nv-glow 1.8s ease-in-out infinite; }
html.nav-on #sq .hud .mi.mt[data-a="events"] > em { display: none; }
html.nav-on #sq .hud .mi.mt[data-a="events"] > em:not([hidden]) { display: block; }

/* ---- the purse: coins and gems beside the map ---- */
html.nav-on #sq .nvw { position: absolute; right: 246px; top: 70px; display: flex; gap: 6px; pointer-events: auto; }
html.nav-on #sq .nvw-c { display: flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px 0 4px; box-sizing: border-box; border: 0 solid transparent; border-image: var(--tv-plate); font: 800 13px/1 'Baloo 2', sans-serif; color: #ffe9b4; text-shadow: 0 1px 2px #000; white-space: nowrap; }
html.nav-on #sq .nvw-c[hidden] { display: none; }
html.nav-on #sq .nvw-c > img { width: 18px; height: 18px; object-fit: contain; }
html.nav-on #sq .nvw-c > button { width: 18px; height: 18px; margin-right: -5px; padding: 0; cursor: pointer; }
html.nav-on #sq .nvw-c > button > img { width: 18px; height: 18px; display: block; }
html.nav-on #sq .nvw-c > button:hover { filter: brightness(1.25); }
@keyframes nv-up { 0% { transform: scale(1); } 35% { transform: scale(1.16); filter: brightness(1.5); } 100% { transform: scale(1); } }
html.nav-on #sq .nvw-c.up { animation: nv-up 0.45s ease-out; }
html.nav-on #sq .hud [data-f="wtl"] > [data-a="I"] { display: none !important; }
html.nav-on:not(.mob) #sq .hud [data-a="bell"], html.nav-on:not(.mob) #sq .hud [data-a="mail"] { position: fixed !important; left: auto !important; top: 103px !important; }
html.nav-on:not(.mob) #sq .hud [data-a="mail"] { right: 246px !important; }
html.nav-on:not(.mob) #sq .hud [data-a="bell"] { right: 290px !important; }
html.nav-on #sq .hud [data-a="lifeT"]:not(.on) { display: none !important; }
html.nav-on #sq .hud .nvgear { right: 98px; top: -124px; width: 28px; height: 28px; pointer-events: auto; }
html.nav-on #sq .hud .nvgear > img { width: 18px; height: 18px; }
html:not(.nav-on) #sq .hud .nvgear, html:not(.nav-on) #sq .nvw { display: none; }
html.nav-on.mob #sq .hud .nvgear { right: calc(186px / var(--sqk)); top: calc(-284px / var(--sqk)); width: calc(44px / var(--sqk)); height: calc(44px / var(--sqk)); border-image: none; border-radius: 50%; background: url("/assets/ui/tavern/round.webp") center / 100% 100% no-repeat; }
html.nav-on.mob #sq .hud .nvgear > img { width: 55%; height: 55%; }

/* ---- the quest's plate: read from the left, its button brass ---- */
html.nav-on #sq .hud .wk:not(.open) { padding: 9px 14px 10px !important; max-width: 316px; text-align: left; }
html.nav-on:not(.mob) #sq .hud .wk:not(.open) { min-width: 250px; }
html.nav-on #sq .hud .wk:not(.open)::before { content: ""; position: absolute; left: -15px; top: -11px; width: 34px; height: 34px; background: url("/assets/ui/nav/journey.webp") center / contain no-repeat; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.6)); }
html.nav-on #sq .hud .wk:not(.open) [data-f="work"] > div > div:first-child { padding-left: 10px; color: #ffe9b4; }
html.nav-on #sq .hud .wk span[data-a]:is([data-a="w-walk"], [data-a="w-step"], [data-a="w-lstep"], [data-a="w-go"], [data-a="w-back"], [data-a="w-now"]) { float: right; margin: 0 0 0 8px; padding: 1px 10px 2px; border: 0; border-radius: 5px; font-size: 11.5px !important; line-height: 17px; background: linear-gradient(180deg, #f8e3a0 0%, #d9ac50 48%, #a97b2c 100%); color: #2b1606 !important; text-shadow: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 0 0 1px #8a5f1c, 0 0 0 1px #24130a; }
html.nav-on #sq .hud .wk span[data-a]:hover { filter: brightness(1.1); }
html.nav-on:not(.mob):not(.nav-perf) #sq .hud [data-f="clock"], html.nav-on:not(.mob):not(.nav-perf) #sq .hud [data-f="srv"] { display: none !important; }
html.nav-on:not(.mob):not(.nav-perf) #sq .hud .wk { top: 182px !important; }
@keyframes nv-near { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.6) drop-shadow(0 0 5px rgba(255, 220, 120, 0.9)); } }
html.nav-on #sq .hud .xpb > .near { animation: nv-near 1.4s ease-in-out infinite; }

/* ---- the rail at a window's left edge ---- */
html.nav-on #sq > .nvr { position: absolute; box-sizing: border-box; display: flex; flex-direction: column; overflow: hidden; pointer-events: auto; padding: 8px 5px 6px;
  border: 0 solid transparent; border-image: var(--tv-plate); filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.5)); }
html.nav-on #sq > .nvr[hidden] { display: none; }
@keyframes nv-in { 0% { opacity: 0; transform: translateX(18px); } 100% { opacity: 1; transform: none; } }
html.nav-on #sq > .nvr.in { animation: nv-in 0.2s ease-out; }
html.nav-on #sq .nvr-h { display: flex; align-items: center; gap: 6px; flex: none; padding: 0 4px 6px; border-bottom: 1px solid rgba(216, 171, 85, 0.55); }
html.nav-on #sq .nvr-h > img { width: 30px; height: 30px; object-fit: contain; }
html.nav-on #sq .nvr-h > b { font: 700 16px/1.05 var(--sk-font-title, serif); color: #f9e3a8; text-shadow: 0 1px 2px #000; min-width: 0; }
html.nav-on #sq .nvr-l { flex: 1; min-height: 0; overflow-y: auto; margin-top: 4px; padding: 3px 2px 2px 0; scrollbar-width: thin; scrollbar-color: #c99a4a transparent; }
html.nav-on #sq .nvr-g { margin: 7px 4px 2px; font: 800 9.5px/12px 'Baloo 2', sans-serif; letter-spacing: 0.06em; text-transform: uppercase; color: #cfa75c; }
html.nav-on #sq .nvi { position: relative; display: flex; align-items: center; gap: 6px; width: 100%; min-height: 32px; padding: 2px 6px 2px 4px; margin-bottom: 1px; border-radius: 5px; text-align: left; cursor: pointer; box-sizing: border-box; }
html.nav-on #sq .nvi > img { width: 25px; height: 25px; object-fit: contain; flex: none; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.6)); }
html.nav-on #sq .nvi > img.cr { width: 13px; height: 13px; margin-left: auto; }
html.nav-on #sq .nvi > span { min-width: 0; font: 700 11.5px/1.12 'Noto Sans', 'Noto Sans Thai', sans-serif; color: #eed9ae; text-shadow: 0 1px 1px #000; overflow-wrap: anywhere; }
html.nav-on #sq .nvi:hover { background: rgba(246, 210, 122, 0.16); }
html.nav-on #sq .nvi.on { background: linear-gradient(90deg, rgba(158, 27, 49, 0.85), rgba(158, 27, 49, 0.25)); box-shadow: inset 3px 0 0 #e9bf62; }
html.nav-on #sq .nvi.on > span { color: #fff3d2; }
html.nav-on #sq .nvi.lock > span { opacity: 0.5; }
html.nav-on #sq .nvi .nv-r, html.nav-on #sq .nvi .nv-g { position: static; margin-left: auto; flex: none; }
/* (a strip of pictures: touch, and a window as wide as the screen) */
html.nav-on #sq > .nvr.slim .nvr-h > b, html.nav-on #sq > .nvr.slim .nvi > span, html.nav-on #sq > .nvr.slim .nvr-g, html.nav-on #sq > .nvr.slim .nvi u, html.nav-on #sq > .nvr.slim .nvi .cr { display: none; }
html.nav-on #sq > .nvr.slim { padding: 6px 2px; }
html.nav-on #sq > .nvr.slim .nvr-h { justify-content: center; padding: 0 0 4px; }
html.nav-on #sq > .nvr.slim .nvi { justify-content: center; min-height: 38px; padding: 2px; }
html.nav-on #sq > .nvr.slim .nvi > img { width: 30px; height: 30px; }
html.nav-on #sq > .nvr.slim .nvi .nv-r, html.nav-on #sq > .nvr.slim .nvi .nv-g { position: absolute; right: 0; top: 0; }
html.nav-on #sq > .nvr.tch .nvr-h > b, html.nav-on #sq > .nvr.tch .nvi > span, html.nav-on #sq > .nvr.tch .nvr-g, html.nav-on #sq > .nvr.tch .nvi u, html.nav-on #sq > .nvr.tch .nvi .cr { display: none; }
html.nav-on #sq > .nvr.tch { padding: 5px 2px; }
html.nav-on #sq > .nvr.tch .nvr-h { justify-content: center; padding: 0 0 4px; }
html.nav-on #sq > .nvr.tch .nvi { justify-content: center; min-height: 44px; padding: 2px; }
html.nav-on #sq > .nvr.tch .nvi > img { width: 32px; height: 32px; }
html.nav-on #sq > .nvr.tch .nvi .nv-r, html.nav-on #sq > .nvr.tch .nvi .nv-g { position: absolute; right: 0; top: 0; }

/* ---- the tab bars the rail stands in for ---- */
html.nav-on #sq .win.nv-in[data-sq="saga"] .sg-tabs, html.nav-on #sq .win.nv-in[data-sq="legend"] .lg-tabs > span, html.nav-on #sq .win.nv-in[data-sq="legend"] .lg-album, html.nav-on #sq .win.nv-in[data-sq="ascend"] .as-tabs,
html.nav-on #sq .win.nv-in[data-sq="circle"] .cc-tabs, html.nav-on #sq .win.nv-in[data-sq="adventurer"] .av-tabs, html.nav-on #sq .win.nv-in[data-sq="itemshop"] .is-rail, html.nav-on #sq .win.nv-in[data-sq="gacha"] .sg:has([data-gt]),
html.nav-on #sq .win.nv-in[data-sq="events"] > .tabs, html.nav-on #sq .win.nv-in[data-sq="party"] [data-f="tabbt"], html.nav-on #sq .win.nv-in[data-sq="party"] [data-f="tabbt2"], html.nav-on #sq .win.nv-in[data-sq="endgame"] > .tabs,
html.nav-on #sq .win.nv-in[data-sq="journal"] [data-f="nav"], html.nav-on #sq .win.nv-in[data-sq="autoprem"] .ap-rail { display: none !important; }
html.nav-on #sq .win.nv-in[data-sq="saga"] .sg, html.nav-on #sq .win.nv-in[data-sq="ascend"] .as, html.nav-on #sq .win.nv-in[data-sq="circle"] .cc, html.nav-on #sq .win.nv-in[data-sq="legend"] .lg { grid-template-columns: minmax(0, 1fr); }
html.nav-on #sq .win.nv-in[data-sq="legend"] .lg-tabs { display: flex; justify-content: flex-end; padding: 4px 8px; }
html.nav-on #sq .win.nv-in[data-sq="legend"] .lg { grid-template-rows: auto minmax(0, 1fr); }
html.nav-on #sq .win.nv-in[data-sq="menu"] > div > div:first-child { display: none !important; }
html.nav-on #sq .win.nv-in[data-sq="menu"] { width: 420px !important; }

/* ---- the bodies that were white or cream paper of their own: the window's parchment, light cards on it, the tavern's buttons ---- */
html.nav-on #sq .win:is([data-sq="saga"], [data-sq="legend"], [data-sq="ascend"], [data-sq="circle"], [data-sq="cinema"], [data-sq="events"]) :is(.sg-body, .lg-body, .as-body, .cc-body, .cn-body) { background: transparent; }
html.nav-on #sq .win:is([data-sq="events"], [data-sq="itemshop"]) :is([data-f="list"], [data-f="body"], .is-main, .is-scroll) { background: transparent; }
html.nav-on #sq .win:is([data-sq="saga"], [data-sq="legend"], [data-sq="ascend"], [data-sq="circle"]) { color: #3a2414; }
/* (one kit for the four families sg- lg- as- cc-: boxes, buttons, chips, bars, rows) */
html.nav-on #sq .win :is(.sg-body, .lg-body, .as-body, .cc-body) { scrollbar-width: thin; scrollbar-color: #a57d42 transparent; }
html.nav-on #sq .win :is(.sg-box, .lg-box, .as-box, .cc-box, .sg-it, .sg-achs > div, .sg-beasts > div, .sg-steps > div, .sg-track > div, .sg-join button, .lg-t, .lg-races button) { border-radius: 6px; background: linear-gradient(180deg, rgba(255, 250, 236, 0.86), rgba(250, 238, 208, 0.7)); box-shadow: inset 0 0 0 1px rgba(140, 100, 50, 0.5), 0 2px 4px rgba(80, 45, 15, 0.18); }
html.nav-on #sq .win :is(.sg-box.ready, .sg-achs > div.ok, .sg-track > div.ok, .sg-join button.on, .lg-races button.on, .lg-t.on) { background: linear-gradient(180deg, #fff6d2, #ffe9ae); box-shadow: inset 0 0 0 2px #d09a34, 0 0 10px rgba(236, 184, 76, 0.55); }
html.nav-on #sq .win :is(.sg-btn, .lg-btn, .as-btn, .cc-btn, .av-go, .lg-city):not(:disabled) { border-radius: 6px; background: linear-gradient(180deg, #f8e3a0 0%, #d9ac50 48%, #a97b2c 100%); color: #2b1606; text-shadow: 0 1px 0 rgba(255, 240, 200, 0.55); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 0 0 1px #8a5f1c, 0 0 0 1px #24130a, 0 2px 3px rgba(0, 0, 0, 0.35); transition: transform 0.08s, filter 0.12s; }
html.nav-on #sq .win :is(.sg-btn, .lg-btn, .as-btn, .cc-btn).g:not(:disabled) { background: linear-gradient(180deg, rgba(255, 225, 170, 0.16), rgba(0, 0, 0, 0.2)), var(--tv-wood) 0 0 / 220px, #5a3a22; color: #f7e8c8; text-shadow: 0 1px 1px rgba(0, 0, 0, 0.7); box-shadow: var(--tv-brass-ring); }
html.nav-on #sq .win :is(.sg-btn, .lg-btn, .as-btn, .cc-btn, .av-go):not(:disabled):hover { filter: brightness(1.08); }
html.nav-on #sq .win :is(.sg-btn, .lg-btn, .as-btn, .cc-btn, .av-go, .bt):not(:disabled):active { transform: translateY(1px) scale(0.985); }
html.nav-on #sq .win :is(.sg-btn, .lg-btn, .as-btn, .cc-btn, .av-go):disabled { border-radius: 6px; background: linear-gradient(180deg, #a89276, #8a7558); color: #efe3cb; box-shadow: inset 0 0 0 1px #6e5a40; opacity: 0.75; }
html.nav-on #sq .win :is(.sg-chips, .lg-chips, .as-chips, .cc-chips) span { border-radius: 14px; padding: 5px 14px; background: linear-gradient(180deg, rgba(255, 225, 170, 0.12), rgba(0, 0, 0, 0.25)), var(--tv-wood) 0 0 / 220px, #4a2e1a; color: #e6cf9f; text-shadow: 0 1px 1px #000; box-shadow: inset 0 0 0 1px rgba(216, 171, 85, 0.5), 0 1px 2px rgba(0, 0, 0, 0.3); }
html.nav-on #sq .win :is(.sg-chips, .lg-chips, .as-chips, .cc-chips) span.on { background: linear-gradient(180deg, #c83a50, #8d1830); color: #fff1d6; box-shadow: inset 0 0 0 1.5px #e9bf62, 0 1px 3px rgba(0, 0, 0, 0.4); }
html.nav-on #sq .win :is(.sg-bar, .lg-bar, .av-rq i) { border-radius: 9px; overflow: hidden; background: linear-gradient(180deg, #2a170c, #4a2e1a); box-shadow: inset 0 0 0 1px #1d0f06, 0 0 0 1px #c99a4a; }
html.nav-on #sq .win .sg-bar u { border-radius: 9px; background: linear-gradient(180deg, #ffe08a, #d9962c 55%, #b5701a); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5); transition: width 0.4s ease-out; }
html.nav-on #sq .win .sg-bar span { color: #fff6dd; text-shadow: 0 1px 2px #000, 0 0 2px #000; }
html.nav-on #sq .win .sg-ban { border-radius: 6px; box-shadow: inset 0 0 0 2px #b0823a, 0 2px 6px rgba(60, 30, 10, 0.4); }
html.nav-on #sq .win :is(.sg-row, .lg-row, .sg-rk, .sg-fa, .sg-land) { border-top-color: rgba(140, 100, 50, 0.3); }
/* (the older boards' white and navy-white panels, written inside their rows) */
html.nav-on #sq .win:not(.fs-card) :is([style*="background: #ffffff"], [style*="background:#ffffff"], [style*="background: #fff;"]):not(canvas):not(input):not(textarea) { background: rgba(255, 249, 234, 0.68) !important; }
html.nav-on #sq .win [style*="background: #f1ebdf"] { background: linear-gradient(90deg, rgba(120, 80, 35, 0.2), rgba(120, 80, 35, 0.08)) !important; border-right-color: rgba(138, 95, 42, 0.55) !important; }

/* ---- the sheet: every hub and page (a phone's menu; the search) ---- */
html.nav-on #sq > .nvs { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(760px, calc(100% - 24px)); height: min(500px, calc(100% - 24px)); box-sizing: border-box; display: flex; flex-direction: column; pointer-events: auto;
  background: #efdfbd var(--tv-parch) 0 0 / 360px; border: 0 solid transparent; border-image: url("/assets/ui/tavern/frame.webp") 54 / 17px / 13px stretch; box-shadow: 0 14px 34px rgba(0, 0, 0, 0.6); animation: nv-sheet 0.2s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
html.nav-on #sq > .nvs[hidden] { display: none; }
@keyframes nv-sheet { 0% { opacity: 0; transform: translate(-50%, -48%) scale(0.97); } 100% { opacity: 1; transform: translate(-50%, -50%); } }
html.nav-on #sq .nvs-t { display: flex; align-items: center; gap: 8px; flex: none; height: 44px; padding: 0 10px; background: linear-gradient(180deg, rgba(255, 225, 170, 0.1), rgba(0, 0, 0, 0.28)), var(--tv-wood) 0 0 / 256px, #3a2314; border-bottom: 2px solid #1d0f06; box-shadow: inset 0 -1px 0 #c99a4a; }
html.nav-on #sq .nvs-t > img { width: 30px; height: 30px; }
html.nav-on #sq .nvs-t > b { font: 700 18px/1 var(--sk-font-title, serif); color: #f6e2b2; text-shadow: 0 1px 2px #000; }
html.nav-on #sq .nvs-t > label { margin-left: auto; display: flex; align-items: center; gap: 4px; flex: 0 1 260px; min-width: 120px; height: 30px; padding: 0 8px; box-sizing: border-box; background: #f7ecd0; box-shadow: inset 0 0 0 1px #8a5f2a, inset 0 2px 4px rgba(80, 45, 15, 0.3); border-radius: 4px; }
html.nav-on #sq .nvs-t > label > img { width: 18px; height: 18px; }
html.nav-on #sq .nvs-t input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: 600 14px/1 'Noto Sans', 'Noto Sans Thai', sans-serif; color: #3a2414; }
html.nav-on #sq .nvs-x { width: 34px; height: 34px; padding: 6px; background: url("/assets/ui/tavern/round.webp") center / 100% 100% no-repeat; cursor: pointer; }
html.nav-on #sq .nvs-x > img { width: 100%; height: 100%; display: block; }
html.nav-on #sq .nvs-m { flex: 1; min-height: 0; display: flex; }
html.nav-on #sq .nvs-l { flex: none; width: 160px; overflow-y: auto; padding: 8px 6px; background: linear-gradient(90deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.1)), var(--tv-wood) 0 0 / 256px, #3a2314; box-shadow: inset -2px 0 0 #b0823a; scrollbar-width: thin; scrollbar-color: #c99a4a transparent; }
html.nav-on #sq .nvs-h { position: relative; display: flex; align-items: center; gap: 7px; width: 100%; min-height: 38px; padding: 2px 8px 2px 5px; margin-bottom: 1px; border-radius: 5px; cursor: pointer; text-align: left; }
html.nav-on #sq .nvs-h > img { width: 30px; height: 30px; object-fit: contain; }
html.nav-on #sq .nvs-h > span { font: 700 13px/1.1 'Noto Sans', 'Noto Sans Thai', sans-serif; color: #f2dcae; text-shadow: 0 1px 1px #000; }
html.nav-on #sq .nvs-h.on { background: linear-gradient(90deg, rgba(158, 27, 49, 0.85), rgba(158, 27, 49, 0.25)); box-shadow: inset 3px 0 0 #e9bf62; }
html.nav-on #sq .nvs-h.lock > span, html.nav-on #sq .nvs-p.lock > span { opacity: 0.5; }
html.nav-on #sq .nvs-h .nv-r, html.nav-on #sq .nvs-h .nv-g { position: static; margin-left: auto; }
html.nav-on #sq .nvs-b { flex: 1; min-width: 0; overflow-y: auto; padding: 10px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 7px; align-content: start; scrollbar-width: thin; scrollbar-color: #a57d42 transparent; }
html.nav-on #sq .nvs-g { grid-column: 1 / -1; margin-top: 2px; font: 800 11px/14px 'Baloo 2', sans-serif; letter-spacing: 0.06em; text-transform: uppercase; color: #7a4f1c; border-bottom: 1px solid rgba(138, 95, 42, 0.5); }
html.nav-on #sq .nvs-p { position: relative; display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 4px 8px; box-sizing: border-box; cursor: pointer; text-align: left; border-radius: 5px; background: rgba(255, 248, 230, 0.62); box-shadow: inset 0 0 0 1px rgba(140, 100, 50, 0.5), 0 1px 0 rgba(255, 255, 255, 0.4); }
html.nav-on #sq .nvs-p:hover { background: #fff6dc; box-shadow: inset 0 0 0 1.5px #c99a4a, 0 0 8px rgba(214, 168, 78, 0.6); }
html.nav-on #sq .nvs-p > img { width: 34px; height: 34px; object-fit: contain; flex: none; }
html.nav-on #sq .nvs-p > span { min-width: 0; font: 700 12.5px/1.15 'Noto Sans', 'Noto Sans Thai', sans-serif; color: #3a2414; }
html.nav-on #sq .nvs-p small { display: block; font-weight: 600; font-size: 10.5px; color: #7a5c38; }
html.nav-on #sq .nvs-n { grid-column: 1 / -1; text-align: center; font: 600 14px/3 'Noto Sans', sans-serif; color: #6e5638; }
@media (max-width: 599px) { html.nav-on #sq .nvs-l { width: 60px; } html.nav-on #sq .nvs-h > span { display: none; } html.nav-on #sq .nvs-h { justify-content: center; padding: 2px; } html.nav-on #sq .nvs-h .nv-r, html.nav-on #sq .nvs-h .nv-g { position: absolute; right: 2px; top: 0; } }

/* ---- something new unlocked: its picture on a burst, then off to its button ---- */
html.nav-on #sq > .nvu { position: absolute; left: 50%; top: 32%; width: 0; height: 0; z-index: 99999; pointer-events: none; }
html.nav-on #sq .nvu > .ry { position: absolute; left: -150px; top: -150px; width: 300px; height: 300px; animation: nvu-ry 2.4s ease-out both; }
@keyframes nvu-ry { 0% { opacity: 0; transform: scale(0.3) rotate(0deg); } 25% { opacity: 1; } 100% { opacity: 0.85; transform: scale(1.1) rotate(50deg); } }
html.nav-on #sq .nvu > .pc { position: absolute; left: -48px; top: -48px; width: 96px; height: 96px; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.6)); animation: nvu-pc 0.5s cubic-bezier(0.2, 1.6, 0.4, 1); }
@keyframes nvu-pc { 0% { opacity: 0; scale: 0.2; } 100% { opacity: 1; scale: 1; } }
html.nav-on #sq .nvu > div { position: absolute; left: -170px; top: 66px; width: 340px; box-sizing: border-box; padding: 10px 44px 12px; text-align: center; background: url("/assets/ui/tavern/plaque.webp") center / 100% 100% no-repeat; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.6)); animation: nvu-pc 0.5s 0.12s cubic-bezier(0.2, 1.3, 0.4, 1) both; }
html.nav-on #sq .nvu small { display: block; font: 700 12px/1.2 'Baloo 2', sans-serif; color: #ffd98a; }
html.nav-on #sq .nvu b { display: block; font: 700 22px/1.1 var(--sk-font-title, serif); color: #fff0c4; text-shadow: 0 2px 0 #3a1d08, 0 0 10px rgba(255, 200, 90, 0.6); }
html.nav-on #sq .nvu.fly > .pc { animation: none; transition: transform 0.62s cubic-bezier(0.5, 0, 0.7, 1); transform: translate(var(--nx), var(--ny)) scale(0.4); }
html.nav-on #sq .nvu.go > .ry, html.nav-on #sq .nvu.go > div { transition: opacity 0.35s; opacity: 0 !important; animation: none; }

/* ---- touch ---- */
html.nav-on.mob #sq .nvw { right: 152px; top: 68px; }
@media (max-height: 599px) and (orientation: landscape) { html.nav-on.mob #sq .nvw { right: 246px; top: 68px; } }
html.nav-on.mob-port #sq .nvw { display: none; }
@media (prefers-reduced-motion: reduce) { html.nav-on #sq .nvb.new > img, html.nav-on #sq .hud .mi.mt.nv-glow, html.nav-on #sq > .nvr.in, html.nav-on #sq > .nvs, html.nav-on #sq .nvu > * { animation: none; } }
/* (AUTO lit is wider, "AUTO ATIVADO": its gear steps aside) */
html.nav-on:not(.mob) #sq .hud [data-p="br"]:has(.ay.on) .nvgear { right: 150px; }
/* (the quest's plate is a line taller than the strip it was: the chat's column on a phone starts under it) */
@media (max-height: 599px) and (orientation: landscape) { html.nav-on.mob.sq-on #sq .hud [data-p="bl"] { top: 162px !important; } }
@media (max-width: 599px) { html.nav-on.mob-port.sq-on #sq .hud [data-p="bl"] { top: 318px !important; } }

/* =====================================================================================================================================
   THE HUD IN DARK GLASS — the owner, 3 Dec 2026, of the wood on what is always on the screen: "to achando esse visual com madeira de
   fundo na hud meio pesado visualmente"; the pick A of three: thin see-through plates with one brass line. Only the HUD: the windows,
   the rail and the sheet keep the tavern's wood and parchment. The blur behind is for a fast PC alone (.nav-blur, js/sq/nav.js).
   ===================================================================================================================================== */
html.nav-on.sq-on { --gl: rgba(20, 14, 9, 0.56); --gl-line: rgba(226, 186, 104, 0.45); --gl-box: inset 0 0 0 1px var(--gl-line), 0 2px 8px rgba(0, 0, 0, 0.28); }
/* (every piece js/sq/hudmore.js draws, the target, the party, the buffs, the boss, reads these two) */
html.nav-on.sq-on #sq .hm { --sk-plate: var(--gl); --sk-plate-frame: var(--gl-box); }
html.nav-on.sq-on #sq .hm [style*="--sk-plate"] { border-radius: 9px !important; }
html.nav-on.sq-on #sq .hud:not(.x):not(.y) :is(.uf-plate, .ab-tray, .wk:not(.open), [data-f="zl"], .cwp), html.nav-on.sq-on #sq .nvd.nvd, html.nav-on.sq-on #sq .nvw .nvw-c.nvw-c {
  border: 0 !important; border-image: none !important; border-radius: 10px !important; background: var(--gl) !important; box-shadow: var(--gl-box) !important; filter: none !important; }
html.nav-on.sq-on #sq .hud:not(.x):not(.y) .mi.mt.mt { border: 0 !important; border-image: none !important; border-radius: 10px !important; background: var(--gl) !important; box-shadow: var(--gl-box) !important; }
html.nav-on.sq-on #sq .hud:not(.x):not(.y) .mi.mt.mt:hover { background: rgba(58, 38, 20, 0.66) !important; }
html.nav-on.sq-on #sq .hud:not(.x):not(.y) .mi.mt.mt.on { box-shadow: inset 0 0 0 1.5px #f0cb78, 0 0 12px rgba(246, 210, 122, 0.4) !important; }
html.nav-on.sq-on #sq .hud:not(.x):not(.y) .wk.open { border: 0 !important; border-image: none !important; border-radius: 10px !important; overflow: hidden; background: rgba(20, 14, 9, 0.8) !important; box-shadow: var(--gl-box) !important; }
html.nav-on.sq-on #sq .hud:not(.x):not(.y) .wk.open > .tb { background: rgba(255, 220, 150, 0.1) !important; border: 0; box-shadow: inset 0 -1px 0 var(--gl-line); }
html.nav-on.sq-on #sq .hud:not(.x):not(.y) .wk [data-a="w-more"] { border-radius: 5px; background: rgba(255, 220, 150, 0.14); box-shadow: none; }
/* (a cell of the bar: a darker pane; what is pressed or ready keeps the skin's own light) */
html.nav-on.sq-on #sq .hud:not(.x):not(.y) .qs:not([data-a="attack"]) { border: 0 !important; border-image: none !important; border-radius: 8px !important; background: rgba(12, 8, 5, 0.5); box-shadow: inset 0 0 0 1px rgba(226, 186, 104, 0.5); }
html.nav-on.sq-on #sq .hud:not(.x):not(.y) .qs:not([data-a="attack"]):hover, html.nav-on.sq-on #sq .hud:not(.x):not(.y) .qs.lit { box-shadow: inset 0 0 0 1.5px #f6d27a, 0 0 10px rgba(246, 210, 122, 0.45); }
html.nav-on.sq-on #sq .hud:not(.x):not(.y) .qs:is([data-a="rest"], [data-a="dash"]), html.nav-on.sq-on #sq .hud:not(.x):not(.y) .ufw .qs, html.nav-on.mob.sq-on #sq .hud:not(.x):not(.y) .nvgear.qs { border-radius: 50% !important; background: var(--gl) !important; box-shadow: inset 0 0 0 1.5px rgba(226, 186, 104, 0.6), 0 2px 6px rgba(0, 0, 0, 0.3); }
html.nav-on.sq-on #sq .hud:not(.x):not(.y) .qs > i, html.nav-on.sq-on #sq .nvd.nvd .nvb > i { background: rgba(20, 12, 6, 0.75); color: #f3d99a; box-shadow: none; }
html.nav-on.sq-on #sq .hud:not(.x):not(.y) .chb { border: 0; border-radius: 6px; background: rgba(255, 220, 150, 0.16); box-shadow: none; }
html.nav-on.sq-on #sq .hud:not(.x):not(.y) .cwt { border-radius: 8px 8px 0 0; background: var(--gl); box-shadow: inset 0 0 0 1px rgba(226, 186, 104, 0.3); }
html.nav-on.sq-on #sq .hud:not(.x):not(.y) .cwt.on { background: rgba(158, 27, 49, 0.78); box-shadow: inset 0 0 0 1px #e2ba68; }
html.nav-on.sq-on #sq .hud:not(.x):not(.y) .cwi { border-radius: 6px; background: rgba(8, 5, 3, 0.4); }
/* (the bars and the two rings: one brass line in place of the carved wood) */
html.nav-on.sq-on #sq .hud:not(.x):not(.y) .qb { border: 0 !important; border-image: none !important; border-radius: 7px; overflow: hidden; background: rgba(10, 6, 4, 0.6); box-shadow: 0 0 0 1px rgba(226, 186, 104, 0.55); }
html.nav-on.sq-on #sq .hud:not(.x):not(.y) .xpb { border-radius: 5px; background: rgba(10, 6, 4, 0.6); box-shadow: 0 0 0 1px rgba(226, 186, 104, 0.4); }
html.nav-on.sq-on #sq .hud:not(.x):not(.y) .mm::after { inset: -3px; border-radius: 50%; background: none; filter: none; box-shadow: inset 0 0 0 2px #e2ba68, inset 0 0 0 3px rgba(30, 18, 8, 0.55), 0 2px 8px rgba(0, 0, 0, 0.4); }
html.nav-on.sq-on #sq .hud:not(.x):not(.y) .uf::after { inset: 7px; border-radius: 50%; background: none; filter: none; box-shadow: 0 0 0 2.5px #e2ba68, 0 0 0 3.5px rgba(30, 18, 8, 0.6), 0 2px 6px rgba(0, 0, 0, 0.45); }
html.nav-on:not(.mob).sq-on #sq .hud:not(.x):not(.y) .ay { border: 0 !important; border-image: none !important; border-radius: 8px; }
html.nav-on:not(.mob).sq-on #sq .hud:not(.x):not(.y) .ay:not(.on) { background: linear-gradient(180deg, #f6dd98, #cf9f48); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35); }
html.nav-on:not(.mob).sq-on #sq .hud:not(.x):not(.y) .ay.on { background: rgba(20, 14, 9, 0.72); box-shadow: inset 0 0 0 1.5px #f0cb78, 0 0 12px rgba(246, 210, 122, 0.5); }
/* (the thumb's round buttons) */
html.nav-on.mob.sq-on #mb:not(.x) :is(#mb-skills .hslot, #mb-items .hslot.item, .mb-page), html.nav-on.mob.sq-on #hs-dash.hslot.hslot, html.nav-on.mob.sq-on .hslot.blart.blart { background: rgba(18, 12, 8, 0.55) !important; box-shadow: inset 0 0 0 2px rgba(226, 186, 104, 0.75), 0 2px 6px rgba(0, 0, 0, 0.35) !important; }
html.nav-on.mob.sq-on #mb:not(.x) .mb-stick { background: radial-gradient(circle, rgba(18, 12, 8, 0.15) 45%, rgba(18, 12, 8, 0.42) 100%) !important; box-shadow: inset 0 0 0 2px rgba(226, 186, 104, 0.6) !important; }
/* (frosted only where the machine has room: js/sq/nav.js) */
html.nav-blur.nav-on.sq-on #sq .hud :is(.uf-plate, .ab-tray, .wk, [data-f="zl"], .cwp), html.nav-blur.nav-on.sq-on #sq .nvd { -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
/* (the bars of a rift, a room and the daily dungeon, outside #sq: the same glass, a step under the top's plates, js/sq/nav.js strips) */
html.nav-on.sq-on #lgstrip#lgstrip, html.nav-on.sq-on #dailydun-bar#dailydun-bar#dailydun-bar#dailydun-bar { border: 0; border-image: none; border-radius: 10px; background: rgba(20, 14, 9, 0.66); box-shadow: inset 0 0 0 1px rgba(226, 186, 104, 0.45), 0 2px 8px rgba(0, 0, 0, 0.28); transition: top 0.16s ease-out; }
html.nav-on.sq-on #lgstrip#lgstrip > b { text-shadow: 0 1px 2px #000; }
html.nav-on.sq-on #lgstrip#lgstrip i { border-radius: 5px; overflow: hidden; }
html.nav-on.sq-on #lgstrip#lgstrip button { border-radius: 6px; background: linear-gradient(180deg, #f6dd98, #cf9f48); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35); }
/* (a phone: the bar small, over the hero's head it hid him; the target's plate of touch in the same glass) */
html.nav-on.mob.sq-on #lgstrip#lgstrip:not(.house) { min-width: 200px; padding: 4px 10px 5px; }
html.nav-on.mob.sq-on #lgstrip#lgstrip:not(.house) > b { font-size: 12.5px; }
html.nav-on.mob.sq-on #lgstrip#lgstrip:not(.house) i { height: 6px; margin: 3px 0 2px; }
html.nav-on.mob.sq-on #lgstrip#lgstrip:not(.house) button { min-height: 25px; margin-top: 2px; padding: 1px 12px; font-size: 12px; }
html.nav-on.mob.sq-on #hud#hud .tframe.tframe { border: 0 !important; border-image: none !important; border-radius: 9px !important; background: rgba(20, 14, 9, 0.6) !important; box-shadow: inset 0 0 0 1px rgba(226, 186, 104, 0.45), 0 2px 8px rgba(0, 0, 0, 0.28) !important; }

/* css/shop-catalog.css */
/* The illustrated fashion directory sits inside the tavern shop. */
#sq [data-sq="itemshop"] .is-shop-tabs {
  display: flex; gap: 2px; padding: 2px; margin: 0 0 6px; flex: none;
  background: #513520; border: 1px solid #79552c; border-radius: 6px;
}
#sq .is-shop-tabs button {
  flex: 1; min-width: 0; min-height: 31px; padding: 2px 4px; border: 0; border-radius: 3px;
  background: transparent; color: #f4e5c6; font: 700 12px/1.15 'Noto Sans','Noto Sans Thai',sans-serif; cursor: pointer;
}
#sq .is-shop-tabs [data-kind="looks"] + [data-kind="items"] { border-left: 1px solid #a58153; border-radius: 0 3px 3px 0; }
#sq .is-shop-tabs button:hover { background: #68482e; }
#sq .is-shop-tabs [aria-pressed="true"] { background: #8a293a; color: #fff3d5; box-shadow: inset 0 -2px #e9bc67; }
#sq .is-shop-tabs .is-cat-type { display: none; }
#sq .is-cat-tools { flex: none; overflow: hidden; border: 1px solid #302829; border-radius: 6px; color: #fff1cf; background: #222633; }
#sq .is-cat-bar {
  isolation: isolate; position: relative; display: flex; gap: 14px; align-items: center; justify-content: space-between; min-height: 58px; padding: 5px 13px;
  background: radial-gradient(ellipse at 18% 0%, #524251 0%, transparent 58%), linear-gradient(105deg,#292c3a,#202331 74%);
}
#sq .is-cat-bar::before {
  content: ''; position: absolute; z-index: -1; inset: 0 29% 0 20%; background: var(--series-art,none) center 43% / cover;
  opacity: .7; mask-image: linear-gradient(90deg,transparent,black 44%,black 80%,transparent); pointer-events: none;
}
#sq .is-cat-title { display: flex; align-items: center; min-width: 0; gap: 9px; }
#sq .is-cat-title h2 { margin: 0 0 1px; color: #fff3d6; font: 700 25px/1.05 var(--sk-font-title,Georgia,serif); }
#sq .is-cat-title span { color: #e7cda0; font: 600 12px/1.3 'Noto Sans','Noto Sans Thai',sans-serif; }
#sq .is-cat-title button, #sq .is-cat-search button {
  display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid #a58b63;
  background: #343643; color: #faebc9; border-radius: 4px; cursor: pointer;
}
#sq .is-cat-title img { width: 20px; height: 20px; }
#sq .is-cat-search {
  display: flex; align-items: center; gap: 7px; flex: 0 1 295px; min-width: 100px; height: 35px;
  padding: 0 5px 0 9px; border: 1px solid #a8916e; border-radius: 5px; background: #faf2dd;
}
#sq .is-cat-search:focus-within { outline: 2px solid #f2bd63; outline-offset: 1px; }
#sq .is-cat-search > img { width: 21px; height: 21px; object-fit: contain; }
#sq .is-cat-search input {
  flex: 1; min-width: 0; width: 100%; padding: 0; border: 0; outline: 0; background: transparent; color: #30251e;
  font: 600 14px/1.2 'Noto Sans','Noto Sans Thai',sans-serif; user-select: text;
}
#sq .is-cat-search input::placeholder { color: #695849; opacity: 1; }
#sq .is-cat-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
#sq .is-cat-search button { width: 27px; height: 27px; padding: 0; flex: none; background: #e9d8b8; color: #4b382b; border: 0; font-size: 20px; }
#sq .is-cat-scopes { display: flex; align-items: stretch; border-top: 1px solid #685850; background: #24232b; padding: 0 5px; }
#sq .is-cat-scopes button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 2px 13px;
  background: none; border: 0; border-bottom: 3px solid transparent; color: #e6daca;
  font: 700 13px/1.15 'Noto Sans','Noto Sans Thai',sans-serif; cursor: pointer;
}
#sq .is-cat-scopes img { width: 19px; height: 19px; object-fit: contain; }
#sq .is-cat-isekai-filter { display: flex; align-items: center; gap: 7px; background: #302935; padding: 4px 9px; border-top: 1px solid #66523d; }
#sq .is-cat-isekai-filter[hidden] { display: none; }
#sq .is-cat-isekai-filter label { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; color: #f8e5be; font: 700 13px/1.2 'Noto Sans','Noto Sans Thai',sans-serif; }
#sq .is-cat-isekai-filter button { flex: none; min-height: 30px; padding: 1px 7px; border: 1px solid #aa8454; border-radius: 4px; background: #563f3a; color: #ffe6ad; font: 700 13px/1.2 'Noto Sans','Noto Sans Thai',sans-serif; cursor: pointer; }
#sq .is-cat-isekai-filter select { min-width: 0; max-width: 100%; flex: 1; height: 30px; padding: 2px 7px; border: 1px solid #af9067; border-radius: 4px; background: #fbefd2; color: #3f2919; font: inherit; }
#sq .is-cat-isekai-filter select:focus-visible { outline: 2px solid #efbd53; }
#sq .is-ct:has(.is-cat-scene) .is-cat-origin { white-space: normal; text-align: center; overflow-wrap: anywhere; }
#sq .is-cat-scopes button:hover { background: #39333b; }
#sq .is-cat-scopes [aria-pressed="true"] { color: #ffe7a6; border-color: #f1c16b; background: #493b3a; }
#sq [data-sq="itemshop"] .is-cat-fit { margin-top: 7px; }
#sq [data-sq="itemshop"] .is-cat-fit .is-lw { display: block; min-height: 0; padding: 2px 4px 4px 1px; }
#sq .is-cat-covers { display: grid; grid-template-columns: repeat(12,minmax(0,1fr)); grid-auto-rows: minmax(84px,1fr); min-height: 100%; gap: 7px; }
#sq .is-cat-covers > button { grid-column: span 4; }
#sq .is-cat-covers:has(> :nth-child(10):last-child) > :nth-child(n+7),
#sq .is-cat-covers:has(> :nth-child(11):last-child) > :nth-child(n+4) { grid-column: span 3; }
#sq .is-cat-cover {
  isolation: isolate; position: relative; display: flex; align-items: flex-end; width: 100%; min-width: 0; min-height: 84px;
  overflow: hidden; padding: 0; text-align: left; border: 1px solid #655341; border-radius: 6px;
  background: #343343; box-shadow: 0 1px 3px #3a210d50; color: #fff3d8; cursor: pointer;
}
#sq .is-cat-cover > img { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 75% 46%; transition: transform .18s ease-out; }
#sq .is-cat-cover::before {
  content: ''; position: absolute; z-index: -1; inset: 0;
  background: linear-gradient(95deg,#11121beb 1%,#151320ad 38%,transparent 72%), linear-gradient(0deg,#100c1880,transparent 65%);
}
#sq .is-cat-cover-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; max-width: 70%; padding: 7px 10px; text-shadow: 0 1px 3px #110e17; }
#sq .is-cat-cover strong { color: #fff4db; font: 700 21px/1 var(--sk-font-title,Georgia,serif); text-wrap: balance; }
#sq .is-cat-cover-copy > span { color: #f4deaf; font: 700 11px/1.1 'Noto Sans','Noto Sans Thai',sans-serif; }
#sq .is-cat-cover > i { position: absolute; bottom: 6px; right: 7px; width: 19px; height: 19px; text-align: center; border-radius: 50%; border: 1px solid #d9bd8a9c; background: #10101bb3; color: #fff1cd; font: 700 17px/15px Georgia,serif; }
#sq .is-cat-cover:hover { border-color: #ffdc84; box-shadow: 0 0 0 1px #ab7534; }
#sq .is-cat-cover:hover > img { transform: scale(1.035); }
#sq .is-cat-cover.is-cat-original { background: radial-gradient(ellipse at 85% 40%,#956639,#45322b 68%); }
#sq .is-cat-original:nth-child(3n+2) { background: radial-gradient(ellipse at 85% 40%,#627458,#30433f 68%); }
#sq .is-cat-original:nth-child(3n) { background: radial-gradient(ellipse at 85% 40%,#866278,#433345 68%); }
#sq .is-cat-original > img { left: auto; right: 0; top: -5%; width: 45%; height: 120%; object-fit: contain; }
#sq .is-cat-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 160px; height: 100%; gap: 6px; text-align: center; color: #432e23; }
#sq .is-cat-empty > img { width: 34px; height: 34px; }
#sq .is-cat-empty strong { font: 700 22px/1.1 var(--sk-font-title,Georgia,serif); }
#sq .is-cat-empty span { font: 600 13px/1.3 'Noto Sans','Noto Sans Thai',sans-serif; }
#sq .is-cat-empty button, #sq .is-cat-related {
  padding: 4px 9px; background: #f9eed0; color: #71342d; border: 1px solid #b18a5c; border-radius: 4px;
  font: 700 12px/1.2 'Noto Sans','Noto Sans Thai',sans-serif; cursor: pointer;
}
#sq .is-cat-empty button { margin-top: 6px; }
#sq [data-sq="itemshop"] .is-cat-preview { border: 0; padding: 0 3px; background: transparent; color: #39271a; cursor: pointer; }
#sq .is-cat-origin { display: block; color: #70442b; font: 700 11.5px/1.2 'Noto Sans','Noto Sans Thai',sans-serif; }
#sq .is-ct .is-cat-origin { margin: 2px 0 0; padding: 1px 6px; border-radius: 3px; background: #e9d6af; color: #543724; }
#sq .is-ct button.is-cat-origin { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; min-height: 20px; border: 1px solid #bc9e6b; background: #383142; color: #fff0c8; cursor: pointer; }
#sq .is-ct button.is-cat-origin::after { content: ''; width: 4px; height: 4px; flex: none; border: solid #edc97f; border-width: 1.5px 1.5px 0 0; transform: rotate(45deg); }
#sq .is-ct button.is-cat-origin:hover, #sq .is-ct button.is-cat-origin:focus-visible { background: #624632; }
html.sq-on #sq [data-sq="itemshop"] .is-cat-fit .is-ct .i-pp.is-cat-scene {
  align-self: stretch; height: 108px; margin: 0 -4px 4px; border-radius: 3px; border-bottom: 1px solid #bfaa8059;
  background: radial-gradient(ellipse 50% 11% at 50% 94%,#3927187d,transparent 75%), linear-gradient(0deg,#f7e7bf99,#fff1d447), var(--anime-scene,linear-gradient(135deg,#9a8b9e,#dfc39d)) left center / 245% auto;
}
html.sq-on #sq [data-sq="itemshop"] .is-cat-fit .is-ct .i-pp.is-cat-scene img { width: 104px; height: 104px; }
html.sq-on #sq [data-sq="itemshop"] .is-cat-fit .is-ct:has(.is-cat-scene) { height: auto; min-height: 218px; }
html.sq-on #sq [data-sq="itemshop"] .is-cat-fit .is-ct:has(.is-cat-scene) > * { flex-shrink: 0; }
html.sq-on #sq [data-sq="itemshop"] .is-cat-fit .is-ct:only-child .i-pp.is-cat-scene { height: 139px; }
html.sq-on #sq [data-sq="itemshop"] .is-cat-fit .is-ct:only-child .i-pp.is-cat-scene img { width: 135px; height: 135px; }
#sq [data-sq="itemshop"] .is-cat-fit .is-ct .i-pp { height: 108px; }
#sq [data-sq="itemshop"] .is-cat-fit .is-ct .i-pp img { width: 105px; height: 105px; }
#sq [data-sq="itemshop"] .is-cat-fit .is-ct.i-set { height: 214px; }
#sq [data-sq="itemshop"] .is-cat-fit .is-cg.i-lk:has(> :only-child) { grid-template-columns: minmax(0,295px); justify-content: center; }
#sq [data-sq="itemshop"] .is-cat-fit .is-ct.i-set:only-child { height: 244px; }
#sq [data-sq="itemshop"] .is-cat-fit .is-ct.i-set:only-child .i-pp { height: 139px; }
#sq [data-sq="itemshop"] .is-cat-fit .is-ct.i-set:only-child .i-pp img { width: 135px; height: 135px; }
#sq [data-sq="itemshop"] .is-cat-fit .is-try { gap: 3px; }
#sq [data-sq="itemshop"] .is-cat-fit .is-try canvas { min-height: 60px; }
#sq [data-sq="itemshop"] .is-try .i-hd { position: relative; }
#sq .is-cat-end { position: absolute; top: 1px; bottom: 1px; right: 3px; width: 25px; padding: 0; border: 0; border-radius: 3px; background: #2b1c13b3; color: #ffe7ba; font: 700 17px/1 sans-serif; cursor: pointer; }
#sq .is-cat-slots { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); align-self: stretch; flex: none; gap: 3px; }
#sq [data-sq="itemshop"] .is-cat-slots label { display: flex; flex-direction: column; justify-content: center; gap: 0; border-radius: 4px; padding: 2px; }
#sq [data-sq="itemshop"] .is-cat-slots label img { width: 30px; height: 30px; }
#sq [data-sq="itemshop"] .is-cat-slots label span { font: 700 11px/1.2 'Noto Sans','Noto Sans Thai',sans-serif; }
#sq .is-cat-related { flex: none; }
#sq .is-cat-try-hair { display: flex; align-items: center; gap: 4px; color: #48392b; font: 600 11px/1.15 'Noto Sans','Noto Sans Thai',sans-serif; cursor: pointer; }
#sq .is-cat-foot {
  display: flex; align-items: center; justify-content: flex-end; gap: 6px; min-height: 34px; margin-top: 5px;
  border-top: 1px solid #b69a6c; color: #60462b; font: 600 12px/1.2 'Noto Sans','Noto Sans Thai',sans-serif; flex: none;
}
#sq .is-cat-foot > span { margin-right: auto; }
#sq .is-cat-foot button { display: inline-flex; align-items: center; gap: 5px; padding: 2px 7px; min-height: 28px; color: #473323; background: #f6e5bf; border: 1px solid #b59a70; border-radius: 4px; font-size: 12px; cursor: pointer; }
#sq .is-cat-foot img { width: 20px; height: 20px; object-fit: contain; }
#sq .is-cat-foot i { font: 700 16px/1 Georgia,serif; }
#sq [data-sq="itemshop"] :is(.is-cat-cover,.is-cat-scopes button,.is-cat-title button,.is-cat-foot button,.is-cat-related,.is-shop-tabs button,.is-cat-preview,.is-cat-empty button):focus-visible { outline: 2px solid #f5c25e; outline-offset: -3px; box-shadow: inset 0 0 0 4px #342833; }
html.mob #sq .is-cat-search, html.mob #sq .is-cat-scopes button { min-height: 41px; }
html.mob #sq .is-cat-search input { font-size: 16px; }
html.mob #sq .is-cat-foot button, html.mob #sq .is-cat-related { min-height: 31px; }
@media (max-width: 640px) and (orientation: portrait) {
  html.mob.nav-on #sq .win[data-sq="itemshop"]:has(.is-cat-tools:not([hidden])) {
    width: calc(100% - 74px - var(--sqsa-l,0px) - var(--sqsa-r,0px)) !important;
    height: min(900px, calc(100% - 24px - var(--sqsa-t,0px) - var(--sqsa-b,0px))) !important;
  }
  html.mob.nav-on #sq .win[data-sq="itemshop"]:has(.is-cat-tools:not([hidden])) .is-bd0 { height: calc(100% - 40px); }
  #sq .is-shop-tabs button { display: none; }
  #sq .is-shop-tabs .is-cat-type { display: flex; align-items: center; gap: 8px; width: 100%; padding: 1px 5px; color: #f4dfbd; font: 700 13px/1.1 'Noto Sans','Noto Sans Thai',sans-serif; }
  #sq .is-shop-tabs .is-cat-type > span { flex: none; height: auto; background: none; box-shadow: none; color: inherit; cursor: default; }
  #sq .is-cat-type select { flex: 1; min-width: 0; height: 37px; padding: 2px 7px; color: #3f2919; border: 1px solid #aa8454; border-radius: 4px; background: #fbefd2; font: inherit; }
  #sq .is-cat-bar { flex-wrap: wrap; gap: 6px; padding: 7px 9px; }
  #sq .is-cat-title h2 { font-size: 24px; }
  #sq .is-cat-search { flex: 1 1 100%; }
  #sq .is-cat-scopes { display: flex; flex-wrap: wrap; padding: 0; }
  #sq .is-cat-scopes > button { flex: 1 1 29%; }
  #sq .is-cat-scopes button { padding: 2px 3px; gap: 2px; min-width: 0; font-size: 12px; }
  #sq .is-cat-scopes img { display: none; }
  #sq .is-cat-covers { grid-template-columns: repeat(2,minmax(0,1fr)); grid-auto-rows: minmax(96px,1fr); }
  #sq .is-cat-covers > button:nth-child(n) { grid-column: auto; }
  #sq .is-cat-covers:has(> :nth-child(10):last-child) > :nth-child(n+7),
  #sq .is-cat-covers:has(> :nth-child(11):last-child) > :nth-child(n+4) { grid-column: auto; }
  #sq .is-cat-cover-copy { max-width: 85%; padding: 6px; }
  #sq .is-cat-cover strong { font-size: 19px; }
  #sq [data-sq="itemshop"] .is-cat-fit { flex-direction: column; gap: 5px; }
  #sq [data-sq="itemshop"] .is-cat-fit .is-cg.i-lk { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 5px; }
  #sq [data-sq="itemshop"] .is-cat-fit .is-cg.i-lk:has(> :only-child) { grid-template-columns: minmax(0,230px); }
  #sq [data-sq="itemshop"] .is-cat-fit .is-try { display: grid; grid-template-columns: minmax(68px,.8fr) minmax(0,1.4fr); flex: none; align-items: center; gap: 2px 7px; padding: 0 7px 5px; }
  #sq [data-sq="itemshop"] .is-cat-fit .is-try:not(:has(.i-tt)) { display: none; }
  #sq [data-sq="itemshop"] .is-cat-fit .is-try > * { grid-column: 2; }
  #sq [data-sq="itemshop"] .is-cat-fit .is-try .i-hd { grid-column: 1 / -1; margin: 0 -7px; }
  #sq [data-sq="itemshop"] .is-cat-fit .is-try canvas { grid-column: 1; grid-row: 2 / span 8; width: 100%; height: 104px; }
  #sq [data-sq="itemshop"] .is-cat-fit .is-try .is-cat-origin { text-align: center; }
  html.sq-on #sq [data-sq="itemshop"]:has(.is-cat-isekai-filter:not([hidden])) .is-cat-fit:has(.is-try .i-tt) .is-ct.i-set:only-child {
    min-height: 180px; height: auto;
  }
  html.sq-on #sq [data-sq="itemshop"]:has(.is-cat-isekai-filter:not([hidden])) .is-cat-fit:has(.is-try .i-tt) .is-ct.i-set:only-child .i-pp {
    height: 91px;
  }
  html.sq-on #sq [data-sq="itemshop"]:has(.is-cat-isekai-filter:not([hidden])) .is-cat-fit:has(.is-try .i-tt) .is-ct.i-set:only-child .i-pp img {
    width: 88px; height: 88px;
  }
  #sq .is-cat-foot { flex-wrap: wrap; justify-content: center; padding-top: 4px; }
  #sq .is-cat-foot > span { flex-basis: 100%; margin: 0; text-align: center; }
  #sq .is-cat-foot button { flex: 1; justify-content: center; }
  #sq .is-cat-fit ~ .is-cbar { gap: 4px; padding: 3px 0; flex-wrap: wrap; height: auto; }
  #sq .is-cat-fit ~ .is-cbar .i-qt b { width: 28px; }
  #sq .is-cat-fit ~ .is-cbar .i-nt { flex-basis: 100%; white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  #sq .is-cat-cover > img { transition: none; }
}

#sq [data-sq="itemshop"] .is-cat-slots label { position: relative; align-items: center; cursor: pointer; border: 1px solid #baaa8c; background: #f8f0de; color: #4d3928; }
#sq [data-sq="itemshop"] .is-cat-slots label:has(:checked) { border-color: #957032; background: #fff2c9; }
#sq .is-cat-slots input { position: absolute; top: 1px; right: 1px; margin: 0; width: 11px; height: 11px; accent-color: #805e2b; }
#sq .is-cat-slots label:focus-within { outline: 2px solid #274e75; }

/* css/sq-touch.css */
/* sq-touch.css — the new look (js/sq/, css/sq.css) on a phone and a tablet (html.mob: js/mobile.js), the owner of 17 Nov 2026:
   "เเก้ไข uxui สำหรับมือถือ เเละ tablet ทุกหน้าจอ responsive ให้ใช้ uxui ใหม่".
   One HUD, in the kit's look (square frames; the thumb's buttons round, the owner's pick; a 2 px ink line #352518 with a white inner line, navy fills, the yellow
   primary #d8b25e, Baloo 2 / Noto Sans Thai):
     from the new HUD (js/sq/hud.js)   the hero top left, the menu's pictures, the map, the place and the day's work top
                                       right, the chat (moved under the hero, the thumbs own the bottom), the EXP line, AUTO
     from the touch HUD (js/mobile.js) the joystick under the left thumb and, under the right, attack, four skills a page,
                                       the page button, the two bottles and the action button (a tree, a vein, Uncle Coco):
                                       made for a finger's hold, so they stay, drawn here in the kit's look
   What the PC's new HUD has for a mouse (eight skill squares, the bottles, rest / dash / attack in a row) and the old
   frame's own pieces (its hero frame, its map, zoom and clock, its quest strip; the touch HUD's chat, menu and EXP) are
   put out of sight. The windows themselves: js/sq/core.js (a touch scale, kept on the screen). */

/* ---- the old pieces the new HUD stands in for ---- */
html.mob.sq-on #hud > .cframe,
html.mob.sq-on #hud > .lstrack,
html.mob.sq-on #hud > .ol-hud,
html.mob.sq-on #mb-chat,
html.mob.sq-on #mb-chatline,
html.mob.sq-on #mb-menu,
html.mob.sq-on #mb-pop,
html.mob.sq-on #mb-exp,
html.mob.sq-on #mb-items .af { display: none !important; }
/* (the old map, zoom and clock: out of sight but drawing, the new HUD's map copies its picture) */
/* (and every piece out of sight here holds its animations: one running out of sight repainted the page every frame, js/sq/hud.js hideOld) */
html.mob.sq-on #hud > .tr, html.mob.sq-on #hud > .tr *, html.mob.sq-on #hud > #lstrack *, html.mob.sq-on #hud .qt-box * { animation-play-state: paused !important; }
html.mob.sq-on #hud > .tr { visibility: hidden !important; pointer-events: none !important; animation-play-state: paused !important; }
/* (the lessons' strip: its words are the new HUD's line of the day's work, which presses its buttons; out of sight as on a PC) */
html.mob.sq-on #hud > #lstrack { visibility: hidden !important; pointer-events: none !important; animation-play-state: paused !important; }
/* (the story's quest box of the old HUD, js/bible.js: the new HUD's quest line says it; it lay under that line, Feedback 05 F22) */
html.mob.sq-on #hud .qt-box { visibility: hidden !important; pointer-events: none !important; animation-play-state: paused !important; }
/* (the quest line folded: the chapter and the step with its พาไป, two lines as the HUD's places below it are laid for; the
   step's own small line (who and where) shows when it is opened. The step came back to touch with js/lessons.js folded()) */
html.mob.sq-on #sq .hud .wk:not(.open) [data-f="work"] > [data-a="w-step"] > div + div { display: none !important; }
html.mob.sq-on #sq .hud .wk.open { z-index: 4; }

/* ---- the PC's mouse row of the new HUD ---- */
html.mob.sq-on #sq .hud [data-a="slot"],
html.mob.sq-on #sq .hud [data-a="pot1"],
html.mob.sq-on #sq .hud [data-a="pot2"],
html.mob.sq-on #sq .hud [data-a="pot3"],
html.mob.sq-on #sq .hud [data-a="pot4"],
html.mob.sq-on #sq .hud [data-a="art0"],
html.mob.sq-on #sq .hud [data-a="art1"],
html.mob.sq-on #sq .hud [data-a="barpg"],
html.mob.sq-on #sq .hud [data-a="rest"],
html.mob.sq-on #sq .hud [data-a="dash"],
html.mob.sq-on #sq .hud [data-a="attack"] { display: none !important; }

/* ---- the joystick ---- */
/* (the dark-fantasy skin, the owner's pick A of 1 Dec 2026, css/sq-skin.css: a sunk dark ring in old gold, a gold knob) */
html.mob.sq-on #mb .mb-stick { background: radial-gradient(circle, rgba(28, 17, 9, 0.25) 40%, rgba(28, 17, 9, 0.6) 100%) !important; border: 0 !important;
  box-shadow: inset 0 0 0 1px #100a05, inset 0 0 0 3px rgba(168, 132, 63, 0.8), inset 0 0 0 4px rgba(16, 10, 5, 0.8), 0 0 0 1px rgba(16, 10, 5, 0.6) !important; }
html.mob.sq-on #mb .mb-stick .a { opacity: 0.7; filter: sepia(0.8) saturate(1.4); }
html.mob.sq-on #mb .mb-knob { background: radial-gradient(circle at 50% 32%, #f6e3a8, #c9a45a 55%, #7d5f26) !important; border: 0 !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45), 0 0 0 1px #100a05, 0 3px 6px rgba(5, 3, 8, 0.6) !important; }

/* ---- attack, the skills, the bottles, the page, dash, the Lore Book's slots, AUTO: round, a mobile game's buttons in the
   kit's colours (navy fill, the 2 px ink line, a white inner line; the action button a yellow pill). The owner's pick of
   17 Nov, "A ปุ่มกลม", after "เเถบสกิลมันรกไปไหม จัดวาง เเบบเกมมือถือได้ไหม" (they were the kit's squares that morning) ---- */
html.mob.sq-on #mb .mb-attack,
html.mob.sq-on #mb #mb-skills .hslot,
html.mob.sq-on #mb #mb-items .hslot.item,
html.mob.sq-on #mb .mb-page,
html.mob.sq-on #hs-dash.hslot,
html.mob.sq-on .hslot.blart {
  border-radius: 50% !important; background: var(--sk-well) !important; border: 0 !important;
  box-shadow: inset 0 0 0 1px #100a05, inset 0 0 0 3px var(--sk-gold-mid), inset 0 0 0 4px #100a05, 0 0 0 1px #100a05, 0 3px 6px rgba(5, 3, 8, 0.55) !important;
}
/* (attack: the crimson stone in its gold ring) */
html.mob.sq-on #mb .mb-attack { background: radial-gradient(circle at 50% 32%, #d9465c, #7d0f22 66%, #4a0814) !important;
  box-shadow: inset 0 0 0 2px #100a05, inset 0 0 0 5px var(--sk-gold-mid), inset 0 0 0 6px #100a05, inset 0 -12px 16px rgba(0, 0, 0, 0.35), 0 0 0 1px #100a05, 0 4px 10px rgba(5, 3, 8, 0.6) !important; }
html.mob.sq-on #mb .mb-attack img { filter: sepia(0.6) saturate(1.2) brightness(1.15) drop-shadow(0 1px 1px rgba(0, 0, 0, 0.8)); }
html.mob.sq-on #sq .hud .ab-tray { display: none !important; }
html.mob.sq-on #mb #mb-skills .hslot img,
html.mob.sq-on #hs-dash.hslot img,
html.mob.sq-on .hslot.blart img { left: 6% !important; top: 6% !important; width: 88% !important; height: 88% !important; object-fit: cover; border-radius: 50% !important; }
html.mob.sq-on #mb #mb-skills .hslot .cd,
html.mob.sq-on #hs-dash.hslot .cd,
html.mob.sq-on .hslot.blart .cd,
html.mob.sq-on #mb #mb-items .hslot.item .cd { border-radius: 50% !important; }
html.mob.sq-on #mb .mb-attack b,
html.mob.sq-on #mb .mb-act b,
html.mob.sq-on #mb .mb-page { font-family: 'Noto Sans Thai', 'Baloo 2', sans-serif !important; font-weight: 700 !important;
  -webkit-text-stroke: 0 !important; text-shadow: 0 1px 2px rgba(5, 3, 8, 0.95) !important; color: #ffffff !important; }
html.mob.sq-on #mb .mb-page { font-family: 'Baloo 2', sans-serif !important; }
html.mob.sq-on #mb .mb-attack.life { background: var(--sk-primary) !important; }
html.mob.sq-on #mb .mb-attack.life b { color: var(--sk-primary-ink) !important; text-shadow: none !important; }
/* (the SP a skill costs: a small tag under its circle) */
html.mob.sq-on #mb #mb-skills .hslot .spc { border-radius: 7px !important; background: linear-gradient(180deg, #2f74cf, #173e86) !important; border: 1px solid #100a05 !important; font-family: 'Baloo 2', sans-serif !important;
  font-size: calc(10 * var(--tu)) !important; line-height: calc(13 * var(--tu)) !important; padding: 0 calc(4 * var(--tu)) !important; bottom: calc(-6 * var(--tu)) !important; }
html.mob.sq-on #mb #mb-items .hslot.item .count { font-family: 'Baloo 2', sans-serif !important; -webkit-text-stroke: 0 !important;
  text-shadow: 0 1px 2px rgba(5, 3, 8, 0.95), 0 0 3px rgba(5, 3, 8, 0.9) !important; color: #ffffff !important; }
html.mob.sq-on #mb .mb-act { border-radius: calc(23 * var(--tu)) !important; background: var(--sk-primary) !important; border: 0 !important;
  box-shadow: inset 0 0 0 1px #6b4d17, inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 0 0 1px #100a05, 0 3px 6px rgba(5, 3, 8, 0.5) !important; }
html.mob.sq-on #mb .mb-act b { color: var(--sk-primary-ink) !important; text-shadow: none !important; }
html.mob.sq-on #mb #mb-skills .hslot.ult { box-shadow: inset 0 0 0 1px #100a05, inset 0 0 0 3px var(--sk-crimson-hi), inset 0 0 0 4px #100a05, 0 0 0 1px #100a05, 0 0 10px rgba(217, 70, 92, 0.5) !important; }
/* (nothing empty is shown: a skill slot with no skill, a Lore Book slot with no art; a skill goes on the bar in the skill
   window, ใส่แถบสกิล, which has its own slots) */
html.mob.sq-on #mb #mb-skills .hslot.empty,
html.mob.sq-on .hslot.blart.empty { visibility: hidden !important; }
/* (AUTO a round button of the cluster too: its picture over its word; its state line beside it) */
html.mob.sq-on #sq .hud [data-a="autoT"] { width: calc(48 * var(--tu) / var(--sqk)) !important; height: calc(48 * var(--tu) / var(--sqk)) !important; min-width: 0 !important;
  border-radius: 50% !important; flex-direction: column !important; justify-content: center !important; gap: 0 !important; padding: 0 !important;
  font-size: calc(10 * var(--tu) / var(--sqk)) !important; line-height: 1 !important; }
html.mob.sq-on #sq .hud [data-a="autoT"] img { width: calc(22 * var(--tu) / var(--sqk)) !important; height: calc(22 * var(--tu) / var(--sqk)) !important; margin: 0 !important; }
/* (AUTO อาชีพเสริม the same: a PC's pill over AUTO stood, on a touch screen, at its board's place over the ring's third and
   fourth skills, 24 px high under them (the WebKit audit of 25 Nov 2026, docs/team/touch-webkit-20261125.md). A round button
   of the cluster, its picture over its two words, one a line (the wide word-spacing turns the line at the space: Thai turned
   inside อาชีพเสริม first); its place on the ring is in the layouts below) */
html.mob.sq-on #sq .hud [data-a="lifeT"] { width: calc(48 * var(--tu) / var(--sqk)) !important; height: calc(48 * var(--tu) / var(--sqk)) !important; min-width: 0 !important;
  border-radius: 50% !important; flex-direction: column !important; justify-content: center !important; gap: 0 !important; padding: 0 !important;
  font-family: 'Noto Sans Thai', 'Baloo 2', sans-serif !important; font-size: calc(8 * var(--tu) / var(--sqk)) !important; line-height: 1.08 !important; white-space: normal !important; text-align: center !important; word-spacing: 30px; }
html.mob.sq-on #sq .hud [data-a="lifeT"] img { width: calc(17 * var(--tu) / var(--sqk)) !important; height: calc(17 * var(--tu) / var(--sqk)) !important; margin: 0 !important; }
/* (the EXP words over the bar's left end: beside its right end they lay under the skills) */
html.mob.sq-on #sq .hud [data-p="bc"] > .sh:has([data-f="xp"]) { left: -228px !important; top: -34px !important; }

/* ---- the windows: a title bar takes a finger's drag (js/sq/core.js) ---- */
html.mob.sq-on #sq > .win > .tb { touch-action: none; }
html.mob.sq-on #sq > .win { -webkit-tap-highlight-color: transparent; }

/* ---- the safe area (Feedback 01 F10, 05 F04, 20-23 Nov 2026): the page runs to the glass's edges (viewport-fit=cover), and an
   iPhone's notch and rounded corners, the home bar and Safari's bars lie over them. The HUD stands inside it (the board pixels
   js/sq/core.js safeArea puts on #sq: the EXP line was under the home bar, the left column under the notch held sideways);
   its pieces placed `fixed` stand on the HUD's own box (the transform makes it theirs). The thumb buttons the same, in screen
   pixels. The windows: js/sq/core.js keepIn. A PC and a screen without a notch: every inset 0, nothing moves ---- */
html.mob.sq-on #sq > .hud { left: var(--sqsa-l, 0px); top: var(--sqsa-t, 0px); right: var(--sqsa-r, 0px); bottom: var(--sqsa-b, 0px); transform: translateZ(0); }
/* (the map window on a screen too short for its board: js/sq/map.js fitShort makes the drops page as short as the map; its
   table scrolls and its foot, พาไปที่นั่น, stays in view) */
html.mob.sq-on #sq [data-sq="map"] [data-f="md"] > .md-view { height: 100% !important; }
/* (Uncle Coco's bench: a cell of the bag or the storage dragged across by a finger, js/sq/shop.js cellDown; up and down stay the list's scroll) */
html.mob.sq-on #sq [data-sq="shopbag"] .sl, html.mob.sq-on #sq [data-sq="store"] .sl { touch-action: pan-y; }
html.mob.sq-on #mb { left: env(safe-area-inset-left, 0px); top: env(safe-area-inset-top, 0px); right: env(safe-area-inset-right, 0px); bottom: env(safe-area-inset-bottom, 0px); transform: translateZ(0); }

/* ======== the layout: the owner's picks of 17 Nov 2026, by button among in-game pictures: "A โค้งรอบปุ่มโจมตี" (a phone),
   "A สองวงรอบปุ่มโจมตี" (an iPad), then "A ปุ่มกลม" (round buttons hugging attack, nothing empty shown, AUTO in the ring, the
   bottles and the Lore Book's slots in a row at the bottom). Every button sized for a finger, in screen pixels: --tu is 1 px on
   a phone and 1.1 on a tablet (a tablet's pixel is already a little bigger; before, js/mobile.js grew the thumb controls x1.7
   on a tablet while the HUD's top stayed as it was). Attack 88, a skill 56, dash 52, AUTO and a bottle 48, the Lore Book's
   slots 46, the page 44, the action button 46 high, the joystick 120: none under the 44 a finger needs. The places are worked
   out on rings round attack's centre (60, 60 from the corner): the inner ring 106 out, the outer 174, a tablet's third 240 ======== */
html.mob.sq-on { --tu: 1px; }
@media (min-width: 600px) and (min-height: 600px) { html.mob.sq-on { --tu: 1.1px; } }
html.mob.sq-on #mb .mb-zone { position: fixed !important; left: 0 !important; bottom: 0 !important; width: 45vw !important; height: 70vh !important; }
html.mob.sq-on #mb .mb-stick { position: fixed !important; left: calc(26 * var(--tu)) !important; bottom: calc(22 * var(--tu)) !important; right: auto !important; top: auto !important; width: calc(120 * var(--tu)) !important; height: calc(120 * var(--tu)) !important; margin: 0 !important; transform: none !important; }
html.mob.sq-on #mb .mb-knob { width: calc(50 * var(--tu)) !important; height: calc(50 * var(--tu)) !important; margin: calc(-25 * var(--tu)) 0 0 calc(-25 * var(--tu)) !important; }
html.mob.sq-on #mb .mb-attack { position: fixed !important; transform: none !important; margin: 0 !important; left: auto !important; top: auto !important; width: calc(88 * var(--tu)) !important; height: calc(88 * var(--tu)) !important; right: calc(16 * var(--tu)) !important; bottom: calc(16 * var(--tu)) !important; }
html.mob.sq-on #mb .mb-attack img { width: calc(44 * var(--tu)) !important; height: calc(44 * var(--tu)) !important; }
html.mob.sq-on #mb .mb-attack b { font-size: calc(14 * var(--tu)) !important; }
html.mob.sq-on #mb #mb-skills .hslot { position: fixed !important; transform: none !important; margin: 0 !important; left: auto !important; top: auto !important; width: calc(56 * var(--tu)) !important; height: calc(56 * var(--tu)) !important; }
html.mob.sq-on #mb #mb-skills .hslot .cdt { font-size: calc(18 * var(--tu)) !important; }
html.mob.sq-on #mb .mb-page { position: fixed !important; transform: none !important; margin: 0 !important; left: auto !important; top: auto !important; width: calc(44 * var(--tu)) !important; height: calc(44 * var(--tu)) !important; font-size: calc(12 * var(--tu)) !important; display: flex !important; align-items: center; justify-content: center; }
html.mob.sq-on #mb .mb-page[hidden] { display: none !important; }
html.mob.sq-on .hslot.item { position: fixed !important; transform: none !important; margin: 0 !important; left: auto !important; top: auto !important; width: calc(48 * var(--tu)) !important; height: calc(48 * var(--tu)) !important; }
html.mob.sq-on #hs-dash.hslot, html.mob.sq-on .hslot.blart { position: fixed !important; transform: none !important; margin: 0 !important; left: auto !important; top: auto !important; }
html.mob.sq-on #hs-dash.hslot { width: calc(52 * var(--tu)) !important; height: calc(52 * var(--tu)) !important; }
html.mob.sq-on .hslot.blart { width: calc(46 * var(--tu)) !important; height: calc(46 * var(--tu)) !important; }
html.mob.sq-on #mb .mb-act { position: fixed !important; transform: none !important; margin: 0 !important; left: auto !important; top: auto !important; height: calc(46 * var(--tu)) !important; min-width: calc(96 * var(--tu)) !important; width: auto !important; padding: 0 calc(12 * var(--tu)) !important; }
html.mob.sq-on #mb .mb-act img { width: calc(28 * var(--tu)) !important; height: calc(28 * var(--tu)) !important; }
html.mob.sq-on #mb .mb-act b { font-size: calc(15 * var(--tu)) !important; }

/* ---- a phone: four skills on the inner ring round attack (a group of four; the page button for the next group that holds a skill, of the bar's two pages), dash, AUTO
   and the page button on the outer ring, the bottles and the Lore Book's two in a row at the bottom with the action button
   over them. The top kept for reading: the day's work and the chat under the hero (the right is the thumb's), the map's
   place line; the clock and the server's line go (no room on a phone's height) ---- */
html.mob.sq-on #mb #mb-skills .hslot:nth-child(4n+1) { right: calc(138 * var(--tu)) !important; bottom: calc(23 * var(--tu)) !important; }
html.mob.sq-on #mb #mb-skills .hslot:nth-child(4n+2) { right: calc(125 * var(--tu)) !important; bottom: calc(82 * var(--tu)) !important; }
html.mob.sq-on #mb #mb-skills .hslot:nth-child(4n+3) { right: calc(82 * var(--tu)) !important; bottom: calc(125 * var(--tu)) !important; }
html.mob.sq-on #mb #mb-skills .hslot:nth-child(4n+4) { right: calc(23 * var(--tu)) !important; bottom: calc(138 * var(--tu)) !important; }
html.mob.sq-on #hs-dash.hslot { right: calc(52 * var(--tu)) !important; bottom: calc(207 * var(--tu)) !important; }
html.mob.sq-on #mb .mb-page { right: calc(186 * var(--tu)) !important; bottom: calc(130 * var(--tu)) !important; }
html.mob.sq-on #sq .hud [data-a="autoT"] { right: calc(128 * var(--tu) / var(--sqk)) !important; top: calc(-232 * var(--tu) / var(--sqk)) !important; }
/* (the thumb's fan, css/sq-skin.css .ufw: left of AUTO on the outer ring's top; AUTO's line of what it is doing goes over AUTO) */
html.mob.sq-on #sq .hud .ufw { right: calc(186 * var(--tu) / var(--sqk)); top: calc(-232 * var(--tu) / var(--sqk)); }
html.mob.sq-on #sq .hud [data-f="afs"] { right: calc(128 * var(--tu) / var(--sqk)) !important; top: calc(-254 * var(--tu) / var(--sqk)) !important; }
/* (AUTO อาชีพเสริม on the outer ring's low end: between the page button over it, the bottles under it, the action button at its
   left and the first skill at its right) */
html.mob.sq-on #sq .hud [data-a="lifeT"] { right: calc(204 * var(--tu) / var(--sqk)) !important; top: calc(-118 * var(--tu) / var(--sqk)) !important; }
html.mob.sq-on #mb-items > .hslot.item:nth-child(2) { right: calc(210 * var(--tu)) !important; bottom: calc(14 * var(--tu)) !important; }
html.mob.sq-on #mb-items > .hslot.item:nth-child(1) { right: calc(264 * var(--tu)) !important; bottom: calc(14 * var(--tu)) !important; }
/* (quick slots 3 / 4, keys 9 / 0 on a PC, the owner 25 Nov 2026: shown once the player has put something in them, the
   thumb's cluster showing nothing empty; filled from the item card's ใส่ช่อง 3 / 4. Over the two bottles' row's left end) */
html.mob.sq-on #mb-items > .hslot.item.empty[data-qs] { display: none !important; } /* (slots 1 / 2 emptied stay in place, a long press fills them: Feedback 07 F07) */
html.mob.sq-on #mb-items > .hslot.item:nth-child(3) { right: calc(424 * var(--tu)) !important; bottom: calc(14 * var(--tu)) !important; }
html.mob.sq-on #mb-items > .hslot.item:nth-child(4) { right: calc(478 * var(--tu)) !important; bottom: calc(14 * var(--tu)) !important; }
/* (a narrow phone sideways, 750 wide or less: slot 4 reaches the EXP words, which give way while slot 3 or 4 is in use,
   body.qs34 of js/quickslots.js; the two bars stay, as on a phone upright) */
@media (max-width: 760px) and (orientation: landscape) { html.mob.sq-on body.qs34 #sq .hud [data-p="bc"] > .sh:has([data-f="xp"]) { display: none !important; } }
html.mob.sq-on #hs-blart0.hslot { right: calc(318 * var(--tu)) !important; bottom: calc(15 * var(--tu)) !important; }
html.mob.sq-on #hs-blart1.hslot { right: calc(370 * var(--tu)) !important; bottom: calc(15 * var(--tu)) !important; }
html.mob.sq-on #mb .mb-act { right: calc(264 * var(--tu)) !important; bottom: calc(74 * var(--tu)) !important; }
html.mob.sq-on #sq .hud [data-f="clock"],
html.mob.sq-on #sq .hud [data-f="srv"] { display: none !important; }
html.mob.sq-on #sq .hud [data-f="wk"] { position: fixed !important; right: auto !important; left: 12px !important; top: 84px !important; }
html.mob.sq-on #sq .hud [data-p="bl"] { top: 134px !important; } /* (under the day's work of two lines) */
html.mob.sq-on #sq .hud [data-a="chat"] { top: 0 !important; width: 54px !important; height: 54px !important; }
html.mob.sq-on #sq .hud [data-a="mail"] { top: 62px !important; width: 54px !important; height: 54px !important; } /* (mail under the chat on touch: over it is the day's work) */
html.mob.sq-on #sq .hud [data-a="bell"] { top: 124px !important; width: 54px !important; height: 54px !important; } /* (the announcements' bell under the mail: docs/team/ingame-announcements-20261123.md 2.6) */
html.mob.sq-on #sq .hud [data-f="chatwrap"] { top: 0 !important; bottom: auto !important; left: 74px !important; width: 330px !important; max-height: 168px; overflow: hidden; }
/* (a phone on its side: under the mail the bell would stand on the joystick, so it takes the free cell right of the mail and the
   chat's lines move one cell right; measured on the real HUD at 844 x 390 by tests/browser/announce-layout-20261123.spec.mjs; every rule
   here stands under html.mob.sq-on, tests/sq-touch-20261117.test.mjs: the side is the media query's) */
@media (max-height: 599px) and (orientation: landscape) {
  html.mob.sq-on #sq .hud [data-a="bell"] { left: 74px !important; top: 62px !important; }
  html.mob.sq-on #sq .hud [data-f="chatwrap"] { left: 136px !important; }
  /* (the place and the channel on the map's own foot: under the map they lay under the dash button on every phone held
     sideways, 4 px at 844 x 390 and 14 at 750 x 340; the WebKit audit of 25 Nov 2026, docs/team/touch-webkit-20261125.md. As wide as
     the map and standing on its foot: a long name, an English one, takes a second line upward, not a place over the sky window) */
  html.mob.sq-on #sq .hud [data-f="zl"] { top: auto !important; bottom: -138px !important; right: 14px !important; width: 124px !important; min-width: 0 !important; white-space: normal !important; line-height: 1.5; padding: 2px 0 1px; background: var(--sk-plate); }
}
/* (a phone sideways in Safari with its bars, 750 x 340, or any screen 360 high or less: the map, the sky window, dash and the
   ring do not fit one over the other at their sizes: dash lay 31 px over the map and the sky window 11 over AUTO. The map 100
   board pixels, the sky window at 0.8 beside it, dash a little lower on the ring) */
@media (max-height: 360px) and (orientation: landscape) {
  html.mob.sq-on #sq .hud [data-a="M"] { left: -112px !important; width: 100px !important; height: 100px !important; }
  html.mob.sq-on #sq .hud [data-a="M"] > canvas { left: -19px !important; top: -19px !important; width: 134px !important; height: 134px !important; }
  html.mob.sq-on #sq .hud [data-f="zl"] { bottom: -110px !important; width: 96px !important; }
  html.mob.sq-on #sq .hud [data-f="dn"] { left: -206px !important; top: 62px !important; transform: scale(0.8); transform-origin: 100% 0; }
  html.mob.sq-on #hs-dash.hslot { bottom: calc(198 * var(--tu)) !important; }
}
/* (a narrow phone sideways, 667 x 375: the top row's eight pictures at their board's 54 apart reached over the hero's bars,
   Premium 9 px into the HP line. 50 apart and 46 wide, the row's right end where it was) */
@media (max-width: 700px) and (orientation: landscape) {
  html.mob.sq-on #sq .hud .mi.mt { width: 46px !important; }
  html.mob.sq-on #sq .hud .mi.mt[data-a="menu"] { left: -196px !important; }
  html.mob.sq-on #sq .hud .mi.mt[data-a="events"] { left: -246px !important; }
  html.mob.sq-on #sq .hud .mi.mt[data-a="auto"] { left: -296px !important; }
  html.mob.sq-on #sq .hud .mi.mt[data-a="K"] { left: -346px !important; }
  html.mob.sq-on #sq .hud .mi.mt[data-a="I"] { left: -396px !important; }
  html.mob.sq-on #sq .hud .mi.mt[data-a="gacha"] { left: -446px !important; }
  html.mob.sq-on #sq .hud .mi.mt[data-a="topup"] { left: -496px !important; }
  html.mob.sq-on #sq .hud .mi.mt[data-a="pjshop"] { left: -546px !important; }
}

/* ---- a tablet (600 px or more both ways): all eight skills, four on the inner ring and four on the outer with dash at its
   top end (the page button turns the bar's page 1 / page 2 once page 2 holds a skill), AUTO over dash, the same bottom row. The top as a PC's: the menu with its words, the map with
   its place, clock and server lines, the day's work under it; the chat under the hero ---- */
@media (min-width: 600px) and (min-height: 600px) {
  html.mob.sq-on #mb #mb-skills .hslot { display: block !important; }
  /* (the page button: the bar's page 2, on the third ring between the outer ring's last skill and AUTO; hidden while
     page 2 holds nothing, js/mobile.js pageButton) */
  html.mob.sq-on #mb .mb-page { right: calc(151 * var(--tu)) !important; bottom: calc(250 * var(--tu)) !important; }
  html.mob.sq-on #mb #mb-skills .hslot:nth-child(1) { right: calc(138 * var(--tu)) !important; bottom: calc(23 * var(--tu)) !important; }
  html.mob.sq-on #mb #mb-skills .hslot:nth-child(2) { right: calc(125 * var(--tu)) !important; bottom: calc(82 * var(--tu)) !important; }
  html.mob.sq-on #mb #mb-skills .hslot:nth-child(3) { right: calc(82 * var(--tu)) !important; bottom: calc(125 * var(--tu)) !important; }
  html.mob.sq-on #mb #mb-skills .hslot:nth-child(4) { right: calc(23 * var(--tu)) !important; bottom: calc(138 * var(--tu)) !important; }
  html.mob.sq-on #mb #mb-skills .hslot:nth-child(5) { right: calc(205 * var(--tu)) !important; bottom: calc(17 * var(--tu)) !important; }
  html.mob.sq-on #mb #mb-skills .hslot:nth-child(6) { right: calc(198 * var(--tu)) !important; bottom: calc(84 * var(--tu)) !important; }
  html.mob.sq-on #mb #mb-skills .hslot:nth-child(7) { right: calc(165 * var(--tu)) !important; bottom: calc(144 * var(--tu)) !important; }
  html.mob.sq-on #mb #mb-skills .hslot:nth-child(8) { right: calc(112 * var(--tu)) !important; bottom: calc(186 * var(--tu)) !important; }
  html.mob.sq-on #hs-dash.hslot { right: calc(49 * var(--tu)) !important; bottom: calc(207 * var(--tu)) !important; }
  html.mob.sq-on #sq .hud [data-a="autoT"] { right: calc(78 * var(--tu) / var(--sqk)) !important; top: calc(-320 * var(--tu) / var(--sqk)) !important; }
  html.mob.sq-on #sq .hud .ufw { right: calc(134 * var(--tu) / var(--sqk)); top: calc(-320 * var(--tu) / var(--sqk)); }
  html.mob.sq-on #sq .hud [data-f="afs"] { right: calc(78 * var(--tu) / var(--sqk)) !important; top: calc(-344 * var(--tu) / var(--sqk)) !important; }
  /* (AUTO อาชีพเสริม on the third ring, 26 degrees up: clear of the outer ring's skills and of the action button) */
  html.mob.sq-on #sq .hud [data-a="lifeT"] { right: calc(258 * var(--tu) / var(--sqk)) !important; top: calc(-194 * var(--tu) / var(--sqk)) !important; }
  html.mob.sq-on #mb-items > .hslot.item:nth-child(2) { right: calc(292 * var(--tu)) !important; bottom: calc(14 * var(--tu)) !important; }
  html.mob.sq-on #mb-items > .hslot.item:nth-child(1) { right: calc(348 * var(--tu)) !important; bottom: calc(14 * var(--tu)) !important; }
  html.mob.sq-on #mb-items > .hslot.item:nth-child(3) { right: calc(510 * var(--tu)) !important; bottom: calc(14 * var(--tu)) !important; }
  html.mob.sq-on #mb-items > .hslot.item:nth-child(4) { right: calc(564 * var(--tu)) !important; bottom: calc(14 * var(--tu)) !important; }
  html.mob.sq-on #hs-blart0.hslot { right: calc(404 * var(--tu)) !important; bottom: calc(15 * var(--tu)) !important; }
  html.mob.sq-on #hs-blart1.hslot { right: calc(456 * var(--tu)) !important; bottom: calc(15 * var(--tu)) !important; }
  html.mob.sq-on #mb .mb-act { right: calc(292 * var(--tu)) !important; bottom: calc(76 * var(--tu)) !important; }
  html.mob.sq-on #sq .hud [data-f="clock"],
  html.mob.sq-on #sq .hud [data-f="srv"] { display: block !important; }
  html.mob.sq-on #sq .hud [data-f="wk"] { position: absolute !important; left: auto !important; right: 12px !important; top: 196px !important; }
  html.mob.sq-on #sq .hud [data-p="bl"] { top: 84px !important; }
}

/* ---- a phone held upright (html.mob-port): the menu's pictures under the hero (beside the map they covered his name), the
   day's work and the chat under them; the bottles, the Lore Book's slots and the action button over the joystick (at the
   bottom they lay on the ring). (#sq is scaled by a transform, so a fixed box inside it stands on #sq's own corner, in board
   pixels: the pictures sit 416 .. 150 px left of their row's corner) ---- */
/* (eight pictures since 20 Nov 2026, Premium · เติมเพชร · กาชา at the row's left end: with the row's corner at 530 Premium stood
   48 px off the screen's left edge, and on a phone กิจกรรม and เมนู lay under the sky window and the map, the menu out of a
   finger's reach (the WebKit audit of 25 Nov 2026, docs/team/touch-webkit-20261125.md). The row's corner at 586: Premium at 8.
   A phone: the row under the map and the sky window, the day's work and the chat under it. A tablet: the row under the hero as
   before, the day's work at the right under the map's lines as when it is held sideways (at 138 it lay over the clock) */
html.mob-port.sq-on #sq .hud [data-p="tr"] [data-f="grid"] { position: fixed; left: 586px; top: 78px; }
html.mob-port.sq-on #sq .hud [data-p="bl"] { top: 188px !important; }
@media (max-width: 599px) {
  /* (the sky window a little lower: its ring lay 8 px over the hero's line of coins and weight) */
  html.mob-port.sq-on #sq .hud [data-f="dn"] { top: 80px !important; }
  html.mob-port.sq-on #sq .hud [data-p="tr"] [data-f="grid"] { top: 160px; }
  html.mob-port.sq-on #sq .hud [data-f="wk"] { top: 228px !important; }
  html.mob-port.sq-on #sq .hud [data-p="bl"] { top: 278px !important; }
}
/* (the EXP words: no room between the joystick and the ring on a phone's width; the two bars stay) */
@media (max-width: 599px) { html.mob-port.sq-on #sq .hud [data-p="bc"] > .sh:has([data-f="xp"]) { display: none !important; } }
html.mob-port.sq-on #mb-items > .hslot.item:nth-child(1) { right: auto !important; left: calc(26 * var(--tu)) !important; bottom: calc(160 * var(--tu)) !important; }
html.mob-port.sq-on #mb-items > .hslot.item:nth-child(2) { right: auto !important; left: calc(82 * var(--tu)) !important; bottom: calc(160 * var(--tu)) !important; }
/* (quick slots 3 / 4 on a phone upright: over the action button, the left column's top; beside the bottles they lay over
   the page button and AUTO) */
html.mob-port.sq-on #mb-items > .hslot.item:nth-child(3) { right: auto !important; left: calc(26 * var(--tu)) !important; bottom: calc(328 * var(--tu)) !important; }
html.mob-port.sq-on #mb-items > .hslot.item:nth-child(4) { right: auto !important; left: calc(82 * var(--tu)) !important; bottom: calc(328 * var(--tu)) !important; }
html.mob-port.sq-on #hs-blart0.hslot { right: auto !important; left: calc(27 * var(--tu)) !important; bottom: calc(216 * var(--tu)) !important; }
html.mob-port.sq-on #hs-blart1.hslot { right: auto !important; left: calc(83 * var(--tu)) !important; bottom: calc(216 * var(--tu)) !important; }
html.mob-port.sq-on #mb .mb-act { right: auto !important; left: calc(26 * var(--tu)) !important; bottom: calc(272 * var(--tu)) !important; }
/* (AUTO อาชีพเสริม beside the Lore Book's slots: on a phone's width the ring's low end is the joystick's) */
html.mob-port.sq-on #sq .hud [data-a="lifeT"] { position: fixed !important; right: auto !important; top: auto !important; left: calc(139 * var(--tu) / var(--sqk)) !important; bottom: calc(215 * var(--tu) / var(--sqk)) !important; }
/* (the thumb's fan upright: beside the bottles, under AUTO อาชีพเสริม; it opens upward, css/sq-skin.css) */
html.mob-port.sq-on #sq .hud .ufw { position: fixed; right: auto; top: auto; left: calc(140 * var(--tu) / var(--sqk)); bottom: calc(160 * var(--tu) / var(--sqk)); }

/* the item card's whole look (js/sq/wcard.js cardfull, 716 wide in two columns) upright: one column 360 wide, the piece's
   numbers first and its rows under them, the buttons wrapping */
html.mob-port.sq-on #sq .win[data-sq="cardfull"] { width: 360px !important; }
html.mob-port.sq-on #sq .win[data-sq="cardfull"] > div[style*="gap: 14px"] { flex-direction: column; max-height: none !important; }
html.mob-port.sq-on #sq .win[data-sq="cardfull"] > div[style*="gap: 14px"] > div[style*="width: 322px"] { width: auto !important; }
html.mob-port.sq-on #sq .win[data-sq="cardfull"] > div[style*="gap: 14px"] > div[style*="width: 1px"] { display: none; }
html.mob-port.sq-on #sq .win[data-sq="cardfull"] [data-keep="cardr"] { overflow: visible !important; }
html.mob-port.sq-on #sq .win[data-sq="cardfull"] > .ft { flex-wrap: wrap; row-gap: 6px; padding-top: 6px; padding-bottom: 6px; }

/* ---- what only a keyboard and a mouse mean: the keys' small chips (I, C, ESC, Space ...) and the select screen's
   "double click · Enter · arrows" line. A finger has none of them ---- */
html.mob.sq-on #sq .kb,
html.mob.sq-on #sq .hud .mi > i,
html.mob.sq-on #sq .hud .mp > .tb > span,
html.mob.sq-on .cs-hint { display: none !important; }

/* ---- the screens before the game (js/sq/pregame.js): the language bar beside the Discord button at the bottom left, where it
   covers nothing (at the bottom right it lay over the server panel's เข้าเกม on a phone held sideways); the panels are kept on
   the screen by keepIn ---- */
#sq .pg .pg-language-label { font-size: 12px; font-weight: 700; }
#sq .pg .pg-languages { display: inline-flex; gap: 3px; }
#sq .pg .pg-languages button {
  padding: 5px 8px; border: 1px solid #b9a684; border-radius: 2px;
  background: #f7f2e8; color: #37271b; font-family: inherit;
  font-size: 12px; font-weight: 700; line-height: 1.2; cursor: pointer; white-space: nowrap;
}
#sq .pg .pg-languages button[aria-pressed="true"] { background: linear-gradient(180deg, #533721, #1e130a); color: #f0dcaa; border-color: #a8843f; }
#sq .pg .pg-languages button:focus-visible { outline: 2px solid #d38b1b; outline-offset: 1px; }
#sq .settings-languages { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: 3px; }
#sq .settings-languages button { min-height: 29px; padding: 2px 6px; color: #37271b; background: #f7f2e8; border: 1px solid #b9a684; font: inherit; cursor: pointer; }
#sq .settings-languages button[aria-pressed="true"] { background: linear-gradient(180deg, #533721, #1e130a); color: #f0dcaa; border-color: #a8843f; }
#sq .settings-languages button:focus-visible { outline: 2px solid #d38b1b; outline-offset: 1px; }
html.mob #sq .settings-languages button { min-height: 36px; }
html.mob.sq-on #sq .pg [data-p="lang"] { right: 10px !important; left: auto !important; }
html.mob.sq-on #sq .pg .pg-language-label { display: none; }
html.mob.sq-on #sq .pg .pg-languages button { min-height: 38px; }
/* a phone held sideways: the languages beside the Discord button, or they lay over "Enter" and the hero's card (2 Dec 2026) */
@media (max-height: 599px) and (orientation: landscape) {
  html.mob.sq-on #sq .pg [data-p="lang"] { left: 216px !important; right: auto !important; bottom: 14px !important; transform: scale(0.72); transform-origin: left bottom; }
  html.mob.sq-on #sq .pg [data-p="hint"] { display: none; }
  html.mob.sq-on #sq .pg [data-p="bar"] { left: 31% !important; bottom: 88px !important; }
}

/* ---- a phone held upright and a window too small to read (js/sq/core.js turnCheck): a card asks for the phone to be turned
   (the owner's pick of 17 Nov 2026, "ให้หมุนจอเป็นแนวนอน"); it closes those windows on its button ---- */
html.mob.sq-on #sq > .sq-turn { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(10, 16, 34, 0.62); pointer-events: auto; }
html.mob.sq-on #sq > .sq-turn[hidden] { display: none; }
html.mob.sq-on #sq > .sq-turn > .tc { width: 320px; background: #ffffff; border: 2px solid #352518; box-shadow: 0 3px 0 rgba(10, 6, 14, 0.28); }
html.mob.sq-on #sq > .sq-turn > .tc > .tx { padding: 14px 14px 12px; font-weight: 600; font-size: 14px; line-height: 1.5; color: #352518; text-align: center; }

/* ---- the fashion show switches (js/sq/equip.js แฟชั่นที่ใส่, js/sq/wardrobe.js; the owner, 22 Nov 2026): a finger's size ---- */
html.mob.sq-on #sq [data-sq="equip"] [data-show],
html.mob.sq-on #sq [data-sq="wardrobe"] [data-w="show"] { min-height: 30px !important; padding: 0 12px !important; font-size: 11.5px !important; }
html.mob.sq-on #sq [data-sq="equip"] [data-f="fash"] { gap: 7px !important; padding: 5px 9px !important; }

/* ======== a finger's reach in the windows (the WebKit audit of 25 Nov 2026, docs/team/touch-webkit-20261125.md): the boards are a
   mouse's, a window's close and fold buttons 21 board pixels (16 on a phone held sideways), a tab 25 high, a button 24. The
   close and fold buttons are drawn bigger; every one of them takes a press some pixels round what is drawn (an ::after box that
   paints nothing), so a window keeps its board's look and its layout. Under html.mob.sq-on: a PC is not touched. ======== */
html.mob.sq-on #sq > .win > .tb > .wb { position: relative; width: 28px; height: 28px; }
html.mob.sq-on #sq > .win > .tb > .wb > img { width: 15px; height: 15px; }
html.mob.sq-on #sq > .win > .tb > .wb::after { content: ''; position: absolute; left: -4px; right: -4px; top: -12px; bottom: -10px; }
html.mob.sq-on #sq > .win > .tb > .wb:last-child::after { right: -12px; }
html.mob.sq-on #sq .win .tab,
html.mob.sq-on #sq .win .bt { position: relative; }
html.mob.sq-on #sq .win .tab::after { content: ''; position: absolute; left: 0; right: 0; top: -7px; bottom: -6px; }
html.mob.sq-on #sq .win .bt::after { content: ''; position: absolute; left: -3px; right: -3px; top: -6px; bottom: -6px; }
/* (a window that still scrolls as one piece, js/sq/core.js keepIn data-kscroll: its title bar, with the close button, stays at
   the top while the rest goes under it) */
html.mob.sq-on #sq > .win[data-kscroll] > .tb { position: sticky; top: 0; z-index: 6; }

/* ---- a phone held sideways: the top row folds to the bag and เมนู behind a cell of its own (js/sq/hud.js .mrow, .hud.mexp opened),
   as a mobile MMO's corner; the row of eight took half the screen's width over the play field (the owner's pick A of
   1 Dec 2026, then "faca as 6"). Opened, the row is all there as before and the cell stands at its left end, its arrow turned
   back. A tablet and a phone upright keep their whole row ---- */
@media (max-height: 599px) and (orientation: landscape) {
  html.mob.sq-on #sq .hud [data-p="tr"] .mi.mt.mrow { display: flex !important; }
  html.mob.sq-on #sq .hud .mi.mt.mrow > img { transform: rotate(-90deg); }
  html.mob.sq-on #sq .hud.mexp .mi.mt.mrow > img { transform: rotate(90deg); }
  html.mob.sq-on #sq .hud:not(.mexp) [data-p="tr"] .mi.mt:not([data-a="menu"]):not([data-a="I"]):not(.mrow) { display: none !important; }
  html.mob.sq-on #sq .hud:not(.mexp) [data-p="tr"] .mi.mt[data-a="I"] { left: -254px !important; }
  html.mob.sq-on #sq .hud:not(.mexp) [data-p="tr"] .mi.mt.mrow { left: -308px !important; }
  html.mob.sq-on #sq .hud.mexp [data-p="tr"] .mi.mt.mrow { left: -632px !important; }
}
@media (max-height: 599px) and (max-width: 700px) and (orientation: landscape) {
  html.mob.sq-on #sq .hud:not(.mexp) [data-p="tr"] .mi.mt[data-a="I"] { left: -246px !important; }
  html.mob.sq-on #sq .hud:not(.mexp) [data-p="tr"] .mi.mt.mrow { left: -296px !important; }
  html.mob.sq-on #sq .hud.mexp [data-p="tr"] .mi.mt.mrow { left: -596px !important; }
}

/* ---- the shop's theme chips (js/sq/itemshop.js): one row that slides ---- */
html.mob.sq-on #sq [data-sq="itemshop"] .is-fl { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
html.mob.sq-on #sq [data-sq="itemshop"] .is-fl span { flex: none; height: 30px; }
