:root {
  color-scheme: light;
  --bg: #f3f0e7;
  --surface: #fffdf8;
  --surface-2: #f8f4ea;
  --paper: #eee8da;
  --ink: #15233a;
  --muted: #697386;
  --line: #ddd6c7;
  --line-strong: #c9c0ae;
  --accent: #3157d5;
  --accent-soft: #e8edff;
  --urgent: #d94a35;
  --urgent-soft: #fff0eb;
  --success: #16745a;
  --shadow: 0 18px 48px rgba(51, 45, 31, .09);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); scroll-behavior: smooth; }
body {
  min-height: 100%;
  margin: 0;
  background:
    radial-gradient(circle at 8% 0%, rgba(255, 255, 255, .96), transparent 28rem),
    linear-gradient(rgba(49, 87, 213, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(49, 87, 213, .025) 1px, transparent 1px),
    var(--bg);
  background-size: auto, 24px 24px, 24px 24px, auto;
  color: var(--ink);
  font-family: Pretendard, SUIT, "Noto Sans KR", "Malgun Gothic", Arial, sans-serif;
  font-size: 14px;
  letter-spacing: -.015em;
}

button, input, select { font: inherit; }
button, select { cursor: pointer; }
button { transition: transform 130ms ease, color 180ms ease, background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease; }
button:hover:not(:disabled) { transform: translateY(-1px); }
button:active:not(:disabled) { transform: translateY(1px) scale(.985); }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, a:focus-visible {
  outline: 3px solid rgba(49, 87, 213, .3);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 50;
  padding: 10px 14px;
  background: var(--ink);
  color: white;
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

body:not([data-role="admin"]) .admin-only,
body[data-role="admin"][data-authenticated="false"] .admin-only,
body[data-role="admin"] .non-admin-only { display: none !important; }
body:not([data-role="admin"]) .topnav a[href="/admin"] { display: none; }
body[data-role="watch"] .page-identity,
body[data-role="watch"] .topnav { display: none; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 72px;
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, .94);
  box-shadow: 0 8px 26px rgba(43, 39, 28, .05);
  backdrop-filter: blur(14px);
}

.brand {
  min-width: 226px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 22px;
  border-right: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  font: italic 800 25px/1 "Arial Narrow", Impact, sans-serif;
  letter-spacing: -.025em;
}
.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: white;
  font: normal 800 12px/1 Arial, sans-serif;
  letter-spacing: .05em;
  transform: skew(-5deg);
}
.brand i { color: var(--accent); font-style: inherit; }

.page-identity {
  min-width: 248px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 0 22px;
}
.page-identity strong { font-size: 12px; font-weight: 600; }
.role-label { color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .08em; }

.topnav { display: flex; align-items: center; gap: 3px; margin-left: 4px; }
.topnav a {
  padding: 9px 11px;
  border-radius: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
.topnav a:hover { background: var(--surface-2); color: var(--ink); }
.topnav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }

