/*
 * MetaLark tradeshow kiosk.
 * Tokens come from the MetaLark Frame design system
 * (hyperframes-sandbox/design-systems/metalark/FRAME.md). Quote them; do not remix.
 *
 * Layout: one 16:9 stage. The menu is a 4 x 3 grid of white cards that float on the
 * app gradient. The screensaver is a "product intro" frame: copy left, app window right,
 * with the MRI scan line reading down each capture.
 *
 * --u is 1% of the widest 16:9 box that fits the screen (the video system's "cqw").
 */
@font-face {
  font-family: "Quicksand";
  font-style: normal;
  font-weight: 300 700;
  font-display: block;
  src: url("../assets/fonts/quicksand-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Quicksand";
  font-style: normal;
  font-weight: 300 700;
  font-display: block;
  src: url("../assets/fonts/quicksand-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* colors (FRAME.md) */
  --bg: #FFFFFF;
  --primary: #A75E7D;
  --text: #2F4858;
  --text-muted: #4A5879;
  --text-light: #9A9A9A;
  --accent-light: rgba(167, 94, 125, 0.08);
  --accent-medium: rgba(167, 94, 125, 0.15);
  --border: rgba(167, 94, 125, 0.2);
  --card-bg: rgba(167, 94, 125, 0.04);
  --navy: #4A5879;
  --frame-top: #DD7785;
  --frame-mid: #7F637D;
  --chrome: #F0F1F4;
  --chrome-dot: #D5D8DE;
  --on-gradient: #FFFFFF;
  --on-gradient-soft: rgba(255, 255, 255, 0.85);
  --on-gradient-line: rgba(255, 255, 255, 0.22);
  --app-gradient: linear-gradient(var(--frame-top), var(--frame-mid) 39%, var(--navy));
  --wash-pink: #FFEFF6;
  --wash-cool: #EEF1F6;
  --ring-line: rgba(167, 94, 125, 0.07);
  --lift-soft: 0 calc(var(--u) * 0.5) calc(var(--u) * 1.8) rgba(74, 88, 121, 0.10);
  --lift: 0 calc(var(--u) * 1.2) calc(var(--u) * 3) rgba(74, 88, 121, 0.22);

  /* type */
  --font: "Quicksand", "Segoe UI", system-ui, sans-serif;

  /* scale */
  --u: min(1vw, calc(100vh / 56.25));
  --pad-x: calc(var(--u) * 3);
  --gap: calc(var(--u) * 1.1);

  /* radii */
  --r-pill: 100px;
  --r-lg: calc(var(--u) * 0.85);
  --r-md: calc(var(--u) * 0.65);

  /* motion: long-tail power3 settle, no bounce */
  --ease: cubic-bezier(0.215, 0.61, 0.355, 1);

  color-scheme: light;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--wash-cool);
  color: var(--text);
  font-family: var(--font);
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  /* kiosk: no selection, no callouts, no double-tap zoom */
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}
body.hide-cursor, body.hide-cursor * { cursor: none !important; }

img { display: block; max-width: 100%; -webkit-user-drag: none; }
button { font: inherit; color: inherit; touch-action: manipulation; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
.menu :focus-visible { outline-color: var(--on-gradient); }

h1, h2, p { margin: 0; }

/* ============================================================
   AMBIENT GROUND (video player only)
   A pale white-to-pink wash with faint concentric rings. The
   drifting node network is drawn on the canvas by js/ambient.js.
   The menu and the screensaver cover it with the app gradient.
   ============================================================ */
body {
  background:
    repeating-radial-gradient(circle at 64% 52%, transparent 0 calc(var(--u) * 6.6), var(--ring-line) calc(var(--u) * 6.6) calc(var(--u) * 6.6 + 1.5px)),
    radial-gradient(ellipse at 85% 0%, var(--wash-pink) 0%, transparent 60%),
    radial-gradient(ellipse at 0% 100%, var(--wash-cool) 0%, transparent 65%),
    linear-gradient(160deg, #FFFFFF 0%, #FCF7FA 50%, var(--wash-cool) 100%);
}
.ambient {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
body.is-playing .menu { visibility: hidden; }

.eyebrow {
  font-weight: 700;
  font-size: calc(var(--u) * 0.8);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
}

/* ============================================================
   MENU
   ============================================================ */
.menu {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: calc(var(--u) * 1.4);
  padding: calc(var(--u) * 1.8) var(--pad-x) calc(var(--u) * 1.8);
  background: var(--app-gradient);
}

.menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(var(--u) * 2);
}
.brand { display: flex; align-items: center; gap: calc(var(--u) * 1.2); min-width: 0; }
.logo-plate {
  flex: none;
  display: grid;
  place-items: center;
  width: calc(var(--u) * 4.4);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--bg);
}
.logo-plate img { width: 64%; }
.brand-text { display: grid; gap: calc(var(--u) * 0.3); }
.brand-text .eyebrow { color: var(--on-gradient-soft); }
.menu-head h1 {
  font-size: calc(var(--u) * 2.6);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--on-gradient);
}
.menu-hint {
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 0.6);
  padding: calc(var(--u) * 0.7) calc(var(--u) * 1.3);
  border: 1.5px solid var(--on-gradient-line);
  border-radius: var(--r-pill);
  font-size: calc(var(--u) * 0.95);
  font-weight: 600;
  color: var(--on-gradient);
  white-space: nowrap;
}
.menu-hint .ml-icon {
  width: calc(var(--u) * 1.5);
  height: calc(var(--u) * 1.5);
}

