:root {
  --bg: #edf8fb;
  --surface: #ffffff;
  --surface-soft: #f5fbfd;
  --ink: #132936;
  --muted: #637985;
  --line: #d6e7ed;
  --blue: #176bff;
  --teal: #00a7a5;
  --teal-dark: #057a78;
  --aqua: #5ad7cf;
  --amber: #f0b429;
  --orange: #f97316;
  --red: #dc2626;
  --green: #13a46b;
  --shadow: 0 18px 45px rgba(17, 67, 86, 0.12);
  --shadow-soft: 0 10px 28px rgba(19, 41, 54, 0.08);
  --shadow-lift: 0 18px 34px rgba(23, 107, 255, 0.18);
  --radius: 8px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html {
  background: #dceff4;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(115deg, rgba(0, 167, 165, 0.12), transparent 36%),
    linear-gradient(245deg, rgba(23, 107, 255, 0.1), transparent 42%),
    repeating-linear-gradient(90deg, rgba(19, 41, 54, 0.025) 0 1px, transparent 1px 72px),
    linear-gradient(180deg, #f9feff 0%, var(--bg) 100%);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
  font: inherit;
  scroll-margin: 128px;
}

button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  position: relative;
  width: min(100%, 480px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 14px 104px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 253, 255, 0.76)),
    rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 0 1px rgba(216, 232, 238, 0.45);
}

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 4px 16px;
  animation: slideFade 420ms var(--ease) both;
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  color: white;
  background:
    linear-gradient(145deg, var(--blue), var(--teal)),
    #0d8ea1;
  box-shadow: var(--shadow);
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease);
}

.brand-mark:hover {
  box-shadow: var(--shadow-lift);
  transform: translateY(-1px) scale(1.02);
}

.brand-mark svg,
.nav-icon svg,
.inline-icon svg,
.button-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.brand-mark svg path:first-child {
  fill: rgba(255, 255, 255, 0.2);
}

.eyebrow {
  margin: 0 0 2px;
  color: var(--teal-dark);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: 1.45rem;
  line-height: 1.1;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 10px;
  font-size: 1.55rem;
  line-height: 1.15;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.screen {
  display: grid;
  gap: 16px;
}

.screen > * {
  animation: cardIn 420ms var(--ease) both;
}

.screen > *:nth-child(2) {
  animation-delay: 35ms;
}

.screen > *:nth-child(3) {
  animation-delay: 70ms;
}

.screen > *:nth-child(4) {
  animation-delay: 105ms;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 284px;
  padding: 20px;
  color: white;
  background:
    linear-gradient(140deg, rgba(10, 36, 57, 0.86), rgba(0, 119, 139, 0.74)),
    url("data:image/svg+xml,%3Csvg width='900' height='580' viewBox='0 0 900 580' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='900' height='580' fill='%230f9bb5'/%3E%3Cpath d='M0 430 C140 352 270 480 420 394 C570 307 716 372 900 296 L900 580 L0 580 Z' fill='%230d7d88'/%3E%3Ccircle cx='746' cy='116' r='62' fill='%23ffbd59'/%3E%3Cpath d='M92 348 L166 260 L242 350' stroke='%23ffffff' stroke-width='14' fill='none' stroke-linecap='round'/%3E%3Cpath d='M168 263 L203 201 L260 190 L309 226' stroke='%23ffffff' stroke-width='14' fill='none' stroke-linecap='round'/%3E%3Cpath d='M540 374 q65 -108 136 0' stroke='%23d7fbff' stroke-width='12' fill='none' stroke-linecap='round'/%3E%3Cpath d='M497 418 h265' stroke='%23d7fbff' stroke-width='12' stroke-linecap='round'/%3E%3Cpath d='M110 448 C220 414 310 470 424 438 C536 407 643 438 790 398' stroke='%23a2f2ef' stroke-width='8' fill='none' stroke-linecap='round' opacity='.58'/%3E%3C/svg%3E");
  background-size: cover;
  background-position: center;
  border-radius: var(--radius);
  box-shadow: 0 24px 50px rgba(6, 77, 96, 0.22);
  isolation: isolate;
}

.hero::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(100deg, transparent 12%, rgba(255, 255, 255, 0.18) 28%, transparent 44%),
    linear-gradient(180deg, transparent 62%, rgba(4, 40, 56, 0.34));
  background-size: 240% 100%, 100% 100%;
  animation: sheen 8s var(--ease) infinite;
}

.hero h2 {
  max-width: 13ch;
  margin-top: 54px;
  margin-bottom: 10px;
  font-size: 2.55rem;
  text-shadow: 0 6px 22px rgba(0, 0, 0, 0.2);
}

