/* Many Hands – website. Ngôn ngữ "xưởng in riso" của game (DESIGN-V2-RESEARCH.md §4):
   bàn in xanh đêm, tờ giấy kem có dấu đăng ký ⊕ và bóng cứng không blur, mực Federal Blue halftone,
   hồng huỳnh quang cho mọi thứ của con người (nút, con dấu, điểm nhấn), lệch đăng ký hồng ở tiêu đề. */

@font-face { font-family: "Bricolage Grotesque"; src: url("../fonts/BricolageGrotesque-subset.woff2") format("woff2"); font-weight: 600 800; font-stretch: 85% 100%; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("../fonts/Archivo-subset.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }

:root {
  --desk: #1F2A44;
  --desk-deep: #16203A;
  --shadow: #0F172B;
  --paper: #F3EFE3;
  --paper-2: #E9E4D4;
  --text: #16203A;          /* chữ trên giấy */
  --muted: #5E6886;         /* chữ phụ trên giấy (≥ 4.5:1); #7C86A3 chỉ dùng cho nét trang trí */
  --line: #7C86A3;
  --ink: #3D5588;           /* Federal Blue, mực của ngày */
  --teal: #00838A;
  --burgundy: #914E72;
  --pink: #FF48B0;          /* hồng = bàn tay */
  --on-desk: #F3EFE3;
  --on-desk-muted: #B4BCD3;
  --display: "Bricolage Grotesque", "Archivo", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", system-ui, sans-serif;
  --body: "Archivo", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", system-ui, -apple-system, "Segoe UI", sans-serif;
  --halftone: radial-gradient(circle at 50% 50%, var(--ink) 1.15px, transparent 1.45px);
  --wrap: 1120px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--on-desk);
  /* bàn sáng: toả từ dưới lên */
  background: radial-gradient(120% 70% at 50% 100%, #26335A 0%, var(--desk) 45%, var(--desk-deep) 100%) fixed, var(--desk-deep);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

h1, h2, h3 { font-family: var(--display); line-height: 1.08; margin: 0 0 .4em; letter-spacing: -0.01em; }
h1 { font-size: clamp(44px, 9vw, 92px); font-weight: 800; font-stretch: 88%; }
h2 { font-size: clamp(30px, 5vw, 46px); font-weight: 800; font-stretch: 90%; }
h3 { font-size: 21px; font-weight: 700; }
p { margin: 0 0 1em; }

/* lệch đăng ký: lớp hồng lệch dưới lớp chữ */
.misreg { text-shadow: 3px 2px 0 var(--pink); }
.sheet .misreg, .sheet h2 { text-shadow: 2px 2px 0 rgba(255, 72, 176, .55); }

/* nhãn uppercase kiểu masthead */
.label {
  font-family: var(--body); font-weight: 800; font-size: 13px;
  letter-spacing: .2em; text-transform: uppercase; margin: 0 0 12px;
}
.label .hot { color: var(--pink); }
.sheet .label { color: var(--muted); }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(22, 32, 58, .94); border-bottom: 2px solid var(--shadow); backdrop-filter: saturate(1.2); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 21px; white-space: nowrap; }
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.nav a { text-decoration: none; font-weight: 700; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; padding: 8px 10px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--pink); }
@media (max-width: 560px) { .nav .opt { display: none; } .nav { flex-wrap: nowrap; gap: 0; } .nav a { padding: 8px 5px; font-size: 12px; letter-spacing: .06em; white-space: nowrap; } .brand { font-size: 19px; gap: 8px; } .site-header .wrap { padding: 0 14px; gap: 6px; } }

.masthead { border-bottom: 1px solid rgba(124, 134, 163, .35); }
.masthead .wrap { display: flex; justify-content: space-between; gap: 12px; padding-top: 8px; padding-bottom: 8px; font-size: 12px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: var(--on-desk-muted); }
.masthead .hot { color: var(--pink); }
@media (max-width: 560px) { .masthead .opt { display: none; } }

/* ---------- tờ giấy ---------- */
.sheet {
  position: relative;
  color: var(--text);
  background:
    url("../img/reg.svg") top 10px left 10px / 16px no-repeat,
    url("../img/reg.svg") top 10px right 10px / 16px no-repeat,
    url("../img/reg.svg") bottom 10px left 10px / 16px no-repeat,
    url("../img/reg.svg") bottom 10px right 10px / 16px no-repeat,
    var(--paper);
  box-shadow: 8px 8px 0 var(--shadow);
  padding: 34px 30px;
}
.sheet a { color: var(--ink); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.tilt-l { transform: rotate(-.8deg); }
.tilt-r { transform: rotate(.7deg); }

/* ---------- nút ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 12px 22px;
  font-family: var(--body); font-weight: 800; font-size: 15px; letter-spacing: .12em; text-transform: uppercase;
  text-decoration: none; border: 0; cursor: pointer;
  transition: transform .08s, box-shadow .08s;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-pink { background: var(--pink); color: var(--text); box-shadow: 5px 5px 0 var(--paper); }
.sheet .btn-pink { box-shadow: 5px 5px 0 var(--text); }
.btn-pink:hover { transform: translate(-1px, -1px); box-shadow: 6px 6px 0 var(--paper); }
.btn-pink:active { transform: translate(5px, 5px); box-shadow: 0 0 0 var(--paper); } /* nút "in xuống" */
.btn-line { background: transparent; color: var(--on-desk); box-shadow: inset 0 0 0 2px var(--on-desk); }
.btn-line:hover { color: var(--pink); box-shadow: inset 0 0 0 2px var(--pink); }
.sheet .btn-line { color: var(--text); box-shadow: inset 0 0 0 2px var(--text); }

.store { flex-direction: column; align-items: flex-start; gap: 0; line-height: 1.15; text-align: left; }
.store-row { display: inline-flex; align-items: center; gap: 12px; }
.store small { display: block; font-size: 11px; letter-spacing: .14em; opacity: .85; }
.store .big { display: block; font-size: 17px; letter-spacing: .04em; text-transform: none; font-family: var(--display); }
.store-soon { background: transparent; color: var(--on-desk-muted); box-shadow: inset 0 0 0 2px rgba(180, 188, 211, .5); cursor: default; }
.sheet .store-soon { color: var(--muted); box-shadow: inset 0 0 0 2px var(--line); }
.soon-tag { display: inline-block; margin-top: 4px; font-size: 11px; font-weight: 800; letter-spacing: .16em; color: var(--text); background: var(--paper); padding: 2px 6px; }
.btn-pink .soon-tag { background: var(--text); color: var(--paper); }
[data-appstore].is-live .soon-tag { display: none; }
.cta { display: flex; flex-wrap: wrap; gap: 18px 20px; align-items: flex-start; margin: 28px 0 8px; }

/* ---------- điện thoại ---------- */
.phone { background: #0b1120; border-radius: 34px; padding: 9px; box-shadow: 8px 8px 0 var(--shadow); max-width: 300px; }
.phone img { border-radius: 26px; width: 100%; }

/* ---------- hero ---------- */
.hero { padding: 48px 0 72px; position: relative; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero .lead { font-size: 19px; max-width: 34em; color: var(--on-desk); }
.taglines { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 4px; }
.taglines li { font-family: var(--display); font-weight: 700; font-size: 18px; color: var(--on-desk-muted); }
.taglines li span { display: inline-block; min-width: 2.4em; font-family: var(--body); font-size: 11px; font-weight: 800; letter-spacing: .16em; color: var(--pink); vertical-align: 2px; }
.hero-art { position: relative; justify-self: center; }
.hero-art .phone { transform: rotate(-2deg); max-width: 330px; }
.sticker {
  position: absolute; z-index: 2; left: -44px; top: -14px;
  background: var(--pink); color: var(--text); padding: 8px 14px 9px;
  transform: rotate(-4deg); box-shadow: 5px 5px 0 var(--shadow);
  font-family: var(--display); font-weight: 800; font-size: 22px; line-height: 1;
}
.sticker small { display: block; font-family: var(--body); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; margin-top: 4px; }
.seal-stamp { position: absolute; z-index: 2; right: -44px; top: 46%; width: 92px; height: 92px; transform: rotate(-12deg); opacity: .9; mix-blend-mode: screen; }
@media (max-width: 860px) {
  .hero { padding-top: 32px; }
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-art .phone { max-width: 280px; }
  .hero-art { margin-top: 12px; }
  .sticker { left: -12px; top: -16px; font-size: 19px; }
  .seal-stamp { right: -18px; width: 70px; height: 70px; }
}

/* ---------- sections ---------- */
section { padding: 64px 0; }
.section-head { max-width: 720px; margin-bottom: 36px; }
.section-head p { color: var(--on-desk-muted); font-size: 18px; }

/* 4 bước */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; counter-reset: step; }
.step { padding: 26px 20px 22px; }
.step:nth-child(odd) { transform: rotate(-.6deg); }
.step:nth-child(even) { transform: rotate(.5deg); }
.step .phone { max-width: 190px; margin: 0 auto 20px; box-shadow: 5px 5px 0 rgba(15, 23, 43, .35); padding: 6px; border-radius: 24px; }
.step .phone img { border-radius: 19px; }
.step .num {
  display: inline-block; font-family: var(--display); font-weight: 800; font-size: 42px; line-height: 1;
  color: transparent; background: var(--halftone) 0 0 / 5px 5px; -webkit-background-clip: text; background-clip: text;
  text-shadow: none; margin-bottom: 6px; position: relative;
}
.step .num::after { content: attr(data-n); position: absolute; left: 2px; top: 2px; color: rgba(255, 72, 176, .45); z-index: -1; }
.step p { font-size: 15.5px; margin: 0; color: var(--text); }
@media (max-width: 960px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; gap: 24px; }
  .step { display: grid; grid-template-columns: 112px 1fr; gap: 0 16px; align-items: start; padding: 22px 18px; }
  .step .phone { grid-row: 1 / span 3; max-width: 112px; margin: 0; border-radius: 16px; padding: 4px; }
  .step .phone img { border-radius: 13px; }
  .step .num { font-size: 34px; }
  .step h3 { font-size: 19px; }
  .step p { font-size: 15px; }
}

/* split: chữ + hình */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split.rev > :first-child { order: 2; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 36px; } .split.rev > :first-child { order: 0; } }

/* bảng nonogram minh hoạ (dựng bằng CSS) */
.demo { padding: 30px 28px 22px; max-width: 420px; justify-self: center; width: 100%; }
.nono { display: grid; grid-template-columns: auto repeat(5, 1fr); gap: 0; font-family: var(--body); font-weight: 800; max-width: 340px; margin: 0 auto; }
.nono .cc { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; padding-bottom: 6px; font-size: 17px; line-height: 1.15; color: var(--ink); }
.nono .rc { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding-right: 10px; font-size: 17px; color: var(--ink); white-space: nowrap; }
.nono .rc.hot, .nono .cc.hot { color: var(--text); background: rgba(255, 72, 176, .22); }
.nono .c { aspect-ratio: 1; border: 1px solid #B6BDD1; background: var(--paper); position: relative; }
.nono .c.f { background: var(--halftone) 0 0 / 5px 5px, rgba(61, 85, 136, .55); }
.nono .c.x::before, .nono .c.x::after { content: ""; position: absolute; left: 22%; right: 22%; top: 50%; height: 2.5px; background: var(--pink); transform: rotate(45deg); }
.nono .c.x::after { transform: rotate(-45deg); }
.nono .c.g::after { content: ""; position: absolute; right: 3px; top: 3px; width: 7px; height: 7px; border-radius: 50%; background: var(--pink); }
.nono .corner { }
.demo .cap { margin: 18px 0 0; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.demo .cap .dot::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--pink); margin-right: 6px; vertical-align: 1px; }
.coach { border-left: 6px solid var(--pink); background: var(--paper-2); padding: 10px 14px; margin: 0 0 22px; font-size: 15px; }

/* danh sách bài học */
.lessons { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; counter-reset: l; }
.lessons li { counter-increment: l; display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: baseline; background: var(--paper); color: var(--text); padding: 12px 16px; box-shadow: 5px 5px 0 var(--shadow); }
.lessons li::before { content: counter(l, decimal-leading-zero); font-family: var(--display); font-weight: 800; font-size: 22px; color: var(--ink); }
.lessons strong { font-family: var(--display); font-size: 18px; }
.lessons span { display: block; font-size: 15px; color: var(--muted); }

.ticks { list-style: none; padding: 0; margin: 18px 0 0; }
.ticks li { position: relative; padding-left: 30px; margin-bottom: 12px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .45em; width: 14px; height: 14px; background: var(--pink); transform: rotate(45deg) scale(.75); }
.text p, .text li { color: var(--on-desk); }
.text .soft { color: var(--on-desk-muted); }
.text .lessons li { color: var(--text); }
.text .lessons span { color: var(--muted); }

/* no guessing: tờ to */
.big-sheet { padding: 44px 40px; }
.big-sheet .grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 18px; }
.big-sheet .grid3 > div { border-top: 3px solid var(--text); padding-top: 14px; }
.big-sheet .grid3 p { font-size: 15.5px; margin: 0; }
.big-sheet h3 { font-size: 20px; }
@media (max-width: 860px) { .big-sheet { padding: 34px 24px; } .big-sheet .grid3 { grid-template-columns: 1fr; gap: 18px; } }

