/* src/ui/styles.css */
:root {
  --navy: #101d2e;
  --navy-2: #16283e;
  --ivory: #fff4db;
  --mint: #68e1c2;
  --brass: #e9b859;
  --vermilion: #e14d38;
  --panel: rgba(16, 29, 46, 0.92);
  --panel-edge: rgba(233, 184, 89, 0.45);
  font-family:
    "DM Sans",
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
}
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: var(--navy);
}
#scene-container {
  position: fixed;
  inset: 0;
}
#scene-container canvas {
  display: block;
  touch-action: none;
}
.hidden {
  display: none !important;
}
.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(
      180deg,
      rgba(16, 29, 46, 0.25),
      rgba(16, 29, 46, 0.72));
  z-index: 30;
  padding: 16px;
}
.entry-card {
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: 20px;
  padding: 28px 30px;
  max-width: 430px;
  width: 100%;
  text-align: center;
  color: var(--ivory);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.5);
}
.entry-kicker {
  letter-spacing: 0.32em;
  font-size: 11px;
  color: var(--mint);
  font-weight: 700;
}
.entry-card h1 {
  font-family:
    "Barlow Condensed",
    "Arial Narrow",
    sans-serif;
  font-weight: 700;
  font-size: 52px;
  line-height: 0.95;
  margin: 10px 0 8px;
  color: var(--ivory);
}
.tagline {
  color: rgba(255, 244, 219, 0.75);
  font-size: 14px;
  margin: 0 0 20px;
}
.entry-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.credits {
  margin: 18px 0 0;
  font-size: 11px;
  color: rgba(255, 244, 219, 0.45);
}
.btn {
  font-family: inherit;
  font-weight: 700;
  font-size: 14px;
  color: var(--ivory);
  background: var(--navy-2);
  border: 1px solid rgba(255, 244, 219, 0.25);
  border-radius: 12px;
  padding: 10px 16px;
  cursor: pointer;
  min-height: 44px;
}
.btn:active {
  transform: translateY(1px);
}
.btn.primary {
  background: var(--mint);
  color: var(--navy);
  border-color: transparent;
}
.btn.gold {
  background: var(--brass);
  color: var(--navy);
  border-color: transparent;
}
.btn.danger {
  background: transparent;
  color: #ff9a8a;
  border-color: rgba(225, 77, 56, 0.6);
}
.btn.ghost {
  background: transparent;
  border-color: rgba(255, 244, 219, 0.2);
  color: rgba(255, 244, 219, 0.8);
}
.btn.big {
  font-size: 16px;
  padding: 13px 18px;
  border-radius: 14px;
}
.btn.small {
  min-height: 38px;
  padding: 7px 12px;
  font-size: 13px;
}
.btn:disabled {
  opacity: 0.38;
  cursor: default;
}
#hud {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
}
#hud button {
  pointer-events: auto;
}
#statusbar {
  position: absolute;
  top: calc(8px + env(safe-area-inset-top));
  left: 10px;
  right: 10px;
  display: flex;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}
.park-chip,
.token-chip,
.timer-chip,
.chip-btn {
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: 999px;
  color: var(--ivory);
  padding: 7px 14px;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  gap: 7px;
  align-items: center;
  white-space: nowrap;
}
.park-chip {
  font-family:
    "Barlow Condensed",
    "Arial Narrow",
    sans-serif;
  font-size: 17px;
  letter-spacing: 0.04em;
}
.token-chip .star {
  color: var(--brass);
  font-size: 16px;
}
.token-chip .tok-label {
  color: rgba(255, 244, 219, 0.6);
  font-weight: 500;
  font-size: 12px;
}
.timer-chip {
  color: var(--mint);
  font-variant-numeric: tabular-nums;
}
.timer-chip .timer-label {
  color: rgba(255, 244, 219, 0.6);
  font-size: 11px;
  font-weight: 500;
}
.chip-btn {
  cursor: pointer;
  font-family: inherit;
  margin-left: auto;
}
#tutorial {
  position: absolute;
  top: calc(58px + env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  background: var(--panel);
  border: 1px solid var(--mint);
  border-radius: 14px;
  color: var(--ivory);
  padding: 10px 14px;
  display: flex;
  gap: 12px;
  align-items: center;
  max-width: min(92vw, 560px);
  pointer-events: auto;
  font-size: 14px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}
