:root {
  color-scheme: dark;
  --bg: #090b0d;
  --surface: #101317;
  --surface-raised: #15191e;
  --surface-soft: #1a1f25;
  --line: #252b32;
  --line-strong: #353d46;
  --text: #f3f6f3;
  --muted: #8e979f;
  --muted-strong: #bac1c6;
  --accent: #54e7aa;
  --accent-ink: #06150e;
  --gold: #f2ad45;
  --gold-ink: #1d1102;
  --danger: #ff7770;
  --warning: #efb955;
  --topbar-height: 62px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background: var(--bg);
}

button,
input,
a {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

button,
input {
  color: inherit;
}

a {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 9px 12px;
  color: var(--accent-ink);
  background: var(--accent);
  font-size: 12px;
  font-weight: 750;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  min-height: var(--topbar-height);
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px max(15px, env(safe-area-inset-left)) 10px max(15px, env(safe-area-inset-right));
  border-bottom: 1px solid var(--line);
  background: rgba(9, 11, 13, 0.94);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: inline-flex;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  padding: 6px;
  border: 1px solid var(--line-strong);
  transform: rotate(45deg);
}

.brand-mark i {
  display: block;
  width: 3px;
  background: var(--accent);
  transform: rotate(-45deg);
}

.brand-mark i:nth-child(1) { height: 7px; }
.brand-mark i:nth-child(2) { height: 13px; }
.brand-mark i:nth-child(3) { height: 18px; }

.brand-copy {
  min-width: 0;
}

.brand-copy strong,
.brand-copy small {
  display: block;
  white-space: nowrap;
}

.brand-copy strong {
  font-size: 14px;
  letter-spacing: 0.015em;
}

.brand-copy small {
  margin-top: 3px;
  color: var(--muted);
  font: 650 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.14em;
}

.topbar-actions {
  display: flex;
  min-width: 0;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
}

.sound-toggle {
  display: inline-flex;
  min-height: 44px;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-strong);
  background: var(--surface);
  font-size: 10px;
  font-weight: 650;
  cursor: pointer;
  transition: color 150ms ease, border-color 150ms ease, background-color 150ms ease;
}

.sound-toggle:hover:not(:disabled) {
  border-color: var(--line-strong);
  color: var(--text);
}

.sound-toggle:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.sound-glyph {
  display: inline-grid;
  width: 16px;
  height: 16px;
  place-items: center;
  border-radius: 50%;
  color: var(--warning);
  background: rgba(239, 185, 85, 0.1);
  font: 800 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.sound-toggle[data-state="ready"] {
  border-color: rgba(84, 231, 170, 0.24);
  color: var(--text);
}

.sound-toggle[data-state="ready"] .sound-glyph {
  color: var(--accent);
  background: rgba(84, 231, 170, 0.1);
}

.sound-toggle[data-state="off"] {
  color: var(--muted);
}

.sound-toggle[data-state="off"] .sound-glyph {
  color: var(--muted);
  background: rgba(142, 151, 159, 0.08);
}

.sound-toggle.is-ringing .sound-glyph {
  animation: sound-ring 560ms ease-out both;
}

.connection {
  display: inline-flex;
  min-height: 34px;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-strong);
  background: var(--surface);
  font-size: 10px;
  font-weight: 650;
  cursor: pointer;
}

.connection-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--warning);
  box-shadow: 0 0 0 0 rgba(239, 185, 85, 0.35);
  animation: connection-pulse 1.7s ease-out infinite;
}

.connection[data-state="ws"] {
  border-color: rgba(84, 231, 170, 0.24);
  color: var(--text);
}

.connection[data-state="ws"] .connection-dot {
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(84, 231, 170, 0.09);
  animation: none;
}

.connection[data-state="sse"] {
  border-color: rgba(242, 173, 69, 0.34);
  color: #f7cf91;
}

.connection[data-state="sse"] .connection-dot {
  background: var(--gold);
  animation: none;
}

.connection[data-state="offline"] .connection-dot,
.connection[data-state="error"] .connection-dot {
  background: var(--danger);
  animation: none;
}

.app-shell {
  width: min(100%, 960px);
  margin: 0 auto;
  padding: 16px max(14px, env(safe-area-inset-left)) 72px max(14px, env(safe-area-inset-right));
}

