:root {
  --ink: #171514;
  --muted: #68625f;
  --paper: #fffaf4;
  --surface: #ffffff;
  --surface-warm: #fff1e8;
  --line: #eadbd0;
  --red: #c9362c;
  --red-deep: #8d1f1b;
  --amber: #d9983d;
  --teal: #276c68;
  --mint: #d9f1e8;
  --shadow: 0 22px 60px rgba(59, 28, 19, 0.14);
  --shadow-strong: 0 30px 90px rgba(59, 28, 19, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(115deg, rgba(217, 241, 232, 0.42), transparent 34%),
    linear-gradient(245deg, rgba(255, 241, 232, 0.94), transparent 40%),
    linear-gradient(180deg, rgba(255, 250, 244, 0.96), rgba(249, 241, 232, 0.98)),
    var(--paper);
  color: var(--ink);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 72px;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 clamp(18px, 5vw, 64px);
  border-bottom: 1px solid rgba(234, 219, 208, 0.78);
  background: rgba(255, 250, 244, 0.9);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 850;
  letter-spacing: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: block;
  flex-shrink: 0;
  filter: drop-shadow(0 6px 16px rgba(201, 54, 44, 0.22));
}

.site-header nav {
  display: flex;
  gap: 18px;
  margin-left: auto;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.site-header nav a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border-bottom: 2px solid transparent;
}

.site-header nav a:hover,
.site-header nav a:focus-visible {
  color: var(--teal);
  border-color: rgba(39, 108, 104, 0.28);
}

main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(18px, 5vw, 64px) 64px;
}

.hero {
  position: relative;
  min-height: min(760px, calc(100dvh - 72px));
  display: grid;
  grid-template-columns: minmax(0, 0.98fr) minmax(340px, 0.82fr);
  gap: 46px;
  align-items: center;
  padding: 44px 0 38px;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 54, 44, 0.22), rgba(39, 108, 104, 0.2), transparent);
}

.hero-copy {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 720px;
  margin-bottom: 18px;
  font-size: clamp(48px, 8vw, 86px);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 22px;
  line-height: 1.15;
}

.lede {
  max-width: 640px;
  margin-bottom: 26px;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.45;
}

.hero-actions,
.shop-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.hero-points button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(234, 219, 208, 0.86);
  border-radius: 999px;
  padding: 0 12px;
  background: rgba(255, 253, 251, 0.7);
  color: var(--teal);
  cursor: pointer;
  font-size: 13px;
  font-weight: 850;
  font-family: inherit;
  box-shadow: 0 10px 26px rgba(59, 28, 19, 0.06);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.hero-points button:hover,
.hero-points button:focus-visible {
  background: rgba(255, 253, 251, 0.94);
  border-color: rgba(197, 63, 43, 0.34);
  box-shadow: 0 14px 34px rgba(197, 63, 43, 0.12);
  transform: translateY(-1px);
}

.focus-pulse {
  animation: focusPulse 900ms ease;
}

