/* 1.0n R1 (UI-REDESIGN-SPEC "R1 HOME", build plan B1): HOME top, today doors, mode row, sticky PLAY.
   Everything sits under html.nl-r1 (painted by public/js/nl-r1-home.js while NL.on('R1')), so with the switch off HOME is untouched.
   Colours are the game's own tokens (index.html :root, home.css --ch-*, navigation-city.css --nav-*). Motion: transform/opacity only,
   and only under html[data-anim="full"] without OS reduce-motion. No text under 11 px, every tap target at least 44 px. */
html.nl-r1 {
  --r1-gut: clamp(8px, 3.4vw, 14px);
  --r1-edge: #b8eafb; --r1-drop: #062949; --r1-ink: #082942;
  --r1-gold-hi: #ffe577; --r1-gold-lo: #f0b838; --r1-pow: #ffd23f;
  --r1-cyan: #46d5ed; --r1-body2: #c3e2f5; --r1-red: #e03131;
  --r1-play-b: 8px;    /* PLAY sits on the tab bar (spec: nav + 8 px); the raised HOME tab overlaps its foot, as in the mockup */
  --r1-play-height: 56px;
}

/* ---------------------------------------------------------------- the column */
html.nl-r1 #menu { padding-left: var(--r1-gut); padding-right: var(--r1-gut); padding-top: 6px; overflow-x: hidden; }
html.nl-r1 #capeHome { gap: 10px; max-width: 520px; flex: 1 0 auto; }
/* tall phones: the column starts at the top (no centring gap above the logo) and PLAY drops to the tab bar, in the thumb zone */
html.nl-r1 #menu.screen.center::before { margin-top: 0; }
html.nl-r1 #menu.screen.center::after { margin-bottom: 0; }
html.nl-r1 #capeHome::after { content: ""; order: 8; flex: 1 0 0px; min-height: 0; }   /* the spring between the modes and PLAY */
html.nl-r1 #capeHome > #nlR1Play { margin-top: 0; }
html.nl-r1 #capeHome > .ch-utilitybar { order: 1; }
html.nl-r1 #capeHome > #nlR1Top { order: 2; }
html.nl-r1 #capeHome > #chSquadPanel { order: 3; }
html.nl-r1 #capeHome > #nlR1Doors { order: 4; }
html.nl-r1 #capeHome > #nlR1Modes { order: 5; }
html.nl-r1 #capeHome > .ch-playDeck { order: 6; }
html.nl-r1 #capeHome > #nlR1Play { order: 9; }
/* what leaves HOME (its doors live on: chests door, goals door, twist door, mode row, MODE sheet, profile banner) */
html.nl-r1 #capeHome > .ch-topbar,
html.nl-r1 #capeHome > #chChestWrap,
html.nl-r1 #capeHome > #chHookRow,
html.nl-r1 #capeHome > #chFaceLine,
html.nl-r1 #capeHome > #chFooter,
html.nl-r1 #capeHome .ch-playDeck > #chPlayHeading,
html.nl-r1 #capeHome .ch-playDeck > .ch-modeDoors,
html.nl-r1 #capeHome .ch-playDeck #chMoreModes,
html.nl-r1 #capeHome .ch-playDeck #chTwist,
html.nl-r1 #capeHome #chPurse { display: none !important; }
/* the play deck keeps only the Story guide slot and, in season, the holiday chapter ticket */
html.nl-r1 #capeHome .ch-playDeck { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; background: none; border: 0; box-shadow: none; min-height: 0; }
/* repair round 3: the holiday / winter ticket leaves HOME's layout (it peeked half-faded between the modes and PLAY on J's phone).
   Its holiday chapter is one tap away on the season hub (EVENTS, the season banner) and the daily briefing; those still press this
   button, so it stays laid out (1 px, clipped, no pointer) instead of display:none. With nothing else in the deck, the deck leaves
   the column's flow too, so no empty gap is left above PLAY. */