.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
}
.grid > li { min-height: 0; display: flex; }

.card {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: calc(var(--u) * 0.45);
  padding: calc(var(--u) * 1.1) calc(var(--u) * 1.3);
  border: 0;
  border-radius: var(--r-lg);
  background: var(--bg);
  overflow: hidden;
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s var(--ease);
}
.grid.enter .card {
  animation: card-in 0.6s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 35ms);
}
.card:active { transform: scale(0.975); }
.card:focus-visible { outline-offset: 4px; }

@keyframes card-in {
  from { opacity: 0; transform: translateY(calc(var(--u) * 1.2)); }
  to   { opacity: 1; transform: none; }
}

/* One line icon per use case, in a tinted circle; the play pill sits opposite. */
.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: calc(var(--u) * 0.2);
}
.card-icon {
  display: grid;
  place-items: center;
  width: calc(var(--u) * 3.6);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--accent-light);
  box-shadow: inset 0 0 0 1.5px var(--border);
  color: var(--primary);
}
.card-icon .ml-icon { width: 54%; height: 54%; }
.card-play {
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 0.35);
  padding: calc(var(--u) * 0.35) calc(var(--u) * 0.8) calc(var(--u) * 0.35) calc(var(--u) * 0.45);
  border-radius: var(--r-pill);
  background: var(--primary);
  color: var(--bg);
  font-size: calc(var(--u) * 0.78);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
}
.card-play svg {
  width: calc(var(--u) * 1.1);
  height: calc(var(--u) * 1.1);
  fill: currentColor;
}

.card-title {
  font-size: calc(var(--u) * 1.35);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
  text-wrap: balance;
}
.card-features {
  display: block;
  margin-top: auto;
  font-size: calc(var(--u) * 0.74);
  line-height: 1.45;
  color: var(--text-muted);
}
.card-features span + span::before {
  content: "\00B7";
  margin: 0 0.45em;
  color: var(--primary);
  font-weight: 700;
}

