/* public/court/school.css — the Chinese School and the character card, on the Court square and on every
   page of the site (public/hanzi-tap.js loads it when a Chinese character is tapped). The window look is the
   Court's; the tokens are restated here so the sheet stands alone. Written by Claude, 2026-10-27. */
#school, #hanzi { --ink: #140a2e; --paper: #fff6e8; --gold: #ffd34d; --gold-l: #fff0a0; --win-a: #4a5ad8; --win-b: #26329c; --win-c: #10175c;
  color: var(--paper); font-family: "Nunito", system-ui, sans-serif; text-shadow: 1px 1px 0 #0c0c40; box-sizing: border-box; }
#school.win, #hanzi.win { background: linear-gradient(180deg, var(--win-a) 0%, var(--win-b) 45%, var(--win-c) 100%); border: 3px solid #eef0ff; border-radius: 9px;
  box-shadow: 0 0 0 2px var(--ink), inset 0 0 0 1px #9aa6ff, inset 0 2px 0 2px rgba(255,255,255,.08), 0 8px 0 2px rgba(0,0,0,.35); }
#school h2, #school h3, #hanzi .h-big { font-family: "Fredoka", "Nunito", system-ui, sans-serif; font-weight: 600; margin: 0; }
#school *, #hanzi * { box-sizing: border-box; }
  #topbar .ch { all: unset; cursor: pointer; pointer-events: auto; color: var(--gold-l); font-size: 15px; border-bottom: 1px dotted var(--gold-l); }
#school { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(880px, calc(100vw - 24px)); max-height: min(84vh, 760px); z-index: 9; display: flex; flex-direction: column; }
#school[hidden] { display: none; }
.s-head { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 2px solid rgba(255,255,255,.25); flex-wrap: wrap; }
.s-head h2 { font-size: 20px; color: var(--gold-l); margin-right: auto; }
#school-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
#school-tabs button, #hanzi .h-foot button, #school .close { all: unset; cursor: pointer; padding: 6px 12px 7px; border-radius: 999px; background: rgba(0,0,0,.3); color: var(--paper); font-family: "Fredoka", sans-serif; font-size: 14px; }
#school-tabs button[aria-pressed="true"] { background: var(--ink); color: var(--gold-l); box-shadow: 0 0 0 2px var(--gold); }
#school-tabs button:focus-visible, #hanzi button:focus-visible, #school .close:focus-visible { outline: 2px dashed var(--gold); }
#school-wall { overflow: auto; padding: 12px 16px 16px; min-height: 0; }
#school-wall .lead, #hanzi p { font-size: 15px; line-height: 1.45; margin: 4px 0 10px; }
.group { margin-bottom: 10px; } .gh { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #cfd4ff; margin: 8px 0 6px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; } .tiles.wide { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.tile { all: unset; cursor: pointer; display: grid; justify-items: center; gap: 1px; padding: 8px 4px 7px; border-radius: 8px; background: rgba(0,0,0,.26); color: var(--paper); position: relative; text-align: center; }
.tile b { font-size: 30px; line-height: 1.1; font-weight: 400; } .tile span { font-size: 12px; color: #cfd4ff; } .tile small { font-size: 11px; color: #9ea4dc; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .tile i { position: absolute; right: 5px; top: 3px; font-size: 9px; color: #7d84c4; font-style: normal; }
.tile.deep { background: rgba(255,211,77,.14); box-shadow: inset 0 0 0 1px rgba(255,211,77,.4); } .tile:hover, .tile:focus-visible { background: rgba(255,255,255,.18); outline: none; }
.lesson h3 { font-family: "Fredoka", sans-serif; font-weight: 500; color: var(--gold-l); margin: 12px 0 4px; font-size: 17px; }
#hanzi { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(720px, calc(100vw - 24px)); max-height: min(86vh, 800px); overflow: auto; z-index: 11; padding: 16px 18px 14px; box-sizing: border-box; }
#hanzi[hidden] { display: none; }
.h-head { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; margin-bottom: 10px; }
.h-big { font-size: 96px; line-height: 1; font-weight: 400; color: var(--gold-l); text-shadow: 3px 3px 0 #0c0c40; }
.h-py { font-size: 24px; display: flex; align-items: center; gap: 8px; } .h-en { font-size: 17px; color: #e8eaff; } .h-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; font-size: 12px; color: #9ea4dc; letter-spacing: .04em; }
.say { all: unset; cursor: pointer; font-size: 18px; line-height: 1; } .say.small { font-size: 13px; }
.h-row { margin: 10px 0; } .lbl { display: block; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #cfd4ff; margin-bottom: 4px; }
.radchip { all: unset; cursor: pointer; padding: 5px 10px; border-radius: 8px; background: rgba(0,0,0,.3); } .radchip b { font-size: 22px; font-weight: 400; margin-right: 4px; } .h-rad .dim { margin-left: 10px; font-size: 12px; color: #9ea4dc; }
.parts { display: grid; gap: 6px; } .part { display: grid; grid-template-columns: auto auto 1fr; gap: 10px; align-items: baseline; padding: 6px 10px; border-radius: 8px; background: rgba(0,0,0,.22); }
.part-ch .ch { font-size: 22px; } .part .role { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; background: rgba(255,255,255,.12); } .part.meaning .role { background: rgba(63,216,196,.3); } .part.sound .role { background: rgba(255,122,168,.3); } .part .note { font-size: 14px; color: #e8eaff; }
.h-kind { color: #cfd4ff; font-size: 14px; } .story p { font-style: italic; }
.words { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.word { display: grid; justify-items: center; gap: 2px; padding: 10px 6px 8px; border-radius: 10px; background: rgba(0,0,0,.26); text-align: center; }
.word .pic { font-size: 34px; line-height: 1; margin-bottom: 4px; } .word .w { font-size: 22px; display: flex; align-items: center; gap: 4px; } .word .py { font-size: 13px; color: #cfd4ff; } .word .en { font-size: 12px; color: #e8eaff; }
button.ch { all: unset; cursor: pointer; color: var(--gold-l); border-bottom: 1px dotted rgba(255,240,160,.6); } button.ch:hover, button.ch:focus-visible { color: #fff; border-bottom-color: #fff; }
.see { display: flex; flex-wrap: wrap; gap: 6px; } .chip { all: unset; cursor: pointer; padding: 4px 10px; border-radius: 999px; background: rgba(0,0,0,.3); font-size: 18px; } .chip.dim { cursor: default; font-size: 14px; color: #cfd4ff; } .chip:hover, .chip:focus-visible { background: rgba(255,255,255,.16); outline: none; }
.h-foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }
@media (max-width: 560px) { .h-big { font-size: 64px; } .h-head { gap: 10px; } }
