:root {
  --bg0: #e8f2ef;
  --bg1: #f4faf7;
  --ink: #12221f;
  --mut: #5a726c;
  --line: #c9ddd6;
  --card: rgba(255, 255, 255, 0.78);
  --acc: #0f766e;
  --acc2: #d97706;
  --acc-ink: #fff7ed;
  --ok: #15803d;
  --bad: #b91c1c;
  --shadow: 0 18px 40px rgba(15, 61, 56, 0.08);
  --radius: 18px;
  --nav-h: 72px;
  --font-display: "Outfit", "Plus Jakarta Sans", system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans", system-ui, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  font: 16px/1.5 var(--font-body);
  color: var(--ink);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%230f766e' stroke-opacity='0.07' stroke-width='1'%3E%3Cpath d='M0 20h80M0 40h80M0 60h80M20 0v80M40 0v80M60 0v80'/%3E%3Cpath d='M0 0l80 80M80 0L0 80' stroke-opacity='0.045'/%3E%3C/g%3E%3C/svg%3E"),
    radial-gradient(1200px 600px at 10% -10%, rgba(15, 118, 110, 0.18), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(217, 119, 6, 0.12), transparent 50%),
    linear-gradient(180deg, var(--bg1), var(--bg0));
  background-attachment: fixed;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
}

body.is-public { padding-bottom: 0; }

h1, h2, h3, .brand, .display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

a { color: var(--acc); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  width: min(960px, calc(100% - 28px));
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0 8px;
}

.brand {
  font-size: 1.55rem;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  line-height: 1;
}
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 6px 16px rgba(15, 61, 56, 0.18);
  flex: none;
}
.lp-logo-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  animation: rise .65s ease .05s both;
}
.lp-logo-mark {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 16px 36px rgba(0,0,0,0.22);
}
.auth-logo .brand-mark { width: 40px; height: 40px; border-radius: 12px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 118, 110, 0.12);
  color: var(--acc);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.85rem;
  font-weight: 700;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin: 12px 0;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
}

.hero-card {
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.95), rgba(15, 61, 56, 0.92)),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  color: #f5fffc;
  border: 0;
}

.hero-card h1, .hero-card h2, .hero-card .display { color: #fff; }
.hero-card p { color: rgba(255,255,255,0.88); margin: 8px 0 0; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: 650 0.95rem var(--font-body);
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 12px;
  padding: 10px 16px;
  cursor: pointer;
  transition: transform .12s ease, background .12s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: scale(0.98); }
.btn.primary {
  background: var(--acc);
  border-color: var(--acc);
  color: #fff;
}
.btn.accent {
  background: var(--acc2);
  border-color: var(--acc2);
  color: #111;
}
.btn.ghost { background: transparent; }
.btn.sm { padding: 7px 12px; font-size: 0.85rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }
.sp { justify-content: space-between; }
.stack { display: grid; gap: 10px; }

input, select, textarea {
  width: 100%;
  font: 1rem var(--font-body);
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}
textarea { min-height: 88px; resize: vertical; }
label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 4px; }
.mut { color: var(--mut); font-size: 0.92rem; }
.flash {
  border-radius: 12px;
  padding: 12px 14px;
  margin: 10px 0;
  font-weight: 600;
}
.flash.ok { background: #dcfce7; color: var(--ok); }
.flash.error { background: #fee2e2; color: var(--bad); }

.timer {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 14vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  text-align: center;
  margin: 18px 0;
  animation: pulseSoft 2.4s ease-in-out infinite;
}
.timer.running { color: var(--acc); }

@keyframes pulseSoft {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.015); }
}
@media (prefers-reduced-motion: reduce) {
  .timer { animation: none; }
  * { transition: none !important; }
}

.noise-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.noise-pills button.on {
  background: var(--acc);
  color: #fff;
  border-color: var(--acc);
}

.bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  padding: 0 12px calc(10px + env(safe-area-inset-bottom, 0px));
  pointer-events: none;
}
.bottom-nav-inner {
  pointer-events: auto;
  max-width: 520px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  padding: 8px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(201, 221, 214, 0.9);
  box-shadow:
    0 12px 30px rgba(15, 61, 56, 0.12),
    0 1px 0 rgba(255,255,255,0.8) inset;
  backdrop-filter: blur(16px) saturate(1.2);
}
.bottom-nav a {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #6b807a;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.01em;
  text-decoration: none;
  border-radius: 16px;
  padding: 8px 4px 7px;
  transition: color .2s ease, background .2s ease, transform .15s ease;
}
.bottom-nav a .nav-ico {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}
.bottom-nav a .nav-ico svg {
  width: 20px;
  height: 20px;
  display: block;
}
.bottom-nav a .nav-label { line-height: 1; }
.bottom-nav a.on {
  color: var(--acc);
  background: linear-gradient(180deg, rgba(15, 118, 110, 0.14), rgba(15, 118, 110, 0.08));
}
.bottom-nav a.on .nav-ico {
  background: linear-gradient(145deg, #0f766e, #134e4a);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(15, 118, 110, 0.28);
}
.bottom-nav a.on::before {
  content: "";
  position: absolute;
  top: 4px;
  width: 14px;
  height: 3px;
  border-radius: 99px;
  background: #f59e0b;
}
.bottom-nav a:hover { color: var(--acc); }
body.is-app { padding-bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }

.page-hero-sm { min-height: 112px; }
.page-hero-sm .page-hero-copy { min-height: 112px; padding: 14px 16px; }

.cal-card {
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(15, 118, 110, 0.06), transparent 42%),
    var(--card);
}
.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.cal-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}
.cal-nav {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(15, 118, 110, 0.1);
  color: var(--acc);
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid rgba(15, 118, 110, 0.14);
  transition: background .15s ease, transform .15s ease;
}
.cal-nav:hover { background: rgba(15, 118, 110, 0.18); text-decoration: none; }
.cal-nav:active { transform: scale(0.96); }

.cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
  font-size: 0.82rem;
  background: rgba(255,255,255,0.55);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 8px;
}
.cal .hd {
  font-weight: 800;
  color: var(--mut);
  padding: 2px 0 6px;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}
.cal .hd.weekend { color: rgba(217, 119, 6, 0.85); }
.cal .day {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
  min-height: 36px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 0;
  padding: 4px 0 5px;
  color: var(--ink);
  font: inherit;
  font-weight: 650;
  transition: background .15s ease, transform .12s ease, box-shadow .15s ease;
}
.cal .day.empty { pointer-events: none; opacity: 0; }
.cal .day .num {
  line-height: 1;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
}
.cal .day.weekend .num { color: #8a6a3a; }
.cal .day .dots {
  display: flex;
  gap: 2px;
  height: 4px;
  align-items: center;
}
.cal .day .dots i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--acc);
  display: block;
}
.cal .day.has .num {
  background: rgba(15, 118, 110, 0.14);
  color: #0f766e;
  font-weight: 800;
}
.cal .day.today .num {
  background: linear-gradient(145deg, #f59e0b, #d97706);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 6px 14px rgba(217, 119, 6, 0.35);
}
.cal .day.picked .num,
.cal .day:hover .num {
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.28);
}
.cal .day:active { transform: scale(0.96); }
.cal-legend {
  margin: 10px 0 0;
  font-size: 0.78rem;
  text-align: center;
}