.controls {
  display: grid;
  gap: 12px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.date-control {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 38px auto;
  gap: 6px;
  align-items: stretch;
}

.date-step,
.today-button,
.chain-tab {
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  transition: color 150ms ease, border-color 150ms ease, background-color 150ms ease;
}

.date-step {
  min-width: 38px;
  min-height: 44px;
  color: var(--muted-strong);
  font-size: 16px;
}

.date-step:disabled {
  color: #50575f;
  cursor: not-allowed;
}

.today-button {
  min-height: 44px;
  padding: 0 11px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 750;
}

.today-button:disabled {
  color: var(--muted);
  cursor: default;
}

.date-picker-wrap {
  display: grid;
  min-width: 0;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.date-picker-wrap > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.date-picker-wrap input {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0;
  border: 0;
  color: var(--text);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
}

.date-picker-wrap input::-webkit-calendar-picker-indicator {
  opacity: 0.65;
  filter: invert(1);
  cursor: pointer;
}

.chain-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.chain-tab {
  position: relative;
  min-height: 42px;
  color: var(--muted);
  font: 750 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.08em;
}

.chain-tab.is-active {
  border-color: rgba(84, 231, 170, 0.44);
  color: var(--accent);
  background: rgba(84, 231, 170, 0.07);
}

.unseen-count {
  display: inline-grid;
  min-width: 17px;
  height: 17px;
  margin-left: 4px;
  place-items: center;
  border-radius: 999px;
  color: var(--accent-ink);
  background: var(--accent);
  font-size: 8px;
}

.hour-section {
  padding: 24px 0 22px;
  border-bottom: 1px solid var(--line);
}

.section-heading,
.feed-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font: 700 9px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-heading h1,
.feed-heading h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.section-heading > p {
  max-width: 130px;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
  text-align: right;
}

.hour-strip {
  display: flex;
  gap: 7px;
  margin: 17px -14px 0;
  padding: 0 14px 8px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-padding: 14px;
  scroll-snap-type: x mandatory;
  scrollbar-color: var(--line-strong) transparent;
  scrollbar-width: thin;
}

.hour-slot {
  position: relative;
  display: grid;
  width: 72px;
  min-width: 72px;
  min-height: 78px;
  flex: 0 0 72px;
  align-content: center;
  gap: 5px;
  padding: 10px 8px;
  border: 1px solid var(--line);
  color: var(--muted-strong);
  background: var(--surface);
  text-align: left;
  scroll-snap-align: center;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.hour-slot:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.hour-slot.is-active {
  border-color: var(--accent);
  color: var(--text);
  background: rgba(84, 231, 170, 0.09);
}

.hour-slot.is-active::after {
  position: absolute;
  right: 8px;
  bottom: -1px;
  left: 8px;
  height: 2px;
  background: var(--accent);
  content: "";
}

.hour-day {
  color: var(--muted);
  font-size: 8px;
  font-weight: 650;
}

.hour-time {
  font: 760 15px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: -0.03em;
}

.hour-count {
  color: var(--muted);
  font-size: 9px;
}

.hour-slot.has-signals .hour-count {
  color: var(--accent);
  font-weight: 750;
}

.signal-stream {
  padding-top: 26px;
}

.feed-heading {
  padding-bottom: 15px;
}

.feed-count {
  margin: 0;
  color: var(--accent);
  font: 750 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: nowrap;
}

.hour-leaders {
  margin-bottom: 18px;
  padding: 14px 0 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.leaders-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.leaders-heading h3 {
  margin: 0;
  color: var(--muted-strong);
  font-size: 11px;
  letter-spacing: 0.01em;
}

.leaders-heading span {
  color: var(--muted);
  font: 650 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.06em;
}

.leader-list {
  display: flex;
  gap: 13px;
  margin: 12px -14px 0;
  padding: 2px 14px 4px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  list-style: none;
  scroll-padding: 14px;
  scroll-snap-type: x proximity;
  scrollbar-color: var(--line-strong) transparent;
  scrollbar-width: thin;
}

.leader-item {
  width: 64px;
  min-width: 64px;
  flex: 0 0 64px;
  scroll-snap-align: start;
}

.leader-token {
  position: relative;
  display: grid;
  min-height: 88px;
  justify-items: center;
  gap: 6px;
  color: var(--muted-strong);
  text-decoration: none;
  transition: color 150ms ease, transform 150ms ease;
}

.leader-token:hover {
  color: var(--text);
  transform: translateY(-2px);
}

.leader-rank {
  justify-self: start;
  color: var(--muted);
  font: 650 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.leader-avatar {
  position: relative;
  display: block;
  width: 50px;
  height: 50px;
}

.leader-avatar .token-logo {
  width: 50px;
  height: 50px;
  border-color: rgba(84, 231, 170, 0.3);
  background: var(--surface-raised);
  font-size: 15px;
}

.leader-count {
  position: absolute;
  z-index: 2;
  top: -5px;
  right: -7px;
  display: grid;
  min-width: 21px;
  height: 21px;
  padding: 0 5px;
  place-items: center;
  border: 2px solid var(--bg);
  border-radius: 999px;
  color: var(--accent-ink);
  background: var(--accent);
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.35);
  font: 850 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.leader-token.is-new .leader-count {
  animation: count-pop 420ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.leader-name {
  display: block;
  width: 64px;
  overflow: hidden;
  font-size: 10px;
  font-weight: 720;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.signal-list {
  display: grid;
  gap: 13px;
  min-height: 260px;
}

.signal-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.signal-card:hover {
  border-color: var(--line-strong);
}

.signal-card.rule-one {
  border-color: rgba(84, 231, 170, 0.24);
  background: rgba(84, 231, 170, 0.045);
}

.signal-card.rule-two {
  border-color: rgba(242, 173, 69, 0.27);
  background: rgba(242, 173, 69, 0.048);
}

.signal-card.rule-mixed {
  border-color: rgba(163, 139, 250, 0.3);
  background: rgba(163, 139, 250, 0.045);
}

.signal-card.is-new {
  animation: card-arrive 720ms cubic-bezier(0.2, 0.75, 0.2, 1) both;
}

.rule-tag {
  width: 100%;
  min-height: 35px;
  padding: 9px 14px 8px;
  border-bottom: 1px solid var(--line);
  color: var(--muted-strong);
  background: var(--surface-soft);
  font: 760 10px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.035em;
}

.rule-one .rule-tag {
  border-bottom-color: rgba(6, 21, 14, 0.28);
  color: var(--accent-ink);
  background: var(--accent);
}

.rule-two .rule-tag {
  border-bottom-color: rgba(29, 17, 2, 0.28);
  color: var(--gold-ink);
  background: var(--gold);
}

.rule-mixed > .rule-tag {
  border-bottom-color: rgba(20, 14, 45, 0.4);
  color: #f0ebff;
  background: #7561b7;
}

.card-body {
  padding: 16px 14px 15px;
}

.signal-overview {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.token-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 13px;
}

.token-logo {
  position: relative;
  display: grid;
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--accent);
  background: var(--surface-raised);
  font: 800 17px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.token-logo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  object-fit: cover;
  transition: opacity 180ms ease;
}

.token-logo.has-image img {
  opacity: 1;
}

.token-logo.has-image .logo-fallback {
  opacity: 0;
}

.logo-fallback {
  transition: opacity 150ms ease;
}

.token-copy {
  min-width: 0;
  flex: 1;
}

.token-symbol,
.token-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.token-symbol {
  font-size: clamp(27px, 9vw, 34px);
  font-weight: 780;
  line-height: 1;
  letter-spacing: -0.045em;
}

.token-name {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.severity-badge {
  align-self: flex-start;
  padding: 5px 7px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  font: 750 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.06em;
}

.severity-badge.is-hot {
  border-color: rgba(84, 231, 170, 0.38);
  color: var(--accent);
}

.toggle-meta {
  display: grid;
  flex: 0 0 auto;
  justify-items: end;
  gap: 7px;
}

.reminder-count-badge {
  display: inline-grid;
  min-height: 24px;
  place-items: center;
  padding: 0 8px;
  border: 1px solid rgba(84, 231, 170, 0.34);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(84, 231, 170, 0.08);
  font: 800 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: nowrap;
}

.toggle-chevron {
  color: var(--muted);
  font: 800 17px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  transition: color 150ms ease, transform 180ms ease;
}

.signal-overview:hover .toggle-chevron {
  color: var(--text);
}

.signal-card.is-expanded .toggle-chevron {
  color: var(--accent);
  transform: rotate(180deg);
}

.signal-title {
  margin: 14px 0 0;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.55;
}

.reason-line {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.reminder-history {
  display: grid;
  gap: 7px;
  margin: 16px 0 0;
  padding: 14px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
  animation: detail-reveal 190ms ease-out both;
}

.reminder-event {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 10px;
  padding: 11px 11px 11px 10px;
  border-left: 3px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.035);
}

.reminder-event.rule-one {
  border-left-color: var(--accent);
  background: rgba(84, 231, 170, 0.085);
}

.reminder-event.rule-two {
  border-left-color: var(--gold);
  background: rgba(242, 173, 69, 0.095);
}

.event-time {
  padding-top: 2px;
  color: var(--text);
  font: 760 11px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.event-copy {
  min-width: 0;
}

.event-rule,
.event-title {
  display: block;
}

.event-rule {
  overflow: hidden;
  color: var(--muted);
  font: 700 8px/1.35 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-title {
  margin-top: 5px;
  color: var(--text);
  font-size: 11px;
  line-height: 1.45;
}

.event-reason {
  margin: 5px 0 0;
  color: var(--muted-strong);
  font-size: 10px;
  line-height: 1.55;
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0 0;
}

.fact {
  min-width: 0;
  padding: 10px 8px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.fact dt,
.fact dd {
  margin: 0;
}

.fact dt {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.06em;
}

.fact dd {
  margin-top: 6px;
  overflow: hidden;
  color: var(--text);
  font: 760 13px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.address-section {
  margin-top: 14px;
}

.address-label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.09em;
}

.address-row {
  display: flex;
  align-items: stretch;
  gap: 7px;
}

.address-value,
.copy-button,
.gmgn-link {
  min-height: 42px;
  border: 1px solid var(--line);
  background: var(--surface-raised);
}

.address-value {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  padding: 0 10px;
  color: var(--muted-strong);
  font: 600 10px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.address-value.is-expanded {
  padding-top: 8px;
  padding-bottom: 8px;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}

.copy-button {
  flex: 0 0 auto;
  padding: 0 12px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 760;
  cursor: pointer;
}

.copy-button.is-success {
  border-color: rgba(84, 231, 170, 0.42);
  color: var(--accent-ink);
  background: var(--accent);
}

.card-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.gmgn-link {
  display: inline-flex;
  min-width: 124px;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  color: var(--text);
  font-size: 10px;
  font-weight: 720;
  text-decoration: none;
  transition: border-color 150ms ease, color 150ms ease, background-color 150ms ease;
}

.gmgn-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.state-view {
  display: grid;
  min-height: 250px;
  place-items: center;
  align-content: center;
  padding: 38px 20px;
  color: var(--muted);
  text-align: center;
}

.state-view strong {
  margin-top: 15px;
  color: var(--text);
  font-size: 15px;
}

.state-view p {
  max-width: 280px;
  margin: 8px 0 0;
  font-size: 11px;
  line-height: 1.65;
}

.state-mark {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--accent);
  font: 750 15px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.loader {
  display: inline-flex;
  height: 25px;
  align-items: flex-end;
  gap: 4px;
}

.loader i {
  width: 4px;
  height: 22px;
  background: var(--accent);
  animation: loader-bars 700ms ease-in-out infinite alternate;
}

.loader i:nth-child(2) {
  height: 14px;
  animation-delay: 120ms;
}

.loader i:nth-child(3) {
  height: 8px;
  animation-delay: 240ms;
}

.retry-button {
  min-height: 40px;
  margin-top: 16px;
  padding: 0 15px;
  border: 1px solid var(--line-strong);
  color: var(--text);
  background: var(--surface-raised);
  font-size: 11px;
  cursor: pointer;
}

.live-toast {
  position: fixed;
  z-index: 40;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(14px, env(safe-area-inset-bottom));
  left: max(14px, env(safe-area-inset-left));
  display: flex;
  max-width: 560px;
  align-items: center;
  gap: 10px;
  margin: 0 auto;
  padding: 12px 14px;
  border: 1px solid rgba(84, 231, 170, 0.35);
  border-radius: 11px;
  color: var(--text);
  background: rgba(15, 20, 18, 0.96);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.38);
  font-size: 11px;
  line-height: 1.45;
  animation: toast-enter 220ms ease-out both;
}

.toast-ping {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(84, 231, 170, 0.1);
}

.footer {
  display: grid;
  gap: 6px;
  padding: 22px max(14px, env(safe-area-inset-left)) max(24px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-right));
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
  text-align: center;
}

.noscript {
  position: fixed;
  z-index: 99;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 13px;
  color: var(--accent-ink);
  background: var(--accent);
  text-align: center;
}

@keyframes connection-pulse {
  0% { box-shadow: 0 0 0 0 rgba(239, 185, 85, 0.36); }
  70%, 100% { box-shadow: 0 0 0 7px rgba(239, 185, 85, 0); }
}

@keyframes sound-ring {
  0%, 100% { box-shadow: 0 0 0 0 rgba(84, 231, 170, 0); transform: rotate(0deg); }
  20% { box-shadow: 0 0 0 4px rgba(84, 231, 170, 0.12); transform: rotate(-12deg); }
  42% { transform: rotate(12deg); }
  64% { box-shadow: 0 0 0 8px rgba(84, 231, 170, 0); transform: rotate(-7deg); }
}

@keyframes loader-bars {
  to { height: 7px; opacity: 0.35; }
}

@keyframes card-arrive {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes count-pop {
  0% { opacity: 0.35; transform: scale(0.55); }
  65% { transform: scale(1.14); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes detail-reveal {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@media (min-width: 700px) {
  :root {
    --topbar-height: 68px;
  }

  .topbar {
    padding-right: 24px;
    padding-left: 24px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .brand-copy strong {
    font-size: 15px;
  }

  .connection {
    min-height: 38px;
    padding: 0 13px;
    font-size: 11px;
  }

  .sound-toggle {
    min-height: 44px;
    padding: 0 12px;
    font-size: 11px;
  }

  .app-shell {
    padding: 24px 24px 96px;
  }

  .controls {
    grid-template-columns: minmax(420px, 1fr) 230px;
    align-items: center;
  }

  .hour-section {
    padding-top: 30px;
  }

  .section-heading h1,
  .feed-heading h2 {
    font-size: 24px;
  }

  .hour-strip {
    margin-right: 0;
    margin-left: 0;
    padding-right: 0;
    padding-left: 0;
  }

  .leader-list {
    margin-right: 0;
    margin-left: 0;
    padding-right: 2px;
    padding-left: 2px;
  }

  .hour-slot {
    width: 74px;
    min-width: 74px;
    flex-basis: 74px;
  }

  .signal-list {
    gap: 16px;
  }

  .signal-card {
    border-radius: 17px;
  }

  .rule-tag {
    padding-right: 20px;
    padding-left: 20px;
    font-size: 11px;
  }

  .card-body {
    padding: 20px;
  }

  .signal-overview {
    display: grid;
    grid-template-columns: minmax(300px, 1.2fr) minmax(300px, 1fr);
    gap: 28px;
    align-items: center;
  }

  .reminder-event {
    grid-template-columns: 78px minmax(150px, 190px) minmax(0, 1fr);
    align-items: start;
  }

  .reminder-event .event-copy {
    display: contents;
  }

  .event-rule {
    padding-top: 2px;
    white-space: normal;
  }

  .event-title {
    margin-top: 0;
  }

  .event-reason {
    grid-column: 3;
    margin-top: 5px;
  }

  .facts {
    margin-top: 0;
  }

  .token-logo {
    width: 66px;
    height: 66px;
    flex-basis: 66px;
  }

  .token-symbol {
    font-size: 36px;
  }

  .card-lower {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: end;
    margin-top: 15px;
  }

  .address-section,
  .card-actions {
    margin-top: 0;
  }

  .gmgn-link {
    min-width: 148px;
  }

  .footer {
    display: flex;
    justify-content: space-between;
    padding-right: 24px;
    padding-left: 24px;
    text-align: left;
  }
}

@media (max-width: 370px) {
  .brand-copy small {
    display: none;
  }

  .connection {
    padding-right: 8px;
    padding-left: 8px;
    font-size: 9px;
  }

  .topbar-actions {
    gap: 5px;
  }

  .sound-toggle {
    width: 44px;
    min-height: 44px;
    justify-content: center;
    padding: 0;
  }

  .sound-label {
    display: none;
  }

  .date-picker-wrap {
    gap: 5px;
    padding-right: 7px;
    padding-left: 7px;
  }

  .date-picker-wrap > span {
    display: none;
  }

  .today-button {
    padding-right: 9px;
    padding-left: 9px;
  }

  .token-symbol {
    font-size: 27px;
  }

  .severity-badge {
    display: none;
  }
}

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