*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--steel-200);
  font-family: var(--font-ui);
  font-size: var(--fs-base);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(232, 145, 43, 0.22); color: var(--steel-100); }

* { scrollbar-width: thin; scrollbar-color: var(--steel-500) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ground); }
::-webkit-scrollbar-thumb { background: var(--steel-500); border: 3px solid var(--ground); }
::-webkit-scrollbar-thumb:hover { background: var(--steel-400); }

:focus-visible {
  outline: 1px solid var(--amber-400);
  outline-offset: 2px;
}

a { color: var(--amber-300); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }

.shell { max-width: var(--shell-max); margin: 0 auto; padding: 0 var(--sp-5); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;

  background: var(--ground);
  border-bottom: 1px solid var(--hairline);
}

.topbar__inner {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  height: var(--nav-h);
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 0 var(--sp-5);
}

.brand { display: flex; align-items: center; gap: var(--sp-3); flex-shrink: 0; }

.brand:hover { text-decoration: none; }

.brand__mark {
  width: 34px; height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  display: grid; place-items: center;
  overflow: hidden;
}
.brand__mark img { width: 100%; height: 100%; object-fit: cover; }
.brand__mark span {
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--amber-400);
}

.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--steel-100);
}
.brand__sub {
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel-400);
}

.nav { display: flex; align-items: stretch; gap: 0; height: 100%; flex: 1; min-width: 0; overflow-x: auto; }
.nav::-webkit-scrollbar { display: none; }

.nav__link {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 var(--sp-4);
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--steel-300);
  white-space: nowrap;
  transition: color var(--dur) var(--ease);
}
.nav__link:hover { color: var(--steel-100); text-decoration: none; }

.nav__link[aria-current="page"] { color: var(--steel-100); }
.nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: var(--sp-3); right: var(--sp-3); bottom: -1px;
  height: 1px;
  background: var(--amber-400);
}

.topbar__meta {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  flex-shrink: 0;
}

.period-chip {
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
  padding: 4px var(--sp-3);
  border: 1px solid var(--hairline);
  border-radius: var(--r-control);
  background: var(--surface);
}
.period-chip__label {
  font-size: var(--fs-xs);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--steel-400);
}
.period-chip__value {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  color: var(--steel-100);
}

.page { padding-top: var(--sp-6); padding-bottom: var(--sp-7); }

.page__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-5);
  flex-wrap: wrap;
  margin-bottom: var(--sp-5);
}

.page__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: 600;
  letter-spacing: var(--track-title);
  text-transform: uppercase;
  color: var(--steel-100);
  line-height: 1.05;
}

.page__note {
  margin: var(--sp-2) 0 0;
  max-width: 68ch;
  font-size: var(--fs-sm);
  color: var(--steel-300);
}

.strip {
  display: flex;
  flex-wrap: wrap;
  border: 1px solid var(--hairline);
  border-radius: var(--r-panel);
  background: var(--surface);
  margin-bottom: var(--sp-5);
}

.strip__cell {
  flex: 1 1 132px;
  min-width: 118px;
  padding: var(--sp-3) var(--sp-4);
  border-right: 1px solid var(--hairline);
}
.strip__cell:last-child { border-right: 0; }

.strip__label {
  display: block;
  font-size: var(--fs-xs);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--steel-400);
  margin-bottom: 2px;
}

.strip__value {
  font-family: var(--font-mono);
  font-size: var(--fs-lg);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--steel-100);
  line-height: 1.2;
}

.strip__value em { font-style: normal; color: var(--steel-400); }

.strip__value--ok   { color: var(--ok); }
.strip__value--bad  { color: var(--bad); }
.strip__value--info { color: var(--info); }
.strip__value--amber{ color: var(--amber-400); }

.strip__hint { font-size: var(--fs-xs); color: var(--steel-400); }

.panel {
  border: 1px solid var(--hairline);
  border-radius: var(--r-panel);
  background: var(--surface);
}

.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--hairline);
}

.panel__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--steel-200);
}

.panel__body { padding: var(--sp-4); }

.toolbar {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--hairline);
  border-bottom: 0;
  border-radius: var(--r-panel) var(--r-panel) 0 0;
  background: var(--surface);
}

