/* ============================================================
   Rowing App — design system
   ============================================================ */
:root {
  --bg: #f2f5ef;
  --surface: #ffffff;
  --surface-2: #eaf1ea;
  --ink: #10241f;
  --ink-soft: #2c443c;
  --muted: #5d7069;
  --green: #0f5c49;
  --green-dark: #0a3b30;
  --green-deep: #082b23;
  --lime: #d8f078;
  --lime-soft: #eef9c9;
  --line: #dde6df;
  --danger: #b23b3b;
  --danger-soft: #fbeaea;
  --amber: #d9902c;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px rgba(16, 36, 31, 0.07);
  --shadow-lg: 0 24px 60px rgba(16, 36, 31, 0.16);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.15; letter-spacing: -0.03em; font-weight: 750; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.8rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1rem; }
small, .small { font-size: .875rem; color: var(--muted); }
.mono { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
/* L'attributo [hidden] deve sempre vincere sulle regole display:flex/grid dei
   componenti (es. .modal-backdrop), altrimenti i modal restano aperti. */
[hidden] { display: none !important; }
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 40px); margin-inline: auto; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(242, 245, 239, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 20px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); font-size: 1.05rem; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; background: var(--green-dark);
  display: grid; place-items: center; color: var(--lime); font-size: 18px;
}
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: 10px; }
.nav-links a {
  color: var(--ink-soft); font-weight: 600; font-size: .92rem; padding: 8px 12px; border-radius: 999px;
}
.nav-links a:hover { background: var(--surface-2); text-decoration: none; }
.nav-links a.active { background: var(--green-dark); color: #fff; }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nav-user { display: flex; align-items: center; gap: 8px; font-size: .9rem; font-weight: 650; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--lime); color: var(--green-deep);
  display: grid; place-items: center; font-weight: 800; font-size: .85rem; text-transform: uppercase;
}
.nav-toggle { display: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 999px; padding: 11px 20px;
  font: inherit; font-weight: 700; font-size: .94rem; cursor: pointer;
  background: var(--green); color: #fff; transition: transform .12s ease, background .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:hover { background: var(--green-dark); text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-lg { padding: 14px 26px; font-size: 1rem; }
.btn-sm { padding: 7px 14px; font-size: .84rem; }
.btn-lime { background: var(--lime); color: var(--green-deep); }
.btn-lime:hover { background: #cbe85e; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-soft { background: var(--surface-2); color: var(--green-dark); }
.btn-soft:hover { background: #dde9dd; }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover { background: #f5d7d7; }
.btn-block { width: 100%; }
.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: 50%; }

/* ---------- layout ---------- */
main { padding: 34px 0 80px; }
.section { margin-bottom: 42px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 18px; flex-wrap: wrap; }
.section-head p { margin: 0; color: var(--muted); max-width: 620px; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }

/* ---------- cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.card-tight { padding: 18px; }
.card-flat { box-shadow: none; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 14px; }
.card-head h3 { margin: 0; }
.card p:last-child { margin-bottom: 0; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: 28px;
  background: radial-gradient(120% 140% at 85% 10%, #1c6d58 0%, #0c4437 45%, #082b23 100%);
  color: #fff; padding: clamp(28px, 5vw, 56px);
  margin-bottom: 30px;
}
.hero::after {
  content: ""; position: absolute; right: -90px; bottom: -140px; width: 380px; height: 380px;
  border-radius: 50%; border: 60px solid rgba(216, 240, 120, 0.14);
}
.hero::before {
  content: ""; position: absolute; right: 120px; top: -120px; width: 240px; height: 240px;
  border-radius: 50%; background: rgba(216, 240, 120, 0.08);
}
.hero-content { position: relative; z-index: 1; max-width: 720px; }
.hero h1 { margin-bottom: 14px; }
.hero p { color: #cfe2d9; font-size: 1.05rem; max-width: 560px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; text-transform: uppercase;
  letter-spacing: .14em; font-size: .72rem; font-weight: 800; color: var(--lime); margin-bottom: 16px;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--lime); }
.hero .btn-lime { margin-top: 6px; }

/* ---------- home action cards ---------- */
.action-card {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; min-height: 230px; box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
.action-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); text-decoration: none; }
.action-card .icon {
  width: 46px; height: 46px; border-radius: 14px; background: var(--lime-soft); color: var(--green-dark);
  display: grid; place-items: center; font-size: 22px; margin-bottom: 6px;
}
.action-card h3 { font-size: 1.3rem; margin: 0; color: var(--ink); }
.action-card p { color: var(--muted); margin: 0; font-size: .94rem; }
.action-card .go { margin-top: auto; color: var(--green); font-weight: 750; font-size: .9rem; }
.action-card.locked { background: linear-gradient(180deg, #fff, #f6f8f2); }
.action-card.locked .icon { background: var(--surface-2); color: var(--muted); }

/* ---------- badges / pills ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  font-size: .74rem; font-weight: 750; letter-spacing: .02em; background: var(--surface-2); color: var(--green-dark);
}
.badge.lime { background: var(--lime-soft); color: #3d5410; }
.badge.green { background: var(--green); color: #fff; }
.badge.amber { background: #fdf0dc; color: #8a5a12; }
.badge.red { background: var(--danger-soft); color: var(--danger); }
.badge.outline { background: transparent; border: 1px solid var(--line); color: var(--muted); }

/* ---------- forms ---------- */
.field { margin-bottom: 16px; }
.field label, .label { display: block; font-weight: 650; font-size: .86rem; margin-bottom: 6px; color: var(--ink-soft); }
.input, select.input, textarea.input {
  width: 100%; padding: 11px 13px; border: 1px solid #c9d6cc; border-radius: var(--radius-sm);
  background: #fff; color: var(--ink); font: inherit; font-size: .95rem;
}
.input:focus, select.input:focus, textarea.input:focus {
  outline: 2px solid rgba(15, 92, 73, .25); border-color: var(--green);
}
textarea.input { min-height: 90px; resize: vertical; }
.input-row { display: flex; gap: 10px; }
.hint { font-size: .8rem; color: var(--muted); margin-top: 5px; }
.error-text { color: var(--danger); font-size: .86rem; font-weight: 600; margin-top: 8px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.check { display: flex; align-items: center; gap: 9px; font-size: .9rem; font-weight: 600; color: var(--ink-soft); }
.check input { width: 18px; height: 18px; accent-color: var(--green); }

/* ---------- stats / KPI ---------- */
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.kpi .kpi-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 750; }
.kpi .kpi-value { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 800; letter-spacing: -0.04em; margin-top: 4px; line-height: 1.1; }
.kpi .kpi-sub { font-size: .82rem; color: var(--muted); margin-top: 4px; }
.kpi.dark { background: var(--green-dark); color: #fff; border-color: transparent; }
.kpi.dark .kpi-label, .kpi.dark .kpi-sub { color: #a9c8bc; }
.kpi.lime { background: var(--lime); border-color: transparent; }
.kpi.lime .kpi-label, .kpi.lime .kpi-sub { color: #4b5f1a; }

/* ---------- list rows ---------- */
.list { display: flex; flex-direction: column; }
.list-row {
  display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line);
}
.list-row:last-child { border-bottom: 0; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .title { font-weight: 700; font-size: .97rem; }
.list-row .meta { font-size: .82rem; color: var(--muted); }
.date-chip {
  width: 52px; flex: 0 0 52px; text-align: center; background: var(--surface-2); border-radius: 12px; padding: 7px 4px;
}
.date-chip .d { font-size: 1.15rem; font-weight: 800; line-height: 1; }
.date-chip .m { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }

/* ---------- program cards ---------- */
.program-card {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); transition: transform .16s ease, box-shadow .16s ease;
  cursor: pointer; text-align: left; font: inherit; color: inherit;
}
.program-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.program-card h3 { margin: 12px 0 6px; font-size: 1.15rem; }
.program-card .tagline { color: var(--muted); font-size: .9rem; margin: 0 0 14px; flex: 1; }
.program-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: .8rem; color: var(--muted); font-weight: 650; border-top: 1px solid var(--line); padding-top: 12px; }
.program-meta span { display: inline-flex; align-items: center; gap: 5px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.chip {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); border-radius: 999px;
  padding: 7px 14px; font: inherit; font-size: .84rem; font-weight: 650; cursor: pointer;
}
.chip:hover { background: var(--surface-2); }
.chip.active { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }

/* ---------- modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(8, 30, 24, .55); backdrop-filter: blur(4px);
  z-index: 90; display: flex; align-items: flex-end; justify-content: center; padding: 0;
}
.modal {
  background: var(--bg); width: min(820px, 100%); max-height: 92vh; overflow: auto;
  border-radius: 24px 24px 0 0; padding: 26px; box-shadow: var(--shadow-lg);
  animation: slideUp .22s ease;
}
@keyframes slideUp { from { transform: translateY(30px); opacity: .6; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 8px; }
.modal-close { background: var(--surface-2); border: 0; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 18px; color: var(--ink); }
.week-block { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); margin-bottom: 10px; overflow: hidden; }
.week-block summary { cursor: pointer; padding: 13px 16px; font-weight: 700; font-size: .92rem; list-style: none; display: flex; justify-content: space-between; }
.week-block summary::-webkit-details-marker { display: none; }
.week-block[open] summary { border-bottom: 1px solid var(--line); }
.session-line { padding: 11px 16px; border-bottom: 1px dashed var(--line); font-size: .88rem; }
.session-line:last-child { border-bottom: 0; }
.session-line b { display: block; }

/* ---------- toast ---------- */
.toast-host { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 120; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: var(--green-deep); color: #fff; padding: 11px 18px; border-radius: 999px; font-size: .88rem;
  font-weight: 650; box-shadow: var(--shadow-lg); animation: toastIn .2s ease;
}
.toast.error { background: #7d2626; }
@keyframes toastIn { from { transform: translateY(10px); opacity: 0; } }

/* ---------- calendar ---------- */
.calendar { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-dow { text-align: center; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding-bottom: 4px; }
.cal-day {
  position: relative; aspect-ratio: 1; border-radius: 12px; border: 1px solid transparent; background: #f7f9f5;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: .88rem; font-weight: 650; cursor: default; color: var(--ink-soft);
}
.cal-day.empty { background: transparent; }
.cal-day.has { background: var(--lime-soft); border-color: #dcecad; cursor: pointer; }
.cal-day.has:hover { background: #e4f4b4; }
.cal-day.today { outline: 2px solid var(--green); outline-offset: -2px; }
.cal-day.selected { background: var(--green-dark); color: #fff; }
.cal-day .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green); }
.cal-day.selected .dot { background: var(--lime); }
.cal-day .mins { font-size: .62rem; color: var(--muted); font-weight: 700; }
.cal-day.selected .mins { color: #cfe2d9; }

/* ---------- bar chart ---------- */
.bars { display: flex; align-items: flex-end; gap: 8px; height: 130px; padding-top: 10px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bar { width: 100%; max-width: 34px; background: var(--green); border-radius: 6px 6px 3px 3px; min-height: 3px; transition: height .3s ease; }
.bar.zero { background: var(--line); }
.bar-label { font-size: .65rem; color: var(--muted); font-weight: 700; white-space: nowrap; }

/* ---------- auth ---------- */
.auth-shell { display: grid; grid-template-columns: 1.05fr 1fr; min-height: calc(100vh - 66px); }
.auth-art {
  background: radial-gradient(120% 120% at 20% 10%, #1d7059 0%, #0b4437 50%, #072a22 100%);
  color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden;
}
.auth-art::after { content: ""; position: absolute; width: 460px; height: 460px; border: 70px solid rgba(216,240,120,.12); border-radius: 50%; right: -190px; bottom: -190px; }
.auth-art h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); max-width: 420px; }
.auth-art p { color: #c7ded4; max-width: 400px; }
.auth-form-wrap { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-form { width: min(400px, 100%); }
.auth-tabs { display: flex; background: var(--surface-2); border-radius: 999px; padding: 4px; margin-bottom: 24px; }
.auth-tabs button { flex: 1; border: 0; background: transparent; padding: 9px; border-radius: 999px; font: inherit; font-weight: 700; font-size: .9rem; color: var(--muted); cursor: pointer; }
.auth-tabs button.active { background: var(--surface); color: var(--ink); box-shadow: 0 2px 8px rgba(16,36,31,.08); }

/* ---------- workout builder ---------- */
.interval-row {
  display: grid; grid-template-columns: 1.4fr .7fr .7fr 38px; gap: 8px; align-items: end;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.interval-row:last-child { border-bottom: 0; }
.interval-row .input { padding: 8px 10px; font-size: .88rem; }
.interval-row .label { font-size: .72rem; margin-bottom: 4px; }
.preview-line { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.preview-line:last-child { border-bottom: 0; }
.preview-line .name { font-weight: 700; font-size: .92rem; }
.preview-line .desc { font-size: .78rem; color: var(--muted); }

/* ---------- session ---------- */
.session {
  background: radial-gradient(110% 100% at 50% 0%, #14523f 0%, #0a3a2e 45%, #06241d 100%);
  color: #fff; border-radius: 26px; padding: clamp(20px, 4vw, 40px); position: relative; overflow: hidden;
}
.session::after {
  content: ""; position: absolute; inset: auto -20% -60% -20%; height: 70%;
  background: radial-gradient(closest-side, rgba(216,240,120,.13), transparent); pointer-events: none;
}
.session-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; position: relative; z-index: 1; }
.session-top .badge { background: rgba(255,255,255,.12); color: #fff; }
.session-main { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 300px; gap: 30px; align-items: center; margin-top: 10px; }
.timer-wrap { text-align: center; padding: 6px 0; }
.ring-wrap { position: relative; width: min(330px, 74vw); aspect-ratio: 1; margin: 0 auto; }
.ring { transform: rotate(-90deg); width: 100%; height: 100%; }
.ring circle { fill: none; stroke-width: 9; }
.ring .track { stroke: rgba(255,255,255,.12); }
.ring .bar { stroke: var(--lime); stroke-linecap: round; transition: stroke-dashoffset .4s linear; }
.ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.phase-name { font-size: .82rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 800; color: var(--lime); margin-bottom: 4px; max-width: 80%; }
.clock { font-size: clamp(2.9rem, 10vw, 4.6rem); font-weight: 800; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; line-height: 1; }
.clock-sub { font-size: .8rem; color: #a9c8bc; margin-top: 8px; }
.session-desc { color: #cfe2d9; font-size: .92rem; text-align: center; margin: 10px auto 0; max-width: 360px; }
.targets { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 18px; }
.target-box { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.09); border-radius: 14px; padding: 12px; text-align: center; }
.target-box strong { display: block; font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; }
.target-box span { font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: #a9c8bc; font-weight: 700; }
.session-controls { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }
.session-controls .btn-ghost { color: #fff; border-color: rgba(255,255,255,.25); }
.session-controls .btn-ghost:hover { background: rgba(255,255,255,.1); }
.session-controls .btn-lime { min-width: 120px; }
.session-side { border-left: 1px solid rgba(255,255,255,.12); padding-left: 22px; }
.side-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: #a9c8bc; font-weight: 800; margin-bottom: 10px; }
.interval-list { max-height: 330px; overflow: auto; display: flex; flex-direction: column; gap: 5px; padding-right: 4px; }
.iv-item { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; font-size: .8rem; color: #cfe2d9; opacity: .82; }
.iv-item .n { width: 20px; font-weight: 800; font-size: .7rem; color: #8fb3a6; }
.iv-item .t { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 700; }
.iv-item.active { background: rgba(216,240,120,.16); color: #fff; opacity: 1; }
.iv-item.active .n { color: var(--lime); }
.iv-item.done { opacity: .4; text-decoration: line-through; }
.iv-item.next { opacity: .9; }
.session-next { margin-top: 14px; font-size: .8rem; color: #a9c8bc; text-align: center; }
.flash { animation: flashBg .7s ease; }
@keyframes flashBg { 0% { box-shadow: inset 0 0 0 200vmax rgba(216,240,120,.22); } 100% { box-shadow: inset 0 0 0 200vmax rgba(216,240,120,0); } }

/* pre-countdown overlay */
.countdown-overlay {
  position: absolute; inset: 0; z-index: 5; background: rgba(6, 30, 24, .82); backdrop-filter: blur(6px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
}
.countdown-overlay .num { font-size: clamp(5rem, 20vw, 9rem); font-weight: 800; color: var(--lime); line-height: 1; letter-spacing: -0.06em; }
.countdown-overlay .lbl { text-transform: uppercase; letter-spacing: .18em; font-size: .78rem; font-weight: 800; color: #cfe2d9; }

/* finish */
.finish-hero { text-align: center; padding: 10px 0 22px; }
.finish-hero .big { font-size: clamp(2.4rem, 7vw, 3.6rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.finish-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 20px 0; }
.finish-grid .target-box { background: var(--surface-2); border-color: var(--line); color: var(--ink); }
.finish-grid .target-box span { color: var(--muted); }

/* ---------- misc ---------- */
.empty-state { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty-state .icon { font-size: 2.4rem; margin-bottom: 8px; }
.divider { height: 1px; background: var(--line); margin: 22px 0; }
.footer { border-top: 1px solid var(--line); padding: 26px 0 40px; color: var(--muted); font-size: .82rem; }
.footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.skeleton { background: linear-gradient(90deg, #e9efe9, #f4f7f2, #e9efe9); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 10px; }
@keyframes shimmer { to { background-position: -200% 0; } }

@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .session-main { grid-template-columns: 1fr; }
  .session-side { border-left: 0; border-top: 1px solid rgba(255,255,255,.12); padding-left: 0; padding-top: 18px; }
  .interval-list { max-height: 190px; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-art { display: none; }
}
@media (max-width: 680px) {
  .wrap, .narrow { width: calc(100% - 28px); }
  .nav-inner { height: 60px; gap: 8px; }
  .nav-links {
    position: absolute; top: 60px; left: 0; right: 0; background: var(--surface);
    border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch;
    padding: 10px 14px 16px; display: none; box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px; border-radius: 10px; }
  .nav-toggle { display: inline-flex; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .hero { border-radius: 22px; }
  .card { padding: 18px; }
  .finish-grid { grid-template-columns: 1fr 1fr; }
  .interval-row { grid-template-columns: 1fr 1fr; }
  .interval-row .name-field { grid-column: 1 / -1; }
  .interval-row .remove-btn { justify-self: end; }
  .modal { padding: 20px; }
  .nav-user .uname { display: none; }
}
@media print {
  .nav, .footer, .btn { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; border-color: #ccc; }
}
