:root {
  --bg: #F4F3EF; --card: #FFFFFF; --ink: #141414; --muted: #55554F; --line: #E2E0DA; --line2: #D6D3CB;
  --red: #AA1313; --green-bg: #E6F4E8; --green: #144D1E; --amber-bg: #FFF6D9; --amber: #4A3A00;
  --soft-red: #FBEDED;
  --head: "Inter Tight", Inter, -apple-system, system-ui, sans-serif;
  --body: Inter, -apple-system, system-ui, sans-serif;
}
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("/fonts/Inter-normal-400.ttf"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("/fonts/Inter-normal-600.ttf"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url("/fonts/Inter-normal-700.ttf"); }
@font-face { font-family: "Inter Tight"; font-weight: 800; font-display: swap; src: url("/fonts/InterTight-normal-800.ttf"); }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); -webkit-text-size-adjust: 100%; }
button, input, textarea { font: inherit; color: inherit; }
a { color: var(--ink); }
h1 { font-family: var(--head); font-weight: 800; letter-spacing: -0.03em; margin: 0; font-size: 30px; line-height: 1.05; }
h2 { font-size: 17px; margin: 0; }
p { margin: 0; }
.muted { color: var(--muted); font-size: 14px; }
.small { font-size: 13px; }

/* ---- layout: phone first ---- */
.shell { min-height: 100vh; }
.view { padding: calc(20px + env(safe-area-inset-top)) 18px calc(96px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 18px; max-width: 1180px; margin: 0 auto; outline: none; }
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--card); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
.nav .brand { display: none; }
.nav a { position: relative; text-decoration: none; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; min-height: 48px; justify-content: center; border-radius: 10px; }
.nav a.on { color: var(--ink); font-weight: 700; }
.nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.badge { position: absolute; top: 4px; left: calc(50% + 6px); background: var(--red); color: #fff; font-size: 10px; font-weight: 700; border-radius: 999px; padding: 1px 6px; }

/* ---- desktop: sidebar ---- */
@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: 230px 1fr; }
  .nav { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; border-top: none; border-right: 1px solid var(--line); padding: 28px 14px; }
  .nav .brand { display: block; font-family: var(--head); font-weight: 800; font-size: 22px; letter-spacing: -0.03em; padding: 0 10px 18px; }
  .nav a { flex-direction: row; justify-content: flex-start; gap: 12px; font-size: 15px; padding: 0 12px; }
  .nav a.on { background: var(--bg); }
  .badge { position: static; margin-left: auto; }
  .view { padding: 40px 40px 60px; }
  h1 { font-size: 38px; }
}

/* ---- pieces ---- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.cta { text-decoration: none; background: var(--ink); color: var(--bg); border-radius: 16px; padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; min-height: 64px; }
.cta b { font-size: 17px; }
.cta span { font-size: 13px; color: #C9C8C2; display: block; }
.btn { border: none; border-radius: 12px; min-height: 48px; padding: 0 16px; font-weight: 700; font-size: 15px; cursor: pointer; }
.btn.dark { background: var(--ink); color: var(--bg); }
.btn.line { background: transparent; border: 1px solid var(--ink); }
.btn.red { background: var(--red); color: #fff; }
.btn:disabled { opacity: 0.5; cursor: default; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pill { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.pill.ready { background: var(--soft-red); color: #5C0A0A; }
.pill.approved { background: var(--green-bg); color: var(--green); }
.pill.changes_requested { background: var(--amber-bg); color: var(--amber); }
.note { border-radius: 12px; padding: 12px 14px; font-size: 14px; }
.note.ok { background: var(--green-bg); color: var(--green); }
.note.warn { background: var(--amber-bg); color: var(--amber); }
.note.bad { background: var(--soft-red); color: #5C0A0A; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.day { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 2px; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); }
.day b { font-size: 15px; color: var(--ink); }
.day i { font-style: normal; font-weight: 600; font-size: 10px; }
.day i.reel { color: var(--red); } .day i.carousel { color: #1F5FA8; }

/* upload */
.drop { border: 2px dashed #B9B6AD; background: var(--card); border-radius: 18px; padding: 34px 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; text-align: center; }
.drop svg { width: 40px; height: 40px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.bar { height: 10px; border-radius: 5px; background: #E9E7E1; overflow: hidden; }
.bar > div { height: 100%; background: var(--ink); width: 0; transition: width 0.3s; }
.tips li { margin: 0 0 8px; font-size: 14px; }

/* review */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.chip { flex-shrink: 0; border: 1px solid var(--line2); background: var(--card); border-radius: 999px; padding: 8px 12px; font-size: 13px; font-weight: 600; cursor: pointer; min-height: 40px; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip .dot { display: inline-block; width: 7px; height: 7px; border-radius: 4px; margin-left: 6px; vertical-align: middle; }
.review { display: flex; flex-direction: column; gap: 16px; }
.media { display: flex; justify-content: center; }
video.reel { width: 100%; max-width: 340px; aspect-ratio: 9 / 16; background: #000; border-radius: 14px; }
.slides { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; width: 100%; max-width: 420px; border-radius: 12px; }
.slides img { flex: 0 0 100%; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; scroll-snap-align: center; border-radius: 12px; border: 1px solid var(--line2); }
.email { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; max-width: 560px; width: 100%; font-size: 15px; line-height: 1.55; }
.email p { margin: 0 0 12px; white-space: pre-line; }
.email.li img { width: 100%; border-radius: 10px; margin-bottom: 14px; display: block; }
.details { display: flex; flex-direction: column; gap: 8px; }
.kind { color: var(--red); font-size: 12px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
textarea { width: 100%; border: 1px solid var(--line2); border-radius: 10px; padding: 10px; background: #FBFAF7; resize: vertical; min-height: 70px; }
@media (min-width: 900px) {
  .review { display: grid; grid-template-columns: minmax(0, 1fr) 380px; align-items: start; gap: 28px; }
  .media { position: sticky; top: 24px; }
}

.toast { position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 12px; font-size: 14px; z-index: 20; max-width: 90vw; }
@media (min-width: 900px) { .toast { bottom: 30px; } }
:focus-visible { outline: 3px solid #1F5FA8; outline-offset: 2px; }

/* ---- coach switcher ---- */
.coachbar { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px 8px 8px 14px; font-size: 13px; color: var(--muted); }
.coachbar select { flex: 1; min-width: 0; min-height: 40px; border: 1px solid var(--line2); border-radius: 10px; background: var(--bg); padding: 0 10px; font-weight: 700; color: var(--ink); font-size: 15px; }