/* Custom datepicker */
.sf-datepicker {
  position: relative;
  min-width: 0;
}
.sf-date-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  font: 650 0.95rem var(--font-body);
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.sf-datepicker.open .sf-date-btn,
.sf-date-btn:focus-visible {
  outline: none;
  border-color: var(--acc);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.18);
}
.sf-date-ico {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(15, 118, 110, 0.12);
  color: var(--acc);
  flex: none;
}
.sf-date-panel {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(15, 61, 56, 0.16);
  padding: 12px;
  animation: rise .2s ease;
}
.sf-date-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.sf-date-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
}
.sf-date-nav {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(15, 118, 110, 0.14);
  background: rgba(15, 118, 110, 0.08);
  color: var(--acc);
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
}
.sf-date-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  text-align: center;
}
.sf-date-hd {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--mut);
  padding: 2px 0 6px;
}
.sf-date-hd.weekend { color: #d97706; }
.sf-date-day {
  appearance: none;
  border: 0;
  background: transparent;
  min-height: 34px;
  border-radius: 999px;
  font: 650 0.85rem var(--font-body);
  color: var(--ink);
  cursor: pointer;
}
.sf-date-day.empty { visibility: hidden; }
.sf-date-day.weekend { color: #8a6a3a; }
.sf-date-day.today { box-shadow: inset 0 0 0 1.5px rgba(217, 119, 6, 0.55); }
.sf-date-day.selected {
  background: linear-gradient(145deg, #0f766e, #134e4a);
  color: #fff;
  box-shadow: 0 8px 16px rgba(15, 118, 110, 0.28);
}
.sf-date-day:hover:not(.selected):not(.empty) {
  background: rgba(15, 118, 110, 0.1);
}
.sf-date-foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}
.sf-date-today-btn,
.sf-date-close {
  border: 0;
  background: rgba(15, 118, 110, 0.1);
  color: var(--acc);
  font: 700 0.82rem var(--font-body);
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
}
.sf-date-close { background: #f3f4f6; color: #4b5563; }

.agenda-soon {
  border-color: rgba(217, 119, 6, 0.4);
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.12), transparent 55%),
    var(--card);
}
.badge.tipo-compito { background: #99f6e4; color: #115e59; }
.badge.tipo-interro { background: #fde68a; color: #92400e; }
.badge.tipo-esame { background: #fecaca; color: #991b1b; }
.badge.tipo-altro { background: #e5e7eb; color: #374151; }

.bars {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  align-items: end;
  height: 140px;
  margin-top: 12px;
}
.bars .col { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bars .bar {
  width: 100%;
  max-width: 36px;
  background: linear-gradient(180deg, #14b8a6, #0f766e);
  border-radius: 8px 8px 4px 4px;
  min-height: 4px;
  transition: height .4s ease;
}

.flashcard {
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 650;
  cursor: pointer;
  user-select: none;
}
.flashcard .hint { font-size: 0.85rem; font-weight: 500; color: var(--mut); margin-top: 10px; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.lp-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  align-content: center;
  overflow: hidden;
  padding: 72px 0 80px;
  color: #f5fffc;
  background:
    linear-gradient(160deg, rgba(8, 36, 34, 0.72), rgba(8, 40, 38, 0.88)),
    radial-gradient(900px 500px at 85% 15%, rgba(217, 119, 6, 0.35), transparent 55%),
    radial-gradient(700px 420px at 10% 80%, rgba(45, 212, 191, 0.22), transparent 50%),
    linear-gradient(135deg, #0f766e, #134e4a 55%, #0b3d3a);
}
.lp-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='72' height='72' viewBox='0 0 72 72' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M36 4v8M36 60v8M4 36h8M60 36h8M14 14l6 6M52 52l6 6M14 58l6-6M52 20l6-6' stroke='%23ffffff' stroke-opacity='0.07' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  pointer-events: none;
}
.lp-hero-inner { position: relative; z-index: 1; max-width: 720px; }
.lp-kicker {
  display: inline-block;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fde68a;
  margin: 0 0 14px;
  animation: rise .65s ease both;
}
.lp-brand {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 12vw, 5.6rem);
  line-height: 0.95;
  color: #fff;
  margin: 0;
}
.lp-motto {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3.8vw, 1.75rem);
  font-weight: 600;
  margin: 18px 0 10px;
  max-width: 22ch;
  color: rgba(255,255,255,0.95);
  animation: rise .65s ease .1s both;
}
.lp-lead {
  margin: 0 0 28px;
  max-width: 38ch;
  color: rgba(255,255,255,0.82);
  font-size: 1.05rem;
  animation: rise .65s ease .15s both;
}
.lp-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  animation: rise .65s ease .2s both;
}
.lp-btn { min-height: 46px; padding-inline: 18px; }
.lp-btn-light { background: rgba(255,255,255,0.94); color: var(--ink); border-color: transparent; }

.lp-section { padding: 72px 0; }
.lp-h2 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin-bottom: 8px;
}
.lp-sub {
  color: var(--mut);
  max-width: 48ch;
  margin: 0 0 28px;
}
.lp-features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 28px;
}
@media (max-width: 700px) {
  .lp-features { grid-template-columns: 1fr; }
}
.lp-feat {
  padding: 8px 0 18px;
  border-bottom: 1px solid var(--line);
}
.lp-feat h3 { margin: 6px 0; font-size: 1.25rem; }
.lp-feat p { margin: 0; color: var(--mut); }
.lp-feat-ico { font-size: 1.5rem; }

.lp-app {
  background:
    linear-gradient(180deg, rgba(15, 118, 110, 0.08), transparent),
    var(--bg1);
  border-block: 1px solid var(--line);
}
.lp-app-grid {
  display: grid;
  grid-template-columns: minmax(180px, 240px) 1fr;
  gap: 36px;
  align-items: center;
}
@media (max-width: 760px) {
  .lp-app-grid { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .lp-app-grid .lp-cta { justify-content: center !important; }
  .lp-app-grid .lp-list { text-align: left; }
}
.lp-list { margin: 0 0 18px; padding-left: 1.1rem; color: var(--mut); }
.lp-list li { margin: 6px 0; }

.lp-phone { animation: floatY 4.5s ease-in-out infinite; }
.lp-phone-bezel {
  width: 210px;
  border-radius: 28px;
  padding: 10px;
  background: linear-gradient(160deg, #1f2937, #0f172a);
  box-shadow: 0 24px 50px rgba(15, 61, 56, 0.28);
}
.lp-phone-screen {
  border-radius: 20px;
  min-height: 360px;
  padding: 22px 16px;
  background:
    radial-gradient(circle at 80% 10%, rgba(217,119,6,.35), transparent 40%),
    linear-gradient(160deg, #0f766e, #134e4a);
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.lp-phone-brand { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.lp-phone-timer {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  text-align: center;
  margin: 28px 0 8px;
}
.lp-phone-bar {
  height: 8px;
  border-radius: 99px;
  background: rgba(255,255,255,0.2);
  overflow: hidden;
}
.lp-phone-bar i {
  display: block;
  width: 62%;
  height: 100%;
  background: #fbbf24;
  border-radius: inherit;
}
.lp-phone-tabs {
  margin-top: auto;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  opacity: 0.85;
}

.lp-docs {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: flex-end;
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
}

.lp-footer {
  padding: 40px 0 56px;
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,0.45);
}
.lp-footer-inner { display: grid; gap: 14px; }
.lp-footer-nav { display: flex; flex-wrap: wrap; gap: 14px 18px; }
.lp-footer-nav a { font-weight: 700; color: var(--ink); text-decoration: none; }
.lp-footer-nav a:hover { color: var(--acc); }

@media (prefers-reduced-motion: reduce) {
  .lp-phone { animation: none; }
  .lp-kicker, .lp-brand, .lp-motto, .lp-lead, .lp-cta { animation: none; }
}

.auth-box { max-width: 420px; margin: 40px auto; }

.auth-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  background:
    radial-gradient(900px 480px at 0% 0%, rgba(15, 118, 110, 0.16), transparent 55%),
    radial-gradient(700px 420px at 100% 100%, rgba(217, 119, 6, 0.12), transparent 50%),
    linear-gradient(180deg, #f7fbf9, #e8f2ef);
}
@media (max-width: 860px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
}
.auth-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 6vw, 56px);
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
  animation: rise .55s ease both;
}
.auth-logo {
  font-size: 1.7rem;
  color: var(--ink);
  margin-bottom: 18px;
}
.auth-kicker {
  margin: 0 0 8px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--acc);
}
.auth-title {
  font-size: clamp(2rem, 5vw, 2.7rem);
  margin: 0 0 8px;
}
.auth-lead {
  margin: 0 0 22px;
  color: var(--mut);
  max-width: 34ch;
}
.auth-form label { color: var(--ink); }
.auth-form input,
.auth-form select {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.92);
  box-shadow: 0 1px 0 rgba(15, 61, 56, 0.03);
}
.auth-form input:focus,
.auth-form select:focus {
  outline: 3px solid rgba(15, 118, 110, 0.28);
  border-color: var(--acc);
}
.auth-submit {
  width: 100%;
  min-height: 48px;
  margin-top: 6px;
  font-size: 1rem;
}
.auth-switch { margin-top: 18px; color: var(--mut); }
.auth-back { margin-top: 8px; }
.auth-back a { color: var(--mut); font-weight: 600; }

.auth-aside {
  position: relative;
  display: grid;
  place-items: center;
  padding: 40px;
  overflow: hidden;
  background:
    linear-gradient(160deg, rgba(8, 36, 34, 0.55), rgba(8, 40, 38, 0.82)),
    linear-gradient(135deg, #0f766e, #134e4a 60%, #0b3d3a);
  color: #fff;
}
.auth-aside::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='72' height='72' viewBox='0 0 72 72' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M36 4v8M36 60v8M4 36h8M60 36h8' stroke='%23ffffff' stroke-opacity='0.08' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}
.auth-aside-card {
  position: relative;
  z-index: 1;
  width: min(320px, 100%);
  border-radius: 28px;
  padding: 28px 22px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(10px);
  box-shadow: 0 24px 50px rgba(0,0,0,0.18);
  animation: floatY 4.8s ease-in-out infinite;
}
.auth-aside-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
}
.auth-aside-timer {
  font-family: var(--font-display);
  font-size: 3.2rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  margin: 22px 0 10px;
  color: #fde68a;
}
.auth-aside-card p { margin: 0; color: rgba(255,255,255,0.88); }

.app-top {
  padding-top: 10px;
  padding-bottom: 4px;
}
.app-top .brand {
  background: linear-gradient(120deg, #0f766e, #0b3d3a 70%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.app-welcome {
  margin: 4px 0 0;
  color: var(--mut);
  font-size: 0.92rem;
}

.site-copy {
  margin: 18px 0 0;
  font-size: 0.82rem;
  color: var(--mut);
  font-weight: 600;
}

.page-hero {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  min-height: 168px;
  margin: 8px 0 16px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(15, 61, 56, 0.12);
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.92), rgba(11, 61, 58, 0.95) 55%, rgba(217, 119, 6, 0.55));
}
.page-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}
.page-hero-copy {
  position: relative;
  z-index: 1;
  min-height: 168px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  color: #fff;
  background: linear-gradient(180deg, rgba(8,40,38,0.15), rgba(8,40,38,0.78));
}
.page-hero-copy h2 { color: #fff; margin-bottom: 4px; }
.page-hero-copy p { margin: 0; color: rgba(255,255,255,0.9); max-width: 42ch; }

.timer-card {
  text-align: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(520px 280px at 50% 0%, rgba(15, 118, 110, 0.14), transparent 60%),
    radial-gradient(420px 240px at 80% 100%, rgba(217, 119, 6, 0.1), transparent 55%),
    var(--card);
}
.timer-card[data-phase="break"] {
  background:
    radial-gradient(520px 280px at 50% 0%, rgba(217, 119, 6, 0.16), transparent 60%),
    radial-gradient(420px 240px at 20% 100%, rgba(15, 118, 110, 0.08), transparent 55%),
    var(--card);
}
.timer-orbits {
  position: absolute;
  inset: -20%;
  pointer-events: none;
  opacity: 0.55;
}
.timer-orbit {
  position: absolute;
  left: 50%;
  top: 42%;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: orbitSpin linear infinite;
}
.timer-orbit.o1 { width: 280px; height: 280px; animation-duration: 18s; }
.timer-orbit.o2 { width: 360px; height: 360px; animation-duration: 28s; animation-direction: reverse; border-color: rgba(217,119,6,0.16); }
.timer-orbit.o3 { width: 440px; height: 440px; animation-duration: 40s; opacity: 0.5; }
@keyframes orbitSpin { to { transform: translate(-50%, -50%) rotate(360deg); } }

.timer-meta { position: relative; z-index: 1; }
.phase-chip {
  transition: background .35s ease, color .35s ease, transform .25s ease;
}
.phase-chip.break {
  background: rgba(217, 119, 6, 0.18);
  color: #92400e;
  transform: scale(1.04);
}

.timer-ring-wrap {
  position: relative;
  z-index: 1;
  width: min(280px, 78vw);
  margin: 10px auto 6px;
  aspect-ratio: 1;
}
.timer-glow {
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.28), transparent 68%);
  filter: blur(8px);
  opacity: 0.55;
  transition: opacity .35s ease, background .35s ease;
}
.timer-ring-wrap.is-running .timer-glow {
  opacity: 1;
  animation: breathe 2.4s ease-in-out infinite;
}
.timer-ring-wrap.is-break .timer-glow {
  background: radial-gradient(circle, rgba(251, 191, 36, 0.32), transparent 68%);
}
@keyframes breathe {
  0%, 100% { transform: scale(0.92); opacity: 0.55; }
  50% { transform: scale(1.06); opacity: 1; }
}

