/* Japan Undercover slang phrasebook: "Slang check" quiz, v1.00.
   Uses the page's own custom properties (--ink, --paper, --signal, --red, --blue, --mint, --paper-deep) with fallbacks.
   Everything is scoped under .sq so nothing on the page changes. No text under 1rem. */
.sq, .sq * { box-sizing: border-box; }
.sq {
  --sq-ink: var(--ink, #101820); --sq-paper: var(--paper, #f4eddf); --sq-signal: var(--signal, #ff5638); --sq-red: var(--red, #b72c20);
  --sq-blue: var(--blue, #2c5ccd); --sq-mint: var(--mint, #9bc5ad); --sq-deep: var(--paper-deep, #e7dcc7); --sq-card: #fffaf0;
  --sq-serif: "Instrument Serif", "Noto Serif", Georgia, serif; --sq-sans: "DM Sans", "Be Vietnam Pro", "Noto Sans KR", "Noto Sans TC", "Noto Sans", system-ui, sans-serif;
  --sq-jp: "Noto Sans JP", "Yu Gothic", "Hiragino Sans", "Meiryo", sans-serif;
  position: relative; margin: 72px 0 0; padding: clamp(18px, 4vw, 48px); color: var(--sq-paper); scroll-margin-top: 84px;
  background-color: var(--sq-ink); background-image: radial-gradient(rgba(244, 237, 223, .075) 1.6px, transparent 1.8px); background-size: 22px 22px;
  box-shadow: 12px 12px 0 var(--sq-signal); overflow: hidden; isolation: isolate; font-family: var(--sq-sans); font-size: 1rem; line-height: 1.5;
}
.sq-in { position: relative; z-index: 1; max-width: 980px; margin: 0 auto; }
.sq-ghost { position: absolute; z-index: 0; right: -.04em; top: -.18em; font: 900 clamp(11rem, 34vw, 24rem)/1 var(--sq-jp); color: transparent; -webkit-text-stroke: 2px rgba(244, 237, 223, .13); pointer-events: none; user-select: none; }
.sq-head { position: relative; z-index: 1; margin: 0 0 28px; }
.sq-eyebrow { margin: 0 0 14px; color: var(--sq-signal); font-weight: 700; font-size: 1rem; letter-spacing: .18em; text-transform: uppercase; }
.sq h2 { margin: 0; max-width: 11em; font: 400 clamp(3rem, 8vw, 5.6rem)/.88 var(--sq-serif); letter-spacing: -.04em; color: var(--sq-paper); }
.sq h2:focus { outline: none; }
.sq-lede { max-width: 36em; margin: 18px 0 0; font-size: 1.15rem; line-height: 1.55; color: rgba(244, 237, 223, .92); }
.sq-vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sq :focus-visible { outline: 3px solid var(--sq-mint); outline-offset: 3px; }
.sq-card :focus-visible { outline-color: var(--sq-blue); }
.sq h3:focus { outline: none; }

/* deck tiles */
.sq-pick { margin: 0 0 16px; font: 700 1rem/1.2 var(--sq-sans); letter-spacing: .14em; text-transform: uppercase; color: var(--sq-mint); }
.sq-decks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.sq-deck {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 14px; min-height: 270px; padding: 20px 20px 18px; text-align: left;
  color: var(--sq-ink); background: var(--sq-card); border: 2px solid var(--sq-ink); border-radius: 4px; font: inherit; cursor: pointer;
  box-shadow: 6px 6px 0 rgba(244, 237, 223, .3); transform: perspective(760px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .18s ease-out, box-shadow .18s ease-out, translate .18s ease-out; -webkit-tap-highlight-color: transparent;
}
.sq-deck:hover, .sq-deck:focus-visible { translate: -3px -3px; box-shadow: 10px 10px 0 var(--sq-signal); }
.sq-deck:active { translate: 2px 2px; box-shadow: 3px 3px 0 var(--sq-signal); }
.sq-deck-everyday { background: var(--sq-card); }
.sq-deck-tv { background: #e4eefc; }
.sq-deck-mix { background: #ffe3da; }
.sq-deck-glyph { display: block; font: 900 5.2rem/1 var(--sq-jp); color: var(--sq-ink); text-shadow: 4px 4px 0 var(--sq-signal); letter-spacing: -.02em; }
.sq-deck-tv .sq-deck-glyph { text-shadow: 4px 4px 0 var(--sq-blue); }
.sq-deck-mix .sq-deck-glyph { text-shadow: 4px 4px 0 var(--sq-ink); color: var(--sq-signal); }
.sq-deck-txt { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sq-deck-name { font: 400 2.2rem/1 var(--sq-serif); letter-spacing: -.02em; overflow-wrap: anywhere; }
.sq-deck-sub { font-size: 1rem; line-height: 1.4; }
.sq-deck-n { margin-top: 4px; padding-top: 10px; border-top: 2px dashed rgba(16, 24, 32, .28); font: 500 1rem/1.3 monospace; letter-spacing: .04em; color: rgba(16, 24, 32, .78); }

/* the round card */
.sq-card {
  position: relative; padding: clamp(14px, 3vw, 28px); color: var(--sq-ink); background: var(--sq-card); border: 2px solid var(--sq-ink); border-radius: 4px; scroll-margin-top: 84px;
  box-shadow: 8px 8px 0 var(--sq-signal); transform: perspective(1200px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .22s ease-out;
}
.sq-top { display: grid; gap: 10px; }
.sq-beads { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.sq-bead {
  flex: 1 1 0; min-width: 0; max-width: 58px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--sq-ink);
  font: 700 1rem/1 var(--sq-jp); color: var(--sq-ink); background: transparent; transition: background .2s;
}
.sq-bead.is-now { background: var(--sq-signal); animation: sqbead 1.5s ease-in-out infinite; }
.sq-bead.is-right { background: var(--sq-mint); }
.sq-bead.is-wrong { border-style: dashed; background: repeating-linear-gradient(135deg, var(--sq-card) 0 4px, rgba(16, 24, 32, .2) 4px 6px); }
@keyframes sqbead { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 86, 56, .55); } 50% { box-shadow: 0 0 0 7px rgba(255, 86, 56, 0); } }
.sq-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.sq-qn { font: 700 1rem/1.2 var(--sq-sans); letter-spacing: .08em; text-transform: uppercase; color: rgba(16, 24, 32, .78); }
.sq-streak { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border: 2px solid var(--sq-ink); border-radius: 999px; font: 700 1rem/1 var(--sq-sans); background: var(--sq-card); }
.sq-streak.is-hot { background: var(--sq-signal); animation: sqhot .6s ease-out 1; }
@keyframes sqhot { 0% { transform: scale(1); } 40% { transform: scale(1.14) rotate(-2deg); } 100% { transform: scale(1); } }
.sq-ic { flex: none; display: block; }
.sq-body { display: flex; flex-direction: column; min-height: var(--sq-bh, 0); }
.sq-q { margin-top: 12px; }
.sq-kind { display: inline-flex; align-items: center; gap: 8px; margin: 6px 0 0; padding: 4px 12px 4px 8px; border-radius: 999px; background: var(--sq-ink); color: var(--sq-paper); font: 700 1rem/1.3 var(--sq-sans); letter-spacing: .08em; text-transform: uppercase; }
.sq-prompt { margin: 12px 0 16px; font: 400 clamp(1.8rem, 4.4vw, 2.6rem)/1.08 var(--sq-serif); letter-spacing: -.02em; overflow-wrap: anywhere; }
.sq-hint { margin: 0; font-size: 1rem; line-height: 1.45; color: rgba(16, 24, 32, .78); text-align: center; }

/* LISTEN */
.sq-listen { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 14px 0 6px; }
.sq .sq-bigplay.play {
  margin: 8px 0 12px; position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 0; width: 136px; height: 136px; min-height: 136px; padding: 0; border-radius: 50%;
  border: 3px solid var(--sq-ink); background: var(--sq-ink); color: var(--sq-paper); cursor: pointer; box-shadow: 6px 6px 0 var(--sq-signal); transition: transform .15s, box-shadow .15s, background .15s;
}
.sq .sq-bigplay.play:hover { background: var(--sq-red); border-color: var(--sq-ink); transform: translate(-2px, -2px); box-shadow: 9px 9px 0 var(--sq-signal); }
.sq .sq-bigplay.play::before, .sq .sq-bigplay.play::after { content: ""; position: absolute; inset: -12px; border-radius: 50%; border: 3px solid var(--sq-signal); opacity: 0; pointer-events: none; animation: sqpulse 2.2s ease-out infinite; }
.sq .sq-bigplay.play::after { animation-delay: 1.1s; }
@keyframes sqpulse { 0% { transform: scale(.8); opacity: .75; } 100% { transform: scale(1.35); opacity: 0; } }
.sq .sq-bigplay.play.is-playing { background: var(--sq-signal); color: var(--sq-ink); border-color: var(--sq-ink); }
.sq .sq-bigplay.play.is-playing::before, .sq .sq-bigplay.play.is-playing::after { animation-duration: .9s; border-color: var(--sq-ink); }
.sq .sq-bigplay .play-ico { border-left-width: 38px; border-top-width: 23px; border-bottom-width: 23px; margin-left: 10px; }
.sq .sq-bigplay.is-playing .play-ico { width: 30px; height: 38px; margin-left: 0; border-top: 0; border-bottom: 0; border-left: 10px solid currentColor; border-right: 10px solid currentColor; }
.sq .sq-smallplay.play { min-height: 48px; }
.sq-card .sq-smallplay.play:hover { background: var(--sq-red); }

/* word block (HEAT, REAL OR TV) */
.sq-wordblock { padding: 6px 0 14px; text-align: center; }
.sq-jp { margin: 0; font: 700 clamp(3.2rem, 14vw, 6.4rem)/1.05 var(--sq-jp); letter-spacing: .01em; color: var(--sq-ink); }
.sq-jp.is-long { font-size: clamp(2.2rem, 9.4vw, 4.2rem); }
.sq-jp-vis { display: inline-flex; flex-wrap: wrap; justify-content: center; }
.sq-ch { position: relative; display: inline-block; width: 1em; height: 1.18em; line-height: 1.18; text-align: center; }
.sq-ch-plain { width: auto; min-width: .32em; }
.sq-g { display: block; }
.sq-st { position: absolute; left: 0; top: .09em; width: 1em; height: 1em; overflow: visible; pointer-events: none; }
.sq-sp { stroke: var(--sq-ink); stroke-dasharray: 1 3; }
.sq-subline { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 4px 14px; margin: 2px 0 0; }
.sq-rd { font: 500 1.1rem/1.4 var(--sq-jp); color: rgba(16, 24, 32, .8); }
.sq-ro { font: 500 1.05rem/1.4 monospace; color: var(--sq-red); }
body.no-romaji .sq-ro { visibility: hidden; }
.sq-meaning { margin: 10px 0 0; font: 400 clamp(1.5rem, 3.6vw, 2rem)/1.2 var(--sq-serif); overflow-wrap: anywhere; }

/* SAY IT situation */
.sq-sit { margin: 0 0 4px; padding: 14px 16px 14px 18px; background: var(--sq-paper); border-left: 6px solid var(--sq-signal); }
.sq-sit-lab { margin: 0 0 6px; font: 700 1rem/1.2 var(--sq-sans); letter-spacing: .12em; text-transform: uppercase; color: var(--sq-red); }
.sq-sit-who { margin: 0; font-size: 1.15rem; line-height: 1.45; }
.sq-sit-quote { margin: 8px 0 0; font: italic 400 clamp(1.4rem, 3.4vw, 1.8rem)/1.25 var(--sq-serif); overflow-wrap: anywhere; }

/* options */
.sq-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.sq-opt {
  position: relative; display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 60px; padding: 10px 14px; text-align: left; color: var(--sq-ink); background: #fff;
  border: 2px solid var(--sq-ink); border-radius: 6px; font: 500 1.1rem/1.35 var(--sq-sans); cursor: pointer; -webkit-tap-highlight-color: transparent;
  box-shadow: 4px 4px 0 rgba(16, 24, 32, .18); transition: transform .12s, box-shadow .12s, background .15s; overflow-wrap: anywhere;
}
.sq-opt:hover:not([aria-disabled="true"]) { transform: translate(-1px, -1px); box-shadow: 6px 6px 0 var(--sq-signal); }
.sq-opt:active:not([aria-disabled="true"]) { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--sq-signal); }
.sq-opt[aria-disabled="true"] { cursor: default; }
.sq-key { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--sq-ink); color: var(--sq-paper); font: 700 1rem/1 var(--sq-sans); }
.sq-opt-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.sq-opt-jp .sq-opt-main { font: 700 1.7rem/1.2 var(--sq-jp); }
.sq-opt-sub { display: flex; flex-wrap: wrap; gap: 2px 12px; }
.sq-mark { flex: none; width: 30px; height: 30px; display: grid; place-items: center; }
.sq-opt.is-correct { background: #cfe6d9; box-shadow: inset 0 0 0 2px var(--sq-ink); }
.sq-opt.is-correct .sq-mark { color: #0e5a36; }
.sq-opt.is-wrong { background: #ffd9d0; border-style: dashed; box-shadow: inset 0 0 0 1px var(--sq-ink); }
.sq-opt.is-wrong .sq-mark { color: #9c1c10; }
.sq-opt.is-dim { background: var(--sq-deep); box-shadow: none; }
.sq-opts-real { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sq-opt-big { min-height: 112px; padding: 14px 16px; font: 700 1.25rem/1.25 var(--sq-sans); gap: 14px; }
.sq-opt-ic { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--sq-ink); color: var(--sq-paper); }
.sq-opt-big[data-v="tv"] .sq-opt-ic { background: var(--sq-signal); color: var(--sq-ink); }

/* HEAT meter */
.sq-meter-wrap { display: flex; flex-direction: column; align-items: stretch; gap: 14px; margin-top: 4px; }
.sq-meter { position: relative; padding-bottom: 66px; touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: pointer; outline-offset: 6px; }
.sq-bar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sq-seg { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 84px; padding: 8px 4px; margin-left: -2px; text-align: center; border: 2px solid var(--sq-ink); transition: box-shadow .15s; }
.sq-seg:first-child { margin-left: 0; border-radius: 6px 0 0 6px; }
.sq-seg:last-child { border-radius: 0 6px 6px 0; }
.sq-seg-lab { font: 700 1rem/1.15 var(--sq-sans); text-transform: uppercase; letter-spacing: .04em; overflow-wrap: anywhere; max-width: 100%; }
.sq-seg-mk { display: block; width: 22px; height: 22px; }
.sq-h-safe { background: var(--sq-mint); color: var(--sq-ink); }
.sq-h-casual { background: var(--sq-deep); color: var(--sq-ink); }
.sq-h-spicy { background: var(--sq-signal); color: var(--sq-ink); }
.sq-h-rude { background: var(--sq-ink); color: var(--sq-paper); }
.sq-seg.is-near { box-shadow: inset 0 -7px 0 var(--sq-ink); }
.sq-h-rude.is-near { box-shadow: inset 0 -7px 0 var(--sq-signal); }
.sq-seg.is-truth { box-shadow: inset 0 -11px 0 var(--sq-ink); }
.sq-h-rude.is-truth { box-shadow: inset 0 -11px 0 var(--sq-mint); }
.sq-seg.is-miss { border-style: dashed; }
.sq-needle { position: absolute; bottom: 0; height: 66px; left: 50%; width: 0; pointer-events: none; transition: left .2s cubic-bezier(.3, 1.4, .5, 1); }
.sq-meter.is-drag .sq-needle { transition: none; }
.sq-needle-line { position: absolute; left: -2px; top: 10px; bottom: 30px; width: 4px; background: var(--sq-ink); }
.sq-needle-line::before { content: ""; position: absolute; left: -8px; top: -12px; border-left: 10px solid transparent; border-right: 10px solid transparent; border-bottom: 13px solid var(--sq-ink); }
.sq-grip { position: absolute; left: -28px; bottom: 2px; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--sq-ink); color: var(--sq-paper); border: 3px solid var(--sq-card); box-shadow: 0 0 0 2px var(--sq-ink), 4px 4px 0 var(--sq-signal); }
.sq-meter.is-unset .sq-needle-line { display: none; }
.sq-meter.is-unset .sq-grip { animation: sqwig 1.6s ease-in-out infinite; }
@keyframes sqwig { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-10px); } 75% { transform: translateX(10px); } }
.sq-meter.is-locked { cursor: default; }
.sq-lock { align-self: flex-start; display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px; border: 2px dashed rgba(16, 24, 32, .55); border-radius: 999px; background: transparent; color: rgba(16, 24, 32, .66); font: 700 1.1rem/1 var(--sq-sans); cursor: default; }
.sq-lock.is-ready { cursor: pointer; border-style: solid; border-color: var(--sq-ink); background: var(--sq-signal); color: var(--sq-ink); box-shadow: 4px 4px 0 var(--sq-ink); }
.sq-lock.is-ready:hover { transform: translate(-1px, -1px); box-shadow: 6px 6px 0 var(--sq-ink); }

/* feedback (its height is reserved from the start of the round) */
.sq-fb { flex: 1 1 auto; display: flex; flex-direction: column; margin-top: 16px; }
.sq-fb > .sq-fbin { flex: none; }
.sq-ghostfb { flex: 1 1 auto; display: grid; place-items: center; min-height: 92px; padding: 16px; text-align: center; border: 2px dashed rgba(16, 24, 32, .32); border-radius: 4px; background: repeating-linear-gradient(135deg, transparent 0 11px, rgba(16, 24, 32, .045) 11px 22px); color: rgba(16, 24, 32, .74); font: italic 400 1.3rem/1.3 var(--sq-serif); }
html[lang="ko"] .sq-ghostfb, html[lang="zh-Hant"] .sq-ghostfb { font-style: normal; font-weight: 500; }
.sq-fbin { padding: 14px 16px 16px; background: #fff; border: 2px solid var(--sq-ink); border-left-width: 10px; }
.sq-fbin.is-right { background: #eaf4ee; border-left-color: #2f8a5b; }
.sq-fbin.is-wrong { background: #fff1ed; border-left-color: var(--sq-signal); border-left-style: solid; }
.sq-verdict { display: flex; align-items: center; gap: 12px; margin: 0 0 8px; font: 400 clamp(1.7rem, 4vw, 2.2rem)/1.1 var(--sq-serif); }
.sq-stamp { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--sq-ink); }
.is-right .sq-stamp { background: var(--sq-mint); transform: rotate(-8deg); }
.is-wrong .sq-stamp { background: var(--sq-signal); border-style: dashed; transform: rotate(8deg); }
.sq-line { margin: 4px 0 0; font-size: 1.05rem; line-height: 1.45; }
.sq-lab { display: inline-block; margin-right: 4px; font-weight: 700; font-size: 1rem; letter-spacing: .06em; text-transform: uppercase; color: var(--sq-red); }
.sq-val { overflow-wrap: anywhere; }
.sq-fb-jp { font: 700 1.4rem/1.3 var(--sq-jp); }
.sq-fb-jp.sq-sm { font-size: 1.1rem; }
.sq-hchip { display: inline-block; padding: 3px 12px; border: 2px solid var(--sq-ink); border-radius: 999px; font: 700 1rem/1.3 var(--sq-sans); text-transform: uppercase; letter-spacing: .05em; vertical-align: middle; }
.sq-why { margin: 10px 0 0; padding-top: 10px; border-top: 1px dashed rgba(16, 24, 32, .35); font-size: 1.05rem; line-height: 1.55; }
.sq-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.sq-see, .sq-next, .sq-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border: 2px solid var(--sq-ink); border-radius: 999px; font: 700 1.05rem/1 var(--sq-sans); text-decoration: none; cursor: pointer; color: var(--sq-ink); background: transparent; }
.sq-see:hover, .sq-btn:hover { background: var(--sq-ink); color: var(--sq-paper); }
.sq-next { margin-left: auto; padding: 0 24px; background: var(--sq-ink); color: var(--sq-paper); box-shadow: 4px 4px 0 var(--sq-signal); }
.sq-next:hover { background: var(--sq-red); transform: translate(-1px, -1px); box-shadow: 6px 6px 0 var(--sq-signal); }
.sq-measure { position: absolute; left: clamp(14px, 3vw, 28px); right: clamp(14px, 3vw, 28px); top: 0; visibility: hidden; pointer-events: none; z-index: -1; }
.sq-burst { position: absolute; width: 0; height: 0; pointer-events: none; z-index: 6; }
.sq-b { position: absolute; left: 0; top: 0; width: 12px; height: 12px; }
.sq-b-dot { border-radius: 50%; }
.sq-b-tri { clip-path: polygon(50% 0, 100% 100%, 0 100%); width: 15px; height: 14px; }
.sq-b-pill { width: 18px; height: 8px; border-radius: 4px; }

/* result poster */
.sq-result { padding-top: clamp(26px, 4vw, 38px); }
.sq-result::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 12px; background: repeating-linear-gradient(90deg, var(--sq-signal) 0 18px, var(--sq-ink) 18px 36px); }
.sq-done { margin-top: 0; }
.sq-poster { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 22px 32px; align-items: center; margin-top: 16px; }
.sq-ring { position: relative; width: 200px; height: 200px; }
.sq-ring svg { display: block; width: 100%; height: 100%; }
.sq-ring-bg { stroke: rgba(16, 24, 32, .13); }
.sq-ring-fg { stroke: var(--sq-signal); }
.sq-rank-3 .sq-ring-fg { stroke: var(--sq-red); }
.sq-ring-num { position: absolute; inset: 0; display: flex; align-items: baseline; justify-content: center; align-content: center; gap: 2px; padding-top: 52px; font-family: var(--sq-serif); }
.sq-ring-num b { font-weight: 400; font-size: 4.6rem; line-height: .9; letter-spacing: -.04em; }
.sq-ladder { display: flex; align-items: flex-end; gap: 6px; height: 46px; margin: 14px 0 0; }
.sq-ladder span { display: block; width: 22px; border: 2px dashed rgba(16, 24, 32, .4); border-radius: 3px 3px 0 0; }
.sq-ladder span:nth-child(1) { height: 14px; } .sq-ladder span:nth-child(2) { height: 24px; } .sq-ladder span:nth-child(3) { height: 35px; } .sq-ladder span:nth-child(4) { height: 46px; }
.sq-ladder span.is-below { border-style: solid; border-color: var(--sq-ink); background: var(--sq-ink); }
.sq-ladder span.is-now { border-style: solid; border-color: var(--sq-ink); background: var(--sq-signal); box-shadow: 3px 3px 0 var(--sq-ink); }
.sq-ring-num span { font-size: 1.6rem; color: rgba(16, 24, 32, .72); }
.sq-rank-lab { margin: 0 0 6px; font: 700 1rem/1.2 var(--sq-sans); letter-spacing: .14em; text-transform: uppercase; color: var(--sq-red); }
.sq-rank { margin: 0; font: 400 clamp(2.2rem, 5.6vw, 3.8rem)/.98 var(--sq-serif); letter-spacing: -.03em; overflow-wrap: anywhere; }
.sq-newbest { display: inline-flex; align-items: center; gap: 8px; margin: 14px 0 0; padding: 6px 14px; border-radius: 999px; background: var(--sq-signal); border: 2px solid var(--sq-ink); font: 700 1.05rem/1.2 var(--sq-sans); transform: rotate(-2deg); }
.sq-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 22px 0 0; padding: 0; list-style: none; }
.sq-stats li { display: flex; flex-direction: column; gap: 2px; padding-top: 10px; border-top: 3px solid var(--sq-ink); }
.sq-stats b { font: 400 2.2rem/1 var(--sq-serif); }
.sq-stats span { font-size: 1rem; line-height: 1.3; color: rgba(16, 24, 32, .8); }
.sq-missed { margin-top: 22px; }
.sq-missed-lab { margin: 0 0 10px; font: 700 1rem/1.2 var(--sq-sans); letter-spacing: .1em; text-transform: uppercase; color: var(--sq-red); }
.sq-clean { margin: 0; font: italic 400 1.5rem/1.3 var(--sq-serif); }
.sq-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.sq-chip-miss { display: inline-flex; align-items: baseline; gap: 8px; min-height: 48px; padding: 8px 16px; border: 2px solid var(--sq-ink); border-radius: 999px; background: #fff; color: var(--sq-ink); text-decoration: none; box-shadow: 3px 3px 0 rgba(16, 24, 32, .18); }
.sq-chip-miss:hover { background: var(--sq-ink); color: var(--sq-paper); }
.sq-chip-miss span { font: 700 1.2rem/1.2 var(--sq-jp); }
.sq-chip-miss small { font-size: 1rem; line-height: 1.2; }
.sq-acts-end { margin-top: 24px; }
.sq-btn-main { background: var(--sq-signal); box-shadow: 4px 4px 0 var(--sq-ink); }
.sq-btn-main:hover { background: var(--sq-ink); }
.sq-btn.is-done { background: var(--sq-mint); }
.sq-copied { min-height: 1.6em; margin: 12px 0 0; font-weight: 700; font-size: 1rem; color: #0e5a36; }
.sq-copyfield { display: block; width: 100%; margin-top: 8px; padding: 10px; font: 1rem monospace; }
.sq-copyfield[hidden] { display: none; }

/* chip in the category row and the way back */
.group-nav a.sq-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 16px 0 12px; border: 1.5px solid var(--ink, #101820); border-radius: 999px; background: var(--signal, #ff5638); color: var(--ink, #101820); text-decoration: none; font: 700 1rem/1 "DM Sans", "Be Vietnam Pro", "Noto Sans KR", "Noto Sans TC", "Noto Sans", sans-serif; box-shadow: 3px 3px 0 var(--ink, #101820); }
.group-nav a.sq-chip:hover { background: var(--ink, #101820); color: var(--paper, #f4eddf); box-shadow: 3px 3px 0 var(--signal, #ff5638); }
.sq-back { position: fixed; z-index: 40; right: 16px; bottom: 16px; display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px; border: 2px solid #f4eddf; border-radius: 999px; background: #101820; color: #f4eddf; text-decoration: none; font: 700 1rem/1 "DM Sans", "Be Vietnam Pro", "Noto Sans KR", "Noto Sans TC", "Noto Sans", sans-serif; box-shadow: 4px 4px 0 #ff5638; visibility: hidden; opacity: 0; transform: translateY(16px); transition: opacity .2s, transform .2s, visibility 0s .2s; }
.sq-back.is-on { visibility: visible; opacity: 1; transform: none; transition: opacity .2s, transform .2s; }
.sq-back:focus-visible { outline: 3px solid #9bc5ad; outline-offset: 3px; }

/* languages: same families the page uses */
html[lang="vi"] .sq { --sq-serif: "Noto Serif", Georgia, serif; --sq-sans: "Be Vietnam Pro", "DM Sans", sans-serif; }
html[lang="ru"] .sq { --sq-serif: "Noto Serif", Georgia, serif; --sq-sans: "Noto Sans", "DM Sans", sans-serif; }
html[lang="ko"] .sq { --sq-serif: "Noto Sans KR", "Malgun Gothic", sans-serif; --sq-sans: "Noto Sans KR", "DM Sans", sans-serif; }
html[lang="zh-Hant"] .sq { --sq-serif: "Noto Sans TC", "Microsoft JhengHei", sans-serif; --sq-sans: "Noto Sans TC", "DM Sans", sans-serif; }
html[lang="ko"] .sq h2, html[lang="ko"] .sq-prompt, html[lang="ko"] .sq-rank, html[lang="ko"] .sq-deck-name, html[lang="ko"] .sq-verdict, html[lang="ko"] .sq-meaning,
html[lang="zh-Hant"] .sq h2, html[lang="zh-Hant"] .sq-prompt, html[lang="zh-Hant"] .sq-rank, html[lang="zh-Hant"] .sq-deck-name, html[lang="zh-Hant"] .sq-verdict, html[lang="zh-Hant"] .sq-meaning { font-weight: 700; letter-spacing: -.02em; }
html[lang="ko"] .sq h2, html[lang="zh-Hant"] .sq h2 { line-height: 1.05; }
html[lang="ko"] .sq-rank, html[lang="zh-Hant"] .sq-rank { line-height: 1.12; }
html[lang="ko"] .sq-sit-quote, html[lang="zh-Hant"] .sq-sit-quote, html[lang="ko"] .sq-clean, html[lang="zh-Hant"] .sq-clean { font-style: normal; font-weight: 500; }
html[lang="ko"] .sq-lab, html[lang="ko"] .sq-eyebrow, html[lang="ko"] .sq-kind, html[lang="ko"] .sq-qn, html[lang="ko"] .sq-pick, html[lang="ko"] .sq-seg-lab, html[lang="ko"] .sq-hchip, html[lang="ko"] .sq-rank-lab, html[lang="ko"] .sq-missed-lab,
html[lang="zh-Hant"] .sq-lab, html[lang="zh-Hant"] .sq-eyebrow, html[lang="zh-Hant"] .sq-kind, html[lang="zh-Hant"] .sq-qn, html[lang="zh-Hant"] .sq-pick, html[lang="zh-Hant"] .sq-seg-lab, html[lang="zh-Hant"] .sq-hchip, html[lang="zh-Hant"] .sq-rank-lab, html[lang="zh-Hant"] .sq-missed-lab,
html[lang="ko"] .sq-sit-lab, html[lang="zh-Hant"] .sq-sit-lab { letter-spacing: 0; }
html[lang="ko"] .sq p, html[lang="ko"] .sq-opt-main { word-break: keep-all; overflow-wrap: anywhere; }
html[lang="vi"] .sq h2 { font-size: clamp(2.6rem, 7vw, 4.8rem); line-height: 1; }
html[lang="ru"] .sq h2 { font-size: clamp(2.5rem, 6.6vw, 4.8rem); line-height: 1; overflow-wrap: anywhere; }

@media (max-width: 860px) {
  .sq-decks { grid-template-columns: 1fr; gap: 14px; }
  .sq-deck { flex-direction: row; align-items: center; min-height: 112px; padding: 14px 16px; gap: 16px; }
  .sq-deck-glyph { flex: none; width: 4.3rem; font-size: 3.4rem; text-align: center; text-shadow: 3px 3px 0 var(--sq-signal); }
  .sq-deck-tv .sq-deck-glyph { text-shadow: 3px 3px 0 var(--sq-blue); }
  .sq-deck-mix .sq-deck-glyph { text-shadow: 3px 3px 0 var(--sq-ink); }
  .sq-deck-name { font-size: 1.9rem; }
  .sq-deck-n { margin-top: 2px; padding-top: 6px; }
}
@media (max-width: 760px) { .sq { margin-right: 8px; box-shadow: 8px 8px 0 var(--sq-signal); } }
@media (max-width: 640px) {
  .sq { margin-top: 56px; padding: 22px 14px 24px; }
  .sq-opts, .sq-opts-real { grid-template-columns: 1fr; gap: 10px; }
  .sq-opt-big { min-height: 80px; }
  .sq-opt-ic { width: 48px; height: 48px; }
  .sq-card { box-shadow: 6px 6px 0 var(--sq-signal); }
  .sq-poster { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .sq-ring { width: 170px; height: 170px; }
  .sq-ring-num { padding-top: 42px; }
  .sq-ring-num b { font-size: 3.9rem; }
  .sq-stats { gap: 10px; text-align: left; }
  .sq-stats b { font-size: 1.9rem; }
  .sq-next { margin-left: 0; flex: 1 1 100%; }
  .sq .sq-bigplay.play { width: 120px; height: 120px; min-height: 120px; }
  .sq-seg { min-height: 78px; padding: 6px 2px; }
  .sq-seg-lab { letter-spacing: 0; text-transform: none; }
  .sq-newbest { margin-top: 10px; }
  .sq-acts-end .sq-btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .sq *, .sq *::before, .sq *::after { animation: none !important; transition: none !important; }
  .sq-card, .sq-deck { transform: none !important; }
  .sq .sq-bigplay.play::before { animation: none !important; opacity: .55; transform: none; inset: -9px; }
  .sq .sq-bigplay.play::after { display: none; }
  .sq-back { transition: none; }
}
/* v1.01 (DEEP 5 PM review): missed-word chips at 320 px broke Japanese terms mid-word; the term stays on one line above its gloss, the chip may grow to full width */
.sq-chip-miss { flex-wrap: wrap; max-width: 100%; }
.sq-chip-miss span { white-space: nowrap; word-break: keep-all; }
@media (max-width: 420px) { .sq-chip-miss { flex-direction: column; align-items: flex-start; gap: 2px; } }
