:root {
  --paper: #f3efe7;
  --paper-deep: #e8e1d5;
  --white: #fffdf9;
  --navy: #14202e;
  --navy-soft: #223346;
  --ink: #1b252e;
  --ink-soft: #687079;
  --line: #d8d0c4;
  --coral: #dc624c;
  --coral-dark: #b94736;
  --blue: #587a94;
  --gold: #c79a3d;
  --success: #2e765e;
  --shadow: 0 20px 55px rgba(27, 37, 46, 0.13);
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Pretendard", "Noto Sans KR", "Malgun Gothic", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color: var(--ink);
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  background:
    linear-gradient(rgba(20, 32, 46, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 32, 46, 0.025) 1px, transparent 1px),
    var(--paper);
  background-size: 36px 36px;
  margin: 0;
  min-width: 320px;
  font-family: var(--sans);
}

button,
input,
textarea,
select {
  color: inherit;
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button {
  border: 0;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(220, 98, 76, 0.42);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.skip-link {
  background: var(--coral);
  color: var(--white);
  left: 16px;
  padding: 10px 16px;
  position: fixed;
  top: -80px;
  z-index: 1000;
}

.skip-link:focus {
  top: 16px;
}

.site-header {
  background: rgba(255, 253, 249, 0.96);
  border-bottom: 1px solid var(--line);
  height: 76px;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 40;
}

.site-header-inner {
  display: grid;
  grid-template-columns: 250px minmax(420px, 1fr);
  height: 100%;
  margin: 0 auto;
  max-width: 1600px;
  padding: 0 clamp(20px, 5vw, 80px);
}

.brand {
  align-items: center;
  background: transparent;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: center;
  padding: 0 22px;
  text-align: center;
}

.brand-emblem {
  display: block;
  flex: 0 0 auto;
  height: 52px;
  object-fit: contain;
  width: 40px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-family: var(--serif);
  font-size: 24px;
  letter-spacing: -0.04em;
}

.brand small {
  color: var(--ink-soft);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.14em;
  margin-top: 2px;
}

.main-nav {
  align-items: stretch;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.main-nav button {
  align-items: center;
  background: transparent;
  border-right: 1px solid var(--line);
  border-bottom: 3px solid transparent;
  display: flex;
  font-size: 15px;
  font-weight: 800;
  height: 100%;
  justify-content: center;
  line-height: 1.2;
  min-width: 0;
  padding: 3px 14px 0;
  text-align: center;
  width: 100%;
}

.main-nav button:hover {
  color: var(--coral-dark);
}

.main-nav button[aria-current="page"] {
  border-bottom-color: var(--coral);
  color: var(--coral-dark);
}

.nav-label {
  display: block;
}

.eyebrow {
  color: var(--coral);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.18em;
  margin: 0 0 14px;
  text-transform: uppercase;
}

.hero-metrics {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 auto;
  max-width: 1600px;
  padding: 28px clamp(20px, 5vw, 80px) 0;
}

.metric {
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(27, 37, 46, 0.045);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 104px;
  padding: 18px;
  text-align: center;
}

.metric span {
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 800;
  margin-bottom: 8px;
}

.metric strong {
  align-items: center;
  display: flex;
  font-size: 30px;
  font-weight: 700;
  justify-content: center;
  line-height: 1;
  min-height: 30px;
}

.metric-number {
  font-family: Arial, var(--sans);
  font-feature-settings: "lnum" 1, "tnum" 1;
  font-variant-numeric: lining-nums tabular-nums;
}

.metric .metric-guild {
  color: var(--coral-dark);
  font-family: var(--sans);
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notice {
  align-items: center;
  display: flex;
  gap: 16px;
  padding: 13px clamp(20px, 5vw, 80px);
}

.notice-demo {
  background: #f1c66d;
  border-bottom: 1px solid #d5ad55;
}

.notice strong {
  font-size: 11px;
}

.notice span {
  font-size: 10px;
}

.dashboard-shell {
  margin: 0 auto;
  max-width: 1600px;
  min-height: 500px;
  padding: 0 clamp(20px, 5vw, 80px) 90px;
}

.dashboard-toolbar {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  min-height: 80px;
}

.view-tabs {
  align-self: stretch;
  display: flex;
}

.view-tabs button {
  background: transparent;
  border-bottom: 3px solid transparent;
  color: var(--ink-soft);
  font-size: 16px;
  font-weight: 900;
  padding: 0 22px;
}

.view-tabs button[aria-selected="true"] {
  border-color: var(--coral);
  color: var(--ink);
}

.filters {
  align-items: stretch;
  display: flex;
  gap: 8px;
}

.filters label {
  position: relative;
}

.filters label > span {
  left: 12px;
  pointer-events: none;
  position: absolute;
  top: 7px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 800;
}

.filters select {
  appearance: none;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 0;
  font-size: 13px;
  min-width: 150px;
  padding: 20px 34px 7px 12px;
}

.filters > label::after {
  content: "⌄";
  pointer-events: none;
  position: absolute;
  right: 12px;
  top: 16px;
}

.guild-search {
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(210px, 1fr) auto auto;
}

.guild-search label {
  min-width: 240px;
}

.guild-search input {
  background: var(--white);
  border: 1px solid var(--line);
  font-size: 13px;
  height: 100%;
  min-width: 0;
  padding: 20px 12px 7px;
  width: 100%;
}

.guild-search button {
  background: var(--navy);
  color: var(--white);
  font-size: 11px;
  font-weight: 900;
  min-width: 58px;
  padding: 0 13px;
}

.guild-search .search-clear {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  min-width: 54px;
}

.toolbar-note {
  color: var(--ink-soft);
  font-size: 12px;
}

.ranking-board {
  padding-top: 24px;
}

.world-board {
  padding-top: 30px;
}

.board-heading,
.section-heading {
  align-items: flex-end;
  display: flex;
  justify-content: space-between;
  margin-bottom: 24px;
}

.board-heading-centered {
  align-items: center;
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
}

.board-heading-side {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.65;
}

.update-stamp {
  justify-self: start;
  text-align: left;
}

.update-stamp span,
.update-stamp time {
  display: block;
}

.update-stamp span {
  color: var(--coral-dark);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.update-stamp time {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.board-heading-summary {
  justify-self: end;
}

.section-heading h2,
.section-heading h3 {
  font-family: var(--serif);
  font-size: clamp(30px, 3vw, 44px);
  font-weight: 500;
  letter-spacing: -0.04em;
  margin: 0;
}

.board-heading > p,
.section-heading > span {
  color: var(--ink-soft);
  font-size: 13px;
  margin: 0;
  text-align: right;
}

.ranking-table {
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 14px 45px rgba(27, 37, 46, 0.055);
  overflow: clip;
}

.ranking-head,
.ranking-row {
  display: grid;
  gap: 18px;
  grid-template-columns:
    60px minmax(0, 1.4fr) repeat(5, minmax(0, 1fr))
    100px 90px;
  min-width: 0;
}

.ranking-head {
  background: var(--paper-deep);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 900;
  padding: 13px 20px;
}

.ranking-head span:nth-child(n + 3):nth-child(-n + 7) {
  text-align: center;
}

.ranking-head span:nth-child(n + 8) {
  text-align: right;
}

.ranking-row {
  align-items: center;
  background: transparent;
  border-top: 1px solid #ece7df;
  min-height: 74px;
  padding: 0 20px;
  text-align: left;
  transition: background 150ms ease;
  width: 100%;
}

.ranking-row:hover {
  background: #faf5ed;
}

.ranking-row.is-top {
  background: linear-gradient(90deg, rgba(241, 198, 109, 0.14), transparent 40%);
}

.rank-number {
  color: var(--ink-soft);
  display: flex;
  flex-direction: column;
  font-family: Arial, var(--sans);
  font-feature-settings: "lnum" 1, "tnum" 1;
  font-variant-numeric: lining-nums tabular-nums;
  font-size: 22px;
  gap: 2px;
}

.rank-number strong {
  font-weight: 500;
  line-height: 1;
}

.rank-number small {
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.is-top-1 .rank-number {
  color: var(--coral-dark);
  font-size: 27px;
}

.guild-name strong {
  display: block;
}

.guild-name strong {
  font-size: 16px;
}

.guild-score {
  font-family: Arial, var(--sans);
  font-feature-settings: "lnum" 1, "tnum" 1;
  font-variant-numeric: lining-nums tabular-nums;
  font-size: 19px;
  text-align: center;
}

.guild-members {
  font-family: Arial, var(--sans);
  font-feature-settings: "lnum" 1, "tnum" 1;
  font-variant-numeric: lining-nums tabular-nums;
  font-size: 19px;
  text-align: center;
}

.guild-score {
  color: var(--coral-dark);
  font-size: 22px;
}

.guild-members small,
.guild-score small {
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 10px;
  margin-left: 3px;
}

.guild-leader,
.guild-level,
.guild-server {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.45;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guild-leader,
.guild-level,
.guild-server {
  text-align: center;
}

.guild-change {
  align-self: center;
  font-size: 13px;
  font-weight: 900;
  text-align: right;
}

.guild-change.is-up {
  color: var(--success);
}

.guild-change.is-down {
  color: var(--coral-dark);
}

.guild-change.is-flat {
  color: var(--ink-soft);
}

.guild-change.is-new {
  color: var(--blue);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.pagination {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 24px;
}

.pagination button {
  background: var(--white);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 800;
  min-height: 38px;
  min-width: 38px;
  padding: 0 12px;
}

.pagination button[aria-current="page"] {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

.pagination button:disabled {
  cursor: default;
}

.pagination-ellipsis {
  color: var(--ink-soft);
  padding: 0 4px;
}

.pagination-summary {
  color: var(--ink-soft);
  font-size: 12px;
  margin-left: 10px;
}

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

.world-card {
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 12px 28px rgba(27, 37, 46, 0.05);
}

.world-card > header {
  align-items: flex-end;
  background: var(--navy);
  color: var(--white);
  display: flex;
  justify-content: space-between;
  padding: 20px 18px;
}

.world-card > header span {
  color: rgba(255, 255, 255, 0.45);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.15em;
}

.world-card > header strong {
  color: #f1c66d;
  font-size: 26px;
  font-weight: 900;
}

.realm-row {
  border-top: 1px solid #ece7df;
  display: grid;
  gap: 4px;
  grid-template-columns: 78px minmax(0, 1fr);
  padding: 15px 14px;
}

.realm-row > strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
  padding-top: 4px;
}

.realm-row > div {
  min-width: 0;
}

.realm-row button {
  align-items: center;
  background: transparent;
  display: grid;
  gap: 3px;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  padding: 6px 0;
  text-align: left;
  width: 100%;
}

.realm-placeholder {
  align-items: center;
  color: #a39d94;
  display: grid;
  font-size: 13px;
  min-height: 31px;
  padding: 6px 0;
}

.realm-row button:hover b {
  color: var(--coral-dark);
}

.realm-row button b.is-affiliated,
.realm-row button:hover b.is-affiliated {
  color: var(--guild-affiliation-color);
}

.realm-row button span {
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 13px;
}

.realm-row button b {
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.realm-row button small {
  color: var(--ink-soft);
  font-size: 12px;
}

.realm-empty {
  color: #a39d94;
  display: block;
  font-size: 12px;
  padding: 5px 0;
}

.history-strip {
  align-items: flex-start;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1600px;
  padding: 34px clamp(20px, 5vw, 80px) 0;
}

.history-export-button {
  background: var(--navy);
  color: var(--white);
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 900;
  min-height: 48px;
  padding: 0 20px;
}

.history-export-button:hover {
  background: #22344a;
}

.history-picker {
  max-width: 100%;
  position: relative;
  width: 520px;
  z-index: 20;
}

.history-picker summary {
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 12px 30px rgba(40, 44, 52, 0.07);
  cursor: pointer;
  list-style: none;
  padding: 13px 48px 13px 16px;
  position: relative;
}

.history-picker summary::-webkit-details-marker {
  display: none;
}

.history-picker summary::after {
  color: var(--coral-dark);
  content: "⌄";
  font-size: 22px;
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  transition: transform 150ms ease;
}

.history-picker[open] summary::after {
  transform: translateY(-50%) rotate(180deg);
}

.history-picker-label,
.history-picker summary strong,
.history-picker summary small {
  display: block;
}

.history-picker-label {
  color: var(--coral-dark);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.history-picker summary strong {
  font-size: 14px;
}

.history-picker summary small {
  color: var(--ink-soft);
  font-size: 11px;
  margin-top: 4px;
}

.history-list {
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 20px 45px rgba(40, 44, 52, 0.14);
  display: grid;
  left: 0;
  max-height: 280px;
  overflow-y: auto;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
}

.history-list button {
  align-items: center;
  background: var(--white);
  border-bottom: 1px solid #ece7df;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 46px;
  padding: 9px 12px;
  text-align: left;
  width: 100%;
}

.history-list button:last-child {
  border-bottom: 0;
}

.history-list button:hover,
.history-list button.is-active {
  background: #faf5ed;
}

.history-list button.is-active {
  box-shadow: inset 3px 0 0 var(--coral);
}

.history-list time {
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.history-list small {
  color: var(--ink-soft);
  font-size: 11px;
}

.history-list small {
  white-space: nowrap;
}

.comparison-section {
  margin: 0 auto;
  max-width: 1600px;
  min-height: 610px;
  padding: 34px clamp(20px, 5vw, 80px) 100px;
}

.comparison-picker {
  align-items: stretch;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr);
  margin: 0 auto 30px;
  max-width: 980px;
}

.comparison-history-picker {
  max-width: none;
  width: 100%;
}

.comparison-history-picker.is-older .history-picker-label,
.comparison-history-picker.is-older summary::after {
  color: var(--blue);
}

.comparison-picker-vs {
  align-items: center;
  color: var(--ink-soft);
  display: flex;
  font-family: var(--serif);
  font-size: 15px;
  justify-content: center;
}

.comparison-history-picker.is-newer[open] {
  z-index: 22;
}

.comparison-history-picker.is-older[open] {
  z-index: 21;
}

.comparison-table {
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 14px 45px rgba(27, 37, 46, 0.055);
  overflow: clip;
}

.comparison-head,
.comparison-row {
  display: grid;
  gap: 12px;
  grid-template-columns:
    minmax(170px, 1.5fr) repeat(7, minmax(70px, 0.72fr));
  min-width: 0;
}

.comparison-head {
  background: var(--paper-deep);
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 900;
  padding: 13px 18px;
}

.comparison-row {
  align-items: center;
  background: transparent;
  border-top: 1px solid #ece7df;
  min-height: 68px;
  padding: 10px 18px;
  text-align: left;
  width: 100%;
}

.comparison-row:not(:disabled):hover {
  box-shadow: inset 4px 0 0 var(--coral);
}

.comparison-row:disabled {
  color: inherit;
  cursor: not-allowed;
  opacity: 0.78;
}

.comparison-row.is-added {
  background: linear-gradient(90deg, rgba(220, 98, 76, 0.08), transparent 35%);
}

.comparison-row.is-removed {
  background: linear-gradient(90deg, rgba(72, 121, 158, 0.08), transparent 35%);
}

.comparison-head span:not(:first-child),
.comparison-row > span:not(:first-child),
.comparison-row > .comparison-change {
  text-align: center;
}

.comparison-row > span:not(:first-child),
.comparison-change {
  font-family: Arial, var(--sans);
  font-size: 12px;
  font-variant-numeric: lining-nums tabular-nums;
}

.comparison-guild {
  min-width: 0;
}

.comparison-guild > strong,
.comparison-guild > small {
  display: block;
}

.comparison-guild > strong {
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comparison-guild > small:not(.comparison-status) {
  color: var(--ink-soft);
  font-size: 10px;
  margin-top: 4px;
}

.comparison-status {
  font-size: 9px;
  font-weight: 900;
  margin-top: 5px;
}

.comparison-status.is-new,
.comparison-change.is-new {
  color: var(--coral-dark);
}

.comparison-status.is-removed,
.comparison-change.is-removed {
  color: var(--blue);
}

.comparison-change {
  font-weight: 900;
}

.comparison-change.is-up {
  color: var(--success);
}

.comparison-change.is-down {
  color: var(--coral-dark);
}

.comparison-change.is-flat {
  color: var(--ink-soft);
}

body.auth-pending .site-header,
body.auth-pending main,
body.auth-pending .site-footer {
  visibility: hidden;
}

body.access-locked {
  min-height: 100vh;
}

.access-gate {
  min-height: 100vh;
  padding: clamp(32px, 7vw, 100px) 20px;
}

.access-gate-card {
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 18px 52px rgba(40, 44, 52, 0.11);
  margin: 0 auto;
  max-width: 520px;
  padding: clamp(34px, 6vw, 58px);
  text-align: center;
}

.access-gate-emblem {
  display: block;
  height: auto;
  margin: 0 auto 24px;
  max-width: 100%;
  width: clamp(140px, 32vw, 180px);
}

.access-gate-card h1 {
  font-family: var(--serif);
  font-size: clamp(34px, 5vw, 48px);
  font-weight: 500;
  letter-spacing: -0.04em;
  margin: 0;
}

.access-gate-card .auth-form {
  margin-top: 28px;
}

.access-gate-card > small {
  color: #7d7770;
  display: block;
  font-size: 11px;
  line-height: 1.6;
  margin-top: 18px;
}

.admin-section {
  margin: 0 auto;
  max-width: 1600px;
  min-height: 610px;
  padding: 52px clamp(20px, 5vw, 80px) 100px;
}

.admin-tabs {
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin: 0 auto 24px;
  width: 100%;
}

.admin-tabs button {
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font: 800 14px/1.2 var(--sans);
  min-height: 52px;
  padding: 12px 18px;
}

.admin-tabs button:hover,
.admin-tabs button:focus-visible,
.admin-tabs button[aria-current="page"] {
  border-bottom-color: var(--coral);
  color: var(--navy);
}

.admin-tab-card {
  margin: 0 auto;
  max-width: none;
  width: 100%;
}

.site-login-settings-form {
  align-items: center;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-top: 28px;
  padding: 18px 20px;
}

.site-login-settings-form label {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 13px;
}

.site-login-settings-form input {
  accent-color: var(--coral);
  flex: 0 0 auto;
  height: 22px;
  width: 22px;
}

.site-login-settings-form strong,
.site-login-settings-form small {
  display: block;
}

.site-login-settings-form strong {
  color: var(--navy);
  font-size: 14px;
}

.site-login-settings-form small {
  color: var(--ink-soft);
  font-size: 11px;
  margin-top: 4px;
}

.site-login-settings-form .form-message {
  grid-column: 1 / -1;
}

.access-account-form {
  align-items: end;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  margin: 28px 0;
}

.access-account-form label > span {
  display: block;
  font-size: 11px;
  font-weight: 900;
  margin-bottom: 7px;
}

.access-account-form input {
  background: #faf7f1;
  border: 1px solid var(--line);
  border-radius: 0;
  font: 700 14px/1.2 var(--sans);
  min-height: 48px;
  padding: 0 14px;
  width: 100%;
}

.access-account-form .primary-button {
  min-height: 48px;
}

.access-account-form .form-message {
  grid-column: 1 / -1;
}

.access-account-list {
  border-top: 1px solid var(--line);
}

.access-account-row {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(170px, auto) 110px;
  min-height: 74px;
  padding: 12px 4px;
}

.access-account-row span:first-child,
.access-account-row span:first-child small {
  display: block;
}

.access-account-row span:first-child small,
.access-account-row time {
  color: var(--ink-soft);
  font-size: 11px;
  margin-top: 4px;
}

.account-role-badge {
  color: var(--coral-dark);
  font-size: 11px;
  font-weight: 900;
  text-align: right;
}

.danger-text-button {
  background: transparent;
  border: 0;
  color: var(--blue);
  cursor: pointer;
  font: 800 12px/1.2 var(--sans);
  text-align: right;
}

.access-log-table {
  border: 1px solid var(--line);
  margin-top: 26px;
}

.access-log-head,
.access-log-row {
  align-items: center;
  display: grid;
  gap: 16px;
  grid-template-columns:
    minmax(150px, 1.25fr) minmax(100px, 1fr) minmax(110px, 1fr)
    minmax(68px, 0.7fr) minmax(96px, 0.8fr) minmax(132px, 1fr);
  padding: 13px 16px;
}

.access-log-head {
  background: var(--paper-deep);
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 900;
}

.access-log-row {
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.access-log-row code {
  color: var(--blue);
  font-family: Arial, sans-serif;
  font-size: 12px;
}

.access-log-row b {
  color: var(--coral-dark);
  font-size: 12px;
}

.access-log-row.is-success b {
  color: #1d745c;
}

.access-log-row.is-locked,
.access-log-row.is-blocked {
  background: #fff9f5;
}

.access-log-lockout {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  min-width: 0;
}

.access-log-lockout small {
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.4;
}

.access-log-lockout.is-active small {
  color: var(--coral-dark);
  font-weight: 800;
}

.access-log-lockout.is-released small {
  color: #1d745c;
}

.admin-list-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  justify-content: flex-end;
}

.admin-list-actions > span {
  color: var(--ink-soft);
  font-size: 11px;
}

.admin-page-size-control {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.admin-page-size-control > span {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.admin-page-size-control select {
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--ink);
  font: 800 11px/1.2 var(--sans);
  min-height: 40px;
  padding: 0 32px 0 11px;
}

.admin-list-pagination {
  justify-content: flex-start;
  margin-top: 16px;
}

.lockout-release-button {
  background: transparent;
  border: 1px solid rgba(193, 58, 43, 0.4);
  color: var(--coral-dark);
  flex: 0 0 auto;
  font: 800 9px/1.2 var(--sans);
  min-height: 30px;
  padding: 0 9px;
  white-space: nowrap;
}

.lockout-release-button:hover,
.lockout-release-button:focus-visible {
  background: #fff1ec;
  border-color: var(--coral-dark);
}

.compact-button {
  min-height: 40px;
  padding: 0 16px;
  width: auto;
}

.admin-grid {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 280px;
  margin: 0 auto;
  width: 100%;
}

.admin-settings-card,
.admin-tab-card {
  grid-column: 1;
  grid-row: 1;
}

.admin-tab-stack {
  display: grid;
  gap: 18px;
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}

.history-management-card {
  width: 100%;
}

.admin-card,
.auth-card {
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 14px 36px rgba(40, 44, 52, 0.07);
  padding: 30px;
}

.admin-settings-form + .admin-settings-form {
  border-top: 1px solid var(--line);
  margin-top: 28px;
  padding-top: 28px;
}

.admin-settings-subheading {
  align-items: end;
  display: flex;
  gap: 20px;
  justify-content: space-between;
}

.admin-settings-subheading h3 {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 500;
  margin: 0;
}

.admin-settings-subheading span {
  color: var(--ink-soft);
  font-size: 9px;
  text-align: right;
}

.admin-form-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 26px 0 20px;
}

.admin-form-grid-compact {
  margin-top: 16px;
}

.admin-form-grid label,
.auth-form label,
.compact-form label {
  display: block;
}

.admin-form-grid label > span,
.admin-form-grid label > small,
.auth-form label > span,
.compact-form label > span {
  display: block;
}

.admin-form-grid label > span,
.auth-form label > span,
.compact-form label > span {
  font-size: 10px;
  font-weight: 900;
  margin-bottom: 7px;
}

.admin-form-grid label > small {
  color: var(--ink-soft);
  font-size: 8px;
  margin-top: 5px;
}

.admin-form-grid input,
.admin-form-grid textarea,
.auth-form input,
.compact-form input {
  background: #faf7f1;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 12px 13px;
  width: 100%;
}

.admin-form-grid textarea {
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 11px;
  line-height: 1.55;
  resize: vertical;
}

.wide-field {
  grid-column: 1 / -1;
}

.score-threshold-field input {
  max-width: 240px;
}

.auto-update-fields {
  align-items: end;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  display: grid;
  gap: 12px 18px;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 240px);
  margin: 0;
  min-width: 0;
  padding: 15px;
}

.admin-form-grid .auto-update-toggle {
  align-items: center;
  display: flex;
  gap: 10px;
  min-height: 44px;
}

.auto-update-toggle input[type="checkbox"] {
  accent-color: var(--coral);
  flex: 0 0 auto;
  height: 16px;
  margin: 0;
  padding: 0;
  width: 16px;
}

.admin-form-grid .auto-update-toggle > span {
  font-size: 11px;
  margin: 0;
}

.auto-update-time > span {
  display: block;
  font-size: 10px;
  font-weight: 900;
  margin-bottom: 7px;
}

.auto-update-time input[type="time"] {
  min-height: 44px;
}

.auto-update-weekdays {
  grid-column: 1 / -1;
}

.auto-update-weekdays > span {
  display: block;
  font-size: 10px;
  font-weight: 900;
  margin-bottom: 8px;
}

.auto-update-weekdays > div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.admin-form-grid .auto-update-weekdays label {
  align-items: center;
  background: var(--white);
  border: 1px solid var(--line);
  display: inline-flex;
  flex: 0 0 auto;
  gap: 6px;
  min-height: 36px;
  padding: 0 11px;
}

.auto-update-weekdays input[type="checkbox"] {
  accent-color: var(--coral);
  height: 15px;
  margin: 0;
  padding: 0;
  width: 15px;
}

.admin-form-grid .auto-update-weekdays label > span {
  font-size: 11px;
  margin: 0;
}

.auto-update-status {
  color: var(--ink-soft);
  font-size: 9px;
  grid-column: 1 / -1;
  line-height: 1.55;
  margin: 0;
}

.alliance-settings-fields {
  background: #faf7f1;
  border: 1px solid var(--line);
  grid-column: 1 / -1;
  margin: 0;
  min-width: 0;
  padding: 15px;
}

.alliance-settings-fields legend {
  font-size: 11px;
  font-weight: 900;
  padding: 0 6px;
}

.alliance-settings-fields > p {
  color: var(--ink-soft);
  font-size: 9px;
  margin: 0 0 12px;
}

.alliance-setting-list {
  display: grid;
  gap: 8px;
}

.alliance-setting-row {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: 24px minmax(0, 1fr) minmax(250px, auto);
}

.alliance-slot-number {
  color: var(--ink-soft);
  font-family: Arial, var(--sans);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.alliance-color-field {
  border: 0;
  margin: 0;
  min-width: 0;
  padding: 0;
}

.alliance-color-field legend {
  font-size: 10px;
  font-weight: 900;
  margin-bottom: 7px;
  padding: 0;
}

.alliance-color-palette {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.admin-form-grid .alliance-color-option {
  cursor: pointer;
  display: block;
  flex: 0 0 auto;
  position: relative;
}

.admin-form-grid .alliance-color-option input[type="radio"] {
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.admin-form-grid .alliance-color-swatch {
  background: var(--alliance-option-color);
  border: 2px solid var(--white);
  box-shadow: 0 0 0 1px rgba(24, 36, 50, 0.24);
  display: block;
  height: 28px;
  margin: 0;
  transition:
    outline-color 120ms ease,
    transform 120ms ease;
  width: 28px;
}

.alliance-color-option input:checked + .alliance-color-swatch {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
  transform: scale(0.84);
}

.alliance-color-option input:focus-visible + .alliance-color-swatch {
  outline: 3px solid var(--coral);
  outline-offset: 2px;
}

.primary-button,
.secondary-button,
.crawl-button {
  min-height: 44px;
  padding: 0 20px;
}

.primary-button {
  background: var(--coral);
  color: var(--white);
  font-size: 11px;
  font-weight: 900;
}

.primary-button:hover {
  background: var(--coral-dark);
}

button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.admin-side {
  display: grid;
  gap: 13px;
  grid-column: 2;
  grid-row: 1;
}

.admin-card h2 {
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 500;
  margin: 0;
}

.admin-card > p:not(.eyebrow) {
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.7;
}

.crawl-card {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

.crawl-card > p:not(.eyebrow) {
  color: rgba(255, 255, 255, 0.59);
}

.server-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.server-heading .eyebrow {
  margin: 0;
}

.server-status {
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.08em;
  padding: 6px 8px;
}

.server-status.is-online {
  background: rgba(73, 178, 130, 0.14);
  border-color: rgba(97, 213, 158, 0.45);
  color: #8be0b7;
}

.server-status.is-offline {
  background: rgba(220, 98, 76, 0.12);
  border-color: rgba(220, 98, 76, 0.4);
  color: #f0a194;
}

.crawl-card dl {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin: 22px 0;
  padding: 13px 0;
}

.crawl-card dl > div {
  display: flex;
  font-size: 9px;
  justify-content: space-between;
  padding: 5px 0;
}

.crawl-card dt {
  color: rgba(255, 255, 255, 0.45);
}

.crawl-card dd {
  margin: 0;
}

.crawl-button {
  background: #f1c66d;
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
  width: 100%;
}

.server-actions {
  display: grid;
  gap: 8px;
}

.server-stop-button {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.76);
  font-size: 9px;
  font-weight: 900;
  min-height: 38px;
  padding: 0 16px;
  width: 100%;
}

.server-stop-button:hover {
  background: rgba(255, 255, 255, 0.07);
}

.local-update-steps {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.72);
  counter-reset: local-update;
  display: grid;
  font-size: 9px;
  gap: 10px;
  list-style: none;
  margin: 0 0 14px;
  padding: 14px;
}

.local-update-steps li {
  align-items: center;
  display: grid;
  gap: 9px;
  grid-template-columns: 22px minmax(0, 1fr);
  line-height: 1.5;
}

.local-update-steps li::before {
  align-items: center;
  background: #f1c66d;
  color: var(--ink);
  content: counter(local-update);
  counter-increment: local-update;
  display: inline-flex;
  font-size: 9px;
  font-weight: 900;
  height: 22px;
  justify-content: center;
  width: 22px;
}

.local-update-steps li > span {
  min-width: 0;
}

.local-update-steps strong {
  color: #f1c66d;
  white-space: nowrap;
}

.crawl-progress {
  color: #f1c66d;
  font-size: 9px;
  line-height: 1.55;
  min-height: 14px;
}

.crawl-card > small {
  color: rgba(255, 255, 255, 0.42);
  display: block;
  font-size: 8px;
  line-height: 1.6;
}

.button-stack {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.admin-account-actions {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.admin-account-actions button {
  background: #faf7f1;
  border: 1px solid var(--line);
  color: var(--ink);
  font: 900 10px/1.2 var(--sans);
  margin: 0;
  min-height: 42px;
  padding: 0 14px;
  text-align: center;
  width: 100%;
}

.admin-account-actions button:hover,
.admin-account-actions button:focus-visible {
  background: var(--paper-deep);
  border-color: #bcb4a9;
}

.admin-account-actions [data-admin-action="site-logout"] {
  background: #fff4f0;
  border-color: rgba(193, 58, 43, 0.42);
  color: var(--coral-dark);
}

.admin-account-actions [data-admin-action="site-logout"]:hover,
.admin-account-actions [data-admin-action="site-logout"]:focus-visible {
  background: #ffe9e2;
  border-color: var(--coral-dark);
}

.storage-overview {
  background: #fbf8f2;
  border: 1px solid var(--line);
  margin: 0;
  padding: 20px;
}

.storage-overview-heading {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.storage-overview-heading .eyebrow {
  margin: 0 0 4px;
}

.storage-overview-heading h3 {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  margin: 0;
}

.storage-file-grid,
.storage-volume-list {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  margin-top: 16px;
}

.storage-file-grid > div,
.storage-volume-card {
  background: var(--white);
  border: 1px solid var(--line);
  min-width: 0;
  padding: 14px;
}

.storage-file-grid span,
.storage-file-grid small,
.storage-volume-card p,
.storage-volume-card small {
  color: var(--ink-soft);
  display: block;
  font-size: 9px;
  line-height: 1.5;
}

.storage-file-grid strong {
  display: block;
  font-family: Arial, var(--sans);
  font-size: 20px;
  font-variant-numeric: lining-nums tabular-nums;
  margin: 4px 0 3px;
}

.storage-volume-heading {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.storage-volume-heading strong {
  font-size: 12px;
}

.storage-volume-heading span,
.storage-volume-card p,
.storage-volume-card small {
  font-family: Arial, var(--sans);
  font-variant-numeric: lining-nums tabular-nums;
}

.storage-volume-heading span {
  color: var(--coral-dark);
  font-size: 14px;
  font-weight: 900;
}

.storage-volume-card p {
  margin: 10px 0 7px;
}

.storage-usage-track {
  background: #e7e1d8;
  height: 8px;
  margin-bottom: 7px;
  overflow: hidden;
}

.storage-usage-track > span {
  background: var(--coral);
  display: block;
  height: 100%;
}

.storage-overview-note,
.storage-overview-empty {
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.6;
  margin: 12px 0 0;
}

.storage-overview-empty {
  background: var(--white);
  border: 1px dashed var(--line);
  padding: 16px;
}

.history-delete-form {
  margin-top: 22px;
}

.history-delete-toolbar {
  align-items: center;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  display: flex;
  font-size: 11px;
  justify-content: space-between;
  min-height: 42px;
  padding: 9px 13px;
}

.history-delete-toolbar label,
.history-delete-row {
  align-items: center;
  cursor: pointer;
  display: flex;
}

.history-delete-toolbar label {
  color: var(--ink);
  font-weight: 800;
  gap: 7px;
}

.history-delete-toolbar input,
.history-delete-row input {
  accent-color: var(--coral-dark);
  height: 15px;
  margin: 0;
  width: 15px;
}

.history-delete-list {
  border: 1px solid var(--line);
  border-top: 0;
}

.history-delete-row {
  border-bottom: 1px solid #ece7df;
  gap: 12px;
  min-height: 54px;
  padding: 9px 13px;
}

.history-delete-row:last-child {
  border-bottom: 0;
}

.history-delete-row:hover {
  background: #fffaf4;
}

.history-delete-row > span {
  align-items: center;
  display: flex;
  flex: 1;
  gap: 16px;
  justify-content: space-between;
  min-width: 0;
}

.history-delete-row time {
  color: var(--ink);
  font-family: Arial, var(--sans);
  font-size: 12px;
  font-variant-numeric: lining-nums tabular-nums;
}

.history-delete-row small {
  color: var(--ink-soft);
  font-size: 10px;
  white-space: nowrap;
}

.history-delete-empty {
  background: var(--paper-deep);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 11px;
  margin: 0;
  padding: 18px;
  text-align: center;
}

.danger-button {
  background: var(--coral-dark);
  color: var(--white);
  font-size: 11px;
  font-weight: 900;
  margin-top: 12px;
  min-height: 42px;
  padding: 0 18px;
}

.danger-button:hover {
  background: #a72e24;
}

.admin-list-actions .danger-button {
  margin-top: 0;
}

.secondary-button {
  background: transparent;
  border: 1px solid var(--line);
  font-size: 10px;
  font-weight: 900;
}

.secondary-button:hover {
  background: var(--paper);
}

.compact-form {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 11px;
  margin-top: 18px;
  padding-top: 18px;
}

.text-button,
.logout-button {
  background: transparent;
  color: var(--coral-dark);
  font-size: 9px;
  font-weight: 900;
  padding: 8px 0;
  text-align: left;
}

.logout-button {
  border-top: 1px solid var(--line);
  margin-top: 12px;
  padding-top: 17px;
  width: 100%;
}

.form-message {
  color: var(--success);
  font-size: 9px;
  line-height: 1.5;
  margin: 8px 0 0;
  min-height: 14px;
}

.form-message.is-error {
  color: var(--coral-dark);
}

.auth-card {
  margin: 0 auto;
  max-width: 500px;
  padding: 46px;
  text-align: center;
}

.auth-emblem {
  display: block;
  height: auto;
  margin: 0 auto 22px;
  max-width: 100%;
  width: 96px;
}

.auth-card h2 {
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 500;
  letter-spacing: -0.04em;
  margin: 0;
}

.auth-card > p:not(.eyebrow) {
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.8;
  margin: 16px 0 24px;
}

.auth-card > small {
  color: #918b83;
  display: block;
  font-size: 8px;
  line-height: 1.65;
  margin-top: 18px;
}

.auth-form {
  display: grid;
  gap: 14px;
  text-align: left;
}

.auth-form .primary-button {
  margin-top: 5px;
  width: 100%;
}

.empty-state {
  align-items: center;
  background: var(--white);
  border: 1px dashed var(--line);
  color: var(--ink-soft);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 260px;
  padding: 36px;
  text-align: center;
}

.empty-state > span {
  color: var(--coral);
  font-family: var(--serif);
  font-size: 38px;
}

.empty-state strong {
  color: var(--ink);
  margin-top: 12px;
}

.empty-state p {
  font-size: 10px;
}

.modal-open {
  overflow: hidden;
}

.modal-backdrop {
  align-items: center;
  background: rgba(10, 17, 25, 0.76);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 26px;
  position: fixed;
  z-index: 100;
}

.guild-modal {
  background: var(--paper);
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 52px);
  max-width: 1250px;
  overflow: hidden;
  width: 100%;
}

.admin-password-modal {
  background: var(--paper);
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 52px);
  max-width: 520px;
  overflow: hidden;
  width: 100%;
}

.admin-password-modal .modal-header h2 {
  font-size: 30px;
}

.admin-password-modal-body {
  overflow-y: auto;
  padding: 28px 30px 32px;
}

.admin-password-modal .compact-form,
.admin-password-modal .auth-form {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}

.admin-password-modal .primary-button {
  margin-top: 5px;
  width: 100%;
}

.modal-header {
  align-items: flex-start;
  background: var(--navy);
  color: var(--white);
  display: flex;
  justify-content: space-between;
  padding: 26px 31px 23px;
  flex: 0 0 auto;
}

.modal-header-main {
  min-width: 0;
}

.modal-header h2 {
  font-family: var(--serif);
  font-size: 37px;
  font-weight: 500;
  letter-spacing: -0.04em;
  margin: 0;
}

.modal-summary-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 11px 26px;
  margin-top: 8px;
}

.modal-guild-stats {
  color: rgba(255, 255, 255, 0.54);
  font-size: 13px;
  margin: 0;
}

.modal-guild-stats strong {
  color: #f1c66d;
  font-size: 17px;
}

.modal-history-comparison {
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 700;
  margin: 0;
}

.guild-affiliation-controls {
  border: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  margin: 0;
  padding: 0;
}

.guild-affiliation-option {
  align-items: center;
  cursor: pointer;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  gap: 7px;
  white-space: nowrap;
  color: var(--guild-affiliation-color);
}

.guild-affiliation-option input {
  accent-color: var(--guild-affiliation-color);
  height: 15px;
  margin: 0;
  width: 15px;
}

.guild-affiliation-option input:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 3px;
}

.guild-affiliation-option input:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.guild-affiliation-controls.is-readonly .guild-affiliation-option {
  cursor: not-allowed;
  opacity: 0.72;
}

.guild-affiliation-readonly {
  color: rgba(255, 255, 255, 0.58);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.icon-button {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--white);
  font-size: 26px;
  height: 42px;
  line-height: 1;
  width: 42px;
}

.modal-content {
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.65fr);
  min-height: 0;
  overflow: hidden;
}

.member-panel,
.distribution-panel {
  min-height: 0;
  overflow: auto;
  padding: 27px 30px 36px;
}

.member-panel .section-heading {
  align-items: flex-end;
}

.member-panel .section-heading h3 {
  font-size: 30px;
}

.member-table-wrap {
  background: var(--white);
  border: 1px solid var(--line);
  overflow-x: auto;
}

.member-table {
  border-collapse: collapse;
  min-width: 580px;
  width: 100%;
}

.member-table th {
  background: var(--paper-deep);
  color: var(--ink-soft);
  font-size: 13px;
  padding: 12px 14px;
  position: sticky;
  text-align: left;
  top: 0;
  z-index: 1;
}

.member-table td {
  border-bottom: 1px solid #eee8de;
  font-size: 14px;
  padding: 13px 14px;
}

.member-table tr:last-child td {
  border-bottom: 0;
}

.member-name-value,
.member-value-change {
  align-items: center;
  display: inline-flex;
  gap: 5px;
}

.member-change-arrow {
  flex: 0 0 auto;
  font-family: Arial, var(--sans);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.member-change-arrow.is-up {
  color: var(--coral-dark);
}

.member-change-arrow.is-down {
  color: var(--blue);
}

.member-membership {
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.member-membership.is-joined {
  color: var(--coral-dark);
}

.member-membership.is-left {
  color: var(--blue);
}

.member-row.is-added td {
  background: rgba(198, 58, 42, 0.035);
}

.member-row.is-removed td {
  background: rgba(79, 111, 132, 0.06);
  color: var(--ink-soft);
}

.rank-chip {
  color: var(--coral-dark);
  font-size: 14px;
  font-family: var(--serif);
}

.rank-chip.is-class {
  background: #e5eaed;
  color: var(--blue);
  font-family: var(--sans);
  font-size: 12px;
  padding: 4px 6px;
}

.ranking-table,
.member-table {
  font-family: Arial, var(--sans);
  font-feature-settings: "lnum" 1, "tnum" 1;
  font-variant-numeric: lining-nums tabular-nums;
}

.ranking-table .rank-number,
.ranking-table .rank-number small,
.ranking-table .guild-members,
.ranking-table .guild-members small,
.ranking-table .guild-score,
.ranking-table .guild-score small,
.member-table .rank-chip {
  font-family: inherit;
}

.distribution-panel {
  background: var(--white);
  border-left: 1px solid var(--line);
}

.distribution-group + .distribution-group {
  border-top: 1px solid var(--line);
  margin-top: 25px;
  padding-top: 23px;
}

.distribution-group h3 {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  margin: 0 0 14px;
}

.distribution-list {
  display: grid;
  gap: 10px;
}

.distribution-row > div {
  display: flex;
  font-size: 14px;
  justify-content: space-between;
  margin-bottom: 4px;
}

.distribution-row strong {
  color: var(--ink-soft);
}

.bar-track {
  background: #ece7df;
  display: block;
  height: 9px;
}

.bar-fill {
  display: block;
  height: 100%;
}

.bar-coral {
  background: var(--coral);
}

.bar-blue {
  background: var(--blue);
}

.bar-gold {
  background: var(--gold);
}

.toast-region {
  bottom: 24px;
  display: grid;
  gap: 8px;
  max-width: min(390px, calc(100vw - 32px));
  position: fixed;
  right: 24px;
  z-index: 200;
}

.toast {
  background: var(--navy);
  box-shadow: var(--shadow);
  color: var(--white);
  font-size: 10px;
  line-height: 1.55;
  padding: 13px 16px;
}

.toast-success {
  background: var(--success);
}

.toast-error {
  background: var(--coral-dark);
}

.site-footer {
  background: #101a26;
  color: rgba(255, 255, 255, 0.36);
  display: flex;
  font-size: 8px;
  gap: 20px;
  justify-content: space-between;
  padding: 23px clamp(24px, 5vw, 80px);
}

.site-footer p {
  margin: 0;
}

@media (max-width: 1180px) {
  .world-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-settings-card,
  .admin-tab-card,
  .admin-tab-stack,
  .history-management-card,
  .admin-side {
    grid-column: 1;
    grid-row: auto;
  }
}

@media (max-width: 900px) {
  .hero-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ranking-head,
  .ranking-row {
    gap: 12px;
    grid-template-columns:
      54px minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  }

  .ranking-head span:nth-child(3),
  .ranking-head span:nth-child(4),
  .ranking-head span:nth-child(8),
  .ranking-head span:nth-child(9),
  .ranking-row > :nth-child(3),
  .ranking-row > :nth-child(4),
  .ranking-row > :nth-child(8),
  .ranking-row > :nth-child(9) {
    display: none;
  }

  .comparison-head,
  .comparison-row {
    gap: 7px;
    grid-template-columns:
      minmax(145px, 1.35fr) repeat(7, minmax(0, 0.72fr));
    padding-left: 12px;
    padding-right: 12px;
  }

  .comparison-head {
    font-size: 10px;
  }

  .metric {
    min-height: 135px;
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-settings-card,
  .admin-tab-card,
  .admin-tab-stack,
  .history-management-card,
  .admin-side {
    grid-column: 1;
    grid-row: auto;
  }

  .modal-content {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  .member-panel,
  .distribution-panel {
    overflow: visible;
  }

  .distribution-panel {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

}

@media (max-width: 720px) {
  .site-header {
    height: 64px;
    padding: 0 10px;
  }

  .site-header-inner {
    grid-template-columns: 58px minmax(0, 1fr);
    max-width: none;
    padding: 0;
  }

  .brand {
    border-left: 0;
    gap: 0;
    padding: 0;
  }

  .brand-emblem {
    height: 42px;
    width: 32px;
  }

  .brand span:last-child {
    display: none;
  }

  .main-nav {
    min-width: 0;
  }

  .main-nav button {
    font-size: 12px;
    padding: 3px 5px 0;
  }

  .hero-metrics {
    gap: 8px;
    padding: 18px 14px 0;
  }

  .metric {
    min-height: 98px;
    padding: 14px 10px;
  }

  .dashboard-toolbar,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .board-heading-centered {
    gap: 14px;
    grid-template-columns: 1fr;
  }

  .update-stamp,
  .board-heading-summary {
    justify-self: center;
    text-align: center;
  }

  .update-stamp {
    grid-row: 1;
  }

  .board-heading-summary {
    grid-row: 2;
  }

  .dashboard-toolbar {
    gap: 12px;
    padding-bottom: 16px;
  }

  .view-tabs {
    min-height: 62px;
    width: 100%;
  }

  .view-tabs button {
    flex: 1;
    padding: 0 10px;
  }

  .filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .filters select {
    min-width: 0;
    width: 100%;
  }

  .guild-search {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .guild-search label {
    min-width: 0;
  }

  .board-heading > p,
  .section-heading > span {
    margin-top: 10px;
    text-align: center;
  }

  .admin-list-actions {
    justify-content: space-between;
    margin-top: 10px;
    width: 100%;
  }

  .admin-list-pagination {
    justify-content: center;
  }

  .admin-list-pagination .pagination-summary {
    flex-basis: 100%;
    margin: 5px 0 0;
    text-align: center;
  }

  .ranking-head {
    display: grid;
  }

  .ranking-row {
    padding: 14px 16px;
  }

  .guild-members {
    display: block;
  }

  .guild-score {
    font-size: 20px;
  }

  .world-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .history-strip {
    padding: 24px 14px 0;
  }

  .history-picker {
    max-width: none;
    width: 100%;
  }

  .history-strip {
    align-items: stretch;
    flex-direction: column;
  }

  .history-export-button {
    width: 100%;
  }

  .comparison-section {
    padding: 30px 14px 80px;
  }

  .comparison-picker {
    grid-template-columns: 1fr;
  }

  .comparison-picker-vs {
    min-height: 28px;
  }

  .comparison-head,
  .comparison-row {
    grid-template-columns: minmax(120px, 1.4fr) repeat(4, minmax(0, 1fr));
  }

  .comparison-head span:nth-child(3),
  .comparison-head span:nth-child(5),
  .comparison-head span:nth-child(6),
  .comparison-row > :nth-child(3),
  .comparison-row > :nth-child(5),
  .comparison-row > :nth-child(6) {
    display: none;
  }

  .admin-form-grid {
    grid-template-columns: 1fr;
  }

  .admin-settings-subheading {
    align-items: start;
    flex-direction: column;
    gap: 5px;
  }

  .admin-settings-subheading span {
    text-align: left;
  }

  .wide-field {
    grid-column: auto;
  }

  .auto-update-fields {
    grid-template-columns: 1fr;
  }

  .auto-update-status {
    grid-column: auto;
  }

  .alliance-settings-fields {
    grid-column: auto;
  }

  .guild-modal {
    max-height: calc(100vh - 20px);
  }

  .admin-password-modal {
    max-height: calc(100vh - 20px);
  }

  .admin-password-modal-body {
    padding: 24px 20px 28px;
  }

  .modal-backdrop {
    padding: 10px;
  }

  .modal-header,
  .member-panel,
  .distribution-panel {
    padding-left: 20px;
    padding-right: 20px;
  }

  .site-footer {
    flex-direction: column;
  }
}

@media (max-width: 440px) {
  .main-nav button {
    font-size: 11px;
    padding-left: 3px;
    padding-right: 3px;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .ranking-head,
  .ranking-row {
    gap: 8px;
    grid-template-columns:
      42px minmax(0, 1.3fr) repeat(3, minmax(0, 1fr));
    padding-left: 10px;
    padding-right: 10px;
  }

  .alliance-setting-row {
    align-items: start;
    grid-template-columns: 22px minmax(0, 1fr);
  }

  .alliance-slot-number {
    padding-top: 13px;
  }

  .alliance-color-field {
    grid-column: 2;
  }

  .comparison-head,
  .comparison-row {
    grid-template-columns: minmax(105px, 1.45fr) repeat(3, minmax(0, 1fr));
  }

  .comparison-head span:nth-child(8),
  .comparison-row > :nth-child(8) {
    display: none;
  }

  .comparison-row > span:not(:first-child),
  .comparison-change {
    font-size: 10px;
  }

  .notice {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .world-grid {
    grid-template-columns: 1fr;
  }

  .auth-card {
    padding: 34px 22px;
  }

  .rank-number {
    font-size: 20px;
  }

  .guild-name strong {
    font-size: 15px;
  }
}

@media (max-width: 900px) {
  .access-account-form {
    grid-template-columns: 1fr 1fr;
  }

  .access-account-form .primary-button {
    grid-column: 1 / -1;
  }

  .access-log-head {
    display: none;
  }

  .access-log-row {
    grid-template-columns: 1fr 1fr;
  }

  .access-log-row time {
    grid-column: 1 / -1;
  }

  .access-log-lockout {
    justify-content: flex-start;
  }
}

@media (max-width: 600px) {
  .admin-tabs button {
    font-size: 12px;
    padding-left: 6px;
    padding-right: 6px;
  }

  .access-account-form,
  .access-account-row,
  .access-log-row,
  .site-login-settings-form {
    grid-template-columns: 1fr;
  }

  .site-login-settings-form .secondary-button {
    width: 100%;
  }

  .access-account-row time,
  .account-role-badge,
  .danger-text-button {
    text-align: left;
  }

  .access-gate {
    padding: 20px 12px;
  }

  .access-gate-card {
    padding: 34px 22px;
  }
}

@media (max-height: 800px) {
  .access-gate {
    padding-block: 24px;
  }

  .access-gate-card {
    padding-block: 32px;
  }

  .access-gate-emblem {
    margin-bottom: 18px;
    width: 140px;
  }

  .access-gate-card .auth-form {
    margin-top: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
