/* ==========================================================================
   Apple Watch Ultra (2026-10-15, round 3): a flat, front-on product drawing,
   natural titanium with the crown guard, the Digital Crown, the side button
   and the orange Action button, on a forest green Alpine Loop. The screen
   follows SET's own watch design (overload docs/watch-mockup, Smart Stack):
   the face with the date in mint, and the rest card with SET's ring, "SET ·
   Rest", the exercise and the next set. SET has no watch app; this is the
   iPhone's rest Live Activity on the watch face. On SET's Mineral stage in
   both themes. Loaded after site.css and glass.css.
   ========================================================================== */

/* ---- The stage: SET's Mineral field, the green light behind the watch ----- */
:root .tile-watch.tile-watch { color: var(--ivory);
  background:
    radial-gradient(34% 62% at var(--glow-x) 56%, rgb(36 87 63 / .9) 0%, rgb(24 50 38 / .6) 46%, transparent 80%),
    radial-gradient(60% 40% at var(--glow-x) 120%, rgb(127 191 156 / .26) 0%, transparent 70%),
    radial-gradient(55% 60% at -5% -10%, rgb(36 87 63 / .3), transparent 70%),
    var(--mineral);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .08), inset 0 0 0 1px rgb(255 255 255 / .05); }
:root .tile-watch.tile-watch .tile-copy h3 { color: var(--ivory); }
:root .tile-watch.tile-watch .tile-copy p { color: var(--ivory-2); }
:root .tile-watch.tile-watch .tile-copy .tile-note { color: rgb(243 238 226 / .5); }
.tile-watch .tile-kicker { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 16px; color: var(--mint); font: 600 14px/1 var(--font); }
.tile-watch .tile-kicker .signal { width: 14px; height: 14px; fill: currentColor; }

.tile-watch .watch-ui { --u: calc(min(100cqi, 540px) / 400); position: relative; display: grid; place-items: center; width: 100%; padding-block: calc(52 * var(--u)); }
.watch-light { position: absolute; left: 50%; top: 50%; width: calc(900 * var(--u)); height: calc(820 * var(--u)); margin: calc(-410 * var(--u)) 0 0 calc(-450 * var(--u)); pointer-events: none; }
.watch-light::before { background: radial-gradient(closest-side, rgb(127 191 156 / .22), rgb(36 87 63 / .18) 40%, transparent 72%); }
.watch-light::after { background: radial-gradient(closest-side, rgb(159 211 181 / .45), rgb(127 191 156 / .18) 34%, transparent 66%); transition: opacity 1.2s ease; }
[data-watch].is-ready .watch-light::after { opacity: 1; transition: opacity .5s ease; }

/* ---- The watch ------------------------------------------------------------- */
.watch-float { position: relative; transform: translate3d(0, calc(var(--watch-shift, 0) * 1px), 0) rotate(calc(var(--lean, 0) * 1deg)); }
/* A floor of light under the watch. */
.watch-float::after { content: ""; position: absolute; left: 0; right: 0; top: 96%; height: 16%; border-radius: 50%; background: radial-gradient(closest-side, rgb(127 191 156 / .22), transparent); filter: blur(calc(8 * var(--u))); opacity: .6; transition: opacity .8s ease; pointer-events: none; }
[data-watch].is-ready .watch-float::after { opacity: 1; }
.uw { position: relative; width: calc(352 * var(--u)); height: calc(352 * var(--u)); transition: transform .9s var(--spring); }
.uw-case { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; overflow: visible;
  filter: drop-shadow(0 calc(24 * var(--u)) calc(30 * var(--u)) rgb(0 0 0 / .5)) drop-shadow(0 calc(3 * var(--u)) calc(5 * var(--u)) rgb(0 0 0 / .35)); }

/* The Alpine Loop in forest green: woven rows, darker at the edges, running
   off the stage at both ends. */