@keyframes focusPulse {
  0%,
  100% {
    box-shadow: none;
  }
  35% {
    box-shadow: 0 0 0 5px rgba(197, 63, 43, 0.13);
  }
}

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 850;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button.primary {
  background: linear-gradient(180deg, #f26c57, var(--red));
  color: #fffdf9;
  box-shadow: 0 14px 30px rgba(201, 54, 44, 0.25);
}

.button.secondary {
  border-color: rgba(39, 108, 104, 0.22);
  background: var(--mint);
  color: var(--teal);
}

.button.ghost {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

.button.danger {
  color: var(--red-deep);
}

.mini-disclosure {
  max-width: 620px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.device-scene {
  position: relative;
  min-height: 520px;
  display: grid;
  place-items: center;
}

.device-scene::before {
  content: "";
  position: absolute;
  inset: 42px 4% 38px;
  background:
    linear-gradient(90deg, transparent, rgba(201, 54, 44, 0.08), transparent),
    repeating-linear-gradient(90deg, transparent 0 22px, rgba(255, 250, 244, 0.34) 22px 24px);
  transform: skewY(-3deg);
  pointer-events: none;
}

.panel {
  position: relative;
  width: min(90%, 420px);
  aspect-ratio: 0.74;
  display: grid;
  place-items: center;
  border: 1px solid rgba(23, 21, 20, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.72), rgba(255,255,255,0.12)),
    linear-gradient(180deg, #231918, #0f0d0d);
  box-shadow: var(--shadow-strong), inset 0 0 0 10px rgba(255,255,255,0.04);
  overflow: hidden;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent 44%, rgba(0, 0, 0, 0.22));
  pointer-events: none;
}

.light-grid {
  position: relative;
  z-index: 1;
  width: 72%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.light-grid span {
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, #fff2dd 0 8%, #ff6356 31%, #9d201b 68%, #43110f 100%);
  box-shadow: 0 0 24px rgba(255, 83, 65, 0.66), inset 0 -4px 10px rgba(69, 11, 9, 0.55);
  animation: diodePulse 2.8s ease-in-out infinite;
}

.light-grid span:nth-child(3n) {
  animation-delay: 0.3s;
}

.light-grid span:nth-child(4n) {
  animation-delay: 0.6s;
}

@keyframes diodePulse {
  0%, 100% { filter: brightness(0.92); transform: scale(0.98); }
  50% { filter: brightness(1.22); transform: scale(1.03); }
}

.session-card {
  position: absolute;
  right: 0;
  bottom: 56px;
  width: min(260px, 64vw);
  padding: 18px;
  border: 1px solid rgba(234, 219, 208, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  z-index: 2;
}

.session-card strong {
  display: block;
  margin-bottom: 4px;
  color: var(--red-deep);
  font-size: 34px;
  line-height: 1;
}

.session-card span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.pulse-line {
  height: 8px;
  margin-top: 16px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, var(--red), var(--amber), var(--teal));
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.52fr);
  gap: 20px;
  align-items: start;
  padding-top: 24px;
  background: rgba(255, 253, 251, 0.46);
  box-shadow: 0 26px 86px rgba(59, 28, 19, 0.08);
}

.tracker-panel,
.summary-panel,
.info-band article,
.shop-section,
.family-section,
.guide-section,
.content-panel,
.content-card,
.legal-note {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 34px rgba(59, 28, 19, 0.08);
}

.tracker-panel,
.summary-panel {
  padding: 22px;
}

.tracker-panel {
  background:
    linear-gradient(180deg, rgba(255, 250, 244, 0.48), rgba(255, 255, 255, 0.95)),
    var(--surface);
}

.summary-panel {
  background:
    linear-gradient(180deg, rgba(217, 241, 232, 0.28), rgba(255, 255, 255, 0.95)),
    var(--surface);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.section-head.compact {
  margin-bottom: 14px;
}

.section-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.tracker-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.tracker-form label {
  min-width: 0;
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.tracker-form .wide,
.timer.wide {
  grid-column: 1 / -1;
}

input,
select,
textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fffdfb;
  color: var(--ink);
  outline: none;
}

textarea {
  min-height: 108px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(39, 108, 104, 0.12);
}

input[type="range"] {
  min-height: 28px;
  padding: 0;
  accent-color: var(--red);
}

.range-value {
  width: 36px;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--surface-warm);
  color: var(--red-deep);
  font-weight: 900;
}

.stepper {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  gap: 8px;
}

.stepper > * {
  min-width: 0;
}

.stepper input {
  text-align: center;
}

.stepper button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-warm);
  color: var(--red-deep);
  font-weight: 900;
  cursor: pointer;
}

.timer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: end;
  padding: clamp(18px, 3vw, 26px);
  border: 1px solid rgba(141, 31, 27, 0.18);
  border-radius: 8px;
  background:
    radial-gradient(circle at 16% 14%, rgba(255, 246, 230, 0.76), transparent 34%),
    linear-gradient(135deg, rgba(201, 54, 44, 0.12), rgba(39, 108, 104, 0.14)),
    var(--surface-warm);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78), 0 18px 42px rgba(59, 28, 19, 0.1);
}

