:root {
  color-scheme: light;
  --ink: #172f29;
  --muted: #536b63;
  --panel: #fff;
  --canvas: #f3f7f5;
  --line: #d8e4de;
  --rail: #12362f;
  --rail-ink: #dceee6;
  --active: #235f50;
  --accent: #126451;
  --wash: #edf6f1;
  --focus: #168772;
  --warning: #734b1c;
  --warning-bg: #fff4df;
  --error: #8e332b;
  --error-bg: #fff1ee;
  font-family: "Pretendard", "Noto Sans KR", "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif;
  line-height: 1.5;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 0; color: var(--ink); background: var(--canvas); }
:where(h1, h2, h3, p, dl, dd, ul) { margin: 0; }
:where(button, input, select) { font: inherit; }
:where(a, button, input, select, [tabindex]):focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
a { color: var(--accent); }
button, input, select { min-height: 42px; border: 1px solid var(--line); border-radius: .5rem; }
button { background: var(--panel); color: var(--ink); padding: .48rem .8rem; font-size: .875rem; font-weight: 650; cursor: pointer; white-space: nowrap; }
button:hover { background: var(--wash); }
button:disabled { cursor: default; opacity: .53; }
input, select { width: 100%; min-width: 0; padding: .45rem .7rem; background: var(--panel); color: var(--ink); }
input::placeholder { color: var(--muted); }
select {
  appearance: none;
  padding-right: 2rem;
  background:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%) right 16px center / 5px 5px no-repeat,
    linear-gradient(135deg, var(--muted) 50%, transparent 50%) right 11px center / 5px 5px no-repeat,
    var(--panel);
}
.primary { border-color: var(--accent); background: var(--accent); color: #fff; }
.primary:hover { background: #0d5143; }
.muted, .secondary { color: var(--muted); }
.muted { font-size: .9375rem; }
.secondary { font-size: .8125rem; }
.status { color: var(--muted); padding: .65rem .8rem; background: var(--wash); border-radius: .5rem; font-size: .875rem; }
.status:empty { display: none; }
.status.error { background: var(--error-bg); color: var(--error); }
.status.delay { background: var(--warning-bg); color: var(--warning); }
.visually-hidden, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus { position: fixed; z-index: 3; inset: .75rem auto auto .75rem; padding: .5rem .75rem; border-radius: .45rem; background: var(--panel); }

.sign-in {
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 1.25rem;
  background: radial-gradient(ellipse at top left, #dceee5 0%, var(--canvas) 51%);
}
.sign-in-card {
  width: min(100%, 26rem);
  padding: clamp(1.25rem, 5vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 1.05rem;
  background: var(--panel);
  box-shadow: 0 12px 40px #12362f12;
}
.sign-in-brand {
  color: var(--accent);
  font-weight: 800;
  letter-spacing: -.06em;
}
.sign-in h1 { font-size: clamp(1.4rem, 4vw, 1.75rem); letter-spacing: -.04em; }
.sign-in .muted { margin-top: .2rem; }
.sign-in .status { margin-top: 1rem; }
.login-form { display: grid; gap: .45rem; margin-top: 1rem; }
.login-form label { font-size: .875rem; font-weight: 650; }
.login-form input + label { margin-top: .5rem; }
.login-form button { margin-top: .6rem; }

.console { display: grid; grid-template-columns: 13rem minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  min-height: 100vh;
  padding: 1.6rem 1rem;
  background: var(--rail);
  color: var(--rail-ink);
}
.brand { display: block; padding: 0 .5rem; margin-bottom: 1.55rem; color: var(--rail-ink); text-decoration: none; }
.brand:focus-visible { outline-color: #83bfae; }
.brand strong { display: block; font-size: 1.21rem; font-weight: 800; letter-spacing: -.055em; color: #fff; }
.brand span { display: block; font-size: .8125rem; }
.scope-picker { display: grid; gap: .32rem; margin-bottom: .65rem; }
.scope-picker label { padding: 0 .5rem; font-size: .8125rem; font-weight: 650; }
.scope-picker select { font-size: .875rem; font-weight: 650; }
.scope-picker select:focus-visible { outline-color: #83bfae; }
.navigation { display: grid; gap: .25rem; }
.navigation a {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  border-radius: .47rem;
  padding: .32rem .75rem;
  color: var(--rail-ink);
  text-decoration: none;
  font-size: .9375rem;
  font-weight: 600;
}
.navigation a:hover { background: #1b4a40; }
.navigation a[aria-current="page"] { background: var(--active); color: #fff; font-weight: 730; }
.navigation a:focus-visible { outline-color: #83bfae; }

.workspace { min-width: 0; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
  min-height: 4.1rem;
  padding: .55rem clamp(.85rem, 3vw, 2.25rem);
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.world-name { color: var(--muted); font-size: .8125rem; font-weight: 650; }
.operator { display: flex; min-width: 0; flex-wrap: wrap; align-items: center; gap: .45rem .65rem; }
.operator-name { overflow-wrap: anywhere; font-size: .875rem; font-weight: 650; }
.operator-role { padding: .18rem .48rem; border-radius: .3rem; background: var(--wash); color: var(--accent); font-size: .75rem; font-weight: 650; white-space: nowrap; }
.operator button { min-height: 2.2rem; }
.workspace-content { max-width: 101rem; margin: 0 auto; padding: clamp(.9rem, 3vw, 2.25rem); }
.page-header { display: flex; gap: .6rem 1rem; justify-content: space-between; align-items: flex-start; margin: .15rem 0 1.2rem; }
.page-header h1 { margin: 0 0 .2rem; font-size: clamp(1.45rem, 1.9vw, 2rem); line-height: 1.22; letter-spacing: -.045em; }
.page-header button { flex: none; }
.workspace-content > .status { margin-bottom: .85rem; }
.workspace-content > section { display: grid; gap: .9rem; min-width: 0; }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: .78rem; background: var(--panel); }
.summary-grid { display: flex; flex-wrap: wrap; gap: .9rem; }
.summary-card { flex: 1 1 12rem; min-width: min(100%, 12rem); padding: 1rem; }
.summary-card h2 { color: var(--muted); font-size: .875rem; font-weight: 650; }
.metric { margin: .28rem 0; font-size: clamp(1.45rem, 2.4vw, 2rem); font-weight: 760; line-height: 1.24; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.text-link { font-size: .875rem; font-weight: 680; text-decoration-thickness: 1px; text-underline-offset: .22em; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.27fr) minmax(0, 1fr); gap: .9rem; }
.platform-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.platform-grid .status { margin: .65rem 0 0; }
.content-list { display: grid; list-style: none; padding: 0; }
.content-list > li + li { border-top: 1px solid var(--line); }
.content-list a { display: flex; align-items: center; min-height: 3rem; padding: .4rem .15rem; }
.table-panel { padding: .95rem 1.05rem; }
.panel-header, .detail-header { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem .85rem; }
.panel-header { margin-bottom: .65rem; }
.panel-header h2, .info-panel h2, .detail-header h2 { font-size: 1.0625rem; font-weight: 750; overflow-wrap: anywhere; }
.panel-header .secondary, .info-panel .muted, .detail-header .secondary { margin: .2rem 0 0; }
.panel-header .text-link, .panel-header .badge { flex: none; }
.table-panel > .status { margin-bottom: .55rem; }
.table-wrap { max-width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
th { text-align: left; background: var(--wash); color: var(--muted); font-weight: 650; }
th, td { padding: .59rem .62rem; white-space: nowrap; }
td { border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
.numeric { text-align: right; font-variant-numeric: tabular-nums; }
.badge { border-radius: .32rem; padding: .18rem .45rem; font-size: .75rem; font-weight: 700; white-space: nowrap; background: var(--wash); color: var(--accent); }
.badge.pending { background: #edf1ee; color: var(--muted); }
.badge.delay, .badge.full { background: var(--warning-bg); color: var(--warning); }
.metric-list { display: grid; list-style: none; padding: 0; margin: 0; }
.metric-list li { padding: .6rem 0; border-top: 1px solid var(--line); font-size: .875rem; }
.info-panel { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; padding: 1rem 1.05rem; }
@media (min-width: 1100px) {
  .member-layout.has-detail { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); align-items: start; }
}
.member-layout { display: grid; gap: .85rem; min-width: 0; }
.member-search { display: flex; align-items: flex-end; flex-wrap: wrap; gap: .5rem; margin-bottom: .7rem; }
.member-search .field { display: grid; flex: 0 1 8.8rem; gap: .2rem; min-width: 0; }
.member-search .search-field { flex: 1 1 12rem; }
.member-search label { font-size: .8125rem; color: var(--muted); font-weight: 650; }
.member-list td { color: var(--muted); }
.member-list tr[data-selected] td { background: var(--wash); }
.member-list td:first-child { padding: 0; }
.member-link {
  display: grid;
  width: 100%;
  min-width: 9rem;
  min-height: 3.25rem;
  padding: .32rem .62rem;
  border: 0;
  border-radius: 0;
  text-align: left;
  background: transparent;
  color: var(--accent);
  white-space: normal;
}
.member-link:hover { background: var(--wash); }
.member-link:focus-visible { outline-offset: -2px; }
.member-link small { color: var(--muted); font-size: .75rem; font-weight: 500; white-space: nowrap; }
.pagination { display: flex; align-items: center; gap: .55rem; justify-content: flex-end; margin: .75rem 0 0; font-variant-numeric: tabular-nums; }
.pagination button { min-height: 2.15rem; padding: .3rem .6rem; }
.member-detail { padding: 1rem 1.03rem; }
.member-detail > .status { margin-top: .7rem; }
.detail-header { margin-bottom: .7rem; }
.detail-navigation { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .8rem; }
.detail-navigation button { padding: .35rem .55rem; min-height: 2.2rem; }
.detail-navigation button[aria-pressed="true"] { border-color: var(--accent); background: var(--wash); color: var(--accent); }
.detail-content { display: grid; gap: .7rem; }
.detail-content h3 { font-size: .875rem; }
.detail-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; }
.detail-tile { min-width: 0; border-radius: .5rem; background: var(--wash); padding: .62rem; }
.detail-tile h3 { color: var(--muted); font-weight: 640; }
.detail-tile p { margin-top: .22rem; font-weight: 720; overflow-wrap: anywhere; }
.fact-list { margin: 0; font-size: .875rem; }
.fact-list > div { display: flex; gap: .55rem; justify-content: space-between; padding: .4rem 0; border-bottom: 1px solid var(--line); }
.fact-list > div:last-child { border-bottom: 0; }
.fact-list dt { color: var(--muted); }
.fact-list dd { text-align: right; overflow-wrap: anywhere; }
.rounds { display: grid; gap: .42rem; padding: 0; list-style: none; font-size: .875rem; }
.rounds li { display: grid; gap: .11rem; border-bottom: 1px solid var(--line); padding: .38rem 0; }
.rounds li:last-child { border-bottom: 0; }

@media (max-width: 900px) {
  .console { grid-template-columns: 10.5rem minmax(0, 1fr); }
  .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 620px) {
  .console { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; min-height: 0; padding: .68rem .75rem; }
  .brand { padding: 0 .2rem; margin-bottom: .45rem; }
  .brand div { display: flex; align-items: baseline; gap: .4rem; }
  .scope-picker { grid-template-columns: auto minmax(0, 1fr); align-items: center; margin-bottom: .42rem; }
  .scope-picker label { padding: 0 .22rem; }
  .navigation { display: flex; }
  .navigation a { flex: 1 1 0; justify-content: center; min-height: 2.6rem; padding: .25rem .2rem; font-size: .8125rem; white-space: nowrap; }
  .topbar { min-height: 3.2rem; }
  .topbar .world-name { display: none; }
  .panel, .table-panel, .member-detail { border-radius: .6rem; }
  .table-panel, .member-detail, .info-panel { padding: .72rem; }
  .summary-card { flex-basis: 9rem; min-width: min(100%, 8rem); padding: .72rem; }
  .summary-grid { gap: .45rem; }
  .summary-card h2 { font-size: .8125rem; }
}
@media (pointer: coarse) {
  button, input, select, .navigation a, .operator button, .pagination button, .detail-navigation button { min-height: 44px; }
}
@media (forced-colors: active) {
  select { appearance: auto; background: Field; padding-right: .7rem; }
}
