/* ==========================================================================
   Beast — Title-specific styles (the fitness / training section).
   Design tokens and generic shared components (topbar, card, btn, sheet,
   toast, switch, seg, menu-list, chip, empty-state, form basics) live in
   the shell's own stylesheet, not here — this file only holds rules that
   are unique to Beast's pages.
   ========================================================================== */

button.log-start-edit{
  display:inline-flex; align-items:center; gap:4px; border:none; background:transparent; padding:0;
  font-family:inherit; cursor:pointer; text-align:left;
}
button.log-start-edit svg{opacity:0.7;}

/* ---------- Exercise list ---------- */
.ex-card{padding:16px; display:flex; align-items:center; gap:14px; cursor:pointer;}
.ex-card:active{background:var(--surface-2);}
.ex-mono{
  width:46px; height:46px; border-radius:13px; flex-shrink:0;
  background:linear-gradient(135deg, var(--accent-400), var(--accent-700));
  color:#fff; display:flex; align-items:center; justify-content:center; font-weight:800; font-size:19px;
  font-family:var(--font-display);
}
.ex-info{flex:1; min-width:0;}
.ex-info .name{font-weight:700; font-size:20px;}
.ex-info .meta{font-size:16px; color:var(--text-muted); margin-top:2px; display:flex; gap:8px; flex-wrap:wrap;}
.chevron{color:var(--text-faint); flex-shrink:0;}

.recommend-card{
  padding:14px 16px; display:flex; align-items:center; gap:12px; cursor:pointer;
  background:linear-gradient(135deg, var(--accent-100), var(--surface));
  border-color:var(--accent-500);
}
.recommend-card:active{filter:brightness(0.97);}
.recommend-badge{
  width:40px; height:40px; border-radius:12px; flex-shrink:0; background:var(--accent-500); color:#fff;
  display:flex; align-items:center; justify-content:center;
}
.recommend-name{font-weight:800; font-family:var(--font-display); font-size:19px;}
.recommend-why{font-size:15px; color:var(--text-muted); margin-top:2px;}

/* ---------- Today's Plan (mandatory item + today's scheduled exercises) ---------- */
.plan-list{padding:2px 4px;}
.plan-item{padding:14px 12px; display:flex; align-items:center; gap:12px; cursor:pointer;}
.plan-item:active{background:var(--surface-2);}
.plan-item-done{cursor:default;}
.plan-item-done:active{background:transparent;}
.plan-item-icon{
  width:38px; height:38px; border-radius:11px; flex-shrink:0;
  display:flex; align-items:center; justify-content:center; color:#fff;
}
.plan-item-icon-mandatory{background:linear-gradient(135deg, var(--accent-400), var(--accent-700));}
.plan-item-icon-scheduled{background:var(--accent-500);}
.plan-item-done .plan-item-icon{background:var(--success);}
.plan-item-body{flex:1; min-width:0;}
.plan-item-name{font-weight:800; font-family:var(--font-display); font-size:18px;}
.plan-item-sub{font-size:15px; color:var(--text-muted); margin-top:2px;}
.plan-item-done .plan-item-sub{color:var(--success);}
.plan-sheet-actions{display:flex; flex-direction:column; gap:10px; padding-top:4px;}

/* ---------- Mini Beast picker ---------- */
.mini-beast-intro{font-size:15px; color:var(--text-muted); line-height:1.45; margin-bottom:14px;}
.mini-beast-list{max-height:52vh; overflow-y:auto; margin:0 -4px; padding:0 4px;}
.mini-beast-group{margin-bottom:14px;}
.mini-beast-group-label{font-size:13px; font-weight:800; text-transform:uppercase; letter-spacing:.05em; color:var(--text-faint); margin-bottom:6px; padding:0 2px;}
.mini-beast-item{
  display:flex; align-items:flex-start; gap:10px; padding:11px 8px; border-radius:12px; cursor:pointer;
  border-bottom:1px solid var(--border);
}
.mini-beast-group .mini-beast-item:last-child{border-bottom:none;}
.mini-beast-item:active{background:var(--surface-2);}
.mini-beast-bullet{
  width:26px; height:26px; border-radius:50%; flex-shrink:0; margin-top:1px;
  background:var(--accent-100); color:var(--accent-500); display:flex; align-items:center; justify-content:center;
}
.mini-beast-text{font-size:16px; line-height:1.35; padding-top:2px;}

/* ---------- Stats row ---------- */
.stat-row{display:grid; grid-template-columns:repeat(3,1fr); gap:10px;}
.stat-tile{padding:14px 10px; text-align:center;}
.stat-tile .v{font-family:var(--font-display); font-weight:800; font-size:27.5px;}
.stat-tile .l{font-size:14px; color:var(--text-muted); margin-top:2px; text-transform:uppercase; letter-spacing:.04em;}
.trend-up{color:var(--success);} .trend-down{color:var(--danger);} .trend-flat{color:var(--text-muted);}

