/* Netrun · Street fight sandbox (netrun_fight.php, M6a). The map is the screen; everything else is small and
   folds away. Same palette as netrun.css. Effects follow html[data-motion] (the canvas reads it in fight.js). */
.nf-body { overflow: hidden; }
.nf { /* aliases of the kit tokens (nr_kit.css) — change colors there, never here */ --nf-bg: var(--k-bg); --nf-panel: var(--k-panel); --nf-line: var(--k-line); --nf-cyan: var(--k-cyan); --nf-mag: var(--k-mag); --nf-yel: var(--k-yel); --nf-red: var(--k-red); --nf-grn: var(--k-grn); --nf-text: var(--k-text); --nf-muted: var(--k-muted);
  position: fixed; inset: var(--header-h, 56px) 0 0 0; background: var(--nf-bg); color: var(--nf-text); font-family: "Segoe UI", Rajdhani, system-ui, sans-serif; z-index: 5; }
.nf * { box-sizing: border-box; }
.nf [hidden] { display: none !important; }
.nf-muted { color: var(--nf-muted); font-size: 13px; }
.nf-kicker { font-family: var(--mono, ui-monospace, monospace); letter-spacing: 0.3em; font-size: 11px; color: var(--nf-cyan); }
.nf-title { font-size: 30px; font-weight: 800; letter-spacing: 0.04em; margin: 2px 0 6px; text-shadow: 0 0 18px color-mix(in srgb, var(--k-mag) 55%, transparent), 2px 0 var(--nf-cyan), -2px 0 var(--nf-mag); }
.nf-go { padding: 12px 24px; font: 800 15px var(--mono, ui-monospace, monospace); letter-spacing: 0.2em; background: linear-gradient(90deg, var(--nf-mag), var(--nf-cyan)); color: var(--k-ink); border: 0; border-radius: 8px; box-shadow: 0 0 24px color-mix(in srgb, var(--k-mag) 40%, transparent); cursor: pointer; }
.nf-go:disabled { filter: grayscale(1); opacity: 0.4; box-shadow: none; cursor: default; }

/* ── setup ── */
.nf-setup { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; background: radial-gradient(80% 60% at 70% 0%, color-mix(in srgb, var(--k-mag) 12%, transparent), transparent 70%), radial-gradient(70% 60% at 0% 100%, color-mix(in srgb, var(--k-cyan) 10%, transparent), transparent 70%), var(--nf-bg); }
.nf-setup-in { max-width: 980px; margin: 0 auto; padding: 22px 16px 40px; }
.nf-setup h3 { margin: 22px 0 8px; font: 700 12px var(--mono, ui-monospace, monospace); letter-spacing: 0.2em; color: var(--nf-mag); text-transform: uppercase; }
.nf-setup h3 small { color: var(--nf-muted); letter-spacing: 0.05em; margin-left: 6px; }
.nf-maps { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.nf-map { display: grid; gap: 4px; text-align: left; padding: 8px; border-radius: 10px; border: 1px solid var(--nf-line); background: var(--nf-panel); color: inherit; font: inherit; cursor: pointer; transition: transform 0.15s, border-color 0.15s; }
.nf-map canvas { width: 100%; height: auto; image-rendering: pixelated; border-radius: 4px; }
.nf-map b { font-size: 15px; } .nf-map small { color: var(--nf-muted); font-size: 12px; line-height: 1.3; }
.nf-map:hover { transform: translateY(-2px); }
.nf-map.on { border-color: var(--nf-cyan); box-shadow: 0 0 18px color-mix(in srgb, var(--k-cyan) 30%, transparent); }
.nf-picks { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x proximity; }
.nf-pick { flex: 0 0 128px; scroll-snap-align: start; display: grid; gap: 2px; text-align: left; padding: 0 0 8px; border-radius: 10px; overflow: hidden; border: 1px solid var(--nf-line); background: var(--nf-panel); color: inherit; font: inherit; cursor: pointer; position: relative; }
.nf-pick img, .nf-pick > i { width: 100%; height: 110px; object-fit: cover; object-position: top; display: grid; place-items: center; font: 800 40px system-ui; font-style: normal; color: var(--nf-cyan); background: var(--k-card-bot); }
.nf-pick b { padding: 0 8px; font-size: 14px; } .nf-pick small { padding: 0 8px; font-size: 11px; color: var(--nf-muted); }
.nf-pick.on { border-color: var(--nf-cyan); box-shadow: 0 0 18px color-mix(in srgb, var(--k-cyan) 35%, transparent); }
.nf-pick.on::after { content: "IN"; position: absolute; top: 6px; left: 6px; font: 700 10px var(--mono, ui-monospace, monospace); letter-spacing: 0.2em; padding: 2px 6px; border-radius: 4px; background: var(--nf-cyan); color: var(--k-ink); }
.nf-note { align-self: center; flex: 0 0 220px; }
.nf-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; margin: 0 6px 6px 0; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--k-red) 45%, transparent); background: color-mix(in srgb, var(--k-gold-dk) 80%, transparent); color: var(--nf-text); font: inherit; font-size: 13px; cursor: pointer; }
.nf-chip.on { border-color: var(--nf-red); background: color-mix(in srgb, var(--k-red) 16%, transparent); cursor: default; }
.nf-chip button { background: none; border: 0; color: var(--nf-muted); cursor: pointer; padding: 0 2px; font-size: 13px; }
.nf-kits { display: flex; flex-wrap: wrap; }
.nf-chip.kit { border-color: color-mix(in srgb, var(--k-cyan) 35%, transparent); background: color-mix(in srgb, var(--k-field) 80%, transparent); }
.nf-chip.kit.on { border-color: var(--nf-cyan); background: color-mix(in srgb, var(--k-cyan) 16%, transparent); cursor: pointer; }
.nf-foes-picked { min-height: 34px; margin-bottom: 8px; }
.nf-preset-row { margin: 4px 0; } .nf-preset-row small { display: block; color: var(--nf-muted); font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase; margin: 6px 0 4px; }
.nf-custom { margin-top: 10px; } .nf-custom summary { cursor: pointer; color: var(--nf-cyan); font-size: 13px; }
.nf-custom-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; } .nf-custom-row select { flex: 1 1 220px; min-width: 0; } .nf-custom-row input { width: 70px; }
.nf-setup-go { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 24px; position: sticky; bottom: 12px; }
.nf-err { color: var(--nf-red); font-size: 13px; }

