/* ============ story.css — story mode screens (js/ui/story-ui.js, docs/story-mode.md) ============ */
.story-box { width: min(560px, 100%); }
.story-box.wide { width: min(660px, 100%); }
/* Region cards: one row per region, the status on the right. */
.region-list { display: flex; flex-direction: column; gap: 8px; }
.region { display: grid; grid-template-columns: 40px 1fr auto; column-gap: 10px; align-items: center;
  padding: 10px 12px; border-radius: 10px; cursor: pointer; text-align: left;
  background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(0,0,0,.16));
  border: 2px solid rgba(244,248,255,.35); transition: border-color .12s, transform .06s; }
.region:hover:not(:disabled) { border-color: var(--edge); }
.region:active:not(:disabled) { transform: translateY(1px); }
.region.now { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(255,210,63,.22); }
.region:disabled { opacity: .42; cursor: not-allowed; }
.region .r-ico { grid-row: span 2; display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 9px; background: rgba(0,0,0,.3); }
.region b { font-size: 19px; letter-spacing: .4px; }
.region small { display: block; color: var(--muted); font-size: 12.5px; font-weight: 400; }
.region .r-state { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px;
  color: var(--gold); white-space: nowrap; }
.region:disabled .r-state { color: var(--muted); }
/* Difficulty: two cards side by side. */
.diff-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 520px) { .diff-list { grid-template-columns: 1fr; } }
/* A phone on its side: smaller region cards, so New journey and its difficulty cards come into
   view (playtest 2-11-2026: they opened below the 390 px screen; story-ui.js also scrolls to them). */
@media (max-height: 520px) {
  #scr-story { padding-top: 6px; padding-bottom: 6px; }
  .region-list { gap: 5px; }
  .region { padding: 4px 10px; }
  .region .r-ico { width: 30px; height: 30px; }
  .region b { font-size: 16px; }
  .region small { font-size: 11px; }
  .diff { padding: 8px 10px; }
  .diff b { font-size: 16px; }
}
.diff { appearance: none; cursor: pointer; text-align: left; padding: 12px 14px; border-radius: 10px;
  color: var(--ink); text-shadow: 2px 2px 0 var(--shadow);
  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(0,0,0,.18));
  border: 2px solid rgba(244,248,255,.4); transition: border-color .12s, transform .06s; }
.diff:hover { border-color: var(--edge); }
.diff:active { transform: translateY(1px); }
.diff b { display: block; font-size: 19px; color: var(--gold); margin-bottom: 2px; }
.diff.nuzlocke b { color: #ff8a96; }
.diff small { display: block; color: var(--muted); font-size: 12.5px; font-weight: 400; line-height: 1.4;
  text-shadow: none; letter-spacing: 0; }
/* Starter cards. */
.starter-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 480px) { .starter-list { grid-template-columns: 1fr; } }
.story-starter { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 10px;
  border-radius: 10px; cursor: pointer; color: var(--ink);
  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(0,0,0,.18));
  border: 2px solid rgba(244,248,255,.4); transition: border-color .12s, transform .06s; }
