/* PiP promo 2 · "One morning at My Village Grove"
   Stage is authored at 1920×1080 and scaled to fit by promo.js.
   Everything that moves is driven by the seekable timeline in promo.js,
   so no CSS transitions or keyframe animations live inside the stage. */

:root {
  --ink: #0c1520;
  --navy: #14202e;
  --navy-2: #1d2d40;
  --text-soft: #5b6b78;
  --sage: #9dc395;
  --sage-deep: #4f8a6a;
  --green: #2f9e6b;
  --teal: #3698b9;
  --sky: #afe0ed;
  --gold: #e7bf72;
  --amber: #d9922e;
  --cream: #f8f4ec;
  --paper: #fffdf7;
  --display: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Fraunces", Georgia, serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: #070d14; overflow: hidden; }
body {
  font-family: var(--display);
  color: #fff;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }

.viewport { position: fixed; inset: 0; overflow: hidden; background: #070d14; }
.stage {
  position: absolute; left: 0; top: 0;
  width: 1920px; height: 1080px;
  transform-origin: 0 0;
  overflow: hidden;
  background: var(--ink);
  contain: strict;
}
.layer, .scene { position: absolute; inset: 0; }
.scene { opacity: 0; visibility: hidden; }

/* ---------- Backgrounds ---------- */
.bg-navy { background: radial-gradient(120% 90% at 50% 110%, #1c3048 0%, #101b29 55%, #0a121c 100%); }
.sky { opacity: 0; }
.sky-dawn { background: linear-gradient(180deg, #121f33 0%, #23395a 46%, #5a5f7a 74%, #d79566 100%); }
.sky-morn { background: linear-gradient(180deg, #3a6890 0%, #79a4c0 48%, #c9c9bd 76%, #f2c796 100%); }
.sky-day { background: linear-gradient(180deg, #cfe6f0 0%, #e7f1f1 52%, #f6f0e3 100%); }
.bg-cream {
  opacity: 0;
  background:
    radial-gradient(60% 70% at 88% 12%, rgba(157, 195, 149, .22), transparent 70%),
    radial-gradient(50% 60% at 8% 100%, rgba(231, 191, 114, .2), transparent 70%),
    var(--cream);
}
.sun {
  position: absolute; left: 1200px; top: 0;
  width: 900px; height: 900px; margin: -450px 0 0 -450px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 214, 150, .55) 0%, rgba(255, 196, 120, .18) 35%, transparent 68%);
  opacity: 0;
}
.grain {
  pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Kinetic type ---------- */
.kin { font-weight: 800; letter-spacing: -.038em; line-height: 1.02; }
.kin .ln, .s4-intro .ln, .s5-head .ln { display: block; overflow: hidden; padding: .04em 0 .1em; }
.kin .ln > span, .s4-intro .ln > span, .s5-head .ln > span { display: inline-block; will-change: transform; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.012em; }

/* ---------- 1 · Dawn ---------- */
.s1-photo { position: absolute; inset: -40px; background: url(assets/dawn.webp) center 40% / cover; transform-origin: 60% 50%; }
.s1-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(0deg, rgba(8, 14, 22, .92) 0%, rgba(8, 14, 22, .55) 38%, rgba(8, 14, 22, .05) 70%),
    linear-gradient(90deg, rgba(8, 14, 22, .55), transparent 60%);
}
.s1-h { position: absolute; left: 150px; bottom: 120px; font-size: 112px; color: #fff; }
.s1-h em { color: var(--gold); }

/* ---------- Clock + bug ---------- */
.clock {
  position: absolute; left: 150px; top: 96px;
  display: flex; align-items: center; gap: 16px;
  padding: 14px 26px 14px 20px; border-radius: 999px;
  background: rgba(8, 14, 22, .55); border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(10px);
  font-size: 24px; color: rgba(255, 255, 255, .78);
  opacity: 0;
}
.clock b { font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; display: inline-block; min-width: 96px; }
.clock .pulse { width: 12px; height: 12px; border-radius: 50%; background: var(--sage); box-shadow: 0 0 0 6px rgba(157, 195, 149, .22); }
.bug { position: absolute; right: 140px; top: 84px; width: 92px; height: 92px; opacity: 0; filter: drop-shadow(0 4px 14px rgba(0, 0, 0, .25)); }

/* ---------- 2 · Paper village ---------- */
.s2-cap {
  position: absolute; left: 0; right: 0; top: 120px;
  text-align: center; font-size: 56px; font-weight: 700; letter-spacing: -.025em;
  color: rgba(255, 255, 255, .9);
}
.s2-cap em { color: var(--sage); }
.paper-pos { position: absolute; left: 0; top: 0; }
.paper {
  position: relative;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  padding: 30px 40px 26px;
  border-radius: 6px;
  font-size: 42px; font-weight: 700; letter-spacing: -.02em;
  color: #23303d;
  box-shadow: 0 30px 50px -18px rgba(0, 0, 0, .55), 0 2px 0 rgba(0, 0, 0, .06);
}
.paper i {
  position: absolute; left: 50%; top: -10px; margin-left: -11px;
  width: 22px; height: 22px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ff8f7a, #c0392b 70%);
  box-shadow: 0 4px 6px rgba(0, 0, 0, .35);
}
.tone-cream { background: #f4ecdc; }
.tone-white { background: #fbfbf8; }
.tone-yellow { background: #f6e49c; }
.tone-blue { background: #dcebf1; }
.tone-yellow i { background: radial-gradient(circle at 35% 35%, #8fd0e6, #2b7f9c 70%); }
.s2-dot {
  position: absolute; left: 940px; top: 540px;
  width: 40px; height: 40px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #afe0ed, var(--teal) 70%);
  box-shadow: 0 0 40px 8px rgba(54, 152, 185, .55);
  transform-origin: 50% 50%;
}

/* ---------- 3 · Logo ---------- */
.logo { position: absolute; overflow: visible; }
#logo { left: 760px; top: 120px; width: 400px; height: 400px; }
.lg-sage { fill: var(--sage); }
.lg-blue { fill: var(--teal); }
.lg-sky { fill: var(--sky); }
.logo g { transform-box: fill-box; transform-origin: 50% 100%; }
.lg-ring { fill: none; stroke: var(--sky); stroke-width: .12; opacity: 0; transform-box: fill-box; transform-origin: 50% 50%; }
.wordmark {
  position: absolute; left: 0; right: 0; top: 478px;
  text-align: center; font-size: 26px; font-weight: 600; letter-spacing: .42em; text-transform: uppercase;
  color: var(--sky);
}
.s3-h { position: absolute; left: 0; right: 0; top: 560px; text-align: center; font-size: 104px; color: #fff; }
.s3-h em { color: var(--sage); }

/* ---------- 4 · Morning strip ---------- */
.s4-intro { position: absolute; left: 150px; top: 380px; color: #fff; }
.s4-pre { font-size: 48px; font-weight: 600; letter-spacing: -.02em; color: var(--sky); }
.s4-big { font-size: 168px; font-weight: 800; letter-spacing: -.045em; line-height: 1; }

.strip { position: absolute; left: 0; top: 0; width: 9600px; height: 1080px; transform-origin: 0 0; }
.thread { position: absolute; left: 0; top: 0; overflow: visible; }
.thread-line { fill: none; stroke: url(#thread-grad); stroke-width: 7; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.thread-glow { fill: none; stroke: url(#thread-grad); stroke-width: 26; stroke-linecap: round; opacity: .32; stroke-dasharray: 1; stroke-dashoffset: 1; }
.thread-tip { fill: #fff; opacity: 0; }
.halo {
  position: absolute; width: 180px; height: 180px; margin: -90px 0 0 -90px;
  border-radius: 50%; border: 5px solid var(--sage);
  box-shadow: 0 0 30px rgba(157, 195, 149, .6);
  opacity: 0; pointer-events: none; z-index: 4;
}

.st { position: absolute; top: 0; width: 1920px; height: 1080px; }
.copy { position: absolute; z-index: 3; }
.copy .tag {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 10px 20px; border-radius: 999px;
  font-size: 22px; font-weight: 600; letter-spacing: .01em;
  margin-bottom: 30px;
}
.copy .tag i { width: 10px; height: 10px; border-radius: 50%; background: var(--sage); }
.copy h2 { font-size: 104px; font-weight: 800; letter-spacing: -.042em; line-height: .98; margin-bottom: 30px; }
.copy p { font-size: 32px; line-height: 1.38; font-weight: 400; max-width: 600px; }
.copy h2.h2-sm { font-size: 84px; }
.copy.light { color: #fff; }
.copy.light .tag { background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2); }
.copy.light p { color: rgba(255, 255, 255, .78); }
.copy.dark { color: var(--navy); }
.copy.dark .tag { background: rgba(20, 32, 46, .07); border: 1px solid rgba(20, 32, 46, .12); }
.copy.dark .tag i { background: var(--sage-deep); }
.copy.dark p { color: #4a5a68; }
.copy > * { will-change: transform; }

.dev { position: absolute; z-index: 2; }
.screen { position: relative; overflow: hidden; color: var(--navy); }

/* Tablet */
.tablet {
  width: 960px; height: 660px; padding: 22px; border-radius: 46px;
  background: linear-gradient(145deg, #1e2935, #0d141c);
  box-shadow: 0 70px 120px -40px rgba(0, 0, 0, .7), inset 0 0 0 2px rgba(255, 255, 255, .08);
}
.tablet .screen { width: 100%; height: 100%; border-radius: 26px; background: #dcebf1; }
.t-bg { position: absolute; inset: 0; background: url(assets/lake.webp) center / cover; }
.t-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255, 255, 255, .5), rgba(232, 243, 248, .62)); }
.t-top {
  position: absolute; left: 0; right: 0; top: 0; height: 60px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 26px; background: rgba(255, 255, 255, .78);
  font-size: 18px; font-weight: 600;
}
.t-brand, .t-user { display: flex; align-items: center; gap: 10px; }
.t-brand img { width: 30px; height: 30px; }
.t-user img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.t-time { padding: 6px 16px; border-radius: 999px; background: rgba(20, 32, 46, .07); font-size: 15px; letter-spacing: .06em; }
.t-greet {
  position: absolute; left: 28px; right: 28px; top: 82px; height: 124px;
  border-radius: 22px; padding: 26px 32px; color: #fff;
  background: linear-gradient(110deg, #22405f 0%, #4d7898 60%, #e2a979 130%);
  display: flex; flex-direction: column; justify-content: center; gap: 6px;
}
.t-greet b { font-size: 40px; font-weight: 800; letter-spacing: -.03em; }
.t-greet span { font-size: 20px; opacity: .85; }
.t-check {
  position: absolute; left: 28px; right: 28px; top: 224px; height: 150px;
  border-radius: 22px; background: rgba(255, 255, 255, .94);
  box-shadow: 0 14px 30px -18px rgba(20, 32, 46, .45);
}
.t-ask, .t-done { position: absolute; inset: 0; display: flex; align-items: center; padding: 0 30px; gap: 20px; }
.t-ask { justify-content: space-between; }
.t-ask small, .t-tile small, .p-head small, .hub-l small, .hc small, .stat small {
  display: block; font-size: 14px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
}
.t-ask small { color: var(--sage-deep); margin-bottom: 8px; }
.t-ask b { font-size: 29px; font-weight: 700; letter-spacing: -.02em; display: block; max-width: 420px; line-height: 1.15; }
.t-btns { display: flex; gap: 14px; }
.btn-ok, .btn-help { display: inline-block; padding: 20px 32px; border-radius: 999px; font-size: 23px; font-weight: 700; white-space: nowrap; }
.btn-ok { background: var(--green); color: #fff; box-shadow: 0 10px 20px -8px rgba(47, 158, 107, .7); }
.btn-help { background: #fff; color: #a8661a; border: 2px solid #e9b25c; }
.t-done { background: #e9f6ee; border-radius: 22px; opacity: 0; }
.t-done b { display: block; font-size: 32px; font-weight: 800; letter-spacing: -.02em; }
.t-done span { font-size: 21px; color: #3d5a4a; }
.tick { flex: none; width: 70px; height: 70px; border-radius: 50%; background: var(--green); display: grid; place-items: center; }
.tick svg, .ok svg, .p-banner svg, .act-done svg { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.tick svg { width: 40px; height: 40px; }
.t-tiles { position: absolute; left: 28px; right: 28px; top: 392px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.t-tile { height: 178px; border-radius: 22px; background: rgba(255, 255, 255, .88); padding: 26px 28px; }
.t-tile small { color: var(--teal); margin-bottom: 12px; }
.t-tile b { display: block; font-size: 27px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.t-tile span { display: block; margin-top: 6px; font-size: 19px; color: var(--text-soft); }

.tap { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 9; }
.tap i { position: absolute; left: -36px; top: -36px; width: 72px; height: 72px; border-radius: 50%; opacity: 0; }
.tap-dot { background: rgba(255, 255, 255, .55); border: 3px solid rgba(255, 255, 255, .95); box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
.tap-ring { border: 4px solid #fff; }

/* Phones */
.phone {
  width: 410px; height: 840px; padding: 14px; border-radius: 64px;
  background: linear-gradient(145deg, #222d38, #0b1118);
  box-shadow: 0 70px 120px -40px rgba(0, 0, 0, .7), inset 0 0 0 2px rgba(255, 255, 255, .08);
}
.phone .screen { height: 100%; border-radius: 51px; background: #f3f6f4; }
.p-notch { position: absolute; top: 12px; left: 50%; margin-left: -58px; width: 116px; height: 34px; border-radius: 20px; background: #0b1118; z-index: 6; }
.p-head { padding: 84px 28px 0; }
.p-head small { color: var(--sage-deep); margin-bottom: 8px; }
.p-head b { display: block; font-size: 34px; font-weight: 800; letter-spacing: -.03em; }
.ring { position: relative; width: 200px; height: 200px; margin: 26px auto 22px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 12; }
.ring-track { stroke: #dfe9e3; }
.ring-prog { stroke: var(--green); stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: .04; }
.ring-n { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-n b { font-size: 64px; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.ring-n span { font-size: 17px; color: var(--text-soft); margin-top: 4px; }
.p-list { padding: 0 18px; display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; align-items: center; gap: 14px; height: 72px; padding: 0 14px; border-radius: 18px; background: #fff; box-shadow: 0 6px 16px -12px rgba(20, 32, 46, .5); }
.row img, .row em { flex: none; width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }
.row em { display: grid; place-items: center; background: #e5eef2; color: var(--navy-2); font: 700 16px var(--display); font-style: normal; letter-spacing: 0; }
.row div { flex: 1; }
.row b { display: block; font-size: 20px; font-weight: 700; }
.row span { font-size: 15px; color: var(--text-soft); }
.row .ok { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--green); display: grid; place-items: center; }
.ok svg { width: 18px; height: 18px; }
.row.new { background: #e9f6ee; box-shadow: inset 0 0 0 2px var(--sage); }
.p-banner {
  position: absolute; left: 18px; right: 18px; bottom: 30px; height: 70px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  border-radius: 20px; background: var(--green); color: #fff; font-size: 20px; font-weight: 700;
}
.p-banner svg { width: 26px; height: 26px; }

.fam .notif {
  position: absolute; left: 12px; right: 12px; top: 58px; z-index: 5;
  display: flex; align-items: center; gap: 14px; padding: 16px 18px;
  border-radius: 24px; background: rgba(255, 255, 255, .97);
  box-shadow: 0 18px 30px -14px rgba(20, 32, 46, .45);
}
.notif img { width: 46px; height: 46px; border-radius: 12px; background: var(--navy); padding: 6px; }
.notif b { display: block; font-size: 16px; font-weight: 700; }
.notif span { font-size: 16px; color: #3e4c58; }
.fam-head { padding-top: 186px; }
.f-photo { position: relative; margin: 20px 22px 0; height: 250px; border-radius: 24px; overflow: hidden; }
.f-photo img { width: 100%; height: 100%; object-fit: cover; }
.f-photo span { position: absolute; left: 14px; bottom: 14px; padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, .92); font-size: 15px; font-weight: 600; }
.f-list { list-style: none; padding: 22px 26px 0; display: flex; flex-direction: column; gap: 14px; }
.f-li { display: flex; align-items: center; gap: 12px; font-size: 18px; font-weight: 500; }
.f-li i { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--sage); box-shadow: 0 0 0 5px rgba(157, 195, 149, .25); }
.f-foot { position: absolute; left: 0; right: 0; bottom: 34px; text-align: center; font-size: 14px; color: var(--text-soft); letter-spacing: .02em; }

/* Laptop */
.laptop { width: 1180px; }
.lap-lid {
  width: 1180px; height: 704px; padding: 24px 26px 30px; border-radius: 30px 30px 12px 12px;
  background: linear-gradient(160deg, #1d2732, #0b1118);
  box-shadow: 0 60px 110px -40px rgba(20, 32, 46, .55);
}
.lap-screen { height: 100%; border-radius: 8px; background: #fff url(assets/command-centre.webp) left top / cover; }
.lap-base {
  width: 1340px; height: 30px; margin-left: -80px;
  border-radius: 0 0 28px 28px;
  background: linear-gradient(180deg, #d9dfe4, #9aa6b0);
  box-shadow: 0 30px 40px -20px rgba(20, 32, 46, .45);
}
.stat {
  position: absolute; z-index: 3; width: 320px; padding: 22px 28px 24px;
  border-radius: 24px; background: #fff; color: var(--navy);
  box-shadow: 0 34px 60px -24px rgba(20, 32, 46, .5);
}
.stat small { color: var(--text-soft); }
.stat b { display: block; font-size: 76px; font-weight: 800; letter-spacing: -.04em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.stat span { font-size: 18px; font-weight: 600; color: var(--green); }

/* TV */
.tv {
  width: 1220px; height: 700px; padding: 14px; border-radius: 20px;
  background: #0a0e13;
  box-shadow: 0 60px 110px -40px rgba(20, 32, 46, .55);
}
.tv .screen { height: 100%; border-radius: 6px; background: #0f2233; color: #fff; }
.hub-bg { position: absolute; inset: 0; background: url(assets/happy-hour.webp) center 40% / cover; }
.hub-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10, 22, 34, .92) 0%, rgba(10, 22, 34, .7) 48%, rgba(10, 22, 34, .45) 100%); }
.hub-l { position: absolute; left: 60px; top: 74px; width: 560px; }
.hub-l small { color: var(--sky); margin-bottom: 16px; font-size: 17px; }
.hub-l b { display: block; font-size: 84px; font-weight: 800; letter-spacing: -.045em; line-height: 1; }
.hub-l span { display: block; margin-top: 16px; font-size: 28px; color: rgba(255, 255, 255, .8); }
.hub-r { position: absolute; right: 44px; top: 54px; width: 470px; display: flex; flex-direction: column; gap: 16px; }
.hc { padding: 20px 24px; border-radius: 20px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22); }
.hc small { color: var(--gold); margin-bottom: 8px; }
.hc b { display: block; font-size: 28px; font-weight: 700; letter-spacing: -.02em; line-height: 1.18; }
.hc span { display: block; margin-top: 4px; font-size: 19px; color: rgba(255, 255, 255, .78); }
.hc.bday { background: rgba(231, 191, 114, .22); border-color: rgba(231, 191, 114, .5); }
.hub-tick {
  position: absolute; left: 0; right: 0; bottom: 0; height: 66px;
  display: flex; align-items: center; gap: 18px; padding-left: 28px; overflow: hidden;
  background: rgba(6, 14, 22, .82); font-size: 21px; white-space: nowrap;
}
.hub-tick span { flex: none; padding: 6px 14px; border-radius: 8px; background: var(--amber); font-size: 15px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.tick-track { flex: 1; overflow: hidden; }
.hub-tick em { font-family: var(--display); font-style: normal; letter-spacing: 0; display: inline-block; }

/* Zoom-out caption */
.s5-head { position: absolute; left: 0; right: 0; top: 150px; text-align: center; color: var(--navy); }
.s5-big { font-size: 128px; font-weight: 800; letter-spacing: -.045em; line-height: 1; }
.s5-sub { font-size: 42px; font-weight: 500; letter-spacing: -.02em; color: #3d4f60; margin-top: 10px; }
.s5-labels span {
  position: absolute; top: 0; left: 0;
  font-size: 24px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--sage-deep);
  white-space: nowrap;
}

/* ---------- 6 · Automation ---------- */
.s6-copy { left: 150px; top: 270px; width: 820px; }
.s6-copy h2 { font-size: 112px; }
.s6-copy h3 { font-size: 92px; font-weight: 400; color: var(--sage-deep); line-height: 1; }
.auto-card {
  position: absolute; left: 1010px; width: 780px; height: 170px;
  display: flex; align-items: center; gap: 24px; padding: 0 30px;
  border-radius: 28px; background: #fff; color: var(--navy);
  box-shadow: 0 34px 60px -28px rgba(20, 32, 46, .45), 0 0 0 1px rgba(20, 32, 46, .05);
}
.auto-card .ic { flex: none; width: 74px; height: 74px; border-radius: 20px; background: #eaf3ee; display: grid; place-items: center; }
.auto-card .ic svg { width: 40px; height: 40px; fill: none; stroke: var(--sage-deep); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.auto-card b { display: block; font-size: 31px; font-weight: 700; letter-spacing: -.02em; margin: 4px 0 2px; }
.auto-card span { font-size: 19px; color: var(--text-soft); }
.auto-card .ai { font-family: var(--display); font-style: normal; font-size: 14px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--teal); }
.auto-card .act { position: relative; margin-left: auto; flex: none; width: 190px; height: 66px; }
.auto-card .act span {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; font-size: 23px; font-weight: 700;
}
.auto-card .act-approve { background: var(--navy); color: #fff; }
.auto-card .act-done { background: var(--green); color: #fff; opacity: 0; }
.act-done svg { width: 26px; height: 26px; }
.badge { margin-left: auto; flex: none; padding: 12px 20px; border-radius: 999px; background: #f2efe6; font-size: 18px !important; font-weight: 600; color: #6b5a33 !important; }

/* ---------- 7 · Senior-first ---------- */
.s7-h { position: absolute; left: 0; right: 0; top: 270px; text-align: center; font-size: 100px; color: var(--navy); }
.s7-h em { color: var(--sage-deep); }
.chips { position: absolute; left: 160px; right: 160px; top: 640px; display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; }
.chip {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 22px 36px; border-radius: 999px;
  background: #fff; color: var(--navy); font-size: 32px; font-weight: 600; letter-spacing: -.01em;
  box-shadow: 0 18px 34px -22px rgba(20, 32, 46, .5), 0 0 0 1px rgba(20, 32, 46, .06);
}
.chip i { width: 14px; height: 14px; border-radius: 50%; background: var(--sage); box-shadow: 0 0 0 6px rgba(157, 195, 149, .25); }

/* ---------- 8 · End card ---------- */
.end-thread { position: absolute; inset: 0; width: 1920px; height: 1080px; overflow: visible; }
.end-thread path { fill: none; stroke: var(--sage); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; opacity: .8; }
.end-logo { left: 850px; top: 70px; width: 220px; height: 220px; }
.s8-h { position: absolute; left: 0; right: 0; top: 330px; text-align: center; font-size: 132px; color: var(--navy); }
.s8-h em { color: var(--sage-deep); }
.cta {
  position: absolute; left: 50%; top: 700px; margin-left: -260px; width: 520px; height: 96px;
  display: flex; align-items: center; justify-content: center; gap: 14px;
  border-radius: 999px; background: var(--navy); color: #fff; text-decoration: none;
  font-size: 32px; font-weight: 700; letter-spacing: -.01em;
  box-shadow: 0 24px 40px -20px rgba(20, 32, 46, .7);
  pointer-events: none;
}
.ended .cta { pointer-events: auto; }
.cta:hover { background: #22364d; }
.url { position: absolute; left: 0; right: 0; top: 832px; text-align: center; font-size: 34px; font-weight: 600; color: var(--navy); letter-spacing: -.01em; }
.foot { position: absolute; left: 0; right: 0; top: 892px; text-align: center; font-size: 24px; color: var(--text-soft); }

/* ---------- Player UI (outside the stage) ---------- */
.sound-pill {
  position: absolute; right: 20px; top: 20px; z-index: 20;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 20px 12px 16px; border-radius: 999px;
  background: rgba(8, 14, 22, .7); border: 1px solid rgba(255, 255, 255, .22);
  backdrop-filter: blur(10px);
  font-size: 15px; font-weight: 600; color: #fff;
  transition: opacity .3s, transform .3s;
}
.sound-pill svg, .ui-btn svg, .replay svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sound-pill svg path:first-child, .ui-btn svg path:first-child { fill: currentColor; }
.sound-pill.hide { opacity: 0; transform: translateY(-8px); pointer-events: none; }

.ui {
  position: absolute; left: 50%; bottom: 18px; z-index: 20;
  width: min(720px, calc(100% - 32px)); transform: translateX(-50%);
  display: flex; align-items: center; gap: 14px;
  padding: 8px 14px; border-radius: 999px;
  background: rgba(8, 14, 22, .7); border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(10px);
  transition: opacity .4s;
}
.ui.idle { opacity: 0; }
.ui-btn { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; }
.ui-btn:hover { background: rgba(255, 255, 255, .12); }
.ui-btn:focus-visible, .bar:focus-visible, .sound-pill:focus-visible, .replay:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; }
.ui-btn .i-play { display: none; fill: currentColor; stroke: none; }
.ui-btn .i-pause { fill: currentColor; stroke: none; }
.paused .ui-btn .i-play { display: block; }
.paused .ui-btn .i-pause { display: none; }
#btn-sound .x { display: none; }
#btn-sound[aria-pressed="false"] .w1, #btn-sound[aria-pressed="false"] .w2 { display: none; }
#btn-sound[aria-pressed="false"] .x { display: block; }
.bar { position: relative; flex: 1; height: 26px; cursor: pointer; }
.bar::before { content: ""; position: absolute; left: 0; right: 0; top: 11px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .22); }
.fill { position: absolute; left: 0; top: 11px; height: 4px; border-radius: 4px; background: var(--sage); width: 0; }
.tc { flex: none; font-size: 13px; font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, .75); min-width: 86px; text-align: right; }

.replay {
  position: absolute; left: 20px; top: 20px; z-index: 20;
  display: none; align-items: center; gap: 10px;
  padding: 12px 20px 12px 16px; border-radius: 999px;
  background: var(--navy); color: #fff; font-size: 15px; font-weight: 600;
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .5);
}
.ended .replay { display: flex; }

.render .sound-pill, .render .ui, .render .replay { display: none !important; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 640px) {
  .ui { bottom: 10px; gap: 8px; }
  .tc { display: none; }
}
