/* MAI LOVE INTERACTION — tema Marifood
   Warna diambil dari logo Marifood: hijau #00A651, lime #A6CE39, oranye #F58220, kuning #FFCB08 */
:root {
  --green: #00A651;
  --green-700: #00803F;
  --green-800: #00662F;
  --green-900: #0E3B22;
  --lime: #A6CE39;
  --orange: #F58220;
  --orange-700: #C4610F;
  --yellow: #FFCB08;
  --ink: #1D2B20;
  --muted: #5F6F62;
  --line: #E3EADF;
  --bg: #F7FAF3;
  --card: #FFFFFF;
  --soft: #EEF6E5;
  --soft-orange: #FFF2E6;
  --danger: #C2410C;
  --danger-soft: #FDECE3;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(14, 59, 34, .06), 0 4px 16px rgba(14, 59, 34, .06);
  --font: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--green-700); }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; font-weight: 800; }
h2 { font-size: 1.2rem; font-weight: 800; }
h3 { font-size: 1.02rem; font-weight: 700; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.hidden { display: none !important; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; }
.stack > * + * { margin-top: 12px; }
.tnum { font-variant-numeric: tabular-nums; }

/* brand stripe (hijau–oranye–kuning seperti logo) */
.brand-stripe { height: 4px; background: linear-gradient(90deg, var(--green) 0 62%, var(--orange) 62% 88%, var(--yellow) 88% 100%); }

/* ---------- Header ---------- */
.topbar { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar .inner { max-width: 1240px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 18px; }
.topbar .brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.topbar .brand img { height: 38px; width: auto; display: block; }
.topbar .brand .app { border-left: 1px solid var(--line); padding-left: 12px; line-height: 1.1; }
.topbar .brand .app b { display: block; font-size: .92rem; font-weight: 800; letter-spacing: .02em; color: var(--green-800); }
.topbar .brand .app span { font-size: .72rem; color: var(--muted); }
.topbar nav { display: flex; gap: 4px; margin-left: 8px; }
.topbar nav a { text-decoration: none; color: var(--muted); font-weight: 600; padding: 8px 12px; border-radius: 10px; font-size: .92rem; }
.topbar nav a:hover { background: var(--soft); color: var(--green-800); }
.topbar nav a.active { background: var(--soft); color: var(--green-800); }
.topbar .user { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: .88rem; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--orange); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .85rem; }
.role-tag { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--orange-700); font-weight: 700; }

.page { max-width: 1240px; margin: 0 auto; padding: 24px 20px 60px; }
.page-head { display: flex; gap: 16px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; margin-bottom: 18px; }
.page-head .eyebrow { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--orange-700); margin-bottom: 4px; }