.field {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  border: 1px solid var(--edge);
  border-radius: var(--r-control);
  background: var(--ground);
  padding: 0 var(--sp-2) 0 var(--sp-3);
  transition: border-color var(--dur) var(--ease);
}
.field:focus-within { border-color: var(--amber-deep); }

.field input,
.field select {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--steel-100);
  font-family: var(--font-ui);
  font-size: var(--fs-sm);
  padding: 7px 0;
  min-width: 0;
  outline: none;
}
.field input::placeholder { color: var(--steel-400); }
.field select { padding-right: var(--sp-4); cursor: pointer; }
.field select option { background: var(--surface); color: var(--steel-100); }

.field--search { flex: 1 1 240px; max-width: 340px; }
.field__icon { color: var(--steel-400); display: grid; place-items: center; flex-shrink: 0; }
.field__caret { color: var(--steel-400); pointer-events: none; margin-left: -14px; }

.segmented {
  display: inline-flex;
  border: 1px solid var(--edge);
  border-radius: var(--r-control);
  overflow: hidden;
}

.segmented__btn {
  appearance: none;
  border: 0;
  border-right: 1px solid var(--edge);
  background: transparent;
  color: var(--steel-300);
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 7px var(--sp-3);
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.segmented__btn:last-child { border-right: 0; }
.segmented__btn:hover { background: var(--raised); color: var(--steel-100); }
.segmented__btn[aria-pressed="true"] {
  background: var(--amber-wash);
  color: var(--amber-300);
  box-shadow: inset 0 -1px 0 var(--amber-400);
}

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  border: 1px solid var(--edge);
  border-radius: var(--r-control);
  background: var(--raised);
  color: var(--steel-200);
  font-family: var(--font-ui);
  font-size: var(--fs-sm);
  font-weight: 500;
  padding: 7px var(--sp-3);
  cursor: pointer;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.btn:hover { background: var(--raised-hi); color: var(--steel-100); border-color: var(--steel-500); text-decoration: none; }
.btn:active { background: var(--surface); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn--primary { border-color: var(--amber-deep); color: var(--amber-300); background: transparent; }
.btn--primary:hover { background: var(--amber-wash); border-color: var(--amber-500); color: var(--amber-300); }

.btn--ghost { border-color: transparent; background: transparent; color: var(--steel-300); }
.btn--ghost:hover { background: var(--raised); color: var(--steel-100); border-color: var(--hairline); }

.count {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-variant-numeric: tabular-nums;
  color: var(--steel-400);
  margin-left: auto;
  white-space: nowrap;
}

.table-wrap {
  border: 1px solid var(--hairline);
  border-radius: 0 0 var(--r-panel) var(--r-panel);
  background: var(--surface);
}
.table-wrap--standalone { border-radius: var(--r-panel); }

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}

table.data thead th {
  position: sticky;
  top: var(--nav-h);
  z-index: 5;
  background: var(--raised);
  border-bottom: 1px solid var(--edge);
  padding: var(--sp-2) var(--sp-3);
  text-align: left;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--steel-300);
  white-space: nowrap;
}

table.data thead th.sortable { cursor: pointer; user-select: none; }
table.data thead th.sortable:hover { color: var(--steel-100); }
table.data thead th .sort-mark { color: var(--amber-400); margin-left: 4px; }

table.data tbody td {
  padding: var(--sp-2) var(--sp-3);
  border-bottom: 1px solid var(--hairline);
  color: var(--steel-200);
  vertical-align: middle;
}

table.data tbody tr { transition: background var(--dur) var(--ease); }
table.data tbody tr:hover { background: var(--raised); }
table.data tbody tr:last-child td { border-bottom: 0; }

.group-row td {
  background: var(--raised);
  border-top: 1px solid var(--edge);
  border-bottom: 1px solid var(--edge);
  padding: var(--sp-2) var(--sp-3);
}
table.data tbody tr.group-row:hover td { background: var(--raised); }
.group-row { cursor: default; }

table.data.grouped .col-unit { display: none; }

.group-row__label {
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--steel-100);
}

.group-row__count {
  float: right;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-variant-numeric: tabular-nums;
  color: var(--steel-400);
}

