:root {
  color-scheme: dark;
  --text: #eee8dc;
  --muted: #aca69a;
  --gold: #d9b66d;
  --gold-bright: #f3d58c;
  --gold-dark: #6d4e22;
  --panel: rgba(9, 12, 14, 0.9);
  --panel-deep: rgba(4, 6, 8, 0.96);
  --line: rgba(218, 182, 109, 0.48);
  --teal: #5fb4ad;
  --ember: #e68a43;
  --blood: #b94742;
  --green: #69a66f;
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  min-width: 320px;
  min-height: 100%;
  margin: 0;
}

body {
  min-height: 100svh;
  overflow-x: hidden;
  overflow-y: auto;
  background:
    linear-gradient(180deg, rgba(2, 3, 3, 0.99) 0%, rgba(5, 4, 3, 0.96) 18%, rgba(18, 9, 5, 0.78) 48%, transparent 100%),
    radial-gradient(circle at 8% 30%, rgba(222, 126, 42, 0.26), transparent 24%),
    radial-gradient(circle at 92% 67%, rgba(174, 72, 25, 0.28), transparent 27%),
    linear-gradient(115deg, transparent 0 47%, rgba(255, 185, 77, 0.035) 48% 49%, transparent 50% 100%),
    repeating-linear-gradient(0deg, rgba(255, 210, 127, 0.025) 0 1px, transparent 1px 7px),
    linear-gradient(90deg, #120804 0%, #3a1b0b 10%, #1c0d06 20%, #1c0d06 80%, #3a1b0b 90%, #120804 100%);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: 4;
  top: 0;
  bottom: 0;
  width: 1px;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(235, 164, 70, 0.78) 14%, rgba(108, 57, 22, 0.9) 50%, rgba(235, 164, 70, 0.78) 86%, transparent);
  box-shadow: 0 0 30px rgba(222, 112, 35, 0.35);
}

body::before { left: 20vw; }
body::after { right: 20vw; }

.site-frame {
  position: relative;
  isolation: isolate;
  width: 60vw;
  min-height: 100svh;
  margin-inline: auto;
  overflow: hidden;
  background: #05080b;
  box-shadow: 0 0 90px rgba(0, 0, 0, 0.95);
}

button,
a { font: inherit; }

.world,
.screen-vignette {
  position: absolute;
  inset: 0;
}

.world {
  z-index: -2;
  background: #05080b url("/eter-esoteric-forest.png") center 52% / cover no-repeat;
  animation: world-arrival 1.1s ease-out both;
}

html[data-page="campfire"] .world,
html[data-page="characterdetails"] .world {
  background-image: url("/eter-gateway.png");
  background-position: center 47%;
}

.screen-vignette {
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(2, 4, 7, 0.78) 0%, transparent 21%, transparent 69%, rgba(2, 4, 7, 0.9) 100%),
    radial-gradient(circle at 50% 48%, transparent 18%, rgba(2, 5, 8, 0.12) 54%, rgba(1, 3, 5, 0.82) 100%);
}

.game-header {
  position: relative;
  z-index: 3;
  height: 76px;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr);
  align-items: center;
  padding: 0 clamp(20px, 3vw, 54px);
  border-bottom: 1px solid rgba(217, 182, 109, 0.27);
  background: linear-gradient(180deg, #15191b 0 18%, #090d0f 18% 78%, #030506 78% 100%);
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.45);
}

.brand {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 13px;
  color: var(--gold-bright);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.23em;
  text-decoration: none;
  text-shadow: 0 2px 12px rgba(222, 173, 78, 0.34);
}

.brand-gem {
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  transform: rotate(45deg);
  background: linear-gradient(135deg, #70ccc5 0 34%, #378e8b 34% 68%, #153e43 68% 100%);
  box-shadow: inset 3px 3px 0 rgba(255, 255, 255, 0.09), inset -4px -4px 0 rgba(0, 0, 0, 0.28), 3px 3px 0 rgba(0, 0, 0, 0.68);
}

.brand-gem::first-letter,
.resource-emblem::first-letter { transform: rotate(-45deg); }

.location {
  display: flex;
  align-items: center;
  gap: 17px;
  color: #d5c9b5;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.location-rule {
  width: clamp(42px, 6vw, 92px);
  height: 1px;
  background: var(--gold-dark);
}

.location-rule:last-child { transform: scaleX(-1); }

.account-area {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 18px;
}

.server-state {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 0.8rem;
}

.server-state i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 12px rgba(230, 138, 67, 0.72);
}

.server-state.is-online i {
  background: var(--green);
  box-shadow: 0 0 12px rgba(105, 166, 111, 0.72);
}