html.nl-r1 #capeHome .ch-playDeck .ch-patrolLinks { display: block; position: absolute; left: 0; top: 0; width: 1px; height: 1px; margin: 0; padding: 0; overflow: hidden;
  clip-path: inset(50%); opacity: 0; pointer-events: none; }
html.nl-r1 #capeHome .ch-playDeck:not(:has(#chStoryGuideSlot > *)) { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); pointer-events: none; }
html.nl-r1 #capeHome #chSeasonDoor { width: 100%; min-height: 52px; margin: 0; padding: 6px 12px; gap: 10px; border-radius: 14px; border: 2px solid #ff8787; box-shadow: 0 3px 0 var(--r1-drop);
  background: linear-gradient(90deg, #2a0b2ef2 0%, #3b1236d9 60%, #3b123680 100%), url('../art/boards/metro_solo_v4.webp') center 40% / cover, #2a0b2e; color: #fff; }
html.nl-r1 #capeHome #chSeasonDoor strong { font: 400 18px/1.05 'Bangers', Impact, sans-serif; letter-spacing: 1px; color: #fff; text-shadow: 0 2px 0 #1b0718; }
html.nl-r1 #capeHome #chSeasonDoor small { font-size: 11.5px; font-weight: 800; color: #ffe9b0; }
html.nl-r1 #capeHome #chSeasonDoor .ch-ticketStar { color: #fff1b6; }
html.nl-r1 #capeHome #chStoryGuideSlot:empty { display: none; }

/* ---------------------------------------------------------------- top bar: logo, mail, sound, menu */
html.nl-r1 #capeHome .ch-utilitybar { min-height: 50px; gap: 8px; justify-content: flex-start; }
html.nl-r1 #capeHome .ch-utilitybar .ch-wordmark { flex: 0 0 auto; width: auto; min-width: 0; min-height: 50px; padding: 3px 0; margin-left: -4px; }
html.nl-r1 #capeHome .ch-utilitybar .ch-wordmark .ch-logo { width: auto; height: 44px; max-width: none; }
html.nl-r1 #capeHome .ch-utilitybar .ch-topbar-icons { margin-left: auto; gap: 8px; }
html.nl-r1 #capeHome .ch-utilitybar .ch-iconbtn { width: 44px; min-width: 44px; height: 44px; border-radius: 13px; }
@media (max-width: 300px) { html.nl-r1 #capeHome .ch-utilitybar .ch-wordmark .ch-logo { height: 38px; } html.nl-r1 #capeHome .ch-utilitybar .ch-topbar-icons { gap: 5px; } }

/* ---------------------------------------------------------------- shared card, bars */
html.nl-r1 #nlR1Top { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
html.nl-r1 .nlR1Card {
  display: flex; align-items: center; width: 100%; min-width: 0; position: relative; overflow: hidden; margin: 0;
  border-radius: 16px; border: 2px solid var(--r1-edge); background: #123f65; box-shadow: 0 4px 0 var(--r1-drop);
  color: #fff8e7; font-family: 'Nunito', sans-serif; font-weight: 800; text-align: left; cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
html.nl-r1 .nlR1Card:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--r1-drop); }
html.nl-r1 .nlR1Card:focus-visible, html.nl-r1 .nlR1Door:focus-visible, html.nl-r1 .nlR1Md:focus-visible, html.nl-r1 .nlR1PlayBar button:focus-visible { outline: 3px solid var(--r1-pow); outline-offset: 2px; }
html.nl-r1 .nlR1Bar { display: block; height: 6px; border-radius: 4px; background: #06223d; border: 1px solid #0a2a48; overflow: hidden; }
html.nl-r1 .nlR1Bar > i { display: block; height: 100%; width: 0; border-radius: 4px; background: linear-gradient(90deg, var(--r1-cyan), #9cf1ff); }
html.nl-r1 .nlR1Gold > i { background: linear-gradient(90deg, var(--r1-gold-lo), var(--r1-gold-hi)); }
html.nl-r1 .nlR1Chev { flex: 0 0 auto; display: flex; color: #8ccbe0; }
html.nl-r1 .nlR1Chev svg { display: block; }

/* ---------------------------------------------------------------- profile banner */
html.nl-r1 .nlR1Pb { min-height: 62px; gap: 10px; padding: 6px 10px 6px 8px; background: linear-gradient(110deg, #0b3558 0%, #1b5f89 100%); }
html.nl-r1 .nlR1AvWrap { position: relative; flex: 0 0 48px; width: 48px; height: 48px; }
html.nl-r1 .nlR1Av { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 35%, #7fe6f6, #1b6d97 75%); border: 3px solid var(--r1-pow); box-shadow: 0 0 0 2px var(--r1-ink); }
html.nl-r1 .nlR1Av canvas, html.nl-r1 .nlR1Av .nlR1AvArt { width: 100% !important; height: 100% !important; display: block; }
html.nl-r1 .nlR1Av svg { display: block; }
html.nl-r1 .nlR1AvLv { position: absolute; left: 32px; top: 31px; z-index: 2; min-width: 22px; height: 22px; padding: 0 4px; border-radius: 11px;
  background: var(--r1-cyan); color: var(--r1-ink); border: 2px solid var(--r1-ink); font: 400 13px/18px 'Bangers', Impact, sans-serif; letter-spacing: .5px; text-align: center; }
html.nl-r1 .nlR1Who { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding-left: 4px; }
html.nl-r1 .nlR1Name { display: block; min-width: 0; font: 400 24px/1.05 'Bangers', Impact, sans-serif; letter-spacing: 1px; color: #fff1b6; text-shadow: 0 2px 0 var(--r1-ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.nl-r1 .nlR1Hq { display: flex; align-items: center; gap: 4px; min-width: 0; font-size: 11.5px; line-height: 1.2; color: #cfefff; }
html.nl-r1 .nlR1Hq.is-none { color: var(--r1-cyan); }
html.nl-r1 .nlR1HqEm { flex: 0 0 auto; display: flex; }
html.nl-r1 .nlR1HqEm:empty { display: none; }
html.nl-r1 .nlR1HqEm svg { width: 15px !important; height: 15px !important; display: block; }
html.nl-r1 .nlR1HqN { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: .3px; }
html.nl-r1 .nlR1Tro { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
html.nl-r1 .nlR1TroN { display: flex; align-items: center; gap: 4px; }
html.nl-r1 .nlR1TroN svg { width: 24px; height: 24px; display: block; }
html.nl-r1 .nlR1TroN b { font: 400 30px/1 'Bangers', Impact, sans-serif; letter-spacing: 1px; color: var(--r1-pow); text-shadow: 0 2px 0 var(--r1-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
html.nl-r1 .nlR1Tro .nlR1Bar { width: 64px; }

/* ---------------------------------------------------------------- season banner */
html.nl-r1 .nlR1Sb { min-height: 58px; gap: 10px; padding: 6px 10px; border-color: var(--r1-pow);
  background: linear-gradient(90deg, #2a0b2ef2 0%, #3b1236d0 55%, #3b123655 100%), url('../art/boards/metro_solo_v4.webp') center 38% / cover, #2a0b2e; }
html.nl-r1 .nlR1Sb[data-phase="after"] { border-color: var(--r1-edge); background: linear-gradient(110deg, #0b3558, #1b5f89); }
html.nl-r1 .nlR1S1 { flex: 0 0 auto; min-width: 44px; height: 38px; padding: 0 7px; border-radius: 9px; background: var(--r1-pow); color: var(--r1-ink); border: 2px solid var(--r1-ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: .95; font-family: 'Bangers', Impact, sans-serif; }
html.nl-r1 .nlR1Sb[data-phase="after"] .nlR1S1 { background: var(--r1-cyan); }
html.nl-r1 .nlR1S1 small { font-size: 11px; letter-spacing: .8px; }
html.nl-r1 .nlR1S1 b { font-size: 20px; font-weight: 400; letter-spacing: .5px; font-variant-numeric: tabular-nums; }
html.nl-r1 .nlR1SMid { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
html.nl-r1 .nlR1STitle { display: block; font: 400 clamp(15px, 5vw, 20px)/1.05 'Bangers', Impact, sans-serif; letter-spacing: 1px; color: #fff; text-shadow: 0 2px 0 #1b0718; overflow-wrap: anywhere; }
html.nl-r1 .nlR1SRow { display: flex; align-items: center; gap: 6px; min-width: 0; color: #ffe9b0; }
html.nl-r1 .nlR1Step { flex: 0 0 auto; font: 400 13px/1 'Bangers', Impact, sans-serif; letter-spacing: 1px; white-space: nowrap; font-variant-numeric: tabular-nums; }
html.nl-r1 .nlR1Sb[data-phase="before"] .nlR1Step { color: var(--r1-pow); font-size: 14px; }
html.nl-r1 .nlR1SBar { flex: 1 1 auto; min-width: 24px; max-width: 120px; }
html.nl-r1 .nlR1Left { flex: 0 0 auto; display: flex; align-items: center; gap: 3px; font-size: 11px; color: #fff; white-space: nowrap; }
html.nl-r1 .nlR1Left svg { width: 12px; height: 12px; display: block; }
html.nl-r1 .nlR1Left b { font-weight: 800; font-variant-numeric: tabular-nums; }
html.nl-r1 .nlR1Ready { flex: 0 0 auto; min-width: 30px; height: 30px; padding: 0 7px; border-radius: 15px; background: var(--r1-red); color: #fff; border: 2px solid #fff1b6;
  box-shadow: 0 0 0 2px #1b0718; font: 400 18px/26px 'Bangers', Impact, sans-serif; text-align: center; font-variant-numeric: tabular-nums; }
html.nl-r1 .nlR1Ready[hidden] { display: none; }
html.nl-r1 .nlR1Sb .nlR1Chev { color: #ffe9b0; }
html.nl-r1 .nlR1Sb[data-phase="after"] .nlR1Chev { color: #8ccbe0; }

/* ---------------------------------------------------------------- today doors */
html.nl-r1 .nlR1Doors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; min-width: 0; }
html.nl-r1 .nlR1Doors.is-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
html.nl-r1 .nlR1Door { position: relative; min-width: 0; height: 64px; margin: 0; padding: 0 8px 7px; display: flex; align-items: flex-end; text-align: left; cursor: pointer;
  border-radius: 14px; background: linear-gradient(180deg, #1d5b85, #123f65); border: 2px solid #7fbfdc; box-shadow: 0 3px 0 var(--r1-drop); color: #fff;
  font-family: 'Nunito', sans-serif; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
html.nl-r1 .nlR1Door[hidden] { display: none; }
html.nl-r1 .nlR1Door:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--r1-drop); }
html.nl-r1 .nlR1DoorArt, html.nl-r1 .nlR1DoorGi { position: absolute; right: 5px; top: 4px; width: 30px; height: 30px; object-fit: contain; display: grid; place-items: center; pointer-events: none; }
html.nl-r1 .nlR1DoorGi svg { width: 26px; height: 26px; display: block; }
html.nl-r1 .nlR1DoorTx { position: relative; min-width: 0; width: 100%; display: flex; flex-direction: column; gap: 2px; }
html.nl-r1 .nlR1DoorTx b { display: block; min-width: 0; font: 400 16px/1.05 'Bangers', Impact, sans-serif; letter-spacing: .6px; color: #fff; text-shadow: 0 2px 0 var(--r1-ink); overflow-wrap: anywhere; }
html.nl-r1 .nlR1DoorTx small { display: block; font-size: 11px; font-weight: 800; line-height: 1.15; color: var(--r1-body2); white-space: nowrap; font-variant-numeric: tabular-nums; }
html.nl-r1 .nlR1Door.is-done .nlR1DoorTx small { color: #8ce99a; }
html.nl-r1 .nlR1Dot { position: absolute; top: -6px; right: -4px; width: 16px; height: 16px; border-radius: 9px; background: var(--r1-red); border: 2px solid var(--r1-ink); }
html.nl-r1 .nlR1Dot[hidden] { display: none; }

/* ---------------------------------------------------------------- mode row */
html.nl-r1 .nlR1Modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; min-width: 0; }
html.nl-r1 .nlR1Md { position: relative; overflow: hidden; min-width: 0; height: 50px; margin: 0; padding: 0 8px 6px; display: flex; align-items: flex-end; cursor: pointer;
  border-radius: 12px; border: 2px solid #9fd8ee; box-shadow: 0 3px 0 var(--r1-drop); background-color: #123f65; background-size: cover; background-position: center 30%;
  color: #fff; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
html.nl-r1 .nlR1Md::before { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, #082b49f2 0%, #082b4999 45%, #082b4910 100%); }
html.nl-r1 .nlR1Md:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--r1-drop); }
html.nl-r1 .nlR1Md span { position: relative; min-width: 0; font: 400 17px/1 'Bangers', Impact, sans-serif; letter-spacing: 1px; color: #fff; text-shadow: 0 2px 0 var(--r1-ink); white-space: nowrap; }
html.nl-r1 .nlR1Md em { position: absolute; right: 5px; top: 5px; font-style: normal; height: 18px; padding: 0 5px; border-radius: 5px; background: var(--r1-pow); color: var(--r1-ink);
  font: 400 12px/15px 'Bangers', Impact, sans-serif; letter-spacing: .5px; border: 1.5px solid var(--r1-ink); white-space: nowrap; }
html.nl-r1 .nlR1Md em[hidden] { display: none; }
html.nl-r1 .nlR1Md.is-locked { filter: saturate(.4) brightness(.8); }
/* 1.0n rc2h: holiday phase only - the PRACTICE tile is the HOLIDAY CHAPTER door (holiday lights art, warm rim, two short lines) */
html.nl-r1 .nlR1Md.is-holiday { border-color: #ff8787; background-image: url('../art/boards/metro_solo_v4.webp') !important; background-position: center 40%; }
html.nl-r1 .nlR1Md.is-holiday::before { background: linear-gradient(0deg, #2a0b2ef2 0%, #3b1236b3 55%, #3b123620 100%); }
html.nl-r1 .nlR1Md.is-holiday span { white-space: normal; font-size: 15px; line-height: .95; letter-spacing: .5px; color: #fff1b6; text-shadow: 0 2px 0 #1b0718; }

/* ---------------------------------------------------------------- PLAY (sticky above the tab bar) */
/* anything scrolled into view (the first-run tour, keyboard focus) stops above PLAY and its tag, never under them */
html.nl-r1 #nlR1Doors, html.nl-r1 .nlR1Door, html.nl-r1 #nlR1Modes, html.nl-r1 .nlR1Md, html.nl-r1 #capeHome .ch-playDeck { scroll-margin-bottom: calc(var(--r1-play-height) + 28px); }
html.nl-r1 .nlR1PlayWrap { position: sticky; bottom: var(--r1-play-b); z-index: 5; margin-top: 8px; }
html.nl-r1 .nlR1PlayWrap::before { content: ""; position: absolute; left: calc(-1 * var(--r1-gut)); right: calc(-1 * var(--r1-gut)); top: -10px; bottom: calc(-1 * var(--r1-play-b) - 6px);
  background: linear-gradient(180deg, #072f5500 0, #072f55 10px); z-index: -1; pointer-events: none; }
html.nl-r1 .nlR1Hook { position: absolute; left: 14px; top: -12px; z-index: 3; max-width: calc(100% - 28px); min-height: 22px; height: auto; padding: 2px 8px; margin: 0; border-radius: 6px;
  background: var(--r1-red); color: #fff; border: 2px solid var(--r1-ink); display: flex; align-items: center; gap: 4px; transform: rotate(-2deg); cursor: pointer;
  font: 800 11px/1.15 'Nunito', sans-serif; letter-spacing: .3px; text-align: left; }
html.nl-r1 .nlR1Hook[hidden] { display: none; }
html.nl-r1 .nlR1Hook svg { flex: 0 0 auto; display: block; }
html.nl-r1 .nlR1Hook span { min-width: 0; white-space: nowrap; }
html.nl-r1 .nlR1Hook #nlR1HookS { display: none; }
@media (max-width: 340px) { html.nl-r1 .nlR1Hook #nlR1HookT { display: none; } html.nl-r1 .nlR1Hook #nlR1HookS { display: inline; } }
/* the hook's tap target reaches 44 px without growing the tag */
html.nl-r1 .nlR1Hook::after { content: ""; position: absolute; left: -4px; right: -4px; top: -12px; bottom: -12px; }
html.nl-r1 .nlR1PlayBar { display: flex; height: var(--r1-play-height); border-radius: 16px; overflow: hidden; position: relative;
  background: linear-gradient(180deg, var(--r1-gold-hi) 0%, var(--r1-pow) 55%, var(--r1-gold-lo) 100%); border: 3px solid var(--r1-ink); box-shadow: 0 6px 0 var(--r1-ink); }
html.nl-r1 .nlR1PlayBar::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle, rgba(255,255,255,.35) 1.3px, transparent 1.6px) 0 0 / 9px 9px;
  -webkit-mask: linear-gradient(90deg, #000, transparent 70%); mask: linear-gradient(90deg, #000, transparent 70%); }
html.nl-r1 .nlR1PlayWrap::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: var(--r1-play-height); border-radius: 16px; pointer-events: none; box-shadow: 0 0 14px 3px #ffd23f88; opacity: 0; z-index: -1; }
html.nl-r1 .nlR1PlayBar button { margin: 0; border: 0; background: none; cursor: pointer; color: var(--r1-ink); position: relative; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
html.nl-r1 .nlR1Go { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 6px; }
html.nl-r1 .nlR1Go b { font: 400 34px/.9 'Bangers', Impact, sans-serif; letter-spacing: 2px; color: var(--r1-ink); text-shadow: 0 2px 0 #fff6c4; white-space: nowrap; }
html.nl-r1 .nlR1Go small { font: 800 11px/1.15 'Nunito', sans-serif; color: #5a3d00; letter-spacing: .5px; margin-top: 2px; white-space: nowrap; }
html.nl-r1 .nlR1Go:active b { transform: translateY(2px); }
html.nl-r1 .nlR1Mode { flex: 0 0 66px; border-left: 3px solid var(--r1-ink) !important; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: linear-gradient(180deg, #f7c948, #e0a52a) !important; font: 400 13px/1 'Bangers', Impact, sans-serif; letter-spacing: 1px; }
html.nl-r1 .nlR1Mode svg { display: block; width: 19px; height: 19px; }
html.nl-r1 #capeHome .nlR1Mode span { font: 400 14px/1 'Bangers', Impact, sans-serif; letter-spacing: 1px; color: var(--r1-ink); }
html.nl-r1 .nlR1Mode:active { filter: brightness(.95); }

/* ---------------------------------------------------------------- MODE sheet */
.nlR1Scrim { position: fixed; inset: 0; z-index: 90; background: #05101fcc; display: flex; align-items: flex-end; justify-content: center; }
.nlR1SheetBox { width: 100%; max-width: 520px; max-height: 86vh; overflow-y: auto; border-radius: 22px 22px 0 0; background: linear-gradient(180deg, #174f78, #0d3456);
  border-top: 3px solid #b8eafb; padding: 10px clamp(8px, 3.4vw, 14px) calc(16px + var(--sa-bottom, env(safe-area-inset-bottom, 0px))); box-shadow: 0 -6px 0 #062949; box-sizing: border-box;
  font-family: 'Nunito', sans-serif; color: #fff8e7; }
.nlR1Grab { width: 44px; height: 5px; border-radius: 3px; background: #8ccbe080; margin: 0 auto 8px; }
.nlR1SheetHead { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.nlR1SheetTitle { flex: 1; min-width: 0; font: 400 24px/1 'Bangers', Impact, sans-serif; letter-spacing: 1px; color: #fff; text-shadow: 0 2px 0 #082942; }
.nlR1SheetX { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 12px; border: 2px solid #082942; background: linear-gradient(180deg, #2a6d95, #164d73); color: #fff8e7; font: 900 18px/1 'Nunito', sans-serif; cursor: pointer; }
.nlR1ModeList { display: flex; flex-direction: column; gap: 8px; }
.nlR1ModeRow { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 56px; margin: 0; padding: 5px 10px 5px 5px; border-radius: 14px; cursor: pointer; text-align: left;
  background: linear-gradient(180deg, #1d5b85, #123f65); border: 2px solid #7fbfdc; box-shadow: 0 3px 0 #062949; color: #fff; box-sizing: border-box; }
.nlR1ModeRow.is-on { border-color: #ffd23f; box-shadow: 0 0 0 2px #ffd23f66, 0 3px 0 #062949; }
.nlR1ModeRow.is-locked { opacity: .6; }
.nlR1ModeArt { flex: 0 0 64px; width: 64px; height: 44px; border-radius: 9px; background: #0a2a48 center 30% / cover no-repeat; border: 2px solid #082942; display: grid; place-items: center; }
.nlR1ModeArt svg { display: block; }
.nlR1ModeName { flex: 1 1 auto; min-width: 0; font: 400 19px/1.05 'Bangers', Impact, sans-serif; letter-spacing: 1px; overflow-wrap: anywhere; }
.nlR1ModeMark { flex: 0 0 auto; display: flex; color: #8ccbe0; }
.nlR1ModeMark svg { display: block; }

/* wide phones: a door name that would fit on one line keeps clear of the door's corner art (it wraps under the art instead) */
@media (min-width: 381px) { html.nl-r1 .nlR1DoorTx b { padding-right: 28px; } }
/* repair round 3: the twist name is ONE line (nl-r1-home.js fitTwist shrinks it to fit); beside the skull it keeps 28 px clear,
   and a name too long for that takes the full width while the skull moves down beside the days left */
html.nl-r1 #nlR1Twist .nlR1DoorTx b { white-space: nowrap; overflow: hidden; overflow-wrap: normal; text-overflow: clip; padding-right: 28px; }
html.nl-r1 #nlR1Twist.is-long .nlR1DoorTx b { padding-right: 0; }
html.nl-r1 #nlR1Twist.is-long .nlR1DoorGi { top: auto; bottom: 4px; right: 6px; width: 16px; height: 16px; }   /* the skull moves down beside the days left */
html.nl-r1 #nlR1Twist.is-long .nlR1DoorGi svg { width: 16px; height: 16px; }
/* ---------------------------------------------------------------- small phones */
@media (max-width: 340px) {
  html.nl-r1 .nlR1Name { font-size: 22px; }
  html.nl-r1 .nlR1Go b { font-size: 30px; }
  html.nl-r1 .nlR1Md { height: 46px; }
}
/* short phones (J's phone is 360x736): the first screen still shows banners, lineup, doors, modes and PLAY with the tag clear of the mode names */
@media (max-height: 760px) {
  html.nl-r1 { --r1-play-height: 52px; }
  html.nl-r1 #menu { padding-top: 2px; }
  html.nl-r1 #capeHome { gap: 6px; }
  html.nl-r1 #nlR1Top { gap: 6px; }
  html.nl-r1 #capeHome .ch-utilitybar, html.nl-r1 #capeHome .ch-utilitybar .ch-wordmark { min-height: 46px; }
  html.nl-r1 .nlR1Door { height: 56px; padding-bottom: 5px; }
  html.nl-r1 .nlR1Md { height: 44px; padding-bottom: 5px; }
  html.nl-r1 #capeHome::after { flex-basis: 6px; }   /* + the 6 px gaps: 12 px between the modes and PLAY's tag */
}
@media (max-width: 300px) {
  html.nl-r1 .nlR1Pb { gap: 8px; padding-right: 8px; }
  html.nl-r1 .nlR1TroN b { font-size: 26px; }
  html.nl-r1 .nlR1TroN svg { width: 20px; height: 20px; }
  html.nl-r1 .nlR1Tro .nlR1Bar { width: 52px; }
  html.nl-r1 .nlR1Sb .nlR1S1 { display: none; }
  html.nl-r1 .nlR1Sb[data-phase="after"] .nlR1S1 { display: flex; }
  html.nl-r1 .nlR1DoorTx b { font-size: 14px; }
  html.nl-r1 .nlR1DoorArt, html.nl-r1 .nlR1DoorGi { width: 24px; height: 24px; }
  html.nl-r1 .nlR1DoorGi svg { width: 22px; height: 22px; }
  html.nl-r1 .nlR1Md span { font-size: 15px; }
  html.nl-r1 .nlR1Mode { flex-basis: 56px; }
  html.nl-r1 .nlR1Go b { font-size: 29px; }
}

html.nl-r1 .nlR1RewardLink { display: flex; align-items: center; justify-content: flex-start; gap: 9px; min-height: 44px; width: 100%; margin: 0;
  padding: 6px 10px; border: 2px solid #d6b8ff; border-radius: 12px; background: linear-gradient(110deg,#473278,#242055); color: #fff4ff;
  box-shadow: 0 3px 0 var(--r1-ink); text-align: left; cursor: pointer; }
html.nl-r1 .nlR1RewardLink[hidden] { display: none; }
html.nl-r1 .nlR1RewardLink b { flex: 1 1 auto; font: 400 16px/1 'Bangers', Impact, sans-serif; letter-spacing: .6px; }
html.nl-r1 .nlR1RewardLink small { color: #f9d4ff; font: 800 11px/1.15 'Nunito', sans-serif; text-align: right; }
html.nl-r1 .nlR1RewardLink svg { flex: 0 0 auto; }
html.nl-r1 .nlR1RewardLink:focus-visible { outline: 3px solid var(--r1-pow); outline-offset: 2px; }
html.nl-r1 .nlR1RewardLink:disabled { opacity: .72; }

/* ---------------------------------------------------------------- motion (full only) */
@keyframes nlR1Bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes nlR1Glow { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }
html.nl-r1[data-anim="full"] .nlR1Ready.nlR1Bob { animation: nlR1Bob 1.6s ease-in-out infinite; }
html.nl-r1[data-anim="full"] .nlR1PlayWrap::after { animation: nlR1Glow 2.4s ease-in-out infinite; }
@keyframes nlR1Hop { 0% { transform: translateY(0); } 35% { transform: translateY(-9px) scale(1.06); } 100% { transform: translateY(0); } }
html.nl-r1 #chSquadPanel .nlr5Fig.nlR1Hop { animation: nlR1Hop .5s cubic-bezier(.3, 1.7, .5, 1) both; }
html.nl-r1 body.cc-rm .nlr5Fig.nlR1Hop { animation: none; }
html.nl-r1 body.cc-rm .nlR1Ready, html.nl-r1 body.cc-rm .nlR1PlayWrap::after { animation: none !important; }
@media (prefers-reduced-motion: reduce) { html.nl-r1 .nlR1Ready, html.nl-r1 .nlR1PlayWrap::after { animation: none !important; } }

/* ---------------------------------------------------------------- polish B7 */
/* tall phones (412x915 and up): the spare height is shared out above the lineup card, the doors, the modes and PLAY (equal
   auto margins) instead of one band of sky above PLAY; the top bar and the two banners stay one tight group */
@media (min-height: 800px) {
  html.nl-r1 #capeHome::after { display: none; }
  html.nl-r1 #capeHome > #chSquadPanel, html.nl-r1 #capeHome > #nlR1Doors, html.nl-r1 #capeHome > #nlR1Modes, html.nl-r1 #capeHome > #nlR1Play { margin-top: auto; }
}
/* the tab bar's HOME label sits clear of the gold disc and turns gold while HOME is open */
html.nl-r1 #ccTabBar .ccBarMain .ccBarLbl { position: relative; top: 3px; }
html.nl-r1 #ccTabBar .ccBarMain.on .ccBarLbl { color: var(--nav-gold, #ffd23f); }
