:root {
  --ink: #14201d;
  --muted: #6f7b77;
  --paper: #f4f1e9;
  --card: #fffdf7;
  --green: #1f5749;
  --green-soft: #dce9e1;
  --orange: #e78343;
  --line: #dedbd1;
  --shadow: 0 10px 30px rgba(32, 51, 44, .08);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; min-height: 100vh; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.topbar { background: #10241f; color: #fff; padding: calc(26px + env(safe-area-inset-top)) max(22px, env(safe-area-inset-right)) 24px max(22px, env(safe-area-inset-left)); display: flex; align-items: center; justify-content: space-between; }
.topbar h1 { margin: 5px 0 0; font-family: Georgia, serif; font-weight: 500; font-size: clamp(26px, 7vw, 38px); letter-spacing: -.03em; }
.eyebrow { font-size: 11px; letter-spacing: .14em; font-weight: 800; margin: 0; opacity: .7; }
.icon-button { width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; color: #fff; background: rgba(255,255,255,.08); font-size: 22px; }
main { width: min(100%, 760px); margin: 0 auto; padding: 0 18px calc(42px + env(safe-area-inset-bottom)); }
.tabs { position: sticky; top: 0; z-index: 5; margin: 0 -18px 22px; padding: 9px 18px; display: grid; grid-template-columns: repeat(3, 1fr); background: rgba(244,241,233,.92); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(0,0,0,.05); }
.tab { padding: 11px; border: 0; background: none; border-radius: 10px; color: var(--muted); font-weight: 700; }
.tab.active { background: var(--card); color: var(--green); box-shadow: 0 2px 8px rgba(0,0,0,.07); }
.view { display: none; animation: enter .25s ease; }
.view.active { display: block; }
@keyframes enter { from { opacity: 0; transform: translateY(4px); } }
.hero-card { background: var(--green); color: #fff; border-radius: 24px; padding: 24px; display: flex; justify-content: space-between; align-items: center; box-shadow: var(--shadow); }
.label, .muted { color: var(--muted); font-size: 13px; }
.hero-card .label, .hero-card .muted { color: rgba(255,255,255,.68); margin: 0; }
.hero-number { font-family: Georgia, serif; font-size: 44px; margin: 6px 0; }
.ring { width: 72px; height: 72px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--orange) 89%, rgba(255,255,255,.15) 0); position: relative; }
.ring::after { content: ""; width: 54px; height: 54px; position: absolute; border-radius: 50%; background: var(--green); }
.ring span { position: relative; z-index: 1; font-size: 13px; font-weight: 800; }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin: 28px 2px 12px; }
.section-heading h2 { font-family: Georgia, serif; font-size: 23px; font-weight: 500; margin: 3px 0 0; }
.text-button { border: 0; background: none; color: var(--green); padding: 8px 0; font-weight: 800; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px; box-shadow: 0 4px 18px rgba(32,51,44,.04); }
.goal-row { display: flex; justify-content: space-between; }
.goal-row div { display: flex; flex-direction: column; gap: 4px; }
.goal-row strong { font-size: 20px; }
.align-right { text-align: right; }
.progress { height: 9px; background: #e5e3da; margin: 18px 0 10px; border-radius: 99px; overflow: hidden; }
.progress span { height: 100%; display: block; background: var(--orange); border-radius: inherit; min-width: 0; }
.goal-card p { margin: 0; }
.metric-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.metric { padding: 17px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); display: grid; grid-template-columns: auto 1fr; align-items: center; }
.metric strong { font-size: 27px; }
.metric > span:last-child { grid-column: 2; color: var(--muted); font-size: 12px; }
.metric-icon { width: 35px; height: 35px; margin-right: 10px; background: var(--green-soft); border-radius: 50%; display: grid; place-items: center; color: var(--green); font-weight: 800; }
.metric-icon.warm { background: #fae5d5; color: #a94f20; }
.today-plan { margin-top: 12px; }
.today-plan:empty { display: none; }
.app-card { display:grid; grid-template-columns:auto 1fr; gap:13px; align-items:center; }
.app-icon-preview { width:54px; height:54px; border-radius:14px; display:grid; place-items:center; background:linear-gradient(145deg,#10241f,#28725e); color:#fff; font:600 27px Georgia,serif; box-shadow:0 8px 18px rgba(16,36,31,.2); }
.app-copy strong { font-size:15px; }
.app-copy p,.permission-note { margin:4px 0 0; color:var(--muted); font-size:12px; line-height:1.45; }
.notify-button { grid-column:1/-1; width:100%; padding:12px; border:0; border-radius:12px; background:#0877df; color:#fff; font-weight:750; }
.notify-button:disabled { background:#b8bdc2; cursor:default; }
.permission-note { grid-column:1/-1; margin-top:-4px; text-align:center; }
.income-card { display: flex; align-items: center; justify-content: space-between; }
label { color: var(--muted); font-size: 13px; font-weight: 700; display: grid; gap: 7px; }
input, select { width: 100%; border: 1px solid var(--line); border-radius: 11px; background: #fff; padding: 12px; color: var(--ink); outline: none; }
input:focus, select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(31,87,73,.1); }
.money-input { display: flex; align-items: center; font-size: 21px; font-weight: 800; }
.money-input input { width: 110px; border: 0; text-align: right; font-size: 21px; font-weight: 800; background: transparent; box-shadow: none; padding: 5px; }
.expense-list { margin: 12px 0; background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.expense-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 8px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.expense-row:last-child { border: 0; }
.expense-row button, .workout-actions button { background: none; border: 0; color: var(--muted); padding: 8px; }
.secondary-button, .primary-button { width: 100%; border-radius: 13px; padding: 13px 16px; font-weight: 800; }
.secondary-button { background: transparent; color: var(--green); border: 1px dashed #9eaaa5; }
.primary-button { background: var(--green); color: white; border: 1px solid var(--green); }
.totals-card { margin-top: 12px; background: #e6ebe5; }
.totals-card div { display: flex; justify-content: space-between; padding: 5px 0; }
.totals-card div:last-child { color: var(--green); font-size: 18px; }
.form-card, .sheet { display: grid; gap: 14px; }
.two-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.intro { color: var(--muted); font-size: 14px; line-height: 1.55; margin-top: -2px; }
.training-hero { position: relative; overflow: hidden; padding: 32px 25px 24px; border-radius: 28px; color: #f5f5f7; background: linear-gradient(145deg,#0a0a0b 0%,#242428 64%,#0b5266 145%); box-shadow: 0 20px 50px rgba(0,0,0,.16); }
.training-hero h2 { position: relative; margin: 8px 0 26px; max-width: 460px; font-family: -apple-system,BlinkMacSystemFont,"SF Pro Display","Segoe UI",sans-serif; font-size: clamp(32px,9vw,50px); line-height: 1.04; letter-spacing: -.055em; font-weight: 650; }
.training-orb { position: absolute; right: -28px; top: -42px; width: 176px; height: 176px; border-radius: 50%; display: grid; place-items: center; font-size: 120px; font-weight: 100; color: rgba(255,255,255,.28); background: radial-gradient(circle at 32% 30%,rgba(123,225,255,.88),rgba(30,105,138,.36) 37%,rgba(255,255,255,.03) 68%); filter: blur(.2px); }
.training-summary { display: flex; gap: 24px; color: rgba(255,255,255,.65); font-size: 13px; }
.training-summary strong { color: #fff; font-size: 18px; margin-right: 4px; }
.venue-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px,82%); gap: 12px; margin: 16px -18px 0; padding: 0 18px 8px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.venue-strip::-webkit-scrollbar { display:none; }
.venue-card { min-height: 174px; padding: 20px; border-radius: 24px; scroll-snap-align: start; color: #fff; display: flex; flex-direction: column; justify-content: flex-end; box-shadow: 0 13px 30px rgba(0,0,0,.12); }
.venue-card h3 { margin: 7px 0 3px; font-size: 25px; letter-spacing: -.035em; }
.venue-card p { color: rgba(255,255,255,.7); font-size: 12px; margin: 0 0 18px; }
.venue-card > div { display: flex; gap: 8px; flex-wrap: wrap; }
.venue-card a { color: #fff; text-decoration: none; font-size: 12px; font-weight: 700; padding: 9px 11px; border-radius: 99px; background: rgba(255,255,255,.16); backdrop-filter: blur(8px); }
.venue-card a:active { transform: scale(.97); }
.venue-day { font-size: 10px; letter-spacing: .13em; opacity: .72; font-weight: 800; }
.session-card { background: linear-gradient(145deg,#7965d7,#31256d); }
.basement-card { background: linear-gradient(145deg,#2c2d30,#09090a); }
.coachyfy-card { background: linear-gradient(145deg,#16809b,#063a49); }
.training-heading { margin-top: 30px; }
.week-calendar { display: grid; gap: 11px; margin: 16px 0; }
.day-card { background: rgba(255,255,255,.78); border: 1px solid rgba(0,0,0,.07); border-radius: 22px; overflow: hidden; box-shadow: 0 7px 24px rgba(0,0,0,.045); backdrop-filter: blur(16px); }
.day-card.today { border-color: #2485f0; box-shadow: 0 0 0 2px rgba(36,133,240,.08),0 10px 28px rgba(36,133,240,.09); }
.day-header { min-height: 58px; padding: 11px 13px 11px 17px; display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,.5); border-bottom: 1px solid rgba(0,0,0,.065); }
.day-card.today .day-header { background: rgba(36,133,240,.075); }
.day-title { display: flex; align-items: baseline; gap: 8px; }
.day-title strong { font-family: Georgia, serif; font-size: 19px; font-weight: 500; }
.day-title span { color: var(--muted); font-size: 12px; }
.day-add { width: 34px; height: 34px; border: 0; border-radius: 50%; background: #e8f2ff; color: #0877df; font-size: 20px; line-height: 1; }
.day-items { padding: 2px 13px; }
.day-empty { color: #9aa29f; font-size: 13px; margin: 0; padding: 15px 3px; }
.workout-row { padding: 12px 2px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px; border-bottom: 1px solid var(--line); }
.workout-row:last-child { border-bottom: 0; }
.check { appearance: none; width: 24px; height: 24px; border: 2px solid #9da7a3; border-radius: 50%; padding: 0; }
.check:checked { background: var(--green); border-color: var(--green); box-shadow: inset 0 0 0 5px var(--card); }
.workout-copy { min-width: 0; }
.workout-copy strong, .workout-copy span { display: block; }
.workout-copy span { color: var(--muted); font-size: 12px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workout-meta { display:flex; align-items:center; gap:7px; margin-top:5px; }
.venue-pill { color:#60666d; background:#f0f1f2; padding:3px 7px; border-radius:99px; font-size:10px; text-decoration:none; }
.book-link { color:#0877df; font-size:11px; font-weight:700; text-decoration:none; white-space:nowrap; }
.workout-row.done .workout-copy { opacity: .45; text-decoration: line-through; }
.tip-card { margin-top: 18px; display: flex; gap: 12px; background: #ebe7d8; }
.tip-mark { width: 24px; height: 24px; border: 1px solid var(--green); border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; font-family: Georgia, serif; font-weight: 800; }
.tip-card p { color: var(--muted); line-height: 1.5; font-size: 13px; margin: 4px 0 0; }
.sheet-backdrop { position: fixed; inset: 0; z-index: 20; background: rgba(8,20,17,.55); display: flex; align-items: end; }
.sheet-backdrop[hidden] { display: none; }
.sheet { width: 100%; max-width: 760px; max-height: 88vh; overflow: auto; margin: 0 auto; padding: 10px 22px calc(24px + env(safe-area-inset-bottom)); background: var(--paper); border-radius: 24px 24px 0 0; }
.sheet h2 { font-family: Georgia, serif; font-weight: 500; margin: 4px 0 2px; }
.sheet-handle { height: 4px; width: 42px; border-radius: 4px; margin: 0 auto 6px; background: #b9b9b2; }
.sheet-actions { display: grid; grid-template-columns: 1fr 1.5fr; gap: 10px; }
@media (min-width: 700px) {
  .topbar { padding-left: calc((100vw - 720px)/2); padding-right: calc((100vw - 720px)/2); }
  main { padding-left: 0; padding-right: 0; }
  .tabs { margin-left: 0; margin-right: 0; border-radius: 0 0 14px 14px; }
  .hero-card { padding: 30px; }
  .week-calendar { grid-template-columns: 1fr 1fr; align-items: start; }
  .day-card:last-child { grid-column: 1 / -1; }
  .venue-strip { margin-left:0; margin-right:0; padding-left:0; padding-right:0; grid-auto-flow:initial; grid-template-columns:repeat(3,1fr); overflow:visible; }
  .venue-card { min-width:0; }
}
@media (max-width: 380px) {
  .hero-number { font-size: 36px; }
  .ring { width: 62px; height: 62px; }
  .ring::after { width: 46px; height: 46px; }
  .workout-actions button { padding: 6px; }
}
