/* Quizpop: one stylesheet for the player, host and editor pages.
   The look: a sunny gradient, chunky outlined cards with a hard offset shadow, four answer colours with their own
   shapes (star, moon, bolt, heart). Host screens are sized in vh/vmin for a 1920x1080 TV; the player page is for a phone. */
:root {
  --ink: #1d1838; --paper: #fffdf7; --sun: #ffd23f; --pink: #ff4f8b; --teal: #00b3c7; --orange: #ff8a1f; --violet: #7c4dff;
  --good: #19b36b; --bad: #ef3b5d; --dim: #6b6787; --line: 3px;
  --a0: #ff4f8b; --a1: #00a6c9; --a2: #ff8a1f; --a3: #7c4dff;
  --font: "Trebuchet MS", "Segoe UI", system-ui, -apple-system, "DejaVu Sans", Arial, sans-serif;
  --shadow: 0 6px 0 var(--ink);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font); color: var(--ink); -webkit-text-size-adjust: 100%;
  background: radial-gradient(circle at 12% 18%, #fff3b0 0 9%, transparent 9.5%), radial-gradient(circle at 88% 82%, #ffc2d9 0 12%, transparent 12.5%),
    radial-gradient(circle at 80% 12%, #b9f3ff 0 6%, transparent 6.5%), linear-gradient(160deg, #ffd23f 0%, #ff9f6e 48%, #ff6fa5 100%);
  background-attachment: fixed;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--violet); }
.hide { display: none !important; }
:focus-visible { outline: 4px solid var(--violet); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01s !important; transition-duration: .01s !important; } }

