:root {
  color-scheme: dark;
  --canvas: #0b0c0c;
  --surface: rgba(19, 20, 19, .93);
  --surface-solid: #151615;
  --surface-raised: #1b1c1a;
  --paper: #f1eee7;
  --muted: #9b9992;
  --quiet: #6d6d68;
  --gold: #d7aa55;
  --gold-light: #efd18e;
  --green: #7fc199;
  --red: #ca756a;
  --steel: #b9bdba;
  --line: rgba(241, 238, 231, .12);
  --line-strong: rgba(241, 238, 231, .2);
  --gold-line: rgba(215, 170, 85, .38);
  --shadow: 0 24px 72px rgba(0, 0, 0, .42);
  --ease-out: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
html, body { width: 100%; min-height: 100%; overflow: hidden; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--paper);
  font-family: Inter, "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

button, a { font: inherit; }
button { color: inherit; }

.game-shell { position: fixed; inset: 0; overflow: hidden; background: var(--canvas); }
#cityCanvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
#cityCanvas:active { cursor: grabbing; }

.game-shell::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(4, 5, 5, .28), transparent 20%, transparent 70%, rgba(4, 5, 5, .42));
}

.loading-screen {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  background: #0b0c0c;
  transition: opacity .55s var(--ease-out), visibility 0s .55s;
}
.loading-screen.is-hidden { opacity: 0; visibility: hidden; }
.loading-screen img { width: 150px; height: auto; }
.loading-title { margin-top: 22px; color: var(--paper); font-size: 12px; font-weight: 750; letter-spacing: .2em; text-transform: uppercase; }
.loading-track { width: 220px; height: 2px; margin-top: 22px; background: rgba(255,255,255,.08); }
.loading-track i { display: block; width: 0; height: 100%; background: var(--gold); transition: width .25s; }
.loading-screen p { margin: 10px 0 0; color: var(--quiet); font-size: 10px; }

.topbar {
  position: absolute;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  height: 78px;
  padding: max(13px, env(safe-area-inset-top)) clamp(18px, 3vw, 42px) 11px;
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto minmax(420px, 1fr) auto;
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(180deg, rgba(10,11,11,.94), rgba(10,11,11,.72));
  backdrop-filter: blur(14px);
}

.brand { display: inline-flex; width: fit-content; align-items: center; gap: 14px; color: inherit; text-decoration: none; }
.brand img { width: 104px; height: auto; display: block; }
.brand span { padding-left: 14px; border-left: 1px solid var(--line); color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; }

