/* Debate Timer & Flow. Follows the Web mockup: the Roundly app's dark indigo palette, with a light
   variant (the app's light colors) when the device asks for it. Self-contained: no site CSS, no web fonts
   (nothing is fetched from outside, so Inter is used only where it's installed). */
:root {
  --bg: #0A0D21; --card: #171A38; --col: #12152F; --line: #2C3160;
  --text: #EEF0FF; --muted: #A3A8CC;
  --aff: #40BFFF; --neg: #FF8061; --accent: #9E8CFF; --na: #FACC33; --green: #5CE6BD; --over: #FF7A5C; --sel: #2A2552; --tint-warn: #1A1708; --tint-over: #1F0F0C;
  --aff-bg: #13263F; --aff-line: #1F4C70; --neg-bg: #3A1F1C; --neg-line: #6E3A30;
  --na-bg: #3A3216; --on-accent: #0A0D21; --green-bg: #10302A; --funnel-line: #4C4590; --link: #C3B8FF;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #F0F0FC; --card: #FFFFFF; --col: #E6E7F7; --line: #D2D4EC;
    --text: #14163A; --muted: #5B5F8C;
    --aff: #008CE6; --neg: #F25C3D; --accent: #6B54F2; --na: #B88A00; --green: #148A6A; --over: #E0452A; --sel: #E4DFFD; --tint-warn: #FFF3CC; --tint-over: #FFE1DA;
    --aff-bg: #E3F2FD; --aff-line: #9CD0F5; --neg-bg: #FDECE7; --neg-line: #F5B7A8;
    --na-bg: #FFF4CC; --on-accent: #FFFFFF; --green-bg: #DDF5EE; --funnel-line: #BDB4F5; --link: #5B44E0;
    color-scheme: light;
  }
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; min-height: 100vh; }
a { color: var(--link); } 
button, input, select { font: inherit; color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.t-grow { flex: 1; }
.t-muted { color: var(--muted); }

.t-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding: 14px 24px; border-bottom: 1px solid var(--line); }
.t-brand { font-size: 18px; font-weight: 800; color: var(--text); text-decoration: none; }
.t-navsub { font-size: 13px; color: var(--muted); }
.t-link { font-size: 14px; font-weight: 600; text-decoration: none; }
.t-link:hover { text-decoration: underline; }

.t-page { width: 100%; padding: 24px clamp(16px, 2.5vw, 40px); display: flex; flex-direction: column; gap: 20px; }
.t-roundbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.t-title { font-size: 22px; font-weight: 800; margin: 0; }
.t-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 700; }
.t-pill.is-ready { background: var(--green-bg); border-color: var(--green); color: var(--green); }
.t-btn { height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--text); font-weight: 600; font-size: 14px; cursor: pointer; }
.t-btn:hover { border-color: var(--accent); }
.t-btn-lg { height: 44px; padding: 0 16px; border-radius: 12px; background: transparent; font-size: 15px; }
.t-btn.t-sm { height: 34px; padding: 0 12px; font-size: 13px; }
.t-btn:disabled, .t-pause:disabled { opacity: .45; cursor: default; }
.t-cta { height: 46px; padding: 0 22px; border-radius: 12px; border: 0; background: var(--accent); color: var(--on-accent); font-weight: 800; font-size: 15px; cursor: pointer; }