.timer-face {
  min-width: 0;
}

.flip-clock {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(38px, 1fr)) auto repeat(2, minmax(38px, 1fr));
  gap: clamp(5px, 1vw, 9px);
  align-items: center;
  max-width: 100%;
  filter: drop-shadow(0 16px 28px rgba(59, 28, 19, 0.18));
}

.flip-unit {
  position: relative;
  min-width: clamp(38px, 7vw, 64px);
  min-height: clamp(58px, 9vw, 86px);
  display: grid;
  place-items: center;
  border: 1px solid rgba(23, 21, 20, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 49%, rgba(0, 0, 0, 0.2) 50%, rgba(0, 0, 0, 0.4)),
    linear-gradient(180deg, #3a2724, #171514);
  color: #fff6e8;
  font-family: "SF Mono", "Roboto Mono", Menlo, Consolas, monospace;
  font-size: clamp(34px, 7vw, 60px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), inset 0 -10px 20px rgba(0, 0, 0, 0.26);
}

.flip-unit::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: rgba(255, 250, 244, 0.16);
  box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.42);
}

.flip-unit::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent 18% 82%, rgba(0, 0, 0, 0.16));
  pointer-events: none;
}

.flip-unit.is-flipping {
  animation: flipTick 0.34s ease;
}

.flip-separator {
  color: var(--red-deep);
  font-size: clamp(32px, 6vw, 54px);
  font-weight: 900;
  line-height: 1;
  transform: translateY(-2px);
}

@keyframes flipTick {
  0% { transform: rotateX(0deg); filter: brightness(1); }
  48% { transform: rotateX(-74deg); filter: brightness(0.82); }
  100% { transform: rotateX(0deg); filter: brightness(1.08); }
}

.timer-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 22px;
}

.metric-grid div {
  min-height: 98px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 14px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 246, 230, 0.8), rgba(255, 253, 251, 0.7)),
    #fff1e8;
  border: 1px solid rgba(234, 219, 208, 0.8);
}

.metric-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.metric-grid strong {
  color: var(--ink);
  font-size: 30px;
  line-height: 1;
}

.trend-block,
.recent-block {
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.bar-chart {
  min-height: 156px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
  padding: 12px 0 4px;
}

.bar {
  min-width: 0;
  display: grid;
  gap: 7px;
  align-items: end;
  justify-items: center;
}

.bar-fill {
  width: 100%;
  min-height: 8px;
  border-radius: 8px 8px 2px 2px;
  background: linear-gradient(180deg, #f26c57, var(--red));
}

.bar span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.session-list {
  display: grid;
  gap: 10px;
}

.session-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdfb;
}

.session-item strong {
  display: block;
  margin-bottom: 4px;
  font-size: 15px;
}

.session-item span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.empty-state {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.print-report {
  display: none;
}

.print-report .report {
  max-width: 1020px;
  margin: 0 auto;
  padding: 38px;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.print-report .report-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 241, 232, 0.86)),
    var(--surface);
  box-shadow: 0 18px 50px rgba(59, 28, 19, 0.12);
}

.print-report .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--teal);
  font-weight: 850;
}

.print-report .report-brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  flex: 0 0 34px;
  filter: drop-shadow(0 6px 16px rgba(201, 54, 44, 0.22));
}

.print-report .report-brand-mark svg {
  width: 100%;
  height: 100%;
  display: block;
}

.print-report h1,
.print-report h2,
.print-report p {
  margin: 0;
}

.print-report h1 {
  max-width: 720px;
  font-size: 34px;
  line-height: 1.04;
}

.print-report .meta {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.print-report .metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.print-report .metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.84);
}

.print-report .metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.print-report .metric strong {
  display: block;
  margin-top: 8px;
  color: var(--teal);
  font-size: 26px;
}

