/* ============================================================
   v189 premium layer (Ember Blue): display serif for big numbers
   and titles, a faint twinkling starfield inside the blue glow,
   glass highlights, the Phases arc, and more motion (menu cascade,
   quick add rise, tab pop, title reveal). Loaded last.
   ============================================================ */
:root { --font-display: ui-serif, "New York", "Iowan Old Style", "Apple Garamond", Georgia, serif; }

/* ---------- Type: an editorial serif where the eye lands ---------- */
[data-skin="ember"] .topbar h1,
[data-skin="ember"] .today-header h1 { font-family: var(--font-display); font-weight: 400; letter-spacing: -.012em; }
[data-skin="ember"] .ember-gauge-center strong,
[data-skin="ember"] .pc-num,
[data-skin="ember"] .ph-center strong,
[data-skin="ember"] .pa3-stats b, [data-skin="ember"] .pb3-stats b, [data-skin="ember"] .ember-stats b,
[data-skin="ember"] .you-arc dd { font-family: var(--font-display); font-weight: 400; letter-spacing: -.02em; }
[data-skin="ember"] .pa3-titles b,
[data-skin="ember"] .ember-gauge-copy h2,
[data-skin="ember"] .you-arc h2,
[data-skin="ember"] .side-me-txt b { font-family: var(--font-display); font-weight: 500; letter-spacing: -.01em; }

