:root {
  --bg: #ffffff;
  --card: #ffffff;
  --ink: #171717;
  --muted: #6b6b6b;
  --line: #e7e7e7;
  --red: #d4533a;
  --red-deep: #a33b26;
  --shadow: 0 10px 28px rgba(0, 0, 0, 0.05);
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  color: var(--ink);
  background: var(--bg);
  font-family: Pretendard, "Malgun Gothic", sans-serif;
  letter-spacing: -0.011em;
  line-height: 1.5;
}

button, input, textarea, select { font: inherit; color: inherit; }

button, a { -webkit-tap-highlight-color: transparent; }

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

html {
  scrollbar-width: thin;
  scrollbar-color: rgba(23, 23, 23, 0.32) transparent;
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(23, 23, 23, 0.32) transparent;
}

*::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background-color: rgba(23, 23, 23, 0.28);
  border: 3px solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
  background-color: rgba(212, 83, 58, 0.72);
}

*::-webkit-scrollbar-thumb:active {
  background-color: var(--red-deep);
}

*::-webkit-scrollbar-corner {
  background: transparent;
}

a { color: var(--red-deep); }

h1, h2, h3, p { margin: 0; }

h1 {
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.045em;
}

h2 { font-size: 22px; letter-spacing: -0.03em; }

h2 a, h3 a { color: inherit; text-decoration: none; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  width: min(1120px, calc(100% - 28px - env(safe-area-inset-left) - env(safe-area-inset-right)));
  margin: 0 auto;
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 8px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-family: "Black Han Sans", Pretendard, sans-serif;
  font-size: 30px;
  letter-spacing: -0.03em;
  line-height: 1;
  user-select: none;
  -webkit-user-select: none;
  caret-color: transparent;
}

.logo {
  display: block;
  height: 30px;
  aspect-ratio: 136 / 64;
}

.logo-mark {
  display: block;
  width: 22px;
  height: 22px;
  flex: none;
}

.modes {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  background: #f6f6f6;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.modes a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 800;
  font-size: 14px;
  line-height: 1;
  padding: 9px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.modes a[aria-current="page"] {
  background: var(--ink);
  color: #fff;
}

.nav { display: flex; gap: 2px; flex-wrap: nowrap; margin-left: auto; align-items: center; }

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
}

.nav a[aria-current="page"] {
  color: var(--ink);
  background: #f4f4f4;
}