.story-starter:hover { border-color: var(--gold); }
.story-starter:active { transform: translateY(1px); }
.story-starter b { color: var(--ink); font-size: 17px; }
/* Map header: the chips and the "go" band that says where to head next. */
.map-head { gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.chipx { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px;
  background: rgba(0,0,0,.3); border: 2px solid rgba(244,248,255,.22); font-size: 13px; font-weight: 700; }
.chipx b { color: var(--gold); }
.go-band { display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin-bottom: 12px;
  border-radius: 10px; border: 2px solid var(--gold);
  background: linear-gradient(90deg, rgba(255,210,63,.20), rgba(255,210,63,.04)); }
.go-band .go-txt { flex: 1; min-width: 0; }
.go-band small { display: block; color: var(--muted); font-size: 12.5px; letter-spacing: 0;
  text-transform: uppercase; font-weight: 700; }
.go-band b { font-size: 20px; color: var(--gold); }
.story-stops { display: flex; flex-direction: column; gap: 6px; max-height: 46vh; overflow-y: auto; padding-right: 2px; }
.stop { display: grid; grid-template-columns: 26px 1fr; column-gap: 8px; align-items: center; text-align: left;
  padding: 8px 10px; border-radius: 8px; background: rgba(255,255,255,.04); border: 2px solid rgba(244,248,255,.22);
  color: var(--ink); cursor: pointer; transition: border-color .12s; }
.stop:hover:not(:disabled) { border-color: var(--edge); }
.stop small { grid-column: 2; color: var(--muted); font-size: 12px; }
.stop .mi-ico { grid-row: span 2; display: flex; }
.stop .stop-name { font-weight: 700; }
.stop-tag { grid-column: 2; font-size: 10.5px; font-weight: 800; letter-spacing: .7px; text-transform: uppercase; }
.stop-tag.here { color: var(--gold); }
.stop-tag.next { color: #7dffb0; }
.stop.cleared { border-color: #3f6b3f; }
.stop.cleared .stop-name { color: #bfe8c8; }
.stop.current { border-color: var(--gold); background: linear-gradient(90deg, rgba(255,210,63,.20), rgba(255,210,63,.03)); }
.stop.target { border-color: #7dffb0; box-shadow: 0 0 0 2px rgba(125,255,176,.18); }
.stop.optional { border-style: dashed; }
.stop.locked { opacity: .38; cursor: default; }
.badges { display: inline-flex; gap: 5px; }
.badge { display: inline-block; width: 16px; height: 16px; border-radius: 50%; background: #2a2f3a; border: 2px solid #444; }
.badge.on { background: var(--gold); border-color: #fff3c0; box-shadow: 0 0 6px rgba(255,210,63,.6); }
.mart-list { display: flex; flex-direction: column; gap: 6px; }
.mart-row { display: grid; grid-template-columns: 1fr auto auto auto; gap: 10px; align-items: center;
  padding: 8px 10px; border-radius: 8px; background: rgba(255,255,255,.04); border: 1px solid var(--edge); }
.mart-row span { color: var(--ink); font-size: 13px; }
/* The go band's second line, the town buttons and the PC. */
.go-band .go-sub { display: block; margin: 0; font-size: 13px; }
.town-row { gap: 8px; margin-bottom: 8px; }
/* The team view in a stage (run-ui.js showTeamView): potions, Revives and TMs. */
.tv-story { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tv-story .tv-tm { flex: 1 1 140px; min-width: 0; }
/* Pause → Quit in a stage. */
.story-quit { margin: 10px 0; }
/* The team view's moves by role (run-ui.js roleMoves): Active, Auto, resting; tap or drag to swap. */
.tv-role { cursor: pointer; border-radius: 8px; padding: 3px 6px; border: 1px solid transparent; }
.tv-role:hover { background: rgba(255,255,255,.06); }
.tv-role.r-rest { opacity: .6; }
.tv-role.picked { border-color: #ffd23f; background: rgba(255,210,63,.12); opacity: 1; }
.tv-role.over { border: 1px dashed #ffd23f; }
.tv-rtag { display: inline-flex; align-items: center; gap: 5px; min-width: 88px; font-weight: 800; font-size: 13px; text-transform: uppercase; }
.tv-when { margin-left: auto; opacity: .7; font-size: 13px; }
/* A move it can't forget: its last Auto or Active one (run-ui.js showForget). */
#team-cards .card.off { opacity: .5; cursor: not-allowed; }
/* ---- A town's buildings (#scr-town, story-ui.js renderTown) in the Routes look ----
 * The screen carries the routes-ui class itself (dev.html), so the panel, the magenta
 * title slab and the slanted buttons are css/style.css "Routes theme"; the Pokémon Center
 * reuses the Routes Day Care's cells (.hub-cell .bench-cell, ui/hub-ui.js renderBench). */
.town-box { position: relative; }
.town-box .hub-head { margin-bottom: 8px; }
/* A phone on its side: the panel scrolls, its header (and ×) stays on top, and it uses the whole
   height (playtest 2-11-2026: the Center was taller than the screen and its × scrolled away). */
@media (max-height: 520px) {
  #scr-town { padding-top: 6px; padding-bottom: 6px; }
  #scr-town .town-box { max-height: calc(100dvh - 12px); }
  .town-box .hub-head { position: sticky; top: -10px; z-index: 3; margin: -10px -14px 6px; padding: 8px 14px 6px; background: #261a4b; }
  .town-box .hub-title p { margin: 2px 0 0; }
}
.routes-ui .tabs { gap: 8px; margin-bottom: 12px; }
.routes-ui .tab {
  flex: 0 1 auto; padding: 6px 26px; border: 0; border-radius: 0; clip-path: var(--pd-slant);
  background: rgba(255,255,255,.1); color: #fff; font: italic 800 15px var(--pd-head); text-transform: uppercase;
  transition: background .12s, color .12s;
}
.routes-ui .tab:hover { background: rgba(255,255,255,.2); }
.routes-ui .tab.on { background: #fff; color: var(--pd-text); }
/* The Center: Heal on a yellow-edged band, then your team of 3 and the PC box. */
.tc-heal { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; padding: 10px 14px;
  background: rgba(248,208,48,.12); box-shadow: inset 4px 0 0 var(--pd-y, #f8d030); border-radius: 4px 18px 4px 18px; }
.tc-heal-txt { flex: 1 1 220px; color: var(--pd-lilac, #c9bdf0); font-size: 14px; }
.tc-heal .btn { display: inline-flex; align-items: center; gap: 8px; }
.bench-h small { font: 13px var(--font); color: var(--pd-lilac, #c9bdf0); text-transform: none; margin-left: 6px; }
.tc-cell { position: relative; width: 112px; min-height: 112px; justify-content: center; }
.tc-cell .hub-pic { width: 64px; height: 58px; }
.tc-cell b { font: italic 800 13px var(--pd-head, var(--font)); text-transform: uppercase; }
.tc-cell.lead { box-shadow: inset 0 -4px 0 var(--pd-y, #f8d030); }
.tc-cell.down .hub-pic { opacity: .45; filter: grayscale(.8); }
.tc-cell.down small { color: var(--red); }
.tc-cell.empty { border: 2px dashed rgba(201,189,240,.35) !important; background: transparent !important; }
.tc-cell.empty:hover, .tc-cell.empty:focus-visible { border-color: var(--pd-y, #f8d030) !important; }
.tc-empty { color: var(--pd-lilac, #c9bdf0); font-size: 12px; text-align: center; }
.tc-item { position: absolute; top: 5px; right: 8px; }
.tc-cell:focus-visible { outline: 2px solid var(--pd-y, #f8d030); outline-offset: 2px; }
.tc-box { max-height: min(40vh, 290px); overflow-y: auto; padding: 2px; }
/* The Mart in the same frame. */
.routes-ui .mart-row { border: 0; background: rgba(255,255,255,.07); border-radius: 4px 14px 4px 14px; }
.routes-ui .mart-row span:first-child { font: italic 800 15px var(--pd-head); text-transform: uppercase; }
/* A phone on its side: no lines to read twice, smaller cells, one scroll (the window's) instead of two. */
@media (max-height: 520px) {
  #town-sub, .tc-heal-txt { display: none; }
  .tc-heal { justify-content: flex-end; padding: 0; margin-top: -6px; background: none; box-shadow: none; }
  .tc-cell { width: 92px; min-height: 92px; }
  .tc-cell .hub-pic { width: 54px; height: 48px; }
  .tc-box { max-height: none; overflow: visible; }
}