.t-cols { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.t-left { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.t-roundcol { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.t-panel { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.t-h2 { font-size: 18px; font-weight: 800; margin: 0 0 6px; }
.t-h3 { font-size: 14px; font-weight: 700; margin: 0; }
.t-hint { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.t-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 14px; }
.t-row label { display: flex; gap: 8px; align-items: center; }
.t-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px 24px; margin-top: 18px; }
.t-field { border: 0; padding: 0; margin: 0; min-width: 0; }
.t-field legend { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; padding: 0; }
.t-check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--muted); margin-top: 10px; cursor: pointer; }
.t-check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--accent); }
select, input[type=text] { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; min-height: 38px; color: var(--text); font-size: 14px; }
.t-custom { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.t-times { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px 16px; margin-top: 12px; }
.t-time-in { display: flex; justify-content: space-between; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
.t-time-in input { width: 72px; text-align: center; font-variant-numeric: tabular-nums; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--bg); border-radius: 12px; border: 1px solid var(--line); }
.seg button { border: 0; background: none; font-weight: 600; padding: 0 16px; min-height: 38px; border-radius: 9px; cursor: pointer; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }

/* now card */
.t-now { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 18px 20px; border-radius: 18px; background: var(--card); border: 1px solid var(--aff); }
.t-now[data-side="neg"] { border-color: var(--neg); }
.t-now[data-side="both"] { border-color: var(--accent); }
.t-nowtxt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.t-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--aff); }
.t-now[data-side="neg"] .t-eyebrow { color: var(--neg); }
.t-now[data-side="both"] .t-eyebrow { color: var(--accent); }
.t-cur { font-size: 16px; font-weight: 600; }
.t-time { font-size: 52px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1.1; transition: color .2s; }
.t-time[data-c="warn1"] { color: var(--na); }
.t-time[data-c="over"] { color: var(--over); }
.t-time[data-c="over"] { animation: t-pulse 1s steps(2, jump-none) infinite; }
@keyframes t-pulse { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .t-time[data-c="over"] { animation: none; } }
.t-progcol { flex: 1 1 160px; display: flex; flex-direction: column; gap: 6px; min-width: 140px; }
.t-prog { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.t-prog i { display: block; height: 8px; width: 0; background: var(--aff); transition: width .2s linear; }
.t-now[data-side="neg"] .t-prog i { background: var(--neg); }
.t-now[data-side="both"] .t-prog i { background: var(--accent); }
.t-prog i[data-c="warn1"] { background: var(--na); }
.t-prog i[data-c="warn2"], .t-prog i[data-c="over"] { background: var(--over); }
.t-note { font-size: 12px; color: var(--muted); }
.t-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.t-pause { height: 44px; min-width: 92px; padding: 0 18px; border-radius: 12px; border: 0; background: var(--na); color: #0A0D21; font-weight: 800; font-size: 15px; cursor: pointer; }
:root .t-pause { color: #0A0D21; }
@media (prefers-color-scheme: light) { .t-pause { background: #FACC33; } }

.t-prep { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.t-prepbtn { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); cursor: pointer; text-align: left; }
.t-prepbtn span { font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--aff); }
.t-prepbtn[data-prep="neg"] span { color: var(--neg); }
.t-prepbtn b { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.t-prepbtn.is-on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.t-prepbtn[data-c="warn1"] b { color: var(--na); }
.t-prepbtn[data-c="warn2"] b, .t-prepbtn[data-c="over"] b { color: var(--over); }

/* speech strip */
.t-striphead { font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.t-striphead .t-muted { font-weight: 400; font-size: 12px; }
.t-strip { list-style: none; margin: 0; padding: 0 0 4px; display: flex; gap: 8px; overflow-x: auto; position: relative; }
.t-strip button { display: flex; flex-direction: column; align-items: flex-start; gap: 0; min-width: 84px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); border-left: 4px solid var(--line); background: var(--card); cursor: pointer; text-align: left; white-space: nowrap; }
.t-strip .s-aff button { border-left-color: var(--aff); }
.t-strip .s-neg button { border-left-color: var(--neg); }
.t-strip b { font-size: 13px; }
.t-strip small { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.t-strip .is-q button { opacity: .75; }
.t-strip .is-done button { opacity: .5; }
.t-strip .is-now button { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; opacity: 1; }
.t-strip .is-you b::after { content: " · you"; color: var(--muted); font-weight: 600; }

/* flow */
.t-flowwrap { display: flex; flex-direction: column; gap: 10px; }
.t-flowhead { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
.t-na { margin: 0 0 0 auto; }
.t-count { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--muted); }
.t-count.has { background: var(--na-bg); border-color: var(--na); color: var(--na); }
.t-flowbox { position: relative; min-width: 0; }
.t-flowbox::before, .t-flowbox::after { content: ""; position: absolute; top: 0; bottom: 6px; width: 36px; pointer-events: none; z-index: 2; opacity: 0; transition: opacity .2s; }
.t-flowbox::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.t-flowbox::after { right: 0; background: linear-gradient(270deg, var(--bg), transparent); }
.t-flowbox[data-l="1"]::before, .t-flowbox[data-r="1"]::after { opacity: 1; }
.t-flow { position: relative; display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; align-items: stretch; min-height: 150px; }
.t-col { flex: 1 0 220px; min-width: 220px; display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 14px; background: var(--col); border: 1px solid transparent; min-width: 0; }
.t-col.is-active { border-color: var(--accent); }
.t-colhead { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; border: 0; background: none; padding: 0; cursor: pointer; text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--aff); }
.t-col.s-neg .t-colhead { color: var(--neg); }
.t-colhead small { font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.t-entry { position: relative; padding: 10px 28px 10px 10px; border-radius: 10px; background: var(--aff-bg); border: 1px solid var(--aff-line); font-size: 13px; font-weight: 600; }
.t-entry.s-neg { background: var(--neg-bg); border-color: var(--neg-line); }
.t-entry p { margin: 0; overflow-wrap: anywhere; }
.t-eid { display: block; font: 600 10px ui-monospace, "SF Mono", Menlo, Consolas, monospace; color: var(--muted); margin-bottom: 2px; }
.t-x { position: absolute; top: 0; right: 0; width: 30px; height: 30px; border: 0; background: none; color: var(--muted); font-size: 17px; cursor: pointer; border-radius: 8px; }
.t-x:hover { color: var(--over); }
.t-ansline { display: block; font: 500 11px ui-monospace, "SF Mono", Menlo, Consolas, monospace; color: var(--muted); margin-top: 4px; }
.t-entry.is-na { border-color: var(--na); background: var(--na-bg); }
.t-namark { display: inline-block; margin-top: 6px; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--na); }
.t-add { display: flex; flex-direction: column; gap: 6px; }
.t-addlbl { font-size: 11px; color: var(--muted); }
.t-add input[type=text] { height: 36px; min-height: 36px; border-color: var(--accent); font-weight: 500; font-size: 13px; width: 100%; }
.t-addrow { display: flex; gap: 6px; }
.t-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.t-chip { font: 600 11px ui-monospace, "SF Mono", Menlo, Consolas, monospace; border: 1px solid var(--accent); background: transparent; color: var(--link); border-radius: 999px; padding: 4px 10px; cursor: pointer; }
.t-picker { margin-top: 6px; max-height: 200px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 6px; display: grid; gap: 4px; font-size: 12px; color: var(--muted); background: var(--bg); }
.t-pick { text-align: left; border: 1px solid transparent; border-left: 4px solid var(--aff); background: var(--card); color: var(--text); padding: 6px 8px; border-radius: 8px; cursor: pointer; font-size: 12px; }
.t-pick.s-neg { border-left-color: var(--neg); }
.t-pick.is-on { border-color: var(--accent); }
.t-pick b { font: 600 11px ui-monospace, "SF Mono", Menlo, Consolas, monospace; }

/* funnel */
.t-funnel { flex: 1 1 320px; display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: 18px; background: var(--card); border: 1px solid var(--funnel-line); min-width: 0; }
.t-green { font-size: 12px; font-weight: 700; color: var(--green); letter-spacing: .06em; text-transform: uppercase; }
.t-fbody { margin: 0; font-size: 14px; line-height: 1.5; }
.t-funnel hr { border: 0; height: 1px; background: var(--line); margin: 0; width: 100%; }
.t-funnel .t-h2 { margin: 0; }
.t-dots { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.t-dots li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; }
.t-dots i { width: 8px; height: 8px; border-radius: 4px; margin-top: 6px; flex-shrink: 0; }
.t-store { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 48px; padding: 8px 14px; border-radius: 14px; background: var(--accent); color: var(--on-accent); font-size: 15px; font-weight: 800; text-decoration: none; }
.t-store:hover { filter: brightness(1.08); }
.t-textlink { border: 0; background: none; color: var(--link); font-size: 13px; font-weight: 600; cursor: pointer; text-align: center; padding: 4px; }
.t-textlink:hover { text-decoration: underline; }
.t-fine { font-size: 12px; color: var(--muted); line-height: 1.6; margin: 0; }

@media (max-width: 600px) {
  .t-page { padding: 16px; gap: 16px; }
  .t-nav { padding: 12px 16px; }
  .t-navsub { display: none; }
  .t-now { padding: 16px; }
  .t-time { font-size: 56px; }
  .t-btns { width: 100%; }
  .t-btns > * { flex: 1; }
  .t-prepbtn { flex-direction: column; align-items: flex-start; gap: 2px; }
  .t-col { flex-basis: 78vw; }
  .t-na { margin-left: 0; }
}

/* ---------- setup: one centered column, like the iOS timer ---------- */
[data-view="setup"] .t-cols { justify-content: center; }
[data-view="setup"] .t-left { flex: 0 1 560px; }
[data-view="setup"] .t-funnel { flex: 0 1 560px; }
.t-setup { display: flex; flex-direction: column; gap: 22px; width: 100%; max-width: 560px; margin: 0 auto; }
.t-setuptitle { font-size: 30px; font-weight: 800; margin: 0 0 4px; letter-spacing: -.01em; }
.t-setupsub { margin: 0 0 10px; font-size: 14px; }
.t-group { display: flex; flex-direction: column; gap: 8px; }
.t-lbl { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .06em; }
.t-chips4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.t-chips2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.t-chips2[hidden], .t-hint[hidden] { display: none; }
.chip { height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--text); font-weight: 600; font-size: 15px; cursor: pointer; padding: 0 6px; }
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--sel); border-color: var(--accent); font-weight: 700; }
.chip[aria-pressed="true"]::before { content: "✓ "; }
.chip.c-aff[aria-pressed="true"] { background: var(--aff-bg); border-color: var(--aff); }
.chip.c-neg[aria-pressed="true"] { background: var(--neg-bg); border-color: var(--neg); }
.t-small .chip { height: 42px; font-size: 14px; background: var(--bg); }
.t-small .chip[aria-pressed="true"] { background: var(--sel); }
.t-small .chip[aria-pressed="true"]::before { content: ""; }
.t-card { display: flex; flex-direction: column; border-radius: 16px; background: var(--card); overflow: hidden; }
.t-rowi { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 600; min-height: 52px; }
.t-card > .t-rowi:last-child { border-bottom: 0; }
.t-colrow { flex-direction: column; align-items: stretch; gap: 10px; }
.t-rl { font-weight: 600; flex: 1; }
.t-rv { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.t-rtxt { flex: 1; display: flex; flex-direction: column; }
.t-rtxt small { font-size: 12px; color: var(--muted); font-weight: 400; }
.t-step { display: inline-flex; background: var(--line); border-radius: 999px; overflow: hidden; }
.t-step button { width: 46px; height: 36px; border: 0; background: none; font-size: 20px; cursor: pointer; color: var(--text); }
.t-step button + button { border-left: 1px solid var(--muted); }
.t-step button:hover { background: rgba(158, 140, 255, .25); }
.t-switch { position: relative; width: 52px; height: 30px; border-radius: 999px; border: 0; background: var(--line); cursor: pointer; flex: none; transition: background .15s; }
.t-switch i { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .15s; }
.t-switch[aria-checked="true"] { background: var(--green); }
.t-switch[aria-checked="true"] i { transform: translateX(22px); }
#partner { flex: 1; min-width: 0; border: 0; background: none; text-align: right; font-size: 15px; font-weight: 500; padding: 0; }
#partner::placeholder { color: var(--muted); }
#partner:focus-visible { outline-offset: 6px; }
.t-custom { padding: 8px 14px 14px; }
.t-custom .t-rowi { border: 0; padding-left: 0; }
.t-safe { display: flex; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--green-bg); border: 1px solid var(--green); color: var(--text); }
.t-safe svg { flex: none; margin-top: 1px; color: var(--green); }
.t-safe p { margin: 0; font-size: 13px; line-height: 1.5; }
.t-startcol { display: flex; flex-direction: column; align-items: stretch; gap: 8px; text-align: center; }
.t-cta { height: 56px; border-radius: 16px; font-size: 17px; }
.t-quiet { border: 0; background: none; color: var(--link); font-weight: 600; font-size: 14px; padding: 6px; cursor: pointer; }
.t-quiet:hover { text-decoration: underline; }
.t-startcol .t-hint { margin: 0; text-align: center; }
[data-view="setup"] .t-fine { text-align: center; max-width: 560px; margin: 0 auto; }

/* ---------- round bar: clock switcher ---------- */
.t-layouts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 4px; border-radius: 12px; background: var(--col); border: 1px solid var(--line); }
.t-layoutlbl { font-size: 12px; color: var(--muted); padding: 0 6px; }
.t-layouts button { padding: 7px 12px; border-radius: 8px; border: 1px solid transparent; background: none; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; }
.t-layouts button[aria-pressed="true"] { background: var(--sel); border-color: var(--accent); color: var(--text); font-weight: 700; }

/* ---------- clock layouts ---------- */
.t-clockwrap { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
#round { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.t-dial { display: contents; }
.t-ring, .t-dialsub, .t-state, .t-upnext, .t-focushint { display: none; }
.t-ring-bg { fill: none; stroke: var(--line); stroke-width: 12; }
.t-ring-fg { fill: none; stroke: var(--aff); stroke-width: 12; stroke-linecap: round; }
.t-now[data-side="neg"] .t-ring-fg { stroke: var(--neg); }
.t-ring-fg[data-c="warn1"] { stroke: var(--na); }
.t-ring-fg[data-c="over"] { stroke: var(--over); }
.t-note { display: flex; justify-content: space-between; gap: 8px; }
.t-up { display: flex; gap: 8px; padding: 10px 12px; font-size: 13px; }
.t-up + .t-up { border-top: 1px solid var(--line); }
.t-upn { flex: 1; font-weight: 600; } .t-upt { color: var(--muted); } .t-upl { color: var(--muted); }
.t-up .t-upl { display: none; }

/* Big */
[data-layout="big"] .t-cols, [data-layout="side"] .t-cols { flex-direction: column; align-items: stretch; }
[data-layout="big"] .t-left, [data-layout="side"] .t-left { flex: none; width: 100%; }
[data-layout="big"] .t-clockwrap { align-items: center; padding: 28px 24px; border-radius: 24px; background: var(--card); border: 1px solid var(--aff); gap: 16px; }
[data-layout="big"] .t-now { flex-direction: column; align-items: center; text-align: center; padding: 0; border: 0; background: none; width: 100%; gap: 14px; }
[data-layout="big"] .t-nowtxt { align-items: center; }
[data-layout="big"] .t-cur { font-size: 22px; font-weight: 700; }
[data-layout="big"] .t-time { font-size: clamp(88px, 18vw, 180px); line-height: 1; letter-spacing: -.03em; }
[data-layout="big"] .t-progcol { width: 100%; max-width: 760px; flex: none; }
[data-layout="big"] .t-prog { height: 10px; }
[data-layout="big"] .t-btns { justify-content: center; }
[data-layout="big"] .t-pause, [data-layout="big"] .t-btn-lg { height: 52px; min-width: 160px; font-size: 17px; border-radius: 14px; }
[data-layout="big"] .t-prep { width: 100%; max-width: 760px; }
[data-layout="big"] .t-prepbtn { background: var(--col); }
[data-layout="big"] .t-prepbtn b { font-size: 24px; }

/* Beside flow: the clock panel stays in view while the flow scrolls */
[data-layout="side"] #round { display: grid; grid-template-columns: minmax(0, 1fr) 340px; grid-template-areas: "strip clock" "flow clock"; gap: 16px 20px; align-items: start; }
[data-layout="side"] .t-clockwrap { grid-area: clock; position: sticky; top: 16px; padding: 18px; border-radius: 20px; background: var(--card); border: 1px solid var(--aff); gap: 14px; }
[data-layout="side"] .t-stripwrap { grid-area: strip; min-width: 0; }
[data-layout="side"] .t-flowwrap { grid-area: flow; min-width: 0; }
[data-layout="side"] .t-now { flex-direction: column; align-items: stretch; padding: 0; border: 0; background: none; gap: 12px; }
[data-layout="side"] .t-nowtxt { align-items: center; text-align: center; }
[data-layout="side"] .t-cur { font-size: 14px; color: var(--muted); }
[data-layout="side"] .t-dial { display: block; position: relative; width: 240px; height: 240px; margin: 0 auto; max-width: 100%; }
[data-layout="side"] .t-ring { display: block; width: 100%; height: 100%; }
[data-layout="side"] .t-time { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-62%); text-align: center; font-size: 58px; line-height: 1; }
[data-layout="side"] .t-dialsub { display: block; position: absolute; left: 0; right: 0; top: 63%; text-align: center; font-size: 14px; color: var(--muted); }
[data-layout="side"] .t-progcol { display: none; }
[data-layout="side"] .t-btns { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
[data-layout="side"] .t-pause, [data-layout="side"] .t-btn-lg { height: 46px; width: 100%; }
[data-layout="side"] .t-prep { grid-template-columns: 1fr; gap: 8px; }
[data-layout="side"] .t-prepbtn { background: var(--col); padding: 12px 14px; border-radius: 12px; }
[data-layout="side"] .t-prepbtn b { font-size: 20px; }
[data-layout="side"] .t-upnext { display: block; border-radius: 12px; background: var(--col); overflow: hidden; }
[data-layout="side"] .t-flow { max-height: none; }
[data-layout="side"] .t-col { flex: 1 0 220px; min-height: 260px; }

/* compact app strip (Big, Beside flow) */
[data-layout="big"] .t-funnel, [data-layout="side"] .t-funnel { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 16px; flex: none; width: 100%; }
[data-layout="big"] .t-fullonly, [data-layout="side"] .t-fullonly { display: none; }
[data-layout="big"] .t-fbody, [data-layout="side"] .t-fbody { flex: 1 1 320px; }
[data-layout="big"] .t-store, [data-layout="side"] .t-store { min-height: 44px; border-radius: 12px; font-size: 14px; padding: 0 16px; }
.t-compactonly { display: none; }
[data-layout="big"] .t-compactonly, [data-layout="side"] .t-compactonly { display: inline; }
[data-layout="big"] p.t-compactonly, [data-layout="side"] p.t-compactonly { display: block; }

/* Focus: clock and controls fill the screen; warning colors tint the background */
body:has(.t-page[data-layout="focus"]) .t-nav, [data-layout="focus"] .t-funnel, [data-layout="focus"] .t-stripwrap, [data-layout="focus"] .t-flowwrap, [data-layout="focus"] .t-fine { display: none; }
[data-layout="focus"] .t-page { min-height: 100vh; min-height: 100dvh; padding-top: 12px; padding-bottom: 0; gap: 12px; }
[data-layout="focus"] .t-title { font-size: 16px; }
[data-layout="focus"] .t-cols, [data-layout="focus"] .t-left, [data-layout="focus"] #round { flex: 1; display: flex; flex-direction: column; min-height: 0; }
[data-layout="focus"] .t-cols { align-items: stretch; flex-wrap: nowrap; gap: 0; }
[data-layout="focus"] .t-left { flex: 1 1 auto; gap: 0; }
[data-layout="focus"] .t-clockwrap { flex: 1; display: grid; grid-template-rows: 1fr auto; gap: 14px; margin: 0 calc(-1 * clamp(16px, 2.5vw, 40px)); padding: 0 clamp(16px, 2.5vw, 40px) 14px; transition: background .3s; }
[data-layout="focus"] .t-clockwrap[data-c="warn1"] { background: var(--tint-warn); }
[data-layout="focus"] .t-clockwrap[data-c="over"] { background: var(--tint-over); }
[data-layout="focus"] .t-now { flex-direction: column; justify-content: center; align-items: center; text-align: center; border: 0; background: none; padding: 16px 0; gap: 16px; }
[data-layout="focus"] .t-nowtxt { align-items: center; }
[data-layout="focus"] .t-eyebrow { font-size: 15px; letter-spacing: .08em; }
[data-layout="focus"] .t-cur { display: none; }
[data-layout="focus"] .t-time { font-size: clamp(110px, 27vw, 300px); line-height: .9; letter-spacing: -.04em; }
[data-layout="focus"] .t-time[data-c="warn1"] { color: var(--na); }
[data-layout="focus"] .t-progcol { width: 100%; max-width: 900px; flex: none; }
[data-layout="focus"] .t-prog { height: 12px; border-radius: 6px; }
[data-layout="focus"] .t-note { display: none; }
[data-layout="focus"] .t-state { display: block; font-size: 15px; font-weight: 600; text-align: center; min-height: 22px; color: var(--na); }
[data-layout="focus"] .t-clockwrap[data-c="over"] .t-state { color: var(--over); }
[data-layout="focus"] .t-btns { justify-content: center; gap: 12px; }
[data-layout="focus"] .t-pause, [data-layout="focus"] .t-btn-lg { height: 56px; min-width: 180px; font-size: 18px; border-radius: 16px; }
[data-layout="focus"] .t-clockwrap { grid-template-columns: 2fr 1fr; }
[data-layout="focus"] .t-now { grid-column: 1 / -1; }
[data-layout="focus"] .t-prep { grid-column: 1; grid-row: 2; grid-template-columns: 1fr 1fr; display: grid; }
[data-layout="focus"] .t-prepbtn { padding: 12px 16px; border-radius: 12px; }
[data-layout="focus"] .t-prepbtn b { font-size: 20px; }
[data-layout="focus"] .t-upnext { display: flex; grid-column: 2; grid-row: 2; }
[data-layout="focus"] .t-up { flex: 1; display: flex; align-items: center; padding: 12px 16px; border-radius: 12px; background: var(--col); font-size: 14px; }
[data-layout="focus"] .t-up + .t-up { display: none; }
[data-layout="focus"] .t-up .t-upl { display: inline; }
[data-layout="focus"] .t-focushint { display: block; margin: 0; text-align: center; font-size: 12px; color: var(--muted); grid-column: 1 / -1; grid-row: 3; }

@media (max-width: 900px) {
  [data-layout="side"] #round { grid-template-columns: minmax(0, 1fr); grid-template-areas: "clock" "strip" "flow"; }
  [data-layout="side"] .t-clockwrap { position: static; }
}
@media (max-width: 600px) {
  .chip { font-size: 14px; }
  .t-layouts { width: 100%; }
  .t-layoutlbl { display: none; }
  .t-layouts button { flex: 1; padding: 8px 4px; }
  [data-layout="big"] .t-clockwrap { padding: 20px 14px; }
  [data-layout="focus"] .t-clockwrap { grid-template-columns: 1fr; }
  [data-layout="focus"] .t-prep, [data-layout="focus"] .t-upnext { grid-column: 1; }
  [data-layout="focus"] .t-upnext { grid-row: 3; }
  [data-layout="focus"] .t-focushint { grid-row: 4; }
  .t-setuptitle { font-size: 26px; }
}

/* Flow and speech strip still scroll sideways (touch, trackpad, arrow keys), but without a visible scrollbar. */
.t-flow, .t-strip { scrollbar-width: none; }
.t-flow::-webkit-scrollbar, .t-strip::-webkit-scrollbar { display: none; }

/* ---------- setup structure: format cards, three cards, summary bar ---------- */
.narrow-only { display: initial; }
.wide-only { display: none; }
.t-fcards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.fcard { display: block; height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--text); font-weight: 600; font-size: 15px; cursor: pointer; padding: 0 6px; text-align: center; }
.fcard:hover { border-color: var(--accent); }
.fcard[aria-pressed="true"] { background: var(--sel); border-color: var(--accent); font-weight: 700; }
.fcard[aria-pressed="true"] .fc-short::before { content: "✓ "; }
.fc-title, .fc-detail, .fc-foot { display: none; }
.lo { display: none; }
.t-lo4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.t-lo4 .chip { height: 42px; font-size: 14px; background: var(--bg); }
.t-lo4 .chip[aria-pressed="true"] { background: var(--sel); }
.t-lo4 .chip[aria-pressed="true"]::before { content: ""; }
.t-safe svg { display: block; }
.s-sumline { font-size: 16px; font-weight: 700; }

@media (max-width: 999.98px) {
  .t-setup { display: flex; flex-direction: column; gap: 0; max-width: 560px; }
  .sc, .s-summary, .s-sumtext { display: contents; }
  .s-head { order: 0; margin-bottom: 22px; }
  .s-formats { order: 1; margin-bottom: 22px; }
  .s-formats .t-lbl { margin-bottom: 8px; }
  .sc-you > .t-lbl { order: 2; margin-bottom: 8px; }
  .s-side { order: 3; margin-bottom: 6px; }
  .s-first { order: 4; margin-bottom: 6px; }
  .s-hint { order: 5; margin: 0; }
  .r-prep, .r-warn, .r-sound, .r-partner, .r-layout { background: var(--card); }
  .r-prep { order: 10; margin-top: 22px; border-radius: 16px 16px 0 0; }
  .r-warn { order: 11; } .r-sound { order: 12; } .r-partner { order: 13; }
  .r-layout { order: 14; border-radius: 0 0 16px 16px; border-bottom: 0; margin-bottom: 22px; }
  .t-custom { order: 15; margin-bottom: 22px; }
  .t-safe { order: 16; margin-bottom: 22px; }
  .t-startcol { order: 17; }
  .t-startcol .t-cta { order: 1; } .t-startcol .t-quiet { order: 2; } .t-startcol .t-hint { order: 3; }
  #import-msg { order: 18; text-align: center; }
}

@media (min-width: 1000px) {
  [data-view="setup"] .t-cols { flex-direction: column; align-items: stretch; flex-wrap: nowrap; justify-content: flex-start; }
  [data-view="setup"] .t-left, [data-view="setup"] .t-funnel { flex: none; width: 100%; max-width: 1320px; margin-left: auto; margin-right: auto; }
  [data-view="setup"] .t-page { max-width: 1376px; margin: 0 auto; }
  .narrow-only { display: none !important; }
  .wide-only { display: initial; }
  .t-setup { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; max-width: none; align-items: stretch; }
  .s-head { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
  .t-setuptitle { font-size: 28px; margin: 0; }
  .t-setupsub { margin: 0; font-size: 14px; }
  .s-head .t-pill { margin-left: auto; }
  .s-formats { grid-column: 1 / -1; }
  .t-fcards { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
  .fcard { height: auto; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 16px; border-radius: 16px; text-align: left; font-weight: 400; }
  .fcard[aria-pressed="true"] { border: 2px solid var(--accent); padding: 15px; }
  .fc-short { display: none; }
  .fc-title { display: block; font-size: 20px; font-weight: 800; }
  .fcard[aria-pressed="true"] .fc-title::before { content: "✓ "; }
  .fc-detail { display: block; font-size: 12px; color: var(--muted); line-height: 1.6; }
  .fc-foot { display: block; font-size: 12px; font-weight: 700; color: var(--muted); }
  .fcard[aria-pressed="true"] .fc-detail { color: var(--text); opacity: .8; }
  .fcard[aria-pressed="true"] .fc-foot { color: var(--link); }
  .fcard.is-custom { border-style: dashed; border-color: var(--funnel-line); background: var(--col); }
  .fcard.is-custom[aria-pressed="true"] { border-style: solid; border-color: var(--accent); background: var(--sel); }
  .t-fnote { margin: 8px 0 0; font-size: 12px; }
  .sc { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
  .sc > .t-lbl { letter-spacing: .08em; }
  .sc-you { display: grid; grid-template-columns: 1fr 1fr; align-content: start; gap: 8px; }
  .sc-you > .t-lbl, .sc-you > .t-chips2, .sc-you > .t-hint, .sc-you > .r-partner { grid-column: 1 / -1; }
  .sc-you .t-chips2 { gap: 8px; }
  .sc .chip { height: 44px; }
  .sc .t-rowi { padding: 0; border: 0; min-height: 0; background: none; }
  .sc .t-colrow { gap: 8px; }
  .sc .t-rl { font-size: 15px; font-weight: 600; }
  .sc .t-colrow > .t-rl { font-size: 13px; font-weight: 400; color: var(--muted); }
  .sc-timing .t-small .chip { height: 36px; border-radius: 8px; font-size: 13px; background: var(--col); }
  .sc-timing .t-small .chip[aria-pressed="true"] { background: var(--sel); border-color: var(--accent); }
  .sc-timing { align-content: start; }
  .sc-timing .t-step { background: var(--line); border-radius: 10px; }
  .sc-timing .t-step button { width: 38px; height: 32px; font-size: 17px; }
  .r-partner { flex-direction: column; align-items: stretch; gap: 6px; }
  .r-partner .t-rl { font-size: 13px; font-weight: 400; color: var(--muted); flex: none; }
  .r-partner #partner { text-align: left; height: 38px; border: 1px solid var(--line); background: var(--col); border-radius: 10px; padding: 0 10px; font-size: 14px; flex: none; }
  .t-lo4 { grid-template-columns: 1fr 1fr; gap: 8px; }
  .t-lo4 .chip { height: auto; display: flex; flex-direction: column; align-items: stretch; gap: 6px; padding: 8px; font-size: 13px; text-align: left; background: var(--col); border-radius: 12px; }
  .t-lo4 .chip[aria-pressed="true"] { background: var(--sel); border-width: 1.5px; }
  .lo { display: flex; gap: 3px; width: 100%; height: 44px; border-radius: 6px; background: var(--bg); padding: 4px; }
  .lo i { display: block; border-radius: 2px; background: var(--line); }
  .lo-inline { flex-direction: column; } .lo-inline i:first-child { height: 10px; background: var(--aff); } .lo-inline i:last-child { flex: 1; }
  .lo-big { flex-direction: column; } .lo-big i:first-child { height: 22px; background: var(--aff); } .lo-big i:last-child { flex: 1; }
  .lo-side i:first-child { flex: 1; } .lo-side i:last-child { width: 30%; background: var(--aff); }
  .lo-focus i { flex: 1; background: var(--aff); }
  .t-custom { grid-column: 1 / -1; }
  .s-summary { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 18px; background: var(--card); border: 1px solid var(--funnel-line); }
  .s-sumtext { display: flex; flex-direction: column; gap: 2px; flex: 1 1 360px; min-width: 0; }
  .t-safe { background: none; border: 0; padding: 0; color: var(--green); }
  .t-safe svg { display: none; }
  .t-safe p { font-size: 12px; }
  .t-safe strong { font-weight: 600; }
  .t-startcol { flex-direction: row; align-items: center; gap: 14px; }
  .t-startcol .t-cta { height: 52px; min-width: 200px; border-radius: 14px; order: 2; }
  .t-startcol .t-quiet { order: 1; }
  #import-msg { flex-basis: 100%; margin: 0; text-align: right; }
  #import-msg:empty { display: none; }
  /* the app panel waits below the setup, as a compact strip; "What's free" in the top bar jumps to it */
  [data-view="setup"] .t-funnel { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 16px; }
  [data-view="setup"] .t-fullonly { display: none; }
  [data-view="setup"] .t-compactonly { display: inline; }
  [data-view="setup"] p.t-compactonly { display: block; }
  [data-view="setup"] .t-fbody { flex: 1 1 320px; }
  [data-view="setup"] .t-store { min-height: 44px; border-radius: 12px; font-size: 14px; padding: 0 16px; }
  [data-view="setup"] .t-fine { display: none; }
  [data-view="setup"] .t-page { gap: 14px; padding-top: 18px; }
}
@media (max-width: 999.98px) { .t-fnote { display: none; } }

/* ---------- phone view: the iOS Debate Timer (max-width 700px), dark, one column ---------- */
.ph-root { display: none; }
@media (max-width: 700px) {
  html:not(.t-full) { color-scheme: dark; background: #0A0D21; }
  html:not(.t-full) body { background: #0A0D21; color: #F2F3FF; font: 15px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
  html:not(.t-full) .t-nav, html:not(.t-full) .t-page { display: none; }
  html:not(.t-full) .ph-root { display: block; }
}
.ph-root { --bg: #0A0D21; --card: #171A38; --dim: #12152E; --line: #22264A; --track: #2E3360; --text: #F2F3FF; --sec: #A9AECF; --muted: #8C92B8; --violet: #9E8CFF; --mint: #5CE6BD; --gold: #FACC33; --flame: #FF9F0A; --red: #FF5A5A;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--text); background: var(--bg); min-height: 100vh; min-height: 100dvh; }
.ph-root *, .ph-root *::before, .ph-root *::after { box-sizing: border-box; }
:where(.ph-root) button { font: inherit; color: inherit; }
.ph-root button:focus-visible, .ph-root input:focus-visible, .ph-root select:focus-visible, .ph-root a:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }
.ph-ic { display: inline-flex; flex: none; }
.ph-screen { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; padding-top: env(safe-area-inset-top); }
.ph-title, .ph-t20, .ph-done h2 { font-family: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif; font-weight: 900; margin: 0; }
.ph-sub { margin: 0; font-size: 12px; color: var(--sec); }

/* setup */
.ph-scroll { flex: 1; padding: 16px 20px 24px; display: flex; flex-direction: column; gap: 18px; }
.ph-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.ph-title { font-size: 28px; line-height: 1.15; }
.ph-head .ph-sub { font-size: 13px; margin-top: 4px; }
.ph-close { width: 44px; height: 44px; border-radius: 50%; background: var(--card); color: #C9CDEA; display: flex; align-items: center; justify-content: center; flex: none; text-decoration: none; }
.ph-group { display: flex; flex-direction: column; gap: 8px; }
.ph-lbl { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: 1px; color: var(--sec); }
.ph-chips { display: grid; gap: 6px; }
.ph-c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ph-c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ph-chip { --tint: #9E8CFF; min-height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); display: flex; align-items: center; justify-content: center; gap: 4px; font-size: 15px; font-weight: 600; cursor: pointer; padding: 0 6px; }
.ph-chip.is-on { font-weight: 700; border: 1.5px solid var(--tint); background: color-mix(in srgb, var(--tint) 20%, #171A38); }
.ph-chip[style*="#9E8CFF"].is-on { background: #2A2552; }
.ph-chk { display: inline-flex; }
.ph-chiptx { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-select { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 15px; font-weight: 600; margin-top: 4px; }
.ph-select select { -webkit-appearance: none; appearance: none; background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='16' viewBox='0 0 12 16' fill='none' stroke='%23C4B8FF' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 6l4-4 4 4M2 10l4 4 4-4'/%3E%3C/svg%3E") no-repeat right 12px center; border: 1px solid var(--line); color: #C4B8FF; border-radius: 12px; height: 40px; padding: 0 34px 0 14px; font-size: 16px; }
.ph-card { background: var(--card); border-radius: 16px; overflow: hidden; }
.ph-pad { padding: 4px 14px; }
.ph-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; min-height: 48px; border-top: 1px solid var(--line); }
.ph-card > .ph-row:first-child { border-top: 0; }
.ph-col { flex-direction: column; align-items: stretch; padding: 14px; gap: 10px; }
.ph-rl { font-size: 15px; font-weight: 600; flex: 1; }
.ph-rv { font-size: 15px; color: var(--sec); font-variant-numeric: tabular-nums; }
.ph-rtxt { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.ph-rtxt small { font-size: 12px; color: var(--sec); }
.ph-step { display: inline-flex; background: #2B3068; border-radius: 999px; overflow: hidden; flex: none; }
.ph-step button { width: 50px; height: 36px; border: 0; background: none; font-size: 20px; cursor: pointer; line-height: 1; }
.ph-step button + button { border-left: 1px solid rgba(255, 255, 255, .14); }
.ph-step button:disabled { opacity: .35; cursor: default; }
.ph-marks { gap: 8px; }
.ph-mark { min-height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--dim); font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; cursor: pointer; }
.ph-mark.is-on { background: #2A2552; border-color: var(--violet); font-weight: 700; }
.ph-switch { width: 51px; height: 31px; border-radius: 16px; border: 0; background: #3A3F70; position: relative; flex: none; cursor: pointer; transition: background .15s; }
.ph-switch i { position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.35); }
.ph-switch[aria-checked="true"] { background: var(--violet); }
.ph-switch[aria-checked="true"] i { transform: translateX(20px); }
.ph-row input[type=text] { flex: 1; min-width: 0; background: none; border: 0; text-align: right; color: var(--sec); font-size: 15px; padding: 0; }
.ph-row input::placeholder { color: var(--muted); }
.ph-trow { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.ph-trow:first-child { border-top: 0; }
.ph-ttx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ph-ttx b { font-size: 15px; font-weight: 600; } .ph-ttx small { font-size: 12px; color: var(--sec); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-tval { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-variant-numeric: tabular-nums; }
.ph-tval b { font-weight: 400; font-size: 17px; } .ph-tval b.is-ch { color: var(--violet); font-weight: 600; } .ph-tval small { font-size: 11px; color: var(--sec); }
.ph-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: #10302A; border: 1px solid #2E6B5A; }
.ph-note p { margin: 0; font-size: 12px; color: #CFF7EA; line-height: 1.45; }
.ph-mint { color: var(--mint); margin-top: 2px; }
.ph-bar { position: sticky; bottom: 0; padding: 10px 20px calc(8px + env(safe-area-inset-bottom)); background: rgba(10, 13, 33, .96); display: flex; flex-direction: column; gap: 8px; align-items: stretch; text-align: center; }
.ph-start { height: 56px; border-radius: 16px; border: 0; background: var(--violet); color: var(--bg); font-size: 17px; font-weight: 800; cursor: pointer; width: 100%; }
.ph-fine { margin: 0; font-size: 12px; color: var(--sec); }

/* timer */
.ph-timer { padding: 12px 20px 24px; gap: 16px; }
.ph-thead { display: flex; align-items: center; gap: 10px; }
.ph-ttl { flex: 1; min-width: 0; overflow: hidden; display: flex; flex-direction: column; gap: 2px; }
.ph-t20 { font-size: 18px; line-height: 1.2; white-space: nowrap; }
.ph-pill { display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; border: 1px solid; flex: none; }
.ph-pill.is-off { color: var(--mint); background: #10302A; border-color: var(--mint); }
.ph-pill.is-online { color: #FFB340; background: #3A2A0A; border-color: #FFB340; }
.ph-air { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 14px; background: #3A2A0A; }
.ph-air p { margin: 0; font-size: 13px; color: #C9CDEA; }
.ph-flame { color: #FFB340; }
.ph-clock { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 20px 16px; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.ph-head2 { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: 1px; text-align: center; }
.ph-dial { position: relative; width: 220px; height: 220px; }
.ph-ring { width: 220px; height: 220px; transform: rotate(-90deg); display: block; }
.ph-ring-bg, .ph-ring-fg { fill: none; stroke-width: 12; }
.ph-ring-bg { stroke: var(--track); }
.ph-ring-fg { stroke-linecap: round; }
.ph-dialtx { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0 28px; }
.ph-time { font-family: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif; font-weight: 900; font-size: 56px; line-height: 1.05; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ph-left { font-size: 13px; font-weight: 500; color: var(--sec); }
.ph-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ph-big { height: 56px; border-radius: 16px; border: 1px solid var(--line); font-size: 17px; cursor: pointer; }
.ph-big.is-violet { background: var(--violet); color: var(--bg); border-color: var(--violet); font-weight: 800; }
.ph-big.is-gold { background: var(--gold); color: var(--bg); border-color: var(--gold); font-weight: 800; }
.ph-big.is-card { background: var(--card); font-weight: 700; }
.ph-preps { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ph-prep { --c: #40BFFF; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; cursor: pointer; }
.ph-prep.is-on { border: 2px solid var(--c); padding: 11px 13px; }
.ph-plbl { font-size: 11px; font-weight: 700; letter-spacing: .8px; color: var(--c); }
.ph-ptime { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.2; }
.ph-ptime.is-over { color: var(--red); }
.ph-pstat { font-size: 11px; color: var(--sec); }
.ph-next { background: var(--dim); border-radius: 16px; max-height: 214px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.ph-nrow { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.ph-nrow.has-line { border-bottom: 1px solid var(--line); }
.ph-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.ph-ntx { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ph-you { font-size: 12px; font-weight: 700; color: var(--mint); }
.ph-ndur { margin-left: auto; padding-left: 4px; font-size: 15px; color: var(--sec); font-variant-numeric: tabular-nums; }
.ph-last { margin: 0; padding: 14px; font-size: 15px; color: var(--sec); }
.ph-endtimer { display: flex; align-items: center; justify-content: center; gap: 8px; height: 48px; width: 100%; border-radius: 16px; background: var(--card); border: 1px solid rgba(255, 155, 122, .5); color: #FF9B7A; font-size: 15px; font-weight: 700; cursor: pointer; }
.ph-endtimer.is-armed { background: #FF9B7A; border-color: #FF9B7A; color: #0A0D21; }
.ph-muted { margin: -8px 0 0; text-align: center; font-size: 11px; color: var(--muted); }
.ph-done { display: flex; flex-direction: column; align-items: stretch; gap: 14px; padding-top: 60px; text-align: center; }
.ph-done h2 { font-size: 24px; }
.ph-bigcheck { align-self: center; width: 56px; height: 56px; border-radius: 50%; background: var(--mint); color: var(--bg); align-items: center; justify-content: center; }
.ph-c4 .ph-chip { font-size: 14px; padding: 0 3px; gap: 3px; }
.ph-c4 .ph-chiptx { overflow: visible; text-overflow: clip; }

/* alert notes, "Screen stays on", and the missed-warning toast */
.t-alertnote { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; font-weight: 400; }
.t-awake { font-size: 12px; color: var(--green); }
.t-toast, .ph-toast { position: fixed; left: 50%; top: 16px; transform: translate(-50%, -140%); width: max-content; max-width: calc(100vw - 32px); padding: 10px 16px; border-radius: 12px; background: #3A2A0A; border: 1px solid #FFB340; color: #FFE2A8; font-size: 14px; font-weight: 600; z-index: 50; opacity: 0; transition: transform .25s, opacity .25s; pointer-events: none; text-align: center; }
.t-toast.is-on, .ph-toast.is-on { transform: translate(-50%, 0); opacity: 1; }
.ph-awake { color: var(--mint) !important; margin: -8px 0 0; }
.ph-awake[hidden] { display: none; }
.ph-rtxt small + small { margin-top: 0; }
@media (prefers-reduced-motion: reduce) { .t-toast, .ph-toast { transition: none; } }

/* No double-tap zoom when tapping the steppers and buttons repeatedly; no zoom-on-focus from small inputs. */
html, body { touch-action: manipulation; -webkit-text-size-adjust: 100%; }
button, a, select, label, summary, [role="switch"] { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.ph-root button, .t-btn, .t-step button, .chip, .fcard, .t-prepbtn { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.ph-root input, .ph-root select, .t-main input[type="text"], .t-main select { font-size: 16px; }
.ph-row input[type=text] { font-size: 16px; }
