/* Third pass: stronger hierarchy, shorter travel and useful motion feedback. */
:root { --canvas: #f3f5f2; --surface: #ffffff; --ink: #24362e; --line: #dce4de; }
body { background-color: var(--canvas); }

.free-access-notice { padding: 10px 14px; margin-bottom: 25px; background: #e8efe3; border-color: #d1decb; border-left-color: #608852; }
.free-access-icon { height: 30px; flex-basis: 30px; background: #d8e6cf; }
.free-access-copy p { line-height: 1.7; }
#page-planner > .hero { margin-bottom: 22px; padding-bottom: 21px; }
#page-planner .real-banner.mission-stage { min-height: 330px; padding-bottom: 100px; margin-bottom: 22px; border-radius: 8px; box-shadow: none; }
.mission-bottom { min-height: 76px; }
.mission-map-list { position: relative; isolation: isolate; }
.mission-map-indicator { position: absolute; left: 0; top: 0; height: 100%; background: #d4e8a3; pointer-events: none; z-index: 0; }
.mission-map-list button { z-index: 1; }
.mission-map-motion button[aria-pressed="true"] { background: transparent; }
.mission-map-list button { display: flex; align-items: center; gap: 9px; padding: 12px 13px; min-width: 112px; }
.mission-map-list button > img { width: 43px; height: 39px; flex: 0 0 43px; object-fit: cover; border: 1px solid #c4dd9a26; border-radius: 3px; opacity: .55; filter: saturate(.3); transition: opacity .22s, filter .22s; }
.mission-map-list button[aria-pressed="true"] > img { opacity: 1; filter: saturate(.9); border-color: #405a2733; }
.mission-map-list button:hover > img { opacity: 1; filter: saturate(.9); }
.mission-map-caption { display: flex; flex-direction: column; gap: 4px; white-space: nowrap; }
.mission-map-list button small { margin: 0; }
.mission-prepare { min-width: 105px; }
.mission-prepare > span { transition: transform .22s; }
.mission-prepare:hover > span { transform: translate(3px, -3px); }
.corner-b { bottom: 88px; }
.real-board > .home-passwords { margin: 0 0 26px; padding: 17px 19px 15px; background: #ffffffa6; border: 1px solid var(--line); border-radius: 6px; }
.real-board .home-password-heading { margin-bottom: 12px; }
.real-board .home-password-heading h2 { font-size: 18px; }
.real-board .home-password-foot { margin-top: 9px; }
.real-board .home-password-card { padding: 10px 11px; background: #fcfdf9; }
.real-board .home-password-bottom { margin-top: 10px; }
.real-board .home-password-grid { gap: 8px; }
:is(.primary, .secondary, .text-button) { transition: background-color .2s, color .2s, border-color .2s, box-shadow .2s; }
.primary:hover { box-shadow: none; }
.gun-weapon-cell strong { font-weight: 650; }
.gun-scheme-row { transition: background-color .2s, border-color .2s; }
.gun-scheme-row:hover { background-color: #eef3e9; }
.gun-ranking ol > li { transition: background-color .2s; }
.gun-ranking ol > li:hover { background-color: #eaf1e4; }
.topbar { position: sticky; top: 0; z-index: 40; isolation: isolate; }
.reading-progress { position: absolute; bottom: -1px; left: 0; right: 0; height: 2px; transform-origin: left; transform: scaleX(0); background: #8caa63; pointer-events: none; }
.topbar-right { gap: 20px; }
.quick-nav-trigger { display: inline-flex; align-items: center; gap: 9px; padding: 7px 9px; background: #f0f3eb; color: #405c4b; border: 1px solid #dce4d6; border-radius: 5px; font: inherit; font-size: 11px; cursor: pointer; transition: color .2s, background .2s; }
.quick-nav-trigger:hover { background: #e3ecd9; color: #294431; }
.quick-nav-trigger svg { width: 14px; height: 14px; }
.quick-nav-trigger kbd { border: 1px solid #d0d9c9; border-radius: 3px; color: #5a685e; padding: 0 4px; font: 11px/18px Consolas, monospace; background: #ffffff; }
#quick-nav-dialog { width: min(570px, calc(100vw - 32px)); max-height: min(690px, calc(100dvh - 48px)); padding: 0; overflow: hidden; border: 1px solid #d2ddc9; border-radius: 12px; background: #f9fbf4; color: var(--ink); box-shadow: 0 32px 120px #0d271959; }
#quick-nav-dialog::backdrop { background: #10251d73; backdrop-filter: blur(7px); }
.quick-nav-head { display: flex; justify-content: space-between; gap: 12px; padding: 23px 25px 15px; }
.quick-nav-head .eyebrow { font-size: 11px; color: #5e7062; }
.quick-nav-head h2 { font-size: 22px; color: #293f2d; margin: 4px 0 0; letter-spacing: 0; }
.quick-nav-head .icon-button { align-self: flex-start; font-size: 22px; background: transparent; border: 0; color: #708169; cursor: pointer; }
.quick-nav-search { margin: 0 24px 15px; display: flex; align-items: center; gap: 11px; padding: 11px 14px; border-radius: 5px; border: 1px solid #cddcc0; background: #fff; }
.quick-nav-search:focus-within { border-color: #658b50; box-shadow: 0 0 0 3px #afc79320; }
.quick-nav-search svg { width: 18px; height: 18px; color: #7d946f; flex-shrink: 0; }
.quick-nav-search input { width: 100%; padding: 0; min-height: 26px; border: 0; border-radius: 0; background: transparent; color: #2e452c; font-size: 13px; outline: 0; box-shadow: none; }
.quick-nav-search input::placeholder { color: #637267; }
.quick-nav-list { max-height: min(388px, calc(100dvh - 285px)); overflow-y: auto; overscroll-behavior: contain; padding: 0 12px 10px; scrollbar-width: thin; scrollbar-color: #c1cfb5 transparent; }
.quick-nav-option { display: flex; align-items: center; gap: 14px; padding: 11px 13px; margin: 3px 0; min-height: 62px; border: 1px solid transparent; border-radius: 6px; cursor: pointer; transition: background-color .15s, border-color .15s; }
.quick-nav-option[aria-selected="true"] { background: #e8f0dc; border-color: #d7e3c7; }
.quick-nav-option .quick-nav-icon { display: grid; place-items: center; width: 35px; height: 35px; background: #edf2e7; color: #60754f; border-radius: 4px; flex-shrink: 0; }
.quick-nav-option[aria-selected="true"] .quick-nav-icon { background: #d4e4ba; color: #3e5c30; }
.quick-nav-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.quick-nav-option strong { font-size: 13px; font-weight: 600; display: block; }
.quick-nav-option small { color: #637267; font-size: 11px; display: block; margin-top: 2px; }
.quick-nav-option > span:last-child { margin-left: auto; color: #799061; font-size: 16px; }
.quick-nav-help { display: flex; gap: 13px; padding: 12px 25px; font-size: 11px; color: #5e7062; background: #eef3e7; border-top: 1px solid #dce6d2; }
.quick-nav-help span:last-child { margin-left: auto; }
.quick-nav-empty { text-align: center; padding: 28px 12px; color: #819175; font-size: 13px; }
.has-copy-feedback { position: relative; }
.copy-feedback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 5px; border-radius: inherit; background: #e0edce; color: #42613b; pointer-events: none; font-size: 10px; z-index: 4; animation: copy-confirm .23s ease-out both; white-space: nowrap; }
@keyframes copy-confirm { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
@media (min-width: 1101px) {
  .real-planner-grid > .real-plan-controls { position: sticky; top: 88px; align-self: start; }
  .real-planner-grid > .real-plan-controls:has(details[open]) { position: static; }
}
@media (max-width: 1380px) {
  .mission-map-list button > img { width: 35px; flex-basis: 35px; height: 36px; }
  .mission-map-list button { min-width: 98px; padding: 12px 10px; gap: 7px; }
}
@media (min-width: 821px) and (max-width: 1100px) {
  .nav-item { overflow: visible; }
  .nav-item::after { content: attr(aria-label); position: absolute; left: calc(100% + 15px); top: 50%; transform: translate(-5px,-50%); background: #233c2f; color: #e4efd8; padding: 6px 12px; border-radius: 4px; font-size: 11px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .16s, transform .16s; box-shadow: 0 5px 15px #10261d30; }
  .nav-item:hover::after, .nav-item:focus-visible::after { opacity: 1; transform: translate(0,-50%); }
}
@media (max-width: 820px) {
  .topbar-right { gap: 10px; }
  .quick-nav-trigger { padding: 6px 8px; }
  .quick-nav-trigger kbd { display: none; }
  .mission-map-list button { flex: 0 0 115px; }
  .mission-prepare { min-width: 90px; }
  .real-board > .home-passwords { padding: 15px 14px; }
}
@media (max-width: 540px) {
  .topbar .phase-label { display: none; }
  .topbar .slash { margin: 0 7px; }
  .quick-nav-trigger { border-color: transparent; background: transparent; padding: 5px; font-size: 11px; gap: 5px; }
  .free-access-notice { padding: 11px 12px; margin-bottom: 22px; align-items: flex-start; gap: 10px; }
  .free-access-badge { display: none; }
  .free-access-copy strong { font-size: 12px; }
  .free-access-copy p { font-size: 11px; }
  #page-planner .real-banner.mission-stage { min-height: 410px; margin-bottom: 16px; }
  .mission-bottom { min-height: 72px; }
  .mission-map-list button { flex-basis: 117px; padding: 12px; }
  .mission-map-list button > img { height: 36px; width: 35px; flex-basis: 35px; }
  .mission-prepare { min-width: 85px; font-size: 11px; }
  .corner-b { bottom: 85px; }
  .real-board .home-password-heading { flex-wrap: wrap; gap: 6px; }
  .real-board .home-password-actions { gap: 12px; }
  .real-board .home-password-card { padding: 10px; }
  .real-board .home-password-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick-nav-head { padding: 20px 20px 14px; }
  .quick-nav-head h2 { font-size: 21px; }
  .quick-nav-search { margin: 0 18px 12px; }
  .quick-nav-help { padding: 12px 18px; }
  .quick-nav-help > span:first-child { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  .copy-feedback { animation: none; }
  .quick-nav-option, .mission-prepare > span, .mission-map-list button > img { transition: none; }
}
