/* The phone Home's upgrade card, as in the owner's mockup (4 Dec 2026). Markup: js/welcome.js paintPrem (it changes
   with the welcome offer); holder: views/home.js (.nt-prem). Phones in the Night look only. Sizes in the phone Home's
   unit (--u = 1/375 of the screen width, css/look-night-home.css), measured from the mockup.
   States: .is-deal (offer running: price, clock, sticker), .is-final (its last hour), neither (no offer: Upgrade). */

@media (max-width: 759px) {
  html.look-night .nt-home .nt-prem {
    position: relative; display: block; box-sizing: border-box; height: calc(78.8 * var(--u));
    /* A little wider than the cards around it, as in the mockup. */
    margin: calc(15.7 * var(--u)) 0 0 calc(5.2 * var(--u) - var(--gutter)); width: calc(364.6 * var(--u)); border-radius: calc(18 * var(--u));
    border: calc(1.4 * var(--u)) solid transparent; color: #fff; text-decoration: none; isolation: isolate;
    background:
      radial-gradient(55% 85% at 42% 18%, rgba(28, 78, 170, 0.75) 0%, rgba(28, 78, 170, 0) 70%) padding-box,
      linear-gradient(165deg, #0f3587 0%, #10398c 38%, #0d2d70 75%, #0b2865 100%) padding-box,
      linear-gradient(100deg, #86c2f0 0%, #4f86cc 18%, #2c52a6 45%, #22428f 70%, #1a367f 100%) border-box;
    box-shadow: 0 0 0 calc(0.6 * var(--u)) rgba(70, 130, 230, 0.18), 0 calc(10 * var(--u)) calc(26 * var(--u)) calc(-14 * var(--u)) rgba(40, 120, 255, 0.6);
    transition: transform 140ms cubic-bezier(0.23, 1, 0.32, 1);
  }
  html.look-night .nt-home .nt-prem:active { transform: scale(0.985); }
  /* The warm light along the bottom edge. */
  html.look-night .nt-home .nt-prem::after {
    content: ''; position: absolute; z-index: 1; left: 14%; width: 46%; bottom: calc(-1.4 * var(--u)); height: calc(1.6 * var(--u)); pointer-events: none;
    background: radial-gradient(closest-side, #fff6c2 0%, rgba(253, 228, 140, 0.85) 45%, rgba(253, 228, 140, 0) 100%);
    filter: drop-shadow(0 0 calc(3 * var(--u)) rgba(255, 214, 110, 0.75));
  }

  html.look-night .nt-home .nt-prem-crown {
    position: absolute; left: calc(13.4 * var(--u)); top: 50%; width: calc(48.4 * var(--u)); height: calc(48.4 * var(--u)); transform: translateY(-50%);
    display: grid; place-items: center; border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, #26478a 0%, #1f3c7d 60%, #1c3874 100%);
    box-shadow: inset 0 calc(1 * var(--u)) 0 rgba(255, 255, 255, 0.06);
  }
  html.look-night .nt-home .nt-prem-crown svg { width: calc(27.2 * var(--u)); height: calc(25.2 * var(--u)); margin-top: calc(-3.6 * var(--u)); filter: drop-shadow(0 0 calc(4 * var(--u)) rgba(255, 200, 40, 0.35)); }
  html.look-night .nt-home .nt-prem-line {
    position: absolute; left: calc(73 * var(--u)); top: 50%; width: 1px; height: calc(48.4 * var(--u)); transform: translateY(-50%);
    background: rgba(120, 150, 225, 0.5);
  }

  /* Words */
  html.look-night .nt-home .nt-prem-text { position: absolute; left: calc(84.7 * var(--u)); top: 0; bottom: 0; right: calc(var(--np-buy, 89.6 * var(--u)) + 16.5 * var(--u)); }
  html.look-night .nt-home .nt-prem-text b {
    position: absolute; left: 0; right: calc(-4 * var(--u)); top: calc(12.4 * var(--u)); overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
    font: 700 calc(18.7 * var(--u))/1 var(--font-head); letter-spacing: -0.005em; color: #fff;
  }
  html.look-night .nt-home .nt-prem-text b.is-long { font-size: calc(16.5 * var(--u)); top: calc(13.4 * var(--u)); }
  html.look-night .nt-home .nt-prem-text b.is-longer { font-size: calc(14.5 * var(--u)); top: calc(14.4 * var(--u)); }
  html.look-night .nt-home .nt-prem-text small {
    position: absolute; left: 0; right: calc(-4 * var(--u)); top: calc(34.7 * var(--u)); overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
    font: 500 calc(11 * var(--u))/1.15 var(--font-head); color: #fff;
  }
  html.look-night .nt-home .nt-prem-ends {
    position: absolute; left: calc(-0.9 * var(--u)); top: calc(51.1 * var(--u)); height: calc(17.9 * var(--u)); box-sizing: border-box;
    display: inline-flex; align-items: center; gap: calc(2.8 * var(--u)); padding: 0 calc(5.4 * var(--u)) 0 calc(3.5 * var(--u)); border-radius: 99px; white-space: nowrap;
    background: rgba(8, 28, 76, 0.85); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
    font: 700 calc(13.8 * var(--u))/1 var(--font-head); color: #ffcc1d;
  }
  html.look-night .nt-home .nt-prem-ends svg { flex: none; width: calc(13.4 * var(--u)); height: calc(13.4 * var(--u)); }
  html.look-night .nt-home .nt-prem-ends .wl-clock { font-variant-numeric: tabular-nums; font-weight: 700; }
  html.look-night .nt-home .nt-prem.is-final .nt-prem-ends { color: #ff8f7e; }
  html.look-night .nt-home .nt-prem.is-final .nt-prem-ends circle { fill: #ff8f7e; }
  html.look-night .nt-home .nt-prem-once {
    position: absolute; left: 0; right: calc(-4 * var(--u)); top: calc(54 * var(--u)); overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
    font: 500 calc(11.5 * var(--u))/1.15 var(--font-head); color: #c9d4f5;
  }

  /* The price, or Upgrade when there's no offer */
  html.look-night .nt-home .nt-prem-buy {
    position: absolute; right: calc(12.5 * var(--u)); top: 50%; transform: translateY(-50%); box-sizing: border-box;
    display: inline-flex; align-items: center; justify-content: center; gap: calc(6 * var(--u));
    min-width: calc(89.6 * var(--u)); height: calc(33.6 * var(--u)); padding: 0 calc(12.5 * var(--u)) 0 calc(14 * var(--u)); border-radius: 99px; white-space: nowrap;
    background: linear-gradient(180deg, #ffde55 0%, #fed235 45%, #fdc41e 100%);
    box-shadow: inset 0 calc(1 * var(--u)) 0 rgba(255, 255, 255, 0.5), 0 calc(6 * var(--u)) calc(14 * var(--u)) calc(-6 * var(--u)) rgba(253, 196, 30, 0.75);
  }
  html.look-night .nt-home .nt-prem-buy b { font: 800 calc(17.5 * var(--u))/1 var(--font-head); letter-spacing: -0.01em; color: #0b0a12; }
  html.look-night .nt-home .nt-prem-buy s {
    font: 600 calc(14 * var(--u))/1 var(--font-head); color: rgba(40, 70, 75, 0.82);
    text-decoration: line-through; text-decoration-thickness: calc(1.3 * var(--u)); text-decoration-color: rgba(40, 70, 75, 0.82);
  }
  html.look-night .nt-home .nt-prem-buy.is-cta { min-width: 0; gap: calc(3.5 * var(--u)); padding: 0 calc(10 * var(--u)) 0 calc(12 * var(--u)); font: 800 calc(14 * var(--u))/1 var(--font-head); color: #14112e; }
  html.look-night .nt-home .nt-prem-buy.is-cta svg { width: calc(15 * var(--u)); height: calc(15 * var(--u)); }
  /* Fitting other languages (welcome.js fitPrem): the Upgrade pill down to its arrow, then smaller lines. */
  html.look-night .nt-home .nt-prem.is-arrow .nt-prem-buy.is-cta { padding: 0 calc(11 * var(--u)); }
  html.look-night .nt-home .nt-prem.is-arrow .nt-prem-buy.is-cta span { display: none; }
  html.look-night .nt-home .nt-prem.is-tight .nt-prem-text small, html.look-night .nt-home .nt-prem.is-tight .nt-prem-once { font-size: calc(10 * var(--u)); }

  /* The discount sticker: a white-rimmed coral-to-pink sticker (straight: owner, 4 Dec 2026) with a gloss along its top, sitting
     across the card's top edge over the price (the owner asked for a better tag than the mockup's flat pink pill). */
  html.look-night .nt-home .nt-prem-off {
    position: absolute; z-index: 3; right: calc(9 * var(--u)); top: calc(-10.5 * var(--u));
    display: inline-flex; align-items: center; height: calc(23 * var(--u)); padding: 0 calc(9 * var(--u)); box-sizing: border-box; border-radius: 99px;
    border: calc(1.8 * var(--u)) solid #fff4f8; overflow: hidden; white-space: nowrap;
    background: linear-gradient(120deg, #ff7a62 0%, #ff4778 48%, #f0217a 100%);
    box-shadow: 0 calc(4 * var(--u)) calc(10 * var(--u)) calc(-2 * var(--u)) rgba(240, 33, 122, 0.6), 0 calc(1.5 * var(--u)) 0 rgba(90, 0, 40, 0.35);
  }
  html.look-night .nt-home .nt-prem-off::before {
    content: ''; position: absolute; left: 0; right: 0; top: 0; height: 48%; border-radius: 99px 99px 40% 40%; pointer-events: none;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0.04));
  }
  html.look-night .nt-home .nt-prem-off b { position: relative; font: 800 calc(12.6 * var(--u))/1 var(--font-head); letter-spacing: 0.03em; color: #fff; text-shadow: 0 calc(1 * var(--u)) 0 rgba(120, 0, 50, 0.35); }
}
@media (max-width: 759px) and (prefers-reduced-motion: reduce) { html.look-night .nt-home .nt-prem { transition: none; } }