/* ── the fight ── */
.nf-battle { position: absolute; inset: 0; overflow: hidden; touch-action: none; overscroll-behavior: none; -webkit-user-select: none; user-select: none; } /* no page pinch / bounce anywhere on the fight screen */
.nf-canvas { position: absolute; inset: 0; display: block; touch-action: none; width: 100%; height: 100%; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.nf-banner3d { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); z-index: 3; padding: 14px 0; text-align: center; background: color-mix(in srgb, var(--k-bg) 70%, transparent); color: var(--nf-cyan); font: 800 28px var(--mono, ui-monospace, monospace); letter-spacing: 0.2em; pointer-events: none; }
.nf-top { position: absolute; left: 0; right: 0; top: 0; z-index: 4; display: flex; align-items: center; gap: 10px; padding: 5px 10px; background: color-mix(in srgb, var(--k-bg) 80%, transparent); border-bottom: 1px solid var(--nf-line); }
.nf-round { font: 800 13px var(--mono, ui-monospace, monospace); letter-spacing: 0.2em; color: var(--nf-mag); white-space: nowrap; }
/* ── figure cards: the initiative deal, the order strip, the peek ── */
.nf-strip { position: absolute; left: 0; right: 0; top: 41px; z-index: 4; display: flex; align-items: flex-start; gap: 8px; padding: 4px 8px 10px; background: linear-gradient(color-mix(in srgb, var(--k-bg) 85%, transparent), transparent); pointer-events: none; }
.nf-strip .nf-order { flex: 1 1 auto; min-width: 0; scroll-snap-type: x proximity; }
.nf-strip .nf-commit { flex: 0 0 auto; align-self: center; margin-top: -6px; padding: 10px 14px; font-size: 12px; letter-spacing: 0.12em; pointer-events: auto; white-space: nowrap; }
.nf-strip.pending .nf-order { visibility: hidden; }
.nf-order { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; pointer-events: auto; padding-bottom: 8px; }
.nf-order::-webkit-scrollbar { display: none; }
.nf-mini { flex: 0 0 auto; width: 58px; padding: 0; border-radius: 7px; overflow: hidden; border: 1px solid; background: var(--nf-panel); color: var(--nf-text); font: inherit; cursor: pointer; display: grid; transition: transform 0.25s, box-shadow 0.25s, opacity 0.25s; text-align: center; }
.nf-mini.pc { border-color: color-mix(in srgb, var(--k-cyan) 60%, transparent); } .nf-mini.foe { border-color: color-mix(in srgb, var(--k-red) 60%, transparent); }
.nf-mini .pic { position: relative; height: 36px; background: var(--k-card-bot); display: grid; place-items: center; overflow: hidden; }
.nf-mini .pic img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.nf-mini .pic i { font: 800 18px system-ui; font-style: normal; } .nf-mini.pc .pic i { color: var(--nf-cyan); } .nf-mini.foe .pic i { color: var(--nf-red); }
.nf-mini .pic .n, .nf-card .pic .n { position: absolute; right: 2px; bottom: 1px; font: 800 10px system-ui; background: color-mix(in srgb, var(--k-bg) 85%, transparent); padding: 0 3px; border-radius: 3px; }
.nf-mini .nm { font-size: 9px; line-height: 1.2; padding: 2px 2px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nf-mini .hp { height: 3px; margin: 2px 4px 3px; background: color-mix(in srgb, var(--k-black) 60%, transparent); } .nf-mini .hp i { display: block; height: 100%; background: var(--nf-grn); } .nf-mini .hp i.mid { background: var(--nf-yel); } .nf-mini .hp i.low { background: var(--nf-red); }
.nf-mini.done { opacity: 0.55; } .nf-mini.out { opacity: 0.3; filter: grayscale(1); }
.nf-mini.now { transform: translateY(7px); border-color: var(--nf-yel); box-shadow: 0 0 14px color-mix(in srgb, var(--k-yel) 55%, transparent); opacity: 1; }
.nf-deal { position: absolute; inset: 0; z-index: 9; display: grid; place-items: center; padding: 16px; background: color-mix(in srgb, var(--k-bg) 82%, transparent); overflow-y: auto; }
.nf-deal-in { width: min(900px, 100%); text-align: center; transition: opacity 0.4s; }
.nf-deal-in.leaving { background: transparent; } .nf-deal-in.leaving > .nf-kicker, .nf-deal-in.leaving > p { opacity: 0; transition: opacity 0.3s; }
.nf-deal-cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 14px 0 18px; }
.nf-card { width: 132px; border-radius: 10px; overflow: hidden; border: 1px solid; background: linear-gradient(180deg, var(--k-field), var(--k-card-bot)); text-align: left; box-shadow: 0 10px 26px color-mix(in srgb, var(--k-black) 50%, transparent); }
.nf-card.pc { border-color: color-mix(in srgb, var(--k-cyan) 70%, transparent); } .nf-card.foe { border-color: color-mix(in srgb, var(--k-red) 70%, transparent); }
.nf-card .pic { position: relative; height: 96px; background: var(--k-card-bot); display: grid; place-items: center; overflow: hidden; }
.nf-card .pic img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.nf-card .pic i { font: 800 40px system-ui; font-style: normal; } .nf-card.pc .pic i { color: var(--nf-cyan); } .nf-card.foe .pic i { color: var(--nf-red); }
.nf-card .rank { position: absolute; left: 4px; top: 4px; min-width: 22px; padding: 0 5px; border-radius: 11px; background: var(--nf-yel); color: var(--k-ink); font: 800 13px var(--mono, ui-monospace, monospace); text-align: center; }
.nf-card .rank:empty { display: none; }
.nf-card .nm { padding: 5px 7px 0; font-weight: 700; font-size: 12px; line-height: 1.2; min-height: 2.4em; }
.nf-card .st { display: flex; flex-wrap: wrap; gap: 2px 6px; padding: 3px 7px 0; font: 700 10px var(--mono, ui-monospace, monospace); color: var(--nf-muted); }
.nf-card .ini { padding: 3px 7px 0; font-size: 10px; color: var(--nf-muted); min-height: 20px; }
.nf-card .res { min-height: 22px; padding: 2px 7px 6px; }
.nf-card.rolled { animation: nf-rolled 0.45s ease-out; }
@keyframes nf-rolled { 0% { transform: scale(1); } 40% { transform: scale(1.08); box-shadow: 0 0 22px color-mix(in srgb, var(--k-yel) 60%, transparent); } 100% { transform: scale(1); } }
html[data-motion="full"] .nf-deal .nf-card { animation: nf-deal 0.45s cubic-bezier(.2,.8,.2,1) backwards; animation-delay: calc(var(--i, 0) * 70ms); }
html[data-motion="full"] .nf-deal .nf-card.rolled { animation: nf-rolled 0.45s ease-out; }
@keyframes nf-deal { from { transform: translateY(60px) rotate(-8deg); opacity: 0; } to { transform: none; opacity: 1; } }
.nf-peek { position: absolute; left: 50%; top: 120px; transform: translateX(-50%); z-index: 8; display: flex; gap: 12px; align-items: flex-start; width: min(460px, calc(100% - 16px)); padding: 12px; border-radius: 12px; background: var(--nf-panel); border: 1px solid var(--nf-line); box-shadow: 0 16px 40px color-mix(in srgb, var(--k-black) 60%, transparent); }
.nf-peek .nf-card { flex: 0 0 auto; width: 120px; box-shadow: none; }
.nf-peek-info { flex: 1; min-width: 0; font-size: 12px; }
.nf-peek-info ul { list-style: none; margin: 6px 0 0; padding: 0; } .nf-peek-info li { padding: 3px 0; border-bottom: 1px solid color-mix(in srgb, var(--k-cyan) 10%, transparent); } .nf-peek-info li small { display: block; color: var(--nf-muted); }
.nf-peek-info li.ready b::after { content: " · ready"; color: var(--nf-yel); font-weight: 400; }
.nf-peek-x { position: absolute; right: 6px; top: 6px; min-height: 26px !important; padding: 0 8px; }
.nf-roll.init ol { margin: 6px 0 0; padding-left: 20px; } .nf-roll.init li { margin: 2px 0; } .nf-roll.init li.pc b { color: var(--nf-cyan); } .nf-roll.init li.foe b { color: var(--nf-red); }
.nf-amb-tip { display: block; margin-top: 2px; }
.nf-top-r { display: flex; gap: 5px; margin-left: auto; } .nf-top-r .btn { min-height: 30px; padding: 2px 9px; font-size: 12px; }
.nf-bottom { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 10px; padding: 6px 10px 10px; pointer-events: none; }
.nf-bottom > .nf-hint { flex: 1 1 100%; min-height: 18px; color: var(--nf-muted); font-size: 12px; text-align: center; pointer-events: none; }
.nf-bottom > * { pointer-events: auto; }
.nf-sel { flex: 1 1 auto; min-width: 0; display: flex; align-items: flex-end; justify-content: center; gap: 12px; font-size: 13px; } /* the play zone: almost only cards */
.nf-inhand { font: 700 11px var(--mono, ui-monospace, monospace); color: var(--nf-yel); }
/* ── the turn: track + hand of action cards ── */
/* ── the cards a figure plays, at the bottom while its turn plays out ── */
.nf-played { position: absolute; left: 50%; bottom: 44px; transform: translateX(-50%); z-index: 5; display: flex; align-items: flex-end; gap: 8px; max-width: calc(100% - 16px); pointer-events: none; }
.nf-pl-who { flex: 0 0 auto; width: 66px; border-radius: 8px; overflow: hidden; border: 1px solid; background: var(--nf-panel); text-align: center; }
.nf-played.pc .nf-pl-who { border-color: var(--nf-cyan); } .nf-played.foe .nf-pl-who { border-color: var(--nf-red); }
.nf-pl-who .pic { display: grid; place-items: center; height: 58px; background: var(--k-card-bot); overflow: hidden; } .nf-pl-who .pic img { width: 100%; height: 100%; object-fit: cover; object-position: top; } .nf-pl-who .pic i { font: 800 26px system-ui; font-style: normal; }
.nf-played.pc .nf-pl-who .pic i { color: var(--nf-cyan); } .nf-played.foe .nf-pl-who .pic i { color: var(--nf-red); }
.nf-pl-who b { display: block; font-size: 10px; padding: 3px 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nf-pl-cards { display: flex; gap: 6px; align-items: flex-end; min-width: 0; overflow: hidden; }
.nf-pl-cards .k-card { cursor: default; }
html[data-motion="full"] .nf-pl-cards > * { animation: nf-play 0.32s cubic-bezier(.2,.8,.2,1); }
html[data-motion="reduced"] .nf-pl-cards > * { animation: nf-fade 0.2s ease-out; }
@keyframes nf-play { from { transform: translateY(40px) rotate(6deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes nf-fade { from { opacity: 0; } to { opacity: 1; } }
.nf-res-card { flex: 0 0 auto; width: 158px; min-height: 100px; padding: 6px 8px; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--k-muted) 50%, transparent); background: linear-gradient(180deg, var(--k-card-top), var(--k-card-bot)); font-size: 11px; }
.nf-res-card.hit { border-color: var(--nf-red); box-shadow: 0 0 14px color-mix(in srgb, var(--k-red) 35%, transparent); } .nf-played.foe .nf-res-card.hit { border-color: var(--nf-yel); box-shadow: 0 0 14px color-mix(in srgb, var(--k-yel) 30%, transparent); }
.nf-res-card .k { color: var(--nf-muted); } .nf-res-card .d, .nf-res-card .r { margin-top: 3px; min-height: 18px; }
.nf-res-card .o { margin-top: 4px; font: 800 12px var(--mono, ui-monospace, monospace); letter-spacing: 0.06em; } .nf-res-card.hit .o { color: var(--nf-red); } .nf-played.foe .nf-res-card.hit .o { color: var(--nf-yel); } .nf-res-card.miss .o { color: var(--nf-muted); }
.nf-res-card .sp { margin-top: 3px; color: var(--nf-yel); font-size: 10px; }
html[data-motion="full"] .nf-pl-cards > .nf-res-card { animation: nf-flip 0.4s ease-out; transform-origin: left center; }
@keyframes nf-flip { from { transform: perspective(500px) rotateY(-85deg); opacity: 0.3; } to { transform: none; opacity: 1; } }
/* ── the play zone: dots for what is left, the hand fanned out, END TURN ── */
.nf-hint { position: absolute; left: 50%; top: 122px; transform: translateX(-50%); z-index: 5; max-width: calc(100% - 24px); padding: 4px 12px; border-radius: 999px; background: color-mix(in srgb, var(--k-bg) 78%, transparent); border: 1px solid color-mix(in srgb, var(--k-cyan) 25%, transparent); color: var(--nf-text); font-size: 12px; text-align: center; pointer-events: none; opacity: 0; transition: opacity 0.25s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nf-hint.on { opacity: 1; }
.nf-tab-status { position: absolute; right: 0; top: 50%; transform: translateY(-50%); z-index: 6; writing-mode: vertical-rl; padding: 12px 5px; border-radius: 8px 0 0 8px; border: 1px solid var(--nf-line); border-right: 0; background: color-mix(in srgb, var(--k-card-bot) 90%, transparent); color: var(--nf-cyan); font: 700 11px var(--mono, ui-monospace, monospace); letter-spacing: 0.25em; cursor: pointer; }
.nf-status .nf-ai-turn { width: 100%; margin: 4px 0 10px; }
.nf-st-row { display: flex; gap: 8px; align-items: center; padding: 6px; margin-bottom: 6px; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--k-cyan) 12%, transparent); }
.nf-st-row.now { border-color: var(--nf-yel); background: color-mix(in srgb, var(--k-yel) 6%, transparent); } .nf-st-row.out { opacity: 0.4; filter: grayscale(1); }
.nf-st-row .pic { flex: 0 0 40px; height: 40px; border-radius: 6px; overflow: hidden; display: grid; place-items: center; background: var(--k-card-bot); border: 1px solid; }
.nf-st-row.pc .pic { border-color: var(--nf-cyan); color: var(--nf-cyan); } .nf-st-row.foe .pic { border-color: var(--nf-red); color: var(--nf-red); }
.nf-st-row .pic img { width: 100%; height: 100%; object-fit: cover; object-position: top; } .nf-st-row .pic i { font: 800 18px system-ui; font-style: normal; }
.nf-st-txt { flex: 1; min-width: 0; } .nf-st-txt b { font-size: 12px; } .nf-st-txt small { display: block; color: var(--nf-muted); font-size: 11px; }
.nf-st-bars { display: grid; grid-template-columns: auto 1fr; gap: 2px 6px; align-items: center; font: 700 10px var(--mono, ui-monospace, monospace); color: var(--nf-muted); margin: 2px 0; }
.nf-st-bars .bar { height: 5px; background: color-mix(in srgb, var(--k-black) 60%, transparent); border-radius: 3px; overflow: hidden; } .nf-st-bars .bar i { display: block; height: 100%; }
.nf-st-bars .bar.w i { background: var(--nf-grn); } .nf-st-bars .bar.s i { background: var(--k-sky); }
/* personalities in setup, conditions in play */
.nf-foe-chip select { max-width: 132px; padding: 2px 4px; border-radius: 6px; border: 1px solid color-mix(in srgb, var(--k-red) 45%, transparent); background: var(--k-card-bot); color: var(--nf-text); font: inherit; font-size: 12px; }
.nf-mind-notes { margin: 2px 0 6px; padding: 0; list-style: none; font-size: 12px; color: var(--nf-muted); } .nf-mind-notes li { margin: 2px 0; } .nf-mind-notes b { color: var(--nf-text); font-weight: 600; }
.nf-conds { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.nf-cond { padding: 1px 6px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--k-mag) 50%, transparent); background: color-mix(in srgb, var(--k-mag) 12%, transparent); color: var(--k-rose); font-size: 10px; line-height: 1.5; }
.nf-mini .cd { position: absolute; margin: 2px 0 0 2px; min-width: 14px; height: 14px; border-radius: 7px; background: var(--nf-mag); color: var(--k-card-bot); font: 800 9px/14px system-ui; text-align: center; }
.nf-mini { position: relative; }
.nf-peek-conds { margin: 6px 0; padding: 0; list-style: none; font-size: 12px; } .nf-peek-conds li { margin: 3px 0; } .nf-peek-conds b { color: var(--k-rose); }
.nf-peek small.warn, .nf-peek .warn { color: var(--nf-yel); } .nf-ready-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 13px; } .nf-ready-row select { min-width: 180px; }
.nf-meter { font: 700 11px var(--mono, ui-monospace, monospace); color: var(--nf-red); } .nf-meter.s { color: var(--k-sky); } .nf-meter.p { color: var(--nf-yel); }
.nf-wpn small { display: block; font-size: 10px; color: var(--nf-muted); overflow: hidden; text-overflow: ellipsis; }
.nf .warn { color: var(--nf-yel); }
.nf-auto { font-size: 12px; }
.nf-roll { position: absolute; right: 10px; top: 52px; z-index: 5; width: 230px; padding: 8px 10px; border-radius: 10px; background: var(--nf-panel); border: 1px solid var(--nf-line); font-size: 12px; pointer-events: none; }
.nf-roll.them { border-color: color-mix(in srgb, var(--k-red) 60%, transparent); }
.nf-roll .k { font-weight: 700; } .nf-roll .w { color: var(--nf-muted); }
.nf-roll .d, .nf-roll .r { margin-top: 4px; min-height: 18px; }
.nf-roll .o { margin-top: 4px; font: 800 13px var(--mono, ui-monospace, monospace); letter-spacing: 0.1em; } .nf-roll .o.hit { color: var(--nf-red); } .nf-roll.them .o.hit { color: var(--nf-yel); } .nf-roll .o.miss { color: var(--nf-muted); }
.nf-roll .sp { margin-top: 3px; color: var(--nf-yel); font-size: 11px; }
.nf-die { width: 16px !important; height: 16px !important; vertical-align: middle; margin-right: 2px; }
.nf-skip { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 6; font: 700 11px var(--mono, ui-monospace, monospace); letter-spacing: 0.25em; color: var(--nf-cyan); background: color-mix(in srgb, var(--k-bg) 80%, transparent); padding: 6px 12px; border-radius: 6px; cursor: pointer; }
.nf-drawer { touch-action: pan-y; -webkit-user-select: text; user-select: text; position: absolute; right: 0; top: 41px; bottom: 0; z-index: 7; width: min(400px, 100%); overflow-y: auto; padding: 10px 14px 20px; background: var(--nf-panel); border-left: 1px solid var(--nf-line); backdrop-filter: blur(6px); font-size: 13px; }
.nf-drawer h3 { display: flex; align-items: center; justify-content: space-between; margin: 0 0 8px; font: 700 12px var(--mono, ui-monospace, monospace); letter-spacing: 0.2em; color: var(--nf-mag); text-transform: uppercase; }
.nf-drawer h4 { margin: 12px 0 4px; color: var(--nf-cyan); font-size: 12px; letter-spacing: 0.15em; text-transform: uppercase; }
.nf-drawer p { margin: 4px 0 8px; line-height: 1.4; } .nf-drawer p.ev { color: var(--nf-yel); }
.nf-drawer small { color: var(--nf-muted); } .nf-drawer .hit { color: var(--nf-red); font-weight: 700; } .nf-drawer .miss { color: var(--nf-muted); } .nf-drawer .crit { color: var(--nf-yel); }
.nf-drawer ul { padding-left: 18px; line-height: 1.5; }
.nf-end { position: absolute; inset: 0; z-index: 8; display: grid; place-items: center; padding: 16px; background: color-mix(in srgb, var(--k-bg) 78%, transparent); }
.nf-end-in { width: min(520px, 100%); padding: 18px 20px; border-radius: 12px; background: var(--nf-panel); border: 1px solid var(--nf-line); text-align: center; }
.nf-end h2 { margin: 4px 0 10px; font-size: 34px; font-weight: 800; letter-spacing: 0.06em; }
.nf-end h2.won { color: var(--nf-grn); } .nf-end h2.lost { color: var(--nf-red); } .nf-end h2.fled, .nf-end h2.draw { color: var(--nf-yel); }
.nf-end ul { list-style: none; padding: 0; margin: 0 0 14px; text-align: left; font-size: 13px; }
.nf-end li { padding: 4px 0; border-bottom: 1px solid color-mix(in srgb, var(--k-cyan) 10%, transparent); } .nf-end li.pc b { color: var(--nf-cyan); } .nf-end li.foe b { color: var(--nf-red); }
.nf-end-acts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; }
html[data-motion="full"] .nf-end-in { animation: nf-pop 0.35s ease-out; }
@keyframes nf-pop { from { transform: scale(0.92); opacity: 0; } to { transform: none; opacity: 1; } }