/* mực của ngày */
.inks { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 6px; padding: 0; list-style: none; }
.inks li { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--on-desk-muted); }
.inks i { width: 26px; height: 26px; display: inline-block; box-shadow: 3px 3px 0 var(--shadow); background-image: radial-gradient(circle, rgba(243, 239, 227, .35) 1px, transparent 1.4px); background-size: 5px 5px; }

.phones { display: flex; gap: 22px; justify-content: center; align-items: flex-start; }
.phones .phone { flex: 1 1 0; max-width: 250px; }
.phones .phone:nth-child(2) { margin-top: 48px; transform: rotate(1.2deg); }
.phones .phone:nth-child(1) { transform: rotate(-1deg); }
@media (max-width: 560px) { .phones { gap: 14px; } .phones .phone { border-radius: 22px; padding: 6px; } .phones .phone img { border-radius: 17px; } }

/* closing */
.closing .sheet { text-align: center; max-width: 760px; margin: 0 auto; padding: 48px 28px; }
.closing .sheet img.icon { width: 96px; height: 96px; margin: 0 auto 18px; border-radius: 22px; box-shadow: 5px 5px 0 var(--text); }
.closing .cta { justify-content: center; }
.closing .langs { margin-top: 18px; font-size: 14px; color: var(--muted); }