.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.cell-name { color: var(--steel-100); font-weight: 500; }
.cell-rank { color: var(--steel-300); white-space: nowrap; }
.cell-muted { color: var(--steel-400); }

.unit-tag {
  font-size: var(--fs-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--steel-400);
  border: 1px solid var(--hairline);
  border-radius: var(--r-control);
  padding: 1px 5px;
  white-space: nowrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.03em;
  padding: 2px 7px;
  border-radius: var(--r-control);
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge--ok    { color: var(--ok);    background: var(--ok-wash);    border-color: rgba(95,158,110,.28); }
.badge--warn  { color: var(--warn);  background: var(--warn-wash);  border-color: rgba(180,136,74,.28); }
.badge--bad   { color: var(--bad);   background: var(--bad-wash);   border-color: rgba(203,109,104,.28); }
.badge--info  { color: var(--info);  background: var(--info-wash);  border-color: rgba(110,134,166,.28); }
.badge--muted { color: var(--steel-400); border-color: var(--hairline); }

.quota { display: flex; align-items: center; gap: var(--sp-3); min-width: 132px; }

.quota__track {
  position: relative;
  flex: 1;
  height: 3px;
  background: var(--edge);
  overflow: hidden;
}
.quota__fill { position: absolute; inset: 0 auto 0 0; background: var(--steel-400); }
.quota__fill--met  { background: var(--ok); }
.quota__fill--none { background: var(--bad); }

.quota__figure {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
  color: var(--steel-200);
  white-space: nowrap;
}
.quota__figure em { font-style: normal; color: var(--steel-400); }

.strikes { display: inline-flex; gap: 3px; }
.strikes__pip { width: 9px; height: 3px; background: var(--edge); }
.strikes__pip--on { background: var(--bad); }

.dash { color: var(--steel-500); }

.chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: var(--sp-4);
}

.chart-grid--wide { grid-template-columns: 2fr 1fr; }

.chart-box { position: relative; height: 268px; }
.chart-box--tall { height: 330px; }

.empty {
  padding: var(--sp-7) var(--sp-5);
  text-align: center;
}
.empty__title {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--steel-300);
  margin: 0 0 var(--sp-2);
}
.empty__text { margin: 0 auto; max-width: 46ch; font-size: var(--fs-sm); color: var(--steel-400); }

.skeleton-row { display: flex; gap: var(--sp-3); padding: var(--sp-2) var(--sp-3); border-bottom: 1px solid var(--hairline); }
.skeleton-bar {
  height: 10px;
  background: linear-gradient(90deg, var(--raised) 0%, var(--raised-hi) 50%, var(--raised) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

.drawer-backdrop {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(3, 4, 6, 0.6);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}
.drawer-backdrop[data-open="true"] { opacity: 1; }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 61;
  width: min(440px, 100vw);
  background: var(--surface);
  border-left: 1px solid var(--edge);
  box-shadow: var(--shadow-overlay);
  transform: translateX(100%);
  transition: transform 220ms var(--ease);
  display: flex; flex-direction: column;
}
.drawer[data-open="true"] { transform: none; }

.drawer__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border-bottom: 1px solid var(--hairline);
}
.drawer__name {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  letter-spacing: var(--track-title);
  text-transform: uppercase;
  color: var(--steel-100);
}
.drawer__rank { font-size: var(--fs-sm); color: var(--steel-300); }
.drawer__body { padding: var(--sp-4); overflow-y: auto; flex: 1; }

.deflist { display: grid; grid-template-columns: auto 1fr; gap: var(--sp-2) var(--sp-4); font-size: var(--fs-sm); }
.deflist dt { color: var(--steel-400); font-size: var(--fs-xs); letter-spacing: 0.05em; text-transform: uppercase; }
.deflist dd { margin: 0; color: var(--steel-200); }

.drawer__section { margin-top: var(--sp-5); }
.drawer__section h3 {
  margin: 0 0 var(--sp-3);
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--steel-300);
  padding-bottom: var(--sp-2);
  border-bottom: 1px solid var(--hairline);
}

