html, body {
  margin: 0;
  height: 100%;
  background: #111;
  overflow: hidden;
}
html[data-theme="signal"], html[data-theme="signal"] body { background: #F0F0F0; }
html[data-theme="sienna"], html[data-theme="sienna"] body { background: #2C2A28; }

.phone {
  width: 100%;
  max-width: 430px;
  height: 100dvh;
  height: 100svh;
  margin: 0 auto;
  overflow: hidden;
}
.status, .island { display: none !important; }
.scroll {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 12px;
}
.tabs {
  height: auto;
  min-height: 58px;
  padding: 6px 18px max(10px, env(safe-area-inset-bottom));
}
.top { padding-top: max(8px, env(safe-area-inset-top)); }

/* Switcher (Asher only) */
.switcher {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 6px 16px 0;
  flex-shrink: 0;
}
.switcher span {
  font-family: Geist, sans-serif;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--faint);
  margin-right: 2px;
}
.switcher button {
  border: 1px solid var(--line);
  background: var(--bg2);
  color: var(--muted);
  border-radius: 999px;
  font-family: Geist, sans-serif;
  font-size: 11px;
  font-weight: 650;
  padding: 4px 9px;
  min-height: 0;
}
.switcher button.on {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
}

/* Example banner */
.ex-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  border-radius: 12px;
  padding: 8px 10px;
  margin: 0 0 10px;
  font-size: 12.5px;
}
.ex-banner b { font-family: Geist, sans-serif; font-weight: 700; }
.ex-banner button {
  margin-left: auto;
  flex-shrink: 0;
  border: 0;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 999px;
  font-family: Geist, sans-serif;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 10px;
}
.ex-badge {
  display: inline-block;
  font-family: Geist, sans-serif;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: var(--accent-soft);
  color: var(--accent-ink);
  border-radius: 999px;
  padding: 2px 6px;
  margin-left: 6px;
  vertical-align: middle;
}
.fp-tag {
  display: inline-block;
  font-family: Geist, sans-serif;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .08em;
  background: var(--ink);
  color: var(--bg2);
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 6px;
  vertical-align: middle;
}

/* Login */
.login {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: max(28px, env(safe-area-inset-top)) 22px 24px;
}
.login .brand-lg {
  font-family: Geist, sans-serif;
  font-weight: 700;
  font-size: 28px;
  letter-spacing: -.04em;
  margin: 48px 0 8px;
}
.login .lede {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 28px;
}
.login label {
  font-family: Geist, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--faint);
  display: block;
  margin-bottom: 6px;
}
.field, textarea.field {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  background: var(--bg2);
  color: var(--ink);
  border-radius: 12px;
  font-family: Atkinson, sans-serif;
  font-size: 16px;
  padding: 12px 14px;
  outline: none;
}
.field:focus, textarea.field:focus { border-color: var(--accent); }
textarea.field { min-height: 84px; resize: vertical; line-height: 1.35; }
.login .btn-primary, .sheet .btn-primary { width: 100%; margin-top: 12px; }
.hint { color: var(--muted); font-size: 13px; margin-top: 12px; min-height: 1.3em; }
.err { color: var(--high); font-size: 13px; margin-top: 10px; }
.code-row {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.code-row input {
  flex: 1;
  text-align: center;
  font-family: Geist, sans-serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: .2em;
  padding: 12px 0;
}

/* Sheets / modal */
.dim {
  position: absolute;
  inset: 0;
  background: var(--dim);
  z-index: 20;
  display: flex;
  align-items: flex-end;
}
.sheet {
  background: var(--bg);
  color: var(--ink);
  width: 100%;
  max-height: 92%;
  border-radius: 20px 20px 0 0;
  padding: 10px 16px max(18px, env(safe-area-inset-bottom));
  box-shadow: var(--shadow);
  overflow-y: auto;
  z-index: 21;
}
.sheet .grab {
  width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 4px auto 12px;
}
.sheet h3 {
  font-family: Geist, sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.03em;
  margin: 0 0 4px;
}
.sheet .sub { margin-bottom: 14px; }
.form-row { margin-bottom: 10px; }
.form-row label {
  font-family: Geist, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--faint);
  display: block;
  margin-bottom: 5px;
}
.pri-row, .who-row, .day-grid { display: flex; gap: 6px; flex-wrap: wrap; }
.pri-row button, .who-row button {
  flex: 1;
  border: 1px solid var(--line);
  background: var(--bg2);
  color: var(--ink);
  border-radius: 10px;
  padding: 8px 6px;
  font-family: Geist, sans-serif;
  font-size: 12px;
  font-weight: 700;
}
.pri-row button.on.high { background: var(--high-soft); color: var(--high); border-color: var(--high); }
.pri-row button.on.medium { background: var(--med-soft); color: var(--med); border-color: var(--med); }
.pri-row button.on.normal { background: var(--normal-soft); color: var(--normal); border-color: var(--normal); }
.who-row button.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.day-grid { margin: 4px 0 8px; }
.day-grid .day { flex: 1; min-width: 52px; }
.check {
  display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink);
}
.sheet-actions { display: flex; gap: 8px; margin-top: 14px; }
.sheet-actions .btn { flex: 1; }
.btn-danger {
  background: var(--high-soft);
  color: var(--high);
  border: 0;
  width: 100%;
  margin-top: 10px;
}
.preview-card { margin-bottom: 12px; }

