/* Concept 05 — One Roll Ahead. Quiet navigation, a single next step. */
:root { --font-display:Georgia,'Noto Serif TC','Songti TC',serif; }
.topbar { display:flex; align-items:center; flex-wrap:wrap; gap:12px 24px; border-bottom:1px solid #cdbf9426; padding-block:20px; }
.topbar .brand { flex:none; color:#e8c382; }
.topbar .brand-mark { border:0; background:none; border-radius:0; width:34px; height:38px; }
.topbar .brand>span:last-child { font-family:var(--font-display); font-size:22px; font-weight:500; letter-spacing:.045em; }
.topbar .brand-sub,.topbar .edition { display:none; }
.topbar .adventure-nav { display:flex; flex:1; justify-content:flex-end; align-items:center; gap:4px; padding:0; margin:0; max-width:none; border:0; background:none; }
.topbar .adventure-nav-item { flex-direction:row; min-height:44px; gap:7px; font-size:13px; font-weight:500; padding:10px 12px; border-radius:8px; }
.topbar .adventure-nav-item.is-current { background:#c9d4a50c; border-color:transparent; color:#eed7a5; }
.topbar .adventure-nav-item svg { width:16px; height:16px; color:#d1ad6d; }
.topbar .nav-active-mark { display:none; }
.topbar .top-actions { display:flex; align-items:center; gap:3px; width:auto; }
.topbar .top-actions>.quiet-button,.home-tools>summary { min-height:44px; padding:10px; color:#b8c9bf; font-size:12px; }
.home-tools { position:relative; z-index:40; }
.home-tools>summary { display:flex; align-items:center; gap:6px; cursor:pointer; list-style:none; border:1px solid transparent; border-radius:8px; }
.home-tools>summary::-webkit-details-marker { display:none; }
.home-tools>summary::after { content:'⌄'; color:#d1ad6d; }
.home-tools[open]>summary { background:#1b342f; border-color:#ccbd8b38; }
.home-tools-content { position:absolute; right:0; top:calc(100% + 8px); width:230px; max-width:calc(100vw - 32px); padding:10px; border:1px solid #cdbf9466; border-radius:12px; background:#132b29; box-shadow:0 14px 45px #0008; display:grid; gap:5px; }
.home-tools-content>.quiet-button { width:100%; justify-content:flex-start; text-align:left; min-height:44px; padding:12px; }
.home-tools-content .comfort-menu>summary { min-height:44px; width:100%; padding:12px; }
.home-tools-content .comfort-menu-content { position:static; width:auto; min-width:0; box-shadow:none; margin:4px 0; }
#home-vista { position:relative; }
.home-key-art { display:none; }
#home-actions[hidden],#home-party[hidden],#home-chapter[hidden],#game-layout[hidden],#campaign-toolbar[hidden],#journey-overview[hidden],#action-dock[hidden],#coop-hub[hidden] { display:none !important; }
body[data-home="camp"] { background:radial-gradient(ellipse at 80% 5%,#29423866,transparent 55rem),#091b1c; }
body[data-home="camp"][data-camp-details="closed"] { padding-bottom:20px; }
body[data-home="camp"] #home-vista { display:flex; align-items:center; min-height:600px; padding:54px 56px 38px; margin:20px 0 12px; border:1px solid #beb99255; border-radius:18px; background:#0b1d20; isolation:isolate; overflow:hidden; box-shadow:0 18px 60px #020d1644; }
body[data-home="camp"] #home-vista::before { content:''; position:absolute; inset:0; z-index:-1; background:linear-gradient(90deg,#071c1deb,#071c1d91 36%,#06181900 64%),linear-gradient(0deg,#071819c7,transparent 40%); }
body[data-home="camp"] #home-vista::after { display:none; }
body[data-home="camp"] .home-key-art { display:block; position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:65% 65%; z-index:-2; }
body[data-home="camp"] #opening-key-art,body[data-home="camp"] .expedition-summary,body[data-home="camp"] #arrival-checkpoint { display:none; }
body[data-home="camp"] #home-vista .arrival-copy { width:48%; max-width:580px; position:relative; z-index:1; margin:0; padding:0 0 82px; }
body[data-home="camp"] #home-vista .eyebrow { margin:0 0 22px; color:#dcc38b; font-size:11px; letter-spacing:.13em; }
body[data-home="camp"] #home-vista h1 { max-width:9ch; margin:0 0 23px; font-family:var(--font-display); font-size:clamp(44px,5.5vw,76px); font-weight:500; letter-spacing:-.025em; line-height:1.08; text-wrap:balance; color:#f6efe0; text-shadow:0 4px 28px #04161566; }
html[lang="zh-Hant"] body[data-home="camp"] #home-vista h1 { max-width:8em; font-size:clamp(37px,4.6vw,61px); line-height:1.27; letter-spacing:.025em; }
.home-chapter { display:block; color:#ead6b0; font-size:15px; line-height:1.7; }
body[data-home="camp"] #home-vista #arrival-description { max-width:35ch; margin:11px 0 0; color:#c6d1c3; font-size:14px; line-height:1.8; }
.home-actions { display:flex; align-items:flex-start; flex-direction:column; gap:13px; margin-top:16px; }
.home-save { display:flex; align-items:center; gap:8px; max-width:100%; padding:5px 0; min-height:34px; border:0; background:none; color:#efd095; font:inherit; font-size:12px; text-align:left; line-height:1.5; cursor:pointer; }
.home-save svg { width:18px; height:18px; flex:none; padding:2px; border:1px solid currentColor; border-radius:50%; }
.home-save[data-saved="true"] { color:#b4cdae; }
.home-save[data-saved="false"] svg { opacity:.45; }
.home-primary { display:flex; align-items:center; justify-content:space-between; gap:24px; width:340px; max-width:100%; min-height:62px; padding:16px 26px; color:#f7eac5; border:1px solid #c1c79688; border-radius:36px; background:linear-gradient(120deg,#617959,#355347); font-family:var(--font-display); font-size:20px; line-height:1.35; box-shadow:inset 0 1px #f9edb726,0 8px 24px #03191266; cursor:pointer; }
.home-primary svg { width:23px; height:23px; flex:none; }
.home-primary:hover:not(:disabled) { background:linear-gradient(120deg,#718b62,#426352); border-color:#ece1b6; }
.home-primary:disabled { opacity:.6; cursor:not-allowed; }
.home-friends { display:inline-flex; align-items:center; justify-content:center; gap:10px; min-height:44px; max-width:100%; padding:6px 20px; color:#e6d4b1; border:0; background:none; font:inherit; font-size:13px; cursor:pointer; }
.home-friends svg { width:18px; height:18px; color:#e1bc76; }
.home-friends span { text-decoration:underline; text-decoration-color:#beac755c; text-underline-offset:5px; }
.home-quiet-actions { display:flex; align-items:center; flex-wrap:wrap; gap:4px 12px; margin-top:7px; }
.home-quiet-actions button { min-height:44px; padding:7px 0; color:#bfcfc0; border:0; border-bottom:1px solid #c2bc8d33; border-radius:0; background:none; font:inherit; font-size:11px; line-height:1.6; text-align:left; cursor:pointer; }
.home-quiet-actions button[data-available="true"] { color:#ead08e; }
.home-party { display:flex; align-items:center; gap:6px 25px; position:absolute; inset:auto 56px 28px; z-index:1; padding-top:20px; border-top:1px solid #bfbb8e30; }
.home-companion { display:flex; align-items:center; gap:9px; min-height:48px; padding:3px; border:0; background:transparent; text-align:left; color:#e0dccb; cursor:pointer; }
.home-companion img { width:37px; height:39px; object-fit:cover; border-radius:50%; border:1px solid #d0bb7c70; }
.home-companion>span { display:flex; flex-direction:column; gap:4px; font-size:12px; }
.home-companion small { font-size:9px; color:#a2b6a8; letter-spacing:.07em; }
body[data-home="camp"] #training-milestone,body[data-home="camp"] #adventure-next { display:none !important; }
body[data-home="camp"] #game-layout { margin-top:22px; }
body[data-home="camp"] #victory-growth { margin:18px auto; }
body[data-home="camp"] #world-view-button { display:none; }
body[data-home="camp"][data-camp-details="closed"] #companion-progress[data-home-context="discovery"] { display:none; }
body[data-home="camp"] .app-footer { margin-top:26px; }
body[data-home="camp"] .app-footer .footer-story { color:#aebcae; }
/* After a victory, the receipt shares the arrival view instead of hiding below it. */
@media(min-width:1000px) {
  body[data-home="camp"].has-victory-growth:not([data-home-suspended="true"]) #home-arrival { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(390px,1fr); align-items:start; gap:18px; margin-top:20px; }
  body[data-home="camp"].has-victory-growth:not([data-home-suspended="true"]) #home-vista { min-height:720px; height:100%; margin:0; padding:42px 32px 34px; }
  body[data-home="camp"].has-victory-growth:not([data-home-suspended="true"]) #home-vista .arrival-copy { width:100%; max-width:360px; padding-bottom:80px; }
  body[data-home="camp"].has-victory-growth:not([data-home-suspended="true"]) #home-vista::before { background:linear-gradient(90deg,#071c1de8,#071c1d99 46%,#06181933),linear-gradient(0deg,#071819d9,transparent 65%); }
  body[data-home="camp"].has-victory-growth:not([data-home-suspended="true"]) .home-key-art { object-position:77% center; }
  body[data-home="camp"].has-victory-growth:not([data-home-suspended="true"]) #home-vista h1 { font-size:56px; }
  html[lang="zh-Hant"] body[data-home="camp"].has-victory-growth:not([data-home-suspended="true"]) #home-vista h1 { font-size:44px; }
  body[data-home="camp"].has-victory-growth:not([data-home-suspended="true"]) .home-party { inset-inline:27px; gap:8px; justify-content:space-between; }
  body[data-home="camp"].has-victory-growth:not([data-home-suspended="true"]) .home-companion { flex-direction:column; gap:6px; text-align:center; }
  body[data-home="camp"].has-victory-growth:not([data-home-suspended="true"]) #victory-growth { margin:0; min-width:0; }
  body[data-home="camp"].has-victory-growth:not([data-home-suspended="true"]) .vg-company { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media(max-width:999px) {
  body[data-home="camp"].has-victory-growth:not([data-home-suspended="true"]) #home-arrival { display:flex; flex-direction:column; }
  body[data-home="camp"].has-victory-growth:not([data-home-suspended="true"]) #victory-growth { order:-1; }
}
@media(max-width:1100px) {
  .topbar { gap:8px 14px; }
  .topbar .brand>span:last-child { font-size:20px; }
  .topbar .adventure-nav-item { padding-inline:9px; font-size:12px; }
  body[data-home="camp"] #home-vista { min-height:575px; padding:40px; }
  body[data-home="camp"] #home-vista .arrival-copy { width:52%; }
  .home-party { inset-inline:40px; }
}
@media(max-width:800px) {
  .topbar { padding-block:12px; }
  .topbar .adventure-nav { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); flex-basis:100%; min-width:0; width:100%; order:3; justify-content:center; }
  .topbar .adventure-nav-item { flex:1; min-height:44px; }
  .topbar .top-actions { margin-left:auto; }
  .topbar .game-settings-trigger { font-size:11px; }
  body[data-home="camp"] #home-vista { margin-top:12px; min-height:550px; padding:32px; }
  body[data-home="camp"] #home-vista .arrival-copy { width:59%; }
  .home-party { inset-inline:32px; gap:15px; }
  .home-companion { gap:6px; }
  .home-companion img { width:32px; height:35px; }
}
@media(max-width:600px) {
  .topbar .brand>span:last-child { font-size:18px; }
  .topbar .brand-mark { width:26px; }
  .topbar .brand { gap:5px; }
  .topbar .top-actions>.quiet-button,.home-tools>summary { padding-inline:7px; }
  .topbar .adventure-nav { gap:1px; }
  .topbar .adventure-nav-item { flex-direction:column; gap:4px; min-height:60px; font-size:11px; padding:8px 3px; }
  .topbar .adventure-nav-item>span { min-width:0; max-width:100%; white-space:normal; overflow-wrap:anywhere; }
  body[data-home="camp"] .app-shell { padding-inline:12px; }
  body[data-home="camp"] #home-vista { display:block; min-height:0; padding:270px 24px 110px; border-radius:14px; }
  body[data-home="camp"] .home-key-art { height:400px; object-position:83% 64%; }
  body[data-home="camp"] #home-vista::before { background:linear-gradient(0deg,#0b2021 32%,#0b2021e6 49%,#0b202100 76%); }
  body[data-home="camp"] #home-vista .arrival-copy { width:100%; max-width:none; padding:0; }
  body[data-home="camp"] #home-vista .eyebrow { margin-bottom:13px; }
  body[data-home="camp"] #home-vista h1 { font-size:43px; max-width:11ch; margin-bottom:16px; }
  html[lang="zh-Hant"] body[data-home="camp"] #home-vista h1 { font-size:34px; max-width:8em; line-height:1.3; }
  .home-chapter { font-size:13px; }
  body[data-home="camp"] #home-vista #arrival-description { font-size:13px; line-height:1.7; }
  .home-actions { gap:8px; margin-top:12px; }
  .home-primary { width:100%; min-height:58px; font-size:19px; padding:15px 23px; }
  .home-friends { align-self:center; }
  .home-quiet-actions { justify-content:space-between; width:100%; gap:3px 10px; }
  .home-quiet-actions button { font-size:10px; }
  /* Keep the illustrated company in flow as names and text size grow. */
  body[data-home="camp"][data-screen="home"] #home-vista { padding-bottom:24px; }
  .home-party { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); position:relative; inset:auto; width:100%; gap:8px; margin-top:20px; padding-top:16px; }
  .home-companion { flex-direction:row; gap:8px; min-width:0; min-height:64px; padding:7px 6px; border:1px solid #cdbb8155; border-radius:10px; background:#132d29cc; text-align:left; }
  .home-companion img { flex:none; width:44px; height:48px; }
  .home-companion>span { min-width:0; font-size:.875rem; line-height:1.4; overflow-wrap:anywhere; }
  .home-companion small { display:block; font-size:.75rem; letter-spacing:.03em; }
  .home-companion:focus-visible { outline-offset:-3px; }
  html[data-text-size="large"] .home-companion>span { font-size:1rem; }
  html[data-text-size="large"] .home-companion small { font-size:.8125rem; }
  html[data-contrast="high"] .home-companion { background:#102723; border-color:#ead8a2; color:#fff7df; }
}
@media(max-width:480px) {
  html[data-text-size="large"] .home-party { grid-template-columns:1fr; }
}
@media(max-width:360px) {
  .topbar .brand>span:last-child { font-size:15px; }
  .topbar .game-settings-trigger { max-width:55px; font-size:10px; }
  .topbar .adventure-nav-item { padding-inline:2px; font-size:10.5px; }
  body[data-home="camp"] #home-vista { padding-inline:19px; padding-top:245px; }
  body[data-home="camp"] #home-vista h1 { font-size:38px; }
  html[lang="zh-Hant"] body[data-home="camp"] #home-vista h1 { font-size:30px; }
}
@media(prefers-reduced-motion:reduce) { .home-primary,.home-companion,.home-friends { transition:none; animation:none; } }
html[data-contrast="high"] .home-primary { background:#34553b; color:#fff7df; border-color:#ffe7a9; }
html[data-contrast="high"] :is(.home-save,.home-quiet-actions button,.home-companion small) { color:#ecebd9; }

/* Earned skill points stay attached to their illustrated companion. */
.home-companion[data-skill-ready="true"] img { border-color:#ead08e; }
.home-companion .home-companion-ready { display:block; color:#ead08e; font-size:.75rem; line-height:1.4; letter-spacing:0; white-space:normal; overflow-wrap:anywhere; }
.home-companion .home-companion-ready[hidden] { display:none; }
html[data-text-size="large"] .home-companion .home-companion-ready { font-size:.8125rem; }
html[data-contrast="high"] .home-companion .home-companion-ready { color:#fff7df; }

/* A quiet, story-authored lantern trail: chapters reached, not future spoilers. */
.home-journey-trail { display:flex; flex-direction:column; gap:8px; width:min(336px,100%); min-width:0; margin:12px 0 6px; }
.home-journey-trail[hidden] { display:none!important; }
.home-journey-caption { display:block; color:#d9c99f; font-size:11px; line-height:1.5; font-weight:600; letter-spacing:.035em; font-variant-numeric:tabular-nums; }
.home-journey-markers { display:flex; align-items:center; gap:4px; width:100%; height:16px; }
.home-journey-waypoint { flex:1 1 0; min-width:0; height:6px; border-radius:9px; border:1px solid #73917d63; background:#617b6840; }
.home-journey-waypoint[data-state="past"] { border-color:#b4a7789c; background:#bca775; }
.home-journey-waypoint[data-state="current"] { height:12px; border-color:#f4dda0; background:#f0d08c; box-shadow:0 0 0 2px #bfa5683d; }
.home-journey-waypoint[data-act-start="true"] { margin-inline-start:5px; }
html[data-contrast="high"] .home-journey-caption { color:#fff2cc; }
html[data-contrast="high"] .home-journey-waypoint[data-state="future"] { border-color:#cbd7d0; background:#223a32; }
html[data-contrast="high"] .home-journey-waypoint[data-state="current"] { background:#fff1bc; border-color:#fff; }

/* Medium-width Home: put the illustrated company after controls, not in their
   reserved space. The compact game grid begins at 640px; card text can wrap
   through 800px, so keep both medium widths in the same natural flow. */
@media (min-width:601px) and (max-width:800px) {
  body[data-home="camp"][data-screen="home"] #home-vista { display:block; padding-bottom:32px; }
  body[data-home="camp"][data-screen="home"] #home-vista .arrival-copy { padding-bottom:0; }
  body[data-home="camp"] .home-party { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); position:relative; inset:auto; width:100%; gap:8px; margin-top:24px; padding-top:16px; }
  body[data-home="camp"] .home-companion { flex-direction:row; gap:8px; min-width:0; min-height:64px; padding:7px 6px; border:1px solid #cdbb8155; border-radius:10px; background:#132d29cc; text-align:left; }
  body[data-home="camp"] .home-companion img { flex:none; width:44px; height:48px; }
  body[data-home="camp"] .home-companion>span { min-width:0; font-size:.875rem; line-height:1.4; overflow-wrap:anywhere; }
  body[data-home="camp"] .home-companion small { display:block; font-size:.75rem; letter-spacing:.03em; }
  body[data-home="camp"] .home-companion:focus-visible { outline-offset:-3px; }
  html[data-text-size="large"] body[data-home="camp"] .home-companion>span { font-size:1rem; }
  html[data-text-size="large"] body[data-home="camp"] .home-companion small { font-size:.8125rem; }
  html[data-contrast="high"] body[data-home="camp"] .home-companion { background:#102723; border-color:#ead8a2; color:#fff7df; }
}

/* Keep illustrated companions below Home actions across desktop and victory. */
@media (min-width:801px) {
  body[data-home="camp"] .home-companion { min-height:64px; min-width:0; }
  body[data-home="camp"] .home-companion img { flex:none; width:44px; height:48px; }
  body[data-home="camp"] .home-companion>span { min-width:0; font-size:.875rem; line-height:1.4; overflow-wrap:anywhere; }
  body[data-home="camp"] .home-companion small { font-size:.75rem; letter-spacing:.03em; }
}
@media (min-width:801px) and (max-width:1100px) {
  body[data-home="camp"][data-screen="home"] #home-vista { display:block; padding-bottom:34px; }
  body[data-home="camp"][data-screen="home"] #home-vista .arrival-copy { padding-bottom:0; }
  body[data-home="camp"][data-screen="home"] .home-party { position:relative; inset:auto; display:grid; width:100%; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:24px; padding-top:16px; }
  body[data-home="camp"][data-screen="home"] .home-companion { flex-direction:row; gap:8px; min-height:64px; padding:7px 9px; border:1px solid #cdbb8155; border-radius:10px; background:#132d29cc; text-align:left; }
}
@media (min-width:1000px) {
  body[data-home="camp"].has-victory-growth:not([data-home-suspended="true"]) #home-vista { display:flex; flex-direction:column; align-items:stretch; justify-content:space-between; }
  body[data-home="camp"].has-victory-growth:not([data-home-suspended="true"]) #home-vista .arrival-copy { padding-bottom:0; flex:0 0 auto; }
  body[data-home="camp"].has-victory-growth:not([data-home-suspended="true"]) .home-party { position:relative; inset:auto; display:grid; width:100%; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:24px; padding-top:16px; }
  body[data-home="camp"].has-victory-growth:not([data-home-suspended="true"]) .home-companion { flex-direction:row; gap:8px; min-height:64px; padding:7px 8px; border:1px solid #cdbb8155; border-radius:10px; background:#132d29cc; text-align:left; }
}
@media (min-width:1101px) {
  body[data-home="camp"][data-screen="home"]:is(:not(.has-victory-growth), [data-home-suspended="true"]) #home-vista { display:flex; flex-direction:column; align-items:stretch; justify-content:space-between; }
  body[data-home="camp"][data-screen="home"]:is(:not(.has-victory-growth), [data-home-suspended="true"]) #home-vista .arrival-copy { padding-bottom:0; flex:0 0 auto; }
  body[data-home="camp"][data-screen="home"]:is(:not(.has-victory-growth), [data-home-suspended="true"]) .home-party { position:relative; inset:auto; display:grid; width:100%; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-top:24px; padding-top:16px; }
  body[data-home="camp"][data-screen="home"]:is(:not(.has-victory-growth), [data-home-suspended="true"]) .home-companion { flex-direction:row; gap:9px; min-height:64px; padding:8px 10px; border:1px solid #cdbb8155; border-radius:10px; background:#132d29cc; text-align:left; }
}

/* Comfort preferences apply to the company at every viewport. Keep these after
   the desktop/victory card rules so enlarging the window does not undo them. */
html[data-text-size="large"] body[data-home="camp"] .home-companion>span { font-size:1rem; }
html[data-text-size="large"] body[data-home="camp"] .home-companion small { font-size:.8125rem; }
html[data-contrast="high"] body[data-home="camp"][data-screen="home"] .home-companion { background:#102723; border-color:#ead8a2; color:#fff7df; }

/* Established landscapes appear only after their canonical act opens.
   Still imagery is retained with Calm, Low and reduced motion. */
body[data-home="camp"] #home-vista[data-home-region="tides"] .home-key-art { object-position:55% 51%; }
body[data-home="camp"] #home-vista[data-home-region="astral"] .home-key-art { object-position:50% 48%; }
@media (max-width:600px) {
  body[data-home="camp"] #home-vista[data-home-region="tides"] .home-key-art,
  body[data-home="camp"] #home-vista[data-home-region="astral"] .home-key-art { object-position:29% 48%; }
}

/* The story's earned dawn uses the existing canonical painting and its
   centered horizon. No animation or image request is introduced beforehand. */
body[data-home="camp"] #home-vista[data-home-region="dawn"] .home-key-art { object-position:50% 48%; }
@media (max-width:600px) {
  body[data-home="camp"] #home-vista[data-home-region="dawn"] .home-key-art { object-position:50% 48%; }
}

/* Ranked trials are their own journeys: show route, rank and wave without
   implying new campaign chapters or changing the approved 2D painting. */
body[data-home="camp"] #home-chapter[data-context="trial"] {
  display:inline-block; max-width:100%; padding:6px 11px;
  border:1px solid #ccb98169; border-radius:9px;
  background:#0f2928cf; color:#f0dfb5; overflow-wrap:anywhere;
}
html[data-contrast="high"] body[data-home="camp"] #home-chapter[data-context="trial"] {
  border-color:#f1db99; background:#102722; color:#fff6d7;
}