.timeline { list-style: none; margin: 0; padding: 0; font-size: var(--fs-sm); }
.timeline li { padding: var(--sp-2) 0; border-bottom: 1px solid var(--hairline); }
.timeline li:last-child { border-bottom: 0; }
.timeline__when { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--steel-400); }

.stack-4 > * + * { margin-top: var(--sp-4); }
.row { display: flex; align-items: center; gap: var(--sp-2); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@media (max-width: 1080px) {
  .chart-grid--wide { grid-template-columns: 1fr; }
}

@media (max-width: 1150px) {
  .topbar__inner { gap: var(--sp-4); }
  .nav__link { padding: 0 var(--sp-3); }
}

@media (max-width: 1050px) {
  .period-chip { display: none; }
}

.cell-sub { display: none; font-size: var(--fs-xs); color: var(--steel-400); }

@media (max-width: 860px) {
  .shell, .topbar__inner { padding-left: var(--sp-4); padding-right: var(--sp-4); }
  .topbar__inner { gap: var(--sp-4); }
  .brand__sub { display: none; }
  .period-chip { display: none; }
  .page__title { font-size: var(--fs-xl); }
  .strip__cell { flex-basis: 50%; border-bottom: 1px solid var(--hairline); }
  .table-wrap { overflow-x: auto; }
  table.data thead th { position: static; }
  .col-optional { display: none; }

  .segmented { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .segmented::-webkit-scrollbar { display: none; }
  .field--search { flex-basis: 100%; max-width: none; }
}

@media (max-width: 620px) {
  .col-rank { display: none; }
  .cell-sub { display: block; }
  .quota { min-width: 104px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body.gate {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: var(--sp-5);
}

.gate__panel {
  width: 100%;
  max-width: 400px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-panel);
  background: var(--surface);
  padding: var(--sp-6) var(--sp-5) var(--sp-5);
  text-align: center;
}

.gate__mark {
  width: 72px; height: 72px;
  margin: 0 auto var(--sp-4);
  border-radius: 50%;
  display: grid; place-items: center;
  overflow: hidden;
}
.gate__mark img { width: 100%; height: 100%; object-fit: cover; }
.gate__mark span {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--amber-400);
}

.gate__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 600;
  letter-spacing: var(--track-title);
  text-transform: uppercase;
  color: var(--steel-100);
  line-height: 1.1;
}

.gate__sub {
  margin: 2px 0 var(--sp-5);
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel-400);
}

.btn--discord {
  width: 100%;
  justify-content: center;
  gap: var(--sp-3);
  padding: 11px var(--sp-4);
  border-color: var(--edge);
  background: var(--raised);
  color: var(--steel-100);
  font-size: var(--fs-base);
  font-weight: 500;
}
.btn--discord svg { color: #8f9bd4; transition: color var(--dur) var(--ease); }
.btn--discord:hover { border-color: var(--steel-500); background: var(--raised-hi); }
.btn--discord:hover svg { color: #a8b2e0; }

.notice {
  margin: 0 0 var(--sp-4);
  padding: var(--sp-3);
  border: 1px solid var(--hairline);
  border-radius: var(--r-control);
  font-size: var(--fs-sm);
  text-align: left;
}
.notice--ok   { color: var(--ok);   border-color: rgba(95,158,110,.28);  background: var(--ok-wash); }
.notice--bad  { color: var(--bad);  border-color: rgba(203,109,104,.28); background: var(--bad-wash); }
.notice--warn { color: var(--warn); border-color: rgba(180,136,74,.28);  background: var(--warn-wash); }
.notice--info { color: var(--info); border-color: rgba(110,134,166,.28); background: var(--info-wash); }

.gate__howtitle {
  margin: 0 0 var(--sp-3);
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--steel-300);
}

.gate__note { margin: 0; font-size: var(--fs-sm); color: var(--steel-400); line-height: 1.6; }

.who {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 3px var(--sp-2) 3px 3px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-control);
  background: var(--surface);
  color: var(--steel-200);
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.who:hover { border-color: var(--steel-500); background: var(--raised); text-decoration: none; }

.who__avatar {
  width: 24px; height: 24px;
  border-radius: var(--r-control);
  background: var(--raised);
  object-fit: cover;
  flex-shrink: 0;
}
.who__avatar--blank {
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  color: var(--steel-400);
}

.who__text { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.who__name { font-size: var(--fs-sm); font-weight: 500; color: var(--steel-100); white-space: nowrap; }
.who__rank { font-size: var(--fs-xs); color: var(--steel-400); white-space: nowrap; }

.identity {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4);
  border-bottom: 1px solid var(--hairline);
}

.identity__avatar {
  width: 72px; height: 72px;
  border-radius: var(--r-panel);
  border: 1px solid var(--edge);
  background: var(--raised);
  object-fit: cover;
  flex-shrink: 0;
}

.identity__name {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  letter-spacing: var(--track-title);
  text-transform: uppercase;
  color: var(--steel-100);
  line-height: 1.1;
}
.identity__meta { font-size: var(--fs-sm); color: var(--steel-300); margin-top: 2px; }
.identity__link { margin-left: auto; flex-shrink: 0; }

.member-link { color: inherit; }
.member-link:hover { color: var(--amber-300); text-decoration: none; }
.member-link:focus-visible { outline: 1px solid var(--amber-500); outline-offset: 2px; border-radius: 2px; }

.drawer__actions { display: flex; align-items: center; gap: var(--sp-2); flex-shrink: 0; }

.tip { position: relative; }
.tip::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translate(-50%, 2px);
  padding: 4px 8px;
  border: 1px solid var(--edge);
  border-radius: 2px;
  background: #14171c;
  color: var(--steel-100);
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.4;
  text-transform: none;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  z-index: 5;
}
.tip:hover::after,
.tip:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }

.verified {
  display: inline-flex;
  flex-shrink: 0;
  color: var(--ok);
  cursor: default;
  border-radius: 50%;
}
.verified:focus-visible { outline: 1px solid var(--ok); outline-offset: 2px; }

.panel--identity { position: relative; }
.cog {
  position: absolute;
  right: var(--sp-3);
  bottom: var(--sp-3);
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border: 1px solid transparent;
  border-radius: var(--r-control);
  color: var(--steel-100);
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.cog:hover { background: var(--raised); border-color: var(--hairline); text-decoration: none; }
.cog:focus-visible { outline: 1px solid var(--amber-500); outline-offset: 2px; }

.cog.tip::after { left: auto; right: 0; transform: translateY(2px); }
.cog.tip:hover::after, .cog.tip:focus-visible::after { transform: translateY(0); }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin: var(--sp-6) 0 var(--sp-4);
}
.section-head__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 600;
  letter-spacing: var(--track-title);
  text-transform: uppercase;
  color: var(--steel-100);
}

@media (max-width: 620px) {
  .identity { flex-wrap: wrap; }
  .identity__link { margin-left: 0; }
}

@media (max-width: 720px) {
  .who__text { display: none; }
}

.drawer__avatar {
  width: 44px; height: 44px;
  border-radius: var(--r-control);
  border: 1px solid var(--edge);
  background: var(--raised);
  object-fit: cover;
  flex-shrink: 0;
}
.drawer__ident { display: flex; align-items: center; gap: var(--sp-3); min-width: 0; }

table.data tbody tr[role="button"] { cursor: pointer; }

.pip {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--bad);
  color: #180a0a;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
  vertical-align: 1px;
}

.period-chip__value--ok    { color: var(--ok); }
.period-chip__value--short { color: var(--warn); }
.period-chip__value--info  { color: var(--info); }
.period-chip__value em     { font-style: normal; color: var(--steel-400); }

table.data tbody tr.is-vacant td { color: var(--steel-500); }
table.data tbody tr.is-vacant:hover { background: transparent; }
.vacant-name { color: var(--steel-500); font-style: normal; letter-spacing: 0.04em; }

.logo-setting { display: flex; gap: var(--sp-5); align-items: flex-start; flex-wrap: wrap; }

.logo-setting__preview {
  width: 108px; height: 108px;
  flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 50%;
  overflow: hidden;
}
.logo-setting__preview img { width: 100%; height: 100%; object-fit: cover; }
.logo-setting__empty {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--amber-400);
}

.logo-setting__controls { flex: 1; min-width: 260px; }