.uw-band { position: absolute; z-index: 0; left: calc(84 * var(--u)); width: calc(164 * var(--u)); height: calc(var(--band-len, 300) * var(--u)); border-radius: calc(14 * var(--u));
  background:
    linear-gradient(90deg, rgb(0 0 0 / .6), transparent 13%, rgb(255 255 255 / .07) 50%, transparent 87%, rgb(0 0 0 / .6)),
    radial-gradient(circle at 50% 100%, transparent calc(1.6 * var(--u)), rgb(0 0 0 / .26) calc(1.8 * var(--u)), transparent calc(2.6 * var(--u))) 0 0 / calc(5.5 * var(--u)) calc(6 * var(--u)),
    repeating-linear-gradient(90deg, rgb(255 255 255 / .04) 0 calc(.8 * var(--u)), transparent calc(.8 * var(--u)) calc(2.4 * var(--u))),
    repeating-linear-gradient(180deg, #2F5E47 0 calc(1.4 * var(--u)), #22493A calc(1.4 * var(--u)) calc(3.9 * var(--u)), #193A2C calc(3.9 * var(--u)) calc(6 * var(--u))); }
.uw-band.top { bottom: calc(308 * var(--u)); -webkit-mask-image: linear-gradient(to top, #000 45%, transparent); mask-image: linear-gradient(to top, #000 45%, transparent); }
.uw-band.bottom { top: calc(308 * var(--u)); -webkit-mask-image: linear-gradient(to bottom, #000 45%, transparent); mask-image: linear-gradient(to bottom, #000 45%, transparent); }

/* ---- The screen: SET's watch design ---------------------------------------- */
/* The display fills the glass to a thin black edge, as on the watch (it sat 26 pt inside, a small screen in a wide border). The
   app's content is drawn a tenth larger to fill it; the case keeps its own unit. */
.uw { --uw: var(--u); }
.uw-screen { --u: calc(var(--uw) * 1.1); position: absolute; z-index: 2; left: calc(41 * var(--uw)); top: calc(33 * var(--uw)); width: calc(250 * var(--uw)); height: calc(286 * var(--uw)); overflow: hidden; border-radius: calc(56 * var(--uw));
  background: radial-gradient(70% 45% at 20% 0%, rgb(127 191 156 / .22), transparent 70%), radial-gradient(60% 40% at 100% 20%, rgb(36 87 63 / .4), transparent 70%), #000;
  color: #F3EEE2; font-family: var(--font); font-variant-numeric: tabular-nums; }
.uw-screen p { margin: 0; }
.uw-face { padding: calc(16 * var(--u)) calc(16 * var(--u)) 0; }
.uw-date { margin-left: calc(4 * var(--u)) !important; color: #7FBF9C; font: 600 calc(15 * var(--u))/1.2 var(--font); }
.uw-time { margin-left: calc(2 * var(--u)) !important; font: 600 calc(62 * var(--u))/calc(66 * var(--u)) var(--font); letter-spacing: -.03em; }
.uw-card { position: absolute; left: calc(12 * var(--u)); right: calc(12 * var(--u)); bottom: calc(14 * var(--u)); display: flex; align-items: center; gap: calc(10 * var(--u)); padding: calc(10 * var(--u)) calc(12 * var(--u)); border-radius: calc(24 * var(--u)); background: #1C1C1E; box-shadow: inset 0 calc(1 * var(--u)) 0 rgb(255 255 255 / .07);
  transition: transform .75s var(--spring-bounce), opacity .35s ease; }
.uw-ring { position: relative; display: grid; place-items: center; flex-shrink: 0; width: calc(46 * var(--u)); height: calc(46 * var(--u)); }
.uw-ring svg:first-child { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.uw-ring circle { fill: none; stroke-width: 5; }
.uw-ring .trk { stroke: rgb(127 191 156 / .2); }
.uw-ring .prg { stroke: url(#uw-ringg); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 70; transition: stroke-dashoffset 1s linear; }
.uw-ring b { position: relative; font: 600 calc(12.5 * var(--u))/1 var(--font); transition: opacity .25s ease, transform .4s var(--spring-bounce); }
.uw-check { position: absolute; font-size: calc(20 * var(--u)); color: #7FBF9C; stroke-width: 3; opacity: 0; transform: scale(.4); transition: opacity .2s ease, transform .55s var(--spring-bounce); }
.uw-copy { display: grid; gap: calc(1 * var(--u)); min-width: 0; }
.uw-copy small { display: flex; align-items: center; gap: calc(4 * var(--u)); color: #7FBF9C; font: 600 calc(11.5 * var(--u))/1.3 var(--font); white-space: nowrap; }
.uw-copy .signal { width: calc(10 * var(--u)); height: calc(10 * var(--u)); fill: currentColor; }
.uw-copy strong { font: 600 calc(15 * var(--u))/1.2 var(--font); white-space: nowrap; }
.uw-copy em { color: rgb(243 238 226 / .64); font: 400 calc(12.5 * var(--u))/1.3 var(--font); font-style: normal; white-space: nowrap; }
.uw-dots { position: absolute; right: calc(5 * var(--u)); top: 50%; display: grid; gap: calc(3 * var(--u)); transition: opacity .3s ease; }
.uw-dots i { width: calc(4 * var(--u)); height: calc(4 * var(--u)); border-radius: 50%; background: rgb(255 255 255 / .3); }
.uw-dots i:first-child { background: #FFFFFF; }
.uw .watch-dim { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; transition: opacity .45s ease; }

/* The crystal catches the light as the wrist comes up. */
.uw-glare { position: absolute; z-index: 3; left: calc(34 * var(--u)); top: calc(26 * var(--u)); width: calc(264 * var(--u)); height: calc(300 * var(--u)); overflow: hidden; border-radius: calc(63 * var(--u)); pointer-events: none; }
.uw-glare::before { content: ""; position: absolute; inset: -50%; background: linear-gradient(118deg, transparent 42%, rgb(255 255 255 / .09) 48%, rgb(255 255 255 / .02) 53%, transparent 58%); transform: translate3d(-8%, -6%, 0); transition: transform 1.4s var(--ease-pres); }

/* ---- States: wrist down, the stack, ready ----------------------------------- */
.js [data-watch]:not(.is-awake) .uw { transform: translateY(calc(8 * var(--u))) scale(.985); }
.js [data-watch]:not(.is-awake) .watch-dim { opacity: .62; }
.js [data-watch]:not(.is-awake) .watch-light::before { opacity: .35; transition: opacity .8s ease; }
.js [data-watch]:not(.is-awake) .uw-glare::before { transform: translate3d(14%, 10%, 0); transition: transform 1s var(--ease-out); }
.js [data-watch]:not(.is-stack) .uw-card { opacity: 0; transform: translateY(calc(30 * var(--u))) scale(.94); transition: transform .45s var(--ease-exit), opacity .25s ease; }
.js [data-watch]:not(.is-stack) .uw-dots { opacity: 0; }
[data-watch].is-ready .uw-ring .prg { stroke-dashoffset: 0; transition: stroke-dashoffset .5s var(--ease-pres); }
[data-watch].is-ready .uw-ring b { opacity: 0; transform: scale(.6); }
[data-watch].is-ready .uw-check { opacity: 1; transform: none; }
[data-watch].is-ready .uw-ring svg:first-child { filter: drop-shadow(0 0 calc(5 * var(--u)) rgb(127 191 156 / .55)); }
/* Ready: one short tap, seen as a small shake. */
@keyframes uw-tap { 0%, 100% { translate: 0 0; } 20% { translate: calc(-1.6 * var(--u)) 0; } 40% { translate: calc(1.6 * var(--u)) 0; } 60% { translate: calc(-1 * var(--u)) 0; } 80% { translate: calc(.6 * var(--u)) 0; } }
[data-watch].is-ready .uw { animation: uw-tap .36s ease-out .05s 1; }

/* Stacked tiles: a smaller watch, bands that fade out before the copy. */
@media (max-width: 1080px) {
  .tile-watch .watch-ui { --u: calc(min(100cqi, 380px) / 400); --band-len: 150; padding-block: calc(60 * var(--u)) calc(56 * var(--u)); }
}
@media (prefers-reduced-motion: reduce) {
  .uw, .uw-card, .uw-glare::before { transition: none; }
  [data-watch].is-ready .uw { animation: none; }
}

/* ---- Dark theme: graphite with white (owner choice 2026-10-16) ----------------------------------------
   Dark-only copies of the shared rules that carry green: the mint and forest light become white and graphite. The light
   theme is unchanged; the light brand green in small light cards stays. */
:root[data-theme="dark"] .tile-watch.tile-watch { background:
    radial-gradient(34% 62% at var(--glow-x) 56%, rgb(72 70 66 / .9) 0%, rgb(46 45 43 / .6) 46%, transparent 80%),
    radial-gradient(60% 40% at var(--glow-x) 120%, rgb(241 241 240 / .26) 0%, transparent 70%),
    radial-gradient(55% 60% at -5% -10%, rgb(72 70 66 / .3), transparent 70%),
    var(--mineral); }
:root[data-theme="dark"] .watch-light::before { background: radial-gradient(closest-side, rgb(241 241 240 / .22), rgb(72 70 66 / .18) 40%, transparent 72%); }
:root[data-theme="dark"] .watch-light::after { background: radial-gradient(closest-side, rgb(243 243 241 / .45), rgb(241 241 240 / .18) 34%, transparent 66%); }
:root[data-theme="dark"] .watch-float::after { background: radial-gradient(closest-side, rgb(241 241 240 / .22), transparent); }
:root[data-theme="dark"] .uw-band { background:
    linear-gradient(90deg, rgb(0 0 0 / .6), transparent 13%, rgb(255 255 255 / .07) 50%, transparent 87%, rgb(0 0 0 / .6)),
    radial-gradient(circle at 50% 100%, transparent calc(1.6 * var(--u)), rgb(0 0 0 / .26) calc(1.8 * var(--u)), transparent calc(2.6 * var(--u))) 0 0 / calc(5.5 * var(--u)) calc(6 * var(--u)),
    repeating-linear-gradient(90deg, rgb(255 255 255 / .04) 0 calc(.8 * var(--u)), transparent calc(.8 * var(--u)) calc(2.4 * var(--u))),
    repeating-linear-gradient(180deg, #514F4B 0 calc(1.4 * var(--u)), #403E3B calc(1.4 * var(--u)) calc(3.9 * var(--u)), #33322F calc(3.9 * var(--u)) calc(6 * var(--u))); }
:root[data-theme="dark"] .uw-screen { background: radial-gradient(70% 45% at 20% 0%, rgb(241 241 240 / .22), transparent 70%), radial-gradient(60% 40% at 100% 20%, rgb(72 70 66 / .4), transparent 70%), #000; }
:root[data-theme="dark"] .uw-date { color: #F1F1F0; }
:root[data-theme="dark"] .uw-ring .trk { stroke: rgb(241 241 240 / .2); }
:root[data-theme="dark"] .uw-check { color: #F1F1F0; }
:root[data-theme="dark"] .uw-copy small { color: #F1F1F0; }
:root[data-theme="dark"] [data-watch].is-ready .uw-ring svg:first-child { filter: drop-shadow(0 0 calc(5 * var(--u)) rgb(241 241 240 / .55)); }
