/* =========================================================
   Life Hub — Notion-inspired editorial theme
   Warm neutrals, serif headings, refined list navigation,
   monochrome line icons. Light + dark, system-driven.
   ========================================================= */

:root {
  --bg: #fffdf9;
  --surface: #ffffff;
  --surface-2: #f7f4ee;
  --surface-3: #efe9dd;
  --text: #37352f;
  --text-muted: #73706a;
  --text-subtle: #9b958a;
  --border: #e8e2d6;
  --border-muted: #efe9dd;
  --accent: #b65f24;
  --accent-strong: #8a4513;
  --accent-soft: #f8efe2;
  --accent-ring: rgba(182, 95, 36, 0.3);
  --success: #3f7d4f;
  --success-bg: #eef5ec;
  --success-border: rgba(63, 125, 79, 0.3);
  --danger: #c0392b;
  --danger-bg: #fbeeec;
  --danger-border: rgba(192, 57, 43, 0.28);
  --attention: #9a6700;
  --attention-bg: #fbf3df;
  --attention-border: rgba(154, 103, 0, 0.3);
  --shadow-sm: 0 1px 0 rgba(55, 53, 47, 0.04);
  --shadow: 0 2px 8px rgba(55, 53, 47, 0.06);
  --shadow-md: 0 12px 30px rgba(55, 53, 47, 0.1);
  --radius: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --maxw: 800px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Pretendard",
    "Apple SD Gothic Neo", "Noto Sans KR", Helvetica, Arial, sans-serif;
  --serif: "Noto Serif KR", "Iowan Old Style", "Apple Garamond", Georgia,
    "Nanum Myeongjo", serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #191918;
    --surface: #20201f;
    --surface-2: #262625;
    --surface-3: #30302e;
    --text: #ebe9e3;
    --text-muted: #9c978c;
    --text-subtle: #6f6b62;
    --border: #383733;
    --border-muted: #2c2b28;
    --accent: #e0975a;
    --accent-strong: #efb583;
    --accent-soft: #2a2018;
    --accent-ring: rgba(224, 151, 90, 0.4);
    --success: #5bb98c;
    --success-bg: #18241d;
    --success-border: rgba(91, 185, 140, 0.3);
    --danger: #e8897d;
    --danger-bg: #2a1b18;
    --danger-border: rgba(232, 137, 125, 0.3);
    --attention: #d6a44b;
    --attention-bg: #241e12;
    --attention-border: rgba(214, 164, 75, 0.3);
    --shadow-sm: 0 0 transparent;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 14px 34px rgba(0, 0, 0, 0.5);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 18px;
}

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  margin-bottom: 30px;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.brand .logo {
  width: 28px;
  height: 28px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-size: 15px;
  flex: none;
}
.nav-back {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-decoration: none;
}
.nav-back:hover { color: var(--accent); }
.header-tag {
  font-size: 0.84rem;
  color: var(--text-muted);
}

/* ---------- Hero (index) ---------- */
.hero {
  padding: 4px 0 22px;
  margin-bottom: 8px;
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(1.85rem, 5vw, 2.5rem);
  line-height: 1.3;
  margin: 0 0 14px;
  letter-spacing: -0.01em;
  font-weight: 600;
}
.hero p {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 60ch;
}

