/* The Combat Coach — app styles. One dark visual world: Command Black, Victory Gold, Field Cream. */
/* Brand fonts, self-hosted so the app works offline. Antonio is scaled to sit with Manrope. */
@font-face { font-family: "Antonio"; src: url(fonts/antonio.woff2) format("woff2"); font-weight: 100 700; font-style: normal; font-display: swap; size-adjust: 90%; }
@font-face { font-family: "Manrope"; src: url(fonts/manrope.woff2) format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
:root {
  --black: #0A0A0A;
  --gunmetal: #232323;
  --panel: #141414;
  --panel-2: #1b1b1a;
  --gold: #D4A849;
  --gold-deep: #9c7c33;
  --cream: #F5F1E8;
  --sand: #C9C1B3;
  --mute: #8d877c;
  --line: rgba(245, 241, 232, .09);
  --good: #7fbf7a;
  --display: "Antonio", "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
  --body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --tabbar: 64px;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--black); color: var(--cream); }
body { font-family: var(--body); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Shell: a phone-width column, centred on larger screens */
#app { max-width: 560px; margin: 0 auto; min-height: 100%; position: relative; background: var(--black); }
@media (min-width: 600px) { body { background: radial-gradient(ellipse at 50% -10%, #1d1a12, var(--black) 60%); } #app { box-shadow: 0 0 0 1px var(--line); } }
.view { padding: calc(var(--safe-t) + 14px) max(18px, var(--safe-r)) calc(var(--tabbar) + var(--safe-b) + 28px) max(18px, var(--safe-l)); animation: rise .28s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Type */
.eyebrow { font-family: var(--display); font-weight: 600; font-size: 13px; letter-spacing: .26em; text-transform: uppercase; color: var(--gold); }
h1, h2, h3 { font-family: var(--display); font-weight: 700; text-transform: uppercase; line-height: .95; margin: 0; letter-spacing: .01em; text-wrap: balance; }
h1 { font-size: clamp(40px, 11vw, 56px); }
h2 { font-size: 30px; }
h3 { font-size: 22px; }
p { margin: 0; }
.muted { color: var(--mute); }
.sand { color: var(--sand); }
.gold { color: var(--gold); }
.small { font-size: 13px; }

/* Top bar */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; min-height: 44px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: auto; height: 36px; flex: none; }
.brand .wm { font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: .12em; line-height: 1; text-transform: uppercase; }
.brand .wm small { display: block; font-size: 10px; letter-spacing: .3em; color: var(--gold); margin-top: 4px; font-weight: 600; }
.iconbtn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); }
.iconbtn svg { width: 20px; height: 20px; }
.back { display: inline-flex; align-items: center; gap: 6px; font-family: var(--display); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; font-size: 14px; color: var(--sand); min-height: 44px; }
.back svg { width: 18px; height: 18px; }

/* Cards and panels */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.pad { padding: 18px; }
.stack { display: grid; gap: 14px; }
.row { display: flex; align-items: center; gap: 12px; }
.between { justify-content: space-between; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.section { margin-top: 28px; }
.section > .head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; gap: 12px; }
.section > .head a, .section > .head button { font-size: 13px; color: var(--gold); text-decoration: none; font-weight: 600; }

/* Hero card on home */
.hero { position: relative; border-radius: 22px; overflow: hidden; min-height: 300px; display: flex; align-items: flex-end; background: var(--panel); border: 1px solid var(--line); }
.hero img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,10,10,.15) 0%, rgba(10,10,10,.55) 45%, rgba(10,10,10,.96) 100%); }
.hero .in { position: relative; z-index: 1; padding: 22px; width: 100%; }
.hero h1 { margin-top: 6px; }
.hero p { margin-top: 10px; color: var(--sand); max-width: 34ch; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 22px; border-radius: 14px; font-family: var(--display); font-weight: 700; font-size: 18px; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; transition: transform .15s ease, background .2s; }
.btn:active { transform: scale(.98); }
.btn.gold { background: var(--gold); color: var(--black); }
.btn.ghost { border: 1px solid rgba(212,168,73,.55); color: var(--cream); }
.btn.dark { background: var(--gunmetal); color: var(--cream); }
.btn.full { width: 100%; }
.btn svg { width: 20px; height: 20px; }

