/* Live recreations of the app's screens, the first-visit splash, and the features grid.
   Screens are laid out at the app's own size (390 × 844 pt) and scaled to fit their phone frame. */

/* ---------- phone with a live screen ---------- */
.screen-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 390 / 844;
  border-radius: 40px;
  overflow: hidden;
  background: #fff;
}
.app {
  position: absolute;
  left: 0;
  top: 0;
  width: 390px;
  height: 844px;
  transform-origin: top left;
  overflow: hidden;
  background: #fff;
  color: var(--ink);
  font-family: var(--sans);
  display: flex;
  flex-direction: column;
  transition: opacity 0.35s ease;
}
.app.is-resetting { opacity: 0; }
.app * { box-sizing: border-box; }

.app::after { content: ''; position: absolute; left: 50%; bottom: 8px; width: 139px; height: 5px; margin-left: -69.5px; border-radius: 3px; background: var(--ink); z-index: 4; }
.ed-list { flex: 1 1 auto; min-height: 0; overflow: hidden; }
.app--timer .sets { margin-top: auto; }
.app--timer .bar-bottom { margin-top: 0; }
.sb { height: 54px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 6px 30px 0 46px; font-weight: 600; font-size: 17px; letter-spacing: -0.01em; }
.sb svg { width: 72px; height: 13px; }

.tap {
  position: absolute;
  width: 46px; height: 46px;
  margin: -23px 0 0 -23px;
  border-radius: 50%;
  background: rgba(18, 18, 18, 0.16);
  pointer-events: none;
  animation: tap 0.55s ease-out forwards;
  z-index: 5;
}
@keyframes tap { from { transform: scale(0.3); opacity: 1; } to { transform: scale(1.25); opacity: 0; } }

.num-in { animation: numIn 0.32s cubic-bezier(.2,.8,.2,1); display: inline-block; }
@keyframes numIn { from { transform: translateY(35%); opacity: 0; filter: blur(3px); } to { transform: none; opacity: 1; filter: none; } }