.nav a.nav-add {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.nav a.nav-add:hover,
.nav a.nav-add[aria-current="page"] {
  border-color: var(--ink);
  background: #f4f4f4;
  color: var(--ink);
}

.nick {
  margin-left: 0;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nick.ghost { color: var(--muted); font-weight: 700; }

.admin-bar { min-height: 56px; }
.admin-bar strong { font-size: 18px; letter-spacing: -0.03em; }
.narrow { width: min(760px, 100%); margin: 0 auto; }

.main, .foot {
  width: min(1120px, calc(100% - 28px - env(safe-area-inset-left) - env(safe-area-inset-right)));
  margin: 0 auto;
}

.main { padding: 22px 0 36px; }

.main.has-ad > :first-child { min-width: 0; }

.ad-rail {
  display: grid;
  gap: 8px;
  align-content: start;
  min-width: 0;
  margin-top: 8px;
}

.ad-label {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.ad-rail .adsbygoogle { display: block; width: 100%; }

@media (min-width: 1280px) {
  body.has-ad .topbar-inner,
  .main.has-ad {
    width: min(1440px, calc(100% - 28px - env(safe-area-inset-left) - env(safe-area-inset-right)));
  }

  .main.has-ad {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    column-gap: 28px;
    align-items: start;
  }

  .main.has-ad .ad-rail {
    position: sticky;
    top: 84px;
    margin-top: 22px;
  }
}

.foot {
  color: var(--muted);
  font-size: 12px;
  padding-bottom: 28px;
}

.page-head { display: grid; gap: 8px; margin-bottom: 16px; }

.eyebrow {
  color: var(--red-deep);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.lede, .muted { color: var(--muted); }

.lede { max-width: 640px; }

.filters, .row, .actions, .meta, .chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.filters { margin: 8px 0 12px; }

.taste-nav.seg {
  display: flex;
  gap: 18px;
  margin: 0 0 12px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}
.taste-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  padding: 2px 0 7px;
  border-radius: 0;
}
.taste-nav a[aria-current="page"] {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--ink);
}

.browse {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
}
.browse .search-wrap {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  margin-left: 0;
}
.sort-menu { position: relative; flex: none; }
.sort-trigger {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 44px;
  padding: 0 10px 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.sort-trigger .icon { width: 16px; height: 16px; transition: transform 0.15s ease; }
.sort-menu.is-open .sort-trigger .icon { transform: rotate(180deg); }
.sort-pop {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 8;
  min-width: 132px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  display: grid;
}
.sort-pop[hidden] { display: none; }
.sort-pop button {
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 10px;
  padding: 8px 10px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}
.sort-pop button:hover { background: #f6f6f6; color: var(--ink); }
.sort-pop button[aria-pressed="true"],
.sort-pop button[aria-pressed="true"]:hover { background: var(--ink); color: #fff; }

.chip-rows {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 16px;
  margin: 0 0 4px;
}
.chips {
  display: flex;
  flex: none;
  max-width: 100%;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chips button {
  flex: none;
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 700;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}
.chips button:hover { color: var(--ink); }
.chips button[aria-pressed="true"],
.chips button[aria-pressed="true"]:hover { background: var(--ink); color: #fff; }

.seg {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  background: #f6f6f6;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.seg button {
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 7px 12px;
  font-weight: 700;
  cursor: pointer;
  color: var(--muted);
}

.seg button[aria-pressed="true"] {
  background: var(--ink);
  color: #fff;
}

.cats, .seg.cats { margin-bottom: 16px; }

.search, input, textarea, select {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 12px;
}

.search-wrap {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: min(220px, 100%);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  background: var(--card);
  color: var(--muted);
  -webkit-tap-highlight-color: transparent;
}

.search-wrap:focus-within {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(23, 23, 23, 0.08);
}

.search-wrap input {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 10px 0;
  min-width: 0;
  width: 100%;
  outline: none;
  box-shadow: none;
}

.search-wrap input:focus,
.search-wrap input:focus-visible {
  outline: none;
  box-shadow: none;
}

.icon { width: 22px; height: 22px; display: block; }

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  display: inline-grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
}

.icon-btn.solid { background: var(--ink); color: #fff; border-color: var(--ink); }
.icon-btn:disabled { opacity: 0.4; cursor: default; }

.seg.icon-seg button { width: 36px; height: 32px; padding: 0; display: inline-grid; place-items: center; }

.spinner {
  width: 26px;
  height: 26px;
  margin: 28px auto;
  border: 3px solid #eee;
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 22px;
  margin-top: 16px;
}

.card, .panel, .request-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.card { overflow: hidden; }

a.pair-card {
  color: inherit;
  text-decoration: none;
  display: grid;
  gap: 10px;
  padding: 12px;
}

a.pair-card .pair {
  gap: 10px;
  background: transparent;
}

a.pair-card .face {
  border-radius: 16px;
}

a.pair-card .split {
  border-radius: 999px;
}

.split {
  display: flex;
  height: 8px;
  background: #1d1a16;
}

.split i {
  display: block;
  height: 100%;
  background: #e07a55;
  min-width: 0;
}

.split i:last-child { flex: 1; background: #1d1a16; }

.pair, .hero-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.pair { height: 292px; gap: 3px; background: #f2f2f2; text-decoration: none; }

.card-body, .panel, .request-card { padding: 14px 16px 16px; }

.card h2 { margin: 8px 0 6px; font-size: 20px; }

.clamp {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--muted);
  min-height: 3em;
}

.meta { color: var(--muted); font-size: 13px; font-weight: 700; }

.stats { display: flex; flex-wrap: wrap; gap: 6px; }

.stat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  padding: 4px 10px 4px 8px;
  border-radius: 999px;
  background: #f4f4f4;
  color: var(--ink);
  line-height: 1;
}

.stat .icon { width: 15px; height: 15px; color: var(--muted); }

.stat-label, .stat-unit {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.stat b {
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.pill, .chip, .medal {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  padding: 3px 8px;
  background: #f3f3f3;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.pill.wait { background: #fff1d2; }
.pill.ok { background: #e4f6e8; color: #1f6b3a; }
.pill.no { background: #fde8e2; color: var(--red-deep); }
.medal { background: #f3f3f3; color: var(--ink); }

.btn {
  border: 1px solid transparent;
  background: var(--ink);
  color: #fff;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 800;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.btn.light {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn:disabled { opacity: 0.45; cursor: default; }

.actions { margin-top: 12px; }
.actions.center { justify-content: center; }

.face {
  position: relative;
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.face::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 28% 18%, rgba(255, 255, 255, 0.45), transparent 42%);
  pointer-events: none;
}

/* 둥근 사진 뒤에 진한 배경을 깔면 모서리 안티에일리어싱에 배경이 비쳐 테두리처럼 보입니다. */
.face.has-photo { background: transparent; }
.face.has-photo::after { display: none; }

.face img, .face video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.face-emoji, .face-name { position: relative; z-index: 1; }

.face-emoji {
  font-size: 64px;
  filter: drop-shadow(0 10px 0 rgba(255, 255, 255, 0.28));
}

.face-name {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.face.has-photo .face-name {
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 0;
  padding: 36px 12px 12px;
  background: linear-gradient(180deg, transparent, rgba(16, 12, 8, 0.82));
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.face.large { min-height: 280px; border-radius: 28px; }
.face.large .face-emoji { font-size: clamp(84px, 12vw, 148px); }
.face.large .face-name { font-size: 20px; }
.face.large.has-photo .face-name { padding: 56px 18px 16px; }

.face.tiny { width: 64px; height: 64px; border-radius: 14px; flex: none; }
.face.tiny .face-emoji { font-size: 26px; }
.face.tiny .face-name { display: none; }

.back {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--muted);
  font-weight: 800;
  text-decoration: none;
}

.hero-pair { gap: 10px; }
.hero-pair .face { min-height: 320px; }

.play-setup { margin: 16px 0; }

.candidate-wrap {
  display: flex;
  gap: 10px;
  overflow: auto;
  padding-bottom: 6px;
  margin-bottom: 22px;
}

.mini {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-width: 74px;
  font-size: 12px;
  font-weight: 800;
}

.duel {
  display: grid;
  grid-template-columns: 1fr 52px 1fr;
  gap: 12px 10px;
  align-items: start;
}

.duel-tools { grid-column: 1 / -1; grid-row: 1; display: flex; align-items: center; gap: 8px; }
.duel .split { grid-column: 1 / -1; grid-row: 3; border-radius: 999px; overflow: hidden; }
.duel .tally { grid-column: 1 / -1; grid-row: 3; }

.tally {
  display: grid;
  gap: 8px;
  padding: 2px 2px 0;
}

.tally-head {
  margin: 0;
  text-align: center;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.tally.tied .tally-head,
.tally.empty .tally-head { color: var(--muted); }

.tally-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.tally-side { flex: 1 1 0; min-width: 0; }
.tally-side.right { text-align: right; }

.tally-pct {
  display: block;
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.tally-side.lead .tally-pct,
.tally:not(.empty):not(.tied) .tally-head { color: var(--red-deep); }

.tally-votes, .tally-total {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.tally-total { padding-bottom: 4px; }

.tally-bar {
  display: flex;
  height: 16px;
  border-radius: 999px;
  overflow: hidden;
  background: #ececec;
}

.tally-bar i {
  display: block;
  height: 100%;
  min-width: 0;
}

.tally-bar i.l {
  background: var(--red);
  transition: width 280ms ease;
}

.tally-bar i.r { flex: 1; background: #171717; }
.tally.empty .tally-bar i { opacity: 0.28; }

.duel .pick { position: relative; }

.pick-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 3;
  display: grid;
  gap: 1px;
  min-width: 64px;
  padding: 8px 10px 7px;
  border-radius: 14px;
  background: rgba(23, 23, 23, 0.78);
  color: #fff;
  pointer-events: none;
}

.pick-badge b {
  font-size: 22px;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.pick-badge span { font-size: 11px; font-weight: 800; }
.pick-badge.off { display: none; }

.pick.leading .pick-badge { background: var(--red); }
.pick.leading .face { box-shadow: inset 0 0 0 4px var(--red); }

.duel .pick-l { grid-column: 1; grid-row: 2; }
.duel .vs { grid-column: 2; grid-row: 2; align-self: center; }
.duel .pick-r { grid-column: 3; grid-row: 2; }
.duel .opinions { grid-column: 1 / -1; grid-row: 4; }

.duel .pick .face { min-height: min(520px, 62vh); border-radius: 28px; }
.duel .vs { width: 48px; height: 48px; }

.request-pair { min-height: 180px; }
.request-pair img, .request-pair video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.request-pair span {
  display: grid;
  place-items: center;
  padding: 12px;
  font-weight: 800;
  background: #f6f6f6;
}
.request-head { display: grid; gap: 6px; }
.request-form textarea { min-height: 72px; }
.request-meta { display: grid; gap: 2px; padding: 12px 14px 14px; }
.request-meta strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.request-cover {
  height: 180px;
  background: #111;
}

.request-cover img,
.request-cover video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.request-thumbs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 10px;
  background: #f6f6f6;
}
.request-thumbs img, .request-thumbs video, .request-thumbs span {
  width: 72px;
  height: 96px;
  flex: none;
  object-fit: cover;
  border-radius: 12px;
  background: #fff;
}
.request-thumbs span {
  display: grid;
  place-items: center;
  padding: 6px;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}
.shot-card { position: relative; }
.shot-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.94);
}
.lineup.duel .shot { aspect-ratio: 3 / 4; }
.request-card { padding: 0; overflow: hidden; }
.request-card.wait { box-shadow: inset 0 0 0 3px #e3b341; }
.request-card.ok { box-shadow: inset 0 0 0 3px #2f9e62; }
.request-card.no { box-shadow: inset 0 0 0 3px #d4533a; }
.request-card .row { padding: 10px 12px 12px; }
.request-card input { flex: 1; min-width: 0; }
.board form > .icon-btn { justify-self: end; }

.drawer-close { position: absolute; top: 12px; right: 12px; z-index: 2; }

.opinions { display: grid; gap: 12px; margin-top: 12px; min-width: 0; }

.op-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.op-head h2 { margin: 0; font-size: 20px; letter-spacing: -0.03em; }
.op-total { color: var(--red-deep); }
.op-sort button { padding: 6px 12px; font-size: 13px; }

.op-tabs { display: none; }

.op-dot {
  width: 10px;
  height: 10px;
  flex: none;
  border-radius: 50%;
  background: var(--red);
}
.r .op-dot { background: var(--ink); }

.op-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }

.op-col {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 14px 16px 6px;
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 4px solid var(--red);
  border-radius: 20px;
}
.op-col.r { border-top-color: var(--ink); }

.op-col-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; min-width: 0; }
.op-col-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.op-col-head b { color: var(--muted); font-size: 14px; }

.op-form {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding: 6px 6px 6px 14px;
  background: #f6f6f6;
  border: 1px solid var(--line);
  border-radius: 22px;
  transition: border-color 150ms ease, background 150ms ease;
}
.op-form:focus-within { background: #fff; border-color: var(--ink); }
.op-form textarea {
  flex: 1;
  min-width: 0;
  min-height: 0;
  max-height: 160px;
  padding: 7px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  outline: none;
  resize: none;
  line-height: 1.45;
  word-break: keep-all;
}
.op-send {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  transition: opacity 150ms ease;
}
.op-send:disabled { opacity: 0.25; cursor: default; }
.op-send .icon { width: 18px; height: 18px; }
.op-form.small { margin-top: 8px; padding-left: 12px; border-radius: 18px; }
.op-form.small .op-send { width: 30px; height: 30px; }

.op-list { display: grid; }

.op-item { padding: 14px 0 12px; border-top: 1px solid var(--line); min-width: 0; }
.op-list > .op-item:first-child { border-top: 0; }
.op-meta { display: flex; align-items: baseline; gap: 6px; min-width: 0; font-size: 13px; }
.op-meta strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.op-meta span { flex: none; color: var(--muted); font-size: 12px; }
.op-body { margin: 4px 0 0; white-space: pre-wrap; word-break: keep-all; overflow-wrap: anywhere; line-height: 1.5; }

.op-actions { display: flex; align-items: center; gap: 4px; margin: 8px 0 0 -8px; }
.op-like, .op-reply {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.op-like .icon { width: 15px; height: 15px; }
.op-like path { fill: none; stroke: currentColor; stroke-width: 1.8; }
.op-like.on { color: var(--red); }
.op-like.on path { fill: currentColor; stroke: none; }
.op-reply[aria-expanded="true"] { color: var(--ink); }
.op-actions[hidden], .op-body[hidden] { display: none; }
.op-own { display: inline-flex; gap: 0; margin-left: auto; }
.op-own .op-reply { font-weight: 700; }
.op-reply.danger:hover { color: var(--red-deep); }
.op-edit .op-form.small { margin-top: 6px; }
.op-edit-tools { display: flex; justify-content: flex-end; margin: 4px -8px 0 0; }

.choice-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
  padding: 8px 8px 8px 14px;
  background: #f6f6f6;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
}
.choice-bar[hidden] { display: none; }
.choice-now { display: inline-flex; align-items: center; gap: 8px; min-width: 0; color: var(--muted); font-weight: 700; }
.choice-now b { display: inline-flex; align-items: center; gap: 4px; min-width: 0; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.choice-now .icon { width: 16px; height: 16px; flex: none; color: var(--red); }
.choice-swap {
  flex: none;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
@media (hover: hover) {
  .choice-swap:hover { border-color: var(--ink); }
}
@media (hover: hover) {
  .op-like:hover, .op-reply:hover { background: #f3f3f3; color: var(--ink); }
  .op-like.on:hover { color: var(--red-deep); }
}

.op-replies {
  display: grid;
  margin-top: 6px;
  padding-left: 12px;
  border-left: 2px solid var(--line);
}
.op-item.reply { padding: 8px 0 2px; border-top: 0; }
.op-item.reply .op-actions { margin-top: 2px; }

.op-empty {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 28px 8px 30px;
  text-align: center;
  font-size: 14px;
}
.op-empty span { color: var(--muted); font-size: 13px; }

.op-error { margin: 0; }
.op-error:empty { display: none; }

.nick-modal { display: grid; gap: 10px; }
.nick-modal h2 { margin: 0; font-size: 22px; }
.nick-lead { margin: 0; color: var(--muted); font-size: 14px; }
.nick-modal input { width: 100%; }

.round-modal {
  display: grid;
  gap: 12px;
  width: min(440px, 100%);
}

.round-modal h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.045em;
}

.round-modal .round-note { margin: 0; }

.round-drop { position: relative; }

.round-trigger {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
  cursor: pointer;
}

.round-trigger::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 160ms ease;
}

.round-drop.open .round-trigger {
  border-color: var(--ink);
}

.round-drop.open .round-trigger::after {
  transform: translateY(2px) rotate(225deg);
}

.round-trigger:focus,
.round-trigger:focus-visible,
.round-option:focus,
.round-option:focus-visible {
  outline: none;
}

.round-trigger:focus-visible {
  box-shadow: 0 0 0 3px rgba(23, 23, 23, 0.1);
}

.round-menu[hidden] { display: none !important; }

.round-menu {
  position: absolute;
  z-index: 2;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  display: grid;
  gap: 2px;
  max-height: min(280px, 42vh);
  margin: 0;
  padding: 6px;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(23, 23, 23, 0.14);
}

.round-drop.open { z-index: 3; }

.round-option {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-align: left;
  cursor: pointer;
}

.round-option .round-check {
  width: 18px;
  height: 18px;
  margin-left: auto;
  opacity: 0;
}

.round-option:hover,
.round-option:focus-visible {
  background: #f4f4f4;
}

.round-option.on {
  background: var(--ink);
  color: #fff;
}

.round-option.on .round-check { opacity: 1; }

.round-modal .btn { width: 100%; min-height: 44px; }

.versus.is-waiting { pointer-events: none; }

.login-card { width: min(380px, 100%); margin: 8vh auto 0; }
.login-card h1 { margin: 0; font-size: 28px; }
.login-head { display: grid; gap: 4px; margin-bottom: 6px; }
.login-head .muted { margin: 0; }
.login-card .btn { width: 100%; min-height: 46px; }
.login-card .form-error:empty { display: none; }
.admin-tools { align-items: center; }
.admin-list { margin-top: 4px; }
.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 0 12px 14px;
}
.admin-actions input { flex: 1 1 160px; min-width: 0; }
.admin-actions .btn { min-height: 42px; }

.admin-page { width: min(980px, 100%); margin: 0 auto; }
.admin-page h2 { margin: 0; font-size: 18px; letter-spacing: -0.03em; }
.admin-body { min-height: 180px; }
.admin-tools input[type="search"] { flex: 1; min-width: min(220px, 100%); }

.metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.metric {
  display: grid;
  gap: 2px;
  align-content: start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 16px;
}

.metric span, .metric small { color: var(--muted); font-size: 13px; font-weight: 700; }
.metric strong { font-size: 28px; letter-spacing: -0.045em; line-height: 1.15; }

.admin-split {
  display: grid;
  grid-template-columns: 1.25fr 0.85fr;
  gap: 12px;
  align-items: start;
}

.admin-panel {
  display: grid;
  gap: 12px;
  align-content: start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px;
}

.legend { display: flex; gap: 12px; color: var(--muted); font-size: 12px; font-weight: 800; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i, .metric-track i { display: block; }
.legend i { width: 10px; height: 10px; border-radius: 999px; }
.legend i.world, .metric-track i.world { background: var(--ink); }
.legend i.balance, .metric-track i.balance { background: #e07a55; }

.metric-bars { display: grid; gap: 8px; }
.metric-day {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 36px;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  font-weight: 800;
}
.metric-day span { color: var(--muted); }
.metric-track {
  display: flex;
  height: 10px;
  border-radius: 999px;
  background: #f3f3f3;
  overflow: hidden;
}
.metric-track i { height: 100%; }

.admin-rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.admin-rank li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  grid-template-areas: "no title count" "no kind count";
  gap: 0 8px;
  align-items: center;
}
.admin-rank .rank-no { grid-area: no; }
.admin-rank a {
  grid-area: title;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-rank .muted { grid-area: kind; font-size: 12px; }
.admin-rank b { grid-area: count; }

.admin-game {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
}
.admin-game-main { display: grid; gap: 2px; min-width: 0; }
.admin-game-main strong, .admin-game-main a {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-game-main a { color: var(--ink); text-decoration: none; }
.admin-game-main p { margin: 0; }
.admin-game .actions { margin: 0; flex-wrap: nowrap; }

.piku-form { gap: 8px; }
.piku-form input { flex: 1 1 200px; min-width: 0; }
.piku-form select:disabled { opacity: 0.45; }
.piku-hint { font-size: 12px; }
.piku-status:empty, .admin-panel .form-error:empty { display: none; }
.piku-status, .admin-panel .form-error { margin: 0; font-size: 13px; }
.piku-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.piku-split { grid-template-columns: 1fr 1fr; }
.piku-bar { grid-template-columns: 96px minmax(0, 1fr) 36px; }
.piku-bar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.piku-table-wrap { overflow-x: auto; }
.piku-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.piku-table th, .piku-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}
.piku-table th { color: var(--muted); font-size: 12px; font-weight: 800; }
.piku-table .piku-name { font-weight: 800; white-space: normal; min-width: 120px; }
.piku-table .piku-name a { color: var(--ink); }
.piku-ratio { min-width: 120px; }
.piku-ratio .metric-track { margin-top: 4px; height: 6px; }
.piku-spark { width: 120px; height: 32px; display: block; }
.piku-spark polyline { fill: none; stroke: #5b8def; stroke-width: 2; }
.piku-spark circle { fill: var(--red); }
.piku-up { color: #1d8a4b; font-weight: 800; }
.piku-down { color: var(--red-deep); font-weight: 800; }

.sides {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}

.side {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 14px 16px 8px;
  min-width: 0;
}

.side-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.side-head strong { display: block; }
.side-head .muted { display: block; font-size: 13px; }

.lineup.duel { grid-template-columns: 1fr 1fr; }
.section-title { margin: 22px 0 10px; }

.stack, .field { display: grid; gap: 8px; }

.field span { font-size: 13px; font-weight: 800; }
.field input, .field textarea, .field select { width: 100%; }

textarea { resize: vertical; width: 100%; }

.rank-list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }

.rank-row {
  display: grid;
  grid-template-columns: 36px 64px 1fr;
  gap: 12px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 10px 12px;
}

.rank-no { font-size: 20px; font-weight: 800; text-align: center; }

.rank-main { display: grid; gap: 4px; }

.bar {
  height: 8px;
  background: #f3f3f3;
  border-radius: 999px;
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #e07a55, #1d1a16);
  border-radius: inherit;
}

.photo-chip img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: cover;
}

.board { width: min(960px, 100%); min-width: 0; max-width: 100%; }
.request-form { width: 100%; min-width: 0; }
.request-form input,
.request-form textarea,
.request-form select,
.request-form .seg.cats,
.request-form .lineup { width: 100%; max-width: 100%; min-width: 0; }

.request-form select:invalid { color: var(--muted); }
.request-form select option { color: var(--ink); }

.shot.has-photo .shot-hint {
  position: absolute;
  left: 8px;
  bottom: 8px;
}

.lineup {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 14px;
  min-width: 0;
}

.shot-card { display: grid; gap: 8px; min-width: 0; }

.shot {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: auto;
  aspect-ratio: 1;
  align-self: start;
  border-radius: 18px;
  border: 1px dashed #d9d9d9;
  background: #fafafa;
  overflow: hidden;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.shot.has-photo { border: none; }

.shot img, .shot video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.shot-hint {
  position: relative;
  z-index: 1;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
}

.shot input { display: none; }

.text-link {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.text-link:disabled { opacity: 0.4; cursor: default; }

.mini-row { display: flex; gap: 6px; }
.mini-row img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 10px;
}

.cand-row {
  display: grid;
  grid-template-columns: 76px 1fr auto;
  gap: 8px;
}

.row.spread { justify-content: space-between; }

.banner {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
}

.banner.error { background: #fde8e2; border-color: #f0b2a4; }
.banner.ok { background: #e8f6ec; border-color: #b7e0c4; }

.form-error {
  color: var(--red-deep);
  min-height: 1.2em;
  font-size: 13px;
  font-weight: 700;
}

.request-note { margin: 0; font-size: 13px; }

.empty { padding: 42px 8px; text-align: center; color: var(--muted); }

.modal-back, .drawer-back {
  position: fixed;
  inset: 0;
  background: rgba(29, 26, 22, 0.46);
  z-index: 30;
}

.modal-back { display: grid; place-items: center; padding: 18px; }

.drawer-back { border: 0; cursor: pointer; }

.modal {
  width: min(440px, 100%);
  background: var(--card);
  border-radius: 24px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 31;
  width: min(420px, 100%);
  height: 100%;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  box-shadow: -16px 0 40px rgba(0, 0, 0, 0.08);
}

.drawer-top, .chat-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px;
}

.drawer-host { flex: 1; min-height: 0; }

.chat-page {
  height: calc(100dvh - 180px);
  min-height: 460px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-host, .drawer .chat { height: 100%; }

.chat {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
}

.drawer .chat { border: 0; border-radius: 0; }

.chat-status { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 700; }

.live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d0d0d0;
}

.live.on { background: #2f9e62; }

.online {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  padding: 0 12px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.person {
  background: var(--bg);
  color: var(--ink);
  border-radius: 999px;
  padding: 3px 8px;
}

.log {
  flex: 1;
  overflow: auto;
  padding: 8px 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fff;
}

.pad { padding: 18px 6px; }

.bubble {
  max-width: min(460px, 86%);
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px 16px 16px 6px;
  padding: 8px 12px;
}

.bubble p { white-space: pre-wrap; }

.bubble.mine {
  margin-left: auto;
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
  border-radius: 16px 16px 6px 16px;
}

.who { font-size: 12px; font-weight: 800; margin-bottom: 3px; color: var(--muted); }
.bubble.mine .who { color: #f0c7bc; }

.chat-form {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line);
}

.chat-form input { flex: 1; }

body.is-play .foot { display: none; }
body.is-play .main { width: min(1180px, calc(100% - 16px)); padding-top: 10px; }

.play-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
}

.play-head .back { margin: 0; }
.play-head strong { display: block; }
.play-head span { color: var(--muted); font-size: 13px; font-weight: 700; }

.round-status {
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 2px 0 8px;
}

.round-status strong {
  font-size: clamp(26px, 4vw, 36px);
  letter-spacing: -0.045em;
  line-height: 1;
}

.round-status span {
  color: var(--ink);
  font-size: clamp(16px, 2.2vw, 20px);
  font-weight: 800;
}

.round-status b {
  color: var(--red);
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: -0.04em;
  line-height: 1;
}

.progress {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
}

.progress i {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: #ececec;
}

.progress i.done { background: var(--ink); }
.progress i.now { background: var(--red); }

.versus {
  display: grid;
  grid-template-columns: 1fr 72px 1fr;
  gap: 12px;
  min-height: calc(100dvh - 230px);
}

.pick {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 28px;
  transition: transform 160ms ease, opacity 160ms ease;
}

.pick .face { height: 100%; }

.versus .face:has(.face-media),
.winner .face:has(.face-media) {
  container-type: size;
  display: flex;
  align-items: center;
}

.versus .pick:first-child .face:has(.face-media) { justify-content: flex-end; }
.versus .pick:last-child .face:has(.face-media) { justify-content: flex-start; }
.winner .face:has(.face-media) { justify-content: center; }

.face-media {
  position: relative;
  flex: none;
  border-radius: inherit;
  overflow: hidden;
  --ratio: 0.75;
  width: min(100cqw, calc(100cqh * var(--ratio)));
  height: min(100cqh, calc(100cqw / var(--ratio)));
}

.face-media:not(.is-ready) {
  visibility: hidden;
}

.versus .face-media img,
.versus .face-media video,
.winner .face-media img,
.winner .face-media video {
  object-fit: contain;
  object-position: center;
}

body.is-play .versus .face.large.has-photo .face-media .face-name,
body.is-world-play .versus .face.large.has-photo .face-media .face-name,
.winner .face.large.has-photo .face-media .face-name {
  left: 0;
  right: 0;
  top: auto;
  bottom: 0;
  width: auto;
  transform: none;
  text-align: center;
}

.pick:hover { transform: translateY(-3px); }
.pick.flash { transform: scale(1.015); }
.pick.flash .face, .pick.chosen .face { box-shadow: inset 0 0 0 5px rgba(29, 26, 22, 0.85); }
.pick.dim { opacity: 0.42; }
.pick:disabled { cursor: default; }
.pick:disabled:hover, .pick.chosen:hover { transform: none; }
.choice-mark {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #1d1a16;
  color: #fff;
  display: grid;
  place-items: center;
}

.vs {
  align-self: center;
  justify-self: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.key-hint { text-align: center; color: var(--muted); font-size: 13px; margin-top: 8px; }

.winner {
  min-height: calc(100dvh - 180px);
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 12px;
  text-align: center;
}

.winner .face { width: min(460px, 88vw); }

.stamp {
  display: inline-block;
  border: 3px solid var(--red);
  color: var(--red);
  font-weight: 800;
  letter-spacing: 0.18em;
  padding: 2px 10px;
  border-radius: 8px;
  transform: rotate(-8deg);
}

.round-banner {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 25;
}

.round-banner span {
  display: grid;
  justify-items: center;
  gap: 6px;
  max-width: min(420px, calc(100% - 32px));
  background: var(--ink);
  color: #fff;
  border-radius: 22px;
  padding: 16px 22px;
  text-align: center;
  animation: pop 680ms ease;
}

.round-banner b { font-size: 28px; font-weight: 800; }

.round-banner small {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  opacity: 0.88;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  display: grid;
  justify-items: center;
  gap: 2px;
  width: max-content;
  max-width: min(420px, calc(100% - 32px));
  transform: translateX(-50%) translateY(12px);
  background: var(--ink);
  color: #fff;
  padding: 12px 16px;
  border-radius: 18px;
  opacity: 0;
  pointer-events: none;
  transition: 180ms ease;
  z-index: 40;
  text-align: center;
}

.toast strong { font-weight: 800; }
.toast span { font-size: 13px; font-weight: 500; line-height: 1.4; opacity: 0.9; }

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@keyframes pop {
  from { transform: scale(0.86); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.world-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
}

.world-card h2,
.world-card .clamp,
.world-card .stats,
.world-card .actions {
  padding-left: 4px;
  padding-right: 4px;
}

.world-card h2 { margin: 0; font-size: 18px; }
.world-card .clamp { min-height: 0; margin: 0; }
.world-card .clamp:empty { display: none; }
.world-card .pair {
  height: 220px;
  gap: 10px;
  background: transparent;
}
.world-card .cover {
  display: block;
  height: 220px;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
}
.world-card .cover .face { height: 100%; border-radius: 16px; }
.world-card .face { border-radius: 16px; }
.world-card .actions { margin-top: 0; padding-bottom: 2px; }

.setup { display: grid; gap: 12px; align-content: start; }
.field-label { margin: 4px 0 0; font-weight: 800; }
.round-note { margin: 0; color: var(--muted); font-weight: 700; }
.rank-title { font-size: 22px; }

.rank-page { gap: 18px; width: 100%; min-width: 0; }
.rank-page [hidden] { display: none !important; }

.rank-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rank-heading { min-width: 0; flex: 1; display: grid; gap: 2px; }

.rank-page .rank-title {
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -0.04em;
}

.rank-heading .muted { font-size: 13px; font-weight: 700; }

.podium {
  list-style: none;
  width: min(560px, 100%);
  min-width: 0;
  margin: 0 auto;
  padding: 22px 16px 14px;
  display: grid;
  grid-template-columns: 1fr 1.12fr 1fr;
  align-items: end;
  gap: 10px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(228, 193, 90, 0.2), transparent 58%),
    linear-gradient(180deg, #fbf8f4 0%, #fff 72%);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.podium.count-1 {
  grid-template-columns: minmax(0, 200px);
  justify-content: center;
}

.podium.count-2 {
  grid-template-columns: 1fr 1.12fr;
  width: min(400px, 100%);
}

.podium-slot {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  animation: podium-in 420ms ease both;
}

.podium .place-2 { order: 1; animation-delay: 40ms; }
.podium .place-1 { order: 2; animation-delay: 120ms; }
.podium .place-3 { order: 3; animation-delay: 180ms; }

.podium-person {
  display: grid;
  justify-items: center;
  gap: 3px;
  width: 100%;
  min-width: 0;
  text-align: center;
}

.podium-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 0 0 2px #dedede;
}

.podium-photo .face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: inherit;
}

.podium-photo .face-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.podium-photo .face img,
.podium-photo .face video,
.podium-photo .face-media img,
.podium-photo .face-media video {
  object-fit: cover;
}

.place-1 .podium-photo {
  aspect-ratio: 3 / 3.7;
  border-radius: 20px;
  box-shadow: 0 0 0 2px #e4c15a, 0 16px 28px rgba(180, 140, 40, 0.18);
}

.place-3 .podium-photo { box-shadow: 0 0 0 2px #e3c3ae; }

.podium-name {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 2.5em;
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.25;
  overflow: hidden;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.place-1 .podium-name { font-size: 15px; }

.podium-rate,
.podium-win {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  line-height: 1.2;
}

.podium-rate { font-size: 13px; }
.podium-win { font-size: 12px; color: var(--muted); }

.podium-step {
  display: grid;
  place-items: center;
  border-radius: 14px 14px 6px 6px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.podium-step b {
  font-size: 26px;
  line-height: 1;
  letter-spacing: -0.05em;
}

.place-1 .podium-step {
  height: 92px;
  background: linear-gradient(180deg, #f8e7a8 0%, #e4c15a 100%);
  color: #6a5314;
}

.place-1 .podium-step b { font-size: 34px; }

.place-2 .podium-step {
  height: 64px;
  background: linear-gradient(180deg, #f6f6f6 0%, #d5d5d5 100%);
  color: #555;
}

.place-3 .podium-step {
  height: 46px;
  background: linear-gradient(180deg, #f6e4d6 0%, #d9aa8c 100%);
  color: #6d4330;
}

.rank-board { display: grid; gap: 8px; min-width: 0; }

.rank-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
}

.rank-caption {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.rank-page .rank-search {
  margin-left: auto;
  flex: 1;
  max-width: 280px;
}

.rank-head,
.rank-page .rank-row {
  display: grid;
  grid-template-columns: 36px 48px minmax(0, 1fr) 58px 58px;
  column-gap: 10px;
  align-items: center;
}

.rank-head {
  padding: 10px 14px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.rank-head span:nth-child(4),
.rank-head span:nth-child(5) { text-align: right; }

.rank-table {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.rank-page .rank-list {
  margin: 0;
  gap: 0;
}

.rank-page .rank-row {
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 8px 14px;
}

.rank-page .rank-row:last-child { border-bottom: 0; }
.rank-page .rank-row:hover { background: #fafafa; }

.rank-page .rank-no {
  font-size: 14px;
  color: var(--muted);
}

.rank-page .rank-no.top { color: var(--ink); }

.rank-page .face.tiny {
  width: 48px;
  height: 48px;
  border-radius: 12px;
}

.rank-page .rank-name {
  min-width: 0;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-page .rank-stat {
  text-align: right;
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.rank-page .rank-stat.hot { color: var(--red-deep); }
.rank-page .rank-stat.is-zero { color: #b0b0b0; font-weight: 700; }

.rank-page .rank-empty { padding: 28px 8px; }

@keyframes podium-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .podium-slot { animation: none; }
}

@media (max-width: 720px) {
  h1 { font-size: 28px; }
  .topbar { padding-top: env(safe-area-inset-top); }
  .topbar-inner {
    min-height: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    grid-template-areas:
      "brand nav stream nick"
      "modes modes modes modes";
    gap: 8px;
    padding: 8px 0;
  }
  .stream-btn { grid-area: stream; }
  body.is-game .modes { display: none; }
  body.is-game .topbar-inner {
    grid-template-areas: "brand nav stream nick";
    min-height: 48px;
    padding-top: 6px;
    padding-bottom: 6px;
  }
  body.is-game .main { padding-top: 10px; }
  .topbar-inner.admin-bar {
    display: flex;
    align-items: center;
    min-height: 52px;
  }
  .brand { grid-area: brand; }
  .logo { height: 26px; }
  .modes { grid-area: modes; width: auto; min-width: 0; order: unset; }
  .modes a {
    flex: 1;
    min-width: 0;
    text-align: center;
    padding: 10px 4px;
    font-size: 13px;
  }
  .nav { grid-area: nav; margin-left: 0; justify-content: flex-end; }
  .nick {
    grid-area: nick;
    max-width: 28vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .main { padding-top: 14px; padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
  .filters { gap: 8px; }
  .search, .search-wrap { margin-left: 0; width: 100%; flex-basis: 100%; }
  .seg.cats, .filters .seg {
    flex-wrap: nowrap;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .seg.cats::-webkit-scrollbar, .filters .seg::-webkit-scrollbar { display: none; }
  .seg button { flex: none; min-height: 36px; }
  .grid { grid-template-columns: 1fr; gap: 16px; }
  .mini-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 0; }
  .pair, .world-card .pair, .world-card .cover { height: 200px; }
  .world-card .actions {
    display: grid;
    grid-template-columns: 1.15fr 1.15fr 0.7fr;
    gap: 8px;
  }
  .world-card .actions.duo {
    grid-template-columns: 1fr 0.7fr;
  }
  .world-card .actions.quad {
    grid-template-columns: 1.3fr 1fr 1fr 1fr;
    gap: 6px;
  }
  .world-card .btn { min-height: 42px; padding: 10px 6px; font-size: 13px; }
  .setup .actions, .winner .actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .setup .actions .btn:first-child, .winner .actions .btn:first-child { grid-column: 1 / -1; }
  .duel-tools { width: 100%; min-width: 0; }
  .rank-title { flex: 1; min-width: 0; font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .rank-page .rank-title {
    font-size: 20px;
    overflow: visible;
    text-overflow: unset;
    white-space: normal;
  }
  .rank-row { grid-template-columns: 28px 52px minmax(0, 1fr); gap: 8px; }
  .podium { padding: 16px 10px 12px; gap: 6px; border-radius: 22px; }
  .podium-photo,
  .place-1 .podium-photo { aspect-ratio: 1; border-radius: 14px; }
  .podium-name { margin-top: 4px; font-size: 12px; }
  .place-1 .podium-name { font-size: 13px; }
  .podium-rate { font-size: 11px; }
  .podium-win { font-size: 11px; }
  .place-1 .podium-step { height: 68px; }
  .place-2 .podium-step { height: 48px; }
  .place-3 .podium-step { height: 34px; }
  .podium-step b { font-size: 20px; }
  .place-1 .podium-step b { font-size: 26px; }
  .rank-tools { flex-wrap: wrap; }
  .rank-page .rank-search { max-width: none; flex-basis: 100%; margin-left: 0; }
  .rank-head,
  .rank-page .rank-row {
    grid-template-columns: 28px 44px minmax(0, 1fr) 48px 48px;
    column-gap: 8px;
  }
  .rank-page .face.tiny { width: 44px; height: 44px; }
  .rank-page .rank-name { font-size: 14px; }
  .rank-page .rank-stat { font-size: 13px; }
  .face.tiny { width: 52px; height: 52px; }
  .duel {
    grid-template-columns: minmax(0, 1fr) 36px minmax(0, 1fr);
    gap: 8px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
  .duel > * { order: unset; }
  .duel-tools { grid-column: 1 / -1; grid-row: 1; flex-wrap: nowrap; overflow-x: auto; }
  .duel .pick-l { grid-column: 1; grid-row: 2; }
  .duel .vs { grid-column: 2; grid-row: 2; width: 36px; height: 36px; font-size: 12px; justify-self: center; }
  .duel .pick-r { grid-column: 3; grid-row: 2; }
  .duel .split, .duel .tally { grid-column: 1 / -1; grid-row: 3; }
  .tally-pct { font-size: 28px; }
  .tally-head { font-size: 14px; }
  .pick-badge { top: 8px; left: 8px; min-width: 0; padding: 6px 8px; border-radius: 12px; }
  .pick-badge b { font-size: 16px; }
  .duel .opinions { grid-column: 1 / -1; grid-row: 4; margin-top: 8px; }
  .duel .pick { min-width: 0; }
  .duel .pick .face { min-height: 52vw; border-radius: 18px; }
  .duel .face.large .face-name, .duel .face.large.has-photo .face-name { font-size: 14px; padding: 24px 8px 8px; }
  .op-head h2 { font-size: 18px; }
  .op-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 4px;
    background: #f3f3f3;
    border-radius: 16px;
  }
  .op-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 0;
    min-height: 44px;
    padding: 0 10px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--muted);
    font-weight: 800;
    cursor: pointer;
  }
  .op-tab-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .op-tab b { flex: none; font-size: 13px; opacity: 0.7; }
  .op-tab .op-dot { opacity: 0.45; }
  .op-tab[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08); }
  .op-tab[aria-selected="true"] .op-dot { opacity: 1; }
  .op-cols { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .op-col { display: none; padding: 0; border: 0; border-radius: 0; background: transparent; }
  .op-col.active { display: grid; }
  .op-col-head { display: none; }
  .op-form textarea { font-size: 16px; }
  .hero-pair, .sides { grid-template-columns: 1fr; }
  .lineup { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .lineup.duel .shot { aspect-ratio: 1; }
  .request-form h1 { font-size: 24px; }
  .request-form .lede { font-size: 14px; }
  .request-form .seg.cats {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .request-form .seg.cats::-webkit-scrollbar { display: none; }
  .request-form .seg.cats button { flex: none; min-height: 40px; }
  .shot-card input { width: 100%; min-width: 0; }
  .shot-remove { width: 36px; height: 36px; }
  .request-form .btn { width: 100%; min-height: 46px; }
  .request-form .drop-actions .btn { width: auto; min-height: 40px; }
  .request-form .btn[type="submit"] {
    position: sticky;
    bottom: calc(8px + env(safe-area-inset-bottom));
    z-index: 5;
    box-shadow: 0 8px 18px rgba(23, 23, 23, 0.16);
  }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .admin-split, .piku-split { grid-template-columns: 1fr; }
  .admin-game { grid-template-columns: 1fr; }
  .admin-game .actions { width: 100%; }  .admin-game .actions .btn { flex: 1; }
  .chat-page { height: calc(100dvh - 220px - env(safe-area-inset-top)); min-height: 320px; }
  .toast { bottom: calc(16px + env(safe-area-inset-bottom)); max-width: calc(100% - 32px); text-align: center; }
  input, textarea, select { font-size: 16px; }

  .play-head { grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; }
  .play-head div { min-width: 0; }
  .play-head strong, .play-head span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  body.is-play #app, body.is-play .shell { height: 100dvh; }
  body.is-play .shell { display: flex; flex-direction: column; min-height: 0; }
  body.is-play .topbar-inner {
    grid-template-areas: "brand nav stream nick";
    min-height: 48px;
    padding-top: 6px;
    padding-bottom: 6px;
  }
  body.is-play .modes, body.is-play .key-hint { display: none; }
  body.is-play .main {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: calc(100% - 12px - env(safe-area-inset-left) - env(safe-area-inset-right));
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
    min-height: 0;
    overflow: auto;
  }
  body.is-play .arena, body.is-play .stage {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  body.is-play .versus {
    flex: 1;
    min-height: 0;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: minmax(0, 1fr);
    gap: 8px;
  }
  body.is-play .versus .vs { display: none; }
  body.is-play .versus .pick { min-width: 0; min-height: 0; height: 100%; }
  body.is-play .versus .face.large {
    min-height: 0;
    height: 100%;
    border-radius: 18px;
  }
  body.is-play .versus .face.large .face-name,
  body.is-play .versus .face.large.has-photo .face-name { font-size: 15px; padding: 28px 8px 10px; }
  body.is-play .play-head { margin-bottom: 6px; }
  body.is-play .progress { margin-bottom: 8px; }
  body.is-play .winner { min-height: auto; padding: 8px 0 12px; }
  body.is-play .winner .face.large { width: min(100%, 420px); min-height: 220px; height: auto; }
  body.is-play .arena:has(.winner),
  body.is-play .stage:has(.winner) { flex: none; display: block; min-height: auto; }
}

@media (max-height: 500px) and (orientation: landscape) {
  body.is-play .key-hint { display: none; }
  body.is-play .versus { min-height: 0; }
  .duel .pick .face { min-height: 34vh; }
}

@media (hover: none) {
  .pick:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

body.is-world-play {
  overflow: hidden;
}

body.is-world-play .topbar { display: none; }

body.is-world-play #app,
body.is-world-play .shell {
  height: 100dvh;
  min-height: 100dvh;
}

body.is-world-play .shell {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

body.is-world-play .main {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: calc(100% - 12px - env(safe-area-inset-left) - env(safe-area-inset-right));
  max-width: none;
  min-height: 0;
  margin: 0 auto;
  padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
  overflow: hidden;
}

body.is-world-play .arena,
body.is-world-play .stage {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

body.is-world-play .play-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
}

body.is-world-play .play-title {
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  letter-spacing: -0.03em;
}

body.is-world-play .versus {
  flex: 1;
  min-height: 0;
  height: auto;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 8px;
}

body.is-world-play .versus .pick {
  min-width: 0;
  min-height: 0;
  height: 100%;
}

body.is-world-play .versus .face.large {
  min-height: 0;
  height: 100%;
  border-radius: 18px;
}

body.is-world-play .versus.is-behind {
  position: absolute;
  inset: 0;
  z-index: 0;
}

body.is-world-play .versus.is-front {
  position: relative;
  z-index: 1;
  pointer-events: none;
  animation: choice-fade 480ms ease forwards;
}

body.is-world-play .versus.is-front .pick.is-out {
  opacity: 0;
  transition: opacity 320ms ease;
}

body.is-world-play .versus.is-front .pick:hover { transform: none; }

body.is-world-play .versus.is-front .face::after,
body.is-world-play .versus.is-front .face-media::after {
  display: none;
}

body.is-world-play .pick {
  appearance: none;
  -webkit-appearance: none;
}

body.is-world-play .pick:focus,
body.is-world-play .pick:focus-visible,
body.is-world-play .pick:active,
body.is-world-play .pick.flash .face,
body.is-world-play .pick.chosen .face {
  outline: none;
  box-shadow: none;
}

body.is-world-play .is-zooming {
  position: fixed;
  z-index: 30;
  margin: 0;
  pointer-events: none;
  overflow: hidden;
  background: #fff;
  outline: none;
  box-shadow: none;
  transform-origin: center center;
  transition: transform 480ms cubic-bezier(.22, .82, .24, 1);
}

body.is-world-play .is-zooming img,
body.is-world-play .is-zooming video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: transparent;
  transform: scale(1.02);
}

body.is-world-play .is-zooming.face-media .face-name {
  left: 50%;
  top: 50%;
  right: auto;
  bottom: auto;
  width: max-content;
  max-width: calc(100% - 16px);
  transform: translate(-50%, -50%);
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(16, 12, 8, 0.72);
  color: #fff;
  font-size: 20px;
  text-align: center;
  text-shadow: none;
}

@keyframes choice-fade {
  0%, 42% { opacity: 1; }
  100% { opacity: 0; }
}

body.is-world-play .arena:has(.winner),
body.is-world-play .stage:has(.winner) {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: auto;
}

body.is-world-play .winner {
  flex: 1;
  width: 100%;
  min-height: 100%;
  box-sizing: border-box;
  padding: 8px 12px 12px;
}

body.is-world-play .winner .face.large:has(.face-media) {
  container-type: normal;
  width: max-content;
  max-width: 100%;
  height: auto;
  min-height: 0;
}

body.is-world-play .winner .face-media {
  --win-h: max(240px, min(78dvh, calc(100dvh - 250px), 900px));
  --win-w: min(92vw, 920px);
  width: min(var(--win-w), calc(var(--win-h) * var(--ratio)));
  height: min(var(--win-h), calc(var(--win-w) / var(--ratio)));
}

body.is-world-play .main:has(.winner) { overflow: auto; }

@media (max-width: 720px), (orientation: landscape) and (max-height: 500px) {
  body.is-world-play .main {
    width: 100%;
    padding-left: 0;
    padding-right: 0;
  }

  body.is-world-play .play-head,
  body.is-world-play .round-status,
  body.is-world-play .progress {
    margin-left: max(10px, env(safe-area-inset-left));
    margin-right: max(10px, env(safe-area-inset-right));
  }

  body.is-world-play .versus {
    gap: 0;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }

  body.is-world-play .versus .pick,
  body.is-world-play .versus .face.large {
    border-radius: 0;
  }

  body.is-world-play .versus .pick {
    transition: transform 160ms ease;
  }

  body.is-world-play .versus .pick.dim {
    opacity: 1;
  }

  body.is-world-play .versus .pick .face::after {
    display: block;
    background: rgba(22, 19, 16, 0.55);
    opacity: 0;
    z-index: 2;
    transition: opacity 140ms ease;
  }

  body.is-world-play .versus .pick.dim .face::after {
    opacity: 1;
  }

  body.is-world-play .versus .pick .face:has(.face-media)::after { display: none; }

  body.is-world-play .versus .pick .face-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(22, 19, 16, 0.55);
    opacity: 0;
    z-index: 2;
    pointer-events: none;
    transition: opacity 140ms ease;
  }

  body.is-world-play .versus .pick.dim .face-media::after { opacity: 1; }

  body.is-world-play .versus .pick:first-child .face:has(.face-media) {
    justify-content: flex-end;
  }

  body.is-world-play .versus .pick:last-child .face:has(.face-media) {
    justify-content: flex-start;
  }
}

.game-art {
  display: grid;
  height: 180px;
  border-radius: 16px;
  background: #f6f4f1;
  overflow: hidden;
}

.game-art svg { width: 100%; height: 100%; min-width: 0; max-width: 100%; }

a.mini-card .game-art { min-width: 0; }

.mini-page,
.mini-grid { min-width: 0; }

.mini-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }

a.mini-card {
  color: inherit;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

a.mini-card:focus-visible { outline-offset: -4px; }

a.mini-card:hover {
  border-color: #d4d4d4;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.07);
}

a.mini-card:hover .mini-start { background: #000; }

a.mini-card:hover .game-art { background: #f1eeea; }

.mini-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  padding: 0 2px;
}

a.mini-card h2 {
  margin: 0;
  min-width: 0;
  font-size: 18px;
  letter-spacing: -0.03em;
}

a.mini-card .clamp {
  min-height: 3em;
  margin: 0;
  padding: 0 2px;
}

.mini-foot {
  display: grid;
  gap: 8px;
  margin-top: auto;
}

.mini-record {
  min-width: 0;
  padding: 0 2px;
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

a.mini-card .mini-start {
  display: flex;
  width: 100%;
  min-height: 46px;
}

@media (max-width: 720px) {
  a.mini-card { gap: 8px; padding: 8px 8px 10px; border-radius: 18px; }
  a.mini-card .game-art { height: auto; aspect-ratio: 326 / 200; border-radius: 12px; }
  .mini-head { flex-direction: column; align-items: flex-start; gap: 6px; }
  a.mini-card h2 { font-size: 16px; }
  .mini-head .stat { min-height: 26px; padding: 3px 8px 3px 6px; }
  .mini-head .stat .icon { width: 13px; height: 13px; }
  .mini-head .stat b { font-size: 13px; }
  a.mini-card .clamp, a.mini-card .mini-start { display: none; }
  .mini-foot:not(:has(.mini-record)) { display: none; }
  .mini-record { font-size: 12px; }
}

.ladder-page { display: grid; gap: 12px; align-content: start; }
.ladder-page .play-head { margin: 0; }
.ladder-page .play-head strong { font-size: 22px; letter-spacing: -0.03em; }
.ladder-page .round-note { margin: 0; }

.ladder-step {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f6f6f6;
}

.ladder-step button {
  width: 36px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-weight: 800;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.ladder-step button:disabled { opacity: 0.35; cursor: default; }

.ladder-step b {
  min-width: 42px;
  text-align: center;
  font-size: 14px;
}

.ladder-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.ladder-tools .actions { margin: 0 0 0 auto; }

.ladder-scroll { overflow-x: auto; overscroll-behavior-x: contain; }
.ladder-tools .seg button:disabled { opacity: 0.4; cursor: default; }

.ladder-sheet {
  --cols: 4;
  width: max(100%, calc(var(--cols) * 88px));
  max-width: calc(var(--cols) * 148px);
  margin: 0 auto;
  padding: 14px 8px 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
}

.ladder-cols {
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
}

.lane {
  display: grid;
  gap: 8px;
  padding: 0 4px;
  min-width: 0;
}

.lane-field {
  width: 100%;
  min-width: 0;
  text-align: center;
  font-weight: 800;
  padding: 8px 2px;
  border-radius: 12px;
  background: #fff;
}

.ladder-stage { position: relative; }

.ladder-mask {
  display: none;
  position: absolute;
  left: 2px;
  right: 2px;
  top: 16%;
  bottom: 16%;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  border: 1px dashed #d9d4ce;
  background: repeating-linear-gradient(-45deg, #f7f4f0, #f7f4f0 10px, #efeae4 10px, #efeae4 20px);
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.03em;
  pointer-events: none;
}

.ladder-sheet.is-covered .ladder-mask { display: flex; }

.ladder-cover[aria-pressed="true"] {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.lane-field.is-hit {
  border-color: var(--hit, var(--red));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--hit, var(--red)) 28%, transparent);
}

.lane-field:focus,
.lane-field:focus-visible {
  outline: none;
}

.lane-field.is-editing {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(23, 23, 23, 0.1);
}

.lane-go {
  width: 100%;
  min-height: 40px;
  padding: 6px 2px;
  font-size: 13px;
}

.ladder-svg {
  width: 100%;
  height: auto;
  aspect-ratio: 1000 / 620;
  display: block;
  margin: 8px 0;
}

.ladder-result { min-height: 8px; }

.ladder-hit {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  margin: 4px 0 0;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.15;
}

.ladder-arrow { color: var(--red); }

.ladder-hit b { color: var(--red-deep); }

.ladder-all-label {
  margin: 4px 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.ladder-pairs {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}

.ladder-pairs li {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  font-weight: 800;
}

.ladder-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
}

.ladder-pairs span:nth-child(2) {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ladder-pairs b { color: var(--red-deep); }

.reaction-page { display: grid; gap: 12px; align-content: start; }
.reaction-page .play-head { margin: 0; }
.reaction-page .play-head strong { font-size: 22px; letter-spacing: -0.03em; }
.reaction-page .round-note { margin: 0; }

.reaction-avg {
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
}

.reaction-pad {
  width: 100%;
  min-height: max(320px, min(62vh, 520px));
  border: 0;
  border-radius: 28px;
  color: #fff;
  cursor: pointer;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  padding: 28px 16px;
  text-align: center;
  touch-action: manipulation;
  user-select: none;
}

.reaction-pad strong {
  font-size: clamp(40px, 8vw, 84px);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.reaction-pad span {
  font-size: 18px;
  font-weight: 800;
}

.reaction-pad.idle,
.reaction-pad.done { background: #1d1a16; }
.reaction-pad.wait { background: #d4533a; }
.reaction-pad.early { background: #a33b26; }
.reaction-pad.go { background: #1f8a4c; }
.reaction-pad:focus-visible { outline-color: #fff; }

.reaction-score {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.reaction-score small {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.reaction-again { opacity: 0.78; }

.reaction-times {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.reaction-times li {
  min-width: 96px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  text-align: center;
}

.reaction-times b {
  display: block;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.reaction-times span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.reaction-times .is-latest { border-color: var(--ink); }

@media (max-width: 720px) {
  .world-card .actions.solo { grid-template-columns: 1fr; }
  .ladder-tools { display: grid; grid-template-columns: 1fr 1fr; }
  .ladder-tools .seg { grid-column: 1 / -1; }
  .ladder-tools .actions { margin: 0; display: contents; }
  .ladder-tools .btn { width: 100%; min-height: 44px; }
  .ladder-cover { grid-column: 1 / -1; }
  .ladder-hit { font-size: 28px; }
  .ladder-sheet { width: 100%; max-width: none; padding: 12px 4px 14px; border-radius: 18px; }
  .lane { gap: 6px; padding: 0 2px; }
  .lane-field { padding: 8px 0; border-radius: 10px; letter-spacing: -0.05em; }
  .lane-go { min-height: 36px; padding: 4px 0; font-size: 12px; }
  .ladder-pairs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.lineup-editor { display: grid; gap: 10px; }

.drop {
  display: grid;
  place-items: center;
  gap: 4px;
  min-height: 132px;
  padding: 18px;
  border: 1.5px dashed #c8c8c8;
  border-radius: 18px;
  background: #fff;
  text-align: center;
  cursor: pointer;
}

.drop strong { font-size: 15px; }
.drop span { color: var(--muted); font-size: 13px; }
.drop input { display: none; }
.drop-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 8px; }
.drop-actions .btn { min-height: 36px; padding: 8px 14px; font-size: 13px; }
.drop.is-over { border-color: var(--ink); background: #f7f7f7; }

.media-list { display: grid; gap: 8px; }
.media-count { margin: 0; }

.media-row {
  display: grid;
  grid-template-columns: 28px 72px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.media-no {
  text-align: center;
  font-weight: 800;
  color: var(--muted);
}

.media-thumb {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  overflow: hidden;
  background: #f3f3f3;
  position: relative;
}

.media-thumb img,
.media-thumb video,
.media-thumb .thumb-empty {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  display: block;
}

.media-thumb.is-busy::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.55);
  z-index: 1;
}

.media-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: rgba(0, 0, 0, 0.12);
  z-index: 2;
}

.media-progress > span {
  display: block;
  height: 100%;
  background: #111;
}

.media-percent {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.media-main { display: grid; gap: 4px; min-width: 0; }
.media-main input { width: 100%; min-width: 0; }
.media-stat { margin: 0; font-size: 12px; }
.media-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.media-actions .btn { min-height: 36px; padding: 8px 10px; font-size: 13px; }
.media-actions input { display: none; }

@media (max-width: 720px) {
  .media-row { grid-template-columns: 72px minmax(0, 1fr); }
  .media-no { display: none; }
  .media-actions { grid-column: 1 / -1; }
}

.wheel-page { display: grid; gap: 14px; align-content: start; }
.wheel-page .play-head { margin: 0; }
.wheel-page .play-head strong { font-size: 22px; letter-spacing: -0.03em; }
.wheel-page .round-note { margin: 0; }
.wheel-page .seg { justify-self: center; }

.wheel-stage {
  display: grid;
  justify-items: center;
  width: min(100%, 440px);
  margin: 4px auto 0;
}

.wheel-pointer {
  position: relative;
  z-index: 3;
  width: 22px;
  height: 16px;
  margin-bottom: -7px;
  background: var(--ink);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  filter: drop-shadow(0 2px 1px rgba(23, 23, 23, 0.16));
}

.wheel-disk {
  position: relative;
  width: min(100%, 420px);
  aspect-ratio: 1;
}

.wheel-rotor {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: 0 16px 36px rgba(23, 23, 23, 0.08);
}

.wheel-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.wheel-svg text {
  font-family: Pretendard, "Malgun Gothic", sans-serif;
  font-weight: 800;
  pointer-events: none;
}

.wheel-hub {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 92px;
  height: 92px;
  transform: translate(-50%, -50%);
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 8px 20px rgba(23, 23, 23, 0.08);
  font-weight: 800;
  letter-spacing: -0.03em;
  cursor: pointer;
}

.wheel-hub:active:not(:disabled) { transform: translate(-50%, -50%) scale(0.98); }
.wheel-hub:disabled { cursor: default; }
.wheel-hub:focus-visible { outline-color: var(--ink); }

.wheel-result {
  min-height: 52px;
  margin: 0;
  text-align: center;
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1.1;
}

.wheel-fields {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: 8px;
  width: min(100%, 680px);
  margin: 0 auto;
}

.wheel-field {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 0 12px 0 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.wheel-field:focus-within {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(23, 23, 23, 0.08);
}

.wheel-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  padding: 11px 0;
  background: transparent;
  font-weight: 800;
}

.wheel-field input:focus,
.wheel-field input:focus-visible { outline: none; }

.wheel-weight {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.wheel-weight input {
  width: 34px;
  padding: 11px 0;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.wheel-swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
}

.wheel-swatch.light { box-shadow: inset 0 0 0 1px rgba(23, 23, 23, 0.16); }

.wheel-count-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  gap: 1px;
  font-size: 14px;
  font-weight: 800;
}

.wheel-count {
  width: 22px;
  border: 0;
  padding: 0;
  background: transparent;
  text-align: center;
  font: inherit;
  font-variant-numeric: tabular-nums;
}

.wheel-count:focus,
.wheel-count:focus-visible { outline: none; }

@media (max-width: 720px) {
  .wheel-hub { width: 76px; height: 76px; font-size: 14px; }
  .wheel-result { min-height: 44px; font-size: 32px; }
}

.apple-page { display: grid; gap: 12px; align-content: start; }
.apple-page .play-head { margin: 0; }
.apple-page .play-head strong { font-size: 22px; letter-spacing: -0.03em; }
.apple-page .round-note { margin: 0; }

.apple-hud {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  font-variant-numeric: tabular-nums;
}

.apple-live { font-size: 18px; white-space: nowrap; }
.apple-live small { margin-left: 6px; color: var(--muted); font-size: 13px; font-weight: 800; }
.apple-time { font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums; }
.apple-time.is-low { color: var(--red); }

.apple-stack {
  width: min(100%, 520px);
  margin: 0 auto;
  display: grid;
  gap: 10px;
}

.apple-meter {
  height: 4px;
  border-radius: 999px;
  background: #eee;
  overflow: hidden;
}
.apple-meter span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--ink);
  transform-origin: left center;
}
.apple-meter span.is-low { background: var(--red); }

.apple-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.apple-actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px; }
.apple-actions .btn { min-height: 40px; }

.apple-shared {
  margin: 0;
  font-weight: 800;
  color: var(--red-deep);
  text-align: center;
}

.apple-frame {
  position: relative;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #f6f4f1;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.apple-frame.is-live { cursor: crosshair; }

@media (max-width: 720px) {
  .apple-page { scroll-margin-top: 8px; }
  .apple-page .round-note { font-size: 14px; }
  .apple-tools .seg { display: flex; width: 100%; }
  .apple-tools .seg button { flex: 1; padding: 7px 2px; }
  .apple-actions { width: 100%; margin-left: 0; }
  .apple-actions .btn { flex: 1; min-height: 44px; }
  .apple-frame { padding: 8px; border-radius: 18px; }
}

.apple-board {
  display: grid;
  gap: 6px;
  touch-action: none;
}

.apple-cell {
  position: relative;
  min-width: 0;
  aspect-ratio: 1;
  container-type: inline-size;
}

.apple {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding-top: 8%;
  border-radius: 50%;
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  font-size: 44cqw;
  line-height: 1;
  letter-spacing: -0.04em;
  text-shadow: 0 1px 0 rgba(80, 20, 10, 0.25);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.1);
  transform: rotate(var(--tilt));
}

.apple::before {
  content: "";
  position: absolute;
  top: 8%;
  left: 46%;
  width: 22%;
  height: 12%;
  background: #3aaa62;
  border-radius: 0 80% 20% 80%;
  transform: rotate(24deg);
}

.apple::after {
  content: "";
  position: absolute;
  top: 5%;
  left: 47%;
  width: 8%;
  height: 12%;
  background: #246b40;
  border-radius: 2px;
}

.apple.tone-0 { background: radial-gradient(circle at 32% 30%, #ffb0a4, #e15a42 46%, #c44732); }
.apple.tone-1 { background: radial-gradient(circle at 32% 30%, #ffc3b8, #d4533a 48%, #b03d2c); }
.apple.tone-2 { background: radial-gradient(circle at 32% 30%, #ff9d8c, #c83b28 50%, #9a2e1e); }

.apple.is-on {
  transform: rotate(var(--tilt)) scale(0.94);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.1), 0 0 0 3px #fff, 0 0 0 5px #1d1a16;
}

.apple-frame.is-ten .apple.is-on {
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.1), 0 0 0 3px #fff, 0 0 0 5px #1f8a4c;
}

.apple-frame.is-over .apple.is-on {
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.1), 0 0 0 3px #fff, 0 0 0 5px var(--red);
}

.apple.is-bad {
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.1), 0 0 0 3px #fff, 0 0 0 5px var(--red);
  animation: apple-shake 0.24s linear;
}

.apple.is-pop {
  pointer-events: none;
  animation: apple-pop 0.16s ease forwards;
}

.apple.is-gone { visibility: hidden; }

@keyframes apple-pop {
  to { transform: scale(0.35); opacity: 0; }
}

@keyframes apple-shake {
  25% { transform: rotate(var(--tilt)) translateX(-2px); }
  75% { transform: rotate(var(--tilt)) translateX(2px); }
}

.apple-drag {
  position: absolute;
  z-index: 2;
  border: 2px solid #1d1a16;
  border-radius: 12px;
  background: rgba(29, 26, 22, 0.08);
  pointer-events: none;
}

.apple-frame.is-ten .apple-drag {
  border-color: #1f8a4c;
  background: rgba(31, 138, 76, 0.16);
}

.apple-frame.is-over .apple-drag {
  border-color: var(--red);
  background: rgba(212, 83, 58, 0.14);
}

.apple-sum {
  position: absolute;
  z-index: 3;
  min-width: 32px;
  height: 28px;
  padding: 0 8px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #1d1a16;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  pointer-events: none;
  transform: translate(-50%, -140%);
}

.apple-sum.is-below { transform: translate(-50%, 8px); }
.apple-sum.is-ten { background: #1f8a4c; }
.apple-sum.is-over { background: var(--red); }

.apple-drag[hidden],
.apple-sum[hidden],
.apple-mask[hidden] { display: none; }

.apple-mask {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 6px;
  border: 0;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  cursor: pointer;
}

.apple-mask strong {
  font-size: clamp(32px, 6vw, 52px);
  letter-spacing: -0.045em;
  line-height: 1.1;
}

.apple-mask b {
  font-size: clamp(28px, 5vw, 40px);
  letter-spacing: -0.04em;
  line-height: 1;
}

.apple-mask span { color: var(--muted); font-weight: 700; }
.apple-mask.is-clear strong { color: #1f6b3a; }
.apple-mask.is-result { cursor: default; }
.apple-mask-actions { display: flex; gap: 8px; margin-top: 6px; }

@media (prefers-reduced-motion: reduce) {
  .apple.is-pop { animation: none; opacity: 0; }
  .apple.is-bad { animation: none; }
}

.lotto-page { display: grid; gap: 12px; align-content: start; }
.lotto-page .play-head { margin: 0; }
.lotto-page .play-head strong { font-size: 22px; letter-spacing: -0.03em; }
.lotto-page .round-note { margin: 0; }

.lotto-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.lotto-tools .actions { margin: 0 0 0 auto; }
.lotto-tools .seg button:disabled { opacity: 0.4; cursor: default; }

.lotto-ticket {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
}

.lotto-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.lotto-mark {
  width: 22px;
  flex: none;
  font-weight: 800;
  color: var(--muted);
}

.lotto-balls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.lotto-plus {
  width: 16px;
  text-align: center;
  font-weight: 800;
  color: var(--muted);
}

.lotto-ball {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  box-shadow: inset 0 -7px 0 rgba(0, 0, 0, 0.14);
}

.lotto-ball::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 14px;
  width: 14px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  transform: rotate(-28deg);
  pointer-events: none;
}

.lotto-ball.y { background: #fbc400; color: #1d1a16; }
.lotto-ball.b { background: #3b7ddd; color: #fff; }
.lotto-ball.r { background: #e15a42; color: #fff; }
.lotto-ball.k { background: #6e6a66; color: #fff; }
.lotto-ball.g { background: #2f9d5c; color: #fff; }

.lotto-ball.is-bonus { box-shadow: inset 0 -7px 0 rgba(0, 0, 0, 0.14), 0 0 0 3px #fff, 0 0 0 5px var(--line); }

.lotto-ball.is-in { animation: lotto-in 0.28s cubic-bezier(0.2, 0.8, 0.2, 1) backwards; }

@keyframes lotto-in {
  from { transform: scale(0.55); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.lotto-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.lotto-legend li { display: inline-flex; align-items: center; gap: 6px; }

.lotto-legend i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.lotto-legend i.y { background: #fbc400; }
.lotto-legend i.b { background: #3b7ddd; }
.lotto-legend i.r { background: #e15a42; }
.lotto-legend i.k { background: #6e6a66; }
.lotto-legend i.g { background: #2f9d5c; }

@media (max-width: 720px) {
  .lotto-tools { display: grid; }
  .lotto-tools .actions { margin: 0; }
  .lotto-tools .btn { flex: 1; min-height: 44px; }
  .lotto-ticket { padding: 12px 10px; }
  .lotto-row { gap: 6px; }
  .lotto-mark { width: 16px; font-size: 13px; }
  .lotto-balls { flex: 1; flex-wrap: nowrap; gap: 4px; }
  .lotto-plus { width: 10px; flex: none; }
  .lotto-ball { flex: 0 1 44px; width: auto; height: auto; aspect-ratio: 1; min-width: 0; font-size: 15px; }
  .lotto-ball::after { top: 18%; left: 24%; width: 26%; height: 15%; }
}

@media (prefers-reduced-motion: reduce) {
  .lotto-ball.is-in { animation: none; }
}

.lunch-page {
  display: grid;
  gap: 12px;
  align-content: start;
  width: min(100%, 560px);
  margin: 0 auto;
}
.lunch-page .play-head { margin: 0; }
.lunch-page .play-head strong { font-size: 22px; letter-spacing: -0.03em; }
.lunch-page .round-note { margin: 0; }

.lunch-count {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.lunch-result {
  margin: 0;
  text-align: center;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.04em;
}
.lunch-result:empty { display: none; }
.lunch-result span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.lunch-stage { display: grid; perspective: 900px; }

.lunch-pick {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  width: 100%;
  min-height: 220px;
  padding: 22px 20px 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.lunch-pick.is-hidden { display: none; }
.lunch-pick.is-back {
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 46%, #fff 0 28px, transparent 29px),
    #f6f4f1;
  border-color: #e4dfd8;
  box-shadow: none;
}
.lunch-pick.is-spinning { cursor: default; border-color: #e4dfd8; pointer-events: none; }
.lunch-pick.is-open { border-color: var(--ink); animation: lunch-open 0.42s ease; }
.lunch-pick:hover:not(.is-spinning) { border-color: #bdbdbd; }
.lunch-pick.is-open:hover { border-color: var(--ink); }
.lunch-pick:focus-visible { outline-offset: 3px; }

.lunch-back {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.05em;
}
.lunch-pick.is-back .lunch-face { display: none; }
.lunch-pick:not(.is-back) .lunch-back { display: none; }

.lunch-face {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.lunch-photo {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  margin-bottom: 4px;
  overflow: hidden;
  border-radius: 16px;
  background: #f6f4f1;
}
.lunch-emoji { font-size: 64px; line-height: 1; }
.lunch-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.lunch-photo.is-loaded img { opacity: 1; }
.lunch-pick.is-spinning .lunch-emoji { animation: lunch-flicker 0.14s linear infinite; }

@keyframes lunch-open {
  from { transform: rotateY(88deg); opacity: 0.35; }
  to { transform: none; opacity: 1; }
}

.lunch-kind {
  color: var(--red-deep);
  font-size: 12px;
  font-weight: 800;
}
.lunch-pick strong {
  font-size: clamp(28px, 6vw, 36px);
  letter-spacing: -0.05em;
  line-height: 1.25;
  word-break: keep-all;
}
.lunch-line {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}
.lunch-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  font-size: 12px;
  font-weight: 800;
}
.lunch-meta span {
  padding: 3px 8px;
  border-radius: 999px;
  background: #f3f3f3;
}
.lunch-pick.is-spinning strong { animation: lunch-flicker 0.14s linear infinite; }
@keyframes lunch-flicker {
  50% { opacity: 0.28; }
}

.lunch-actions { display: flex; }
.lunch-actions .btn { width: 100%; min-height: 52px; font-size: 17px; }

.lunch-more {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}
.lunch-more summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}
.lunch-more summary::-webkit-details-marker { display: none; }
.lunch-more summary::marker { content: ""; }
.lunch-more summary::after {
  content: "펼치기";
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.lunch-more[open] summary::after { content: "접기"; }
.lunch-more .lunch-filters { padding: 0 14px 14px; }

.lunch-filters { display: grid; gap: 8px; }
.lunch-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.lunch-filter > span {
  min-width: 32px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.lunch-filter .seg { border-radius: 18px; }
.lunch-filter .seg button:disabled { opacity: 0.4; cursor: default; }

.lunch-empty {
  margin: 0;
  padding: 28px 16px;
  border: 1px dashed #d8d8d8;
  border-radius: 18px;
  text-align: center;
  color: var(--muted);
  font-weight: 700;
}
.lunch-empty.is-hidden { display: none; }

@media (max-width: 720px) {
  .lunch-page { width: 100%; }
  .lunch-actions .btn { min-height: 48px; }
  .lunch-pick { padding: 14px 14px 16px; border-radius: 18px; }
  .lunch-photo { aspect-ratio: 16 / 10; border-radius: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .lunch-pick.is-open,
  .lunch-pick.is-spinning strong,
  .lunch-pick.is-spinning .lunch-emoji { animation: none; }
  .lunch-photo img { transition: none; }
}

.blocks-page {
  display: grid;
  gap: 12px;
  align-content: start;
  justify-items: center;
  width: 100%;
  min-width: 0;
}
.blocks-page .play-head,
.blocks-page .round-note {
  width: min(100%, 420px);
  max-width: 100%;
  min-width: 0;
  margin: 0;
}
.blocks-page .play-head strong { font-size: 22px; letter-spacing: -0.03em; }

.blocks-hud { display: grid; justify-items: end; gap: 1px; min-width: 0; }
.blocks-live { font-size: 18px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.blocks-live small { margin-left: 4px; color: var(--muted); font-size: 13px; font-weight: 800; }
.blocks-best { color: var(--muted); font-size: 12px; font-weight: 800; white-space: nowrap; }

.blocks-stage {
  position: relative;
  width: 100%;
  max-width: 420px;
  min-width: 0;
  contain: inline-size;
  height: min(100%, 640px);
  max-height: 100%;
  align-self: center;
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  background: #d0cbc7;
  touch-action: none;
  user-select: none;
}

.blocks-stage canvas { display: block; width: 100%; height: 100%; min-width: 0; }
.blocks-stage.is-play { cursor: pointer; }
.blocks-stage:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.blocks-stage.is-play:focus,
.blocks-stage.is-play:focus-visible { outline: none; }

.blocks-mask {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  align-content: start;
  justify-items: center;
  padding: 22px 24px 24px;
  background: transparent;
  overflow: auto;
}

.blocks-mask[hidden] { display: none; }

.blocks-panel {
  display: grid;
  justify-items: center;
  gap: 8px;
  width: min(100%, 280px);
  padding: 22px 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  text-align: center;
  box-shadow: var(--shadow);
}
.blocks-title,
.blocks-score,
.blocks-remark { margin: 0; font-weight: 800; letter-spacing: -0.04em; line-height: 1.15; }
.blocks-title { font-size: clamp(28px, 5vw, 40px); }
.blocks-score { font-size: clamp(40px, 8vw, 64px); }
.blocks-remark { color: var(--ink); font-size: 18px; }
.blocks-mask span { color: var(--muted); font-weight: 700; }
.blocks-panel .btn { min-width: 132px; min-height: 46px; margin-top: 6px; }

body.is-blocks {
  --blocks-view: 100svh;
  overflow: hidden;
}

body.is-blocks #app,
body.is-blocks .shell {
  height: var(--blocks-view);
  max-height: var(--blocks-view);
}

body.is-blocks .shell {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

body.is-blocks .foot { display: none; }

body.is-blocks .main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding-top: 12px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
}

body.is-blocks .blocks-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 0;
  height: 100%;
}

body.is-blocks .blocks-stage {
  flex: 1 1 auto;
  width: min(100%, 420px);
  height: auto;
  min-height: 0;
  max-height: 640px;
}

@media (max-width: 720px) {
  .blocks-page .play-head { grid-template-columns: auto minmax(0, 1fr); }
  .blocks-page .blocks-hud {
    grid-column: 1 / -1;
    grid-auto-flow: column;
    justify-content: start;
    justify-items: start;
    align-items: baseline;
    gap: 8px;
  }
  body.is-blocks .modes { display: none; }
  body.is-blocks .topbar-inner {
    grid-template-areas: "brand nav stream nick";
    min-height: 48px;
    padding-top: 6px;
    padding-bottom: 6px;
  }
  body.is-blocks .blocks-mask { padding: 12px 14px; }
  body.is-blocks .blocks-panel { padding: 16px 14px; }
}

@media (max-height: 520px) {
  body.is-blocks .blocks-page .round-note { display: none; }
  body.is-blocks .blocks-mask { align-content: center; padding: 8px; }
  body.is-blocks .blocks-panel { padding: 12px; gap: 6px; }
  body.is-blocks .blocks-title { font-size: 24px; }
  body.is-blocks .blocks-panel .btn { min-height: 40px; }
}

.seo-fallback { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0; color: var(--ink); }
.seo-fallback h1 { margin: 0 0 8px; font-size: 24px; }
.seo-fallback h2 { margin: 24px 0 8px; font-size: 18px; }
.seo-fallback p { margin: 0 0 12px; color: var(--muted); line-height: 1.6; }
.seo-fallback ul,
.seo-fallback ol { margin: 0; padding-left: 20px; line-height: 1.8; }
.seo-fallback a { color: inherit; }

.thumb-field {
  display: grid;
  grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.thumb-field .shot { aspect-ratio: 16 / 10; }

.thumb-copy {
  display: grid;
  justify-items: start;
  gap: 6px;
  min-width: 0;
}

.thumb-copy strong {
  font-size: 16px;
  letter-spacing: -0.03em;
}

.thumb-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.thumb-copy .btn { width: auto; min-height: 40px; }
.thumb-copy .btn[hidden] { display: none !important; }

@media (max-width: 720px) {
  .thumb-field { grid-template-columns: minmax(0, 1fr); }
}

.me {
  display: grid;
  gap: 28px;
  min-width: 0;
}

.me-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.me-id { min-width: 0; }

.me-kicker {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.me-hero h1 { margin: 0; }

.me-mail {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.me-create {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.me-create a {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
}

.me-create a:hover,
.me-record:hover,
.me-game:hover { border-color: #d0d0d0; }

.me-create strong {
  font-size: 17px;
  letter-spacing: -0.03em;
}

.me-create span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.me-section { display: grid; gap: 12px; }

.me-section h2 {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  font-size: 18px;
}

.me-section h2 b {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.me-list { display: grid; gap: 10px; }

.me-records {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.me-record,
.me-game {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.me-record {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 16px;
  color: inherit;
  text-decoration: none;
}

.me-record-title,
.me-game h3 {
  margin: 0;
  font-size: 17px;
  letter-spacing: -0.03em;
}

.me-scores {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.me-score {
  display: grid;
  gap: 1px;
  flex: 1 1 72px;
  min-width: 72px;
  padding: 8px 10px;
  border-radius: 12px;
  background: #f6f6f6;
}

.me-score span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.me-score b {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.me-score.is-empty b { color: var(--muted); font-weight: 700; }

.me-go { width: 100%; min-height: 44px; }

.me-game {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 16px;
  align-items: center;
  padding: 16px 16px 16px 18px;
}

.me-game-main {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.me-desc {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.me-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.me-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f3f3f3;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.me-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin: 0;
}

.me-actions .btn {
  min-height: 40px;
  text-align: center;
}

.me-empty {
  margin: 0;
  padding: 22px 16px;
  border: 1px dashed #d8d8d8;
  border-radius: 18px;
  text-align: center;
  color: var(--muted);
  font-weight: 700;
}

@media (max-width: 720px) {
  .me { gap: 22px; }
  .me-hero { flex-direction: column; align-items: stretch; }
  .me-hero .btn { width: 100%; min-height: 44px; }
  .me-create,
  .me-records { grid-template-columns: minmax(0, 1fr); }
  .me-game { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .me-actions { display: grid; justify-content: stretch; }
  .me-actions .btn { width: 100%; min-height: 44px; }
}

.marble-page {
  display: grid;
  gap: 12px;
  align-content: start;
  min-width: 0;
}
.marble-layout,
.marble-stage,
.marble-side { min-width: 0; }
.marble-page .play-head { margin: 0; }
.marble-page .play-head strong { font-size: 22px; letter-spacing: -0.03em; }

.marble-page.is-setup {
  grid-template-columns: minmax(0, 1fr) 260px;
  align-items: stretch;
}
.marble-page.is-setup .play-head { grid-column: 1 / -1; }
.marble-page.is-setup .marble-panel { grid-column: 1; grid-row: 2; }
.marble-page.is-setup .marble-layout {
  grid-column: 2;
  grid-row: 2;
  grid-template-columns: minmax(0, 1fr);
}
.marble-page.is-setup .marble-stage { display: none; }
.marble-page.is-setup .marble-side { max-height: none; height: 100%; }
.marble-page.is-done .marble-layout { order: 2; }
.marble-page.is-done .marble-panel { order: 3; }

.marble-panel {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}
.marble-page.is-live .marble-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  box-shadow: none;
}
.marble-page.is-live .marble-field,
.marble-page.is-live .marble-rule { display: none; }

.marble-field { display: grid; gap: 8px; }
.marble-field-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.marble-field-head label {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.marble-count { margin-left: 2px; }
.marble-clear {
  margin-left: auto;
  min-height: 32px;
  padding: 6px 12px;
  font-size: 13px;
}
.marble-clear[hidden] { display: none; }
.marble-names {
  width: 100%;
  min-height: 132px;
  padding: 14px;
  border-radius: 16px;
  background: #fafafa;
  line-height: 1.55;
  resize: vertical;
}
.marble-names:focus {
  outline: none;
  border-color: var(--ink);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(23, 23, 23, 0.08);
}
.marble-hint,
.marble-rule {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.marble-rule { color: var(--ink); }

.marble-options {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
}
.marble-option { display: grid; gap: 6px; }
.marble-option > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.marble-page.is-live .marble-option > span { display: none; }
.marble-page.is-live .marble-options { gap: 8px; }
.marble-panel .seg button:disabled { opacity: 0.4; cursor: default; }
.marble-panel .actions { margin: 0; }
.marble-panel .actions .btn { width: 100%; min-height: 48px; font-size: 16px; }
.marble-page.is-live .marble-panel .actions { width: auto; margin-left: auto; }
.marble-page.is-live .marble-panel .actions .btn { width: auto; min-height: 40px; font-size: inherit; }

.marble-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 10px;
  align-items: stretch;
}
.marble-stage {
  position: relative;
  height: min(74vh, 820px);
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  background: #f6f3ee;
  box-shadow: var(--shadow);
}
.marble-stage canvas { width: 100%; height: 100%; max-width: 100%; display: block; }
.marble-wait {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 6px;
  margin: 0;
  padding: 24px;
  text-align: center;
}
.marble-wait strong {
  font-size: 18px;
  letter-spacing: -0.03em;
}
.marble-wait span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}
.marble-wait[hidden] { display: none; }
.marble-banner {
  position: absolute;
  top: 14px;
  left: 50%;
  z-index: 2;
  margin: 0;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  letter-spacing: -0.03em;
  pointer-events: none;
  transform: translateX(-50%);
}
.marble-banner[hidden] { display: none; }
.marble-banner.is-on { animation: marble-pop 0.35s ease; }
@keyframes marble-pop {
  from { transform: translateX(-50%) scale(0.92); }
}
.marble-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(246, 243, 238, 0.55);
}
.marble-overlay[hidden] { display: none; }
.marble-card {
  width: min(360px, 100%);
  display: grid;
  gap: 4px;
  justify-items: center;
  padding: 22px 18px 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
  text-align: center;
}
.marble-card .eyebrow { margin: 0; }
.marble-card strong {
  font-size: clamp(32px, 5vw, 48px);
  letter-spacing: -0.05em;
  line-height: 1.05;
}
.marble-card p { margin: 0; font-weight: 700; }
.marble-card .btn { min-width: 140px; margin-top: 8px; }
.marble-win-swatch {
  display: block;
  width: 44px;
  height: 44px;
  margin: 8px 0 2px;
  border-radius: 50%;
  box-shadow:
    inset 0 -8px 12px rgba(0, 0, 0, 0.14),
    inset 8px 8px 12px rgba(255, 255, 255, 0.4),
    0 8px 16px rgba(0, 0, 0, 0.08);
}
.marble-side {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  max-height: min(74vh, 820px);
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}
.marble-side-title {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.marble-side-hint {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}
.marble-page.is-setup .marble-side-hint { display: none; }
.marble-rank {
  display: grid;
  flex: 1;
  gap: 4px;
  align-content: start;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}
.marble-page.is-setup .marble-rank { display: flex; flex-direction: column; }
.marble-rank li {
  display: grid;
  grid-template-columns: 22px 14px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 40px;
  padding: 6px 10px;
  border-radius: 14px;
  font-weight: 700;
}
.marble-rank li.is-roster { grid-template-columns: 14px minmax(0, 1fr); }
.marble-rank li.is-roster b { display: none; }
.marble-rank li.is-pick { cursor: pointer; }
.marble-rank li.is-pick:hover { background: #f3f0ea; }
.marble-rank li.is-win {
  background: #fde8e2;
  box-shadow: inset 0 0 0 1px rgba(212, 83, 58, 0.16);
}
.marble-rank li.is-win:hover { background: #fde8e2; }
.marble-rank li.is-view {
  background: #e8eefb;
  box-shadow: inset 0 0 0 1.5px #3b7ddd;
}
.marble-rank li.is-view.is-win {
  background: #fde8e2;
  box-shadow: inset 0 0 0 1.5px #3b7ddd;
}
.marble-rank li.is-pick:focus-visible {
  outline: 2px solid #3b7ddd;
  outline-offset: 1px;
}
.marble-rank li.is-racing b { color: var(--muted); }
.marble-rank li.is-empty {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 120px;
  padding: 16px 12px;
  border: 1px dashed #d8d8d8;
  border-radius: 16px;
  color: var(--muted);
  text-align: center;
  font-weight: 700;
}
.marble-rank li.is-empty span {
  flex: 0 0 auto;
  width: min(11em, 100%);
  max-width: none;
  overflow: visible;
  text-overflow: unset;
  white-space: normal;
  line-height: 1.45;
}
.marble-rank b {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}
.marble-rank i {
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 99px;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.12);
}
.marble-rank span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .marble-page.is-setup { grid-template-columns: 1fr; }
  .marble-page.is-setup .play-head,
  .marble-page.is-setup .marble-panel,
  .marble-page.is-setup .marble-layout { grid-column: 1; grid-row: auto; }
  .marble-page.is-setup .marble-side { height: auto; max-height: 240px; }
  .marble-layout { grid-template-columns: 1fr; }
  .marble-stage { height: 68vh; min-height: 420px; }
  .marble-page.is-live .marble-stage { height: max(400px, calc(100svh - 150px)); border-radius: 18px; }
  .marble-page.is-live .marble-panel { padding: 8px; gap: 8px; border-radius: 18px; }
  .marble-page.is-live .marble-options { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .marble-page.is-live .marble-option .seg { display: flex; }
  .marble-page.is-live .marble-option .seg button { flex: 1; padding: 6px 4px; }
  .marble-page.is-done .marble-stage { height: 52vh; min-height: 320px; }
  .marble-side { max-height: 240px; }
  .marble-page.is-done .marble-side { max-height: none; }
  .marble-page.is-live .marble-panel .actions { width: 100%; margin: 0; }
  .marble-page.is-live .marble-panel .actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .marble-banner.is-on { animation: none; }
}

/* 퀴즈 */
.quiz-card .cover { position: relative; }
.quiz-cover {
  height: 100%;
  display: grid;
  place-items: center;
  border-radius: 16px;
  overflow: hidden;
  background: #f3f3f3;
  color: var(--ink);
}
.quiz-cover .icon { width: 64px; height: 64px; stroke-width: 1.4; }
.quiz-cover.is-image { background: linear-gradient(150deg, #fde8e2, #f6c5b8); color: var(--red-deep); }
.quiz-cover.is-text { background: linear-gradient(150deg, #eef1f6, #cfd8e6); color: #2c3e5c; }
.quiz-cover.is-song { background: linear-gradient(150deg, #1d1a16, #3a3029); color: #f3d48a; }
.quiz-cover.has-photo { background: transparent; }
.quiz-cover img, .quiz-cover video { width: 100%; height: 100%; object-fit: cover; display: block; }

.quiz-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  padding: 5px 10px 5px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.quiz-badge .icon { width: 15px; height: 15px; }
.quiz-card .quiz-badge { position: absolute; left: 10px; top: 10px; }

.quiz-play { display: grid; gap: 14px; }
.quiz-play [hidden] { display: none !important; }
.quiz-intro { display: grid; gap: 12px; justify-items: start; }
.quiz-intro .lede { white-space: pre-line; }
.quiz-intro .actions { margin-top: 6px; }
.quiz-intro-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  overflow: hidden;
}
.quiz-intro-cover img, .quiz-intro-cover video { width: 100%; height: 100%; object-fit: cover; display: block; }
.quiz-start { min-width: 140px; min-height: 46px; font-size: 16px; }
.quiz-author { font-size: 13px; }

.quiz-stage { display: grid; gap: 14px; }
.quiz-head { display: flex; align-items: center; gap: 12px; }
.quiz-head .back { margin: 0; flex: none; }
.quiz-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.quiz-head-meta {
  display: inline-flex;
  gap: 8px;
  flex: none;
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.quiz-score { color: #1f6b3a; }
.quiz-bar { height: 6px; border-radius: 999px; background: #f0f0f0; overflow: hidden; }
.quiz-bar i { display: block; height: 100%; width: 0; background: var(--ink); transition: width 220ms ease; }

.quiz-media {
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 16px;
  border-radius: 22px;
  background: #f4f4f4;
}
.quiz-media > img, .quiz-media > video {
  display: block;
  max-width: 100%;
  max-height: min(56vh, 520px);
  border-radius: 12px;
}
.quiz-media:has(.quiz-song) { padding: 0; background: transparent; border-radius: 0; overflow: visible; gap: 10px; }
.quiz-question {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: pre-line;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.quiz-question.is-text {
  padding: 28px 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fafafa;
  font-size: clamp(20px, 3.4vw, 28px);
  line-height: 1.45;
  text-align: center;
}
.quiz-question.is-initials {
  font-size: clamp(44px, 9vw, 72px);
  letter-spacing: 0.18em;
  line-height: 1.2;
}
.quiz-hint {
  margin: -4px 0 0;
  color: var(--red-deep);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.quiz-answer { display: flex; gap: 8px; }
.quiz-input { flex: 1; min-width: 0; font-size: 17px; padding: 13px 14px; }
.quiz-input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(23, 23, 23, 0.08); }
.quiz-answer .btn { min-width: 76px; }
.quiz-tools { display: flex; gap: 8px; flex-wrap: wrap; }

.quiz-verdict {
  display: grid;
  gap: 6px;
  justify-items: start;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--line);
  animation: pop 180ms ease;
}
.quiz-verdict.is-ok { background: #e8f6ec; border-color: #b7e0c4; }
.quiz-verdict.is-no { background: #fdf0ec; border-color: #f0c9bf; }
.quiz-verdict-head { font-size: 22px; letter-spacing: -0.03em; }
.quiz-verdict.is-ok .quiz-verdict-head { color: #1f6b3a; }
.quiz-verdict.is-no .quiz-verdict-head { color: var(--red-deep); }
.quiz-correct { display: flex; align-items: baseline; gap: 8px; }
.quiz-correct span { color: var(--muted); font-size: 13px; font-weight: 800; }
.quiz-correct b { font-size: 20px; }
.quiz-verdict .btn { margin-top: 8px; min-width: 140px; }

.quiz-mode { display: grid; gap: 8px; justify-items: start; }
.quiz-board-box { display: grid; gap: 8px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; }
.quiz-chat-state { margin: 0; color: var(--muted); font-size: 13px; font-weight: 800; }
.quiz-chat-state.is-on { color: #1f9d55; }
.quiz-board { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; width: 100%; }
.quiz-board li { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 10px; background: #f6f6f6; font-weight: 700; }
.quiz-board li.is-top { background: #e8f6ec; }
.quiz-board li.is-empty { justify-content: center; color: var(--muted); background: none; }
.quiz-board-rank { flex: none; width: 22px; color: var(--muted); font-weight: 900; text-align: center; }
.quiz-board-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quiz-board.is-final { max-width: 420px; }
.quiz-board.is-final li { padding: 10px 14px; font-size: 17px; }
.quiz-result-winner { font-size: clamp(32px, 6vw, 48px); letter-spacing: -0.04em; }

.quiz-song {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 360px;
  border-radius: 22px;
  overflow: hidden;
  background: #161310;
}
.quiz-yt, .quiz-yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.quiz-disc-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, #1d1a16, #3a3029);
  transition: opacity 220ms ease;
}
.quiz-song.is-revealed .quiz-disc-cover { opacity: 0; pointer-events: none; }
.quiz-disc {
  width: min(42%, 180px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle, #f3d48a 0 14%, #1d1a16 15% 18%, transparent 19%),
    repeating-radial-gradient(circle, #2a2622 0 2px, #141210 2px 5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
.quiz-song.is-playing .quiz-disc { animation: spin 2.4s linear infinite; }
.quiz-song-controls { display: flex; align-items: center; gap: 10px; width: 100%; }
.quiz-song-play { gap: 6px; min-width: 110px; }
.quiz-song-play .icon { width: 18px; height: 18px; }
.quiz-song-status { color: var(--muted); font-size: 13px; font-weight: 700; }

.quiz-result { display: grid; gap: 10px; justify-items: start; padding-top: 6px; }
.quiz-result-score { font-size: clamp(44px, 8vw, 64px); letter-spacing: -0.05em; }
.quiz-result-score span { color: var(--muted); font-size: 0.55em; }
.quiz-meter { width: 100%; height: 10px; border-radius: 999px; background: #f0f0f0; overflow: hidden; }
.quiz-meter i { display: block; height: 100%; background: #1f8a4c; border-radius: 999px; }
.quiz-review { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.quiz-review-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.quiz-review-mark {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
}
.quiz-review-mark .icon { width: 18px; height: 18px; stroke-width: 2.4; }
.quiz-review-row.is-ok .quiz-review-mark { background: #1f8a4c; }
.quiz-review-row.is-no .quiz-review-mark { background: var(--red); }
.quiz-review-thumb { flex: none; width: 64px; height: 48px; border-radius: 10px; overflow: hidden; }
.quiz-review-thumb img, .quiz-review-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.quiz-review-body { display: grid; gap: 2px; min-width: 0; }
.quiz-review-q {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.quiz-review-body .muted { font-size: 13px; }

.quiz-form [hidden] { display: none !important; }
.quiz-type-pick { display: grid; gap: 8px; }
.quiz-type-seg { width: fit-content; }
.quiz-type-seg button { display: inline-flex; align-items: center; gap: 6px; }
.quiz-type-seg .icon { width: 17px; height: 17px; }
.quiz-type-note { font-size: 13px; }
.quiz-editor-head { display: flex; align-items: baseline; gap: 10px; margin-top: 6px; }
.quiz-editor-head h2 { font-size: 18px; }
.quiz-editor { display: grid; gap: 12px; min-width: 0; }
.quiz-q {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  min-width: 0;
}
.quiz-q-head { display: flex; align-items: center; justify-content: space-between; }
.quiz-q-head .icon-btn { width: 32px; height: 32px; }
.quiz-q-head .icon { width: 18px; height: 18px; }
.quiz-q-body { display: grid; grid-template-columns: 1fr; gap: 12px; min-width: 0; }
.quiz-q.is-image .quiz-q-body,
.quiz-q.is-song .quiz-q-body { grid-template-columns: 148px minmax(0, 1fr); }
.quiz-q-fields { display: grid; gap: 8px; min-width: 0; }
.quiz-q-fields input, .quiz-q-fields textarea { width: 100%; min-width: 0; }
.quiz-yt-fields { display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: 8px; }
.quiz-extra-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quiz-yt-preview {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background: #f3f3f3;
  display: grid;
  place-items: center;
  align-self: start;
  color: var(--muted);
}
.quiz-yt-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.quiz-yt-open {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 6px;
  padding: 4px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.admin-quiz { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 360px; overflow: auto; }
.admin-quiz-row { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; }
.admin-quiz-media { flex: none; width: 72px; height: 54px; border-radius: 10px; overflow: hidden; }
.admin-quiz-media img, .admin-quiz-media video { width: 100%; height: 100%; object-fit: cover; display: block; }

@media (max-width: 720px) {
  .quiz-q.is-image .quiz-q-body,
  .quiz-q.is-song .quiz-q-body { grid-template-columns: 96px minmax(0, 1fr); }
  .quiz-extra-fields { grid-template-columns: 1fr; }
  .quiz-yt-fields { grid-template-columns: minmax(0, 1fr) 92px; }
  .quiz-type-seg { width: 100%; }
  .quiz-type-seg button { flex: 1; justify-content: center; padding: 8px 6px; }
  .quiz-card .actions { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }

  .quiz-intro { justify-items: stretch; }
  .quiz-intro .quiz-badge { justify-self: start; }
  .quiz-intro-cover { border-radius: 18px; }
  .quiz-intro .quiz-sizes { display: flex; }
  .quiz-intro .quiz-sizes button { flex: 1; }
  .quiz-intro .actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .quiz-start { min-height: 50px; }

  .quiz-stage { gap: 12px; }
  .quiz-head { gap: 8px; }
  .quiz-head-meta { flex-direction: column; gap: 0; text-align: right; }
  .quiz-media { padding: 10px; border-radius: 18px; }
  .quiz-media > img, .quiz-media > video { max-height: 38svh; }
  .quiz-song { border-radius: 18px; max-height: 32svh; }
  .quiz-question.is-text { padding: 22px 16px; border-radius: 18px; }
  .quiz-input { min-height: 50px; }
  .quiz-answer .btn { min-height: 50px; }
  .quiz-tools .btn, .quiz-verdict .btn { flex: 1; min-height: 44px; }
  .quiz-verdict { padding: 16px; }
  .quiz-verdict .btn { width: 100%; min-height: 48px; }

  .quiz-result { justify-items: stretch; }
  .quiz-result .quiz-badge { justify-self: start; }
  .quiz-result .actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .quiz-result .actions .btn { min-height: 44px; padding: 10px 4px; font-size: 14px; }
  .quiz-result .actions .btn:first-child { grid-column: 1 / -1; min-height: 50px; font-size: 16px; }
  .quiz-review-row { align-items: flex-start; padding: 10px; gap: 10px; }
  .quiz-review-thumb { width: 52px; height: 40px; }
  .quiz-review-q {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    white-space: normal;
  }
  .me-create { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .quiz-song.is-playing .quiz-disc { animation: none; }
}

/* 방송 모드 */
.stream-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}
.stream-btn[aria-pressed="true"] { background: var(--red); border-color: var(--red); color: #fff; }

.stream-modal { display: grid; gap: 14px; }
.stream-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stream-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 800; }
.stream-help { font-size: 13px; }
.stream-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.stream-actions .btn { flex: 1; }

.stream-mark {
  position: fixed;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  pointer-events: none;
  user-select: none;
}
.stream-mark b { font-family: "Black Han Sans", Pretendard, sans-serif; font-weight: 400; font-size: 20px; line-height: 1; letter-spacing: -0.02em; }

body.is-stream .ad-rail { display: none; }
body.is-stream .play-title { font-size: 20px; }
body.is-stream .round-status { font-size: 18px; }
body.is-stream .face.large .face-name { font-size: 26px; }
body.is-stream .winner h1 { font-size: clamp(40px, 5vw, 64px); }
body.is-stream .marble-card strong { font-size: clamp(40px, 6vw, 60px); }

body.is-obs .topbar { display: none; }
body.is-obs .main { padding-top: 14px; }
html:has(body.stream-bg-transparent),
body.stream-bg-transparent { background: transparent; }
html:has(body.stream-bg-green),
body.stream-bg-green { background: #00b140; }

/* 시청자 투표: 스트리머 화면 */
.play-tools { display: inline-flex; align-items: center; gap: 6px; }
.live-open.is-on { border-color: var(--red); color: var(--red-deep); opacity: 1; }

.live-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 6px 0 8px;
  padding: 10px 14px;
  border-radius: 16px;
  background: var(--ink);
  color: #fff;
}
.live-strip[hidden] { display: none; }
.live-label { font-size: 13px; font-weight: 800; opacity: 0.8; }
.live-url { font-size: 22px; letter-spacing: -0.03em; }
.live-code {
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--red);
  font-weight: 800;
  letter-spacing: 0.08em;
}
.live-count { font-weight: 700; opacity: 0.85; font-variant-numeric: tabular-nums; }
.live-strip .live-stop { margin-left: auto; color: #fff; border-color: rgba(255, 255, 255, 0.4); padding: 6px 12px; }
.live-strip .live-next { margin-left: auto; padding: 6px 14px; background: #fff; border-color: #fff; color: var(--ink); }
.live-strip .live-next + .live-stop { margin-left: 0; }
.duel-tools { flex-wrap: wrap; }
.duel-tools .duel-live { flex-basis: 100%; margin: 0; }
.duel .pick:has(.live-bar:not([hidden])) .pick-badge { display: none; }

.live-dot { width: 10px; height: 10px; border-radius: 50%; background: #9a9a9a; flex: none; }
.live-dot.on { background: #2fd06b; box-shadow: 0 0 0 4px rgba(47, 208, 107, 0.25); }

.pick { position: relative; }
.live-bar {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 14px;
  z-index: 3;
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(212, 83, 58, 0.92) var(--share, 0%), rgba(23, 23, 23, 0.78) var(--share, 0%));
  color: #fff;
  pointer-events: none;
}
.live-bar[hidden] { display: none; }
.live-bar b { font-size: 26px; line-height: 1; font-variant-numeric: tabular-nums; }
.live-bar span { font-size: 13px; font-weight: 800; }
.live-bar.lead { box-shadow: 0 0 0 3px #fff; }

/* 시청자 투표: 시청자 화면 */
.live-page { display: grid; gap: 12px; }
.live-join { display: flex; gap: 8px; }
.live-code-input {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}
.live-title { font-size: clamp(24px, 4vw, 32px); }
.live-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; color: var(--muted); font-weight: 700; font-size: 14px; }
.live-label-line { font-size: 20px; font-weight: 800; letter-spacing: -0.03em; }
.live-help { color: var(--muted); font-weight: 700; }
.live-versus { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.live-option {
  position: relative;
  display: block;
  padding: 0;
  border: 0;
  border-radius: 22px;
  overflow: hidden;
  background: transparent;
  cursor: pointer;
  text-align: inherit;
}
div.live-option { cursor: default; }
.live-option .face { aspect-ratio: 3 / 4; min-height: 0; border-radius: 22px; }
.live-option .face img, .live-option .face video { width: 100%; height: 100%; object-fit: cover; }
.live-option.is-picked .face { box-shadow: inset 0 0 0 5px var(--red); }
.live-versus:has(.is-picked) .live-option:not(.is-picked) .face { opacity: 0.6; }
.live-share {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 10px;
  padding: 6px 10px;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(212, 83, 58, 0.92) var(--share), rgba(23, 23, 23, 0.72) var(--share));
  color: #fff;
}
.live-share b { font-size: 22px; font-variant-numeric: tabular-nums; }
.live-champion { width: min(320px, 100%); margin: 0 auto; }
.live-wait {
  display: grid;
  gap: 6px;
  justify-items: center;
  padding: 48px 16px;
  border: 1px dashed var(--line);
  border-radius: 22px;
  text-align: center;
  color: var(--muted);
}
.live-wait strong { color: var(--ink); font-size: 18px; }
.live-foot { display: flex; justify-content: center; }
.live-foot:empty { display: none; }

.marble-card-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }

.stream-chat-body { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; font-weight: 700; }
.stream-chat-body .btn { padding: 8px 14px; }
.stream-chat-on { color: #1f9d55; }
.stream-chat .stream-row > span:first-child { flex: none; }
.chat-login-chzzk { background: #00c73c; border-color: #00c73c; color: #0b0b0b; }
.chat-login-soop { background: #0545b1; border-color: #0545b1; color: #fff; }
.live-chat { padding: 2px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.14); font-weight: 700; font-size: 14px; }
.live-chat.on { background: #1f9d55; }
.marble-chat { align-self: flex-start; padding: 8px 14px; }
.marble-chat[aria-pressed="true"] { background: #1f9d55; border-color: #1f9d55; color: #fff; }

/* 티어표 */
.tier-0 { --tier: #d4533a; }
.tier-1 { --tier: #e8854a; }
.tier-2 { --tier: #e5b443; }
.tier-3 { --tier: #7fb456; }
.tier-4 { --tier: #4f93cf; }
.tier-5 { --tier: #8b7fc4; }
.tier-6 { --tier: #e25b8a; }
.tier-7 { --tier: #14949a; }
.tier-8 { --tier: #4a56c8; }
.tier-9 { --tier: #6b6b6b; }

.tier-page { display: grid; gap: 12px; width: min(1120px, 100%); margin: 0 auto; min-width: 0; }
.tier-page [hidden] { display: none !important; }
.tier-head { display: flex; align-items: center; gap: 12px; }
.tier-heading { flex: 1; min-width: 0; }
.tier-heading .eyebrow { margin: 0; }
.tier-heading h1 { margin: 0; font-size: 22px; line-height: 1.3; letter-spacing: -0.04em; }
.tier-maker { display: grid; gap: 10px; min-width: 0; }
.tier-board-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tier-progress { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--muted); }

.tier-board {
  display: grid;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: var(--line);
}
.tier-row {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  min-height: 84px;
  background: #f4f4f4;
}
.tier-page.is-edit .tier-row { grid-template-columns: 88px minmax(0, 1fr) auto; }
.tier-board.is-crowd .tier-row { background: #f1f4f9; }
.tier-label {
  display: grid;
  place-items: center;
  background: var(--tier);
  color: #fff;
  min-width: 0;
}
.tier-label-btn, .tier-label-input {
  width: 100%;
  height: 100%;
  min-height: 84px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.04em;
  text-align: center;
}
.tier-label-btn:disabled { opacity: 1; cursor: default; color: #fff; }
.tier-label-btn:not(:disabled) { cursor: pointer; }
.tier-label-btn.is-long, .tier-label-input {
  font-size: 16px;
  line-height: 1.15;
  padding: 4px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.tier-label-input { font-size: 18px; }

.tier-create {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  background: #fafafa;
}
.tier-create-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.tier-create-head .muted { font-size: 13px; font-weight: 700; }
.tier-create-row, .tier-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tier-make-name {
  flex: 1 1 160px;
  min-width: 0;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.tier-create .tier-swatches { width: auto; }
.tier-create .btn { min-height: 40px; }
.tier-zone, .tier-pool {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  align-items: flex-start;
  gap: 4px;
  padding: 6px;
  min-width: 0;
  min-height: 84px;
}
.tier-row.is-over, .tier-zone.is-over, .tier-pool.is-over { box-shadow: inset 0 0 0 3px var(--tier, var(--ink)); }
.tier-item {
  position: relative;
  display: grid;
  width: 80px;
  min-height: 80px;
  padding: 0;
  border: 0;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
div.tier-item { cursor: default; }
.tier-item .face.tiny {
  width: 80px;
  height: 80px;
  min-height: 80px;
  border-radius: 10px;
}
.tier-item.is-on .face, .tier-item:hover .face { box-shadow: 0 0 0 2px var(--ink); }
div.tier-item:hover .face { box-shadow: none; }
.tier-item.is-source { opacity: 0.35; }
.tier-item-name {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 80px;
  padding: 12px 4px 4px;
  border-radius: 0 0 10px 10px;
  background: linear-gradient(180deg, transparent, rgba(16, 12, 8, 0.78));
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}
.tier-insert {
  width: 4px;
  align-self: stretch;
  min-height: 72px;
  border-radius: 99px;
  background: var(--ink);
}
.tier-ghost {
  position: fixed;
  z-index: 40;
  margin: 0;
  transform: translate(-50%, -50%) scale(1.06);
  pointer-events: none;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.22));
}
body.is-tier-drag { cursor: grabbing; user-select: none; }

.tier-row-tools {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 4px;
  padding: 6px 8px;
  background: #ececec;
}
.tier-swatches { display: flex; flex-wrap: wrap; gap: 3px; width: 84px; }
.tier-swatch {
  width: 14px;
  height: 14px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 50%;
  background: var(--swatch);
  cursor: pointer;
}
.tier-swatch.is-on { border-color: #fff; box-shadow: 0 0 0 2px var(--ink); }
.tier-row-btn { width: 28px; height: 28px; }
.tier-row-btn .icon { width: 16px; height: 16px; }

.tier-tray { display: grid; gap: 8px; }
.tier-tray-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.tier-tray-head .btn { min-height: 34px; padding: 6px 12px; }
.tier-pool {
  border: 1px dashed var(--line);
  border-radius: 18px;
  background: #fafafa;
  min-height: 96px;
}
.tier-pool-empty { margin: auto; color: var(--muted); font-weight: 700; }

.tier-pickbar {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
}
.tier-pick-hint { margin: 0; grid-column: 1 / -1; }
.tier-pick-face .face.tiny { width: 80px; height: 80px; min-height: 80px; border-radius: 14px; }
.tier-pick-side { min-width: 0; }
.tier-pick-side .eyebrow { margin: 0; }
.tier-pick-name { margin: 2px 0 10px; font-size: 20px; letter-spacing: -0.04em; overflow-wrap: anywhere; }
.tier-picks { display: grid; grid-template-columns: repeat(auto-fit, minmax(52px, 1fr)); gap: 6px; }
.live-tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(52px, 1fr)); gap: 8px; }
.tier-pick, .live-tier {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  min-height: 56px;
  padding: 6px 2px;
  border: 0;
  border-radius: 14px;
  background: var(--tier);
  color: #fff;
  overflow: hidden;
  cursor: pointer;
}
div.live-tier { cursor: default; }
.tier-pick::before, .live-tier::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--share, 0%);
  background: rgba(0, 0, 0, 0.28);
  transition: height 0.25s ease;
}
.tier-pick b, .live-tier b { position: relative; max-width: 100%; font-size: clamp(14px, 2vw, 22px); font-weight: 900; line-height: 1.1; overflow-wrap: anywhere; }
.tier-pick-live, .live-tier span { position: relative; font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tier-pick:hover { filter: brightness(1.06); }
.tier-pick.is-lead, .live-tier.is-picked { box-shadow: inset 0 0 0 3px var(--ink); }
.live-tiers:has(.is-picked) .live-tier:not(.is-picked) { opacity: 0.55; }
.tier-pick-tools, .tier-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tier-pick-tools { margin-top: 8px; }
.tier-tools .btn { min-height: 40px; }
.tier-tools .btn[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.tier-keys { font-size: 13px; font-weight: 700; }

.tier-setup, .tier-done {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 28px 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  text-align: center;
}
.tier-setup h2, .tier-done h2, .tier-setup p, .tier-done p { margin: 0; }
.tier-setup { width: min(520px, 100%); margin: 0 auto; }
.tier-sizes { flex-wrap: wrap; justify-content: center; }
.tier-done .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 0; }
.live-subject { width: min(220px, 64%); }
.live-subject .live-option .face { aspect-ratio: 1; }

@media (max-width: 720px) {
  .tier-picks, .live-tiers { gap: 5px; }
  .tier-pick, .live-tier { min-height: 52px; border-radius: 12px; }
  .tier-pick b, .live-tier b { font-size: 20px; }
  .tier-row { grid-template-columns: 52px 1fr; min-height: 68px; }
  .tier-page.is-edit .tier-row { grid-template-columns: 52px 1fr; }
  .tier-page.is-edit .tier-row-tools {
    grid-column: 1 / -1;
    grid-template-columns: 1fr auto auto auto auto;
    justify-items: start;
    padding: 8px;
  }
  .tier-swatches { width: auto; }
  .tier-label-btn, .tier-label-input { min-height: 68px; font-size: 22px; }
  .tier-item, .tier-item-name { width: 64px; max-width: 64px; min-height: 64px; }
  .tier-item .face.tiny { width: 64px; height: 64px; min-height: 64px; }
  .tier-pickbar { grid-template-columns: 64px 1fr; }
  .tier-pick-face .face.tiny { width: 64px; height: 64px; min-height: 64px; }
  .tier-tools .btn { flex: 1; min-height: 42px; }
  .live-url { font-size: 18px; }
  .live-strip .live-stop { margin-left: 0; }
  .stream-mark { padding: 5px 10px 5px 8px; }
  .stream-mark b { font-size: 16px; }
}
/* 파티게임 */
.party-page { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.party-join-panel {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fafafa;
}
.party-join-panel { width: min(520px, 100%); grid-template-columns: minmax(0, 1fr); }
.party-join { display: grid; gap: 6px; }
.party-join .live-code-input { width: 100%; }
.party-join .form-error:empty { display: none; }
.party-join .live-code-input { font-size: 22px; padding: 10px 14px; }
.party-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: step; }
.party-steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 34px 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.party-steps li::before {
  content: counter(step);
  grid-row: span 2;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
}
.party-steps span { color: var(--muted); font-size: 14px; }
.party-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.party-create, .party-match { padding: 14px 28px; font-size: 17px; }
.party-dead { padding-top: 24px; }
.party-name-input { flex: 1; min-width: 0; font-size: 18px; font-weight: 700; }

.party-room { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.party-top { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.party-code {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #f4f4f4;
}
.party-code small { color: var(--muted); font-size: 12px; font-weight: 800; }
.party-code b { font-size: 18px; letter-spacing: 0.18em; }
.party-invite-btn { gap: 6px; }
.party-invite-btn .icon { width: 18px; height: 18px; }
.party-status { margin-left: auto; color: var(--muted); font-weight: 800; font-size: 14px; }
.party-timer {
  min-width: 52px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  text-align: center;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}
.party-timer[hidden] { display: none; }
.party-timer.low { background: var(--red); }

.party-main { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; align-items: start; }
.party-stage, .party-game { display: grid; gap: 10px; min-width: 0; }
.party-word-wrap { position: relative; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.party-word {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 56px;
  padding: 8px 14px;
  font-weight: 800;
  font-size: 17px;
  text-align: center;
}
.party-word small { color: var(--muted); font-size: 13px; }
.party-answer { font-size: 24px; letter-spacing: 0.04em; color: var(--red-deep); }
.party-hint { display: inline-flex; gap: 5px; }
.party-hint i {
  font-style: normal;
  width: 34px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #f1f1f1;
  font-size: 20px;
}
.party-hint i.gap { width: 10px; background: transparent; }
.party-bar { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--red); transition: width 0.25s linear; }
.party-bar[hidden] { display: none; }
.party-board {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
}
.catch-canvas { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; touch-action: none; background: #fff; }
.catch-canvas.can-draw { cursor: crosshair; }
.party-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.9);
  text-align: center;
  overflow-y: auto;
}
.party-overlay[hidden] { display: none; }
.party-overlay-box { display: grid; gap: 12px; justify-items: center; width: min(440px, 100%); }
.party-overlay-box > strong { font-size: 24px; }
.party-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; }
.party-choices button {
  padding: 18px 8px;
  border: 2px solid var(--ink);
  border-radius: 16px;
  background: #fff;
  font-size: 19px;
  font-weight: 800;
  cursor: pointer;
}
.party-choices button:hover, .party-choices button:focus-visible { background: var(--ink); color: #fff; }
.party-reveal-word { font-size: 40px !important; color: var(--red-deep); letter-spacing: 0.04em; }
.party-gains, .party-ranking { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; width: 100%; }
.party-gains li, .party-ranking li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 12px;
  background: #f4f4f4;
  font-weight: 700;
}
.party-gains b, .party-ranking b { margin-left: auto; font-variant-numeric: tabular-nums; }
.party-gains b { color: #1f6b3a; }
.party-ranking em { font-style: normal; font-weight: 800; width: 22px; text-align: center; color: var(--muted); }
.party-ranking li.first { background: #fde8e2; }
.party-ranking li.first em { color: var(--red-deep); }
.party-end-title { font-size: 28px !important; }

.party-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.party-tools[hidden] { display: none; }
.party-colors { display: flex; flex-wrap: wrap; gap: 5px; }
.party-color {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line);
  cursor: pointer;
}
.party-color[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ink); }
.party-sizes button { width: 40px; height: 32px; padding: 0; display: inline-grid; place-items: center; }
.party-sizes .party-eraser { width: auto; padding: 0 12px; }
.party-dot { display: block; border-radius: 50%; background: currentColor; }
.party-tool-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.party-tool-actions .btn { padding: 8px 12px; font-size: 14px; }

.party-lobby { display: grid; gap: 16px; padding: 20px; border: 1px solid var(--line); border-radius: 22px; }
.party-lobby-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.party-lobby-head h1 { margin: 0 0 4px; font-size: 26px; }
.party-lobby-head p { margin: 0; }
.party-lobby-head .btn { flex: none; padding: 8px 12px; font-size: 14px; }
.party-invite { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 14px; border-radius: 16px; background: #f4f4f4; }
.party-invite code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 700; }
.party-setting { display: grid; gap: 6px; justify-items: start; }
.party-setting .seg { border-radius: 20px; }
.party-setting .seg button:disabled { cursor: default; }
.party-setting .seg button:disabled:not([aria-pressed="true"]) { opacity: 0.6; }
.party-start { justify-self: start; padding: 14px 32px; font-size: 17px; }
.party-wait { margin: 0; color: var(--muted); font-weight: 800; }

.party-side { display: grid; gap: 12px; min-width: 0; }
.party-players { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.party-player {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 12px;
  background: #f6f6f6;
  font-weight: 700;
}
.party-player-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.party-player b { margin-left: auto; font-variant-numeric: tabular-nums; }
.party-player.is-drawer { background: #fde8e2; }
.party-player.is-guessed { background: #e4f6e8; }
.party-player.is-off { opacity: 0.45; }
.party-tag { flex: none; padding: 2px 6px; border-radius: 999px; background: #fff; color: var(--muted); font-size: 11px; font-weight: 800; }
.party-tag.mine { background: var(--ink); color: #fff; }
.party-mark { flex: none; padding: 2px 6px; border-radius: 6px; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; }
.party-mark.ok { background: #2f9d5c; }
.party-chat {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  height: 420px;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}
.party-log {
  list-style: none;
  margin: 0;
  padding: 10px 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.party-line b { margin-right: 6px; }
.party-line.is-system { color: var(--muted); font-size: 13px; }
.party-line.is-correct { color: #1f6b3a; font-weight: 800; }
.party-line.is-close { color: #a35b00; font-weight: 700; }
.party-line.is-known { padding: 2px 6px; border-radius: 8px; background: #eef7f1; }
.party-chat-form { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--line); }
.party-chat-form input { flex: 1; min-width: 0; padding: 9px 12px; }
.party-chat-form.is-guess input { border-color: var(--ink); }

.party-table { display: grid; gap: 14px; align-content: start; }
.party-table-head { display: grid; gap: 6px; }
.party-table-head strong { font-size: 22px; }
.party-table-head p { margin: 0; font-weight: 700; }
.party-table .party-bar { position: static; height: 6px; border-radius: 999px; }
.party-role-card { display: grid; gap: 4px; padding: 16px 18px; border-radius: 18px; background: #f6f1ea; }
.party-role-card small { color: var(--muted); font-weight: 800; }
.party-role-card strong { font-size: 28px; }
.party-role-card p { margin: 0; }
.party-role-card.is-mafia { background: #fde8e2; }
.party-role-card.is-police { background: #e7f0ff; }
.party-role-card.is-doctor { background: #e5f6ea; }
.party-role-card.is-liar { background: #f3e8ff; }
.party-role-card.is-citizen { background: #f4f4f4; }
.party-report { font-weight: 800; }
.party-action { display: grid; gap: 8px; }
.party-action p { margin: 0; }
.party-hint-form { display: flex; gap: 8px; }
.party-hint-form input { flex: 1; min-width: 0; padding: 12px 14px; }
.party-targets { display: flex; flex-wrap: wrap; gap: 8px; }
.party-targets button { padding: 12px 16px; border: 2px solid var(--ink); border-radius: 14px; background: #fff; font-weight: 800; cursor: pointer; }
.party-targets button:hover, .party-targets button:focus-visible { background: var(--ink); color: #fff; }
.party-hints { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.party-hints li { display: flex; gap: 8px; align-items: baseline; padding: 8px 12px; border-radius: 12px; background: #f6f6f6; }
.party-hints b { flex: none; }
.party-player.is-dead { opacity: 0.55; }
.party-table .party-overlay-box { position: static; padding: 8px 0 0; }

@media (max-width: 900px) {
  .party-main { grid-template-columns: 1fr; }
  .party-side { grid-template-rows: auto auto; }
  .party-chat { order: -1; height: 260px; }
  .party-players { display: flex; flex-wrap: wrap; }
  .party-player { flex: 1 1 140px; }
}

@media (max-width: 720px) {
  .party-top { gap: 6px; }
  .party-code { padding: 6px 10px; }
  .party-code b { font-size: 16px; }
  .party-invite-btn span { display: none; }
  .party-invite-btn { width: 40px; height: 40px; padding: 0; margin-right: auto; }
  .party-status { order: 5; width: 100%; margin-left: 0; font-size: 13px; }
  .party-hint i { width: 28px; height: 32px; font-size: 17px; }
  .party-choices button { padding: 14px 4px; font-size: 16px; }
  .party-reveal-word { font-size: 32px !important; }
  .party-overlay { padding: 12px; }
  .party-overlay-box { gap: 8px; }
  .party-lobby { padding: 16px; }
  .party-tool-actions { margin-left: 0; }
}

@media (max-width: 420px) {
  .modes a { padding: 9px 8px; }
}