/* Next-up card */
.next { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center; padding: 12px; text-decoration: none; }
.next img { width: 96px; height: 96px; border-radius: 12px; object-fit: cover; }
.next .t { font-family: var(--display); font-weight: 700; font-size: 26px; text-transform: uppercase; line-height: 1; margin: 4px 0; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 14px 12px; }
.stat b { display: block; font-family: var(--display); font-weight: 700; font-size: 32px; line-height: 1; color: var(--cream); font-variant-numeric: tabular-nums; }
.stat span { display: block; margin-top: 6px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }

/* Tiles */
.tile { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 150px; padding: 14px; border-radius: 18px; overflow: hidden; text-decoration: none; background: var(--panel); border: 1px solid var(--line); }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(10,10,10,.9)); }
.tile > * { position: relative; z-index: 1; }
.tile .k { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.tile .n { font-family: var(--display); font-weight: 700; font-size: 26px; text-transform: uppercase; line-height: 1; margin-top: 4px; }
.tile .glyph { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; color: var(--gold); z-index: 1; }

/* Segmented tabs */
.seg { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; margin: 0 -2px; }
.seg::-webkit-scrollbar { display: none; }
.seg a { flex: 0 0 auto; min-height: 40px; display: inline-flex; align-items: center; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); font-family: var(--display); font-weight: 600; font-size: 15px; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; color: var(--sand); }
.seg a[aria-current="page"] { background: var(--gold); border-color: var(--gold); color: var(--black); }

/* Session list items */
.item { display: grid; grid-template-columns: 76px 1fr auto; gap: 14px; align-items: center; padding: 10px 12px 10px 10px; text-decoration: none; }
.item img, .item .ph { width: 76px; height: 76px; border-radius: 12px; object-fit: cover; }
.item .ph { display: grid; place-items: center; background: linear-gradient(145deg, #1f1d18, #121212); border: 1px solid rgba(212,168,73,.25); color: var(--gold); }
.item .ph svg { width: 38px; height: 38px; }
.item .num { font-family: var(--display); font-size: 12px; letter-spacing: .2em; color: var(--gold); font-weight: 600; }
.item .nm { font-family: var(--display); font-weight: 700; font-size: 23px; text-transform: uppercase; line-height: 1.02; margin: 2px 0 3px; }
.item .meta { font-size: 13px; color: var(--mute); }
.item .chev { width: 18px; height: 18px; color: var(--mute); }
.done-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--good); margin-left: 6px; vertical-align: middle; }

/* Session detail */
.cover { margin: calc(-1 * (var(--safe-t) + 14px)) calc(-1 * max(18px, var(--safe-r))) 0 calc(-1 * max(18px, var(--safe-l))); position: relative; aspect-ratio: 1 / .82; overflow: hidden; background: var(--panel); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover .ph { width: 100%; height: 100%; display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, #2a2416, #0d0d0d 70%); color: var(--gold); }
.cover .ph svg { width: 34%; height: auto; opacity: .9; }
.cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,10,10,.5) 0%, transparent 25%, transparent 55%, var(--black) 100%); }
.cover .bar { position: absolute; top: calc(var(--safe-t) + 10px); left: max(14px, var(--safe-l)); right: max(14px, var(--safe-r)); z-index: 2; display: flex; justify-content: space-between; }
.cover .bar .iconbtn { background: rgba(10,10,10,.6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.detail-head { margin-top: -54px; position: relative; z-index: 2; }
.detail-head h1 { margin-top: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 12px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font-size: 12.5px; color: var(--sand); font-weight: 600; }
.chip svg { width: 14px; height: 14px; color: var(--gold); }

.video { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #111; border: 1px solid var(--line); display: grid; place-items: center; text-align: center; }
.video img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .35; filter: grayscale(.4); }
.video .in { position: relative; padding: 18px; display: grid; justify-items: center; gap: 8px; }
.video .lock { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: rgba(10,10,10,.7); border: 1px solid rgba(212,168,73,.6); color: var(--gold); }
.video .lock svg { width: 20px; height: 20px; }
.video b { font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: .06em; text-transform: uppercase; }

.timeline { display: grid; gap: 10px; }
.blk { border: 1px solid var(--line); border-radius: 16px; background: var(--panel); overflow: hidden; }
.blk summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 14px 16px; min-height: 64px; }
.blk summary::-webkit-details-marker { display: none; }
.blk summary .k { font-size: 11px; letter-spacing: .2em; color: var(--gold); font-weight: 700; text-transform: uppercase; }
.blk summary .t { font-family: var(--display); font-weight: 700; font-size: 21px; text-transform: uppercase; line-height: 1.05; }
.blk summary .tm { font-family: var(--display); font-weight: 600; font-size: 15px; color: var(--sand); text-align: right; }
.blk summary .tm small { display: block; font-family: var(--body); font-size: 11px; color: var(--mute); font-weight: 500; }
.blk[open] summary { border-bottom: 1px solid var(--line); }
.blk .body { padding: 6px 16px 16px; }
.blk .intro { color: var(--sand); font-size: 14px; margin: 10px 0 6px; }
.ex { display: grid; grid-template-columns: 26px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ex:last-child { border-bottom: 0; }
.ex .i { font-family: var(--display); font-weight: 600; color: var(--gold); font-size: 15px; padding-top: 1px; }
.ex b { font-weight: 700; font-size: 15px; display: block; }
.ex span { display: block; font-size: 13.5px; color: var(--mute); margin-top: 2px; }
.ex em { font-style: normal; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--sand); }
.scale { display: grid; gap: 8px; margin-top: 4px; }
.scale div { padding: 12px 14px; border-radius: 12px; background: var(--panel-2); font-size: 14px; color: var(--sand); }
.scale b { display: block; font-family: var(--display); font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin-bottom: 2px; font-weight: 600; }
.cues { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cues li { position: relative; padding-left: 20px; font-size: 15px; color: var(--cream); }
.cues li::before { content: "›"; position: absolute; left: 2px; top: -2px; color: var(--gold); font-size: 20px; }

/* Sticky start bar */
.startbar { position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar) + var(--safe-b)); z-index: 30; padding: 12px max(18px, var(--safe-r)) 12px max(18px, var(--safe-l)); background: linear-gradient(180deg, transparent, rgba(10,10,10,.92) 30%); }
.startbar .wrapc { max-width: 524px; margin: 0 auto; }