/* ---------- Cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.card.narrow { max-width: 440px; margin: 0 auto; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-head h2, .card-head h3 { margin: 0; }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; } }

.tile { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; position: relative; overflow: hidden; }
.tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--green); }
.tile:nth-child(2)::before { background: var(--orange); }
.tile:nth-child(3)::before { background: var(--lime); }
.tile:nth-child(4)::before { background: var(--yellow); }
.tile .v { font-size: 1.7rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tile .l { color: var(--muted); font-size: .82rem; }

/* ---------- Buttons & forms ---------- */
.btn { --b: var(--green); display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--b); background: var(--b); color: #fff; font: inherit; font-weight: 700; font-size: .9rem; padding: 9px 16px; border-radius: 10px; cursor: pointer; text-decoration: none; white-space: nowrap; transition: filter .15s, transform .05s; }
.btn:hover { filter: brightness(.95); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.orange { --b: var(--orange); }
.btn.dark { --b: var(--green-900); }
.btn.ghost { background: #fff; color: var(--green-800); border-color: var(--line); }
.btn.ghost:hover { background: var(--soft); filter: none; }
.btn.danger { background: #fff; color: var(--danger); border-color: #F3CDB8; }
.btn.danger:hover { background: var(--danger-soft); filter: none; }
.btn.sm { padding: 6px 10px; font-size: .82rem; border-radius: 8px; }
.btn.lg { padding: 13px 22px; font-size: 1rem; border-radius: 12px; }
.btn.block { width: 100%; }
.icon-btn { border: 1px solid var(--line); background: #fff; border-radius: 8px; width: 32px; height: 32px; display: inline-grid; place-items: center; cursor: pointer; color: var(--muted); font-size: 15px; }
.icon-btn:hover { background: var(--soft); color: var(--green-800); }

label.field { display: block; }
label.field > span { display: block; font-weight: 600; font-size: .85rem; margin-bottom: 5px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input:not([type]), select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1px solid #D5DED0; border-radius: 10px; padding: 10px 12px; outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 80px; }
input:focus, select:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(0, 166, 81, .15); }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: .92rem; }
.check input { width: 18px; height: 18px; accent-color: var(--green); margin-top: 2px; flex: none; }
.hint { font-size: .8rem; color: var(--muted); margin-top: 4px; }

.seg { display: inline-flex; background: var(--soft); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; font: inherit; font-weight: 600; font-size: .84rem; color: var(--muted); padding: 6px 12px; border-radius: 8px; cursor: pointer; }
.seg button.on { background: #fff; color: var(--green-800); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }

/* ---------- Pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--soft); color: var(--green-800); letter-spacing: .02em; white-space: nowrap; }
.pill.draft { background: #EEF0EC; color: #4B574D; }
.pill.live { background: var(--green); color: #fff; }
.pill.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: pulse 1.4s infinite; }
.pill.paused { background: #FFF6D6; color: #8A6A00; }
.pill.closed { background: #E9ECE8; color: #5F6F62; }
.pill.orange { background: var(--soft-orange); color: var(--orange-700); }
.pill.open { background: var(--green); color: #fff; }
.pill.pending { background: #FFF6D6; color: #8A6A00; }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- Table ---------- */
table.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tbl th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }

/* ---------- Modal & toast ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(14, 59, 34, .35); display: grid; place-items: center; padding: 16px; z-index: 50; }
.modal { background: #fff; border-radius: 18px; width: min(640px, 100%); max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 20px 60px rgba(0, 0, 0, .2); }
.modal .mh { padding: 18px 20px 0; display: flex; justify-content: space-between; align-items: center; }
.modal .mb { padding: 16px 20px; }
.modal .mf { padding: 0 20px 18px; display: flex; justify-content: flex-end; gap: 8px; }
#toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 100; width: min(420px, calc(100% - 32px)); }
.toast { background: var(--green-900); color: #fff; padding: 11px 16px; border-radius: 12px; font-size: .9rem; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); animation: tin .2s ease-out; }
.toast.err { background: var(--danger); }
@keyframes tin { from { transform: translateY(8px); opacity: 0; } }

.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty img { width: 64px; opacity: .9; margin-bottom: 8px; }

/* ---------- Login ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth .hero { position: relative; overflow: hidden; background: #FFFDF7; display: flex; flex-direction: column; justify-content: center; padding: 48px 56px; border-right: 1px solid var(--line); }
.auth .hero img.logo { width: min(320px, 70%); }
.auth .hero h1 { font-size: 2.2rem; margin-top: 28px; color: var(--green-900); }
.auth .hero h1 em { font-style: normal; color: var(--orange); }
.auth .hero p { color: var(--muted); max-width: 440px; font-size: 1.02rem; }
.auth .hero .swoosh { position: absolute; left: -5%; right: -5%; bottom: -10px; width: 110%; height: 180px; }
.auth .form { display: grid; place-items: center; padding: 32px 20px; }
.auth .form .card { width: min(400px, 100%); padding: 28px; }
.feature-list { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 8px; color: var(--ink); font-weight: 600; font-size: .93rem; }
.feature-list li { display: flex; gap: 10px; align-items: center; }
.feature-list li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 3px #EAF4D1; }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth .hero { padding: 32px 24px 120px; border-right: 0; border-bottom: 1px solid var(--line); } .auth .hero h1 { font-size: 1.6rem; } }

/* ---------- Session cards (dashboard) ---------- */
.sessions { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.s-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); }
.s-card h3 { margin: 0; font-size: 1.05rem; }
.s-card .meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: .82rem; }
.s-card .meta b { color: var(--ink); font-variant-numeric: tabular-nums; }
.s-card .actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; border-top: 1px dashed var(--line); }
.tpl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tpl { border: 1.5px solid var(--line); border-radius: 12px; padding: 10px; cursor: pointer; background: #fff; text-align: left; font: inherit; }
.tpl b { display: block; font-size: .9rem; }
.tpl span { font-size: .76rem; color: var(--muted); }
.tpl.on { border-color: var(--green); background: var(--soft); }
@media (max-width: 560px) { .tpl-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Builder ---------- */
.q-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.q-card + .q-card { margin-top: 10px; }
.q-card .q-head { display: flex; gap: 10px; align-items: flex-start; }
.q-num { width: 28px; height: 28px; border-radius: 8px; background: var(--soft); color: var(--green-800); display: grid; place-items: center; font-weight: 800; font-size: .85rem; flex: none; }
.q-card.editing { border-color: var(--green); box-shadow: 0 0 0 3px rgba(0, 166, 81, .1); }
.opt-row { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.opt-row input[type=text] { flex: 1; }
.type-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.type-pick button { text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 10px 12px; cursor: pointer; font: inherit; }
.type-pick button:hover { border-color: var(--green); background: var(--soft); }
.type-pick b { display: block; font-size: .88rem; }
.type-pick span { font-size: .74rem; color: var(--muted); }
.qr-box { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; text-align: center; }
.qr-box img { width: 100%; max-width: 220px; display: block; margin: 0 auto; }
.code-big { font-size: 1.7rem; font-weight: 800; letter-spacing: .14em; color: var(--green-900); font-variant-numeric: tabular-nums; }
.linkbox { display: flex; gap: 6px; }
.linkbox input { font-size: .8rem; }

/* ---------- Console ---------- */
.console { display: grid; grid-template-columns: 300px minmax(0, 1fr) 330px; gap: 16px; align-items: start; }
@media (max-width: 1150px) { .console { grid-template-columns: 260px minmax(0, 1fr); } .console .side-r { grid-column: 1 / -1; } }
@media (max-width: 760px) { .console { grid-template-columns: 1fr; } }
.ctrlbar { background: var(--green-900); color: #fff; border-radius: var(--radius); padding: 12px 16px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.ctrlbar .t { font-weight: 800; font-size: 1.05rem; }
.ctrlbar .stat { font-size: .82rem; opacity: .85; }
.ctrlbar .stat b { font-size: 1rem; opacity: 1; font-variant-numeric: tabular-nums; }
.ctrlbar .btn.ghost { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .2); color: #fff; }
.ctrlbar .btn.ghost:hover { background: rgba(255, 255, 255, .16); }
.ql { list-style: none; margin: 0; padding: 0; }
.ql li { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-radius: 10px; cursor: pointer; border: 1px solid transparent; }
.ql li:hover { background: var(--soft); }
.ql li.sel { border-color: var(--green); background: #fff; box-shadow: var(--shadow); }
.ql li.active .q-num { background: var(--green); color: #fff; }
.ql .qt { font-size: .88rem; font-weight: 600; line-height: 1.3; }
.ql .qm { font-size: .74rem; color: var(--muted); margin-top: 3px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.mod-item { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #fff; }
.mod-item + .mod-item { margin-top: 8px; }
.mod-item.flag { border-color: #F3CDB8; background: #FFF9F5; }
.mod-item .txt { font-size: .92rem; white-space: pre-wrap; word-break: break-word; }
.mod-item .by { font-size: .74rem; color: var(--muted); margin-top: 4px; }

/* ---------- Charts ---------- */
.hbars { display: grid; gap: 10px; }
.hbar { display: grid; grid-template-columns: minmax(90px, 34%) 1fr auto; gap: 12px; align-items: center; }
.hbar .lab { font-size: .9rem; font-weight: 600; overflow-wrap: anywhere; }
.hbar .lab.key { color: var(--green-800); }
.hbar .lab.key::after { content: " ✓"; }
.hbar .track { height: 22px; background: var(--soft); border-radius: 6px; overflow: hidden; }
.hbar .fill { height: 100%; background: var(--green); border-radius: 6px; transition: width .5s cubic-bezier(.2, .8, .2, 1); min-width: 2px; }
.hbar .fill.alt { background: var(--orange); }
.hbar .fill.dim { background: #9BD3B0; }
.hbar .val { font-size: .86rem; font-variant-numeric: tabular-nums; min-width: 92px; text-align: right; }
.hbar .val b { font-size: .95rem; }
.cols { display: flex; align-items: flex-end; gap: 10px; height: 220px; padding-top: 24px; }
.cols .col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; }
.cols .bar { width: 100%; max-width: 80px; background: var(--green); border-radius: 8px 8px 3px 3px; transition: height .5s cubic-bezier(.2, .8, .2, 1); position: relative; min-height: 2px; }
.cols .bar .n { position: absolute; top: -22px; left: 0; right: 0; text-align: center; font-weight: 700; font-size: .85rem; font-variant-numeric: tabular-nums; color: var(--ink); }
.cols .x { font-weight: 700; font-size: .9rem; color: var(--muted); }
.scale-labels { display: flex; justify-content: space-between; font-size: .78rem; color: var(--muted); margin-top: 6px; }
.pie-wrap { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.pie-wrap svg { width: 220px; height: 220px; flex: none; }
.legend { display: grid; gap: 8px; font-size: .9rem; }
.legend div { display: flex; gap: 10px; align-items: center; }
.legend i { width: 14px; height: 14px; border-radius: 4px; flex: none; }
.legend .num { margin-left: auto; padding-left: 16px; font-variant-numeric: tabular-nums; color: var(--muted); }
.cloud { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 18px; padding: 18px 8px; min-height: 180px; }
.cloud span { font-weight: 800; line-height: 1.05; transition: font-size .4s; }
.wall { columns: 3 240px; column-gap: 12px; }
.wall .note { break-inside: avoid; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--lime); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; font-size: .95rem; white-space: pre-wrap; word-break: break-word; }
.wall .note:nth-child(3n+2) { border-left-color: var(--orange); }
.wall .note:nth-child(3n) { border-left-color: var(--green); }
.wall .note .by { display: block; font-size: .78rem; color: var(--muted); margin-top: 6px; font-weight: 600; }
.wall .note .tag { display: inline-block; margin-top: 6px; }
.stat-row { display: flex; gap: 22px; flex-wrap: wrap; margin-bottom: 14px; }
.stat-row div { font-size: .8rem; color: var(--muted); }
.stat-row b { display: block; font-size: 1.35rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.slope svg { width: 100%; height: auto; display: block; }

/* ---------- Display (proyektor/TV) ---------- */
body.display { background: #FFFDF7; height: 100vh; overflow: hidden; }
.disp { height: 100vh; display: grid; grid-template-rows: auto 1fr auto; }
.disp-top { display: flex; align-items: center; gap: 24px; padding: 2.2vh 3vw; }
.disp-top img { height: 6vh; min-height: 40px; }
.disp-top .title { font-weight: 700; color: var(--muted); font-size: clamp(14px, 1.6vw, 24px); }
.disp-top .join { margin-left: auto; display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 8px 14px; }
.disp-top .join img { height: 9vh; min-height: 64px; }
.disp-top .join .c { font-size: clamp(12px, 1.1vw, 18px); color: var(--muted); line-height: 1.3; }
.disp-top .join .c b { display: block; font-size: clamp(20px, 2.4vw, 40px); color: var(--green-900); letter-spacing: .12em; }
.disp-main { padding: 1vh 4vw 2vh; overflow: hidden; display: flex; flex-direction: column; min-height: 0; }
.disp-q { font-size: clamp(24px, 3.4vw, 60px); font-weight: 800; line-height: 1.15; color: var(--green-900); margin-bottom: 3vh; letter-spacing: -.02em; }
.disp-meta { font-size: clamp(13px, 1.2vw, 20px); color: var(--orange-700); font-weight: 700; margin-bottom: 1vh; letter-spacing: .04em; text-transform: uppercase; }
.disp-res { flex: 1; min-height: 0; overflow: hidden; }
.disp .hbar { grid-template-columns: minmax(120px, 30%) 1fr auto; gap: 2vw; }
.disp .hbar .lab { font-size: clamp(16px, 1.8vw, 32px); }
.disp .hbar .track { height: clamp(26px, 4.5vh, 56px); border-radius: 10px; }
.disp .hbar .fill { border-radius: 10px; }
.disp .hbar .val { font-size: clamp(16px, 1.6vw, 30px); min-width: 7em; }
.disp .hbar .val b { font-size: inherit; }
.disp .hbars { gap: 2.2vh; }
.disp .cols { height: 48vh; gap: 2vw; }
.disp .cols .bar { max-width: 140px; }
.disp .cols .bar .n { font-size: clamp(16px, 1.8vw, 30px); top: -1.6em; }
.disp .cols .x { font-size: clamp(16px, 1.8vw, 30px); }
.disp .scale-labels { font-size: clamp(13px, 1.2vw, 20px); }
.disp .cloud { gap: 1vh 2.4vw; height: 100%; }
.disp .wall { columns: 3 300px; }
.disp .wall .note { font-size: clamp(15px, 1.4vw, 26px); }
.disp .pie-wrap svg { width: 46vh; height: 46vh; }
.disp .legend { font-size: clamp(16px, 1.6vw, 30px); gap: 1.6vh; }
.disp .legend i { width: 1em; height: 1em; }
.disp .stat-row b { font-size: clamp(22px, 2.6vw, 48px); }
.disp .stat-row div { font-size: clamp(13px, 1.1vw, 20px); }
.disp-foot { position: relative; height: 7vh; min-height: 44px; }
.disp-foot svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.disp-foot .cnt { position: absolute; right: 3vw; bottom: 1.6vh; color: #fff; font-weight: 700; font-size: clamp(13px, 1.2vw, 20px); }
.lobby { flex: 1; display: grid; grid-template-columns: auto 1fr; gap: 5vw; align-items: center; justify-content: center; max-width: 1400px; margin: 0 auto; width: 100%; }
.lobby .qr { background: #fff; border-radius: 28px; padding: 2.4vh; box-shadow: 0 10px 40px rgba(14, 59, 34, .12); }
.lobby .qr img { width: min(52vh, 40vw); display: block; }
.lobby h1 { font-size: clamp(30px, 4.4vw, 76px); color: var(--green-900); margin-bottom: 2vh; }
.lobby .step { font-size: clamp(16px, 1.7vw, 30px); color: var(--muted); margin-bottom: 1.4vh; }
.lobby .step b { color: var(--ink); }
.lobby .code { font-size: clamp(40px, 6vw, 110px); font-weight: 800; letter-spacing: .14em; color: var(--orange); line-height: 1; margin: 1vh 0 2vh; font-variant-numeric: tabular-nums; }
.lobby .url { font-size: clamp(14px, 1.4vw, 24px); color: var(--green-700); font-weight: 700; word-break: break-all; }
.disp-ctl { position: fixed; right: 12px; bottom: 12px; display: flex; gap: 6px; opacity: 0; transition: opacity .2s; z-index: 5; }
body.display:hover .disp-ctl { opacity: 1; }
.waiting-dots span { display: inline-block; width: .5em; height: .5em; border-radius: 50%; background: var(--orange); margin: 0 .15em; animation: bounce 1.2s infinite; }
.waiting-dots span:nth-child(2) { animation-delay: .15s; background: var(--green); }
.waiting-dots span:nth-child(3) { animation-delay: .3s; background: var(--yellow); }
@keyframes bounce { 40% { transform: translateY(-.5em); } }

/* ---------- Participant (mobile-first) ---------- */
body.participant { background: #FFFDF7; min-height: 100vh; }
.p-top { background: #fff; border-bottom: 1px solid var(--line); padding: 10px 16px; display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 5; }
.p-top img { height: 30px; }
.p-top .t { font-size: .82rem; font-weight: 700; color: var(--muted); line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; text-align: right; }
.p-main { max-width: 560px; margin: 0 auto; padding: 20px 16px 48px; }
.p-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 20px; box-shadow: var(--shadow); }
.p-q { font-size: 1.28rem; font-weight: 800; line-height: 1.3; margin-bottom: 16px; color: var(--green-900); }
.choice { display: flex; align-items: center; gap: 12px; width: 100%; border: 1.5px solid #D5DED0; background: #fff; border-radius: 14px; padding: 14px 16px; font: inherit; font-weight: 600; font-size: 1rem; text-align: left; cursor: pointer; margin-bottom: 10px; color: var(--ink); min-height: 54px; }
.choice .mark { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #B8C6B3; flex: none; display: grid; place-items: center; }
.choice.multi .mark { border-radius: 6px; }
.choice.on { border-color: var(--green); background: var(--soft); }
.choice.on .mark { border-color: var(--green); background: var(--green); }
.choice.on .mark::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.choice.multi.on .mark::after { width: 10px; height: 5px; border-radius: 0; background: transparent; border: 2.5px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.rate { display: grid; gap: 8px; }
.rate.s5 { grid-template-columns: repeat(5, 1fr); }
.rate.s10 { grid-template-columns: repeat(5, 1fr); }
.rate button { aspect-ratio: 1; border: 1.5px solid #D5DED0; background: #fff; border-radius: 14px; font: inherit; font-size: 1.3rem; font-weight: 800; cursor: pointer; color: var(--ink); }
.rate button.on { background: var(--green); border-color: var(--green); color: #fff; }
.p-state { text-align: center; padding: 28px 12px; }
.p-state .big { font-size: 1.3rem; font-weight: 800; color: var(--green-900); margin: 12px 0 6px; }
.p-state .ic { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto; font-size: 34px; }
.p-state .ic.ok { background: var(--soft); color: var(--green); }
.p-state .ic.wait { background: var(--soft-orange); color: var(--orange); }
.privacy { background: var(--soft); border-radius: 12px; padding: 10px 12px; font-size: .82rem; color: var(--green-900); margin-top: 14px; }
.counter { text-align: right; font-size: .78rem; color: var(--muted); margin-top: 4px; }
.p-foot { text-align: center; font-size: .75rem; color: var(--muted); margin-top: 24px; }
.p-foot .brand-stripe { width: 120px; margin: 0 auto 10px; border-radius: 4px; }

@media print {
  .topbar, .no-print, .disp-ctl { display: none !important; }
  body { background: #fff; }
  .card, .q-card { box-shadow: none; break-inside: avoid; }
}
