/* A quieter reading surface inside a tactile, warm game world. */
:root{
  --r-btn:18px;--r-card:26px;--r-tag:10px;
  --paper-face:#FFF9E9;--paper-ink:#243B38;--paper-rule:#DED2B8;
}
@media(prefers-color-scheme:dark){
  :root{--paper-face:#233938;--paper-ink:#FFF4DC;--paper-rule:#526A62}
}
.hero{gap:12px;padding-block-start:0}
.hero-art{display:block;inline-size:100%;block-size:202px;object-fit:contain;flex:none}
.hero .title{font-size:clamp(38px,10.6vw,54px);line-height:1.15}
.hero .lede{font-family:var(--ui);font-weight:400;font-size:calc(18px * var(--fs));line-height:1.55;max-inline-size:32ch}
.hero-kicker{font-size:calc(14px * var(--fs));font-weight:600;color:var(--muted);margin-block-start:-8px}
.hero .title + .lede{margin-block-end:6px}
.rules{padding-block-start:16px}
.rules li{line-height:1.55}
.rules .promise{font-family:var(--ui);font-size:calc(16px * var(--fs));font-weight:600}
/* The object moves during a deal; its words have a quiet, high-contrast resting state. */
.cardbox .face.front.card,.ritual .face.front.card{
  color:var(--paper-ink);background-color:var(--paper-face);
  background-image:linear-gradient(150deg,rgba(255,255,255,.12),transparent 42%,rgba(115,81,35,.035));
  border-block-start:7px solid var(--accent);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.3),inset 0 -3px 0 rgba(77,48,20,.10);
}
.cardbox .card::after,.ritual .card::after{border-color:var(--paper-rule);opacity:1}
.cardbox .face.front.card::before,.ritual .face.front.card::before{opacity:.035}
.cardbox .card .badge{border:0;background:var(--accent);color:var(--on-accent);padding:7px 10px}
.cardbox .card .qtext,.ritual .card .qtext{
  font-family:var(--ui);font-weight:600;font-size:calc(clamp(26px,10.6cqw,34px) * var(--fs));
  line-height:1.42;text-wrap:pretty;overflow-wrap:break-word;
}
.cardbox .card .qtext[data-len="s"]{font-size:calc(clamp(29px,12.8cqw,41px) * var(--fs));line-height:1.35}
.cardbox .card .qtext[data-len="m"]{font-size:calc(clamp(26px,11.6cqw,37px) * var(--fs));line-height:1.4}
.qcard .qtext{font-family:var(--ui);font-weight:600;font-size:calc(clamp(23px,7.4cqw,29px) * var(--fs));line-height:1.4}
.vopt.answer .nm{font-family:var(--ui);font-weight:400;font-size:calc(18px * var(--fs));line-height:1.5}
.notecard .txt{font-family:var(--ui);font-weight:400;line-height:1.65}
.stage > .hint{font-size:calc(16px * var(--fs));line-height:1.5}
.turn{font-family:var(--ui);font-weight:600;line-height:1.3}
.turn.mine b,.turn b{font-weight:600}
.turn.listen small{font-size:calc(14px * var(--fs))}
.mode{border-radius:18px;gap:6px;padding:14px}
.mode span{line-height:1.5}
.mode.on{background:var(--surface-2)}
.howto{gap:6px}
.howto li{border:0;border-block-start:3px solid var(--line);border-radius:0;padding:7px 6px;font-size:calc(14px * var(--fs))}
.howto li.now{border-color:var(--ink);box-shadow:none;background:var(--surface);border-end-start-radius:10px;border-end-end-radius:10px}
.howto li b{font-size:calc(14px * var(--fs))}
.howto li .who{font-weight:600}
.result-prop{display:block;inline-size:92px;block-size:82px;object-fit:contain;margin-inline:auto;flex:none}
.cert .cert-ico{height:82px;margin-block-end:0}
.cert .cert-ico .result-prop{inline-size:90px;block-size:82px}
.cert{aspect-ratio:auto;min-block-size:280px}
.cert .flip-inner{height:auto;min-block-size:280px}
.cert .card{padding-block:18px 32px;gap:5px}
.cert .award-name{font-size:calc(clamp(30px,9vw,42px) * var(--fs));line-height:1.2;overflow-wrap:anywhere}
.cert .award-to{color:inherit}
html:not([data-turn="mine"]) .app[data-screen="play"] .cardbox::after{display:none}
.closing-prop{display:block;inline-size:96px;block-size:80px;object-fit:contain;align-self:center;margin-block:-4px}
.notebox{border-style:solid;border-radius:18px}
.notebox .row{align-items:stretch}
.notebox .in{min-inline-size:0}
.notebox .row .btn{flex:0 0 auto}
.connection-status{font-size:calc(15px * var(--fs));line-height:1.5}
@media(max-height:700px){
  .hero-art{block-size:160px}
  .hero{gap:8px}
  .cardbox .card .qtext[data-len="s"]{font-size:calc(clamp(26px,12cqw,37px) * var(--fs))}
  .cardbox .card .qtext[data-len="m"]{font-size:calc(clamp(26px,11cqw,33px) * var(--fs))}
}
@media(prefers-reduced-motion:no-preference){
  .hero-art{animation:atelier-arrive var(--t-pop) var(--ease-enter) both}
}
@keyframes atelier-arrive{
  0%{opacity:0;transform:translateY(18px) scale(.94) rotate(-2deg)}
  58%{opacity:1;transform:translateY(-3px) scale(1.008) rotate(.4deg)}
  82%{transform:translateY(1px) scale(.998)}
  100%{opacity:1;transform:none}
}
@media(forced-colors:active){
  .cardbox .face.front.card,.ritual .face.front.card{background:Canvas;color:CanvasText;border:2px solid CanvasText}
  .cardbox .card .badge{background:Canvas;color:CanvasText;border:1px solid CanvasText}
}

