/* ============================================================================
   Walkthrough phone — canvas, status bar, tab bar, and the Focus / running / Shield
   screens. Every position is the app capture's pixel × 4/9 (720 × 1564 → 320 × 695);
   colours are sampled from the captures (Ember theme: bg #191512, cards #241E19).
   ========================================================================== */

.fmd-app {
  position: absolute; left: 0; top: 0; width: 320px; height: 695px; overflow: hidden;
  transform-origin: 0 0; transform: scale(var(--k)); background: #191512; color: #F6EEE8;
  font-family: 'Be Vietnam Pro', system-ui, -apple-system, sans-serif; line-height: 1.2; text-align: left;
  -webkit-user-select: none; user-select: none;
}
:where(.fmd-app) :where(b, small) { font-size: inherit; }
.fmd-app svg { display: block; width: 100%; height: 100%; }
.fmd-app .fmd-emoji { font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif; line-height: 1; }
/* One-line labels the engine may shrink ([data-fit]); ellipsis only past the floor. */
.fmd-app [data-fit] { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.fmd-app .is-pressed { transform: scale(.96); }

/* Screens are stacked; the engine marks the current ones .is-shown. */
.fmd-scr { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .35s ease, visibility 0s linear .35s; }
.fmd-scr.is-shown { opacity: 1; visibility: visible; transition: opacity .35s ease, visibility 0s; }

/* ---------- status bar (above every screen) */
.fmd-app__status {
  position: absolute; z-index: 30; left: 0; right: 0; top: 16px; height: 13px; padding: 0 29px 0 46px;
  display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; font-weight: 700; color: #fff;
}
.fmd-app__icons { display: flex; align-items: center; gap: 5px; }
.fmd-app__icons svg { width: auto; height: 10.5px; fill: #fff; }
.fmd-app__battery { position: relative; width: 22px; height: 11px; border-radius: 3.5px; border: 1.3px solid rgba(255, 255, 255, .5); }
.fmd-app__battery i { position: absolute; inset: 1.4px; right: 2.5px; border-radius: 1.8px; background: #4ADE80; }

/* ---------- tab bar (Focus / Tasks / Analytics / Settings) */
.fmd-app__tabs {
  position: absolute; z-index: 20; left: 15px; top: 635px; width: 289px; height: 45px; padding: 2px 3px;
  display: flex; border-radius: 23px; background: #1A1816; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.fmd-app__tab {
  flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  border-radius: 20px; color: #F1EFEE; transition: background .3s ease, color .3s ease;
}
.fmd-app__tab-ic { display: block; width: 17px; height: 17px; }
.fmd-app__tab-label { max-width: 100%; font-size: 7.5px; font-weight: 600; }
.fmd-app__tab.is-current { background: #3D3936; color: #FF8465; }

/* ---------- Focus (before a session) */
.fmd-focus__shield {
  position: absolute; left: 14px; top: 56px; height: 32px; max-width: 208px; padding: 0 12px 0 11px;
  display: inline-flex; align-items: center; gap: 7px; border-radius: 16px; background: #241E19;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); color: #FF6A4D; font-size: 11.5px; font-weight: 700;
}
.fmd-focus__shield-dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: #FF6A4D; }
.fmd-focus__round {
  position: absolute; top: 56px; width: 32px; height: 32px; padding: 8.5px; border-radius: 50%;
  background: #241E19; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}
.fmd-focus__round--menu { left: 232px; color: #A99A8E; }
.fmd-focus__round--plus { left: 273px; color: #FF6A4D; }
.fmd-focus__mode {
  position: absolute; left: 50%; top: 204px; height: 32px; transform: translateX(-50%); padding: 0 12px;
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; border-radius: 16px; background: #241E19;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); font-size: 13px; font-weight: 700;
}
.fmd-focus__mode .fmd-emoji { font-size: 13px; }
.fmd-focus__chev { width: 11px; height: 11px; color: #8E847D; }
.fmd-focus__clock {
  position: absolute; left: 0; right: 0; top: 254px; text-align: center; font-size: 64px; line-height: 1;
  font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums;
}
.fmd-focus__ready { position: absolute; left: 40px; right: 40px; top: 341px; text-align: center; font-size: 10.5px; font-weight: 700; letter-spacing: .14em; color: #8E847D; }
.fmd-focus__dots { position: absolute; left: 16px; right: 16px; top: 369px; height: 11px; display: flex; justify-content: center; align-items: center; gap: 4.5px; }
.fmd-focus__dots i { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #FF6A4D; }
.fmd-focus__dots i.is-empty { background: none; box-shadow: inset 0 0 0 1.5px #5C524B; }
.fmd-focus__dots i.is-lit { animation: fmdDotLit .6s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes fmdDotLit { from { transform: scale(.3); } }
.fmd-focus__today { margin-left: 6px; font-size: 9.5px; font-weight: 600; color: #8E847D; }
.fmd-focus__task {
  position: absolute; left: 17px; top: 495px; width: 286px; height: 57px; padding: 0 11px 0 12px;
  display: flex; align-items: center; gap: 12px; border-radius: 14px; background: #241E19;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05);
}
.fmd-focus__task-ic { flex: none; width: 33px; height: 33px; display: grid; place-items: center; border-radius: 9px; background: #3A2520; font-size: 17px; }
.fmd-focus__task-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.fmd-focus__task-text b { font-size: 13px; font-weight: 700; }
.fmd-focus__task-text small { font-size: 10px; font-weight: 500; color: #9A8F88; }
.fmd-focus__swap { flex: none; width: 27px; height: 27px; padding: 6.5px; border-radius: 50%; background: #1B150E; color: #BDB4AD; }
.fmd-focus__start {
  position: absolute; left: 17px; top: 566px; width: 286px; height: 45px; padding: 0 20px;
  display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: 16px;
  background: #FF6A4D; box-shadow: 0 10px 24px -10px rgba(255, 106, 77, .85); color: #fff; font-size: 14.5px; font-weight: 700;
  transition: transform .15s ease, filter .15s ease;
}
.fmd-focus__start.is-pressed { filter: brightness(.9); }
.fmd-focus__start-ic { flex: none; width: 13px; height: 13px; }

/* ---------- running session (pure black, FOCUS badge, the face) */
.fmd-run { background: #000; }
.fmd-run__more { position: absolute; left: 273px; top: 57px; width: 32px; height: 32px; padding: 9px; border-radius: 50%; background: #1C1A18; color: #BDB4AD; }
.fmd-run__badge {
  position: absolute; left: 50%; top: 289px; height: 28px; max-width: 200px; transform: translateX(-50%); padding: 0 12px;
  display: inline-flex; align-items: center; gap: 6px; border-radius: 14px; background: rgba(63, 182, 168, .16);
  color: #3FB6A8; font-size: 10.5px; font-weight: 800; letter-spacing: .14em;
}
.fmd-run__badge-ic { flex: none; width: 13px; height: 13px; }
.fmd-run__faces { position: absolute; left: 10px; top: 283px; width: 300px; height: 196px; }
.fmd-run__face {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  container-type: size; opacity: 0; transition: opacity .45s ease;
}
.fmd-run[data-run-face="minimal"] .fmd-run__face--minimal,
.fmd-run[data-run-face="flip"] .fmd-run__face--flip { opacity: 1; }
.fmd-run__hint { position: absolute; left: 30px; right: 30px; top: 623px; text-align: center; font-size: 10px; font-weight: 500; color: #5E5650; }
/* A split-flap card turning over when its digit changes. */
.fmd-app .flip-card.is-flipping .flip-card__digit { animation: fmdFlip .42s cubic-bezier(.3, .7, .3, 1); }
@keyframes fmdFlip { 0% { transform: perspective(160px) rotateX(-80deg); filter: brightness(.5); } 100% { transform: none; } }

/* ---------- the Shield (slides up over the running screen like the blocked app opening) */
.fmd-scr.fmd-shield {
  z-index: 6; opacity: 1; transform: translateY(102%);
  transition: transform .5s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .5s;
  background:
    radial-gradient(120% 55% at 18% 2%, rgba(94, 52, 66, .75), transparent 62%),
    linear-gradient(176deg, #432E37 0%, #3A2E3C 36%, #312E3E 58%, #37302F 80%, #33302B 100%);
}
.fmd-scr.fmd-shield.is-shown { transform: none; transition: transform .5s cubic-bezier(.2, .8, .2, 1), visibility 0s; }
.fmd-shield__icon { position: absolute; left: 120px; top: 154px; width: 80px; height: 80px; border-radius: 18px; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .6); }
.fmd-shield__title { position: absolute; left: 16px; right: 16px; top: 255px; text-align: center; font-size: 15.5px; font-weight: 700; color: #fff; }
.fmd-shield__sub { position: absolute; left: 26px; right: 26px; top: 280px; text-align: center; font-size: 10.5px; line-height: 1.4; font-weight: 500; color: rgba(255, 255, 255, .72); }
.fmd-shield__close {
  position: absolute; left: 18px; top: 616px; width: 284px; height: 38px; padding: 0 16px;
  display: flex; align-items: center; justify-content: center; border-radius: 12px; background: #FF6B4D;
  color: #fff; font-size: 12.5px; font-weight: 600; transition: transform .15s ease;
}
@media (prefers-reduced-motion: reduce) {
  .fmd-scr, .fmd-scr.fmd-shield, .fmd-run__face, .fmd-app__tab { transition: none; }
}
