/* 사이트 틀 — 머리글·메뉴·페이지(홈·소개·팀·공지·로그인·팀 등록·내 팀). 플레이 화면은 style.css */
:root {
  --night: #141a3d;
  --night-2: #232b63;
  --page-bg: #f3f6fb;
  --header-h: 60px;
}
html, body { margin: 0; }
body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: 'Noto Sans KR', system-ui, -apple-system, 'Apple SD Gothic Neo', sans-serif;
  color: #1d2742;
  background: var(--page-bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: #2a62d8; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 200; padding: 8px 12px; background: #fff; border-radius: 8px; }
.skip:focus { left: 8px; }
.muted { color: #6a7896; }
.small { font-size: 13px; }

/* ---- 머리글 */
.site-header { position: sticky; top: 0; z-index: 40; background: var(--night); color: #fff; box-shadow: 0 2px 14px rgba(8, 10, 40, .25); }
.site-bar { max-width: 1240px; height: var(--header-h); margin: 0 auto; padding: 0 18px; display: flex; align-items: center; gap: 22px; }
.logo { display: inline-flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; white-space: nowrap; }
.logo svg { width: 28px; height: 28px; color: var(--gold, #f6c443); }
.logo-1 { font-family: 'Jua', sans-serif; font-size: 22px; }
.logo-2 { font-family: 'Jua', sans-serif; font-size: 14px; padding: 2px 7px; border-radius: 7px; background: #f6c443; color: #4a3200; }
.site-nav { display: flex; gap: 4px; flex: 1; }
.site-nav a { padding: 8px 14px; border-radius: 10px; color: #c9cff5; text-decoration: none; font-weight: 700; font-size: 15px; white-space: nowrap; }
.site-nav a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.site-nav a.on { color: #fff; background: rgba(255, 255, 255, .14); box-shadow: inset 0 -3px 0 #f6c443; }
.account { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.acc-link { border: 0; background: none; color: #c9cff5; font: inherit; font-size: 14px; font-weight: 700; text-decoration: none; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.acc-link:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.acc-btn { padding: 8px 14px; border-radius: 10px; background: #f6c443; color: #3d2900; font-size: 14px; font-weight: 900; text-decoration: none; }
.acc-team { display: inline-flex; align-items: center; gap: 6px; max-width: 220px; padding: 7px 12px; border-radius: 10px; color: #fff; background: rgba(255, 255, 255, .1); text-decoration: none; font-weight: 700; font-size: 14px; }
.acc-team span { overflow: hidden; text-overflow: ellipsis; }

#view { flex: 1; outline: none; }
.site-footer { padding: 26px 18px 34px; text-align: center; font-size: 13px; color: #8a96b2; }
.site-footer p { margin: 0; }
.site-footer a { color: inherit; }

/* 플레이 화면: 머리글 아래를 게임이 꽉 채운다 */
body.route-full { height: 100dvh; overflow: hidden; }
body.route-full #view { min-height: 0; height: calc(100dvh - var(--header-h)); }
body.route-full .site-footer { display: none; }
body.route-full #view > .hub { height: 100%; background: linear-gradient(180deg, #2e9be6 0%, #79d0fa 55%, #dff5ff 100%); }
body.route-full #view > .page { overflow: auto; height: 100%; }
body.route-full #view > .boot { color: #1d2742; }
.boot { min-height: 50vh; }
.boot .spinner { border-color: rgba(29, 39, 66, .15); border-top-color: #3b7cf5; }

/* ---- 페이지 공통 */
.page { max-width: 1120px; margin: 0 auto; padding: 34px 20px 20px; }
.page.narrow { max-width: 760px; }
.page h1 { margin: 0 0 18px; font-family: 'Jua', sans-serif; font-weight: 400; font-size: 34px; }
.page h2 { margin: 34px 0 12px; font-family: 'Jua', sans-serif; font-weight: 400; font-size: 23px; }
.page p { line-height: 1.75; }
.sec-title { margin-top: 8px !important; }
.card { padding: 18px 20px; border-radius: 18px; background: #fff; box-shadow: 0 4px 18px rgba(20, 50, 100, .08); }
.card-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.card-head h2 { margin: 0; font-size: 20px; }
.card-head a { font-size: 13px; font-weight: 700; text-decoration: none; }
.two-col { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; margin-top: 22px; }
.btn.wide { width: 100%; }
.btn.ghost-dark { color: #fff; background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .3); text-decoration: none; }
a.btn { text-decoration: none; }

/* ---- 홈 */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: center; gap: 30px;
  max-width: 1120px; margin: 0 auto; padding: 46px 20px 40px;
}
.hero-text { min-width: 0; }
.hero-title { margin: 0 0 18px; display: flex; align-items: baseline; gap: 12px; font-family: 'Jua', sans-serif; font-weight: 400; }
.hero-title span { font-size: clamp(44px, 6vw, 70px); color: var(--night); }
.hero-title b { font-weight: 400; font-size: clamp(26px, 3.4vw, 40px); padding: 2px 14px; border-radius: 12px; background: #f6c443; color: #4a3200; }
.hero-story p { margin: 4px 0; color: #4a5679; line-height: 1.8; font-size: 16px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.hero-actions .btn.ghost-dark { color: var(--night); background: #fff; box-shadow: inset 0 0 0 1.5px #d9e1ee; }
.hero-stats { display: flex; gap: 18px; margin-top: 18px; font-size: 14px; color: #6a7896; }
.hero-stats b { color: var(--night); font-size: 17px; }
.hero-art { position: relative; border-radius: 22px; overflow: hidden; box-shadow: 0 18px 44px rgba(20, 26, 61, .35); aspect-ratio: 5 / 6; background: var(--night); }
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; }
.rule-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.rule-card { padding: 18px; border-radius: 16px; background: #fff; box-shadow: 0 4px 18px rgba(20, 50, 100, .07); }
.rule-card .ico { font-size: 24px; color: #3b7cf5; }
.rule-card h3 { margin: 8px 0 6px; font-family: 'Jua', sans-serif; font-weight: 400; font-size: 19px; }
.rule-card p { margin: 0; font-size: 14px; line-height: 1.65; color: #556282; }
.mini-board { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.mini-board li { display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 10px; background: #f3f6fb; font-size: 15px; }
.mini-board li.me { box-shadow: inset 0 0 0 2px #f6c443; }
.mini-board .rank { font-family: 'Jua', sans-serif; font-size: 18px; color: #3b7cf5; text-align: center; }
.mini-board .name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-board .score { font-size: 13px; color: #6a7896; }
.mini-board .cleared { color: #20b26b; font-family: 'Jua', sans-serif; font-weight: 400; font-size: 16px; }
.mini-board .empty, .mini-updates .empty { display: block; text-align: center; color: #8a96b2; background: none; }
.mini-updates { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.mini-updates li { display: flex; gap: 10px; align-items: baseline; font-size: 15px; }
.mini-updates time { font-size: 13px; color: #8a96b2; font-variant-numeric: tabular-nums; }
.mini-updates a { color: #1d2742; text-decoration: none; font-weight: 700; }

/* ---- 소개 */
.cat-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.cat-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 8px; border-radius: 999px; font-family: 'Jua', sans-serif; font-size: 16px; color: color-mix(in srgb, var(--cat) 75%, #000); background: color-mix(in srgb, var(--cat) 12%, #fff); }
.cat-chip img { width: 22px; height: 22px; }
.rule-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.rule-list li { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: #fff; box-shadow: 0 3px 12px rgba(20, 50, 100, .06); }
.rule-list li .ico { margin-top: 3px; font-size: 22px; color: #3b7cf5; }
.rule-list b { font-family: 'Jua', sans-serif; font-weight: 400; font-size: 18px; }
.rule-list p { margin: 2px 0 0; font-size: 14px; line-height: 1.65; color: #556282; }
.rule-list.compact { gap: 8px; text-align: left; }
.rule-list.compact li { padding: 10px 12px; box-shadow: none; background: #f3f6fb; }
.dot-list { padding-left: 20px; line-height: 1.8; }
.dot-list li { margin-bottom: 4px; }
.story { padding: 22px 24px; border-radius: 18px; background: linear-gradient(160deg, #1d2458, #0d1033); color: #d6dafa; }
.story p { margin: 2px 0; line-height: 1.85; }

/* ---- 리더보드 */
.table-wrap { overflow-x: auto; border-radius: 16px; background: #fff; box-shadow: 0 4px 18px rgba(20, 50, 100, .08); }
.board-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.board-table th { padding: 12px 14px; text-align: left; font-size: 13px; color: #6a7896; border-bottom: 2px solid #e8edf5; white-space: nowrap; }
.board-table td { padding: 12px 14px; border-bottom: 1px solid #eef2f8; }
.board-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.board-table .rank { font-family: 'Jua', sans-serif; font-size: 19px; color: #3b7cf5; width: 54px; }
.board-table .name { font-weight: 700; }
.board-table tr.cleared .rank { color: #d9a21c; }
.board-table tr.me td { background: #fff8de; }
.board-table .record b { font-family: 'Jua', sans-serif; font-weight: 400; font-size: 18px; color: #20b26b; font-variant-numeric: tabular-nums; }
.board-table .record small { display: block; font-size: 12px; color: #8a96b2; }
.board-table .empty { text-align: center; color: #8a96b2; padding: 28px; }

/* ---- 공지 */
.update { padding: 18px 20px; margin-bottom: 14px; border-radius: 16px; background: #fff; box-shadow: 0 3px 12px rgba(20, 50, 100, .06); }
.update time { font-size: 13px; color: #8a96b2; }
.update h2 { margin: 4px 0 8px !important; font-size: 21px; }
.update p { margin: 4px 0; }

/* ---- 양식 */
.form-page { max-width: 560px; }
.form-card { display: grid; gap: 14px; padding: 22px; border-radius: 18px; background: #fff; box-shadow: 0 4px 18px rgba(20, 50, 100, .08); }
.form-sec { margin: 8px 0 -4px !important; font-size: 19px !important; }
.field { display: grid; gap: 6px; }
.field-label { font-weight: 700; font-size: 14px; }
.field-help { font-size: 13px; color: #6a7896; line-height: 1.6; }
.field-err { margin: 0; min-height: 0; font-size: 13px; color: #ec4646; }
.field.ok .field-err { color: #20b26b; }
.field.bad .text-input { border-color: #ec4646; }
.text-input { width: 100%; height: 46px; padding: 0 14px; border-radius: 12px; border: 2px solid #e3eaf4; font: inherit; font-size: 16px; color: #1d2742; background: #fff; outline: none; }
.text-input:focus { border-color: #3b7cf5; box-shadow: 0 0 0 4px rgba(59, 124, 245, .15); }
.form-err { margin: 0; min-height: 1.2em; font-size: 14px; font-weight: 700; color: #ec4646; }
.form-foot { margin: 0; text-align: center; font-size: 14px; }
.member-rows { display: grid; gap: 8px; }
.member-row { display: grid; grid-template-columns: 22px 1fr 1.3fr 40px; gap: 8px; align-items: center; }
.member-no { font-family: 'Jua', sans-serif; color: #8a96b2; text-align: center; }
.member-editor { display: grid; gap: 10px; justify-items: start; }
.member-editor .member-rows { width: 100%; }
.team-info { display: grid; grid-template-columns: 90px 1fr; gap: 10px 14px; margin: 0; padding: 18px 20px; border-radius: 16px; background: #fff; box-shadow: 0 4px 18px rgba(20, 50, 100, .08); }
.team-info dt { color: #6a7896; font-size: 14px; }
.team-info dd { margin: 0; }

/* ---- 플레이 입구 · 시작 */
.page.center { display: grid; place-items: center; min-height: 60vh; }
.gate { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 34px 26px; border-radius: 22px; background: #fff; box-shadow: 0 6px 24px rgba(20, 50, 100, .1); }
.gate > .ico { font-size: 34px; color: #3b7cf5; }
.gate h1 { margin: 0 !important; font-size: 28px !important; }
.gate p { margin: 0; color: #556282; max-width: 440px; }
.gate-actions { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; justify-content: center; }
.start-card { display: grid; justify-items: center; gap: 12px; text-align: center; padding: 30px 24px; border-radius: 22px; background: #fff; box-shadow: 0 6px 24px rgba(20, 50, 100, .1); }
.start-kicker { margin: 0; font-size: 13px; font-weight: 900; color: #d9a21c; }
.start-card h1 { margin: 0 !important; }
.start-members { margin: 0; color: #556282; }
.start-card .rule-list { width: 100%; }
.me-list { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.stat-pill.team.ask { box-shadow: 0 0 0 3px #f6c443, 0 3px 10px rgba(10, 60, 120, .18); }
.guesses h4 { margin: 0 0 6px; font-size: 13px; color: #6a7896; }
.guesses ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.guesses li { display: inline-flex; align-items: baseline; gap: 5px; padding: 4px 10px; border-radius: 999px; background: #fdeeee; color: #a23131; font-size: 14px; text-decoration: line-through; text-decoration-color: rgba(162, 49, 49, .4); }
.guesses li small { font-size: 11px; color: #c07a7a; text-decoration: none; }
.toast.bad { border-left-color: #ec4646; }
.end-team-name { font-family: 'Jua', sans-serif; font-size: clamp(22px, 3vw, 32px); color: #fff; padding: 2px 16px; border-radius: 10px; background: rgba(246, 196, 67, .25); }

/* ---- 좁은 화면 */
@media (max-width: 900px) {
  :root { --header-h: 96px; }
  .site-bar { height: auto; flex-wrap: wrap; gap: 0 10px; padding: 8px 12px 0; }
  .logo { height: 40px; }
  .account { margin-left: auto; height: 40px; }
  .site-nav { order: 3; flex-basis: 100%; overflow-x: auto; scrollbar-width: none; padding-bottom: 6px; }
  .site-nav a { padding: 7px 12px; font-size: 14px; }
  .hero { grid-template-columns: 1fr; padding-top: 26px; }
  .hero-art { order: -1; aspect-ratio: 16 / 10; }
  .rule-cards { grid-template-columns: 1fr 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .page h1 { font-size: 28px; }
  .board-table th:nth-child(3), .board-table td:nth-child(3), .board-table th:nth-child(5), .board-table td:nth-child(5) { display: none; }
  /* 플레이 중에는 머리글을 한 줄로 */
  body.route-full { --header-h: 52px; }
  body.route-full .site-bar { flex-wrap: nowrap; padding: 0 10px; height: 52px; }
  body.route-full .site-nav { order: 0; flex-basis: auto; padding: 0; }
  body.route-full .site-nav a:not(.on):not([data-nav='/teams']) { display: none; }
  body.route-full .logo-1 { display: none; }
  body.route-full .acc-team span { max-width: 90px; }
  .account .acc-logout { display: none; } /* 로그아웃은 내 팀 화면에서 */
  .acc-team span { max-width: 120px; }
  /* 플레이 위 막대: 팀명은 머리글에 있으니 빼고 한 줄로 */
  .hub .team-pill { display: none; }
  .hub .topbar { justify-content: flex-end; }
  .viewer { align-content: start; }
}
body.route-full #toasts { top: calc(var(--header-h) + 62px); }
@media (max-width: 520px) {
  .rule-cards { grid-template-columns: 1fr; }
  .member-row { grid-template-columns: 18px 1fr 40px; }
  .member-row input[type='email'] { grid-column: 2; }
  .member-row .icon-btn { grid-row: 1; grid-column: 3; }
  .acc-team span { max-width: 110px; }
}
.team-logout { margin-top: 34px; text-align: center; }

/* ---- 숨은 쪽지 (F-4) — 눈에 너무 띄지 않게, 찾으면 팔랑 사라진다 */
.ph-note { display: inline-grid; place-items: center; width: 22px; height: 22px; padding: 0; margin-left: 6px; border: 0; background: none; cursor: pointer; vertical-align: middle; opacity: .78; transform: rotate(-8deg); transition: transform .2s, opacity .2s; }
.ph-note svg { width: 100%; height: 100%; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .18)); }
.ph-note:hover { opacity: 1; transform: rotate(4deg) scale(1.15); }
.ph-note.found { animation: noteAway .6s ease forwards; }
@keyframes noteAway { to { opacity: 0; transform: translateY(-14px) rotate(40deg) scale(1.4); } }
.ph-note.abs { position: absolute; z-index: 3; margin: 0; }
.ph-note.br { right: 10px; bottom: 10px; }
.ph-note.tr { right: 12px; top: 12px; }
.hero-art, .story, .update, .team-info { position: relative; }
.notes-box { padding: 12px 14px; border-radius: 12px; background: #fffaf0; box-shadow: inset 0 0 0 1.5px #f3e3b5; }
.notes-head { display: flex; justify-content: space-between; align-items: baseline; font-family: 'Jua', sans-serif; font-size: 17px; color: #8a6400; }
.notes-slots { display: flex; gap: 6px; margin: 8px 0 6px; }
.note-slot { position: relative; flex: 1; aspect-ratio: 3 / 4; max-width: 40px; display: grid; place-items: center; border-radius: 6px; font-family: 'Jua', sans-serif; font-size: 20px; color: #5a4300; background: #fff; box-shadow: inset 0 0 0 1.5px #ecd9a2; }
.note-slot small { position: absolute; left: 3px; top: 1px; font-family: 'Noto Sans KR', sans-serif; font-size: 9px; color: #b89a4c; }
.note-slot.on { background: #fff3c4; box-shadow: inset 0 0 0 2px #e2bd4f; }
.notes-box p { margin: 0; font-size: 12px; color: #8a7a52; }
.hp-note { position: absolute; display: block; transform: rotate(-12deg); opacity: .92; pointer-events: none; }
.hp-note svg { width: 100%; height: 100%; display: block; }
.hp-note.found { animation: noteAway .6s ease forwards; }

/* 장르 이름 — 다 풀면 나타난다 */
.qcat.named span, .bar-name.named { color: var(--cat); font-family: 'Jua', sans-serif; animation: genreIn 1s ease both; }
.qcat.named span { font-size: 13px; letter-spacing: -.01em; }
@keyframes genreIn { from { opacity: 0; transform: translateY(4px); filter: blur(3px); } }
.qcat span, .bar-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- 시간표 — 단계 · 다음 공개 · 입력 막힘 */
.phase-pill { display: inline-flex; align-items: baseline; gap: 8px; height: 38px; padding: 0 14px; align-items: center; border-radius: 999px; background: rgba(255, 255, 255, .92); color: #1d2742; box-shadow: 0 3px 10px rgba(10, 60, 120, .18); font-size: 13px; white-space: nowrap; }
.phase-pill b { font-family: 'Jua', sans-serif; font-weight: 400; font-size: 17px; }
.phase-pill span { font-variant-numeric: tabular-nums; color: #556282; }
.phase-pill.round b { color: #2a62d8; }
.phase-pill.break { background: #fff4d6; }
.phase-pill.break b { color: #b07800; }
.phase-pill.final b { color: #7b5ce6; }
.phase-pill.over { background: #ffe3e3; }
.phase-pill.over b { color: #c62f2f; }
.phase-pill.cleared { background: #fff1c2; }
.phase-pill.cleared b { color: #b07800; }
.topbar { flex-wrap: wrap; }
.qcell.next { color: color-mix(in srgb, var(--cat) 75%, #000); background: color-mix(in srgb, var(--cat) 6%, #fff); outline: 2px dashed color-mix(in srgb, var(--cat) 45%, #fff); outline-offset: -4px; }
.qcell.next .ico { font-size: 13px; }
.qcell .count { font-family: 'Noto Sans KR', sans-serif; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.round-info p.break { color: #b07800; }
.round-info p.over { color: #c62f2f; }
.round-info p.cleared { color: #b07800; }
.closed-form { display: flex; align-items: center; gap: 8px; padding: 14px; border-radius: 12px; background: #f3f6fb; color: #6a7896; font-size: 14px; box-shadow: inset 0 0 0 1.5px #e3eaf4; }
.form-msg.mistake { color: #b45309; }
.solution { padding: 14px 16px; border-radius: 14px; background: #fff8e1; box-shadow: inset 0 0 0 2px #f1d27a; display: grid; gap: 8px; justify-items: start; }
.solution-head { display: flex; align-items: center; gap: 6px; font-family: 'Jua', sans-serif; font-size: 17px; color: #8a6400; }
.solution-head b { font-weight: 400; }
.solution-answer { font-family: 'Jua', sans-serif; font-size: 26px; color: #1d2742; word-break: break-all; }
.solution-tip { margin: 0; font-size: 14px; color: #6b4b00; }
.solution-tip span { margin-right: 6px; font-weight: 700; color: #b07800; }
.end-story { margin-top: 10px; text-align: center; }
.end-story p { margin: 2px 0; font-size: clamp(15px, 1.8vw, 19px); color: #e8e4ff; text-shadow: 0 2px 8px rgba(0, 0, 0, .7); }
@media (max-width: 900px) {
  .phase-pill { height: 34px; padding: 0 10px; font-size: 12px; }
  .phase-pill b { font-size: 15px; }
  .hub .topbar { justify-content: space-between; }
}

/* ---- 숨은 물건 (TV · 책상 · 도구) */
.ph-find { padding: 0; border: 0; background: none; cursor: pointer; }
.ph-find.ph-tv { display: inline-block; width: 30px; height: 27px; margin-left: 10px; vertical-align: middle; opacity: .85; transform: rotate(-4deg); }
.ph-find.ph-tv:hover { opacity: 1; transform: rotate(3deg) scale(1.08); }
.ph-find.ph-tool { width: 24px; height: 18px; opacity: .8; }
.ph-find.ph-tool.abs { position: absolute; right: 12px; bottom: 12px; }
.ph-find svg { width: 100%; height: 100%; display: block; }
.desk-spot { display: flex; justify-content: flex-end; margin-top: 26px; }
.ph-desk { position: relative; width: 180px; height: 90px; cursor: default; }
.ph-desk-top, .ph-desk-under { position: absolute; padding: 0; border: 0; background: none; cursor: pointer; }
.ph-desk-top { left: 0; top: 0; width: 100%; height: 34%; }
.ph-desk-under { left: 14%; top: 38%; width: 72%; height: 62%; }
.ph-desk-under:hover { background: radial-gradient(closest-side, rgba(246, 196, 67, .18), transparent); }
.tv-panel { width: min(560px, 100%); padding: 22px; }
.tv-set { position: relative; padding: 18px 64px 18px 18px; border-radius: 22px; background: #3d4559; box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .25); }
.tv-screen { display: grid; place-items: center; min-height: 220px; border-radius: 12px; overflow: hidden; background: #0e1424; color: #9fb0d0; }
.tv-screen img { width: 100%; max-height: 60vh; object-fit: contain; animation: tvOn .5s ease; }
@keyframes tvOn { from { transform: scaleY(.02); filter: brightness(3); } }
.tv-knob { position: absolute; right: 22px; top: 40px; width: 20px; height: 20px; border-radius: 50%; background: #f6c443; }
.tv-knob.b { top: 80px; }
.sticky { align-self: center; padding: 20px 26px; transform: rotate(-3deg); background: #fff59d; box-shadow: 0 6px 14px rgba(0, 0, 0, .15); font-family: 'Jua', sans-serif; font-size: 28px; color: #3d3200; }
.tool-card { align-self: center; width: 110px; }
.tool-card svg { width: 100%; }
.find-again { justify-content: flex-start; }
.tool-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 0; border-radius: 9px; background: #fff; font-family: 'Jua', sans-serif; font-size: 15px; color: #c4456a; box-shadow: inset 0 0 0 1.5px #f3b9c9; }
.tool-btn.on { color: #fff; background: #e86a8c; box-shadow: none; }
.qfig { container-type: size; }
.qwrap { position: relative; width: min(100cqw, 100cqh * 1.41414); aspect-ratio: 2100 / 1485; }
.qwrap .qimg { width: 100%; height: 100%; max-width: none; max-height: none; }
.qtool { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; border-radius: 12px; }
.qtool[hidden] { display: none; }
.page h1.with-find { display: flex; align-items: center; }
@media (max-width: 900px) {
  .qfig { container-type: normal; }
  .qwrap { width: 100%; }
}