.hero p {
  max-width: 30rem;
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1rem;
  line-height: 1.45;
}

.card,
.notice,
.risk-panel,
.history-card,
.coach-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 254, 255, 0.94)),
    var(--surface);
  box-shadow: var(--shadow-soft);
  transition:
    border-color 180ms ease,
    box-shadow 220ms var(--ease),
    transform 220ms var(--ease);
}

.card:hover,
.history-card:hover,
.coach-row:hover,
.risk-panel:hover {
  border-color: #b9d9e5;
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.card {
  padding: 16px;
}

.card.compact {
  padding: 12px;
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

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

.status-tile {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 126px;
  padding: 12px;
  border: 1px solid rgba(214, 231, 237, 0.9);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 250, 252, 0.9));
  box-shadow: var(--shadow-soft);
  transition: border-color 180ms ease, box-shadow 220ms var(--ease), transform 220ms var(--ease);
}

.status-tile:hover {
  border-color: #b8dce4;
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.status-tile .inline-icon {
  width: 34px;
  height: 34px;
}

.status-tile strong,
.status-tile span {
  display: block;
}

.status-tile strong {
  margin-bottom: 3px;
  font-size: 1.1rem;
}

.status-tile span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.3;
}

.muted,
.small {
  color: var(--muted);
}

.small {
  margin-bottom: 0;
  font-size: 0.86rem;
  line-height: 1.45;
}

.notice {
  padding: 12px;
  border-left: 5px solid var(--blue);
  color: #12344d;
  background: linear-gradient(180deg, #f7fcff, #eef9ff);
  box-shadow: 0 10px 24px rgba(23, 107, 255, 0.06);
}

.notice.warning {
  border-left-color: var(--orange);
  background: #fff7ed;
}

.notice.danger {
  border-left-color: var(--red);
  background: #fef2f2;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.button,
.ghost-button,
.danger-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 0;
  border-radius: var(--radius);
  font-weight: 800;
  text-decoration: none;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 220ms var(--ease),
    color 180ms ease,
    transform 180ms var(--ease);
}

.button {
  flex: 1 1 150px;
  padding: 0 16px;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  box-shadow: 0 12px 20px rgba(23, 107, 255, 0.16);
}

.button:hover,
.danger-button:hover,
.ghost-button:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

.button:hover {
  box-shadow: var(--shadow-lift);
}

.button:active,
.ghost-button:active,
.danger-button:active,
.icon-button:active,
.nav-button:active {
  transform: translateY(0) scale(0.98);
}

.ghost-button {
  flex: 1 1 130px;
  padding: 0 14px;
  color: var(--teal-dark);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 8px 18px rgba(19, 41, 54, 0.04);
}

.ghost-button:hover,
.icon-button:hover {
  border-color: #a9d5de;
  background: #f2fcfd;
}

.danger-button {
  padding: 0 14px;
  color: white;
  background: var(--red);
}

.icon-button {
  width: 46px;
  color: var(--muted);
  border: 1px solid var(--line);
  background: white;
}

.form-grid {
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
}

.field span,
.label {
  color: #284453;
  font-size: 0.9rem;
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #cfe1e8;
  border-radius: var(--radius);
  color: var(--ink);
  background:
    linear-gradient(180deg, #ffffff, #f7fcfe);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms var(--ease);
}

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

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow:
    0 0 0 4px rgba(0, 167, 165, 0.14),
    0 8px 20px rgba(0, 128, 145, 0.08);
  transform: translateY(-1px);
}

.split {
  display: grid;
  grid-template-columns: 1fr 112px;
  gap: 10px;
}

.check-list {
  display: grid;
  gap: 8px;
}

.check-item {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: start;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fbfeff, var(--surface-soft));
  transition: border-color 180ms ease, background 180ms ease, transform 180ms var(--ease);
}

.check-item:hover {
  border-color: #b6dce4;
  background: #f0fbfb;
  transform: translateY(-1px);
}

.check-item input {
  width: 18px;
  min-height: 18px;
  margin: 2px 0 0;
  accent-color: var(--teal);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.segmented button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.9);
  font-weight: 800;
  transition: background 180ms ease, color 180ms ease, transform 180ms var(--ease), box-shadow 180ms ease;
}

.segmented button.active {
  color: white;
  border-color: transparent;
  background: linear-gradient(135deg, var(--teal-dark), var(--blue));
  box-shadow: 0 10px 20px rgba(0, 126, 145, 0.18);
}

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

.metric {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, #fbfeff, #f2f9fb);
  transition: border-color 180ms ease, transform 180ms var(--ease), box-shadow 180ms var(--ease);
}