html[data-turn="mine"] .cardbox .card .qtext{font-size:calc(clamp(28px,12cqw,38px) * var(--fs))}

/* An accessibility escape hatch: large text stays large and the page scrolls.
   Normal-size questions retain the compact one-screen game table. */
html.reading-expanded .app[data-screen="play"]{height:auto;min-height:100dvh;display:flex}
html.reading-expanded #s-play{display:flex;flex-direction:column;gap:14px;flex:1}
html.reading-expanded .stage{flex:none;min-height:0}
html.reading-expanded .cardbox{container-type:inline-size;flex:none;min-height:0;display:block;text-align:center}
html.reading-expanded .cardbox > .flip{height:auto;width:min(100%,360px);aspect-ratio:auto;margin-inline:auto;display:block}
html.reading-expanded .cardbox .flip-inner{height:auto;min-height:360px}
html.reading-expanded .cardbox .face.front.card{min-height:360px;padding:76px 24px 66px;overflow:visible}
html.reading-expanded .cardbox .qtext{overflow-wrap:anywhere}
html.reading-expanded .playfoot{min-block-size:0;margin-block-start:12px}
html.reading-expanded .cardbox .hands{position:relative;inset-block-end:auto;margin-block-start:8px}
html.reading-expanded #mebar-wrap{margin-block-start:auto}
html.reading-expanded .edge-glow,html.reading-expanded body::after{display:none}
html.reading-controls-expanded #app #mini-actions{position:static;inset:auto}
/* Tall certificates use a simple outline so repeated laurel slices cannot cross enlarged names. */
html:is(.reading-expanded,.reading-controls-expanded) .cert .card .frame{display:none}
html:is(.reading-expanded,.reading-controls-expanded) .cert .card::after{display:block}
.vopt.win .sub,.vopt.win .sub bdi{color:inherit;opacity:1}
