/* Corde v1. Same self-hosted fonts and roles as Pax Domus (SIL OFL 1.1). Midnight & Brass. Fixed viewport, no scrolling. */
@font-face{font-family:"Cinzel";src:url(fonts/Cinzel.woff2) format("woff2");font-weight:400 900;font-display:swap}
@font-face{font-family:"EB Garamond";src:url(fonts/EBGaramond.woff2) format("woff2");font-weight:400 800;font-style:normal;font-display:swap}
@font-face{font-family:"EB Garamond";src:url(fonts/EBGaramond-Italic.woff2) format("woff2");font-weight:400 800;font-style:italic;font-display:swap}
:root{--title:"Cinzel",Georgia,serif;--serif:"EB Garamond",Georgia,"Times New Roman",serif;--navy:#0E1A2B;--navy2:#2E4A6B;--gold:#B8892E;--goldl:#DCC08A;--ivory:#EFE9DC;--ink:#0E1A2B;--card:#fff;--mute:#6A6F80;--ok:#2f6b45;--bad:#a33}
*{box-sizing:border-box;margin:0;-webkit-tap-highlight-color:transparent}html,body{width:100%;height:100%;overflow:hidden;overscroll-behavior:none}
body{background:var(--ivory);color:var(--ink);font-family:var(--serif);font-size:18px;-webkit-user-select:none;user-select:none;touch-action:manipulation}
button{font:inherit;color:inherit;cursor:pointer;border:none;background:none}
#app{height:100%;display:flex;flex-direction:column}
.top{height:64px;flex:none;background:var(--navy);display:flex;align-items:center;padding:0 22px;gap:14px;border-bottom:3px solid var(--gold)}
.top .b{font-family:var(--title);color:var(--goldl);font-size:28px;font-weight:600;letter-spacing:.04em}.top .s{margin-left:auto;color:#c8cde0;font-size:18px;display:flex;gap:10px;align-items:center}
.mark{width:44px;height:44px;border-radius:50%}
.tb{color:var(--goldl);border:2px solid #B8892E88;border-radius:14px;padding:6px 14px;font-size:18px;min-height:44px}
.wrap{flex:1;min-height:0;padding:20px 30px;display:flex;flex-direction:column;gap:14px}
h1{font-family:var(--title);font-size:40px;font-weight:700;letter-spacing:.04em;color:var(--navy);line-height:1.1}h2{font-family:var(--title);font-size:24px;letter-spacing:.04em;color:var(--navy);font-weight:600}
.card{background:var(--card);border-radius:22px;box-shadow:0 2px 10px #0E1A2B18;padding:20px;min-height:0}
.btn{background:var(--navy);color:var(--goldl);border-radius:18px;font-family:var(--serif);font-size:24px;font-weight:700;padding:14px 24px;min-height:60px}
.btn.g{background:var(--gold);color:var(--navy)}.btn.ghost{background:transparent;color:var(--navy);border:2px solid #d9d0bb}.btn:disabled{opacity:.4}
.pd{font-size:15px;color:var(--mute);font-style:italic}
.tag{font-size:13px;background:#B8892E33;color:#6b5410;border-radius:8px;padding:3px 9px;font-family:var(--title);white-space:nowrap}
.tag.m{background:#2f6b4522;color:var(--ok)}.tag.l{background:#e3dccb;color:var(--mute)}
.pp{font-size:12px;background:#fff3d6;color:#8a5a00;border:1px solid #e2b85c;border-radius:6px;padding:1px 6px;font-family:var(--title);white-space:nowrap}
.nm{font-family:var(--title);font-size:30px;font-weight:700;letter-spacing:.04em}.sub{font-size:22px}
.row{display:flex;align-items:center;gap:12px}.sp{margin-left:auto}.grow{flex:1;min-height:0}
.av{border-radius:50%;display:grid;place-items:center;color:#EFE9DC;font-family:var(--title);border:4px solid var(--gold);flex:none}
/* picker */
.kg{display:grid;grid-template-columns:repeat(5,1fr);gap:20px}
.kc{text-align:center;padding:28px 10px}.kc .av{width:120px;height:120px;font-size:56px;margin:0 auto}.kc .nm{font-size:28px;margin-top:14px}
/* library */
.lg{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr;gap:14px;flex:1;min-height:0}
.cat{display:flex;flex-direction:column;gap:4px;padding:14px 18px}.ci{width:42px;height:42px;border-radius:12px;background:var(--navy);color:var(--gold);display:grid;place-items:center;font-size:22px;flex:none}
.it{display:flex;align-items:center;gap:8px;border-top:1px solid #eee;padding:7px 2px;font-size:19px;text-align:left;width:100%;min-height:46px}
.it .t{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.it.lk .t{color:#999}
.pg{display:flex;gap:8px;align-items:center;margin-top:auto}.pg button{width:44px;height:40px;border-radius:12px;background:#f1ece0;font-size:20px}
/* games */
.gt{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.gb{background:var(--card);border-radius:20px;box-shadow:0 2px 10px #0E1A2B18;padding:18px;text-align:left;display:flex;flex-direction:column;gap:6px;min-height:118px}
.gb .gi{font-size:30px}.gb b{font-family:var(--title);font-size:20px;color:var(--navy)}
.txt{font-size:26px;line-height:1.55}
.lv{padding:9px 14px;border-radius:12px;background:#e3dccb;color:var(--mute);font-family:var(--title);font-size:14px;min-height:44px}.lv.on{background:var(--navy);color:var(--goldl)}.lv.d{background:#2f6b4522;color:var(--ok)}
.fl{font-size:32px;line-height:1.7}.fl .w.h{font-family:var(--title);font-weight:700}
.w{display:inline-block;margin:0 .22em;min-width:.6em}.w.h{color:var(--gold);border-bottom:3px solid var(--goldl);min-width:1.6em;text-align:center}.w.f{opacity:.35}
.bl{display:inline-block;min-width:110px;border-bottom:3px dashed var(--gold);text-align:center;color:var(--gold);margin:0 4px}
.ch{display:inline-block;padding:12px 24px;border-radius:14px;background:var(--navy);color:var(--goldl);font-size:26px;margin:5px;min-height:60px}.ch.ok{background:var(--ok);color:#fff}.ch.no{background:var(--bad);color:#fff;text-decoration:line-through}
.shake{animation:sh .35s}@keyframes sh{25%{transform:translateX(-6px)}75%{transform:translateX(6px)}}
.bar{flex:1;height:14px;background:#e3dccb;border-radius:7px;overflow:hidden}.bar>div{height:100%;background:var(--gold)}
.beads{display:flex;gap:10px;align-items:center;justify-content:center;flex-wrap:wrap}.bd{width:46px;height:46px;border-radius:50%;background:#e3dccb;border:3px solid #cfc4ab}.bd.big{width:64px;height:64px}.bd.on{background:var(--gold);border-color:var(--navy)}.bd.done{background:var(--navy2);border-color:var(--navy2)}
.ok{color:var(--ok)}.miss{background:#f3d9a0;text-decoration:underline wavy #a66;padding:0 3px;border-radius:4px}
.mic{width:110px;height:110px;border-radius:50%;background:var(--navy);display:grid;place-items:center;font-size:46px;color:#fff}.mic.on{background:var(--bad);box-shadow:0 0 0 10px #a3333333}
.ln{font-size:30px;line-height:1.45;padding:12px 18px;border-radius:14px}.ln.cur{background:#fff6df;outline:3px solid var(--gold)}.ln.past{opacity:.4}.ln.all{background:var(--navy);color:var(--ivory)}.who{font-family:var(--title);font-size:14px;letter-spacing:1px;display:block;color:var(--gold)}
/* sheet (PIN) */
#sheet:empty{display:none}#sheet{position:fixed;inset:0;background:#0E1A2Bcc;display:grid;place-items:center;z-index:5}
.pin{width:440px;max-width:94vw;text-align:center;padding:24px}.dots{display:flex;gap:18px;justify-content:center;margin:12px 0 14px}.dot{width:22px;height:22px;border-radius:50%;border:2px solid var(--navy)}.dot.f{background:var(--navy)}
.pad{display:grid;grid-template-columns:repeat(3,96px);gap:12px;justify-content:center}.pad button{height:72px;border-radius:18px;font-size:30px;font-family:var(--title);background:#fff;color:var(--navy);border:2px solid #d9d0bb}.pad button.okk{background:var(--gold)}
.pad button:active{background:#fff}.err{color:var(--bad);min-height:24px;margin-top:8px;font-size:18px}
#toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);background:var(--navy);color:var(--goldl);padding:12px 22px;border-radius:14px;font-size:20px;display:none;z-index:9}
.praise{text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;flex:1}
.splash{width:300px;height:300px;border-radius:50%;border:4px solid var(--gold)}
@media (orientation:portrait){
 .kg{grid-template-columns:repeat(2,1fr);gap:16px}.kg>.kc:last-child{grid-column:span 2;width:50%;justify-self:center}.kc{padding:16px 10px}.kc .av{width:96px;height:96px;font-size:44px}
 .lg{grid-template-columns:1fr;grid-template-rows:repeat(4,1fr);gap:10px}.cat{padding:10px 16px;gap:2px}.it{min-height:40px;padding:4px 2px;font-size:18px}
 .gt{grid-template-columns:1fr 1fr}.split{grid-template-columns:1fr!important;grid-template-rows:auto auto}.hide-p{display:none!important}
 .fl{font-size:30px}.txt{font-size:24px}.wrap{padding:16px 22px}h1{font-size:34px}}
/* in-app speech */
.rec-dot { width: 22px; height: 22px; border-radius: 50%; background: #b3261e; animation: recp 1.2s ease-in-out infinite; }
@keyframes recp { 50% { opacity: .35; transform: scale(.85); } }
.spin { width: 40px; height: 40px; border-radius: 50%; border: 4px solid #d8d2c4; border-top-color: var(--navy); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
