/* App chrome: launcher, host panel and the themed guest phone view. */
html { scroll-padding-top: env(safe-area-inset-top, 0px); -webkit-text-size-adjust: 100%; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--s); }
h1, h2, h3 { font-family: var(--f); font-weight: 600; margin: .3em 0; line-height: 1.3; }
h1 { font-size: 1.7em; }
button, a.btn { font: inherit; min-height: 48px; padding: 0 18px; border-radius: 12px; border: 1.5px solid var(--g); background: transparent; color: var(--g); cursor: pointer; margin: 4px 4px 4px 0; display: inline-flex; align-items: center; text-decoration: none; }
a.btn.sm { min-height: 36px; padding: 0 12px; font-size: .9em; }
button.p { background: var(--g); color: var(--on); }
button:disabled { opacity: .45; cursor: not-allowed; }
:focus-visible { outline: 3px solid var(--ch); outline-offset: 2px; }
input, textarea, select { font: inherit; width: 100%; padding: 12px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--sf); color: var(--ink); }
input[type=checkbox] { width: auto; }
label { display: block; margin: 8px 0; }
label.ck { display: flex; gap: .5em; align-items: center; min-height: 40px; }
fieldset { border: 1px solid var(--line); border-radius: var(--r); margin: 10px 0; padding: 8px 14px 12px; }
.card { background: var(--sf); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin: 12px 0; }
.wrap { max-width: 760px; margin: 0 auto; padding: 16px; }
.lead { color: var(--mut); font-size: 1.05em; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tag { display: inline-block; border: 1px solid var(--ch); border-radius: 99px; padding: 2px 12px; font-size: .8em; letter-spacing: .04em; margin-right: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 4px 0 8px; list-style: none; }
.chips button { margin: 0; min-height: 40px; padding: 0 14px; border-radius: 99px; }
.lbl { color: var(--mut); font-size: .85em; margin: .6em 0; }
.err { color: var(--bad); font-weight: 600; }
.url, code { word-break: break-all; font-size: .85em; }
.lk { margin: 10px 0; display: grid; gap: 2px; }
.lb { padding-left: 1.2em; margin: .4em 0; } .lb li { margin: .2em 0; }
.mod { list-style: none; padding: 0; margin: 0; } .mod li { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; border-top: 1px solid var(--line); padding: 8px 0; } .mod li.off { opacity: .6; } .mod p { margin: 2px 0; } .mod button { flex: none; }
.mineev { list-style: none; padding: 0; } .mineev li { padding: 8px 0; border-top: 1px solid var(--line); }
.warn { color: var(--bad); } .good { color: var(--good); font-weight: 600; } .bad { color: var(--bad); }
.fl { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); background: #3b2f27; color: #fff; padding: 12px 16px; border-radius: 12px; z-index: 99; text-align: center; }
.fl:empty { display: none; }
.big2 { font: 600 3em/1 var(--f); margin: 0; }
.qrbox { background: #fff; padding: 8px; border-radius: 12px; max-width: 220px; }
.qrbox svg { display: block; width: 100%; height: auto; }
.qr { aspect-ratio: 1; border: 2px dashed var(--g); display: grid; place-content: center; text-align: center; border-radius: 12px; padding: 8px; max-width: 220px; }
.avatar { display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: var(--st-pn, #0001); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.mono { font: 600 1.4em var(--f); }
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 5; }
.confetti span { position: absolute; top: -1.2em; left: var(--x); width: .55em; height: .9em; border-radius: 2px; animation: fall var(--t) linear var(--d) infinite; background: var(--st-ac, #e3c06f); }
.confetti span:nth-child(4n+1) { background: var(--st-ac2, #d1a766); } .confetti span:nth-child(4n+2) { background: #f4a6b8; } .confetti span:nth-child(4n+3) { background: #fff3c4; }
@keyframes fall { from { transform: translateY(0) rotate(0); opacity: 1; } to { transform: translateY(110vh) rotate(540deg); opacity: .9; } }
@keyframes pop { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }

/* ----- Guest phone (themed with --st-* from the event's theme) ----- */
.gp { min-height: 100vh; min-height: 100dvh; padding: calc(18px + env(safe-area-inset-top, 0px)) 16px calc(40px + env(safe-area-inset-bottom, 0px)); background: radial-gradient(130% 80% at 50% 0, var(--st-b), var(--st-a)); color: var(--st-ink); max-width: 560px; margin: 0 auto; }
.gh { text-align: center; padding: 6px 0 10px; }
.gh .avatar { width: 84px; height: 84px; margin: 0 auto 6px; border: 3px solid var(--st-ac); }
.gh h1 { font: 700 1.9em/1.2 var(--script); margin: 0; } .gh h1 i { color: var(--st-ac); font-style: normal; } .gh p { margin: 2px 0 0; color: var(--st-mut); font-size: .9em; }
.gp .hi { color: var(--st-mut); margin: 4px 2px; }
.gp .gc { position: relative; background: var(--st-pn); border: 1px solid color-mix(in srgb, var(--st-ink) 16%, transparent); border-radius: 22px; padding: 18px; margin: 12px 0; }
.gp .gc h2 { font-size: 1.35em; margin: .2em 0 .4em; } .gp .gc p, .gp small { color: var(--st-mut); }
.gp .gc.win { text-align: center; border-color: var(--st-ac); animation: pop .6s ease both; }
.gp input, .gp textarea { background: color-mix(in srgb, var(--st-ink) 8%, transparent); color: var(--st-ink); border: 1.5px solid color-mix(in srgb, var(--st-ink) 22%, transparent); }
.gp ::placeholder { color: var(--st-mut); opacity: .75; }
.gp textarea { resize: vertical; min-height: 110px; font-size: 1.05em; }
.gp .cta { width: 100%; justify-content: center; gap: .5em; margin: 12px 0 0; min-height: 54px; font-weight: 600; font-size: 1.05em; background: var(--st-ac); color: var(--st-a); border: 0; }
.gp .cta svg { width: 1.2em; height: 1.2em; }
.gp .cnt-row { text-align: right; }
.gp .mine { margin: 0; padding-left: 1.1em; } .gp .mine li { margin: .4em 0; }
.gp .opt { display: flex; align-items: center; gap: .7em; width: 100%; min-height: 64px; margin: 10px 0; padding: 12px 16px; font-size: 1.15em; text-align: left; border: 0; border-radius: 16px; color: #fff; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 88%, #fff), var(--c)); box-shadow: 0 3px 0 #0003; }
.gp .opt.o1 { --c: var(--q1); } .gp .opt.o2 { --c: var(--q2); } .gp .opt.o3 { --c: var(--q3); } .gp .opt.o4 { --c: var(--q4); }
.gp .opt .lt { font: 600 1.3em var(--f); font-style: normal; color: #ffe9a8; } .gp .opt .ic { margin-left: auto; width: 1.2em; opacity: .9; } .gp .opt .ic svg { width: 100%; height: auto; display: block; }
.gp .opt.side { justify-content: center; font: 600 1.3em var(--f); min-height: 76px; }
.gp .opt.mine { outline: 4px solid #fff; outline-offset: 2px; }
.gp .opt:disabled { opacity: .55; } .gp .opt.mine:disabled { opacity: 1; }
.gp .lock { color: var(--st-ac); font-weight: 600; } .gp .tmr { font: 600 1.2em var(--f); color: var(--st-ac); min-height: 1.5em; margin: .2em 0; }
.gp .gc .big2 { color: var(--st-ac); }
@media (max-width: 800px) { .two { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

.qed summary { cursor: pointer; padding: 6px 0; }
.qcard { border: 1px solid var(--line); border-radius: var(--r); padding: 12px; margin: 10px 0; background: var(--bg); }
.qh { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; } .qh button { min-height: 40px; padding: 0 12px; margin: 0 0 0 4px; }
.qo { display: flex; gap: 8px; align-items: center; margin: 6px 0; } .qo input[type=radio], .qpick input[type=radio] { width: 22px; height: 22px; flex: none; accent-color: var(--g); } .qo button { min-height: 40px; margin: 0; padding: 0 12px; }
.qpick { display: flex; gap: 16px; flex-wrap: wrap; } .hint { color: var(--mut); font-size: .9em; margin: .3em 0; }

/* question pictures (host editor) */
.qpic { margin: .6em 0; } .qpic .lbl { margin: 0 0 .3em; }
.pick { display: inline-flex; align-items: center; gap: .5em; flex-wrap: wrap; }
.pick .th { width: 56px; height: 56px; object-fit: cover; border-radius: var(--r); border: 1px solid var(--line); }
.qpic .pick .th { width: 96px; height: 72px; }
.pick .up { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: .4em; min-height: 40px; padding: 0 .8em; border: 1px dashed var(--g); border-radius: var(--r); color: var(--g); cursor: pointer; font-size: .9em; background: transparent; }
.pick .up:hover, .pick .up:focus-within { background: color-mix(in srgb, var(--g) 10%, transparent); }
.pick .up input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.pick .rm { min-height: 32px; min-width: 32px; padding: 0; border-radius: 50%; }
.qo { flex-wrap: wrap; }
/* pictures inside answer tiles on phones */
.gp .opt .oimg { width: 52px; height: 52px; object-fit: cover; border-radius: 10px; flex: none; }
/* editor option row: radio | text | picture | remove — keep on one line */
.qed .qo { flex-wrap: nowrap; align-items: center; gap: .4em; }
.qed .qo .qot { flex: 1; min-width: 0; }
.qed .qo .pick { flex: none; gap: .3em; flex-wrap: nowrap; }
.qed .qo .pick .th { width: 40px; height: 40px; border-radius: 8px; }
.qed .qo .pick .up { padding: 0; width: 40px; justify-content: center; } .qed .qo .pick .up span { display: none; }
.qed .qo .pick.has .up { display: none; }
.qed .qo .pick .rm { min-height: 28px; min-width: 28px; font-size: .8em; }
.qed .qo > button[data-act=qodel] { flex: none; min-width: 36px; padding: 0; }
.qed .qo input[type=radio] { flex: none; }

/* top bar shared with the main InviteKhun site: serif wordmark with the sage "Khun" */
.topbar { display: flex; align-items: center; justify-content: space-between; margin: 0 0 18px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.topbar .brand { font: 600 1.25em var(--f); color: var(--ink); text-decoration: none; letter-spacing: .01em; } .topbar .brand b { color: var(--g); font-weight: 600; }
.topbar .tag { margin: 0; }

/* ===== Polish pass: launcher + guest phone ===== */
.wrap > h1:first-of-type, .wrap h1.hero { font: 600 2em/1.25 var(--f); letter-spacing: -.005em; }
.card { box-shadow: 0 1px 0 #fff inset, 0 6px 24px -14px rgba(37, 41, 34, .22); }
.card h2, .card h3 { margin-top: 0; }
button.p { box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--g) 80%, #000); }
button:not(:disabled):hover, a.btn:hover { filter: brightness(.96); } button.p:not(:disabled):active { transform: translateY(1px); }
input:focus, textarea:focus, select:focus { outline: 0; border-color: var(--g); box-shadow: 0 0 0 3px color-mix(in srgb, var(--g) 22%, transparent); }
label { color: var(--ink); font-weight: 500; font-size: .95em; }
.chips button[aria-pressed=true], .chips button.on { background: var(--g); color: var(--on); }
details.card > summary { cursor: pointer; font-weight: 500; list-style-position: inside; }
.gp .gc { backdrop-filter: blur(6px); box-shadow: 0 14px 36px -18px #000a; }
.gp .opt { box-shadow: 0 3px 0 #0005, 0 10px 22px -12px #000a; transition: transform .12s, filter .2s; }
.gp .opt:not(:disabled):active { transform: translateY(2px) scale(.99); box-shadow: 0 1px 0 #0005; }
.gp .opt .lt { display: grid; place-items: center; flex: none; width: 1.7em; height: 1.7em; border-radius: 50%; font-size: 1.1em; line-height: 1; background: rgba(0, 0, 0, .26); border: 1px solid rgba(255, 233, 168, .5); }
.gp .opt.mine { outline-color: #fff; outline-offset: 3px; }
.gh .avatar { box-shadow: 0 8px 22px -10px #000a; }
.gh h1 { font-size: 2.1em; }

.mineev li { flex-wrap: wrap; } .mineev .sm { min-height: 36px; padding: 0 12px; font-size: .9em; }
button.dng { border-color: var(--bad); color: var(--bad); }

/* ===== Simplified flow: home hero + 3-step host panel ===== */
.hero { margin: 8px 0 18px; } .hero h1 { font-size: 1.9em; margin: 0 0 .2em; } .hero .lead { margin: 0 0 14px; }
.steps3 { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 0; margin: 0; }
.steps3 li { background: var(--sf); border: 1px solid var(--line); border-radius: var(--r); padding: 10px; display: flex; flex-direction: column; gap: 4px; font-size: .88em; line-height: 1.35; }
.steps3 b, .stepnav b, .sh b { display: inline-grid; place-items: center; width: 1.7em; height: 1.7em; border-radius: 50%; background: var(--g); color: var(--on); font: 600 .9em var(--f); flex: none; }
button.big, a.btn.big { min-height: 54px; font-size: 1.05em; font-weight: 600; justify-content: center; }
.home button.p.big { width: 100%; margin: 10px 0 0; }
.mineev li { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.mineev li div { display: flex; flex-direction: column; min-width: 0; } .mineev .act { display: inline-flex; gap: 6px; align-items: center; }
.mineev .act .btn, .mineev .act button { margin: 0; }
details.more > summary { font-weight: 500; }
details.more h3 { margin: 14px 0 4px; font-size: 1.05em; }
.stepnav { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 10px; position: sticky; top: 0; z-index: 4; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(6px); padding: 8px 0; }
.stepnav a { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 99px; padding: 4px 12px 4px 4px; color: var(--ink); text-decoration: none; background: var(--sf); font-size: .92em; }
.sh { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 22px 0 6px; font-size: 1.25em; scroll-margin-top: 56px; }
.sh small { flex-basis: 100%; font: 400 .72em var(--s); color: var(--mut); }
.shr { display: grid; grid-template-columns: minmax(0, 200px) 1fr; gap: 14px; align-items: center; } .shr .qrbox { max-width: 200px; }
.shr-b { display: flex; flex-direction: column; gap: 4px; } .shr-b button, .shr-b a.btn { margin: 0; width: 100%; }
@media (max-width: 480px) { .shr { grid-template-columns: 1fr; } .shr .qrbox { margin: 0 auto; } .steps3 { grid-template-columns: 1fr; } .steps3 li { flex-direction: row; align-items: center; gap: 10px; } }
details.adv { margin-top: 10px; } details.adv > summary { color: var(--mut); font-size: .9em; cursor: pointer; }
#setup > summary { font-weight: 600; cursor: pointer; padding: 4px 0; }
a.btn.p { background: var(--g); color: var(--on); }

.qmeta { display: grid; gap: 6px; margin: 8px 0; } .qmeta .chips { margin: 0; } .qmeta .chips button { min-height: 34px; padding: 0 12px; }

/* ===== Kahoot-style guest phone: big coloured shape tiles, full-screen right/wrong feedback ===== */
.gp .qbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--st-mut); font-size: .95em; }
.gp .qbar .x2 { background: var(--st-ac); color: var(--st-a); border-radius: 99px; padding: 0 .7em; font-weight: 700; }
.gp .qopen h2 { font-size: 1.45em; line-height: 1.35; text-align: center; margin: .5em 0 .6em; }
.gp .qimg img { width: 100%; max-height: 220px; object-fit: cover; border-radius: 14px; }
.gp .gopts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.gp .gopts.n2 { grid-template-columns: 1fr; }
.gp .gopts .opt { position: relative; flex-direction: column; justify-content: center; align-items: center; gap: .4em; margin: 0; min-height: 118px; padding: 14px 10px; text-align: center; border-radius: 16px; font: 600 1.1em/1.3 var(--s); }
.gp .gopts.n2 .opt { min-height: 104px; flex-direction: row; justify-content: flex-start; gap: .9em; padding: 14px 18px; text-align: left; }
.gp .opt .lt { width: 2.4em; height: 2.4em; border: 0; background: rgba(0, 0, 0, .18); color: #fff; padding: .55em; }
.gp .opt .lt svg { width: 100%; height: 100%; display: block; }
.gp .gopts .opt .oimg { width: 100%; height: 78px; }
.gp .gopts.locked .opt:not(.mine) { opacity: .32; }
.gp .gopts .opt.mine { outline: 4px solid #fff; outline-offset: 2px; transform: scale(1.02); }
.gp .opt .sent { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%; background: #fff; color: #2f9e5a; display: grid; place-items: center; font-style: normal; padding: 5px; } .gp .opt .sent svg { width: 100%; height: 100%; }
.gp .hint2 { text-align: center; margin: 12px 0 0; color: var(--st-mut); } .gp .lock { text-align: center; margin: 12px 0 0; }
.gp .gc.fb { text-align: center; padding: 34px 18px 28px; border: 0; color: #fff; animation: pop .45s ease both; }
.gp .gc.fb.ok { background: linear-gradient(170deg, #3fb274, #23844f); } .gp .gc.fb.bad { background: linear-gradient(170deg, #cf5a55, #983834); } .gp .gc.fb.none { background: linear-gradient(170deg, #78747a, #55515a); }
.gp .gc.fb h2, .gp .gc.fb p, .gp .gc.fb b { color: #fff; } .gp .gc.fb h2 { font-size: 1.8em; margin: .3em 0; }
.gp .fbi { width: 84px; height: 84px; margin: 0 auto; border-radius: 50%; background: rgba(255, 255, 255, .22); display: grid; place-items: center; font: 700 2.2em var(--s); padding: 16px; } .gp .fbi svg { width: 100%; height: 100%; }
.gp .gc.fb .pts { font: 700 2.6em/1 var(--f); margin: .1em 0 .3em; }
.gp .gc.fb .rk { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .35); }
@media (prefers-reduced-motion: reduce) { .gp .gc.fb { animation: none; } }

.qsum-l { list-style: none; padding: 0; margin: 4px 0 10px; } .qsum-l li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.seg button { justify-content: center; }
.kmedia .pick .hint { margin: 0; text-align: center; }

/* long answers on small phones: columns may shrink, text wraps (also inside a very long word) and the tile grows instead of clipping;
   below 340px wide the 2x2 grid becomes one column so each answer gets the full width */
.gp .gopts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gp .gopts .opt { min-width: 0; height: auto; } .gp .gopts .opt .tx { min-width: 0; max-width: 100%; overflow-wrap: anywhere; line-height: 1.3; }
@media (max-width: 340px) { .gp .gopts { grid-template-columns: minmax(0, 1fr); } .gp .gopts .opt { min-height: 72px; flex-direction: row; justify-content: flex-start; text-align: left; gap: .8em; padding: 12px 14px; } }

/* font picker in the event settings: each choice is shown in its own font */
.fontpick { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; align-items: stretch; } .fontpick .fp-l { flex: 1 0 100%; font-size: .9em; color: var(--mut); }
.fontpick .fo { flex: 1 1 130px; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; margin: 0; border: 1.5px solid var(--line); border-radius: 12px; background: var(--sf); cursor: pointer; }
.fontpick .fo b { font-size: 1.15em; font-weight: 700; } .fontpick .fo small { color: var(--mut); font-size: .85em; }
.fontpick .fo { position: relative; } .fontpick .fo input { position: absolute; inset: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; } .fontpick .fo:has(input:checked) { border-color: var(--g); box-shadow: 0 0 0 2px var(--g) inset; background: color-mix(in srgb, var(--g) 10%, var(--sf)); }
.fontpick .fo:has(input:focus-visible) { outline: 3px solid var(--ch); outline-offset: 2px; }

/* roomy Thai line spacing on phones and in the creator */
.gp .q, .gp h2, .gp h3 { line-height: 1.55; } .gp .gopts .opt .tx { line-height: 1.5; }
.kq .qq { line-height: 1.6; } .kopt .qot { line-height: 1.5; }
.gp .q, .gp .gopts .opt, .gp .gopts .opt .tx { font-weight: 500; } .kq .qq, .kopt .qot { font-weight: 500; }
.gp .qopen h2, .gp .qopen h3, .gp h2.qq { font-weight: 500; line-height: 1.6; }

/* display choices (pictures on projector / phones) */
.picset .pl { margin: 10px 0 4px; font-size: .9em; color: var(--mut); } .pks { display: flex; flex-wrap: wrap; gap: 8px; }
.pk { flex: 1 1 140px; max-width: 220px; display: flex; flex-direction: column; gap: 2px; padding: 8px 10px 10px; margin: 0; border: 1.5px solid var(--line); border-radius: 12px; background: var(--sf); cursor: pointer; color: var(--ink); }
.pk { position: relative; } .pk input { position: absolute; inset: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; } .pk .mk { width: 100%; height: auto; display: block; margin-bottom: 4px; color: var(--ink); } .pk b { font-size: .95em; } .pk small { color: var(--mut); font-size: .8em; line-height: 1.4; }
.pk:has(input:checked) { border-color: var(--g); box-shadow: 0 0 0 2px var(--g) inset; background: color-mix(in srgb, var(--g) 10%, var(--sf)); } .pk:has(input:focus-visible) { outline: 3px solid var(--ch); outline-offset: 2px; }
/* phone "buttons only": big coloured tiles with the icon, text kept for screen readers */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.gp .gopts.btns .opt { min-height: 150px; } .gp .gopts.btns .opt .lt { width: 3.4em; height: 3.4em; } .gp .gopts.btns.n2 .opt { min-height: 130px; justify-content: center; }

/* Top-5 leaderboard on phones */
.gp .gc.top5 h3 { margin: 0 0 .5em; font-size: 1.1em; }
.gp .top5 ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.gp .top5 li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 14px; background: color-mix(in srgb, var(--st-ink) 7%, transparent); color: var(--st-ink); }
.gp .top5 li.me { background: color-mix(in srgb, var(--st-ac) 24%, transparent); outline: 2px solid var(--st-ac); font-weight: 700; }
.gp .top5 li.gap { justify-content: center; background: none; padding: 0; color: var(--st-mut); }
.gp .top5 .n { min-width: 1.6em; height: 1.6em; display: grid; place-items: center; border-radius: 50%; background: var(--st-ac); color: #fff; font-size: .85em; font-weight: 700; }
.gp .top5 li:nth-child(1) .n { background: #d4a437; } .gp .top5 li:nth-child(2) .n { background: #8f98a3; } .gp .top5 li:nth-child(3) .n { background: #b9774a; }
.gp .top5 .nm { flex: 1; min-width: 0; overflow-wrap: anywhere; line-height: 1.4; }
.gp .top5 b { color: var(--st-ac); }

.avatar .mono-heart { width: 52%; height: 52%; color: #d1566f; }
.winner .avatar .mono-heart { color: #fff; }
.wbgrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 8px; } .wbgrow .up { cursor: pointer; padding: 8px 12px; border-radius: 12px; border: 1px dashed currentColor; } .wbgrow small { opacity: .7; }

/* Backdrop picture behind guest phones (the phone shows the 800px version) */
.gp[data-bg="1"] { background-size: cover; background-position: center top; background-repeat: no-repeat; background-color: var(--st-a); position: relative; }
.gp[data-bg="1"]::before { content: ""; position: fixed; inset: 0; z-index: 0; background: rgba(255, 251, 244, .42); pointer-events: none; }
.gp[data-bg="1"][data-bgtone="dark"]::before { background: rgba(6, 10, 22, .42); }
.gp[data-bg="1"] > * { position: relative; z-index: 1; }
/* Backdrop picker (setup) */
.bdset { border: 0; padding: 0; margin: 10px 0; min-width: 0; }
.bdgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; max-height: 260px; overflow: auto; padding: 4px; border: 1px solid var(--line, #e6dfd0); border-radius: 14px; }
.bdo { position: relative; display: flex; flex-direction: column; gap: 4px; cursor: pointer; border-radius: 10px; padding: 3px; border: 2px solid transparent; font-size: 11.5px; line-height: 1.3; }
.bdo img, .bdo .bdnone { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 7px; display: grid; place-items: center; background: #efe9dd; }
.bdo .bdnone { color: #687064; font-size: 12px; }
.bdo:has(input:checked), .bdo.on { border-color: #d1566f; background: #fbf0f3; }
.bdo:has(input:focus-visible) { outline: 2px solid #6f8564; outline-offset: 1px; }
.bdn { text-align: center; color: inherit; }

/* Host: big "what to show on the screen" cards, hint line and folded advanced settings */
.hint.go { margin: 2px 0 8px; font-size: .95em; }
.scr { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin: 8px 0 12px; }
.scr .sc { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 14px; min-height: 124px; border-radius: 16px; border: 2px solid var(--line); background: var(--sf); color: var(--ink); cursor: pointer; font: inherit; }
.scr .sc b { font: 600 1.08em var(--f); } .scr .sc small { color: var(--mut); font-size: .84em; line-height: 1.45; }
.scr .sc em { margin-top: auto; font-style: normal; font-size: .82em; color: var(--g); font-weight: 600; }
.scr .sc.on { border-color: var(--g); background: color-mix(in srgb, var(--g) 12%, var(--sf)); }
.scr .sc.on em { background: var(--g); color: var(--on); border-radius: 99px; padding: 2px 10px; }
details.adv2 { margin: 10px 0; border: 1px dashed var(--line); border-radius: var(--r); padding: 0 12px 10px; }
details.adv2 > summary { cursor: pointer; padding: 12px 0; font-weight: 600; color: var(--mut); }
.drawcfg { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin: 8px 0; } .drawcfg label { display: grid; gap: 2px; font-size: .85em; color: var(--mut); } .drawcfg input { min-height: 44px; } .drawcfg #d_n { width: 6em; }

/* Phone remote: one big button for the next thing to do, status on top, screen switcher below */
body[data-view=remote] { background: var(--bg); }
.rm { max-width: 520px; margin: 0 auto; padding: 14px 16px calc(24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; min-height: 100dvh; }
.rm header { display: flex; align-items: center; gap: 10px; } .rm header > div { flex: 1; min-width: 0; } .rm h1 { margin: 0; font-size: 1.15em; } .rm header small { color: var(--mut); }
.rm-on { font-size: .8em; padding: 3px 10px; border-radius: 99px; background: color-mix(in srgb, var(--g) 18%, var(--sf)); color: var(--g); }
.rm-card { background: var(--sf); border: 1px solid var(--line); border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.rm-card strong { font: 700 1.5em var(--f); } .rm-card span { color: var(--mut); }
.rm-k { color: var(--mut); font-size: .82em; font-weight: 600; }
.rm-bar { height: 10px; border-radius: 99px; background: color-mix(in srgb, var(--g) 15%, var(--line)); overflow: hidden; margin-top: 6px; } .rm-bar i { display: block; height: 100%; background: var(--g); border-radius: 99px; transition: width .4s; }
.rm-b { min-height: 64px; border-radius: 18px; border: 1px solid var(--line); background: var(--sf); color: var(--ink); font: 600 1.05em var(--f); cursor: pointer; }
.rm-b.go { min-height: 96px; background: #d1566f; color: #fff; border: 0; font-size: 1.6em; font-weight: 700; box-shadow: 0 10px 24px -12px #d1566f; }
.rm-b:disabled { opacity: .45; } .rm-b.ghost { min-height: 48px; border: 0; background: none; color: var(--bad); font-weight: 500; font-size: .95em; }
.rm-sw { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; } .rm-sw div { display: flex; flex-wrap: wrap; gap: 8px; }
.rm-t { min-height: 52px; padding: 0 18px; border-radius: 99px; border: 1px solid var(--line); background: var(--sf); color: var(--ink); font: inherit; font-size: 1em; cursor: pointer; }
.rm-t.on { background: var(--g); color: var(--on); border-color: var(--g); font-weight: 600; }
.rm-end { margin-top: auto; text-align: center; } .rm-note { color: var(--mut); text-align: center; }
.rm-w { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rm-w li { display: flex; gap: 10px; align-items: center; background: var(--sf); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; } .rm-w li.off { opacity: .6; } .rm-w li div { flex: 1; min-width: 0; } .rm-w p { margin: 2px 0 0; overflow-wrap: anywhere; } .rm-w button { min-height: 44px; }
details.rmq { margin: 10px 0; } details.rmq .qrbox { max-width: 220px; margin: 8px 0; }
.rm-b { display: grid; place-items: center; text-align: center; }
.autorow { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; } .autorow button { min-height: 48px; border-radius: 14px; } .autorow small { color: var(--mut); line-height: 1.45; }
.rm .autorow button { min-height: 56px; border-radius: 16px; font-size: 1.02em; }

/* ----- Host panel (Kahoot-style): top bar · "on screen now" panel with one big next step · game library · settings drawer ----- */
.hx { max-width: 1180px; margin: 0 auto; padding: 0 16px 40px; }
.hx-top { position: sticky; top: 0; z-index: 6; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 12px 0; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.hx-id { min-width: 0; } .hx-id h1 { margin: 4px 0 0; font-size: 1.4em; overflow-wrap: anywhere; }
.hx-acts { display: flex; flex-wrap: wrap; gap: 8px; } .hx-acts > * { margin: 0; }
.hx-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; margin-top: 14px; }
.hx-side { position: sticky; top: 92px; } .hx-side .card { margin: 0 0 12px; } .hx-side h3 { font-size: 1.05em; margin-top: 0; }
.hx-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; font-size: 1.2em; margin: 26px 0 10px; } .hx-h small { font: 400 .72em var(--s); color: var(--mut); }
.hint { color: var(--mut); font-size: .88em; line-height: 1.5; }
/* on screen now */
.card.now { margin: 0; border: 2px solid var(--g); padding: 18px 20px; box-shadow: 0 14px 34px -24px color-mix(in srgb, var(--g) 80%, transparent); }
.now-h { display: flex; align-items: center; gap: 12px; } .now-h > div { flex: 1; min-width: 0; } .now-h h2 { margin: 0; font-size: 1.3em; }
.now-h .gc-ic { width: 52px; height: 52px; flex: none; display: grid; place-items: center; border-radius: 14px; background: color-mix(in srgb, var(--g) 14%, var(--sf)); color: var(--g); } .now-h .gc-ic svg { width: 30px; height: 30px; }
.k { display: inline-flex; align-items: center; gap: 6px; font-size: .8em; color: var(--mut); }
.now .dot { width: 8px; height: 8px; border-radius: 50%; background: #d9534f; animation: livedot 1.8s infinite; }
@keyframes livedot { 0% { box-shadow: 0 0 0 0 #d9534f88; } 70%, 100% { box-shadow: 0 0 0 7px #d9534f00; } }
.phs { flex: none; font-size: .8em; padding: 4px 12px; border-radius: 99px; background: color-mix(in srgb, var(--g) 14%, var(--sf)); color: var(--g); font-weight: 600; }
.phs.ph-open { background: var(--g); color: var(--on); } .phs.ph-done { background: color-mix(in srgb, var(--ch) 30%, var(--sf)); color: var(--ink); }
.now-s { display: grid; gap: 4px; margin: 14px 0 0; padding: 14px 16px; border-radius: 14px; background: color-mix(in srgb, var(--g) 7%, var(--sf)); }
.now-s strong { font: 600 1.2em/1.4 var(--f); overflow-wrap: anywhere; } .now-s > span:not(.k) { color: var(--mut); font-size: .92em; }
.now-s .bar { height: 8px; border-radius: 99px; background: color-mix(in srgb, var(--g) 16%, transparent); overflow: hidden; margin-top: 6px; } .now-s .bar i { display: block; height: 100%; background: var(--g); border-radius: inherit; transition: width .4s ease; }
.now-a { margin: 14px 0 0; } .now-a > button, .now-a > a.btn { width: 100%; justify-content: center; min-height: 64px; font-size: 1.25em; font-weight: 600; border-radius: 16px; margin: 0; }
.now-a > a.btn.p { background: var(--g); color: var(--on); }
.now-b { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; } .now-b > * { margin: 0; min-height: 42px; border-radius: 12px; }
.now .autorow { margin: 14px 0 0; }
.now h4 { margin: 18px 0 6px; font: 600 .95em var(--f); color: var(--mut); }
.now .lb { columns: 2 220px; column-gap: 28px; padding-left: 1.4em; } .now .lb li { break-inside: avoid; } .now .lb li b { float: right; }
/* game library */
.lib { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.gcard { --gc: #f3e2c3; display: flex; flex-direction: column; border-radius: 18px; background: var(--sf); border: 1.5px solid var(--line); overflow: hidden; transition: transform .15s ease, box-shadow .15s ease; }
.g-wishes { --gc: #f6d6dd; } .g-showcase { --gc: #d8e5f2; } .g-bouquet { --gc: #f4e3c6; } .g-quiz { --gc: #dae8d2; } .g-likely { --gc: #e6dcf2; } .g-lucky { --gc: #f8e7b4; }
.gcard:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -18px #0007; }
.gc-main { margin: 0; border: 0; border-radius: 0; min-height: 0; padding: 0 16px 14px; background: transparent; color: var(--ink); flex: 1; display: flex; flex-direction: column; align-items: stretch; gap: 4px; text-align: left; }
.gc-main .gc-ic { margin: 0 -16px 8px; height: 78px; display: grid; place-items: center; background: var(--gc); color: #4c4037; } .gc-main .gc-ic svg { width: 40px; height: 40px; }
.gc-main b { font: 600 1.1em var(--f); } .gc-main small { color: var(--mut); font-size: .84em; line-height: 1.45; }
.gc-m { align-self: flex-start; margin-top: 4px; font-size: .78em; padding: 2px 10px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink); }
.gc-main em { margin-top: auto; padding-top: 10px; font-style: normal; font-weight: 600; font-size: .9em; color: var(--g); } .gc-main em::after { content: ' ›'; }
.gcard.on { border-color: var(--g); box-shadow: 0 0 0 3px color-mix(in srgb, var(--g) 28%, transparent); }
.gcard.on em { align-self: flex-start; background: var(--g); color: var(--on); padding: 3px 12px; border-radius: 99px; margin-top: auto; } .gcard.on em::after { content: ''; }
.gc-ed { display: block; border-top: 1px solid var(--line); padding: 10px 16px; font-size: .9em; font-weight: 600; color: var(--g); text-decoration: none; } .gc-ed:hover { background: color-mix(in srgb, var(--g) 8%, transparent); }
/* side column */
.join h3 b { color: var(--g); font-size: 1.25em; } .join .qrbox { max-width: 190px; margin: 8px auto; } .join > button { width: 100%; justify-content: center; }
.names { font-size: .9em; color: var(--mut); overflow-wrap: anywhere; }
.hx-side details > summary { cursor: pointer; font-weight: 600; padding: 4px 0; } .hx-side details button { width: 100%; justify-content: center; }
.hx-side .rmq .qrbox { margin: 8px auto; max-width: 180px; }
/* settings drawer */
.card.setup { margin-top: 28px; scroll-margin-top: 90px; }
.setup > summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; font: 600 1.2em var(--f); padding: 4px 0; }
.setup > summary::-webkit-details-marker { display: none; } .setup > summary::after { content: '▾'; margin-left: auto; color: var(--mut); } .setup[open] > summary::after { content: '▴'; }
.setup > summary small { font: 400 .7em var(--s); color: var(--mut); }
.sg { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 6px; } .sg > h3 { font-size: 1.05em; margin: 8px 0 4px; }
.savebar { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; gap: 12px; margin: 12px -16px -16px; padding: 12px 16px; background: var(--sf); border-top: 1px solid var(--line); border-radius: 0 0 var(--r) var(--r); }
.savebar .err { flex: 1; margin: 0; } .savebar button { margin: 0 0 0 auto; min-width: 180px; justify-content: center; }
.hx-foot { text-align: center; margin-top: 18px; }
@media (max-width: 900px) { .hx-grid { grid-template-columns: 1fr; } .hx-side { position: static; } }
@media (max-width: 560px) {
  .hx { padding: 0 12px 32px; } .hx-acts { width: 100%; } .hx-acts > * { flex: 1; justify-content: center; }
  .card.now { padding: 16px; } .lib { grid-template-columns: 1fr 1fr; gap: 10px; }
  .gc-main { padding: 0 12px 12px; } .gc-main .gc-ic { margin: 0 -12px 6px; height: 60px; } .gc-main .gc-ic svg { width: 32px; height: 32px; } .gc-main small { display: none; }
  .now .lb { columns: 1; }
}
@media (prefers-reduced-motion: reduce) { .now .dot { animation: none; } .gcard { transition: none; } }
/* auto-run as an on/off switch inside the "on screen now" panel */
.now .autorow { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 10px 14px; border-radius: 14px; border: 1px dashed var(--line); }
.now .autorow button { min-height: 40px; margin: 0; border: 0; padding: 0; background: transparent; color: var(--ink); font-weight: 600; gap: 10px; }
.now .autorow button::before { content: ''; width: 42px; height: 24px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 18%, transparent); box-shadow: inset 0 0 0 3px transparent; transition: background .2s; flex: none;
  background-image: radial-gradient(circle at 12px 50%, #fff 8px, transparent 8.5px); }
.now .autorow button[aria-pressed=true]::before { background-color: var(--g); background-image: radial-gradient(circle at 30px 50%, #fff 8px, transparent 8.5px); }
.now .autorow small { flex: 1 1 260px; }
@media (max-width: 560px) { .hx-top { position: static; } .hx-side { position: static; } }
/* light <-> dark switch fades instead of flashing */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .6s; animation-timing-function: ease; }
html.ik-fading, html.ik-fading * { transition: background-color .6s ease, color .6s ease, border-color .6s ease, fill .6s ease !important; }
/* picture slots in settings: preview + upload / change / remove */
.upks { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin: 10px 0; }
.upk { display: grid; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--sf); }
.upk.wide { margin: 10px 0; }
.upk-l { font-size: .92em; font-weight: 600; } .upk-l small { font-weight: 400; color: var(--mut); }
.upk-r { display: flex; align-items: center; gap: 12px; }
.upk-p { flex: none; width: 72px; height: 72px; border-radius: 12px; overflow: hidden; display: grid; place-items: center; background: color-mix(in srgb, var(--ink) 6%, transparent); }
.upk.wide .upk-p { width: 128px; height: 72px; }
.upk-p img { width: 100%; height: 100%; object-fit: cover; } .upk-p i { font-style: normal; font-size: .72em; color: var(--mut); text-align: center; padding: 4px; }
.upk-b { display: flex; flex-wrap: wrap; gap: 6px; }
.upk .up { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 10px; background: var(--g); color: var(--on); cursor: pointer; font-size: .9em; margin: 0; }
.upk .up:focus-within { outline: 3px solid var(--ch); outline-offset: 2px; }
.upk-x { min-height: 40px; margin: 0; padding: 0 12px; font-size: .9em; border-color: var(--line); color: var(--mut); }
.upk-x[hidden] { display: none; }
/* settings: section shortcuts, photo-show manager, prize boxes */
.secnav { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; } .secnav a { font-size: .85em; padding: 4px 12px; border-radius: 99px; border: 1px solid var(--line); color: var(--ink); text-decoration: none; } .secnav a:hover { border-color: var(--g); color: var(--g); }
.sg { scroll-margin-top: 90px; }
.shots { display: grid; gap: 8px; margin: 8px 0; }
.shot { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--sf); }
.shot .upk-p { width: 88px; height: 56px; border-radius: 10px; } .shot .shc { flex: 1; min-width: 0; }
.shot-b { display: flex; gap: 4px; } .shot-b button { margin: 0; min-height: 40px; padding: 0 12px; }
.shadd { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; } .shadd > * { margin: 0; }
.shadd .up { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 12px; background: var(--g); color: var(--on); cursor: pointer; }
.shadd .up:focus-within { outline: 3px solid var(--ch); outline-offset: 2px; }
label.inl { display: flex; align-items: center; gap: 8px; } label.inl input { width: 5em; }
.drs { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; } .drs fieldset { margin: 0; }
button.gc-ed { width: 100%; margin: 0; min-height: 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; text-align: left; justify-content: flex-start; font-family: inherit; }
@media (max-width: 560px) { .shot { flex-wrap: wrap; } .shot .shc { flex-basis: 100%; order: 3; } }
/* ----- settings as a pop-up sheet with tabs (one topic at a time) ----- */
.sheet { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; }
.sheet[hidden] { display: none; }
.sheet-bg { position: absolute; inset: 0; background: rgb(20 18 16 / .55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: shFade .2s ease; }
.sheet-box { position: relative; width: min(880px, 100%); height: min(88vh, 860px); display: flex; flex-direction: column; background: var(--sf); color: var(--ink); border-radius: 22px; box-shadow: 0 30px 80px -20px #000a; overflow: hidden; animation: shPop .22s ease; }
@keyframes shFade { from { opacity: 0; } } @keyframes shPop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.sheet-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 10px; } .sheet-h h2 { margin: 0; font-size: 1.3em; }
.sheet-x { margin: 0; width: 42px; min-height: 42px; padding: 0; border-radius: 50%; justify-content: center; font-size: 1.05em; }
.tabs { display: flex; gap: 6px; padding: 0 20px 12px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; flex: none; } .tabs::-webkit-scrollbar { display: none; }
.tabs button { margin: 0; flex: none; min-height: 40px; padding: 0 16px; border-radius: 99px; border: 1px solid var(--line); background: transparent; color: var(--ink); font-weight: 500; }
.tabs button[aria-selected=true] { background: var(--g); border-color: var(--g); color: var(--on); }
.sheet-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 4px 20px 24px; }
.sheet .sg { display: none; border-top: 0; margin-top: 0; padding-top: 6px; }
.sheet[data-tab=sec-couple] #sec-couple, .sheet[data-tab=sec-look] #sec-look, .sheet[data-tab=sec-showcase] #sec-showcase, .sheet[data-tab=sec-quiz] #sec-quiz, .sheet[data-tab=sec-likely] #sec-likely, .sheet[data-tab=sec-draw] #sec-draw, .sheet[data-tab=sec-wishes] #sec-wishes { display: block; animation: shFade .18s ease; }
.sg2 { margin-top: 18px; padding-top: 6px; border-top: 1px solid var(--line); }
.sheet .savebar { position: static; margin: 0; border-radius: 0; padding: 12px 20px; flex: none; }
body.sheet-on { overflow: hidden; }
@media (max-width: 560px) {
  .sheet { padding: 0; place-items: end stretch; }
  .sheet-box { width: 100%; height: 94vh; height: 94dvh; border-radius: 20px 20px 0 0; animation-name: shUp; }
  @keyframes shUp { from { transform: translateY(40px); opacity: 0; } }
  .sheet-h, .tabs, .sheet-body, .sheet .savebar { padding-left: 16px; padding-right: 16px; }
  .sheet .savebar button { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { .sheet-bg, .sheet-box, .sheet .sg { animation: none !important; } }
/* game card footer: "แก้คำถาม" + "ตั้งค่า" side by side */
.gc-f { display: flex; border-top: 1px solid var(--line); } .gc-f .gc-ed { flex: 1; border-top: 0; text-align: center; justify-content: center; } .gc-f .gc-ed + .gc-ed { border-left: 1px solid var(--line); }
@media (max-width: 560px) { .gc-f .gc-ed { padding: 10px 6px; font-size: .84em; } }
/* opened on a phone: the host IS the remote — no QR codes to scan (guests scan the projector), just a shortcut to the big-button remote */
.rm-go, .only-phone { display: none; }
@media (max-width: 700px) {
  .join .qrbox, .hx-side .rmc { display: none; }
  .only-phone { display: inline; }
  .rm-go { display: flex; justify-content: center; width: 100%; min-height: 52px; margin: 0 0 12px; border-radius: 14px; font-weight: 600; }
}
/* ----- host: checklist, organiser link, first-run banner, keepsake; home: from-card ----- */
.gc-f:empty { display: none; }
.ckl > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 8px; } .ckl > summary::-webkit-details-marker { display: none; }
.ckl > summary h3 { margin: 0; } .ckn { font-size: .85em; font-weight: 600; padding: 2px 10px; border-radius: 99px; background: color-mix(in srgb, var(--ch) 22%, var(--sf)); } .ckn.all { background: var(--g); color: var(--on); }
.ckl ul { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 4px; }
.ckl .ckb { display: flex; align-items: center; width: 100%; margin: 0; min-height: 40px; justify-content: flex-start; text-align: left; gap: 10px; border: 0; background: transparent; color: var(--ink); padding: 4px 2px; font-size: .9em; font-weight: 400; }
.ckl .ckb::before { content: ''; flex: none; width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--line); background: var(--sf); }
.ckl .ckb.on { color: var(--mut); } .ckl .ckb.on::before { border-color: var(--g); background: var(--g) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }
.hlink > button { width: 100%; justify-content: center; }
.card.fresh { margin: 0 0 14px; border: 2px solid var(--ch); background: color-mix(in srgb, var(--ch) 10%, var(--sf)); } .card.fresh h2 { margin: 0 0 4px; font-size: 1.2em; }
.fr-b { display: flex; flex-wrap: wrap; gap: 8px; } .fr-b > * { margin: 0; }
.keep { padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--g) 8%, var(--sf)); margin: 6px 0 12px; } .keep p { margin: 0 0 8px; } .keep button { margin: 0; }
.fromcard { text-align: center; border: 2px solid var(--ch); } .fromcard .avatar.big { width: 96px; height: 96px; margin: 8px auto; border-radius: 50%; overflow: hidden; } .fromcard .avatar img { width: 100%; height: 100%; object-fit: cover; }
/* library groups by part of the evening; prize-art picker */
.lgrp { margin: 0 0 18px; } .lgrp > h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin: 0 0 8px; font-size: 1em; color: var(--ink); } .lgrp > h3 small { font-weight: 400; font-size: .85em; color: var(--mut); }
.artpick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 4px 0 10px; }
.artpick .ap { position: relative; cursor: pointer; } .artpick input { position: absolute; inset: 0; width: 1px; height: 1px; opacity: 0; }
.artpick span { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px; border-radius: 14px; border: 2px solid var(--line); background: var(--sf); }
.artpick span svg { width: 64px; height: 64px; } .artpick input:checked + span { border-color: var(--g); box-shadow: 0 0 0 3px color-mix(in srgb, var(--g) 25%, transparent); }
.artpick input:focus-visible + span { outline: 3px solid var(--ch); outline-offset: 2px; }
.sg2 h3 small { font-weight: 400; font-size: .8em; color: var(--mut); }
.gp .gc.thx { text-align: center; overflow: hidden; } .gp .gc.thx .cta { display: inline-flex; margin-top: 8px; text-decoration: none; }
.fromcard.prep { padding: 32px 20px; } .fromcard.prep .spin { width: 34px; height: 34px; margin: 16px auto 4px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--g); animation: prepspin .8s linear infinite; }
@keyframes prepspin { to { transform: rotate(360deg); } } @media (prefers-reduced-motion: reduce) { .fromcard.prep .spin { animation-duration: 3s; } }
.hx-back { display: inline-block; margin: 10px 0 0; font-size: .9em; color: var(--g); text-decoration: none; } .hx-back:hover { text-decoration: underline; }
.card.fresh.sync { border-color: var(--g); background: color-mix(in srgb, var(--g) 8%, var(--sf)); }

/* ===== รูปจากแขก: guest phone + host moderation ===== */
.gp .gpbtn { position: relative; cursor: pointer; display: flex; align-items: center; }
.gp .gpbtn + small { display: block; text-align: center; margin-top: 8px; opacity: .8; }
.gp .gpprev { margin: 12px 0 8px; border-radius: 14px; overflow: hidden; background: #0002; display: grid; place-items: center; max-height: 46vh; }
.gp .gpprev img { max-width: 100%; max-height: 46vh; display: block; object-fit: contain; }
.gp .gphoto #gpc { width: 100%; }
.gp .gphoto .ghost { width: 100%; margin-top: 8px; min-height: 44px; background: none; border: 0; color: inherit; text-decoration: underline; opacity: .8; }
.gp .gpmine { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gp .gpmine li { display: flex; flex-direction: column; gap: 4px; font-size: .85em; }
.gp .gpmine img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; display: block; }
.gp .gpmine .ok { opacity: .85; }
.pmod { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.pmod li { display: flex; gap: 10px; align-items: center; border-top: 1px solid var(--line); padding: 8px 0; }
.pmod li.off { opacity: .55; } .pmod li.wait { background: color-mix(in srgb, var(--warn, #c98a2b) 9%, transparent); }
.pmod img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; flex: none; }
.pmod div { flex: 1; min-width: 0; } .pmod b, .pmod small { display: block; } .pmod p { margin: 2px 0; overflow-wrap: anywhere; } .pmod small { color: var(--mut, #777); }
.pmod button { flex: none; }

/* modes this event hasn't paid for (InviteKhun account) */
.gcard.locked { opacity: .62; }
.gcard.locked .gc-main { cursor: pointer; text-decoration: none; color: inherit; }
.gcard.locked em { font-style: normal; }
.home .card.acct .btn { display: flex; justify-content: center; margin-top: 10px; }

/* wish-screen style picker (setup) */
.wst { display: grid; gap: .5rem; margin: .4rem 0 1rem; }
.wst > p { margin: .8rem 0 .2rem; }
.wsto { display: flex; align-items: center; gap: .7rem; padding: .7rem .9rem; border: 1.5px solid var(--line, #d9d4c8); border-radius: .8rem; cursor: pointer; background: var(--sf, #fff); color: var(--ink, #252922); text-align: left; }
.wsto input[type=radio] { width: 1.15rem; height: 1.15rem; min-height: 0; padding: 0; margin: .2rem 0 0; flex: none; accent-color: #6d7f62; }
.wsto span { flex: 1; min-width: 0; }
.wsto span { display: grid; gap: .15rem; text-align: left; }
.wsto small { color: var(--mut, #6b665c); font-size: .86em; line-height: 1.4; }
.wsto:has(input:checked) { border-color: var(--g, #6d7f62); background: color-mix(in srgb, var(--g, #6d7f62) 13%, var(--sf, #fff)); }
.wsto-th { flex: none; width: 9.5rem; height: auto; border-radius: .45rem; box-shadow: 0 .1rem .4rem #0002; order: 2; }
.wsto span { order: 1; }
@media (max-width: 560px) { .wsto { gap: .55rem; padding: .6rem .7rem; } .wsto-th { width: 5.4rem; } } /* phone: keep the picture small on the right so the text keeps its width */

/* Settings sheet: event settings (info, look) and game/screen settings are separate; the top button opens the first, game cards the second. */
.sheet[data-scope="event"] .tabs [data-grp="game"], .sheet[data-scope="game"] .tabs [data-grp="event"] { display: none; }
.hx-tip { margin: -.4rem 0 .9rem; font-size: .88rem; color: var(--mut, #6b665c); }

/* รูปบ่าวสาว: หน้าต่างครอปรูป */
.crop-ov { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; background: rgba(10, 12, 8, .66); }
.crop-box { width: min(100%, 22rem); display: grid; justify-items: center; gap: .7rem; padding: 1.1rem; border-radius: 1rem; background: var(--sf, #fff); color: var(--ink, #252922); box-shadow: 0 1rem 3rem #0006; }
.crop-box h3 { margin: 0; } .crop-box .hint { margin: 0; text-align: center; }
.crop-view { position: relative; max-width: 100%; touch-action: none; border-radius: .5rem; overflow: hidden; background: #fff; }
.crop-cv { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; } .crop-cv:active { cursor: grabbing; }
.crop-ring { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 999px rgba(0, 0, 0, .5); border: 2px solid #fff; pointer-events: none; }
.crop-zoom { display: flex; align-items: center; gap: .6rem; width: 100%; } .crop-zoom input { flex: 1; min-width: 0; }
.crop-btns { display: flex; gap: .6rem; width: 100%; } .crop-btns button { flex: 1; margin: 0; }
.gnames { margin: .4rem 0 0; max-height: 9rem; overflow: auto; font-size: .85rem; line-height: 1.6; color: var(--mut, #687064); overflow-wrap: anywhere; }
.gkick { list-style: none; margin: .4rem 0 0; padding: 0; max-height: 14rem; overflow: auto; display: grid; gap: .25rem; font-size: .9rem; }
.gkick li { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-width: 0; }
.gkick li span { overflow-wrap: anywhere; min-width: 0; }
.crop-zoom input { border: 0; padding: 0; min-height: 0; background: none; box-shadow: none; }

/* การ์ดเลือกหน้าจอ: แถวละ 3 การ์ด (ไม่แยกหัวข้อกลุ่ม ใช้ป้ายเล็กบนการ์ดแทน) */
.lib.l3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gcard { position: relative; }
.gcard[data-grp]::before { content: attr(data-grp); position: absolute; z-index: 1; top: 8px; left: 10px; padding: 1px 9px; border-radius: 99px; font-size: .72rem; background: rgba(255, 255, 255, .72); color: #4a4338; pointer-events: none; }
.lib.l3 .gc-main small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 700px) { .lib.l3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .lib.l3 .gc-main small { display: none; } }
.rm-p img { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; flex: none; } .rm-p li.wait { border-color: var(--ch, #c6a26b); }
.rm-p small { display: block; }
.qedit { display: flex; justify-content: center; margin: .2rem 0 .8rem; }
.ck small.hint { display: block; margin: .15rem 0 0; font-weight: 400; }
.picdet { margin: .6rem 0 1rem; } .picdet > summary small { font-weight: 400; color: var(--mut, #687064); }
.wsto small input[type=number] { min-height: 0; padding: .1rem .3rem; }
.wst.cmp { gap: .35rem; } .wst.cmp .wsto { padding: .45rem .8rem; }
.sheet[data-tab=sec-quiz] #sec-likely { display: block; margin-top: 1.4rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.sidepics { margin: .8rem 0; } .sidepics > summary small { font-weight: 400; color: var(--mut, #687064); }

/* draw: one choice (bouquet vs prize) — the prize name only shows for prizes */
.dr .aph { margin: 4px 0 6px; }
.dr .artpick span { flex-direction: row; justify-content: center; gap: 10px; padding: 8px 10px; }
.dr .artpick span svg { width: 38px; height: 38px; }
.dr:has(input[value=bouquet]:checked) .prz { display: none; }
.dr .dst { margin-top: 12px; }
.drs > .dr:only-child { border: 0; padding: 0; margin: 0; } .drs > .dr:only-child > legend { display: none; }
/* สุ่มรางวัล: the bouquet toss only fits "ช่อดอกไม้" */
.dr:has(input[value=gift]:checked) .st-toss { display: none; }
/* รูปจากแขก tab */
.sheet[data-tab=sec-photos] #sec-photos { display: block; animation: shFade .18s ease; }
#sec-photos:has(input[name=s_pst][value=grid]:checked) .pgap { display: none; }
/* ทดลองก่อนงาน */
.tryk > summary small { font-weight: 400; color: var(--mut, #687064); margin-left: .3em; }
.tsteps { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .7rem; }
.tsteps li { display: grid; grid-template-columns: 1.7rem 1fr; gap: .6rem; align-items: start; }
.tsteps li > i { width: 1.7rem; height: 1.7rem; border-radius: 50%; display: grid; place-items: center; font: 700 .85rem/1 inherit; font-style: normal; background: var(--sf2, color-mix(in srgb, var(--ink) 8%, transparent)); color: var(--ink); }
.tsteps li.done > i { background: var(--g); color: #fff; }
.tsteps li > div { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.tsteps li b { font-weight: 600; font-size: .95rem; }
.tsteps li small { color: var(--mut, #687064); font-size: .82rem; line-height: 1.4; }
.tsteps li button { margin: 0; width: 100%; }
.tclear { margin-top: .9rem; width: 100%; background: transparent; color: #b4405a; border-color: color-mix(in srgb, #b4405a 40%, transparent); }
#sec-photos .wst.cmp { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); } #sec-photos .wst.cmp > p { grid-column: 1 / -1; }
/* guest phone polish (25 Nov 2026): waiting dots, lucky-draw ticket, end-of-game medal */
.gp .gc.fb.diff { background: linear-gradient(170deg, #c58aa6, #8d5f8a); }
.gp .gc.gwait { text-align: center; }
.gw-dots { display: flex; justify-content: center; gap: 8px; margin: 4px 0 10px; }
.gw-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--st-ac, #c9a25d); animation: gwBounce 1.2s ease-in-out infinite; }
.gw-dots i:nth-child(2) { animation-delay: .15s; } .gw-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes gwBounce { 0%, 80%, 100% { transform: translateY(0); opacity: .45; } 40% { transform: translateY(-8px); opacity: 1; } }
.gp .gw-n { margin-top: 8px; font-size: .95em; } .gp .gw-n b { color: var(--st-ac, #b4405a); font-size: 1.2em; }
.gp .gc.gtk { text-align: center; }
.gp .gtk-k { margin: 0 0 10px; font-weight: 600; color: var(--st-ac, #a57b3f); }
.gtk-t { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 auto 12px; max-width: 320px; padding: 16px 18px; border-radius: 12px; text-align: left; color: #5a3a14; background: linear-gradient(120deg, #fbe7b6, #f1cd78 55%, #e3b55c); box-shadow: inset 0 0 0 2px #fff6, 0 8px 18px #a77c3c40; overflow: hidden; }
.gtk-t::before, .gtk-t::after { content: ""; position: absolute; top: 50%; width: 18px; height: 18px; border-radius: 50%; translate: 0 -50%; background: var(--gp-bg, #fbf5ec); }
.gtk-t::before { left: -9px; } .gtk-t::after { right: -9px; }
.gtk-t > div { display: flex; flex-direction: column; gap: 2px; padding-left: 6px; } .gtk-t small { font-size: .8em; opacity: .8; } .gtk-t b { font-size: 1.7em; letter-spacing: .06em; font-variant-numeric: tabular-nums; } .gtk-t span { font-weight: 600; }
.gtk-t i { font-style: normal; font-size: 2em; padding: 0 12px 0 16px; border-left: 2px dashed #a77c3c66; }
.gtk-t > div::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, #ffffff88 50%, transparent 65%); transform: translateX(-110%); animation: okSweep 3s ease-in-out infinite; }
@keyframes okSweep { 0% { transform: translateX(-110%); } 55%, 100% { transform: translateX(110%); } }
.gp .gc.gend { text-align: center; position: relative; overflow: hidden; }
.gmed { width: 76px; height: 76px; margin: 4px auto 8px; border-radius: 50%; display: grid; place-items: center; font: 700 2em var(--f); color: #fff; background: linear-gradient(135deg, #d9c7b0, #a8957d); box-shadow: inset 0 0 0 4px #fff6, 0 8px 18px #3a221030; animation: pop .5s ease both; }
.gend.r1 .gmed { background: linear-gradient(135deg, #f6dc95, #b9863a); } .gend.r2 .gmed { background: linear-gradient(135deg, #f1f2f5, #9aa1ac); } .gend.r3 .gmed { background: linear-gradient(135deg, #f3d6c0, #a8704c); }
.gmed.lk { background: linear-gradient(135deg, #f3c6cf, #c0607a); }
@media (prefers-reduced-motion: reduce) { .gw-dots i, .gtk-t > div::after { animation: none; } }
/* ใครน่าจะ… on the phone: the bride's / groom's photo (or initial) on the vote buttons */
.gp .opt.side .lt.sav { width: 2.6em; height: 2.6em; flex: none; border-radius: 50%; overflow: hidden; display: grid; place-items: center; font: 700 1.1em var(--f); font-style: normal; color: #fff; box-shadow: 0 0 0 3px #fffdf8; }
.gp .opt.side.o1 .lt.sav { background: radial-gradient(circle at 35% 30%, #fbe3e8, #d98a9c); } .gp .opt.side.o2 .lt.sav { background: radial-gradient(circle at 35% 30%, #e3efe6, #7f9f8a); }
.gp .opt.side .lt.sav img { width: 100%; height: 100%; object-fit: cover; }
/* join form: mark the field that still needs filling */
.gp #nm.bad { border-color: #c0504d; box-shadow: 0 0 0 3px #c0504d26; }
.gp .tpick.bad label span { border-color: #c0504d; }
.gp .tpick.bad legend { color: #a33a3a; }
@media (max-width: 560px) { .hx-top a, .hx-top button { white-space: nowrap; font-size: .9rem; padding-inline: .7rem; } }
/* game library: 7 cards → 4 + 3 on a wide screen */
@media (min-width: 1100px) { .lib.l3.l4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* ช่อดอกไม้ & รางวัล: two separate blocks with their own picture in the heading */
.drs { display: grid; gap: 1rem; }
.dr.drb, .dr.drl { border: 1.5px solid var(--line); border-radius: .9rem; padding: .9rem 1rem 1rem; }
.dr.drb legend, .dr.drl legend { display: flex; align-items: center; gap: .5rem; padding: 0 .4rem; font-weight: 700; font-size: 1.05rem; }
.dr.drb legend svg, .dr.drl legend svg { width: 2rem; height: 2rem; }
.dr.drb { background: color-mix(in srgb, #e8a0b4 8%, var(--sf, #fff)); }
.shcnt { font-weight: 500; font-size: .8em; color: var(--mut, #687064); margin-left: .3rem; }
/* ของที่ระลึกหลังงาน (keep.html) */
.kplink { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .2rem .6rem; text-decoration: none; color: var(--ink); }
.kplink b { font-size: 1rem; } .kplink small { grid-column: 1; color: var(--mut, #687064); font-size: .85rem; line-height: 1.4; } .kplink span { grid-row: 1 / 3; grid-column: 2; font-size: 1.6rem; color: var(--g); }
.kplink:hover { border-color: var(--g); }
.hx.keep { max-width: 1000px; margin: 0 auto; padding: 20px 16px 60px; display: grid; gap: 16px; }
.kp-top h1 { margin: .2rem 0 .1rem; font-size: 1.7rem; } .kp-back { color: var(--g); text-decoration: none; font-weight: 600; }
.kp-sec h2 { margin: 0; font-size: 1.25rem; } .kp-sec h3 { margin: 1rem 0 .3rem; font-size: 1rem; }
.kp-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; }
.kp-h .hint { margin: .2rem 0 0; } .kp-h button { margin: 0; }
.kp-wishes { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .6rem; }
.kp-wishes li { padding: .8rem 1rem; border-radius: .8rem; background: color-mix(in srgb, #e8d3a6 22%, var(--sf, #fff)); border: 1px solid var(--line); }
.kp-wishes p { margin: 0 0 .4rem; line-height: 1.55; } .kp-wishes b { font-size: .85rem; color: #a57b3f; font-weight: 600; }
.kp-grid { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .7rem; }
.kp-grid li { position: relative; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: .8rem; overflow: hidden; background: var(--sf, #fff); }
.kp-grid li.off { opacity: .7; }
.kp-img { display: block; aspect-ratio: 1; background: #0001; } .kp-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kp-grid li > div { padding: .5rem .7rem .6rem; display: grid; gap: .1rem; min-width: 0; } .kp-grid li > div b { font-size: .9rem; } .kp-grid li > div small { color: var(--mut, #687064); font-size: .8rem; overflow-wrap: anywhere; }
.kp-dl { position: absolute; right: .45rem; top: .45rem; width: 2.1rem; height: 2.1rem; border-radius: 50%; display: grid; place-items: center; background: #fffdf8ee; color: #3a2a22; text-decoration: none; font-weight: 700; box-shadow: 0 .2rem .5rem #0003; }
.kp-list { margin: .2rem 0 0; padding-left: 1.4rem; line-height: 1.8; } .kp-list small { color: var(--mut, #687064); margin-left: .3rem; }
/* สุ่มรางวัล: switch between the bouquet toss and prizes on the control card */
.drsw { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; margin-bottom: .7rem; padding: .3rem; border-radius: .9rem; background: color-mix(in srgb, var(--ink) 6%, transparent); }
.drsw button { margin: 0; min-height: 2.6rem; border: 0; border-radius: .7rem; background: transparent; font-weight: 600; color: var(--ink); }
.drsw button[aria-pressed=true] { background: var(--sf, #fff); box-shadow: 0 .15rem .5rem #0002; color: var(--g); }
.dr.drb legend span, .dr.drl legend span { display: flex; flex-direction: column; line-height: 1.25; }
.dr.drb legend small, .dr.drl legend small { font-size: .72rem; font-weight: 600; color: var(--mut, #687064); letter-spacing: .03em; }
.sheet .drs { grid-template-columns: 1fr; }
/* สุ่มรางวัล: pick the kind of draw first, then only its settings show */
.artpick.dmode span { flex-direction: column; gap: 2px; padding: 12px 10px; } .artpick.dmode span svg { width: 52px; height: 52px; }
.artpick.dmode small { color: var(--mut, #687064); font-size: .8rem; }
#sec-draw:has(input[name=s_dm][value=bouquet]:checked) .drl, #sec-draw:has(input[name=s_dm][value=lucky]:checked) .drb { display: none; }
.dr.drb legend span, .dr.drl legend span { font-size: .95rem; }
/* host: folded management lists (wishes / guest photos) */
.mgr { margin-top: 1rem; border: 1px solid var(--line); border-radius: .9rem; background: var(--sf, #fff); }
.mgr > summary { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .7rem; padding: .8rem 1rem; cursor: pointer; list-style: none; }
.mgr > summary::-webkit-details-marker { display: none; }
.mgr > summary::before { content: "▸"; color: var(--g); transition: transform .2s; }
.mgr[open] > summary::before { transform: rotate(90deg); }
.mgr > summary b { font-size: 1rem; } .mgr > summary span { color: var(--mut, #687064); font-size: .88rem; }
.mgr > summary em { margin-left: auto; font-style: normal; font-size: .8rem; font-weight: 700; color: #fff; background: #c0504d; padding: .15rem .6rem; border-radius: 99px; }
.mgr-f { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0 1rem .7rem; }
.mgr-f button { margin: 0; min-height: 2.1rem; padding: .2rem .8rem; border-radius: 99px; font-size: .88rem; }
.mgr-f button[aria-pressed=true] { background: var(--g); border-color: var(--g); color: #fff; }
.mgr-f button small { opacity: .75; margin-left: .15rem; }
.mgr .mgr-l { margin: 0; padding: 0 1rem; max-height: 26rem; overflow-y: auto; overscroll-behavior: contain; }
.mgr .hint { padding: 0 1rem .8rem; margin: 0; }
.mgr-more { display: block; width: calc(100% - 2rem); margin: .6rem 1rem 1rem; }
/* two-press confirm: the armed button changes colour until pressed again (4 s) */
button.armed { background: #c0504d !important; border-color: #c0504d !important; color: #fff !important; animation: armPulse .8s ease-in-out infinite alternate; }
@keyframes armPulse { to { box-shadow: 0 0 0 .3rem #c0504d40; } }

/* Thai marks: clamped / ellipsis text keeps room above the first line so tone marks and floating vowels are not cut */
.lib.l3 .gc-main small { line-height: 1.6; padding-top: .2em; margin-top: -.2em; }
.gc-main small { line-height: 1.6; }

@keyframes nudge { 0%, 100% { box-shadow: 0 0 0 0 #b3402f00; } 50% { box-shadow: 0 0 0 6px #b3402f55; } }
body.timeup [data-act=reveal] { animation: nudge 1.1s ease-in-out infinite; }

.hint.warn { background: #fff3e0; border: 1px solid #e8b96a; border-radius: .6rem; padding: .6rem .75rem; color: #6a4410; }

.pdel { color: #a33; min-height: 44px; min-width: 44px; }

.gperr { background: #fdecea; color: #7a1f17; border: 1px solid #e3a49c; border-radius: .7rem; padding: .7rem .85rem; margin: .5rem 0; line-height: 1.6; }
.gpprog { display: flex; align-items: center; gap: .6rem; margin: .5rem 0; } .gpprog progress { flex: 1; height: 12px; }
#offb { position: fixed; z-index: 60; left: 0; right: 0; top: env(safe-area-inset-top, 0px); min-height: 44px; display: none; align-items: center; justify-content: center; gap: .5rem; padding: .5rem 1rem; background: #7a1f17; color: #fff; font-weight: 600; text-align: center; line-height: 1.5; }
body.offline #offb { display: flex; }
body.disp #offb { display: none !important; }
.rdl{list-style:none;margin:8px 0;padding:0;display:grid;gap:8px}
.rd{display:flex;gap:10px;align-items:flex-start}.rd>div{flex:1;min-width:0}.rd small{display:block;color:var(--mut,#6b6b6b);overflow-wrap:anywhere}
.rd-i{flex:none;width:24px;height:24px;border-radius:50%;display:grid;place-items:center;font-weight:700;font-size:14px;background:#ddd;color:#333}
.rd-ok .rd-i,.rd-done .rd-i{background:#2e7d4f;color:#fff}.rd-warn .rd-i{background:#c0392b;color:#fff}.rd-info .rd-i{background:#e8c25a;color:#3a2e00}
.rd .rd-fix{color:#a63a2b}.rd button{min-height:44px;min-width:44px;flex:none}
.rd-bar{height:8px;border-radius:4px;background:#e3e3e3;overflow:hidden;margin:8px 0}.rd-bar i{display:block;height:100%;background:#2e7d4f}
.rd{flex-wrap:wrap}.rd>div{flex:1 1 180px}.rd button{max-width:100%;white-space:normal}