@media (max-width: 640px) {
  .nf-card { width: 104px; } .nf-card .pic { height: 74px; } .nf-deal-cards { gap: 8px; }
  .nf-strip .nf-commit { padding: 9px 10px; font-size: 11px; letter-spacing: 0.06em; }
  .nf-hint { top: 116px; font-size: 11px; }
  .nf-bottom { flex-wrap: wrap; } /* the chips (PRONE, ✕ Move…) get their own row above the hand: on one row they pushed the wheel off the screen (user, 2026-10-18) */
  .nf-dice { width: calc(100% - 16px); } .nd { width: 54px; height: 66px; } .nd svg, .nd-face { width: 54px; height: 54px; } .nd-face { padding: 13px; } .nd-face img { width: 15px; height: 15px; }
  .nf-bottom > .nf-hint { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* one line on phones: the board keeps its room */
  .nf-played { bottom: 60px; gap: 5px; } .nf-pl-who { width: 52px; } .nf-pl-who .pic { height: 44px; } .nf-res-card { width: 128px; min-height: 92px; font-size: 10px; }
  .nf-peek { top: 110px; flex-direction: column; align-items: stretch; } .nf-peek .nf-card { display: none; }
  .nf-title { font-size: 24px; }
  .nf-maps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nf-map small { display: none; }
  .nf-bottom { padding: 6px 6px 8px; gap: 4px; }
  .nf-sel { gap: 6px; }
  .nf-roll { left: 8px; right: 8px; width: auto; top: auto; bottom: 150px; }
  .nf-top { gap: 6px; padding: 4px 6px; }
  .nf-round { font-size: 11px; letter-spacing: 0.1em; }
}

/* ── your roll's spends (like the Netrun runs) ── */
.nd-sym { font-style: normal; } .nd-sym.advantage, .nd-sym.success { color: var(--nf-grn); } .nd-sym.triumph { color: var(--nf-yel); } .nd-sym.failure, .nd-sym.threat, .nd-sym.despair { color: var(--nf-red); }
/* ── the dice show ── */
.nf-dice { position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%); z-index: 6; width: min(94%, 720px); display: grid; justify-items: center; gap: 8px; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--k-bg) 84%, transparent); border: 1px solid var(--nf-line); box-shadow: 0 0 40px color-mix(in srgb, var(--k-cyan) 15%, transparent); pointer-events: none; }
.nf-dice[hidden] { display: none; }
.nf-dice.foe { border-color: color-mix(in srgb, var(--k-red) 60%, transparent); box-shadow: 0 0 40px color-mix(in srgb, var(--k-red) 25%, transparent); }
.nd-head { display: flex; flex-direction: column; align-items: center; gap: 2px; font: 800 13px var(--mono, ui-monospace, monospace); letter-spacing: 0.2em; color: var(--nf-cyan); text-transform: uppercase; text-align: center; }
.nf-dice.foe .nd-head { color: var(--nf-red); }
.nd-head small { font-size: 10px; letter-spacing: 0.04em; color: var(--nf-muted); font-weight: 400; text-transform: none; }
.nd-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.nd { position: relative; width: 70px; height: 82px; display: grid; place-items: center; animation: nd-in 0.45s cubic-bezier(0.2, 1.3, 0.4, 1) both; animation-delay: calc(var(--i) * 50ms); }
.nd svg { position: absolute; left: 0; top: 0; width: 70px; height: 70px; overflow: visible; }
.nd svg polygon { fill: color-mix(in srgb, var(--c) 16%, var(--k-bg)); stroke: var(--c); stroke-width: 3; filter: drop-shadow(0 0 6px var(--c)); }
.nd svg .in, .nd svg polyline { fill: none; stroke: color-mix(in srgb, var(--c) 40%, transparent); stroke-width: 1.5; filter: none; }
.nd:not(.landed) svg { animation: nd-spin 0.35s linear infinite; }
.nd.landed svg { animation: nd-pop 0.3s ease-out; }
.nd-face { position: absolute; top: 0; left: 0; width: 70px; height: 70px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; align-content: center; gap: 1px; padding: 17px; }
.nd-face img { width: 19px; height: 19px; filter: drop-shadow(0 0 3px var(--k-black)); transition: opacity 0.3s, transform 0.3s; }
.nd-face .blank { color: var(--nf-muted); }
.nd-face .cx { opacity: 0.2; transform: scale(0.6) rotate(-20deg); }
.nd > i { position: absolute; bottom: 0; font: 9px var(--mono, ui-monospace, monospace); letter-spacing: 0.1em; color: var(--c); font-style: normal; }
@keyframes nd-in { from { opacity: 0; transform: translateY(40px) rotate(-90deg) scale(0.4); } }
@keyframes nd-spin { to { transform: rotate(360deg); } }
@keyframes nd-pop { 0% { transform: scale(1.25); } 100% { transform: none; } }
html[data-motion="reduced"] .nd, html[data-motion="reduced"] .nd svg { animation-duration: 0.15s !important; }
.nd-net { display: grid; justify-items: center; gap: 2px; min-height: 28px; }
.nd-verdict { font: 900 24px var(--mono, ui-monospace, monospace); letter-spacing: 0.15em; }
.nd-verdict.good { color: var(--nf-grn); text-shadow: 0 0 16px var(--nf-grn); } .nd-verdict.bad { color: var(--nf-red); text-shadow: 0 0 16px var(--nf-red); }
.nd-sum img { height: 18px; vertical-align: middle; }
.nf-res-card .sp.thr, .nf-drawer .thr { color: color-mix(in srgb, var(--k-red) 70%, var(--k-white)); }
/* ── missions ── */
.nf-mission { margin-left: 8px; padding: 3px 8px; border-radius: 6px; border: 1px solid color-mix(in srgb, var(--k-yel) 40%, transparent); background: color-mix(in srgb, var(--k-card-bot) 85%, transparent); color: var(--nf-yel); font: 700 11px var(--mono, ui-monospace, monospace); letter-spacing: 0.06em; cursor: pointer; white-space: nowrap; }
.nf-mission .sneak { color: var(--nf-cyan); } .nf-mission .alarm { color: var(--nf-red); animation: nf-blink 1s steps(2) infinite; }
@keyframes nf-blink { 50% { opacity: 0.45; } } html[data-motion="off"] .nf-mission .alarm { animation: none; }
.nf-objs { margin: 0 0 10px; padding: 8px 10px; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--k-yel) 35%, transparent); background: color-mix(in srgb, var(--k-yel) 5%, transparent); font-size: 13px; }
.nf-objs b { display: block; color: var(--nf-yel); margin-bottom: 4px; } .nf-objs .done { color: var(--nf-grn); }
.nf-mtag { font-style: normal; font-size: 10px; letter-spacing: 0.12em; padding: 1px 5px; border-radius: 4px; background: var(--nf-yel); color: var(--k-gold-dk); vertical-align: middle; }
.nf-map.mission { border-color: color-mix(in srgb, var(--k-yel) 50%, transparent); }
.nf-mobj { margin: 6px 0 0; padding: 0; list-style: none; font-size: 11px; color: var(--nf-yel); text-align: left; }
.nf-end-objs { margin-bottom: 10px !important; } .nf-end-objs li.done { color: var(--nf-grn); } .nf-end-objs li.no { color: var(--nf-red); }
.nf-mission .short { display: none; } .nf-mission i { font-style: normal; }
@media (max-width: 640px) { .nf-mission { font-size: 10px; padding: 2px 5px; margin-left: 0; } .nf-mission .long { display: none; } .nf-mission .short { display: inline; } .nf-battle.has-mission .nf-round { display: none; } }
/* the inspector: tap a thing on the map */
.nf-inspect { position: absolute; left: 50%; top: 150px; transform: translateX(-50%); z-index: 7; width: min(380px, calc(100% - 20px)); padding: 10px 12px; border-radius: 12px; background: var(--nf-panel); border: 1px solid color-mix(in srgb, var(--k-yel) 45%, transparent); box-shadow: 0 16px 34px color-mix(in srgb, var(--k-black) 60%, transparent); font-size: 13px; }
.nf-inspect[hidden] { display: none; }
.nf-inspect > b { display: block; color: var(--nf-yel); padding-right: 30px; } .nf-inspect > small { display: block; color: var(--nf-muted); }
.nf-inspect ul { margin: 8px 0 4px; padding: 0; list-style: none; } .nf-inspect li { margin: 5px 0; } .nf-inspect li small { color: var(--nf-muted); } .nf-inspect li em { color: var(--nf-muted); font-size: 11px; }
.nf-inspect li .btn, .nf-ins-walk { padding: 2px 10px; font-size: 12px; } .nf-ins-walk { margin-top: 6px; }
.nf-ins-x { position: absolute; right: 8px; top: 8px; padding: 0 8px; }
.nf-inspect .warn { color: var(--nf-yel); margin-top: 6px; }
@media (max-width: 640px) { .nf-inspect { top: 140px; } }
/* the alert: the screen flashes red for a moment, once per "!" */
.nf-flash { position: absolute; inset: 0; z-index: 9; pointer-events: none; background: radial-gradient(ellipse at center, color-mix(in srgb, var(--k-red) 25%, transparent), color-mix(in srgb, var(--k-red) 55%, transparent)); opacity: 0; }
.nf-flash.on { animation: nf-flash 0.22s ease-out; } .nf-flash.on.big { animation: nf-flash-big 0.45s ease-out; }
@keyframes nf-flash { 0% { opacity: 0.55; } 100% { opacity: 0; } }
@keyframes nf-flash-big { 0% { opacity: 0.85; } 30% { opacity: 0.6; } 100% { opacity: 0; } }
html[data-motion="reduced"] .nf-flash.on { animation-duration: 0.15s; } html[data-motion="reduced"] .nf-flash.on.big { animation: nf-flash 0.2s ease-out; }

