/* Night Patrol screens. Same palette as the duel: teal = you can go here, lantern = main button, gold = rewards. */
.patrol-btn { background: linear-gradient(180deg, #7ff0e2, var(--teal)); color: #06231f; box-shadow: 0 5px 0 #2a8f84, 0 0 30px rgba(95,224,208,.3); }
.patrol-btn:active { box-shadow: 0 1px 0 #2a8f84; }
.big-btn small { display: block; font-family: var(--body); font-size: 12px; font-weight: 800; letter-spacing: 0; opacity: .75; }

.np { position: relative; }
.np > .bg { position: absolute; inset: 0; background: url(img/bg_hall.jpg) center 20% / cover; opacity: .16; pointer-events: none; }
.np > * { position: relative; }
.np-body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; padding-bottom: 12px; }
.np-h3 { margin: 6px 0 0; font-family: var(--display); font-weight: 400; font-size: 18px; color: var(--gold); }
.np-lede { margin: 0; color: var(--dim); font-size: 14px; line-height: 1.6; }
.np-hint { margin: 0; text-align: center; font-size: 12px; color: var(--dim); min-height: 1em; }
.np-gain { margin: 0; text-align: center; font-weight: 900; color: var(--gold); }
.np-pill { border: 1px solid var(--line); background: var(--ink-2); border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 800; }
.np-pill.on { border-color: var(--teal); color: var(--teal); }
.np-price { font-weight: 900; color: var(--gold); white-space: nowrap; }

/* home */
#patrol-home .np-hero-art { height: 150px; border-radius: 16px; background: url(img/bg_boss.jpg) center 40% / cover; box-shadow: inset 0 -60px 60px -20px var(--ink); }
.np-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; font-size: 12px; color: var(--dim); }
.np-meta b { display: block; font-family: 'Lilita One', var(--display); font-size: 26px; color: var(--paper); font-weight: 400; }
#patrol-home, #patrol-start { overflow-y: auto; }
.hero-pick.on { border-color: var(--teal); box-shadow: 0 0 0 2px var(--teal); }
.np-asc { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; }
.np-asc small { flex-basis: 100%; color: var(--dim); font-weight: 700; }
.np-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 8px; justify-items: center; }
.card.cant { filter: grayscale(.9) brightness(.55); }

/* status strip */
.np-status { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 15px; min-width: 0; }
.np-hp { color: var(--blood); white-space: nowrap; }
.np-gold { color: var(--gold); white-space: nowrap; }
/* blessings: one tappable row of icons (run-ui.js blessRow), "+n" past the first few, never wider than its room */
.np-bless-row { display: flex; align-items: center; gap: 3px; min-width: 0; overflow: hidden; border: 1px solid var(--line); background: var(--ink-2); border-radius: 999px; padding: 4px 8px; color: var(--gold); }
.np-bless-row i { font-style: normal; display: grid; flex: none; }
.np-bless-row i.used { opacity: .35; }
.np-bless-row b { font-size: 12px; font-weight: 900; color: var(--paper); flex: none; }
.np-relics { margin-left: auto; flex: 0 1 auto; }