/* ---------- trang nội dung ---------- */
.page-head { padding: 52px 0 36px; }
.page-head p { color: var(--on-desk-muted); margin: 0; font-size: 18px; }
.page { padding-bottom: 72px; }
.doc { max-width: 820px; margin: 0 auto; padding: 44px 44px 40px; }
.doc h2 { font-size: 26px; margin-top: 1.6em; text-shadow: none; padding-bottom: 6px; border-bottom: 2px solid var(--text); }
.doc h2:first-of-type { margin-top: .6em; }
.doc ul { padding-left: 1.2em; }
.doc li { margin-bottom: .5em; }
.doc li::marker { color: var(--ink); }
.doc .meta { font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.well { background: var(--paper-2); border-left: 6px solid var(--pink); padding: 16px 18px; margin: 18px 0; }
.well p:last-child { margin-bottom: 0; }
.well h3 { font-size: 18px; margin-bottom: .3em; }
.table-scroll { overflow-x: auto; margin: 0 0 1em; }
table { border-collapse: collapse; width: 100%; font-size: 15px; min-width: 540px; }
th, td { text-align: left; vertical-align: top; padding: 10px 10px; border-bottom: 1px solid #C9C3B0; }
th { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; border-bottom: 2px solid var(--text); }
@media (max-width: 560px) { .doc { padding: 34px 20px 28px; } .sheet { box-shadow: 6px 6px 0 var(--shadow); } }

.faq details { border-bottom: 1px solid #C9C3B0; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 36px 16px 0; position: relative; font-family: var(--display); font-weight: 700; font-size: 19px; line-height: 1.3; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-family: var(--body); font-weight: 800; font-size: 24px; color: var(--ink); }
.faq details[open] summary::after { content: "−"; color: var(--pink); }
.faq details p { margin: 0 0 16px; }
.contact-box { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.contact-box p { flex: 1 1 320px; margin: 0; }

.notfound { text-align: center; }
.notfound .big { font-family: var(--display); font-weight: 800; font-size: 120px; line-height: 1; margin: 0 0 10px; color: transparent; background: var(--halftone) 0 0 / 6px 6px; -webkit-background-clip: text; background-clip: text; }

/* ---------- footer ---------- */
.site-footer { border-top: 2px solid var(--shadow); background: var(--desk-deep); padding: 28px 0 36px; font-size: 14px; color: var(--on-desk-muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; justify-content: space-between; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.site-footer a { text-decoration: none; font-weight: 700; color: var(--on-desk); }
.site-footer a:hover, .site-footer a[aria-current="page"] { color: var(--pink); }
.colophon { width: 100%; font-size: 11px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: #8A93AE; }


/* ---- Tranh hôm nay + phòng tranh (dữ liệu thật từ backend, vẽ bằng /print.js) ---- */
.today { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.today-sheet { display: block; position: relative; padding: 14px; text-decoration: none; }
.today-sheet canvas, .print-card canvas { display: block; width: 100%; height: auto; }
.live { position: absolute; top: -12px; right: 18px; background: var(--pink); color: var(--text); font-size: 11px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; padding: 6px 10px; box-shadow: 3px 3px 0 var(--paper); }
.live::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--text); margin-right: 6px; vertical-align: 1px; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .live::before { animation: none; } }
.today-title { font-family: var(--display, inherit); font-size: clamp(24px, 3.4vw, 34px); font-weight: 800; line-height: 1.1; margin: 0 0 6px; }
.today-artist { color: var(--on-desk-muted); margin: 0 0 20px; }
.press-bar { height: 10px; background: rgba(243, 239, 227, .14); margin-bottom: 18px; }
.press-bar i { display: block; height: 100%; width: 0; background: var(--pink); transition: width .8s ease; }
.today-stats { list-style: none; padding: 0; margin: 0 0 24px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.today-stats b { display: block; font-size: clamp(26px, 3.6vw, 36px); font-weight: 800; line-height: 1; }
.today-stats span { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--on-desk-muted); }
.prints { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 28px; }
.print-card { display: block; position: relative; padding: 12px 12px 34px; color: var(--text); text-decoration: none; transition: transform .15s ease; }
.print-card:nth-child(odd) { transform: rotate(-1deg); }
.print-card:nth-child(even) { transform: rotate(.8deg); }
.print-card:hover { transform: translate(-2px, -2px) rotate(0); }
.print-card .orig { position: absolute; right: -10px; top: -12px; width: 32%; border: 5px solid var(--paper); box-shadow: 4px 4px 0 var(--desk-deep); transform: rotate(4deg); background: var(--paper-2); }
.print-card .t { font-weight: 800; margin: 12px 0 2px; line-height: 1.2; }
.print-card .m { margin: 0; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 760px) { .today { grid-template-columns: 1fr; gap: 24px; } }
#today, #prints { overflow-x: clip; }
@media (max-width: 600px) {
  .prints { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .print-card { padding: 8px 8px 26px; }
  .print-card .t { font-size: 14px; }
  .print-card .m { font-size: 10px; letter-spacing: .06em; }
  .print-card .orig { right: -6px; top: -8px; border-width: 3px; }
}


/* ---- Trang Play (ô luyện tập hằng ngày) + bàn nonogram dùng chung với How to solve ---- */
.btn-small { min-height: 40px; padding: 8px 14px; font-size: 13px; }
.btn[aria-disabled="true"] { opacity: .35; pointer-events: none; }
.day-nav { display: flex; gap: 12px; margin-top: 18px; }
.play-page .page-head { padding-bottom: 28px; }
.play-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 36px; align-items: start; }
.play-sheet { padding: 26px 24px 24px; }
.play-sheet.tilt-l { transform: rotate(-.4deg); }
.play-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 14px; }
.where { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); flex: 1 1 200px; }
.play-stats { list-style: none; padding: 0; margin: 0; display: flex; gap: 20px; }
.play-stats li { text-align: center; }
.play-stats b { display: block; font-family: var(--display); font-size: 26px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.play-stats span { font-size: 10.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
#wrong { color: var(--text); }
.board-wrap { position: relative; }

/* bàn: cột số hàng + N cột ô; số cột ở hàng đầu */
.nono-board { display: grid; grid-template-columns: auto repeat(var(--w), minmax(0, 1fr)); font-family: var(--body); font-weight: 800; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; max-width: 520px; margin: 0 auto; }
.nono-board.is-live-board { touch-action: none; }
.nono-board .cc { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; padding: 0 0 6px; font-size: 15px; line-height: 1.12; color: var(--ink); min-height: 2em; }
.nono-board .rc { display: flex; align-items: center; justify-content: flex-end; gap: 7px; padding: 0 9px 0 4px; font-size: 15px; color: var(--ink); white-space: nowrap; }
.nono-board .cc span, .nono-board .rc span { transition: opacity .2s; }
.nono-board .done { opacity: .28; }
.nono-board .cross { background: rgba(61, 85, 136, .08); }
.nono-board .hot { background: rgba(255, 72, 176, .22); color: var(--text); }
.nono-board .bad { color: var(--pink); }
.nono-board .bad .done { opacity: 1; }
.nono-board .c { aspect-ratio: 1; border-right: 1px solid #B6BDD1; border-bottom: 1px solid #B6BDD1; background: var(--paper); position: relative; }
/* viền ngoài + vạch đậm mỗi 5 ô */
.nono-board .c.b5r { border-right: 2px solid var(--line); }
.nono-board .c.b5b { border-bottom: 2px solid var(--line); }
.nono-board.is-live-board .c { cursor: pointer; }
.nono-board .c.et { border-top: 2px solid var(--text); }
.nono-board .c.el { border-left: 2px solid var(--text); }
.nono-board .c.er { border-right: 2px solid var(--text); }
.nono-board .c.eb { border-bottom: 2px solid var(--text); }
.nono-board .c.f { background: var(--halftone) 0 0 / 5px 5px, rgba(61, 85, 136, .62); }
.nono-board .c.x::before, .nono-board .c.x::after { content: ""; position: absolute; left: 24%; right: 24%; top: 50%; height: 2.5px; margin-top: -1px; background: var(--pink); transform: rotate(45deg); }
.nono-board .c.x::after { transform: rotate(-45deg); }
.nono-board .c.g { cursor: default; }
.nono-board .c.g::after { content: ""; position: absolute; right: 3px; top: 3px; width: 26%; height: 26%; max-width: 8px; max-height: 8px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 0 1.5px var(--paper); transform: none; left: auto; }
.nono-board .c.hot { background-color: rgba(255, 72, 176, .14); }
.nono-board .c.f.hot { background: var(--halftone) 0 0 / 5px 5px, rgba(61, 85, 136, .62); box-shadow: inset 0 0 0 2px rgba(255, 72, 176, .6); }
.nono-board .c.target { box-shadow: inset 0 0 0 2px var(--pink); }
.nono-board .c.flash { animation: flash .9s ease; }
@keyframes flash { 0% { box-shadow: inset 0 0 0 40px rgba(255, 72, 176, .55); } 100% { box-shadow: inset 0 0 0 40px rgba(255, 72, 176, 0); } }

.board-msg { margin: 18px 0 16px; min-height: 3.2em; }
.board-msg.warn { border-left-color: var(--pink); background: rgba(255, 72, 176, .14); }
.tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.mode { display: inline-flex; box-shadow: inset 0 0 0 2px var(--text); }
.tool { font-family: var(--body); font-weight: 800; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--text); background: transparent; border: 0; box-shadow: inset 0 0 0 2px var(--text); min-height: 44px; padding: 8px 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.tool:disabled { opacity: .35; cursor: default; }
.mode .tool { box-shadow: none; }
.tool.on { background: var(--text); color: var(--paper); }
.tool:not(:disabled):hover { color: var(--pink); }
.tool.on:hover { color: var(--paper); }
.sw { width: 14px; height: 14px; display: inline-block; position: relative; }
.sw-f { background: var(--halftone) 0 0 / 4px 4px, rgba(61, 85, 136, .7); }
.tool.on .sw-f { background: var(--paper); }
.sw-x::before, .sw-x::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2.5px; margin-top: -1px; background: var(--pink); transform: rotate(45deg); }
.sw-x::after { transform: rotate(-45deg); }
.submit { margin-left: auto; min-height: 44px; }
.submit.ready { animation: ready 1.4s ease-in-out infinite; }
@keyframes ready { 50% { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--text); } }
.play-sheet.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-7px) rotate(-.4deg); } 40%, 80% { transform: translateX(7px) rotate(-.4deg); } }

/* thắng: ô "in xuống" lan theo đường chéo, con dấu đóng lên bàn */
.printed .nono-board .c.f { animation: inkdown .5s ease-out both; animation-delay: var(--d, 0ms); }
@keyframes inkdown { 0% { background-color: rgba(255, 72, 176, .9); transform: scale(.6); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }
.print-seal { display: none; position: absolute; right: -2%; bottom: -6%; width: 120px; height: 120px; opacity: 0; pointer-events: none; transform: rotate(-14deg) scale(2.4); }
.play-page { overflow-x: clip; }
.printed .print-seal { display: block; animation: stamp .45s cubic-bezier(.2, .9, .3, 1.2) .55s forwards; }
@keyframes stamp { 0% { opacity: 0; transform: rotate(-14deg) scale(2.4); } 70% { opacity: .95; transform: rotate(-14deg) scale(.92); } 100% { opacity: .9; transform: rotate(-14deg) scale(1); } }
canvas.burst { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 60; }

.play-side { display: grid; gap: 30px; }
.doc-card { padding: 26px 24px; }
.rules { padding-left: 1.1em; margin: 0 0 14px; font-size: 15.5px; }
.rules li { margin-bottom: 6px; }
.rules li::marker { color: var(--pink); }
.soft-ink { font-size: 15px; color: var(--muted); margin: 0; }
.app-card { padding: 28px 24px 22px; }
.app-card h2 { font-size: 26px; }
.app-card p { font-size: 15.5px; }
.app-card .cta { margin-top: 18px; gap: 14px; }
.mini-seal { position: absolute; right: 16px; top: -26px; width: 64px; height: 64px; transform: rotate(-10deg); }

/* hộp thoại thắng */
dialog.win { max-width: 460px; width: calc(100% - 32px); border: 0; padding: 30px 24px 24px; color: var(--text); text-align: center; max-height: calc(100dvh - 24px); overflow-y: auto; }
dialog.win::backdrop { background: rgba(15, 23, 43, .72); }
.win-close { position: absolute; right: 8px; top: 6px; }
.win-close .close { background: none; border: 0; font-size: 30px; line-height: 1; color: var(--text); cursor: pointer; padding: 6px 10px; }
.win h2 { font-size: 40px; margin-bottom: 14px; }
.win-print { position: relative; display: flex; justify-content: center; align-items: flex-end; gap: 12px; margin: 0 auto 10px; }
.win-print canvas { max-width: 100%; height: auto; box-shadow: 4px 4px 0 var(--text); image-rendering: pixelated; }
.win-print img { width: 30%; max-width: 120px; border: 5px solid var(--paper); box-shadow: 4px 4px 0 var(--text); transform: rotate(4deg); background: var(--paper-2); }
.win-credit { font-size: 14px; color: var(--muted); margin: 8px 0 14px; }
.win .play-stats { justify-content: center; margin-bottom: 18px; gap: 28px; }
.win-app { font-size: 14.5px; margin: 16px 0 0; }
.win .cta { justify-content: center; margin-top: 14px; }

@media (max-width: 860px) { .play-grid { grid-template-columns: 1fr; gap: 30px; } }
@media (max-width: 560px) {
  .play-sheet { padding: 30px 12px 16px; }
  .play-sheet.tilt-l { transform: none; }
  .play-stats { gap: 14px; }
  .play-stats b { font-size: 22px; }
  .nono-board .cc { font-size: 12.5px; padding-bottom: 4px; }
  .nono-board .rc { font-size: 12.5px; gap: 5px; padding-right: 6px; }
  .tools { gap: 8px; }
  .tool { padding: 8px 10px; font-size: 12px; letter-spacing: .08em; }
  .submit { margin-left: 0; flex: 1 1 100%; }
  .print-seal { right: -2%; }
}

/* ---- How to solve ---- */
.guide { max-width: 860px; margin: 0 auto; }
.guide h2 { margin-top: 1.4em; }
.guide .toc { columns: 2; column-gap: 28px; padding-left: 1.2em; }
@media (max-width: 560px) { .guide .toc { columns: 1; } }
.example { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; background: var(--paper-2); padding: 20px; margin: 18px 0 8px; }
.example .nono-board { max-width: 300px; width: 100%; }
.example .nono-board .c { background-color: var(--paper); }
.example-text p { font-size: 15.5px; }
.example-text .step-note { border-left: 6px solid var(--pink); background: var(--paper); padding: 8px 12px; min-height: 3em; font-size: 15px; }
.example .actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 680px) { .example { grid-template-columns: 1fr; padding: 16px 12px; } .example .nono-board { margin: 0 auto; } }
.play-cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; }
.play-cta p { margin: 0; flex: 1 1 280px; }
.try-web { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin: 4px 0 0; }
.try-link { font-weight: 700; color: var(--on-desk-muted); text-underline-offset: 3px; }
.try-link:hover { color: var(--pink); }
.text .soft a { color: var(--on-desk); }