/* ═══ M6f hazards: the inspector's longer text, the STATUS block, the setup list ═══ */
.nf-inspect .nf-ins-more { margin: 6px 0 0; font-size: 12px; line-height: 1.4; color: color-mix(in srgb, var(--k-text) 80%, var(--k-muted)); }
.nf-hz { margin: 0 0 10px; padding: 8px 10px; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--k-lime) 30%, transparent); background: color-mix(in srgb, var(--k-lime) 4%, transparent); font-size: 12px; }
.nf-hz summary { cursor: pointer; font-weight: 700; color: var(--k-lime); font-size: 13px; }
.nf-hz ul { margin: 6px 0 8px; padding: 0; list-style: none; } .nf-hz li { margin: 4px 0; line-height: 1.35; } .nf-hz li small { color: var(--nf-muted); }
.nf-hz > b { display: block; color: var(--nf-cyan); margin-top: 4px; }
.nf-mhz { color: var(--k-lime); }

/* above the hand: what is on the figure and why a card is not in the hand (unplayable cards are not dealt) */
.nf-why { flex: 1 1 100%; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 6px; order: -1; }
.nf-why[hidden] { display: none; }
.nf-why-c { padding: 2px 9px; border-radius: var(--k-pill); border: 1px solid var(--k-line); background: var(--k-panel-hi); color: var(--k-text); font: 700 11px var(--k-mono); letter-spacing: 0.04em; cursor: pointer; }
.nf-why-c.bad { border-color: var(--k-red); color: var(--k-red); } .nf-why-c.good { border-color: var(--k-grn); color: var(--k-grn); }
.nf-why-c.why { border-style: dashed; color: var(--k-muted); font-weight: 400; }