/* map */
.np-map { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: safe center; border: 1px solid var(--line); border-radius: 16px; background: rgba(24,21,48,.7); padding: 8px 0; }
.np-map-in { position: relative; margin: 0 auto; flex: none; width: min(100%, 340px); }
.np-map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.np-map line { stroke: var(--line); stroke-width: 2; stroke-dasharray: 4 5; }
.np-map line.walked { stroke: var(--teal); stroke-dasharray: none; opacity: .7; }
.np-node { position: absolute; transform: translate(-50%, -50%); width: 64px; border: 0; background: none; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; opacity: .55; }
.np-node em, .np-node i { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--line); background: var(--ink-3) center / cover; display: grid; place-items: center; font-style: normal; font-size: 20px; font-weight: 900; }
.np-node span { font-size: 11px; font-weight: 800; color: var(--dim); white-space: nowrap; }
.np-node.elite em, .np-node.elite i { border-color: var(--blood); }
.np-node.boss { width: 112px; transform: translate(-50%, -31px); } /* anchored on the portrait; the name hangs below */
.np-node.boss i { width: 62px; height: 62px; border-color: var(--blood); box-shadow: 0 0 20px rgba(255,90,106,.4); }
.np-node.boss span { color: var(--blood); font-size: 12px; }
.np-node.shop em { color: var(--gold); }
.np-node.rest em { color: var(--lamp); }
.np-node.event em { color: var(--ice); }
.np-node.can { opacity: 1; }
.np-node.can em, .np-node.can i { border-color: var(--teal); box-shadow: 0 0 14px rgba(95,224,208,.6); animation: np-pulse 1.4s ease-in-out infinite; }
.np-node.can span { color: var(--paper); }
.np-node.done { opacity: .9; }
.np-node.done em, .np-node.done i { background-color: var(--line); filter: grayscale(.6); }
.np-node.here em, .np-node.here i { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255,207,90,.35); }
@keyframes np-pulse { 50% { transform: scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .np-node.can em, .np-node.can i { animation: none; } }

/* before a fight */
#patrol-vs, .np-floor { justify-content: center; }
.np-vs, .np-floor { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.np-vs h2, .np-floor h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 32px; }
.np-foe { width: 150px; height: 150px; border-radius: 50%; background: center / cover; border: 3px solid var(--blood); box-shadow: 0 0 40px rgba(255,90,106,.35); }
.np-foehp { margin: 0; font-weight: 900; color: var(--blood); font-size: 18px; }
.np-rule { border: 1px solid var(--blood); background: rgba(255,90,106,.08); border-radius: 12px; padding: 10px 12px; font-size: 14px; line-height: 1.5; max-width: 24em; }
.np-rule b { display: block; color: var(--blood); font-size: 13px; }
.np-you { margin: 0; color: var(--dim); font-size: 13px; }
.np-vs .big-btn, .np-floor .big-btn, .np-floor .ghost-btn { align-self: stretch; }
.np-floor p { margin: 0; color: var(--dim); line-height: 1.6; }
.np-floor.win h2 { color: var(--gold); }
.np-floor.lose h2 { color: var(--blood); }
.np-floor .np-meta { align-self: stretch; }

/* packs and relics */
.np-pack { border: 1px solid var(--line); border-radius: 14px; background: var(--ink-2); padding: 10px; display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.np-pack.sold { opacity: .45; }
.np-pack-h { grid-column: 1 / -1; display: flex; justify-content: space-between; font-size: 14px; }
.np-pack-cards { display: flex; gap: 8px; }
.np-pack .ghost-btn { padding: 10px 14px; }
.np-relic-list { display: flex; flex-direction: column; gap: 8px; }
.np-relic-card { display: flex; gap: 10px; align-items: center; text-align: left; border: 1px solid var(--line); background: var(--ink-2); border-radius: 14px; padding: 10px 12px; }
.np-relic-card.boss { border-color: var(--gold); }
.np-relic-card em { font-style: normal; font-size: 26px; }
.np-relic-card div { flex: 1; }
.np-relic-card b { display: block; font-size: 15px; }
.np-relic-card small { color: var(--dim); font-size: 13px; line-height: 1.45; }
.np-relic-card:disabled { opacity: .45; }
.np-singles { display: flex; gap: 16px; }
.np-single { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.np-single.sold { opacity: .45; }
.np-single .ghost-btn { padding: 6px 10px; font-size: 13px; }

/* rest and events */
.np-rest { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.np-choice { border: 1px solid var(--line); background: var(--ink-2); border-radius: 16px; padding: 16px; display: grid; grid-template-columns: 44px 1fr; text-align: left; gap: 2px 10px; }
.np-choice em { grid-row: span 2; font-style: normal; font-size: 32px; }
.np-choice b { font-size: 17px; }
.np-choice small { color: var(--dim); font-size: 13px; }
.np-choice:disabled { opacity: .45; }
.np-event { display: flex; flex-direction: column; gap: 10px; }
.np-event p { margin: 4px 0 8px; font-size: 16px; line-height: 1.7; }
.np-opt { border: 1px solid var(--teal); background: var(--ink-2); border-radius: 14px; padding: 13px 14px; text-align: left; font-weight: 800; font-size: 15px; }
.np-opt:disabled { border-color: var(--line); opacity: .6; }
/* why an option is closed (e.g. the deck's 5-card floor): under the option, or under the kiosk's button */
.np-why { display: block; margin: 4px 0 0; font-size: 12px; font-weight: 400; color: var(--dim); }
p.np-why { text-align: center; margin: -4px 0 6px; }

/* sheets (deck view, polish choice) */
.np-sheet { position: absolute; inset: 0; z-index: 30; background: rgba(8,6,18,.78); display: flex; align-items: flex-end; }
.np-sheet-box { width: 100%; max-height: 86%; background: var(--ink-2); border-top: 1px solid var(--line); border-radius: 20px 20px 0 0; padding: 16px 14px calc(14px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 10px; }
.np-up { display: flex; gap: 14px; justify-content: center; }
.np-up-opt { cursor: pointer; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 800; font-size: 13px; color: var(--teal); }
.np-sheet-box small { color: var(--dim); }
.np-ladder { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.np-ladder i { width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--line); background: var(--ink-3); display: grid; place-items: center; font-style: normal; font-weight: 900; font-size: 12px; color: var(--dim); }
.np-ladder i.on { background: var(--teal); border-color: var(--teal); color: var(--ink); }
.np-ladder small { flex-basis: 100%; }

/* inside the duel */
.np-hud { display: flex; align-items: center; gap: 8px; min-height: 0; margin: -4px 0; }
.np-rulechip { border: 1px solid var(--blood); background: rgba(255,90,106,.12); color: var(--blood); border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 900; }
.np-hud-relics { padding: 2px 6px; flex: 0 1 auto; margin-left: auto; }

/* pixel icons (pxicons.js): relics in gold, room and rule icons in the text colour around them */
.px-ico { display: inline-block; vertical-align: middle; flex: none; }
.np-relic-card em, .hero-pick .pw .px-ico { color: var(--gold); }
.np-choice em { display: grid; place-items: center; color: var(--teal); }
.np-rulechip .px-ico { vertical-align: -1px; }
/* the boss's next move (run.js intent): urgent the turn before it happens */
.np-rulechip { max-width: 100%; text-align: left; line-height: 1.35; }
.np-rulechip.soon { background: var(--blood); color: var(--ink); animation: np-soon 1.2s steps(2) infinite; }
.np-rulechip b { font-weight: 400; }
.np-rulechip span { font-weight: 400; opacity: .85; }
/* the countdown pill: "还有 2 回合" / "下回合" / "4/6 个" */
.np-when { display: inline-block; margin-left: 2px; padding: 0 6px; border-radius: 999px; font-style: normal; white-space: nowrap; background: var(--blood); color: var(--ink); }
.np-rulechip.soon .np-when { background: var(--ink); color: var(--blood); }
@keyframes np-soon { 50% { filter: brightness(1.25); } }
@media (prefers-reduced-motion: reduce) { .np-rulechip.soon { animation: none; } }
/* the floor's boss (drawn from three): portrait, name and its rule in one line, above the map; tap for the full rule */
.np-bossline { display: grid; grid-template-columns: 40px 1fr; gap: 0 10px; align-items: center; margin: 0 0 8px; padding: 6px 10px; font-size: 12px; line-height: 1.45;
  text-align: left; color: var(--paper); background: rgba(255,90,106,.08); border: 1px solid rgba(255,90,106,.35); border-radius: 12px; }
.np-bossline i { grid-row: span 2; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--blood); background: var(--ink-3) center / cover; }
.np-bossline b { color: var(--blood); font-size: 13px; }
/* the opening blessing: three plain one-line choices; the one with a cost in red */
.np-bless { padding: 14px; border-color: var(--teal); }
.np-bless.cost { border-color: var(--blood); }
.np-node em .px-ico { width: 18px; height: 18px; position: static; } /* not the map's absolutely placed path svg */

/* 今晚的夜巡: the entry under the main button, the night's deck, the score and the board */
.np-daily-entry { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.np-daily-entry small { font-size: 12px; font-weight: 700; color: var(--dim); }
#patrol-daily { overflow-y: auto; }
.np-daily-deck { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--ink-2); }
.np-daily-deck img { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; }
.np-daily-deck b { display: block; font-size: 16px; }
.np-daily-deck small { display: flex; align-items: center; gap: 4px; margin-top: 2px; font-size: 12px; color: var(--dim); }
.np-score { list-style: none; margin: 0; padding: 0; align-self: stretch; font-size: 14px; }
.np-score li { display: flex; justify-content: space-between; padding: 3px 0; color: var(--dim); }
.np-score em { font-style: normal; font-weight: 800; color: var(--paper); }
.np-score .sum { margin-top: 4px; padding-top: 6px; border-top: 1px solid var(--line); color: var(--paper); font-weight: 800; }
.np-score .sum em { color: var(--gold); font-size: 18px; }
.np-board { align-self: stretch; }
.np-rank { list-style: none; margin: 0; padding: 0; }
.np-rank li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto auto; align-items: center; gap: 8px; padding: 8px 4px; border-bottom: 1px solid var(--line); font-size: 14px; }
.np-rank i { font-style: normal; font-weight: 800; color: var(--dim); text-align: center; }
.np-rank b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.np-rank small { font-size: 12px; color: var(--dim); white-space: nowrap; }
.np-rank em { font-style: normal; font-weight: 800; color: var(--gold); min-width: 36px; text-align: right; }
.np-rank .mine { background: rgba(95, 224, 208, .1); }
.np-rank .mine b { color: var(--teal); }
