/* The page frame only. Everything inside #ui belongs to controls.ts and its own stylesheet rules below the line. */
:root { --top: 4rem; --bottom: 10.5rem; }   /* how much of the window's top and bottom edge the controls cover (the field measures them) */
html, body { margin: 0; height: 100%; background: #070a12; color: #e8eef8; overflow: hidden; overscroll-behavior: none;
  font-family: system-ui, "Segoe UI", Roboto, sans-serif; -webkit-user-select: none; user-select: none; }
#field { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
#ui { position: fixed; inset: 0; pointer-events: none; }
#ui > * { pointer-events: auto; }
/* ---- controls ---- */
/* Sizes are in rem so the whole layer scales with the root size. */
:root { font-size: 16px; }
@media (min-width: 1500px) and (min-height: 900px) { :root { font-size: 19px; } }
/* Phone layout (controls/screen.ts turns it on): the same page, sized to the screen's short side,
   so a phone held sideways sees what a 1250 x 580 window does. */
html.nr-phone { font-size: clamp(9.5px, calc(100vmin / 34), 16px); }
#ui { --cyan: #35d8ff; --red: #ff4a6e; --gold: #ffd060; --green: #50e070; --bad: #ff5050; --dim: #8a98b0; --ink: #0c111c;
  font-family: "Roboto Condensed", "Ubuntu Sans", "Ubuntu Condensed", "Ubuntu", "Arial Narrow", "Nimbus Sans Narrow", "Segoe UI", system-ui, sans-serif;
  font-stretch: condensed; font-size: 1rem; line-height: 1.2; color: #e8eef8; }