/* The twelfth slot: the trial offer from each video's end card, with a QR code. Not a button. */
.offer {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: calc(var(--u) * 1.1);
  padding: calc(var(--u) * 1.1);
  border: 1.5px solid var(--on-gradient-line);
  border-radius: var(--r-lg);
  color: var(--on-gradient);
}
/* White plate; its padding is the QR quiet zone (about 4 modules). */
.offer-qr {
  display: block;
  width: calc(var(--u) * 10.4);
  padding: calc(var(--u) * 0.9);
  border-radius: var(--r-md);
  background: var(--bg);
}
.offer-qr img { width: 100%; height: auto; image-rendering: pixelated; }
.offer-text { display: grid; gap: calc(var(--u) * 0.45); min-width: 0; }
.offer strong { font-size: calc(var(--u) * 1.3); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; text-wrap: balance; }
.offer-text span { font-size: calc(var(--u) * 0.9); font-weight: 600; line-height: 1.35; color: var(--on-gradient-soft); }
.offer em { margin-top: calc(var(--u) * 0.3); font-size: calc(var(--u) * 1); font-style: normal; font-weight: 700; }

/* ============================================================
   PLAYER
   ============================================================ */
/* The video floats in a window over the ambient ground; the top bar sits above it,
   so the controls never cover the video. */
.player-view {
  --top: calc(var(--u) * 2.6 + 64px);
  --bottom: calc(var(--u) * 2);
  --win-w: min(calc(100vw - 2 * var(--pad-x)), calc((100vh - var(--top) - var(--bottom)) * 16 / 9));
  position: fixed;
  inset: 0;
  z-index: 10;
}
.video-window {
  position: absolute;
  top: var(--top);
  left: calc((100vw - var(--win-w)) / 2);
  width: var(--win-w);
  aspect-ratio: 16 / 9;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--navy);
  box-shadow: var(--lift);
  transition: opacity 0.5s var(--ease), scale 0.5s var(--ease);
}
.player-view.is-ended .video-window { opacity: 0; scale: 0.97; pointer-events: none; }
.player-view .video-js {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: var(--navy);
}
.player-view .vjs-tech { object-fit: contain; }
.player-view .vjs-poster img { object-fit: contain; }

