:root {
  color-scheme: dark;
  font-family: "Avenir Next", Avenir, "Trebuchet MS", sans-serif;
  color: #f7fbff;
  background: #07182d;
  font-synthesis: none;
  --navy: #07182d;
  --panel: #0c2340;
  --panel-2: #102b4c;
  --blue: #2784ff;
  --blue-soft: #73b3ff;
  --mint: #a8ffcf;
  --paper: #f7fbff;
  --ink: #07182d;
  --muted: #91a7bd;
  --line: rgba(182, 216, 247, .14);
  --danger: #ff7d88;
  --browser-toolbar-offset: 0px;
}

* { box-sizing: border-box; }
html {
  min-width: 320px;
  min-height: 100%;
  overflow-y: scroll;
  scrollbar-gutter: stable;
  background: var(--navy);
}
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 112% -5%, rgba(39, 132, 255, .34), transparent 32rem),
    radial-gradient(circle at -15% 38%, rgba(168, 255, 207, .07), transparent 24rem),
    var(--navy);
}
button, input, select { font: inherit; }
button { color: inherit; }
.hidden { display: none !important; }
body.lang-zh {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}
body.lang-zh .hero-copy h1,
body.lang-zh .store-strip h1,
body.lang-zh .section-heading h2,
body.lang-zh .setup-copy h2,
body.lang-zh dialog h2 {
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  letter-spacing: -.035em;
}
.noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .11;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitchTiles'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
}
.shell {
  width: min(100%, 520px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 18px max(34px, env(safe-area-inset-bottom));
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
}
.brand-mark {
  width: 41px;
  height: 41px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 13px;
  background: linear-gradient(145deg, #3993ff, #0d5cdb);
  box-shadow: 0 10px 30px rgba(19, 104, 225, .28);
  font-family: Georgia, serif;
  font-size: 24px;
  font-weight: 800;
  font-style: italic;
}
.brand strong, .brand small { display: block; }
.brand strong { font-size: 13px; letter-spacing: .16em; }
.brand small { margin-top: 3px; color: #6f8ca8; font-size: 8px; letter-spacing: .27em; }
.round-button {
  width: 41px;
  height: 41px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255,255,255,.035);
}
.header-actions { display: flex; align-items: center; gap: 8px; }
.language-switch {
  height: 41px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255,255,255,.035);
}
.language-switch button {
  min-width: 40px;
  height: 33px;
  padding: 0 8px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #6f8da8;
  font: 800 10px "PingFang SC", "Microsoft YaHei", "Avenir Next", sans-serif;
  transition: color .2s ease, background .2s ease, box-shadow .2s ease;
}
.language-switch button.active {
  background: var(--mint);
  color: #082a20;
  box-shadow: 0 5px 14px rgba(0,0,0,.18);
}
.round-button svg {
  width: 19px;
  fill: none;
  stroke: #bed2e6;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.activation-view {
  display: grid;
  gap: 33px;
  padding-top: clamp(42px, 10vh, 92px);
}
.hero-copy { animation: reveal .65s ease both; }
.kicker, .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--mint);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .2em;
}
.kicker::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--mint);
}
.hero-copy h1 {
  margin: 18px 0 17px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(47px, 14vw, 67px);
  font-weight: 500;
  line-height: .98;
  letter-spacing: -.065em;
}
.hero-copy h1 em { color: var(--blue-soft); font-weight: 400; }
.hero-copy p {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}
.activation-card {
  position: relative;
  overflow: hidden;
  padding: 25px 22px 22px;
  border: 1px solid rgba(128, 183, 241, .22);
  border-radius: 7px 27px 27px;
  background:
    linear-gradient(145deg, rgba(20, 56, 95, .96), rgba(9, 35, 63, .97));
  box-shadow: 0 30px 90px rgba(0, 0, 0, .27);
  animation: reveal .65s .1s ease both;
}
.activation-card::after {
  content: "W";
  position: absolute;
  right: -12px;
  bottom: -62px;
  color: rgba(124, 180, 236, .045);
  font: italic 230px/1 Georgia, serif;
  pointer-events: none;
}
.card-index {
  position: absolute;
  right: 22px;
  top: 21px;
  color: #577898;
  font: 11px Georgia, serif;
}
.card-title { display: flex; align-items: center; gap: 12px; }
.card-title span { color: var(--mint); font-size: 9px; font-weight: 800; letter-spacing: .2em; }
.card-title i { width: 5px; height: 5px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 6px rgba(168,255,207,.07); }
.activation-card label {
  position: relative;
  z-index: 1;
  display: block;
  margin: 28px 0 9px;
  color: #8ea8c0;
  font-size: 11px;
}
.activation-card input {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 57px;
  padding: 0 15px;
  border: 1px solid rgba(152, 194, 235, .19);
  border-radius: 12px;
  outline: 0;
  background: rgba(1, 15, 30, .35);
  color: var(--paper);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.activation-card input:focus {
  border-color: var(--blue-soft);
  box-shadow: 0 0 0 4px rgba(39,132,255,.1);
}
.activation-card input::placeholder { color: #4b6a87; font-size: 12px; letter-spacing: .02em; }
.primary-button, .secondary-button, .outline-button, .danger-button {
  position: relative;
  z-index: 1;
  border: 0;
  cursor: pointer;
}
.primary-button {
  width: 100%;
  min-height: 55px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
  border-radius: 12px 4px 12px 12px;
  background: var(--mint);
  color: #062118;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 13px 34px rgba(168,255,207,.13);
}
.primary-button svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.primary-button:disabled { opacity: .45; cursor: wait; }
.form-error { min-height: 17px; margin: 9px 0 0; color: #ff9da5; font-size: 11px; }
.privacy-line {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 13px;
  color: #6887a4;
  font-size: 10px;
}
.privacy-line svg {
  width: 16px;
  fill: none;
  stroke: var(--mint);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-view {
  padding-top: 32px;
  padding-bottom: 88px;
  animation: dashboardFade .45s ease both;
}
.store-strip {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 21px;
}
.store-strip h1 {
  max-width: 280px;
  margin: 5px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: Georgia, serif;
  font-size: 31px;
  font-weight: 500;
  letter-spacing: -.04em;
}
.connection-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #98aec2;
  font-size: 9px;
}
.connection-pill i, .health-grid i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffae6b;
}
.connection-pill.online i, .health-grid i.good { background: var(--mint); box-shadow: 0 0 0 4px rgba(168,255,207,.07); }
.connection-pill.offline i, .health-grid i.bad { background: var(--danger); }

.dashboard-nav {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: max(calc(10px + var(--browser-toolbar-offset)), env(safe-area-inset-bottom));
  width: min(calc(100% - 36px), 484px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 7px;
  transform: translateX(-50%);
  border: 1px solid rgba(180, 216, 247, .16);
  border-radius: 20px;
  background: rgba(6, 24, 44, .92);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .38);
  backdrop-filter: blur(22px) saturate(140%);
}
.dashboard-nav button {
  min-width: 0;
  min-height: 54px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  padding: 5px 2px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #617f9b;
  font-size: 8px;
  font-weight: 800;
  transition: color .2s ease, background .2s ease, transform .2s ease;
}
.dashboard-nav button:active { transform: scale(.96); }
.dashboard-nav button.active {
  background: linear-gradient(145deg, rgba(39,132,255,.23), rgba(168,255,207,.07));
  color: var(--paper);
}
.dashboard-nav button.active svg { color: var(--mint); }
.dashboard-nav svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dashboard-nav span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dashboard-panel { display: none; }
.dashboard-panel.active {
  display: block;
  animation: panelIn .32s ease both;
}
.dashboard-panel > :first-child { margin-top: 0; }
.settings-page {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    radial-gradient(circle at 100% 0%, rgba(39,132,255,.12), transparent 38%),
    rgba(10, 34, 60, .72);
  backdrop-filter: blur(18px);
}
.settings-page-heading {
  display: grid;
  grid-template-columns: 52px 1fr;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.settings-hero-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(168,255,207,.18);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(168,255,207,.12), rgba(39,132,255,.12));
  color: var(--mint);
}
.settings-hero-icon svg {
  width: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.settings-page-heading span {
  color: var(--mint);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .16em;
}
.settings-page-heading h2 {
  margin: 4px 0 0;
  font: 500 25px Georgia, serif;
  letter-spacing: -.035em;
}
.settings-page-heading p {
  margin: 6px 0 0;
  color: #728da5;
  font-size: 9px;
  line-height: 1.45;
}
body.lang-zh .settings-page-heading h2 {
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
}

.sound-gate {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 13px;
  border: 1px solid rgba(168,255,207,.16);
  border-radius: 17px 5px 17px 17px;
  background: rgba(168,255,207,.065);
}
.sound-orb {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 14px;
  background: var(--mint);
}
.sound-orb span { width: 3px; height: 8px; border-radius: 3px; background: #0b402e; animation: wave .7s ease-in-out infinite alternate; }
.sound-orb span:nth-child(2), .sound-orb span:nth-child(4) { height: 18px; animation-delay: .12s; }
.sound-orb span:nth-child(3) { height: 27px; animation-delay: .24s; }
.sound-gate strong { display: block; font-size: 12px; }
.sound-gate p { margin: 3px 0 0; color: #85a59a; font-size: 9px; line-height: 1.35; }
.sound-gate button {
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: var(--mint);
  color: #083021;
  font-size: 9px;
  font-weight: 900;
}

.total-card, .stats-card, .setup-card, .activity-card, .health-card {
  margin-top: 14px;
  border: 1px solid var(--line);
  background: rgba(10, 34, 60, .72);
  backdrop-filter: blur(18px);
}
.stats-card {
  padding: 20px;
  border-radius: 20px;
}
.stats-heading { align-items: center; }
.range-caption {
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(168,255,207,.08);
  color: var(--mint);
  font-size: 8px;
}
.range-tabs, .history-filters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin-top: 16px;
  padding: 4px;
  border: 1px solid rgba(172,209,242,.08);
  border-radius: 11px;
  background: rgba(1,15,30,.25);
}
.range-tabs button, .history-filters button {
  min-height: 33px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #6987a2;
  font-size: 9px;
  font-weight: 800;
}
.range-tabs button.active, .history-filters button.active {
  background: #1d4f7d;
  color: #e9f5ff;
  box-shadow: 0 5px 15px rgba(0,0,0,.14);
}
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}
.stats-grid article {
  min-height: 97px;
  padding: 14px;
  border: 1px solid rgba(174,211,244,.08);
  border-radius: 13px;
  background: rgba(255,255,255,.02);
}
.stats-grid article > span {
  display: block;
  color: #5f7f9b;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .12em;
}
.stats-grid article > strong {
  display: block;
  margin-top: 10px;
  font: 500 20px Georgia, serif;
}
.stats-grid article > small {
  display: block;
  margin-top: 7px;
  color: #58758f;
  font-size: 8px;
}
.stats-grid .stat-received > strong { color: var(--mint); }
.stats-grid .stat-sent > strong { color: #ffbd83; }
.trend {
  margin-top: 13px;
  padding: 14px;
  border: 1px solid rgba(174,211,244,.08);
  border-radius: 13px;
  background: rgba(255,255,255,.018);
}
.trend-label { display: flex; justify-content: space-between; align-items: center; }
.trend-label span { color: #5d7b96; font-size: 7px; font-weight: 900; letter-spacing: .12em; }
.trend-label b { color: var(--mint); font-size: 10px; }
.trend-bars {
  height: 74px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: end;
  gap: 7px;
  margin-top: 10px;
}
.trend-day {
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: end;
  gap: 6px;
  text-align: center;
}
.trend-day i {
  width: 100%;
  min-height: 3px;
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, var(--mint), #2f8dff);
  transform-origin: bottom;
  animation: growBar .45s ease both;
}
.trend-day small { color: #526e87; font-size: 7px; }
.total-card {
  overflow: hidden;
  padding: 21px;
  border-radius: 7px 25px 25px;
  background:
    radial-gradient(circle at 95% 0%, rgba(46, 144, 255, .24), transparent 45%),
    linear-gradient(145deg, rgba(16,52,88,.95), rgba(9,32,58,.96));
}
.total-top { display: flex; align-items: center; justify-content: space-between; }
.total-top > span, .setup-copy > span, .section-heading span, .health-heading span {
  color: #7093b3;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .18em;
}
.total-top button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid rgba(168,255,207,.16);
  border-radius: 8px;
  background: rgba(168,255,207,.06);
  color: var(--mint);
  font-size: 9px;
  font-weight: 800;
}
.total-top svg {
  width: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.money-total { display: flex; align-items: flex-start; margin: 25px 0 24px; }
.money-total span { margin: 9px 8px 0 0; color: var(--mint); font: 28px Georgia, serif; }
.money-total strong { font: 500 clamp(55px, 17vw, 75px)/.95 Georgia, serif; letter-spacing: -.07em; }
.metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding-top: 16px;
  border-top: 1px dashed rgba(172,209,242,.16);
}
.metric-row > div + div { padding-left: 14px; border-left: 1px solid var(--line); }
.metric-row span { display: block; margin-bottom: 5px; color: #597895; font-size: 7px; font-weight: 800; letter-spacing: .1em; }
.metric-row strong { font-size: 12px; }

.setup-card {
  position: relative;
  overflow: hidden;
  padding: 20px;
  border-radius: 20px;
}
.setup-number {
  position: absolute;
  right: 18px;
  top: 17px;
  color: #42617f;
  font: 11px Georgia, serif;
}
.setup-copy h2 {
  max-width: 330px;
  margin: 10px 0 8px;
  font-family: Georgia, serif;
  font-size: 23px;
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -.035em;
}
.setup-copy p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.gmail-mini-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  padding: 7px 10px;
  border: 1px solid rgba(105,144,179,.14);
  border-radius: 999px;
  background: rgba(105,144,179,.055);
  color: #7794ad;
  font-size: 9px;
  font-weight: 800;
}
.gmail-mini-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px rgba(105,144,179,.07);
}
.gmail-mini-status.connected {
  border-color: rgba(168,255,207,.17);
  background: rgba(168,255,207,.055);
  color: var(--mint);
}
.gmail-mini-status.confirming { color: #ffd28d; }
.gmail-mini-status.attention { color: var(--danger); }
.outline-button {
  width: 100%;
  height: 45px;
  margin-top: 16px;
  border: 1px solid rgba(116,177,238,.25);
  border-radius: 10px;
  background: rgba(39,132,255,.07);
  color: #8fc3ff;
  font-size: 10px;
  font-weight: 800;
}
.forwarding-result {
  position: relative;
  margin-top: 15px;
  padding: 15px 54px 15px 13px;
  border: 1px dashed rgba(168,255,207,.25);
  border-radius: 10px;
  background: rgba(168,255,207,.04);
}
.forwarding-result small { display: block; color: #5f8877; font-size: 7px; font-weight: 900; letter-spacing: .12em; }
.forwarding-result code {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: var(--mint);
  font-size: 10px;
  text-overflow: ellipsis;
}
.forwarding-result button {
  position: absolute;
  top: 14px;
  right: 12px;
  padding: 7px;
  border: 0;
  border-radius: 7px;
  background: var(--mint);
  color: #082b20;
  font-size: 8px;
  font-weight: 900;
}

.activity-card, .health-card { padding: 20px; border-radius: 20px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; }
.section-heading h2 { margin: 5px 0 0; font-family: Georgia, serif; font-size: 22px; font-weight: 500; letter-spacing: -.03em; }
.section-heading button {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.025);
  color: #8ca6bf;
  font-size: 9px;
}
.empty-state { padding: 38px 10px 18px; text-align: center; }
.empty-icon {
  width: 55px;
  height: 55px;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: #63809b;
  background: rgba(255,255,255,.025);
}
.empty-icon svg {
  width: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
}
.empty-state strong { font: 500 15px Georgia, serif; }
.empty-state p { max-width: 290px; margin: 7px auto 0; color: #6f89a1; font-size: 10px; line-height: 1.5; }
.activity-list { margin-top: 13px; }
.history-filters {
  grid-template-columns: repeat(3, 1fr);
  margin-top: 15px;
}
.history-query {
  margin-top: 9px;
  padding: 12px;
  border: 1px solid rgba(173,211,245,.08);
  border-radius: 13px;
  background: rgba(1,15,30,.2);
}
.date-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}
.date-fields > label { min-width: 0; }
.history-query label > span {
  display: block;
  margin: 0 0 6px 2px;
  color: #607f9a;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .08em;
}
.history-query input {
  min-width: 0;
  max-width: 100%;
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 1px solid rgba(173,211,245,.1);
  border-radius: 9px;
  outline: 0;
  background: #07192c;
  color: #d9e9f7;
  font-size: 10px;
  color-scheme: dark;
}
.history-query input[type="date"] {
  display: block;
  appearance: none;
  -webkit-appearance: none;
}
.history-query input[type="date"]::-webkit-date-and-time-value {
  min-width: 0;
  text-align: left;
}
.history-query input:focus {
  border-color: rgba(168,255,207,.4);
  box-shadow: 0 0 0 3px rgba(168,255,207,.05);
}
.history-search { display: block; margin-top: 10px; }
.query-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}
.query-footer small { color: #55738d; font-size: 8px; }
.query-footer button {
  padding: 7px 9px;
  border: 0;
  border-radius: 7px;
  background: rgba(39,132,255,.09);
  color: #83baff;
  font-size: 8px;
  font-weight: 900;
}
.activity-row {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 11px;
  min-height: 61px;
  border-top: 1px solid rgba(173,211,245,.08);
}
.activity-row:first-child { border-top: 0; }
.activity-symbol {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: rgba(168,255,207,.08);
  color: var(--mint);
  font-weight: 900;
}
.activity-row.sent .activity-symbol { color: #ffbd83; background: rgba(255,189,131,.08); }
.activity-meta strong, .activity-meta small { display: block; }
.activity-meta strong { font-size: 11px; }
.activity-meta small { margin-top: 4px; color: #617f9a; font-size: 8px; }
.activity-amount { font: 500 15px Georgia, serif; }
.activity-row.received .activity-amount { color: var(--mint); }

.health-heading { display: flex; justify-content: space-between; align-items: center; }
.health-heading strong { color: var(--mint); font-size: 9px; }
.health-heading strong.bad { color: var(--danger); }
.health-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 16px; }
.health-grid > div {
  position: relative;
  min-height: 78px;
  padding: 13px 10px;
  border: 1px solid rgba(177,214,246,.08);
  border-radius: 12px;
  background: rgba(255,255,255,.02);
}
.health-grid i { position: absolute; right: 10px; top: 11px; }
.health-grid span, .health-grid b { display: block; }
.health-grid span { color: #607e98; font-size: 8px; }
.health-grid b { margin-top: 19px; font-size: 10px; }

.toast {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: max(calc(88px + var(--browser-toolbar-offset)), env(safe-area-inset-bottom));
  width: min(calc(100% - 36px), 440px);
  padding: 13px 16px;
  transform: translateX(-50%);
  border: 1px solid rgba(168,255,207,.22);
  border-radius: 13px;
  background: #dfffee;
  color: #09271d;
  box-shadow: 0 22px 60px rgba(0,0,0,.36);
  font-size: 11px;
  font-weight: 800;
  animation: toastIn .3s ease both;
}
.toast.error { border-color: #ffc5ca; background: #ffe7e9; color: #6e1720; }

dialog {
  width: min(calc(100% - 28px), 480px);
  max-height: calc(100vh - 36px);
  margin: auto auto max(14px, env(safe-area-inset-bottom));
  padding: 0;
  border: 1px solid rgba(160,202,240,.2);
  border-radius: 24px 24px 10px 10px;
  background: #0b213b;
  color: var(--paper);
  box-shadow: 0 35px 100px rgba(0,0,0,.5);
}
dialog::backdrop { background: rgba(1,8,18,.72); backdrop-filter: blur(7px); }
dialog form { padding: 23px; }
dialog header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; }
dialog header span { color: var(--blue-soft); font-size: 8px; font-weight: 900; letter-spacing: .17em; }
dialog h2 { margin: 4px 0 0; font: 500 25px Georgia, serif; letter-spacing: -.03em; }
dialog header button {
  width: 35px;
  height: 35px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: #9bb2c9;
  font-size: 22px;
  line-height: 1;
}
.settings-group {
  padding: 16px;
  border: 1px solid rgba(172, 209, 242, .1);
  border-radius: 16px;
  background: rgba(255,255,255,.025);
}
.settings-group + .settings-group { margin-top: 12px; }
.settings-group-title {
  display: block;
  margin-bottom: 2px;
  color: var(--mint);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .16em;
}
.push-settings {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 100% 0%, rgba(168,255,207,.1), transparent 52%),
    rgba(255,255,255,.025);
}
.push-settings-heading {
  display: grid;
  grid-template-columns: 42px 1fr 8px;
  align-items: center;
  gap: 11px;
}
.push-bell {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(168,255,207,.16);
  border-radius: 13px;
  background: rgba(168,255,207,.07);
  color: var(--mint);
}
.push-bell svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.push-settings-heading strong {
  display: block;
  margin-top: 5px;
  color: var(--paper);
  font: 500 15px Georgia, serif;
  line-height: 1.15;
}
body.lang-zh .push-settings-heading strong {
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
}
.push-settings-heading p,
.push-hint {
  margin: 5px 0 0;
  color: #718da6;
  font-size: 9px;
  line-height: 1.45;
}
.push-state-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5b7084;
  box-shadow: 0 0 0 4px rgba(91,112,132,.08);
}
.push-state-dot.good {
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(168,255,207,.08);
}
.push-state-dot.bad {
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(255,125,136,.08);
}
.push-hint {
  min-height: 26px;
  margin-top: 13px;
  padding-top: 11px;
  border-top: 1px solid rgba(172,209,242,.08);
}
.push-primary-button,
.push-test-button {
  width: 100%;
  height: 46px;
  margin-top: 10px;
  border: 1px solid rgba(168,255,207,.18);
  border-radius: 11px;
  background: var(--mint);
  color: #06271e;
  font-size: 10px;
  font-weight: 900;
}
.push-primary-button.enabled {
  background: rgba(168,255,207,.07);
  color: var(--mint);
}
.push-primary-button:disabled {
  border-color: rgba(143,170,194,.1);
  background: rgba(143,170,194,.07);
  color: #61788d;
}
.push-test-button {
  border-color: rgba(143,195,255,.12);
  background: rgba(39,132,255,.08);
  color: #8fc3ff;
}
.settings-page label, .settings-sheet label {
  display: block;
  margin-top: 17px;
  color: #91aac1;
  font-size: 11px;
}
.settings-page select, .settings-sheet select {
  width: 100%;
  height: 46px;
  margin-top: 9px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #07182d;
  color: var(--paper);
}
.settings-page output, .settings-sheet output { float: right; color: var(--mint); font-size: 9px; }
.settings-page input[type="range"], .settings-sheet input[type="range"] {
  width: 100%;
  margin-top: 13px;
  accent-color: var(--mint);
}
.secondary-button, .danger-button {
  width: 100%;
  height: 47px;
  margin-top: 12px;
  border: 1px solid rgba(143,195,255,.1);
  border-radius: 10px;
  background: rgba(39,132,255,.09);
  color: #8fc3ff;
  font-size: 10px;
  font-weight: 900;
}
.danger-button { margin-top: 9px; background: rgba(255,125,136,.07); color: #ff9da5; }
.version { margin: 20px 0 0; color: #4d6b86; text-align: center; font-size: 8px; }
.install-sheet ol { margin: 0; padding: 0; list-style: none; }
.install-sheet li { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); color: #9fb5ca; font-size: 11px; }
.install-sheet li b { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; background: rgba(39,132,255,.12); color: var(--blue-soft); }
.install-sheet > form > p { color: #6f8ba5; font-size: 10px; line-height: 1.5; }
.gmail-sheet { width: min(calc(100% - 20px), 560px); }
.gmail-sheet form { padding-bottom: max(24px, env(safe-area-inset-bottom)); }
.gmail-status-card {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid rgba(105,144,179,.16);
  border-radius: 15px;
  background:
    radial-gradient(circle at 0 0, rgba(80,143,210,.1), transparent 55%),
    rgba(7,29,50,.76);
}
.gmail-status-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(105,144,179,.18);
  border-radius: 14px;
  color: #7594af;
  background: rgba(105,144,179,.07);
}
.gmail-status-icon svg {
  width: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.gmail-status-card > div:last-child > span {
  color: #6889a7;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .16em;
}
.gmail-status-card strong {
  display: block;
  margin-top: 5px;
  color: #d8e8f5;
  font: 500 17px/1.2 Georgia, serif;
}
body.lang-zh .gmail-status-card strong {
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
}
.gmail-status-card p {
  margin: 5px 0 0;
  color: #7894ac;
  font-size: 9px;
  line-height: 1.5;
}
.gmail-status-card.connected {
  border-color: rgba(168,255,207,.2);
  background:
    radial-gradient(circle at 0 0, rgba(168,255,207,.1), transparent 55%),
    rgba(7,38,43,.66);
}
.gmail-status-card.connected .gmail-status-icon {
  border-color: rgba(168,255,207,.2);
  color: var(--mint);
  background: rgba(168,255,207,.075);
}
.gmail-status-card.connected strong { color: var(--mint); }
.gmail-status-card.confirming {
  border-color: rgba(255,210,141,.18);
}
.gmail-status-card.confirming .gmail-status-icon { color: #ffd28d; }
.gmail-sheet .privacy-notice {
  margin-bottom: 17px;
  padding: 14px;
  border: 1px solid rgba(168,255,207,.17);
  border-radius: 12px;
  background: rgba(168,255,207,.055);
}
.gmail-sheet .privacy-notice strong { color: var(--mint); font-size: 11px; }
.gmail-sheet .privacy-notice p { margin: 5px 0 0; color: #86a999; font-size: 9px; line-height: 1.5; }
.gmail-sheet ol { margin: 0; padding: 0; list-style: none; }
.gmail-sheet li {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  color: #9fb5ca;
  font-size: 10px;
  line-height: 1.45;
}
.gmail-sheet li.complete { color: #83a99a; }
.gmail-sheet li.current {
  margin: 3px -8px;
  padding: 12px 8px;
  border: 1px solid rgba(143,195,255,.15);
  border-radius: 11px;
  background: rgba(39,132,255,.055);
  color: #c4d7e8;
}
.gmail-sheet li b {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(39,132,255,.12);
  color: var(--blue-soft);
}
.gmail-sheet li.complete b {
  background: rgba(168,255,207,.1);
  color: var(--mint);
}
.gmail-sheet li.current b {
  box-shadow: 0 0 0 4px rgba(39,132,255,.06);
}
.gmail-sheet a { color: var(--mint); }
.gmail-sheet label { display: block; margin: 17px 0 8px; color: #7d99b3; font-size: 9px; }
.gmail-settings-link {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 14px;
  text-decoration: none;
}
.connection-value {
  width: 100%;
  min-height: 48px;
  padding: 0 13px;
  border: 1px solid #244c70;
  border-radius: 11px;
  background: #071d32;
  color: #d9f5e8;
  font: 600 11px/1.2 ui-monospace, "SFMono-Regular", Menlo, monospace;
}
.verification-box {
  margin-top: 15px;
  padding: 13px;
  border: 1px solid #183d5e;
  border-radius: 13px;
  background: rgba(7, 29, 50, .72);
}
.verification-box label { margin-top: 0; }
.verification-box p { margin: 0 0 10px; color: #86a999; font-size: 10px; }
.verification-box.complete {
  border-color: rgba(168,255,207,.18);
  background: rgba(168,255,207,.045);
}
.verification-box.complete p { color: #91cdb2; }
.verification-ready {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin-bottom: 10px;
}
.verification-ready strong {
  color: var(--mint);
  font: 700 22px/1 ui-monospace, "SFMono-Regular", Menlo, monospace;
  letter-spacing: .08em;
}
.verification-ready .outline-button,
.verification-box > .outline-button { min-height: 40px; }
.verification-ready a.outline-button { flex-basis: 100%; margin-top: 0; }
.gmail-sheet textarea {
  width: 100%;
  height: 145px;
  resize: none;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: 0;
  background: #061426;
  color: #8fb2cf;
  font: 8px/1.5 ui-monospace, "SFMono-Regular", Consolas, monospace;
}
.gmail-sheet .primary-button { margin-top: 10px; }
.gmail-warning { margin: 13px 0 0; color: #708ba4; font-size: 9px; line-height: 1.45; text-align: center; }

@keyframes reveal {
  from { opacity: 0; transform: translateY(16px); }
}
@keyframes dashboardFade {
  from { opacity: 0; }
}
@keyframes wave {
  to { height: 29px; }
}
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 12px); }
}
@keyframes growBar {
  from { transform: scaleY(.05); opacity: .35; }
}
@keyframes panelIn {
  from { opacity: 0; transform: translateY(8px); }
}
@media (max-width: 430px) {
  .date-fields { grid-template-columns: minmax(0, 1fr); }
  .history-query input { height: 42px; font-size: 12px; }
  .history-query label > span { font-size: 8px; }
}
body.ios-browser .dashboard-view { padding-bottom: 158px; }
body.ios-browser dialog {
  margin-bottom: max(76px, env(safe-area-inset-bottom));
}
@media (max-width: 390px) {
  .shell { padding-left: 14px; padding-right: 14px; }
  .dashboard-nav { width: calc(100% - 28px); }
  .dashboard-nav button { font-size: 7px; }
  .sound-gate { grid-template-columns: 44px 1fr; }
  .sound-orb { width: 42px; height: 42px; }
  .sound-gate button { grid-column: 1 / -1; width: 100%; }
  .metric-row strong { font-size: 10px; }
}
@media (min-width: 700px) {
  .shell { padding-top: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