.timer-ring {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 10px 24px rgba(15, 61, 56, 0.12));
}
.timer-ring-track {
  fill: none;
  stroke: rgba(15, 118, 110, 0.12);
  stroke-width: 12;
}
.timer-ring-ticks {
  fill: none;
  stroke: rgba(15, 118, 110, 0.22);
  stroke-width: 2;
  transform-origin: 100px 100px;
  animation: tickSpin 60s linear infinite;
}
@keyframes tickSpin { to { transform: rotate(360deg); } }
.timer-ring-fg {
  fill: none;
  stroke: url(#sfRingGrad);
  stroke-width: 12;
  stroke-linecap: round;
  transition: stroke .35s ease;
}
.timer-ring-fg.break { stroke: url(#sfRingBreak); }
.timer-ring-head {
  fill: #fff;
  stroke: #0f766e;
  stroke-width: 2.5;
  filter: drop-shadow(0 2px 6px rgba(15, 61, 56, 0.35));
  transition: fill .25s ease, stroke .25s ease;
}
.timer-ring-wrap.is-break .timer-ring-head { stroke: #d97706; }

.timer-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 2px;
  pointer-events: none;
}
.timer-ring-wrap .timer {
  margin: 0;
  font-size: clamp(2.6rem, 11vw, 3.6rem);
  letter-spacing: -0.05em;
  line-height: 1;
  animation: none;
  text-shadow: 0 8px 24px rgba(15, 61, 56, 0.08);
}
.timer-ring-wrap .timer.running {
  color: var(--acc);
  animation: digitPulse 1s ease-in-out infinite;
}
.timer-ring-wrap.is-break .timer.running { color: #d97706; }
@keyframes digitPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.025); }
}
.timer-sub {
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--mut);
}

