/* 导航系统：任务栏导航条 / 🧭 行按钮 / 导航面板 / 新手引导卡 / 情境提示 */

/* ---------- 任务栏导航条（DOM 位于 .hud-quest 末尾，用 order 排到最上方，不影响 .q 的 nth-child 规则） ---------- */
.hud-quest .nav-row { --nc: var(--gold); order: -1; display: flex; align-items: center; gap: 6px; min-height: 28px; padding: 3px 4px 3px 6px; cursor: pointer;
  background: linear-gradient(90deg, rgba(40,30,78,.9), rgba(20,14,38,.74)); box-shadow: inset 2px 0 0 var(--nc), inset 0 0 0 1px rgba(255,255,255,.06); font-size: 12px; line-height: 1.3; transition: box-shadow .2s, background .2s; }
.hud-quest .nav-row:hover { background: linear-gradient(90deg, rgba(60,44,112,.92), rgba(26,18,50,.8)); }
.hud-quest .nav-row:not(.on) { width: max-content; max-width: 100%; opacity: .82; padding-right: 10px; }
.hud-quest .nav-row.on { box-shadow: inset 2px 0 0 var(--nc), inset 0 0 0 1px color-mix(in srgb, var(--nc) 35%, transparent), 0 0 12px color-mix(in srgb, var(--nc) 18%, transparent); }
.nav-row .nr-ic { width: 18px; height: 18px; flex: none; image-rendering: pixelated; filter: drop-shadow(0 1px 0 rgba(0,0,0,.6)); }
.nav-row.on .nr-ic { animation: navNeedle 3.2s ease-in-out infinite; }
.nav-row .nr-tx { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); text-shadow: 0 1px 0 #000; }
.nav-row .nr-tx b { font-weight: normal; color: var(--nc); }
.nav-row .nr-tx small { color: var(--dim); font-size: 11px; margin-left: 2px; }
.nav-row.none .nr-tx { color: var(--muted); }
.nav-row .nr-d { flex: none; color: var(--nc); font-variant-numeric: tabular-nums; text-shadow: 0 1px 0 #000; }
.nav-row .nr-d:empty { display: none; }
.nav-row button { flex: none; min-width: 22px; height: 22px; padding: 0 6px; border: 0; cursor: pointer; font-size: 11px; color: var(--text); background: rgba(255,255,255,.07); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.nav-row button:hover { background: rgba(255,255,255,.16); }
.nav-row .nr-act { color: #e6dcff; box-shadow: inset 0 0 0 1px rgba(201,168,255,.5); }
@keyframes navNeedle { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg); } }

/* ---------- 任务行上的 🧭 按钮 ---------- */
.hud-quest .q b .nav-rb { float: right; display: inline-flex; align-items: center; gap: 3px; margin: -3px -5px 0 6px; padding: 2px 4px; cursor: pointer; opacity: .62;
  background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); transition: opacity .15s, background .15s; }
.hud-quest .q b .nav-rb:hover { opacity: 1; background: rgba(255,255,255,.12); }
.hud-quest .q b .nav-rb img { width: 14px; height: 14px; image-rendering: pixelated; }
.hud-quest .q b .nav-rb i { font-style: normal; font-size: 11px; line-height: 1; color: var(--qc, var(--gold)); }
.hud-quest .q b .nav-rb i:empty { display: none; }
.hud-quest .q b .nav-rb.on { opacity: 1; background: color-mix(in srgb, var(--qc, var(--gold)) 16%, transparent); box-shadow: inset 0 0 0 1px var(--qc, var(--gold)); }
.hud-quest .q b .nav-rb.on img { animation: navNeedle 3.2s ease-in-out infinite; }
@media (pointer: coarse) {
  .hud-quest .q b .nav-rb { padding: 4px 6px; margin: -5px -6px 0 6px; opacity: .8; }
  .hud-quest .q b .nav-rb img { width: 16px; height: 16px; }
  .hud-quest .nav-row { min-height: 32px; }
  .nav-row button { min-width: 28px; height: 26px; }
}

/* ---------- 导航面板 ---------- */
.nav-status { --nc: var(--gold); display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin-bottom: 8px;
  background: linear-gradient(100deg, color-mix(in srgb, var(--nc) 14%, rgba(20,14,40,.85)), rgba(20,14,40,.6)); box-shadow: inset 0 0 0 2px var(--line2), inset 4px 0 0 var(--nc); }