#tutorial-text {
  line-height: 1.35;
}
.sheet {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(86px + env(safe-area-inset-bottom));
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: 16px;
  color: var(--ivory);
  padding: 12px 14px;
  width: min(94vw, 520px);
  pointer-events: auto;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.45);
}
.sheet-title {
  font-family:
    "Barlow Condensed",
    "Arial Narrow",
    sans-serif;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.sheet-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  margin-top: 4px;
}
.sheet-row.dim {
  color: rgba(255, 244, 219, 0.65);
}
#build-cost {
  color: var(--brass);
  font-weight: 700;
}
#build-msg {
  color: var(--mint);
}
#build-msg.bad {
  color: #ff9a8a;
}
.sheet-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.sheet-actions .btn {
  flex: 1 1 auto;
}
#dock {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(10px + env(safe-area-inset-bottom));
  display: flex;
  gap: 4px;
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: 18px;
  padding: 6px;
  pointer-events: auto;
  max-width: 96vw;
}
.dock-btn {
  font-family: inherit;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--ivory);
  font-size: 11px;
  font-weight: 700;
  padding: 7px 10px 5px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 60px;
}
.dock-btn .dock-ico {
  font-size: 19px;
  line-height: 1;
}
.dock-btn.active {
  background: rgba(104, 225, 194, 0.16);
  border-color: var(--mint);
}
.dock-btn.locked {
  opacity: 0.45;
}
#midway-menu {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(84px + env(safe-area-inset-bottom));
  display: flex;
  gap: 8px;
  pointer-events: auto;
}
#toasts {
  position: absolute;
  right: 12px;
  bottom: calc(96px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}
