:root {
  color-scheme: dark;
  --bg: #0e100d;
  --surface: #151713;
  --surface-2: #1b1e19;
  --surface-3: #22251f;
  --line: #30342c;
  --line-soft: rgba(255, 255, 255, .075);
  --text: #f0f1eb;
  --muted: #94998d;
  --muted-2: #686e63;
  --rust: #df5a32;
  --rust-bright: #f2764e;
  --green: #9fc55f;
  --red: #ef6b5c;
  --blue: #63a5d8;
  --yellow: #d5ad55;
  --radius: 4px;
  --shadow: 0 24px 80px rgba(0, 0, 0, .35);
  --header-h: 78px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(rgba(255,255,255,.014) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.014) 1px, transparent 1px),
    var(--bg);
  background-size: 48px 48px;
  line-height: 1.6;
}

button,
select,
input,
a {
  font: inherit;
}

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

button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 2px solid var(--rust-bright);
  outline-offset: 3px;
}

button {
  color: inherit;
}

svg {
  display: block;
}

[hidden] {
  display: none !important;
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  filter: blur(110px);
  opacity: .1;
  pointer-events: none;
}

.ambient-one {
  top: 100px;
  left: -220px;
  background: var(--rust);
}

.ambient-two {
  right: -260px;
  bottom: 80px;
  background: #547c3b;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  padding: 12px max(24px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid var(--line-soft);
  background: rgba(14, 16, 13, .88);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  overflow: hidden;
  color: #fff;
  background: var(--rust);
  clip-path: polygon(13% 0, 87% 0, 100% 13%, 100% 87%, 87% 100%, 13% 100%, 0 87%, 0 13%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
}

.brand-mark::before {
  position: absolute;
  width: 28px;
  height: 28px;
  content: "";
  border: 1px solid rgba(255,255,255,.28);
  transform: rotate(45deg);
}

.brand-mark span {
  position: relative;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-copy strong {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .14em;
}

.brand-copy small {
  margin-top: 5px;
  color: var(--muted-2);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .25em;
}

.header-actions,
.profile {
  display: flex;
  align-items: center;
}

.header-actions {
  gap: 12px;
}

.profile {
  gap: 10px;
  padding-right: 14px;
  border-right: 1px solid var(--line);
}

.avatar-shell {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  overflow: hidden;
  color: #fff;
  border: 1px solid rgba(223, 90, 50, .45);
  border-radius: 50%;
  background: linear-gradient(145deg, #7a3325, #27211d);
  font-size: 13px;
  font-weight: 800;
}

.avatar-shell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-copy {
  display: flex;
  min-width: 0;
  max-width: 210px;
  flex-direction: column;
  line-height: 1.25;
}

.profile-copy strong,
.profile-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-copy strong {
  font-size: 13px;
}

.profile-copy span {
  margin-top: 3px;
  color: var(--muted-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
}

.icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}

.icon-button:hover {
  color: var(--rust-bright);
  border-color: rgba(223,90,50,.5);
  background: #211914;
}

.icon-button svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.page-shell {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 46px 0 90px;
}

.admin-view-panel {
  display: grid;
  grid-template-columns: minmax(190px, .8fr) minmax(360px, 1.6fr);
  gap: 28px;
  align-items: center;
  margin: 0 0 42px;
  padding: 20px 22px;
  border: 1px solid rgba(213, 173, 85, .32);
  border-left: 3px solid var(--yellow);
  border-radius: var(--radius);
  background: linear-gradient(110deg, rgba(213, 173, 85, .1), rgba(21, 23, 19, .92));
  box-shadow: 0 15px 45px rgba(0, 0, 0, .18);
}

.admin-view-panel.is-impersonating {
  border-color: rgba(223, 90, 50, .48);
  border-left-color: var(--rust-bright);
  background: linear-gradient(110deg, rgba(223, 90, 50, .13), rgba(21, 23, 19, .94));
}

.admin-view-copy {
  min-width: 0;
}

.admin-view-copy .section-kicker {
  margin-bottom: 5px;
  color: var(--yellow);
}

.admin-view-panel.is-impersonating .section-kicker {
  color: var(--rust-bright);
}

.admin-view-copy strong,
.admin-view-copy span {
  display: block;
}

.admin-view-copy strong {
  font-size: 15px;
}

.admin-view-copy span {
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-view-form label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .04em;
}

.admin-view-controls {
  display: flex;
  gap: 8px;
}

.admin-view-controls input {
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(10, 12, 9, .72);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  letter-spacing: .035em;
}

.admin-view-controls input::placeholder {
  color: var(--muted-2);
}

.admin-view-submit,
.admin-view-reset {
  min-height: 40px;
  padding: 0 14px;
  flex: 0 0 auto;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.admin-view-submit {
  color: #15120b;
  background: var(--yellow);
}

.admin-view-reset {
  color: var(--text);
  border-color: rgba(223, 90, 50, .45);
  background: rgba(223, 90, 50, .13);
}

.admin-view-submit:disabled,
.admin-view-reset:disabled {
  cursor: wait;
  opacity: .55;
}

.admin-view-error {
  margin: 8px 0 0;
  color: #f09a8d;
  font-size: 11px;
}

.hero {
  margin-bottom: 38px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  color: var(--rust-bright);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .22em;
}

.hero h1 {
  margin: 0;
  font-size: clamp(30px, 3.8vw, 48px);
  font-weight: 850;
  letter-spacing: -.055em;
  line-height: 1.18;
}

.hero h1 span,
.login-intro h1 span {
  color: var(--rust-bright);
}

.hero-copy {
  margin: 17px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.status-dot {
  position: relative;
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 14px rgba(159,197,95,.65);
}

.notice {
  margin: -20px 0 30px;
  padding: 13px 15px;
  color: #eacb8a;
  border: 1px solid rgba(213,173,85,.25);
  border-radius: var(--radius);
  background: rgba(213,173,85,.07);
  font-size: 12px;
}

.tabs {
  position: sticky;
  top: calc(var(--header-h) - 1px);
  z-index: 15;
  display: flex;
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(17, 19, 15, .92);
  backdrop-filter: blur(14px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .22);
}

.tab {
  display: flex;
  min-height: 48px;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 9px;
  cursor: pointer;
  color: var(--muted);
  border: 0;
  border-radius: 2px;
  background: transparent;
  font-size: 12px;
  font-weight: 750;
  transition: color .18s ease, background .18s ease;
}

.tab:hover {
  color: var(--text);
  background: rgba(255,255,255,.025);
}

.tab.is-active {
  color: var(--text);
  background: var(--surface-2);
  box-shadow: inset 0 -2px var(--rust);
}

.tab svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.tab-panel {
  padding-top: 44px;
}

.panel-heading,
.block-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.panel-heading {
  margin-bottom: 25px;
}

.panel-heading h2,
.block-heading h3 {
  margin: 0;
  letter-spacing: -.035em;
}

.panel-heading h2 {
  font-size: 27px;
}

.block-heading h3 {
  font-size: 19px;
}

.select-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.select-field > span {
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.select-field select {
  min-width: 158px;
  height: 42px;
  padding: 0 38px 0 13px;
  cursor: pointer;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  appearance: none;
  background-color: var(--surface-2);
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) 18px, calc(100% - 11px) 18px;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
  font-size: 12px;
  font-weight: 650;
}

.metric-grid {
  display: grid;
  gap: 12px;
}

.metric-grid-primary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-card {
  position: relative;
  min-height: 150px;
  padding: 19px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: linear-gradient(145deg, var(--surface-2), var(--surface));
}

.metric-card::after {
  position: absolute;
  right: -35px;
  bottom: -55px;
  width: 125px;
  height: 125px;
  content: "";
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: .09;
}

.metric-card.accent-orange { color: var(--rust-bright); }
.metric-card.accent-green { color: var(--green); }
.metric-card.accent-blue { color: var(--blue); }
.metric-card.accent-red { color: var(--red); }

.metric-icon {
  display: grid;
  width: 34px;
  height: 34px;
  margin-bottom: 15px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: rgba(255,255,255,.025);
}

.metric-icon svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.metric-card p,
.resource-card p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.metric-card > strong {
  display: block;
  margin: 3px 0 3px;
  color: var(--text);
  font-size: clamp(24px, 2.6vw, 34px);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.15;
}

.metric-card > span {
  color: var(--muted-2);
  font-size: 9px;
}

.content-block {
  margin-top: 42px;
}

.memory-block {
  position: relative;
}

.memory-timeline {
  position: relative;
  display: grid;
  gap: 10px;
}

.memory-timeline::before {
  position: absolute;
  top: 23px;
  bottom: 23px;
  left: 25px;
  width: 1px;
  content: "";
  background: linear-gradient(var(--rust), rgba(223, 90, 50, .08));
}

.memory-entry {
  position: relative;
  display: grid;
  min-height: 112px;
  padding: 18px 20px;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 17px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background:
    linear-gradient(110deg, rgba(223, 90, 50, .07), transparent 38%),
    var(--surface);
}

.memory-marker {
  z-index: 1;
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  color: var(--rust-bright);
  border: 1px solid rgba(242, 118, 78, .38);
  border-radius: 50%;
  background: var(--surface-2);
  box-shadow: 0 0 0 5px var(--surface);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .04em;
}

.memory-first_patrol_helicopter .memory-marker {
  color: var(--blue);
  border-color: rgba(99, 165, 216, .4);
}

.memory-first_bradley .memory-marker,
.memory-first_locked_crate .memory-marker {
  color: var(--yellow);
  border-color: rgba(213, 173, 85, .42);
}

.memory-first_npc_kill .memory-marker,
.memory-npc_kill_milestone .memory-marker,
.memory-first_animal_kill .memory-marker {
  color: var(--red);
  border-color: rgba(239, 107, 92, .4);
}

.memory-resource_milestone .memory-marker,
.memory-first_harvest .memory-marker {
  color: var(--green);
  border-color: rgba(159, 197, 95, .38);
}

.memory-first_fish .memory-marker {
  color: var(--blue);
  border-color: rgba(99, 165, 216, .4);
}

.memory-wipe_started .memory-marker {
  color: var(--green);
  border-color: rgba(159, 197, 95, .38);
}

.memory-content time {
  color: var(--rust-bright);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
}

.memory-content h4 {
  margin: 2px 0 2px;
  font-size: 15px;
  letter-spacing: -.02em;
}

.memory-content p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.memory-message {
  min-height: 100px;
  margin: 0;
  padding: 38px 20px;
  color: var(--muted);
  border: 1px dashed var(--line);
  text-align: center;
  background: rgba(255,255,255,.012);
  font-size: 11px;
}

.block-heading {
  margin-bottom: 17px;
}

.subtle-label {
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .1em;
}

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

.resource-card {
  display: flex;
  min-height: 93px;
  align-items: center;
  gap: 13px;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--surface);
}

.resource-symbol {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 900;
}

.resource-card.wood { color: #b5895e; }
.resource-card.stone { color: #929a9a; }
.resource-card.metal { color: #93a9b8; }
.resource-card.sulfur { color: var(--yellow); }
.resource-card.hq { color: #6bb0c9; }

.resource-card strong {
  display: block;
  margin-top: 2px;
  color: var(--text);
  font-size: 18px;
  letter-spacing: -.02em;
}

.pve-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.pve-card {
  display: flex;
  min-height: 112px;
  align-items: center;
  gap: 14px;
  padding: 17px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: linear-gradient(145deg, var(--surface-2), var(--surface));
}

.pve-card > span {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--rust-bright);
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 8px;
  font-weight: 900;
}

.pve-card.animal > span { color: var(--green); }
.pve-card.barrel > span { color: var(--yellow); }
.pve-card.boss > span { color: var(--blue); }

.pve-card p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.pve-card strong {
  display: block;
  margin: 1px 0;
  font-size: 24px;
  letter-spacing: -.03em;
  line-height: 1.2;
}

.pve-card small {
  display: block;
  max-width: 150px;
  overflow: hidden;
  color: var(--muted-2);
  font-size: 8px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.split-table-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.compact-heading {
  min-height: 47px;
}

.item-shortname {
  display: block;
  margin-top: 2px;
  color: var(--muted-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 8px;
}

.custom-item-badge {
  display: inline-block;
  margin-left: 7px;
  padding: 1px 5px;
  border: 1px solid rgba(245, 158, 11, .42);
  border-radius: 999px;
  background: rgba(245, 158, 11, .1);
  color: #fbbf24;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .04em;
  vertical-align: 1px;
}

.item-amount {
  width: 150px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  font-weight: 750;
}

.table-shell {
  overflow-x: auto;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

th,
td {
  height: 55px;
  padding: 10px 18px;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--line-soft);
}

th {
  height: 43px;
  color: var(--muted-2);
  background: rgba(255,255,255,.018);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .13em;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr {
  transition: background .15s ease;
}

tbody tr:hover {
  background: rgba(255,255,255,.018);
}

.table-message {
  height: 100px;
  color: var(--muted);
  text-align: center;
}

.scroll-shell {
  max-height: 460px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.scroll-shell thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #191c17;
  box-shadow: 0 1px 0 var(--line-soft);
}

.split-table-grid th:last-child,
.split-table-grid td:last-child:not(.table-message),
.loot-table-shell th:last-child,
.loot-table-shell td:last-child:not(.table-message),
.ranking-table-shell th:last-child,
.ranking-table-shell td:last-child:not(.table-message) {
  text-align: right;
}

.team-table-shell th:not(:first-child),
.team-table-shell td:not(:first-child):not(.table-message) {
  text-align: right;
}

.loot-table-shell tbody {
  counter-reset: loot-row;
}

.loot-table-shell tbody td:first-child:not(.table-message)::before {
  display: inline-block;
  min-width: 24px;
  margin-right: 12px;
  color: var(--muted-2);
  content: counter(loot-row, decimal-leading-zero);
  counter-increment: loot-row;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
}

.loot-table-shell .item-shortname {
  margin-left: 36px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 750;
}

.status-chip.online {
  color: var(--green);
  border-color: rgba(159,197,95,.25);
  background: rgba(159,197,95,.05);
}

.status-chip::before {
  width: 5px;
  height: 5px;
  content: "";
  border-radius: 50%;
  background: currentColor;
}

.empty-state {
  padding: 64px 24px;
  text-align: center;
  border: 1px dashed var(--line);
  background: rgba(255,255,255,.012);
}

.empty-icon {
  display: grid;
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  place-items: center;
  color: var(--yellow);
  border: 1px solid rgba(213,173,85,.25);
  border-radius: 50%;
  font-size: 26px;
}

.empty-state h3 {
  margin: 0 0 7px;
  font-size: 17px;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.team-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 13px;
  border: 1px solid var(--line-soft);
  background: var(--surface);
}

.team-summary > div {
  display: flex;
  min-height: 78px;
  padding: 15px 19px;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid var(--line-soft);
}

.team-summary > div:last-child {
  border-right: 0;
}

.team-summary span {
  color: var(--muted-2);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .16em;
}

.team-summary strong {
  margin-top: 3px;
  font-size: 15px;
}

.member-name {
  display: flex;
  align-items: center;
  gap: 8px;
}

.leader-tag,
.self-tag {
  padding: 2px 5px;
  color: var(--yellow);
  border: 1px solid rgba(213,173,85,.25);
  border-radius: 2px;
  font-size: 8px;
  font-weight: 850;
}

.self-tag {
  color: var(--rust-bright);
  border-color: rgba(223,90,50,.3);
}

.ranking-filters {
  display: flex;
  gap: 10px;
}

.ranking-table-shell tbody tr.is-self {
  background: rgba(223,90,50,.075);
  box-shadow: inset 3px 0 var(--rust);
}

.rank-column {
  width: 90px;
  text-align: center;
}

.rank-number {
  color: var(--muted);
  text-align: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
}

.rank-number.top {
  color: var(--yellow);
  font-size: 16px;
  font-weight: 900;
}

.player-link {
  padding: 4px 0;
  cursor: pointer;
  color: var(--text);
  border: 0;
  border-bottom: 1px solid transparent;
  background: none;
  font-size: 12px;
  font-weight: 700;
}

.player-link:hover {
  color: var(--rust-bright);
  border-bottom-color: currentColor;
}

.ranking-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px;
  font-weight: 750;
}

.my-rank {
  margin-bottom: 12px;
  padding: 13px 16px;
  color: var(--muted);
  border: 1px solid rgba(223,90,50,.22);
  border-left: 3px solid var(--rust);
  border-radius: var(--radius);
  background: rgba(223,90,50,.05);
  font-size: 12px;
}

.my-rank strong {
  margin: 0 4px;
  color: var(--rust-bright);
  font-size: 15px;
}

.ranking-hint {
  margin: 12px 2px 0;
  color: var(--muted-2);
  font-size: 10px;
}

.site-footer {
  display: flex;
  width: min(1180px, calc(100% - 48px));
  min-height: 80px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line-soft);
  color: var(--muted-2);
  font-size: 9px;
  letter-spacing: .08em;
}

.site-footer span {
  color: var(--muted);
  font-weight: 900;
  letter-spacing: .2em;
}

.player-dialog {
  width: min(720px, calc(100% - 32px));
  max-height: min(720px, calc(100vh - 48px));
  padding: 0;
  overflow: auto;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #131510;
  box-shadow: var(--shadow);
}

.player-dialog::backdrop {
  background: rgba(5, 6, 5, .8);
  backdrop-filter: blur(5px);
}

.dialog-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(19,21,16,.96);
}

.dialog-header h2 {
  margin: 0;
  font-size: 21px;
}

.dialog-steamid {
  color: var(--muted-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
}

.dialog-content {
  padding: 22px;
}

.lookup-server {
  padding: 18px 0;
  border-bottom: 1px solid var(--line-soft);
}

.lookup-server:first-child { padding-top: 0; }
.lookup-server:last-child { padding-bottom: 0; border-bottom: 0; }

.lookup-server h3 {
  margin: 0 0 12px;
  font-size: 13px;
}

.lookup-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.lookup-stats div {
  padding: 11px;
  border: 1px solid var(--line-soft);
  background: var(--surface);
}

.lookup-stats span {
  display: block;
  color: var(--muted-2);
  font-size: 8px;
}

.lookup-stats strong {
  display: block;
  margin-top: 2px;
  font-size: 13px;
}

/* Login */
.login-page {
  display: grid;
  min-height: 100svh;
  overflow-x: hidden;
  place-items: center;
  background:
    radial-gradient(circle at 14% 48%, rgba(223,90,50,.12), transparent 34%),
    linear-gradient(110deg, #11130f 0 53%, #0c0e0b 53% 100%);
}

.login-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .45;
  background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to right, #000, transparent 80%);
}

.login-orbit {
  position: fixed;
  pointer-events: none;
  border: 1px solid rgba(223,90,50,.07);
  border-radius: 50%;
}

.orbit-one {
  width: 530px;
  height: 530px;
  left: -310px;
  top: calc(50% - 265px);
}

.orbit-two {
  width: 390px;
  height: 390px;
  left: -240px;
  top: calc(50% - 195px);
}

.login-shell {
  position: relative;
  z-index: 2;
  display: grid;
  width: min(1100px, calc(100% - 64px));
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, .72fr);
  gap: clamp(70px, 10vw, 150px);
  align-items: center;
  padding: 58px 0 80px;
}

.login-brand {
  margin-bottom: clamp(54px, 9vh, 95px);
}

.login-eyebrow {
  margin: 0 0 13px;
  color: var(--rust-bright);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .28em;
}

.login-intro h1 {
  margin: 0;
  font-size: clamp(44px, 6vw, 76px);
  font-weight: 850;
  letter-spacing: -.065em;
  line-height: 1.12;
}

.login-lead {
  max-width: 520px;
  margin: 22px 0 39px;
  color: var(--muted);
  font-size: 13px;
}

.login-features {
  display: grid;
  max-width: 560px;
  margin: 0;
  padding: 0;
  grid-template-columns: repeat(3, 1fr);
  list-style: none;
}

.login-features li {
  display: flex;
  min-width: 0;
  gap: 10px;
  padding: 0 18px;
  border-left: 1px solid var(--line);
}

.login-features li:first-child { padding-left: 0; border-left: 0; }

.login-features li > span {
  color: var(--rust);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  font-weight: 800;
}

.login-features strong {
  display: block;
  font-size: 11px;
}

.login-features p {
  margin: 3px 0 0;
  color: var(--muted-2);
  font-size: 9px;
  line-height: 1.5;
}

.login-card {
  border: 1px solid var(--line);
  background: rgba(22,24,20,.92);
  box-shadow: 0 35px 100px rgba(0,0,0,.48);
}

.login-card-top,
.login-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 17px;
  color: var(--muted-2);
  border-bottom: 1px solid var(--line-soft);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .16em;
}

.secure-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--green);
}

.secure-badge > span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
}

.login-card-top p {
  margin: 0;
}

.login-card-body {
  padding: 42px 35px 36px;
  text-align: center;
}

.login-emblem {
  position: relative;
  display: grid;
  width: 67px;
  height: 67px;
  margin: 0 auto 23px;
  place-items: center;
  color: var(--rust-bright);
  border: 1px solid rgba(223,90,50,.4);
  transform: rotate(45deg);
}

.login-emblem::after {
  position: absolute;
  inset: 7px;
  content: "";
  border: 1px solid rgba(223,90,50,.15);
}

.login-emblem span {
  font-size: 25px;
  font-weight: 900;
  transform: rotate(-45deg);
}

.login-card h2 {
  margin: 0 0 10px;
  font-size: 22px;
  letter-spacing: -.03em;
}

.login-card-body > p {
  margin: 0 auto 27px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}

.login-error {
  margin: -10px 0 18px;
  padding: 9px 10px;
  color: #f2a89e;
  border: 1px solid rgba(239,107,92,.25);
  background: rgba(239,107,92,.06);
  font-size: 10px;
  text-align: left;
}

.steam-button {
  display: flex;
  min-height: 54px;
  align-items: center;
  gap: 12px;
  padding: 0 17px;
  color: #fff;
  background: #df5a32;
  text-decoration: none;
  box-shadow: inset 0 1px rgba(255,255,255,.16);
  transition: background .18s ease, transform .18s ease;
}

.steam-button:hover {
  background: #ed6740;
  transform: translateY(-1px);
}

.steam-button svg {
  width: 23px;
  fill: currentColor;
}

.steam-button span {
  flex: 1;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .03em;
}

.steam-button .button-arrow {
  width: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.login-note {
  display: flex;
  margin-top: 15px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--muted-2);
  font-size: 8px;
}

.login-note svg {
  width: 12px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.login-card-footer {
  justify-content: center;
  gap: 8px;
  border-top: 1px solid var(--line-soft);
  border-bottom: 0;
}

.login-card-footer .status-dot {
  width: 5px;
  height: 5px;
}

.login-footer {
  position: fixed;
  z-index: 2;
  bottom: 18px;
  left: 50%;
  color: #42473f;
  transform: translateX(-50%);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .18em;
  white-space: nowrap;
}

.login-footer span { color: var(--rust); }

@media (max-width: 950px) {
  .metric-grid-primary { grid-template-columns: repeat(2, 1fr); }
  .resource-grid { grid-template-columns: repeat(3, 1fr); }
  .pve-grid { grid-template-columns: repeat(2, 1fr); }
  .login-shell { width: min(700px, calc(100% - 48px)); grid-template-columns: 1fr; gap: 55px; }
  .login-brand { margin-bottom: 55px; }
  .login-intro { text-align: center; }
  .login-lead, .login-features { margin-left: auto; margin-right: auto; }
  .login-card { width: min(430px, 100%); margin: auto; }
  .login-page { background: radial-gradient(circle at 50% 12%, rgba(223,90,50,.12), transparent 31%), var(--bg); }
}

@media (max-width: 720px) {
  :root { --header-h: 67px; }
  .site-header { padding: 10px 16px; }
  .brand-mark { width: 37px; height: 37px; }
  .brand-copy strong { font-size: 13px; }
  .brand-copy small { font-size: 7px; }
  .profile-copy { display: none; }
  .profile { padding-right: 10px; }
  .avatar-shell { width: 35px; height: 35px; }
  .icon-button { width: 35px; height: 35px; }
  .page-shell { width: calc(100% - 28px); padding: 37px 0 65px; }
  .admin-view-panel { grid-template-columns: 1fr; gap: 16px; margin-bottom: 30px; padding: 17px; }
  .admin-view-controls { flex-wrap: wrap; }
  .admin-view-controls input { flex: 1 0 100%; }
  .admin-view-submit, .admin-view-reset { flex: 1; }
  .hero { display: block; margin-bottom: 34px; }
  .hero h1 { font-size: clamp(30px, 9vw, 43px); }
  .hero-copy { font-size: 12px; }
  .tab { min-height: 52px; flex-direction: column; gap: 3px; font-size: 9px; }
  .tab svg { width: 17px; }
  .tab-panel { padding-top: 34px; }
  .panel-heading { align-items: flex-end; }
  .panel-heading h2 { font-size: 23px; }
  .select-field select { min-width: 128px; }
  .metric-grid-primary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .metric-card { min-height: 140px; padding: 16px; }
  .scroll-shell { max-height: 420px; }
  .memory-entry { padding: 15px; grid-template-columns: 42px minmax(0, 1fr); gap: 13px; }
  .memory-marker { width: 42px; height: 42px; box-shadow: 0 0 0 4px var(--surface); font-size: 7px; }
  .memory-timeline::before { left: 21px; }
  .metric-icon { margin-bottom: 16px; }
  .resource-grid { grid-template-columns: repeat(2, 1fr); }
  .resource-card { min-height: 80px; padding: 13px; }
  .resource-card:last-child { grid-column: 1 / -1; }
  .split-table-grid { grid-template-columns: 1fr; gap: 40px; }
  th, td { padding: 9px 13px; }
  .team-summary { grid-template-columns: 1fr 1fr; }
  .team-summary > div:nth-child(2) { border-right: 0; }
  .team-summary > div:last-child { grid-column: 1 / -1; border-top: 1px solid var(--line-soft); }
  .ranking-heading { display: block; }
  .ranking-filters { margin-top: 20px; }
  .ranking-filters .select-field { flex: 1; }
  .ranking-filters select { width: 100%; min-width: 0; }
  .site-footer { width: calc(100% - 28px); display: block; padding: 22px 0; text-align: center; }
  .site-footer p { margin: 7px 0 0; }
  .lookup-stats { grid-template-columns: repeat(2, 1fr); }
  .login-shell { width: calc(100% - 28px); padding: 35px 0 80px; gap: 44px; }
  .login-brand { justify-content: center; margin-bottom: 42px; }
  .login-intro h1 { font-size: clamp(40px, 13vw, 58px); }
  .login-features { grid-template-columns: 1fr; gap: 15px; text-align: left; }
  .login-features li, .login-features li:first-child { padding: 0 0 0 14px; border-left: 1px solid var(--line); }
  .login-card-body { padding: 37px 24px 30px; }
}

@media (max-width: 400px) {
  .brand-copy { display: none; }
  .metric-card > strong { font-size: 23px; }
  .metric-card { min-height: 145px; }
  .resource-grid { grid-template-columns: 1fr; }
  .resource-card:last-child { grid-column: auto; }
  .pve-grid { grid-template-columns: 1fr; }
  .panel-heading { gap: 12px; }
  .panel-heading h2 { font-size: 21px; }
  .select-field select { min-width: 118px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
