:root{
  /* Canvas */
  --bg-0: #F1EDED;      /* warm base */
  --bg-1: #EDEAFB;      /* lavender section bg */

  /* Surfaces */
  --surface-0: #F6F5F8; /* main cards */
  --surface-1: #FFFFFF; /* raised / modal */

  --stroke: #CECDCF;    /* hairline border */

  /* Text */
  --text-0: #030203;    /* primary */
  --text-1: #66656A;    /* secondary */
  --text-2: #989B9C;    /* muted */

  /* Accents */
  --coral: #F29E9C;
  --lav: #D2C9FE;
  --accent: var(--coral);

  /* Status */
  --success: #9BF3A2;
  --danger: #EE8584;

  /* Shadows */
  --shadow-1: 0 10px 30px rgba(0,0,0,.06);
  --shadow-2: 0 6px 18px rgba(0,0,0,.05);

  /* Radii */
  --r-card: 24px;
  --r-input: 18px;
  --r-chip: 999px;

  /* Spacing */
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;

  /* Safe areas */
  --safe-top: env(safe-area-inset-top);
  --safe-bottom: env(safe-area-inset-bottom);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  font-family: Poppins, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  background: var(--bg-0);
  color: var(--text-0);
}

/* App grid: top + content + tabs */
.app{
  min-height:100dvh;
  display:grid;
  grid-template-rows:auto 1fr auto;
}

/* Cards + panel */
.card{
  background: var(--surface-0);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-2);
  border: 1px solid rgba(206,205,207,.35);
  padding: 22px;
}

.panel{
  margin-top: var(--s-4);
  padding: var(--s-4);
  border-radius: calc(var(--r-card) + 4px);
  background: var(--bg-1);
}

/* Type */
.h1{ font-size:28px; line-height:34px; font-weight:600; letter-spacing:-0.2px; margin:0 0 10px; }
.h2{ font-size:16px; line-height:20px; font-weight:600; margin:0 0 10px; }
.muted{ color: var(--text-2); font-size:14px; line-height:20px; margin:0; }

/* Topbar */
.topbar{
  position: sticky;
  top: 0;
  z-index: 10;
  padding: calc(var(--s-4) + var(--safe-top)) var(--s-6) var(--s-4);
  background: rgba(241,237,237,.78);
  border-bottom: 1px solid rgba(206,205,207,.35);
  backdrop-filter: blur(12px);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: var(--s-4);
}

.topbar__stack{ display:flex; flex-direction:column; gap: 6px; }
.topbar__title{ font-size:16px; line-height:20px; font-weight:600; }

.status{ display:inline-flex; align-items:center; gap: 8px; color: var(--text-2); font-size:12px; line-height:16px; }
.dot{ width:10px; height:10px; border-radius:999px; background:#bbb; box-shadow: 0 0 0 2px rgba(255,255,255,.65); }

.icon-btn{
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(206,205,207,.35);
  background: rgba(246,245,248,.9);
  box-shadow: var(--shadow-2);
  display:grid;
  place-items:center;
  color: var(--text-0);
}

.icon{ width:20px; height:20px; stroke:currentColor; fill:none; }
.icon-24{ width:24px; height:24px; }

/* Content */
.content{
  padding: var(--s-6);
  padding-bottom: calc(92px + var(--safe-bottom)); /* Reserve space for the tab bar */
}

/* Tab bar */
.tabbar{
  position: sticky;
  bottom: 0;
  z-index: 10;
  display:flex;
  gap: 8px;
  justify-content: space-between;
  padding: 10px 14px calc(10px + var(--safe-bottom));
  background: rgba(246,245,248,.78);
  border-top: 1px solid rgba(206,205,207,.35);
  backdrop-filter: blur(12px);
}

.tab{
  flex:1;
  border: 0;
  background: transparent;
  padding: 10px 8px;
  border-radius: 18px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap: 4px;
  color: var(--text-2);
  font: 500 11px/1 Poppins, system-ui;
  min-height: 44px;
}

.tab.active{
  background: rgba(242,158,156,.22); /* accent tint */
  box-shadow: 0 6px 18px rgba(0,0,0,.04);
  color: var(--accent);            /* accent icon + label */
  font-weight: 600;
}

/* Reduce tap highlight */
button{ -webkit-tap-highlight-color: transparent; }