/* ---------- Chart ---------- */
.chart-card{padding:16px 12px 8px;}
.chart-head{display:flex; justify-content:space-between; align-items:baseline; padding:0 6px 6px;}
.chart-head h3{margin:0; font-size:17.5px;}
.chart-wrap{position:relative;}
svg.chart-svg{display:block; width:100%; height:auto; overflow:visible;}
.chart-tooltip{
  position:absolute; pointer-events:none; background:var(--surface); border:1px solid var(--border-strong);
  border-radius:10px; padding:6px 10px; font-size:15px; box-shadow:var(--shadow-md); white-space:nowrap;
  transform:translate(-50%,-115%); opacity:0; transition:opacity .1s;
}
.chart-tooltip.show{opacity:1;}
.chart-tooltip .tt-day{color:var(--text-muted); font-size:14px;}
.chart-tooltip .tt-val{font-weight:700; font-family:var(--font-display);}

/* ---------- History table ---------- */
.hist-row{padding:13px 14px; border-bottom:1px solid var(--border); cursor:pointer;}
.hist-row:last-child{border-bottom:none;}
.hist-row:active{background:var(--surface-2);}
.hist-top{display:flex; align-items:center; gap:10px;}
.hist-day{font-weight:800; font-family:var(--font-display); font-size:17.5px; width:68px; flex-shrink:0; white-space:nowrap;}
.hist-date{flex:1; font-size:16px; color:var(--text-muted); min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.hist-total{font-weight:800; font-family:var(--font-display); font-size:19px; flex-shrink:0;}
.hist-detail{margin-top:10px; display:none;}
.hist-row.open .hist-detail{display:block;}
.hist-levels{display:flex; flex-wrap:wrap; gap:6px; margin-bottom:8px;}
.lvl-pill{background:var(--surface-2); border-radius:8px; padding:5px 9px; font-size:15px;}
.lvl-pill b{font-family:var(--font-display); margin-left:4px;}
.hist-notes{font-size:16px; color:var(--text-muted); background:var(--surface-2); border-radius:10px; padding:8px 10px; margin-bottom:8px; white-space:pre-wrap;}
.hist-actions{display:flex; gap:8px;}

/* ---------- FAB ---------- */
.fab-row{position:sticky; bottom:0; padding:12px 16px calc(16px + env(safe-area-inset-bottom,0px)); background:linear-gradient(var(--bg-transparent,transparent), var(--bg) 30%); }

/* ---------- Log flow ---------- */
.log-wrap{display:flex; flex-direction:column; gap:18px; flex:1;}
.progress-dots{display:flex; gap:6px; justify-content:center;}
.progress-dots .dot{width:8px; height:8px; border-radius:50%; background:var(--surface-3);}
.progress-dots .dot.done{background:var(--success);}
.progress-dots .dot.active{background:var(--accent-500); transform:scale(1.3);}
.level-title{text-align:center;}
.level-title .eyebrow{font-size:15px; font-weight:700; color:var(--text-muted); text-transform:uppercase; letter-spacing:.06em;}
.level-title h2{margin:4px 0 0; font-size:30px;}
.level-title .prev{font-size:16px; color:var(--text-faint); margin-top:4px;}

.dial-card{padding:8px 20px 20px; display:flex; flex-direction:column; align-items:center; gap:6px;}
.dial-outer{position:relative; width:100%; display:flex; align-items:center; justify-content:center; gap:14px;}
.dial-stepper{
  width:44px; height:44px; border-radius:50%; border:1px solid var(--border); background:var(--surface-2);
  color:var(--text); font-size:25px; display:flex; align-items:center; justify-content:center; cursor:pointer; flex-shrink:0;
  font-family:var(--font-display); font-weight:700;
}
.dial-stepper:active{background:var(--surface-3);}
.dial-viewport{
  position:relative; height:168px; width:150px; overflow:hidden; -webkit-mask-image:linear-gradient(to bottom, transparent 0%, #000 30%, #000 70%, transparent 100%);
  mask-image:linear-gradient(to bottom, transparent 0%, #000 30%, #000 70%, transparent 100%);
}
.dial-scroll{height:100%; overflow-y:scroll; scroll-snap-type:y mandatory; scrollbar-width:none;}
.dial-scroll::-webkit-scrollbar{display:none;}
.dial-pad{height:56px;}
.dial-item{
  height:56px; scroll-snap-align:center; display:flex; align-items:center; justify-content:center;
  font-family:var(--font-display); font-weight:700; font-size:25px; color:var(--text-faint);
}
.dial-item.center{font-size:42.5px; color:var(--text); cursor:text;}
.dial-indicator{
  position:absolute; top:50%; left:0; right:0; height:56px; transform:translateY(-50%);
  border-top:1.5px solid var(--border-strong); border-bottom:1.5px solid var(--border-strong);
  pointer-events:none;
}
.dial-edit-input{
  font-family:var(--font-display); font-weight:700; font-size:42.5px; text-align:center; width:120px;
  background:transparent; border:none; border-bottom:2px solid var(--accent-500); color:var(--text); outline:none;
}
.dial-unit{font-size:15px; color:var(--text-muted); text-transform:uppercase; letter-spacing:.05em; text-align:center;}

/* ---------- Dial: label mode (the difficulty picker spins text, not numbers) ---------- */
.dial-viewport-wide{width:260px;}
.dial-item-label{
  font-size:16px; font-weight:600; text-align:center; padding:0 10px; line-height:1.2;
  white-space:normal;
}
.dial-item-label.center{font-size:19px; font-weight:800; color:var(--text); cursor:default;}

.rest-card{padding:28px 20px; text-align:center; display:flex; flex-direction:column; align-items:center; gap:10px;}
.rest-ring{position:relative; width:150px; height:150px;}
.rest-ring svg{transform:rotate(-90deg);}
.rest-ring .ring-time{
  position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  font-family:var(--font-display); font-weight:800; font-size:37.5px;
}
.rest-label{font-size:16px; color:var(--text-muted); text-transform:uppercase; letter-spacing:.05em; font-weight:700;}

.notes-card{padding:16px;}

/* ---------- Add / Edit exercise form ---------- */
.level-row{display:flex; align-items:center; gap:8px; margin-bottom:8px;}
.level-row input{flex:1;}
.level-row .lv-btn{width:36px; height:36px; border-radius:10px; border:1px solid var(--border); background:var(--surface-2); color:var(--text-muted); display:flex; align-items:center; justify-content:center; cursor:pointer; flex-shrink:0;}
.level-row .lv-btn:active{background:var(--surface-3);}

.share-text{
  background:var(--surface-2); border:1px solid var(--border); border-radius:12px; padding:12px;
  font-family:ui-monospace,'IBM Plex Mono',monospace; font-size:15.5px; white-space:pre-wrap; line-height:1.55;
  max-height:280px; overflow-y:auto; color:var(--text);
}

/* ---------- Onboarding / intro ---------- */
.onboard-wrap{position:fixed; inset:0; background:var(--bg); z-index:60; display:flex; flex-direction:column;
  padding-top:env(safe-area-inset-top,0px); padding-bottom:env(safe-area-inset-bottom,0px); max-width:560px; margin:0 auto;}
.onboard-top{display:flex; align-items:center; justify-content:space-between; padding:16px 16px 4px;}
.onboard-top .progress-dots{flex:1;}
.onboard-page{flex:1; overflow-y:auto; padding:8px 20px 20px; display:flex; flex-direction:column; gap:16px;}
.onboard-nav{display:flex; gap:10px; padding:12px 20px calc(16px + env(safe-area-inset-bottom,0px));}
.onboard-hero{display:flex; flex-direction:column; align-items:center; text-align:center; gap:14px; padding:24px 4px 8px;}
.onboard-badge{padding:10px 14px;}
.onboard-badge img{height:22px;}
.onboard-badge-plain{
  width:64px; height:64px; border-radius:50%; background:var(--success-100); color:var(--success);
  display:flex; align-items:center; justify-content:center;
}
.onboard-h1{font-size:29px; margin:0; letter-spacing:-0.02em; line-height:1.12;}
.onboard-h2{font-size:23px; margin:0; letter-spacing:-0.01em; line-height:1.15;}
.onboard-sub{font-size:16px; color:var(--text-muted); line-height:1.5; margin:0;}
.onboard-feature-list{display:flex; flex-direction:column; gap:4px; margin-top:6px;}
.onboard-feature{display:flex; align-items:flex-start; gap:14px; padding:13px 4px; border-bottom:1px solid var(--border);}
.onboard-feature:last-child{border-bottom:none;}
.onboard-feature svg{flex-shrink:0; margin-top:2px; color:var(--accent-500);}
.onboard-feature b{display:block; font-size:16px;}
.onboard-feature span{display:block; font-size:15px; color:var(--text-muted); margin-top:2px; line-height:1.4;}
.onboard-page-head{display:flex;}
.onboard-sample-chip{background:var(--accent-100); color:var(--accent-500); font-weight:700;}
.onboard-share-preview{border:1px dashed var(--border-strong); border-radius:var(--radius); padding:14px;}
.onboard-share-head{font-weight:700; font-size:15px; display:flex; align-items:center; gap:6px; margin-bottom:10px;}
.howto-card{padding:16px;}
.howto-head{display:flex; align-items:center; gap:10px; margin-bottom:12px;}
.howto-icon{width:34px; height:34px; border-radius:9px; background:var(--accent-100); color:var(--accent-500); display:flex; align-items:center; justify-content:center; flex-shrink:0;}
.howto-head h3{margin:0; font-size:16px;}
.howto-steps{display:flex; flex-direction:column; gap:11px;}
.howto-step{display:flex; gap:10px; align-items:flex-start;}
.howto-num{width:22px; height:22px; border-radius:50%; background:var(--surface-2); color:var(--text); font-size:12px; font-weight:800; font-family:var(--font-display); display:flex; align-items:center; justify-content:center; flex-shrink:0; margin-top:1px;}
.howto-step p{margin:0; font-size:14.5px; color:var(--text); line-height:1.45;}
.howto-step b{font-weight:700;}

/* ---------- Weekly schedule / calendar ---------- */
.sched-day{padding:12px 2px; border-bottom:1px solid var(--border);}
.sched-day:last-child{border-bottom:none;}
.sched-day.today .sched-day-name{color:var(--accent-500);}
.sched-day-head{display:flex; align-items:center; margin-bottom:8px;}
.sched-day-name{font-weight:700; font-size:17px;}
.sched-day-body{display:flex; flex-wrap:wrap; gap:8px; min-height:44px; border-radius:10px; transition:background .12s, outline-color .12s; padding:2px;}
.sched-day-body.drag-over{background:var(--accent-100); outline:2px dashed var(--accent-500); outline-offset:2px;}
.sched-empty{font-size:15px; color:var(--text-faint); padding:9px 4px;}
.sched-chip{
  display:flex; align-items:center; gap:6px; background:var(--surface-2); border:1px solid var(--border);
  border-radius:999px; padding:8px 14px 8px 9px; font-size:16px; font-weight:600; cursor:grab; touch-action:none;
  -webkit-user-select:none; user-select:none;
}
.sched-chip.dragging{opacity:0.35;}
.sched-chip-drag{color:var(--text-faint); display:flex; flex-shrink:0;}
.sched-chip-pinned{
  cursor:default; touch-action:auto; background:linear-gradient(135deg, var(--accent-100), var(--surface));
  border-color:var(--accent-500); color:var(--accent-700);
}
.sched-chip-pinned .sched-chip-drag{color:var(--accent-500);}
.sched-ghost{
  position:fixed; z-index:90; pointer-events:none; display:flex; align-items:center; gap:6px;
  background:var(--surface); border:1px solid var(--accent-500); border-radius:999px; padding:8px 14px 8px 9px;
  font-size:16px; font-weight:600; box-shadow:var(--shadow-md); color:var(--text); left:0; top:0;
}

/* BEAST Den: skip-today row under Today's Plan */
.plan-skip-row{padding:4px 14px 10px;text-align:right;font-size:13px;color:var(--text-faint);}

/* ---------- Exercise types (Progress-er / Reps & Sets / Timed) ---------- */
.chip-type{background:var(--accent-100); color:var(--accent-700);}
.type-intro{font-size:16px; color:var(--text-muted); margin:-4px 0 14px;}
.type-card{
  width:100%; display:flex; align-items:center; gap:14px; text-align:left; cursor:pointer;
  background:var(--surface); border:1.5px solid var(--border); border-radius:var(--radius);
  padding:14px; margin-bottom:10px; font-family:inherit; color:inherit;
}
.type-card:active{background:var(--surface-2); border-color:var(--accent-500);}
.type-ico{
  width:44px; height:44px; border-radius:12px; flex-shrink:0; color:#fff;
  background:linear-gradient(135deg, var(--accent-400), var(--accent-700));
  display:flex; align-items:center; justify-content:center;
}
.type-txt{flex:1; min-width:0; display:flex; flex-direction:column; gap:3px;}
.type-txt b{font-family:var(--font-display); font-size:19px;}
.type-txt span{font-size:15px; color:var(--text-muted); line-height:1.35;}
.type-chev{color:var(--text-faint); flex-shrink:0;}
.type-banner{
  display:flex; align-items:center; gap:10px; margin:0 0 14px; padding:8px 10px;
  background:var(--surface-2); border-radius:12px; font-size:17px;
}
.type-banner .type-ico{width:32px; height:32px; border-radius:9px;}

/* Reps & Sets log */
.set-row{padding:12px 14px;}
.set-row-head{display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; font-family:var(--font-display); font-size:18px;}
.set-fields{display:grid; grid-template-columns:1fr 1fr; gap:12px;}
.sf-label{font-size:14px; color:var(--text-muted); margin-bottom:4px; font-weight:600;}
.sf-ctl{display:flex; align-items:center; gap:6px;}
.sf-ctl input{
  flex:1; min-width:0; width:100%; text-align:center; font-family:var(--font-display); font-weight:800; font-size:22px;
  padding:8px 2px; border:1.5px solid var(--border); border-radius:10px; background:var(--surface); color:var(--text);
}
.sf-ctl .dial-stepper{width:38px; height:38px; flex-shrink:0;}

/* Timed log */
.timer-card{padding:22px 16px; display:flex; flex-direction:column; align-items:center; gap:16px; text-align:center;}
.big-clock{font-family:var(--font-display); font-weight:800; font-size:64px; letter-spacing:-1px; line-height:1;}
.timer-btns{display:flex; gap:10px; flex-wrap:wrap; justify-content:center; width:100%;}
.timer-btns .btn{flex:1; min-width:96px;}
.manual-row{display:flex; align-items:flex-end; gap:10px; justify-content:center; width:100%;}
.manual-colon{font-family:var(--font-display); font-weight:800; font-size:34px; padding-bottom:6px;}
.manual-row .set-field{flex:1; max-width:140px;}
.manual-in{
  width:100%; text-align:center; font-family:var(--font-display); font-weight:800; font-size:32px;
  padding:10px 4px; border:1.5px solid var(--border); border-radius:12px; background:var(--surface); color:var(--text);
}
#timed-mode-seg{margin-bottom:4px;}

/* Tabata */
.tabata-setup{padding:6px 16px;}
.tb-row{display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px 0; border-bottom:1px solid var(--border);}
.tb-row .tb-label{font-weight:700; font-size:17px; flex:1;}
.tb-row .stepper-row .val{min-width:70px; font-size:20px;}
.tb-total{padding:12px 0 8px; text-align:center; color:var(--text-muted); font-size:16px;}
.tb-run{padding:20px 16px; display:flex; flex-direction:column; align-items:center; gap:10px; text-align:center;}
.tb-phase{font-family:var(--font-display); font-weight:800; font-size:34px; letter-spacing:0.5px; text-transform:uppercase;}
.tb-round{font-size:17px; color:var(--text-muted);}
.tb-ring{color:var(--accent-500); width:190px; height:190px;}
.tb-ring .ring-time{font-size:56px;}
.tb-countdown .tb-ring, .tb-countdown .tb-phase{color:#d99a00;}
.tb-work .tb-ring, .tb-work .tb-phase{color:#2a8fd0;}
.tb-rest .tb-ring, .tb-rest .tb-phase{color:#3b82c4;}
.tb-cooldown .tb-ring, .tb-cooldown .tb-phase{color:#8a63c9;}
.tb-ring .ring-time{color:var(--text);}

/* Right / left leg exercises (Pistol Squats) */
.start-leg{margin:0 0 4px;}
.start-leg .hint{font-size:14px;color:var(--text-muted);margin-top:6px;text-align:center;}
.side-badge{display:inline-block;margin-top:8px;padding:6px 18px;border-radius:999px;font-family:var(--font-display);font-weight:800;font-size:19px;letter-spacing:.02em;background:var(--accent-100);color:var(--accent-700);}
.side-badge.side-left{background:color-mix(in srgb,#3b82c4 18%,var(--surface));color:#245f95;}
:root[data-theme="dark"] .side-badge.side-left{color:#8fc0ee;}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .side-badge.side-left{color:#8fc0ee;}}

/* ---------- Den: equal Today's Plan rows, Skip on each, Why as a button, compact grouped exercises ---------- */
.plan-head{display:flex; align-items:center; justify-content:space-between; gap:10px; margin:4px 0 0;}
.plan-head .section-label{margin:0;}
.plan-why-btn{
  appearance:none; display:inline-flex; align-items:center; gap:7px; cursor:pointer; white-space:nowrap;
  background:var(--surface); color:var(--accent-600); border:1.5px solid var(--accent-500); border-radius:999px;
  padding:6px 12px 6px 7px; font-family:inherit; font-weight:800; font-size:13px; box-shadow:var(--shadow-sm);
}
.plan-why-btn:active{background:var(--accent-100);}
.why-q{width:20px; height:20px; border-radius:50%; background:var(--accent-500); color:#fff; display:inline-flex; align-items:center; justify-content:center; font-size:12px; font-weight:900;}
:root[data-theme="dark"] .why-q{color:#06182a;}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .why-q{color:#06182a;}}
.plan-list .plan-item{height:66px; min-height:66px; padding:0 12px; box-sizing:border-box; gap:11px;}
.plan-list .plan-item-icon-mandatory,.plan-list .plan-item-icon-scheduled{background:linear-gradient(135deg, var(--accent-400), var(--accent-700));}
.plan-list .plan-item-done .plan-item-icon{background:var(--success);}
.plan-list .plan-item-skipped .plan-item-icon{background:var(--text-faint);}
.plan-list .plan-item-name{font-size:16.5px; line-height:1.15; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;}
.plan-list .plan-item-sub{font-size:14px; line-height:1.2; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-top:2px;}
.plan-list .plan-item-skipped .plan-item-name{color:var(--text-muted);}
.plan-skip-btn{
  appearance:none; flex:none; cursor:pointer; background:transparent; color:var(--text-muted);
  border:1px solid var(--border); border-radius:10px; padding:6px 11px; font-family:inherit; font-weight:700; font-size:13px;
}
.plan-skip-btn:active{background:var(--surface-2);}
.plan-skip-btn.is-undo{color:var(--accent-600); border-color:var(--accent-500);}

.ex-group-head{display:flex; align-items:baseline; gap:8px; margin:14px 2px 6px; font-size:13px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; color:var(--text-muted);}
.ex-group-head b{font-weight:700; color:var(--text-faint);}
.ex-group{padding:0;}
.ex-card.ex-row{padding:0 12px; height:50px; box-sizing:border-box; gap:11px;}
.ex-row .ex-mono{width:32px; height:32px; border-radius:10px; font-size:13px;}
.ex-row .ex-info .name{font-size:16px; line-height:1.15; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.ex-row .ex-info .meta{display:block; font-size:12.5px; line-height:1.2; margin-top:1px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.ex-tpw{flex:none; font-size:12px; font-weight:800; color:var(--accent-700); background:var(--accent-100); border-radius:999px; padding:3px 9px;}
.ex-row .chevron{margin-left:-4px;}

/* Missed Day option in the BEAST action sheet */
.plan-sheet-actions .plan-missed-btn{color:var(--text-muted);font-weight:600;}

/* ===== Sunday Challenge ===== */
.ch-wrap{gap:14px;}
.ch-intro{margin:0;color:var(--text-muted);font-size:15.5px;}
.ch-mode{width:100%;text-align:left;padding:14px 16px;border:2px solid var(--border);cursor:pointer;font:inherit;color:var(--text);}
.ch-mode.is-on{border-color:var(--accent-500);background:var(--accent-100);}
.ch-mode-head{display:flex;align-items:center;justify-content:space-between;font-family:var(--font-display);font-size:20px;}
.ch-radio{width:22px;height:22px;border-radius:50%;border:2px solid var(--border-strong);flex:none;}
.ch-mode.is-on .ch-radio{border-color:var(--accent-500);background:radial-gradient(circle,var(--accent-500) 0 45%,transparent 50%);}
.ch-mode-sub{margin-top:4px;font-size:14.5px;color:var(--text-muted);}
.ch-list{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px;}
.ch-list span{font-size:13px;font-weight:600;padding:4px 9px;border-radius:999px;background:var(--surface-2);color:var(--text);}
.ch-mode.is-on .ch-list span{background:var(--surface);}
.ch-setpick{display:flex;justify-content:center;}
.ch-last{font-size:14px;color:var(--text-muted);text-align:center;}
.ch-note-card{padding:14px 16px;display:flex;flex-direction:column;gap:8px;}
.ch-note{height:46px;border-radius:12px;border:1px solid var(--border-strong);background:var(--surface);color:var(--text);padding:0 12px;font:inherit;font-size:16px;width:100%;box-sizing:border-box;}
.ch-note-chips{display:flex;flex-wrap:wrap;gap:6px;}
.ch-stepper{display:flex;align-items:center;justify-content:center;gap:14px;}
.ch-step-btn{width:64px;height:64px;border-radius:18px;border:1px solid var(--border-strong);background:var(--surface-2);color:var(--text);font-size:34px;font-weight:700;cursor:pointer;line-height:1;}
.ch-reps{width:110px;height:76px;text-align:center;font-family:var(--font-display);font-weight:800;font-size:54px;border:0;background:transparent;color:var(--text);}
.ch-unit{font-size:15px;color:var(--text-muted);margin-top:-6px;}
.ch-live{font-size:20px;font-weight:800;color:var(--accent-600);}
.ch-or{font-size:13.5px;color:var(--text-faint);}
.ch-secs{width:150px;text-align:center;}
.ch-total{text-align:center;padding:20px 16px;}
.ch-total-num{font-family:var(--font-display);font-weight:800;font-size:64px;line-height:1;color:var(--accent-600);}
.ch-total-num small,.ch-h-score small,.ch-sum-pts small{font-size:.38em;font-weight:700;color:var(--text-muted);}
.ch-total-sub{margin-top:6px;color:var(--text-muted);font-size:15px;}
.ch-sum{padding:4px 14px;}
.ch-sum-row{display:flex;align-items:center;gap:10px;padding:12px 0;border-top:1px solid var(--border);}
.ch-sum-row:first-child{border-top:0;}
.ch-sum-main{flex:1;min-width:0;}
.ch-sum-name{font-weight:700;font-size:16px;}
.ch-sum-detail{font-size:13.5px;color:var(--text-muted);word-break:break-word;}
.ch-sum-pts{font-family:var(--font-display);font-weight:800;font-size:22px;white-space:nowrap;}
.ch-sum-edit{flex:none;width:36px;height:36px;border-radius:10px;border:0;background:transparent;color:var(--text-muted);display:grid;place-items:center;cursor:pointer;}
.ch-pair{text-align:center;font-size:15px;color:var(--text-muted);}
.ch-pair b{color:var(--text);}
.ch-menu-sub{margin-left:auto;font-size:13.5px;color:var(--text-muted);text-align:right;white-space:nowrap;}
.sched-chip-challenge{cursor:pointer;}
.sched-chip-challenge .sched-chip-go{margin-left:auto;color:var(--text-faint);display:grid;place-items:center;}
.ch-h-run{padding:14px 16px;margin-bottom:12px;}
.ch-h-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;margin-bottom:8px;}
.ch-h-date{font-size:13.5px;color:var(--text-muted);}
.ch-h-score{font-family:var(--font-display);font-weight:800;font-size:28px;color:var(--accent-600);}
.ch-h-item{display:flex;gap:10px;justify-content:space-between;font-size:14px;padding:5px 0;border-top:1px solid var(--border);}
.ch-h-item span:first-child{font-weight:600;flex:none;}
.ch-h-item span:nth-child(2){flex:1;text-align:right;color:var(--text-muted);word-break:break-word;}
.ch-h-del{margin-top:6px;color:var(--text-faint);}
/* the Sunday Challenge door stays one slim line so the exercise list keeps its room */
.den-menu .menu-item{padding:8px 6px;}
.den-menu .menu-item.ch-door{font-size:17px;white-space:nowrap;border-top:1px solid var(--border);border-radius:0;}

/* add / change a past challenge */
.ch-form-item{gap:6px;}
.ch-form-head{display:flex;justify-content:space-between;align-items:baseline;gap:8px;font-size:17px;}
.ch-form-rule{font-size:13.5px;color:var(--text-muted);margin-bottom:2px;}
.ch-h-actions{display:flex;gap:8px;margin-top:8px;align-items:center;}
.ch-h-actions .ch-h-del{margin-top:0;}

/* ---- Beast Report and the plan % on "Your exercises" ---- */
.ex-card.ex-row.has-fill{position:relative; overflow:hidden;}
.ex-card.ex-row.has-fill>*:not(.pfill){position:relative; z-index:1;}
.ex-plan{flex:none; display:flex; flex-direction:column; align-items:flex-end; line-height:1.05; min-width:44px;}
.ex-plan b{font-size:15px; font-weight:800; color:var(--text);}
.ex-plan small{font-size:11px; font-weight:800; color:var(--accent-700);}
.br-main{display:flex; flex-direction:column; gap:12px; padding-top:12px;}
.br-range{display:flex; gap:8px;}
.br-range button{flex:1; font:inherit; font-size:15px; font-weight:700; padding:10px 8px; min-height:44px; border-radius:12px; border:1.5px solid var(--border-strong,var(--border)); background:var(--surface); color:var(--text); cursor:pointer;}
.br-range button.is-on{border-color:var(--accent-500); background:var(--accent-100); color:var(--accent-700);}
.br-card{padding:15px 16px; border-radius:18px; border:1px solid var(--border); background:var(--surface); box-shadow:var(--shadow-sm);}
.br-card h3{margin:0 0 8px; font-family:var(--font-display); font-weight:800; font-size:18px; letter-spacing:-.01em;}
.br-big{display:flex; align-items:baseline; gap:10px; flex-wrap:wrap;}
.br-big .num{font-family:var(--font-display); font-weight:800; font-size:40px; line-height:1;}
.br-big-s{font-size:14px; font-weight:700; color:var(--text-muted);}
.br-track{display:block; height:9px; border-radius:99px; background:var(--surface-3,var(--surface-2)); margin-top:8px; overflow:hidden;}
.br-track i{display:block; height:100%; border-radius:99px; background:var(--accent-500); transition:width .5s ease;}
.br-lead{margin:8px 0 0; font-size:14px; line-height:1.45; color:var(--text-muted);}
.br-ex{padding:10px 0; border-top:1px solid var(--border); cursor:pointer;}
.br-card h3+.br-ex{border-top:0;}
.br-ex-top{display:flex; justify-content:space-between; align-items:baseline; gap:10px;}
.br-ex-n{font-weight:800; font-size:16px;}
.br-ex-v{font-family:var(--font-display); font-weight:800; font-size:17px;}
.br-ex-s{margin-top:5px; font-size:13px; color:var(--text-muted);}
.br-advice{background:var(--accent-100); border-color:var(--accent-line,var(--accent-400));}
.br-advice p{margin:0 0 9px; font-size:15.5px; line-height:1.5;}
.br-small{font-size:13px!important; color:var(--text-muted);}
.br-how{margin:2px 2px 0; font-size:13px; line-height:1.45; color:var(--text-muted);}
.br-sheet-list{margin:0 0 12px; padding-left:20px; font-size:16px; line-height:1.6;}
@media (prefers-reduced-motion:reduce){.br-track i{transition:none;}}
.den-menu .menu-item.br-door{white-space:nowrap;}
.den-menu .ch-door .ch-menu-sub,.den-menu .ch-door .br-menu-sub{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;}
.br-menu-sub{margin-left:auto;font-size:13.5px;color:var(--text-muted);text-align:right;white-space:nowrap;}

.br-head{display:flex; align-items:center; justify-content:space-between; gap:10px;}
.br-head .section-label{margin-bottom:0;}
.br-link{appearance:none; font:inherit; font-size:14px; font-weight:800; display:inline-flex; align-items:center; gap:6px; position:relative; min-height:30px; margin:-6px 0 -6px; padding:3px 11px; border-radius:999px; border:1.5px solid var(--accent-400); background:var(--accent-100); color:var(--accent-700); cursor:pointer;}
.br-link:active{transform:scale(.97);}
.br-link::after{content:""; position:absolute; inset:-8px -4px;}

/* ---------- Den intro (v64): "Welcome to Your Den", 4 pages ---------- */
.den-intro .onboard-top{gap:12px;}
.den-onboard-counter{font-size:13px; font-weight:700; color:var(--text-muted); font-variant-numeric:tabular-nums; white-space:nowrap;}
.den-intro .onboard-page{gap:0; padding:6px 20px 16px;}
.den-screen{display:flex; flex-direction:column; gap:14px; padding:6px 0 4px;}
.den-screen svg{flex-shrink:0;}
.den-logo{align-self:center; width:92px; height:92px; border-radius:24px; display:flex; flex-direction:column; align-items:center; justify-content:center;
  background:linear-gradient(145deg,var(--accent-100),var(--surface-2)); border:1px solid var(--border-strong); color:var(--accent-500); line-height:1; gap:1px;}
.den-logo svg{width:26px; height:26px; margin-bottom:3px;}
.den-logo small{font-size:10px; font-weight:700; letter-spacing:.16em; color:var(--text-muted);}
.den-logo b{font-size:22px; font-weight:800; letter-spacing:.08em; color:var(--text);}
.den-logo-final{width:84px; height:84px;}
.den-hero-copy{display:flex; flex-direction:column; gap:10px; text-align:center;}
.den-eyebrow,.den-screen-kicker{font-size:12px; font-weight:800; letter-spacing:.14em; color:var(--accent-500); text-transform:uppercase;}
.den-first .den-eyebrow{text-align:center;}
.den-headline{margin:0; font-size:27px; line-height:1.14; letter-spacing:-.02em; color:var(--text);}
.den-headline em{font-style:normal; color:var(--accent-500);}
.den-first .den-headline{font-size:31px; text-align:center;}
.den-lead{margin:0; font-size:16.5px; line-height:1.5; color:var(--text);}
.den-lead strong{font-weight:700;}
.den-support{margin:0; font-size:15.5px; line-height:1.5; color:var(--text-muted);}
.den-support strong{color:var(--text);}
.den-first .den-lead,.den-first .den-support{text-align:center;}
.den-feature-list,.den-mode-list,.den-exercises,.den-steps{display:flex; flex-direction:column; gap:8px;}
.den-feature,.den-mode,.den-exercise{display:flex; align-items:center; gap:12px; padding:12px 14px; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-sm);}
.den-feature>div,.den-mode>div,.den-exercise>div{flex:1; min-width:0;}
.den-feature strong,.den-mode strong,.den-exercise strong{display:block; font-size:15.5px; color:var(--text);}
.den-feature span:not(.den-feature-icon),.den-mode>div>span,.den-exercise>div>span{display:block; font-size:14px; line-height:1.4; color:var(--text-muted); margin-top:1px;}
.den-feature-icon,.den-mode-icon,.den-exercise-icon{width:38px; height:38px; border-radius:11px; display:flex; align-items:center; justify-content:center; background:var(--accent-100); color:var(--accent-500); flex-shrink:0;}
.den-mode-check{color:var(--accent-500); display:flex;}
.den-mode-check svg{width:20px; height:20px;}
.den-exercise-tag{font-size:11px; font-weight:800; letter-spacing:.1em; color:var(--accent-500); background:var(--accent-100); border-radius:999px; padding:4px 9px; white-space:nowrap;}
.den-mantra{text-align:center; font-size:12px; font-weight:800; letter-spacing:.14em; color:var(--text-muted); padding-top:4px;}
.den-insight{padding:14px 16px; border-radius:var(--radius-sm); background:var(--accent-100); border:1px solid var(--border-strong); font-size:15.5px; line-height:1.5; color:var(--text);}
.den-insight-soft{background:var(--surface-2); border-color:var(--border);}
.den-step{display:flex; align-items:flex-start; gap:12px; padding:12px 14px; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-sm);}
.den-step-number{width:30px; height:30px; border-radius:50%; background:var(--accent-500); color:#fff; font-weight:800; display:flex; align-items:center; justify-content:center; flex-shrink:0;}
.den-step b{display:block; font-size:15.5px; color:var(--text);}
.den-step span{display:block; font-size:14px; line-height:1.4; color:var(--text-muted); margin-top:1px;}
.den-last-word{text-align:center; padding:6px 8px 0;}
.den-last-word b{display:block; font-size:17px; line-height:1.3; color:var(--text);}
.den-last-word span{display:block; font-size:15px; color:var(--text-muted); margin-top:3px;}
.den-final .den-logo-final{margin-bottom:-2px;}
.den-final .den-screen-kicker{text-align:center;}
.den-final .den-headline,.den-final .den-lead{text-align:center;}
@media (max-width:360px){
  .den-first .den-headline{font-size:27px;} .den-headline{font-size:23px;} .den-logo{width:76px; height:76px;} .den-logo b{font-size:19px;}
  .den-lead{font-size:15.5px;} .den-feature,.den-mode,.den-exercise{padding:10px 11px; gap:10px;}
}
@media (max-height:640px){
  .den-logo,.den-logo-final{width:64px; height:64px;} .den-logo svg{display:none;} .den-screen{gap:10px;}
}

/* ---------- Your Den header (v64) ---------- */
.den-badge{width:44px; height:44px; border-radius:14px; flex-shrink:0; display:flex; align-items:center; justify-content:center; cursor:pointer;
  -webkit-appearance:none; appearance:none; color:var(--accent-500);
  background:linear-gradient(145deg,var(--accent-100),var(--surface-2)); border:1px solid var(--border-strong);
  box-shadow:var(--shadow-sm), 0 0 0 4px color-mix(in srgb,var(--accent-500) 8%, transparent);}
.den-badge:active{opacity:.82;}
.topbar-title h1.den-title{font-size:22px; font-weight:800; letter-spacing:-.02em;}
.topbar:has(.den-badge){background:linear-gradient(180deg,color-mix(in srgb,var(--accent-500) 7%,var(--bg)),var(--bg));}
.ex-row .ex-info .name .ex-type{font-size:12.5px; font-weight:600; color:var(--text-muted);}
@media (max-width:420px){ .ex-row .ex-info .name .ex-type{font-size:11px; letter-spacing:-.01em;} }
@media (max-width:360px){
  .topbar:has(.den-badge){gap:8px;}
  .den-badge{width:38px; height:38px; border-radius:12px;} .den-badge svg{width:22px; height:22px;}
  .topbar-title h1.den-title{font-size:19px;}
  .topbar:has(.den-badge) .topbar-title .sub{font-size:13px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
  .topbar:has(.den-badge) .icon-btn{width:34px; height:34px;}
}