.metric:hover {
  border-color: #b9d9e5;
  box-shadow: 0 10px 24px rgba(19, 41, 54, 0.07);
  transform: translateY(-1px);
}

.metric strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1.3rem;
}

.metric span {
  color: var(--muted);
  font-size: 0.82rem;
}

.risk-panel {
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(0, 167, 165, 0.1), transparent 38%),
    linear-gradient(180deg, #ffffff, #f8fdff);
}

.risk-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.risk-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 10px;
  border-radius: 999px;
  color: white;
  font-size: 0.82rem;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(19, 41, 54, 0.14);
}

.risk-low {
  background: var(--green);
}

.risk-moderate {
  color: #4b3700;
  background: var(--amber);
}

.risk-high {
  background: var(--orange);
}

.risk-extreme {
  background: var(--red);
}

.recommendations {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.rec-card {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 10px;
  padding: 12px;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, #ffffff, #f7fcff);
  border: 1px solid var(--line);
  transition: border-color 180ms ease, box-shadow 180ms var(--ease), transform 180ms var(--ease);
}

.rec-card:hover {
  border-color: #b8dce4;
  box-shadow: 0 10px 22px rgba(19, 41, 54, 0.06);
  transform: translateY(-1px);
}

.inline-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  color: var(--teal-dark);
  background:
    linear-gradient(145deg, #e8fbfb, #eef7ff);
  box-shadow: inset 0 0 0 1px rgba(0, 167, 165, 0.08);
}

.rec-card h3 {
  margin-bottom: 4px;
  font-size: 0.98rem;
}

details {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #f7fcfe);
  transition: border-color 180ms ease, box-shadow 180ms var(--ease);
}

details[open] {
  border-color: #b4dce4;
  box-shadow: 0 10px 24px rgba(19, 41, 54, 0.06);
}

summary {
  color: var(--teal-dark);
  cursor: pointer;
  font-weight: 900;
}

details p,
details ul {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.timer-display {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 210px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    conic-gradient(from 180deg, rgba(0, 167, 165, 0.2), rgba(23, 107, 255, 0.12), rgba(240, 180, 41, 0.12), rgba(0, 167, 165, 0.2)),
    #f7fcff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), var(--shadow-soft);
}

.timer-display::before {
  position: absolute;
  inset: -45%;
  content: "";
  background: conic-gradient(from 0deg, transparent, rgba(0, 167, 165, 0.18), transparent 36%);
  animation: rotateGlow 10s linear infinite;
}

.timer-display > * {
  position: relative;
  z-index: 1;
}

.timer-time {
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: 0;
}

.timer-sub {
  color: var(--muted);
  font-weight: 750;
}

.water-log-list,
.history-list,
.coach-list {
  display: grid;
  gap: 10px;
}

.log-entry,
.history-card,
.coach-row {
  padding: 12px;
}

.log-entry {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #f8fdff);
  transition: border-color 180ms ease, box-shadow 180ms var(--ease), transform 180ms var(--ease);
}

.log-entry:hover {
  border-color: #b8dce4;
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.history-card {
  display: grid;
  gap: 8px;
}

.history-main {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.history-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #284453;
  background: linear-gradient(180deg, #f0fbfd, #e9f5fa);
  border: 1px solid rgba(185, 216, 226, 0.7);
  font-size: 0.78rem;
  font-weight: 800;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.tabs button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.9);
  font-weight: 850;
  transition: background 180ms ease, color 180ms ease, transform 180ms var(--ease), box-shadow 180ms ease;
}

.auth-tabs {
  grid-template-columns: repeat(2, 1fr);
}

.tabs button.active {
  color: white;
  border-color: transparent;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  box-shadow: 0 10px 20px rgba(23, 107, 255, 0.18);
}

.learn-section ul,
.safety-list {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.6;
}

.emergency-steps {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.step {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  align-items: center;
}

.step span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: white;
  background: var(--red);
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(220, 38, 38, 0.18);
}

.coach-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
}

.empty-state {
  padding: 24px 16px;
  border: 1px dashed #b9d8e2;
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(244, 251, 253, 0.7));
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 92px;
  z-index: 20;
  width: min(calc(100% - 28px), 440px);
  padding: 12px 14px;
  border-radius: var(--radius);
  color: white;
  background: linear-gradient(135deg, #132936, #0b6171);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  width: min(100%, 480px);
  padding: 8px 8px max(10px, env(safe-area-inset-bottom));
  border: 1px solid rgba(214, 231, 237, 0.9);
  border-bottom: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 252, 254, 0.94));
  backdrop-filter: blur(18px);
  box-shadow: 0 -18px 42px rgba(19, 41, 54, 0.1);
  transform: translateX(-50%);
}

