/* PortThai — "Focus Flow" theme. Light cream, one step at a time, orange accent, Nunito.
   Every rule is scoped to body.theme-focus so the Classic theme (app.css) is untouched.
   Reference: [data-design=d2] in designs.html. */
html:has(body.theme-focus){background:#fbf7f1}
body.theme-focus{
  --bg:#fbf7f1; --bg2:#fbf7f1; --panel:#fff; --panel2:#f6efe6; --line:#e2d8cb;
  --txt:#2a231d; --muted:#8a7d6e; --faint:#b3a798; --red:#ff7a1a; --red2:#ff7a1a; --gold:#ff7a1a; --blue:#2f7cf6; --green:#2fa36b;
  --corner-red:#e5484d; --shadow:0 6px 24px rgba(42,35,29,.06); --shadow-s:0 4px 14px rgba(42,35,29,.06);
  --head:Nunito,system-ui,-apple-system,"Segoe UI",sans-serif; --body:Nunito,system-ui,-apple-system,"Segoe UI",sans-serif;
  --gutter:16px;
  background:var(--bg); color:var(--txt); font-family:var(--body); font-size:16px;
  padding-top:calc(54px + env(safe-area-inset-top));
  padding-bottom:calc(128px + env(safe-area-inset-bottom));
}
body.theme-focus:has(#run.active){padding-top:calc(12px + env(safe-area-inset-top))}
body.theme-focus .screen{max-width:520px;padding:8px var(--gutter) 24px}
body.theme-focus .screen.active{animation:ff-in .25s ease} /* opacity only: a transform would break the fixed CTAs */
@keyframes ff-in{from{opacity:0}to{opacity:1}}
body.theme-focus .muted{color:var(--muted);font-weight:600}
body.theme-focus .muted b{color:var(--txt)}
body.theme-focus em.red{color:var(--corner-red)} body.theme-focus em.blue{color:var(--blue)}

/* ---------- top progress-dot navigation ---------- */
body.theme-focus #tabbar{top:0;bottom:auto;justify-content:center;gap:4px;background:rgba(251,247,241,.97);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);border-top:0;padding:calc(10px + env(safe-area-inset-top)) 8px 8px}
body.theme-focus #tabbar button{flex:0 0 auto;display:flex;align-items:center;gap:6px;min-height:34px;padding:6px 7px;background:transparent;border-radius:10px;color:var(--txt);font:800 0/1 var(--body);letter-spacing:.2px}
body.theme-focus #tabbar button::before{content:"";display:block;width:10px;height:10px;border-radius:50%;background:var(--line);transition:width .2s,background .2s,border-radius .2s}
body.theme-focus #tabbar button.on{font-size:12.5px;background:transparent}
body.theme-focus #tabbar button.on::before{width:26px;border-radius:5px;background:#ff7a1a}

/* ---------- heroes ---------- */
body.theme-focus .brand{text-align:center;padding:24px 0 4px}
body.theme-focus .wordmark{font:900 12px var(--body);letter-spacing:3px;color:#ff7a1a}
body.theme-focus .wordmark span{color:inherit}
body.theme-focus .brand p{margin:6px auto 0;color:var(--muted);font-weight:600;max-width:34ch}
body.theme-focus .brand p::before{content:"Tonight.";display:block;margin-bottom:10px;font:900 46px/1 var(--body);letter-spacing:-1.5px;color:var(--txt)}
body.theme-focus .status{color:var(--muted);font-weight:700}
body.theme-focus header.page{text-align:center;padding:24px 0 4px}
body.theme-focus header.page::before{display:block;font:900 12px var(--body);letter-spacing:3px;color:#ff7a1a}
body.theme-focus #pads header.page::before{content:"PADS"}
body.theme-focus #spar header.page::before{content:"SPARRING"}
body.theme-focus #library header.page::before{content:"MOVES"}
body.theme-focus #settings header.page::before{content:"SETUP"}
body.theme-focus header.page h1{margin:6px 0 4px;font:900 40px/1.05 var(--body);letter-spacing:-1.2px}
body.theme-focus header.page p{margin:6px auto 0;max-width:36ch;color:var(--muted);font-weight:600;font-size:15px}

/* ---------- cards / section labels ---------- */
body.theme-focus .panel{background:#fff;border:0;border-radius:18px;padding:4px 18px 6px;margin-top:22px;box-shadow:var(--shadow)}
body.theme-focus .panel h2{display:block;margin:14px 0 4px;font:900 13px var(--body);letter-spacing:3px;text-transform:uppercase;color:#ff7a1a}
body.theme-focus .panel h2 small{display:block;margin-top:4px;font:600 13px var(--body);letter-spacing:0;text-transform:none;color:var(--muted)}
body.theme-focus .panel h3{font:900 15px var(--body);color:#ff7a1a;margin:10px 0 4px}
body.theme-focus .panel > p.muted{font-size:14px;line-height:1.45}
body.theme-focus .card{background:#fff;border:0;border-radius:18px;padding:16px 18px;margin-top:12px;box-shadow:var(--shadow)}
body.theme-focus .card h4{font:900 12px var(--body);letter-spacing:2px;color:#ff7a1a}
body.theme-focus .card li{color:var(--txt);font-weight:600;font-size:15px} body.theme-focus .card p{font-weight:600;font-size:15px}
body.theme-focus .card.holder{background:#fff3e8;border:0} body.theme-focus .card.holder h4{color:#ff7a1a}

/* ---------- buttons ---------- */
body.theme-focus .btn{background:#2a231d;color:#fff;border:0;border-radius:999px;padding:14px 22px;font:900 16px var(--body)}
body.theme-focus .btn.big,body.theme-focus .btn.blue{background:#ff7a1a;padding:18px 24px;font-size:18px}
body.theme-focus .btn.small{padding:10px 16px;font-size:14px;border-radius:999px;background:#ff7a1a}
body.theme-focus .btn.ghost{background:#fff;color:var(--txt);border:0;box-shadow:0 6px 24px rgba(42,35,29,.08)}
body.theme-focus .btn:disabled{opacity:.35}

/* fixed full-width bottom CTA (home "Go", pads, sparring) */
body.theme-focus .plan-foot,body.theme-focus .sticky-cta{position:fixed;left:0;right:0;bottom:0;z-index:15;margin:0;display:grid;grid-template-columns:minmax(0,1fr);justify-content:stretch;justify-items:center;gap:8px;padding:22px var(--gutter) calc(14px + env(safe-area-inset-bottom));background:linear-gradient(rgba(251,247,241,0),#fbf7f1 34%);border:0;border-radius:0;backdrop-filter:none;-webkit-backdrop-filter:none}
body.theme-focus .plan-foot .btn,body.theme-focus .sticky-cta .btn{width:min(488px,100%)}
body.theme-focus .plan-foot .muted,body.theme-focus .sticky-cta .muted{font-size:13px;font-weight:700;text-align:center}
body.theme-focus #startPlan{font-size:0}
body.theme-focus #startPlan::after{content:"Go →";font-size:18px}

/* ---------- home ---------- */
body.theme-focus #home .panel{background:transparent;box-shadow:none;padding:0;border-radius:0}
body.theme-focus #home > section.panel:first-of-type > h2{display:none}
body.theme-focus #home details.panel{background:#fff;border-radius:18px;padding:14px 18px;margin-top:24px;box-shadow:var(--shadow)}
body.theme-focus details.panel summary{font-weight:800}
body.theme-focus ul.plain li{border-bottom:1px dashed var(--line);font-weight:600;font-size:15px;padding:8px 0}
/* session blocks as a vertical timeline */
body.theme-focus .blocks{display:block;position:relative;margin:24px 0 4px;padding-left:38px}
body.theme-focus .blocks::before{content:"";position:absolute;left:13px;top:12px;bottom:24px;width:2px;background:var(--line)}
body.theme-focus .block{position:relative;display:block;background:#fff;border:0;border-radius:18px;padding:16px 18px;margin-bottom:12px;box-shadow:var(--shadow);opacity:.5}
body.theme-focus .block.on{opacity:1;border:0}
body.theme-focus .block .tick{position:absolute;left:-38px;top:16px;width:28px;height:28px;border:0;background:var(--line);color:#fff;font-weight:900;font-size:14px}
body.theme-focus .block.on .tick{background:#ff7a1a;border:0}
body.theme-focus .block b{font-size:18px;font-weight:800} body.theme-focus .block small{font-size:14px;font-weight:600;color:var(--muted)}
body.theme-focus .block select{background:#fbf7f1;color:var(--txt);border:0;border-radius:8px;padding:4px 8px;font:700 14px var(--body)}
body.theme-focus .quick{grid-template-columns:1fr 1fr;gap:10px}
body.theme-focus .quick .btn{padding:16px 10px;font-size:15px}
/* number key as a swipe row */
body.theme-focus .numkeys{display:flex;gap:10px;overflow-x:auto;margin:10px calc(-1 * var(--gutter));padding:4px var(--gutter) 12px;scrollbar-width:none}
body.theme-focus .numkeys::-webkit-scrollbar{display:none}
body.theme-focus .numkey{flex:0 0 112px;text-align:left;background:#fff;border:0;border-radius:18px;padding:16px 14px;box-shadow:var(--shadow)}
body.theme-focus .numkey b{font:900 40px/1 var(--body);color:#ff7a1a} body.theme-focus .numkey span{font-weight:700;font-size:13px;color:var(--muted)}

/* ---------- big stacked mode buttons ---------- */
body.theme-focus .seg{display:grid;gap:8px;background:transparent;border:0;border-radius:0;padding:0;margin:18px 0 6px}
body.theme-focus .seg button{background:#fff;border:2px solid transparent;border-radius:18px;padding:16px 18px;text-align:left;font:800 17px var(--body);color:var(--muted);box-shadow:var(--shadow)}
body.theme-focus .seg button.on{background:#fff;border-color:#ff7a1a;color:var(--txt);box-shadow:var(--shadow)}
body.theme-focus #padModes [data-mode=ladder]::after{content:" — the ladder"}
body.theme-focus #padModes [data-mode=reps]::after{content:" — counted aloud"}
body.theme-focus select{color-scheme:light}
body.theme-focus .theme-select{background:#fbf7f1;color:var(--txt);border:0;border-radius:999px;padding:12px 16px;font:800 15px var(--body)}
body.theme-focus .block select option,body.theme-focus .theme-select option{background:#fff;color:#2a231d}

/* ---------- swipe carousels (levels, scenarios, rules) ---------- */
body.theme-focus #padLadder::before{content:"SWIPE →";display:block;margin:24px 0 2px;font:900 13px var(--body);letter-spacing:3px;color:#ff7a1a}
body.theme-focus #spScenWrap > h2 small::after,body.theme-focus #spRulesWrap > h2 small::after{content:" · swipe →";color:#ff7a1a;font-weight:800}
body.theme-focus .levels,body.theme-focus .checks,body.theme-focus .checks.grid2{display:flex;gap:12px;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;margin:0 calc(-1 * var(--gutter));padding:6px var(--gutter) 16px;scroll-padding:0 var(--gutter);scrollbar-width:none}
body.theme-focus .levels::-webkit-scrollbar,body.theme-focus .checks::-webkit-scrollbar{display:none}
body.theme-focus .level{flex:0 0 78%;scroll-snap-align:start;display:block;background:#fff;border:2px solid transparent;border-radius:22px;padding:20px;box-shadow:var(--shadow)}
body.theme-focus .level.on{border-color:#ff7a1a;background:#fff}
body.theme-focus .lv-id{font:900 13px var(--body);letter-spacing:2px;color:#ff7a1a;min-width:0;padding:0}
body.theme-focus .lv-name{font-size:22px;font-weight:900;margin:4px 0}
body.theme-focus .lv-blurb{font-weight:600;font-size:14px;color:var(--muted)}
body.theme-focus .lv-drills{margin-top:10px}
body.theme-focus .lv-drills span{background:#fbf7f1;border:0;border-radius:999px;padding:4px 10px;font:800 13px var(--body);letter-spacing:0}
body.theme-focus #spScenWrap,body.theme-focus #spRulesWrap{background:transparent;box-shadow:none;padding:0;border-radius:0}
body.theme-focus label.check{flex:0 0 78%;scroll-snap-align:start;display:grid;gap:8px;align-content:start;background:#fff;border:2px solid transparent;border-radius:22px;padding:18px;box-shadow:var(--shadow);opacity:.6}
body.theme-focus #spRules label.check{flex-basis:56%}
body.theme-focus label.check.on{opacity:1;border-color:#ff7a1a}
body.theme-focus label.check input{accent-color:#ff7a1a;width:20px;height:20px;margin:0}
body.theme-focus label.check b{font-size:17px;font-weight:900} body.theme-focus label.check > span{font-weight:800;font-size:16px}
body.theme-focus label.check small{font-weight:600;font-size:13px;margin-top:4px;line-height:1.4;color:var(--muted)}

/* ---------- stepper sliders: label + big orange value, slider underneath ---------- */
body.theme-focus label.slider{grid-template-columns:1fr auto;gap:4px 14px;padding:12px 0;border-bottom:1px dashed var(--line)}
body.theme-focus label.slider span{grid-column:1;grid-row:1;font-size:15px;font-weight:700}
body.theme-focus label.slider b{grid-column:2;grid-row:1;min-width:0;font:900 20px var(--body);color:#ff7a1a}
body.theme-focus label.slider input{grid-column:1/-1;grid-row:2}
body.theme-focus input[type=range]{-webkit-appearance:none;appearance:none;height:28px;margin:0;background:transparent;accent-color:#ff7a1a;cursor:pointer}
body.theme-focus input[type=range]::-webkit-slider-runnable-track{height:6px;border-radius:3px;background:#eee4d6}
body.theme-focus input[type=range]::-moz-range-track{height:6px;border-radius:3px;background:#eee4d6}
body.theme-focus input[type=range]::-moz-range-progress{height:6px;border-radius:3px;background:#ff7a1a}
body.theme-focus input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:26px;height:26px;margin-top:-10px;border-radius:50%;background:#ff7a1a;border:3px solid #fff;box-shadow:0 2px 8px rgba(42,35,29,.25)}
body.theme-focus input[type=range]::-moz-range-thumb{width:20px;height:20px;border-radius:50%;background:#ff7a1a;border:3px solid #fff;box-shadow:0 2px 8px rgba(42,35,29,.25)}

/* ---------- rows, switches, chips, inputs ---------- */
body.theme-focus label.row,body.theme-focus .row{border-bottom:1px dashed var(--line);padding:14px 0}
body.theme-focus .row b,body.theme-focus label.row b{font-weight:800} body.theme-focus .row small,body.theme-focus label.row small{display:block;margin-top:2px;font-weight:600;font-size:13px;line-height:1.4}
body.theme-focus .row .btn{line-height:1.2;text-align:center}
body.theme-focus .switch{width:52px;height:30px;border-radius:15px;background:var(--line);margin:0}
body.theme-focus .switch::after{width:24px;height:24px;box-shadow:0 1px 3px rgba(0,0,0,.2)}
body.theme-focus .switch:checked{background:#ff7a1a} body.theme-focus .switch:checked::after{left:25px}
body.theme-focus .chip{background:#fbf7f1;border:0;border-radius:999px;padding:8px 10px 8px 14px;font:900 16px var(--body);letter-spacing:0}
body.theme-focus .chip button{color:var(--faint)}
body.theme-focus .addrow input{min-width:0;background:#fbf7f1;border:0;border-radius:999px;padding:13px 18px;font:700 16px var(--body);color:var(--txt);letter-spacing:0}

/* ---------- technique ---------- */
body.theme-focus .pills{flex-wrap:nowrap;overflow-x:auto;margin:14px calc(-1 * var(--gutter)) 0;padding:4px var(--gutter) 12px;scrollbar-width:none}
body.theme-focus .pills::-webkit-scrollbar{display:none}
body.theme-focus .pill{flex:0 0 auto;background:#fff;border:2px solid transparent;border-radius:999px;padding:10px 16px;font:800 14px var(--body);color:var(--txt);box-shadow:var(--shadow-s)}
body.theme-focus .pill b{color:#ff7a1a} body.theme-focus .pill.on{background:#fff;border-color:#ff7a1a} body.theme-focus .pill.on b{color:#ff7a1a}
body.theme-focus .stage{background:#fff;border:0;border-radius:28px;padding:18px;box-shadow:var(--shadow);text-align:center}
body.theme-focus .stage-head{flex-direction:column-reverse;align-items:center}
body.theme-focus .move-name{font:900 30px var(--body);letter-spacing:-1px} body.theme-focus .move-num{font:900 56px/1 var(--body);color:#ff7a1a}
body.theme-focus #libHand{font-weight:700}
body.theme-focus .figure-wrap svg{max-height:320px}
body.theme-focus .stage .btn{position:static;margin-top:10px;background:#fbf7f1;box-shadow:none}

/* ---------- runner: the ring wraps the boxer ---------- */
body.theme-focus #run{padding-bottom:24px}
body.theme-focus .run-head{position:relative;display:block;text-align:center;padding:4px 64px 0;min-height:40px}
body.theme-focus .run-block{font:900 12px var(--body);letter-spacing:3px;color:#ff7a1a}
body.theme-focus #runTitle{font-weight:700;font-size:13px}
body.theme-focus #endBtn{position:absolute;right:0;top:0;padding:9px 16px;font-size:14px;background:#fff;color:var(--txt);box-shadow:0 6px 24px rgba(42,35,29,.08)}
body.theme-focus .run-phase{text-align:center;margin:4px 0 2px}
body.theme-focus .run-phase>div:first-child{font:900 34px/1.05 var(--body);letter-spacing:-1px}
body.theme-focus #runSub{font-weight:700;font-size:14px}
body.theme-focus #run[data-type=rest] .run-phase>div:first-child{color:var(--blue)}
body.theme-focus #run[data-type=work] .run-phase>div:first-child{color:var(--txt)}
body.theme-focus #run[data-type=done] .run-phase>div:first-child{color:var(--green)}
/* one centred square "arena": ring + figure/corners/reps share grid cell 1/1; everything else stacks below */
body.theme-focus .run-body{display:grid;grid-template-columns:minmax(0,1fr);justify-items:center;gap:0;margin-top:10px}
body.theme-focus .run-body .clock,body.theme-focus .run-body .stage-col{display:contents}
body.theme-focus .clock svg{grid-area:1/1;width:min(100%,400px);height:auto;aspect-ratio:1}
body.theme-focus .clock .track{stroke:#eee4d6;stroke-width:5}
body.theme-focus .clock .ring{stroke:#ff7a1a;stroke-width:5}
body.theme-focus #run[data-type=rest] .clock .ring{stroke:var(--blue)}
body.theme-focus #run[data-type=prep] .clock .ring,body.theme-focus #run[data-type=break] .clock .ring{stroke:#2a231d}
body.theme-focus #run[data-type=done] .clock .ring{stroke:var(--green)}
body.theme-focus #runFigure,body.theme-focus #runRoles{grid-area:1/1;align-self:stretch;width:min(100%,400px);contain:size;position:relative;z-index:1} /* above the (transformed) ring svg */
body.theme-focus #runFigure{display:grid;place-items:center;padding:13%;background:none;border:0;border-radius:50%}
body.theme-focus #runFigure svg{width:100%;height:100%;max-height:none}
body.theme-focus #runRoles{display:grid;grid-template-columns:1fr;gap:8px;align-content:center;padding:11%}
body.theme-focus .corner{min-height:0;background:#fff;border:0;border-radius:18px;padding:10px 14px;box-shadow:0 6px 24px rgba(42,35,29,.1)}
body.theme-focus .corner small{font:900 10px var(--body);letter-spacing:2px}
body.theme-focus .corner.red small{color:var(--corner-red)} body.theme-focus .corner.blue small{color:var(--blue)}
body.theme-focus .corner .name{font:900 20px var(--body);letter-spacing:0;margin:0}
body.theme-focus .corner .role{font:800 17px/1.1 var(--body);color:var(--muted);margin:2px 0 4px}
body.theme-focus .corner .task{font-size:13px;font-weight:600;line-height:1.35;color:var(--txt)}
body.theme-focus .corner.attacking,body.theme-focus .corner.blue.attacking{background:#fff;outline:2px solid #ff7a1a}
body.theme-focus .corner.attacking .role{color:#ff7a1a}
body.theme-focus #runReps{grid-area:1/1;align-self:end;margin-bottom:9%;min-height:0;padding:2px 18px;border-radius:999px;background:rgba(251,247,241,.92);position:relative;z-index:2}
body.theme-focus .reps b{font:900 64px/1 var(--body);color:#ff7a1a} body.theme-focus .reps span{font-size:20px;font-weight:800;color:var(--muted)}
/* big time under the arena */
body.theme-focus .clock .time{grid-row:2;position:static;inset:auto;display:block;margin-top:6px;font:900 44px/1.1 var(--body);letter-spacing:-2px}
body.theme-focus #run.paused .clock .time{color:var(--faint)}
body.theme-focus #run.paused .clock .time::after{content:" · PAUSED";position:static;font:900 12px var(--body);letter-spacing:3px;color:#ff7a1a}
body.theme-focus .chips-dots{grid-row:3;justify-content:center;gap:5px;margin-top:4px;min-height:8px}
body.theme-focus .chips-dots i{width:8px;height:8px;border:0;background:var(--line)}
body.theme-focus .chips-dots i.done{background:#2a231d} body.theme-focus .chips-dots i.cur{background:#ff7a1a}
body.theme-focus #runRule{grid-row:4;justify-self:stretch;margin-top:12px;font:900 26px var(--body);letter-spacing:0;background:#fff;border:0;border-radius:18px;padding:16px;box-shadow:var(--shadow)}
body.theme-focus #runCall{grid-row:5;margin-top:10px;min-height:60px}
body.theme-focus #runResting{grid-row:6;margin-top:8px;color:var(--muted);font-weight:700;font-size:14px}
body.theme-focus .call .tok{font:900 40px var(--body);letter-spacing:0;padding:4px 18px;border:0;border-radius:16px;background:#fff;color:var(--faint);box-shadow:var(--shadow-s)}
body.theme-focus .call .tok.react{font-size:20px;padding:14px 16px;color:var(--blue)}
body.theme-focus .call .tok.lit{background:#ff7a1a;color:#fff}
body.theme-focus .call .tok.react.lit{background:var(--blue);color:#fff}
body.theme-focus .next{color:var(--muted);font-weight:700;font-size:14px}
/* pause / skip as a fixed bottom pair */
body.theme-focus .run-controls{position:fixed;left:0;right:0;bottom:0;z-index:15;margin:0;display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:22px max(var(--gutter), calc(50% - 244px)) calc(14px + env(safe-area-inset-bottom));background:linear-gradient(rgba(251,247,241,0),#fbf7f1 34%)}
body.theme-focus .run-controls .btn{min-width:0;padding:16px;font-size:16px}
body.theme-focus #pauseBtn{background:#2a231d;color:#fff;box-shadow:none}

body.theme-focus .toast{background:#2a231d;border:0;color:#fff;font-weight:700;border-radius:999px;top:calc(58px + env(safe-area-inset-top))}

/* warm-up routine editor */
body.theme-focus .wu-row{background:#fbf7f1;border-color:#eee4d6;border-radius:16px}
body.theme-focus .wu-row button{border-color:#e2d8cb;border-radius:999px;background:#fff}
body.theme-focus .wu-row button[data-a="del"]{color:#e5484d}
body.theme-focus .wu-t span{color:#ff7a1a;font-weight:900}
body.theme-focus .wu-add .theme-select{flex:1 1 auto;min-width:0}
body.theme-focus #warmup header.page::before{content:"WARM-UP"}
body.theme-focus #partner header.page::before{content:"PARTNER"}
body.theme-focus .quick > :last-child:nth-child(odd){grid-column:1/-1}
body.theme-focus .nopads{margin:12px auto 0}
/* partner duo in the arena (corners move below it); preview card; four controls */
body.theme-focus #runDuo{grid-area:1/1;align-self:center;width:min(100%,400px);padding:18% 9% 12%;background:none;border:0;position:relative;z-index:1}
body.theme-focus #runDuo:not(.hidden) ~ #runRoles{grid-area:7/1/8/2;width:100%;contain:none;padding:0;margin-top:12px;grid-template-columns:1fr 1fr}
body.theme-focus .card.preview{background:#eef5ff} body.theme-focus .card.preview h4{color:var(--blue)}
body.theme-focus .run-controls{grid-template-columns:auto auto 1fr 1fr}
body.theme-focus #backBtn,body.theme-focus #restartBtn{padding:16px 14px}