.player-top {
  position: absolute;
  top: calc(var(--u) * 1.4);
  left: calc((100vw - var(--win-w)) / 2);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 0.8);
  transition: opacity 0.4s var(--ease);
}
.player-view.is-ended .player-top { opacity: 0; pointer-events: none; }

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: calc(var(--u) * 0.55);
  min-height: 64px;
  padding: calc(var(--u) * 0.75) calc(var(--u) * 1.5) calc(var(--u) * 0.75) calc(var(--u) * 1.1);
  border: 0;
  border-radius: var(--r-pill);
  background: var(--bg);
  box-shadow: inset 0 0 0 1.5px var(--border), var(--lift-soft);
  color: var(--primary);
  font-size: calc(var(--u) * 1.05);
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s var(--ease);
}
.pill-btn:active { transform: scale(0.96); }
.pill-btn svg {
  width: calc(var(--u) * 1.4);
  height: calc(var(--u) * 1.4);
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pill-btn.solid { background: var(--primary); color: var(--bg); box-shadow: var(--lift-soft); }

.now-playing {
  padding: calc(var(--u) * 0.55) calc(var(--u) * 1.1);
  border-radius: var(--r-pill);
  background: var(--accent-light);
  color: var(--primary);
  font-size: calc(var(--u) * 0.8);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.end-card {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  animation: fade-in 0.5s var(--ease) 0.15s both;
}
.end-panel {
  display: grid;
  justify-items: center;
  gap: calc(var(--u) * 1);
  text-align: center;
  color: var(--text);
}
.end-panel .eyebrow { font-size: calc(var(--u) * 1); }
.end-panel h2 {
  max-width: 22ch;
  font-size: calc(var(--u) * 3.6);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.end-actions { display: flex; gap: calc(var(--u) * 1); margin-top: calc(var(--u) * 1.4); }
.end-actions .pill-btn { min-height: 76px; font-size: calc(var(--u) * 1.3); padding-inline: calc(var(--u) * 1.4) calc(var(--u) * 2); }
.end-count { font-size: calc(var(--u) * 1.05); color: var(--text-muted); font-variant-numeric: tabular-nums; }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* Video.js skin: brand colors, touch-sized controls. */
.video-js.ml-skin { font-family: var(--font); font-size: calc(var(--u) * 1.15); }
.ml-skin .vjs-control-bar {
  height: 3.6em;
  padding: 0 1em;
  background: linear-gradient(transparent, rgba(47, 72, 88, 0.85));
  align-items: center;
}
.ml-skin .vjs-control { width: 3.4em; }
.ml-skin .vjs-button > .vjs-icon-placeholder::before { font-size: 2em; line-height: 1.8; }
.ml-skin .vjs-progress-control { height: 100%; }
.ml-skin .vjs-progress-holder { height: 0.5em; border-radius: var(--r-pill); background: rgba(255, 255, 255, 0.28); }
.ml-skin .vjs-progress-holder .vjs-load-progress { background: rgba(255, 255, 255, 0.2); border-radius: var(--r-pill); }
.ml-skin .vjs-play-progress { background: var(--primary); border-radius: var(--r-pill); }
.ml-skin .vjs-play-progress::before { font-size: 1.2em; top: -0.3em; color: var(--bg); }
.ml-skin .vjs-progress-control:hover .vjs-progress-holder { font-size: inherit; }
.ml-skin .vjs-remaining-time { font-weight: 600; font-variant-numeric: tabular-nums; line-height: 3.6em; padding: 0 0.6em; }
.ml-skin .vjs-big-play-button {
  width: 3em;
  height: 3em;
  margin: -1.5em 0 0 -1.5em;
  border: 0;
  border-radius: 50%;
  background: var(--primary);
  line-height: 3em;
  font-size: 2.4em;
}
.ml-skin:hover .vjs-big-play-button, .ml-skin .vjs-big-play-button:focus { background: var(--primary); }
.ml-skin .vjs-loading-spinner { border-color: rgba(255, 255, 255, 0.3); }
.ml-skin .vjs-time-tooltip, .ml-skin .vjs-mouse-display { display: none !important; }

/* ============================================================
   SCREENSAVER
   ============================================================ */
.saver {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 34fr 66fr;
  align-items: center;
  gap: calc(var(--u) * 3);
  padding: 0 var(--pad-x) 0 calc(var(--u) * 5);
  background: var(--app-gradient);
  overflow: hidden;
  cursor: pointer;
  animation: fade-in 0.8s var(--ease) both;
}

/* atmosphere: faint concentric rings, cover frames only */
.saver-rings { position: absolute; left: 66%; top: 50%; width: 0; height: 0; pointer-events: none; }
.saver-rings i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(var(--u) * 90);
  aspect-ratio: 1;
  border: 1.5px solid var(--on-gradient-line);
  border-radius: 50%;
  translate: -50% -50%;
  opacity: 0;
  animation: ring 16s linear infinite;
}
.saver-rings i:nth-child(2) { animation-delay: -4s; }
.saver-rings i:nth-child(3) { animation-delay: -8s; }
.saver-rings i:nth-child(4) { animation-delay: -12s; }
@keyframes ring {
  0%   { scale: 0.15; opacity: 0; }
  15%  { opacity: 0.9; }
  100% { scale: 1.25; opacity: 0; }
}

.saver-copy { position: relative; display: grid; gap: calc(var(--u) * 1.2); color: var(--on-gradient); }
.saver-brand { display: flex; align-items: center; gap: calc(var(--u) * 0.8); margin-bottom: calc(var(--u) * 1.6); }
.saver-brand img { width: calc(var(--u) * 3.6); }
.saver-brand span { font-size: calc(var(--u) * 1.8); font-weight: 600; letter-spacing: -0.01em; }
.saver-brand b { font-weight: 600; color: var(--on-gradient-soft); }
.saver-copy .eyebrow { color: var(--on-gradient-soft); font-size: calc(var(--u) * 1); }
.saver-copy h1 {
  font-size: calc(var(--u) * 4.2);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.saver-msg {
  min-height: 2.9em;
  font-size: calc(var(--u) * 1.35);
  font-weight: 500;
  line-height: 1.45;
  color: var(--on-gradient-soft);
  transition: opacity 0.6s var(--ease), translate 0.6s var(--ease);
}
.saver-msg.out { opacity: 0; translate: 0 calc(var(--u) * 0.6); }

.tap-cta {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: calc(var(--u) * 1);
  margin-top: calc(var(--u) * 1);
  padding: calc(var(--u) * 1) calc(var(--u) * 2) calc(var(--u) * 1) calc(var(--u) * 1.1);
  border-radius: var(--r-pill);
  background: var(--bg);
  color: var(--primary);
  font-size: calc(var(--u) * 1.3);
  font-weight: 700;
}
.tap-dot { position: relative; width: calc(var(--u) * 2.2); aspect-ratio: 1; }
.tap-dot::after {
  content: "";
  position: absolute;
  inset: 28%;
  border-radius: 50%;
  background: var(--primary);
}
.tap-dot i {
  position: absolute;
  inset: 0;
  border: 2px solid var(--primary);
  border-radius: 50%;
  animation: tap 2.4s var(--ease) infinite;
}
.tap-dot i:nth-child(2) { animation-delay: 1.2s; }
@keyframes tap {
  0%   { scale: 0.35; opacity: 1; }
  100% { scale: 1.15; opacity: 0; }
}

.saver-stage { position: relative; }

.app-window {
  border-radius: var(--r-lg);
  background: var(--bg);
  overflow: hidden;
  box-shadow: 0 calc(var(--u) * 1.6) calc(var(--u) * 3.2) rgba(30, 35, 55, 0.28);
}
.app-chrome { display: flex; gap: calc(var(--u) * 0.45); padding: calc(var(--u) * 0.75) calc(var(--u) * 1); background: var(--chrome); }
.app-chrome i { width: calc(var(--u) * 0.75); aspect-ratio: 1; border-radius: 50%; background: var(--chrome-dot); }
/* Crop the bottom of each capture: the video's own caption chip sits there. */
.app-view { position: relative; aspect-ratio: 16 / 7.4; overflow: hidden; background: var(--bg); }
.shot { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.shot-b { clip-path: inset(0 0 100% 0); }

/* The MRI scan line: the brand motif and the only glowing element. */
.scan-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 5px;
  background: var(--primary);
  box-shadow: 0 0 28px 8px rgba(221, 119, 133, 0.75), 0 0 8px 1px rgba(255, 255, 255, 0.9);
  opacity: 0;
  pointer-events: none;
}

.caption-card {
  position: absolute;
  left: calc(var(--u) * -3);
  bottom: calc(var(--u) * -2.4);
  display: grid;
  gap: calc(var(--u) * 0.45);
  max-width: 64%;
  padding: calc(var(--u) * 1.3) calc(var(--u) * 1.8);
  border-radius: calc(var(--u) * 1.2);
  background: var(--bg);
  transition: opacity 0.5s var(--ease), translate 0.5s var(--ease);
}
.caption-card.out { opacity: 0; translate: 0 calc(var(--u) * 0.8); }
.caption-title {
  font-size: calc(var(--u) * 2.1);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--text);
  text-wrap: balance;
}

/* ============================================================
   WEB EMBED (?mode=embed)
   An iframe in a web page, from a phone to a wide desktop column.
   The host page (wordpress/metalark-explorer/embed.js) makes the
   iframe as tall as the open view, so nothing here may depend on
   the viewport height. The grid reflows from 4 columns to 1.
   ============================================================ */
.is-embed {
  --u: clamp(9px, 1.4vw, 14px);
  --pad-x: clamp(16px, 3.2vw, 36px);
  --gap: clamp(10px, 1.6vw, 16px);
  --r-lg: 14px;
  --r-md: 10px;
  /* A scrollbar would change the width while the host resizes the iframe. */
  scrollbar-width: none;
}
.is-embed::-webkit-scrollbar { display: none; }
.is-embed, .is-embed body {
  height: auto;
  overflow: visible;
  user-select: auto;
  -webkit-user-select: auto;
  -webkit-touch-callout: default;
  touch-action: auto;
}
.is-embed body.is-playing .menu { display: none; }

.is-embed .menu {
  position: relative;
  inset: auto;
  display: block;
  padding: clamp(18px, 2.6vw, 30px) var(--pad-x) var(--pad-x);
}
.is-embed .menu-head { flex-wrap: wrap; row-gap: 14px; margin-bottom: clamp(16px, 2.4vw, 26px); }
.is-embed .logo-plate { width: clamp(44px, 5.5vw, 60px); }
.is-embed .eyebrow { font-size: 12px; }
.is-embed .menu-head h1 { font-size: clamp(22px, 3.4vw, 34px); }
.is-embed .menu-hint { padding: 8px 16px; font-size: 14px; }
.is-embed .menu-hint .ml-icon { width: 20px; height: 20px; }

.is-embed .grid { grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); grid-template-rows: none; }
@media (max-width: 1023px) { .is-embed .grid { --cols: 3; } }
@media (max-width: 759px)  { .is-embed .grid { --cols: 2; } }
@media (max-width: 479px)  { .is-embed .grid { --cols: 1; } }

.is-embed .card { gap: 6px; padding: 16px 18px 18px; }
.is-embed .card-icon { width: 46px; }
.is-embed .card-play { gap: 4px; padding: 4px 11px 4px 6px; font-size: 12px; }
.is-embed .card-play svg { width: 15px; height: 15px; }
.is-embed .card-title { font-size: clamp(16px, 1.75vw, 19px); }
.is-embed .card-features { padding-top: 4px; font-size: 13px; }
@media (hover: hover) {
  .is-embed .card { transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease); }
  .is-embed .card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(30, 35, 55, 0.22); }
}