/* ---------- Section heading ---------- */
.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 34px 0 12px;
}
.section-title h2 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-subtle);
  margin: 0;
  font-weight: 700;
}
.section-title .line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ---------- Hub list (index navigation) ---------- */
.hub-list {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.hub-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 16px;
  text-decoration: none;
  color: inherit;
  border-top: 1px solid var(--border);
  transition: background 0.12s ease;
}
.hub-item:first-child { border-top: none; }
.hub-item:hover { background: var(--surface-2); }
.hub-ic {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border-muted);
  color: var(--accent);
}
.hub-item:hover .hub-ic { background: var(--surface); border-color: var(--border); }
.hub-ic svg { width: 21px; height: 21px; display: block; }
.hub-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hub-title {
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  color: var(--text);
}
.hub-desc {
  color: var(--text-muted);
  font-size: 0.88rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hub-arrow {
  flex: none;
  color: var(--text-subtle);
  display: grid;
  place-items: center;
  transition: transform 0.12s ease, color 0.12s ease;
}
.hub-arrow svg { width: 18px; height: 18px; display: block; }
.hub-item:hover .hub-arrow { color: var(--accent); transform: translateX(3px); }
.hub-item.is-soon {
  opacity: 0.6;
  pointer-events: none;
}
.hub-item.is-soon .hub-arrow { display: none; }

/* ---------- Article / content pages ---------- */
.page-title {
  font-family: var(--serif);
  margin: 4px 0 8px;
  font-size: clamp(1.7rem, 4.5vw, 2.2rem);
  letter-spacing: -0.01em;
  font-weight: 600;
  line-height: 1.3;
}
.page-lead {
  color: var(--text-muted);
  margin: 0 0 8px;
  font-size: 1rem;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  margin: 16px 0;
}
.panel > h3:first-child,
.panel > h4:first-child { margin-top: 0; }

/* Callout */
.tip {
  display: flex;
  gap: 11px;
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 13px 15px;
  font-size: 0.92rem;
  margin: 16px 0;
  color: var(--text);
}
.tip .tip-icon { flex: none; }

/* ---------- Workout: progress bar ---------- */
.progress {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg);
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}
.progress .bar {
  height: 8px;
  background: var(--surface-3);
  border-radius: 99px;
  overflow: hidden;
}
.progress .bar > span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--success);
  border-radius: 99px;
  transition: width 0.3s ease;
}
.progress .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
  gap: 12px;
}
.progress .label {
  font-size: 0.875rem;
  color: var(--text-muted);
}
.progress .count {
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.btn-reset {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius);
  padding: 5px 12px;
  font-size: 0.8rem;
  cursor: pointer;
  font-family: inherit;
  box-shadow: var(--shadow-sm);
}
.btn-reset:hover { background: var(--surface-2); border-color: var(--text-subtle); }

/* ---------- Workout: phase heading ---------- */
.routine { margin: 28px 0; }
.routine-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}
.routine-head h3 {
  font-family: var(--serif);
  font-size: 1.3rem;
  margin: 0;
  letter-spacing: -0.01em;
  font-weight: 600;
}
.routine .routine-note {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0 0 14px;
}
.phase-time {
  flex: none;
  font-size: 0.74rem;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 3px 11px;
  white-space: nowrap;
}

/* ---------- Workout: exercise cards ---------- */
.exercise {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin: 10px 0;
  overflow: hidden;
  transition: border-color 0.12s ease;
}
.exercise:hover { border-color: var(--text-subtle); }
.exercise-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
}
.exercise-head .check { flex: none; margin-top: 1px; }
.exercise-head .meta { flex: 1; min-width: 0; }
.exercise-head .name {
  font-weight: 600;
  font-size: 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.01em;
}
.exercise-head .sets {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--accent-strong);
  background: var(--accent-soft);
  border: 1px solid var(--border-muted);
  border-radius: 99px;
  padding: 1px 9px;
  font-variant-numeric: tabular-nums;
}
.exercise-head .desc {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin: 5px 0 0;
}
.exercise.done { border-color: var(--success-border); background: var(--success-bg); }
.exercise.done .name { text-decoration: line-through; color: var(--text-muted); }