.server-state.is-error { color: #d7837e; }
.server-state.is-error i { background: var(--blood); }

.account-chip {
  align-items: center;
  gap: 12px;
  color: #e8dcc5;
  font-size: 0.82rem;
}

.account-chip:not([hidden]) { display: inline-flex; }

.account-chip button {
  border: 1px solid rgba(217, 182, 109, 0.32);
  padding: 6px 10px;
  color: #c8bda9;
  background: linear-gradient(180deg, #24221d 0 24%, #11120f 24% 78%, #070807 78% 100%);
  cursor: pointer;
}

.game-stage {
  position: relative;
  z-index: 1;
  height: calc(100svh - 76px);
  min-height: 980px;
  padding: clamp(24px, 4vw, 58px);
}

.left-sidebar {
  position: absolute;
  top: 22px;
  left: clamp(20px, 3vw, 54px);
  width: clamp(228px, 17vw, 278px);
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #1b1e1f 0 3%, #0b0e10 3% 100%);
  box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.72), 5px 7px 0 rgba(0, 0, 0, 0.52);
}

.primary-menu {
  padding: 18px 15px 20px;
  border-top: 1px solid rgba(217, 182, 109, 0.38);
}

.panel-title {
  margin: 2px 8px 13px;
  padding-bottom: 11px;
  border-bottom: 1px solid rgba(217, 182, 109, 0.2);
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.panel-section-divider {
  height: 1px;
  margin: 12px 8px 15px;
  background: rgba(217, 182, 109, 0.46);
}

.panel-title-world { margin-top: 0; }

.menu-item {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 14px;
  border: 1px solid transparent;
  color: #c9c4ba;
  background: transparent;
  font-size: 0.92rem;
  text-align: left;
  cursor: pointer;
  transition: none;
}

.menu-item span { width: 22px; color: #82745c; text-align: center; }

.menu-item:hover,
.menu-item:focus-visible,
.menu-item.is-active {
  outline: none;
  border-color: rgba(217, 182, 109, 0.3);
  color: #fff5df;
  background: linear-gradient(180deg, rgba(232, 189, 92, 0.25) 0 24%, rgba(126, 79, 25, 0.17) 24% 78%, rgba(32, 23, 12, 0.42) 78% 100%);
}

.menu-item.is-active span {
  color: var(--gold-bright);
  text-shadow: 0 0 9px rgba(217, 182, 109, 0.62);
}

.world-mark {
  position: absolute;
  top: 7%;
  left: 50%;
  width: min(520px, 70%);
  transform: translateX(-50%);
  text-align: center;
  filter: drop-shadow(0 8px 26px rgba(0, 0, 0, 0.92));
}

.world-mark h1 {
  margin: 4px 0 0;
  color: #e9d29f;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.4rem, 5.2vw, 6.1rem);
  font-weight: 700;
  letter-spacing: 0.2em;
  line-height: 0.95;
  text-indent: 0.2em;
  text-shadow: 0 2px 0 #493314, 0 0 22px rgba(210, 173, 97, 0.22), 0 7px 18px rgba(0, 0, 0, 0.9);
}

.world-mark p {
  margin: 14px 0 0;
  color: #beb4a3;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  text-transform: uppercase;
}

.campfire-view[hidden] { display: none; }

.offering-panel {
  position: absolute;
  top: 54px;
  right: 34px;
  width: clamp(270px, 22vw, 360px);
  padding: 22px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(38, 31, 21, 0.97) 0 12%, rgba(10, 13, 14, 0.97) 12% 88%, rgba(3, 5, 6, 0.99) 88% 100%);
  box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.68), 6px 8px 0 rgba(0, 0, 0, 0.52);
}

.offering-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(217, 182, 109, 0.3);
}

.offering-heading span {
  color: var(--gold-bright);
  font-size: 1rem;
}

.offering-heading h1 {
  margin: 0;
  color: #f2dfb2;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  font-weight: 400;
}

.offering-panel label {
  display: block;
  margin-bottom: 8px;
  color: #bdb4a4;
  font-size: 0.86rem;
}

.offering-select-wrap {
  position: relative;
}

.offering-select-wrap::after {
  content: "▾";
  position: absolute;
  top: 50%;
  right: 14px;
  color: var(--gold-bright);
  pointer-events: none;
  transform: translateY(-50%);
}