.nav-button {
  display: grid;
  justify-items: center;
  gap: 3px;
  min-width: 0;
  min-height: 58px;
  padding: 6px 2px;
  border: 0;
  border-radius: var(--radius);
  color: var(--muted);
  background: transparent;
  font-size: 0.68rem;
  font-weight: 800;
  position: relative;
  transition: background 180ms ease, color 180ms ease, transform 180ms var(--ease);
}

.nav-button.active {
  color: var(--blue);
  background: linear-gradient(180deg, #eef7ff, #e9fbfb);
}

.nav-button.active::before {
  position: absolute;
  top: 5px;
  width: 22px;
  height: 3px;
  content: "";
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--teal));
}

.nav-button:hover {
  color: var(--teal-dark);
  background: #f1fbfd;
}

.nav-icon {
  display: grid;
  place-items: center;
}

.nav-icon svg {
  width: 21px;
  height: 21px;
}

.hidden {
  display: none !important;
}

@media (min-width: 780px) {
  body {
    padding: 24px 0;
  }

  .app-shell {
    min-height: calc(100vh - 48px);
    border: 1px solid rgba(216, 232, 238, 0.8);
    border-radius: var(--radius);
    box-shadow: 0 28px 80px rgba(19, 41, 54, 0.16);
  }

  .bottom-nav {
    border-radius: var(--radius) var(--radius) 0 0;
  }
}

@media (max-width: 380px) {
  .app-shell {
    padding-right: 10px;
    padding-left: 10px;
  }

  .hero h2 {
    font-size: 2rem;
  }

  .timer-time {
    font-size: 2.45rem;
  }

  .split,
  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .button {
    flex-basis: 100%;
  }
}

@media (max-width: 420px) {
  .dashboard-strip {
    grid-template-columns: 1fr;
  }

  .status-tile {
    min-height: auto;
    grid-template-columns: 38px 1fr;
    align-items: center;
  }
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideFade {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes sheen {
  0%,
  54% {
    background-position: 180% 0, 0 0;
  }
  100% {
    background-position: -80% 0, 0 0;
  }
}

@keyframes rotateGlow {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}

/* Premium product refresh */
:root {
  --bg: #eaf3f6;
  --surface: #ffffff;
  --surface-soft: #f4f8fa;
  --ink: #10202b;
  --muted: #667784;
  --line: #d9e3e8;
  --blue: #2563eb;
  --teal: #0fafa6;
  --teal-dark: #087c78;
  --aqua: #7ddad4;
  --amber: #d99a17;
  --orange: #ea6a19;
  --red: #d92d20;
  --green: #079669;
  --shadow: 0 22px 55px rgba(16, 32, 43, 0.12);
  --shadow-soft: 0 12px 30px rgba(16, 32, 43, 0.075);
  --shadow-lift: 0 18px 36px rgba(37, 99, 235, 0.18);
}

body {
  background:
    linear-gradient(115deg, rgba(15, 175, 166, 0.08), transparent 36%),
    linear-gradient(245deg, rgba(37, 99, 235, 0.08), transparent 42%),
    repeating-linear-gradient(90deg, rgba(16, 32, 43, 0.025) 0 1px, transparent 1px 76px),
    linear-gradient(180deg, #f8fcfd 0%, var(--bg) 100%);
}

.app-shell {
  width: min(100%, 460px);
  padding: 18px 14px 108px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 252, 0.9)),
    #f8fbfc;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 8;
  margin: -18px -14px 12px;
  padding: 16px 14px 12px;
  background: linear-gradient(180deg, rgba(248, 252, 253, 0.98), rgba(248, 252, 253, 0.86));
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(217, 227, 232, 0.64);
}

.topbar > div:nth-child(2) {
  min-width: 0;
}

.brand-mark {
  width: 46px;
  height: 46px;
  background:
    linear-gradient(145deg, #1d4ed8 0%, #0fafa6 100%),
    #0fafa6;
  box-shadow: 0 14px 30px rgba(15, 105, 166, 0.22);
}

.eyebrow {
  color: var(--teal-dark);
  font-size: 0.72rem;
  font-weight: 900;
}

h1 {
  font-size: 1.32rem;
}

h2 {
  font-size: 1.62rem;
}

.screen {
  gap: 14px;
}

.command-center {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border: 1px solid #173547;
  border-radius: var(--radius);
  color: white;
  background:
    linear-gradient(135deg, rgba(14, 33, 47, 0.98), rgba(13, 88, 97, 0.95)),
    #10202b;
  box-shadow: 0 24px 60px rgba(16, 32, 43, 0.2);
  isolation: isolate;
}

.command-center::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(90deg, transparent, rgba(125, 218, 212, 0.16), transparent),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.055) 0 1px, transparent 1px 56px);
  opacity: 0.7;
}