/* Custom checkbox */
.check { position: relative; width: 24px; height: 24px; }
.check input {
  position: absolute;
  opacity: 0;
  width: 24px;
  height: 24px;
  margin: 0;
  cursor: pointer;
}
.check .box {
  width: 24px;
  height: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  display: grid;
  place-items: center;
  transition: all 0.12s ease;
}
.check .box::after {
  content: "";
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.12s ease;
  margin-top: -2px;
}
.check input:checked + .box {
  background: var(--success);
  border-color: var(--success);
}
.check input:checked + .box::after { transform: rotate(45deg) scale(1); }
.check input:focus-visible + .box {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Workout: collapsible detail ---------- */
.exercise-detail { border-top: 1px solid var(--border); }
.exercise-detail > summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 16px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 7px;
  user-select: none;
  -webkit-user-select: none;
  background: var(--surface-2);
}
.exercise-detail > summary::-webkit-details-marker { display: none; }
.exercise-detail > summary::before {
  content: "›";
  display: inline-block;
  transition: transform 0.15s ease;
  font-size: 1.1em;
  line-height: 1;
}
.exercise-detail[open] > summary::before { transform: rotate(90deg); }
.exercise-detail > summary:hover { color: var(--accent-strong); }
.exercise-detail[open] > summary { border-bottom: 1px solid var(--border); }

.detail-body { padding: 14px 16px 16px; }
.detail-body > *:first-child { margin-top: 0; }
.detail-body > *:last-child { margin-bottom: 0; }

.ex-target {
  background: var(--surface-2);
  border: 1px solid var(--border-muted);
  color: var(--text);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-size: 0.86rem;
  margin-bottom: 12px;
}