/* shared pieces */
.round { width: 44px; height: 44px; border-radius: 50%; background: var(--control); display: grid; place-items: center; flex: none; }
.round svg { width: 16px; height: 16px; }
.capsule { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 52px; padding: 0 26px; border-radius: 26px; background: var(--ink); color: #fff; font-size: 17px; font-weight: 500; }
.capsule svg { width: 15px; height: 15px; }
.trk { font-size: 13px; font-weight: 500; letter-spacing: 1.5px; text-transform: uppercase; color: var(--secondary); }
.bar-bottom { margin-top: auto; border-top: 1px solid var(--line); padding: 14px 24px 42px; display: flex; align-items: center; justify-content: space-between; background: #fff; }

/* ---------- editor ---------- */
.app--editor { background: var(--surface); }
.ed-head { background: #fff; }
.ed-nav { height: 44px; position: relative; display: flex; align-items: center; padding: 0 16px; }
.ed-nav .back { width: 40px; height: 40px; border-radius: 50%; background: #fff; box-shadow: 0 1px 8px rgba(0,0,0,.08); display: grid; place-items: center; }
.ed-nav .back svg { width: 18px; height: 18px; }
.ed-nav b { position: absolute; left: 0; right: 0; text-align: center; font-weight: 500; font-size: 17px; pointer-events: none; }
.ed-list { padding: 18px 16px 0; display: flex; flex-direction: column; gap: 22px; }
.group { background: #fff; border-radius: 22px; padding: 0 16px; }
.g-name { font-size: 22px; font-weight: 500; padding: 14px 0; border-bottom: 1px solid var(--line); }
.g-sum { padding: 14px 0 16px; }
.g-sum p { font-size: 14px; color: var(--secondary); }
.tl { display: flex; gap: 2px; height: 4px; margin-top: 10px; }
.tl i { height: 4px; border-radius: 2px; background: var(--work); transition: flex-grow .5s ease; }
.tl i.r { background: var(--rest); }
.blk-h { display: flex; justify-content: space-between; align-items: center; padding: 0 4px 8px 16px; font-size: 13px; font-weight: 500; color: var(--secondary); }
.row { display: flex; align-items: center; gap: 12px; height: 52px; border-bottom: 1px solid var(--line); overflow: hidden; }
.row:last-child { border-bottom: 0; }
.row .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--work); }
.row .dot.r { background: var(--rest); }
.row .dot.n { background: transparent; }
.row .t { flex: 1; font-size: 16px; white-space: nowrap; }
.row .t.muted { color: var(--secondary); }
.row .t.ph { color: rgba(18,18,18,.5); }
.row.add { gap: 14px; }
.row.add svg { width: 17px; height: 17px; margin-left: 2px; }
.row.is-new { animation: rowIn .45s cubic-bezier(.2,.8,.2,1); }
@keyframes rowIn { from { height: 0; opacity: 0; } to { height: 52px; opacity: 1; } }
.stp { display: flex; align-items: center; gap: 4px; }
.stp i { width: 30px; height: 30px; border-radius: 50%; background: var(--control); display: grid; place-items: center; font-style: normal; font-size: 18px; line-height: 1; font-weight: 500; }
.stp b { min-width: 48px; text-align: center; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ed-bottom { margin-top: auto; padding: 8px 16px 42px; background: var(--surface); }
.btn-start { height: 56px; border-radius: 14px; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 17px; font-weight: 500; }
.btn-start svg { width: 14px; height: 14px; }

/* ---------- timer ---------- */
.tm-top { display: flex; align-items: center; justify-content: space-between; padding: 8px 24px 0; }
.tm-prog { display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 15px; font-weight: 500; }
.dashes { display: flex; gap: 5px; }
.dashes i { width: 24px; height: 4px; border-radius: 2px; background: var(--line); transition: background .3s; }
.dashes i.done { background: var(--ink); }
.dashes i.cur { background: var(--work); }
.tm-title { margin-top: 44px; text-align: center; font-family: var(--display); font-weight: 700; font-size: 52px; line-height: 1.05; text-transform: uppercase; }
.ring { position: relative; width: 256px; height: 256px; margin: 20px auto 0; }
.ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 8; }
.ring .trk-c { stroke: var(--line); }
.ring .prg { stroke: var(--work); stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.ring .prg.snap { transition: none; }
.ring .mid { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring .mid b { font-family: var(--display); font-weight: 700; font-size: 100px; line-height: 1; font-variant-numeric: tabular-nums; }
.ring .mid b.beat { animation: beat .35s ease; }
@keyframes beat { 40% { transform: scale(1.06); } }
.ring .mid span { margin-top: 2px; }
.tm-ctl { display: flex; align-items: center; justify-content: center; gap: 22px; margin-top: 28px; }
.tm-ctl .big { width: 72px; height: 72px; border-radius: 50%; background: var(--ink); display: grid; place-items: center; }
.tm-ctl .big svg { width: 24px; height: 24px; }
.sets { margin: 30px 24px 20px; background: var(--surface); border-radius: 24px; padding: 2px 16px; }
.set { display: flex; align-items: center; gap: 14px; height: 56px; border-bottom: 1px solid var(--line); font-size: 17px; font-weight: 500; }
.set:last-child { border-bottom: 0; }
.set .bd { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 500; background: var(--control); color: var(--secondary); flex: none; }
.set .bd.ok { background: rgba(52,162,94,.14); color: var(--done); }
.set .bd.ok svg { width: 13px; height: 13px; }
.set .bd.now { background: var(--ink); color: #fff; }
.set .s { flex: 1; }
.set .d { font-size: 16px; font-weight: 400; color: var(--secondary); }
.set .d.now { color: var(--ink); }
.chip-now { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 13px; background: rgba(52,162,94,.12); color: var(--done); font-size: 14px; font-weight: 500; }
.chip-now::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--done); }
.tm-status b { display: block; font-size: 17px; font-weight: 500; }
.tm-status span { font-size: 14px; color: var(--secondary); }

/* ---------- summary ---------- */
.app--summary::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 360px; background: linear-gradient(rgba(239,122,77,.16), rgba(239,122,77,0)); }
.app--summary > * { position: relative; }
.su-body { padding: 8px 24px 0; }
.su-head { margin-top: 28px; display: flex; flex-direction: column; gap: 8px; }
.su-head .trk { color: var(--work-text); }
.su-head h4 { font-family: var(--display); font-weight: 700; font-size: 52px; line-height: 1; }
.su-head p { font-size: 15px; color: var(--secondary); }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 28px; }
.tile { background: var(--surface); border-radius: 20px; padding: 18px; }
.tile b { display: block; font-family: var(--display); font-size: 56px; line-height: 1; font-variant-numeric: tabular-nums; }
.tile span { font-size: 14px; color: var(--secondary); }
.hl { margin-top: 16px; display: flex; align-items: center; gap: 16px; padding: 18px; border-radius: 20px; background: rgba(239,122,77,.14); transition: opacity .5s, transform .5s cubic-bezier(.2,.8,.2,1); }
.hl.off { opacity: 0; transform: translateY(12px); }
.hl .ic { width: 44px; height: 44px; border-radius: 50%; background: var(--work); display: grid; place-items: center; flex: none; }
.hl .ic svg { width: 18px; height: 18px; }
.hl small { display: block; font-size: 14px; font-weight: 500; color: var(--work-text); }
.hl b { display: block; font-size: 17px; font-weight: 500; }
.hl span { font-size: 13px; color: var(--secondary); }
.wk { margin-top: 28px; }
.wk-h { display: flex; justify-content: space-between; font-size: 17px; font-weight: 500; }
.wk-h span { font-size: 14px; }
.wk-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 12px; text-align: center; font-size: 12px; color: var(--secondary); }
.wk-days i { display: block; height: 6px; border-radius: 3px; background: var(--line); margin-bottom: 8px; position: relative; overflow: hidden; }
.wk-days i::after { content: ''; position: absolute; inset: 0; background: var(--work); transform: scaleX(0); transform-origin: left; transition: transform .45s ease; }
.wk-days div.on i::after { transform: scaleX(1); }
.wk-days div.on { color: var(--ink); }
.wk p { margin-top: 12px; font-size: 13px; color: var(--secondary); }
.feel { margin-top: 28px; }
.feel h5 { font-size: 17px; font-weight: 500; }
.feel-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.feel-row span { height: 40px; border-radius: 20px; background: var(--surface); display: grid; place-items: center; font-size: 15px; font-weight: 500; transition: background .2s, color .2s; }
.feel-row span.sel { background: var(--ink); color: #fff; }

/* ---------- splash (first visit) ---------- */
html.splashing, html.splashing body { overflow: hidden; }
.splash {
  position: fixed; inset: 0; z-index: 100;
  background: #fff;
  display: flex; flex-direction: column; align-items: center;
  transition: opacity .45s ease, visibility .45s;
}
.splash[hidden] { display: none; }
.splash.out { opacity: 0; visibility: hidden; }
.splash__glow { position: absolute; inset: 0; background: radial-gradient(closest-side at 50% 40%, rgba(239,122,77,.22), rgba(239,122,77,0) 100%); opacity: 0; transition: opacity .5s ease; pointer-events: none; }
.splash.go .splash__glow { opacity: 1; }
.splash__top { position: relative; width: 100%; max-width: 480px; height: 64px; display: flex; align-items: center; justify-content: flex-end; padding: 0 24px; }
.splash__skip { background: none; border: 0; font: 500 16px/1 var(--sans); color: var(--secondary); cursor: pointer; padding: 10px; transition: opacity .3s; }
.splash.intro .splash__skip { opacity: 0; pointer-events: none; }
.splash__mid { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.dial { position: relative; width: 280px; height: 280px; transition: transform .7s cubic-bezier(.2,.9,.25,1.1); }
.splash.intro .dial { transform: scale(.72); }
.dial svg { position: absolute; inset: 0; overflow: visible; }
.dial .tick { stroke-linecap: round; opacity: 0; transition: opacity .3s ease; }
.splash.ticks .dial .tick { opacity: 1; }
.dial .d-track { fill: none; stroke: var(--line); stroke-width: 10; }
.dial .d-prog { fill: none; stroke: var(--work); stroke-width: 10; stroke-linecap: round; stroke-dasharray: 691.15; stroke-dashoffset: 691.15; transform: rotate(-90deg); transform-origin: 140px 140px; transition: stroke-dashoffset 1s linear; }
.dial .d-hand { transform-origin: 140px 140px; transition: transform 1s linear, opacity .4s; opacity: 0; }
.splash.counting .dial .d-hand { opacity: 1; }
.splash.intro .dial .d-hand { opacity: 0; }
.dial__num { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 120px; line-height: 1; color: var(--ink); }
.dial__num span { display: inline-block; }
.splash.go .dial__num { color: var(--work); }
.dial__num .pop { animation: pop .5s cubic-bezier(.3,1.6,.5,1); }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }
.splash__intro { text-align: center; margin-top: -8px; opacity: 0; transform: translateY(40px); transition: opacity .6s ease .1s, transform .7s cubic-bezier(.2,.9,.25,1.05) .1s; }
.splash.intro .splash__intro { opacity: 1; transform: none; }
.splash__intro h2 { font-family: var(--display); font-weight: 700; font-size: 64px; line-height: 1; }
.splash__intro p { margin-top: 10px; color: var(--secondary); font-size: 16px; line-height: 1.4; }
.splash__bottom { position: relative; width: 100%; max-width: 480px; padding: 0 24px 28px; opacity: 0; transform: translateY(40px); transition: opacity .6s ease .2s, transform .7s cubic-bezier(.2,.9,.25,1.05) .2s; }
.splash.intro .splash__bottom { opacity: 1; transform: none; }
.splash__bottom button { width: 100%; height: 52px; border: 0; border-radius: 26px; background: var(--ink); color: #fff; font: 500 17px var(--sans); display: flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer; }
.splash__bottom button svg { width: 15px; height: 15px; }

/* ---------- features grid ---------- */
.bento { margin-top: 48px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { background: var(--surface); border-radius: 28px; padding: 28px; display: flex; flex-direction: column; overflow: hidden; min-height: 360px; }
.card--wide { grid-column: span 2; }
.card__vis { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 170px; margin-bottom: 24px; }
.card h3 { font-size: 21px; font-weight: 600; }
.card p { margin-top: 8px; color: var(--secondary); font-size: 15px; max-width: 34em; }
.card--dark { background: #0b0b0b; color: #f5f5f5; }
.card--dark p { color: #9e9e9e; }

/* supersets visual */
.blocks { width: 100%; max-width: 560px; display: flex; flex-direction: column; gap: 12px; }
.blk { background: #fff; border-radius: 18px; padding: 14px 16px; }
.blk__h { display: flex; justify-content: space-between; font-size: 13px; font-weight: 500; color: var(--secondary); }
.blk__h b { color: var(--ink); font-weight: 600; }
.blk__chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 15px; background: var(--surface); font-size: 13px; font-weight: 500; opacity: 0; transform: translateY(6px); transition: opacity .4s ease, transform .4s ease; }
.chip::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--work); }
.chip.r::before { background: var(--rest); }
.chip em { font-style: normal; color: var(--secondary); font-variant-numeric: tabular-nums; }
.is-in .chip { opacity: 1; transform: none; }
.flow { position: relative; display: flex; gap: 3px; height: 6px; margin-top: 4px; }
.flow i { height: 6px; border-radius: 3px; background: var(--work); transform: scaleX(0); transform-origin: left; transition: transform .35s ease; }
.flow i.r { background: var(--rest); }
.is-in .flow i { transform: scaleX(1); }
.flow__head { position: absolute; top: 50%; left: 0; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #fff; border: 3px solid var(--ink); box-shadow: 0 2px 6px rgba(0,0,0,.15); animation: playhead 9s linear infinite; }
@keyframes playhead { from { left: 0; } to { left: 100%; } }

/* countdown visual */
.mini-ring { position: relative; width: 170px; height: 170px; }
.mini-ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.mini-ring circle { fill: none; stroke-width: 7; }
.mini-ring .mr-t { stroke: var(--line); }
.mini-ring .mr-p { stroke: var(--work); stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.mini-ring .mr-p.snap { transition: none; }
.mini-ring div { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.mini-ring b { font-family: var(--display); font-size: 64px; line-height: 1; font-variant-numeric: tabular-nums; }
.mini-ring span { font-size: 10px; font-weight: 600; letter-spacing: 1.4px; color: var(--secondary); }
.beeps { display: flex; gap: 6px; margin-top: 14px; justify-content: center; }
.beeps i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); transition: background .15s, transform .15s; }
.beeps i.on { background: var(--work); transform: scale(1.25); }

/* skip rest visual */
.rest-demo { width: 100%; max-width: 280px; text-align: center; }
.rest-demo h4 { font-family: var(--display); font-size: 44px; line-height: 1; }
.rest-bar { height: 6px; border-radius: 3px; background: var(--line); margin: 14px 0 16px; overflow: hidden; }
.rest-bar i { display: block; height: 100%; background: var(--work); border-radius: 3px; transform-origin: left; animation: restbar 4s linear infinite; }
@keyframes restbar { from { transform: scaleX(1); } to { transform: scaleX(.15); } }
.rest-pills { display: flex; justify-content: center; gap: 8px; }
.rest-pills span { height: 34px; padding: 0 14px; border-radius: 17px; border: 1.5px solid rgba(18,18,18,.25); display: grid; place-items: center; font-size: 14px; font-weight: 500; }
.rest-skip { margin-top: 12px; height: 44px; border-radius: 22px; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 15px; font-weight: 500; animation: press 4s ease infinite; }
.rest-skip svg { width: 14px; height: 14px; }
@keyframes press { 0%, 80%, 100% { transform: none; } 86% { transform: scale(.95); } }

/* sound visual */
.sound { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.sound__nums { display: flex; gap: 10px; }
.sound__nums b { width: 40px; height: 52px; border-radius: 12px; background: #fff; display: grid; place-items: center; font-family: var(--display); font-size: 30px; color: var(--tertiary); transition: background .15s, color .15s, transform .15s; }
.sound__nums b.on { background: var(--ink); color: #fff; transform: translateY(-4px); }
.sound__nums b.go { background: var(--work); color: #fff; width: 56px; }
.sound__wave { display: flex; align-items: center; gap: 3px; height: 28px; }
.sound__wave i { width: 3px; border-radius: 2px; background: var(--work); animation: wave 1s ease-in-out infinite; }
@keyframes wave { 0%, 100% { height: 6px; } 50% { height: 26px; } }

/* private visual */
.lock { width: 84px; height: 84px; border-radius: 26px; background: var(--ink); display: grid; place-items: center; box-shadow: 0 18px 40px -16px rgba(0,0,0,.4); }
.lock svg { width: 36px; height: 36px; }
.lock-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 18px; max-width: 260px; }
.lock-chips span { height: 30px; padding: 0 12px; border-radius: 15px; background: #fff; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; }
.lock-chips span::before { content: '✓'; color: var(--done); font-weight: 700; }

@media (max-width: 960px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .card--wide { grid-column: span 2; }
}
@media (max-width: 600px) {
  .bento { grid-template-columns: 1fr; }
  .card--wide { grid-column: auto; }
  .card { min-height: 0; padding: 24px; }
  .splash__intro h2 { font-size: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  .flow__head, .rest-bar i, .rest-skip, .sound__wave i { animation: none; }
}