/* The trial offer is a link on the web, not a QR code. */
.is-embed .offer-link {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 18px;
  color: var(--on-gradient);
  text-decoration: none;
  transition: background 0.18s var(--ease);
}
.is-embed .offer-link:hover { background: rgba(255, 255, 255, 0.08); }
.is-embed .offer strong { font-size: clamp(18px, 2vw, 22px); }
.is-embed .offer-text span { font-size: 14px; }
.offer-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  background: var(--bg);
  color: var(--primary);
  font-size: 15px;
  font-weight: 700;
}
.offer-cta svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Player: the top bar, then the video at the full column width. */
.is-embed .player-view {
  position: relative;
  inset: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px var(--pad-x) var(--pad-x);
}
.is-embed .player-top { position: static; order: -1; flex-wrap: wrap; }
.is-embed .video-window { position: relative; top: auto; left: auto; width: 100%; }
.is-embed .video-js.ml-skin { font-size: clamp(11px, 1.3vw, 14px); }
.is-embed .pill-btn { gap: 6px; min-height: 44px; padding: 8px 18px 8px 12px; font-size: 15px; }
.is-embed .pill-btn svg { width: 18px; height: 18px; }
.is-embed .now-playing { padding: 7px 13px; font-size: 12px; }

.is-embed .end-panel { gap: 8px; padding: 16px; }
.is-embed .end-panel .eyebrow { font-size: 12px; }
.is-embed .end-panel h2 { font-size: clamp(20px, 3.6vw, 36px); }
.is-embed .end-actions { flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 10px; }
.is-embed .end-actions .pill-btn { min-height: 48px; padding-inline: 14px 20px; font-size: 16px; }
.is-embed .end-count { display: none; }

@media (prefers-reduced-motion: reduce) {
  .saver-rings i, .tap-dot i { animation: none; opacity: 0.4; }
  .grid.enter .card { animation: none; }
}
