/* ASCS Lounge — Packet Runner */
.packet-runner-page main { padding-top: 8px; }
.pr-shell { max-width: 1080px; margin: 0 auto; padding: 12px 0 48px; }
.pr-hero { padding: 8px 0 18px; }
.pr-hero h1 { margin: 8px 0 10px; font-size: clamp(2.15rem, 6vw, 4rem); line-height: .96; letter-spacing: -.06em; }
.pr-hero p { margin: 0; max-width: 70ch; color: var(--muted); font-size: .9rem; line-height: 1.65; }
.pr-kicker { color: var(--accent-2); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .58rem; letter-spacing: .13em; text-transform: uppercase; }
.pr-card { border: 1px solid var(--border); border-radius: 18px; background: radial-gradient(520px 260px at 100% 0%, rgba(129,140,248,.14), transparent 65%), linear-gradient(160deg, #171b2a, #0b0e16); box-shadow: 0 24px 80px rgba(0,0,0,.35); padding: 22px; }
.pr-card[hidden] { display: none; }
.pr-card h2 { margin: 8px 0 8px; font-size: clamp(1.45rem, 4vw, 2.15rem); line-height: 1.03; letter-spacing: -.045em; }
.pr-card p { color: var(--muted); font-size: .82rem; line-height: 1.65; margin: 0 0 14px; }
.pr-card p.pr-tight { margin-bottom: 8px; }
.pr-brief-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.pr-panel { border: 1px solid var(--border); border-radius: 12px; background: rgba(255,255,255,.018); padding: 13px; min-width: 0; }
.pr-panel h3 { margin: 0 0 7px; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.pr-router-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.pr-router-name strong { font-size: .95rem; letter-spacing: -.02em; }
.pr-tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 6px; border-radius: 5px; background: rgba(129,140,248,.12); color: var(--accent-2); font-family: ui-monospace, monospace; font-size: .52rem; letter-spacing: .06em; text-transform: uppercase; }
.pr-tag.down { background: rgba(248,113,113,.12); color: #fca5a5; }
.pr-tag.live { background: rgba(110,231,183,.12); color: #6ee7b7; }
.pr-ifaces { display: flex; flex-direction: column; gap: 5px; }
.pr-iface { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 6px; background: rgba(255,255,255,.02); font-family: ui-monospace, monospace; font-size: .62rem; }
.pr-iface i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px rgba(110,231,183,.6); flex: 0 0 auto; }
.pr-iface.down i { background: #ef4444; box-shadow: 0 0 8px rgba(239,68,68,.5); }
.pr-iface b { color: var(--text); font-weight: 600; }
.pr-iface span { color: var(--dim); margin-left: auto; font-size: .56rem; }
.pr-policy-list { display: flex; flex-direction: column; gap: 4px; font-family: ui-monospace, monospace; font-size: .6rem; }
.pr-policy-row { display: flex; align-items: baseline; gap: 6px; padding: 4px 5px; border-radius: 4px; color: var(--muted); }
.pr-policy-row .pr-verdict { width: 40px; flex: 0 0 auto; font-weight: 700; font-size: .52rem; letter-spacing: .04em; }
.pr-policy-row .pr-verdict.allow { color: #6ee7b7; }
.pr-policy-row .pr-verdict.deny { color: #fca5a5; }
.pr-policy-row .pr-verdict.nat { color: var(--accent-2); }
.pr-policy-row code { color: var(--text); font-family: inherit; }
.pr-policy-row em { margin-left: auto; color: var(--dim); font-style: normal; font-size: .52rem; }
.pr-policy-row.flash { background: rgba(129,140,248,.14); box-shadow: inset 0 0 0 1px rgba(129,140,248,.35); }
.pr-start-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin: 16px 0; }
.pr-start-stats > div { padding: 11px; border: 1px solid var(--border); border-radius: 9px; background: rgba(255,255,255,.02); display: flex; flex-direction: column; gap: 2px; }
.pr-start-stats b { font-size: 1.05rem; letter-spacing: -.02em; }
.pr-start-stats small { color: var(--dim); font-size: .56rem; letter-spacing: .06em; text-transform: uppercase; }
.pr-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pr-actions .btn { padding: 9px 13px; font-size: .74rem; }
.pr-rule { margin-top: 14px; padding: 10px 12px; border: 1px solid rgba(110,231,183,.2); border-radius: 8px; background: rgba(110,231,183,.045); color: var(--muted); font-size: .68rem; line-height: 1.5; }

/* HUD */
.pr-hud { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.pr-hud-stat { display: flex; flex-direction: column; gap: 1px; }
.pr-hud-stat span { color: var(--dim); font-size: .54rem; letter-spacing: .07em; text-transform: uppercase; }
.pr-hud-stat b { font-size: .95rem; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.pr-hud-stat b.hot { color: #fca5a5; }
.pr-level { margin-left: auto; display: flex; align-items: center; gap: 7px; }
.pr-level .pr-tag { font-size: .55rem; }
.pr-patience { margin-bottom: 14px; }
.pr-patience-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 5px; }
.pr-patience-head span { color: var(--dim); font-size: .56rem; letter-spacing: .07em; text-transform: uppercase; }
.pr-patience-head b { font-size: .65rem; color: var(--muted); font-family: ui-monospace, monospace; }
.pr-patience-bar { height: 8px; border-radius: 99px; background: rgba(255,255,255,.06); overflow: hidden; border: 1px solid rgba(255,255,255,.04); }
.pr-patience-bar > i { display: block; height: 100%; width: 0%; border-radius: inherit; background: linear-gradient(90deg, #34d399, #fbbf24 62%, #ef4444); transition: width .18s linear; }

/* Map + queue */
.pr-stage { position: relative; border: 1px solid var(--border); border-radius: 14px; background: linear-gradient(180deg, rgba(10,13,22,.72), rgba(14,18,30,.88)); overflow: hidden; padding: 16px; }
.pr-stage-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 14px; align-items: stretch; }
.pr-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pr-map { position: relative; min-height: 170px; border: 1px dashed rgba(129,140,248,.18); border-radius: 12px; background: radial-gradient(320px 180px at 20% 30%, rgba(129,140,248,.08), transparent 60%); padding: 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pr-map::before { content: ''; position: absolute; left: 16%; right: 18%; top: 50%; border-top: 1px dashed rgba(129,140,248,.22); z-index: 0; }
.pr-node { position: relative; z-index: 1; text-align: center; }
.pr-node .pr-node-dot { width: 42px; height: 42px; margin: 0 auto 5px; border-radius: 11px; display: grid; place-items: center; border: 1px solid rgba(129,140,248,.28); background: rgba(129,140,248,.1); color: var(--accent-2); font-family: ui-monospace, monospace; font-size: .62rem; font-weight: 700; letter-spacing: .02em; }
.pr-node.router .pr-node-dot { width: 62px; height: 62px; border-radius: 16px; border-color: rgba(110,231,183,.35); background: radial-gradient(circle at 40% 30%, rgba(110,231,183,.2), rgba(129,140,248,.12)); color: #d1fae5; font-size: .7rem; box-shadow: 0 0 40px rgba(110,231,183,.12); }
.pr-node small { display: block; color: var(--dim); font-family: ui-monospace, monospace; font-size: .5rem; letter-spacing: .05em; }
.pr-node b { display: block; font-size: .62rem; color: var(--text); font-weight: 600; }
.pr-node.down .pr-node-dot { border-color: rgba(248,113,113,.25); background: rgba(248,113,113,.07); color: #fca5a5; }
.pr-flow { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 4px; }
.pr-flow span { display: inline-flex; align-items: center; gap: 4px; padding: 3px 6px; border-radius: 4px; background: rgba(255,255,255,.03); border: 1px solid var(--border); font-family: ui-monospace, monospace; font-size: .48rem; color: var(--dim); }
.pr-flow span.on { color: #6ee7b7; border-color: rgba(110,231,183,.25); background: rgba(110,231,183,.06); }
.pr-flow span.off { color: #fca5a5; border-color: rgba(248,113,113,.22); background: rgba(248,113,113,.05); }

.pr-queue-wrap { display: flex; flex-direction: column; gap: 8px; }
.pr-queue-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--dim); font-size: .54rem; letter-spacing: .07em; text-transform: uppercase; }
.pr-queue-label b { color: var(--muted); font-family: ui-monospace, monospace; font-size: .58rem; }
.pr-queue { display: flex; gap: 6px; overflow-x: auto; padding: 10px 1px 6px; min-height: 124px; scrollbar-width: thin; }
.pr-queue-empty { display: grid; place-items: center; width: 100%; min-height: 110px; border: 1px dashed var(--border-2); border-radius: 10px; color: var(--dim); font-size: .66rem; }
.pr-packet { position: relative; flex: 0 0 148px; width: 148px; min-height: 108px; border: 1px solid var(--border); border-radius: 10px; background: linear-gradient(160deg, #161a28, #0c101a); padding: 9px; display: flex; flex-direction: column; gap: 4px; animation: pr-in .18s ease-out; }
.pr-packet.front { border-color: rgba(129,140,248,.65); box-shadow: 0 0 0 1px rgba(129,140,248,.2), 0 12px 30px rgba(0,0,0,.35); }
.pr-packet.front::before { content: 'NEXT'; position: absolute; top: -8px; left: 8px; padding: 1px 5px; border-radius: 3px; background: var(--accent-2); color: #0a0a0f; font-family: ui-monospace, monospace; font-size: .44rem; font-weight: 700; letter-spacing: .08em; }
.pr-packet.impatient { border-color: rgba(251,191,36,.55); background: linear-gradient(160deg, #1e1a12, #0c101a); }
.pr-packet.impatient.front { box-shadow: 0 0 0 1px rgba(251,191,36,.28), 0 12px 30px rgba(0,0,0,.35); }
.pr-packet.flash-good { animation: pr-good .32s ease-out; }
.pr-packet.flash-bad { animation: pr-bad .32s ease-out; }
.pr-packet-top { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.pr-packet-src { color: var(--accent-2); font-family: ui-monospace, monospace; font-size: .52rem; letter-spacing: .03em; }
.pr-packet-nat { color: #fbbf24; font-family: ui-monospace, monospace; font-size: .44rem; font-weight: 700; }
.pr-packet-route { color: var(--text); font-family: ui-monospace, monospace; font-size: .58rem; line-height: 1.35; word-break: break-all; }
.pr-packet-route b { color: #fff; font-weight: 600; }
.pr-packet-meta { color: var(--dim); font-family: ui-monospace, monospace; font-size: .46rem; letter-spacing: .03em; }
.pr-packet-timer { margin-top: auto; height: 3px; border-radius: 99px; background: rgba(255,255,255,.07); overflow: hidden; }
.pr-packet-timer i { display: block; height: 100%; background: #fbbf24; border-radius: inherit; transition: width .12s linear; }
.pr-packet.impatient .pr-packet-route { color: #fde68a; }
.pr-bubble { position: relative; margin: 2px 0 10px; padding: 8px 10px 8px 38px; border: 1px solid rgba(251,191,36,.26); border-radius: 10px; background: rgba(251,191,36,.06); color: #fde68a; font-size: .68rem; line-height: 1.45; }
.pr-bubble::before { content: 'K'; position: absolute; left: 9px; top: 8px; width: 21px; height: 21px; border-radius: 50%; display: grid; place-items: center; background: rgba(251,191,36,.18); border: 1px solid rgba(251,191,36,.3); font-family: ui-monospace, monospace; font-size: .58rem; font-weight: 700; }
.pr-bubble strong { color: #fff; }

/* Ports */
.pr-ports { display: flex; flex-direction: column; gap: 6px; }
.pr-port { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 9px 10px; border: 1px solid var(--border); border-radius: 9px; background: rgba(255,255,255,.025); color: var(--text); text-align: left; cursor: pointer; transition: border-color .14s, background .14s, transform .14s; }
.pr-port:hover:not(:disabled) { border-color: rgba(129,140,248,.5); background: #171b28; transform: translateY(-1px); }
.pr-port:disabled { opacity: .45; cursor: default; }
.pr-port b { font-size: .64rem; letter-spacing: .01em; }
.pr-port small { color: var(--dim); font-family: ui-monospace, monospace; font-size: .46rem; letter-spacing: .02em; }
.pr-port .pr-key { float: right; color: var(--dim); font-family: ui-monospace, monospace; font-size: .46rem; }
.pr-port.port-drop { border-color: rgba(248,113,113,.18); }
.pr-port.port-drop:hover:not(:disabled) { border-color: rgba(248,113,113,.5); }
.pr-port.correct { border-color: rgba(110,231,183,.7); background: rgba(110,231,183,.08); }
.pr-port.wrong { border-color: rgba(248,113,113,.7); background: rgba(248,113,113,.08); }
.pr-msg { min-height: 18px; margin-top: 10px; color: var(--muted); font-size: .68rem; line-height: 1.4; }
.pr-msg.good { color: #6ee7b7; }
.pr-msg.bad { color: #fca5a5; }
.pr-inline-policy { border: 1px solid var(--border); border-radius: 9px; background: rgba(255,255,255,.018); padding: 9px 10px; }
.pr-inline-policy h3 { margin: 0 0 6px; color: var(--dim); font-size: .54rem; letter-spacing: .08em; text-transform: uppercase; }
.pr-inline-policy .pr-policy-list { margin-top: 0; }
.pr-inline-policy .pr-policy-row { padding: 3px 3px; }
.pr-inline-policy .pr-policy-row em { display: none; }
.pr-inline-policy .pr-policy-row code { font-size: .54rem; }
.pr-inline-policy .pr-verdict { width: 34px; font-size: .46rem; }

/* Over */
.pr-over-score { display: flex; align-items: baseline; gap: 8px; margin: 14px 0 8px; }
.pr-over-score b { font-size: clamp(2.4rem, 8vw, 3.6rem); letter-spacing: -.06em; line-height: 1; }
.pr-over-score small { color: var(--dim); font-size: .6rem; letter-spacing: .07em; text-transform: uppercase; }
.pr-over-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0; }
.pr-over-grid > div { padding: 10px 11px; border: 1px solid var(--border); border-radius: 8px; background: rgba(255,255,255,.02); }
.pr-over-grid span { display: block; color: var(--dim); font-size: .56rem; letter-spacing: .06em; text-transform: uppercase; }
.pr-over-grid strong { font-size: .86rem; }
.pr-board { display: flex; flex-direction: column; gap: 5px; margin-top: 10px; }
.pr-board-row { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 7px; background: rgba(255,255,255,.02); }
.pr-rank { width: 18px; color: var(--dim); font-family: ui-monospace, monospace; font-size: .62rem; }
.pr-board-row strong { flex: 1; font-size: .74rem; }
.pr-board-row small { color: var(--accent-2); font-family: ui-monospace, monospace; font-size: .66rem; }
.pr-empty { padding: 12px; border: 1px dashed var(--border-2); border-radius: 8px; color: var(--dim); font-size: .7rem; }
.pr-board-msg { color: var(--green); font-size: .66rem; }
.pr-save { display: flex; gap: 8px; align-items: center; margin: 14px 0 8px; flex-wrap: wrap; }
.pr-save .btn { padding: 8px 11px; font-size: .7rem; }
.pr-footnote { margin-top: 12px; color: var(--dim); font-size: .6rem; line-height: 1.5; }

@keyframes pr-in { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes pr-good { 0% { box-shadow: 0 0 0 0 rgba(110,231,183,.5); } 100% { box-shadow: 0 0 0 14px rgba(110,231,183,0); } }
@keyframes pr-bad { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

@media (max-width: 820px) {
  .pr-brief-grid { grid-template-columns: 1fr; }
  .pr-stage-grid { grid-template-columns: 1fr; }
  .pr-ports { display: grid; grid-template-columns: 1fr 1fr; }
  .pr-map { min-height: 150px; }
}
@media (max-width: 560px) {
  .pr-card { padding: 16px; }
  .pr-shell { padding-top: 6px; }
  .pr-start-stats { grid-template-columns: 1fr; }
  .pr-hud { gap: 10px; }
  .pr-level { margin-left: 0; width: 100%; }
  .pr-stage { padding: 8px; }
  .pr-map { display: none; }
  .pr-node.router .pr-node-dot { width: 52px; height: 52px; }
  .pr-node .pr-node-dot { width: 34px; height: 34px; }
  .pr-flow { display: none; }
  .pr-packet { flex-basis: 138px; width: 138px; }
  .pr-over-grid { grid-template-columns: 1fr; }
  .pr-ports { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .pr-packet, .pr-packet.flash-good, .pr-packet.flash-bad { animation: none; }
}
