/* Check Point — shared look. Theme colors come from common.js (applyLook). */
:root {
  --bg: #F8F7F3; --card: #FFFFFF; --ink: #1E2430; --muted: #5B6270; --line: #E3E0D8; --soft: #EFEDE7;
  --c0: #2B6CB0; --c1: #C2502F; --c2: #17806A; --c3: #7B4FB8; --ok: #23855A; --bad: #B9442F; --hi: #FCE6B6;
  --btn: #1E2430; --btn-ink: #FFFFFF; --font: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r: 14px;
}
* { box-sizing: border-box; min-width: 0; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 600 16px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--c0); }
[hidden] { display: none !important; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 12px;
  border: 2px solid var(--line); background: var(--card); color: var(--ink); font-weight: 800; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--muted); }
.btn.main { background: var(--btn); color: var(--btn-ink); border-color: var(--btn); }
.btn.main:hover { filter: brightness(1.15); }
.btn.danger { color: var(--bad); }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn:disabled { opacity: .45; cursor: default; }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible { outline: 3px solid var(--c0); outline-offset: 2px; }

input[type=text], input[type=password], input[type=number], input[type=search], select, textarea {
  border: 2px solid var(--line); border-radius: 12px; background: var(--card); padding: 10px 12px; font-size: 16px; font-weight: 700; width: 100%; }
textarea { resize: vertical; }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

.card { background: var(--card); border-radius: var(--r); box-shadow: 0 1px 4px rgba(30, 36, 48, .07); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: 14px; font-weight: 800; cursor: pointer; }
.chip.on { background: var(--btn); color: var(--btn-ink); border-color: var(--btn); }
.muted { color: var(--muted); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }

.switch { position: relative; width: 46px; height: 26px; flex: none; border: none; border-radius: 999px; background: #C9C5BA; cursor: pointer; padding: 3px; }
.switch::after { content: ''; display: block; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch[aria-checked=true] { background: var(--ok); }
.switch[aria-checked=true]::after { transform: translateX(20px); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 12px; font-weight: 800; z-index: 999; box-shadow: 0 6px 24px rgba(0,0,0,.25); max-width: 90vw; }
.modal-back { position: fixed; inset: 0; background: rgba(20, 24, 32, .45); display: flex; align-items: center; justify-content: center; z-index: 500; padding: 16px; }
.modal { background: var(--card); border-radius: 18px; padding: 22px; width: min(860px, 100%); max-height: 90vh; overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.25); }

.logo-tile { width: 44px; height: 44px; border-radius: 11px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.15); display: inline-flex; align-items: center; justify-content: center; font-weight: 900; font-size: 13px; color: #1E2430; flex: none; overflow: hidden; }
.logo-tile img { width: 100%; height: 100%; object-fit: contain; }

/* answer colors + shapes */
.a0 { background: var(--c0); } .a1 { background: var(--c1); } .a2 { background: var(--c2); } .a3 { background: var(--c3); }
.a4 { background: #8A6A3F; } .a5 { background: #4F6580; }
.shape { width: 1.4em; height: 1.4em; flex: none; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* brand strip: logo tile · TUTOR JENNY K bar · email bar */
.tjk { --h: 40px; display: inline-flex; align-items: center; gap: calc(var(--h) * .22); flex-wrap: nowrap; }
.tjk-logo { width: var(--h); height: var(--h); border-radius: calc(var(--h) * .24); background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.15); overflow: hidden; flex: none; position: relative; display: inline-block; }
.tjk-logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.tjk-logo .lc { display: none; }
[data-dark] .tjk-logo { background: transparent; box-shadow: none; }
[data-dark] .tjk-logo .lt { display: none; } [data-dark] .tjk-logo .lc { display: block; }
.tjk-logo .mine:not([hidden]) ~ img, .tjk-logo img.mine:not([hidden]) { display: block; }
.tjk-logo:has(.mine:not([hidden])) .lt, .tjk-logo:has(.mine:not([hidden])) .lc { display: none; }
.tjk-app { font-size: calc(var(--h) * .48); font-weight: 900; color: var(--ink); white-space: nowrap; margin-right: 4px; }
.tjk-name, .tjk-mail { display: inline-flex; align-items: center; height: calc(var(--h) * .62); padding: 0 calc(var(--h) * .3); border-radius: calc(var(--h) * .16); font-size: calc(var(--h) * .32); font-weight: 900; white-space: nowrap; font-style: normal; }
.tjk-name { background: var(--btn); color: var(--btn-ink); letter-spacing: .08em; }
.tjk-mail { background: #808080; color: #fff; letter-spacing: .02em; font-family: system-ui, -apple-system, 'Segoe UI', sans-serif; font-weight: 800; }
.tjk.sm { --h: 30px; } .tjk.lg { --h: clamp(34px, 3.4vw, 54px); }

/* tap to enlarge */
[data-zoom] { cursor: zoom-in; position: relative; }
[data-zoom]::after { content: '⤢'; position: absolute; right: 6px; bottom: 6px; width: 26px; height: 26px; border-radius: 8px; background: rgba(30,36,48,.62); color: #fff; font-size: 15px; font-weight: 900; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.zoombox { position: fixed; inset: 0; z-index: 900; background: rgba(15,18,24,.84); display: flex; align-items: center; justify-content: center; cursor: zoom-out; padding: 2vh 2vw; }
.zoomin { max-width: 96vw; max-height: 96vh; display: flex; align-items: center; justify-content: center; }
.zoomin > img, .zoomin img:only-child { height: 94vh; max-width: 96vw; width: auto; object-fit: contain; background: #fff; border-radius: 14px; }
.zoomin .qr { width: min(94vh, 94vw) !important; height: min(94vh, 94vw) !important; background: none; }
.zoomin .qr svg { width: 100%; height: 100%; }
.zoomin .pinwrap img { height: 92vh !important; max-height: 92vh !important; max-width: 96vw !important; }
.zoomin .qpic { max-height: none; } .zoomin .qpic img { height: 94vh; max-height: 94vh; max-width: 96vw; }
.zoomx { position: fixed; top: 14px; right: 14px; width: 48px; height: 48px; border-radius: 50%; border: none; background: rgba(255,255,255,.92); color: #1E2430; font-size: 22px; font-weight: 900; cursor: pointer; }

a.tjk.link { text-decoration: none; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }

/* ---------- Calm designs A–O (shared answer skins; layouts in host.css / play.css) ---------- */
.a0 { --ac: var(--c0); } .a1 { --ac: var(--c1); } .a2 { --ac: var(--c2); } .a3 { --ac: var(--c3); } .a4 { --ac: #8A6A3F; } .a5 { --ac: #4F6580; }
.lt, .ln { display: none; }
.qcard, .qtext, .ready .q, .dq { font-family: var(--qfont, var(--font)); }
:is(.tile, .ans) .shape { fill: currentColor; }
[data-lightc]:not([data-dark]) :is(.tile, .ans, .oitem, .dopt) { color: var(--ink); }
[data-lightc]:not([data-dark]) .oitem button { color: var(--ink); background: rgba(0,0,0,.08); }
.badge, :is(.tile, .ans) :is(.lt, .ln) { align-items: center; justify-content: center; flex: none; font-family: var(--font); font-weight: 900; line-height: 1; }

/* A Linen Split — soft linen, rounded solid tiles */
[data-design=linen] :is(.tile, .ans) { border-radius: 20px; box-shadow: inset 0 -4px 0 rgba(0,0,0,.12); }
[data-design=linen] .qcard, [data-design=linen] .qtext { box-shadow: none; border: 1px solid var(--line); }

/* B Stone & Ink — white rows, ink text, A–D / 01–04 badges */
[data-design=stone] :is(.tile, .ans) { background: var(--card); color: var(--ink); border: 1.5px solid var(--line); border-radius: 10px; box-shadow: none; }
[data-design=stone] :is(.tile, .ans) .shape { display: none; }
[data-design=stone] .tile .lt, [data-design=stone] .ans .ln { display: inline-flex; background: var(--ac); color: #fff; border-radius: 6px; width: 1.6em; height: 1.6em; font-size: .9em; }
[data-design=stone] .ans .ln { width: 46px; height: 46px; font-size: 20px; letter-spacing: .02em; }
[data-design=stone] .qcard, [data-design=stone] .qtext { box-shadow: none; border-left: 6px solid var(--ink); border-radius: 4px; text-align: left; }

/* C Pebble — pastel, very round */
[data-design=pebble] :is(.tile, .ans) { border-radius: 999px; box-shadow: 0 3px 0 rgba(46,52,64,.10); }
[data-design=pebble] .ans { border-radius: 36px; }
[data-design=pebble] .qcard, [data-design=pebble] .qtext { border-radius: 36px; box-shadow: 0 3px 0 rgba(46,52,64,.07); }
[data-design=pebble] .timer { background: #CDBDE6; color: var(--ink); }

/* D Night Study — dark, outlined answers */
[data-design=night] :is(.tile, .ans) { background: transparent; color: var(--ac); border: 3px solid var(--ac); border-radius: 14px; box-shadow: none; }
[data-design=night] :is(.tile, .ans) .tx { color: var(--ink); }
[data-design=night] .qcard, [data-design=night] .qtext { background: transparent; border: 1.5px solid var(--line); box-shadow: none; }
[data-design=night] .tile.right { outline-color: var(--ink); background: color-mix(in srgb, var(--ac) 18%, transparent); }

/* E Paper Cards — paper cards with a color stripe */
[data-design=paper] :is(.tile, .ans) { background: var(--card); color: var(--ink); border-radius: 8px; border-left: 12px solid var(--ac); box-shadow: 0 2px 6px rgba(36,39,44,.12);
  background-image: repeating-linear-gradient(to bottom, transparent 0 27px, #E8E2D6 27px 28px); }
[data-design=paper] :is(.tile, .ans) .shape { color: var(--ac); }
[data-design=paper] .qcard, [data-design=paper] .qtext { border-radius: 6px; box-shadow: 0 2px 6px rgba(36,39,44,.12); }

/* F Gallery — big picture, slim answer bars */
[data-design=gallery] :is(.tile, .ans) { background: var(--card); color: var(--ink); border-radius: 4px; border-top: 8px solid var(--ac); box-shadow: 0 1px 4px rgba(0,0,0,.10); }
[data-design=gallery] :is(.tile, .ans) .shape { color: var(--ac); }
[data-design=gallery] .qcard, [data-design=gallery] .qtext { background: transparent; box-shadow: none; }

/* G Harbor Mist — one pill per line, numbered */
[data-design=harbor] :is(.tile, .ans) { border-radius: 999px; box-shadow: none; }
[data-design=harbor] :is(.tile, .ans) .shape { display: none; }
[data-design=harbor] :is(.tile, .ans) .ln { display: inline-flex; width: 1.7em; height: 1.7em; border-radius: 50%; background: #fff; color: var(--ac); }
[data-design=harbor] .qcard, [data-design=harbor] .qtext { border-radius: 28px; box-shadow: none; }

/* H Oat & Olive — white pills, colored shapes */
[data-design=oat] :is(.tile, .ans) { background: var(--card); color: var(--ink); border: 2px solid var(--line); border-radius: 999px; box-shadow: none; }
[data-design=oat] .ans { border-radius: 40px; }
[data-design=oat] :is(.tile, .ans) .shape { color: var(--ac); }
[data-design=oat] .qcard, [data-design=oat] .qtext { box-shadow: none; border: 2px solid var(--line); }
[data-design=oat] .tile.right { outline-color: var(--c0); }

/* I Slate Chalk — chalkboard, pale colors with a left stripe */
[data-design=chalk] :is(.tile, .ans) { background: rgba(255,255,255,.05); color: var(--ac); border-left: 8px solid var(--ac); border-radius: 6px; box-shadow: none; }
[data-design=chalk] :is(.tile, .ans) .tx { color: var(--ink); font-family: var(--qfont); font-weight: 400; font-size: 1.12em; }
[data-design=chalk] .qcard, [data-design=chalk] .qtext { background: transparent; box-shadow: none; border-bottom: 2px dashed rgba(240,238,232,.35); border-radius: 0; font-weight: 400; }
[data-design=chalk] .timer { background: transparent; border: 3px solid var(--ink); color: var(--ink); }

/* J Round Table — four big colored circles */
[data-design=round] :is(.tile, .ans) { border-radius: 50%; flex-direction: column; justify-content: center; text-align: center; aspect-ratio: 1; box-shadow: 0 4px 0 rgba(0,0,0,.12); overflow: hidden; }

/* K Ticket Stub — tickets with a tear-off A–D stub */
[data-design=ticket] :is(.tile, .ans) { background: var(--card); color: var(--ink); border-radius: 10px; padding-left: 0 !important; box-shadow: 0 2px 6px rgba(37,34,30,.14); overflow: hidden; }
[data-design=ticket] :is(.tile, .ans) .shape { display: none; }
[data-design=ticket] :is(.tile, .ans) .lt { display: inline-flex; align-self: stretch; width: 2.2em; background: var(--ac); color: #fff; border-right: 3px dashed var(--card); font-size: 1.05em;
  -webkit-mask: radial-gradient(circle 7px at 100% 0, transparent 98%, #000) top/100% 51% no-repeat, radial-gradient(circle 7px at 100% 100%, transparent 98%, #000) bottom/100% 51% no-repeat;
          mask: radial-gradient(circle 7px at 100% 0, transparent 98%, #000) top/100% 51% no-repeat, radial-gradient(circle 7px at 100% 100%, transparent 98%, #000) bottom/100% 51% no-repeat; }
[data-design=ticket] .qcard, [data-design=ticket] .qtext { border-radius: 10px; border: 2px dashed var(--line); box-shadow: none; }

/* L Quiet Lines — no boxes, thick underlines */
[data-design=lines] :is(.tile, .ans) { background: transparent; color: var(--ink); border-radius: 0; border-bottom: 6px solid var(--ac); box-shadow: none; }
[data-design=lines] :is(.tile, .ans) .shape { color: var(--ac); }
[data-design=lines] .qcard, [data-design=lines] .qtext { background: transparent; box-shadow: none; border-radius: 0; }
[data-design=lines] .tile.right { outline: none; background: color-mix(in srgb, var(--ac) 12%, transparent); }

/* M Side Panel — dark question panel */
[data-design=panel] :is(.tile, .ans) { border-radius: 12px; box-shadow: none; }
[data-design=panel] .qtext { background: var(--ink); color: #fff; }

/* N Big Shapes — big faint shapes */
[data-design=shapes] :is(.tile, .ans) { position: relative; overflow: hidden; border-radius: 16px; box-shadow: none; }
[data-design=shapes] :is(.tile, .ans) .shape { position: absolute; right: -8%; bottom: -22%; width: auto !important; height: 150% !important; aspect-ratio: 1; opacity: .2; }
[data-design=shapes] :is(.tile, .ans) .tx { position: relative; }
[data-design=shapes] body::before, [data-design=shapes] body::after { content: ''; position: fixed; z-index: 0; pointer-events: none; opacity: .08; }
[data-design=shapes] body::before { width: 46vmax; height: 46vmax; border-radius: 50%; background: var(--c0); left: -16vmax; top: -18vmax; }
[data-design=shapes] body::after { width: 38vmax; height: 38vmax; background: var(--c1); right: -12vmax; bottom: -14vmax; transform: rotate(24deg); border-radius: 6%; }
[data-design=shapes] #app { position: relative; z-index: 1; }

/* O Museum Frame — framed question, wall-label answers */
[data-design=museum] :is(.tile, .ans) { background: var(--card); color: var(--ink); border-radius: 2px; border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(0,0,0,.08); text-align: left; }
[data-design=museum] :is(.tile, .ans) .shape { display: none; }
[data-design=museum] :is(.tile, .ans) .lt { display: inline-flex; width: 1.5em; height: 1.5em; background: var(--ac); color: #fff; border-radius: 1px; font-size: .78em; letter-spacing: .04em; }
[data-design=museum] :is(.tile, .ans) .tx { font-family: var(--qfont); font-weight: 600; }
[data-design=museum] .qcard, [data-design=museum] .qtext { border: 2px solid var(--ink); outline: 2px solid var(--ink); outline-offset: -10px; border-radius: 2px; box-shadow: 0 6px 18px rgba(38,34,29,.14); font-weight: 600; padding-left: 28px; padding-right: 28px; }

/* animals */
.avi { width: 100%; height: 100%; display: block; }
.hasav { background: none !important; overflow: hidden; padding: 0 !important; color: inherit; }
.avpick { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.avpick button { aspect-ratio: 1; padding: 3px; border-radius: 50%; border: 3px solid transparent; background: transparent; cursor: pointer; }
.avpick button.sel { border-color: var(--ink); }
.avpick button:not(.sel) { opacity: .85; }
.bav { display: inline-block; width: 1.4em; height: 1.4em; vertical-align: middle; margin-right: .45em; border-radius: 50%; }
.podav { display: block; width: clamp(60px, 7vw, 120px); height: clamp(60px, 7vw, 120px); border-radius: 50%; }