/* ---------- Night sky: stars inside the glow, slow twinkle, breathing light ---------- */
[data-skin="ember"] body::after {
  content: ''; display: block !important; position: absolute; inset: 0 0 auto; height: 680px; z-index: 0; pointer-events: none; opacity: 1;
  background:
    radial-gradient(1.6px 1.6px at 9.9% 20.8%, rgba(235,242,255,0.91), transparent 70%),
    radial-gradient(1.6px 1.6px at 9.7% 34.8%, rgba(235,242,255,0.64), transparent 70%),
    radial-gradient(2px 2px at 72.1% 4.4%, rgba(235,242,255,0.63), transparent 70%),
    radial-gradient(2px 2px at 37.1% 53.1%, rgba(235,242,255,0.82), transparent 70%),
    radial-gradient(1.4px 1.4px at 79.8% 26.0%, rgba(235,242,255,0.74), transparent 70%),
    radial-gradient(1.4px 1.4px at 46.7% 53.8%, rgba(235,242,255,0.76), transparent 70%),
    radial-gradient(2px 2px at 59.9% 15.8%, rgba(235,242,255,0.90), transparent 70%),
    radial-gradient(1.4px 1.4px at 26.5% 30.2%, rgba(235,242,255,0.82), transparent 70%),
    radial-gradient(2px 2px at 48.8% 20.8%, rgba(235,242,255,0.65), transparent 70%),
    radial-gradient(1.6px 1.6px at 11.5% 40.9%, rgba(235,242,255,0.93), transparent 70%),
    radial-gradient(1.2px 1.2px at 21.6% 7.6%, rgba(235,242,255,0.55), transparent 70%),
    radial-gradient(1px 1px at 31.7% 55.2%, rgba(235,242,255,0.55), transparent 70%),
    radial-gradient(1px 1px at 95.1% 20.4%, rgba(235,242,255,0.45), transparent 70%),
    radial-gradient(1px 1px at 9.1% 45.9%, rgba(235,242,255,0.69), transparent 70%),
    radial-gradient(1px 1px at 63.0% 61.4%, rgba(235,242,255,0.48), transparent 70%),
    radial-gradient(1.2px 1.2px at 79.7% 9.9%, rgba(235,242,255,0.41), transparent 70%),
    radial-gradient(1.2px 1.2px at 67.2% 3.5%, rgba(235,242,255,0.45), transparent 70%),
    radial-gradient(1.2px 1.2px at 75.9% 9.4%, rgba(235,242,255,0.50), transparent 70%),
    radial-gradient(1.2px 1.2px at 2.8% 7.0%, rgba(235,242,255,0.41), transparent 70%),
    radial-gradient(1.2px 1.2px at 77.9% 3.7%, rgba(235,242,255,0.50), transparent 70%),
    radial-gradient(1px 1px at 77.2% 46.3%, rgba(235,242,255,0.52), transparent 70%),
    radial-gradient(1px 1px at 73.9% 22.3%, rgba(235,242,255,0.65), transparent 70%),
    radial-gradient(1px 1px at 59.9% 20.7%, rgba(235,242,255,0.58), transparent 70%),
    radial-gradient(1px 1px at 92.7% 36.2%, rgba(235,242,255,0.69), transparent 70%),
    radial-gradient(1px 1px at 87.0% 5.4%, rgba(235,242,255,0.54), transparent 70%),
    radial-gradient(1.2px 1.2px at 49.9% 57.6%, rgba(235,242,255,0.60), transparent 70%),
    radial-gradient(1px 1px at 91.4% 42.7%, rgba(235,242,255,0.46), transparent 70%),
    radial-gradient(1px 1px at 58.1% 30.7%, rgba(235,242,255,0.55), transparent 70%),
    radial-gradient(1.2px 1.2px at 75.7% 35.5%, rgba(235,242,255,0.66), transparent 70%),
    radial-gradient(1.2px 1.2px at 76.8% 15.5%, rgba(235,242,255,0.46), transparent 70%),
    radial-gradient(1.2px 1.2px at 67.1% 43.0%, rgba(235,242,255,0.47), transparent 70%),
    radial-gradient(1px 1px at 28.1% 9.2%, rgba(235,242,255,0.46), transparent 70%),
    radial-gradient(1.2px 1.2px at 85.7% 43.5%, rgba(235,242,255,0.56), transparent 70%),
    radial-gradient(1.2px 1.2px at 41.9% 35.9%, rgba(235,242,255,0.61), transparent 70%),
    radial-gradient(1px 1px at 40.1% 49.4%, rgba(235,242,255,0.63), transparent 70%),
    radial-gradient(1.2px 1.2px at 41.1% 36.5%, rgba(235,242,255,0.60), transparent 70%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 40%, transparent 100%); mask-image: linear-gradient(180deg, #000 0%, #000 40%, transparent 100%);
  animation: v189Twinkle 6.5s ease-in-out infinite alternate;
}
@keyframes v189Twinkle { 0% { opacity: .55; } 45% { opacity: 1; } 100% { opacity: .7; } }
[data-skin="ember"] body::before { transform-origin: 50% 0; animation: v189Breathe 11s ease-in-out infinite alternate; }
@keyframes v189Breathe { to { transform: scaleY(1.07) scaleX(1.03); } }

/* ---------- Glass: a hairline of light on the top edge of every card ---------- */
[data-skin="ember"] .hero-card.hero-v2, [data-skin="ember"] .tr-tile, [data-skin="ember"] .bt-tile, [data-skin="ember"] .bt-face, [data-skin="ember"] .pd-panel, [data-skin="ember"] .card,
[data-skin="ember"] .ember-activity, [data-skin="ember"] .ember-score, [data-skin="ember"] .you-arc, [data-skin="ember"] .side-me {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 14px 34px -18px rgba(0, 0, 0, .6);
}

/* ---------- Phases (replaces the Ascent) ---------- */
.ph-dial { position: relative; max-width: 340px; margin: 0 auto 4px; }
.ph-arc { display: block; width: 100%; height: auto; overflow: visible; }
.ph-track { fill: none; stroke: color-mix(in srgb, var(--tx) 9%, transparent); stroke-width: 14; stroke-linecap: round; }
.ph-seg.is-picked .ph-track { stroke: color-mix(in srgb, var(--tx) 17%, transparent); }
.ph-fill { fill: none; stroke: var(--accent); stroke-width: 14; stroke-linecap: round; stroke-dashoffset: var(--off); }
[data-skin="ember"] .ph-fill { stroke: url(#phGrad); filter: drop-shadow(0 0 6px rgba(255, 106, 26, .45)); }
.ph-tick { stroke: color-mix(in srgb, var(--tx) 20%, transparent); stroke-width: 1.5; stroke-linecap: round; }
.ph-knob { transform-box: view-box; transform-origin: 160px 160px; transform: rotate(var(--rot)); }
.ph-knob-halo { fill: color-mix(in srgb, var(--accent) 30%, transparent); transform-box: fill-box; transform-origin: center; animation: v189Halo 2.8s ease-in-out infinite; }
.ph-knob-dot { fill: #fff; filter: drop-shadow(0 0 8px rgba(255, 255, 255, .75)); }
@keyframes v189Halo { 50% { transform: scale(1.45); opacity: .35; } }
.ph-center { position: absolute; left: 0; right: 0; top: 57%; transform: translateY(-50%); display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; pointer-events: none; }
.ph-center small { font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--tx-3); }
.ph-center strong { font-family: var(--font-display); font-size: 54px; font-weight: 400; line-height: .95; letter-spacing: -.02em; color: var(--tx); font-variant-numeric: tabular-nums; }
.ph-center strong i { margin-left: 3px; font-size: 18px; font-style: normal; color: var(--tx-3); }
.ph-center em { font-size: 14px; font-style: normal; font-weight: 600; letter-spacing: .02em; color: var(--accent); }
[data-skin="ember"] .ph-center em { color: var(--accent-3); }
.ph-ends { display: flex; justify-content: space-between; margin: 2px 4px 0; font-size: 11px; color: var(--tx-3); }
.ph-picks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 16px 0 14px; }
.ph-pick {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0;
  min-height: 62px; padding: 9px 10px 8px; border-radius: 16px; border: 1px solid var(--line); text-align: left; cursor: pointer;
  background: color-mix(in srgb, var(--tx) 3%, transparent); color: var(--tx); font: inherit; transition: background .2s, border-color .2s, transform .15s;
}
.ph-pick i { display: inline-grid; place-items: center; min-width: 20px; height: 18px; padding: 0 5px; margin-bottom: 2px; border-radius: 999px; font-size: 10px; font-style: normal; font-weight: 700; color: var(--tx-3); border: 1px solid var(--line-2); font-variant-numeric: tabular-nums; }
.ph-pick b { max-width: 100%; font-size: 13.5px; font-weight: 600; line-height: 1.2; }
.ph-pick small { max-width: 100%; font-size: 10.5px; line-height: 1.2; color: var(--tx-3); }
/* two lines before anything is cut: "Day 46 · Momentum" and "Now · day 33 · 0 of 6 today" read whole (v246) */
.ph-pick :is(b, small) { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.ph-pick.is-past i { background: var(--accent); border-color: var(--accent); color: var(--on-accent, #fff); }
.ph-pick.is-now i { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 45%, transparent); }
.ph-pick.is-picked { border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: color-mix(in srgb, var(--accent) 11%, transparent); }
.ph-pick:disabled { opacity: .5; cursor: default; }
.ph-pick:active:not(:disabled) { transform: scale(.97); }
.ph-note { margin: 10px 0 0; font-family: var(--font-display); font-size: 15px; font-style: italic; line-height: 1.4; color: var(--tx-2); }
/* reveal: segments fill in turn, the knob rides the arc to today, the phase buttons cascade */
.pa3.in-view:not(.no-intro) .ph-tick { animation: v189Fade .6s ease both; }
.pa3.in-view:not(.no-intro) .ph-fill { animation: v189Fill .8s cubic-bezier(.22, 1, .36, 1) both; animation-delay: calc(.15s + var(--i) * 110ms); }
.pa3.in-view:not(.no-intro) .ph-knob { animation: v189Ride 1.4s cubic-bezier(.22, 1, .36, 1) .2s both; }
.pa3.in-view:not(.no-intro) .ph-center > * { animation: v180Up .55s cubic-bezier(.22, 1, .36, 1) both; }
.pa3.in-view:not(.no-intro) .ph-center > :nth-child(2) { animation-delay: .08s; }
.pa3.in-view:not(.no-intro) .ph-center > :nth-child(3) { animation-delay: .16s; }
.pa3.in-view:not(.no-intro) .ph-pick { animation: v180Up .45s cubic-bezier(.22, 1, .36, 1) both; animation-delay: calc(.35s + var(--i) * 45ms); }
@keyframes v189Fill { from { stroke-dashoffset: 1; } }
@keyframes v189Ride { from { transform: rotate(0deg); opacity: 0; } 12% { opacity: 1; } }
@keyframes v189Fade { from { opacity: 0; } }

/* ---------- Motion: the side menu cascades in ---------- */
.side-shell.enter .side-me, .side-shell.enter .side-cap, .side-shell.enter .side-nav-btn, .side-shell.enter .side-upgrade, .side-shell.enter .side-foot {
  animation: v189NavItem .55s cubic-bezier(.22, 1, .36, 1) both; animation-delay: calc(.06s + var(--n, 0) * 26ms);
}
.side-shell.enter .side-foot { --n: 20; }
.side-shell.enter .side-nav-btn .m-tile { animation: v189Tile .6s cubic-bezier(.3, 1.5, .5, 1) both; animation-delay: calc(.12s + var(--n, 0) * 26ms); }
.side-shell.enter .side-avatar { animation: v189Tile .6s cubic-bezier(.3, 1.5, .5, 1) .1s both; }
@keyframes v189NavItem { from { opacity: 0; transform: translateX(-22px); } }
@keyframes v189Tile { from { opacity: 0; transform: scale(.55) rotate(-8deg); } }

/* ---------- Motion: quick add rises from the + button ---------- */
.quick-add .dropup-item { animation: v189Rise .46s cubic-bezier(.22, 1, .36, 1) both; animation-delay: calc(30ms + (5 - var(--n, 0)) * 34ms); }
.quick-add .m-tile { animation: v189Tile .55s cubic-bezier(.3, 1.5, .5, 1) both; animation-delay: calc(80ms + (5 - var(--n, 0)) * 34ms); }
@keyframes v189Rise { from { opacity: 0; transform: translateY(18px) scale(.97); } }
[data-skin="ember"] .tab-plus:not(.open) { animation: v189PlusGlow 4.5s ease-in-out infinite; }
@keyframes v189PlusGlow { 50% { box-shadow: 0 10px 34px rgba(255, 106, 26, .62), 0 0 0 6px rgba(255, 122, 47, .1), inset 0 1px 0 rgba(255, 255, 255, .35); } }

/* ---------- Motion: switching tabs ---------- */
.tab-changed .tab-btn.active svg { animation: v189TabPop .55s cubic-bezier(.3, 1.6, .5, 1) both; }
.tab-changed .tab-btn.active span { animation: v189Fade .4s ease both; }
@keyframes v189TabPop { 0% { transform: scale(.7) translateY(3px); } 60% { transform: scale(1.12); } }
.screen.anim .topbar h1 { animation: v189Title .7s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes v189Title { from { opacity: 0; transform: translateY(10px); filter: blur(5px); } }

@media (prefers-reduced-motion: reduce) {
  [data-skin="ember"] body::after, [data-skin="ember"] body::before, .ph-knob-halo, [data-skin="ember"] .tab-plus,
  .side-shell.enter *, .quick-add *, .tab-changed *, .screen.anim .topbar h1 { animation: none !important; }
}
[data-motion="reduced"] body::after, [data-motion="reduced"] body::before, [data-motion="reduced"] .ph-knob-halo, [data-motion="reduced"] .tab-plus,
[data-motion="reduced"] .side-shell.enter *, [data-motion="reduced"] .quick-add *, [data-motion="reduced"] .tab-changed *, [data-motion="reduced"] .screen.anim .topbar h1 { animation: none !important; }
@media (max-width: 360px) {
  .ph-picks { gap: 6px; }
  .ph-pick { padding: 8px 8px 7px; }
  .ph-pick b { font-size: 12.5px; }
  .ph-center strong { font-size: 46px; }
}
/* Week strip: each day sits on a soft glass disc (depth, and the starfield never shows through) */
[data-skin="ember"] .ember-day:not(.today) .ember-day-ring { border-radius: 50%; background: radial-gradient(circle at 50% 35%, rgba(22, 34, 70, .75), rgba(8, 13, 30, .55)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05); }

/* ---------- The path (v191): Day 1 at the bottom, Day 90 at the top ---------- */
.ph-layout { justify-content: flex-end; margin: -4px 0 10px; }
.ph-layout .m-chip { min-height: 30px; padding: 0 12px; font-size: 12.5px; }
.ph-path { position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr); margin: 4px 0 16px; }
.ph-path::before { content: ''; position: absolute; left: -10px; top: 30%; width: 120px; height: 55%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(50% 50% at 40% 60%, rgba(255, 122, 47, .16), transparent 70%); filter: blur(22px); }
.ph-path-svg { display: block; overflow: visible; }
.ph-path-track { fill: none; stroke: color-mix(in srgb, var(--tx) 22%, transparent); stroke-width: 2; stroke-dasharray: 2 6; stroke-linecap: round; stroke-linejoin: round; }
.ph-path-walk { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
[data-skin="ember"] .ph-path-walk { stroke: url(#phPathGrad); filter: drop-shadow(0 0 6px rgba(255, 106, 26, .55)); }
.ph-path-node { fill: var(--bg, #060a16); stroke: color-mix(in srgb, var(--tx) 35%, transparent); stroke-width: 1.6; }
.ph-path-node.is-reached { fill: var(--accent); stroke: var(--accent); }
.ph-path-node.is-finish { stroke: #f5c97a; }
.ph-path-node.is-finish.is-reached { fill: #f5c97a; }
.ph-path-knob .halo { fill: color-mix(in srgb, var(--accent) 30%, transparent); transform-box: fill-box; transform-origin: center; animation: v189Halo 2.8s ease-in-out infinite; }
.ph-path-knob .dot { fill: #fff; filter: drop-shadow(0 0 8px rgba(255, 255, 255, .8)); }
.ph-path-list { display: grid; grid-auto-rows: 58px; }
.ph-path .ph-pick, .ph-path-row {
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 2px; height: 50px; min-height: 0; margin: 4px 0;
  padding: 0 12px; border-radius: 14px; border: 1px solid transparent; background: transparent; text-align: left;
}
.ph-path .ph-pick b, .ph-path-row b { font-size: 14px; font-weight: 600; color: var(--tx); }
.ph-path .ph-pick small, .ph-path-row small { font-size: 12px; color: var(--tx-3); }
.ph-path .ph-pick.is-now b { color: var(--accent); }
[data-skin="ember"] .ph-path .ph-pick.is-now b { color: var(--accent-3); }
.ph-path .ph-pick.is-future b { color: var(--tx-2); font-weight: 500; }
.ph-path .ph-pick.is-picked { background: var(--m-surface-2); border-color: var(--line); }
.ph-path-row.is-finish b { color: #f5c97a; }
/* reveal: the walked trail draws itself, nodes light in order, the dot arrives last */
.pa3.in-view:not(.no-intro) .ph-path-walk { animation: v189Fill 1.4s cubic-bezier(.22, 1, .36, 1) .15s both; }
.pa3.in-view:not(.no-intro) .ph-path-node.is-reached { animation: v189Tile .5s cubic-bezier(.3, 1.5, .5, 1) both; transform-box: fill-box; transform-origin: center; }
.pa3.in-view:not(.no-intro) .ph-path-knob { animation: v189Fade .5s ease 1.3s both; }
.pa3.in-view:not(.no-intro) .ph-path .ph-pick, .pa3.in-view:not(.no-intro) .ph-path-row { animation: v180Up .45s cubic-bezier(.22, 1, .36, 1) both; animation-delay: calc(.2s + (5 - var(--i, 6)) * 50ms); }
@media (prefers-reduced-motion: reduce) { .ph-path *, .ph-path::before { animation: none !important; } }

/* ---------- Close the day (v191): the comet and the sealed ring ---------- */
.arc-comet { position: fixed; left: 0; top: 0; z-index: 300; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, #fff 0 28%, #ffc39a 42%, rgba(255, 122, 47, .9) 55%, rgba(255, 122, 47, 0) 72%);
  box-shadow: 0 0 22px 8px rgba(255, 122, 47, .55), 0 0 44px 14px rgba(255, 90, 20, .25); }
.arc-comet.ghost { width: 12px; height: 12px; margin: -6px 0 0 -6px; background: radial-gradient(circle, #ffd2b0 0 25%, rgba(255, 122, 47, .7) 50%, transparent 72%); box-shadow: 0 0 14px 4px rgba(255, 122, 47, .35); }
.ember-day.sealed .ember-day-ring { animation: daySeal .9s cubic-bezier(.3, 1.5, .5, 1); }
.ember-day.sealed .ember-day-ring::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid rgba(255, 178, 122, .9); pointer-events: none; animation: daySealRing .9s ease-out both; }
.ember-day .ember-day-ring { position: relative; }
.ember-day.next-up .ember-day-ring { animation: dayNextUp 2.6s ease-out .3s both; }
@keyframes daySeal { 0% { transform: scale(1); } 30% { transform: scale(1.28); box-shadow: 0 0 0 8px rgba(255, 122, 47, .2), 0 0 32px rgba(255, 122, 47, .75); } 100% { transform: scale(1); } }
@keyframes daySealRing { from { opacity: 1; transform: scale(.8); } to { opacity: 0; transform: scale(1.9); } }
@keyframes dayNextUp { 0% { box-shadow: 0 0 0 0 rgba(61, 109, 255, 0); } 35% { box-shadow: 0 0 0 4px rgba(61, 109, 255, .25), 0 0 20px rgba(61, 109, 255, .55); } 100% { box-shadow: 0 0 0 0 rgba(61, 109, 255, 0); } }
@media (prefers-reduced-motion: reduce) { .arc-comet { display: none; } .ember-day.sealed .ember-day-ring, .ember-day.sealed .ember-day-ring::after, .ember-day.next-up .ember-day-ring { animation: none !important; } }

/* ---------- Connected motion (v193) ---------- */
.arc-spark { position: fixed; left: 0; top: 0; z-index: 300; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, #fff 0 30%, #ffc39a 45%, rgba(255, 122, 47, .85) 58%, rgba(255, 122, 47, 0) 74%); box-shadow: 0 0 14px 5px rgba(255, 122, 47, .5); }
.arc-spark.ghost { width: 8px; height: 8px; margin: -4px 0 0 -4px; box-shadow: 0 0 10px 3px rgba(255, 122, 47, .3); }
.arc-spark.is-water { background: radial-gradient(circle, #fff 0 30%, #c8ecff 45%, rgba(95, 184, 255, .85) 58%, rgba(95, 184, 255, 0) 74%); box-shadow: 0 0 14px 5px rgba(95, 184, 255, .5); }
.arc-spark.is-water.ghost { box-shadow: 0 0 10px 3px rgba(95, 184, 255, .3); }
.conn-pop { animation: connPop .6s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes connPop { 0% { transform: scale(1); } 35% { transform: scale(1.18); filter: drop-shadow(0 0 10px rgba(255, 150, 80, .7)); } 100% { transform: scale(1); } }

/* The check-in colours the light behind the score: warmer with good mood and energy */
@property --warm { syntax: '<number>'; inherits: true; initial-value: .5; }
.aura-today i:first-child { opacity: calc(.3 + var(--warm, .5) * .9); }
.aura-today i:last-child { opacity: calc(.3 + (1 - var(--warm, .5)) * .9); }
.aura-today.shift { animation: warmShift 1.2s ease both; }
@keyframes warmShift { from { --warm: var(--warm-from); } }

/* Streaks earn a rim: bronze 7, silver 21, gold 30, ember 66 */
.dg-tile.tier-1 { --rim: #d79a6a; }
.dg-tile.tier-2 { --rim: #dfe6f2; }
.dg-tile.tier-3 { --rim: #f5c97a; }
.dg-tile.tier-4 { --rim: #ff7a2f; }
.dg-tile[class*="tier-"] .dg-ring::before { content: ''; position: absolute; inset: -4px; border-radius: 50%; pointer-events: none;
  border: 1.5px solid var(--rim); opacity: .75; box-shadow: 0 0 10px -2px var(--rim); }
.dg-tile.tier-4 .dg-ring::before { border-width: 2px; opacity: .9; }
.dg-tile.forged .dg-ring::before { animation: rimForge 1.1s cubic-bezier(.3, 1.4, .5, 1) both; }
@keyframes rimForge { 0% { opacity: 0; transform: scale(1.6) rotate(-90deg); } 60% { opacity: 1; } 100% { opacity: .85; transform: scale(1) rotate(0deg); } }
@media (prefers-reduced-motion: reduce) { .arc-spark { display: none; } .conn-pop, .aura-today.shift, .dg-tile.forged .dg-ring::before { animation: none !important; } }

/* ---------- Share sheet v194: glass, depth carousel, everything in reach ---------- */
.sheet[data-sheet-type="share"] { max-height: 94dvh; padding-bottom: 0; }
[data-skin="ember"] .sheet[data-sheet-type="share"] {
  background: linear-gradient(180deg, rgba(22, 36, 82, .74), rgba(8, 13, 30, .88)) !important;
  -webkit-backdrop-filter: blur(30px) saturate(1.25); backdrop-filter: blur(30px) saturate(1.25);
  border-top: 1px solid rgba(160, 185, 255, .22);
}
.sc2 { display: flex; flex-direction: column; gap: 12px; text-align: center; }
.sc2-head { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.sc2-head .eyebrow { margin: 0; }
.sc2-hint { font-size: 12px; color: var(--tx-3); }
.sc2 .sc-carousel { margin: 0 -18px; padding: 10px 18px 8px; }
.sc2 .sc-slide, .sc2 .sc-slide.on {
  flex-basis: min(58%, 236px); transform: scale(calc(1 - var(--d, 1) * .14)); opacity: calc(1 - var(--d, 1) * .5);
  transition: box-shadow .3s ease; will-change: transform;
}
.sc2 .sc-slide.on { box-shadow: 0 30px 60px -26px rgba(0, 0, 0, .9), 0 0 44px -12px rgba(61, 109, 255, .45); }
.sc2 .sc-slide img { transition: opacity .18s ease; }
.sc2 .sc-slide img.swap { opacity: .3; }
/* v281: the Mountain video in its slide, live while it records, then looping */
.sc2 .sc-slide .sc-live-slot, .sc2 .sc-slide .sc-video { display: block; width: 100%; height: 100%; object-fit: cover; background: #120a09; }
.sc2 .sc-slide .sc-live-slot canvas { display: block; width: 100%; height: 100%; }
.sc2-animate.on { border-style: solid; border-color: transparent; background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--tx); }
/* Sticker: previewed on a sample photo so the see-through card reads as see-through */
.sc2 .sc-carousel.is-sticker .sc-slide {
  aspect-ratio: 9 / 16; border-radius: 22px;
  background:
    radial-gradient(110% 70% at 22% 12%, rgba(255, 196, 140, .95), transparent 55%),
    radial-gradient(90% 70% at 85% 85%, rgba(108, 143, 209, .9), transparent 62%),
    linear-gradient(165deg, #d0845e, #6a5a86 52%, #1f2a4c);
}
.sc2 .sc-carousel.is-sticker .sc-slide img { object-fit: contain; padding: 9% 8%; filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .35)); }
/* v280: five designs (Mountain joined) still fit one row on a 402-wide phone; narrower ones wrap */
.sc2-styles { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px; }
.sc2-styles .sc-style {
  flex-direction: row; min-height: 34px; padding: 0 9px; border-radius: 999px; border: 1px solid var(--line-2);
  background: transparent; color: var(--tx-2); font: inherit; font-size: 12.5px; font-weight: 600; gap: 0;
}
.sc2-styles .sc-style.on { background: var(--blue-grad, var(--accent)); border-color: transparent; color: #fff; }
.sc2-extra:empty { display: none; }
.sc2-chip { min-height: 34px; padding: 0 16px; border-radius: 999px; border: 1px dashed var(--line-2); background: transparent; color: var(--tx); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.sc2-chip:active { transform: scale(.96); }
.sc2-options { display: grid; gap: 4px; padding: 10px 10px 6px; border-radius: 20px; background: var(--m-surface); border: 1px solid var(--line); }
.sc2-options .sc-format { justify-self: center; margin-bottom: 4px; }
.sc2-options .sc-details { margin: 0; padding: 8px 6px; border: 0; border-radius: 12px; background: transparent; text-align: left; }
.sc2-options .sc-details + .sc-details { border-top: 1px solid var(--line); border-radius: 0; }
.sc2-actions {
  position: sticky; bottom: 0; z-index: 2; display: grid; grid-template-columns: 1fr 2fr; gap: 10px;
  margin: 0 -18px; padding: 14px 18px calc(14px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, transparent, var(--bg, #060a16) 34%);
}
.sc2-actions .story-send { width: 100%; margin: 0; min-height: 52px; }
.sc2-save { min-height: 52px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--m-surface-2); color: var(--tx); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.sc2-save:active { transform: scale(.97); }
@media (prefers-reduced-motion: reduce) { .sc2 .sc-slide { transform: none !important; } }

/* Sheets stop below the status bar and Dynamic Island. On an iPhone the top safe area is about 60px, so the
   old 20px gap put a tall sheet's edge and its Close button under the clock and battery (seen in the iOS
   Simulator, 2026-10-19). Browsers without a safe area keep the 20px gap. */
.sheet { max-height: calc(100dvh - max(20px, env(safe-area-inset-top, 0px) + 10px)); }
.sheet[data-sheet-type="share"] { max-height: min(94dvh, calc(100dvh - env(safe-area-inset-top, 0px) - 10px)); }

/* the iPhone paywall's required links (v284, Apple in-app purchase) */
.pay-legal { display: flex; justify-content: center; gap: 8px; margin-top: 12px; font-size: 12px; color: var(--tx-3); }
.pay-legal a { color: var(--tx-3); }
