/* Visual-only console skin. Remove its link in index.html to disable it. */
:root { --panel-edge: #29354a; --panel: #0e1523; --muted: #a3aec2; }
body { background-image: url('assets/temporal-routes.svg'); background-position: center top; background-size: 1600px 1000px; background-repeat: repeat-y; }
body::before { opacity: .3; background-size: 80px 80px; mask-image: linear-gradient(90deg,black,transparent 35%,transparent 65%,black); }
.space-glow { display: none; }
.app-shell { border-inline: 1px solid #182233; }
.topbar { border-bottom-color: #344155; }
.brand { letter-spacing: .17em; }
.brand-mark { position: relative; transform: none; gap: 3px; }
.brand-mark i { border-radius: 0; box-shadow: none !important; }
.brand-mark i:nth-child(2) { transform: translate(4px,-4px); }
.brand-mark::after { content: ''; position: absolute; width: 9px; height: 1px; background: var(--cyan); left: 8px; top: 7px; transform: rotate(-45deg); }
.top-status { letter-spacing: .06em; }
.panel { border-radius: 2px; background: #0d1422; box-shadow: none; border-top: 2px solid #35455c; }
.section-heading h2, .history-heading h2 { letter-spacing: -.025em; }
.eyebrow { color: #9cabc3; letter-spacing: .16em; }
.timeline-card, .mini-piece-box, .preview-slot, .preview-body > canvas, .modal-timeline, .modal-checkpoint { border-radius: 2px; }
.timeline-card { background: #101b2a; }
.timeline-card.selected { background: #122a32; box-shadow: inset 3px 0 var(--cyan); }
.timeline-card:hover { transform: none; }
.board-frame { border-radius: 2px; background: #121d2e; border-color: #526982; box-shadow: 0 14px 45px #0006; }
.board-frame::before, .board-frame::after { content: ''; position: absolute; width: 15px; height: 15px; pointer-events: none; border-color: var(--cyan); border-style: solid; }
.board-frame::before { left: -2px; top: -2px; border-width: 2px 0 0 2px; }
.board-frame::after { right: -2px; bottom: -2px; border-width: 0 2px 2px 0; }
.board-stats > div:first-child { border-radius: 2px; background: #101a29; border-color: #34445b; }
.board-stats strong { text-shadow: none; }
.jump-card { border: 0; border-top: 1px solid #2c394d; border-radius: 0; background: transparent; padding-inline: 0; }
.jump-icon { border-radius: 0; background: transparent; }
.jump-icon svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: square; stroke-linejoin: miter; }
.jump-button, .small-button, .help-button, .icon-button, .volume-control, .select-control, .map-zoom, .search-piece, .board-search, .start-howto { border-radius: 2px; box-shadow: none; }
.jump-button { height: 38px; font-family: var(--mono); font-size: 11px; }
.time-button { background: #24203b; border: 1px solid #756696; color: #e0d6ff; }
.multi-button { background: #142c32; border: 1px solid #487f86; color: #aff5ee; }
.jump-button:hover:not(:disabled) { filter: brightness(1.18); transform: none; }
.jump-button:active:not(:disabled), .start-button:active { transform: translateY(1px); box-shadow: inset 0 2px 7px #0005; }
.jump-button:disabled { background: #111925; border-color: #334054; color: #91a0b6; opacity: .65; }
.icon-button:hover { transform: none; }
kbd { border-radius: 2px; box-shadow: none; }
.travel-modal-card, .travel-preview { border-radius: 3px; background: #101929; }
.charge-track { border-radius: 0; }
.charge-fill { border-radius: 0; background: var(--cyan); }
.bottom-bar { font-family: var(--mono); }
:is(button, a, select, input):focus-visible { outline: 2px solid #b5fff5; outline-offset: 4px; }

/* Title composition: an operating console, not a floating feature card. */
.start-screen { background: #080e1b; backdrop-filter: none; padding: 32px; }
.start-card { width: min(1060px,100%); padding: 70px 54px 36px; border: 1px solid #34445b; border-radius: 0; background: linear-gradient(90deg,#101a2a,#0b1220); box-shadow: 0 24px 80px #0005; }
.start-card::before { width: 52px; height: 3px; top: -1px; left: -1px; right: auto; background: var(--cyan); opacity: 1; filter: none; border-radius: 0; }
.console-id { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; gap: 12px; padding: 14px 22px; border-bottom: 1px solid #29374c; color: #8e9fb7; font: 10px var(--mono); letter-spacing: .1em; }
.start-content { position: relative; width: 55%; z-index: 1; }
.start-brand { font-size: 10px; color: #b5c3d8; }
.start-eyebrow { margin: 28px 0 16px; font-size: 10px; }
.start-title { font-size: clamp(52px,7vw,86px); line-height: .88; font-weight: 700; letter-spacing: -.065em; }
.start-title > span { color: var(--cyan); background: none; padding-left: .22em; }
.start-title small { display: block; margin-top: 24px; font-size: 18px; line-height: 1.4; font-weight: 400; letter-spacing: -.02em; color: #e0e7f1; }
.start-copy { font-size: 13px; line-height: 1.7; max-width: 390px; margin: 12px 0 22px; }
.start-features { gap: 18px; margin-bottom: 24px; }
.start-feature { padding: 10px 0; border: 0; border-block: 1px solid #2b384c; border-radius: 0; background: none; gap: 9px; }
.start-feature-key { background: transparent !important; border: 1px solid #4c5870; border-radius: 0; flex-shrink: 0; }
.start-feature > .start-feature-key { display: grid; }
.start-feature strong { font-size: 12px; }
.start-feature div span { font-size: 10px; }
.start-button { border-radius: 0; background: #8ce6dc; border: 1px solid #b4fff2; box-shadow: none; font-family: var(--mono); }
.start-button:hover { background: #aff8ed; transform: none; box-shadow: none; }
.start-howto { background: transparent; border-color: #38485e; }
.start-footnote { justify-content: flex-start; font: 10px/1.7 var(--mono); color: #96a5bc; }
.title-orbit { position: absolute; right: 20px; top: 95px; width: 43%; color: #6ed6d0; }
.title-orbit svg { display: block; width: 100%; overflow: visible; }
.orbit-route { stroke: #4d657d; stroke-width: 1; }
.orbit-board { stroke: #67839b; stroke-width: 1; }
.orbit-block { fill: #6ed6d0; fill-opacity: .55; stroke: none; }
.orbit-board.secondary { opacity: .6; }
.title-orbit text { fill: #a1b0c7; stroke: none; font: 9px var(--mono); letter-spacing: 1px; }
.title-orbit p { text-align: center; color: #90a3bd; font: 9px var(--mono); letter-spacing: .14em; margin-top: 10px; }
@media (max-width: 750px) {
  .start-screen { padding: 16px; }
  .start-card { padding: 64px 25px 24px; max-width: 530px; }
  .start-content { width: 100%; }
  .title-orbit { display: none; }
  .console-id { padding-inline: 14px; font-size: 8px; }
  .start-title { font-size: clamp(56px,13vw,76px); }
  .start-copy { max-width: none; }
  .top-status { display: none; }
}
@media (max-width: 500px) {
  .topbar { height: auto; min-height: 86px; flex-wrap: wrap; padding-block: 10px; gap: 10px; }
  .top-actions { width: 100%; justify-content: space-between; }
  .help-button { white-space: nowrap; }
  #game-canvas { width: min(64vw, calc(100vw - 134px)); }
  .mini-piece-box canvas { max-width: 100%; }
  .controls-panel { grid-template-columns: 1fr; }
  .control-footnote { overflow-wrap: anywhere; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Second pass: offset block-print details, fewer boxes, and a quieter frame.
   The warm registration marks belong to the chrome, never the game pieces. */
:root { --paper: #ede8dc; --registration: #dcb577; }
.topbar { border-bottom: 3px solid var(--paper); }
.brand { color: var(--paper); font-weight: 700; letter-spacing: .04em; }
.brand-light { color: var(--registration); }
.top-status { text-transform: lowercase; letter-spacing: 0; }
.left-rail > .panel, .right-rail > .panel { border: 0; border-radius: 0; background: transparent; }
.left-rail > .panel { border-left: 1px solid #344154; }
.right-rail > .panel { border-top: 1px solid #344154; }
.section-heading h2, .history-heading h2 { color: var(--paper); font-size: 21px; font-weight: 600; letter-spacing: -.045em; }
.eyebrow { text-transform: lowercase; letter-spacing: .025em; font-size: 11px; color: var(--registration); }
.orbit-icon, .pulse-icon { display: none; }
.controls-panel { opacity: .86; }
.jump-icon { color: var(--paper); }
.board-title-line h1 { font-size: 38px; color: var(--paper); }
.board-stats > div:first-child { border: 0; border-left: 2px solid #45546a; background: none; }
.start-screen { background: #080e1b url('assets/temporal-routes.svg') center / cover; }
.start-card { overflow: visible; background: transparent; border: 0; box-shadow: none; padding-top: 80px; }
.start-card::before { width: 70px; height: 14px; background: var(--registration); left: 54px; top: 32px; box-shadow: 14px -14px 0 var(--registration); }
.console-id { border: 0; padding: 0 54px; top: -12px; font-family: var(--sans); font-size: 13px; letter-spacing: 0; color: #a7b4c5; }
.start-brand { display: none; }
.start-eyebrow { color: var(--registration); letter-spacing: .06em; }
.start-title { color: var(--paper); font-size: clamp(64px,8vw,108px); letter-spacing: -.075em; }
.start-title > span { display: inline-block; color: var(--paper); padding-left: .26em; text-shadow: 5px 5px 0 #080e1b, 7px 7px 0 #4b757b; }
.start-title small { font-size: 19px; letter-spacing: -.025em; margin-top: 30px; }
.start-features { border: 0; gap: 25px; }
.start-feature { border: 0; }
.start-feature-key { color: var(--registration) !important; border: 0; border-bottom: 3px solid var(--registration); }
.start-button { background: var(--paper); border-color: var(--paper); color: #111b28; }
.start-button:hover { background: #fff9ec; }
.start-howto { border: 0; text-align: left; padding-left: 0; text-decoration: underline; text-underline-offset: 5px; }
.title-orbit { top: 105px; right: -5px; transform: rotate(4deg); }
.orbit-board { stroke: var(--paper); }
.orbit-board.secondary { opacity: .78; }
.orbit-block { fill: var(--registration); fill-opacity: .8; }
.title-orbit p { transform: rotate(-4deg); color: var(--registration); }
.start-footnote { max-width: 440px; }

/* Causal history is a usable working area, not a one-lane thumbnail strip. */
.history-panel { border: 0; border-top: 3px solid var(--paper); background: #0c1421; padding: 20px; }
.history-heading { align-items: center; flex-wrap: wrap; }
.history-guide { margin-left: auto; }
.history-inspect-hint { color: #aebace; font: 12px/1.6 var(--sans); margin: 8px 0 12px; }
.history-scroll { height: clamp(330px, 44vh, 520px); min-height: 330px; max-height: none; border-radius: 0; }
body:has(dialog[open]) { overflow: hidden; }
dialog { color: var(--text); }
.history-expanded, .history-inspector { border: 1px solid #57667c; background: #0d1625; padding: 24px; }
.history-expanded::backdrop, .history-inspector::backdrop { background: #030813c9; }
.history-expanded { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; }
.history-expanded[open] { display: flex; flex-direction: column; }
.history-dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.history-dialog-heading h2 { color: var(--paper); font-size: 24px; margin: 4px 0; }
.history-dialog-heading button { flex-shrink: 0; }
#expanded-history-slot { flex: 1; min-height: 0; }
#expanded-history-slot .history-scroll { height: 100%; min-height: 0; max-height: none; }
.history-inspector { width: min(460px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: auto; }
.inspect-layout { display: flex; justify-content: center; gap: 18px; }
#inspect-board { width: min(240px, calc(100vw - 170px)); height: auto; align-self: flex-start; border: 1px solid #53647c; }
.inspect-sidebar { width: 74px; display: flex; flex-direction: column; gap: 4px; }
.inspect-sidebar canvas { width: 74px; }
.inspect-stats { font: 11px/1.7 var(--mono); color: var(--paper); }

/* Two destinations, two compositions: a history atlas and a live exchange. */
#travel-modal { --travel-ink: var(--registration); }
#travel-modal.multi-mode { --travel-ink: #92d5cb; }
#travel-modal > .travel-modal-card,
#travel-modal.maximized > .travel-modal-card { background: #0a111d; padding: 28px 38px 22px; }
#travel-modal > .travel-modal-card > .eyebrow { color: var(--travel-ink); padding-left: 32px; position: relative; }
#travel-modal > .travel-modal-card > .eyebrow::before { content: ''; position: absolute; left: 0; top: 1px; width: 18px; height: 9px; background: var(--travel-ink); box-shadow: 6px -5px 0 var(--travel-ink); }
#travel-modal #travel-modal-title { color: var(--paper); font-size: clamp(26px,3.5vw,48px); letter-spacing: -.055em; margin-top: 8px; }
#travel-modal .modal-copy { max-width: 820px; font-size: 13px; line-height: 1.6; margin-bottom: 8px; }
#travel-modal .board-search { border: 0; border-block: 1px solid #344154; background: none; padding: 10px 0; border-radius: 0; }
#travel-modal .search-label { color: var(--paper); letter-spacing: 0; }
#travel-modal .modal-history { border: 0; border-top: 2px solid var(--travel-ink); border-radius: 0; background: #080f1a; }
#travel-modal .history-row-label { background: #101a28; }
#travel-modal .history-node { border-radius: 0; box-shadow: none; }
#travel-modal .history-node.selected-destination { border-color: var(--travel-ink); box-shadow: 0 0 0 2px var(--travel-ink); }
#travel-modal > .travel-modal-card > .modal-selection { background: none; border-bottom: 1px solid #344154; border-radius: 0; padding-inline: 0; box-shadow: none; }
#travel-modal .modal-selection > span { color: var(--travel-ink); }
#travel-modal > .travel-modal-card > .trajectory { background: #101a28; border: 0; border-left: 3px solid var(--travel-ink); border-radius: 0; box-shadow: none; }
#travel-modal .trajectory-title { color: var(--travel-ink); letter-spacing: .02em; }
#travel-modal > .travel-modal-card > .modal-actions { box-shadow: none; }
#travel-modal .travel-preview { border: 1px solid #647184; border-top: 4px solid var(--travel-ink); background: #101925; border-radius: 0; box-shadow: 0 12px 40px #0009; }
#travel-modal .preview-stats div { background: transparent; border-radius: 0; border-bottom: 1px solid #344154; }
#travel-modal .preview-slot { background: transparent; border: 0; }
#travel-modal .preview-label { color: var(--travel-ink); }
#travel-modal.multi-mode .modal-map-hint::before { content: 'NOW ↔ NOW / ACTIVE UNIVERSES ONLY'; color: var(--travel-ink); letter-spacing: .04em; }
#travel-modal.multi-mode #toggle-transfers { display: none; }
#travel-modal-map.exchange-board-grid { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 22px; padding: 28px; min-width: 0; width: 100%; }
#travel-modal-map .exchange-board { position: relative; left: auto; top: auto; display: flex; flex-direction: column; align-items: center; gap: 10px; width: calc(176px * var(--exchange-scale)); height: auto; padding: 14px; border: 1px solid #4b6570; background: #111e2a; color: var(--paper); opacity: 1; cursor: pointer; flex-shrink: 0; }
#travel-modal-map .exchange-board canvas { width: min(100%, calc(108px * var(--exchange-scale))); height: auto; aspect-ratio: 4 / 5; flex: none; }
#travel-modal-map .exchange-board, #travel-modal-map .exchange-board:hover:not(:disabled) { transform: none; }
#travel-modal .start-button:disabled { opacity: .4; cursor: not-allowed; }
#travel-modal-map .exchange-board strong { font: 600 18px var(--sans); }
#travel-modal-map .exchange-board span { font: 10px/1.5 var(--mono); }
#travel-modal-map .exchange-board .exchange-status { color: #a3e0d3; }
#travel-modal-map .exchange-board:disabled { cursor: default; border-style: dashed; }
#travel-modal-map .exchange-source { background: transparent; border-color: var(--paper); }
#travel-modal-map .exchange-source .exchange-status { color: var(--registration); }
#travel-modal-map .exchange-board:not(:disabled):hover { background: #1b333b; border-color: #c4fff0; }
#travel-modal-map.exchange-board-grid.searching .exchange-board:not(.search-hit) { opacity: 1; }
#travel-modal-map .exchange-board.exchange-sealed { background: #161b25; border-color: #677183; }
#travel-modal-map .exchange-sealed .exchange-status { color: #c7b8cf; }
#travel-modal-map .exchange-match { min-height: 15px; color: var(--hit, var(--paper)); }
#travel-modal-map .exchange-action { width: 100%; border-top: 1px solid #526878; padding-top: 8px; color: #c4fff0; }
#travel-modal-map .exchange-board:disabled .exchange-action { color: #b3bdcc; }
#travel-modal-map .exchange-board.search-hit { border-color: var(--hit); box-shadow: inset 0 0 0 1px var(--hit); }
#travel-modal.multi-mode .search-count { white-space: normal; line-height: 1.5; }

/* Chamfered map plates. Cut only the frame, never the board or its caption. */
.history-map:not(.compact) .history-node {
  --plate-edge: #667c94;
  --plate-cut: 6px;
  border-radius: 0;
  border-color: var(--plate-edge);
  clip-path: polygon(var(--plate-cut) 0, 100% 0, 100% calc(100% - var(--plate-cut)), calc(100% - var(--plate-cut)) 100%, 0 100%, 0 var(--plate-cut));
}
.history-map:not(.compact) .history-node::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(135deg, transparent 3px, var(--plate-edge) 3px 5px, transparent 5px) top left / 8px 8px no-repeat,
    linear-gradient(315deg, transparent 3px, var(--plate-edge) 3px 5px, transparent 5px) bottom right / 8px 8px no-repeat;
}
.history-map:not(.compact) .history-node.live-node { --plate-edge: #70bcb6; }
.history-map:not(.compact) .history-node.selected-destination { --plate-edge: #c6a3ef; box-shadow: inset 0 0 0 1px var(--plate-edge); }
.history-map:not(.compact) .history-node:focus-visible { --plate-edge: #edfff8; box-shadow: inset 0 0 0 2px var(--plate-edge); outline: none; }
.history-map:not(.compact) .history-node canvas { box-shadow: 0 1px 0 #3e526b; }
@media (max-width: 650px) {
  #travel-modal > .travel-modal-card,
  #travel-modal.maximized > .travel-modal-card { padding: 22px 14px 14px; }
  #travel-modal .modal-copy { font-size: 11px; }
  #travel-modal-map.exchange-board-grid { padding: 18px 10px; gap: 12px; }
  #travel-modal-map .exchange-board { width: calc(142px * var(--exchange-scale)); }
  #travel-modal .modal-map-bar { flex-wrap: wrap; }
}
@media (max-width: 750px) {
  .start-card { padding: 64px 15px 20px; }
  .start-card::before { left: 15px; top: 25px; width: 42px; height: 10px; box-shadow: 10px -10px 0 var(--registration); }
  .console-id { padding-inline: 15px; font-size: 10px; top: -10px; }
  .start-title { font-size: clamp(60px,14vw,85px); }
  .history-guide { margin-left: 0; }
  .history-heading { flex-direction: row; }
  .history-heading > div:first-child { flex-basis: 100%; }
  .history-panel { padding: 14px 9px; }
  .history-expanded, .history-inspector { padding: 16px; }
  .history-dialog-heading h2 { font-size: 19px; }
}