#ui *, #ui *::before, #ui *::after { box-sizing: border-box; }
#ui .nr-hidden { display: none !important; }
#ui b { font-weight: 700; }
:where(#ui button) { font: inherit; font-stretch: condensed; color: inherit; cursor: pointer; margin: 0; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
:where(#ui button:disabled) { cursor: default; opacity: .55; }
#ui .nr-dim { color: var(--dim); }
#ui .nr-c { color: var(--cyan); }
#ui .nr-r { color: var(--red); }
body.nr-aim #field { cursor: crosshair; }

/* Panels and buttons, as GameView.panel draws them. */
.nr-panel, .nr-btn { --ac: #8aa0c0; background: linear-gradient(#1a2436eb, #0a0e18eb); border: 1px solid color-mix(in srgb, var(--ac) 70%, transparent);
  border-radius: .6rem; }
.nr-panel.nr-lit, .nr-btn.nr-lit { border-color: var(--ac); box-shadow: 0 0 0 1px var(--ac), 0 0 .9rem color-mix(in srgb, var(--ac) 40%, transparent);
  background: linear-gradient(color-mix(in srgb, var(--ac) 22%, #1a2436), color-mix(in srgb, var(--ac) 9%, #0a0e18)); }
.nr-btn { padding: .55rem 1.2rem; font-weight: 700; letter-spacing: .02em; color: #fff; text-transform: uppercase; transition: border-color .12s, filter .12s; }
.nr-btn:hover:not(:disabled), .nr-card:hover, .nr-upg:hover, .nr-fcard:hover { border-color: var(--ac); filter: brightness(1.15); }
.nr-btn:active:not(:disabled) { filter: brightness(1.35); }
.nr-cyan { --ac: #35d8ff; } .nr-red { --ac: #ff7060; } .nr-gold { --ac: #ffd060; } .nr-grey { --ac: #8aa0c0; }
.nr-btn.nr-big { font-size: 1.45rem; padding: .7rem 1.6rem; }
.nr-cost { display: inline-flex; align-items: center; gap: .2em; font-weight: 700; color: #9af0ff; white-space: nowrap; }
.nr-crystal, .nr-ico, .nr-lock { display: inline-flex; }
.nr-crystal svg { height: .95em; width: auto; }
.nr-lock svg { height: .85em; width: .85em; }
.nr-key { font-size: .7rem; font-weight: 700; color: #9aa8c0; border: 1px solid #ffffff2e; border-radius: .22rem; padding: 0 .28rem; line-height: 1.25; background: #05070dcc; }
.nr-row { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; }
.nr-logo { font-weight: 800; font-size: 5.6rem; letter-spacing: .02em; line-height: 1; display: flex; justify-content: center; gap: .3em; }
.nr-logo .nr-c { text-shadow: 0 0 .25em #35d8ffaa; } .nr-logo .nr-r { text-shadow: 0 0 .25em #ff4a6eaa; }
.nr-logo.nr-small { font-size: 2rem; justify-content: flex-start; }

/* Full-window screens. */
.nr-scr { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 35%, #0e1a32e0, #05070df2 75%); overflow-y: auto; }

/* ---- Entry ---- */
.nr-entry { display: flex; align-items: center; justify-content: center; padding: 1rem; }
.nr-entry-box { width: min(30rem, 100%); text-align: center; }
.nr-tag { color: #c0cce0; font-size: 1.1rem; margin-top: .8rem; }
.nr-form { display: flex; flex-direction: column; gap: .9rem; margin-top: 2rem; text-align: left; }
.nr-field { display: flex; flex-direction: column; gap: .3rem; }
.nr-field > span { font-size: .8rem; font-weight: 700; color: var(--dim); letter-spacing: .08em; }
.nr-field input { font: inherit; font-size: 1.2rem; padding: .6rem .8rem; background: #0a0e18; border: 1px solid #35d8ff55; color: #fff; border-radius: .45rem;
  width: 100%; outline: none; -webkit-user-select: text; user-select: text; }
.nr-field input:focus { border-color: var(--cyan); box-shadow: 0 0 0 1px var(--cyan); }
.nr-join { margin-top: .6rem; }
.nr-status { margin-top: 1rem; min-height: 1.5rem; color: #c0cce0; font-size: 1.05rem; }
.nr-status.nr-err { color: #ff7080; font-weight: 700; }
.nr-shake { animation: nr-shake .35s; }
@keyframes nr-shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* ---- Lobby ---- */
.nr-lobby { display: flex; flex-direction: column; gap: .75rem; padding: .8rem 1.5rem 1rem; }
.nr-lobby-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; padding-right: 10rem; min-height: 2.8rem; }
.nr-lobby-mid { text-align: center; }
.nr-lobby-phase { color: #c0cce0; font-size: 1.1rem; }
.nr-countdown { font-size: 2.2rem; font-weight: 800; color: var(--gold); text-shadow: 0 0 .3em #ffd06088; animation: nr-pulse 1s infinite; }
.nr-lobby-who { text-align: right; font-size: 1rem; }
.nr-lobby-who > div:first-child { font-weight: 700; }
.nr-seats { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.nr-seat { padding: .7rem 1rem; display: flex; flex-direction: column; gap: .35rem; min-height: 8.2rem; }
.nr-seat.nr-mine { --ac: #35d8ff; } .nr-seat.nr-theirs { --ac: #ff4a6e; }
.nr-seat-top { display: flex; align-items: center; gap: .5rem; }
.nr-seat-label { font-size: .85rem; font-weight: 700; letter-spacing: .08em; color: var(--ac); margin-right: auto; }
.nr-chip { font-size: .72rem; font-weight: 700; padding: .1rem .45rem; border-radius: .3rem; border: 1px solid currentColor; letter-spacing: .05em; }
.nr-chip.nr-green { color: var(--green); } .nr-chip.nr-greychip { color: var(--dim); } .nr-chip.nr-red { color: #ff7080; }
.nr-seat-name { font-size: 1.7rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nr-seat-fac { font-size: 1.05rem; font-weight: 700; color: var(--ac); display: flex; align-items: center; gap: .35rem; }
.nr-seat-fac.nr-hiddenpick { color: var(--dim); }
.nr-seat-acts { display: flex; gap: .5rem; margin-top: auto; flex-wrap: wrap; }
.nr-seat-acts .nr-btn { padding: .45rem 1rem; }
.nr-chips { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.nr-chips-l { font-size: .72rem; font-weight: 700; color: var(--dim); width: 5.2rem; letter-spacing: .06em; }
.nr-chipbtn { font-size: .78rem; font-weight: 700; padding: .22rem .55rem; background: #0e1422; border: 1px solid #ffffff22; color: #c0cce0; border-radius: .3rem; }
.nr-chipbtn.nr-on.nr-goldchip { border-color: var(--gold); background: #ffd06026; color: #fff; }
.nr-chipbtn.nr-on.nr-redchip { border-color: var(--red); background: #ff4a6e26; color: #fff; }
.nr-pick-head { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.nr-h2 { font-size: 1.45rem; font-weight: 800; }
.nr-picker { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; }
.nr-fcard { --ac: #35d8ff; text-align: left; padding: .7rem .85rem; display: flex; flex-direction: column; gap: .35rem; }
.nr-fcard-title { font-size: 1.65rem; font-weight: 800; }
.nr-fcard.nr-lit .nr-fcard-title { color: var(--cyan); text-shadow: 0 0 .3em #35d8ff88; }
.nr-fcard-blurb { font-size: .86rem; color: #d0d8e6; min-height: 2.1em; }
.nr-fcard-units { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .1rem; min-height: 4.4rem; }
.nr-fcard-unit { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.nr-fcard-unit img { width: 100%; max-width: 4.4rem; aspect-ratio: 1; object-fit: contain; }
.nr-fcard-unit span { font-size: .68rem; color: #9ab0cc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.nr-fcard-q { grid-column: 1 / -1; font-size: 3.4rem; font-weight: 800; color: var(--cyan); text-align: center; text-shadow: 0 0 .3em #35d8ff88; }
.nr-fcard-trait { font-size: .8rem; color: #9af0c0; }
.nr-fcard-power { display: flex; align-items: center; gap: .35rem; color: var(--gold); font-weight: 700; font-size: .92rem; margin-top: auto; }
.nr-fpico { display: inline-flex; }
.nr-fcard-power .nr-fpico svg { width: 1.1rem; height: 1.1rem; }
.nr-fcard-ptext { font-size: .78rem; color: #d0d8e6; }
.nr-watch-note { text-align: center; color: #c0cce0; font-size: 1.15rem; padding: 2.5rem 1rem; }
.nr-lobby-foot { display: flex; justify-content: center; gap: 1rem; margin-top: auto; padding-top: .2rem; }
.nr-ready { min-width: 17rem; }

/* ---- Menu (top right, always there) ---- */
.nr-menu { position: absolute; top: .6rem; right: max(.8rem, env(safe-area-inset-right)); display: flex; align-items: center; gap: .6rem; z-index: 20; }
.nr-menu.nr-inmatch { top: calc((var(--top) - 2.5rem) / 2); }
.nr-ping { font-size: .78rem; color: var(--dim); white-space: nowrap; }
.nr-ping.nr-bad { color: #ff8060; }
.nr-menu-btn { width: 2.5rem; height: 2.5rem; display: flex; align-items: center; justify-content: center; border-radius: .55rem;
  background: linear-gradient(#1a2436, #0a0e18); border: 1px solid #8aa0c088; padding: 0; }
.nr-menu-btn.nr-on, .nr-menu-btn:hover { border-color: #fff; }
.nr-menu-btn svg { width: 1.3rem; height: 1.3rem; }
.nr-menu-panel { position: absolute; top: calc(100% + .4rem); right: 0; width: 14rem; padding: .6rem; display: flex; flex-direction: column; gap: .45rem; }
.nr-menu-note { font-size: .8rem; text-align: center; }
.nr-confirm { display: flex; flex-direction: column; gap: .5rem; text-align: center; font-weight: 700; }
.nr-confirm .nr-btn { padding: .45rem .7rem; font-size: .9rem; }

/* ---- Top bar ---- */
.nr-top { position: absolute; top: 0; left: 0; right: 0; height: var(--top); display: grid; grid-template-columns: 1fr minmax(12rem, 22%) 1fr;
  gap: 2rem; align-items: center; padding: 0 calc(10.6rem + env(safe-area-inset-right)) 0 max(1.5rem, env(safe-area-inset-left)); background: linear-gradient(#141c2c, #080b14); border-bottom: 1px solid #4a6a9a66; }
.nr-hull { display: flex; flex-direction: column; gap: .35rem; min-width: 0; --ac: var(--cyan); }
.nr-hull.nr-r { --ac: var(--red); }
.nr-hbar { height: 1.2rem; background: var(--ink); border: 1px solid color-mix(in srgb, var(--ac) 65%, transparent); border-radius: .35rem; overflow: hidden; display: flex; }
.nr-hull.nr-r .nr-hbar { justify-content: flex-end; }
.nr-hbar i { display: block; height: 100%; background: var(--ac); transition: width .25s; }
.nr-hull.nr-hit .nr-hbar i { filter: brightness(1.7); }
.nr-hull.nr-low .nr-hbar { animation: nr-alarm .8s infinite; }
@keyframes nr-alarm { 50% { box-shadow: 0 0 .8rem var(--ac); } }
.nr-hrow { display: flex; align-items: baseline; gap: .6rem; font-size: 1.02rem; white-space: nowrap; min-width: 0; }
.nr-hull.nr-r .nr-hrow { flex-direction: row-reverse; }
.nr-hfac { font-weight: 700; color: var(--ac); }
.nr-hname { color: #c0cce0; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.nr-hhp { font-weight: 700; color: #cfd8e6; margin-left: auto; }
.nr-hull.nr-r .nr-hhp { margin-left: 0; margin-right: auto; }
.nr-wave { display: flex; flex-direction: column; align-items: center; gap: .22rem; }
.nr-wave > b { font-size: 1.35rem; }
.nr-wbar { width: 100%; height: .5rem; background: var(--ink); border: 1px solid #ffd06099; border-radius: .3rem; overflow: hidden; }
.nr-wbar i { display: block; height: 100%; background: var(--gold); }
.nr-clock { font-size: .8rem; color: var(--dim); white-space: nowrap; }
.nr-clock.nr-warn { color: #ff7050; font-weight: 700; }

/* ---- Bottom bar (player) ---- */
.nr-bottom { position: absolute; left: 0; right: 0; bottom: 0; height: var(--bottom);
  padding: .5rem max(.75rem, env(safe-area-inset-right)) .5rem max(.75rem, env(safe-area-inset-left));
  background: linear-gradient(#121928, #06080f); border-top: 1px solid #4a6a9a66; }
.nr-bot-in { height: 100%; max-width: 86rem; margin: 0 auto; display: grid; grid-template-columns: 8.6rem minmax(0, 1fr) 19.5rem 8.4rem; gap: .5rem; }
.nr-res { --ac: #6ae8ff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem; padding: .4rem; min-width: 0; }
.nr-mrow { display: flex; align-items: center; gap: .35rem; }
.nr-mrow .nr-crystal svg { height: 1.9rem; }
.nr-min { font-size: 2.3rem; font-weight: 800; line-height: 1; }
.nr-min.nr-poor { color: var(--bad); }
.nr-inc { color: #9ae8b0; font-size: .92rem; } .nr-tech { color: var(--gold); font-size: .92rem; } .nr-pads { color: var(--dim); font-size: .85rem; }
.nr-cards { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .4rem; }
.nr-card { --ac: #35d8ff; position: relative; display: flex; flex-direction: column; align-items: center; padding: .3rem .2rem .5rem; min-width: 0; }
.nr-card-pic { width: 100%; max-width: 5.6rem; height: 5.3rem; object-fit: contain; margin-top: .25rem; pointer-events: none; }
.nr-card-name { margin-top: auto; font-weight: 700; font-size: 1rem; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nr-card-cost { font-size: 1.15rem; }
.nr-card-lock { display: flex; align-items: center; gap: .25rem; color: var(--gold); font-weight: 700; font-size: 1.02rem; white-space: nowrap; }
.nr-card.nr-locked { --ac: #4a5468; }
.nr-card.nr-locked .nr-card-pic { opacity: .28; filter: grayscale(.7); }
.nr-card.nr-locked .nr-card-name { color: #6a7488; }
.nr-card.nr-poor .nr-card-pic { opacity: .6; }
.nr-card.nr-poor .nr-cost, .nr-upg.nr-poor .nr-cost { color: #ff7060; }
.nr-arrow { position: absolute; top: .4rem; left: .45rem; width: 0; height: 0; border-left: .55rem solid transparent; border-right: .55rem solid transparent;
  border-top: .85rem solid var(--bad); }
.nr-arrow.nr-up { border-top: 0; border-bottom: .85rem solid var(--green); }
.nr-count { position: absolute; top: 1.35rem; right: .4rem; color: #ffe070; font-weight: 700; font-size: 1rem; }
.nr-card .nr-key { position: absolute; top: .3rem; right: .3rem; }
.nr-upgs { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: .4rem; }
.nr-upg { display: flex; flex-direction: column; justify-content: space-between; padding: .45rem .6rem; text-align: left; min-width: 0; }
.nr-upg-top, .nr-upg-bot { display: flex; align-items: center; justify-content: space-between; gap: .3rem; min-width: 0; }
.nr-upg-top b { color: var(--ac); font-size: 1.2rem; }
.nr-upg-top .nr-cost { font-size: 1.15rem; }
.nr-upg-bot > span:first-child { font-size: .8rem; color: #b0bcd0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nr-upg.nr-off { --ac: #6a7488 !important; }
.nr-max { color: #6a7488; font-weight: 700; }
.nr-power { width: 100%; min-width: 0; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; background: none; border: 0; padding: 0; }
.nr-pring { --p: 0%; width: 6.4rem; height: 6.4rem; border-radius: 50%; padding: .32rem; background: conic-gradient(var(--cyan) var(--p), #2a3446 0); }
.nr-pico { width: 100%; height: 100%; border-radius: 50%; background: var(--ink); display: flex; align-items: center; justify-content: center; color: #6a7488; }
.nr-power .nr-pico svg { width: 58%; height: 58%; }
.nr-power.nr-ready .nr-pico { color: #fff; animation: nr-glow 1.3s infinite; }
@keyframes nr-glow { 0%, 100% { background: radial-gradient(#35d8ff55, #0c111c 75%); } 50% { background: radial-gradient(#35d8ffaa, #0c111c 80%); } }
.nr-power.nr-aiming .nr-pring { background: #fff; box-shadow: 0 0 1rem var(--cyan); }
.nr-power.nr-aiming .nr-pico { color: var(--cyan); }
.nr-power.nr-frenzy .nr-pring { background: #ff5030; box-shadow: 0 0 1rem #ff5030; }
.nr-power.nr-frenzy .nr-pico { color: #ffb090; }
.nr-plabel { font-weight: 700; font-size: .9rem; color: var(--dim); white-space: nowrap; }
.nr-power.nr-ready .nr-plabel, .nr-power.nr-aiming .nr-plabel { color: var(--cyan); }
.nr-power.nr-frenzy .nr-plabel { color: #ff8060; }
.nr-pkey { position: absolute; top: .1rem; right: .1rem; }
.nr-power:hover .nr-pring { filter: brightness(1.2); }

/* ---- Bottom bar (watching) ---- */
.nr-watch-in { grid-template-columns: minmax(0, 1fr) 11rem minmax(0, 1fr); max-width: 80rem; }
.nr-wside { padding: .55rem .9rem; display: flex; flex-direction: column; min-width: 0; }
.nr-wside.nr-mine { --ac: #35d8ff; } .nr-wside.nr-theirs { --ac: #ff4a6e; }
.nr-wside-head { display: flex; align-items: baseline; gap: .6rem; white-space: nowrap; overflow: hidden; }
.nr-wside-head b { font-size: 1.25rem; overflow: hidden; text-overflow: ellipsis; }
.nr-wside-head span { color: var(--ac); font-weight: 700; }
.nr-wgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .25rem .8rem; margin-top: auto; }
.nr-wcell { display: flex; flex-direction: column; min-width: 0; }
.nr-wcell b { font-size: 1.2rem; display: flex; align-items: center; gap: .25rem; }
.nr-wcell > span { font-size: .72rem; color: var(--dim); }
.nr-wmid { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: .3rem; }
.nr-wmid b { font-size: 1.3rem; letter-spacing: .1em; }
.nr-wmid span { font-size: .8rem; }

/* ---- Info box and tooltip ---- */
.nr-info { --ac: #35d8ff; position: absolute; display: flex; gap: .9rem; padding: .7rem .95rem; background: linear-gradient(#1a2436f2, #0a0e18f2);
  border: 1px solid var(--ac); border-radius: .7rem; box-shadow: 0 .4rem 1.6rem #000a; }
.nr-info.nr-foe { --ac: #ff4a6e; }
.nr-info-top { top: calc(var(--top) + .6rem); left: 50%; transform: translateX(-50%); width: min(56rem, calc(100vw - 2rem)); }
#ui > .nr-tip { bottom: calc(var(--bottom) + .5rem); width: min(42rem, calc(100vw - 1rem)); pointer-events: none; }
.nr-info-pic { width: 5.6rem; height: 5.6rem; object-fit: contain; flex: none; }
.nr-flip { transform: scaleX(-1); }
.nr-info-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .25rem; }
.nr-info-head { display: flex; align-items: baseline; gap: .7rem; flex-wrap: wrap; }
.nr-info-head b { font-size: 1.35rem; }
.nr-info-tags { color: var(--gold); font-size: .85rem; }
.nr-info-desc { font-size: .92rem; color: #e0e6f0; }
.nr-info-stats { font-size: .82rem; color: #9ab0cc; }
.nr-info-vs { display: flex; flex-wrap: wrap; gap: .15rem 1.2rem; font-size: .86rem; margin-top: .1rem; }
.nr-vs-l { font-weight: 700; margin-right: .4rem; letter-spacing: .04em; }
.nr-good { color: #9af0c0; } .nr-good .nr-vs-l { color: var(--green); }
.nr-bad { color: #ffb4b4; } .nr-bad .nr-vs-l { color: #ff6070; }
.nr-info-acts { display: flex; flex-direction: column; gap: .4rem; width: 11.5rem; flex: none; margin-right: 1.3rem; }
.nr-act { display: flex; flex-direction: column; align-items: center; padding: .35rem .5rem; flex: 1; justify-content: center; }
.nr-act b { font-size: 1.05rem; }
.nr-act-sub { display: flex; gap: .5rem; font-size: .8rem; color: #c0cce0; font-weight: 400; text-transform: none; }
.nr-act.nr-off { --ac: #4a5468; color: #8a98b0; }
.nr-act.nr-poor .nr-cost { color: #ff7060; }
.nr-info-x { position: absolute; top: .1rem; right: .35rem; background: none; border: 0; color: var(--dim); font-size: 1.5rem; line-height: 1; padding: .1rem .3rem; }
.nr-info-x:hover { color: #fff; }

/* ---- Messages over the field (they never take clicks) ---- */
#ui > .nr-banner, #ui > .nr-toast { pointer-events: none; position: absolute; left: 50%; transform: translateX(-50%); text-align: center; border-radius: .6rem; }
.nr-toast { bottom: calc(var(--bottom) + .8rem); background: #080c14d8; color: #fff0c8; padding: .45rem 1.3rem; font-weight: 700; font-size: 1.1rem; white-space: nowrap; }
.nr-aimhint { top: calc(var(--top) + .8rem); color: var(--cyan); font-weight: 800; font-size: 1.25rem; background: #000a; padding: .4rem 1.2rem; white-space: nowrap;
  text-shadow: 0 0 .4em #35d8ff99; }
.nr-pause { top: 38%; background: linear-gradient(#1a2436f4, #0a0e18f4); border: 1px solid var(--gold); padding: 1rem 2rem; max-width: min(36rem, 92vw); }
.nr-pause-t { font-size: 1.6rem; font-weight: 800; color: var(--gold); margin-bottom: .3rem; }
.nr-standin { top: calc(var(--top) + .5rem); background: #0a0e18d8; border: 1px solid #ffd06088; color: #ffe0a0; padding: .3rem 1rem; font-size: .9rem; white-space: nowrap; }
.nr-warnbar { top: calc(var(--top) + 2.8rem); background: #0a0e18d8; border: 1px solid var(--gold); color: var(--gold); font-weight: 800; padding: .3rem 1rem; white-space: nowrap; }
.nr-warnbar.nr-hot { color: #ff7050; border-color: #ff7050; animation: nr-pulse 1s infinite; }
.nr-reconnect { top: .6rem; z-index: 30; background: #401018ee; border: 1px solid #ff7060; color: #ffd0c8; padding: .45rem 1.4rem; font-weight: 700; animation: nr-pulse 1.2s infinite; }
@keyframes nr-pulse { 50% { opacity: .65; } }

/* ---- End ---- */
.nr-end { display: flex; align-items: center; justify-content: center; padding: 1rem; background: #000008b8; }
.nr-end-box { --ac: #8aa0c0; width: min(40rem, 100%); padding: 1.4rem 2rem 1.6rem; text-align: center; }
.nr-end-title { font-size: 4.6rem; font-weight: 800; line-height: 1; overflow-wrap: anywhere; }
.nr-end-title.nr-c { text-shadow: 0 0 .25em #35d8ffaa; } .nr-end-title.nr-r { text-shadow: 0 0 .25em #ff4a6eaa; }
.nr-end-why { font-size: 1.25rem; margin-top: .6rem; }
.nr-end-sub { font-size: .95rem; margin-top: .2rem; }
.nr-stats { display: grid; grid-template-columns: 1fr 9rem 9rem; gap: .35rem 1rem; margin: 1.2rem auto 0; max-width: 32rem; text-align: right; align-items: baseline; }
.nr-stats > b { font-size: 1.25rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nr-stat-l { text-align: left; color: #9ab0cc; }
.nr-end-acts { margin-top: 1.4rem; }
.nr-end-wait { margin-top: .8rem; }
#ui > .nr-peek { position: absolute; bottom: 1rem; left: 50%; transform: translateX(-50%); }

/* ---- Phone ---- */
html.nr-phone .nr-menu-btn { width: 3.1rem; height: 3.1rem; }
html.nr-phone .nr-menu.nr-inmatch { top: calc((var(--top) - 3.1rem) / 2); }
html.nr-phone .nr-ping { display: none; }
html.nr-phone .nr-top { gap: 1.2rem; padding-right: calc(8.4rem + env(safe-area-inset-right)); }
html.nr-phone .nr-bot-in { grid-template-columns: 7.6rem minmax(0, 1fr) 18rem 7.4rem; gap: .4rem; }
html.nr-phone .nr-pring { width: 5.8rem; height: 5.8rem; }
html.nr-phone .nr-lobby { padding-left: max(1.5rem, env(safe-area-inset-left)); padding-right: max(1.5rem, env(safe-area-inset-right)); }
html.nr-phone .nr-key { display: none; }
.nr-rotate { display: none; }
@media (orientation: portrait) {
  html.nr-phone #ui > .nr-rotate.nr-on { position: absolute; inset: 0; z-index: 40; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 1rem; padding: 2rem; text-align: center; background: #05070df5; font-size: 1.5rem; }
  html.nr-phone .nr-rotate b { font-size: 2.2rem; }
  .nr-rotate-ico { width: 5rem; height: 8.5rem; border: .35rem solid var(--cyan); border-radius: 1rem; animation: nr-turn 2.4s ease-in-out infinite; }
}
@keyframes nr-turn { 0%, 25% { transform: rotate(0); } 60%, 100% { transform: rotate(-90deg); } }

/* Narrow windows: give the cards a little more room. */
@media (max-width: 1220px) {
  .nr-bot-in { grid-template-columns: 7.6rem minmax(0, 1fr) 18rem 7.4rem; gap: .4rem; }
  .nr-pring { width: 5.8rem; height: 5.8rem; }
  .nr-top { gap: 1.2rem; }
}
/* On a phone the lobby is taller than the screen: keep Ready in reach while it scrolls. */
html.nr-phone .nr-lobby-foot { position: sticky; bottom: 0; padding: .5rem 0; margin-bottom: -1rem; background: linear-gradient(#05070d00, #05070df0 35%); }

/* ---- Teams ---- */
/* The second row of seats (two against two) stays short until someone uses it. */
.nr-seat.nr-seat-second { min-height: 0; }
.nr-giveup { top: calc(var(--top) + 5rem); border-color: #ff706088; color: #ffd0c8; }
