.screen { display: flex; flex-direction: column; min-height: 100dvh; }
.content {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 20px;
  width: min(100%, 720px);
  margin-inline: auto;
  padding: 20px var(--pad) calc(var(--tabh) + env(safe-area-inset-bottom, 0px) + 24px);
}
.content.no-tab { padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px)); }
.stack { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.row { display: flex; align-items: center; gap: 12px; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.ink2 { color: var(--ink-2); }
.small { font-size: var(--fs-small); }
.center { text-align: center; }
.mt8 { margin-top: 8px; }
.hide { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.brandbar, .appbar {
  display: flex;
  align-items: center;
  min-height: calc(var(--bar) + env(safe-area-inset-top, 0px));
  gap: 10px;
  padding: env(safe-area-inset-top, 0px) var(--pad) 0;
  background: var(--navy-deep);
  color: var(--paper);
  border-bottom: 1px solid #ffffff2c;
}
.brand-mark { flex: none; object-fit: contain; width: 44px; height: 44px; }
.brand-label { flex: 1; min-width: 0; }
.brand-label b { display: block; font: 700 23px/1.05 var(--display); }
.brand-label small { display: block; margin-top: 4px; color: var(--sky); font-size: 14px; }
.appbar {
  position: sticky;
  top: 0;
  z-index: 5;
}
.appbar h1 { flex: 1; min-width: 0; padding-block: 8px; font-size: var(--fs-title); }
.iconbtn, .listen {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--brand-ink);
  cursor: pointer;
}
.iconbtn { width: var(--tap); }
.listen { gap: 6px; padding-inline: 9px; font-size: var(--fs-small); font-weight: 700; }
.iconbtn svg, .listen svg { flex: none; width: var(--icon); height: var(--icon); }
.brand-signin {
  flex: none; display: inline-flex; align-items: center; min-height: 44px; padding-inline: 10px;
  color: var(--paper); font-size: var(--fs-small); font-weight: 700; text-underline-offset: 3px;
}
.brandbar .listen, .appbar :is(.iconbtn, .listen) {
  color: var(--paper);
  background: transparent;
  border-color: var(--sky);
}
.offline {
  padding: 8px var(--pad);
  background: var(--warn-soft);
  color: var(--warn-ink);
  text-align: center;
  font-size: var(--fs-small);
}
.tabbar {
  position: fixed;
  z-index: 6;
  inset: auto 0 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-height: calc(var(--tabh) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--paper);
  border-top: 1px solid var(--line);
}
.tabbar.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tabbar.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tabbar-title { display: none; }
.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 2px;
  text-align: center;
  text-decoration: none;
  line-height: 1.16;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
  border-top: 3px solid transparent;
}
.tab svg { width: var(--icon); height: var(--icon); flex: none; }
.tab.on { background: var(--brand-soft); color: var(--brand-ink); font-weight: 700; border-color: var(--brand); }

.steps { padding: 12px var(--pad); background: var(--paper); border-bottom: 1px solid var(--line); }
.steps > * { max-width: 688px; margin-inline: auto; }
.steps .bar { height: 5px; margin-top: 8px; overflow: hidden; border-radius: 3px; background: var(--line); }
.steps .bar i { display: block; height: 100%; background: var(--brand); }