.nav-status.on { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--nc) 55%, var(--line2)), inset 4px 0 0 var(--nc), 0 0 18px color-mix(in srgb, var(--nc) 14%, transparent); }
.nav-status .ic img { width: 40px; height: 40px; image-rendering: pixelated; display: block; filter: drop-shadow(0 2px 0 rgba(0,0,0,.5)); }
.nav-status .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.nav-status .t { font-size: 17px; color: var(--nc); text-shadow: 0 2px 0 #000; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-status .s { font-size: 12px; color: var(--muted); line-height: 1.5; }
.nav-status .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.nav-auto { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin: 0 2px 10px; font-size: 13px; cursor: pointer; }
.nav-auto input { width: 16px; height: 16px; accent-color: var(--gold); cursor: pointer; }
.nav-auto small { color: var(--dim); font-size: 11.5px; }
.nav-group { margin-bottom: 12px; }
.nav-group h4 { margin: 4px 2px 6px; font-weight: normal; font-size: 13px; color: #d8ccff; letter-spacing: .08em; display: flex; align-items: center; gap: 6px; }
.nav-group h4::before { content: ''; width: 7px; height: 7px; background: var(--px-dia) center / 7px no-repeat; flex: none; }
.nav-group h4 small { color: var(--dim); font-size: 11px; }
.nav-item { --ic: var(--gold); display: grid; grid-template-columns: 34px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; min-height: 50px; padding: 7px 10px; margin-bottom: 4px; cursor: pointer;
  background: rgba(22,16,44,.6); box-shadow: inset 0 0 0 1px rgba(255,255,255,.05), inset 2px 0 0 color-mix(in srgb, var(--ic) 55%, transparent); transition: background .12s; }
.nav-item:hover { background: rgba(70,54,140,.32); }
.nav-item.on { background: color-mix(in srgb, var(--ic) 12%, rgba(22,16,44,.8)); box-shadow: inset 0 0 0 2px var(--ic), inset 4px 0 0 var(--ic); }
.nav-item.locked { cursor: default; opacity: .55; }
.nav-item.locked:hover { background: rgba(22,16,44,.6); }
.nav-item.done .nm { color: #c8f0d0; }
.nav-item .ic img { width: 32px; height: 32px; image-rendering: pixelated; display: block; }
.nav-item .tx { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.nav-item .nm { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item .nm .mk { font-style: normal; color: var(--gold); margin-left: 6px; text-shadow: 0 0 6px rgba(255,216,74,.6); }
.nav-item .sb { font-size: 11.5px; color: var(--muted); line-height: 1.45; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.nav-item .dist { font-size: 12px; color: var(--ic); min-width: 38px; text-align: right; font-variant-numeric: tabular-nums; }
.nav-item .lock { font-size: 14px; opacity: .8; padding: 0 8px; }
.nav-sugs { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.nav-sug { --sc: var(--gold); display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 12px;
  background: linear-gradient(100deg, color-mix(in srgb, var(--sc) 10%, rgba(22,16,44,.75)), rgba(22,16,44,.55)); box-shadow: inset 3px 0 0 var(--sc), inset 0 0 0 1px rgba(255,255,255,.06); }
.nav-sug .ic img { width: 32px; height: 32px; image-rendering: pixelated; display: block; }
.nav-sug .tx { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.nav-sug .t { font-size: 14px; color: var(--sc); text-shadow: 0 1px 0 #000; }
.nav-sug .w { font-size: 12px; color: var(--muted); line-height: 1.55; }
.nav-foot { font-size: 11.5px; margin: 6px 2px; }
.nav-group.grid .nav-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); column-gap: 8px; }
.nav-auto small .kbd { margin-left: 4px; color: #e6dcff; }
@media (max-width: 760px), (pointer: coarse) {
  .nav-status { flex-wrap: wrap; gap: 8px 10px; padding: 9px 10px; }
  .nav-status .acts { width: 100%; justify-content: stretch; }
  .nav-status .acts .btn { flex: 1; min-height: 36px; }
  .nav-sugs { grid-template-columns: 1fr; }
  .nav-sug { grid-template-columns: 30px minmax(0, 1fr); }
  .nav-sug .ic img { width: 28px; height: 28px; }
  .nav-sug > .btn { grid-column: 2 / -1; justify-self: end; min-width: 104px; min-height: 34px; }
  .nav-item { grid-template-columns: 30px minmax(0, 1fr) auto auto; gap: 8px; min-height: 54px; padding: 7px 8px; }
  .nav-item .ic img { width: 28px; height: 28px; }
  .nav-item .btn { min-height: 34px; padding: 4px 12px; }
}

/* ---------- 新手引导卡 ---------- */
.nav-coach { position: fixed; left: 50%; bottom: calc(132px + var(--safe-b)); z-index: 28; width: min(400px, calc(100vw - 32px)); padding: 10px 14px 12px;
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none; transition: opacity .3s ease, transform .3s ease;
  background: linear-gradient(180deg, rgba(40,30,80,.95), rgba(16,11,32,.95)); box-shadow: 0 0 0 2px var(--ink), inset 0 0 0 2px #6a52b8, inset 0 0 0 3px rgba(255,216,74,.18), 0 10px 30px rgba(0,0,0,.5); }
.nav-coach.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.nav-coach .nc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.nav-coach .nc-k { font-size: 11px; letter-spacing: .12em; color: var(--violet); }
.nav-coach .nc-skip { border: 0; background: none; cursor: pointer; color: var(--dim); font-size: 11px; padding: 2px 0; }
.nav-coach .nc-skip:hover { color: var(--muted); text-decoration: underline; }
.nav-coach .nc-t { margin-top: 2px; font-size: 18px; color: var(--gold); letter-spacing: .1em; text-shadow: 0 2px 0 #000, 0 0 12px rgba(255,216,74,.35); }
.nav-coach .nc-d { margin-top: 4px; font-size: 13px; line-height: 1.75; color: var(--text); }
.nav-coach .nc-d .gold { color: var(--gold); }
.nav-coach .nc-ic { width: 16px; height: 16px; image-rendering: pixelated; vertical-align: -3px; }
.nav-coach kbd { display: inline-block; min-width: 20px; margin: 0 2px; padding: 0 5px; font-family: var(--px); font-size: 12px; line-height: 19px; text-align: center; color: #fff;
  background: linear-gradient(180deg, #2e2558, #1a1430); box-shadow: inset 0 0 0 1px var(--line2), inset 0 -2px 0 rgba(0,0,0,.45); }
.nav-coach .nc-bar { margin-top: 8px; height: 4px; background: rgba(255,255,255,.08); box-shadow: 0 0 0 1px rgba(7,4,15,.6); }
.nav-coach .nc-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ffd84a, #fff2b0); transition: width .25s ease; box-shadow: 0 0 8px rgba(255,216,74,.6); }
.nav-coach.done { box-shadow: 0 0 0 2px var(--ink), inset 0 0 0 2px var(--green), 0 0 24px rgba(125,255,138,.3); }
.nav-coach.done .nc-t::after { content: ' ✓'; color: var(--green); }
@media (max-width: 760px), (pointer: coarse) {
  .nav-coach { bottom: auto; top: 46%; width: min(320px, calc(100vw - 32px)); padding: 9px 12px 10px; }
  .nav-coach .nc-t { font-size: 16px; }
  .nav-coach .nc-d { font-size: 12.5px; line-height: 1.65; }
}
@media (orientation: portrait) and (max-width: 760px) { .nav-coach { top: auto; bottom: calc(262px + var(--safe-b)); } }
@media (orientation: landscape) and (max-height: 500px) { .nav-coach { top: auto; bottom: calc(8px + var(--safe-b)); width: min(300px, 38vw); padding: 7px 10px 8px; } .nav-coach .nc-t { font-size: 14px; } .nav-coach .nc-d { font-size: 12px; line-height: 1.5; } }

/* ---------- 情境提示（toast 内的操作按钮） ---------- */
.nav-hint { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.nav-hint .btn { pointer-events: auto; }

/* 金色按钮（独立类名：避免被全局 .gold 文字色工具类覆盖成金底金字） */
.btn.nav-gold { --c: #e0a020; --hi: #ffe680; --lo: #a86a10; color: #2a1a00; text-shadow: 0 1px 0 rgba(255,255,255,.45); }
@media (orientation: landscape) and (max-height: 500px) {
  .nav-status { flex-wrap: nowrap; padding: 6px 10px; margin-bottom: 6px; } .nav-status .acts { width: auto; } .nav-status .acts .btn { flex: none; min-height: 32px; }
  .nav-status .ic img { width: 32px; height: 32px; } .nav-status .t { font-size: 15px; }
  .nav-auto { margin-bottom: 6px; }
}
.nr-hint { margin-left: 6px; font-size: 11px; color: #9a90c0; font-weight: normal; }

/* 导航状态：右上角时钟下方（仅导航中显示） */
.hud-wcol { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.hud-navslot:empty { display: none; }
.hud-navslot .nav-row { --nc: var(--gold); display: flex; align-items: center; gap: 6px; width: 190px; min-height: 28px; padding: 3px 4px 3px 6px; cursor: pointer; pointer-events: auto;
  background: linear-gradient(90deg, rgba(40,30,78,.92), rgba(20,14,38,.82)); box-shadow: 0 0 0 2px var(--ink, #0a0716), inset 2px 0 0 var(--nc), inset 0 0 0 1px rgba(255,255,255,.08); font-size: 12px; line-height: 1.3; }
.hud-navslot .nav-row:hover { background: linear-gradient(90deg, rgba(60,44,112,.95), rgba(26,18,50,.88)); }
.hud-navslot .nav-row button { pointer-events: auto; }
@media (max-width: 760px) { .hud-navslot .nav-row { width: 150px; font-size: 11px; } }
.hud-navslot .nav-row { position: relative; }
.hud-navslot .nav-row.flash { animation: navPillIn .9s cubic-bezier(.2, 1.4, .4, 1); }
.hud-navslot .nav-row.flash::before { content: attr(data-start); position: absolute; right: 0; top: -20px; padding: 1px 8px; font-size: 11px; color: #2a1a00; background: linear-gradient(180deg, #ffe680, #e0a020);
  box-shadow: 0 0 0 1px #0a0716, 0 0 12px rgba(255,216,74,.7); white-space: nowrap; pointer-events: none; animation: navTag 2.2s ease-out forwards; }
@keyframes navPillIn { 0% { transform: translateX(24px) scale(.92); opacity: 0; box-shadow: 0 0 0 2px #0a0716, 0 0 28px rgba(255,216,74,.9); } 60% { box-shadow: 0 0 0 2px #0a0716, 0 0 22px rgba(255,216,74,.7); } }
@keyframes navTag { 0% { opacity: 0; transform: translateY(6px); } 12%, 75% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-4px); } }
