:root {
  --bg: #0f0f10; --panel: #17171a; --line: #2a2a2e; --ink: #ececf0; --mut: #8a8a92;
  --approve: #2ec28a; --reject: #ef4d5a; --star: #ffce4d; --accent: #2fd4c4;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; overscroll-behavior: none; }
body { overflow: hidden; }
.screen { position: fixed; inset: 0; display: flex; flex-direction: column; }
button { font-family: inherit; cursor: pointer; }
.primary { background: var(--accent); color: #06231f; border: none; border-radius: 12px;
  padding: 14px 20px; font-size: 16px; font-weight: 700; width: 100%; }
.primary:active { transform: scale(.98); }
.link { background: none; border: none; color: var(--accent); font-size: 14px; padding: 6px; }

/* ---------- Login ---------- */
#login { align-items: center; justify-content: center; padding: 24px; }
.login-card { width: 100%; max-width: 360px; text-align: center; }
.login-card h1 { font-size: 34px; margin: 0 0 4px; letter-spacing: -.5px; }
.login-card h1 span { color: var(--accent); }
.login-card .sub { color: var(--mut); margin: 0 0 24px; }
.tg-login { display: flex; justify-content: center; min-height: 48px; }
.tg-note { color: var(--mut); font-size: 12px; margin-top: 16px; }
.tg-note.error { color: var(--reject); }

/* ---------- Top bar ---------- */
.top { display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  padding-top: max(12px, env(safe-area-inset-top)); border-bottom: 1px solid var(--line); }
.top .who { font-weight: 700; font-size: 14px; }
.top .counter { color: var(--mut); font-size: 13px; margin-left: auto; }
.top .link { margin-left: 8px; }
#batch-filter { background: var(--panel); color: var(--ink); border: 1px solid var(--line);
  border-radius: 8px; padding: 6px 8px; font-size: 12px; max-width: 42vw; }

/* ---------- Deck ---------- */
.deck-wrap { flex: 1; position: relative; overflow: hidden; }
.deck { position: absolute; inset: 12px; }
.card { position: absolute; inset: 0; border-radius: 18px; overflow: hidden; background: #000;
  box-shadow: 0 10px 40px rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; }
.card:not(.top) { transform: scale(.94) translateY(10px); filter: brightness(.7); }
.card.top { z-index: 2; touch-action: none; }
.card img { width: 100%; height: 100%; object-fit: contain; user-select: none; pointer-events: none; }
.card-meta { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 14px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,.85)); font-size: 11px; color: #cfcfd6;
  font-family: ui-monospace, monospace; word-break: break-all; }
.stamp { position: absolute; top: 28px; padding: 6px 14px; border: 3px solid; border-radius: 8px;
  font-weight: 800; font-size: 26px; letter-spacing: 2px; opacity: 0; transform: rotate(-12deg); }
.stamp.approve { left: 20px; color: var(--approve); border-color: var(--approve); }
.stamp.reject { right: 20px; color: var(--reject); border-color: var(--reject); transform: rotate(12deg); }

.done { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 14px; text-align: center; padding: 24px; color: var(--mut); }
.done-emoji { font-size: 52px; margin: 0; }
.done .primary { max-width: 260px; }

/* ---------- Bottom bar ---------- */
.bar { padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 10px; }
.stars { display: flex; justify-content: center; gap: 6px; }
.star { background: none; border: none; font-size: 30px; line-height: 1; color: #3a3a40; padding: 2px 4px; }
.star.on { color: var(--star); }
.note { background: var(--panel); border: 1px solid var(--line); color: var(--ink);
  border-radius: 10px; padding: 11px 12px; font-size: 15px; }
.actions { display: flex; align-items: center; justify-content: center; gap: 22px; }
.circle { width: 60px; height: 60px; border-radius: 50%; border: 2px solid var(--line);
  background: var(--panel); font-size: 24px; display: flex; align-items: center; justify-content: center; }
.circle:active { transform: scale(.92); }
.circle.reject { color: var(--reject); border-color: var(--reject); }
.circle.approve { color: var(--approve); border-color: var(--approve); width: 66px; height: 66px; font-size: 28px; }
.circle.skip { color: var(--mut); width: 48px; height: 48px; font-size: 18px; }

/* ---------- Results ---------- */
.results-list { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.res-row { display: flex; gap: 12px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px; }
.res-row.both-approve { border-color: var(--approve); }
.res-row.both-reject { border-color: var(--reject); }
.res-row.split { border-color: var(--star); }
.res-thumb { width: 64px; height: 80px; flex: 0 0 64px; border-radius: 8px; overflow: hidden; background: #000; }
.res-thumb img { width: 100%; height: 100%; object-fit: cover; }
.res-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.res-consensus { font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; }
.res-consensus.both-approve { color: var(--approve); }
.res-consensus.both-reject { color: var(--reject); }
.res-consensus.split { color: var(--star); }
.res-verdict { display: flex; align-items: center; gap: 8px; font-size: 13px; flex-wrap: wrap; }
.res-verdict .u { color: var(--mut); min-width: 46px; }
.res-verdict .d.approve { color: var(--approve); font-weight: 700; }
.res-verdict .d.reject { color: var(--reject); font-weight: 700; }
.res-verdict .s { color: var(--star); }
.res-verdict .n { color: #c9c9d0; font-style: italic; }
.results-empty { color: var(--mut); text-align: center; margin-top: 40px; }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom));
  transform: translateX(-50%); background: #2a1416; color: #ffd9dc; border: 1px solid var(--reject);
  border-radius: 10px; padding: 10px 16px; font-size: 13px; z-index: 50; max-width: 90vw;
  box-shadow: 0 8px 30px rgba(0,0,0,.5); }
