@font-face {
  font-family: Monofonto;
  src: url('assets/monofonto.ttf') format('truetype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
:root {
  --bg: #090909;
  --panel: #0e0d0b;
  --amber: #ffb642;
  --ink: #e7ac50;
  --muted: #b18d58;
  --line: #60451f;
  --soft: #211b12;
  --font: Monofonto, 'Courier New', monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 18px/1.45 var(--font); overflow-wrap: break-word; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { opacity: .4; cursor: default; }
a { color: var(--amber); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 4px; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 4px; }
button:focus-visible { outline-offset: -3px; }
::selection { background: var(--amber); color: var(--bg); }
h1, h2, h3, p { margin: 0; }
h1, h2, h3, strong { font-weight: 400; }
h1, h2, h3 { line-height: 1.15; color: var(--amber); }
h2 { font-size: 34px; }
h3 { font-size: 23px; }
p { color: var(--muted); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.skip-link { position: fixed; top: -80px; left: 20px; background: var(--amber); color: #090909; padding: 12px; z-index: 50; }
.skip-link:focus { top: 12px; }
.site-shell, .section-wrap { width: min(1500px, calc(100% - 80px)); margin: auto; }
.site-header { padding: 36px 0 26px; display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.game-label { font-size: 16px; margin-bottom: 5px; }
.site-header h1 { font-size: clamp(28px, 3vw, 42px); text-transform: uppercase; }
.site-header h1 a:hover { text-decoration: none; }
.profile-link { font-size: 16px; white-space: nowrap; padding-bottom: 5px; }
.profile-links { display: flex; gap: 24px; }
.guide-intro { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0 12px; font-size: 15px; }
.spoiler-switch { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); cursor: pointer; }
.spoiler-switch input { width: 16px; height: 16px; margin: 0; accent-color: var(--amber); cursor: pointer; }
.guide-toolbar { display: flex; align-items: center; gap: 20px; justify-content: space-between; padding: 10px 0 18px; border-bottom: 1px solid var(--line); }
.filters { display: flex; gap: 3px; flex-wrap: wrap; }
.filters button { border: 1px solid transparent; color: var(--muted); background: transparent; padding: 5px 10px; font-size: 18px; }
.filters button:hover { color: var(--amber); background: #ffb6420d; }
.filters button[aria-pressed=true] { border-color: var(--amber); background: #ffb64218; color: var(--amber); }
.search { position: relative; flex: 0 1 290px; min-width: 220px; }
.search input { width: 100%; min-height: 39px; border: 1px solid var(--line); background: transparent; color: var(--amber); padding: 7px 35px 7px 12px; border-radius: 0; font-size: 16px; }
.search input::placeholder { color: var(--muted); opacity: 1; }
.search kbd { position: absolute; right: 8px; top: 9px; color: var(--muted); }
kbd { font: 14px var(--font); border: 1px solid var(--line); padding: 1px 5px; }
.guide-body { display: grid; grid-template-columns: 248px minmax(240px, 1fr) 330px; grid-template-rows: minmax(0, 1fr); height: 630px; border-bottom: 1px solid var(--line); }
.discovery-column { min-width: 0; min-height: 0; display: flex; flex-direction: column; padding: 0 14px 0 0; }
.list-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 47px; font-size: 14px; color: var(--muted); }
.list-heading select { background: var(--bg); color: var(--ink); font-size: 14px; border: 0; max-width: 118px; padding: 4px 0; }
.discovery-list { position: relative; flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line) var(--bg); padding: 1px 5px 6px 1px; }
.ride-row { display: block; width: 100%; text-align: left; color: var(--ink); padding: 10px 11px; border: 1px solid transparent; background: transparent; margin-bottom: 3px; }
.ride-row:hover { background: #ffb6420a; }
.ride-row[aria-current=true] { border-color: var(--amber); background: #ffb64215; color: var(--amber); }
.ride-row strong { display: block; font-size: 20px; line-height: 1.2; }
.ride-row small { display: block; color: var(--muted); font-size: 14px; line-height: 1.3; margin-top: 4px; }
.map-column { min-width: 0; display: flex; flex-direction: column; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.map-topline { min-height: 47px; display: flex; justify-content: space-between; align-items: center; padding: 0 18px; font-size: 15px; color: var(--muted); }
.map-stage { position: relative; flex: 1; overflow: hidden; isolation: isolate; background: #0c0d09; }
#world-map { width: 100%; height: 100%; position: absolute; inset: 0; touch-action: pan-y; cursor: grab; }
#world-map.dragging { cursor: grabbing; }
.map-background { filter: sepia(1) saturate(.85); opacity: .66; }
.map-marker { cursor: pointer; outline: none; }
.map-marker circle, .map-marker rect { fill: #15120c; stroke: var(--amber); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.map-marker .pin-core { fill: var(--amber); stroke: none; }
.map-marker.horse circle, .map-marker.horse rect { stroke: #e0d6b7; }
.map-marker.horse .pin-core { fill: #e0d6b7; }
.map-marker.rail { cursor: default; }
.map-marker.rail rect { stroke: #b58b4c; }
.map-marker.rail .pin-core { fill: #b58b4c; }
.map-marker.active circle { fill: var(--amber); stroke: #ffe7b5; stroke-width: 2; }
.map-marker.active .pin-core { fill: #17130c; }
.map-marker:hover circle, .map-marker:focus circle { stroke: white; stroke-width: 3; }
.map-marker .marker-ring { fill: none; stroke: var(--amber); stroke-width: 1; opacity: .8; stroke-dasharray: 3 3; }
.map-marker text { font: 14px var(--font); fill: #fff1cf; paint-order: stroke; stroke: #10110d; stroke-width: 4px; pointer-events: none; }
.landmark-label { font: 14px var(--font); fill: #d6bd8e; paint-order: stroke; stroke: #11170a; stroke-width: 3; pointer-events: none; }
.map-controls { position: absolute; right: 12px; top: 10px; display: flex; flex-direction: column; gap: 6px; }
.map-controls button { width: 35px; height: 35px; background: #090909eb; border: 1px solid var(--line); color: var(--amber); font: 24px/1 var(--font); }
.map-controls button:hover { border-color: var(--amber); }
.map-hint { position: absolute; bottom: 8px; left: 12px; font-size: 12px; color: #c4ae86; pointer-events: none; }
.map-legend { display: flex; gap: 20px; justify-content: center; align-items: center; flex-wrap: wrap; min-height: 40px; font-size: 13px; color: var(--muted); padding: 8px; }
.legend-pin { display: inline-block; width: 8px; height: 8px; border: 1px solid var(--amber); border-radius: 50%; margin-right: 4px; }
.legend-pin.horse { border-color: #e0d6b7; border-radius: 0; transform: rotate(45deg); }
.legend-pin.rail { border-color: #b58b4c; border-radius: 0; }
.legend-pin.selected { background: var(--amber); }
.map-message { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; text-align: center; padding: 32px; background: #090909d9; color: var(--amber); font-size: 26px; gap: 12px; pointer-events: none; }
.map-message p { font-size: 18px; max-width: 300px; }
.detail-panel { padding: 19px 0 24px 24px; min-width: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line) var(--bg); }
.detail-index { font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.detail-panel h3 { font-size: 29px; text-transform: uppercase; }
.detail-state { font-size: 15px; margin-top: 6px; }
.detail-image { margin: 14px 0 0; }
.detail-image img { width: 100%; height: 140px; object-fit: cover; object-position: center 52%; opacity: .9; }
.detail-image figcaption { font-size: 12px; color: var(--muted); margin-top: 3px; }
.detail-location { margin-top: 17px; font-size: 17px; line-height: 1.4; color: var(--ink); }
.detail-location small { display: block; font-size: 14px; margin-top: 6px; color: var(--muted); }
.requirements { margin: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px 0; }
.requirements > div { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 10px; padding: 5px 0; }
.requirements dt { font-size: 15px; color: var(--muted); }
.requirements dd { margin: 0; font-size: 17px; color: var(--amber); }
.detail-label { font-size: 15px; color: var(--amber); margin: 19px 0 7px; }
.detail-panel .body-copy { font-size: 16px; line-height: 1.45; }
.detail-note { margin-top: 18px; padding-left: 12px; border-left: 1px solid var(--line); font-size: 15px; }
.detail-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.detail-actions button, .button { color: var(--amber); border: 1px solid var(--line); background: transparent; padding: 8px 10px; font-size: 15px; }
.detail-actions button:hover, .button:hover { border-color: var(--amber); background: #ffb6420d; text-decoration: none; }
.guide-footer { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0 10px; color: var(--muted); font-size: 14px; }
.under-note { font-size: 14px; color: var(--muted); }
.text-view { display: grid; grid-template-columns: 290px minmax(0, 780px); gap: 70px; padding: 36px 0 50px; min-height: 620px; }
.text-intro p { margin-top: 20px; }
.text-intro .button { display: inline-block; margin-top: 24px; }
.reference-body h3 { margin: 30px 0 12px; }
.reference-body h3:first-child { margin-top: 0; }
.reference-body p + p { margin-top: 12px; }
.reference-body strong { color: var(--ink); }
.reference-body a:not(.reward-link) { text-decoration: underline; text-underline-offset: 4px; }
.reference-body p, .reference-body dd { color: #c6a06a; }
.horse-tiers, .supply-list { margin: 0; }
.horse-tiers > div { display: grid; grid-template-columns: 70px 1fr; padding: 17px 0; gap: 20px; border-bottom: 1px solid var(--line); }
.horse-tiers dt { font-size: 30px; color: var(--amber); }
.horse-tiers dd, .supply-list dd { margin: 0; }
.supply-list > div { padding: 16px 0; border-bottom: 1px solid var(--line); }
.supply-list dt { color: var(--amber); font-size: 21px; margin-bottom: 8px; }
.reward-link { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--line); font-size: 23px; }
.reward-link:first-child { padding-top: 6px; }
.reward-link small { display: block; font-size: 17px; line-height: 1.45; color: #c6a06a; margin-top: 7px; }
.reference-body > .under-note { margin-top: 25px; }
.site-footer { border-top: 1px solid var(--line); padding: 20px 0 30px; margin-top: 26px; display: flex; align-items: center; justify-content: space-between; gap: 20px; font-size: 14px; }
.site-footer > div { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.site-footer a { color: var(--muted); }
.toast { position: fixed; bottom: 25px; left: 50%; transform: translateX(-50%); max-width: 90%; padding: 12px 24px; background: #18140d; color: var(--amber); border: 1px solid var(--amber); z-index: 30; font-size: 18px; }
.empty-state { padding: 22px 12px; font-size: 17px; }
.empty-state button { display: block; background: none; color: var(--amber); border: 1px solid var(--line); padding: 8px 12px; margin-top: 15px; }
.notice { padding: 16px; border: 1px solid var(--line); margin-top: 16px; }
.plain-page { padding: 28px 0; border-top: 1px solid var(--line); }
.plain-page h1 { font-size: 36px; margin-bottom: 24px; }
.plain-page h2 { font-size: 26px; margin: 32px 0 14px; }
.plain-page p { max-width: 850px; margin-bottom: 15px; }
.plain-page a { text-decoration: underline; text-underline-offset: 4px; }
.brand { font-size: 28px; text-transform: uppercase; }
.location-table { width: 100%; border-collapse: collapse; margin-top: 30px; font-size: 17px; }
.location-table th, .location-table td { text-align: left; padding: 16px; border: 1px solid var(--line); vertical-align: top; }
.location-table th { color: var(--amber); font-weight: 400; }
.table-scroll { overflow-x: auto; }
.location-table td:first-child { min-width: 160px; }
.location-table td:nth-child(2) { min-width: 220px; }
.location-table td:nth-child(3) { min-width: 320px; }
@media (max-width: 1190px) {
  .site-shell, .section-wrap { width: calc(100% - 48px); }
  .guide-body { grid-template-columns: 220px minmax(200px, 1fr) 280px; }
  .detail-panel { padding-left: 18px; }
  .filters button { padding: 5px 7px; font-size: 17px; }
  .search { min-width: 195px; }
  .text-view { gap: 44px; grid-template-columns: 250px 1fr; }
}
@media (max-width: 960px) {
  .site-header { align-items: start; padding-top: 26px; }
  .site-header h1 { font-size: 32px; }
  .profile-link { font-size: 14px; padding-top: 3px; }
  .guide-toolbar { flex-wrap: wrap; gap: 12px; }
  .search { flex: 1 1 100%; }
  .guide-body { height: auto; grid-template-columns: 230px minmax(0, 1fr); grid-template-rows: 565px auto; }
  .discovery-column { height: 565px; }
  .map-column { border-right: 0; min-height: 565px; }
  .detail-panel { grid-column: 1 / -1; border-top: 1px solid var(--line); padding: 24px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; overflow: visible; }
  .detail-main { grid-column: 1; }
  .detail-description { grid-column: 2; }
  .detail-description > .detail-label:first-child { margin-top: 0; }
  .detail-image { max-width: 300px; }
  .detail-actions { grid-column: 1 / -1; }
  .detail-panel h3 { font-size: 32px; }
  .detail-image img { height: 170px; }
  .text-view { grid-template-columns: 1fr; gap: 36px; }
  .text-intro p { max-width: 640px; margin-top: 14px; }
  .text-intro .button { margin-top: 18px; }
}
@media (max-width: 620px) {
  .site-shell, .section-wrap { width: calc(100% - 32px); }
  .site-header { display: block; padding: 24px 0 18px; }
  .site-header h1 { font-size: clamp(24px, 6.7vw, 34px); }
  .game-label { font-size: 14px; }
  .profile-link { display: inline-block; margin-top: 10px; }
  .guide-intro { flex-wrap: wrap; gap: 9px; padding: 14px 0 10px; font-size: 14px; }
  .guide-toolbar { padding-bottom: 14px; }
  .filters { gap: 2px; }
  .filters button { font-size: 16px; padding: 6px 8px; min-height: 34px; }
  .guide-body { display: flex; flex-direction: column; }
  .map-column { min-height: 390px; order: 1; border-left: 0; }
  .map-topline { min-height: 36px; padding: 0 6px; font-size: 14px; }
  .map-stage { min-height: 330px; }
  .map-controls { right: 7px; }
  .discovery-column { height: 250px; order: 2; padding: 0; border-top: 1px solid var(--line); }
  .discovery-list { display: grid; grid-template-columns: 1fr 1fr; align-content: start; gap: 4px; padding: 1px 3px 6px 1px; }
  .ride-row { padding: 9px 8px; margin: 0; min-height: 86px; }
  .ride-row strong { font-size: 18px; }
  .ride-row small { font-size: 13px; }
  .detail-panel { order: 3; display: block; padding: 22px 0; }
  .detail-image { max-width: none; }
  .detail-image img { height: 180px; }
  .detail-panel .body-copy { font-size: 18px; }
  .detail-location { font-size: 18px; }
  .detail-description > .detail-label:first-child { margin-top: 20px; }
  .detail-actions button { min-height: 42px; }
  .guide-footer { flex-direction: column; gap: 9px; font-size: 14px; }
  .under-note { margin-top: 8px; }
  .site-footer { display: block; margin-top: 24px; padding-top: 16px; font-size: 13px; }
  .site-footer > div { margin-top: 10px; }
  .text-view { padding-top: 26px; }
  .horse-tiers > div { grid-template-columns: 50px 1fr; gap: 15px; }
  .plain-page h1 { font-size: 30px; }
  .brand { font-size: 23px; }
}