.timer-burst {
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  border: 2px solid rgba(15, 118, 110, 0.45);
  opacity: 0;
  pointer-events: none;
}
.timer-burst.go {
  animation: burstOut .85s ease-out forwards;
}
.timer-ring-wrap.is-break .timer-burst { border-color: rgba(217, 119, 6, 0.5); }
@keyframes burstOut {
  0% { transform: scale(0.55); opacity: 0.9; }
  100% { transform: scale(1.55); opacity: 0; }
}

.timer-actions { justify-content: center; margin-top: 10px; position: relative; z-index: 1; }
.btn-xl { min-height: 48px; padding-inline: 20px; font-size: 1rem; }
.pulse-ready {
  animation: ctaPulse 1.8s ease-in-out infinite;
  box-shadow: 0 0 0 0 rgba(15, 118, 110, 0.35);
}
@keyframes ctaPulse {
  0% { box-shadow: 0 0 0 0 rgba(15, 118, 110, 0.35); }
  70% { box-shadow: 0 0 0 14px rgba(15, 118, 110, 0); }
  100% { box-shadow: 0 0 0 0 rgba(15, 118, 110, 0); }
}
.timer-done { animation: popDone .9s cubic-bezier(.2,1.4,.3,1); }
@keyframes popDone {
  0% { transform: scale(1); }
  35% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .45s ease, transform .45s ease;
}
.reveal.in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .timer-done,
  .pulse-ready,
  .timer-orbit,
  .timer-ring-ticks,
  .timer-glow,
  .timer-burst.go,
  .timer-ring-wrap .timer.running { animation: none !important; }
  .timer-ring-fg { transition: none; }
}

