@charset "UTF-8";
:root {
  color-scheme: dark;
  --ink: #0d100e;
  --panel: #171b16;
  --gold: #d7b677;
  --gold-bright: #f4d39a;
  --muted: #9d9c8b;
  --text: #eee7d6;
  --line: rgba(204, 180, 125, 0.24);
  --realm-accent: #b4b985;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Arial, Helvetica, sans-serif;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
}
body {
  font-size: 14px;
}
button,
input,
select {
  font: inherit;
}
button {
  color: inherit;
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
canvas:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 4px;
}
button {
  touch-action: manipulation;
}
button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}
::selection {
  background: #665733;
  color: #fff;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 400;
}
button {
  border: 0;
  background: none;
}
strong {
  font-weight: 600;
}
small {
  font-size: 11px;
}
svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}
button svg {
  pointer-events: none;
}
#app {
  min-height: 100dvh;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}
.muted {
  color: var(--muted);
}
.serif {
  font-family: var(--serif);
}
.boot-screen {
  height: 100dvh;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 20px;
}
.boot-screen h1 {
  font-size: 70px;
  letter-spacing: 0.12em;
}
.sigil {
  font-size: 52px;
  color: var(--gold);
}
.topbar {
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 4.3vw;
  border-bottom: 1px solid rgba(214, 182, 119, 0.16);
  position: relative;
  z-index: 2;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: 0.15em;
  font: 20px var(--serif);
  color: var(--gold-bright);
}
.brand-mark {
  font-size: 33px;
  line-height: 1;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 24px;
}
.offline-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #b5b3a2;
  display: flex;
  align-items: center;
  gap: 8px;
}
.online-dot {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #a6b391;
  box-shadow: 0 0 7px #93a68055;
}
.profile-button {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  font-size: 12px;
  color: #d0c8b5;
}
.profile-button svg {
  color: var(--gold);
}
.icon-button {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--gold);
  background: #0e100e55;
  flex-shrink: 0;
}
.icon-button:hover {
  background: #d7b67716;
  border-color: #d7b67788;
}
.button {
  min-height: 46px;
  padding: 13px 24px;
  display: inline-flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  font-weight: 600;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #262a20aa, #11160faa);
  transition:
    background 0.18s,
    border-color 0.18s,
    transform 0.18s;
}
.button:hover {
  border-color: var(--gold);
  background: #323629;
}
.button.primary {
  color: #211b10;
  background: linear-gradient(135deg, #edcf98, #c39d5d);
  border-color: #ebd0a2;
  box-shadow: 0 3px 22px #c0944420;
}
.button.primary:hover {
  background: #f1d5a0;
  transform: translateY(-1px);
}
.button.danger {
  color: #e8a697;
  border-color: #98695577;
}
.text-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 10px;
  font-size: 12px;
  color: var(--muted);
}
.text-button:hover {
  color: var(--gold-bright);
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  color: var(--muted);
  font-size: 12px;
}
.back-link svg {
  width: 17px;
}
.back-link:hover {
  color: var(--gold);
}
.home {
  min-height: 100dvh;
  position: relative;
  overflow: hidden;
  background: #10170f url("../assets/backgrounds/menu.png") center 45% / cover
    no-repeat;
}
.home:before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      #080e0bc7 0%,
      #0c100942 22%,
      #090e0570 65%,
      #090e0c 100%
    ),
    linear-gradient(
      90deg,
      #050b0977,
      transparent 35%,
      transparent 65%,
      #050b0977
    );
  pointer-events: none;
}
.home .topbar {
  border: 0;
}
.home-main {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100dvh - 225px);
  text-align: center;
  padding: 36px 24px 45px;
}
.home-kicker {
  letter-spacing: 0.35em;
  margin-bottom: 26px;
  color: #ddc992;
}
.home-title {
  font-size: clamp(76px, 10vw, 154px);
  letter-spacing: 0.085em;
  line-height: 0.93;
  text-shadow:
    0 3px 35px #000,
    0 1px 0 #edd6a1;
  color: #e4c78e;
  margin-left: 0.08em;
  font-weight: 400;
}
.home-subtitle {
  margin: 19px 0 22px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  font-size: 12px;
  color: #e4dac1;
}
.title-rule {
  width: 170px;
  display: flex;
  gap: 14px;
  align-items: center;
  margin: 0 0 22px;
  color: #c3a169;
  font-size: 16px;
}
.title-rule:before,
.title-rule:after {
  content: "";
  height: 1px;
  background: linear-gradient(90deg, transparent, #b69457);
  flex: 1;
}
.title-rule:after {
  transform: rotate(180deg);
}
.home-description {
  font: 17px/1.7 var(--serif);
  color: #d0cbbc;
  text-shadow: 0 2px 10px #000;
  max-width: 490px;
}
.home-primary-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 31px;
}
.home-primary-actions .button {
  min-width: 224px;
  min-height: 54px;
}
.journey-progress {
  margin-top: 17px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #aaa992;
  font-size: 10px;
  letter-spacing: 0.1em;
}
.home-bottom {
  position: relative;
  z-index: 1;
  max-width: 1260px;
  margin: auto;
  padding: 0 40px 25px;
}
.home-nav {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: center;
  gap: 48px;
  padding: 12px 0;
}
.home-nav button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: #c8c4b1;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 10px;
}
.home-nav button svg {
  color: #bd9f68;
  width: 17px;
}
.home-nav button:hover {
  color: var(--gold-bright);
}
.home-footnote {
  display: flex;
  justify-content: space-between;
  margin-top: 19px;
  font-size: 9px;
  letter-spacing: 0.15em;
  color: #8b8d7c;
  text-transform: uppercase;
}
.ember {
  position: absolute;
  width: 3px;
  height: 3px;
  background: #f2b568;
  border-radius: 50%;
  box-shadow: 0 0 9px #ea9e55;
  bottom: 10%;
  opacity: 0;
  animation: ember 8s infinite ease-out;
  pointer-events: none;
}
.ember:nth-child(2) {
  left: 25%;
  animation-delay: 2s;
}
.ember:nth-child(3) {
  left: 70%;
  animation-delay: 4s;
}
.ember:nth-child(4) {
  left: 52%;
  animation-delay: 1s;
}
.ember:nth-child(5) {
  left: 83%;
  animation-delay: 6s;
}
@keyframes ember {
  0% {
    transform: translate(0, 0);
    opacity: 0;
  }
  15% {
    opacity: 0.7;
  }
  100% {
    transform: translate(50px, -600px);
    opacity: 0;
  }
}
.page {
  min-height: 100dvh;
  background:
    radial-gradient(ellipse at 90% 0, #26302455, transparent 50%), #10140f;
}
.page-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 42px 65px;
}
.page-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin: 19px 0 32px;
}
.page-heading h1 {
  font-size: 48px;
  line-height: 1.08;
  margin: 10px 0 12px;
}
.page-heading p {
  font: 16px/1.6 var(--serif);
  color: var(--muted);
}
.realm-tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  gap: 0;
  margin-bottom: 30px;
  overflow: auto;
}
.realm-tab {
  flex: 1;
  min-width: 115px;
  min-height: 66px;
  padding: 11px 12px;
  color: #919986;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.realm-tab.active {
  color: var(--gold-bright);
  border-color: var(--gold);
  background: linear-gradient(0deg, #d3b46b0c, transparent);
}
.realm-tab .roman {
  font: 21px var(--serif);
  opacity: 0.55;
}
.realm-tab strong {
  display: block;
  font: 16px var(--serif);
}
.realm-tab small {
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: block;
  margin-top: 5px;
}
.realm-feature {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 42px;
}
.realm-art {
  height: 530px;
  position: relative;
  background-color: #171c14;
  background-size: cover;
  background-position: center;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding: 32px 27px;
  overflow: hidden;
}
.realm-art:before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 18%, #080e09eb 92%);
}
.realm-art > * {
  position: relative;
}
.realm-art .eyebrow {
  font-size: 9px;
}
.realm-art h2 {
  font-size: 42px;
  margin: 13px 0;
}
.realm-art p {
  font: 14px/1.8 var(--serif);
  color: #cbcbbb;
}
.realm-art .realm-stats {
  margin-top: 26px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: #b8ae94;
  display: flex;
  justify-content: space-between;
}
.stage-list-head {
  display: grid;
  grid-template-columns: 1fr 90px 80px 100px;
  color: #8f9785;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 8px 16px 17px;
  border-bottom: 1px solid var(--line);
}
.stage-row {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 90px 80px 100px;
  align-items: center;
  min-height: 48px;
  padding: 7px 16px;
  text-align: left;
  border-bottom: 1px solid #d7b67712;
}
.stage-row:hover:not(:disabled) {
  background: #d7b6770a;
}
.stage-row.current {
  background: #d7b6770b;
  border-left: 2px solid var(--gold);
  padding-left: 14px;
}
.stage-name {
  display: flex;
  align-items: center;
  gap: 13px;
  font: 15px var(--serif);
}
.stage-number {
  font: 11px var(--sans);
  color: #898e7b;
  width: 23px;
}
.stage-row.current .stage-number {
  color: var(--gold);
}
.stage-metric {
  font-size: 11px;
  color: #b9bdaa;
}
.stage-record {
  color: var(--gold);
  font-size: 11px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.stage-record svg {
  height: 15px;
  width: 15px;
}
.stage-row:disabled {
  opacity: 0.38;
}
.realm-note {
  font-size: 11px;
  line-height: 1.7;
  margin-top: 18px;
  color: #929987;
}
.collection-intro {
  max-width: 630px;
}
.collection-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 35px;
  row-gap: 0;
}
.family-entry {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
.family-entry h3 {
  font-size: 18px;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.family-entry h3 small {
  font: 9px var(--sans);
  color: var(--muted);
  letter-spacing: 0.12em;
}
.family-objects {
  display: flex;
  gap: 8px;
}
.family-object {
  flex: 1;
  min-width: 0;
  text-align: center;
}
.family-object .artifact-icon {
  width: 72px;
  height: 72px;
  max-width: 100%;
  border: 1px solid #dcc08733;
  display: block;
  margin: 0 auto 8px;
}
.family-object small {
  display: block;
  line-height: 1.4;
  color: #aeb29f;
  font-size: 10px;
  min-height: 28px;
}
.artifact-icon {
  display: inline-block;
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  vertical-align: middle;
  container-type: size;
}
.artifact-crop {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  overflow: hidden;
  pointer-events: none;
}
.artifact-crop img {
  position: absolute;
  display: block;
  max-width: none;
  max-height: none;
  pointer-events: none;
  user-select: none;
}
@supports (width: 1cqw) {
  .artifact-crop {
    width: calc(min(100cqw, 100cqh) * var(--crop-width)) !important;
    height: calc(min(100cqw, 100cqh) * var(--crop-height)) !important;
  }
}
.medal {
  color: var(--gold);
}
.medal.silver {
  color: #bfcbd0;
}
.medal.bronze {
  color: #c69267;
}
.empty-record {
  color: #555e50;
}
.game-page {
  height: 100dvh;
  min-height: 560px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  flex-direction: column;
}
.game-page:before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    #0b100cec,
    #10150bd1 25%,
    #10110ade 85%,
    #090d0beb
  );
  pointer-events: none;
}
.game-topbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  height: 62px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--line);
}
.game-location {
  display: flex;
  align-items: center;
  gap: 16px;
}
.game-location .brand {
  font-size: 18px;
}
.game-location .brand-mark {
  font-size: 27px;
}
.game-location .separator {
  height: 22px;
  width: 1px;
  background: var(--line);
}
.game-location-name {
  font: 15px var(--serif);
  color: #c5cbb8;
}
.game-location-name small {
  font: 10px var(--sans);
  color: #999f89;
  margin-left: 10px;
}
.game-actions {
  display: flex;
  gap: 7px;
}
.game-actions .icon-button {
  border: 0;
  width: 40px;
  height: 44px;
}
.game-table {
  position: relative;
  width: min(1500px, calc((100dvh - 293px) * 20 / 7), calc(100vw - 46px));
  margin: auto;
  flex-shrink: 0;
}
.game-hud {
  display: grid;
  grid-template-columns: 1fr 1fr 2.3fr 1fr 1fr;
  align-items: center;
  gap: 14px;
  height: 103px;
}
.hud-stat {
  text-align: center;
}
.hud-stat .label {
  display: block;
  font-size: 9px;
  letter-spacing: 0.18em;
  color: #a9ae95;
  text-transform: uppercase;
  margin-bottom: 7px;
}
.hud-stat .value {
  font: 27px var(--serif);
  color: var(--gold-bright);
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}
.hud-stat .detail {
  display: block;
  font-size: 9px;
  color: #929984;
  margin-top: 5px;
}
.hud-stat .value.danger {
  color: #eb8c72;
}
.family-focus {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 0 5px;
}
.family-focus-content {
  min-width: 0;
  flex: 1;
  text-align: center;
}
.family-focus-title {
  display: flex;
  justify-content: center;
  gap: 9px;
  align-items: center;
  font: 13px var(--serif);
  color: #c9cbb9;
  margin-bottom: 6px;
  white-space: nowrap;
}
.family-focus-title small {
  font: 8px var(--sans);
  color: var(--muted);
}
.family-focus .icon-button {
  width: 30px;
  height: 46px;
  border: none;
  background: transparent;
}
.family-focus-icons {
  display: flex;
  gap: 9px;
  justify-content: center;
}
.family-focus-item .artifact-icon {
  width: 43px;
  height: 43px;
  border: 1px solid var(--line);
}
.objective-dots {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 4px;
}
.objective-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #49503f;
}
.objective-dot.complete {
  background: #cdb873;
  box-shadow: 0 0 5px #cdb87355;
}
.board-frame {
  position: relative;
  padding: 6px;
  background: linear-gradient(
    135deg,
    #66634855,
    #192018cc 16%,
    #423f2899 65%,
    #9c835955
  );
  border: 1px solid #9c865957;
  box-shadow:
    0 10px 45px #0006,
    inset 0 0 0 2px #090c0966;
}
.board-frame:before,
.board-frame:after {
  content: "✦";
  position: absolute;
  top: -10px;
  font-size: 16px;
  color: #b9a375;
  z-index: 1;
}
.board-frame:before {
  left: -7px;
}
.board-frame:after {
  right: -7px;
}
#board {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 20/7;
  touch-action: none;
  outline-offset: -3px;
}
.board-caption {
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 4px;
  font-size: 9px;
  letter-spacing: 0.035em;
  color: #8e9782;
  white-space: nowrap;
  overflow: hidden;
}
.board-caption strong {
  font-weight: 400;
  color: #c1c5ac;
}
.bag-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 7px 0 8px;
  font-size: 9px;
  letter-spacing: 0.16em;
  color: #babba2;
  text-transform: uppercase;
}
.bag-heading .bag-count {
  font-size: 10px;
  letter-spacing: 0;
  color: #959c84;
}
.bag-slots {
  display: grid;
  grid-template-columns: repeat(15, minmax(0, 1fr));
  gap: 5px;
}
.bag-slot {
  position: relative;
  height: clamp(36px, 4vw, 56px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(#090e09bd, #26302182);
  border: 1px solid #bfab7429;
  box-shadow: inset 0 2px 9px #0005;
}
.bag-slot:empty:before {
  content: "·";
  font: 18px var(--serif);
  color: #6f745643;
}
.bag-slot .artifact-icon {
  height: 100%;
  width: 100%;
  max-width: 55px;
}
.bag-slot.filled {
  border-color: #bdab7055;
}
.bag-slot small {
  position: absolute;
  right: 3px;
  bottom: 2px;
  font-size: 8px;
  color: #ebd69d;
  background: #171b14cc;
  padding: 1px 2px;
}
.resource-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 12px 0 5px;
}
.resource-button,
.resource-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  flex: 1;
  padding: 3px 12px;
  background: linear-gradient(135deg, #38422b88, #17200f88);
  border: 1px solid #a99a642e;
  position: relative;
  max-width: 210px;
}
.resource-button:hover:not(:disabled) {
  border-color: #d7b67799;
  background: #4b512c77;
}
.resource-button .artifact-icon,
.resource-display .artifact-icon {
  width: 33px;
  height: 33px;
}
.resource-text {
  text-align: left;
  min-width: 0;
}
.resource-text .resource-label {
  display: block;
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #a9b098;
  white-space: nowrap;
}
.resource-text .resource-value {
  display: block;
  font: 20px var(--serif);
  color: #ddd7b7;
}
.resource-button kbd {
  position: absolute;
  right: 5px;
  bottom: 5px;
  font: 8px var(--sans);
  color: #899378;
}
.resource-button.active {
  border-color: #b7bb7477;
}
.resource-button.active .resource-value {
  font-size: 13px;
  color: #bac883;
}
.game-footer {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 9px;
  color: #7b856f;
  padding: 10px 28px 12px;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.wall-status {
  display: flex;
  align-items: center;
  gap: 7px;
}
.wall-track {
  height: 3px;
  width: 55px;
  background: #7c754f33;
}
.wall-track i {
  display: block;
  height: 100%;
  background: #b3a16b;
}
.status-note {
  color: #cbbf90;
}
.orientation-note {
  display: none;
}
.canvas-help {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: #020704cb;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(10px);
  animation: fade-in 0.16s ease-out;
}
.modal {
  width: min(580px, 100%);
  max-height: calc(100dvh - 48px);
  overflow: auto;
  background:
    radial-gradient(ellipse at 50% 0, #40472b55, transparent 50%), #171e14;
  border: 1px solid #bba36b77;
  box-shadow:
    0 25px 120px #000b,
    inset 0 0 0 5px #0b100977;
  position: relative;
  padding: 40px;
}
.modal.wide {
  width: min(850px, 100%);
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
}
.modal-heading {
  text-align: center;
  margin-bottom: 26px;
  padding: 0 15px;
}
.modal-heading .eyebrow {
  font-size: 9px;
}
.modal-heading h2 {
  font-size: 36px;
  margin-top: 11px;
}
.modal-heading p {
  font: 15px/1.65 var(--serif);
  color: #b0b59e;
  margin-top: 13px;
}
.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 28px;
}
.modal-actions .button {
  flex: 1;
  white-space: nowrap;
}
.modal-actions.stacked {
  flex-direction: column;
}
.modal-actions .text-button {
  justify-content: center;
}
.modal-copy {
  font-size: 13px;
  line-height: 1.8;
  color: #bdc1ab;
}
.modal-copy p + p {
  margin-top: 15px;
}
.modal-copy strong {
  color: #eee2bf;
}
.tutorial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 24px 0;
}
.tutorial-step {
  text-align: center;
}
.tutorial-step .artifact-icon {
  height: 60px;
  width: 60px;
  margin-bottom: 10px;
}
.tutorial-step h3 {
  font-size: 18px;
  margin-bottom: 7px;
}
.tutorial-step p {
  font-size: 11px;
  line-height: 1.6;
  color: #aeb69c;
}
.stage-objectives {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.stage-objectives strong {
  display: block;
  font: 25px var(--serif);
  color: var(--gold-bright);
  margin-bottom: 5px;
}
.stage-objectives span {
  font-size: 9px;
  letter-spacing: 0.1em;
  color: #a2ac90;
  text-transform: uppercase;
}
.tutorial-tip {
  margin: 18px 0 0;
  font-size: 11px;
  line-height: 1.7;
  color: #b6bb9f;
  text-align: center;
}
.result-emblem {
  text-align: center;
  margin-bottom: 8px;
}
.result-emblem .artifact-icon {
  width: 110px;
  height: 110px;
}
.result-emblem.silver .artifact-icon {
  filter: grayscale(1) brightness(1.12);
}
.result-emblem.bronze .artifact-icon {
  filter: sepia(0.55) saturate(0.85) brightness(0.76);
}
.result-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  text-align: center;
  margin: 26px 0;
  padding: 23px 0;
  border-block: 1px solid var(--line);
  gap: 10px;
}
.result-stats strong {
  display: block;
  font: 26px var(--serif);
  color: var(--gold-bright);
  margin-bottom: 8px;
}
.result-stats span {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--muted);
}
.result-note {
  text-align: center;
  font: 15px/1.7 var(--serif);
  color: #b4bba0;
}
.rules-list {
  counter-reset: rules;
  display: grid;
  gap: 18px;
}
.rule-row {
  display: flex;
  gap: 18px;
  align-items: start;
}
.rule-row > .artifact-icon {
  width: 45px;
  height: 45px;
  border: 1px solid var(--line);
}
.rule-row h3 {
  font-size: 19px;
  margin: 0 0 6px;
  color: #dfcea1;
}
.rule-row p {
  font-size: 12px;
  line-height: 1.75;
  color: #afb89e;
}
.rule-bonus-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 25px;
  margin-top: 25px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.rule-bonus-grid .rule-row {
  gap: 10px;
}
.rule-bonus-grid .rule-row > .artifact-icon {
  width: 38px;
  height: 38px;
}
.rule-bonus-grid h3 {
  font-size: 15px;
}
.rule-bonus-grid p {
  font-size: 11px;
}
.keyboard-hints {
  font-size: 11px;
  color: #a1ac90;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 24px;
  line-height: 2;
}
.keyboard-hints kbd {
  border: 1px solid #c3b27c44;
  padding: 3px 5px;
  margin: 0 3px;
  color: #d5c693;
  font: 10px var(--sans);
}
.settings-row {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.settings-row label,
.settings-label {
  font-size: 13px;
  color: #d1d3be;
  line-height: 1.7;
}
.settings-row small {
  display: block;
  font-size: 11px;
  color: #879579;
}
.settings-row input[type="range"] {
  width: 160px;
  accent-color: #c8ac6c;
}
.settings-row input[type="checkbox"] {
  width: 19px;
  height: 19px;
  accent-color: #c4ac72;
}
.storage-note {
  margin: 17px 0;
  color: #909d80;
  font-size: 11px;
  line-height: 1.8;
}
.profile-list {
  display: grid;
  gap: 8px;
  margin-bottom: 23px;
}
.profile-row {
  padding: 13px 16px;
  display: flex;
  gap: 15px;
  align-items: center;
  border: 1px solid var(--line);
  text-align: left;
  width: 100%;
}
.profile-row.selected {
  border-color: #bdac6b88;
  background: #9d965017;
}
.profile-row .profile-avatar {
  font: 25px var(--serif);
  color: var(--gold);
  width: 34px;
}
.profile-row .profile-info {
  flex: 1;
}
.profile-row strong {
  display: block;
  font: 17px var(--serif);
  margin-bottom: 5px;
}
.profile-row small {
  font-size: 10px;
  color: var(--muted);
}
.profile-check {
  color: #b3c593;
}
.profile-form {
  display: flex;
  gap: 8px;
}
.profile-form input {
  min-width: 0;
  flex: 1;
  padding: 12px;
  background: #090e09;
  color: #e2dcc7;
  border: 1px solid var(--line);
  border-radius: 0;
  font-size: 12px;
}
.profile-form .button {
  padding-inline: 17px;
}
.form-error {
  font-size: 12px;
  line-height: 1.6;
  color: #e2ad90;
  margin-top: 12px;
  min-height: 18px;
}
.storage-warning {
  padding: 10px 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  background: #6d4f252b;
  color: #d5b582;
  font-size: 11px;
  border-bottom: 1px solid #80633355;
  position: relative;
  z-index: 3;
}
.storage-warning button {
  text-decoration: underline;
  min-height: 32px;
}
.import-summary {
  padding: 17px;
  border: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.8;
  color: #b9c2a5;
  overflow-wrap: anywhere;
}
#toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 15px);
  opacity: 0;
  pointer-events: none;
  z-index: 100;
  padding: 13px 23px;
  background: #252e1bf5;
  border: 1px solid #ae9c6077;
  box-shadow: 0 8px 35px #0008;
  color: #e7ddbd;
  font-size: 12px;
  max-width: calc(100vw - 40px);
  text-align: center;
  transition:
    opacity 0.18s,
    transform 0.18s;
  line-height: 1.5;
}
#toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.reduced-motion *,
.reduced-motion *:before,
.reduced-motion *:after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
@media (min-width: 1600px) {
  .home-main {
    padding-bottom: 75px;
  }
  .game-hud {
    height: 117px;
  }
  .game-table {
    width: min(1580px, calc((100dvh - 310px) * 20 / 7), calc(100vw - 60px));
  }
  .game-hud .value {
    font-size: 32px;
  }
  .family-focus-item .artifact-icon {
    width: 52px;
    height: 52px;
  }
  .resource-bar {
    margin-top: 16px;
  }
}
@media (max-width: 1100px) {
  .topbar {
    padding-inline: 28px;
    height: 74px;
  }
  .home-main {
    min-height: calc(100dvh - 207px);
  }
  .home-title {
    font-size: 108px;
  }
  .realm-feature {
    grid-template-columns: 255px 1fr;
    gap: 25px;
  }
  .realm-art {
    padding: 25px 20px;
  }
  .realm-art h2 {
    font-size: 35px;
  }
  .page-content {
    padding-inline: 28px;
  }
  .page-heading h1 {
    font-size: 42px;
  }
  .stage-list-head,
  .stage-row {
    grid-template-columns: 1fr 70px 65px 70px;
    padding-inline: 10px;
  }
  .stage-row.current {
    padding-left: 8px;
  }
  .game-table {
    width: min(calc((100dvh - 281px) * 20 / 7), calc(100vw - 30px));
  }
  .game-topbar {
    height: 54px;
    padding-inline: 18px;
  }
  .game-hud {
    height: 96px;
    gap: 7px;
  }
  .game-footer {
    padding: 8px 18px 10px;
  }
  .resource-button,
  .resource-display {
    padding-inline: 7px;
    gap: 7px;
    min-height: 45px;
  }
  .resource-text .resource-label {
    font-size: 7px;
  }
  .resource-button .artifact-icon,
  .resource-display .artifact-icon {
    width: 29px;
    height: 29px;
  }
  .resource-text .resource-value {
    font-size: 19px;
  }
  .family-focus-title {
    font-size: 12px;
  }
  .family-focus-icons {
    gap: 5px;
  }
  .family-focus-item .artifact-icon {
    width: 39px;
    height: 39px;
  }
  .hud-stat .value {
    font-size: 24px;
  }
  .board-caption {
    font-size: 8px;
  }
  .bag-slots {
    gap: 4px;
  }
  .game-location-name {
    font-size: 13px;
  }
  .game-location-name small {
    font-size: 9px;
  }
}
@media (max-width: 760px) {
  .topbar {
    height: 66px;
    padding-inline: 20px;
  }
  .brand {
    font-size: 17px;
  }
  .brand-mark {
    font-size: 28px;
  }
  .offline-label {
    display: none;
  }
  .topbar-right {
    gap: 12px;
  }
  .home-main {
    min-height: calc(100dvh - 225px);
    padding: 30px 20px;
  }
  .home-title {
    font-size: clamp(52px, 14vw, 104px);
  }
  .home-kicker {
    font-size: 8px;
    letter-spacing: 0.23em;
    margin-bottom: 22px;
  }
  .home-subtitle {
    font-size: 9px;
    letter-spacing: 0.27em;
    margin-top: 16px;
  }
  .home-description {
    font-size: 16px;
    max-width: 320px;
  }
  .home-primary-actions {
    margin-top: 25px;
    gap: 10px;
  }
  .home-primary-actions .button {
    min-width: 210px;
  }
  .home-bottom {
    padding-inline: 20px;
    padding-bottom: 20px;
  }
  .home-nav {
    gap: 12px;
    justify-content: space-between;
  }
  .home-nav button {
    font-size: 8px;
    letter-spacing: 0.08em;
    gap: 6px;
    flex-direction: column;
    padding: 4px;
  }
  .home-nav button svg {
    height: 16px;
  }
  .home-footnote {
    font-size: 8px;
    gap: 20px;
    line-height: 1.7;
  }
  .home-footnote span:last-child {
    text-align: right;
  }
  .page-content {
    padding: 20px 20px 45px;
  }
  .page-heading {
    margin: 14px 0 25px;
    align-items: start;
  }
  .page-heading h1 {
    font-size: 35px;
  }
  .page-heading p {
    font-size: 14px;
  }
  .page-heading > .eyebrow {
    display: none;
  }
  .realm-tabs {
    margin-bottom: 20px;
  }
  .realm-tab {
    min-width: 114px;
    min-height: 59px;
    padding: 8px;
  }
  .realm-tab strong {
    font-size: 14px;
  }
  .realm-tab small {
    font-size: 8px;
  }
  .realm-feature {
    display: block;
  }
  .realm-art {
    height: 210px;
    margin-bottom: 22px;
    padding: 20px;
    background-position: center 40%;
  }
  .realm-art h2 {
    font-size: 34px;
    margin: 8px 0;
  }
  .realm-art p {
    font-size: 13px;
    max-width: 350px;
  }
  .realm-art .realm-stats {
    position: absolute;
    right: 20px;
    top: 14px;
    gap: 15px;
    font-size: 8px;
    padding: 0;
    border: 0;
    margin: 0;
  }
  .stage-list-head,
  .stage-row {
    grid-template-columns: 1fr 64px 54px 67px;
    padding-inline: 8px;
  }
  .stage-name {
    font-size: 13px;
    gap: 5px;
  }
  .stage-row {
    min-height: 53px;
  }
  .stage-metric {
    font-size: 10px;
  }
  .stage-list-head {
    font-size: 8px;
  }
  .collection-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0 18px;
  }
  .family-entry h3 {
    font-size: 16px;
  }
  .family-entry h3 small {
    display: none;
  }
  .family-objects {
    gap: 4px;
  }
  .family-object .artifact-icon {
    width: 54px;
    height: 54px;
  }
  .family-object small {
    font-size: 9px;
  }
  .modal-backdrop {
    padding: 14px;
  }
  .modal {
    padding: 34px 22px;
    max-height: calc(100dvh - 28px);
  }
  .modal-heading h2 {
    font-size: 31px;
  }
  .modal-heading p {
    font-size: 14px;
  }
  .tutorial-grid {
    gap: 12px;
  }
  .tutorial-step h3 {
    font-size: 16px;
  }
  .tutorial-step p {
    font-size: 10px;
  }
  .tutorial-step .artifact-icon {
    height: 50px;
    width: 50px;
  }
  .stage-objectives {
    gap: 20px;
  }
  .stage-objectives strong {
    font-size: 23px;
  }
  .stage-objectives span {
    font-size: 8px;
  }
  .modal-actions .button {
    font-size: 10px;
    padding-inline: 15px;
  }
  .rule-bonus-grid {
    grid-template-columns: 1fr;
  }
  .settings-row input[type="range"] {
    width: 130px;
  }
  .profile-form .button {
    font-size: 9px;
    padding-inline: 10px;
  }
  .game-page {
    min-height: 450px;
  }
  .game-topbar {
    height: 47px;
    padding-inline: 12px;
  }
  .game-location .brand {
    font-size: 15px;
  }
  .game-location .brand-mark {
    font-size: 23px;
  }
  .game-location {
    gap: 9px;
  }
  .game-location-name {
    font-size: 11px;
  }
  .game-location-name small {
    margin-left: 4px;
  }
  .game-table {
    width: min(calc((100dvh - 238px) * 20 / 7), calc(100vw - 16px));
  }
  .game-hud {
    height: 81px;
    gap: 5px;
  }
  .hud-stat .label {
    font-size: 7px;
    letter-spacing: 0.1em;
  }
  .hud-stat .value {
    font-size: 19px;
  }
  .hud-stat .detail {
    font-size: 7px;
  }
  .family-focus {
    gap: 1px;
  }
  .family-focus .icon-button {
    width: 22px;
    min-width: 22px;
    padding: 0;
  }
  .family-focus-title {
    font-size: 10px;
    margin-bottom: 4px;
  }
  .family-focus-title small {
    display: none;
  }
  .family-focus-icons {
    gap: 3px;
  }
  .family-focus-item .artifact-icon {
    height: 30px;
    width: 30px;
  }
  .objective-dots {
    gap: 3px;
    margin-top: 2px;
  }
  .objective-dot {
    height: 3px;
    width: 3px;
  }
  .board-frame {
    padding: 4px;
  }
  .board-caption {
    height: 21px;
  }
  .bag-heading {
    margin: 4px 0;
    font-size: 8px;
  }
  .bag-slot {
    height: 31px;
  }
  .resource-bar {
    gap: 4px;
    margin-top: 8px;
  }
  .resource-button,
  .resource-display {
    padding: 2px 4px;
    gap: 3px;
    min-height: 40px;
  }
  .resource-button .artifact-icon,
  .resource-display .artifact-icon {
    width: 23px;
    height: 23px;
  }
  .resource-text .resource-label {
    font-size: 6px;
    letter-spacing: 0;
  }
  .resource-text .resource-value {
    font-size: 16px;
  }
  .resource-button kbd {
    display: none;
  }
  .resource-button.active .resource-value {
    font-size: 10px;
  }
  .game-footer {
    padding: 7px 12px;
    font-size: 8px;
  }
  .game-footer > span:last-child {
    display: none;
  }
  .game-actions {
    gap: 0;
  }
  .game-actions .icon-button {
    width: 34px;
    height: 42px;
  }
  .game-actions svg {
    width: 17px;
  }
}
@media (orientation: portrait) {
  .game-page {
    min-height: 100dvh;
    overflow: auto;
  }
  .game-table {
    width: calc(100vw - 24px);
    margin: 24px auto;
  }
  .game-hud {
    grid-template-columns: 1fr 1fr 1fr 1fr;
    height: 145px;
    align-content: start;
    row-gap: 12px;
  }
  .family-focus {
    grid-column: 1/-1;
    grid-row: 2;
    border: 0;
  }
  .family-focus-icons {
    gap: 12px;
  }
  .family-focus-item .artifact-icon {
    width: 41px;
    height: 41px;
  }
  .family-focus-title {
    font-size: 13px;
  }
  .family-focus .icon-button {
    width: 44px;
  }
  .family-focus-content {
    flex: 0 1 210px;
  }
  .family-focus-title small {
    display: inline;
  }
  .hud-stat {
    padding-top: 5px;
  }
  .game-hud .hud-stat:nth-last-child(2) {
    grid-column: 3;
    grid-row: 1;
  }
  .game-hud .hud-stat:last-child {
    grid-column: 4;
    grid-row: 1;
  }
  .orientation-note {
    position: relative;
    display: block;
    text-align: center;
    padding: 10px 18px;
    font-size: 11px;
    line-height: 1.6;
    background: #bdac6320;
    border-bottom: 1px solid var(--line);
    color: #cec49c;
  }
  .bag-slots {
    grid-template-columns: repeat(15, minmax(0, 1fr));
    gap: 2px;
  }
  .bag-slot {
    height: 33px;
  }
  .resource-bar {
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 18px;
  }
  .resource-button,
  .resource-display {
    flex: 1 1 28%;
    min-height: 51px;
    gap: 10px;
  }
  .resource-button .artifact-icon,
  .resource-display .artifact-icon {
    width: 31px;
    height: 31px;
  }
  .resource-text .resource-label {
    font-size: 8px;
  }
  .resource-text .resource-value {
    font-size: 19px;
  }
  .board-caption {
    font-size: 7px;
  }
  .game-topbar .game-location-name {
    display: none;
  }
  .game-table .game-hud {
    margin-bottom: 12px;
  }
  .board-frame {
    overflow: hidden;
  }
  .game-footer {
    margin-top: auto;
  }
  .game-footer > span:last-child {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
  }
}