.city-level {
  width: 180px;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  justify-items: start;
  gap: 3px;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.city-level > span { color: var(--quiet); font-size: 8px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.city-level > b { font-size: 12px; font-weight: 650; }
.city-level > b i { color: var(--gold-light); font-style: normal; }
.city-level > em { width: 100%; height: 2px; margin-top: 3px; background: rgba(255,255,255,.09); }
.city-level > em i { display: block; width: 34%; height: 100%; background: var(--gold); transition: width .4s var(--ease-out); }

.resources { justify-self: end; display: flex; align-items: center; gap: 7px; }
.resource {
  min-width: 67px;
  height: 38px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 2px;
  background: rgba(255,255,255,.025);
  cursor: pointer;
  transition: border-color .18s, background .18s, transform .18s;
}
.resource:hover { border-color: var(--line-strong); background: rgba(255,255,255,.05); }
.resource:active { transform: scale(.97); }
.resource > i { position: relative; width: 17px; height: 17px; display: grid; place-items: center; color: var(--gold-light); font: normal 800 9px/1 Inter, sans-serif; }
.resource > b { font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; }
.resource.coin { border-color: rgba(215,170,85,.18); }
.resource.coin > i { border: 1px solid var(--gold); border-radius: 50%; }
.ore-icon::before { content: ""; width: 13px; height: 12px; background: #706f6c; clip-path: polygon(19% 12%,72% 0,100% 36%,82% 89%,28% 100%,0 62%); box-shadow: inset 2px 2px rgba(255,255,255,.18); }
.metal-icon::before { content: ""; width: 15px; height: 9px; border-radius: 2px; background: linear-gradient(145deg,#e1dfd8,#6e706e); transform: skewX(-12deg); }
.blank-icon::before { content: ""; width: 13px; height: 13px; border: 2px solid #b8bab6; border-radius: 50%; }
.product-icon::before { content: ""; width: 13px; height: 13px; border: 2px solid var(--gold); border-radius: 50%; box-shadow: inset 0 0 0 3px rgba(215,170,85,.16); }

.round-button {
  width: 40px;
  height: 40px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255,255,255,.025);
  cursor: pointer;
  transition: border-color .18s, transform .18s;
}
.round-button:hover { border-color: var(--gold-line); }
.round-button:active { transform: scale(.94); }
.round-button svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.round-button[aria-pressed="true"] { color: var(--quiet); }
.top-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.sync-button {
  position: relative;
  height: 40px;
  padding: 0 12px 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255,255,255,.025);
  cursor: pointer;
  transition: border-color .18s, background .18s, transform .18s;
}
.sync-button:hover { border-color: var(--gold-line); background: rgba(215,170,85,.045); }
.sync-button:active { transform: scale(.97); }
.sync-button svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sync-button span { max-width: 104px; overflow: hidden; color: var(--muted); font-size: 9px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.sync-button > i { width: 6px; height: 6px; border-radius: 50%; background: var(--quiet); box-shadow: 0 0 0 3px rgba(109,109,104,.12); }
.sync-button.is-synced > i { background: var(--green); box-shadow: 0 0 0 3px rgba(127,193,153,.12); }
.sync-button.is-saving > i, .sync-button.is-connecting > i { background: var(--gold); box-shadow: 0 0 0 3px rgba(215,170,85,.12); }
.sync-button.is-offline > i { background: var(--red); box-shadow: 0 0 0 3px rgba(202,117,106,.12); }

.panel-surface { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); backdrop-filter: blur(16px); }
.panel-kicker { color: var(--gold); font-size: 8px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }

.path-panel {
  position: absolute;
  z-index: 12;
  top: 102px;
  left: clamp(18px, 3vw, 42px);
  width: min(330px, calc(100vw - 36px));
  padding: 18px 20px 16px;
  border-left-color: var(--gold-line);
}
.path-head { margin-top: 10px; display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.path-head h2 { margin: 0; font-size: 16px; font-weight: 620; letter-spacing: -.02em; }
.path-head p { max-width: 235px; margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.path-head > b { color: var(--gold-light); font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; }
.path-track { height: 2px; margin-top: 15px; background: rgba(255,255,255,.08); }
.path-track i { display: block; width: 33%; height: 100%; background: var(--gold); transition: width .4s var(--ease-out); }
.text-button { margin: 13px 0 0; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 9px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.text-button span { margin-left: 5px; color: var(--gold); transition: transform .18s; display: inline-block; }
.text-button:hover { color: var(--paper); }
.text-button:hover span { transform: translateX(3px); }

.daily-teaser {
  width: 100%;
  min-height: 50px;
  margin-top: 15px;
  padding: 11px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.daily-teaser > span { min-width: 0; display: flex; align-items: center; gap: 10px; }
.daily-teaser > span > i { position: relative; flex: 0 0 27px; width: 27px; height: 27px; border: 1px solid var(--gold-line); border-radius: 50%; background: rgba(215,170,85,.035); }
.daily-teaser > span > i::before { content: ""; position: absolute; inset: 7px; border: 1px solid var(--gold-light); transform: rotate(45deg); }
.daily-teaser > span > i::after { content: ""; position: absolute; left: 50%; top: 4px; bottom: 4px; width: 1px; background: rgba(239,209,142,.38); transform: rotate(45deg); }
.daily-teaser b { min-width: 0; display: grid; gap: 3px; font-size: 10px; font-weight: 650; }
.daily-teaser b small { color: var(--gold); font-size: 6px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.daily-teaser > em { display: grid; justify-items: end; gap: 3px; font-style: normal; white-space: nowrap; }
.daily-teaser strong { color: var(--gold-light); font-size: 10px; font-weight: 680; font-variant-numeric: tabular-nums; }
.daily-teaser > em small { color: var(--quiet); font-size: 6px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.daily-teaser:hover b { color: var(--gold-light); }
.daily-teaser:hover > span > i { border-color: var(--gold); background: rgba(215,170,85,.075); }
.daily-teaser.is-ready > span > i { background: rgba(215,170,85,.13); box-shadow: 0 0 0 5px rgba(215,170,85,.035); animation: dailyTeaserReady 2.4s ease-in-out infinite; }
.daily-teaser.is-claimed strong { color: var(--green); }
@keyframes dailyTeaserReady { 50% { box-shadow: 0 0 0 8px rgba(215,170,85,.015), 0 0 24px rgba(215,170,85,.12); } }

.orders-panel {
  position: absolute;
  z-index: 14;
  top: 102px;
  right: clamp(18px, 3vw, 42px);
  width: 320px;
  padding: 20px;
  transition: opacity .25s, transform .3s var(--ease-out), visibility 0s;
}
.orders-panel.is-hidden { opacity: 0; visibility: hidden; transform: translateX(20px); transition-delay: 0s,0s,.3s; }
.orders-head { display: flex; align-items: flex-start; justify-content: space-between; }
.orders-head h2 { margin: 5px 0 0; font-size: 18px; font-weight: 610; letter-spacing: -.02em; }
.panel-close, .sheet-close { width: 32px; height: 32px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; font-size: 20px; line-height: 1; }
.panel-close:hover, .sheet-close:hover { color: var(--paper); border-color: var(--line-strong); }
.order-card { margin-top: 18px; }
.order-art { position: relative; height: 100px; overflow: hidden; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.08); background: radial-gradient(circle at 50% 45%,rgba(215,170,85,.1),transparent 47%), #111211; }
.order-art::before { content: ""; position: absolute; inset: -40%; border: 1px solid rgba(215,170,85,.1); border-radius: 50%; }
.order-art > span { position: absolute; right: 9px; bottom: 8px; color: var(--quiet); font-size: 8px; letter-spacing: .12em; }
.order-token { width: 64px; height: 64px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.35); border-radius: 50%; background: linear-gradient(145deg,#787a78,#202120 50%,#656765); box-shadow: inset 0 0 0 5px rgba(0,0,0,.3), 0 15px 30px rgba(0,0,0,.35); transform: rotate(-8deg); }
.order-token i { width: 28px; height: 28px; border: 3px solid #151615; transform: rotate(45deg); }
.order-copy { padding: 15px 0 13px; border-bottom: 1px solid var(--line); }
.order-copy > span { color: var(--gold); font-size: 8px; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; }
.order-copy h3 { margin: 6px 0 0; font-size: 15px; font-weight: 620; }
.order-copy p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.order-requirement { padding: 13px 0; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; }
.order-requirement > span { color: var(--muted); font-size: 9px; }
.order-requirement > b { font-size: 13px; font-weight: 650; }
.order-requirement > b i { font-style: normal; }
.order-requirement > em { grid-column: 1/-1; height: 2px; background: rgba(255,255,255,.09); }
.order-requirement > em i { display: block; width: 33%; height: 100%; background: var(--gold); transition: width .35s; }
.order-reward { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.order-reward div { padding: 12px 0; display: grid; gap: 3px; }
.order-reward div + div { padding-left: 14px; border-left: 1px solid var(--line); }
.order-reward span { color: var(--quiet); font-size: 8px; letter-spacing: .12em; text-transform: uppercase; }
.order-reward b { font-size: 13px; font-weight: 650; }
.order-reward i { font-style: normal; }
.order-refresh { margin: 12px 0 0; color: var(--quiet); font-size: 9px; }
.order-refresh i { display: inline-block; width: 5px; height: 5px; margin-right: 5px; border-radius: 50%; background: var(--green); }

.primary-action, .secondary-action {
  min-height: 46px;
  padding: 0 17px;
  border-radius: 2px;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: transform .16s, filter .16s, border-color .16s;
}
.primary-action { border: 1px solid #e9c77e; background: linear-gradient(135deg,#ebcd8a,#cea04c); color: #18130b; }
.primary-action:hover:not(:disabled) { filter: brightness(1.07); transform: translateY(-1px); }
.primary-action:active:not(:disabled) { transform: translateY(1px) scale(.99); }
.primary-action:disabled { border-color: var(--line); background: rgba(255,255,255,.055); color: var(--quiet); cursor: not-allowed; }
.secondary-action { border: 1px solid var(--gold-line); background: rgba(215,170,85,.06); color: var(--gold-light); }
.secondary-action:hover { border-color: var(--gold); }
.order-card > .primary-action { width: 100%; }

.camera-help { position: absolute; z-index: 5; left: 50%; bottom: 93px; translate: -50% 0; color: rgba(241,238,231,.34); font-size: 8px; letter-spacing: .08em; text-transform: uppercase; pointer-events: none; }
.camera-help span { color: rgba(241,238,231,.55); }

.game-nav {
  position: absolute;
  z-index: 22;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  translate: -50% 0;
  height: 62px;
  padding: 5px;
  display: flex;
  align-items: stretch;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: rgba(16,17,16,.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}
.nav-item { position: relative; min-width: 76px; padding: 5px 13px; display: grid; place-items: center; align-content: center; gap: 4px; border: 0; border-radius: 2px; background: transparent; color: var(--muted); cursor: pointer; transition: color .18s, background .18s; }
.nav-item:hover { color: var(--paper); background: rgba(255,255,255,.045); }
.nav-item.is-active { color: var(--gold-light); background: rgba(215,170,85,.07); }
.nav-item svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.nav-item > span { font-size: 8px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.nav-item > small { position: absolute; top: 4px; right: 5px; color: var(--quiet); font-size: 6px; letter-spacing: .05em; text-transform: uppercase; }
.nav-item > em { position: absolute; top: 3px; right: 11px; min-width: 15px; height: 15px; padding: 0 4px; display: grid; place-items: center; border-radius: 999px; background: var(--gold); color: #15110a; font-size: 8px; font-style: normal; font-weight: 850; }
.nav-build { min-width: 88px; color: var(--paper); background: rgba(255,255,255,.055); }
.nav-build > i { width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid var(--gold); border-radius: 50%; color: var(--gold-light); font-size: 17px; font-style: normal; line-height: 1; }

.world-labels { position: absolute; z-index: 6; inset: 0; pointer-events: none; }
.world-label { position: absolute; min-width: 92px; translate: -50% -100%; text-align: center; transition: opacity .2s; }
.world-label b { padding: 5px 8px; display: inline-block; border: 1px solid rgba(255,255,255,.12); background: rgba(11,12,12,.82); color: var(--paper); font-size: 8px; font-weight: 650; letter-spacing: .04em; backdrop-filter: blur(7px); }
.world-label span { width: 62px; height: 2px; margin: 4px auto 0; display: block; background: rgba(0,0,0,.45); }
.world-label span i { display: block; height: 100%; background: var(--gold); }
.world-label.is-idle b { color: var(--muted); }
.world-label.is-empty b { border-style: dashed; color: var(--gold-light); }

.building-panel,
.build-panel {
  position: absolute;
  z-index: 30;
  left: clamp(18px, 3vw, 42px);
  bottom: 104px;
  width: 365px;
  padding: 22px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px);
  transition: opacity .22s, transform .3s var(--ease-out), visibility 0s .3s;
}
.building-panel.is-open,
.build-panel.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.building-panel .sheet-close { position: absolute; top: 15px; right: 15px; }
.building-head > span { color: var(--gold); font-size: 8px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.building-head h2 { margin: 6px 42px 0 0; font-size: 25px; font-weight: 590; letter-spacing: -.035em; }
.building-head p { margin: 7px 35px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.building-stats { margin-top: 18px; display: grid; grid-template-columns: repeat(3,1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.building-stats div { padding: 12px 0; display: grid; gap: 4px; }
.building-stats div + div { padding-left: 12px; border-left: 1px solid var(--line); }
.building-stats span { color: var(--quiet); font-size: 7px; letter-spacing: .12em; text-transform: uppercase; }
.building-stats b { font-size: 11px; font-weight: 650; }
.production-block { margin-top: 15px; }
.production-block > div { display: flex; justify-content: space-between; font-size: 9px; }
.production-block span { color: var(--muted); }
.production-block b { font-weight: 650; font-variant-numeric: tabular-nums; }
.production-block > em { display: block; height: 3px; margin-top: 8px; background: rgba(255,255,255,.09); }
.production-block > em i { display: block; width: 0; height: 100%; background: var(--gold); transition: width .2s linear; }
.building-actions { margin-top: 18px; display: grid; grid-template-columns: 1fr; gap: 8px; }
.building-actions:has(.secondary-action:not([hidden])) { grid-template-columns: 1fr 1fr; }
.building-actions button { width: 100%; }
.building-actions .primary-action { display: flex; align-items: center; justify-content: space-between; }
.building-actions .primary-action i { font-style: normal; }

.build-panel { width: 430px; }
.build-panel-head { display: flex; justify-content: space-between; align-items: flex-start; }
.build-panel-head h2 { margin: 6px 0 0; font-size: 24px; font-weight: 590; letter-spacing: -.03em; }
.build-options { margin-top: 17px; display: grid; gap: 7px; }
.build-option { min-height: 64px; padding: 9px 12px; display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 11px; border: 1px solid var(--line); border-radius: 2px; background: rgba(255,255,255,.025); text-align: left; cursor: pointer; transition: border-color .18s, background .18s; }
.build-option:hover { border-color: var(--gold-line); background: rgba(215,170,85,.045); }
.build-option > span { display: grid; gap: 4px; }
.build-option > span b { font-size: 11px; font-weight: 650; }
.build-option > span small { color: var(--muted); font-size: 9px; }
.build-option > em { color: var(--gold-light); font-size: 10px; font-style: normal; font-weight: 650; }
.build-option.is-locked { opacity: .55; }
.build-glyph { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); background: #111211; }
.warehouse-glyph::before { content: ""; width: 23px; height: 17px; border: 2px solid var(--steel); border-top-width: 5px; }
.trade-glyph::before { content: ""; width: 24px; height: 19px; background: repeating-linear-gradient(90deg,var(--steel) 0 3px,transparent 3px 7px); border-top: 2px solid var(--steel); border-bottom: 2px solid var(--steel); }
.guild-glyph::before { content: ""; width: 23px; height: 22px; border: 2px solid var(--steel); clip-path: polygon(50% 0,100% 30%,88% 100%,12% 100%,0 30%); }

.market-panel {
  position: absolute;
  z-index: 32;
  top: 96px;
  right: clamp(18px, 3vw, 42px);
  bottom: 104px;
  width: min(680px, calc(100vw - 84px));
  padding: 24px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-top-color: var(--gold-line);
  background: rgba(18,19,18,.965);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  transform: translateX(24px);
  transition: opacity .22s, transform .34s var(--ease-out), visibility 0s .34s;
}
.market-panel.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.market-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.market-head .sheet-close { flex: 0 0 40px; width: 40px; height: 40px; }
.market-head h2 { margin: 6px 0 0; font-size: 28px; font-weight: 580; letter-spacing: -.04em; }
.market-description { max-width: 510px; margin: 9px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.caravan-stage { position: relative; height: 108px; margin-top: 20px; overflow: hidden; border: 1px solid var(--line); background: linear-gradient(180deg,rgba(215,170,85,.035),transparent), #111211; }
.caravan-stage::before, .caravan-stage::after { content: ""; position: absolute; bottom: 23px; width: 62px; height: 34px; border: 1px solid rgba(241,238,231,.12); border-bottom-color: rgba(215,170,85,.4); background: repeating-linear-gradient(90deg,rgba(241,238,231,.07) 0 7px,transparent 7px 13px); }
.caravan-stage::before { left: 18px; clip-path: polygon(0 35%,50% 0,100% 35%,100% 100%,0 100%); }
.caravan-stage::after { right: 18px; clip-path: polygon(0 20%,100% 20%,90% 100%,10% 100%); }
.route-city { position: absolute; z-index: 2; top: 13px; color: var(--quiet); font-size: 7px; font-weight: 750; letter-spacing: .12em; }
.route-city-start { left: 17px; }
.route-city-end { right: 17px; }
.caravan-route { position: absolute; left: 76px; right: 76px; top: 69px; height: 1px; background: repeating-linear-gradient(90deg,var(--gold-line) 0 7px,transparent 7px 13px); }
.caravan-route::after { content: ""; position: absolute; inset: -4px 0; background: radial-gradient(circle,var(--gold) 1px,transparent 2px) 0 50%/28px 8px repeat-x; opacity: .25; animation: routePulse 2.8s linear infinite; }
.caravan-runner { position: absolute; z-index: 3; left: 88px; top: 50px; width: 44px; height: 26px; animation: caravanMove 8s ease-in-out infinite alternate; }
.caravan-runner > i { position: absolute; inset: 0 8px 8px 0; border: 1px solid var(--gold); background: #29261f; clip-path: polygon(0 22%,76% 22%,100% 55%,100% 100%,0 100%); }
.caravan-runner > i::before { content: ""; position: absolute; left: 8px; top: -8px; width: 14px; height: 9px; border: 1px solid rgba(239,209,142,.75); background: #181817; }
.caravan-runner > b { position: absolute; bottom: 1px; width: 8px; height: 8px; border: 2px solid #101110; border-radius: 50%; background: var(--gold); }
.caravan-runner > b:nth-of-type(1) { left: 6px; }
.caravan-runner > b:nth-of-type(2) { right: 7px; }
@keyframes caravanMove { from { transform: translateX(0); } to { transform: translateX(min(390px, 42vw)); } }
@keyframes routePulse { to { background-position: 28px 50%; } }
.market-cycle { min-height: 54px; padding: 11px 13px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); }
.market-cycle > span { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 9px; }
.market-cycle > span i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(127,193,153,.09); }
.market-cycle > div { display: grid; justify-items: end; gap: 3px; }
.market-cycle small { color: var(--quiet); font-size: 7px; letter-spacing: .08em; text-transform: uppercase; }
.market-cycle b { color: var(--gold-light); font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; }
.market-offers { margin-top: 14px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.market-offer { min-width: 0; padding: 15px; display: grid; align-content: start; border: 1px solid var(--line); background: rgba(255,255,255,.02); transition: border-color .18s, background .18s, transform .18s; }
.market-offer:hover { border-color: var(--gold-line); background: rgba(215,170,85,.035); transform: translateY(-2px); }
.market-offer.is-complete { border-color: rgba(127,193,153,.2); background: rgba(127,193,153,.025); }
.offer-route { color: var(--gold); font-size: 7px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.market-offer h3 { min-height: 36px; margin: 7px 0 0; font-size: 13px; font-weight: 620; line-height: 1.35; }
.market-offer > p { min-height: 44px; margin: 7px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.offer-exchange { margin-top: 13px; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.offer-exchange span, .offer-reward span { display: block; color: var(--quiet); font-size: 7px; letter-spacing: .08em; text-transform: uppercase; }
.offer-exchange b { margin-top: 4px; display: block; font-size: 14px; font-weight: 640; }
.offer-exchange b i { color: var(--steel); font-style: normal; }
.offer-stock { color: var(--quiet); font-size: 8px; font-style: normal; white-space: nowrap; }
.offer-reward { margin: 11px 0 13px; display: flex; align-items: end; justify-content: space-between; gap: 8px; }
.offer-reward b { margin-top: 4px; display: block; color: var(--gold-light); font-size: 14px; font-weight: 660; }
.offer-reward em { color: var(--green); font-size: 9px; font-style: normal; }
.market-offer .primary-action { width: 100%; min-height: 40px; padding: 0 8px; font-size: 8px; }
.market-note { margin: 12px 0 0; color: var(--quiet); font-size: 8px; line-height: 1.5; }

.expedition-board { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.expedition-board [hidden] { display: none !important; }
.expedition-head { display: flex; align-items: end; justify-content: space-between; gap: 22px; }
.expedition-head h3 { margin: 6px 0 0; font-size: 18px; font-weight: 590; letter-spacing: -.025em; }
.expedition-head > p { max-width: 285px; margin: 0; color: var(--muted); font-size: 8px; line-height: 1.5; text-align: right; }
.expedition-routes { margin-top: 13px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.expedition-route { position: relative; min-width: 0; min-height: 232px; padding: 15px; display: flex; flex-direction: column; border: 1px solid var(--line); background: rgba(255,255,255,.015); transition: border-color .2s, background .2s, transform .2s; }
.expedition-route:hover { border-color: var(--gold-line); background: rgba(215,170,85,.025); transform: translateY(-2px); }
.expedition-route.is-unavailable { opacity: .62; }
.route-number { position: absolute; top: 13px; right: 13px; color: rgba(239,209,142,.28); font-size: 18px; font-weight: 500; font-variant-numeric: tabular-nums; }
.expedition-route > div:first-of-type { padding-right: 30px; }
.expedition-route small { color: var(--gold); font-size: 6px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.expedition-route h4 { margin: 7px 0 0; font-size: 13px; font-weight: 620; line-height: 1.3; }
.expedition-route p { min-height: 38px; margin: 6px 0 0; color: var(--muted); font-size: 8px; line-height: 1.5; }
.expedition-route dl { margin: 14px 0 13px; display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--line); }
.expedition-route dl > div { padding: 8px 0; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--line); }
.expedition-route dt { color: var(--quiet); font-size: 6px; letter-spacing: .08em; text-transform: uppercase; }
.expedition-route dd { margin: 0; color: var(--paper); font-size: 8px; font-weight: 650; text-align: right; }
.expedition-route dl > div:last-child dd { color: var(--gold-light); }
.expedition-route .secondary-action { width: 100%; min-height: 40px; margin-top: auto; padding-inline: 8px; font-size: 8px; }
.expedition-route .secondary-action:disabled { border-color: var(--line); background: rgba(255,255,255,.025); color: var(--quiet); cursor: not-allowed; }
.expedition-active { margin-top: 13px; padding: 18px; border: 1px solid var(--gold-line); background: linear-gradient(135deg,rgba(215,170,85,.05),transparent 55%), #111211; }
.expedition-active.is-ready { border-color: rgba(127,193,153,.34); background: linear-gradient(135deg,rgba(127,193,153,.055),transparent 58%), #111211; }
.expedition-active-head { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.expedition-active-head > div { display: grid; gap: 5px; }
.expedition-active-head > div:last-child { justify-items: end; }
.expedition-active-head span { color: var(--gold); font-size: 7px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.expedition-active.is-ready .expedition-active-head span { color: var(--green); }
.expedition-active-head h4 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -.025em; }
.expedition-active-head small { color: var(--quiet); font-size: 7px; letter-spacing: .08em; text-transform: uppercase; }
.expedition-active-head b { color: var(--gold-light); font-size: 14px; font-weight: 640; font-variant-numeric: tabular-nums; }
.expedition-active.is-ready .expedition-active-head b { color: var(--green); }
.expedition-track { --expedition-progress: 8%; position: relative; height: 90px; margin-top: 13px; overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: linear-gradient(180deg,rgba(255,255,255,.015),transparent); }
.expedition-line { position: absolute; left: 46px; right: 46px; top: 46px; height: 1px; background: repeating-linear-gradient(90deg,var(--gold-line) 0 7px,transparent 7px 13px); }
.expedition-line::before { content: ""; position: absolute; left: 0; top: -2px; width: var(--expedition-progress); height: 5px; background: linear-gradient(90deg,transparent,var(--gold)); opacity: .55; transition: width 1s linear; }
.expedition-city { position: absolute; z-index: 2; top: 35px; min-width: 68px; padding: 6px 8px; border: 1px solid var(--line); background: #151615; color: var(--muted); font-size: 6px; font-weight: 750; letter-spacing: .1em; text-align: center; }
.expedition-city-home { left: 0; }
.expedition-city-destination { right: 0; }
.expedition-runner { position: absolute; z-index: 4; left: clamp(50px,var(--expedition-progress),calc(100% - 50px)); top: 33px; width: 28px; height: 24px; transform: translateX(-50%); transition: left 1s linear; }
.expedition-runner > i { position: absolute; inset: 2px 5px 7px 0; border: 1px solid var(--gold-light); background: #2c271e; clip-path: polygon(0 22%,72% 22%,100% 60%,100% 100%,0 100%); }
.expedition-runner::before, .expedition-runner::after { content: ""; position: absolute; bottom: 1px; width: 7px; height: 7px; border: 2px solid #101110; border-radius: 50%; background: var(--gold); }
.expedition-runner::before { left: 3px; }
.expedition-runner::after { right: 5px; }
.expedition-runner > i::after { content: ""; position: absolute; left: -12px; top: 4px; width: 12px; height: 3px; background: linear-gradient(90deg,transparent,var(--gold)); filter: blur(1px); animation: expeditionEmber 1.2s ease-in-out infinite; }
.expedition-active.is-ready .expedition-line::before { background: linear-gradient(90deg,transparent,var(--green)); }
.expedition-active.is-ready .expedition-runner > i { border-color: var(--green); }
@keyframes expeditionEmber { 50% { opacity: .25; transform: translateX(-4px); } }
.expedition-return { min-height: 56px; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.expedition-return > div { display: grid; gap: 5px; }
.expedition-return span { color: var(--quiet); font-size: 7px; letter-spacing: .08em; text-transform: uppercase; }
.expedition-return b { font-size: 13px; font-weight: 650; }
.expedition-return .primary-action { min-width: 150px; min-height: 42px; }
.expedition-status { min-height: 14px; margin: 10px 0 0; color: var(--muted); font-size: 8px; line-height: 1.5; }
.expedition-status.is-error { color: #e5a28c; }

.artel-panel {
  position: absolute;
  z-index: 33;
  top: 96px;
  right: clamp(18px, 3vw, 42px);
  bottom: 104px;
  width: min(720px, calc(100vw - 84px));
  padding: 24px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-top-color: var(--gold-line);
  background: linear-gradient(145deg,rgba(215,170,85,.025),transparent 42%), rgba(17,18,17,.975);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  transform: translateX(24px);
  transition: opacity .22s, transform .34s var(--ease-out), visibility 0s .34s;
}
.artel-panel.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.artel-panel [hidden] { display: none !important; }
.artel-head { display: grid; grid-template-columns: 48px 1fr 40px; align-items: center; gap: 13px; }
.artel-head .sheet-close { width: 40px; height: 40px; }
.artel-head h2 { margin: 5px 0 0; font-size: 28px; font-weight: 580; letter-spacing: -.04em; }
.artel-seal { position: relative; width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid var(--gold-line); border-radius: 50%; background: radial-gradient(circle,rgba(215,170,85,.14),rgba(215,170,85,.025) 62%,transparent 64%); }
.artel-seal::before, .artel-seal::after { content: ""; position: absolute; width: 21px; height: 2px; background: var(--gold-light); transform: rotate(45deg); }
.artel-seal::after { transform: rotate(-45deg); }
.artel-seal i { position: relative; z-index: 1; width: 14px; height: 14px; border: 2px solid var(--gold-light); border-radius: 50%; background: #171714; }
.artel-description { max-width: 560px; margin: 11px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.artel-onboarding { margin-top: 20px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.artel-entry { min-width: 0; min-height: 242px; padding: 20px; display: flex; flex-direction: column; border: 1px solid var(--line); background: rgba(255,255,255,.018); }
.artel-entry-create { border-top-color: var(--gold-line); background: linear-gradient(150deg,rgba(215,170,85,.045),transparent 60%); }
.artel-entry > span, .artel-identity span, .artel-project-head span, .artel-contribution label > span, .artel-contribution-result span, .artel-reward span { color: var(--gold); font-size: 7px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.artel-entry h3 { margin: 7px 0 0; font-size: 18px; font-weight: 590; letter-spacing: -.025em; }
.artel-entry p { margin: 8px 0 18px; color: var(--muted); font-size: 9px; line-height: 1.55; }
.artel-entry form { margin-top: auto; display: grid; gap: 8px; }
.artel-entry label { color: var(--quiet); font-size: 7px; letter-spacing: .08em; text-transform: uppercase; }
.artel-entry input, .artel-contribution input, .artel-contribution select { width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 2px; outline: 0; background: #111211; color: var(--paper); font: inherit; font-size: 11px; transition: border-color .18s, box-shadow .18s; }
.artel-entry input:focus, .artel-contribution input:focus, .artel-contribution select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(215,170,85,.08); }
.artel-entry .primary-action, .artel-entry .secondary-action { width: 100%; }
.artel-dashboard { margin-top: 18px; }
.artel-identity { min-height: 68px; display: grid; grid-template-columns: 1.4fr .6fr 1fr; border: 1px solid var(--line); }
.artel-identity > div { min-width: 0; padding: 13px 15px; display: grid; align-content: center; gap: 5px; }
.artel-identity > div + div { border-left: 1px solid var(--line); }
.artel-identity h3 { overflow: hidden; margin: 0; font-size: 16px; font-weight: 620; text-overflow: ellipsis; white-space: nowrap; }
.artel-identity b { color: var(--paper); font-size: 13px; font-weight: 620; }
.artel-invite button { min-width: 0; padding: 0; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; border: 0; background: transparent; color: inherit; cursor: pointer; text-align: left; }
.artel-invite button b { color: var(--gold-light); font-variant-numeric: tabular-nums; letter-spacing: .15em; }
.artel-invite button small { color: var(--quiet); font-size: 7px; }
.artel-project { margin-top: 9px; padding: 20px; border: 1px solid var(--line); border-top-color: var(--gold-line); background: linear-gradient(130deg,rgba(215,170,85,.035),transparent 48%); }
.artel-project-head { display: flex; justify-content: space-between; gap: 20px; }
.artel-project-head h3 { margin: 6px 0 0; font-size: 19px; font-weight: 590; letter-spacing: -.03em; }
.artel-project-head > div:last-child { display: grid; justify-items: end; align-content: start; gap: 6px; }
.artel-project-head small { color: var(--quiet); font-size: 7px; letter-spacing: .08em; text-transform: uppercase; }
.artel-project-head b { color: var(--gold-light); font-size: 12px; font-weight: 620; font-variant-numeric: tabular-nums; }
.artel-project > p { max-width: 510px; margin: 8px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.artel-progress { height: 7px; margin-top: 17px; overflow: hidden; border: 1px solid rgba(215,170,85,.13); background: rgba(255,255,255,.045); }
.artel-progress i { display: block; width: 0; height: 100%; background: linear-gradient(90deg,#9c7133,var(--gold-light)); box-shadow: 0 0 18px rgba(215,170,85,.22); transition: width .5s var(--ease-out); }
.artel-progress-copy { margin-top: 8px; display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 9px; }
.artel-progress-copy b { color: var(--paper); font-weight: 650; }
.artel-contribution { margin-top: 17px; padding-top: 16px; display: grid; grid-template-columns: 1.5fr .72fr .7fr 1fr; align-items: end; gap: 8px; border-top: 1px solid var(--line); }
.artel-contribution label, .artel-contribution-result { display: grid; gap: 6px; }
.artel-contribution-result { min-height: 44px; align-content: center; padding: 0 12px; border: 1px solid var(--line); background: rgba(255,255,255,.02); }
.artel-contribution-result b { font-size: 11px; font-weight: 620; white-space: nowrap; }
.artel-contribution .primary-action { min-height: 44px; padding: 0 10px; }
.artel-reward { margin-top: 12px; min-height: 62px; padding: 9px 10px 9px 14px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid rgba(127,193,153,.2); background: rgba(127,193,153,.035); }
.artel-reward > div { display: grid; gap: 5px; }
.artel-reward b { font-size: 15px; font-weight: 650; }
.artel-reward b i { margin-left: 7px; color: var(--green); font-size: 9px; font-style: normal; }
.artel-reward .primary-action { min-height: 42px; }
.artel-roster { margin-top: 18px; }
.artel-roster h3 { margin: 5px 0 0; font-size: 15px; font-weight: 590; }
.artel-roster ol { margin: 10px 0 0; padding: 0; display: grid; list-style: none; border-top: 1px solid var(--line); }
.artel-roster li { min-height: 43px; display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 9px; }
.artel-roster li > i { color: var(--quiet); font-style: normal; font-variant-numeric: tabular-nums; }
.artel-roster li b { color: var(--paper); font-weight: 600; }
.artel-roster li b small { margin-left: 7px; color: var(--gold); font-size: 6px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.artel-roster li > span { color: var(--gold-light); font-variant-numeric: tabular-nums; }
.artel-status { min-height: 14px; margin: 12px 0 0; color: var(--muted); font-size: 8px; line-height: 1.5; }
.artel-status.is-error { color: #e5a28c; }

.daily-panel {
  position: absolute;
  z-index: 34;
  top: 96px;
  right: clamp(18px, 3vw, 42px);
  bottom: 104px;
  width: min(620px, calc(100vw - 84px));
  padding: 24px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-top-color: var(--gold-line);
  background:
    linear-gradient(135deg,rgba(215,170,85,.035),transparent 38%),
    repeating-linear-gradient(0deg,transparent 0 31px,rgba(255,255,255,.012) 31px 32px),
    rgba(17,18,17,.98);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  transform: translateX(24px);
  transition: opacity .22s, transform .34s var(--ease-out), visibility 0s .34s;
}
.daily-panel.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.daily-panel [hidden] { display: none !important; }
.daily-head { display: grid; grid-template-columns: 50px 1fr 40px; align-items: center; gap: 14px; }
.daily-head .sheet-close { width: 40px; height: 40px; }
.daily-head h2 { margin: 5px 0 0; font-size: 28px; font-weight: 580; letter-spacing: -.04em; }
.daily-seal { position: relative; width: 50px; height: 50px; display: grid; place-items: center; border: 1px solid var(--gold-line); border-radius: 50%; background: radial-gradient(circle at 42% 37%,rgba(239,209,142,.14),rgba(215,170,85,.035) 60%,transparent 62%); }
.daily-seal::before { content: ""; position: absolute; inset: 7px; border: 1px solid rgba(239,209,142,.22); border-radius: 50%; }
.daily-seal i { width: 17px; height: 17px; border: 2px solid var(--gold-light); transform: rotate(45deg); }
.daily-seal b { position: absolute; right: -2px; bottom: -3px; width: 17px; height: 17px; display: grid; place-items: center; border: 2px solid #171817; border-radius: 50%; background: var(--green); opacity: 0; transform: scale(.65); transition: opacity .25s, transform .32s var(--ease-out); }
.daily-seal b::before { content: ""; width: 7px; height: 4px; border-bottom: 2px solid #101411; border-left: 2px solid #101411; transform: translateY(-1px) rotate(-45deg); }
.daily-panel.is-reward-ready .daily-seal { animation: dailySealReady 2.6s ease-in-out infinite; }
.daily-panel.is-complete .daily-seal b { opacity: 1; transform: scale(1); }
@keyframes dailySealReady { 50% { border-color: var(--gold); box-shadow: 0 0 0 7px rgba(215,170,85,.025), 0 0 25px rgba(215,170,85,.1); } }
.daily-description { max-width: 500px; margin: 11px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.daily-summary { min-height: 62px; margin-top: 18px; display: grid; grid-template-columns: repeat(3,1fr); border: 1px solid var(--line); background: rgba(0,0,0,.08); }
.daily-summary > div { min-width: 0; padding: 11px 14px; display: grid; align-content: center; gap: 5px; }
.daily-summary > div + div { border-left: 1px solid var(--line); }
.daily-summary span { color: var(--quiet); font-size: 7px; letter-spacing: .1em; text-transform: uppercase; }
.daily-summary b { color: var(--paper); font-size: 12px; font-weight: 630; font-variant-numeric: tabular-nums; }
.daily-summary b i { color: var(--gold-light); font-style: normal; }
.daily-tasks { margin-top: 9px; display: grid; gap: 7px; }
.daily-task { min-height: 82px; padding: 12px; display: grid; grid-template-columns: 45px minmax(0,1fr) auto; align-items: center; gap: 13px; border: 1px solid var(--line); background: rgba(255,255,255,.015); transition: border-color .25s, background .25s; }
.daily-task-icon { width: 45px; height: 45px; display: grid; place-items: center; border: 1px solid var(--line); background: #111211; color: var(--steel); transition: color .25s, border-color .25s, background .25s; }
.daily-task-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.45; stroke-linecap: round; stroke-linejoin: round; }
.daily-task-copy { min-width: 0; }
.daily-task-copy > span { color: var(--gold); font-size: 6px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.daily-task-copy h3 { margin: 4px 0 0; font-size: 13px; font-weight: 620; }
.daily-task-copy p { margin: 4px 0 0; color: var(--muted); font-size: 8px; line-height: 1.4; }
.daily-task-copy > em { height: 3px; margin-top: 9px; display: block; overflow: hidden; background: rgba(255,255,255,.07); }
.daily-task-copy > em i { display: block; width: 0; height: 100%; background: linear-gradient(90deg,#8c6935,var(--gold-light)); transition: width .45s var(--ease-out); }
.daily-task-count { min-width: 72px; display: grid; justify-items: end; gap: 5px; }
.daily-task-count b { font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; }
.daily-task-count small { color: var(--quiet); font-size: 6px; letter-spacing: .06em; text-transform: uppercase; }
.daily-task.is-complete { border-color: rgba(127,193,153,.2); background: linear-gradient(90deg,rgba(127,193,153,.04),transparent 60%); }
.daily-task.is-complete .daily-task-icon { border-color: rgba(127,193,153,.28); background: rgba(127,193,153,.045); color: var(--green); }
.daily-task.is-complete .daily-task-copy > em i { background: var(--green); }
.daily-task.is-complete .daily-task-count b { color: var(--green); }
.daily-task.is-complete .daily-task-count small { color: var(--green); }
.daily-chest { min-height: 82px; margin-top: 10px; padding: 12px; display: grid; grid-template-columns: 48px minmax(0,1fr) auto; align-items: center; gap: 14px; border: 1px solid var(--line); background: linear-gradient(120deg,rgba(215,170,85,.04),transparent 65%); transition: border-color .3s, background .3s; }
.daily-chest-mark { position: relative; width: 48px; height: 42px; border: 1px solid rgba(215,170,85,.25); background: linear-gradient(180deg,#373024 0 37%,#1c1b18 38%); }
.daily-chest-mark::before { content: ""; position: absolute; left: 20px; top: 12px; width: 7px; height: 13px; border: 1px solid var(--gold); background: #171714; }
.daily-chest-mark::after { content: ""; position: absolute; inset: 5px 7px; border-right: 1px solid rgba(239,209,142,.18); border-left: 1px solid rgba(239,209,142,.18); }
.daily-chest > div:nth-child(2) { min-width: 0; }
.daily-chest span { color: var(--gold); font-size: 7px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.daily-chest h3 { margin: 5px 0 0; font-size: 15px; font-weight: 640; }
.daily-chest p { margin: 4px 0 0; color: var(--muted); font-size: 8px; line-height: 1.4; }
.daily-chest .primary-action { min-width: 132px; min-height: 42px; padding-inline: 13px; }
.daily-chest.is-ready { border-color: rgba(215,170,85,.35); background: linear-gradient(120deg,rgba(215,170,85,.09),transparent 68%); }
.daily-chest.is-claimed { border-color: rgba(127,193,153,.2); background: rgba(127,193,153,.025); }
.daily-chest.is-claimed .daily-chest-mark { border-color: rgba(127,193,153,.28); filter: saturate(.55); }
.daily-status { min-height: 14px; margin: 10px 0 0; color: var(--muted); font-size: 8px; line-height: 1.5; }
.daily-status.is-error { color: #e5a28c; }

.modal-layer {
  position: absolute;
  z-index: 60;
  inset: 0;
  padding: 20px;
  display: grid;
  place-items: center;
  background: rgba(7,8,8,.72);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s, visibility 0s .25s;
}
.modal-layer.is-open { opacity: 1; visibility: visible; transition-delay: 0s; }
.offline-card { width: min(420px,100%); padding: 30px; border: 1px solid var(--line); background: var(--surface-solid); box-shadow: var(--shadow); text-align: center; }
.offline-emblem { width: 68px; height: 68px; margin: 0 auto 18px; display: grid; place-items: center; border: 1px solid var(--gold-line); border-radius: 50%; }
.offline-emblem i { width: 27px; height: 27px; border: 3px solid var(--steel); border-radius: 50%; position: relative; }
.offline-emblem i::before { content: ""; position: absolute; left: 50%; top: 3px; width: 1px; height: 10px; background: var(--gold); transform-origin: bottom; rotate: 35deg; }
.offline-card h2 { margin: 8px 0 0; font-size: 30px; font-weight: 580; letter-spacing: -.04em; }
.offline-card > p { margin: 9px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.offline-resources { margin: 20px 0; display: grid; grid-template-columns: repeat(4,1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.offline-resources div { padding: 13px 5px; display: grid; gap: 4px; }
.offline-resources div + div { border-left: 1px solid var(--line); }
.offline-resources b { font-size: 15px; font-weight: 650; }
.offline-resources span { color: var(--quiet); font-size: 7px; letter-spacing: .08em; text-transform: uppercase; }
.offline-card .primary-action { width: 100%; }
.account-card { position: relative; width: min(420px,100%); padding: 30px; border: 1px solid var(--line); background: var(--surface-solid); box-shadow: var(--shadow); text-align: center; }
.account-card .sheet-close { top: 17px; right: 17px; }
.account-emblem { width: 68px; height: 68px; margin: 0 auto 18px; display: grid; place-items: center; border: 1px solid var(--gold-line); border-radius: 50%; background: rgba(215,170,85,.035); }
.account-emblem svg { width: 34px; fill: none; stroke: var(--gold-light); stroke-width: 1.35; stroke-linecap: round; stroke-linejoin: round; }
.account-card h2 { margin: 8px 0 0; font-size: 28px; font-weight: 580; letter-spacing: -.04em; }
.account-card > p { margin: 9px auto 0; max-width: 320px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.account-card .primary-action, .account-card .secondary-action { width: 100%; }
.account-card .secondary-action { margin-top: 8px; }
.account-card > small { display: block; margin-top: 13px; color: var(--quiet); font-size: 8px; line-height: 1.5; }
.sync-state { margin: 20px 0; padding: 12px 14px; display: flex; align-items: center; justify-content: center; gap: 9px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 9px; }
.sync-state i { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.sync-state.is-synced i { background: var(--green); }
.sync-state.is-offline i { background: var(--red); }

.toast {
  position: absolute;
  z-index: 80;
  left: 50%;
  top: 96px;
  min-width: 220px;
  max-width: min(420px, calc(100vw - 28px));
  padding: 11px 15px;
  border: 1px solid var(--line);
  background: rgba(18,19,18,.95);
  box-shadow: 0 14px 42px rgba(0,0,0,.35);
  color: var(--paper);
  text-align: center;
  font-size: 10px;
  line-height: 1.4;
  opacity: 0;
  transform: translate(-50%,-9px);
  pointer-events: none;
  transition: opacity .2s, transform .3s var(--ease-out);
}
.toast.is-showing { opacity: 1; transform: translate(-50%,0); }

button:focus-visible, a:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; }

@media (max-width: 1120px) {
  .topbar { grid-template-columns: 180px 150px 1fr auto; gap: 12px; }
  .brand span { display: none; }
  .resources { gap: 4px; }
  .resource { min-width: 58px; padding: 0 8px; }
  .orders-panel { width: 290px; }
  .path-panel { width: 290px; }
}

@media (max-width: 820px) {
  .topbar {
    height: max(67px, calc(53px + env(safe-area-inset-top)));
    padding: max(9px,env(safe-area-inset-top)) 12px 8px;
    grid-template-columns: auto 1fr 38px;
    gap: 8px;
  }
  .brand img { width: 91px; }
  .city-level { display: none; }
  .resources { justify-self: end; gap: 3px; }
  .resource { min-width: 52px; height: 35px; padding: 0 7px; gap: 6px; }
  .resource > b { font-size: 11px; }
  .resource > i { width: 14px; height: 14px; }
  .compact-hide { display: none; }
  .round-button { width: 36px; height: 36px; }
  .sync-button { width: 36px; height: 36px; padding: 0; justify-content: center; }
  .sync-button span { display: none; }
  .sync-button > i { position: absolute; margin: 23px 0 0 22px; width: 5px; height: 5px; }

  .path-panel {
    top: max(76px, calc(62px + env(safe-area-inset-top)));
    left: 12px;
    width: calc(100vw - 24px);
    padding: 11px 13px 10px;
    background: rgba(17,18,17,.86);
  }
  .path-panel .panel-kicker, .path-head p, .path-panel .text-button { display: none; }
  .path-head { margin: 0; align-items: center; }
  .path-head h2 { font-size: 12px; }
  .path-track { margin-top: 9px; }

  .orders-panel {
    top: auto;
    right: 10px;
    bottom: calc(86px + env(safe-area-inset-bottom));
    left: 10px;
    width: auto;
    max-height: calc(100dvh - 115px);
    overflow-y: auto;
    padding: 18px;
    transform: translateY(20px);
  }
  .orders-panel.is-hidden { transform: translateY(20px); }
  .order-art { height: 82px; }
  .order-token { width: 54px; height: 54px; }
  .order-copy { padding: 12px 0 10px; }

  .camera-help { display: none; }
  .game-nav {
    left: 10px;
    right: 10px;
    bottom: max(8px, env(safe-area-inset-bottom));
    width: auto;
    height: 64px;
    translate: 0;
    justify-content: space-between;
  }
  .nav-item { flex: 1; min-width: 0; padding: 5px 3px; }
  .nav-build { min-width: 0; }
  .nav-item > span { font-size: 7px; }
  .nav-item > small { display: none; }
  .nav-item > em { right: 20%; }

  .building-panel,
  .build-panel,
  .market-panel,
  .artel-panel,
  .daily-panel {
    left: 8px;
    right: 8px;
    bottom: calc(80px + env(safe-area-inset-bottom));
    width: auto;
    max-height: calc(100dvh - 96px);
    overflow-y: auto;
    padding: 19px;
    transform: translateY(28px);
  }
  .building-panel.is-open, .build-panel.is-open { transform: none; }
  .market-panel { top: max(76px, calc(62px + env(safe-area-inset-top))); transform: translateY(28px); }
  .market-panel.is-open { transform: none; }
  .artel-panel { top: max(76px, calc(62px + env(safe-area-inset-top))); transform: translateY(28px); }
  .artel-panel.is-open { transform: none; }
  .daily-panel { top: max(76px, calc(62px + env(safe-area-inset-top))); transform: translateY(28px); }
  .daily-panel.is-open { transform: none; }
  .daily-head { grid-template-columns: 50px 1fr 44px; }
  .daily-head .sheet-close { width: 44px; height: 44px; }
  .market-head .sheet-close { flex-basis: 44px; width: 44px; height: 44px; }
  .daily-chest .primary-action { min-height: 44px; }
  .market-head h2 { font-size: 23px; }
  .caravan-stage { height: 92px; }
  .caravan-runner { left: 69px; top: 42px; }
  .caravan-route { left: 58px; right: 58px; top: 61px; }
  .caravan-stage::before, .caravan-stage::after { bottom: 16px; transform: scale(.82); }
  .caravan-stage::before { transform-origin: left bottom; }
  .caravan-stage::after { transform-origin: right bottom; }
  .market-offers { grid-template-columns: 1fr; }
  .market-offer { grid-template-columns: 1fr auto; column-gap: 14px; }
  .offer-route, .market-offer h3, .market-offer > p, .offer-exchange { grid-column: 1 / -1; }
  .market-offer h3, .market-offer > p { min-height: 0; }
  .offer-reward { grid-column: 1; margin-bottom: 0; }
  .market-offer .primary-action { grid-column: 2; align-self: end; min-width: 122px; }
  .market-offer .primary-action { min-height: 44px; }
  .expedition-head { align-items: start; }
  .expedition-head > p { max-width: 240px; text-align: left; }
  .expedition-routes { grid-template-columns: 1fr; }
  .expedition-route { min-height: 178px; }
  .expedition-route .secondary-action { min-height: 44px; }
  .expedition-return .primary-action { min-height: 44px; }
  .artel-onboarding { grid-template-columns: 1fr; }
  .artel-entry { min-height: 226px; }
  .artel-identity { grid-template-columns: 1fr 1fr; }
  .artel-identity > div:nth-child(2) { border-left: 1px solid var(--line); }
  .artel-identity > .artel-invite { grid-column: 1 / -1; border-top: 1px solid var(--line); border-left: 0; }
  .artel-contribution { grid-template-columns: 1.3fr .7fr; }
  .artel-contribution-result { grid-column: 1; }
  .artel-contribution .primary-action { grid-column: 2; }
  .daily-task { grid-template-columns: 42px minmax(0,1fr) auto; }
  .daily-task-icon { width: 42px; height: 42px; }
  .building-head h2 { font-size: 22px; }
  .building-actions:has(.secondary-action:not([hidden])) { grid-template-columns: 1fr 1fr; }

  .world-label b { padding: 4px 6px; font-size: 7px; }
  .world-label span { width: 50px; }

  .toast { top: max(78px, calc(64px + env(safe-area-inset-top))); }
}

@media (max-width: 390px) {
  .topbar { padding-left: 8px; padding-right: 8px; gap: 5px; }
  .brand img { width: 74px; }
  .resource { min-width: 44px; padding: 0 4px; gap: 3px; }
  .resource > b { font-size: 10px; }
  .resource > i { scale: .88; }
  .round-button, .sync-button { width: 31px; height: 31px; }
  .top-actions { gap: 3px; }
  .game-nav { left: 6px; right: 6px; }
  .nav-item svg { width: 16px; height: 16px; }
  .nav-build > i { width: 21px; height: 21px; }
  .building-panel, .build-panel, .market-panel, .artel-panel, .daily-panel { left: 6px; right: 6px; padding: 17px; }
  .artel-head { grid-template-columns: 40px 1fr 40px; gap: 9px; }
  .artel-seal { width: 40px; height: 40px; }
  .artel-project { padding: 15px; }
  .artel-project-head h3 { font-size: 17px; }
  .artel-reward { align-items: stretch; }
  .artel-reward .primary-action { min-width: 108px; }
  .daily-head { grid-template-columns: 40px 1fr 44px; gap: 9px; }
  .daily-seal { width: 40px; height: 40px; }
  .daily-head h2 { font-size: 23px; }
  .daily-description { margin-top: 8px; }
  .daily-summary > div { padding-inline: 8px; }
  .daily-summary span { font-size: 6px; }
  .daily-summary b { font-size: 10px; }
  .daily-task { min-height: 76px; padding: 10px; grid-template-columns: 37px minmax(0,1fr) auto; gap: 9px; }
  .daily-task-icon { width: 37px; height: 37px; }
  .daily-task-copy p { display: none; }
  .daily-task-count { min-width: 57px; }
  .daily-task-count b { font-size: 10px; }
  .daily-chest { grid-template-columns: 42px minmax(0,1fr); gap: 10px; }
  .daily-chest-mark { width: 42px; }
  .daily-chest .primary-action { grid-column: 1 / -1; width: 100%; }
  .expedition-head { display: grid; gap: 8px; }
  .expedition-route { min-height: 166px; padding: 13px; }
  .expedition-route p { min-height: 0; }
  .expedition-active { padding: 14px; }
  .expedition-active-head h4 { font-size: 16px; }
  .expedition-track { height: 78px; }
  .expedition-line { top: 40px; }
  .expedition-city { top: 29px; min-width: 61px; padding-inline: 5px; }
  .expedition-runner { top: 27px; }
  .expedition-return { align-items: stretch; display: grid; }
  .expedition-return .primary-action { width: 100%; }
  .building-stats div + div { padding-left: 8px; }
  .build-option { grid-template-columns: 40px 1fr auto; padding: 8px; gap: 8px; }
  .build-option > span small { font-size: 8px; }
  .build-option > em { font-size: 8px; }
}

@media (max-height: 680px) and (min-width: 821px) {
  .path-panel, .orders-panel { top: 90px; }
  .order-art { height: 70px; }
  .order-token { width: 48px; height: 48px; }
  .order-copy { padding: 10px 0; }
  .order-copy p, .order-refresh { display: none; }
  .order-requirement { padding: 10px 0; }
  .order-reward div { padding: 9px 0; }
  .game-nav { bottom: 10px; }
}

@media (max-height: 760px) and (min-width: 821px) {
  .market-panel, .artel-panel, .daily-panel { top: 86px; bottom: 84px; padding: 18px; }
  .market-head h2 { font-size: 24px; }
  .market-description { margin-top: 6px; }
  .caravan-stage { height: 72px; margin-top: 12px; }
  .caravan-stage::before, .caravan-stage::after { bottom: 10px; scale: .75; }
  .caravan-stage::before { transform-origin: left bottom; }
  .caravan-stage::after { transform-origin: right bottom; }
  .route-city { top: 8px; }
  .caravan-route { top: 47px; }
  .caravan-runner { top: 28px; }
  .market-cycle { min-height: 43px; padding-top: 7px; padding-bottom: 7px; }
  .market-offers { margin-top: 10px; }
  .market-offer { padding: 11px; }
  .market-offer > p { display: none; }
  .market-offer h3 { min-height: 34px; }
  .offer-exchange { margin-top: 8px; padding-top: 8px; }
  .offer-reward { margin: 8px 0 10px; }
  .market-note { margin-top: 8px; }
  .expedition-board { margin-top: 14px; padding-top: 13px; }
  .expedition-route { min-height: 154px; }
  .expedition-route p { display: none; }
  .daily-summary { margin-top: 12px; min-height: 54px; }
  .daily-task { min-height: 70px; padding-block: 9px; }
  .daily-task-copy p { display: none; }
  .daily-chest { min-height: 72px; }
}

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