.topbar-meta {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 20px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.connection { display: flex; align-items: center; gap: 7px; }
.connection i { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(22, 116, 90, .12); }

.auction-shell {
  width: min(1600px, calc(100% - 28px));
  min-height: calc(100dvh - 100px);
  margin: 14px auto 28px;
}
.workspace-content {
  min-width: 0;
  display: grid;
  grid-template-columns: 228px minmax(620px, 1fr) 286px;
  grid-template-areas: "teams stage tape" "admin admin admin";
  gap: 12px;
}
.admin-sidebar { display: none; }
.panel {
  min-width: 0;
  background: rgba(255, 253, 248, .98);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.teams-rail { grid-area: teams; border-radius: 8px 3px 3px 8px; }
.auction-stage { grid-area: stage; border-radius: 3px; }
.bid-tape { grid-area: tape; min-height: 700px; display: flex; flex-direction: column; border-radius: 3px 8px 8px 3px; }

body[data-role="admin"][data-authenticated="true"] .auction-shell {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}
body[data-role="admin"][data-authenticated="true"] .admin-sidebar {
  position: sticky;
  top: 86px;
  min-height: min(660px, calc(100dvh - 104px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ink);
  color: white;
  box-shadow: 0 18px 48px rgba(21, 35, 58, .16);
}
.admin-sidebar-heading { padding: 22px 18px 18px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.admin-sidebar-heading .eyebrow { color: #91a8ff; }
.admin-sidebar-heading h2 { margin: 8px 0 0; font-size: 20px; letter-spacing: -.04em; }
.admin-sidebar-heading p { margin: 7px 0 0; color: #aeb8c8; font-size: 10px; line-height: 1.5; }
.admin-menu { display: grid; gap: 3px; padding: 9px; }
.admin-menu button {
  position: relative;
  min-height: 76px;
  display: grid;
  grid-template-columns: 25px 1fr;
  grid-template-rows: auto auto;
  align-content: center;
  gap: 5px 8px;
  padding: 10px 28px 10px 10px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: #d7deea;
  text-align: left;
}
.admin-menu button:hover { border-color: rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .06); }
.admin-menu button[aria-current="page"] { border-color: rgba(145, 168, 255, .32); background: #23365c; color: white; }
.admin-menu button > span { grid-row: 1 / 3; align-self: center; color: #7f8da3; font: 800 10px/1 Arial, sans-serif; }
.admin-menu button[aria-current="page"] > span { color: #91a8ff; }
.admin-menu b { font-size: 12px; }
.admin-menu small { color: #8e9aab; font-size: 9px; font-weight: 500; }
.admin-menu em { position: absolute; top: 12px; right: 10px; min-width: 19px; padding: 3px 5px; background: rgba(255, 255, 255, .09); color: #b9c7f8; font: normal 800 8px/1 Arial, sans-serif; text-align: center; }
.admin-sidebar-foot { display: flex; justify-content: space-between; margin-top: auto; padding: 15px 17px; border-top: 1px solid rgba(255, 255, 255, .1); color: #8290a4; font-size: 9px; letter-spacing: .08em; }
.admin-sidebar-foot strong { color: #dce3ef; font-variant-numeric: tabular-nums; }

body[data-role="admin"] .workspace-content > .teams-rail,
body[data-role="admin"] .workspace-content > .auction-stage,
body[data-role="admin"] .workspace-content > .bid-tape,
body[data-role="admin"] .workspace-content > .admin-operations { display: none; }
body[data-role="admin"][data-admin-view="auction"] .workspace-content > .teams-rail { display: block; }
body[data-role="admin"][data-admin-view="auction"] .workspace-content > .auction-stage { display: block; }
body[data-role="admin"][data-admin-view="auction"] .workspace-content > .bid-tape { display: flex; }
body[data-role="admin"][data-admin-view="teams"] .workspace-content { grid-template-columns: minmax(230px, .55fr) minmax(540px, 1.45fr); grid-template-areas: "teams admin"; }
body[data-role="admin"][data-admin-view="teams"] .workspace-content > .teams-rail { display: block; }
body[data-role="admin"][data-admin-view="teams"] .workspace-content > .admin-operations,
body[data-role="admin"][data-admin-view="players"] .workspace-content > .admin-operations,
body[data-role="admin"][data-admin-view="settings"] .workspace-content > .admin-operations { display: grid; }
body[data-role="admin"][data-admin-view="players"] .workspace-content,
body[data-role="admin"][data-admin-view="settings"] .workspace-content { grid-template-columns: minmax(0, 1fr); grid-template-areas: "admin"; }

.eyebrow { color: var(--accent); font: 800 9px/1 Arial, sans-serif; letter-spacing: .16em; }
.rail-heading, .tape-heading {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.rail-heading h2, .tape-heading h2, .bid-area-heading h2 { margin: 5px 0 0; font-size: 16px; letter-spacing: -.03em; }
.rail-heading > span { color: var(--muted); font: 800 10px/1 Arial, sans-serif; letter-spacing: .08em; }

.teams-list { min-height: calc(100% - 64px); }
.teams-empty { min-height: 180px; display: grid; place-content: center; gap: 7px; padding: 24px; color: var(--muted); text-align: center; }
.teams-empty strong { color: var(--ink); font-size: 13px; }
.teams-empty span { font-size: 10px; }
.team-card {
  position: relative;
  min-height: 88px;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 9px;
  padding: 15px 12px 12px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.team-card:last-child { border-bottom: 0; }
.team-card::before { content: ""; position: absolute; inset: 10px auto 10px 0; width: 3px; background: var(--line-strong); }
.team-card.leading { background: var(--accent-soft); }
.team-card.leading::before { background: var(--accent); }
.team-card.leading .team-number, .team-card.leading h3, .team-card.leading .team-budget strong { color: var(--accent); }
.team-card.mine { box-shadow: inset 0 0 0 2px var(--accent); }
.team-number { padding-top: 1px; color: #8a91a0; font: 800 23px/1 "Arial Narrow", Impact, sans-serif; text-align: center; }
.team-copy { min-width: 0; }
.team-copy h3 { margin: 0; overflow: hidden; font-size: 14px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.team-copy > p { margin: 6px 0 0; color: var(--muted); font-size: 10px; }
.team-budget { position: absolute; top: 44px; right: 12px; text-align: right; }
.team-budget span { display: block; margin-bottom: 3px; color: var(--muted); font-size: 9px; }
.team-budget strong { font: 800 17px/1 "Arial Narrow", Arial, sans-serif; font-variant-numeric: tabular-nums; }
.won-members { display: grid; gap: 6px; margin: 28px 0 2px; padding: 9px 0 0; border-top: 1px solid var(--line); list-style: none; }
.won-members li { min-width: 0; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 6px; font-size: 9px; }
.won-members b { color: var(--accent); font-size: 8px; }
.won-members span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.won-members em { color: var(--muted); font-size: 8px; font-style: normal; font-variant-numeric: tabular-nums; }
.stage-toolbar {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.lot-label { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.lot-label span { color: var(--muted); font: 800 10px/1 Arial, sans-serif; letter-spacing: .14em; }
.lot-label strong { font: 800 20px/1 "Arial Narrow", Impact, sans-serif; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.search-form { display: grid; grid-template-columns: 60px minmax(160px, 235px) auto; gap: 6px; }
.search-form select, .search-form input, .search-form button { height: 38px; }
.search-form select, .search-form input { padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 4px; background: white; color: var(--ink); }
.search-form button { padding: 0 14px; border: 1px solid var(--accent); border-radius: 4px; background: var(--accent); color: white; font-size: 12px; font-weight: 800; box-shadow: 0 7px 18px rgba(49, 87, 213, .17); }
.search-form button:disabled { opacity: .5; cursor: wait; }
.shared-note { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; }
.shared-note i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.lookup-status { min-height: 30px; padding: 8px 22px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.lookup-status.loading { color: #a76d00; }
.lookup-status.error { color: var(--urgent); }
.lookup-status.success { color: var(--success); }

.player-hero { padding: 20px 30px 22px; border-bottom: 1px solid var(--line); }
.player-kicker { margin-bottom: 9px; color: var(--muted); font-size: 11px; }
.player-title-row { display: flex; align-items: baseline; gap: 16px; min-width: 0; }
.player-title-row h1 { min-width: 0; margin: 0; overflow: hidden; font-size: clamp(34px, 4vw, 61px); font-weight: 850; line-height: .98; letter-spacing: -.06em; text-overflow: ellipsis; white-space: nowrap; text-wrap: balance; }
.player-title-row > strong { padding: 5px 9px; background: var(--ink); color: white; font: 800 clamp(13px, 1.4vw, 18px)/1 Arial, sans-serif; letter-spacing: .05em; transform: skew(-4deg); }
.player-stats { display: flex; align-items: center; gap: 17px; margin-top: 17px; color: #3f4a5c; font-variant-numeric: tabular-nums; }
.player-stats i { width: 1px; height: 16px; background: var(--line); }
.player-stats small { margin-left: 6px; color: var(--muted); font-size: 10px; }
.opgg-open { margin-top: 18px; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: 3px; background: white; color: var(--ink); font-size: 11px; font-weight: 800; }
.opgg-open:hover { border-color: var(--accent); color: var(--accent); }
.opgg-open span { margin-left: 6px; color: var(--accent); }

.auction-focus { min-height: 244px; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(235px, .65fr); border-bottom: 1px solid var(--line); }
.price-zone, .clock-zone { padding: 24px 30px 21px; }
.price-zone { background: linear-gradient(120deg, white, #f8faff); }
.clock-zone { border-left: 1px solid var(--line); background: var(--surface-2); }
.focus-label { display: block; color: var(--muted); font-size: 12px; font-weight: 700; }
#currentBid { display: block; margin-top: 4px; color: var(--accent); font: 900 clamp(88px, 9.6vw, 148px)/.88 Impact, "Arial Narrow", sans-serif; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
#currentBid i { font-size: .38em; font-style: normal; }
#currentBid.price-pop { animation: price-pop 340ms ease-out; }
.leader-flag { width: min(390px, 94%); min-height: 42px; display: flex; align-items: center; margin-top: 12px; padding: 0 16px; border-left: 4px solid var(--line-strong); background: var(--surface-2); color: var(--muted); font-weight: 800; }
.leader-flag.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
#timer { display: block; margin-top: 24px; color: var(--ink); font: 900 clamp(59px, 6.5vw, 91px)/.9 Impact, "Arial Narrow", sans-serif; letter-spacing: .015em; font-variant-numeric: tabular-nums; }
#timer.urgent { color: var(--urgent); animation: urgent-pulse 900ms ease-in-out infinite; }
.availability { min-height: 40px; display: grid; place-items: center; margin-top: 19px; border: 1px solid var(--line-strong); background: white; color: var(--muted); font-weight: 800; }
body[data-auction="running"] .availability { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
body[data-auction="paused"] .availability { border-color: #b7791f; background: #fff7df; color: #8a5a12; }
body[data-auction="sold"] .availability { border-color: var(--success); color: var(--success); }
body[data-auction="unsold"] .availability { border-color: var(--urgent); color: var(--urgent); }
.countdown-track { height: 6px; margin-top: 16px; background: var(--paper); overflow: hidden; }
.countdown-track i { display: block; width: 100%; height: 100%; background: var(--accent); transform-origin: left; }
#timer.urgent + .availability + .countdown-track i { background: var(--urgent); }

.bid-area { border-bottom: 1px solid var(--line); background: #fbf9f3; }
.bid-area-heading { min-height: 58px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; }
.bid-area-heading p { margin: 0; color: var(--muted); font-size: 10px; }
.bid-paddles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 0 16px 16px; }
.bid-seat { min-width: 0; padding: 14px 12px; border-top: 3px solid var(--line-strong); background: white; box-shadow: 0 5px 14px rgba(48, 42, 30, .05); }
.bid-seat.leading { border-color: var(--accent); background: var(--accent-soft); }
.seat-head { display: flex; justify-content: space-between; gap: 8px; }
.seat-head span { color: var(--muted); font: 800 20px/1 "Arial Narrow", Arial, sans-serif; }
.seat-head strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.seat-meta { display: flex; justify-content: space-between; margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; }
.seat-meta b { color: var(--ink); font-size: 12px; font-variant-numeric: tabular-nums; }
.bid-seat.leading .seat-meta b, .bid-seat.leading .seat-head strong { color: var(--accent); }

.captain-console { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto minmax(260px, .9fr); align-items: center; gap: 20px; padding: 18px 20px; border: 2px solid var(--accent); background: white; box-shadow: 0 12px 30px rgba(49, 87, 213, .1); }
.captain-copy span { color: var(--muted); font-size: 10px; }
.captain-copy h3 { margin: 5px 0 0; font-size: 21px; letter-spacing: -.04em; }
.team-name-inline { display: grid; grid-template-columns: minmax(120px, 1fr) auto; gap: 5px; margin-top: 11px; }
.team-name-inline input { min-width: 0; height: 33px; padding: 0 8px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-size: 11px; }
.team-name-inline button { height: 33px; padding: 0 10px; border: 1px solid var(--ink); border-radius: 3px; background: var(--ink); color: white; font-size: 10px; font-weight: 800; }
.captain-budget { padding-right: 20px; border-right: 1px solid var(--line); text-align: right; }
.captain-budget span { display: block; color: var(--muted); font-size: 10px; }
.captain-budget strong { display: block; margin-top: 5px; font: 800 25px/1 "Arial Narrow", Arial, sans-serif; font-variant-numeric: tabular-nums; }
.paddle-actions { min-width: 0; }
.paddle-increments { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.paddle-increments button { height: 34px; border: 1px solid var(--line-strong); border-radius: 3px; background: var(--surface-2); color: var(--muted); font-weight: 800; }
.paddle-increments button.selected { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.paddle-bid { width: 100%; min-height: 45px; margin-top: 7px; border: 1px solid var(--accent); border-radius: 3px; background: var(--accent); color: white; font-size: 13px; font-weight: 900; box-shadow: 0 8px 20px rgba(49, 87, 213, .17); }
.paddle-bid:disabled { border-color: var(--line); background: var(--paper); color: #9a958c; box-shadow: none; cursor: not-allowed; }
.custom-bid { margin-top: 9px; padding-top: 9px; border-top: 1px solid var(--line); }
.custom-bid label, .custom-bid small { display: block; color: var(--muted); font-size: 9px; }
.custom-bid div { display: grid; grid-template-columns: minmax(0, 1fr) auto 54px; align-items: center; margin-top: 5px; border: 1px solid var(--line-strong); background: white; }
.custom-bid input { min-width: 0; height: 36px; padding: 0 9px; border: 0; outline: 0; color: var(--ink); font-weight: 800; }
.custom-bid div > span { padding-right: 8px; color: var(--muted); font-size: 9px; }
.custom-bid button { align-self: stretch; border: 0; background: var(--ink); color: white; font-size: 10px; font-weight: 800; }
.custom-bid small { margin-top: 5px; }
.bid-empty { grid-column: 1 / -1; padding: 20px; color: var(--muted); text-align: center; }

.opgg-dialog { width: min(1040px, calc(100% - 32px)); max-height: min(88dvh, 780px); padding: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); box-shadow: 0 32px 90px rgba(28, 32, 45, .28); }
.opgg-dialog::backdrop { background: rgba(21, 35, 58, .42); backdrop-filter: blur(5px); }
.opgg-modal-shell { max-height: min(88dvh, 780px); overflow-y: auto; }
.opgg-modal-header { position: sticky; top: 0; z-index: 2; min-height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; border-bottom: 1px solid var(--line); background: rgba(255, 253, 248, .96); backdrop-filter: blur(12px); }
.opgg-modal-header h2 { margin: 6px 0 0; font-size: 22px; letter-spacing: -.04em; }
.opgg-modal-header button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 3px; background: white; color: var(--muted); font-size: 24px; line-height: 1; }
.opgg-modal-summary { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); background: var(--surface-2); }
.opgg-modal-summary > div { display: grid; grid-template-columns: 1fr auto; gap: 5px 12px; padding: 18px 22px; border-right: 1px solid var(--line); }
.opgg-modal-summary > div:last-child { border-right: 0; }
.opgg-modal-summary span { color: var(--muted); font-size: 10px; font-weight: 700; }
.opgg-modal-summary strong { grid-row: 1 / 3; grid-column: 2; align-self: center; color: var(--accent); font: 850 23px/1 "Arial Narrow", Arial, sans-serif; }
.opgg-modal-summary small { color: var(--ink); font-size: 11px; }
.opgg-content { height: min(62dvh, 600px); display: grid; grid-template-columns: minmax(280px, .7fr) minmax(500px, 1.3fr); }
.opgg-content h3 { margin: 0; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); color: var(--muted); font-size: 10px; font-weight: 700; }
.champion-lists { min-height: 0; display: grid; grid-template-rows: 1fr 1fr; border-right: 1px solid var(--line); }
.champion-strip + .champion-strip { border-top: 7px solid var(--paper); }
.champion-strip, .match-strip { min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.champion-strip ul, .match-strip ol { margin: 0; padding: 0; list-style: none; }
.champion-strip ul, .match-strip ol { overflow-y: auto; }
.champion-strip li { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 11px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.champion-strip img, .match-strip img { width: 52px; height: 52px; border-radius: 5px; object-fit: cover; background: var(--paper); }
.champion-strip li div { min-width: 0; }
.champion-strip li strong, .champion-strip li span { display: block; }
.champion-strip li strong { font-size: 12px; }
.champion-strip li span { margin-top: 5px; color: var(--muted); font-size: 9px; }
.champion-strip li em { color: var(--accent); font-size: 10px; font-style: normal; font-weight: 800; }
.match-strip li { min-width: 0; display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.match-copy { min-width: 0; }
.match-copy strong, .match-copy small { display: block; }
.match-copy strong { margin-top: 5px; font-size: 12px; }
.match-copy small { margin-top: 4px; overflow: hidden; color: #586274; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.queue-badge { padding: 3px 5px; background: var(--accent-soft); color: var(--accent); font-size: 8px; font-weight: 800; }
.match-result { min-width: 46px; text-align: right; }
.match-result b, .match-result time { display: block; }
.match-result b { font-size: 11px; }
.match-result time { margin-top: 7px; color: var(--muted); font-size: 9px; }
.opgg-modal-shell > footer { min-height: 62px; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; border-top: 1px solid var(--line); background: var(--surface-2); }
.opgg-modal-shell > footer span { color: var(--muted); font-size: 10px; }
.opgg-modal-shell > footer button { min-width: 84px; height: 36px; border: 1px solid var(--ink); border-radius: 3px; background: var(--ink); color: white; font-weight: 800; }
.win { color: var(--accent); }
.lose { color: var(--urgent); }
.empty-row { display: block !important; padding: 18px !important; color: var(--muted); text-align: center; }

.auction-badge { padding: 6px 8px; border: 1px solid var(--line-strong); background: white; color: var(--muted); font: 800 10px/1 Arial, sans-serif; letter-spacing: .06em; }
.auction-badge.running { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.auction-badge.paused { border-color: #b7791f; background: #fff7df; color: #8a5a12; }
.auction-badge.sold { border-color: var(--success); color: var(--success); }
.auction-badge.unsold { border-color: var(--urgent); color: var(--urgent); }
.latest-bid { min-height: 150px; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto auto; gap: 4px 10px; padding: 20px 17px; border-bottom: 1px solid var(--line); border-left: 5px solid var(--accent); background: white; animation: float-in 220ms ease-out; }
.latest-bid time { color: var(--muted); font-size: 10px; }
.latest-bid span { color: var(--accent); font-weight: 800; text-align: right; }
.latest-bid strong { grid-column: 1 / -1; color: var(--ink); font: 900 55px/.95 Impact, "Arial Narrow", sans-serif; text-align: right; font-variant-numeric: tabular-nums; }
.latest-bid em { grid-column: 1 / -1; color: var(--accent); font: 800 14px/1 "Arial Narrow", Arial, sans-serif; text-align: right; }
.latest-bid p { grid-column: 1 / -1; align-self: center; color: var(--muted); text-align: center; }
.bid-log { flex: 1; min-height: 170px; max-height: 430px; margin: 0; padding: 0 16px; list-style: none; overflow-y: auto; }
.bid-log li { display: grid; grid-template-columns: 58px 1fr auto; gap: 8px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 11px; }
.bid-log time { color: var(--muted); font-variant-numeric: tabular-nums; }
.bid-log strong { font: 800 15px/1 "Arial Narrow", Arial, sans-serif; font-variant-numeric: tabular-nums; }
.bid-log .empty-log { display: block; color: var(--muted); text-align: center; }
.tape-footer { margin-top: auto; border-top: 1px solid var(--line); background: var(--surface-2); }
.progress-block { padding: 15px 16px; }
.progress-block > div:first-child { display: flex; justify-content: space-between; font-size: 11px; }
.progress-track { height: 6px; margin-top: 10px; background: var(--paper); overflow: hidden; }
.progress-track i { display: block; height: 100%; background: var(--accent); }
.admin-controls { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; padding: 0 16px 16px; }
.admin-controls button { min-height: 43px; border: 1px solid var(--line-strong); border-radius: 3px; background: white; color: var(--ink); font-weight: 800; }
.admin-controls button:first-child { border-color: var(--accent); background: var(--accent); color: white; box-shadow: 0 8px 20px rgba(49, 87, 213, .15); }
.admin-controls button:hover { border-color: var(--accent); }
.admin-controls button[data-control="sold"] { border-color: var(--success); color: var(--success); }
.admin-controls button[data-control="unsold"] { border-color: var(--urgent); color: var(--urgent); }
.admin-controls button[data-control="next"] { grid-column: 1 / -1; }
.admin-operations { grid-area: admin; display: grid; grid-template-columns: 1fr 1fr 2fr; align-items: start; border-radius: 6px; background: white; }
.operations-heading { grid-column: 1 / -1; padding: 17px 20px 13px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.operations-heading h2 { margin: 5px 0 0; font-size: 15px; }
.operations-form { display: grid; gap: 10px; padding: 16px 18px 18px; }
.operations-form + .operations-form { padding-top: 15px; border-top: 1px solid var(--line); }
.team-operations { border-left: 1px solid var(--line); }
.settings-row { display: grid; grid-template-columns: 1fr 105px; align-items: center; gap: 10px; }
.settings-row label, .operations-form > label, .operations-form legend { color: var(--muted); font-size: 10px; font-weight: 700; }
.settings-row label small { display: block; margin-top: 3px; font-size: 8px; font-weight: 500; }
.settings-row > div, .budget-input { display: grid; grid-template-columns: 1fr 24px; align-items: center; border: 1px solid var(--line-strong); background: white; }
.settings-row input, .budget-input input { min-width: 0; height: 34px; padding: 0 7px; border: 0; background: transparent; color: var(--ink); font-variant-numeric: tabular-nums; }
.settings-row > div span, .budget-input span { color: var(--muted); font-size: 9px; }
.operations-form fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.operations-form legend { margin-bottom: 7px; }
.increment-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.increment-options label { position: relative; }
.increment-options input { position: absolute; opacity: 0; pointer-events: none; }
.increment-options span { min-height: 30px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); font-size: 9px; font-weight: 800; cursor: pointer; }
.increment-options input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.operations-form select { height: 35px; padding: 0 8px; border: 1px solid var(--line-strong); background: white; color: var(--ink); }
.team-name-form > input { height: 35px; padding: 0 8px; border: 1px solid var(--line-strong); background: white; color: var(--ink); }
.operations-form > button { min-height: 38px; border: 1px solid var(--ink); border-radius: 3px; background: var(--ink); color: white; font-size: 11px; font-weight: 800; }
.captain-manager { padding: 16px 18px 18px; border-top: 1px solid var(--line); background: var(--surface-2); }
.captain-manager-heading h3 { margin: 5px 0 12px; font-size: 13px; }
.captain-code-guide { margin: -4px 0 12px; padding: 9px 10px; border-left: 3px solid var(--accent); background: var(--accent-soft); color: var(--muted); font-size: 9px; line-height: 1.5; }
.captain-code-guide b { color: var(--accent); }
.captain-create-form { display: grid; gap: 6px; }
.captain-create-form > input { min-width: 0; height: 34px; border: 1px solid var(--line-strong); background: white; }
.captain-create-form > input { padding: 0 8px; color: var(--ink); }
.captain-create-form > button { min-height: 36px; border: 1px solid var(--accent); border-radius: 3px; background: var(--accent); color: white; font-size: 10px; font-weight: 800; }
.captain-access-list { max-height: 230px; margin: 12px 0 0; padding: 0; border: 1px solid var(--line); background: white; list-style: none; overflow-y: auto; }
.captain-access-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto auto; align-items: center; gap: 5px; padding: 9px; border-bottom: 1px solid var(--line); }
.captain-access-list li:last-child { border-bottom: 0; }
.captain-access-list div { min-width: 0; }
.captain-access-list strong, .captain-access-list span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.captain-access-list strong { font-size: 10px; }
.captain-access-list span { margin-top: 4px; color: var(--muted); font-size: 8px; }
.captain-access-list a, .captain-access-list button { min-height: 28px; display: grid; place-items: center; padding: 0 7px; border: 1px solid var(--line); border-radius: 2px; background: white; color: var(--ink); font-size: 8px; font-weight: 800; text-decoration: none; }
.captain-access-list button { border-color: var(--ink); background: var(--ink); color: white; }
.captain-access-list button.secondary { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.captain-access-list button.danger { border-color: color-mix(in srgb, var(--urgent) 45%, white); background: white; color: var(--urgent); }
.captain-access-empty { display: block !important; color: var(--muted); font-size: 9px; text-align: center; }
.team-result-export { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px; border-top: 1px solid var(--line); background: white; }
.team-result-export h3 { margin: 5px 0 0; font-size: 14px; }
.team-result-export p { margin: 7px 0 0; color: var(--muted); font-size: 9px; }
.team-result-actions { display: flex; gap: 6px; }
.team-result-actions button { min-height: 38px; padding: 0 14px; border: 1px solid var(--ink); border-radius: 3px; background: white; color: var(--ink); font-size: 10px; font-weight: 800; }
.team-result-actions button:last-child { border-color: var(--accent); background: var(--accent); color: white; }
.team-result-actions button:disabled { border-color: var(--line); background: var(--paper); color: #9a958c; cursor: not-allowed; }
.candidate-manager { min-height: 100%; padding-bottom: 14px; border-left: 1px solid var(--line); background: var(--surface-2); }
.candidate-heading { display: flex; align-items: flex-end; justify-content: space-between; padding: 16px; }
.candidate-heading h3 { margin: 5px 0 0; font-size: 15px; }
.candidate-heading > strong { color: var(--accent); font: 850 15px/1 "Arial Narrow", Arial, sans-serif; }
.candidate-form { padding-bottom: 14px; }
.candidate-form > input { height: 36px; padding: 0 9px; border: 1px solid var(--line-strong); background: white; color: var(--ink); }
.candidate-fields { display: grid; grid-template-columns: .75fr .9fr 1.35fr; gap: 5px; }
.candidate-fields select { min-width: 0; }
.candidate-price { min-width: 0; display: grid; grid-template-columns: 1fr 22px; align-items: center; border: 1px solid var(--line-strong); background: white; }
.candidate-price input { min-width: 0; height: 33px; padding: 0 6px; border: 0; background: transparent; font-variant-numeric: tabular-nums; }
.candidate-price span { color: var(--muted); font-size: 9px; }
.candidate-import-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; margin: 0 16px 14px; padding: 12px; border: 1px dashed var(--line-strong); background: rgba(255, 255, 255, .72); }
.candidate-import-form > label { grid-column: 1 / -1; color: var(--ink); font-size: 10px; font-weight: 800; }
.candidate-import-form > label small { margin-left: 5px; color: var(--muted); font-size: 8px; font-weight: 500; }
.candidate-import-form input { min-width: 0; color: var(--muted); font-size: 9px; }
.candidate-import-form input::file-selector-button { min-height: 30px; margin-right: 8px; border: 1px solid var(--line); background: white; color: var(--ink); font-size: 9px; font-weight: 700; }
.candidate-import-form > div { display: flex; align-items: center; gap: 5px; }
.candidate-import-form a, .candidate-import-form button { min-height: 31px; display: inline-grid; place-items: center; padding: 0 9px; border: 1px solid var(--ink); border-radius: 2px; background: var(--ink); color: white; font-size: 9px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.candidate-import-form a { border-color: var(--line-strong); background: white; color: var(--ink); }
.candidate-list { max-height: 360px; margin: 0 16px; padding: 0; border: 1px solid var(--line); background: white; list-style: none; overflow-y: auto; }
.candidate-item { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 7px; padding: 10px; border-bottom: 1px solid var(--line); }
.candidate-item:last-child { border-bottom: 0; }
.candidate-item.current { background: var(--accent-soft); box-shadow: inset 3px 0 var(--accent); }
.candidate-order { color: var(--muted); font: 800 10px/1 Arial, sans-serif; }
.candidate-copy { min-width: 0; }
.candidate-copy strong, .candidate-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.candidate-copy strong { font-size: 11px; }
.candidate-copy small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.candidate-state { padding: 4px 5px; background: var(--paper); color: var(--muted); font-size: 8px; font-weight: 800; }
.candidate-item.current .candidate-state { background: var(--accent); color: white; }
.candidate-actions { grid-column: 2 / -1; display: grid; grid-template-columns: 30px 30px 1fr; gap: 4px; }
.candidate-actions button { min-height: 26px; border: 1px solid var(--line); border-radius: 2px; background: white; color: var(--muted); font-size: 9px; font-weight: 800; }
.candidate-actions button:last-child { color: var(--urgent); }
.candidate-actions button:disabled { opacity: .34; cursor: not-allowed; }
.candidate-empty { padding: 18px 10px; color: var(--muted); font-size: 10px; text-align: center; }
.candidate-note { margin: 10px 16px 0; color: var(--muted); font-size: 9px; line-height: 1.5; }

body[data-role="admin"] .admin-operations { grid-template-columns: minmax(0, 1fr); }
body[data-role="admin"] .admin-operations > .operations-form,
body[data-role="admin"] .admin-operations > .team-operations,
body[data-role="admin"] .admin-operations > .candidate-manager { display: none; }
body[data-role="admin"][data-admin-view="settings"] .admin-operations > .operations-form { width: min(560px, 100%); display: grid; }
body[data-role="admin"][data-admin-view="teams"] .admin-operations > .team-operations {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  border-left: 0;
}
body[data-role="admin"][data-admin-view="teams"] .captain-manager { grid-column: 1 / -1; border-top: 0; border-bottom: 1px solid var(--line); }
body[data-role="admin"][data-admin-view="teams"] .team-name-form { padding-top: 16px; border-top: 0; }
body[data-role="admin"][data-admin-view="players"] .admin-operations > .candidate-manager {
  display: grid;
  grid-template-columns: minmax(300px, .6fr) minmax(420px, 1.4fr);
  grid-template-areas: "heading heading" "form list" "import list" "note list";
  align-content: start;
  border-left: 0;
}
body[data-role="admin"][data-admin-view="players"] .candidate-heading { grid-area: heading; }
body[data-role="admin"][data-admin-view="players"] .candidate-form { grid-area: form; }
body[data-role="admin"][data-admin-view="players"] .candidate-import-form { grid-area: import; align-self: start; }
body[data-role="admin"][data-admin-view="players"] .candidate-list { grid-area: list; max-height: 520px; margin: 16px 16px 0 0; }
body[data-role="admin"][data-admin-view="players"] .candidate-note { grid-area: note; }
.watch-notice { margin: 0; padding: 0 16px 17px; color: var(--muted); font-size: 10px; line-height: 1.5; text-align: center; }

.seotda-open {
  min-height: 36px; display: inline-flex; align-items: center; gap: 8px; padding: 0 12px;
  border: 1px solid #b33a32; border-radius: 5px; background: #fff9ef; color: #9e2f29;
  font-size: 10px; font-weight: 850; transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}
.seotda-open:hover { background: #f8ead7; box-shadow: 0 5px 14px rgba(98, 47, 35, .1); transform: translateY(-1px); }
.seotda-open:active { transform: translateY(1px); }
.seotda-open:focus-visible, .seotda-header button:focus-visible, .seotda-dialog button:focus-visible, .seotda-dialog select:focus-visible, .seotda-dialog input:focus-visible { outline: 3px solid rgba(179, 58, 50, .25); outline-offset: 2px; }
.seotda-open span { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 3px; background: #b33a32; color: white; font-size: 8px; transform: rotate(-3deg); }
.seotda-open.attention { animation: urgent-pulse 1s infinite; box-shadow: 0 0 0 4px rgba(179, 58, 50, .13); }

.seotda-dialog { width: min(1000px, calc(100% - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 16px; background: #f0e6d5; color: #19231f; box-shadow: 0 35px 110px rgba(40, 29, 20, .34); overflow: hidden; }
.seotda-dialog::backdrop { background: rgba(29, 27, 23, .58); backdrop-filter: blur(5px); }
.seotda-shell { min-height: min(650px, calc(100dvh - 24px)); max-height: calc(100dvh - 24px); display: flex; flex-direction: column; }
.seotda-header { position: relative; min-height: 104px; display: flex; align-items: center; justify-content: space-between; padding: 21px 28px 23px; border-bottom: 1px solid #d3c5b0; background: #fffaf0; }
.seotda-header::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 3px; background: repeating-linear-gradient(90deg, #b33a32 0 28px, #1f2b27 28px 36px, #d8cbb7 36px 64px); opacity: .72; }
.seotda-header h2 { margin: 5px 0 0; font: 900 32px/.95 "Arial Narrow", Pretendard, sans-serif; letter-spacing: -.06em; }
.seotda-header p { margin: 9px 0 0; color: #716b61; font-size: 10px; }
.seotda-header .eyebrow { color: #a5362f; letter-spacing: .15em; }
.seotda-header-side { display: flex; align-items: center; gap: 14px; }
.seotda-mode { display: inline-flex; align-items: center; gap: 7px; color: #5f665f; font-size: 10px; font-weight: 750; }
.seotda-mode i { width: 7px; height: 7px; border-radius: 50%; background: #b33a32; box-shadow: 0 0 0 4px rgba(179, 58, 50, .12); }
.seotda-header button { width: 40px; height: 40px; border: 1px solid #d3c5b0; border-radius: 50%; background: #fffdf8; color: #19231f; font-size: 24px; transition: transform 180ms ease, background 180ms ease; }
.seotda-header button:hover { background: #f2e5d2; transform: rotate(4deg); }
.seotda-content { flex: 1; padding: 18px 24px 20px; overflow-y: auto; background-color: #eee4d2; background-image: linear-gradient(rgba(61, 70, 58, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(61, 70, 58, .035) 1px, transparent 1px); background-size: 22px 22px; }

.seotda-lobby, .seotda-challenge { display: grid; grid-template-columns: 175px 1fr; gap: 20px; align-items: center; padding: 15px 17px; border-radius: 8px; background: #fffbf4; box-shadow: inset 0 0 0 1px #d8cbb8, 0 8px 22px rgba(79, 58, 36, .06); }
.seotda-lobby.locked, .seotda-lobby.spectator { display: flex; align-items: flex-start; flex-direction: column; gap: 7px; border-left: 4px solid #7e887c; }
.seotda-lobby.spectator p, .seotda-lobby > p { margin: 0; color: #716b61; font-size: 10px; }
.seotda-balance { padding-right: 18px; border-right: 1px solid #ddd0bd; }
.seotda-balance span, .seotda-balance strong { display: block; }
.seotda-balance span { color: #716b61; font-size: 9px; font-weight: 750; }
.seotda-balance strong { margin-top: 7px; font: 900 31px/1 "Arial Narrow", Impact, sans-serif; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.seotda-lobby form { display: grid; grid-template-columns: 1.2fr .8fr .9fr; gap: 9px; align-items: end; }
.seotda-lobby label { color: #716b61; font-size: 9px; font-weight: 750; }
.seotda-lobby select, .seotda-lobby input { width: 100%; height: 42px; margin-top: 6px; padding: 0 10px; border: 1px solid #cbbbA4; border-radius: 3px; background: #fffefb; color: #19231f; font-variant-numeric: tabular-nums; }
.seotda-lobby label > div { display: grid; grid-template-columns: 1fr 28px; align-items: center; }
.seotda-lobby label > div span { align-self: stretch; display: grid; place-items: center; margin-top: 6px; border: 1px solid #cbbba4; border-left: 0; border-radius: 0 3px 3px 0; color: #716b61; background: #f7efe2; }
.seotda-lobby label > div input { border-right: 0; border-radius: 3px 0 0 3px; }
.seotda-lobby form > button, .seotda-challenge-actions button { height: 42px; border: 1px solid #a8322c; border-radius: 4px; background: #fff8ef; color: #9d2f29; font-size: 10px; font-weight: 850; transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease; }
.seotda-lobby form > button { background: #ad3730; color: white; box-shadow: 0 7px 15px rgba(128, 43, 36, .14); }
.seotda-lobby form > button:hover, .seotda-challenge-actions button.primary:hover { background: #922a25; transform: translateY(-1px); }
.seotda-lobby form > button:active, .seotda-challenge-actions button:active { transform: translateY(1px); }
.seotda-lobby form > button:disabled { cursor: not-allowed; opacity: .45; transform: none; }
.seotda-challenge { grid-template-columns: 1fr auto; border-left: 4px solid #b33a32; }
.seotda-challenge h3 { margin: 6px 0; font-size: 20px; letter-spacing: -.025em; }
.seotda-challenge h3 i { padding: 0 8px; color: #b33a32; font: 900 11px/1 Arial, sans-serif; }
.seotda-challenge p { margin: 0; color: #716b61; font-size: 10px; }
.seotda-challenge p b { color: #9f302a; }
.seotda-challenge-actions { display: flex; gap: 7px; align-items: center; }
.seotda-challenge-actions button { min-width: 90px; padding: 0 13px; }
.seotda-challenge-actions button.primary { background: #ad3730; color: white; }
.seotda-challenge-actions span { color: #716b61; font-size: 10px; }

.seotda-result { margin-top: 16px; border: 1px solid #bdc2ad; border-radius: 12px; background: #dfe4d6; box-shadow: 0 16px 34px rgba(56, 65, 51, .12); overflow: hidden; }
.seotda-result-title { min-height: 56px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 20px; background: #27332e; color: #fffdf8; }
.seotda-result-title span { color: #bac4ba; font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.seotda-result-title strong { font-size: 18px; text-align: center; letter-spacing: -.03em; }
.seotda-result-title em { color: #f0c56a; font: normal 850 13px/1 Pretendard, sans-serif; text-align: right; font-variant-numeric: tabular-nums; }
.seotda-result-title button { justify-self: end; min-width: 104px; height: 34px; border: 1px solid #f2d495; border-radius: 3px; background: #f0c56a; color: #27332e; font-size: 10px; font-weight: 900; transition: transform 160ms ease, background 160ms ease; }
.seotda-result-title button:hover { background: #ffda87; transform: translateY(-1px); }
.seotda-result-title button:active { transform: translateY(1px); }
.seotda-table { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 112px minmax(0, 1fr); align-items: stretch; min-height: 310px; background-image: radial-gradient(circle at center, rgba(255,255,255,.44) 0 2px, transparent 3px); background-size: 18px 18px; }
.seotda-hand { min-width: 0; display: grid; grid-template-rows: auto 1fr; gap: 18px; padding: 23px 25px 27px; }
.seotda-hand:last-child { text-align: right; }
.seotda-hand.winner { background: rgba(255, 250, 235, .47); box-shadow: inset 0 -5px #b33a32; }
.seotda-seat { position: relative; min-height: 44px; }
.seotda-seat span, .seotda-seat h3 { display: block; margin: 0; }
.seotda-seat span { color: #637065; font-size: 8px; font-weight: 800; letter-spacing: .08em; }
.seotda-seat h3 { margin-top: 5px; overflow: hidden; font-size: 19px; letter-spacing: -.035em; text-overflow: ellipsis; white-space: nowrap; }
.seotda-seat b { position: absolute; top: 0; right: 0; padding: 5px 7px 4px; border-radius: 2px; background: #b33a32; color: white; font: 900 8px/1 Arial, sans-serif; letter-spacing: .12em; }
.seotda-hand:last-child .seotda-seat b { right: auto; left: 0; }
.seotda-hand-reveal { display: grid; align-content: center; justify-items: center; gap: 14px; }
.seotda-hand-reveal > strong { color: #992d27; font: 900 26px/1 "Arial Narrow", Pretendard, sans-serif; letter-spacing: -.04em; }
.seotda-result.dealt .seotda-hand-reveal > strong { color: #687269; font-size: 12px; letter-spacing: .02em; }
.seotda-pot { z-index: 2; align-self: center; justify-self: center; width: 112px; height: 112px; display: grid; place-content: center; gap: 5px; border: 1px solid #cab995; border-radius: 50%; background: #fff7e7; color: #28332e; text-align: center; box-shadow: 0 11px 25px rgba(47, 54, 43, .17), inset 0 0 0 6px #f1e3c8; }
.seotda-pot span { color: #8a785f; font-size: 8px; font-weight: 850; letter-spacing: .08em; }
.seotda-pot strong { font: 900 22px/1 "Arial Narrow", Pretendard, sans-serif; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.seotda-pot i { color: #a2362f; font: normal 800 8px/1 Pretendard, sans-serif; }
.hwatu-pair { display: flex; gap: 11px; }
.hwatu-card { --flower: #c73931; --leaf: #202722; position: relative; width: 74px; height: 110px; display: block; flex: 0 0 auto; border: 3px solid #20231f; border-radius: 7px; background: radial-gradient(circle at 72% 67%, var(--flower) 0 17px, transparent 18px), linear-gradient(150deg, transparent 43%, var(--leaf) 44% 49%, transparent 50%), repeating-linear-gradient(90deg, rgba(110,85,56,.035) 0 1px, transparent 1px 5px), #fffdf7; box-shadow: 0 7px 13px rgba(44, 39, 30, .2), inset 0 0 0 1px rgba(255,255,255,.8); overflow: hidden; transform: rotate(-1.5deg); }
.hwatu-card:nth-child(2) { transform: rotate(1.5deg) translateY(2px); }
.hwatu-card::before, .hwatu-card::after { content: ""; position: absolute; border-radius: 50%; background: var(--flower); }
.hwatu-card::before { width: 11px; height: 11px; left: 10px; bottom: 21px; box-shadow: 15px -10px 0 var(--flower), 29px 5px 0 var(--flower), 35px -17px 0 var(--flower); }
.hwatu-card::after { width: 30px; height: 5px; right: -7px; top: 28px; transform: rotate(-29deg); background: var(--leaf); }
.hwatu-card.month-2, .hwatu-card.month-6 { --flower: #d55d58; }
.hwatu-card.month-4, .hwatu-card.month-7 { --flower: #b93b32; --leaf: #394b3b; }
.hwatu-card.month-5, .hwatu-card.month-9 { --flower: #d8a332; }
.hwatu-card.month-10 { --flower: #c67c28; --leaf: #263027; }
.hwatu-card i { position: absolute; z-index: 1; top: 7px; left: 8px; color: #aa2f29; font: normal 900 15px/1 Arial, sans-serif; }
.hwatu-card b { position: absolute; z-index: 1; right: 6px; bottom: 6px; display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: #20231f; color: white; font-size: 10px; }
.hwatu-card small { position: absolute; z-index: 1; left: 8px; bottom: 7px; color: #69645d; font-size: 8px; }
.hwatu-card.bright { background: radial-gradient(circle at 55% 48%, #f0bd38 0 22px, #20231f 23px 26px, transparent 27px), linear-gradient(145deg, transparent 44%, #20231f 45% 50%, transparent 51%), repeating-linear-gradient(90deg, rgba(110,85,56,.035) 0 1px, transparent 1px 5px), #fffdf7; }
.hwatu-card.bright b { background: #d8aa2d; color: #18150e; }
.hwatu-card.back { border-color: #f6ead3; background-color: #a7352f; background-image: linear-gradient(45deg, rgba(255,255,255,.08) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.08) 75%), linear-gradient(-45deg, rgba(255,255,255,.08) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.08) 75%); background-position: 0 0, 7px 7px; background-size: 14px 14px; box-shadow: 0 7px 13px rgba(44, 39, 30, .22), inset 0 0 0 3px #a7352f, inset 0 0 0 5px rgba(255,255,255,.72); }
.hwatu-card.back::before { top: 50%; left: 50%; width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.7); border-radius: 50%; background: rgba(120, 29, 25, .42); box-shadow: none; transform: translate(-50%, -50%); }
.hwatu-card.back::after { display: none; }
.hwatu-card.back i { top: 50%; left: 50%; color: #fff3db; font: normal 900 23px/1 serif; transform: translate(-50%, -50%); }
.hwatu-card.back b { right: 7px; bottom: 7px; width: auto; height: auto; border-radius: 0; background: transparent; color: rgba(255,255,255,.78); font: 850 7px/1 Arial, sans-serif; letter-spacing: .1em; }
.seotda-result.revealed .hwatu-card { animation: card-reveal 420ms cubic-bezier(.2,.75,.3,1) both; }
.seotda-result.revealed .hwatu-card:nth-child(2) { animation-delay: 110ms; }
.seotda-empty { margin-top: 16px; min-height: 270px; display: flex; align-items: center; justify-content: center; gap: 18px; border: 1px dashed #c1b39e; border-radius: 12px; background: rgba(255, 251, 242, .58); color: #716b61; text-align: left; }
.seotda-empty-mark { width: 62px; height: 72px; display: grid; place-items: center; border: 3px solid #2a2d27; border-radius: 7px; background: #fffdf7; color: #b33a32; font: 900 25px/1 serif; box-shadow: 4px 5px 0 #cabba4; transform: rotate(-3deg); }
.seotda-empty div { display: grid; gap: 7px; }
.seotda-empty strong { color: #19231f; font-size: 16px; }
.seotda-empty span:last-child { font-size: 10px; }
.seotda-history { margin: 14px 0 0; padding: 0; border-top: 1px solid #cfc1ad; list-style: none; }
.seotda-history li { display: grid; grid-template-columns: 70px 1fr auto; gap: 12px; padding: 10px 3px; border-bottom: 1px solid #d9ccb9; font-size: 9px; }
.seotda-history time { color: #756e64; font-variant-numeric: tabular-nums; }
.seotda-history b { color: #9f302a; }
.seotda-rules { display: flex; align-items: center; gap: 13px; padding: 13px 26px 15px; border-top: 1px solid #d3c5b0; background: #fff8eb; }
.seotda-rules strong { flex: 0 0 auto; color: #9f302a; font-size: 9px; }
.seotda-rules span { color: #716b61; font-size: 9px; line-height: 1.5; }

.access-dialog { width: min(420px, calc(100% - 32px)); padding: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); box-shadow: 0 28px 80px rgba(28, 32, 45, .25); }
.access-dialog::backdrop { background: rgba(21, 35, 58, .38); backdrop-filter: blur(4px); }
.access-dialog form { display: grid; gap: 11px; padding: 30px; }
.access-dialog h2 { margin: 4px 0 0; font-size: 28px; letter-spacing: -.05em; }
.access-dialog p { margin: 0 0 8px; color: var(--muted); line-height: 1.6; }
.access-dialog label { color: var(--muted); font-size: 11px; font-weight: 700; }
.access-dialog input { height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 4px; background: white; color: var(--ink); }
.access-dialog button { height: 46px; border: 0; border-radius: 4px; background: var(--accent); color: white; font-weight: 800; }
.access-dialog a { color: var(--muted); font-size: 11px; text-align: center; }
.access-error { min-height: 18px; color: var(--urgent); font-size: 11px; }
.captain-code-field { display: grid; grid-template-columns: auto 1fr; }
.captain-code-field span { display: grid; place-items: center; padding: 0 11px; border: 1px solid var(--line-strong); border-right: 0; border-radius: 4px 0 0 4px; background: var(--surface-2); color: var(--muted); font-size: 13px; font-weight: 850; }
.captain-code-field input { border-radius: 0 4px 4px 0; font: 850 18px/1 "Arial Narrow", Arial, sans-serif; letter-spacing: .16em; text-transform: uppercase; }

.toast { position: fixed; right: 18px; bottom: 18px; z-index: 20; max-width: 360px; padding: 12px 15px; border: 1px solid var(--line-strong); border-left: 4px solid var(--accent); border-radius: 4px; background: white; box-shadow: var(--shadow); opacity: 0; transform: translateY(8px); pointer-events: none; transition: 180ms ease; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { border-left-color: var(--urgent); color: var(--urgent); }

@keyframes price-pop { 0% { transform: scale(.94); opacity: .55; } 65% { transform: scale(1.025); } 100% { transform: scale(1); opacity: 1; } }
@keyframes urgent-pulse { 50% { opacity: .58; } }
@keyframes float-in { from { transform: translateY(9px); opacity: .3; } to { transform: translateY(0); opacity: 1; } }
@keyframes card-reveal { from { opacity: .15; transform: rotateY(88deg) scale(.92); } to { opacity: 1; } }

@media (max-width: 1420px) {
  body[data-role="admin"][data-admin-view="auction"] .workspace-content { grid-template-columns: minmax(570px, 1fr) 250px; grid-template-areas: "stage tape"; }
  body[data-role="admin"][data-admin-view="auction"] .workspace-content > .teams-rail { display: none; }
}

@media (max-width: 1180px) {
  .page-identity { min-width: 210px; }
  .topnav { display: none; }
  .workspace-content { grid-template-columns: 215px minmax(620px, 1fr); grid-template-areas: "teams stage" "tape tape" "admin admin"; }
  .bid-tape { min-height: 0; display: grid; grid-template-columns: 250px 1fr 230px; }
  .tape-heading { grid-column: 1 / -1; }
  .latest-bid { min-height: 150px; }
  .bid-log { max-height: 210px; }
  .tape-footer { border-top: 0; border-left: 1px solid var(--line); }
  body[data-role="admin"] .bid-tape { display: block; }
  body[data-role="admin"] .tape-footer { border-top: 1px solid var(--line); border-left: 0; }
  body[data-role="admin"][data-admin-view="auction"] .workspace-content { grid-template-columns: minmax(0, 1fr); grid-template-areas: "stage" "tape"; }
  .admin-operations { grid-template-columns: 1fr 1fr; }
  .candidate-manager { grid-column: 1 / -1; border-top: 1px solid var(--line); border-left: 0; }
}

@media (max-width: 820px) {
  .topbar { min-height: 64px; flex-wrap: wrap; }
  .brand { min-width: 160px; padding: 0 14px; }
  .page-identity { flex: 1; min-width: 180px; padding: 0 12px; }
  .topbar-meta { width: 100%; min-height: 42px; margin: 0; padding: 0 14px; border-top: 1px solid var(--line); overflow-x: auto; }
  .auction-shell { width: min(100% - 16px, 720px); margin-top: 8px; }
  .workspace-content { grid-template-columns: 1fr; grid-template-areas: "stage" "tape" "teams" "admin"; }
  body[data-role="admin"][data-authenticated="true"] .auction-shell { display: block; }
  body[data-role="admin"][data-authenticated="true"] .admin-sidebar { position: static; min-height: 0; margin-bottom: 8px; }
  .admin-sidebar-heading, .admin-sidebar-foot { display: none; }
  .admin-menu { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .admin-menu button { min-height: 56px; grid-template-columns: 18px 1fr; padding: 8px; }
  .admin-menu button small, .admin-menu button em { display: none; }
  body[data-role="admin"][data-admin-view="teams"] .workspace-content { grid-template-columns: 1fr; grid-template-areas: "teams" "admin"; }
  body[data-role="admin"][data-admin-view="players"] .workspace-content,
  body[data-role="admin"][data-admin-view="settings"] .workspace-content { grid-template-columns: 1fr; grid-template-areas: "admin"; }
  body[data-role="admin"][data-admin-view="teams"] .admin-operations > .team-operations { grid-template-columns: 1fr; }
  body[data-role="admin"][data-admin-view="teams"] .captain-manager { grid-column: auto; }
  .team-result-export { align-items: stretch; flex-direction: column; }
  .team-result-actions { display: grid; grid-template-columns: 1fr 1fr; }
  body[data-role="admin"][data-admin-view="players"] .admin-operations > .candidate-manager { grid-template-columns: 1fr; grid-template-areas: "heading" "form" "import" "list" "note"; }
  body[data-role="admin"][data-admin-view="players"] .candidate-list { margin: 0 16px; }
  .admin-operations { grid-template-columns: 1fr; }
  .team-operations, .candidate-manager { grid-column: auto; border-top: 1px solid var(--line); border-left: 0; }
  .stage-toolbar { align-items: flex-start; flex-direction: column; padding: 12px; }
  .search-form { width: 100%; grid-template-columns: 56px 1fr auto; }
  .shared-note { min-height: 34px; }
  .player-hero { padding: 18px; }
  .player-title-row h1 { white-space: normal; }
  .player-stats { align-items: flex-start; flex-direction: column; gap: 5px; }
  .player-stats i { display: none; }
  .auction-focus { grid-template-columns: 1fr; }
  .clock-zone { border-top: 1px solid var(--line); border-left: 0; }
  .bid-paddles { grid-template-columns: repeat(2, 1fr); }
  .captain-console { grid-template-columns: 1fr; gap: 14px; }
  .captain-budget { padding: 0; border: 0; text-align: left; }
  .opgg-content { grid-template-columns: 1fr; }
  .opgg-content { height: auto; }
  .champion-lists { border-right: 0; }
  .champion-strip ul, .match-strip ol { max-height: 420px; }
  .opgg-modal-summary { grid-template-columns: 1fr; }
  .opgg-modal-summary > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .opgg-modal-summary > div:last-child { border-bottom: 0; }
  .bid-tape { display: block; }
  .seotda-shell { min-height: 0; }
  .seotda-content { padding: 14px; }
  .seotda-lobby, .seotda-challenge { grid-template-columns: 1fr; }
  .seotda-balance { padding: 0 0 13px; border-right: 0; border-bottom: 1px solid #ddd0bd; }
  .seotda-lobby form { grid-template-columns: 1fr 1fr; }
  .seotda-lobby form > button { grid-column: 1 / -1; }
  .seotda-table { grid-template-columns: 1fr; }
  .seotda-hand:last-child { border-top: 1px solid rgba(81, 93, 76, .16); text-align: left; }
  .seotda-hand:last-child .seotda-seat b { right: 0; left: auto; }
  .seotda-pot { margin: -12px auto; }
}

@media (max-width: 520px) {
  .brand span:last-child { display: none; }
  .brand { min-width: 60px; }
  .page-identity strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar-meta { gap: 12px; }
  .admin-menu { grid-template-columns: repeat(2, 1fr); }
  .search-form { grid-template-columns: 54px 1fr; }
  .search-form button { grid-column: 1 / -1; }
  #currentBid { font-size: 82px; }
  .bid-paddles { grid-template-columns: 1fr; }
  .bid-area-heading { align-items: flex-start; flex-direction: column; gap: 6px; padding: 14px 16px; }
  .opgg-dialog { width: calc(100% - 16px); }
  .opgg-modal-header { padding: 0 15px; }
  .match-strip li { grid-template-columns: 44px 1fr auto; padding: 9px 10px; }
  .match-strip img { width: 44px; height: 44px; }
  .seotda-open { padding: 0 8px; }
  .seotda-open span { display: none; }
  .seotda-header { padding: 16px; }
  .seotda-header-side { gap: 8px; }
  .seotda-mode { display: none; }
  .seotda-lobby form { grid-template-columns: 1fr; }
  .seotda-lobby form > button { grid-column: auto; }
  .seotda-result-title { grid-template-columns: 1fr auto; padding: 0 14px; }
  .seotda-result-title strong { font-size: 15px; text-align: right; }
  .seotda-result-title em { display: none; }
  .seotda-hand { padding: 20px 16px 24px; }
  .hwatu-card { width: 64px; height: 95px; }
  .seotda-empty { min-height: 230px; padding: 20px; }
  .seotda-rules { align-items: flex-start; flex-direction: column; gap: 5px; padding: 12px 16px 14px; }
  .seotda-history li { grid-template-columns: 52px 1fr; }
  .seotda-history b { grid-column: 2; }
}

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

.candidate-shuffle { width: 100%; margin: 6px 0 10px; padding: 10px 12px; border: 0; border-radius: 10px; background: #1f2a44; color: #fff; font-weight: 600; cursor: pointer; }
.candidate-shuffle:hover { opacity: .92; }