.offering-panel select {
  width: 100%;
  min-height: 46px;
  appearance: none;
  border: 1px solid rgba(217, 182, 109, 0.4);
  border-radius: 0;
  padding: 0 42px 0 14px;
  color: #eee8dc;
  background: linear-gradient(180deg, #24221d 0 24%, #11120f 24% 78%, #070807 78% 100%);
  font: inherit;
  cursor: pointer;
}

.offering-panel select:focus-visible {
  outline: 1px solid var(--gold-bright);
  outline-offset: 2px;
}

.offering-panel option {
  color: #eee8dc;
  background: #0b0e10;
}

.compact-stats {
  position: absolute;
  right: 34px;
  bottom: 34px;
  left: clamp(286px, 25vw, 354px);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.compact-stat {
  --stat-accent: #d9b66d;
  min-width: 0;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid rgba(217, 182, 109, 0.28);
  border-top: 4px solid var(--stat-accent);
  background: linear-gradient(180deg, #24231f 0 20%, #111416 20% 82%, #07090a 82% 100%);
  box-shadow: 4px 5px 0 rgba(0, 0, 0, 0.54);
}

.compact-stat[data-stat="strength"] { --stat-accent: #c84b47; }
.compact-stat[data-stat="endurance"] { --stat-accent: #d87832; }
.compact-stat[data-stat="dexterity"] { --stat-accent: #4ea8a3; }
.compact-stat[data-stat="cunning"] { --stat-accent: #a97022; }
.compact-stat[data-stat="luck"] { --stat-accent: #d9b66d; }

.compact-stat span {
  overflow: hidden;
  color: #c8c1b5;
  font-size: 0.78rem;
  text-overflow: ellipsis;
}

.compact-stat strong {
  color: var(--gold-bright);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
}

html[data-page="adventures"] .game-stage,
html[data-page="inventory"] .game-stage {
  height: auto;
  min-height: 1100px;
  padding-top: 32px;
  padding-bottom: 38px;
}

.adventures-view,
.inventory-view {
  position: relative;
  margin-left: clamp(250px, 21vw, 315px);
}

.adventures-view[hidden],
.inventory-view[hidden],
.adventure-location[hidden],
.adventure-back[hidden],
.adventure-action-row[hidden],
.adventure-result[hidden],
.adventure-unlock-hint[hidden] { display: none; }

.adventure-back {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--gold);
  font-size: 0.875rem;
  text-decoration: none;
}
.adventure-back:hover { color: var(--gold-bright); }
.adventure-location-link { display: block; text-decoration: none; }
.adventure-location-link:hover,
.adventure-location-link:focus-visible { outline: 1px solid var(--gold-bright); outline-offset: 2px; }
.location-open-label { display: flex; justify-content: space-between; color: var(--gold-bright); font-size: 0.9rem; }

.adventures-heading {
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(217, 182, 109, 0.38);
}

.adventures-heading p {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.adventures-heading h1 {
  margin: 0;
  color: #f2dfb2;
  font: 400 2.2rem Georgia, "Times New Roman", serif;
}

.adventures-category {
  margin: 0;
  color: var(--gold);
  font-size: 1.15rem;
  font-weight: 400;
}

.inventory-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
#inventory-total { color: var(--muted); font-size: 0.875rem; }
.inventory-sections { border: 1px solid #62583e; background: #202322; box-shadow: 4px 4px 0 #030504; }
.inventory-sections:empty { display: none; }
.inventory-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 8px 10px; background: linear-gradient(180deg, #45463e 0 3px, #30332d 3px 100%); border-bottom: 1px solid #0e1110; }
.inventory-list-title { margin: 0; font: 700 0.875rem Arial, sans-serif; color: #eee7d6; }
.inventory-search { width: 170px; max-width: 100%; min-width: 0; padding: 6px 9px; color: var(--text); background: #0c100f; border: 1px solid #5b5746; font: 0.875rem Arial, sans-serif; }
.inventory-category-bar { display: flex; overflow-x: auto; background: #272b27; border-bottom: 1px solid #111411; scrollbar-width: thin; scrollbar-color: #6d6040 #181b18; }
.inventory-category-button { display: flex; align-items: center; gap: 7px; flex: 1 0 auto; padding: 10px; border: 0; border-right: 1px solid #43473c; border-bottom: 2px solid transparent; background: transparent; color: #ccbd93; font-size: 0.875rem; cursor: pointer; }
.inventory-category-button:hover { background: #35392f; color: #f3d58c; }
.inventory-category-button[aria-pressed="true"] { background: #46422d; color: #ffe3a0; border-bottom-color: var(--gold); }
.inventory-tab-count { color: #a99b7b; font-size: 0.75rem; }
.inventory-type-bar { display: flex; flex-wrap: wrap; gap: 0; padding: 4px 6px; border-bottom: 1px solid #111411; background: #1e221e; }
.inventory-type-bar[hidden] { display: none; }
.inventory-type-button { padding: 5px 9px; border: 1px solid transparent; background: transparent; color: #a9ad9e; font-size: 0.875rem; cursor: pointer; }
.inventory-type-button[aria-pressed="true"] { border-color: #71613a; background: #343526; color: var(--gold-bright); }
.inventory-sections button:focus-visible, .inventory-search:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: -2px; }
.inventory-table-wrap { overflow-x: auto; }
.inventory-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.inventory-table th { padding: 7px 10px; background: #191d1a; color: #aab09e; font-weight: 400; text-align: left; border-bottom: 1px solid #45473b; }
.inventory-table th:last-child, .inventory-quantity { text-align: right; white-space: nowrap; }
.inventory-table td { padding: 9px 10px; border-bottom: 1px solid #151916; border-top: 1px solid #3c4138; }
.inventory-item-row { background: #2b302a; }
.inventory-item-row:nth-child(even) { background: #252a25; }
.inventory-item-row:hover { background: #383d30; }
.inventory-item-name { width: 60%; font-weight: 700; overflow-wrap: anywhere; }
.inventory-item-type { color: #b3b7a8; }
.inventory-quantity { color: #d6bc79; font-variant-numeric: tabular-nums; }
.inventory-table .inventory-empty { padding: 32px 12px; text-align: center; color: #a8ad9e; background: #262b26; }
.inventory-list-status { padding: 7px 10px; color: #aaa68f; background: #191d19; font-size: 0.8125rem; text-align: right; }
.inventory-message { color: var(--muted); }
.inventory-retry { padding: 9px 16px; margin-bottom: 18px; border: 1px solid var(--gold-dark); background: #211d14; color: var(--gold-bright); cursor: pointer; }

.exploration-section[hidden], #adventure-categories[hidden] { display: none; }
.adventure-category-link.adventure-location-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 100px;
  color: var(--gold);
}
.adventure-category-link h2 { margin: 0; font-size: 1.4rem; font-weight: 400; }
.adventure-category-link:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.exploration-section {
  border: 1px solid rgba(217, 182, 109, 0.45);
  background: rgba(6, 10, 11, 0.9);
  box-shadow: 5px 6px 0 rgba(0, 0, 0, 0.52);
}
.exploration-heading {
  padding: 20px;
  border-bottom: 1px solid rgba(217, 182, 109, 0.4);
  background: linear-gradient(180deg, #393221 0 5px, #1e1b13 5px 100%);
}
.exploration-body { padding: clamp(12px, 1.5vw, 22px); }
.exploration-body .adventure-location:last-child { margin-bottom: 0; }

.adventure-location {
  margin-bottom: 18px;
  padding: 24px;
  border: 1px solid rgba(217, 182, 109, 0.42);
  background: linear-gradient(180deg, #25251f 0 8px, rgba(10, 14, 15, 0.97) 8px calc(100% - 7px), #040607 calc(100% - 7px) 100%);
  box-shadow: 5px 6px 0 rgba(0, 0, 0, 0.52);
}

.adventure-location.is-unavailable {
  border-color: rgba(217, 182, 109, 0.2);
  background: linear-gradient(180deg, #1b1d1b 0 7px, rgba(9, 12, 13, 0.96) 7px calc(100% - 6px), #040607 calc(100% - 6px) 100%);
}

.adventure-progress { margin: 0 0 24px; }
.adventure-progress-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
  color: #c6bfae;
  font-size: 0.875rem;
}
.adventure-progress-label strong { color: var(--gold-bright); }
.adventure-progress-label > span:last-child { color: #7fc9bd; font-variant-numeric: tabular-nums; }
.adventure-xp-meter {
  height: 5px;
  overflow: hidden;
  background: #020505;
  border: 1px solid #263c37;
}
.adventure-xp-meter span {
  display: block;
  width: 0;
  height: 100%;
  background: #69b6a8;
  transition: width 200ms ease;
}
.adventure-location-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}
.location-number {
  flex: 0 0 auto;
  color: #87714a;
  font: 1.7rem Georgia, "Times New Roman", serif;
}
.adventure-location h2 {
  margin: 0 0 6px;
  color: #e6d4ae;
  font: 400 1.5rem Georgia, "Times New Roman", serif;
}
.test-copy { color: #8a857a; font-size: 0.75rem; }
.adventure-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 17px 0;
  border-top: 1px solid rgba(217, 182, 109, 0.18);
}
.adventure-action-row h3,
.adventure-sublocation h3 {
  margin: 0 0 6px;
  color: #e6dfd2;
  font-size: 1rem;
  font-weight: 400;
}
.adventure-action-row p,
.adventure-sublocation p {
  margin: 0;
  color: #9c978c;
  font-size: 0.8rem;
}
.adventure-action-button {
  flex: 0 0 auto;
  min-width: 132px;
  min-height: 43px;
  border: 1px solid #b38c43;
  border-radius: 0;
  padding: 9px 17px;
  color: #161108;
  background: linear-gradient(180deg, #e8c779 0 25%, #c89943 25% 78%, #8d6126 78% 100%);
  box-shadow: 3px 4px 0 #020303;
  font-weight: 700;
  cursor: pointer;
}
.adventure-action-button:hover:not(:disabled) { filter: brightness(1.12); }
.adventure-action-button:focus-visible { outline: 2px solid #f5e2ae; outline-offset: 3px; }
.adventure-action-button:disabled {
  color: #7b786f;
  border-color: #464336;
  background: linear-gradient(180deg, #292b26 0 25%, #171c19 25% 78%, #0a0e0c 78% 100%);
  cursor: not-allowed;
}
.adventure-unlock-hint { margin: 2px 0 20px; color: #998b70; font-size: 0.8rem; }
.adventure-sublocation {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
  padding: 16px;
  border: 1px solid #487063;
  background: #0d1d19;
}
.adventure-sublocation > span { color: #8dd4b9; font-size: 1.5rem; }
.adventure-sublocation.is-locked { border-color: #363c35; background: #101510; }
.adventure-sublocation.is-locked h3 { color: #8c9387; }
.adventure-sublocation.is-locked > span { color: #6c7966; }
.adventure-result {
  margin-top: 22px;
  padding: 18px;
  border-left: 3px solid #69a66f;
  background: #0b1711;
}
.adventure-result > strong { color: #a2d798; font-size: 1.1rem; }
.adventure-result p { margin: 10px 0; color: #bdbdae; font-size: 0.875rem; line-height: 1.5; }
.adventure-result > div { color: #e8d69c; font-size: 0.875rem; line-height: 1.6; }
.adventure-result[data-outcome="critical_success"] { border-color: #e8c779; background: #201c0b; }
.adventure-result[data-outcome="critical_success"] > strong { color: #efd282; }
.adventure-result[data-outcome="partial_failure"] { border-color: #a68c61; background: #17160f; }
.adventure-result[data-outcome="partial_failure"] > strong { color: #c0ad8c; }
.adventure-result[data-outcome="failure"] { border-color: #c8534e; background: #210f0e; }
.adventure-result[data-outcome="failure"] > strong { color: #e68277; }
.adventure-message { margin: 18px 0 0; color: #d6a571; font-size: 0.875rem; line-height: 1.5; }
.adventure-message:empty { display: none; }

.character-details {
  position: absolute;
  top: 54px;
  right: 34px;
  left: clamp(286px, 25vw, 354px);
  min-height: 520px;
  padding: clamp(28px, 4vw, 52px);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(31, 29, 23, 0.97) 0 5%, rgba(10, 13, 15, 0.97) 5% 92%, rgba(3, 5, 6, 0.99) 92% 100%);
  box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.68), 6px 8px 0 rgba(0, 0, 0, 0.52);
}

.character-details[hidden] { display: none; }

.details-heading {
  position: relative;
  margin-bottom: 32px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(217, 182, 109, 0.3);
}

.details-heading p {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.details-heading h1 {
  margin: 0;
  color: #f2dfb2;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 3vw, 3.1rem);
  font-weight: 400;
}

.details-heading strong {
  display: block;
  margin-top: 9px;
  color: #a9a295;
  font-size: 0.86rem;
  font-weight: 400;
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.stat-card {
  --toon-light: #e8bd5c;
  --toon-mid: #a97022;
  --toon-dark: #4b2e0b;
  position: relative;
  z-index: 1;
  min-height: 92px;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(217, 182, 109, 0.23);
  background: linear-gradient(180deg, #24231f 0 20%, #111416 20% 82%, #07090a 82% 100%);
  cursor: help;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.stat-card:hover,
.stat-card:focus-visible {
  z-index: 12;
  outline: none;
  border-color: rgba(243, 213, 140, 0.68);
  background: linear-gradient(180deg, #332e23 0 20%, #181817 20% 82%, #080a0b 82% 100%);
}

.stat-card[data-stat="strength"] { --toon-light: #e06a62; --toon-mid: #a63c3b; --toon-dark: #4b171b; }
.stat-card[data-stat="endurance"] { --toon-light: #f0a553; --toon-mid: #bd6329; --toon-dark: #57270e; }
.stat-card[data-stat="dexterity"] { --toon-light: #70ccc5; --toon-mid: #378e8b; --toon-dark: #153e43; }
.stat-card[data-stat="cunning"] { --toon-light: #d49a4b; --toon-mid: #8b5722; --toon-dark: #3f260f; }

.stat-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  transform: rotate(45deg);
  border: 1px solid rgba(217, 182, 109, 0.42);
  color: var(--gold-bright);
  background: linear-gradient(135deg, var(--toon-light) 0 34%, var(--toon-mid) 34% 68%, var(--toon-dark) 68% 100%);
  box-shadow: inset 3px 3px 0 rgba(255, 255, 255, 0.09), inset -4px -4px 0 rgba(0, 0, 0, 0.3), 3px 3px 0 rgba(0, 0, 0, 0.7);
}

.stat-card h2 {
  margin: 0;
  color: #d7d0c4;
  font-size: 0.95rem;
  font-weight: 400;
}

.stat-card > strong {
  color: var(--gold-bright);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.8rem;
  font-variant-numeric: tabular-nums;
}

.stat-tooltip {
  position: absolute;
  z-index: 20;
  top: calc(100% - 8px);
  right: 12px;
  left: 38%;
  display: grid;
  grid-template-columns: 36px 1fr;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid rgba(226, 184, 98, 0.72);
  visibility: hidden;
  opacity: 0;
  color: #eee3ce;
  background: linear-gradient(180deg, #332b1d 0 14%, #141412 14% 84%, #070909 84% 100%);
  box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.68), 5px 6px 0 rgba(0, 0, 0, 0.72);
  pointer-events: none;
  transform: translateY(-5px);
  transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease;
}

.stat-card:hover .stat-tooltip,
.stat-card:focus-visible .stat-tooltip {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.tooltip-rune {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  transform: rotate(45deg);
  border: 1px solid rgba(243, 213, 140, 0.58);
  color: var(--gold-bright);
  background: linear-gradient(135deg, var(--toon-light) 0 34%, var(--toon-mid) 34% 68%, var(--toon-dark) 68% 100%);
  box-shadow: inset 3px 3px 0 rgba(255, 255, 255, 0.09), inset -4px -4px 0 rgba(0, 0, 0, 0.3), 3px 3px 0 rgba(0, 0, 0, 0.7);
}

.stat-tooltip p {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.55;
}

.details-message {
  min-height: 20px;
  margin: 18px 0 0;
  color: #d7837e;
  font-size: 0.84rem;
}

.sigil {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  color: var(--gold);
}

.sigil span { height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.sigil span:last-child { transform: scaleX(-1); }

.resource-dock {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: rgba(109, 78, 34, 0.72);
}

/* Reserve the resource rows while loading so the menu never shifts vertically. */
.resource-dock[hidden] {
  display: grid;
  visibility: hidden;
  pointer-events: none;
}

.resource {
  min-width: 0;
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  background: linear-gradient(180deg, #171a1c 0 18%, #090c0e 18% 100%);
}

.resource-emblem {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  transform: rotate(45deg);
  border: 2px solid #17110b;
  outline: 1px solid rgba(225, 201, 148, 0.44);
  box-shadow: inset 4px 4px 0 rgba(255, 255, 255, 0.1), inset -5px -5px 0 rgba(0, 0, 0, 0.28), 3px 3px 0 rgba(0, 0, 0, 0.72);
}

.resource-health .resource-emblem { background: linear-gradient(135deg, #e06a62 0 34%, #a63c3b 34% 68%, #4b171b 68% 100%); }
.resource-energy .resource-emblem { background: linear-gradient(135deg, #f0a553 0 34%, #bd6329 34% 68%, #57270e 68% 100%); }
.resource-ap .resource-emblem { background: linear-gradient(135deg, #70ccc5 0 34%, #378e8b 34% 68%, #153e43 68% 100%); }
.resource-money .resource-emblem { background: linear-gradient(135deg, #e8bd5c 0 34%, #a97022 34% 68%, #4b2e0b 68% 100%); }
.resource-money { min-height: 58px; }
.money-line { margin: 0; align-items: center; }
.money-line strong { color: var(--gold-bright); font-size: 0.95rem; }

.resource-line,
.resource-meta { display: flex; justify-content: space-between; gap: 10px; }

.resource-line { align-items: baseline; margin-bottom: 7px; font-size: 0.86rem; }
.resource-line strong { color: #fff9ee; font-size: 0.82rem; font-variant-numeric: tabular-nums; }

.meter {
  height: 8px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.78);
  background: #080a0b;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.85);
}

.meter-fill {
  display: block;
  width: 0;
  height: 100%;
  box-shadow: none;
  transition: none;
  animation: none;
}

.resource-health .meter-fill { color: var(--blood); background: linear-gradient(180deg, #e06a62 0 30%, #b94742 30% 78%, #762729 78% 100%); }
.resource-energy .meter-fill { color: var(--ember); background: linear-gradient(180deg, #f0a553 0 30%, #d57232 30% 78%, #8d3c19 78% 100%); }
.resource-ap .meter-fill { color: var(--teal); background: linear-gradient(180deg, #70ccc5 0 30%, #4ea8a3 30% 78%, #286f70 78% 100%); }

.resource-meta { margin-top: 5px; color: #85837e; font-size: 0.7rem; }
.resource-meta time { font-variant-numeric: tabular-nums; }

.auth-layer {
  position: fixed;
  z-index: 20;
  inset: 76px 0 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 5, 7, 0.66);
  backdrop-filter: blur(7px);
}

.auth-layer[hidden] { display: none; }

.auth-window {
  width: min(850px, 94vw);
  min-height: 580px;
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(360px, 1.1fr);
  overflow: hidden;
  border: 1px solid rgba(217, 182, 109, 0.58);
  background: #080b0d;
  box-shadow: inset 0 0 0 4px #030405, 0 34px 100px rgba(0, 0, 0, 0.86);
}

.auth-art {
  min-height: 580px;
  border-right: 1px solid rgba(217, 182, 109, 0.35);
  background:
    linear-gradient(90deg, transparent 0 62%, rgba(5, 8, 10, 0.78) 62% 100%),
    url("/eter-auth-gate.png") center / cover no-repeat;
}

.auth-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(34px, 5vw, 64px);
  background: linear-gradient(180deg, #181c1d 0 10%, #080b0d 10% 90%, #030506 90% 100%);
}

.auth-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 28px;
  color: var(--gold-bright);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  letter-spacing: 0.2em;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 30px;
  border-bottom: 1px solid rgba(217, 182, 109, 0.23);
}

.auth-tabs button {
  padding: 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  color: #89867f;
  background: transparent;
  cursor: pointer;
}

.auth-tabs button.is-active {
  border-bottom-color: var(--gold);
  color: #f4e8d2;
}

.auth-form {
  display: grid;
  gap: 9px;
}

.auth-form[hidden] { display: none; }

.auth-form h1 {
  margin: 0 0 13px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.6rem;
  font-weight: 400;
}

.auth-form label {
  margin-top: 7px;
  color: #aaa397;
  font-size: 0.82rem;
}

.auth-form input {
  min-height: 44px;
  width: 100%;
  border: 1px solid rgba(217, 182, 109, 0.26);
  border-radius: 0;
  padding: 9px 12px;
  outline: none;
  color: #f3eee5;
  background: rgba(2, 5, 7, 0.72);
}

.auth-form input:focus {
  border-color: rgba(95, 180, 173, 0.78);
  box-shadow: 0 0 0 2px rgba(95, 180, 173, 0.12);
}

.auth-submit {
  min-height: 46px;
  margin-top: 18px;
  border: 1px solid #a47c38;
  color: #171006;
  background: linear-gradient(180deg, #f0d287 0 26%, #c08b39 26% 78%, #7e4f1c 78% 100%);
  font-weight: 700;
  cursor: pointer;
}

.auth-submit:disabled { opacity: 0.55; cursor: wait; }

.auth-message {
  min-height: 22px;
  margin: 16px 0 0;
  color: #d7837e;
  font-size: 0.82rem;
  text-align: center;
}

.test-console {
  position: absolute;
  z-index: 30;
  top: 76px;
  left: 0;
  width: 100%;
  padding: 16px clamp(20px, 4vw, 70px) 18px;
  transform: translateY(calc(-100% - 76px));
  border-bottom: 1px solid rgba(95, 180, 173, 0.65);
  color: #a9eee8;
  background: rgba(1, 8, 10, 0.97);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.75);
  font-family: Consolas, "Courier New", monospace;
  transition: transform 180ms ease;
}

.test-console.is-open { transform: translateY(0); }

.console-bar,
.console-command {
  display: flex;
  align-items: center;
  gap: 12px;
}

.console-bar { justify-content: space-between; font-size: 0.78rem; }
.console-bar span { color: #5d8885; }

.console-log {
  max-height: 110px;
  min-height: 48px;
  overflow: auto;
  margin: 12px 0;
  color: #70aaa6;
  font-size: 0.78rem;
}

.console-log p { margin: 4px 0; }
.console-log .is-error { color: #db7771; }
.console-command label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.console-command input {
  flex: 1;
  min-width: 0;
  border: 0;
  border-bottom: 1px solid rgba(95, 180, 173, 0.4);
  outline: 0;
  color: #d8fffb;
  background: transparent;
  font: inherit;
}

.console-command button {
  border: 1px solid rgba(95, 180, 173, 0.45);
  padding: 7px 12px;
  color: #a9eee8;
  background: rgba(95, 180, 173, 0.09);
  cursor: pointer;
}

@keyframes world-arrival {
  from { opacity: 0; transform: scale(1.025); }
  to { opacity: 1; transform: scale(1); }
}

@media (max-width: 1050px) {
  body { overflow: auto; }
  body::before,
  body::after { display: none; }
  .site-frame { width: 100%; }
  .game-stage {
    height: auto;
    min-height: calc(100svh - 70px);
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-content: end;
    gap: 18px;
    padding-top: 270px;
  }
  .left-sidebar,
  .world-mark { position: relative; inset: auto; width: auto; transform: none; }
  .world-mark { position: absolute; top: 42px; left: 50%; width: min(520px, 72vw); transform: translateX(-50%); }
  .left-sidebar { grid-column: 1; }
  .adventures-view, .inventory-view { margin: 0; grid-column: 2; min-width: 0; }
  .campfire-view {
    position: relative;
    grid-column: 2;
    align-self: end;
    display: grid;
    gap: 18px;
  }
  .offering-panel,
  .compact-stats {
    position: relative;
    inset: auto;
    width: auto;
  }
  .compact-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .character-details {
    position: relative;
    inset: auto;
    grid-column: 1 / -1;
    min-height: 0;
    padding: 28px;
  }
}

@media (max-width: 1600px) and (min-width: 1051px) {
  .game-header { padding-inline: 24px; }
  .brand { font-size: 1.25rem; }
  .location { gap: 10px; font-size: 0.68rem; }
  .location-rule { width: 38px; }
  .server-state span { display: none; }
  .game-stage { padding-inline: 22px; }
  .left-sidebar { left: 22px; width: 220px; }
  .primary-menu { padding: 14px 10px 16px; }
  .menu-item { min-height: 43px; padding-inline: 9px; font-size: 0.8rem; }
  .world-mark h1 { font-size: clamp(3.2rem, 5vw, 5rem); }
  .resource { grid-template-columns: 36px 1fr; gap: 9px; padding: 9px 10px; }
  .resource-emblem { width: 32px; height: 32px; }
}

@media (max-width: 720px) {
  .game-header { height: 68px; grid-template-columns: 1fr auto; padding-inline: 18px; }
  .location { display: none; }
  .brand { font-size: 1.35rem; }
  .game-stage { min-height: calc(100svh - 68px); grid-template-columns: 1fr; padding: 230px 14px 18px; }
  .world-mark { top: 42px; }
  .left-sidebar { grid-column: 1; }
  .adventures-view, .inventory-view { grid-column: 1; }
  .adventure-location { padding: 20px 16px; }
  .adventure-action-row { gap: 12px; }
  .adventure-action-button { min-width: 110px; padding-inline: 10px; }
  .campfire-view { grid-column: 1; }
  .resource-dock { grid-template-columns: 1fr; }
  .left-menu { display: grid; grid-template-columns: repeat(5, 1fr); padding: 8px; }
  .left-menu .panel-title { display: none; }
  .left-menu .panel-section-divider { grid-column: 1 / -1; margin: 4px 8px; }
  .left-menu .menu-item { min-height: 62px; justify-content: center; gap: 4px; padding: 7px 4px; font-size: 0.66rem; text-align: center; flex-direction: column; }
  .character-details { grid-column: 1; padding: 24px 18px; }
  .stat-grid { grid-template-columns: 1fr; }
  .stat-tooltip { right: 8px; left: 8px; }
  .auth-layer { inset: 68px 0 0; padding: 12px; }
  .auth-window { width: min(470px, 100%); min-height: 0; grid-template-columns: 1fr; }
  .auth-art { min-height: 135px; border-right: 0; border-bottom: 1px solid rgba(217, 182, 109, 0.35); background-position: center 72%; }
  .auth-panel { padding: 28px; }
  .auth-mark { margin-bottom: 18px; }
  .test-console { top: 68px; padding-inline: 14px; }
}

@media (max-width: 460px) {
  .server-state span { display: none; }
  .account-chip { gap: 7px; }
  .world-mark h1 { font-size: 3.25rem; }
  .left-menu .menu-item { font-size: 0; }
  .left-menu .menu-item span { font-size: 1rem; }
  .compact-stats { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .world { animation: none; }
  .meter-fill,
  .menu-item { transition: none; }
}