.print-report .report-panel {
  break-inside: avoid;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 18px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.86);
}

.print-report .report-panel h2 {
  margin-bottom: 14px;
  font-size: 18px;
}

.print-report .report-chart {
  height: 156px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.print-report .report-bar {
  display: grid;
  gap: 6px;
  justify-items: center;
}

.print-report .report-bar-track {
  width: 100%;
  height: 112px;
  display: flex;
  align-items: end;
  border-radius: 999px;
  background: #f4e8df;
  overflow: hidden;
}

.print-report .report-bar-track span {
  width: 100%;
  display: block;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(180deg, var(--red), var(--amber));
}

.print-report .report-bar strong {
  color: var(--teal);
  font-size: 12px;
}

.print-report .report-bar small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.print-report table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.print-report th,
.print-report td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

.print-report th {
  color: var(--teal);
  font-size: 11px;
  text-transform: uppercase;
}

.print-report .empty-row {
  color: var(--muted);
  text-align: center;
}

.print-report .notice {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

@media print {
  @page {
    size: letter;
    margin: 0.45in;
  }

  body.is-printing-report {
    background: #fff !important;
  }

  body.is-printing-report > :not(.print-report) {
    display: none !important;
  }

  body.is-printing-report .print-report {
    display: block !important;
  }

  body.is-printing-report .print-report .report {
    padding: 0;
  }

  body.is-printing-report .print-report .report-hero,
  body.is-printing-report .print-report .metric,
  body.is-printing-report .print-report .report-panel {
    box-shadow: none;
  }
}

.info-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 46px 0 24px;
}

.info-band article,
.legal-note {
  padding: 22px;
}

.info-band p,
.shop-section p,
.legal-note p,
.shop-actions p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.family-section {
  margin-top: 22px;
  padding: 26px;
}

.guide-section {
  margin-top: 22px;
  padding: 26px;
  background:
    linear-gradient(135deg, rgba(255, 246, 230, 0.7), rgba(255, 255, 255, 0.9)),
    #fffdfb;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.guide-card {
  min-height: 190px;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px;
  border: 1px solid rgba(234, 219, 208, 0.88);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(217, 241, 232, 0.32), rgba(255, 253, 251, 0.98)),
    #fffdfb;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.guide-card:hover,
.guide-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(39, 108, 104, 0.28);
  box-shadow: 0 14px 32px rgba(59, 28, 19, 0.12);
}

.guide-card span {
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.guide-card strong {
  color: var(--ink);
  font-size: 19px;
  line-height: 1.18;
}

.guide-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.content-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.38fr);
  gap: 32px;
  align-items: end;
  padding: 62px 0 26px;
}

.content-hero > *,
.content-layout > *,
.content-panel,
.content-card {
  min-width: 0;
  max-width: 100%;
}

.content-hero h1 {
  max-width: 860px;
  font-size: clamp(42px, 7vw, 74px);
}

.content-hero aside {
  border: 1px solid rgba(234, 219, 208, 0.92);
  border-radius: 8px;
  padding: 20px;
  background:
    linear-gradient(180deg, rgba(255, 246, 230, 0.9), rgba(217, 241, 232, 0.55)),
    #fffdfb;
  box-shadow: var(--shadow);
}

.content-hero aside p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.34fr);
  gap: 22px;
  align-items: start;
}

.content-panel,
.content-card {
  padding: 24px;
}

.content-panel {
  display: grid;
  gap: 22px;
  background: rgba(255, 255, 255, 0.84);
}

.content-panel section {
  display: grid;
  gap: 12px;
}

.content-panel h2 {
  font-size: clamp(24px, 3vw, 34px);
}

.content-panel p,
.content-panel li,
.content-card p {
  color: var(--muted);
  line-height: 1.65;
}

.content-panel ul,
.content-panel ol {
  margin: 0;
  padding-left: 22px;
}

.content-panel li + li {
  margin-top: 8px;
}