/* Cards compact actions */
.card-actions { display: flex; gap: 6px; margin-top: 8px; }
.card-actions .btn { flex: 1; }
.addr-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dashed var(--line);
}
.addr-link:active { opacity: .7; }

/* Toast live */
.toast-live {
  position: absolute;
  left: 12px; right: 12px; top: max(10px, env(safe-area-inset-top));
  z-index: 30;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--toast-bg);
  color: var(--toast-ink);
  border-radius: 16px;
  padding: 10px 12px;
  box-shadow: var(--shadow);
}
.toast-live .app-ic {
  width: 28px; height: 28px; border-radius: 7px;
  background: var(--accent); color: var(--on-accent);
  display: grid; place-items: center;
  font-family: Geist, sans-serif; font-weight: 800; font-size: 14px;
  flex-shrink: 0;
}
.toast-live .from { font-family: Geist, sans-serif; font-size: 11px; font-weight: 700; opacity: .7; }
.toast-live p { margin: 2px 0 0; font-size: 13.5px; }

.empty {
  text-align: center;
  color: var(--muted);
  padding: 28px 12px;
  font-size: 14px;
}
.eta-pill {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent-ink);
  border-radius: 8px;
  padding: 4px 8px;
  font-family: Geist, sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  margin-top: 6px;
}
.push-banner, .install-banner {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 8px 10px;
  margin-bottom: 10px;
  font-size: 12.5px;
  color: var(--muted);
  display: flex; align-items: center; gap: 8px;
}
.push-banner button, .install-banner button {
  margin-left: auto;
  border: 0;
  background: var(--bg3);
  color: var(--ink);
  border-radius: 999px;
  font-family: Geist, sans-serif;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 10px;
}
.week-empty { color: var(--faint); font-size: 12.5px; padding: 4px 0 10px; }
.signout {
  border: 0; background: none; color: var(--faint);
  font-family: Geist, sans-serif; font-size: 11px; font-weight: 650;
  padding: 8px 16px 16px;
  text-align: left;
}
.parsed { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.parsed b { color: var(--ink); font-weight: 700; }

button { font: inherit; cursor: pointer; }
button.tab {
  border: 0;
  background: transparent;
}
.dow-h {
  font-family: Geist, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--muted);
  padding: 8px 2px 6px;
}
.dow-h.is-today { color: var(--accent-ink); }
.diagram { width: 100%; height: 70px; display: block; }
.diagram .ml { stroke: var(--map-line); }

.signout-link {
  border: 0;
  background: none;
  color: var(--faint);
  font-family: Geist, sans-serif;
  font-size: 11px;
  font-weight: 650;
  padding: 0;
  margin-right: 2px;
}