/* ------------------------------------------------------------------ bits everyone uses */
.card { background: var(--paper); border: var(--line) solid var(--ink); border-radius: 18px; box-shadow: var(--shadow); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em; border: var(--line) solid var(--ink); border-radius: 14px;
  background: var(--paper); padding: .55em 1.1em; font-weight: 800; box-shadow: 0 4px 0 var(--ink); transition: transform .08s, box-shadow .08s; user-select: none;
  text-decoration: none; color: var(--ink); white-space: nowrap;
}
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.go { background: var(--good); color: #fff; } .btn.warn { background: var(--bad); color: #fff; } .btn.sun { background: var(--sun); }
.btn.violet { background: var(--violet); color: #fff; } .btn.small { padding: .3em .7em; font-size: .9em; border-radius: 10px; box-shadow: 0 3px 0 var(--ink); }
.btn.on { background: var(--ink); color: var(--sun); }
input[type=text], input[type=number], input[type=password], select, textarea {
  border: var(--line) solid var(--ink); border-radius: 12px; padding: .5em .7em; background: #fff; min-width: 0;
}
textarea { resize: vertical; }
.logo { font-weight: 900; letter-spacing: -.02em; display: inline-flex; align-items: center; gap: .15em; }
.logo b { background: var(--ink); color: var(--sun); border-radius: .6em .6em .6em .15em; padding: 0 .3em .05em; transform: rotate(-4deg); display: inline-block; }
.pill { display: inline-block; border: var(--line) solid var(--ink); background: var(--paper); border-radius: 999px; padding: .15em .8em; font-weight: 800; }
.mult { background: var(--ink); color: var(--sun); }
.banner { display: inline-block; background: var(--ink); color: var(--sun); font-weight: 900; border-radius: 14px; padding: .3em .9em; transform: rotate(-2deg); animation: wobble 1.2s ease-in-out infinite alternate; }
@keyframes wobble { from { transform: rotate(-2deg) scale(1); } to { transform: rotate(2deg) scale(1.05); } }
@keyframes pop { 0% { transform: scale(.3); opacity: 0; } 70% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.pop { animation: pop .45s cubic-bezier(.2, 1.4, .4, 1) both; }
#net { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 90; background: var(--bad); color: #fff; font-weight: 800; padding: 6px 16px; border-radius: 999px; border: var(--line) solid var(--ink); display: none; }
body.offline #net { display: block; }
#fxlayer { position: fixed; inset: 0; pointer-events: none; z-index: 80; overflow: hidden; }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 12px; z-index: 95; font-weight: 700; max-width: 92vw; animation: rise .25s both; }
.mute { position: fixed; top: 10px; right: 10px; z-index: 70; width: 46px; height: 46px; padding: 0; border-radius: 50%; }
.mute svg { width: 24px; height: 24px; }

/* answer shapes and colours */
.shape { width: 1.3em; height: 1.3em; flex: none; fill: #fff; filter: drop-shadow(0 2px 0 rgba(0,0,0,.25)); }
.a0 { background: var(--a0); } .a1 { background: var(--a1); } .a2 { background: var(--a2); } .a3 { background: var(--a3); }
.tf0 { background: var(--good); } .tf1 { background: var(--bad); }

/* ------------------------------------------------------------------ player (phone first) */
.play { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.play header { display: flex; align-items: center; justify-content: space-between; padding: 10px 64px 10px 14px; font-weight: 800; gap: 8px; }
.play header .logo { font-size: 22px; }
.play main { flex: 1; display: flex; flex-direction: column; padding: 8px 14px 16px; gap: 12px; min-height: 0; }
.play footer { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; background: var(--paper); border-top: var(--line) solid var(--ink); font-weight: 800; gap: 10px; }
.play footer .score { background: var(--ink); color: var(--sun); border-radius: 10px; padding: 4px 12px; }
.joinbox { margin: auto; width: min(420px, 100%); padding: 22px; display: flex; flex-direction: column; gap: 14px; text-align: center; }
.joinbox h1 { margin: 0; font-size: 40px; }
.joinbox input { font-size: 26px; text-align: center; font-weight: 800; padding: 12px; }
.joinbox .btn { font-size: 24px; padding: 14px; }
.joinbox .err { color: var(--bad); font-weight: 800; min-height: 1.3em; }
.center { margin: auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 10px; }
.center h2 { font-size: 30px; margin: 0; }
.center .big { font-size: 64px; font-weight: 900; line-height: 1; }
.qtext { font-weight: 800; font-size: 21px; text-align: center; padding: 14px; line-height: 1.25; overflow-wrap: anywhere; }
.bar { height: 14px; border: var(--line) solid var(--ink); border-radius: 999px; background: var(--paper); overflow: hidden; flex: none; }
.bar i { display: block; height: 100%; background: var(--ink); width: 100%; transform-origin: left; }
.answers { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; min-height: 260px; }
.answers.two { grid-template-columns: 1fr; }
.answers button {
  border: var(--line) solid var(--ink); border-radius: 18px; box-shadow: var(--shadow); color: #fff; font-weight: 800; font-size: 19px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 10px; text-shadow: 0 2px 0 rgba(0,0,0,.25);
  overflow-wrap: anywhere; min-height: 0; transition: transform .1s, opacity .2s;
}
.answers button .shape { width: 44px; height: 44px; }
.answers button:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink); }
.answers button.picked { outline: 6px solid var(--ink); outline-offset: -10px; }
.answers.locked button:not(.picked) { opacity: .35; }
.typebox { display: flex; flex-direction: column; gap: 12px; margin: auto 0; }
.typebox input { font-size: 26px; padding: 14px; text-align: center; font-weight: 800; }
.slider { display: flex; flex-direction: column; gap: 16px; margin: auto 0; align-items: stretch; }
.slider .val { font-size: 56px; font-weight: 900; text-align: center; }
.slider input[type=range] { width: 100%; height: 48px; accent-color: var(--violet); }
.slider .ends { display: flex; justify-content: space-between; font-weight: 800; color: var(--ink); }
.result { margin: auto; width: 100%; text-align: center; padding: 24px 16px; display: flex; flex-direction: column; gap: 10px; align-items: center; color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.25); }
.result.good { background: var(--good); } .result.bad { background: var(--bad); } .result.meh { background: var(--violet); }
.result h2 { font-size: 40px; margin: 0; }
.result .pts { font-size: 30px; font-weight: 900; background: rgba(0,0,0,.25); border-radius: 12px; padding: 4px 14px; }
.result .icon { width: 84px; height: 84px; }
.streak { font-weight: 900; background: var(--sun); color: var(--ink); border-radius: 999px; padding: 4px 14px; border: var(--line) solid var(--ink); text-shadow: none; }
.standing { font-weight: 800; font-size: 19px; text-align: center; }
.medal { font-size: 92px; font-weight: 900; width: 150px; height: 150px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 5px solid var(--ink); box-shadow: var(--shadow); }
.medal.m1 { background: #ffd23f; } .medal.m2 { background: #dfe6ee; } .medal.m3 { background: #f0a868; } .medal.mx { background: var(--paper); font-size: 60px; }

/* ------------------------------------------------------------------ host (a TV at 1920x1080, a laptop or a tablet) */
html.host, html.host body { height: 100%; overflow: hidden; }
.host { height: 100vh; height: 100dvh; display: flex; flex-direction: column; font-size: 2.4vmin; }
.host > header { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 1.4vmin 2.4vmin; gap: 2vmin; }
.host > header .logo { font-size: 4vmin; }
.host > main { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 0 2.4vmin 1.6vmin; gap: 1.8vmin; position: relative; }
.host > footer { flex: none; display: flex; gap: 1vmin; align-items: center; justify-content: center; padding: 1.2vmin 2vmin; background: var(--paper); border-top: var(--line) solid var(--ink); flex-wrap: wrap; }
.host > footer .btn { font-size: 2.2vmin; }
.host .spacer { flex: 1; }
.counter { font-weight: 900; font-size: 3vmin; }
.lobby { flex: 1; display: grid; grid-template-columns: 1.15fr 1fr; grid-template-rows: auto 1fr; gap: 2vmin; min-height: 0; }
.joinpanel { grid-row: 1; grid-column: 1 / 3; display: flex; align-items: center; justify-content: space-between; padding: 2vmin 3vmin; gap: 3vmin; }
.joinpanel .how { font-size: 3.4vmin; font-weight: 800; line-height: 1.3; }
.joinpanel .how .url { background: var(--ink); color: var(--sun); padding: .05em .4em; border-radius: .3em; white-space: nowrap; }
.joinpanel .pinlabel { font-size: 2.6vmin; font-weight: 800; color: var(--dim); text-transform: uppercase; letter-spacing: .15em; }
.joinpanel .pin { font-size: 13vmin; font-weight: 900; letter-spacing: .06em; line-height: .95; font-variant-numeric: tabular-nums; }
.joinpanel .qr { width: 24vmin; height: 24vmin; flex: none; background: #fff; border-radius: 12px; padding: .6vmin; border: var(--line) solid var(--ink); }
.joinpanel .qr svg { width: 100%; height: 100%; display: block; }
.names { grid-column: 1 / 3; padding: 2vmin; display: flex; flex-direction: column; min-height: 0; }
.names h2 { margin: 0 0 1.4vmin; font-size: 3.4vmin; display: flex; justify-content: space-between; }
.chips { display: flex; flex-wrap: wrap; gap: 1.1vmin; align-content: flex-start; overflow: hidden; flex: 1; }
.chip { font-weight: 800; font-size: 3vmin; background: var(--sun); border: var(--line) solid var(--ink); border-radius: 999px; padding: .2em .8em; animation: pop .4s both; cursor: pointer; }
.chip:nth-child(4n+2) { background: #b9f3ff; } .chip:nth-child(4n+3) { background: #ffc2d9; } .chip:nth-child(4n+4) { background: #d7ccff; }
.chip.off { opacity: .45; }
.empty { color: var(--dim); font-weight: 700; font-size: 3vmin; margin: auto; text-align: center; }
.qhead { display: flex; align-items: center; justify-content: center; gap: 2vmin; flex: none; }
.qcard { flex: none; padding: 2vmin 3vmin; text-align: center; font-size: 5vmin; font-weight: 900; line-height: 1.15; overflow-wrap: anywhere; }
.qcard.long { font-size: 3.8vmin; }
.intro { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 3vmin; }
.intro .qcard { font-size: 7vmin; max-width: 92%; animation: pop .5s both; }
.intro .qcard.long { font-size: 5vmin; }
.intro .num { font-size: 3.6vmin; font-weight: 900; }
.mid { flex: 1; min-height: 0; display: grid; grid-template-columns: 16vmin 1fr 16vmin; align-items: center; gap: 2vmin; }
.mid .pic { height: 100%; min-height: 0; display: flex; align-items: center; justify-content: center; }
.mid .pic img { max-width: 100%; max-height: 100%; border-radius: 16px; border: var(--line) solid var(--ink); box-shadow: var(--shadow); background: #fff; object-fit: contain; }
.clock { width: 15vmin; height: 15vmin; border-radius: 50%; background: var(--violet); color: #fff; border: var(--line) solid var(--ink); box-shadow: var(--shadow); display: flex; align-items: center; justify-content: center; font-size: 7vmin; font-weight: 900; font-variant-numeric: tabular-nums; }
.clock.hurry { background: var(--bad); animation: wobble .3s infinite alternate; }
.answered { text-align: center; font-weight: 900; }
.answered b { display: block; font-size: 7vmin; line-height: 1; }
.tiles { flex: none; display: grid; grid-template-columns: 1fr 1fr; gap: 1.6vmin; }
.tile { border: var(--line) solid var(--ink); border-radius: 18px; box-shadow: var(--shadow); color: #fff; font-weight: 800; font-size: 3.6vmin; min-height: 11vmin;
  display: flex; align-items: center; gap: 2vmin; padding: 1.2vmin 2.4vmin; text-shadow: 0 2px 0 rgba(0,0,0,.25); position: relative; overflow: hidden; overflow-wrap: anywhere; transition: opacity .3s; }
.tile .shape { width: 6vmin; height: 6vmin; }
.tile .t { flex: 1; line-height: 1.15; }
.tile .tick { width: 6vmin; height: 6vmin; flex: none; }
.tiles.shown .tile.no { opacity: .55; filter: saturate(.15) brightness(1.1); }
.bars { flex: 1; min-height: 0; display: flex; align-items: flex-end; justify-content: center; gap: 4vmin; padding-top: 2vmin; }
.bars .col { width: 14vmin; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: .8vmin; }
.bars .col .n { font-weight: 900; font-size: 4vmin; display: flex; align-items: center; gap: .5vmin; }
.bars .col .b { width: 100%; border: var(--line) solid var(--ink); border-radius: 12px 12px 0 0; min-height: 1.2vmin; transform-origin: bottom; animation: growup .7s cubic-bezier(.2, 1.2, .4, 1) both; }
@keyframes growup { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.reveal { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr auto; gap: 2vmin; }
.note { padding: 1.4vmin 2.4vmin; font-size: 3vmin; font-weight: 700; align-self: center; max-width: 60vmin; animation: rise .5s .4s both; }
.typed { display: flex; flex-direction: column; gap: 1vmin; justify-content: center; align-items: center; flex: 1; }
.typed .row { display: flex; gap: 1.6vmin; align-items: center; font-size: 3.4vmin; font-weight: 800; }
.typed .row .w { min-width: 40vmin; padding: .5vmin 1.6vmin; border-radius: 12px; border: var(--line) solid var(--ink); background: var(--paper); }
.typed .row.ok .w { background: var(--good); color: #fff; }
.line { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 2vmin; padding: 0 4vmin; }
.line .track { position: relative; height: 4vmin; background: var(--paper); border: var(--line) solid var(--ink); border-radius: 999px; }
.line .band { position: absolute; top: 0; bottom: 0; background: #8ff0b8; }
.line .dot { position: absolute; top: 50%; width: 2.2vmin; height: 2.2vmin; margin: -1.1vmin 0 0 -1.1vmin; border-radius: 50%; background: var(--violet); border: 2px solid var(--ink); opacity: .8; }
.line .goal { position: absolute; top: -3vmin; bottom: -3vmin; width: .8vmin; margin-left: -.4vmin; background: var(--ink); border-radius: 4px; }
.line .ends { display: flex; justify-content: space-between; font-weight: 800; font-size: 2.8vmin; }
.line .answer { text-align: center; font-size: 6vmin; font-weight: 900; }
.board { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; gap: 1.4vmin; justify-content: center; }
.board h1 { margin: 0 0 1vmin; font-size: 6vmin; }
.board .row { width: min(110vmin, 94%); display: flex; align-items: center; gap: 2vmin; padding: 1.2vmin 2.4vmin; font-size: 4vmin; font-weight: 900; animation: rise .5s both; }
.board .row .r { width: 6vmin; text-align: center; }
.board .row .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board .row .g { color: var(--good); font-size: 3vmin; }
.board .row .mv { font-size: 2.6vmin; width: 5vmin; text-align: center; }
.board .row .mv.up { color: var(--good); } .board .row .mv.down { color: var(--bad); }
.board .row:first-of-type { background: var(--sun); }
.adjusts { display: flex; gap: 1vmin; flex-wrap: wrap; justify-content: center; }
.adjusts .pill { font-size: 2.6vmin; }
.podium { flex: 1; min-height: 0; display: flex; align-items: flex-end; justify-content: center; gap: 2vmin; padding-top: 2vmin; }
.podium .step { width: 30vmin; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 1vmin; animation: rise .8s both; }
.podium .step .who { font-size: 4.4vmin; font-weight: 900; text-align: center; overflow-wrap: anywhere; }
.podium .step .sc { font-size: 3vmin; font-weight: 800; }
.podium .block { width: 100%; border: var(--line) solid var(--ink); border-radius: 16px 16px 0 0; display: flex; align-items: flex-start; justify-content: center; font-size: 10vmin; font-weight: 900; padding-top: 1vmin; box-shadow: var(--shadow); }
.podium .p1 .block { height: 34vmin; background: #ffd23f; } .podium .p2 .block { height: 24vmin; background: #dfe6ee; } .podium .p3 .block { height: 16vmin; background: #f0a868; }
.podium .p1 { animation-delay: 2.6s; } .podium .p2 { animation-delay: 1.4s; } .podium .p3 { animation-delay: .3s; }
.rest { display: flex; gap: 1.2vmin; flex-wrap: wrap; justify-content: center; font-size: 2.6vmin; font-weight: 800; animation: rise .6s 3.4s both; }
.picker { flex: 1; min-height: 0; overflow: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(42vmin, 1fr)); gap: 2vmin; align-content: start; padding: .5vmin .5vmin 2vmin; }
.qz { display: flex; flex-direction: column; overflow: hidden; }
.qz .cover { height: 20vmin; background: #fff center/cover no-repeat; border-bottom: var(--line) solid var(--ink); display: flex; align-items: center; justify-content: center; font-size: 8vmin; font-weight: 900; }
.qz .body { padding: 1.4vmin 2vmin; display: flex; flex-direction: column; gap: .8vmin; flex: 1; }
.qz h3 { margin: 0; font-size: 3vmin; }
.qz p { margin: 0; color: var(--dim); font-size: 2.2vmin; flex: 1; }
.qz .row { display: flex; gap: 1vmin; align-items: center; justify-content: space-between; }
.keybox { margin: auto; padding: 3vmin; width: min(560px, 92vw); display: flex; flex-direction: column; gap: 14px; text-align: center; font-size: 18px; }
.keybox input { font-size: 22px; text-align: center; }
.keybox .err { color: var(--bad); font-weight: 800; min-height: 1.3em; }
.notices:empty { display: none; }
.notices { position: absolute; left: 2.4vmin; bottom: 1vmin; max-width: 60%; font-size: 1.8vmin; background: #fff8; border-radius: 8px; padding: .4vmin 1vmin; color: var(--bad); font-weight: 700; z-index: 5; }
.paused { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(29, 24, 56, .55); z-index: 20; }
.paused div { font-size: 10vmin; font-weight: 900; color: var(--sun); transform: rotate(-3deg); }
.drawer { position: fixed; right: 2vmin; bottom: 10vmin; width: min(420px, 90vw); max-height: 70vh; overflow: auto; z-index: 60; padding: 14px; font-size: 16px; }
.drawer .p { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 2px dashed #0002; }

@media (max-aspect-ratio: 1/1) {
  /* a tablet or phone held upright as the host screen */
  .host { font-size: 2.2vmax; }
  .lobby { grid-template-columns: 1fr; }
  .joinpanel { flex-direction: column; text-align: center; }
  .joinpanel .qr { width: 30vmin; height: 30vmin; }
  .mid { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; }
  .mid .clock { justify-self: center; }
  .tiles { grid-template-columns: 1fr; }
  .tile { font-size: 3.4vmin; min-height: 8vmin; }
  .podium .step { width: 28vmin; }
}

/* ------------------------------------------------------------------ editor */
.edit { max-width: 1280px; margin: 0 auto; padding: 14px; display: flex; flex-direction: column; gap: 14px; }
.edit header { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.edit header .logo { font-size: 28px; }
.edit header h1 { margin: 0; font-size: 22px; flex: 1; }
.lib { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.lib .qz .cover { height: 140px; font-size: 56px; }
.lib .qz h3 { font-size: 19px; }
.lib .qz p { font-size: 14px; }
.lib .qz .row { flex-wrap: wrap; justify-content: flex-start; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 12px; }
.panel { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.panel h2 { margin: 0; font-size: 18px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
label.f { display: flex; flex-direction: column; gap: 4px; font-weight: 800; font-size: 14px; }
label.f small { font-weight: 400; color: var(--dim); }
.editor { display: grid; grid-template-columns: 340px 1fr; gap: 14px; align-items: start; }
.qlist { padding: 8px; display: flex; flex-direction: column; gap: 6px; max-height: calc(100vh - 140px); overflow: auto; position: sticky; top: 10px; }
.qitem { display: flex; gap: 8px; align-items: center; padding: 8px; border-radius: 10px; border: 2px solid transparent; cursor: pointer; background: #fff; }
.qitem.sel { border-color: var(--ink); background: #fff3b0; }
.qitem .n { font-weight: 900; width: 2em; text-align: right; flex: none; }
.qitem .k { font-size: 11px; font-weight: 800; text-transform: uppercase; background: var(--ink); color: #fff; border-radius: 6px; padding: 2px 6px; flex: none; }
.qitem .tx { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.qitem .bad { color: var(--bad); font-weight: 900; }
.ans { display: flex; gap: 8px; align-items: center; }
.ans .sw { width: 30px; height: 30px; border-radius: 8px; border: 2px solid var(--ink); flex: none; display: flex; align-items: center; justify-content: center; }
.ans .sw .shape { width: 18px; height: 18px; }
.ans input[type=text] { flex: 1; }
.ans label { display: flex; gap: 4px; align-items: center; font-weight: 800; font-size: 14px; white-space: nowrap; }
.thumb { max-width: 220px; max-height: 140px; border-radius: 10px; border: 2px solid var(--ink); display: block; background: #fff; }
.errors { background: #ffe1e7; border: 2px solid var(--bad); border-radius: 12px; padding: 8px 12px; font-size: 14px; }
.errors li { margin: 2px 0; }
.okmsg { background: #d8f8e6; border: 2px solid var(--good); border-radius: 12px; padding: 8px 12px; font-size: 14px; }
.hint { color: var(--dim); font-size: 13px; }
@media (max-width: 820px) {
  .editor { grid-template-columns: 1fr; }
  .qlist { position: static; max-height: 260px; }
  .grid2 { grid-template-columns: 1fr; }
  .edit header h1 { flex-basis: 100%; order: 5; }
}