.content-card {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 14px;
  background:
    linear-gradient(135deg, rgba(217, 241, 232, 0.68), rgba(255, 241, 232, 0.92)),
    #fffdfb;
}

.content-card .mini-disclosure {
  margin: 0;
}

.guide-links {
  display: grid;
  gap: 10px;
}

.guide-links a {
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 253, 251, 0.82);
  color: var(--teal);
  font-weight: 850;
}

.build-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  margin-top: 22px;
  padding: 28px;
  border: 1px solid rgba(201, 54, 44, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 246, 230, 0.92), rgba(217, 241, 232, 0.8)),
    #fffdfb;
  box-shadow: 0 18px 44px rgba(59, 28, 19, 0.1);
}

.build-section p {
  max-width: 720px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.family-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.family-card {
  min-height: 180px;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px;
  border: 1px solid rgba(234, 219, 208, 0.84);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 246, 230, 0.62), rgba(255, 253, 251, 0.96)),
    #fffdfb;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.family-card:hover,
.family-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(201, 54, 44, 0.26);
  box-shadow: 0 14px 32px rgba(59, 28, 19, 0.12);
}

.family-card span {
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.family-card strong {
  color: var(--ink);
  font-size: 19px;
  line-height: 1.18;
}

.family-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.shop-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.36fr);
  gap: 28px;
  align-items: center;
  margin-top: 22px;
  padding: 26px;
  background:
    linear-gradient(135deg, rgba(217, 241, 232, 0.74), rgba(255, 241, 232, 0.92)),
    #fffdfb;
}

.shop-actions {
  align-content: center;
}

.shop-actions p {
  font-size: 13px;
}

.legal-note {
  margin-top: 22px;
  background: #fffdfb;
}

.legal-note h2 {
  margin-bottom: 10px;
}

.site-footer {
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px clamp(18px, 5vw, 64px) 42px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.site-footer p {
  margin: 0 0 6px;
}

.site-footer a {
  color: var(--teal);
  font-weight: 850;
}

.footer-links,
.language-switcher {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
}

.footer-links a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid rgba(234, 219, 208, 0.9);
  border-radius: 999px;
  background: rgba(255, 253, 251, 0.72);
}

.language-switcher button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  background: #fffdfb;
  color: var(--muted);
  font-weight: 850;
  cursor: pointer;
}

.language-switcher button.is-active {
  border-color: rgba(201, 54, 44, 0.28);
  background: var(--surface-warm);
  color: var(--red-deep);
}

#cookie-consent {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 100;
  max-width: 780px;
  margin: 0 auto;
  padding: 18px 20px;
  border: 1px solid rgba(234, 219, 208, 0.26);
  border-radius: 8px;
  background: rgba(23, 21, 20, 0.96);
  color: #fffaf4;
  box-shadow: 0 20px 60px rgba(23, 21, 20, 0.32);
}

#cookie-consent p {
  margin: 0 0 12px;
  color: #fffaf4;
  font-size: 14px;
  line-height: 1.5;
}

#cookie-consent .cc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#cookie-consent button {
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  padding: 0 15px;
  background: linear-gradient(180deg, #f26c57, var(--red));
  color: #fffdf9;
  font-weight: 900;
  cursor: pointer;
}

#cookie-consent .decline {
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: transparent;
  color: #fffaf4;
}

.chat-launcher {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(201, 54, 44, 0.34);
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 26%, #fff6e6, #f26c57 34%, #9d201b 72%),
    var(--red);
  box-shadow: 0 18px 40px rgba(141, 31, 27, 0.28);
  cursor: pointer;
}

.chat-launcher span {
  width: 28px;
  height: 22px;
  border: 2px solid #fffaf4;
  border-radius: 10px;
  position: relative;
}

.chat-launcher span::after {
  content: "";
  position: absolute;
  right: 3px;
  bottom: -7px;
  width: 9px;
  height: 9px;
  border-left: 2px solid #fffaf4;
  border-bottom: 2px solid #fffaf4;
  transform: rotate(-18deg);
}

