/* Battlefield choice: the title's parchment Atlas tokens, kept open and quiet. */
body:has(.voyage-screen) { background: #eee2bd; }
body:has(.voyage-screen) > .site-header, body:has(.voyage-screen) > .site-footer { display: none; }
#game:has(.voyage-screen) { max-width: none; padding: 0; margin: 0; }

.voyage-screen {
  --ink: #30291c; --ink-soft: #64573d; --ink-faint: #665637; --parch: #eee2bd; --parch-light: #f5edda; --rule: #93815c; --rust: #8f3b22;
  position: relative; isolation: isolate; min-height: 100svh; padding: 36px clamp(28px, 4.5vw, 72px) 30px; color: var(--ink);
  /* Owner-requested generated map backdrop under an ivory wash; the wash keeps text at full contrast. */
  background:
    radial-gradient(ellipse 70% 75% at 58% 48%, #f6efdcf2, #f6efdcd1 62%, #efe4c4b8 100%),
    url('assets/battlefields/voyage-background.webp') center / cover no-repeat,
    var(--parch);
  display: grid; grid-template-rows: auto 1fr auto; gap: 24px; font-family: Georgia, 'Times New Roman', 'Noto Sans Thai', serif;
}
.voyage-screen h1, .voyage-screen h2, .voyage-screen p, .voyage-screen figure, .voyage-screen dl, .voyage-screen dd { margin: 0; }
.voyage-frame { position: absolute; inset: 18px; z-index: -1; border: 1px solid #8e795947; pointer-events: none; }

.voyage-topbar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.voyage-back { justify-self: start; display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px 0 4px; background: transparent; border: 0; box-shadow: none; color: var(--ink); font: 15px Georgia, serif; }
.voyage-back:hover { color: var(--rust); }
.voyage-wordmark { font: 600 12px Arial, sans-serif; letter-spacing: .42em; color: var(--ink-soft); }
#voyage-title { justify-self: end; font: 400 15px Georgia, serif; font-style: italic; color: var(--ink-soft); outline: none; }

.voyage-main { display: grid; grid-template-columns: minmax(300px, 360px) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); align-items: start; min-height: 0; }
.voyage-list { display: grid; gap: 20px; max-height: calc(100svh - 190px); overflow-y: auto; padding: 4px 8px 4px 4px; scrollbar-width: thin; }
.voyage-region h2 { margin-bottom: 6px; padding-bottom: 6px; border-bottom: 1px solid #9b885b70; font: 600 10px Arial, sans-serif; letter-spacing: .3em; text-transform: uppercase; color: var(--ink-faint); }
.voyage-field { display: grid; grid-template-columns: 66px 1fr; align-items: center; gap: 14px; width: 100%; min-height: 60px; padding: 6px 10px 6px 6px; margin-top: 2px; text-align: left; color: var(--ink); background: transparent; border: 1px solid transparent; border-radius: 2px; box-shadow: none; transition: background .16s, border-color .16s; }
.voyage-field img { width: 66px; height: 44px; object-fit: cover; border: 1px solid #93815c99; box-shadow: 0 1px 3px #30291c33; }
.voyage-field strong { display: block; font: 400 18px/1.2 Georgia, serif; }
.voyage-field small { display: block; margin-top: 2px; font: italic 13px/1.4 Georgia, serif; color: var(--ink-soft); }
.voyage-field:hover { background: #e6d7ac; }
.voyage-field.is-current { background: #e0d0a4; border-color: #93815c8c; }
.voyage-field.is-current strong::after { content: ''; display: inline-block; width: 7px; height: 7px; margin: 0 0 3px 10px; background: var(--rust); transform: rotate(45deg); }
.voyage-field:focus-visible, .voyage-back:focus-visible, .voyage-begin:focus-visible { outline: 3px solid #6b3526; outline-offset: 3px; }

.voyage-detail { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.voyage-summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: start; }
.voyage-plate { position: relative; padding: 8px; background: var(--parch-light); border: 1px solid var(--rule); box-shadow: 0 14px 30px #30291c2e; }
.voyage-plate::after { content: ''; position: absolute; inset: 3px; border: 1px solid #93815c66; pointer-events: none; }
.voyage-plate img { width: 100%; height: auto; max-height: calc(100svh - 480px); min-height: 220px; object-fit: cover; }
.voyage-copy { display: grid; gap: 8px; max-width: 760px; }
.voyage-kicker { font: 600 10px Arial, sans-serif; letter-spacing: .3em; color: var(--ink-faint); }
#voyage-field-name { font: 400 clamp(32px, 3.2vw, 48px)/1.05 Georgia, serif; letter-spacing: -.02em; }
.voyage-lore { font: 17px/1.55 Georgia, serif; color: var(--ink-soft); max-width: 62ch; }
.voyage-thai { font: 14px/1.6 'Noto Sans Thai', sans-serif; color: var(--ink-faint); }

.voyage-actions { display: flex; align-items: center; justify-content: space-between; gap: 20px 28px; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid #9b885b70; }
.voyage-minifield { display: grid; gap: 6px; justify-items: start; }
.mf-grid { display: grid; grid-template-columns: repeat(15, 6px); gap: 1px; padding: 3px; background: #93815c; border: 1px solid var(--ink-soft); }
.mf-grid i, .voyage-facts i { display: block; width: 6px; height: 6px; }
.mf-ground { background: #b9b77e; } .mf-sand { background: #ddc993; } .mf-bridge { background: #8a6a43; }
.mf-water { background: #4f9fa6; } .mf-wall { background: #4a4235; } .mf-cover { background: #4f7a3e; }
.mf-flag { background: var(--rust); } .mf-start { background: #f5edda; }
.voyage-minifield figcaption { font: italic 12px Georgia, serif; color: var(--ink-faint); }
.voyage-facts { display: flex; flex-wrap: wrap; gap: 8px 26px; }
.voyage-facts div { display: grid; gap: 2px; }
.voyage-facts dt { display: flex; align-items: center; gap: 6px; font: 600 10px Arial, sans-serif; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-faint); }
.voyage-facts dt i { width: 9px; height: 9px; }
.voyage-facts dd { font: 22px Georgia, serif; font-variant-numeric: tabular-nums; }
.voyage-begin { display: inline-flex; align-items: center; gap: 14px; min-height: 52px; padding: 0 26px; background: var(--ink); border: 1px solid var(--ink); border-radius: 2px; color: var(--parch-light); font: 17px Georgia, serif; box-shadow: 0 2px 4px #30291c40; transition: background .16s; }
.voyage-begin:hover { background: #4a3e29; }
.voyage-begin:active { box-shadow: none; }
.voyage-note { text-align: center; font: italic 13px Georgia, serif; color: var(--ink-faint); }

@media (max-width: 1100px) {
  .voyage-main { grid-template-columns: 290px minmax(0, 1fr); }
  .voyage-begin { flex: 1 1 100%; justify-content: center; }
}
@media (max-width: 760px) {
  .voyage-screen { padding: 24px 16px 28px; gap: 18px; }
  .voyage-frame { inset: 8px; }
  .voyage-topbar { grid-template-columns: auto 1fr; }
  .voyage-wordmark { display: none; }
  .voyage-main { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .voyage-plate img { max-height: none; min-height: 0; }
  .voyage-list { display: flex; gap: 8px; max-height: none; overflow-x: auto; overflow-y: hidden; margin: 0 -16px; padding: 4px 16px 10px; scroll-snap-type: x proximity; }
  .voyage-region { display: contents; }
  .voyage-region h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .voyage-field { flex: 0 0 132px; grid-template-columns: 1fr; gap: 6px; padding: 6px; margin: 0; scroll-snap-align: start; }
  .voyage-field img { width: 100%; height: 80px; }
  .voyage-field strong { font-size: 15px; }
  .voyage-field small { display: none; }
  .voyage-field.is-current strong::after { margin-left: 6px; }
  .voyage-facts { display: grid; grid-template-columns: repeat(5, auto); gap: 8px 14px; }
  .voyage-facts dd { font-size: 18px; }
  .voyage-facts dt { font-size: 9px; letter-spacing: .08em; }
  .voyage-summary { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .voyage-minifield { justify-items: center; }
  .voyage-facts { justify-content: center; }
  #voyage-field-name { font-size: 34px; }
  .voyage-lore { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .voyage-screen * { transition: none !important; }
}

.mf-grid[data-size="11"] { grid-template-columns: repeat(11, 6px); }