.logo-form { display: flex; gap: var(--sp-3); align-items: center; flex-wrap: wrap; margin: var(--sp-3) 0; }
.logo-form input[type="file"] {
  flex: 1;
  min-width: 200px;
  font-family: var(--font-ui);
  font-size: var(--fs-sm);
  color: var(--steel-300);
}
.logo-form input[type="file"]::file-selector-button {
  margin-right: var(--sp-3);
  padding: 7px var(--sp-3);
  border: 1px solid var(--edge);
  border-radius: var(--r-control);
  background: var(--raised);
  color: var(--steel-200);
  font-family: var(--font-ui);
  font-size: var(--fs-sm);
  cursor: pointer;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.logo-form input[type="file"]::file-selector-button:hover {
  background: var(--raised-hi);
  border-color: var(--steel-500);
}

.panel__body--divided {
  border-top: 1px solid var(--hairline);
  padding-top: var(--sp-5);
}

.toolbar--inset {
  border-left: 0;
  border-right: 0;
  border-top: 0;
  border-radius: 0;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-4);
}
@media (max-width: 1050px) {
  .admin-grid { grid-template-columns: minmax(0, 1fr); }
}

.rank-quotas {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 0 var(--sp-4);
}
.rank-quota {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--edge);
}
.rank-quota__name { font-size: var(--fs-sm); color: var(--steel-200); }
.field--num { padding-right: var(--sp-3); }
.field--num input {
  width: 6ch;
  text-align: right;
  font-family: var(--font-mono);
  -moz-appearance: textfield;
}
.field--num input::-webkit-outer-spin-button,
.field--num input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.field__unit { color: var(--steel-400); font-size: var(--fs-xs); }

.perks {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) 330px;
  gap: var(--sp-4);
  align-items: start;
}
.perks__main,
.perks__side { display: grid; gap: var(--sp-4); }

.ranklist { list-style: none; margin: 0; padding: var(--sp-2); display: grid; gap: 2px; }
.ranklist__item {
  width: 100%;
  display: block;
  padding: 7px var(--sp-3);
  border: 1px solid transparent;
  border-radius: var(--r-control);
  background: transparent;
  color: var(--steel-300);
  font-family: var(--font-ui);
  font-size: var(--fs-sm);
  text-align: left;
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.ranklist__item:hover { background: var(--raised); color: var(--steel-100); }
.ranklist__item[aria-pressed="true"] {
  background: var(--amber-wash);
  border-color: var(--amber-line);
  color: var(--amber-300);
}

.viewer { position: relative; border-top: 1px solid var(--hairline); }
.viewer model-viewer {
  display: block;
  width: 100%;
  height: clamp(320px, 50vh, 540px);
  background-color: var(--ground);
  --poster-color: transparent;
  --progress-bar-height: 0px;
  --progress-bar-color: transparent;
  --progress-mask: transparent;
}
.viewer model-viewer::part(default-progress-bar) { display: none; }
.viewer__note {
  position: absolute;
  left: var(--sp-4);
  right: var(--sp-4);
  bottom: var(--sp-3);
  margin: 0;
  font-size: var(--fs-xs);
  color: var(--steel-400);
  text-align: center;
}

.perklist { list-style: none; margin: 0; padding: 0; display: grid; }
.perklist li {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--hairline);
  font-size: var(--fs-sm);
  color: var(--steel-200);
}
.perklist li:last-child { border-bottom: 0; padding-bottom: 0; }
.perklist li:first-child { padding-top: 0; }
.perklist li::before {
  content: "";
  flex: none;
  width: 5px;
  height: 5px;
  margin-top: 7px;
  background: var(--amber-400);
}
.perks__notes { margin: var(--sp-3) 0 0; font-size: var(--fs-sm); line-height: 1.6; }
.perks__description {
  margin: 0 0 var(--sp-4);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--hairline);
  font-size: var(--fs-sm);
  line-height: 1.6;
  color: var(--steel-200);
}

@media (max-width: 1180px) {
  .perks { grid-template-columns: 210px minmax(0, 1fr); }
  .perks__side {
    grid-column: 1 / -1;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}
@media (max-width: 720px) {
  .perks { grid-template-columns: minmax(0, 1fr); }
  .perks__rail { position: static; }
  .ranklist { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