.chat-panel {
  position: fixed;
  right: 20px;
  bottom: 94px;
  z-index: 41;
  width: min(390px, calc(100vw - 32px));
  max-height: min(690px, calc(100dvh - 116px));
  display: grid;
  grid-template-rows: auto minmax(190px, 1fr) auto auto auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 251, 0.96);
  color: var(--ink);
  box-shadow: 0 28px 80px rgba(59, 28, 19, 0.22);
  overflow: hidden;
  backdrop-filter: blur(18px);
}

.chat-panel[hidden] {
  display: none;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 13px;
  background:
    linear-gradient(180deg, rgba(255, 246, 230, 0.18), transparent),
    linear-gradient(180deg, #f26c57, var(--red));
  color: #fffdf9;
  border-bottom: 1px solid rgba(141, 31, 27, 0.2);
}

.chat-header strong,
.chat-header span {
  display: block;
}

.chat-header strong {
  font-size: 16px;
}

.chat-header span {
  color: rgba(255, 253, 249, 0.86);
  font-size: 12px;
  font-weight: 750;
}

.assistant-pill {
  flex: 0 0 auto;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.14);
  color: #fffdf9;
  font-size: 11px;
  font-weight: 900;
}

.chat-header-actions {
  display: flex;
  gap: 7px;
  align-items: center;
}