.toast {
  background: var(--panel);
  border: 1px solid var(--brass);
  color: var(--ivory);
  border-radius: 12px;
  padding: 9px 13px;
  font-size: 13px;
  font-weight: 600;
  animation: toast-in 0.25s ease-out;
  max-width: 300px;
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
  }
}
#showcase-bar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 25;
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: 14px;
  color: var(--ivory);
  padding: 10px 14px;
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 13px;
  max-width: 94vw;
}
.sheet.wide {
  width: min(96vw, 660px);
}
#editor-cost,
#rail-editor-cost {
  color: var(--brass);
  font-weight: 700;
}
#editor-status.bad,
#rail-editor-status.bad {
  color: #ff9a8a;
}
#editor-status,
#rail-editor-status {
  color: var(--mint);
}
.segrow {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}
.segbtn {
  font-family: inherit;
  font-weight: 700;
  font-size: 12px;
  color: var(--ivory);
  background: var(--navy-2);
  border: 1px solid rgba(255, 244, 219, 0.25);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  flex: 1 1 auto;
  min-height: 38px;
}
.segbtn.active {
  background: var(--mint);
  color: var(--navy);
  border-color: transparent;
}
.dock-btn.lr {
  color: #b8f4e6;
}
.dock-btn.lr.active {
  background: rgba(104, 225, 194, 0.22);
}
.rating-chip {
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: 999px;
  color: var(--ivory);
  padding: 7px 14px;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  white-space: nowrap;
}
.rating-chip .star {
  color: var(--brass);
  font-size: 15px;
}
#rating {
  color: var(--brass);
  font-variant-numeric: tabular-nums;
}
.scrollbox {
  max-height: 46vh;
  overflow-y: auto;
  margin-top: 8px;
  padding-right: 2px;
}
.mission-row {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid rgba(255, 244, 219, 0.14);
  border-radius: 12px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.03);
}
.mission-row.claimable {
  border-color: var(--brass);
  background: rgba(233, 184, 89, 0.10);
}
.mission-row.claimed {
  opacity: 0.55;
}
.mission-main {
  flex: 1 1 auto;
  min-width: 0;
}
.mission-title {
  font-weight: 700;
  font-size: 14px;
}
.mission-blurb {
  font-size: 12px;
  color: rgba(255, 244, 219, 0.65);
  margin-top: 1px;
}
.mission-bar {
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.12);
  margin-top: 6px;
  overflow: hidden;
}
.mission-fill {
  height: 100%;
  background: var(--mint);
  border-radius: 3px;
}
.mission-row.claimable .mission-fill {
  background: var(--brass);
}
.mission-prog {
  font-size: 11px;
  color: rgba(255, 244, 219, 0.55);
  margin-top: 3px;
}
.mission-reward {
  font-weight: 700;
  color: var(--brass);
  font-size: 13px;
  white-space: nowrap;
}
.fin-head {
  font-family:
    "Barlow Condensed",
    "Arial Narrow",
    sans-serif;
  font-size: 18px;
  font-weight: 600;
  margin: 10px 0 4px;
}
.fin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.fin-table th {
  text-align: left;
  color: rgba(255, 244, 219, 0.55);
  font-weight: 600;
  padding: 3px 6px;
  border-bottom: 1px solid rgba(255, 244, 219, 0.18);
}
.fin-table td {
  padding: 3px 6px;
  border-bottom: 1px solid rgba(255, 244, 219, 0.07);
  font-variant-numeric: tabular-nums;
}
.fin-table td.fin-in {
  color: var(--mint);
}
.fin-table td.fin-out {
  color: #ff9a8a;
}
.fin-table tr.fin-total td {
  font-weight: 700;
  border-top: 1px solid rgba(233, 184, 89, 0.5);
  border-bottom: none;
}
.fin-table td.dim {
  color: rgba(255, 244, 219, 0.45);
}
#play-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 18, 30, 0.55);
  padding: 16px;
  pointer-events: auto;
}
.play-card {
  background: var(--panel);
  border: 1px solid var(--brass);
  border-radius: 18px;
  padding: 18px;
  width: min(92vw, 460px);
  color: var(--ivory);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
}
#play-track {
  position: relative;
  height: 34px;
  border-radius: 10px;
  margin: 14px 0 8px;
  background:
    linear-gradient(
      90deg,
      #27435f,
      #1b3049);
  border: 1px solid rgba(255, 244, 219, 0.25);
  overflow: hidden;
}
#play-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  background: rgba(233, 184, 89, 0.45);
  border-left: 1px solid var(--brass);
  border-right: 1px solid var(--brass);
}
#play-marker {
  position: absolute;
  top: 3px;
  bottom: 3px;
  width: 6px;
  margin-left: -3px;
  background: var(--ivory);
  border-radius: 3px;
  box-shadow: 0 0 8px rgba(255, 244, 219, 0.8);
}
@media (max-width: 560px) {
  .entry-card h1 {
    font-size: 40px;
  }
  .park-chip {
    display: none;
  }
  .dock-btn {
    min-width: 52px;
    padding: 6px 6px 4px;
  }
}
.osp-overlay {
  z-index: 45;
  overflow-y: auto;
}
.osp-card {
  text-align: left;
  max-height: 92vh;
  overflow-y: auto;
}
.osp-card.wide {
  max-width: 560px;
}
.osp-h {
  font-family:
    "Barlow Condensed",
    "Arial Narrow",
    sans-serif;
  font-weight: 700;
  font-size: 34px;
  line-height: 1;
  margin: 8px 0 8px;
  color: var(--ivory);
}
.osp-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 244, 219, 0.7);
  margin: 12px 0 10px;
}
.osp-input {
  display: block;
  width: 100%;
  margin-top: 5px;
  font-family: inherit;
  font-size: 15px;
  color: var(--ivory);
  background: var(--navy-2);
  border: 1px solid rgba(255, 244, 219, 0.3);
  border-radius: 10px;
  padding: 10px 12px;
  min-height: 44px;
}
.osp-input::placeholder {
  color: rgba(255, 244, 219, 0.35);
}
.osp-char-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 6px;
}
.osp-char {
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  color: var(--ivory);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 244, 219, 0.18);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.osp-char.selected {
  border-color: var(--brass);
  background: rgba(233, 184, 89, 0.12);
}
.osp-dots {
  display: flex;
  gap: 5px;
}
.osp-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.45);
  display: inline-block;
}
.osp-char-name {
  font-weight: 700;
  font-size: 15px;
}
.osp-char-look {
  font-size: 11px;
  color: rgba(255, 244, 219, 0.6);
  line-height: 1.3;
}
.osp-pack-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 6px;
}
.osp-pack {
  position: relative;
  color: var(--ivory);
  text-align: left;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 244, 219, 0.18);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.osp-badge {
  position: absolute;
  top: -8px;
  right: 10px;
  background: var(--brass);
  color: var(--navy);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
}
.osp-pack-coins {
  font-weight: 800;
  font-size: 19px;
  color: var(--brass);
}
.osp-pack-price {
  font-weight: 700;
  font-size: 15px;
}
.osp-pack-per {
  font-size: 11px;
  color: rgba(255, 244, 219, 0.6);
}
.osp-pack-bonus {
  font-size: 11px;
  color: var(--brass);
}
.osp-pack .btn {
  margin-top: 8px;
  align-self: flex-start;
}
.osp-bonus-banner {
  background: rgba(233, 184, 89, 0.14);
  border: 1px solid var(--brass);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
  margin: 10px 0 4px;
}
.osp-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 244, 219, 0.08);
  font-size: 13px;
}
.osp-row .btn {
  flex: 0 0 auto;
}
.osp-dim {
  color: rgba(255, 244, 219, 0.55);
  font-size: 12px;
}
.osp-amt {
  font-weight: 700;
  color: var(--brass);
  white-space: nowrap;
}
#visit-bar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 25;
  background: var(--panel);
  border: 1px solid var(--brass);
  border-radius: 14px;
  color: var(--ivory);
  padding: 10px 14px;
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 13px;
  max-width: 94vw;
  flex-wrap: wrap;
  justify-content: center;
}
#visit-bar .visit-balance {
  color: var(--brass);
  font-weight: 700;
  white-space: nowrap;
}
.osp-panel {
  position: fixed;
  z-index: 24;
}
#visit-panel {
  left: auto;
  right: 12px;
  top: 64px;
  bottom: auto;
  transform: none;
  width: min(88vw, 300px);
  max-height: calc(100vh - 170px);
  overflow-y: auto;
}
#grand-tour-card {
  left: 12px;
  right: auto;
  top: 64px;
  bottom: auto;
  transform: none;
  width: min(80vw, 250px);
  max-height: calc(100vh - 170px);
  overflow-y: auto;
}
#grand-tour-card.complete {
  border-color: var(--brass);
  box-shadow: 0 0 18px rgba(233, 184, 89, 0.35);
}
.gt-leg {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 13px;
  color: rgba(255, 244, 219, 0.55);
}
.gt-leg .gt-mark {
  flex: 0 0 auto;
  width: 16px;
  text-align: center;
}
.gt-leg.done {
  color: var(--ivory);
}
.gt-leg.done .gt-mark {
  color: var(--brass);
  font-weight: 800;
}
body.visiting #dock,
body.visiting #tutorial,
body.visiting #btn-ride,
body.visiting #btn-motion,
body.visiting #btn-account-hud,
body.visiting #timer-chip,
body.visiting #rating-chip,
body.visiting .park-chip {
  display: none !important;
}