.card {
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 44px rgba(15, 61, 56, 0.11);
}
.bottom-nav a:active { transform: scale(0.97); }
@media (prefers-reduced-motion: reduce) {
  .bottom-nav a.on .nav-ico { transform: none; }
}

.item-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.item-row:last-child { border-bottom: 0; }

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  background: var(--acc2);
  color: #111;
  border-radius: 6px;
  padding: 3px 8px;
}

.paywall {
  border: 2px dashed rgba(217, 119, 6, 0.55);
  background: rgba(217, 119, 6, 0.08);
}

.docs-article h2 {
  margin-top: 28px;
  margin-bottom: 10px;
  font-size: 1.35rem;
}
.docs-article ol, .docs-article ul { padding-left: 1.2rem; }
.docs-article li { margin: 6px 0; }

.nav-ico i { font-size: 1.15rem; line-height: 1; }

.more-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.more-tile {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--ink);
  text-decoration: none;
  backdrop-filter: blur(8px);
  transition: transform .18s ease, border-color .18s ease;
}
.more-tile:hover {
  text-decoration: none;
  transform: translateY(-2px);
  border-color: var(--acc);
}
.more-tile i {
  font-size: 1.35rem;
  color: var(--acc);
}
.more-tile span { font-weight: 800; font-family: var(--font-display); }
.more-tile small { font-size: 0.82rem; }

