/* Paper Party Pinball — UI. Everything is a paper sticker: cream stock, brown ink outline, hard drop shadow. */
:root {
  --ink: #4a2c1a; --paper: #fffaf0; --red: #ef4b3c; --yellow: #ffd84d; --blue: #39b8ee; --green: #57c94f; --purple: #b07cf2; --orange: #ff9838;
  --display: "Lilita One", "Fredoka", "Arial Rounded MT Bold", system-ui, sans-serif;
  --text: "Fredoka", "Arial Rounded MT Bold", system-ui, sans-serif;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .2 0 0 0 0 .1 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
* { box-sizing: border-box; }
/* The whole interface is sized in rem. A rem is 1.85% of the screen's height; on a screen narrower than 4:3 (a tablet
   held upright) it follows the width instead, as if the screen were 4:3 with room to spare above and below, so the
   panels never grow wider than the screen. At 4:3 and wider nothing changes. (dvh: the height Safari really shows,
   under its bars.) The race mirrors this rule in JS: frame.js, index.js, stage.js, views.js. */
html { font-size: clamp(11px, 1.85vh, 24px); font-size: clamp(11px, min(1.85dvh, 1.3875vw), 24px); }
body { margin: 0; overflow: hidden; background: #8fd465; color: var(--ink); font-family: var(--text); font-weight: 500; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
#stage { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; display: block; }
#hud, #overlay, #screen, #popups { position: fixed; inset: 0; pointer-events: none; }
#hud > *, #overlay > *, #screen > * { pointer-events: auto; }
#overlay { z-index: 20; display: grid; place-items: center; } #screen { z-index: 30; display: grid; place-items: center; } #popups { z-index: 15; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }
kbd { font: 600 .7em var(--text); background: #fff; border: .12em solid var(--ink); border-bottom-width: .25em; border-radius: .4em; padding: .05em .4em; margin: 0 .15em; color: var(--ink); vertical-align: .1em; }
.loading { font: 2rem var(--display); color: #fff; -webkit-text-stroke: .12em var(--ink); paint-order: stroke fill; }

/* stickers */
.panel, .qcard, .pcard, .tally, .turn, .row, .pill, .meter .track { background: var(--paper) var(--grain); border: .22rem solid var(--ink); box-shadow: 0 .45rem 0 rgba(74, 44, 26, .28); border-radius: 1.3rem; }
.btn { display: inline-flex; align-items: center; gap: .4em; font: 1.35rem var(--display); letter-spacing: .02em; padding: .55em 1.1em; border-radius: .9em; border: .2rem solid var(--ink); background: #fff; box-shadow: 0 .38rem 0 var(--ink); transition: transform .08s, box-shadow .08s, filter .15s; }
.btn:hover { filter: brightness(1.06); transform: translateY(-.08rem); } .btn:active { transform: translateY(.28rem); box-shadow: 0 .1rem 0 var(--ink); }
.btn.big { font-size: 1.9rem; } .btn.go, .btn.yes { background: var(--green); color: #fff; text-shadow: 0 .1em 0 rgba(0, 0, 0, .25); } .btn.no { background: var(--red); color: #fff; text-shadow: 0 .1em 0 rgba(0, 0, 0, .25); }
.btn.ghost { background: rgba(255, 250, 240, .75); box-shadow: 0 .25rem 0 rgba(74, 44, 26, .5); font-size: 1.1rem; }
h2, h3 { font-family: var(--display); font-weight: 400; margin: 0; }

/* paper-cut lettering */
.tile { display: inline-block; font: 1em var(--display); color: #fff; min-width: .95em; padding: .02em .12em .06em; margin: 0 .03em; text-align: center; border: .07em solid var(--paper); border-radius: .16em; box-shadow: 0 0 0 .035em var(--ink), 0 .12em 0 .035em rgba(74, 44, 26, .45); text-shadow: 0 .06em 0 rgba(0, 0, 0, .22); background-image: var(--grain); animation: drop .6s calc(var(--i) * 65ms) cubic-bezier(.2, 1.5, .4, 1) both; }
.tile:nth-child(odd) { rotate: -4deg; } .tile:nth-child(even) { rotate: 3deg; translate: 0 .05em; }
.t0 { background-color: var(--red); } .t1 { background-color: var(--orange); } .t2 { background-color: var(--green); } .t3 { background-color: var(--blue); } .t4 { background-color: var(--purple); } .t5 { background-color: #f5b800; }
.gap { display: inline-block; width: .3em; } .word { display: inline-block; white-space: nowrap; }
@keyframes drop { from { transform: translateY(-120vh) rotate(-40deg); } to { transform: none; } }
.tile.zoom { animation-name: popin; } @keyframes popin { from { transform: scale(0) rotate(-30deg); } to { transform: none; } }

/* title */
.title { text-align: center; height: 100vh; height: 100dvh; padding: 3vh 0 3.5vh; display: flex; flex-direction: column; justify-content: space-between; align-items: center; pointer-events: none !important; } .title button { pointer-events: auto; }
.logo { font-size: 5.6rem; line-height: 1.02; margin: 0; display: grid; gap: .08em; filter: drop-shadow(0 .12em .1em rgba(40, 60, 20, .35)); }
.ribbon { display: inline-block; font: 2.3rem var(--display); letter-spacing: .32em; text-indent: .32em; color: #fff; background: var(--red) var(--grain); padding: .08em .7em .12em; margin-top: .5rem; border: .2rem solid var(--ink); border-radius: .5rem; rotate: -2deg; box-shadow: 0 .4rem 0 rgba(74, 44, 26, .4); animation: popin .5s .75s cubic-bezier(.2, 1.6, .4, 1) both; }
.tag { font: 1.7rem var(--display); color: #fff; -webkit-text-stroke: .28em var(--ink); paint-order: stroke fill; margin: 0 0 1rem; }
.title .go { font-size: 2.6rem; animation: bob 1.4s ease-in-out infinite; } @keyframes bob { 50% { transform: translateY(-.35rem) scale(1.04); } }
.title .go:is(:hover, :active) { animation: none; }      /* holds still under the pointer or finger, and gets the press-down every .btn has (the bob's transform hid it) */
.fine { font-size: .9rem; font-weight: 600; color: #fff; text-shadow: 0 .1em .2em rgba(40, 70, 20, .9); margin: 1rem 0 0; }

/* setup */
.setup { width: min(78rem, 94vw); max-height: 94vh; overflow: auto; padding: 1.4rem 1.8rem 1.8rem; animation: rise .35s cubic-bezier(.2, 1.3, .4, 1); }
@keyframes rise { from { transform: translateY(6vh) scale(.96); opacity: 0; } }
.setup header, .review header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; } .setup h2, .review h2 { font-size: 2.6rem; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2.2rem; } .cols > section { min-width: 0; } .setup h3 { font-size: 1.6rem; display: flex; align-items: center; gap: 1rem; margin-bottom: .8rem; }
.cols > .runs { display: flex; flex-direction: column; } .runs .hint { margin-top: auto; padding-top: .4rem; }      /* Start lines up with the bottom of the left column */
.step { display: inline-flex; align-items: center; gap: .6rem; } .step button { width: 2.2rem; height: 2.2rem; border-radius: 50%; border: .18rem solid var(--ink); background: var(--yellow); font: 1.4rem var(--display); line-height: 1; box-shadow: 0 .2rem 0 var(--ink); } .step b { font: 1.9rem var(--display); min-width: 1.2em; text-align: center; }
.teamgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; }
.teamcard { min-width: 0; background: color-mix(in srgb, var(--c) 22%, #fff); border: .2rem solid var(--ink); border-radius: 1rem; padding: .45rem .35rem; text-align: center; box-shadow: 0 .3rem 0 rgba(74, 44, 26, .25); }
.teamcard input.long { font-size: .9rem; }      /* a long English name still fits its card (Korean names stay 1rem) */
.teamcard .pick { background: none; border: 0; padding: 0; display: block; width: 100%; } .teamcard img { height: 6.2rem; max-width: 100%; object-fit: contain; filter: drop-shadow(0 .2rem 0 rgba(0, 0, 0, .18)); transition: transform .15s; } .teamcard .pick:hover img { transform: rotate(-6deg) scale(1.08); }
.teamcard input { width: 100%; font: 600 1rem var(--text); letter-spacing: -.01em; text-align: center; border: .14rem solid var(--ink); border-radius: .6rem; padding: .25rem .1rem; background: #fff; color: var(--ink); user-select: text; -webkit-user-select: text; }
.hint { font-size: .95rem; opacity: .8; margin: .7rem 0; }
.setup label { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .45rem 1rem; font-weight: 600; font-size: 1.1rem; margin-bottom: .65rem; } .setup label .seg { margin-left: auto; }      /* a long label: its buttons drop under it instead of off the box */
.setup select { font: 600 1rem var(--text); padding: .4rem .6rem; border: .16rem solid var(--ink); border-radius: .6rem; background: #fff; color: var(--ink); max-width: 60%; }
.seg { display: inline-flex; border: .16rem solid var(--ink); border-radius: .7rem; overflow: hidden; } .seg button { border: 0; background: #fff; padding: .35rem .8rem; font: 600 1rem var(--text); border-left: .12rem solid rgba(74, 44, 26, .25); } .seg button:first-child { border-left: 0; } .seg button.on { background: var(--yellow); }
.togs { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin: .9rem 0; }
.tog { display: flex; align-items: center; gap: .6rem; text-align: left; background: #fff; border: .16rem solid var(--ink); border-radius: .8rem; padding: .45rem .6rem; opacity: .72; } .tog.on { opacity: 1; background: #eaffd9; }
.tog i { flex: none; width: 2.4rem; height: 1.3rem; border-radius: 1rem; background: #cfc6b8; border: .14rem solid var(--ink); position: relative; } .tog i::after { content: ""; position: absolute; top: -.02rem; left: 0; width: 1.05rem; height: 1.05rem; border-radius: 50%; background: #fff; border: .12rem solid var(--ink); transition: left .15s; } .tog.on i { background: var(--green); } .tog.on i::after { left: 1.05rem; }
.tog b { display: block; font-size: 1rem; } .tog small { font-size: .78rem; opacity: .75; }
.setup .go { width: 100%; justify-content: center; margin-top: .4rem; }
.setup .runs > .go { position: sticky; bottom: .2rem; z-index: 1; }      /* never below the fold, even if a game adds many settings */

/* account: the sign-in corner (title screen, setup header) and the sign-in panel (src/shell/account.js) */
.acct { position: fixed; top: 1.1rem; right: 1.2rem; z-index: 31; display: flex; align-items: center; gap: .5rem; pointer-events: auto; }
.acct.inhead { position: static; margin: 0 .9rem 0 auto; }
.acct[hidden] { display: none; }
.acct .btn { font-size: 1.1rem; padding: .4em .95em; }
.acct .who { display: inline-flex; align-items: center; gap: .45rem; max-width: 15rem; font-weight: 700; font-size: 1.05rem; background: var(--paper) var(--grain); border: .16rem solid var(--ink); border-radius: 2rem; padding: .25rem .9rem .25rem .3rem; box-shadow: 0 .25rem 0 rgba(74, 44, 26, .35); }
.acct .who i { flex: none; width: 1.75rem; height: 1.75rem; display: grid; place-items: center; border-radius: 50%; background: var(--green); border: .14rem solid var(--ink); color: #fff; font: 1.05rem/1 var(--display); font-style: normal; text-shadow: 0 .08em 0 rgba(0, 0, 0, .25); }
.acct .who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-modal { position: fixed; inset: 0; z-index: 110; display: grid; place-items: center; }      /* over any window it is opened from (My decks: "Sign in to save") */
.acct-panel { position: relative; width: min(34rem, 92vw); padding: 1.3rem 1.6rem 1.5rem; user-select: text; -webkit-user-select: text; }
.acct-panel h2 { margin: .2rem 3.2rem .9rem 0; white-space: normal; }
.acct-panel p { font-size: 1.15rem; line-height: 1.4; margin: 0 0 1rem; } .acct-panel p.small { font-size: 1rem; margin-bottom: .6rem; }
.acct-panel b { overflow-wrap: anywhere; }
.acct-panel form { display: flex; flex-wrap: wrap; gap: .7rem; margin-bottom: 1rem; }
.acct-panel input { flex: 1 1 13rem; min-width: 0; font-size: 1.2rem; font-weight: 600; padding: .5rem .8rem; }
.acct-panel input[name="code"] { letter-spacing: .25em; font-variant-numeric: tabular-nums; }
.acct-panel .acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .7rem; }
.acct-panel .x { position: absolute; top: 1.1rem; right: 1.2rem; }
.acct-panel .msg { margin: 1rem 0 0; font-weight: 700; color: var(--bad); } .acct-panel .msg.ok { color: var(--ok); } .acct-panel .msg:empty { display: none; }
.acct-panel button:disabled { opacity: .55; pointer-events: none; }

/* HUD */
.board { position: absolute; left: 1.1rem; top: 50%; transform: translateY(-50%); width: 16.5rem; display: grid; gap: .55rem; }
.row { display: flex; align-items: center; gap: .6rem; padding: .3rem .8rem .3rem .4rem; border-left: .9rem solid var(--c); border-radius: 1rem; transition: transform .25s cubic-bezier(.2, 1.4, .4, 1), background .2s; position: relative; }
.row > img { height: 3.3rem; width: 3.3rem; object-fit: contain; } .row .nm { flex: 1; font-weight: 700; font-size: 1.15rem; line-height: 1.1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .cards { display: flex; gap: .15rem; height: 1.25rem; margin-top: .1rem; } .row .cards img { height: 1.25rem; }
.row .sc { font: 1.9rem var(--display); } .row.active { transform: translateX(1.1rem) scale(1.08); background-color: color-mix(in srgb, var(--c) 30%, #fffaf0); z-index: 2; }
.row.active::before { content: "▶"; position: absolute; left: -2.3rem; color: #fff; font-size: 1.3rem; text-shadow: 0 .12em 0 var(--ink); animation: nudge .7s ease-in-out infinite; } @keyframes nudge { 50% { transform: translateX(.3rem); } }
.row.lead::after { content: "👑"; position: absolute; right: -.5rem; top: -.9rem; font-size: 1.4rem; rotate: 18deg; }
.board.dense { gap: .32rem; } .board.dense .row > img { height: 2.5rem; width: 2.5rem; } .board.dense .row .sc { font-size: 1.55rem; } .board.dense .row .nm { font-size: 1rem; }
.topbar { position: absolute; top: 1rem; left: 0; right: 0; display: flex; justify-content: center; pointer-events: none !important; } .topbar > * { pointer-events: auto; }
.pill { font: 1.5rem var(--display); padding: .3rem 1.2rem; border-radius: 2rem; background-color: var(--yellow); } .pill b { font-size: 1.25em; }
.tools { position: absolute; right: 1.2rem; top: 0; display: flex; gap: .4rem; } .tools button { width: 2.7rem; height: 2.7rem; border-radius: 50%; border: .18rem solid var(--ink); background: var(--paper); box-shadow: 0 .25rem 0 rgba(74, 44, 26, .4); font-size: 1.1rem; opacity: .9; } .tools button:not(.on):nth-child(n+2):nth-child(-n+3) { opacity: .45; text-decoration: line-through; }
.turn { position: absolute; right: 1.3rem; top: 5rem; width: 15.5rem; padding: 0 0 .9rem; text-align: center; overflow: hidden; }
.turn .who { background: var(--c); color: #fff; font: 1.6rem var(--display); padding: .35rem .5rem .45rem; text-shadow: 0 .1em 0 rgba(0, 0, 0, .25); border-bottom: .2rem solid var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ringwrap { position: relative; width: 8.2rem; height: 8.2rem; margin: .8rem auto .2rem; } .ringwrap svg { width: 100%; height: 100%; rotate: -90deg; } .ringwrap circle { fill: none; stroke-width: 10; } .ringwrap .track { stroke: #eadfcd; } .ringwrap .ring { stroke: var(--c); stroke-linecap: round; stroke-dasharray: 283; transition: stroke .2s; }
.ringwrap span { position: absolute; inset: 0; display: grid; place-items: center; font: 3.6rem var(--display); } .ringwrap svg.hot .ring { stroke: var(--red); } .ringwrap svg.hot + span { color: var(--red); animation: pulse .5s infinite; } @keyframes pulse { 50% { transform: scale(1.18); } }
.ballscore small { display: block; font-weight: 700; letter-spacing: .12em; font-size: .8rem; opacity: .7; } .ballscore b { font: 4rem/1 var(--display); display: inline-block; } .ballscore b.bump { animation: bump .22s; } @keyframes bump { 40% { transform: scale(1.25) rotate(-4deg); color: var(--red); } }
.ballscore i { font: 1.5rem var(--display); font-style: normal; background: var(--red); color: #fff; border-radius: .6rem; padding: 0 .4rem; margin-left: .3rem; vertical-align: 1rem; border: .14rem solid var(--ink); }
.chip { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; background: var(--yellow); border: .15rem solid var(--ink); border-radius: 2rem; padding: .15rem .8rem .15rem .2rem; margin-top: .5rem; } .chip img { height: 2rem; }
.keys { font-size: .85rem; margin-top: .7rem; padding: 0 .5rem; line-height: 1.9; opacity: .85; }
.meter { position: absolute; left: 1.1rem; bottom: 1.2rem; width: min(26rem, 30vw); text-align: center; animation: rise .3s; }
.meter .track { position: relative; height: 3rem; border-radius: 1.5rem; overflow: hidden; background-color: #efe6d6; }
.zone { position: absolute; top: 0; bottom: 0; display: grid; place-items: center; font: .95rem var(--display); letter-spacing: .06em; background: rgba(57, 184, 238, .35); color: rgba(74, 44, 26, .7); border-inline: .12rem dashed rgba(74, 44, 26, .4); }
.zone.lit { background: var(--yellow); color: var(--ink); animation: glow .6s ease-in-out infinite alternate; } .zone.lit::before { content: "★ "; } @keyframes glow { to { background: #fff3a8; } }
#needle { position: absolute; top: -.2rem; bottom: -.2rem; width: .7rem; margin-left: -.35rem; background: var(--red); border: .15rem solid var(--ink); border-radius: .4rem; }
.meter p { margin: .5rem 0 0; font-weight: 600; color: #fff; text-shadow: 0 .1em 0 rgba(40, 60, 20, .7), 0 0 .5em rgba(40, 60, 20, .6); font-size: 1.05rem; }
.touch { display: none; position: absolute; left: 0; right: 0; bottom: 1rem; justify-content: space-between; padding: 0 1.5rem; pointer-events: none !important; }
.touch button { pointer-events: auto; font: 1.6rem var(--display); width: 9rem; height: 9rem; border-radius: 50%; border: .25rem solid var(--ink); background: var(--red); color: #fff; box-shadow: 0 .5rem 0 var(--ink); touch-action: none; } .touch button.down, .touch button:active { transform: translateY(.35rem); box-shadow: 0 .15rem 0 var(--ink); } .touch #launchBtn { background: var(--yellow); color: var(--ink); width: 11rem; height: 5rem; border-radius: 2.5rem; align-self: flex-end; }
@media (pointer: coarse) { .touch { display: flex; } .meter { bottom: 11.5rem; } .keys { display: none; } }

.tablemap { position: absolute; right: 18.2rem; top: 5rem; width: 2.1rem; height: 46vh; border: .2rem solid var(--ink); border-radius: 1.1rem; overflow: hidden; display: grid; grid-template-rows: 1fr 1fr 1fr; box-shadow: 0 .35rem 0 rgba(74, 44, 26, .28); }
.tablemap span { writing-mode: vertical-rl; rotate: 180deg; display: grid; place-items: center; font: .78rem var(--display); letter-spacing: .08em; color: rgba(255, 255, 255, .92); }
.tablemap span:nth-child(1) { background: #57b6f2; } .tablemap span:nth-child(2) { background: #3fc79c; } .tablemap span:nth-child(3) { background: #a98cf6; }
#mapdot { position: absolute; left: 50%; width: 1.5rem; height: 1.5rem; margin: 0 0 -.75rem -.75rem; border-radius: 50%; background: var(--c, #fff); border: .2rem solid var(--ink); box-shadow: 0 0 0 .18rem #fff; transition: bottom .08s linear; }
/* launch-lane choice: three big buttons the class can shout */
.lanepick { align-self: end; margin-bottom: 5vh; text-align: center; animation: rise .35s cubic-bezier(.2, 1.4, .4, 1); }
.lanepick h2 { font-size: 3rem; color: #fff; -webkit-text-stroke: .2em var(--ink); paint-order: stroke fill; margin-bottom: 1.2rem; }
.lanes { display: flex; gap: 1.6rem; justify-content: center; }
.lanebtn { position: relative; width: 17rem; padding: 1rem 1rem 1.2rem; display: grid; justify-items: center; gap: .1rem; background: var(--c) var(--grain); color: #fff; border: .28rem solid var(--ink); border-radius: 1.6rem; box-shadow: 0 0 0 .4rem var(--paper), 0 .55rem 0 .4rem rgba(74, 44, 26, .35); text-shadow: 0 .1em 0 rgba(0, 0, 0, .28); animation: deal .45s calc(var(--i) * 90ms) cubic-bezier(.2, 1.4, .4, 1) both; transition: transform .12s; }
.lanebtn:hover { transform: translateY(-.6rem) scale(1.05); } .lanebtn .where { font: 1.3rem var(--display); letter-spacing: .14em; opacity: .9; }
.lanebtn b { font: 5.4rem/1 var(--display); -webkit-text-stroke: .1em var(--ink); paint-order: stroke fill; } .lanebtn em { font-style: normal; font-weight: 700; font-size: 1.15rem; }
.lanebtn kbd, .pcard kbd { position: absolute; top: -.9rem; left: -.9rem; font-size: 1.3rem; padding: .1em .55em; text-shadow: none; }
.lanebtn.chosen { animation: lanego .55s ease-in forwards; z-index: 2; } @keyframes lanego { 35% { transform: scale(1.25) rotate(-3deg); } 100% { transform: translateY(-70vh) scale(.5) rotate(8deg); opacity: 0; } }
.lanebtn.fade { opacity: .18; transition: opacity .25s; } .pcard { position: relative; }

/* how to play: the whole game in three pictures */
.howto { position: relative; width: min(74rem, 92vw); padding: 1.6rem 2rem 2rem; text-align: center; animation: rise .35s cubic-bezier(.2, 1.3, .4, 1); } .howto h2 { font-size: 3.2rem; margin-bottom: 1rem; }
.hows { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; margin-bottom: 1.4rem; }
.how { position: relative; background: #fff; border: .2rem solid var(--ink); border-radius: 1.2rem; padding: 1.4rem 1rem 1rem; animation: deal .5s calc(var(--i) * 140ms) cubic-bezier(.2, 1.4, .4, 1) both; }
.how .n { position: absolute; top: -1.1rem; left: -1rem; width: 3rem; height: 3rem; border-radius: 50%; background: var(--yellow); border: .2rem solid var(--ink); font: 1.9rem/2.6rem var(--display); }
.how .pic { height: 7.5rem; display: flex; align-items: center; justify-content: center; gap: .5rem; } .how .pic img { height: 6.4rem; } .how .q { font: 6.5rem/1 var(--display); color: var(--red); -webkit-text-stroke: .06em var(--ink); }
.how b { font: 2.1rem var(--display); display: block; } .how p { margin: .3rem 0 0; font-size: 1.15rem; line-height: 1.3; font-weight: 600; }
.lanechip { font: 1.7rem var(--display); color: #fff; background: var(--c); border: .18rem solid var(--ink); border-radius: .7rem; padding: .25rem .55rem; box-shadow: 0 0 0 .2rem #fff, 0 .3rem 0 .2rem rgba(74, 44, 26, .3); -webkit-text-stroke: .05em var(--ink); }

/* party-card slots on the scoreboard, and the card flying into one */
.slots { display: flex; gap: .22rem; margin-top: .18rem; } .slot { width: 1.5rem; height: 1.5rem; border-radius: 50%; border: .12rem dashed rgba(74, 44, 26, .4); display: block; } .slot.full { border: 0; } .slot img { width: 100%; height: 100%; display: block; }
.board.dense .slot { width: 1.15rem; height: 1.15rem; }
.flycard { position: fixed; z-index: 40; pointer-events: none; aspect-ratio: 1; object-fit: contain; filter: drop-shadow(0 .6rem 0 rgba(0, 0, 0, .25)); }
.row.gotcard { animation: gotcard .7s cubic-bezier(.2, 1.5, .4, 1); } @keyframes gotcard { 30% { transform: scale(1.14) rotate(-2deg); filter: brightness(1.25); } }
.tally .won { margin: .35rem 0 0; font-weight: 700; display: flex; align-items: center; gap: .4rem; } .tally .won img { height: 2.6rem; }
/* GOLD RUSH reaches the scoreboard too */
body[data-fx="gold"] #hud { filter: sepia(1) saturate(2.6) hue-rotate(-12deg) brightness(1.08); transition: filter .4s; }

/* score pops + toast */
.pop { position: absolute; transform: translate(-50%, -50%); font: 1.7rem var(--display); color: #fff; -webkit-text-stroke: .28em var(--ink); paint-order: stroke fill; animation: floatup .95s ease-out forwards; white-space: nowrap; }
.pop.big { font-size: 2.8rem; color: var(--yellow); } .pop.bucket { font-size: 4.4rem; color: var(--yellow); animation-duration: 1.3s; } .pop.neg { color: #ff8a7d; font-size: 2.6rem; } .pop.peg, .pop.sling { font-size: 1.25rem; }
@keyframes floatup { 0% { opacity: 0; transform: translate(-50%, -20%) scale(.4); } 18% { opacity: 1; transform: translate(-50%, -90%) scale(1.25); } 100% { opacity: 0; transform: translate(-50%, -330%) scale(1); } }
#toast { position: fixed; left: 50%; top: 15%; z-index: 25; pointer-events: none; text-align: center; font: 5.2rem/1 var(--display); color: #fff; -webkit-text-stroke: .22em var(--ink); paint-order: stroke fill; transform: translateX(-50%) scale(0); opacity: 0; white-space: nowrap; }
#toast small { display: block; font-size: .4em; margin-top: .25em; -webkit-text-stroke: .3em var(--ink); } #toast.gold { color: var(--yellow); } #toast.bad { color: #ff8a7d; }
#toast.show { animation: toast 1.5s cubic-bezier(.2, 1.5, .4, 1) forwards; } @keyframes toast { 0% { transform: translateX(-50%) scale(0) rotate(-12deg); opacity: 0; } 14% { transform: translateX(-50%) scale(1.12) rotate(2deg); opacity: 1; } 22%, 78% { transform: translateX(-50%) scale(1) rotate(-1deg); opacity: 1; } 100% { transform: translateX(-50%) scale(.6) translateY(-3rem); opacity: 0; } }

/* banners */
.banner { display: flex; align-items: center; gap: 2rem; text-align: center; animation: bannerOut .3s ease-in forwards; animation-delay: 99s; }
.banner .bigline, .results .bigline { font-size: 8.5rem; line-height: 1.05; filter: drop-shadow(0 .1em .08em rgba(40, 60, 20, .4)); } .banner.team .bigline { font-size: 6.5rem; }
.banner.team .tile { background-color: var(--c); }
.smallline { font: 2.4rem var(--display); color: #fff; -webkit-text-stroke: .22em var(--ink); paint-order: stroke fill; margin-top: .6rem; animation: popin .4s .35s both; }
.banner .who { height: 16rem; filter: drop-shadow(0 .5rem 0 rgba(0, 0, 0, .2)); animation: hopin .55s cubic-bezier(.2, 1.5, .4, 1) both; } @keyframes hopin { from { transform: translateX(-60vw) rotate(-30deg); } }

/* question card */
.scrim { position: absolute; inset: 0; background: rgba(38, 30, 70, .5); animation: fade .25s; } .scrim.soft { background: rgba(38, 30, 70, .35); } @keyframes fade { from { opacity: 0; } }
.qcard { position: relative; width: min(56rem, 62vw); max-height: 92vh; padding: 0 2rem 1.6rem; text-align: center; rotate: -1deg; transform-origin: 50% 0; animation: qin .5s cubic-bezier(.2, 1.3, .4, 1); border-top: 1rem solid var(--c); }
@keyframes qin { from { transform: perspective(60rem) rotateX(-88deg) translateY(-20vh); opacity: 0; } }
.tape { position: absolute; top: -1.9rem; left: 50%; width: 9rem; height: 2.2rem; margin-left: -4.5rem; background: rgba(255, 216, 77, .85); rotate: 2deg; border-inline: .2rem dashed rgba(74, 44, 26, .25); }
.qcard header { display: flex; align-items: center; gap: .7rem; padding: .7rem 0 .4rem; font-size: 1.25rem; } .qcard header img { height: 3.4rem; } .qcard header span:nth-of-type(1) { flex: 1; text-align: left; }
.qclock { font: 2.3rem var(--display); min-width: 2.2em; background: var(--yellow); border: .18rem solid var(--ink); border-radius: 1rem; padding: 0 .3em; } .qclock.hot { background: var(--red); color: #fff; animation: pulse .5s infinite; }
/* the picture box is 5:2, the shape of the picker's "On the TV" preview, so a picture that fills it is cropped on the TV
   exactly as the teacher set it (34vh tall at most, as before) */
.qimg { position: relative; width: min(100%, 85vh); aspect-ratio: 5 / 2; margin: 0 auto; background: #fff; border: .16rem solid rgba(74, 44, 26, .3); border-radius: 1rem; overflow: hidden; } .qimg img { position: absolute; inset: 0; width: 100%; height: 100%; padding: .6rem; }
.qimg img[style*="cover"] { padding: 0; }      /* a picture that fills its box fills it to the frame */
/* the picture's credit line (CC BY), small under it; readable from the back of the class, quiet next to the question */
.qcredit { width: min(100%, 85vh); margin: .3rem auto 0; padding: 0 .3rem; text-align: right; font: 600 1rem/1.25 var(--text); color: rgba(74, 44, 26, .72); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.qcredit + h2 { margin-top: .5rem; }
.qcard h2 { font: 700 2.7rem/1.15 var(--text); margin: 1rem 0; } .qcard h2.solo { font-size: 3.6rem; padding: 5vh 0; }
.qbar { height: .9rem; background: #eadfcd; border-radius: 1rem; overflow: hidden; margin-bottom: 1rem; } .qbar i { display: block; height: 100%; background: var(--c); transform-origin: 0 50%; animation: shrink linear forwards; } @keyframes shrink { to { transform: scaleX(0); } }
.answer { font: 700 2.5rem var(--text); color: #0e8f7f; background: #e3fff4; border: .2rem dashed #19b7a6; border-radius: 1rem; padding: .5rem 1rem .7rem; margin-bottom: 1rem; animation: popin .35s cubic-bezier(.2, 1.5, .4, 1); } .answer small { display: block; font-size: .8rem; letter-spacing: .2em; opacity: .7; }
/* multiple choice: answer tiles A to D under the question (the teacher clicks the one the class shouts) */
.qcard h2.solo.withc { font-size: 3.1rem; padding: 2.5vh 0 1vh; }
.qchoices { display: grid; grid-template-columns: repeat(var(--n, 2), 1fr); gap: .9rem; margin: 0 0 1.2rem; }
.qchoice { display: flex; align-items: center; gap: .8rem; min-height: 4.6rem; text-align: left; font: 700 2.1rem/1.15 var(--text); color: var(--ink); background: #fff; border: .2rem solid var(--ink); border-radius: 1rem; padding: .6rem 1rem; cursor: pointer; box-shadow: 0 .3rem 0 rgba(74, 44, 26, .25); transition: transform .12s, opacity .25s, background .2s; }
.qchoice:hover { transform: translateY(-.15rem); }
.qchoice b { flex: none; display: grid; place-items: center; width: 2.7rem; height: 2.7rem; border-radius: 50%; background: var(--c); color: #fff; font-size: 1.55rem; }
.qchoices.done .qchoice { pointer-events: none; }
.qchoice.good { background: #e3fff4; border-color: #19b7a6; box-shadow: 0 0 0 .35rem #19b7a6; animation: popin .35s cubic-bezier(.2, 1.5, .4, 1); } .qchoice.good b { background: #19b7a6; }
.qchoice.bad { background: #ffe1df; border-color: var(--red); animation: shake .4s; } .qchoice.bad b { background: var(--red); }
.qchoice.dim { opacity: .35; }
.qbtns { display: flex; gap: 1rem; justify-content: center; align-items: center; }
.qcard.timeup { animation: shake .4s; } .qcard.timeup .qbar { background: var(--red); } @keyframes shake { 20%, 60% { transform: translateX(-.8rem); } 40%, 80% { transform: translateX(.8rem); } }
.qcard.right { box-shadow: 0 0 0 .8rem var(--green), 0 .45rem 0 .8rem rgba(74, 44, 26, .28); animation: yay .5s; } @keyframes yay { 40% { transform: scale(1.06) rotate(1.5deg); } }
.qcard.wrong { box-shadow: 0 0 0 .8rem var(--red); animation: shake .45s; filter: saturate(.7); }
.qcard.out { transition: transform .28s ease-in, opacity .28s; transform: translateY(-110vh) rotate(-12deg); opacity: 0; }

/* party cards */
.cardpick { position: relative; text-align: center; } .cardpick h2 { font-size: 3rem; color: #fff; -webkit-text-stroke: .2em var(--ink); paint-order: stroke fill; margin-bottom: 1.4rem; }
.hand { display: flex; gap: 1.4rem; justify-content: center; margin-bottom: 1.6rem; }
.pcard { width: 14.5rem; padding: 1rem .9rem 1.2rem; display: grid; gap: .3rem; justify-items: center; animation: deal .5s calc(var(--i) * 110ms) cubic-bezier(.2, 1.4, .4, 1) both; rotate: calc((var(--i) - 1) * 4deg); transition: transform .15s; }
.pcard:hover { transform: translateY(-1rem) scale(1.05); } .pcard img { width: 8.5rem; } .pcard b { font: 1.7rem var(--display); } .pcard span { font-size: 1rem; line-height: 1.25; }
@keyframes deal { from { transform: translateY(80vh) rotate(40deg); opacity: 0; } }
.pcard.chosen { animation: chosen .85s cubic-bezier(.3, 1.3, .5, 1) forwards; z-index: 3; } @keyframes chosen { 40% { transform: translateY(-2rem) scale(1.35) rotateY(360deg); } 100% { transform: translateY(-60vh) scale(.4) rotateY(720deg); opacity: 0; } }
.pcard.fade { opacity: .15; transition: opacity .3s; }

/* power-up cinematic: the card takes over the whole screen */
.cine { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 2vw; overflow: hidden; background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--c) 55%, #fff) 0%, var(--c) 38%, #2a1b4e 100%); animation: fade .15s; }
.rays { position: absolute; inset: -60vmax; background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, .22) 0 9deg, transparent 9deg 18deg); animation: spin 9s linear infinite; }
@keyframes spin { to { rotate: 360deg; } }
.cine .hero { position: relative; height: 46vh; filter: drop-shadow(0 1rem 0 rgba(0, 0, 0, .25)); animation: herol .5s cubic-bezier(.2, 1.5, .4, 1) both, bob 0.6s .5s ease-in-out infinite; }
.cine .hero.right { animation: heror .5s .1s cubic-bezier(.2, 1.5, .4, 1) both, bob 0.6s .6s ease-in-out infinite; }
@keyframes herol { from { transform: translateX(-70vw) rotate(-40deg); } } @keyframes heror { from { transform: translateX(70vw) rotate(40deg); } }
.cinemid { position: relative; text-align: center; max-width: 56vw; }
.cinecard { width: 30vh; height: 30vh; margin: 0 auto 1vh; animation: slam .55s cubic-bezier(.2, 1.7, .4, 1) both; filter: drop-shadow(0 1.2rem 0 rgba(0, 0, 0, .3)); }
.cinecard img { width: 100%; height: 100%; object-fit: contain; animation: wobble 1.1s .55s ease-in-out infinite; }
@keyframes slam { from { transform: scale(7) rotate(40deg); opacity: 0; } 60% { opacity: 1; } } @keyframes wobble { 50% { transform: rotate(7deg) scale(1.06); } }
.cinename { font-size: 6rem; line-height: 1.12; } .cinename .tile { animation-delay: calc(.35s + var(--i) * 45ms); }
.cine p { font: 2.7rem var(--display); color: #fff; -webkit-text-stroke: .26em var(--ink); paint-order: stroke fill; margin: 1.2vh auto 0; max-width: 34ch; animation: popin .4s 1s both; }
/* A card's reveal shakes the stage. The stage is exactly the screen's size, so each step of the shake used to uncover
   the page behind it (its lime showed down one side and along the top or bottom). While it shakes the stage is 1.8%
   larger, about its middle, which is just enough to keep the screen covered on every step: the shake moves it at most
   .5rem sideways and .4rem up or down, the rem is 1.85vh at the most (the html rule), so it needs .4 x 1.85vh / 50vh = 1.48% top and
   bottom at any height (1080: 7.99 of 540 px; 768: 5.68 of 384 px) and .5 x 1.85vh / 50vw at the sides (1920x1080:
   9.99 of 960 px = 1.04%; 1024x768: 7.10 of 512 px = 1.39%). 1.8% leaves 1.7 px to spare at 1080 and 1.2 px at 768,
   and covers any screen wider than it is tall, down to 489 px of height (under 595 px the rem stops at 11px).
   The shake itself is as it was (same distances, same .12s, same steps); the size eases in over its first step
   (quake-in: that step, with the size growing as the stage moves), and goes back at once when the reveal ends, in
   the same frame the card's picture comes off the screen. */
body.quake #stage { animation: quake .12s linear infinite, quake-in .03s linear; }
@keyframes quake { 0%, 100% { transform: translate(0, 0) scale(1.018); } 25% { transform: translate(.5rem, -.3rem) scale(1.018); } 75% { transform: translate(-.4rem, .4rem) scale(1.018); } }
@keyframes quake-in { from { transform: translate(0, 0) scale(1); } to { transform: translate(.5rem, -.3rem) scale(1.018); } }
/* while a power is live the screen edge glows in its colour */
body[data-fx]::after { content: ""; position: fixed; inset: 0; z-index: 14; pointer-events: none; box-shadow: inset 0 0 0 .7rem var(--fx), inset 0 0 9rem 1rem var(--fx); opacity: .75; animation: fxpulse .5s ease-in-out infinite alternate; }
@keyframes fxpulse { to { opacity: .35; } }
body[data-fx="mega"] { --fx: #ff7a2e; } body[data-fx="nado"] { --fx: #19b7a6; } body[data-fx="flip"] { --fx: #b07cf2; } body[data-fx="storm"] { --fx: #ffe14d; } body[data-fx="gold"] { --fx: #ffc928; } body[data-fx="ufo"] { --fx: #7fe7ff; }
#toast.huge { font-size: 8rem; top: 22%; } #toast.huge.show { animation-duration: 2.2s; }
.row.snipped { animation: snipped 1s ease-in-out; } @keyframes snipped { 20% { transform: translateX(-1rem) rotate(-4deg); filter: brightness(1.6); } 40% { transform: translateX(.8rem) rotate(3deg); } 60% { clip-path: polygon(0 0, 100% 0, 100% 45%, 0 62%); } }

/* party cards and round events (src/shell/party.js, events.js): marks on rows, chips on the turn panel, the gift, the spin */
.pcard.off { opacity: .4; filter: grayscale(.8); pointer-events: none; }
.marks { position: absolute; left: 2.3rem; bottom: -.55rem; display: flex; gap: .05rem; z-index: 1; pointer-events: none; }
.marks img { height: 2.1rem; width: 2.1rem; object-fit: contain; padding: .12rem; background: #fff; border: .13rem solid var(--ink); border-radius: 50%; box-shadow: 0 .14rem 0 rgba(74, 44, 26, .4); }
.marks img.new { animation: markin .7s cubic-bezier(.2, 1.7, .4, 1) both; } @keyframes markin { from { transform: scale(4) rotate(-30deg); opacity: 0; } }
.board.dense .marks { left: 1.8rem; } .board.dense .marks img { height: 1.5rem; width: 1.5rem; }
.slot.gone { opacity: .15; }
.pill .evpic { height: 1.7rem; vertical-align: -.35rem; margin-left: .45rem; filter: drop-shadow(0 .1rem 0 rgba(74, 44, 26, .35)); }
.mods { display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem; margin-top: .35rem; }
.mod { display: inline-flex; align-items: center; gap: .2rem; font: 1.3rem var(--display); background: var(--yellow); border: .15rem solid var(--ink); border-radius: 2rem; padding: .05rem .6rem .05rem .15rem; animation: popin .4s cubic-bezier(.2, 1.5, .4, 1) both; } .mod img { height: 1.8rem; }
.pcard img.wide { width: 12.6rem; } .slot img { object-fit: contain; }
.cinecard.wide { width: 56vh; } .cinecard.wide img { animation-name: wobblewide; } @keyframes wobblewide { 50% { transform: rotate(4deg) scale(1.05); } }
.cinecard.gift img { animation: giftshake .8s 1s linear both; transform-origin: 50% 90%; }
@keyframes giftshake { 0% { transform: none; } 11% { transform: rotate(-10deg) translateY(-4%); } 22% { transform: rotate(9deg) translateY(0); } 33% { transform: rotate(-15deg) translateY(-10%) scale(1.06); } 44% { transform: rotate(14deg) translateY(0) scale(1.06); } 55% { transform: rotate(-20deg) translateY(-18%) scale(1.12); } 66% { transform: rotate(19deg) translateY(0) scale(1.12); } 77% { transform: rotate(-22deg) translateY(-24%) scale(1.18); } 88% { transform: rotate(16deg) translateY(-6%) scale(1.2); } 100% { transform: translateY(0) scale(1.22); } }
.cinecard.open { position: relative; animation: none; } .cinecard.open .prize { animation: prizein .6s cubic-bezier(.2, 1.7, .4, 1) both, wobble 1.1s .6s ease-in-out infinite; }
@keyframes prizein { from { transform: scale(.2) rotate(-40deg); opacity: 0; } }
.giftburst { position: absolute; inset: -40%; border-radius: 50%; background: radial-gradient(circle, #fff 0 18%, var(--yellow) 30%, transparent 62%); animation: burst .6s ease-out forwards; pointer-events: none; } @keyframes burst { from { transform: scale(.2); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
.cine p.redo { animation: popin .35s .15s both; }
.cine.spin .cinemid { display: grid; justify-items: center; max-width: 64vw; }
.cine.spin .hero { position: absolute; left: 2vw; bottom: 4vh; height: 30vh; } .cine.spin .hero.right { left: auto; right: 2vw; }
.cine .evname.long { font-size: 4.2rem; }
.reel { width: 30vh; height: 30vh; overflow: hidden; margin: 1.4vh auto 1.6vh; border-radius: 2rem; background: var(--paper) var(--grain); border: .3rem solid var(--ink); box-shadow: 0 0 0 .5rem #fff, 0 1.2rem 0 .5rem rgba(0, 0, 0, .3); animation: slam .5s cubic-bezier(.2, 1.7, .4, 1) both; }
.reel .strip { display: flex; flex-direction: column; } .reel img { width: 30vh; height: 30vh; flex: none; padding: 2.6vh; object-fit: contain; filter: blur(.06rem); }
.reel.landed { animation: landed .45s cubic-bezier(.2, 1.7, .4, 1); } .reel.landed img { filter: none; } @keyframes landed { 35% { transform: scale(1.14) rotate(-3deg); } }
.cine .evname { font-size: 5rem; min-height: 1.15em; } .cine .evname .tile { animation-delay: calc(var(--i) * 35ms); } .cine.spin p { animation: none; min-height: 1.3em; } .cine.spin p.redo { animation: popin .35s .15s both; }

/* tally */
.tally { display: flex; align-items: center; gap: 1.6rem; padding: 1rem 2rem 1.2rem 1rem; border-left: 1.2rem solid var(--c); animation: rise .35s cubic-bezier(.2, 1.4, .4, 1); align-self: end; margin-bottom: 7vh; }
.tally > img { height: 9rem; animation: hopin .5s cubic-bezier(.2, 1.5, .4, 1); } .tally small { font-weight: 700; font-size: 1.15rem; letter-spacing: .04em; } .tally .num { font: 6rem/1 var(--display); color: var(--c); -webkit-text-stroke: .05em var(--ink); }
.tally .num::before { content: "+"; } .notes { margin: .2rem 0 0; font-size: 1rem; max-width: 24rem; opacity: .85; }

/* results */
.results { text-align: center; align-self: start; padding-top: 3vh; } .results .bigline { font-size: 5.6rem; } .podium { display: flex; align-items: flex-end; justify-content: center; gap: 1.2rem; margin: 2.2rem 0 1.2rem; }
.pod { display: grid; justify-items: center; animation: rise .6s cubic-bezier(.2, 1.4, .4, 1) both; } .pod img { height: 9.5rem; margin-bottom: -.2rem; position: relative; z-index: 1; filter: drop-shadow(0 .4rem 0 rgba(0, 0, 0, .18)); } .pod.p1 img { height: 12rem; animation: bob 1s ease-in-out infinite; }
.block { width: 13rem; background: var(--c) var(--grain); border: .22rem solid var(--ink); border-radius: 1rem 1rem 0 0; color: #fff; padding: .4rem .5rem 1rem; display: grid; text-shadow: 0 .1em 0 rgba(0, 0, 0, .25); box-shadow: 0 .45rem 0 rgba(74, 44, 26, .3); }
.block b { font: 3rem/1 var(--display); } .block span { font-weight: 700; font-size: 1.2rem; } .block i { font: 2.4rem var(--display); font-style: normal; } .p1 .block { height: 12rem; } .p2 .block { height: 9.5rem; } .p3 .block { height: 8rem; } .p1 { animation-delay: .5s; } .p2 { animation-delay: .25s; }
.rest { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-bottom: 1rem; } .rest span { display: inline-flex; align-items: center; gap: .4rem; background: var(--paper); border: .16rem solid var(--ink); border-left: .6rem solid var(--c); border-radius: .8rem; padding: .1rem .7rem .1rem .2rem; font-weight: 700; } .rest img { height: 2.4rem; }
.actions { display: flex; gap: .8rem; justify-content: center; align-items: center; }

/* modal */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(38, 30, 70, .55); display: grid; place-items: center; animation: fade .2s; }
.panel.center { text-align: center; padding: 1.6rem 2.4rem 2rem; display: grid; gap: .9rem; justify-items: center; } .panel.center h2 { font-size: 3rem; }
.review { width: min(60rem, 90vw); max-height: 86vh; overflow: auto; padding: 1.4rem 1.8rem; } .review ol { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.review li { display: flex; align-items: center; gap: .8rem; background: #fff; border: .14rem solid rgba(74, 44, 26, .3); border-radius: .8rem; padding: .5rem .8rem; } .review li > span { font: 1.6rem var(--display); width: 1.6rem; } .review li.ok > span { color: var(--green); } .review li.no > span { color: var(--red); } .review li div { flex: 1; } .review li i { display: block; font-style: normal; color: #0e8f7f; font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .tile, .title .go, .pod.p1 img { animation: none !important; } }

/* the class's choice on the game's own stage: a key tag over each piece (src/shell/choose.js) */
.lanepick.top { align-self: start; margin: 9vh 0 0; pointer-events: none !important; }
.lanepick.top h2 { max-width: calc(100vw - 35rem); margin-left: auto; margin-right: auto; line-height: 1.05; }   /* clear of the turn panel on both sides: a long question wraps */
.stagepicks { position: fixed; inset: 0; pointer-events: none !important; }
.stagepick { position: absolute; transform: translate(-50%, -50%); pointer-events: auto; display: grid; justify-items: center; min-width: 5.2rem; padding: .5rem .8rem .6rem; background: var(--c) var(--grain); color: #fff; border: .24rem solid var(--ink); border-radius: 1.1rem; box-shadow: 0 .4rem 0 rgba(74, 44, 26, .45); animation: stagepop .4s calc(var(--i) * 80ms) cubic-bezier(.2, 1.5, .4, 1) both; }
/* (an on-stage target's animations keep its centring: its middle sits on its board spot) */
@keyframes stagepop { from { transform: translate(-50%, -50%) scale(0) rotate(-30deg); } to { transform: translate(-50%, -50%); } }
@keyframes stagego { 35% { transform: translate(-50%, -50%) scale(1.25) rotate(-3deg); } 100% { transform: translate(-50%, -50%) translateY(-70vh) scale(.5) rotate(8deg); opacity: 0; } }
.stagepick b { font: 3.4rem/1 var(--display); -webkit-text-stroke: .1em var(--ink); paint-order: stroke fill; } .stagepick em { font-style: normal; font-weight: 700; font-size: 1rem; } .stagepick .where { font: 1rem var(--display); letter-spacing: .1em; }
.odds { display: flex; gap: .32rem; margin: .3rem 0 .05rem; } .odds i { width: 1.45rem; height: 1.45rem; border-radius: 50%; border: .2rem solid var(--ink); background: rgba(0, 0, 0, .28); box-shadow: inset 0 .18rem 0 rgba(0, 0, 0, .25); }
.odds i.on { background: #fffaf0; box-shadow: inset 0 -.2rem 0 rgba(74, 44, 26, .22), 0 .12rem 0 rgba(0, 0, 0, .25); } .lanebtn .odds i { width: 1.8rem; height: 1.8rem; }
.stagepick kbd { position: absolute; top: -.9rem; left: -.9rem; font-size: 1.1rem; padding: .1em .5em; }
.stagepick:hover { filter: brightness(1.08); } .stagepick.chosen { animation: stagego .55s ease-in forwards; z-index: 2; } .stagepick.fade { opacity: .18; transition: opacity .25s; }

/* score changes between teams (src/shell/show.js): rows bump, points fly off the row, a new leader gets a beat */
.row.gain { animation: rowgain .8s cubic-bezier(.2, 1.5, .4, 1); } @keyframes rowgain { 30% { transform: translateX(1.4rem) scale(1.12); filter: brightness(1.3); } }
.row.loss { animation: snipped .9s ease-in-out; }
.rowpop { position: fixed; z-index: 26; transform: translate(.6rem, -50%); pointer-events: none; font: 2.6rem/1 var(--display); color: var(--yellow); -webkit-text-stroke: .22em var(--ink); paint-order: stroke fill; white-space: nowrap; animation: rowpop 1.7s cubic-bezier(.2, 1.4, .4, 1) forwards; }
.rowpop.down { color: #ff8a7d; } .rowpop small { display: block; font: 1rem var(--display); color: #fff; -webkit-text-stroke: .25em var(--ink); margin-top: .15rem; }
@keyframes rowpop { 0% { opacity: 0; transform: translate(-1rem, -50%) scale(.3); } 15% { opacity: 1; transform: translate(.8rem, -50%) scale(1.2); } 75% { opacity: 1; transform: translate(1rem, -80%) scale(1); } 100% { opacity: 0; transform: translate(1rem, -140%) scale(.9); } }
.leadbeat { position: fixed; left: 50%; top: 36%; z-index: 27; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 1.4rem; pointer-events: none; animation: popin .45s cubic-bezier(.2, 1.5, .4, 1) both; }
.leadbeat img { height: 11rem; filter: drop-shadow(0 .4rem 0 rgba(0, 0, 0, .2)); } .leadbeat .bigline { font-size: 5rem; line-height: 1.05; } .leadbeat .tile { background-color: var(--c); }
/* a pick of a team: each team's character on its button; many options wrap smaller */
.lanebtn img.pic { height: 6.5rem; margin: -.2rem 0 .2rem; filter: drop-shadow(0 .25rem 0 rgba(0, 0, 0, .2)); }
.lanes.many { flex-wrap: wrap; gap: 1rem; max-width: 94vw; } .lanes.many .lanebtn { width: 11.5rem; padding: .7rem .6rem .9rem; } .lanes.many .lanebtn b { font-size: 1.7rem; -webkit-text-stroke: .12em var(--ink); } .lanes.many .lanebtn img.pic { height: 5rem; }
.tally .num.neg::before { content: "−"; } .tally .num.neg { color: #e2463b; }

/* teacher windows: what every box over the setup screen or the editor shares (My decks and the library, the importer,
   the picture picker and the whole-deck window, the sign-in panel, "Leave without saving?"; the scanner's own box
   looks the same). Paper panel over one brown dim; a header row, title left and a round ✕ right, over a dashed line;
   one tab style (the setup screen's segments); one text box; one focus ring; one empty / loading / error look; one red
   for "fix this" and one green for "done". Sizes: rem, so the boxes fit 1024x768, 1180x746 and 1920x1080 alike;
   anything a teacher may type in Korean is 1rem or more (10 pt at 1024x768 and 1180x746). */
:root { --bad: #b3261e; --ok: #23803a; --scrim: rgba(74, 44, 26, .55); --rule: rgba(74, 44, 26, .28); --soft: #fffdf6; }
.decksbox, .imp-modal, .ed-askbox, .acct-modal, .pk-scrim { background: var(--scrim); }
.decks, .imp, .pk-win, .acct-panel, .ed-askbox .panel { animation: rise .3s cubic-bezier(.2, 1.3, .4, 1); }
.decks > header, .imp-head, .pk-head { display: flex; align-items: center; gap: 1rem; min-height: 3.4rem; padding-bottom: .7rem; border-bottom: .16rem dashed var(--rule); }
.decks > header h2, .imp-head h2, .pk-head h2, .acct-panel h2, .ed-askbox h2 { font: 2rem/1.1 var(--display); letter-spacing: .01em; } .decks > header h2, .imp-head h2, .pk-head h2 { white-space: nowrap; }
/* the round ✕ (the scanner's .scanx is the same button) */
.xbtn, .pk-x, .acct-panel .x { flex: none; width: 2.6rem; height: 2.6rem; display: grid; place-items: center; margin-left: auto; padding: 0; border-radius: 50%; border: .18rem solid var(--ink); background: #fff; color: var(--ink); font: 1.1rem/1 var(--display); -webkit-text-stroke: .07em currentColor; box-shadow: 0 .22rem 0 var(--ink); transition: transform .08s, box-shadow .08s, background .12s; }      /* (the ✕ comes from a fallback font: the stroke gives it the ink weight) */
.xbtn:hover, .pk-x:hover, .acct-panel .x:hover { background: #fff6d2; }
.xbtn:active, .pk-x:active, .acct-panel .x:active { transform: translateY(.18rem); box-shadow: 0 .05rem 0 var(--ink); }
/* tabs: the setup screen's segments, one bar, the open one yellow */
.dk-tabs, .imp-tabs, .pk-tabs, .pk-style { flex: none; display: inline-flex; flex-wrap: nowrap; gap: 0; margin: 0; padding: 0; background: #fff; border: .16rem solid var(--ink); border-radius: .8rem; overflow: hidden; }
.dk-tabs button, .imp-tab, .pk-tab, .pk-style button { display: inline-flex; align-items: center; gap: .4rem; margin: 0; padding: .42rem 1rem; border: 0; border-left: .12rem solid rgba(74, 44, 26, .22); border-radius: 0; background: #fff; box-shadow: none; font: 600 1.05rem var(--text); letter-spacing: 0; color: var(--ink); white-space: nowrap; transition: background .12s; }
.dk-tabs button:first-child, .imp-tab:first-child, .pk-tab:first-child, .pk-style button:first-child { border-left: 0; }
.dk-tabs button:hover, .imp-tab:hover, .pk-tab:hover, .pk-style button:hover { background: #fff6d2; transform: none; }
.dk-tabs button.on, .imp-tab.on, .pk-tab.on, .pk-style button.on { background: var(--yellow); box-shadow: none; }
/* one text box: the editor's */
.acct-panel input, .pk-url, .pk-creditedit input, .imp textarea, .imp-ctl select, .imp-pre select { font-family: var(--text); color: var(--ink); background: var(--soft); border: .14rem solid rgba(74, 44, 26, .38); border-radius: .65rem; box-shadow: none; outline: 0; transition: border-color .12s, box-shadow .12s, background .12s; user-select: text; -webkit-user-select: text; }
.acct-panel input:hover, .pk-url:hover, .pk-creditedit input:hover, .imp textarea:hover, .imp-ctl select:hover { border-color: rgba(74, 44, 26, .7); }
.acct-panel input:focus, .pk-url:focus, .pk-creditedit input:focus, .imp textarea:focus, .imp-ctl select:focus { border-color: var(--ink); background: #fff; box-shadow: 0 0 0 .2rem var(--yellow); }
.acct-panel input::placeholder, .pk-url::placeholder, .imp textarea::placeholder { color: rgba(74, 44, 26, .42); font-weight: 500; }
/* one focus ring for every button and link */
:is(.setup, .editor, .decks, .imp, .pk-win, .acct-panel, .ed-askbox, .acct) :is(button, a, summary, [tabindex="0"]):focus-visible { outline: .2rem solid var(--blue); outline-offset: .14rem; }
:is(.dk-tabs, .imp-tabs, .pk-tabs, .pk-style, .seg) > :is(button, [tabindex="0"]):focus-visible { outline-offset: -.34rem; }      /* inside the bar, which clips its corners */
.pk-head .pk-x, .imp-head .xbtn { margin-left: 0; }      /* the search box / the tabs take the room before them */
/* nothing here / loading / it went wrong: a dashed card in the middle of the tray */
.dk-list li.dk-empty, .pk-msg, .pk-soon, .pk-drop, .imp-none { display: grid; place-content: center; justify-items: center; gap: .55rem; padding: 1.6rem 1.4rem; text-align: center; background: rgba(255, 255, 255, .6); border: .18rem dashed rgba(74, 44, 26, .4); border-radius: 1rem; box-shadow: none; }
.dk-empty b, .pk-msg b, .pk-soon b, .pk-drop b, .imp-none b { display: block; font: 1.6rem/1.15 var(--display); font-weight: 400; }
.dk-empty span, .pk-msg p, .pk-soon p, .pk-drop p, .imp-none p { max-width: 38ch; margin: 0; font: 600 1.05rem/1.35 var(--text); opacity: .8; }
.dk-empty .btn, .pk-msg .btn, .pk-drop .btn { margin-top: .3rem; }
.dk-ghost { flex: none; height: 4.2rem; border-radius: .9rem; background: linear-gradient(100deg, rgba(74, 44, 26, .07) 30%, rgba(74, 44, 26, .15) 50%, rgba(74, 44, 26, .07) 70%) 0 0 / 300% 100%; animation: pkshine 1.2s linear infinite; }
@media (prefers-reduced-motion: reduce) { .decks, .imp, .pk-win, .acct-panel, .dk-ghost, .pk-ghost { animation: none; } }

/* deck editor */
/* The teacher's side of the decks: the deck's buttons on the setup screen, the editor (src/shell/editor/editor.js)
   and the My decks / Library box (library.js). Same paper kit as the rest; teal dashes mean "the answer", as on the
   question card. One ink for everything; colour only says what a thing is (right answer, problem, the way in). */
.btn.sm { font-size: 1rem; padding: .42em .8em; border-width: .17rem; border-radius: .8em; box-shadow: 0 .26rem 0 var(--ink); } .btn.sm:active { transform: translateY(.2rem); box-shadow: 0 .06rem 0 var(--ink); }
.btn.blue { background: var(--blue); color: #fff; text-shadow: 0 .1em 0 rgba(0, 0, 0, .25); }
.btn svg { flex: none; width: 1.15em; height: 1.15em; }
/* setup screen: the deck's list, and under it New deck, Edit, My decks, Library */
.deckpick { margin-top: 1.5rem; } .deckpick h3 { margin-bottom: .6rem; }
.setup .deckpick select { display: block; width: 100%; max-width: none; font-size: 1.08rem; padding: .5rem .7rem; }
.qrow { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem 1rem; margin-top: 1rem; } .qrow .tog { flex: 1 1 13rem; min-width: 0; } .setup .qrow label { flex: none; margin: 0 0 0 auto; gap: .6rem; }
.deckpick.off select, .deckpick.off .qrow label { opacity: .5; }      /* questions off: the deck and the timer wait */
.deckbtns { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .65rem; } .deckbtns .btn.sm { font-size: 1rem; padding: .42em .8em; } .setup .deckbtns .go { width: auto; margin-top: 0; }
.decknote { margin: .55rem 0 0; font-size: .95rem; font-weight: 600; color: var(--bad); }

/* the editor: the deck on the left (its cover, who can find it, the ways in, save and play), its questions on the right */
.editor { width: min(86rem, 96vw); height: min(51rem, 94vh); height: min(51rem, 94dvh); display: grid; grid-template-columns: 19.5rem minmax(0, 1fr); gap: 1.4rem; padding: 1.3rem 1.3rem 1.4rem 1.5rem; animation: rise .35s cubic-bezier(.2, 1.3, .4, 1); }
.editor input, .editor textarea, .decks input { min-width: 0; font: 600 1.08rem var(--text); color: var(--ink); outline: 0; user-select: text; -webkit-user-select: text; }
.editor input[type="text"], .dk-search input { width: 100%; background: #fffdf6; border: .14rem solid rgba(74, 44, 26, .38); border-radius: .65rem; padding: .48rem .7rem; transition: border-color .12s, box-shadow .12s, background .12s; }
.editor input::placeholder, .dk-search input::placeholder { color: rgba(74, 44, 26, .42); font-weight: 500; }
.editor input[type="text"]:hover, .dk-search input:hover { border-color: rgba(74, 44, 26, .7); }
.editor input[type="text"]:focus, .dk-search input:focus { border-color: var(--ink); background: #fff; box-shadow: 0 0 0 .2rem var(--yellow); }
.editor input[type="text"].bad, .ec-tiles.bad .ec-tile:not(.right) .ec-c { border-color: var(--red); background: #fff1ef; }
.editor button:focus-visible, .decks button:focus-visible, .deckbtns button:focus-visible { outline: .2rem solid var(--blue); outline-offset: .12rem; }
.editor .sp { flex: 1; }
.eprob { display: flex; align-items: baseline; gap: .35rem; margin: 0; font: 600 .92rem var(--text); color: var(--bad); }
.eprob::before { content: "!"; flex: none; display: grid; place-items: center; width: 1.15rem; height: 1.15rem; border-radius: 50%; background: var(--red); color: #fff; font: .8rem var(--display); translate: 0 -.05rem; }

/* left: the deck */
.ed-side { min-height: 0; display: flex; flex-direction: column; gap: .8rem; }
.ed-back { align-self: flex-start; }
/* the deck's cover: a yellow card on a small stack, the name written on it */
.ed-deck { position: relative; isolation: isolate; margin: .55rem .7rem .35rem .2rem; }
.ed-deck::before, .ed-deck::after { content: ""; position: absolute; inset: 0; z-index: -1; border: .2rem solid var(--ink); border-radius: 1.1rem; }
.ed-deck::before { background: var(--blue) var(--grain); rotate: 4.5deg; translate: .5rem .3rem; box-shadow: 0 .3rem 0 rgba(74, 44, 26, .25); }
.ed-deck::after { background: #fff var(--grain); rotate: 1.6deg; translate: .22rem .14rem; }
.ed-cover { position: relative; background: var(--yellow) var(--grain); border: .2rem solid var(--ink); border-radius: 1.1rem; padding: 1.15rem 1rem .7rem; rotate: -1.4deg; transition: rotate .18s; } .ed-cover:focus-within { rotate: 0deg; }      /* it straightens while the name is written */
.ed-tab { position: absolute; top: -.85rem; left: .9rem; padding: .16rem .6rem .2rem; border-radius: .5rem; background: var(--ink); color: var(--paper); font: .82rem var(--display); letter-spacing: .14em; text-transform: uppercase; rotate: -2deg; }
.ed-titlewrap { display: grid; }
.ed-titlewrap::after { content: attr(data-v) " "; visibility: hidden; white-space: pre-wrap; }      /* the same words, unseen: they give the box its height, so the name's box grows with it */
.ed-titlewrap::after, #ed-title { grid-area: 1 / 1; min-width: 0; padding: .1rem .15rem .3rem; border: 0; border-bottom: .16rem dashed rgba(74, 44, 26, .5); font: 1.7rem/1.14 var(--display); letter-spacing: .01em; overflow-wrap: anywhere; }
#ed-title { width: 100%; resize: none; overflow: hidden; background: none; border-radius: .4rem .4rem 0 0; transition: background .12s; }
#ed-title::placeholder { color: rgba(74, 44, 26, .45); }
#ed-title:hover { background: rgba(255, 255, 255, .25); } #ed-title:focus { background: rgba(255, 255, 255, .5); border-bottom-style: solid; border-bottom-color: var(--ink); } #ed-title.bad { border-bottom-color: var(--red); }
.ed-sub { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .55rem; min-height: 1.35rem; margin: .5rem 0 0; font: 600 .9rem var(--text); }
.ed-sub b { font: 1.08rem var(--display); letter-spacing: .02em; } .ed-sub .warn { color: var(--bad); }
#ed-titleprob { margin: -.2rem 0 0 .3rem; }
.ed-mid { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: .95rem; margin: 0 -.4rem; padding: .1rem .4rem .45rem; scrollbar-width: thin; scrollbar-color: rgba(74, 44, 26, .4) transparent; }
.ed-vis { display: grid; gap: .35rem; } .ed-vis .seg { display: flex; } .ed-vis .seg button { flex: 1; padding: .4rem .5rem; } .ed-vis small { font-size: .9rem; line-height: 1.25; opacity: .8; }
.ed-bring { display: grid; gap: .72rem; } .ed-bring .btn { justify-content: center; } .ed-bring .btn.blue { font-size: 1.25rem; }
.ed-bring h3 { margin-bottom: -.25rem; font: 700 .82rem var(--text); letter-spacing: .12em; text-transform: uppercase; opacity: .62; }
.ed-guest { display: grid; justify-items: start; gap: .5rem; padding: .6rem .7rem .8rem; background: #fff6da; border: .14rem dashed rgba(74, 44, 26, .55); border-radius: .9rem; font-size: .88rem; line-height: 1.3; } .ed-guest p { margin: 0; }
.ed-foot { display: grid; gap: .72rem; padding-bottom: .42rem; } .ed-foot .btn { justify-content: center; }
.ed-pair { display: flex; gap: .5rem; } .ed-pair .btn { flex: 1; } .ed-pair .btn:first-child { flex: 0 1 auto; }
.ed-askbox .panel { width: min(34rem, 92vw); animation: rise .25s cubic-bezier(.2, 1.3, .4, 1); } .ed-askbox h2 { font-size: 2.4rem; } .ed-askbox p { margin: 0 0 .4rem; font-weight: 600; } .ed-askbox .btn:focus-visible { outline: .2rem solid var(--blue); outline-offset: .12rem; }

/* right: the questions, white cards on a tray */
.ed-work { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: #f0e5cf var(--grain); border: .16rem solid rgba(74, 44, 26, .32); border-radius: 1.1rem; box-shadow: inset 0 .28rem 0 rgba(74, 44, 26, .1); }
.ed-list:focus, .decks:focus { outline: 0; }
.ed-list { height: 100%; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: .7rem; padding: 1rem 1rem 4.4rem; scrollbar-width: thin; scrollbar-color: rgba(74, 44, 26, .45) transparent; }
.ecard { flex: none; display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); gap: .7rem; padding: .7rem .8rem .5rem .7rem; background: #fff; border: .16rem solid var(--ink); border-radius: 1rem; box-shadow: 0 .24rem 0 rgba(74, 44, 26, .22); transition: box-shadow .15s; }
.ecard:focus-within { box-shadow: 0 0 0 .22rem var(--yellow), 0 .3rem 0 .22rem rgba(74, 44, 26, .22); }
.ec-n { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; margin-top: .1rem; border-radius: 50%; background: var(--yellow); border: .15rem solid var(--ink); box-shadow: 0 .14rem 0 rgba(74, 44, 26, .3); font: 1.2rem var(--display); rotate: -5deg; } .ecard:nth-child(even) .ec-n { rotate: 4deg; }
.ec-main { min-width: 0; display: grid; gap: .45rem; }
.ec-line { display: flex; align-items: flex-start; gap: .75rem; }
.ec-fields { flex: 1; min-width: 0; display: grid; gap: .45rem; }
.ec-qa { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: .6rem; } .ecard.mc .ec-qa { grid-template-columns: minmax(0, 1fr); }
.editor input.ec-q { font-size: 1.15rem; }
.editor input.ec-a { color: #0b7d6f; background: #e9fff6; border: .14rem dashed #19b7a6; } .editor input.ec-a::placeholder { color: rgba(14, 143, 127, .6); } .editor input.ec-a:hover { border-color: #0e8f7f; } .editor input.ec-a:focus { border-style: solid; border-color: #0e8f7f; background: #f6fffb; }
/* the picture: a small print of it, as the TV will show it */
.ec-img { flex: none; width: 6.6rem; height: 5rem; padding: 0; overflow: hidden; background: #fff7e6; border: .15rem solid var(--ink); border-radius: .75rem; box-shadow: 0 .18rem 0 rgba(74, 44, 26, .25); rotate: -1.5deg; transition: rotate .15s, filter .15s; } .ec-img:hover { rotate: 0deg; filter: brightness(1.05); }
.ec-img img { display: block; width: 100%; height: 100%; }
.ec-credit { display: flex; align-items: center; gap: .5rem; margin: 0; font: 600 .86rem var(--text); color: rgba(74, 44, 26, .75); } .ec-credit span { flex: none; } .ec-credit.ours { font-weight: 500; }
.editor .ec-credit input { font-size: 1rem; padding: .3rem .55rem; }
.editor input.ec-more { font-size: 1.02rem; border-style: dashed; }
/* multiple choice: tiles A to D; the letter is the mark (click it: that tile is the right answer) */
.ec-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem .6rem; }
.ec-tile { position: relative; min-width: 0; display: flex; align-items: center; gap: .4rem; } .ec-c { flex: 1; }
.ec-mark { flex: none; position: relative; cursor: pointer; } .ec-mark input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.ec-mark b { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: #fff; border: .15rem solid rgba(74, 44, 26, .45); font: 1.1rem var(--display); color: rgba(74, 44, 26, .75); transition: transform .12s, background .12s, border-color .12s; }
.ec-mark:hover b { border-color: #19b7a6; color: #0e8f7f; transform: scale(1.08); } .ec-mark input:focus-visible + b { outline: .2rem solid var(--blue); outline-offset: .1rem; }
.ec-tile.right .ec-mark b { background: #19b7a6; border-color: var(--ink); color: #fff; text-shadow: 0 .08em 0 rgba(0, 0, 0, .2); }
.editor .ec-tile.right .ec-c { padding-right: 4.5rem; background: #e9fff6; border-color: #19b7a6; }
.ec-tile em { display: none; } .ec-tile.right em { position: absolute; right: .65rem; top: 50%; translate: 0 -50%; display: inline-flex; align-items: center; gap: .15rem; font: 700 .8rem var(--text); letter-spacing: .06em; text-transform: uppercase; color: #0e8f7f; pointer-events: none; } .ec-tile em svg { width: .95rem; height: .95rem; }
/* a row's tools: the switch and the extras on the left, move / duplicate / delete on the right */
.ec-opts { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-left: -.1rem; }
.ec-chip, .dk-vis { flex: none; display: inline-flex; align-items: center; gap: .38rem; height: 1.95rem; padding: 0 .62rem; border-radius: 2rem; background: #fff; border: .13rem solid rgba(74, 44, 26, .3); font: 600 .9rem var(--text); color: rgba(74, 44, 26, .85); transition: background .12s, border-color .12s, color .12s; }
.ec-chip:hover, .dk-vis:hover { background: #fff6d2; border-color: var(--ink); color: var(--ink); } .ec-chip svg { flex: none; width: 1.05rem; height: 1.05rem; }
/* a picture's two buttons, joined: change it, take it off */
.ec-join { flex: none; display: inline-flex; } .ec-join .ec-chip:first-child { padding-right: .5rem; border-radius: 2rem 0 0 2rem; } .ec-join .ec-chip.x { margin-left: -.13rem; border-radius: 0 2rem 2rem 0; }
.ec-chip.x { width: 1.9rem; padding: 0; justify-content: center; } .ec-chip.x:hover { position: relative; background: #ffe1df; border-color: #c8362a; color: #c8362a; }
.ec-chip.sw i, .dk-vis i { flex: none; position: relative; width: 1.9rem; height: 1.06rem; border-radius: 1rem; background: #cfc6b8; border: .12rem solid var(--ink); }
.ec-chip.sw i::after, .dk-vis i::after { content: ""; position: absolute; top: -.01rem; left: 0; width: .84rem; height: .84rem; border-radius: 50%; background: #fff; border: .11rem solid var(--ink); transition: left .15s; }
.ec-chip.sw.on, .dk-vis.on { background: #eaffd9; border-color: var(--ink); color: var(--ink); } .ec-chip.sw.on i, .dk-vis.on i { background: var(--green); } .ec-chip.sw.on i::after, .dk-vis.on i::after { left: .82rem; }
.ec-tool { flex: none; display: grid; place-items: center; width: 2.05rem; height: 2.05rem; padding: 0; border: 0; border-radius: 50%; background: none; color: rgba(74, 44, 26, .62); transition: background .12s, color .12s; } .ec-tool svg { width: 1.2rem; height: 1.2rem; }
.ec-tool:hover { background: #fff0c2; color: var(--ink); } .ec-tool.del:hover { background: #ffe1df; color: #c8362a; } .ec-tool:disabled { opacity: .25; pointer-events: none; }
.ecard.new { animation: ecnew .3s cubic-bezier(.2, 1.4, .4, 1); } @keyframes ecnew { from { opacity: 0; transform: translateY(-.6rem) scale(.97); } }
.ecard.moved { animation: ecmoved .7s; } @keyframes ecmoved { 0%, 35% { background: #fff3b8; } }
/* under the rows: one more, the ways to bring questions in (a new deck), the keys */
.ed-add { flex: none; display: flex; align-items: center; justify-content: center; gap: .5rem; padding: .7rem; background: rgba(255, 255, 255, .45); border: .17rem dashed rgba(74, 44, 26, .5); border-radius: 1rem; font: 1.2rem var(--display); letter-spacing: .02em; color: rgba(74, 44, 26, .85); transition: background .12s, border-color .12s, color .12s; } .ed-add:hover { background: #fff; border-color: var(--ink); color: var(--ink); } .ed-add svg { width: 1.3rem; height: 1.3rem; }
.ed-full { margin: .3rem 0; text-align: center; font-weight: 600; }
.ed-start { margin-top: .9rem; text-align: center; } .ed-start p { margin: 0 0 1rem; font: 1.3rem var(--display); }
.ed-ways { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; max-width: 46rem; margin: 0 auto; padding-bottom: .5rem; }
.ed-way { display: grid; justify-items: center; align-content: start; gap: .35rem; padding: 1.1rem 1.2rem 1.3rem; text-align: center; background: var(--blue) var(--grain); border: .2rem solid var(--ink); border-radius: 1.2rem; box-shadow: 0 .4rem 0 var(--ink); transition: transform .1s, box-shadow .1s; } .ed-way.scan { background-color: var(--purple); }
.ed-way:hover { transform: translateY(-.12rem) rotate(-.6deg); } .ed-way.scan:hover { transform: translateY(-.12rem) rotate(.6deg); } .ed-way:active { transform: translateY(.28rem); box-shadow: 0 .1rem 0 var(--ink); }
.ed-way i { display: grid; place-items: center; width: 3.6rem; height: 3.6rem; margin-bottom: .15rem; border-radius: 50%; background: #fff; border: .18rem solid var(--ink); box-shadow: 0 .2rem 0 rgba(74, 44, 26, .35); rotate: -6deg; } .ed-way.scan i { rotate: 5deg; } .ed-way i svg { width: 2rem; height: 2rem; }
.ed-way b { font: 1.55rem var(--display); letter-spacing: .02em; color: #fff; -webkit-text-stroke: .16em var(--ink); paint-order: stroke fill; } .ed-way span { max-width: 26ch; font: 600 .95rem/1.3 var(--text); }
.ed-keys { margin: .5rem 0 0; text-align: center; font-size: .84rem; color: rgba(74, 44, 26, .72); } .ed-keys span { margin: 0 .3rem; opacity: .5; }
/* what just happened: a slip over the bottom of the tray */
.ed-note { position: absolute; z-index: 2; left: 50%; bottom: .9rem; translate: -50% 0; width: max-content; max-width: calc(100% - 2rem); display: flex; align-items: center; gap: .7rem; padding: .5rem .5rem .5rem 1rem; background: var(--ink); color: var(--paper); border-radius: 1rem; box-shadow: 0 .3rem 0 rgba(0, 0, 0, .22); font: 600 .98rem var(--text); animation: ednote .25s cubic-bezier(.2, 1.4, .4, 1); } @keyframes ednote { from { opacity: 0; translate: -50% 1rem; } }
.ed-note p { margin: 0; } .ed-note.ok { background: #0f7f6f; } .ed-note.bad { background: #b93126; }
.ed-note .btn.sm { flex: none; color: var(--ink); box-shadow: 0 .2rem 0 rgba(0, 0, 0, .35); } .ed-note .ec-tool { color: rgba(255, 250, 240, .8); } .ed-note .ec-tool:hover { background: rgba(255, 255, 255, .18); color: #fff; }
.editor input.ed-link { flex: 0 1 21rem; width: 21rem; padding: .3rem .55rem; font-size: .9rem; background: #fff; border-color: transparent; }

/* My decks and the library: a box over the setup screen */
.decks { width: min(62rem, 94vw); height: min(44rem, 90vh); height: min(44rem, 90dvh); display: flex; flex-direction: column; padding: 1.1rem 1.4rem 1.4rem; }
.decks > header { margin-bottom: 1rem; }
#dk-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.dk-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 2.9rem; margin-bottom: .8rem; } #dk-count { margin: 0; font-weight: 600; opacity: .75; }
.dk-search { flex: 1; position: relative; display: block; }
.dk-search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; width: 1.1rem; height: 1.1rem; cursor: pointer; opacity: .7; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234a2c1a' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E") center / contain no-repeat; } .dk-search svg { position: absolute; left: .8rem; top: 50%; translate: 0 -50%; width: 1.3rem; height: 1.3rem; opacity: .6; pointer-events: none; } .dk-search input { padding: .6rem .8rem .6rem 2.7rem; font-size: 1.1rem; }
.decks .ed-guest { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; padding: .55rem .7rem .7rem .9rem; font-size: .95rem; }
.dk-list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: .55rem; margin: 0; padding: .9rem; list-style: none; background: #f0e5cf var(--grain); border: .16rem solid rgba(74, 44, 26, .32); border-radius: 1rem; box-shadow: inset 0 .28rem 0 rgba(74, 44, 26, .1); scrollbar-width: thin; scrollbar-color: rgba(74, 44, 26, .45) transparent; }
.dk-list li { flex: none; display: flex; align-items: center; gap: .9rem; padding: .6rem .8rem .7rem 1rem; background: #fff; border: .15rem solid var(--ink); border-radius: .9rem; box-shadow: 0 .2rem 0 rgba(74, 44, 26, .2); }
.dk-what { flex: 1; min-width: 0; display: grid; gap: .05rem; } .dk-what b { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font: 600 1.15rem var(--text); } .dk-what small { font-size: .92rem; opacity: .75; }
.dk-what .dk-said { opacity: 1; font-weight: 600; } .dk-said.ok { color: var(--ok); } .dk-said.bad { color: var(--bad); } .dk-url { text-decoration: underline; word-break: break-all; user-select: all; -webkit-user-select: all; }
.dk-acts { flex: none; display: flex; align-items: center; gap: .5rem; } .dk-sure { margin-right: .3rem; font-weight: 600; }
.dk-list li.dk-empty { flex: none; margin: auto; width: min(34rem, 100%); }

@media (pointer: coarse) { .ec-tool { width: 2.4rem; height: 2.4rem; } .ec-chip, .dk-vis { height: 2.3rem; } .ec-chip.x { width: 2.3rem; } .ed-keys { display: none; } }
/* a narrow window (a phone): the deck above its questions, the whole editor scrolls */
@media (max-width: 700px) {
  .editor { display: block; height: 96vh; height: 96dvh; overflow-y: auto; padding: 1rem; } .ed-side { margin-bottom: 1rem; } .ed-mid { overflow: visible; }
  .ed-work { overflow: visible; } .ed-list { height: auto; overflow: visible; } .ed-note { position: sticky; }
  .ec-qa, .ec-tiles, .ed-ways { grid-template-columns: minmax(0, 1fr); } .dk-list li { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { .editor, .decks, .ed-askbox .panel, .ecard.new, .ecard.moved, .ed-note { animation: none; } }

/* picture picker (src/shell/pictures): the picker window, its tiles and preview, and the whole-deck window */
.pk-layer { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; font-family: var(--text); color: var(--ink); }
.pk-scrim { position: absolute; inset: 0; animation: fade .2s; }
.pk-win { position: relative; display: flex; flex-direction: column; width: min(90rem, 96vw); height: min(52rem, 94vh); height: min(52rem, 94dvh); padding: 1.1rem 1.4rem .9rem; outline: none; }
.pk-frame:focus-visible { outline: .2rem solid var(--blue); outline-offset: .12rem; }
.pk-win input { user-select: text; -webkit-user-select: text; } .pk-win kbd { font-size: .88em; }
.pk-search { flex: 1; min-width: 0; display: flex; align-items: center; gap: .5rem; background: #fff; border: .2rem solid var(--ink); border-radius: 1rem; padding: 0 .45rem 0 .8rem; } .pk-search:focus-within { box-shadow: 0 0 0 .25rem var(--yellow); }
.pk-search svg { flex: none; width: 1.5rem; height: 1.5rem; fill: none; stroke: var(--ink); stroke-width: 2.6; stroke-linecap: round; opacity: .65; }
.pk-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: 600 1.45rem var(--text); color: var(--ink); padding: .45rem 0; } .pk-win input::selection { background: var(--yellow); color: var(--ink); }
.pk-clear { flex: none; width: 1.9rem; height: 1.9rem; border-radius: 50%; border: 0; background: rgba(74, 44, 26, .14); font: 1.2rem/1 var(--display); }
.pk-tabs { align-self: flex-start; margin: .8rem 0 .7rem; }
.pk-tab i { font-style: normal; font-size: .8em; background: rgba(74, 44, 26, .13); border-radius: 1rem; padding: 0 .45em; }
.pk-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) clamp(21rem, 30%, 27rem); gap: 1.2rem; }
.pk-results { overflow-y: auto; overscroll-behavior: contain; padding: .7rem; background: rgba(74, 44, 26, .07); border-radius: 1rem; }
.pk-sec + .pk-sec { margin-top: .9rem; }
.pk-sechead { display: flex; align-items: baseline; gap: .7rem; font-size: 1.25rem; margin: 0 0 .45rem; } .pk-sechead small { font: 500 .85rem var(--text); opacity: .7; }
.pk-more { margin-left: auto; border: 0; background: none; padding: .1rem .3rem; font: 600 .9rem var(--text); text-decoration: underline; }
.pk-grid { display: grid; grid-template-columns: repeat(var(--cols, 5), minmax(0, 1fr)); gap: .7rem; }
.pk-tile { display: flex; flex-direction: column; min-width: 0; padding: .3rem .3rem .25rem; text-align: left; background: #fff; border: .16rem solid rgba(74, 44, 26, .3); border-radius: .9rem; transition: transform .08s, border-color .1s, box-shadow .1s; }
.pk-tile:hover { transform: translateY(-.12rem); border-color: var(--ink); } .pk-tile.on { border-color: var(--ink); box-shadow: 0 0 0 .28rem var(--yellow), 0 .3rem 0 .28rem rgba(74, 44, 26, .3); }
.pk-thumb { display: block; aspect-ratio: 4 / 3; border-radius: .6rem; overflow: hidden; background: #efe6d6; } .pk-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.k-icon .pk-thumb, .k-art .pk-thumb, .k-own .pk-thumb, .k-url .pk-thumb { background: #fff; } .k-icon .pk-thumb img, .k-art .pk-thumb img { object-fit: contain; padding: .35rem; } .k-own .pk-thumb img, .k-url .pk-thumb img { object-fit: contain; }
.pk-cap { display: block; min-width: 0; padding: .25rem .2rem 0; } .pk-cap b, .pk-cap small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-cap b { font: 600 1rem/1.2 var(--text); } .pk-cap b::first-letter { text-transform: uppercase; } .pk-cap small { display: flex; gap: .4em; font-size: .86rem; line-height: 1.25; opacity: .75; }
.pk-cap small span { min-width: 0; overflow: hidden; text-overflow: ellipsis; } .pk-cap small em { flex: none; margin-left: auto; font-style: normal; font-weight: 600; }
.pk-ghost { display: block; aspect-ratio: 4 / 3.7; border-radius: .9rem; background: linear-gradient(100deg, rgba(74, 44, 26, .08) 30%, rgba(74, 44, 26, .17) 50%, rgba(74, 44, 26, .08) 70%) 0 0 / 300% 100%; animation: pkshine 1.2s linear infinite; } @keyframes pkshine { to { background-position: -150% 0; } }
.pk-note { margin: .5rem .2rem 0; min-height: 1.2em; font-size: .95rem; font-weight: 600; opacity: .8; } .pk-note.bad, .pk-pickhint.bad { color: var(--bad); opacity: 1; }
.pk-none { margin: .4rem .2rem; font-size: 1.05rem; font-weight: 600; opacity: .7; }
.pk-own { display: grid; gap: .8rem; min-height: 100%; align-content: start; } .pk-own:not(:has(.pk-grid)) { grid-template-rows: minmax(12rem, 1fr) auto; align-content: stretch; } .pk-urlrow { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; font-weight: 600; } .pk-urlrow input { flex: 1; min-width: 12rem; }
.pk-url, .pk-creditedit input { min-width: 0; font-size: 1.05rem; font-weight: 600; padding: .42rem .65rem; }
.pk-side { display: flex; flex-direction: column; gap: .7rem; min-width: 0; min-height: 0; overflow-y: auto; padding: 0 .3rem .5rem; }
.pk-tvlabel { font: .95rem var(--display); letter-spacing: .12em; text-transform: uppercase; opacity: .6; }
.pk-mini { padding: .6rem .7rem .7rem; background: var(--paper) var(--grain); border: .2rem solid var(--ink); border-top: .7rem solid var(--blue); border-radius: 1.1rem; box-shadow: 0 .35rem 0 rgba(74, 44, 26, .28); rotate: -1deg; }
.pk-frame { position: relative; aspect-ratio: 5 / 2; overflow: hidden; background: #fff; border: .14rem solid rgba(74, 44, 26, .3); border-radius: .7rem; } .pk-frame img { display: block; width: 100%; height: 100%; } .pk-frame:not(.cover) img { padding: .25rem; }
.pk-frame.cover { cursor: grab; touch-action: none; } .pk-frame.cover:active { cursor: grabbing; }
.pk-dot { position: absolute; width: 1.3rem; height: 1.3rem; margin: -.65rem 0 0 -.65rem; border-radius: 50%; border: .18rem solid #fff; box-shadow: 0 0 0 .14rem var(--ink), inset 0 0 0 .14rem var(--ink); pointer-events: none; }
.pk-blank { display: grid; place-items: center; } .pk-blank span { font: 3rem var(--display); color: rgba(74, 44, 26, .22); }
.pk-prompt { margin: .5rem 0 0; font: 700 1.15rem/1.2 var(--text); text-align: center; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pk-fitrow { display: flex; align-items: center; gap: .7rem; } .pk-fitrow .seg { flex: none; } .pk-fitrow small { font-size: .85rem; line-height: 1.25; opacity: .8; } .pk-fitrow button:disabled { opacity: .4; cursor: default; }
.pk-what b { display: block; font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .pk-what b::first-letter { text-transform: uppercase; }
.pk-credit { display: block; font-size: .9rem; line-height: 1.3; opacity: .8; overflow-wrap: anywhere; } .pk-credit a { color: inherit; } .pk-creditedit { display: grid; gap: .2rem; margin-top: .3rem; font-size: .85rem; font-weight: 600; }
.pk-pickhint { margin: .3rem 0; font-size: 1.05rem; font-weight: 600; line-height: 1.35; opacity: .75; }
.pk-win .pk-use { margin-top: auto; justify-content: center; } .pk-win .btn:disabled { filter: saturate(.5); opacity: .8; cursor: default; }
.pk-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 1.7rem; margin-top: .7rem; font-size: .85rem; } .pk-keys { white-space: nowrap; opacity: .8; } .pk-by { text-align: right; opacity: .8; } .pk-giphy { font: 1.05rem var(--display); letter-spacing: .06em; }
.pk-veil { position: absolute; inset: .5rem; z-index: 5; display: grid; place-items: center; background: rgba(255, 250, 240, .93); border: .3rem dashed var(--ink); border-radius: 1.1rem; font: 2.4rem var(--display); pointer-events: none; }
/* the whole deck at once */
.pk-deck .pk-style { margin-left: auto; } .pk-dsub { margin: .35rem 0 .7rem; font-size: 1.05rem; font-weight: 600; opacity: .8; }
.pk-dgrid { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(11.5rem, 14.5%, 13.5rem), 1fr)); gap: .8rem; align-content: start; padding: .7rem; background: rgba(74, 44, 26, .07); border-radius: 1rem; }
.pk-dcard { display: flex; flex-direction: column; min-width: 0; padding: .35rem; background: #fff; border: .16rem solid rgba(74, 44, 26, .3); border-radius: 1rem; outline: none; } .pk-dcard:focus { border-color: var(--ink); box-shadow: 0 0 0 .28rem var(--yellow); }
.pk-dpic { position: relative; display: grid; aspect-ratio: 16 / 9; overflow: hidden; border-radius: .7rem; background: #fff; box-shadow: inset 0 0 0 .12rem rgba(74, 44, 26, .14); } .pk-dpic img { display: block; width: 100%; height: 100%; min-height: 0; } .pk-dpic .pk-ghost { aspect-ratio: auto; height: 100%; border-radius: 0; }
.pk-dcard.empty .pk-dpic { background: repeating-linear-gradient(45deg, #f6efe1 0 .6rem, #efe6d6 .6rem 1.2rem); } .pk-dnone { place-self: center; font-size: .95rem; font-weight: 600; opacity: .55; }
.pk-dnum { position: absolute; left: .3rem; top: .3rem; min-width: 1.6rem; height: 1.6rem; padding: 0 .3rem; text-align: center; font: .95rem/1.35rem var(--display); background: var(--yellow); border: .14rem solid var(--ink); border-radius: 1rem; }
.pk-dsrc { position: absolute; right: .3rem; bottom: .3rem; padding: .05rem .45rem; font: 600 .84rem var(--text); background: rgba(255, 250, 240, .92); border-radius: .5rem; }
.pk-dtext { min-width: 0; padding: .35rem .25rem .15rem; } .pk-dtext b, .pk-dtext span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .pk-dtext b { font-size: 1.1rem; line-height: 1.2; } .pk-dtext span { font-size: 1rem; line-height: 1.3; opacity: .72; }
.pk-dacts { display: flex; align-items: center; gap: .3rem; min-height: 1.9rem; padding: .2rem .15rem .1rem; } .pk-dlooking { font-size: .92rem; font-weight: 600; opacity: .6; }
.pk-dacts button { padding: .18rem .6rem; font: 600 .92rem var(--text); background: #fff; border: .12rem solid var(--ink); border-radius: .55rem; } .pk-dacts button:hover { background: var(--yellow); } .pk-dacts [data-a="del"] { margin-left: auto; min-width: 1.7rem; padding: .15rem .3rem; font: 1rem/1.15 var(--display); border-color: rgba(74, 44, 26, .4); }
.pk-dstatus { flex: 1; font-size: 1rem; font-weight: 600; } .pk-dbtns { display: flex; flex: none; gap: .7rem; }
@media (pointer: coarse) { .pk-keys { display: none; } .pk-tab { padding: .5rem 1rem; } .pk-dacts button, .pk-dacts [data-a="del"] { padding: .4rem .7rem; font-size: .95rem; } }

/* importer (src/shell/import/importer.js, import-from.html): paste, file, other apps, scan; one preview */
.imp-modal { z-index: 70; user-select: text; -webkit-user-select: text; }
.imp { width: min(86rem, 96vw); height: min(51rem, 94vh); height: min(51rem, 94dvh); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; color: var(--ink); }
.imp-head { margin: 0 1.4rem; padding-top: 1.1rem; }
.imp-tabs { margin: 0 auto; }
.imp-body { min-height: 0; padding: 1rem 1.4rem; overflow: hidden; display: grid; }
.imp-body > * { min-height: 0; }
.imp-foot { display: flex; align-items: center; gap: 1rem; margin: 0 1.4rem; padding: .8rem 0 1.1rem; border-top: .16rem dashed var(--rule); min-height: 4.6rem; }
.imp-grow { flex: 1; }
.imp-foot .btn[disabled] { opacity: .45; filter: grayscale(.6); cursor: not-allowed; transform: none; }
.imp code, .imp-land code { font: 600 .92em var(--text); background: #fff3c4; border: .1rem solid rgba(74, 44, 26, .25); border-radius: .35em; padding: 0 .3em; }
.imp h3 { font-size: 1.55rem; margin-bottom: .5rem; } .imp h4 { font: 1.25rem var(--display); font-weight: 400; margin: 0 0 .4rem; } .imp h4 small { font: 600 .85rem var(--text); opacity: .65; margin-left: .3rem; }
.imp p { margin: .3rem 0 .6rem; line-height: 1.35; font-size: 1.05rem; }
.imp textarea { width: 100%; resize: none; font-size: 1.08rem; font-weight: 500; line-height: 1.45; padding: .8rem 1rem; }
/* paste */
.imp-paste { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(15rem, 1fr); gap: 1.4rem; height: 100%; }
.imp-box { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: .45rem; min-height: 0; }
.imp-lab { font: 1.2rem var(--display); }
.imp-help { background: #fff8dc; border: .16rem solid rgba(74, 44, 26, .3); border-radius: 1rem; padding: 1rem 1.1rem; overflow: auto; }
.imp-help ul { margin: 0; padding-left: 1.1rem; display: grid; gap: .55rem; } .imp-help li { font-size: 1rem; line-height: 1.35; }
.imp-live { font-weight: 600; font-size: 1.05rem; }
/* file */
.imp-drop { height: 100%; display: grid; place-items: center; border: .22rem dashed rgba(74, 44, 26, .45); border-radius: 1.2rem; background: rgba(255, 255, 255, .55); transition: background .15s, border-color .15s; }
.imp-drop.over { background: #eaf8e4; border-color: var(--green); }
.imp-drop-in { max-width: 40rem; text-align: center; display: grid; justify-items: center; gap: .5rem; padding: 1rem; }
.imp-drop-in > b { font: 2.2rem var(--display); font-weight: 400; } .imp-drop-in > span { font-weight: 600; opacity: .6; }
.imp-types { font-weight: 700; letter-spacing: .02em; }
.imp-err { color: var(--bad); font-weight: 700; } .imp-busy { font-weight: 700; color: #1f7fb0; }
/* other apps */
.imp-apps { display: grid; grid-template-columns: 14rem minmax(0, 1fr); gap: 1.4rem; height: 100%; }
.imp-applist { display: grid; align-content: start; gap: .45rem; overflow: auto; padding: .1rem .2rem .4rem; }
.imp-appbtn { text-align: left; font: 1.15rem var(--display); padding: .55rem .9rem; border-radius: .8rem; border: .16rem solid rgba(74, 44, 26, .55); background: #fff; box-shadow: 0 .2rem 0 rgba(74, 44, 26, .35); }
.imp-appbtn small { display: block; font: 600 .82rem var(--text); opacity: .65; }
.imp-appbtn.on { background: var(--yellow); border-color: var(--ink); box-shadow: 0 .22rem 0 var(--ink); }
.imp-app { min-height: 0; overflow: auto; padding-right: .3rem; display: flex; flex-direction: column; }
.imp-ways { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1.1rem; flex: 1; min-height: 0; }
.imp-way { background: #fff; border: .16rem solid rgba(74, 44, 26, .3); border-radius: 1rem; padding: .9rem 1rem; display: flex; flex-direction: column; min-height: 0; }
.imp-way .btn { align-self: flex-start; margin-top: auto; }
.imp-steps { margin: .2rem 0 .7rem; padding-left: 1.4rem; display: grid; gap: .35rem; font-size: 1.05rem; line-height: 1.35; }
.imp-mini { flex: 1; min-height: 6rem; }
.imp-app > .imp-mini { min-height: 9rem; }
.imp-app > .btn { align-self: flex-start; }
.imp-aside { margin-top: 1rem !important; opacity: .85; }
.imp a.btn { color: inherit; text-decoration: none; } .imp a.btn.go { color: #fff; }
.imp-foot:empty { display: none; }
.imp-sheet { background: #fff; border: .16rem solid rgba(74, 44, 26, .3); border-radius: 1rem; padding: .8rem 1rem .6rem; margin: .4rem 0 .9rem; }
.imp-sheet-lab { font: 1rem var(--display); opacity: .7; }
.imp-cols { display: flex; flex-wrap: wrap; gap: .3rem; margin: .45rem 0 .2rem; }
.imp-col { font-weight: 700; font-size: .95rem; padding: .2rem .6rem; border: .14rem solid rgba(74, 44, 26, .35); border-radius: .5rem; background: #f6f1e7; color: rgba(74, 44, 26, .6); }
.imp-col.q { background: #fff3c4; border-color: #e0b400; color: var(--ink); } .imp-col.a { background: #e8f5fd; border-color: var(--blue); color: var(--ink); }
.imp-col.ok { background: #e6f7df; border-color: var(--green); color: var(--ink); } .imp-col.x { background: #f3eafd; border-color: var(--purple); color: var(--ink); }
.imp-sheet-note { font-size: .98rem !important; margin: .4rem 0 0 !important; opacity: .85; }
.imp-dropmini { display: flex; align-items: center; justify-content: center; gap: 1rem; padding: 1.1rem; border: .2rem dashed rgba(74, 44, 26, .4); border-radius: 1rem; background: rgba(255, 255, 255, .55); }
.imp-dropmini > b { font: 1.4rem var(--display); font-weight: 400; } .imp-dropmini > span { font-weight: 600; opacity: .6; }
.imp-dropmini.over { background: #eaf8e4; border-color: var(--green); }
.imp-sample { font: 500 1rem/1.45 var(--text); background: #fff; border: .16rem solid rgba(74, 44, 26, .3); border-radius: 1rem; padding: .7rem 1rem; margin: .2rem 0 1rem; white-space: pre-wrap; max-width: 30rem; }
.imp-a .imp-more { display: block; margin-top: .3rem; font-size: .92rem; }
.imp-a .imp-more::before { content: "↳ "; font-style: normal; }
.imp-link { border: 0; background: none; padding: 0; font: inherit; font-weight: 700; color: #1f7fb0; text-decoration: underline; }
/* scan */
.imp-scan { height: 100%; display: grid; place-content: center; justify-items: center; text-align: center; gap: .6rem; max-width: 40rem; margin: 0 auto; }
.imp-scan h3 { font-size: 2.2rem; }
.imp-soon { font: 1.4rem var(--display); color: #fff; background: var(--purple); border: .18rem solid var(--ink); border-radius: .9rem; padding: .4rem 1rem; box-shadow: 0 .25rem 0 var(--ink); margin-top: .6rem !important; }
/* the preview */
.imp-pre { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; gap: .6rem; height: 100%; min-height: 0; }
.imp-bar { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem 1.2rem; }
.imp-found { margin: 0 !important; font-size: 1.1rem !important; } .imp-found b { font: 1.6rem var(--display); font-weight: 400; margin-right: .4rem; } .imp-found span { font-weight: 600; opacity: .75; }
.imp-ctls { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .9rem; margin-left: auto; }
.imp-ctl, .imp-chk { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; font-size: 1rem; white-space: nowrap; }
.imp-ctl select { font-size: 1rem; font-weight: 600; padding: .22rem .45rem; }
.imp input[type="checkbox"] { width: 1.25rem; height: 1.25rem; accent-color: var(--green); margin: 0; cursor: pointer; }
.imp-notes { display: grid; gap: .25rem; background: #fff3c4; border: .14rem solid rgba(74, 44, 26, .3); border-radius: .8rem; padding: .4rem .9rem; }
.imp-notes p { margin: 0; font-size: 1rem; font-weight: 600; }
.imp-tablewrap { min-height: 0; overflow: auto; background: #fff; border: .16rem solid rgba(74, 44, 26, .35); border-radius: 1rem; }
.imp-table { width: 100%; border-collapse: collapse; font-size: 1.02rem; line-height: 1.3; }
.imp-table th { position: sticky; top: 0; z-index: 1; background: #fff8dc; text-align: left; font: 1.05rem var(--display); font-weight: 400; padding: .45rem .6rem; border-bottom: .14rem solid rgba(74, 44, 26, .35); }
.imp-table td { padding: .45rem .6rem; border-bottom: .1rem solid rgba(74, 44, 26, .14); vertical-align: top; }
.imp-table tr.off td:not(.imp-c0) { opacity: .4; } .imp-table tr.off .imp-q { text-decoration: line-through; text-decoration-color: rgba(74, 44, 26, .4); }
.imp-c0 { width: 2.6rem; text-align: center; } .imp-n { width: 3.4rem; color: rgba(74, 44, 26, .6); font-variant-numeric: tabular-nums; }
.imp-q { width: 36%; font-weight: 600; overflow-wrap: anywhere; } .imp-a { width: 34%; overflow-wrap: anywhere; } .imp-k { font-size: .92rem; }
.imp-k > span { display: block; } .imp-k > span + span { margin-top: .15rem; }
.imp-thumb { float: right; width: 3.6rem; height: 2.7rem; object-fit: cover; border-radius: .4rem; border: .12rem solid var(--ink); margin: 0 0 .2rem .5rem; background: #f3eadb; }
.imp-chs { display: flex; flex-wrap: wrap; gap: .25rem; }
.imp-ch { display: inline-flex; align-items: baseline; gap: .3rem; padding: .05rem .5rem .1rem .25rem; border: .12rem solid rgba(74, 44, 26, .3); border-radius: .6rem; background: #fffdf7; }
.imp-ch i { font: normal .8rem var(--display); width: 1.15rem; height: 1.15rem; display: inline-grid; place-items: center; border-radius: 50%; background: rgba(74, 44, 26, .12); }
.imp-ch.ok { background: #e6f7df; border-color: var(--green); font-weight: 700; } .imp-ch.ok i { background: var(--green); color: #fff; } .imp-ch.ok b { color: #2f9c28; }
.imp-bad { color: var(--bad); font-weight: 700; } .imp-rnote { color: rgba(74, 44, 26, .78); } .imp-ok { color: var(--ok); font-weight: 700; }
.imp-more { color: #1f7fb0; font-style: italic; } .imp-empty { color: rgba(74, 44, 26, .45); font-style: italic; }
.imp-skipped { font-size: 1rem; } .imp-skipped summary { cursor: pointer; font-weight: 700; }
.imp-skipped ul { margin: .3rem 0 0; padding-left: 1.2rem; max-height: 7rem; overflow: auto; } .imp-skipped i { opacity: .7; }
.imp-sum { text-align: right; font-weight: 600; opacity: .75; }
/* narrower than 3:2 (a 4:3 laptop, an iPad on its side): the header, help and app list tighten up */
@media (max-aspect-ratio: 3/2) {
  .imp-head { gap: .8rem; margin: 0 1.2rem; } .imp-tab { padding-left: .8rem; padding-right: .8rem; }
  .imp-paste { grid-template-columns: minmax(0, 1.5fr) minmax(13rem, 1fr); gap: 1rem; } .imp-apps { grid-template-columns: 12rem minmax(0, 1fr); gap: 1rem; }
  .imp-body { padding-left: 1.2rem; padding-right: 1.2rem; } .imp-foot { margin: 0 1.2rem; }
}
/* import-from.html (the Baamboozle bookmark page) */
body.imp-page { overflow: auto; user-select: text; -webkit-user-select: text; background: #8fd465 var(--grain); min-height: 100vh; }
.imp-land { width: min(58rem, 94vw); margin: 0 auto; padding: 2.2rem 0 3rem; display: grid; gap: 1.6rem; justify-items: center; }
.imp-brand { font-size: 3.2rem; text-decoration: none; filter: drop-shadow(0 .3rem 0 rgba(74, 44, 26, .25)); }
.imp-land-card { width: 100%; padding: 1.8rem 2.4rem 2rem; }
.imp-land-card h1 { font: 2.8rem/1.05 var(--display); margin: 0 0 .4rem; }
.imp-lede { font-size: 1.3rem; margin: 0 0 1.4rem; line-height: 1.35; }
.imp-land-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.imp-land-steps li { display: grid; grid-template-columns: 3.4rem 1fr; gap: 1rem; align-items: start; background: #fff; border: .16rem solid rgba(74, 44, 26, .3); border-radius: 1.1rem; padding: 1rem 1.2rem; }
.imp-land-steps h2 { font-size: 1.6rem; margin: .2rem 0 .3rem; } .imp-land-steps p { margin: .2rem 0 .5rem; font-size: 1.1rem; line-height: 1.4; }
.imp-num { width: 3rem; height: 3rem; display: grid; place-items: center; font: 1.8rem var(--display); color: #fff; background: var(--blue); border: .2rem solid var(--ink); border-radius: 50%; box-shadow: 0 .22rem 0 var(--ink); -webkit-text-stroke: .08em var(--ink); paint-order: stroke fill; }
.imp-land-steps li:nth-child(2) .imp-num { background: var(--orange); } .imp-land-steps li:nth-child(3) .imp-num { background: var(--green); }
.imp-bm-row { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem; margin-top: .8rem; }
.imp-bm { cursor: grab; text-decoration: none; } .imp-bm:active { cursor: grabbing; }
.imp-land .btn { text-decoration: none; color: inherit; } .imp-land .btn.go { color: #fff; }
.imp-hint { font-weight: 700; color: #c8372b; }
.imp-land-notes { margin-top: 1.3rem; display: grid; gap: .5rem; } .imp-land-notes p { margin: 0; font-size: 1.05rem; line-height: 1.4; }
.imp-land-done { text-align: center; } .imp-land-done .imp-bm-row { justify-content: center; }
.imp-land.done { min-height: 100vh; align-content: center; padding-top: 0; }
.imp-bm::before { content: "⇪"; margin-right: .1em; }

/* scanner: questions from photos of textbook pages (src/shell/scan/scanner.js). A paper sheet over everything;
   fits 1920x1080, 1024x768 and 1180x746 (rem scaling above). Lists scroll inside; the sheet never does. */
.scanner { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; background: rgba(74, 44, 26, .55); }
.scanbox { position: relative; display: flex; flex-direction: column; width: min(96vw, 74rem); height: min(94vh, 52rem); padding: .8rem 1.3rem 1.1rem; outline: none; animation: popin .35s cubic-bezier(.2, 1.4, .4, 1); }
.scanbox.dropping { box-shadow: 0 0 0 .5rem var(--yellow), 0 .45rem 0 .5rem rgba(74, 44, 26, .28); }
.scanhead { display: flex; align-items: center; gap: .8rem; padding-bottom: .55rem; margin-bottom: .8rem; border-bottom: .16rem dashed rgba(74, 44, 26, .3); }
.scanhead h2 { margin: 0; flex: 1; font: 2rem/1.1 var(--display); letter-spacing: .01em; }
.scanbal { white-space: nowrap; font: 1.05rem var(--display); background: var(--yellow); border: .16rem solid var(--ink); border-radius: 2rem; padding: .15rem .8rem; box-shadow: 0 .2rem 0 rgba(74, 44, 26, .35); }
.scanx { width: 2.6rem; height: 2.6rem; border-radius: 50%; border: .18rem solid var(--ink); background: #fff; box-shadow: 0 .22rem 0 var(--ink); font: 1.1rem var(--display); }
.scanx:active { transform: translateY(.18rem); box-shadow: 0 .05rem 0 var(--ink); }
.scanmain { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.scanner input, .scanner textarea { user-select: text; -webkit-user-select: text; font: 500 1rem var(--text); color: var(--ink); background: #fff; border: .14rem solid var(--ink); border-radius: .55rem; padding: .3rem .5rem; width: 100%; }
.scanner input:focus, .scanner textarea:focus { outline: .2rem solid var(--blue); outline-offset: .05rem; }
.scanner .btn:disabled { opacity: .45; filter: grayscale(.5); transform: none; box-shadow: 0 .38rem 0 var(--ink); cursor: default; }
.scanner .btn.ghost:disabled { box-shadow: 0 .25rem 0 rgba(74, 44, 26, .5); }
.scanhint { margin: .5rem 0 0; font-size: .95rem; font-weight: 600; opacity: .72; }
.scanerr { margin: .3rem 0; font-weight: 700; color: #c2362a; font-size: 1rem; }
.scanwait, .scanmsg { margin: auto; text-align: center; font: 1.4rem var(--display); max-width: 34rem; }
.scanmsg p { font: 600 1.25rem/1.4 var(--text); margin: 0 0 1.2rem; }

/* pages + choices */
.scanpages { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 23rem; gap: 1.3rem; }
.scanleft { min-height: 0; display: flex; flex-direction: column; }
.pagegrid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.pagecard { position: relative; margin: 0; min-height: 0; display: grid; place-items: center; background: #efe6d6; border: .18rem solid var(--ink); border-radius: .9rem; padding: .45rem; box-shadow: 0 .3rem 0 rgba(74, 44, 26, .28); animation: deal .45s cubic-bezier(.2, 1.4, .4, 1) both; }
.pagecard img { max-width: 100%; max-height: 100%; min-height: 0; object-fit: contain; border-radius: .3rem; box-shadow: 0 .15rem .5rem rgba(74, 44, 26, .3); background: #fff; }
.pagecard figcaption { position: absolute; top: -.7rem; left: -.6rem; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--yellow); border: .16rem solid var(--ink); font: 1.2rem/1.8rem var(--display); text-align: center; }
.pagetools { position: absolute; right: .4rem; bottom: .4rem; display: flex; gap: .3rem; }
.pagetools button { width: 2.3rem; height: 2.3rem; border-radius: 50%; border: .16rem solid var(--ink); background: #fff; font: 1.05rem var(--display); box-shadow: 0 .18rem 0 var(--ink); }
.pagetools button:hover { background: var(--yellow); } .pagetools button:last-child:hover { background: #ffb3aa; }
.pageadd { display: grid; place-content: center; justify-items: center; gap: .3rem; border: .2rem dashed rgba(74, 44, 26, .55); border-radius: .9rem; background: rgba(255, 255, 255, .55); cursor: pointer; text-align: center; font-weight: 700; }
.pageadd:hover { background: #fff; } .pageadd b { font: 3rem/1 var(--display); color: var(--green); -webkit-text-stroke: .06em var(--ink); }
.pageadd.first { grid-column: 1 / -1; grid-row: 1 / -1; cursor: default; gap: .7rem; }
.pageadd.first b { font-size: 5rem; } .pageadd.first > span { font: 1.6rem var(--display); }
.pageadd.first small { font-size: 1rem; opacity: .7; }
.pagebtns { display: flex; gap: .8rem; margin-top: .3rem; } .pagebtns .btn { cursor: pointer; }
.pagebtns .btn:first-child { background: var(--blue); color: #fff; text-shadow: 0 .1em 0 rgba(0, 0, 0, .25); }
.scanopts { min-height: 0; display: flex; flex-direction: column; background: rgba(255, 255, 255, .5); border: .16rem solid rgba(74, 44, 26, .25); border-radius: 1rem; padding: .3rem .9rem .9rem; overflow: auto; }
.scanopts h3 { margin: .7rem 0 .35rem; font: 1.05rem var(--display); letter-spacing: .04em; opacity: .8; }
.scanchips { display: flex; flex-wrap: wrap; gap: .35rem; }
.scanchips button { font: 600 .95rem var(--text); padding: .3rem .7rem; border: .15rem solid var(--ink); border-radius: 2rem; background: #fff; box-shadow: 0 .15rem 0 rgba(74, 44, 26, .4); }
.scanchips button.on { background: var(--yellow); box-shadow: 0 .15rem 0 var(--ink); }
.scanchips.big button { font: 1.3rem var(--display); min-width: 4.4rem; padding: .25rem .8rem; }
.kindgrid { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem; }
.scanopts .tog { padding: .32rem .45rem; font: 600 .9rem/1.15 var(--text); gap: .45rem; }
.scanopts .tog i { width: 2rem; height: 1.15rem; } .scanopts .tog i::after { width: .9rem; height: .9rem; } .scanopts .tog.on i::after { left: .85rem; }
.scango { margin-top: auto; padding-top: .7rem; display: grid; gap: .35rem; }
.scancost { margin: 0; font-weight: 700; font-size: 1.05rem; text-align: center; } .scancost.short { color: #c2362a; }
.scango .btn { justify-content: center; font-size: 1.6rem; } .scango .btn.buymore { font-size: 1.05rem; padding-block: .45rem; }

/* turn and crop */
.cropview { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: .8rem; }
.cropstage { flex: 1; min-height: 0; display: grid; place-items: center; background: #5a4334; border-radius: 1rem; border: .18rem solid var(--ink); padding: .8rem; }
.cropimg { position: relative; overflow: hidden; touch-action: none; }
.cropimg img { display: block; width: 100%; height: 100%; user-select: none; -webkit-user-drag: none; }
.cropbox { position: absolute; cursor: move; border: .18rem solid #fff; outline: .14rem solid var(--ink); box-shadow: 0 0 0 999rem rgba(40, 25, 15, .55); touch-action: none; }
.cropbox i { position: absolute; width: 1.6rem; height: 1.6rem; background: var(--yellow); border: .16rem solid var(--ink); border-radius: 50%; }
.cropbox i[data-h="nw"] { left: -.85rem; top: -.85rem; cursor: nwse-resize; } .cropbox i[data-h="ne"] { right: -.85rem; top: -.85rem; cursor: nesw-resize; }
.cropbox i[data-h="sw"] { left: -.85rem; bottom: -.85rem; cursor: nesw-resize; } .cropbox i[data-h="se"] { right: -.85rem; bottom: -.85rem; cursor: nwse-resize; }
.cropbar { display: flex; align-items: center; gap: .7rem; } .cropbar .scanhint { flex: 1; margin: 0; }

/* working */
.scanwork { margin: auto; display: grid; justify-items: center; gap: .9rem; text-align: center; width: min(100%, 36rem); }
.workpages { position: relative; width: 20rem; height: 17rem; }
.workpages img { position: absolute; left: 50%; top: 50%; max-width: 12rem; max-height: 16rem; border: .18rem solid var(--ink); border-radius: .4rem; background: #fff; box-shadow: 0 .3rem 0 rgba(74, 44, 26, .3);
  transform: translate(-50%, -50%) translateX(calc((var(--i) - (var(--n) - 1) / 2) * 2.6rem)) rotate(calc((var(--i) - (var(--n) - 1) / 2) * 6deg)); }
.scanline { position: absolute; left: 1rem; right: 1rem; top: 0; height: .5rem; border-radius: .5rem; background: var(--yellow); border: .14rem solid var(--ink); box-shadow: 0 0 1.2rem .3rem rgba(255, 216, 77, .8); animation: scanline 1.6s ease-in-out infinite alternate; }
@keyframes scanline { to { top: calc(100% - .5rem); } }
.workline { margin: 0; font: 2rem var(--display); }
.scanmeter { width: 100%; height: 1.6rem; border: .2rem solid var(--ink); border-radius: 1rem; background: #efe6d6; overflow: hidden; }
.scanmeter i { display: block; height: 100%; width: 4%; background: var(--green) var(--grain); border-right: .16rem solid var(--ink); transition: width .2s linear; }

/* review */
.scanreview { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: .7rem; }
.reviewtop { display: flex; align-items: center; gap: 1rem; }
.decknm { flex: 1; display: flex; align-items: center; gap: .6rem; font: 1.1rem var(--display); white-space: nowrap; } .decknm input { font-size: 1.1rem; max-width: 30rem; }
.reviewcount { font-weight: 700; opacity: .8; }
.cardlist { flex: 1; min-height: 0; overflow: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(20.5rem, 1fr)); align-content: start; gap: .8rem; padding: .3rem .4rem .6rem .2rem; }
.rcard { display: grid; align-content: start; gap: .4rem; background: #fff; border: .18rem solid var(--ink); border-radius: .9rem; padding: .5rem .6rem .45rem; box-shadow: 0 .28rem 0 rgba(74, 44, 26, .25); transition: opacity .15s; }
.rcard header { display: flex; align-items: center; gap: .5rem; }
.rcard header b { font: 1.1rem var(--display); opacity: .5; order: -1; }
.kindchip { font: .85rem var(--display); letter-spacing: .03em; color: #fff; background: var(--k) var(--grain); border: .14rem solid var(--ink); border-radius: .5rem; padding: .05rem .5rem; text-shadow: 0 .08em 0 rgba(0, 0, 0, .3); margin-right: auto; }
.keep { font: 700 .9rem var(--text); border: .15rem solid var(--ink); border-radius: 2rem; padding: .15rem .7rem; background: #eaffd9; }
.rcard textarea { resize: none; font-weight: 600; line-height: 1.25; }
.rfield { display: flex; align-items: center; gap: .5rem; font-weight: 700; font-size: .9rem; } .rfield.more input { font-size: .95rem; }
.rchoices { display: grid; grid-template-columns: 1fr 1fr; gap: .3rem; }
.rchoice { display: flex; align-items: center; gap: .3rem; padding: .15rem .25rem; border-radius: .6rem; border: .14rem solid transparent; }
.rchoice.right { background: #eaffd9; border-color: var(--green); }
.rchoice input[type=radio] { width: 1.1rem; height: 1.1rem; flex: none; accent-color: var(--green); margin: 0; }
.rchoice input[readonly] { background: transparent; border-color: transparent; font-weight: 700; }
.rprob { margin: 0; font-weight: 700; font-size: .85rem; color: #c2362a; } .rprob:empty { display: none; }
.rcard.bad { border-color: #c2362a; }
.rcard.off { opacity: .45; } .rcard.off .keep { background: #ffd8d3; }
.reviewbar { display: flex; align-items: center; gap: .8rem; padding-top: .6rem; border-top: .16rem dashed rgba(74, 44, 26, .3); }
.reviewbar .scanerr { flex: 1; margin: 0; } .reviewbar .btn.go { font-size: 1.6rem; }
@media (prefers-reduced-motion: reduce) { .scanline, .pagecard, .scanbox { animation: none; } }

/* Pick a game: the world map is in world.css (shared with any page that shows the world) */
/* Setup's Settings column, first: what was picked, and the way back to Pick a game (in place of the Game and Board rows) */
.picked { display: flex; align-items: center; gap: .7rem; margin: 0 0 .75rem; min-width: 0; padding: .35rem; background: #fff; border: .16rem solid var(--ink); border-radius: .8rem; } .picked span { flex: 1; }
.picked img { width: 4.6rem; aspect-ratio: 16 / 10; object-fit: cover; border: .16rem solid var(--ink); border-radius: .5rem; flex: none; }
.picked span { display: grid; min-width: 0; line-height: 1.15; } .picked b, .picked small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.picked b { font: 1.3rem var(--display); letter-spacing: .02em; } .picked small { font-weight: 600; font-size: .95rem; }
.picked .btn { flex: none; }
/* Start while the picked game still loads: its words say how far it is; pressing it shows the rest on the how-to panel */
.setup .go.wait { background: #fff; color: var(--ink); text-shadow: none; font-size: 1.45rem; }
.setup .go.wait b { font: inherit; color: var(--green); margin-left: .3em; }
.loadbar { position: relative; width: min(30rem, 80%); height: 3.4rem; margin: .4rem auto .2rem; border: .22rem solid var(--ink); border-radius: 1rem; background: #fff; overflow: hidden; box-shadow: 0 .35rem 0 rgba(74, 44, 26, .28); }
.loadbar i { position: absolute; inset: 0 auto 0 0; width: calc(var(--p, 0) * 100%); background: var(--green) var(--grain); transition: width .3s; }
.loadbar span { position: relative; display: grid; place-items: center; height: 100%; font: 1.35rem var(--display); color: var(--ink); }
.loadbar b { font: inherit; margin-left: .3em; }
.howto .ghost { margin-top: .6rem; }
.howto.again, .howto.again .how { animation: none; }

/* Owner decisions 11-19: the sign-in panel's shared-computer tick box and safety check (account.js), the editor's
   "new link" question and button (editor/editor.js) */
.acct-panel .acct-shared { flex: 1 0 100%; display: flex; align-items: flex-start; gap: .55rem; font-size: 1rem; line-height: 1.3; cursor: pointer; }
.acct-panel .acct-shared input { flex: none; appearance: auto; width: 1.25rem; height: 1.25rem; margin: .05rem 0 0; padding: 0; accent-color: var(--green); cursor: pointer; }
.acct-panel .acct-captcha { flex: 1 0 100%; min-height: 65px; }
.acct-panel .acct-captcha[hidden] { display: none; }
.ed-relink { display: grid; gap: .45rem; margin-top: .2rem; padding: .55rem .65rem .65rem; background: var(--paper) var(--grain); border: .16rem solid var(--ink); border-radius: .8rem; font-size: .88rem; line-height: 1.3; }
.ed-relink[hidden] { display: none; }
.ed-relink p { margin: 0; }
.ed-foot .ed-newlink { justify-self: end; margin-top: -.3rem; }
