/* Focus timer. Visual rules: STYLES.md, "Focus timer page". */
.tm{
  --tm-ink:#0f1114; --tm-ink-2:#53606f; --tm-ink-3:#5f6b7a;
  --tm-line:#e6e9ee; --tm-line-soft:#eef1f5; --tm-panel:#fbfcfe;
  --tm-blue:#2a68cc; --tm-blue-2:#3c86f6; --tm-blue-3:#9ac7ff; --tm-tint:#f1f6ff; --tm-tint-line:#cfe0fb;
  --tm-sky:#4f9ccb;
  --tm-display:"AsideDisplay","AsideDisplay Fallback",Arial,sans-serif;
  --tm-body:"AsideGeist","AsideGeist Fallback","Geist",system-ui,sans-serif;
  --tm-num:"Geist","AsideGeist","AsideGeist Fallback",system-ui,sans-serif;
  --tm-ease:cubic-bezier(.32,.72,0,1);
  color:var(--tm-ink); font-family:var(--tm-body); font-size:16px; line-height:1.4;
  -webkit-font-smoothing:antialiased;
}
.tm *,.tm *::before,.tm *::after{ box-sizing:border-box; }
:where(.tm) button,:where(.tm) input{ font:inherit; color:inherit; }
.tm button{ cursor:pointer; -webkit-tap-highlight-color:transparent; }
.tm [hidden]{ display:none !important; }
.tm :focus-visible{ outline:2px solid var(--tm-blue-2); outline-offset:2px; }
.tm-sr{ position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }

/* ---------- Stage: the cloud sky with a real-feeling Nudge window ---------- */
.tm-stage{
  position:relative; overflow:hidden; isolation:isolate; background:var(--tm-sky);
  border-radius:26px; box-shadow:0 24px 64px rgba(22,62,104,.16);
  padding:clamp(28px,5vw,64px) 16px clamp(32px,5.4vw,72px);
  display:flex; justify-content:center;
}
.tm-sky{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; z-index:-1; }
.tm-window{
  position:relative; width:min(100%,520px); border-radius:26px;
  background:linear-gradient(#f6f6f7,#efeff1); border:1px solid rgba(255,255,255,.7);
  box-shadow:0 30px 80px rgba(16,44,86,.34),0 2px 0 rgba(255,255,255,.6) inset;
}
.tm-chrome{ display:flex; gap:8px; height:38px; padding:14px 0 0 18px; }
.tm-chrome i{ width:12px; height:12px; border-radius:50%; background:#ececee; border:1px solid #dcdce0; }
.tm-pane{
  position:relative; margin:0 6px 6px; padding:22px 24px 16px; overflow:hidden;
  background:#fff; border-radius:21px; box-shadow:0 1px 0 rgba(15,17,20,.04),0 0 0 1px rgba(15,17,20,.04);
  display:flex; flex-direction:column; align-items:center;
}

/* ---------- Segmented control (21st.dev "Segmented Tabs", micka_design) ---------- */
.tm-seg{
  --x:0px; --w:0px; --hx:0px; --hw:0px;
  position:relative; display:inline-flex; gap:2px; padding:3px; border-radius:999px;
  background:#f0f2f5; max-width:100%; user-select:none; -webkit-user-select:none;
}
.tm-seg__pill,.tm-seg__hover{ position:absolute; top:3px; bottom:3px; left:0; border-radius:999px; pointer-events:none; }
.tm-seg__pill{
  width:var(--w); transform:translateX(var(--x)); background:#fff;
  box-shadow:0 1px 2px rgba(15,17,20,.12),0 0 0 1px rgba(15,17,20,.05); opacity:0;
}
.tm-seg.is-ready .tm-seg__pill{ opacity:1; transition:transform .38s var(--tm-ease),width .38s var(--tm-ease),opacity .2s; }
.tm-seg__hover{ width:var(--hw); transform:translateX(var(--hx)); background:rgba(15,17,20,.05); opacity:0; transition:transform .22s var(--tm-ease),width .22s var(--tm-ease),opacity .12s; }
.tm-seg.is-hover .tm-seg__hover{ opacity:1; }
.tm-seg__item{
  position:relative; z-index:1; border:0; background:transparent; border-radius:999px;
  padding:0 16px; height:34px; font-size:.92rem; font-weight:520; color:var(--tm-ink-2); white-space:nowrap;
  transition:color .15s;
}
.tm-seg__item[aria-checked="true"]{ color:var(--tm-ink); font-weight:600; }
.tm-seg--small .tm-seg__item{ height:30px; padding:0 13px; font-size:.86rem; }
.tm-seg--wrap{ flex-wrap:wrap; border-radius:18px; }
.tm-seg--wrap .tm-seg__pill,.tm-seg--wrap .tm-seg__hover{ display:none; }
.tm-seg--wrap .tm-seg__item[aria-checked="true"]{ background:#fff; box-shadow:0 1px 2px rgba(15,17,20,.12),0 0 0 1px rgba(15,17,20,.05); }

/* ---------- Dial ---------- */
.tm-dial{ position:relative; width:min(100%,292px); aspect-ratio:1; margin:22px 0 10px; }
.tm-ring{ position:absolute; inset:0; width:100%; height:100%; }
.tm-ring__track{ fill:none; stroke:#eef2f8; stroke-width:9; }
.tm-ring__bar{ fill:none; stroke:url(#tm-ring-grad); stroke-width:9; stroke-linecap:round; transition:stroke-dashoffset .5s linear,stroke .4s; }
.tm-window[data-kind="break"] .tm-ring__bar{ stroke:#3fb0ec; }
.tm-readout{ position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; }
.tm-phase{ font-size:.92rem; font-weight:560; color:var(--tm-blue); letter-spacing:0; }
.tm-window[data-kind="break"] .tm-phase{ color:#1b86bd; }
.tm-time{
  font-family:var(--tm-num); font-weight:500; font-size:clamp(3.4rem,15vw,4.75rem); line-height:1; letter-spacing:-.045em;
  font-variant-numeric:tabular-nums; font-feature-settings:"tnum" 1,"zero" 0; color:var(--tm-ink);
}
.tm-cycle{ display:flex; gap:7px; height:8px; margin-top:8px; }
.tm-cycle i{ width:8px; height:8px; border-radius:50%; background:#e3e9f2; transition:background .3s; }
.tm-cycle i.is-done{ background:var(--tm-blue); }
.tm-cycle i.is-now{ background:var(--tm-blue-3); animation:tm-breathe 2.6s ease-in-out infinite; }
@keyframes tm-breathe{ 50%{ opacity:.35; } }

/* ---------- Label ---------- */
.tm-label{ display:block; width:100%; }
.tm-label input{
  width:100%; height:46px; padding:0 16px; text-align:center; border:1px solid var(--tm-line); border-radius:14px; background:#fbfcfe; outline:none; font-size:1rem; font-weight:480;
  transition:border-color .15s,box-shadow .15s,background .15s;
}
.tm-label input::placeholder{ color:#6f7a88; }
.tm-label input:focus{ border-color:var(--tm-blue-2); background:#fff; box-shadow:0 0 0 4px rgba(60,134,246,.14); }
.tm-recent{ display:flex; flex-wrap:wrap; justify-content:center; gap:6px; margin-top:8px; width:100%; }
.tm-recent button{ border:1px solid var(--tm-line); background:#fff; border-radius:999px; height:28px; padding:0 12px; font-size:.82rem; color:var(--tm-ink-2); max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tm-recent button:hover{ border-color:var(--tm-tint-line); background:var(--tm-tint); color:var(--tm-blue); }

/* ---------- Controls: Start / Pause pill (21st.dev "Countdown Timer", anubra266: start, pause, reset) ---------- */
.tm-controls{ display:flex; align-items:center; justify-content:center; gap:16px; margin:20px 0 6px; }
.tm-play{
  display:inline-flex; align-items:center; justify-content:center; gap:10px; min-width:164px; height:56px; padding:0 28px;
  border:0; border-radius:999px; background:var(--tm-ink); color:#fff; font-size:1.05rem; font-weight:560;
  box-shadow:0 10px 24px rgba(15,17,20,.22),0 1px 0 rgba(255,255,255,.18) inset;
  transition:transform .18s var(--tm-ease),box-shadow .2s,background .2s;
}
.tm-play:hover{ transform:translateY(-1px); box-shadow:0 14px 30px rgba(15,17,20,.26),0 1px 0 rgba(255,255,255,.18) inset; background:#1b1e23; }
.tm-play:active{ transform:scale(.97); }
.tm-play__icon--pause{ display:none; }
.tm-play[data-state="running"] .tm-play__icon--play{ display:none; }
.tm-play[data-state="running"] .tm-play__icon--pause{ display:block; }
.tm-icon,.tm-tool{
  display:inline-grid; place-items:center; border:1px solid var(--tm-line); background:#fff; color:var(--tm-ink-2);
  transition:background .15s,color .15s,border-color .15s,transform .15s var(--tm-ease);
}
.tm-icon{ width:46px; height:46px; border-radius:50%; }
.tm-icon:hover,.tm-tool:hover{ background:var(--tm-tint); color:var(--tm-blue); border-color:var(--tm-tint-line); }
.tm-icon:active,.tm-tool:active{ transform:scale(.94); }

.tm-foot{ display:flex; align-items:center; justify-content:space-between; gap:12px; width:100%; margin-top:16px; padding-top:14px; border-top:1px solid var(--tm-line-soft); }
.tm-save-warn{ flex:1 1 100%; order:3; font-size:.82rem; color:#b4372d; }
.tm-undo{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0 0 12px; padding:8px 8px 8px 14px; border-radius:12px; background:var(--tm-tint); border:1px solid var(--tm-tint-line); font-size:.88rem; color:var(--tm-ink-2); }
.tm-undo button{ border:0; background:transparent; color:var(--tm-blue); font-weight:600; padding:6px 10px; border-radius:8px; }
.tm-undo button:hover{ background:#fff; }
.tm-today{ white-space:nowrap; min-width:0; overflow:hidden; text-overflow:ellipsis; font-size:.9rem; color:var(--tm-ink-3); font-variant-numeric:tabular-nums; }
.tm-tools{ display:flex; gap:6px; }
.tm-tool{ width:38px; height:38px; border-radius:12px; border-color:transparent; background:transparent; }

.tm-cta{ display:flex; align-items:center; gap:12px; width:100%; margin-top:14px; padding:12px 12px 12px 16px; border:1px solid var(--tm-tint-line); border-radius:16px; background:var(--tm-tint); position:relative; }
.tm-cta strong{ display:block; font-size:.92rem; font-weight:600; line-height:1.3; }
.tm-cta span{ display:block; margin-top:2px; font-size:.82rem; color:var(--tm-ink-2); }
.tm-cta__btn{ flex:none; margin-left:auto; height:36px; padding:0 16px; display:inline-flex; align-items:center; border-radius:999px; background:var(--tm-ink); color:#fff; text-decoration:none; font-size:.88rem; font-weight:560; }
.tm-cta__x{ flex:none; width:28px; height:28px; border:0; border-radius:50%; background:transparent; color:var(--tm-ink-3); display:grid; place-items:center; }
.tm-cta__x:hover{ background:rgba(15,17,20,.06); }

/* ---------- Sheet ---------- */
.tm-sheet{ position:absolute; inset:0; z-index:5; display:flex; align-items:flex-end; }
.tm-sheet__scrim{ position:absolute; inset:0; background:rgba(255,255,255,.62); backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px); animation:tm-fade .25s ease both; }
.tm-sheet__card{
  position:relative; width:100%; max-height:92%; overflow:auto; outline:none; background:#fff;
  border:1px solid var(--tm-line); border-radius:20px; box-shadow:0 -10px 40px rgba(22,45,64,.14); padding:18px 20px 22px;
  animation:tm-rise .42s var(--tm-ease) both;
}
@keyframes tm-rise{ from{ transform:translateY(24px); opacity:0; } }
@keyframes tm-fade{ from{ opacity:0; } }
.tm-sheet__head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; }
.tm-sheet__head h2{ margin:0; font-family:var(--tm-display); font-size:1.5rem; font-weight:440; letter-spacing:0; }
.tm-sheet__close{ width:32px; height:32px; border-radius:50%; border:1px solid var(--tm-line); background:#fff; display:grid; place-items:center; color:var(--tm-ink-2); }
.tm-sheet__close:hover{ background:#f3f5f8; }
.tm-sheet__body{ display:flex; flex-direction:column; gap:16px; }
.tm-field__name{ font-size:.82rem; font-weight:600; color:var(--tm-ink-2); margin-bottom:8px; }
.tm-field__hint{ margin:8px 0 0; font-size:.84rem; color:var(--tm-ink-3); }
.tm-custom{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.tm-custom label{ display:flex; flex-direction:column; gap:6px; font-size:.82rem; font-weight:560; color:var(--tm-ink-2); }
.tm-custom label span{ display:flex; align-items:center; gap:8px; border:1px solid var(--tm-line); border-radius:12px; padding:0 12px; background:#fbfcfe; }
.tm-custom input{ width:100%; height:40px; border:0; background:transparent; outline:none; font-size:1rem; font-variant-numeric:tabular-nums; }
.tm-custom label span:focus-within{ border-color:var(--tm-blue-2); box-shadow:0 0 0 3px rgba(60,134,246,.14); }
.tm-custom em{ font-style:normal; color:var(--tm-ink-3); font-size:.8rem; }
.tm-row{ display:flex; align-items:center; justify-content:space-between; gap:16px; padding-top:14px; border-top:1px solid var(--tm-line-soft); }
.tm-row strong{ display:block; font-size:.96rem; font-weight:560; }
.tm-row small{ display:block; margin-top:2px; font-size:.82rem; color:var(--tm-ink-3); }
.tm-switch{ flex:none; position:relative; width:46px; height:28px; border:0; border-radius:999px; background:#dde2ea; transition:background .2s; }
.tm-switch i{ position:absolute; top:3px; left:3px; width:22px; height:22px; border-radius:50%; background:#fff; box-shadow:0 1px 3px rgba(15,17,20,.25); transition:transform .25s var(--tm-ease); }
.tm-switch[aria-checked="true"]{ background:var(--tm-blue); }
.tm-switch[aria-checked="true"] i{ transform:translateX(18px); }
.tm-chips{ display:flex; flex-wrap:wrap; gap:8px; }
.tm-chip{ height:36px; padding:0 15px; border-radius:999px; border:1px solid var(--tm-line); background:#fff; font-size:.9rem; font-weight:520; color:var(--tm-ink-2); transition:all .15s; }
.tm-chip:hover{ border-color:var(--tm-tint-line); background:var(--tm-tint); }
.tm-chip[aria-pressed="true"]{ background:var(--tm-tint); border-color:var(--tm-blue); color:var(--tm-blue); }
.tm-vol{ display:flex; align-items:center; gap:14px; margin-top:14px; font-size:.86rem; color:var(--tm-ink-2); }
.tm-vol input{ flex:1; accent-color:var(--tm-blue); }
.tm-keys{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; }
.tm-keys li{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding:11px 0; border-top:1px solid var(--tm-line-soft); font-size:.95rem; }
.tm-keys li:first-child{ border-top:0; }
.tm-kbd{ display:inline-flex; gap:5px; }
kbd{ min-width:28px; height:28px; padding:0 8px; display:inline-grid; place-items:center; border:1px solid var(--tm-line); border-bottom-width:2px; border-radius:8px; background:#fbfcfe; font-family:var(--tm-num); font-size:.82rem; font-weight:560; color:var(--tm-ink); }

/* ---------- Zen mode ---------- */
.tm-zen-exit{ display:none; }
html.tm-zen-lock{ overflow:hidden; }
/* The site rail is its own stacking context; without real fullscreen the navbar would paint over the overlay. */
html.tm-zen-lock .site-rail{ z-index:auto; }
.tm.is-zen .tm-stage{ position:fixed; inset:0; z-index:2147483000; border-radius:0; box-shadow:none; padding:0; align-items:center; }
.tm.is-zen .tm-window{ width:auto; background:none; border:0; box-shadow:none; }
.tm.is-zen .tm-chrome,.tm.is-zen .tm-seg,.tm.is-zen .tm-ring,.tm.is-zen .tm-label,.tm.is-zen .tm-recent,.tm.is-zen .tm-icon,.tm.is-zen .tm-foot,.tm.is-zen .tm-cta,.tm.is-zen .tm-cycle,.tm.is-zen .tm-sheet{ display:none !important; }
.tm.is-zen .tm-pane{ margin:0; padding:0; background:none; box-shadow:none; overflow:visible; }
.tm.is-zen .tm-dial{ width:auto; aspect-ratio:auto; margin:0 0 28px; }
.tm.is-zen .tm-readout{ position:static; }
.tm.is-zen .tm-time{ color:#fff; font-size:clamp(5rem,22vw,13rem); text-shadow:0 2px 40px rgba(14,48,86,.28); }
.tm.is-zen .tm-phase{ color:rgba(255,255,255,.92); font-size:1rem; }
.tm.is-zen .tm-controls{ margin:0; }
.tm.is-zen .tm-play{ background:rgba(255,255,255,.94); color:var(--tm-ink); box-shadow:0 14px 40px rgba(14,48,86,.28); }
.tm.is-zen .tm-zen-exit{ display:grid; place-items:center; position:fixed; top:20px; right:20px; width:44px; height:44px; border-radius:50%; border:1px solid rgba(255,255,255,.5); background:rgba(255,255,255,.2); color:#fff; backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px); }

/* ---------- Analytics ---------- */
.tm-stats{ margin-top:clamp(32px,4vw,52px); }
.tm-stats__head{ display:flex; flex-wrap:wrap; align-items:flex-end; justify-content:space-between; gap:16px; margin-bottom:20px; }
.tm-stats__head h2{ margin:0; font-family:var(--tm-display); font-size:clamp(1.9rem,3.2vw,2.5rem); font-weight:420; line-height:1; letter-spacing:0; }
.tm-stats__head p{ margin:8px 0 0; font-size:.94rem; color:var(--tm-ink-2); }
.tm-stats__tools{ display:flex; flex-wrap:wrap; align-items:center; gap:12px; }
.tm-cards{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.tm-card,.tm-panel{ border:1px solid var(--tm-line-soft); border-radius:20px; background:var(--tm-panel); }
.tm-card{ display:flex; align-items:center; gap:14px; padding:18px 20px; }
.tm-card__icon{ flex:none; width:46px; height:46px; border-radius:14px; display:grid; place-items:center; background:#e9f0fe; color:var(--tm-blue); }
.tm-card__name{ font-size:.86rem; font-weight:560; color:var(--tm-ink-2); }
.tm-card__value{ font-family:var(--tm-num); font-size:1.9rem; font-weight:560; letter-spacing:-.03em; line-height:1.15; font-variant-numeric:tabular-nums; }
.tm-card__sub{ font-size:.82rem; color:var(--tm-ink-3); }
.tm-panel{ margin-top:14px; padding:20px; }
.tm-goals{ padding:6px 20px; }
.tm-goal{ display:grid; grid-template-columns:minmax(120px,170px) minmax(0,1fr) auto; align-items:center; gap:18px; padding:16px 0; }
.tm-goal + .tm-goal{ border-top:1px solid var(--tm-line-soft); }
.tm-goal__text strong{ display:block; font-size:1rem; font-weight:600; }
.tm-goal__text span{ font-size:.86rem; color:var(--tm-ink-2); font-variant-numeric:tabular-nums; }
.tm-meter{ height:8px; border-radius:999px; background:#eceff4; overflow:hidden; }
.tm-meter i{ display:block; height:100%; width:0; border-radius:inherit; background:linear-gradient(90deg,#d6e6fd,var(--tm-blue-2) 55%,var(--tm-blue)); transition:width .7s var(--tm-ease); }
.tm-meter--thin{ height:6px; margin-top:8px; }
.tm-step{ display:inline-flex; align-items:center; gap:2px; padding:3px; border:1px solid var(--tm-line); border-radius:12px; background:#fff; }
.tm-step button{ width:30px; height:30px; border:0; border-radius:9px; background:transparent; color:var(--tm-ink-2); font-size:1.1rem; line-height:1; }
.tm-step button:hover{ background:var(--tm-tint); color:var(--tm-blue); }
.tm-step b{ min-width:48px; text-align:center; font-weight:600; font-size:.95rem; font-variant-numeric:tabular-nums; }
.tm-chart{ position:relative; padding:24px 20px 14px; }
.tm-chart__bars{ display:grid; grid-template-columns:repeat(var(--n,24),minmax(0,1fr)); align-items:end; gap:4px; height:130px; }
.tm-chart__bars[data-range="week"]{ gap:clamp(8px,2vw,22px); }
.tm-chart__bars[data-range="month"]{ gap:3px; }
.tm-bar{ display:block; height:var(--h); border-radius:7px; background:var(--tm-blue-3); transform-origin:bottom; animation:tm-grow .7s var(--tm-ease) both; transition:background .2s; }
.tm-bar.is-zero{ height:5px; background:#cfe0fb; border-radius:3px; animation:none; }
.tm-bar.is-cur{ background:var(--tm-blue-2); }
.tm-bar.is-zero.is-cur{ background:var(--tm-blue-2); }
.tm-bar:hover{ background:var(--tm-blue); }
@keyframes tm-grow{ from{ transform:scaleY(.2); opacity:0; } }
.tm-chart__axis{ display:grid; grid-template-columns:repeat(var(--n,24),minmax(0,1fr)); gap:4px; margin-top:12px; font-size:.78rem; color:var(--tm-ink-3); font-variant-numeric:tabular-nums; }
.tm-chart__axis span{ white-space:nowrap; text-align:left; }
.tm-chart__bars[data-range="week"] + .tm-chart__axis span{ text-align:center; }
.tm-chart__empty{ margin:12px 0 0; font-size:.88rem; color:var(--tm-ink-2); }
.tm-twocol{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.tm-panel__head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; }
.tm-panel__head h3{ margin:0; font-size:1.15rem; font-weight:560; }
.tm-tag{ padding:3px 10px; border-radius:999px; background:#eceff4; color:var(--tm-ink-2); font-size:.78rem; font-weight:560; }
.tm-break,.tm-recents{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:14px; }
.tm-muted{ color:var(--tm-ink-2); font-size:.92rem; }
.tm-break__top{ display:flex; align-items:baseline; gap:10px; }
.tm-break__top span{ flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:560; }
.tm-break__top em{ font-style:normal; font-size:.82rem; color:var(--tm-ink-3); }
.tm-break__top b{ min-width:54px; text-align:right; font-weight:600; font-variant-numeric:tabular-nums; }
.tm-recents li:not(.tm-muted){ display:grid; grid-template-columns:auto minmax(0,1fr) auto auto; align-items:center; gap:12px; }
.tm-dot{ width:10px; height:10px; border-radius:50%; background:var(--tm-blue-2); }
.tm-dot--break{ background:#7dd3f5; }
.tm-recents strong{ display:block; font-weight:560; font-size:.95rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tm-recents li span{ font-size:.8rem; color:var(--tm-ink-3); }
.tm-recents b{ font-weight:600; font-size:.92rem; font-variant-numeric:tabular-nums; }
.tm-recents button{ width:26px; height:26px; border:0; border-radius:50%; background:transparent; color:var(--tm-ink-2); font-size:1.15rem; line-height:1; }
.tm-recents li:hover button,.tm-recents button:focus-visible{ opacity:1; background:#eceff4; color:var(--tm-ink); }
.tm-data{ display:flex; gap:10px; margin-top:16px; }
.tm-data button{ height:36px; padding:0 15px; border:1px solid var(--tm-line); border-radius:999px; background:#fff; font-size:.86rem; color:var(--tm-ink-2); }
.tm-data button:hover{ background:var(--tm-tint); border-color:var(--tm-tint-line); color:var(--tm-blue); }

@media (max-width:860px){
  .tm-stage{ border-radius:18px; box-shadow:0 14px 36px rgba(22,62,104,.14); padding-left:12px; padding-right:12px; }
  .tm-twocol{ grid-template-columns:1fr; }
}
@media (max-width:620px){
  .tm-cards{ grid-template-columns:1fr; gap:10px; }
  .tm-card{ padding:14px 16px; }
  .tm-goal{ grid-template-columns:minmax(0,1fr) auto; gap:10px 12px; }
  .tm-goal .tm-meter{ grid-column:1 / -1; order:3; }
  .tm-pane{ padding:18px 16px 12px; }
  .tm-seg__item{ padding:0 11px; font-size:.86rem; }
  .tm-play{ min-width:140px; }
  .tm-foot{ flex-wrap:wrap; row-gap:6px; }
  .tm-today{ flex:1 1 100%; white-space:normal; font-size:.82rem; }
  .tm-tools{ gap:2px; margin-left:auto; }
  .tm-seg[data-tm-seg="mode"]{ display:flex; width:100%; }
  .tm-seg[data-tm-seg="mode"] .tm-seg__item{ flex:1 1 auto; min-width:0; padding:0 6px; }
  .tm-dial{ width:min(100%,264px); margin-top:16px; }
  .tm-cta{ flex-wrap:wrap; }
  .tm-stats__head{ align-items:flex-start; }
  .tm-seg--small{ width:100%; }
  .tm-seg--small .tm-seg__item{ flex:1; padding:0 6px; }
}
@media (max-width:380px){
  .tm-seg[data-tm-seg="mode"] .tm-seg__item{ font-size:.8rem; }
}
/* Touch targets: visual sizes stay, the tappable area grows to 44px. The tool buttons really grow
   (four fit at 320px) so neighbouring hit areas never overlap. */
@media (pointer:coarse),(max-width:620px){
  .tm-tool{ width:44px; height:44px; }
  .tm-tools{ gap:0; }
  .tm-sheet__close,.tm-cta__x,.tm-step button,.tm-recents button,.tm-chip,.tm-data button,.tm-switch,.tm-seg--small .tm-seg__item{ position:relative; }
  .tm-sheet__close::after,.tm-cta__x::after,.tm-step button::after,.tm-recents button::after,.tm-chip::after,.tm-data button::after,.tm-switch::after,.tm-seg--small .tm-seg__item::after{ content:""; position:absolute; left:50%; top:50%; width:max(100%,44px); height:max(100%,44px); transform:translate(-50%,-50%); }
  .tm-recent button{ height:44px; padding:0 14px; }
  .tm-cta__btn{ height:44px; }
  .tm-undo button{ min-height:44px; }
}
@media (prefers-reduced-motion:reduce){
  .tm *,.tm *::before,.tm *::after{ animation-duration:.001ms !important; animation-iteration-count:1 !important; transition-duration:.001ms !important; }
}
.tm.is-zen .tm-stage::after{ content:""; position:absolute; inset:0; z-index:-1; background:rgba(14,52,92,.3); }