/* Tab bar */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: rgba(12,12,12,.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding-bottom: var(--safe-b); }
.tabbar nav { max-width: 560px; margin: 0 auto; height: var(--tabbar); display: grid; grid-template-columns: repeat(4, 1fr); padding: 0 max(6px, var(--safe-l)) 0 max(6px, var(--safe-r)); }
.tabbar a { display: grid; justify-items: center; align-content: center; gap: 3px; text-decoration: none; color: var(--mute); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.tabbar a svg { width: 23px; height: 23px; }
.tabbar a[aria-current="page"] { color: var(--gold); }

/* Programmes */
.prog .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.prog .price { font-family: var(--display); font-weight: 700; font-size: 30px; line-height: 1; color: var(--gold); }
.prog ul { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.prog li { position: relative; padding-left: 18px; font-size: 14px; color: var(--sand); }
.prog li::before { content: ""; position: absolute; left: 0; top: .65em; width: 8px; height: 2px; background: var(--gold); }
.prog .facts { display: flex; gap: 18px; margin-top: 14px; padding: 12px 0; border-block: 1px solid var(--line); }
.prog .facts b { font-family: var(--display); font-size: 24px; display: block; line-height: 1; }
.prog .facts span { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }

/* Classes */
.slot { display: grid; grid-template-columns: 74px 1fr; gap: 14px; padding: 16px; }
.slot .d { text-align: center; border-right: 1px solid var(--line); padding-right: 10px; }
.slot .d b { display: block; font-family: var(--display); font-size: 15px; letter-spacing: .14em; color: var(--gold); text-transform: uppercase; }
.slot .d span { display: block; font-family: var(--display); font-weight: 700; font-size: 22px; margin-top: 4px; }

/* Me */
.hist { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.hist:last-child { border-bottom: 0; }
.hist b { font-weight: 700; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.toggle:last-child { border-bottom: 0; }
.switch { position: relative; width: 50px; height: 30px; border-radius: 999px; background: var(--gunmetal); border: 1px solid var(--line); transition: background .2s; flex: 0 0 auto; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--sand); transition: transform .2s, background .2s; }
.switch[aria-checked="true"] { background: var(--gold); }
.switch[aria-checked="true"]::after { transform: translateX(20px); background: var(--black); }
.linkrow { display: flex; align-items: center; justify-content: space-between; min-height: 56px; padding: 0 16px; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 600; }
.linkrow:last-child { border-bottom: 0; }
.linkrow svg { width: 18px; height: 18px; color: var(--mute); }

/* Install banner */
.install { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; }
.install img { width: 44px; height: 44px; border-radius: 10px; }
.install b { display: block; font-size: 14px; }
.install span { font-size: 12.5px; color: var(--mute); }
.install button { color: var(--gold); font-weight: 700; font-size: 13px; padding: 8px; }

/* Sheet (modal) */
.sheet-bg { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.6); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 560px; background: var(--panel); border-radius: 22px 22px 0 0; border: 1px solid var(--line); padding: 20px max(20px, var(--safe-r)) calc(20px + var(--safe-b)) max(20px, var(--safe-l)); animation: up .25s ease both; }
@keyframes up { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet ol { padding-left: 20px; margin: 12px 0 18px; color: var(--sand); display: grid; gap: 8px; }

/* ===== Player ===== */
.player { position: fixed; inset: 0; z-index: 100; background: var(--black); display: flex; flex-direction: column; padding: calc(var(--safe-t) + 10px) max(18px, var(--safe-r)) calc(var(--safe-b) + 16px) max(18px, var(--safe-l)); }
.player .wrapc { max-width: 560px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; height: 100%; }
.player.rest { background: radial-gradient(ellipse at 50% 35%, #12221a, var(--black) 70%); }
.player.work { background: radial-gradient(ellipse at 50% 35%, #2a2312, var(--black) 70%); }
.p-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.p-top .blkname { font-family: var(--display); font-weight: 600; letter-spacing: .2em; text-transform: uppercase; font-size: 13px; color: var(--gold); text-align: center; flex: 1; }
.p-top .cnt { font-size: 12px; color: var(--mute); text-align: center; margin-top: 2px; font-variant-numeric: tabular-nums; letter-spacing: .06em; }
.p-prog { height: 4px; background: var(--gunmetal); border-radius: 99px; overflow: hidden; margin: 14px 0 0; }
.p-prog i { display: block; height: 100%; background: var(--gold); width: 0; transition: width .4s linear; }
.p-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 14px; min-height: 0; }
.p-phase { font-family: var(--display); font-weight: 600; letter-spacing: .3em; font-size: 14px; text-transform: uppercase; padding: 6px 14px; border-radius: 999px; border: 1px solid currentColor; }
.player.work .p-phase { color: var(--gold); }
.player.rest .p-phase { color: var(--good); }
.player.info .p-phase { color: var(--sand); }
.p-name { font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: clamp(34px, 10vw, 54px); line-height: .98; max-width: 16ch; text-wrap: balance; }
.p-note { color: var(--sand); font-size: 15px; max-width: 38ch; }
.ring { position: relative; width: min(62vw, 270px); aspect-ratio: 1; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 7; }
.ring .track { stroke: var(--gunmetal); }
.ring .bar { stroke: var(--gold); stroke-linecap: round; transition: stroke-dashoffset .25s linear; }
.player.rest .ring .bar { stroke: var(--good); }
.ring .time { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: clamp(56px, 18vw, 86px); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.p-list { width: 100%; flex: 0 1 auto; min-height: 0; max-height: 40vh; overflow-y: auto; text-align: left; display: flex; flex-direction: column; gap: 8px; -webkit-overflow-scrolling: touch; }
.p-list button { flex: 0 0 auto; display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); text-align: left; min-height: 52px; line-height: 1.35; }
.p-list button .bx { width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--mute); display: grid; place-items: center; }
.p-list button[aria-pressed="true"] { opacity: .5; }
.p-list button[aria-pressed="true"] .bx { background: var(--gold); border-color: var(--gold); color: var(--black); }
.p-list button[aria-pressed="true"] .nm { text-decoration: line-through; }
.p-list .cur { border-color: var(--gold); }
.p-next { font-size: 14px; color: var(--mute); min-height: 22px; }
.p-next b { color: var(--cream); font-weight: 700; }
.p-ctrl { display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 12px; align-items: center; margin-top: 10px; }
.p-ctrl button { min-height: 60px; border-radius: 16px; display: grid; place-items: center; background: var(--panel); border: 1px solid var(--line); }
.p-ctrl button svg { width: 26px; height: 26px; }
.p-ctrl .play { background: var(--gold); color: var(--black); border: 0; min-height: 72px; }
.p-ctrl .play svg { width: 32px; height: 32px; }
.p-total { text-align: center; font-size: 12px; color: var(--mute); margin-top: 10px; font-variant-numeric: tabular-nums; letter-spacing: .06em; }

.finish { text-align: center; display: grid; gap: 16px; justify-items: center; }
.finish .badge { width: 96px; height: 96px; border-radius: 24px; }
.finish input { width: 100%; min-height: 52px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); color: var(--cream); font: inherit; font-size: 18px; padding: 0 16px; text-align: center; }
.finish label { font-size: 13px; color: var(--mute); }