.command-topline,
.risk-top,
.history-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.command-center .eyebrow {
  color: #8ff0e9;
}

.command-center h2 {
  max-width: 12ch;
  margin-bottom: 0;
  color: white;
  font-size: 2.25rem;
  line-height: 1;
}

.command-copy {
  max-width: 34rem;
  margin: 18px 0 16px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.5;
}

.command-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.command-metric {
  min-height: 78px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
}

.command-metric span,
.command-metric strong {
  display: block;
}

.command-metric span {
  margin-bottom: 7px;
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.75rem;
  font-weight: 900;
}

.command-metric strong {
  color: white;
  font-size: 1.05rem;
  line-height: 1.15;
}

.command-actions {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: 10px;
}

.primary-action {
  min-height: 52px;
  background: linear-gradient(135deg, #2563eb, #0fafa6);
}

.command-center .ghost-button {
  color: #eaffff;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
}

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

.insight-card,
.account-panel,
.privacy-panel,
.card,
.notice,
.risk-panel,
.history-card,
.coach-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.insight-card {
  display: grid;
  gap: 8px;
  min-height: 124px;
  padding: 12px;
}

.insight-card span,
.insight-card strong {
  display: block;
}

.insight-card > span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.insight-card strong {
  align-self: end;
  font-size: 1.05rem;
  line-height: 1.15;
}

.account-panel,
.privacy-panel {
  padding: 16px;
}

.card,
.risk-panel {
  padding: 16px;
}

.card:hover,
.history-card:hover,
.coach-row:hover,
.risk-panel:hover,
.insight-card:hover,
.account-panel:hover,
.privacy-panel:hover {
  border-color: #bfd4dd;
  box-shadow: var(--shadow);
}

.notice,
.safety-note {
  border-left-width: 4px;
  background: #f7fbfd;
}

.notice.danger {
  color: #6b1111;
  background: #fff4f2;
}

.notice.warning {
  color: #5a3905;
  background: #fff9ed;
}

.button,
.ghost-button,
.danger-button,
.icon-button,
.segmented button,
.tabs button,
input,
select,
textarea {
  min-height: 48px;
}

.button,
.danger-button {
  letter-spacing: 0;
}

.button:focus-visible,
.ghost-button:focus-visible,
.danger-button:focus-visible,
.icon-button:focus-visible,
.nav-button:focus-visible,
.segmented button:focus-visible,
.tabs button:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.28);
  outline-offset: 2px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #129b95;
  box-shadow:
    0 0 0 4px rgba(15, 175, 166, 0.14),
    0 10px 22px rgba(16, 32, 43, 0.08);
}

.field span,
.label {
  color: #203644;
  font-size: 0.86rem;
  font-weight: 850;
}

.check-item {
  min-height: 48px;
  align-items: center;
}

.check-item input {
  width: 20px;
  min-height: 20px;
}

.segmented,
.tabs {
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #eef5f8;
  gap: 4px;
}

.segmented button,
.tabs button {
  border: 0;
  background: transparent;
}

.segmented button.active,
.tabs button.active {
  background: #10202b;
  box-shadow: 0 10px 18px rgba(16, 32, 43, 0.12);
}

.metric {
  min-height: 92px;
  background: #f7fbfc;
}

.metric strong {
  color: #10202b;
  font-size: 1.32rem;
}

.risk-panel {
  position: relative;
  overflow: hidden;
  background: #ffffff;
}

.risk-panel::before {
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  content: "";
  background: var(--teal);
}

.risk-panel.risk-low::before {
  background: var(--green);
}

.risk-panel.risk-moderate::before {
  background: var(--amber);
}

.risk-panel.risk-high::before {
  background: var(--orange);
}

.risk-panel.risk-extreme::before {
  background: var(--red);
}