.list-clean { list-style: none; margin: 0; padding: 0; }
.grow { flex: 1; min-width: 140px; }
.stack { display: grid; gap: 10px; }
.row.between { justify-content: space-between; align-items: center; width: 100%; }

.seg {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: rgba(255,255,255,0.7);
  border: 1px solid var(--line);
  border-radius: 999px;
  margin-bottom: 14px;
}
.seg a {
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 700;
  color: var(--mut);
  text-decoration: none;
}
.seg a.on {
  background: var(--acc);
  color: #fff;
}

.note-card {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.note-card:last-child { border-bottom: 0; }
.note-card p { margin: 8px 0; white-space: pre-wrap; }

.invite-code {
  font-weight: 800;
  letter-spacing: .12em;
  background: rgba(15,118,110,.1);
  padding: 2px 8px;
  border-radius: 8px;
}

.progress {
  height: 10px;
  background: rgba(15,118,110,.12);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 6px;
}
.progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--acc), #14b8a6);
  border-radius: inherit;
}
.goal-bars { display: grid; gap: 14px; margin-top: 10px; }

.leaderboard { list-style: none; margin: 0; padding: 0; }
.leaderboard li {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.leaderboard li:last-child { border-bottom: 0; }
.rank {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(15,118,110,.12);
  font-weight: 800;
  font-size: 0.85rem;
}

.subj-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

.btn.danger {
  background: rgba(185, 28, 28, 0.1);
  color: var(--bad);
  border-color: rgba(185, 28, 28, 0.25);
}
.btn.danger:hover { background: rgba(185, 28, 28, 0.18); }

.help-box {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  margin: 0 0 14px;
  background: rgba(15, 118, 110, 0.08);
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 14px;
}
.help-box i { color: var(--acc); margin-top: 3px; }
.help-box strong { display: block; margin-bottom: 2px; }
.help-box p { margin: 0; color: var(--mut); font-size: 0.92rem; }

.empty-steps { padding: 8px 0; }
.empty-title { font-weight: 700; margin: 0 0 8px; }
.empty-steps ol { margin: 0 0 12px; padding-left: 1.2rem; color: var(--mut); }
.empty-steps li { margin: 4px 0; }

.onboard-banner {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  padding: 14px 16px;
  margin-bottom: 14px;
  background: linear-gradient(135deg, rgba(15,118,110,.12), rgba(217,119,6,.1));
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.onboard-steps { margin: 8px 0 0; padding-left: 1.2rem; }
.onboard-steps a { font-weight: 700; }

.places-map {
  width: 100%;
  height: min(52vh, 420px);
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #dce8e4;
}
.translate-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}
.gloss {
  font-size: 0.82rem;
  color: var(--mut);
  margin: 4px 0 0;
}