.chat-header button {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fffdf9;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.chat-header button:hover,
.chat-header button:focus-visible {
  border-color: rgba(255, 246, 230, 0.9);
  background: rgba(255, 255, 255, 0.2);
  color: #fffdf9;
}

.chat-messages {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 14px;
  overflow: auto;
}

.chat-bubble {
  max-width: 88%;
  padding: 11px 12px;
  border-radius: 8px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
}

.chat-bubble.typing {
  opacity: 0.76;
  font-weight: 850;
}

.chat-bubble.bot {
  justify-self: start;
  background: var(--surface-warm);
  border: 1px solid rgba(234, 219, 208, 0.82);
}

.chat-bubble.user {
  justify-self: end;
  background: var(--mint);
  border: 1px solid rgba(39, 108, 104, 0.16);
}

.chat-bubble a {
  color: var(--teal);
  font-weight: 900;
  text-decoration: underline;
}

.chat-prompts {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 14px 12px;
}

.chat-prompts button {
  flex: 0 0 auto;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  background: #fffdfb;
  color: var(--teal);
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.chat-prompts button:hover,
.chat-prompts button:focus-visible {
  border-color: rgba(201, 54, 44, 0.3);
  background: var(--surface-warm);
  color: var(--red-deep);
}

.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
}

.chat-form input {
  min-height: 42px;
}

.chat-form button {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  padding: 0 14px;
  background: linear-gradient(180deg, #f26c57, var(--red));
  color: #fffdf9;
  font-weight: 900;
  cursor: pointer;
}

.chat-footnote {
  margin: 0;
  padding: 0 14px 12px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.chat-panel.expanded {
  width: min(560px, calc(100vw - 32px));
  max-height: min(760px, calc(100dvh - 116px));
  grid-template-rows: auto minmax(260px, 1fr) auto auto auto;
}

.chat-panel.expanded .chat-messages {
  padding: 18px;
}

.chat-panel.expanded .chat-bubble {
  max-width: min(760px, 82%);
}

@media (max-width: 920px) {
  .site-header nav {
    display: none;
  }

  .hero,
  .workspace,
  .shop-section,
  .info-band,
  .family-grid,
  .guide-grid,
  .content-hero,
  .content-layout,
  .build-section {
    grid-template-columns: 1fr;
  }

  .content-hero,
  .content-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .content-card {
    position: static;
  }

  .hero {
    min-height: auto;
  }

  .device-scene {
    min-height: 420px;
  }

  .session-card {
    right: 18px;
  }
}

@media (max-width: 620px) {
  .site-header {
    height: 66px;
  }

  main {
    padding-left: 16px;
    padding-right: 16px;
  }

  h1 {
    max-width: 100%;
    font-size: clamp(36px, 9.8vw, 42px);
    line-height: 1.02;
    overflow-wrap: break-word;
  }

  .content-hero {
    gap: 20px;
    padding: 42px 0 22px;
    width: 100%;
    max-width: 100%;
    overflow: visible;
  }

  .content-hero h1 {
    max-width: 100%;
    font-size: clamp(28px, 7.4vw, 32px);
    line-height: 1.08;
    text-wrap: balance;
  }

  .content-layout {
    width: 100%;
    max-width: 100%;
    overflow: visible;
  }

  .content-hero > div,
  .content-hero aside,
  .content-panel,
  .content-card {
    justify-self: center;
    width: min(100%, 360px);
  }

  .content-hero aside,
  .content-panel,
  .content-card {
    padding: 18px;
  }

  .content-panel h2 {
    font-size: clamp(23px, 7vw, 29px);
  }

  .content-panel p,
  .content-panel li,
  .content-card p,
  .content-hero aside p {
    font-size: 16px;
    overflow-wrap: break-word;
  }

  .hero {
    gap: 28px;
    padding-top: 40px;
  }

  .lede,
  .mini-disclosure {
    max-width: 100%;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-points {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-actions .button {
    min-width: 0;
    padding-inline: 10px;
    text-align: center;
    white-space: normal;
  }

  .device-scene {
    width: 100%;
    min-height: 390px;
    overflow: hidden;
  }

  .panel {
    width: min(100%, 360px);
  }

  .light-grid {
    gap: 14px;
  }

  .session-card {
    right: 8px;
    bottom: 32px;
    width: min(230px, 70vw);
  }

  .tracker-panel,
  .summary-panel {
    padding: 16px;
  }

  .tracker-form,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .section-head {
    flex-direction: column;
    align-items: stretch;
  }

  .section-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .button {
    width: 100%;
  }

  .hero-actions .button,
  .shop-actions .button,
  .build-section .button {
    width: auto;
    flex: 1 1 140px;
  }

  .timer {
    grid-template-columns: 1fr;
    gap: 16px;
    align-items: stretch;
    overflow: hidden;
    padding: 16px;
  }

  .timer-face {
    display: grid;
    justify-items: center;
    gap: 8px;
    min-width: 0;
  }

  .flip-clock {
    grid-template-columns: repeat(2, minmax(34px, 1fr)) auto repeat(2, minmax(34px, 1fr));
    width: min(100%, 310px);
    gap: 5px;
    justify-self: center;
  }

  .flip-unit {
    width: 100%;
    min-width: 0;
    min-height: clamp(52px, 15vw, 68px);
    font-size: clamp(30px, 11vw, 46px);
  }

  .flip-separator {
    font-size: clamp(28px, 9vw, 40px);
  }

  .timer-controls {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    gap: 8px;
    justify-content: stretch;
  }

  .timer-controls .button {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding-inline: 6px;
    font-size: 13px;
  }

  .chat-launcher {
    right: 14px;
    bottom: 14px;
  }

  .chat-panel {
    right: 14px;
    bottom: 84px;
  }

  .assistant-pill {
    display: none;
  }

  .chat-panel.expanded {
    right: 10px;
    left: 10px;
    bottom: 84px;
    width: auto;
    max-height: calc(100dvh - 100px);
  }
}

@media (max-width: 520px) {
  .site-header {
    padding-inline: 14px;
  }

  main {
    padding-left: 14px;
    padding-right: 14px;
  }

  .section-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  #cookie-consent {
    right: auto;
    width: min(calc(100vw - 32px), 398px);
  }
}


.ninjutsu-site-link {
  width: 132px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  text-decoration: none;
}

.ninjutsu-site-link img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 10px 24px rgba(23, 21, 20, 0.2));
}

@media (max-width: 760px) {
  .ninjutsu-site-link {
    width: 112px;
    height: 46px;
  }
}