.risk-panel.risk-high {
  background: linear-gradient(180deg, #fffaf5, #ffffff 42%);
}

.risk-panel.risk-extreme {
  background: linear-gradient(180deg, #fff4f4, #ffffff 44%);
}

.risk-badge {
  min-height: 34px;
  padding: 6px 11px;
  letter-spacing: 0;
}

.risk-low {
  background: #07865f;
}

.risk-moderate {
  color: #3d2904;
  background: #f0b429;
}

.risk-high {
  background: #ea6a19;
}

.risk-extreme {
  background: #d92d20;
}

.risk-panel.risk-low {
  color: var(--ink);
  background: linear-gradient(180deg, #f2fbf7, #ffffff 42%);
}

.risk-panel.risk-moderate {
  color: var(--ink);
  background: linear-gradient(180deg, #fffaf0, #ffffff 42%);
}

.risk-panel.risk-high {
  color: var(--ink);
  background: linear-gradient(180deg, #fff7f0, #ffffff 42%);
}

.risk-panel.risk-extreme {
  color: var(--ink);
  background: linear-gradient(180deg, #fff3f3, #ffffff 44%);
}

.rec-card {
  align-items: start;
  min-height: 84px;
}

.timer-display {
  min-height: 238px;
  background:
    linear-gradient(180deg, #10202b, #0f4f5c);
  color: white;
  border-color: #163949;
  box-shadow: 0 24px 46px rgba(16, 32, 43, 0.18);
}

.timer-display::before {
  opacity: 0.65;
}

.timer-time {
  font-size: 3.55rem;
  line-height: 1;
}

.timer-sub {
  color: rgba(255, 255, 255, 0.72);
}

.log-entry,
.history-card,
.coach-row {
  background: #ffffff;
}

.history-card {
  gap: 10px;
  padding: 14px;
}

.history-meta {
  gap: 7px;
}

.pill {
  min-height: 29px;
  color: #254252;
  background: #f2f7f9;
}

.step {
  min-height: 46px;
  padding: 8px;
  border: 1px solid #f1d0d0;
  border-radius: var(--radius);
  background: #fff8f7;
}

.bottom-nav {
  width: min(100%, 460px);
  padding: 8px 8px max(10px, env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
}

.nav-button {
  min-height: 60px;
  font-size: 0.67rem;
}

.nav-icon svg {
  width: 22px;
  height: 22px;
}

@media (min-width: 780px) {
  .app-shell {
    border-radius: 8px;
  }
}

@media (max-width: 420px) {
  .command-center {
    padding: 16px;
  }

  .command-center h2 {
    font-size: 2rem;
  }

  .command-metrics {
    grid-template-columns: 1fr;
  }

  .command-metric {
    min-height: auto;
  }

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

  .insight-grid {
    grid-template-columns: 1fr;
  }

  .insight-card {
    min-height: auto;
    grid-template-columns: 38px 1fr;
    align-items: center;
  }

  .insight-card > span {
    grid-column: 2;
  }

  .insight-card strong {
    grid-column: 2;
  }
}

/* Public-release polish */
html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  position: fixed;
  inset: 0;
}

.app-shell {
  height: 100dvh;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.app-shell::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.topbar {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
}

.command-center {
  min-height: 340px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(9, 25, 37, 0.98), rgba(8, 79, 88, 0.95)),
    #10202b;
}

.command-center::after {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 112px;
  height: 112px;
  content: "";
  border-radius: 50%;
  background:
    conic-gradient(from 210deg, #0fafa6 0 68%, rgba(255, 255, 255, 0.16) 68% 100%);
  mask: radial-gradient(circle, transparent 49px, #000 50px);
  opacity: 0.9;
}

.command-center::before {
  background:
    linear-gradient(90deg, transparent, rgba(125, 218, 212, 0.14), transparent),
    linear-gradient(155deg, transparent 0 45%, rgba(255, 255, 255, 0.075) 45% 46%, transparent 46%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 54px);
}

.command-copy,
.command-actions,
.command-metrics {
  position: relative;
  z-index: 1;
}

.command-metrics {
  grid-template-columns: repeat(3, 1fr);
}

.command-metric {
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(12px);
}

.insight-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.insight-card {
  justify-items: center;
  align-content: center;
  text-align: center;
  min-height: 150px;
  padding: 16px 12px;
  background:
    linear-gradient(180deg, #ffffff, #f7fbfd);
}

.insight-card .inline-icon {
  margin: 0 auto 8px;
  width: 48px;
  height: 48px;
}

.insight-card > span,
.insight-card strong {
  grid-column: auto;
}

.insight-card strong {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.account-panel,
.privacy-panel,
.card,
.notice,
.risk-panel,
.history-card,
.coach-row {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 252, 0.98));
  border-color: rgba(197, 214, 222, 0.88);
}

.form-grid {
  gap: 14px;
}

.field {
  gap: 8px;
}

.field span,
.label {
  font-size: 0.84rem;
  letter-spacing: 0;
}

input,
select,
textarea {
  min-height: 52px;
  padding: 12px 14px;
  border-color: #cbdde5;
  color: #10202b;
  background: #fbfdfe;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.25;
}

input::placeholder,
textarea::placeholder {
  color: #8c99a3;
  font-weight: 600;
}

select {
  appearance: none;
  padding-right: 42px;
  background-image:
    linear-gradient(180deg, #fbfdfe, #fbfdfe),
    url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m7 10 5 5 5-5' fill='none' stroke='%2310202b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: center, right 14px center;
  background-repeat: no-repeat;
  background-size: auto, 18px 18px;
}

input[type="number"] {
  font-variant-numeric: tabular-nums;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}

input[type="number"] {
  appearance: textfield;
}

.split {
  grid-template-columns: minmax(0, 1fr) 104px;
}

.button,
.ghost-button,
.danger-button {
  min-height: 52px;
  font-size: 0.98rem;
}

.button {
  background: linear-gradient(135deg, #1f5eea, #0fafa6);
}

.ghost-button {
  background: #ffffff;
}

.segmented,
.tabs {
  background: #eef4f7;
}

.segmented button,
.tabs button {
  min-height: 46px;
}

.metric {
  background:
    linear-gradient(180deg, #ffffff, #f5f9fb);
}

.timer-display {
  min-height: 260px;
}

.timer-time {
  font-size: clamp(3rem, 16vw, 4.35rem);
}

.bottom-nav {
  border-color: rgba(197, 214, 222, 0.92);
  box-shadow: 0 -16px 42px rgba(16, 32, 43, 0.13);
}

.nav-button.active {
  color: #174ee8;
}

@media (min-width: 780px) {
  body {
    padding: 0;
  }

  .app-shell {
    margin: 24px auto;
    height: calc(100dvh - 48px);
    min-height: calc(100dvh - 48px);
    box-shadow:
      0 32px 90px rgba(16, 32, 43, 0.18),
      0 0 0 1px rgba(197, 214, 222, 0.7);
  }
}

@media (max-width: 420px) {
  .command-center {
    min-height: auto;
  }

  .command-center::after {
    width: 86px;
    height: 86px;
    opacity: 0.55;
    mask: radial-gradient(circle, transparent 37px, #000 38px);
  }

  .command-metrics,
  .insight-grid {
    grid-template-columns: 1fr;
  }

  .insight-card {
    min-height: 86px;
    grid-template-columns: 54px 1fr;
    justify-items: start;
    align-items: center;
    text-align: left;
  }

  .insight-card .inline-icon {
    grid-row: span 2;
    margin: 0;
  }

  .insight-card > span,
  .insight-card strong {
    grid-column: 2;
  }
}

/* Public-ready visual refinement */
:root {
  --bg: #eef8fb;
  --surface: #ffffff;
  --surface-soft: #f6fbfd;
  --ink: #10202b;
  --muted: #607684;
  --line: #cddfe7;
  --blue: #185cff;
  --teal: #00a8a2;
  --teal-dark: #066f72;
  --shadow: 0 18px 46px rgba(16, 32, 43, 0.11);
  --shadow-soft: 0 10px 26px rgba(16, 32, 43, 0.075);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(135deg, rgba(0, 168, 162, 0.13), transparent 31%),
    linear-gradient(225deg, rgba(24, 92, 255, 0.09), transparent 36%),
    repeating-linear-gradient(90deg, rgba(16, 32, 43, 0.035) 0 1px, transparent 1px 76px);
}

.app-shell {
  isolation: isolate;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 251, 253, 0.98)),
    #ffffff;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 8;
  margin: -18px -14px 4px;
  padding: 18px 14px 14px;
  border-bottom: 1px solid rgba(205, 223, 231, 0.72);
  background: rgba(249, 253, 254, 0.9);
  backdrop-filter: blur(18px);
}

.brand-mark {
  width: 46px;
  height: 46px;
  box-shadow:
    0 14px 28px rgba(24, 92, 255, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

.brand-mark svg {
  width: 25px;
  height: 25px;
}

.command-center {
  overflow: hidden;
  min-height: 356px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow:
    0 26px 54px rgba(16, 32, 43, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.command-center::before,
.command-center::after {
  pointer-events: none;
}

.command-center::after {
  filter: drop-shadow(0 12px 26px rgba(0, 168, 162, 0.28));
  -webkit-mask: radial-gradient(circle, transparent 49px, #000 50px);
}

.command-topline {
  align-items: start;
}

.command-copy {
  max-width: 31rem;
  color: rgba(239, 253, 255, 0.9);
}

.command-metric {
  min-height: 78px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.insight-grid {
  gap: 12px;
}

.insight-card {
  display: grid;
  grid-template-rows: auto auto 1fr;
  place-items: center;
  justify-items: center;
  min-height: 156px;
  padding: 18px 12px 16px;
  text-align: center;
  border-color: rgba(194, 213, 222, 0.92);
  background:
    linear-gradient(180deg, #ffffff, #f7fbfd);
}

.insight-card .inline-icon {
  display: grid;
  place-items: center;
  justify-self: center;
  width: 50px;
  height: 50px;
  margin: 0 0 8px;
  color: #597080;
  border: 1px solid rgba(130, 213, 219, 0.44);
  background:
    linear-gradient(180deg, rgba(232, 250, 252, 0.96), rgba(218, 244, 249, 0.8));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.insight-card > span,
.insight-card strong {
  grid-column: auto;
  justify-self: center;
}

.insight-card > span {
  margin: 0;
  color: #637684;
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.02em;
}

.insight-card strong {
  align-self: start;
  max-width: 11ch;
  margin-top: 4px;
  color: #0e1d28;
  font-size: clamp(1.05rem, 4.6vw, 1.32rem);
  font-weight: 850;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.card,
.notice,
.risk-panel,
.history-card,
.coach-row,
.account-panel,
.privacy-panel {
  border-color: rgba(194, 213, 222, 0.86);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(248, 252, 253, 0.98));
}

.form-grid {
  padding: 18px;
  gap: 16px;
}

.field {
  gap: 7px;
}

.field span,
.label {
  color: #243947;
  font-size: 0.79rem;
  font-weight: 780;
  line-height: 1.2;
}

input,
select,
textarea {
  min-height: 50px;
  padding: 11px 14px;
  border: 1px solid #c8dce5;
  border-radius: var(--radius);
  color: #10202b;
  background-color: #fbfdfe;
  font-size: 1rem;
  font-weight: 640;
  line-height: 1.3;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 1px 0 rgba(16, 32, 43, 0.03);
}

input::placeholder,
textarea::placeholder {
  color: #8b98a2;
  font-weight: 560;
}

select {
  appearance: none;
  -webkit-appearance: none;
  background-color: #fbfdfe;
  background-image:
    linear-gradient(180deg, #fbfdfe, #fbfdfe),
    url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m7.5 9.5 4.5 4.5 4.5-4.5' fill='none' stroke='%2310202b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: center, right 14px center;
  background-repeat: no-repeat;
  background-size: auto, 18px 18px;
}

input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.check-list {
  gap: 9px;
}

.check-item {
  min-height: 48px;
  border-color: #d4e3ea;
  background: #fbfdfe;
}

.button,
.ghost-button,
.danger-button {
  border-radius: var(--radius);
  font-weight: 840;
}

.button {
  box-shadow:
    0 14px 24px rgba(24, 92, 255, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.metric {
  border: 1px solid rgba(205, 223, 231, 0.84);
}

.bottom-nav {
  width: min(100%, 480px);
  border-color: rgba(194, 213, 222, 0.9);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(247, 252, 253, 0.95));
  box-shadow:
    0 -18px 48px rgba(16, 32, 43, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.nav-button {
  min-height: 60px;
}

.nav-button.active {
  color: #185cff;
  background:
    linear-gradient(180deg, #eef5ff, #e7fbfa);
  box-shadow: inset 0 0 0 1px rgba(24, 92, 255, 0.05);
}

@media (max-width: 420px) {
  .insight-grid {
    gap: 10px;
  }

  .insight-card {
    grid-template-columns: 54px minmax(0, 1fr);
    grid-template-rows: auto auto;
    justify-items: start;
    min-height: 92px;
    padding: 14px;
    text-align: left;
  }

  .insight-card .inline-icon {
    grid-row: 1 / span 2;
    margin: 0;
  }

  .insight-card > span,
  .insight-card strong {
    grid-column: 2;
    justify-self: start;
    max-width: 100%;
  }

  .split {
    grid-template-columns: minmax(0, 1fr) 92px;
  }

  .command-center::after {
    -webkit-mask: radial-gradient(circle, transparent 37px, #000 38px);
  }
}

/* Navigation and header corrections */
.app-shell {
  padding-bottom: calc(132px + env(safe-area-inset-bottom));
}

.topbar {
  position: relative;
  top: auto;
  z-index: 1;
  margin: 0 0 8px;
  padding: 8px 4px 16px;
  border-bottom: 0;
  background: transparent;
  backdrop-filter: none;
}

.bottom-nav {
  bottom: max(8px, env(safe-area-inset-bottom));
  min-height: 82px;
  padding: 8px 8px 10px;
  border: 1px solid rgba(194, 213, 222, 0.9);
  border-radius: 8px 8px 0 0;
}

.nav-button {
  min-height: 64px;
  padding: 7px 2px 8px;
}

@media (min-width: 780px) {
  .app-shell {
    padding-bottom: 136px;
  }

  .bottom-nav {
    bottom: 24px;
    border-radius: 8px;
  }
}
