/* 큐플 플러스 운영 콘솔 — 2026-11-02 디자인 정리.
   원칙: 내용이 먼저 보이게 · 색은 의미가 있을 때만 · 숫자는 고정폭 · 그림자 대신 얇은 선. */
:root {
  --bg: #f3f5f7; --surface: #ffffff; --surface-2: #f8fafb; --ink: #13202a; --ink-2: #3a4a56; --muted: #6c7b87; --faint: #98a5af;
  --line: #e3e8ec; --line-strong: #cfd7de;
  --accent: #0b7a9e; --accent-ink: #ffffff; --accent-soft: #e5f3f7; --accent-line: #b9dde8;
  --ok: #1e7f4f; --ok-soft: #e6f4ec; --warn: #9a6400; --warn-soft: #fbf1dc; --danger: #c23b3b; --danger-soft: #fbe9e9;
  --side: #0f1d27; --side-2: #172833; --side-ink: #a9b8c3; --side-ink-strong: #ffffff;
  --radius: 10px; --radius-sm: 7px;
  --font: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d151b; --surface: #131e26; --surface-2: #17242d; --ink: #e6edf2; --ink-2: #c3cfd8; --muted: #8b9ba7; --faint: #66767f;
    --line: #22323d; --line-strong: #2f4350; --accent: #39a9cf; --accent-soft: #12303c; --accent-line: #1f4b5c;
    --ok: #4fbf86; --ok-soft: #10301f; --warn: #e0a640; --warn-soft: #33270f; --danger: #ef7070; --danger-soft: #371818;
    --side: #0a1218; --side-2: #121e26; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 14px/1.55 var(--font); background: var(--bg); color: var(--ink); letter-spacing: -0.005em; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
::selection { background: var(--accent-soft); }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── 입력·단추 ── */
button, input, select, textarea { font: inherit; color: inherit; }
input, select, textarea {
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 7px 10px; min-width: 0; height: 36px;
  transition: border-color .12s, box-shadow .12s;
}
textarea { width: 100%; min-height: 80px; height: auto; line-height: 1.5; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type="checkbox"], input[type="radio"] { height: auto; width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }
input::placeholder, textarea::placeholder { color: var(--faint); }
button {
  height: 36px; padding: 0 14px; border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--radius-sm);
  cursor: pointer; font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: background .12s, border-color .12s, color .12s;
}
button:hover { border-color: var(--ink-2); }
button:active { transform: translateY(1px); }
button.primary { background: var(--ink); color: var(--surface); border-color: var(--ink); }
button.primary:hover { background: var(--ink-2); border-color: var(--ink-2); }
button.accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
button.danger { background: var(--surface); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); }
button.danger:hover { background: var(--danger-soft); border-color: var(--danger); }
button.danger.solid { background: var(--danger); color: #fff; border-color: var(--danger); }
button.ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
button.ghost:hover { background: var(--surface-2); }
button.sm { height: 30px; padding: 0 10px; font-size: 13px; }
button.link { border: 0; background: none; color: var(--side-ink); padding: 0; height: auto; font-weight: 500; }
button.link:hover { color: var(--side-ink-strong); }
button:disabled { opacity: .45; cursor: default; transform: none; }

h1 { font-size: 22px; line-height: 1.3; margin: 0; font-weight: 750; letter-spacing: -0.02em; }
h2 { font-size: 15px; margin: 0 0 12px; font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: 12px; margin: 18px 0 8px; color: var(--muted); font-weight: 650; text-transform: none; letter-spacing: .01em; }
p { margin: 0 0 8px; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }

/* ── 로그인 ── */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, 460px); }
.login-art { background: var(--side); color: var(--side-ink); padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-art .mark { font-weight: 800; font-size: 20px; color: #fff; letter-spacing: -0.02em; display: flex; align-items: center; gap: 10px; }
.login-art blockquote { margin: 0; max-width: 420px; font-size: 26px; line-height: 1.35; color: #fff; font-weight: 700; letter-spacing: -0.025em; }
.login-art small { color: var(--side-ink); }
.login-art .grid-bg { position: absolute; inset: 0; background-image: linear-gradient(var(--side-2) 1px, transparent 1px), linear-gradient(90deg, var(--side-2) 1px, transparent 1px); background-size: 44px 44px; opacity: .55; pointer-events: none; }
.login-art > * { position: relative; }
.login-panel { display: grid; place-items: center; padding: 32px; background: var(--surface); }
.login-card { width: min(340px, 100%); display: grid; gap: 14px; }
.login-card h1 { font-size: 24px; }
.login-card .sub { color: var(--muted); margin: -6px 0 6px; }
.login-card label { display: grid; gap: 6px; font-weight: 600; font-size: 13px; color: var(--ink-2); }
.login-card input { height: 42px; font-size: 15px; }
.login-card button { height: 44px; font-size: 15px; }
.otp-input { letter-spacing: .4em; font-family: var(--mono); font-size: 20px !important; text-align: center; }
@media (max-width: 860px) { .login { grid-template-columns: 1fr; } .login-art { display: none; } }

/* ── 앱 틀 ── */
#app { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--side); color: var(--side-ink); padding: 18px 12px 14px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; scrollbar-width: thin; }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 18px; color: #fff; font-weight: 800; font-size: 15px; letter-spacing: -0.01em; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: #fff; color: var(--side); display: inline-flex; align-items: center; justify-content: center; flex: none; font-weight: 900; font-size: 15px; letter-spacing: -0.04em; }
.brand-mark span { color: var(--accent); }
.brand small { display: block; color: var(--side-ink); font-weight: 500; font-size: 11.5px; margin-top: -2px; }
.nav-group { margin: 10px 0 2px; padding: 0 10px; font-size: 11px; font-weight: 700; color: #5f7482; letter-spacing: .06em; }
.side a { color: var(--side-ink); text-decoration: none; padding: 7px 10px; border-radius: 7px; display: flex; align-items: center; gap: 10px; font-weight: 550; font-size: 13.5px; }
.side a svg { width: 16px; height: 16px; flex: none; opacity: .75; }
.side a:hover { background: var(--side-2); color: #fff; }
.side a.on { background: var(--side-2); color: #fff; box-shadow: inset 2px 0 0 var(--accent); }
.side a.on svg { opacity: 1; color: #7cc9e2; }
.who { margin-top: auto; padding: 12px 10px 2px; border-top: 1px solid var(--side-2); display: grid; gap: 8px; font-size: 12.5px; }
.who-name { color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.who-name .role { font-size: 11px; color: var(--side-ink); font-weight: 600; border: 1px solid var(--side-2); padding: 1px 7px; border-radius: 999px; }
.who-actions { display: flex; gap: 14px; }
main { padding: 28px 32px 48px; min-width: 0; max-width: 1480px; width: 100%; }
main > h1 { margin-bottom: 18px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head p { color: var(--muted); margin: 4px 0 0; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── 보조 클래스(CSP: 인라인 style 금지) ── */
.sprite-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.mt { margin-top: 14px; } .mt-s { margin-top: 8px; }
.form-grid.one { grid-template-columns: 1fr; }
.qr-side { flex: 1; min-width: 200px; }
.who-actions a.link-sec { padding: 0; background: none; box-shadow: none; font-size: 12.5px; gap: 6px; color: var(--side-ink); }
.who-actions a.link-sec:hover, .who-actions a.link-sec.on { color: #fff; background: none; box-shadow: none; }
.who-actions a.link-sec svg { width: 14px; height: 14px; }

/* ── 면 ── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; }
.card > h2:first-child { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush > h2 { padding: 16px 20px 0; }
.card.msg { color: var(--danger); background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 30%, var(--line)); }
.card.note { background: var(--accent-soft); border-color: var(--accent-line); color: var(--ink-2); }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row > label { display: flex; gap: 6px; align-items: center; }
.spacer { flex: 1; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); margin-bottom: 16px; }
.grid2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat b { display: block; font-size: 26px; font-weight: 750; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 12.5px; font-weight: 600; }

/* ── 표 ── */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.card .table-wrap { margin-top: 4px; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
td.wrap { white-space: normal; max-width: 460px; word-break: break-all; }
th { color: var(--muted); font-weight: 650; font-size: 12px; position: sticky; top: 0; background: var(--surface-2); z-index: 1; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--surface-2); }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ── 꼬리표 ── */
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 650; background: var(--accent-soft); color: var(--accent); margin-right: 4px; white-space: nowrap; }
.tag.red { background: var(--danger-soft); color: var(--danger); }
.tag.green { background: var(--ok-soft); color: var(--ok); }
.tag.amber { background: var(--warn-soft); color: var(--warn); }
.tag.gray { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.msg { min-height: 1.5em; color: var(--danger); margin: 0; font-size: 13px; }
.ok-msg { color: var(--ok); }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.tabs button { border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; height: 38px; color: var(--muted); padding: 0 12px; }
.tabs button:hover { color: var(--ink); }
.tabs button.on { border-bottom-color: var(--ink); color: var(--ink); }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; padding: 3px; gap: 2px; }
.seg button { border: 0; height: 30px; background: transparent; color: var(--muted); border-radius: 6px; font-size: 13px; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-variant-numeric: tabular-nums; }
pre { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px; overflow: auto; max-height: 360px; font: 12px/1.5 var(--mono); }

/* ── 알림·창 ── */
.toast { position: fixed; right: 20px; bottom: 20px; background: var(--ink); color: var(--surface); padding: 11px 16px; border-radius: 9px; max-width: min(440px, calc(100vw - 40px)); z-index: 50; font-weight: 550; box-shadow: 0 8px 24px #0002; }
dialog { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); width: min(540px, calc(100vw - 32px)); padding: 0; box-shadow: 0 20px 60px #0003; }
dialog form { padding: 22px; display: grid; gap: 12px; }
dialog h2 { font-size: 17px; margin-bottom: 4px; }
dialog label { display: grid; gap: 6px; font-weight: 600; font-size: 13px; color: var(--ink-2); }
dialog .row:last-child { justify-content: flex-end; margin-top: 6px; }
dialog::backdrop { background: #0a141b88; backdrop-filter: blur(2px); }
.chart { width: 100%; height: 160px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.chart path { fill: none; stroke-width: 1.5; }
.pick-list { max-height: 280px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }

/* ── 폼 ── */
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px 16px; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 12.5px; font-weight: 650; color: var(--ink-2); }
.field small { color: var(--muted); font-size: 12px; }
.field.full { grid-column: 1 / -1; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-weight: 600; }
.switch input { appearance: none; width: 38px; height: 22px; border-radius: 999px; background: var(--line-strong); position: relative; transition: background .15s; cursor: pointer; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px #0003; }
.switch input:checked { background: var(--ok); }
.switch input:checked::after { transform: translateX(16px); }

/* ── 보안 화면 ── */
.sec-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1080px) { .sec-grid { grid-template-columns: 1fr; } }
.sec-state { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface-2); margin-bottom: 16px; }
.sec-state .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--warn); flex: none; box-shadow: 0 0 0 4px var(--warn-soft); }
.sec-state.ok .dot { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.steps { counter-reset: s; display: grid; gap: 18px; margin: 4px 0 0; padding: 0; list-style: none; }
.steps > li { counter-increment: s; display: grid; grid-template-columns: 28px 1fr; gap: 12px; }
.steps > li::before { content: counter(s); width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.qr-box { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.qr-box .qr { padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; line-height: 0; }
.secret { font-family: var(--mono); font-size: 15px; letter-spacing: .06em; background: var(--surface-2); border: 1px dashed var(--line-strong); padding: 8px 12px; border-radius: 8px; user-select: all; word-break: break-all; }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; font-family: var(--mono); font-size: 14px; background: var(--surface-2); border: 1px solid var(--line); padding: 14px 16px; border-radius: 10px; margin: 8px 0; }
.meter { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; margin-top: 2px; }
.meter i { display: block; height: 100%; width: 0; background: var(--danger); transition: width .2s, background .2s; }

/* ── 목록·편집 공용(업적·도감·콘테스트) ── */
.list-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.list-toolbar input[type="search"] { width: 260px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 16px; align-items: start; }
@media (max-width: 1200px) { .split { grid-template-columns: 1fr; } }
.editor { position: sticky; top: 20px; }
.editor .card { margin-bottom: 0; }
.item-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 6px 0 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); font-size: 12.5px; font-weight: 600; }
.chip button { height: 20px; width: 20px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); }
.chip button:hover { background: var(--line); color: var(--ink); }
.chip.add { padding: 0 10px; border-style: dashed; cursor: pointer; color: var(--muted); }
.reward { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; font-size: 12.5px; }
.reward i { font-style: normal; color: var(--muted); font-weight: 600; }
.status-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-bottom: 14px; flex-wrap: wrap; }
.status-bar .dirty { color: var(--warn); font-weight: 700; }


/* ── 아이템 그림 ── */
canvas.ico { display: block; image-rendering: auto; flex: none; border-radius: 6px; background: var(--surface-2); }
canvas.ico-24 { width: 22px; height: 24px; } canvas.ico-32 { width: 29px; height: 32px; } canvas.ico-36 { width: 32px; height: 36px; }
canvas.ico-44 { width: 40px; height: 44px; } canvas.ico-48 { width: 43px; height: 48px; }
canvas.ico-none { background: repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 4px, var(--line) 4px, var(--line) 5px); }
.ico-row { display: flex; gap: 4px; align-items: center; }
.reward canvas.ico { background: transparent; }
.rw-stack { display: grid; gap: 4px; }

/* ── 아이템 고르기 창 ── */
dialog.picker { width: min(860px, calc(100vw - 32px)); padding: 0; }
.picker-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px 4px; }
.picker-head h2 { margin: 0; }
.picker-tools { padding: 8px 22px 12px; border-bottom: 1px solid var(--line); }
.picker-tools input { flex: 1; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; padding: 14px 22px 22px; max-height: min(60vh, 560px); overflow: auto; }
.pick-cell { height: auto; display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; align-items: center; gap: 0 8px; text-align: left; padding: 8px; font-weight: 600; justify-content: stretch; }
.pick-cell canvas { grid-row: 1 / 3; }
.pick-cell span { font-size: 12.5px; white-space: normal; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pick-cell small { color: var(--muted); font-weight: 500; font-size: 11px; }
.pick-cell.off { opacity: .7; }
.pick-cell:hover { border-color: var(--accent); background: var(--accent-soft); }

/* ── 정의 편집(업적·도감) ── */
.defs-table td { vertical-align: middle; }
.defs-table tr.sel td { background: var(--accent-soft); }
.defs-table tr.sel td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.defs-table tr.is-off td { color: var(--faint); }
.defs-table tr.is-off canvas { opacity: .45; }
.step-badge { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); font-size: 11.5px; font-weight: 700; color: var(--muted); }
td.step { width: 36px; }
.seg-count { margin-left: 5px; color: var(--faint); font-weight: 600; font-size: 11px; }
.seg button.on .seg-count { color: var(--muted); }
.editor-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.editor-head h2 { margin: 0; }
.editor-head p { margin: 4px 0 0; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.editor-foot { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.rw-editor { display: grid; gap: 10px; }
.rw-items { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rw-item, .pair-item { height: auto; min-height: 52px; justify-content: flex-start; gap: 10px; padding: 7px 10px; text-align: left; font-weight: 600; white-space: normal; }
.rw-item span, .pair-item span { display: grid; font-size: 12.5px; line-height: 1.3; }
.rw-item small, .pair-item small { color: var(--muted); font-weight: 600; font-size: 11px; }
.pairs { display: grid; gap: 8px; }
.pair { display: grid; grid-template-columns: 22px 1fr 1fr auto; gap: 8px; align-items: center; }
.pair-no { font-weight: 700; color: var(--faint); font-size: 12px; text-align: center; }

/* ── 베스트드레서·커플천하 ── */
.live-strip { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); margin-bottom: 14px; }
.pill { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); font-weight: 650; font-size: 12.5px; color: var(--muted); background: var(--surface-2); }
.pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.pill.on { color: var(--ok); background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 30%, var(--line)); }
.pill.on i { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent); }
.contest-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 1100px) { .contest-controls { grid-template-columns: 1fr; } }
.sticky-tools { position: sticky; top: 0; z-index: 3; background: var(--bg); padding: 10px 0; margin: 0 0 6px; }
.entries { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.entries.couples { grid-template-columns: repeat(auto-fill, minmax(560px, 1fr)); }
@media (max-width: 700px) { .entries.couples { grid-template-columns: 1fr; } }
.entry { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; transition: border-color .12s, box-shadow .12s; }
.entry:hover { border-color: var(--line-strong); }
.entry.picked { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.entry.hidden-entry { opacity: .55; }
.entry header, .entry footer { display: flex; align-items: center; gap: 8px; padding: 10px 14px; }
.entry header { border-bottom: 1px solid var(--line); }
.entry footer { border-top: 1px solid var(--line); min-height: 46px; padding-top: 6px; padding-bottom: 6px; }
.entry .pick { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.entry-no { font: 600 12px var(--mono); color: var(--muted); }
.entry-body { display: flex; align-items: stretch; gap: 10px; padding: 14px; flex: 1; }
.who-block { flex: 1; min-width: 0; display: grid; gap: 10px; align-content: start; }
.person { display: flex; align-items: center; gap: 7px; min-width: 0; }
.person b { font-size: 15px; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.g-dot.m { background: #3d7fd9; } .g-dot.f { background: #e0567f; }
.look { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.look-cell { aspect-ratio: 63 / 70; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; }
.look-cell canvas.ico { width: 100%; height: 100%; background: transparent; border-radius: 0; }
.look-cell.empty-cell { border-style: dashed; color: var(--faint); font-size: 10.5px; font-weight: 600; }
.heart { display: grid; place-items: center; color: #e0567f; font-size: 20px; padding: 0 2px; }
.votes { display: flex; align-items: center; gap: 10px; flex: 1; max-width: 220px; }
.votes b { font-variant-numeric: tabular-nums; font-size: 13px; white-space: nowrap; }
.bar { flex: 1; height: 6px; border-radius: 6px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--line); }
.bar i { display: block; height: 100%; background: var(--accent); }
dialog p.muted { white-space: pre-line; }
.bar i.w0 { width: 0%; }
.bar i.w5 { width: 5%; }
.bar i.w10 { width: 10%; }
.bar i.w15 { width: 15%; }
.bar i.w20 { width: 20%; }
.bar i.w25 { width: 25%; }
.bar i.w30 { width: 30%; }
.bar i.w35 { width: 35%; }
.bar i.w40 { width: 40%; }
.bar i.w45 { width: 45%; }
.bar i.w50 { width: 50%; }
.bar i.w55 { width: 55%; }
.bar i.w60 { width: 60%; }
.bar i.w65 { width: 65%; }
.bar i.w70 { width: 70%; }
.bar i.w75 { width: 75%; }
.bar i.w80 { width: 80%; }
.bar i.w85 { width: 85%; }
.bar i.w90 { width: 90%; }
.bar i.w95 { width: 95%; }
.bar i.w100 { width: 100%; }

@media (max-width: 860px) {
  #app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; padding: 10px; gap: 2px; }
  .nav-group { display: none; }
  .brand { width: 100%; padding: 4px 6px 8px; }
  .who { width: 100%; margin: 6px 0 0; }
  main { padding: 18px 16px 40px; }
}