.ex-steps {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ex-steps li {
  background: var(--surface-2);
  border: 1px solid var(--border-muted);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 9px 12px;
  font-size: 0.9rem;
  color: var(--text);
}
.ex-steps li .s-num {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-bottom: 3px;
}

.ex-warning,
.ex-tip {
  border-radius: var(--radius);
  padding: 10px 13px;
  font-size: 0.86rem;
  margin: 10px 0 0;
  border: 1px solid;
}
.ex-warning {
  background: var(--danger-bg);
  border-color: var(--danger-border);
  color: var(--danger);
}
.ex-tip {
  background: var(--success-bg);
  border-color: var(--success-border);
  color: var(--success);
}
.ex-warning strong,
.ex-tip strong { display: block; margin-bottom: 3px; }

.ex-reps {
  margin-top: 12px;
  background: var(--accent-soft);
  border: 1px solid var(--border-muted);
  color: var(--accent-strong);
  border-radius: var(--radius);
  padding: 9px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.ex-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.ex-link {
  font-size: 0.8rem;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--accent);
  text-decoration: none;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.ex-link:hover { background: var(--surface-2); border-color: var(--text-subtle); }

/* ---------- Generic prose ---------- */
.prose { font-size: 1rem; }
.prose h3 {
  font-family: var(--serif);
  margin: 28px 0 10px;
  letter-spacing: -0.01em;
  font-weight: 600;
  font-size: 1.3rem;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose strong { font-weight: 600; }
.prose code {
  background: var(--surface-3);
  padding: 2px 6px;
  border-radius: var(--radius);
  font-size: 0.88em;
  font-family: var(--mono);
}

/* ---------- Footer ---------- */
.site-footer {
  margin: 48px 0 40px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.82rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
  .panel { padding: 16px; }
}


/* ---------- Workout: line-icon system (CSS masks, currentColor) ---------- */
.ex-target::before,
.ex-reps::before,
.ex-warning strong::before,
.ex-tip strong::before,
.ex-link::before {
  content: "";
  display: inline-block;
  width: 15px;
  height: 15px;
  flex: none;
  vertical-align: -2px;
  margin-right: 7px;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain; mask-size: contain;
}
.ex-target::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Ccircle%20cx%3D%2712%27%20cy%3D%2712%27%20r%3D%279%27/%3E%3Ccircle%20cx%3D%2712%27%20cy%3D%2712%27%20r%3D%275%27/%3E%3Ccircle%20cx%3D%2712%27%20cy%3D%2712%27%20r%3D%271.5%27/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Ccircle%20cx%3D%2712%27%20cy%3D%2712%27%20r%3D%279%27/%3E%3Ccircle%20cx%3D%2712%27%20cy%3D%2712%27%20r%3D%275%27/%3E%3Ccircle%20cx%3D%2712%27%20cy%3D%2712%27%20r%3D%271.5%27/%3E%3C/svg%3E"); }
.ex-reps::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cline%20x1%3D%2712%27%20x2%3D%2712%27%20y1%3D%2720%27%20y2%3D%2710%27/%3E%3Cline%20x1%3D%2718%27%20x2%3D%2718%27%20y1%3D%2720%27%20y2%3D%274%27/%3E%3Cline%20x1%3D%276%27%20x2%3D%276%27%20y1%3D%2720%27%20y2%3D%2716%27/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cline%20x1%3D%2712%27%20x2%3D%2712%27%20y1%3D%2720%27%20y2%3D%2710%27/%3E%3Cline%20x1%3D%2718%27%20x2%3D%2718%27%20y1%3D%2720%27%20y2%3D%274%27/%3E%3Cline%20x1%3D%276%27%20x2%3D%276%27%20y1%3D%2720%27%20y2%3D%2716%27/%3E%3C/svg%3E"); }
.ex-warning strong::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27m21.73%2018-8-14a2%202%200%200%200-3.48%200l-8%2014A2%202%200%200%200%204%2021h16a2%202%200%200%200%201.73-3%27/%3E%3Cpath%20d%3D%27M12%209v4%27/%3E%3Cpath%20d%3D%27M12%2017h.01%27/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27m21.73%2018-8-14a2%202%200%200%200-3.48%200l-8%2014A2%202%200%200%200%204%2021h16a2%202%200%200%200%201.73-3%27/%3E%3Cpath%20d%3D%27M12%209v4%27/%3E%3Cpath%20d%3D%27M12%2017h.01%27/%3E%3C/svg%3E"); }
.ex-tip strong::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M15%2014c.2-1%20.7-1.7%201.5-2.5%201-.9%201.5-2.2%201.5-3.5A6%206%200%200%200%206%208c0%201%20.2%202.2%201.5%203.5.7.7%201.3%201.5%201.5%202.5%27/%3E%3Cpath%20d%3D%27M9%2018h6%27/%3E%3Cpath%20d%3D%27M10%2022h4%27/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M15%2014c.2-1%20.7-1.7%201.5-2.5%201-.9%201.5-2.2%201.5-3.5A6%206%200%200%200%206%208c0%201%20.2%202.2%201.5%203.5.7.7%201.3%201.5%201.5%202.5%27/%3E%3Cpath%20d%3D%27M9%2018h6%27/%3E%3Cpath%20d%3D%27M10%2022h4%27/%3E%3C/svg%3E"); }
.ex-link::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M15%203h6v6%27/%3E%3Cpath%20d%3D%27M10%2014%2021%203%27/%3E%3Cpath%20d%3D%27M18%2013v6a2%202%200%200%201-2%202H5a2%202%200%200%201-2-2V8a2%202%200%200%201%202-2h6%27/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M15%203h6v6%27/%3E%3Cpath%20d%3D%27M10%2014%2021%203%27/%3E%3Cpath%20d%3D%27M18%2013v6a2%202%200%200%201-2%202H5a2%202%200%200%201-2-2V8a2%202%200%200%201%202-2h6%27/%3E%3C/svg%3E"); width: 13px; height: 13px; margin-right: 5px; }

.ex-warning strong, .ex-tip strong { display: flex; align-items: center; }

/* phase number badge / clock */
.ph-badge {
  display: inline-grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  border: 1px solid var(--border-muted);
  color: var(--accent-strong);
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 700;
  margin-right: 9px;
  vertical-align: 2px;
}
.ph-clock { color: var(--accent-strong); }
.ph-clock::before {
  content: "";
  width: 15px;
  height: 15px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Ccircle%20cx%3D%2712%27%20cy%3D%2712%27%20r%3D%279%27/%3E%3Cpolyline%20points%3D%2712%207%2012%2012%2015%2014%27/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Ccircle%20cx%3D%2712%27%20cy%3D%2712%27%20r%3D%279%27/%3E%3Cpolyline%20points%3D%2712%207%2012%2012%2015%2014%27/%3E%3C/svg%3E") center/contain no-repeat;
}

/* NEW pill */
.tag-new {
  display: inline-block;
  font-family: var(--font);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  color: var(--accent-strong);
  background: var(--accent-soft);
  border: 1px solid var(--border-muted);
  border-radius: 99px;
  padding: 2px 7px;
  vertical-align: 3px;
}

/* key-exercise star */
.star {
  display: inline-block;
  width: 15px;
  height: 15px;
  vertical-align: -2px;
  background-color: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27black%27%3E%3Cpolygon%20points%3D%2712%202%2015%208.6%2022%209.3%2017%2014%2018.2%2021%2012%2017.6%205.8%2021%207%2014%202%209.3%208.9%208.6%2012%202%27/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27black%27%3E%3Cpolygon%20points%3D%2712%202%2015%208.6%2022%209.3%2017%2014%2018.2%2021%2012%2017.6%205.8%2021%207%2014%202%209.3%208.9%208.6%2012%202%27/%3E%3C/svg%3E") center/contain no-repeat;
}

/* callout (.tip) icons */
.tip-icon {
  display: inline-block;
  width: 19px;
  height: 19px;
  flex: none;
  margin-top: 1px;
  background-color: var(--accent);
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain; mask-size: contain;
}
.tip-icon.ic-alert { -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27m21.73%2018-8-14a2%202%200%200%200-3.48%200l-8%2014A2%202%200%200%200%204%2021h16a2%202%200%200%200%201.73-3%27/%3E%3Cpath%20d%3D%27M12%209v4%27/%3E%3Cpath%20d%3D%27M12%2017h.01%27/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27m21.73%2018-8-14a2%202%200%200%200-3.48%200l-8%2014A2%202%200%200%200%204%2021h16a2%202%200%200%200%201.73-3%27/%3E%3Cpath%20d%3D%27M12%209v4%27/%3E%3Cpath%20d%3D%27M12%2017h.01%27/%3E%3C/svg%3E"); }
.tip-icon.ic-cheer { -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M19%2014c1.49-1.46%203-3.21%203-5.5A5.5%205.5%200%200%200%2016.5%203c-1.76%200-3%20.5-4.5%202-1.5-1.5-2.74-2-4.5-2A5.5%205.5%200%200%200%202%208.5c0%202.29%201.49%204.04%203%205.5l7%207Z%27/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M19%2014c1.49-1.46%203-3.21%203-5.5A5.5%205.5%200%200%200%2016.5%203c-1.76%200-3%20.5-4.5%202-1.5-1.5-2.74-2-4.5-2A5.5%205.5%200%200%200%202%208.5c0%202.29%201.49%204.04%203%205.5l7%207Z%27/%3E%3C/svg%3E"); }


/* ---------- Category page header ---------- */
.cat-head {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 4px 0 8px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.cat-icon {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  border: 1px solid var(--border-muted);
  color: var(--accent);
}
.cat-icon svg { width: 26px; height: 26px; display: block; }
.cat-head .page-title { margin: 0; }
.cat-lead { margin: 5px 0 0; color: var(--text-muted); font-size: 0.95rem; }

/* count chip on hub items */
.hub-count {
  flex: none;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border-muted);
  border-radius: 99px;
  padding: 2px 9px;
  margin-left: 4px;
}

/* guide tip (lightbulb) icon */
.tip-icon.ic-tip { -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M15%2014c.2-1%20.7-1.7%201.5-2.5%201-.9%201.5-2.2%201.5-3.5A6%206%200%200%200%206%208c0%201%20.2%202.2%201.5%203.5.7.7%201.3%201.5%201.5%202.5%27/%3E%3Cpath%20d%3D%27M9%2018h6%27/%3E%3Cpath%20d%3D%27M10%2022h4%27/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M15%2014c.2-1%20.7-1.7%201.5-2.5%201-.9%201.5-2.2%201.5-3.5A6%206%200%200%200%206%208c0%201%20.2%202.2%201.5%203.5.7.7%201.3%201.5%201.5%202.5%27/%3E%3Cpath%20d%3D%27M9%2018h6%27/%3E%3Cpath%20d%3D%27M10%2022h4%27/%3E%3C/svg%3E"); }

/* ---------- Mobile bottom navigation bar ---------- */
.bottom-bar { display: none; }

.bb-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 48px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.bb-btn:active { background: var(--surface-2); }
.bb-btn svg { width: 18px; height: 18px; flex: none; }
.bb-btn.bb-primary {
  flex: 2;
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

@media (max-width: 768px) {
  /* hide the top-right back link; bottom bar takes over */
  .site-header .nav-back { display: none; }

  .bottom-bar {
    display: flex;
    gap: 10px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--border);
    background: var(--bg);
    background: color-mix(in srgb, var(--bg) 90%, transparent);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    backdrop-filter: saturate(180%) blur(12px);
  }
  /* reserve space so content/footer isn't hidden behind the bar */
  body.has-bottom-bar { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
}

/* ---------- Workout: per-set tracking ---------- */
.set-track {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 11px;
}
.set-dot {
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  transition: transform 0.08s ease, background 0.12s ease, border-color 0.12s ease;
}
.set-dot:active { transform: scale(0.92); }
.set-dot.filled {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}
.exercise.done .set-dot.filled { opacity: 0.85; }

.set-timer {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.timer-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: 99px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.timer-btn.running { background: var(--surface); color: var(--accent); }
.timer-btn .tb-ic { display: inline-flex; }
.timer-btn svg { width: 14px; height: 14px; display: block; }
.timer-time {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  min-width: 42px;
}
.track-label { font-size: 0.78rem; color: var(--text-subtle); }

/* ---------- Guide: care label & shop helpers ---------- */
.care-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 4px;
}
.care-chip {
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 99px;
  padding: 5px 12px;
  border: 1px solid;
  white-space: nowrap;
}
.care-chip.yes { color: var(--success); background: var(--success-bg); border-color: var(--success-border); }
.care-chip.no  { color: var(--danger);  background: var(--danger-bg);  border-color: var(--danger-border); }

.req {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--danger);
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  border-radius: 99px;
  padding: 1px 7px;
  margin-left: 5px;
  vertical-align: 1px;
}

.prose .key { color: var(--danger); font-weight: 600; }
.prose .muted { color: var(--text-subtle); font-weight: 500; }

/* "do not" callout */
.dont {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  border-left: 3px solid var(--danger);
  border-radius: var(--radius);
  padding: 14px 16px 12px;
  margin: 18px 0;
}
.dont h3 {
  margin: 0 0 8px;
  padding: 0;
  border: none;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  color: var(--danger);
}
.dont ul { list-style: none; padding: 0; margin: 0; }
.dont li {
  position: relative;
  padding: 5px 0 5px 22px;
  font-size: 0.92rem;
  color: var(--text);
}
.dont li::before {
  content: "✕";
  position: absolute;
  left: 2px;
  top: 5px;
  color: var(--danger);
  font-weight: 700;
  font-size: 0.85rem;
}

/* ---------- Guide: product cards (preparation items) ---------- */
.prod-list { margin: 12px 0 4px; }
.prod {
  display: flex;
  gap: 13px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 13px 14px;
  margin: 10px 0;
  box-shadow: var(--shadow-sm);
}
.prod-ic {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--border-muted);
  display: grid;
  place-items: center;
  color: var(--accent);
}
.prod-ic svg { width: 22px; height: 22px; display: block; }
.prod-body { flex: 1; min-width: 0; }
.prod-name { font-weight: 600; font-size: 0.98rem; letter-spacing: -0.01em; }
.prod-desc { color: var(--text-muted); font-size: 0.85rem; margin: 3px 0 0; }
.prod-buy {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 13px;
  border-radius: 99px;
  border: 1px solid var(--accent);
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}
.prod-buy:hover { background: var(--accent); color: #fff; }
.prod-buy svg { width: 14px; height: 14px; display: block; }
.prod-have {
  flex: none;
  font-size: 0.76rem;
  color: var(--text-subtle);
  background: var(--surface-2);
  border: 1px solid var(--border-muted);
  border-radius: 99px;
  padding: 5px 11px;
  white-space: nowrap;
}
@media (max-width: 430px) {
  .prod { flex-wrap: wrap; }
  .prod-body { flex-basis: calc(100% - 57px); }
  .prod-buy, .prod-have { margin-left: 57px; }
}

/* ---------- Guide: part-by-part cleaning map ---------- */
.part-list { margin: 12px 0 4px; }
.part {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}
.part:last-child { border-bottom: none; }
.part-tag {
  flex: none;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 99px;
  padding: 3px 0;
  width: 58px;
  text-align: center;
  border: 1px solid;
  margin-top: 1px;
}
.part-tag.ok   { color: var(--success);   background: var(--success-bg);   border-color: var(--success-border); }
.part-tag.care { color: var(--attention); background: var(--attention-bg); border-color: var(--attention-border); }
.part-body { flex: 1; min-width: 0; font-size: 0.92rem; }
.part-body strong { font-weight: 600; }

/* ---------- Guide: YouTube lite embed ---------- */
.video-list { margin: 12px 0 4px; display: flex; flex-direction: column; gap: 14px; }
.yt {
  position: relative;
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 9;
  cursor: pointer;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}
.yt img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0.92; }
.yt-play { position: absolute; inset: 0; display: grid; place-items: center; }
.yt-play span {
  width: 64px; height: 45px; border-radius: 13px;
  background: rgba(0, 0, 0, 0.62);
  display: grid; place-items: center;
  transition: background 0.12s ease;
}
.yt-play svg { width: 27px; height: 27px; color: #fff; display: block; }
.yt:hover .yt-play span { background: #cc0000; }
.yt-title {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.78));
  color: #fff; font-size: 0.84rem; font-weight: 600;
  padding: 22px 13px 10px;
  letter-spacing: -0.01em;
}
.yt iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-cap { font-size: 0.8rem; color: var(--text-subtle); margin: 7px 0 0; }
.video-cap a { color: var(--text-muted); }

/* ---------- Guide: optional tag & product group label ---------- */
.opt {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border-muted);
  border-radius: 99px;
  padding: 1px 7px;
  margin-left: 5px;
  vertical-align: 1px;
}
.prod-group {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  margin: 18px 0 2px;
}
.prod-group:first-of-type { margin-top: 8px; }

/* ---------- Guide: season tags & routine ---------- */
.seasontag {
  flex: none;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 99px;
  padding: 3px 10px;
  border: 1px solid;
  white-space: nowrap;
  text-align: center;
}
.seasontag.all    { color: var(--text-muted); background: var(--surface-2);   border-color: var(--border-muted); }
.seasontag.summer { color: var(--success);    background: var(--success-bg);  border-color: var(--success-border); }
.seasontag.winter { color: var(--attention);  background: var(--attention-bg); border-color: var(--attention-border); }

.routine-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 4px 16px 14px;
  margin: 10px 0;
}
.routine-box h4 {
  font-family: var(--font);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--accent-strong);
  margin: 14px 0 8px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.routine-box ol { margin: 0; padding-left: 20px; }
.routine-box li { margin: 5px 0; font-size: 0.92rem; }
.routine-box li .add { color: var(--danger); font-weight: 700; }
.routine-box li .muted { color: var(--text-subtle); }

/* product image thumbnail (in place of icon tile) */
.prod-thumb {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  object-fit: cover;
  border: 1px solid var(--border-muted);
  background: var(--surface-2);
}

/* keep / swap tags for the summer composition */
.seasontag.keep { color: var(--success);       background: var(--success-bg); border-color: var(--success-border); }
.seasontag.swap { color: var(--accent-strong);  background: var(--accent-soft); border-color: var(--border-muted); }
