html, body {
  height: 100%;
}

body {
  margin: 0;
  background: #0b0b0d;
  color: #f4f4f6;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 14px 14px 0 14px;
  z-index: 30;
}

.chip {
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  color: #f4f4f6;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.chip:active {
  transform: translateY(1px);
}

.app {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 72px 18px 28px 18px;
  box-sizing: border-box;
}

.screen {
  width: 100%;
  max-width: 520px;
  display: grid;
  gap: 28px;
}

.hidden {
  display: none;
}

.stack {
  display: grid;
  gap: 12px;
}

.center {
  text-align: center;
  justify-items: center;
}

.title {
  margin: 0;
  font-weight: 600;
  font-size: 44px;
  letter-spacing: -0.04em;
}

.subtitle {
  margin: 0;
  font-size: 18px;
  line-height: 1.45;
  color: rgba(244,244,246,0.78);
}

.h2 {
  margin: 0;
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.note {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(244,244,246,0.70);
}

.kicker {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(244,244,246,0.55);
}

.timer {
  font-size: 42px;
  letter-spacing: -0.03em;
  font-weight: 600;
}

.micro {
  margin: 0;
  font-size: 14px;
  color: rgba(244,244,246,0.70);
}

.actions {
  display: grid;
  gap: 10px;
}

.actions.split {
  grid-template-columns: 1fr 1fr;
}

.btn {
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: #f4f4f6;
  border-radius: 14px;
  padding: 14px 14px;
  font-size: 14px;
  cursor: pointer;
}

.btn.primary {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.20);
}

.btn.ghost {
  background: rgba(255,255,255,0.03);
}

.btn:active {
  transform: translateY(1px);
}

.list {
  display: grid;
  gap: 10px;
}

.item {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
  color: #f4f4f6;
  border-radius: 14px;
  padding: 14px 14px;
  font-size: 14px;
  cursor: pointer;
}

.linkItem {
  text-decoration: none;
  display: block;
}

.item:active {
  transform: translateY(1px);
}

.footer {
  display: grid;
  justify-items: center;
}

.link {
  border: none;
  background: transparent;
  color: rgba(244,244,246,0.55);
  font-size: 12px;
  cursor: pointer;
}

.link:hover {
  color: rgba(244,244,246,0.78);
}

.overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  box-sizing: border-box;
  background: rgba(7,7,9,0.88);
  pointer-events: auto;
}

#overlaySOS { z-index: 70; }
#overlayDonate { z-index: 80; }
#overlayConfirm { z-index: 90; }

.modal {
  width: 100%;
  max-width: 520px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
  border-radius: 18px;
  padding: 18px;
  display: grid;
  gap: 16px;
  position: relative;
  z-index: 1;
  pointer-events: auto;
}

.tiny {
  margin: 0;
  font-size: 12px;
  color: rgba(244,244,246,0.48);
}

.sosFrame {
  width: 100%;
  max-width: 520px;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 18px;
  padding: 20px;
  background: rgba(12,12,16,0.35);
  position: relative;
  overflow: hidden;
  z-index: 1;
  pointer-events: auto;
}

.sosFrame::before {
  content: "";
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at 50% 50%, rgba(255,255,255,0.10), rgba(255,255,255,0.00) 55%),
    radial-gradient(circle at 55% 45%, rgba(255,255,255,0.07), rgba(255,255,255,0.00) 60%);
  filter: blur(18px);
  opacity: 0;
  transform: scale(0.92);
  animation: breathe 10.5s ease-in-out infinite;
  pointer-events: none;
}

.sosFrame > * {
  position: relative;
  z-index: 2;
}

.sosText {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
  color: rgba(244,244,246,0.80);
}

body.sos-active .sosFrame::before {
  opacity: 1;
}

@keyframes breathe {
  0% { transform: scale(0.92); opacity: 0.38; }
  50% { transform: scale(1.02); opacity: 0.60; }
  100% { transform: scale(0.92); opacity: 0.38; }
}

@media (max-width: 520px) {
  .actions.split {
    grid-template-columns: 1fr;
  }

  .title {
    font-size: 40px;
  }

  .timer {
    font-size: 38px;
  }
}
