:root {
  color-scheme: dark;
  --bg: #0c0d10;
  --panel: #14151b;
  --line: #32343e;
  --text: #f4f5f8;
  --muted: #b5b7c3;
  --accent: #c3b5ff;
  --green: #8bdaba;
  --amber: #e8b77d;
  font-family: Inter, Pretendard, "Malgun Gothic", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100vh; height: 100dvh; margin: 0; background: var(--bg); color: var(--text); line-height: 1.5; overflow-wrap: anywhere; }
h1, h2, p, dl, dd, ol { margin: 0; }
.masthead { border-bottom: 1px solid var(--line); background: #101115; }
.masthead-inner, main, .entry-bar nav { width: 100%; max-width: 68rem; margin-inline: auto; padding-inline: clamp(1rem, 4vw, 3.2rem); }
.masthead-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4rem; }
.brand { font: italic 900 1.45rem/1 "Arial Black", Inter, sans-serif; letter-spacing: -.055em; }
.connection { font-size: .88rem; color: var(--muted); text-align: end; }
.connection::before { content: ''; display: inline-block; margin-inline-end: .45em; width: .48em; height: .48em; border-radius: 50%; background: var(--muted); vertical-align: .12em; }
.connection[data-connect="on"]::before { background: var(--green); }
.connection[data-connect="off"]::before { background: var(--amber); }
main { overflow-y: auto; padding-top: clamp(1.6rem, 4vw, 3.2rem); padding-bottom: 2.5rem; }
h1 { margin-bottom: 1.5rem; font-size: clamp(1.8rem, 5vw, 3rem); line-height: 1.12; letter-spacing: -.055em; }
noscript { display: block; margin-bottom: 1rem; color: var(--amber); }
.lot, .list-panel { min-width: 0; border: 1px solid var(--line); border-radius: .55rem; background: var(--panel); }
.lot { padding: clamp(1.1rem, 3vw, 2rem); border-top: 3px solid var(--accent); }
.lot-header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 1rem; }
.lot-header h2, dt { font-size: .92rem; font-weight: 600; color: var(--muted); }
#round-state { font-size: .9rem; color: var(--accent); font-weight: 700; }
.player { font-size: clamp(1.75rem, 5vw, 3rem); font-weight: 800; letter-spacing: -.05em; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 1.3rem; padding-top: 1.2rem; gap: 1rem; border-top: 1px solid var(--line); }
.metrics dd { margin-top: .2rem; font-size: clamp(1.15rem, 2.8vw, 1.7rem); font-weight: 700; }
#price, #timer, .amount, time { font-variant-numeric: tabular-nums; }
#price { color: var(--accent); }
.lists { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1rem; }
.list-panel { align-self: start; padding: 1.2rem clamp(1rem, 2.5vw, 1.5rem); }
.list-panel h2 { font-size: 1.15rem; letter-spacing: -.035em; }
.list-panel ol { list-style: none; padding: 0; }
.entry { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: .25rem .65rem; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.entry:last-child { border-bottom: 0; }
.entry .amount { color: var(--accent); font-weight: 700; white-space: nowrap; }
.entry small { grid-column: 1 / -1; color: var(--muted); font-size: .86rem; }
.entry[data-kind="sold"] .amount { color: var(--green); }
.entry[data-kind="unsold"] .amount { color: var(--amber); }
.empty { padding-top: .85rem; color: var(--muted); }
.entry-bar { background: #101115; border-top: 1px solid var(--line); padding-block: .6rem max(.6rem, env(safe-area-inset-bottom)); }
.entry-bar a { display: inline-flex; min-height: 2.8rem; align-items: center; padding: .45rem 1.1rem; border-radius: .35rem; background: var(--accent); color: #1e1732; text-decoration: none; font-weight: 750; }
.entry-bar a:hover { background: #d7ceff; }
.entry-bar a:focus-visible { outline: 2px solid white; outline-offset: 3px; }
.watch-closed { grid-template-rows: minmax(0, 1fr); }
.watch-closed main { display: grid; place-items: center; max-width: none; padding: 4.5rem 1rem; text-align: center; }
.watch-closed h1 { margin: 0; font-size: clamp(1.4rem, 4.2vw, 1.9rem); line-height: 1.35; word-break: keep-all; }
.watch-closed .entry-bar {
  position: fixed;
  left: max(1.125rem, env(safe-area-inset-left));
  bottom: max(1rem, env(safe-area-inset-bottom));
  padding: 0;
  background: transparent;
  border: 0;
}
@media (max-width: 42rem) { .lists { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 27rem) { .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } .metrics > :last-child { grid-column: 1 / -1; } }
