/* =========================================================
   EMERGENCY PAGE
========================================================= */

.emergency-page {
  --emergency-red: #d92d20;
  --emergency-red-dark: #b42318;
  --emergency-red-soft: #fef3f2;
  --emergency-red-border: rgba(217, 45, 32, 0.14);

  overflow-x: hidden;
}

.emergency-container {
  margin: -70px 0px 0px 0px !important;
}

/* =========================================================
   HERO
========================================================= */

.emergency-hero {
  position: relative;
  min-height: 680px;

  display: flex;
  align-items: center;

  overflow: hidden;

  padding: 90px 0px 100px;

  background:
    radial-gradient(
      circle at 85% 30%,
      rgba(217, 45, 32, 0.09),
      transparent 30%
    ),
    radial-gradient(
      circle at 10% 80%,
      rgba(217, 45, 32, 0.045),
      transparent 28%
    ),
    var(--background);
}

/* =========================================================
   HERO GLOW
========================================================= */

.emergency-hero-glow {
  position: absolute;

  border-radius: 50%;

  filter: blur(1px);

  pointer-events: none;
}

.emergency-glow-one {
  width: 480px;
  height: 480px;

  top: -260px;
  right: -180px;

  background: radial-gradient(circle, rgba(217, 45, 32, 0.1), transparent 68%);
}

.emergency-glow-two {
  width: 360px;
  height: 360px;

  bottom: -220px;
  left: -160px;

  background: radial-gradient(circle, rgba(217, 45, 32, 0.07), transparent 70%);
}

/* =========================================================
   GRID
========================================================= */

.emergency-hero-grid {
  position: relative;
  z-index: 2;

  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    minmax(430px, 0.8fr);

  align-items: center;

  gap: 80px;
}

/* =========================================================
   CONTENT
========================================================= */

.emergency-hero-content {
  max-width: 650px;

  animation: emergencyFadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* =========================================================
   LIVE BADGE
========================================================= */

.emergency-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;

  padding: 8px 14px;

  color: var(--emergency-red);

  background: rgba(254, 243, 242, 0.9);

  border: 1px solid var(--emergency-red-border);

  border-radius: 999px;

  font-size: 0.76rem;
  font-weight: 800;

  box-shadow: 0 8px 25px rgba(217, 45, 32, 0.05);
}

.live-dot {
  position: relative;

  width: 8px;
  height: 8px;

  border-radius: 50%;

  background: var(--emergency-red);

  box-shadow: 0 0 0 5px rgba(217, 45, 32, 0.08);
}

.live-dot::after {
  content: "";

  position: absolute;

  inset: -5px;

  border-radius: inherit;

  border: 1px solid rgba(217, 45, 32, 0.35);

  animation: livePulse 1.8s infinite;
}

.live-text {
  padding-right: 9px;

  margin-right: 2px;

  color: var(--text-muted);

  border-right: 1px solid var(--border);

  font-weight: 600;
}

/* =========================================================
   TITLE
========================================================= */

.emergency-title {
  max-width: 650px;

  margin-top: 25px;

  color: var(--dark);

  font-size: clamp(2.4rem, 5vw, 4.4rem);

  line-height: 1.25;

  font-weight: 900;

  letter-spacing: -1.8px;
}

.emergency-title span {
  display: block;

  margin-top: 4px;

  color: var(--emergency-red);
}

/* =========================================================
   DESCRIPTION
========================================================= */

.emergency-description {
  max-width: 590px;

  margin-top: 25px;

  color: var(--text-light);

  font-size: 1rem;

  line-height: 2.15;
}

/* =========================================================
   ACTIONS
========================================================= */

.emergency-hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;

  gap: 12px;

  margin-top: 34px;
}

/* MAIN BUTTON */

.emergency-main-btn {
  min-height: 56px;

  display: inline-flex;
  align-items: center;
  gap: 11px;

  padding: 0 18px 0 22px;

  color: #fff;

  background: linear-gradient(135deg, var(--emergency-red), #c82318);

  border-radius: 14px;

  box-shadow: 0 12px 30px rgba(217, 45, 32, 0.22);

  font-size: 0.82rem;
  font-weight: 800;

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.emergency-main-btn:hover {
  transform: translateY(-3px);

  box-shadow: 0 18px 38px rgba(217, 45, 32, 0.28);
}

.btn-icon {
  width: 34px;
  height: 34px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(255, 255, 255, 0.14);

  border-radius: 10px;
}

.btn-icon svg {
  width: 17px;
  height: 17px;
}

.btn-arrow {
  width: 16px;
  height: 16px;

  margin-right: 5px;
}

/* SOS BUTTON */

.emergency-sos-btn {
  position: relative;

  min-height: 56px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  gap: 9px;

  padding: 0 19px;

  color: var(--emergency-red);

  background: #fff;

  border: 1px solid var(--emergency-red-border);

  border-radius: 14px;

  box-shadow: var(--shadow-sm);

  font-family: inherit;

  font-size: 0.8rem;
  font-weight: 800;

  transition:
    transform 0.25s ease,
    background 0.25s ease,
    box-shadow 0.25s ease;
}

.emergency-sos-btn:hover {
  transform: translateY(-3px);

  background: var(--emergency-red-soft);

  box-shadow: 0 12px 30px rgba(16, 24, 40, 0.09);
}

.emergency-sos-btn svg {
  width: 18px;
  height: 18px;
}

/* =========================================================
   TRUST
========================================================= */

.emergency-trust-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;

  gap: 24px;

  margin-top: 30px;
}

.emergency-trust-item {
  display: flex;
  align-items: center;
  gap: 8px;

  color: var(--text-muted);

  font-size: 0.72rem;
}

.emergency-trust-item span {
  width: 30px;
  height: 30px;

  display: flex;
  align-items: center;
  justify-content: center;

  color: var(--success);

  background: var(--success-light);

  border-radius: 9px;
}

.emergency-trust-item svg {
  width: 15px;
  height: 15px;
}

/* =========================================================
   VISUAL
========================================================= */

.emergency-hero-visual {
  position: relative;

  min-height: 520px;

  display: flex;
  align-items: center;
  justify-content: center;
}

/* =========================================================
   RADAR
========================================================= */

.emergency-radar {
  position: relative;

  width: 430px;
  height: 430px;

  display: flex;
  align-items: center;
  justify-content: center;
}

.radar-ring {
  position: absolute;

  border: 1px solid rgba(217, 45, 32, 0.11);

  border-radius: 50%;
}

.radar-ring-one {
  width: 260px;
  height: 260px;
}

.radar-ring-two {
  width: 350px;
  height: 350px;
}

.radar-ring-three {
  width: 440px;
  height: 440px;

  border-style: dashed;
}

.radar-sweep {
  position: absolute;

  width: 300px;
  height: 300px;

  border-radius: 50%;

  background: conic-gradient(
    from 0deg,
    rgba(217, 45, 32, 0),
    rgba(217, 45, 32, 0.12),
    rgba(217, 45, 32, 0)
  );

  animation: radarRotate 5s linear infinite;
}

.radar-center {
  position: relative;
  z-index: 4;

  width: 185px;
  height: 185px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  text-align: center;

  background: rgba(255, 255, 255, 0.95);

  border: 1px solid rgba(255, 255, 255, 0.9);

  border-radius: 50%;

  box-shadow:
    0 25px 70px rgba(16, 24, 40, 0.13),
    inset 0 0 0 1px rgba(217, 45, 32, 0.04);

  animation: radarCenterFloat 4s ease-in-out infinite;
}

.radar-center-icon {
  width: 55px;
  height: 55px;

  display: flex;
  align-items: center;
  justify-content: center;

  color: #fff;

  background: linear-gradient(
    135deg,
    var(--emergency-red),
    var(--emergency-red-dark)
  );

  border-radius: 17px;

  box-shadow: 0 10px 25px rgba(217, 45, 32, 0.25);
}

.radar-center-icon svg {
  width: 26px;
  height: 26px;
}

.radar-center strong {
  margin-top: 15px;

  color: var(--dark);

  font-size: 0.9rem;
  font-weight: 900;
}

.radar-center small {
  margin-top: 4px;

  color: var(--text-muted);

  font-size: 0.65rem;
}

/* =========================================================
   FLOATING CARDS
========================================================= */

.floating-emergency-card {
  position: absolute;
  z-index: 5;

  display: flex;
  align-items: center;
  gap: 11px;

  min-width: 215px;

  padding: 13px;

  background: rgba(255, 255, 255, 0.94);

  border: 1px solid rgba(234, 236, 240, 0.95);

  border-radius: 15px;

  box-shadow: 0 18px 50px rgba(16, 24, 40, 0.11);

  backdrop-filter: blur(14px);
}

.floating-card-top {
  top: 55px;
  right: 0;

  animation: floatingTop 4s ease-in-out infinite;
}

.floating-card-bottom {
  bottom: 50px;
  left: 0;

  animation: floatingBottom 4.5s ease-in-out infinite;
}

.floating-card-icon {
  width: 40px;
  height: 40px;

  flex-shrink: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  color: var(--emergency-red);

  background: var(--emergency-red-soft);

  border-radius: 11px;
}

.floating-card-icon.success {
  color: var(--success);

  background: var(--success-light);
}

.floating-card-icon svg {
  width: 19px;
  height: 19px;
}

.floating-emergency-card div {
  display: flex;
  flex-direction: column;
}

.floating-emergency-card strong {
  color: var(--dark);

  font-size: 0.72rem;
}

.floating-emergency-card small {
  margin-top: 3px;

  color: var(--text-muted);

  font-size: 0.62rem;
}

/* =========================================================
   STATUS
========================================================= */

.emergency-status-section {
  position: relative;
  z-index: 5;

  margin-top: -38px;
}

.emergency-status-card {
  min-height: 95px;

  display: grid;

  grid-template-columns:
    auto
    1fr
    1px
    1.2fr;

  align-items: center;

  gap: 20px;

  padding: 18px 22px;

  background: rgba(255, 255, 255, 0.97);

  border: 1px solid var(--border);

  border-radius: 20px;

  box-shadow: 0 20px 55px rgba(16, 24, 40, 0.09);

  backdrop-filter: blur(18px);
}

.status-icon {
  width: 52px;
  height: 52px;

  display: flex;
  align-items: center;
  justify-content: center;

  color: var(--emergency-red);

  background: var(--emergency-red-soft);

  border-radius: 15px;
}

.status-icon svg {
  width: 22px;
  height: 22px;
}

.status-content {
  display: flex;
  flex-direction: column;
}

.status-content span {
  color: var(--text-muted);

  font-size: 0.67rem;
}

.status-content strong {
  margin-top: 4px;

  color: var(--dark);

  font-size: 0.78rem;
}

.status-divider {
  width: 1px;
  height: 45px;

  background: var(--border);
}

.status-tip {
  display: flex;
  align-items: center;
  gap: 9px;

  color: var(--text-light);

  font-size: 0.7rem;
}

.status-tip svg {
  flex-shrink: 0;

  width: 17px;
  height: 17px;

  color: var(--warning);
}

/* =========================================================
   SELECTOR
========================================================= */

.emergency-selector-section {
  padding: 120px 0 100px;

  background: var(--surface);
}

.emergency-section-header {
  max-width: 700px;
}

.emergency-badge {
  gap: 7px;
}

.emergency-badge svg {
  width: 15px;
  height: 15px;
}

.emergency-section-header .section-title span {
  color: var(--emergency-red);
}

/* =========================================================
   SELECTOR GRID
========================================================= */

.emergency-selector-grid {
  display: grid;

  grid-template-columns: repeat(3, minmax(0, 1fr));

  gap: 16px;

  margin-top: 45px;
}

/* =========================================================
   CONDITION CARD
========================================================= */

.emergency-condition-card {
  --condition-color: var(--emergency-red);

  position: relative;

  min-height: 210px;

  display: flex;
  flex-direction: column;

  padding: 22px;

  text-align: right;

  overflow: hidden;

  background: var(--background);

  border: 1px solid var(--border);

  border-radius: 20px;

  font-family: inherit;

  cursor: pointer;

  transition:
    transform 0.28s ease,
    border-color 0.28s ease,
    box-shadow 0.28s ease,
    background 0.28s ease;
}

.emergency-condition-card::before {
  content: "";

  position: absolute;

  width: 180px;
  height: 180px;

  left: -80px;
  bottom: -100px;

  border-radius: 50%;

  background: var(--condition-color);

  opacity: 0.045;

  transition:
    transform 0.45s ease,
    opacity 0.3s ease;
}

.emergency-condition-card:hover {
  transform: translateY(-6px);

  background: #fff;

  border-color: color-mix(in srgb, var(--condition-color) 30%, var(--border));

  box-shadow: 0 20px 45px rgba(16, 24, 40, 0.09);
}

.emergency-condition-card:hover::before {
  transform: scale(1.5);

  opacity: 0.08;
}

.emergency-condition-card.active {
  transform: translateY(-5px);

  background: #fff;

  border-color: color-mix(in srgb, var(--condition-color) 45%, var(--border));

  box-shadow:
    0 18px 45px rgba(16, 24, 40, 0.1),
    0 0 0 4px color-mix(in srgb, var(--condition-color) 7%, transparent);
}

/* =========================================================
   CONDITION COLORS
========================================================= */

.emergency-condition-card.earthquake {
  --condition-color: #d92d20;
}

.emergency-condition-card.fire {
  --condition-color: #f04438;
}

.emergency-condition-card.flood {
  --condition-color: #1570ef;
}

.emergency-condition-card.gas {
  --condition-color: #7a5af8;
}

.emergency-condition-card.electric {
  --condition-color: #f79009;
}

.emergency-condition-card.accident {
  --condition-color: #475467;
}

/* =========================================================
   CARD ELEMENTS
========================================================= */

.condition-number {
  position: absolute;

  top: 20px;
  left: 22px;

  color: var(--text-muted);

  font-size: 0.65rem;
  font-weight: 800;
}

.condition-icon {
  width: 53px;
  height: 53px;

  display: flex;
  align-items: center;
  justify-content: center;

  color: var(--condition-color);

  background: color-mix(in srgb, var(--condition-color) 10%, transparent);

  border-radius: 15px;
}

.condition-icon svg {
  width: 24px;
  height: 24px;
}

.condition-content {
  display: flex;
  flex-direction: column;

  margin-top: auto;
}

.condition-content strong {
  color: var(--dark);

  font-size: 1rem;
  font-weight: 900;
}

.condition-content small {
  margin-top: 5px;

  color: var(--text-light);

  font-size: 0.68rem;
}

.condition-arrow {
  position: absolute;

  left: 20px;
  bottom: 20px;

  width: 33px;
  height: 33px;

  display: flex;
  align-items: center;
  justify-content: center;

  color: var(--text-muted);

  border: 1px solid var(--border);

  border-radius: 50%;

  transition:
    transform 0.3s ease,
    color 0.3s ease,
    background 0.3s ease;
}

.condition-arrow svg {
  width: 14px;
  height: 14px;
}

.emergency-condition-card:hover .condition-arrow,
.emergency-condition-card.active .condition-arrow {
  color: #fff;

  background: var(--condition-color);

  border-color: var(--condition-color);

  transform: rotate(45deg);
}

/* =========================================================
   ACTIVE GUIDE
========================================================= */

.active-guide-section {
  padding: 100px 0;

  background: var(--background);
}

.active-guide-card {
  position: relative;

  overflow: hidden;

  padding: 34px;

  background: #fff;

  border: 1px solid var(--border);

  border-radius: 26px;

  box-shadow: 0 18px 50px rgba(16, 24, 40, 0.06);
}

/* =========================================================
   GUIDE TOP
========================================================= */

.active-guide-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  gap: 20px;

  padding-bottom: 25px;

  border-bottom: 1px solid var(--border);
}

.active-guide-kicker {
  color: var(--emergency-red);

  font-size: 0.68rem;
  font-weight: 800;
}

.active-guide-top h2 {
  margin-top: 7px;

  color: var(--dark);

  font-size: 1.55rem;
  font-weight: 900;
}

.active-guide-level {
  padding: 7px 12px;

  color: var(--success);

  background: var(--success-light);

  border-radius: 999px;

  font-size: 0.65rem;
  font-weight: 800;
}

/* =========================================================
   ALERT
========================================================= */

.active-guide-alert {
  display: flex;
  align-items: flex-start;

  gap: 12px;

  margin-top: 25px;

  padding: 17px;

  background: var(--emergency-red-soft);

  border: 1px solid var(--emergency-red-border);

  border-radius: 15px;
}

.alert-icon {
  width: 38px;
  height: 38px;

  flex-shrink: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  color: var(--emergency-red);

  background: #fff;

  border-radius: 11px;
}

.alert-icon svg {
  width: 18px;
  height: 18px;
}

.active-guide-alert strong {
  color: var(--dark);

  font-size: 0.73rem;
}

.active-guide-alert p {
  margin-top: 3px;

  color: var(--text-light);

  font-size: 0.68rem;

  line-height: 1.9;
}

/* =========================================================
   STEPS
========================================================= */

.emergency-steps {
  display: grid;

  grid-template-columns: repeat(3, minmax(0, 1fr));

  gap: 14px;

  margin-top: 25px;
}

.emergency-step {
  position: relative;

  min-height: 190px;

  padding: 20px;

  background: var(--background);

  border: 1px solid var(--border);

  border-radius: 17px;

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.emergency-step:hover {
  transform: translateY(-4px);

  border-color: rgba(217, 45, 32, 0.2);

  box-shadow: 0 12px 30px rgba(16, 24, 40, 0.06);
}

.emergency-step-number {
  width: 38px;
  height: 38px;

  display: flex;
  align-items: center;
  justify-content: center;

  color: #fff;

  background: var(--emergency-red);

  border-radius: 11px;

  font-size: 0.72rem;
  font-weight: 900;
}

.emergency-step h3 {
  margin-top: 17px;

  color: var(--dark);

  font-size: 0.86rem;
  font-weight: 900;
}

.emergency-step p {
  margin-top: 7px;

  color: var(--text-light);

  font-size: 0.68rem;

  line-height: 1.95;
}

/* =========================================================
   EMPTY
========================================================= */

.empty-guide {
  grid-column: 1 / -1;

  min-height: 230px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  text-align: center;

  border: 1px dashed var(--border-dark);

  border-radius: 18px;
}

.empty-guide-icon {
  width: 55px;
  height: 55px;

  display: flex;
  align-items: center;
  justify-content: center;

  color: var(--emergency-red);

  background: var(--emergency-red-soft);

  border-radius: 16px;
}

.empty-guide-icon svg {
  width: 24px;
  height: 24px;
}

.empty-guide strong {
  margin-top: 15px;

  color: var(--dark);

  font-size: 0.82rem;
}

.empty-guide span {
  margin-top: 5px;

  color: var(--text-muted);

  font-size: 0.66rem;
}

/* =========================================================
   GUIDE FOOTER
========================================================= */

.active-guide-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;

  margin-top: 25px;
  padding-top: 20px;

  border-top: 1px solid var(--border);

  color: var(--text-muted);

  font-size: 0.65rem;
}

.active-guide-footer span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.active-guide-footer svg {
  width: 15px;
  height: 15px;
}

.guide-tools-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;

  color: var(--emergency-red);

  background: transparent;

  font-family: inherit;

  font-size: 0.65rem;
  font-weight: 800;
}

.guide-tools-link svg {
  transition: transform 0.25s ease;
}

.guide-tools-link:hover svg {
  transform: translateY(3px);
}

/* =========================================================
   TOOLS
========================================================= */

.emergency-tools-section {
  padding: 110px 0;

  background: var(--surface);
}

.emergency-tools-grid {
  display: grid;

  grid-template-columns: repeat(4, minmax(0, 1fr));

  gap: 15px;

  margin-top: 45px;
}

.emergency-tool-card {
  position: relative;

  min-height: 190px;

  display: flex;
  flex-direction: column;
  align-items: flex-start;

  padding: 22px;

  text-align: right;

  background: var(--background);

  border: 1px solid var(--border);

  border-radius: 19px;

  font-family: inherit;

  cursor: pointer;

  transition:
    transform 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.emergency-tool-card:hover {
  transform: translateY(-6px);

  background: #fff;

  border-color: rgba(217, 45, 32, 0.18);

  box-shadow: 0 18px 38px rgba(16, 24, 40, 0.08);
}

.emergency-tool-icon {
  width: 52px;
  height: 52px;

  display: flex;
  align-items: center;
  justify-content: center;

  color: var(--emergency-red);

  background: var(--emergency-red-soft);

  border-radius: 15px;
}

.emergency-tool-icon svg {
  width: 23px;
  height: 23px;
}

.emergency-tool-content {
  display: flex;
  flex-direction: column;

  margin-top: auto;
}

.emergency-tool-content strong {
  color: var(--dark);

  font-size: 0.83rem;
  font-weight: 900;
}

.emergency-tool-content small {
  margin-top: 5px;

  color: var(--text-muted);

  font-size: 0.63rem;
}

.emergency-tool-arrow {
  position: absolute;

  left: 19px;
  top: 19px;

  width: 30px;
  height: 30px;

  color: var(--text-muted);

  transition:
    transform 0.25s ease,
    color 0.25s ease;
}

.emergency-tool-card:hover .emergency-tool-arrow {
  color: var(--emergency-red);

  transform: translate(-2px, -2px);
}

/* =========================================================
   SOS PANEL
========================================================= */

.emergency-sos-section {
  padding: 0 0 110px;

  background: var(--surface);
}

.emergency-sos-panel {
  position: relative;

  display: grid;

  grid-template-columns:
    auto
    1fr
    auto;

  align-items: center;

  gap: 24px;

  padding: 30px;

  overflow: hidden;

  color: #fff;

  background: linear-gradient(135deg, #101828, #1d2939);

  border-radius: 25px;

  box-shadow: 0 22px 60px rgba(16, 24, 40, 0.15);
}

.sos-panel-glow {
  position: absolute;

  width: 280px;
  height: 280px;

  top: -160px;
  left: -100px;

  border-radius: 50%;

  background: radial-gradient(circle, rgba(217, 45, 32, 0.25), transparent 70%);
}

.sos-panel-icon {
  position: relative;
  z-index: 2;

  width: 62px;
  height: 62px;

  display: flex;
  align-items: center;
  justify-content: center;

  color: #fff;

  background: var(--emergency-red);

  border-radius: 18px;

  box-shadow: 0 12px 30px rgba(217, 45, 32, 0.28);
}

.sos-panel-icon svg {
  width: 28px;
  height: 28px;
}

.sos-panel-content {
  position: relative;
  z-index: 2;
}

.sos-panel-content span {
  color: rgba(255, 255, 255, 0.55);

  font-size: 0.68rem;
}

.sos-panel-content h2 {
  margin-top: 5px;

  font-size: 1.2rem;
  font-weight: 900;
}

.sos-panel-content p {
  max-width: 650px;

  margin-top: 6px;

  color: rgba(255, 255, 255, 0.55);

  font-size: 0.66rem;

  line-height: 1.9;
}

.sos-panel-button {
  position: relative;
  z-index: 2;

  min-height: 50px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  gap: 8px;

  padding: 0 18px;

  color: #fff;

  background: rgba(255, 255, 255, 0.08);

  border: 1px solid rgba(255, 255, 255, 0.12);

  border-radius: 13px;

  font-family: inherit;

  font-size: 0.7rem;
  font-weight: 800;

  cursor: pointer;

  transition:
    background 0.25s ease,
    transform 0.25s ease;
}

.sos-panel-button:hover {
  background: var(--emergency-red);

  transform: translateY(-2px);
}

.sos-panel-button svg {
  width: 17px;
  height: 17px;
}

/* =========================================================
   MODAL
========================================================= */

.emergency-modal {
  position: fixed;

  inset: 0;

  z-index: 9999;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 20px;

  visibility: hidden;
  opacity: 0;

  pointer-events: none;

  transition:
    opacity 0.25s ease,
    visibility 0.25s ease;
}

.emergency-modal.active {
  visibility: visible;

  opacity: 1;

  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;

  inset: 0;

  background: rgba(16, 24, 40, 0.65);

  backdrop-filter: blur(8px);
}

.modal-dialog {
  position: relative;
  z-index: 2;

  width: min(520px, 100%);

  max-height: min(720px, 90vh);

  overflow-y: auto;

  padding: 30px;

  background: #fff;

  border-radius: 25px;

  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.25);

  transform: translateY(20px) scale(0.97);

  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.emergency-modal.active .modal-dialog {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;

  top: 15px;
  left: 15px;

  width: 38px;
  height: 38px;

  display: flex;
  align-items: center;
  justify-content: center;

  color: var(--text-light);

  background: var(--surface-secondary);

  border: 1px solid var(--border);

  border-radius: 11px;

  cursor: pointer;

  transition:
    color 0.2s ease,
    background 0.2s ease;
}

.modal-close:hover {
  color: var(--emergency-red);

  background: var(--emergency-red-soft);
}

.modal-close svg {
  width: 18px;
  height: 18px;
}

/* =========================================================
   MODAL COMMON
========================================================= */

.tool-modal-header {
  display: flex;
  align-items: center;

  gap: 13px;

  padding-left: 40px;
}

.tool-modal-icon {
  width: 50px;
  height: 50px;

  display: flex;
  align-items: center;
  justify-content: center;

  color: var(--emergency-red);

  background: var(--emergency-red-soft);

  border-radius: 14px;
}

.tool-modal-icon svg {
  width: 23px;
  height: 23px;
}

.tool-modal-header div {
  display: flex;
  flex-direction: column;
}

.tool-modal-header strong {
  color: var(--dark);

  font-size: 1rem;
  font-weight: 900;
}

.tool-modal-header small {
  margin-top: 3px;

  color: var(--text-muted);

  font-size: 0.63rem;
}

/* =========================================================
   TIMER
========================================================= */

.timer-display {
  display: flex;
  align-items: center;
  justify-content: center;

  margin: 35px 0 25px;

  color: var(--dark);

  font-size: 4rem;
  font-weight: 900;

  font-variant-numeric: tabular-nums;
}

.timer-inputs {
  display: grid;

  grid-template-columns: 1fr 1fr 1fr;

  gap: 10px;
}

.timer-input-group {
  display: flex;
  flex-direction: column;

  gap: 6px;
}

.timer-input-group label {
  color: var(--text-muted);

  font-size: 0.6rem;
}

.timer-input-group input {
  width: 100%;
  height: 45px;

  padding: 0 10px;

  text-align: center;

  color: var(--dark);

  background: var(--background);

  border: 1px solid var(--border);

  border-radius: 10px;

  outline: none;

  font-family: inherit;
}

.timer-input-group input:focus {
  border-color: var(--emergency-red);
}

.timer-actions {
  display: flex;

  gap: 8px;

  margin-top: 15px;
}

.timer-action {
  flex: 1;

  min-height: 45px;

  border-radius: 10px;

  font-family: inherit;

  font-size: 0.68rem;
  font-weight: 800;

  cursor: pointer;
}

.timer-start {
  color: #fff;

  background: var(--emergency-red);
}

.timer-reset {
  color: var(--dark);

  background: var(--surface-secondary);
}

/* =========================================================
   FLASHLIGHT
========================================================= */

.flashlight-body {
  display: flex;
  flex-direction: column;
  align-items: center;

  text-align: center;

  padding: 35px 0 10px;
}

.flashlight-button {
  width: 145px;
  height: 145px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  gap: 10px;

  color: var(--emergency-red);

  background: var(--emergency-red-soft);

  border: 1px solid var(--emergency-red-border);

  border-radius: 50%;

  font-family: inherit;

  cursor: pointer;

  transition:
    transform 0.3s ease,
    background 0.3s ease,
    color 0.3s ease,
    box-shadow 0.3s ease;
}

.flashlight-button:hover {
  transform: scale(1.03);
}

.flashlight-button.active {
  color: #101828;

  background: #fff;

  box-shadow:
    0 0 0 12px rgba(255, 255, 255, 0.25),
    0 0 80px rgba(255, 255, 255, 0.9);
}

.flashlight-button svg {
  width: 35px;
  height: 35px;
}

.flashlight-button strong {
  font-size: 0.7rem;
}

.flashlight-hint {
  max-width: 340px;

  margin-top: 20px;

  color: var(--text-muted);

  font-size: 0.65rem;

  line-height: 1.9;
}

/* =========================================================
   CHECKLIST
========================================================= */

.quick-checklist {
  display: flex;
  flex-direction: column;

  gap: 8px;

  margin-top: 25px;
}

.quick-check-item {
  display: flex;
  align-items: center;

  gap: 10px;

  min-height: 53px;

  padding: 0 13px;

  background: var(--background);

  border: 1px solid var(--border);

  border-radius: 12px;

  cursor: pointer;
}

.quick-check-item input {
  position: absolute;

  opacity: 0;

  pointer-events: none;
}

.quick-check-box {
  width: 22px;
  height: 22px;

  flex-shrink: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  color: transparent;

  background: #fff;

  border: 1px solid var(--border-dark);

  border-radius: 7px;

  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}

.quick-check-box svg {
  width: 13px;
  height: 13px;
}

.quick-check-item input:checked + .quick-check-box {
  color: #fff;

  background: var(--success);

  border-color: var(--success);
}

.quick-check-item span:last-child {
  color: var(--text);

  font-size: 0.68rem;
}

.checklist-progress {
  height: 7px;

  margin-top: 18px;

  overflow: hidden;

  background: var(--surface-secondary);

  border-radius: 999px;
}

.checklist-progress span {
  display: block;

  width: 0;
  height: 100%;

  background: var(--success);

  border-radius: inherit;

  transition: width 0.35s ease;
}

.checklist-progress-text {
  display: flex;
  justify-content: space-between;

  margin-top: 8px;

  color: var(--text-muted);

  font-size: 0.6rem;
}

/* =========================================================
   CONTACTS
========================================================= */

.emergency-contacts {
  display: grid;

  grid-template-columns: repeat(2, minmax(0, 1fr));

  gap: 10px;

  margin-top: 25px;
}

.emergency-contact {
  min-height: 70px;

  display: flex;
  align-items: center;

  gap: 10px;

  padding: 10px;

  background: var(--background);

  border: 1px solid var(--border);

  border-radius: 13px;
}

.emergency-contact-icon {
  width: 40px;
  height: 40px;

  display: flex;
  align-items: center;
  justify-content: center;

  color: var(--emergency-red);

  background: var(--emergency-red-soft);

  border-radius: 10px;
}

.emergency-contact-icon svg {
  width: 18px;
  height: 18px;
}

.emergency-contact-content {
  display: flex;
  flex-direction: column;

  min-width: 0;
}

.emergency-contact-content strong {
  color: var(--dark);

  font-size: 0.7rem;
}

.emergency-contact-content small {
  margin-top: 2px;

  color: var(--text-muted);

  font-size: 0.58rem;
}

.emergency-contact-call {
  margin-right: auto;

  width: 32px;
  height: 32px;

  display: flex;
  align-items: center;
  justify-content: center;

  color: var(--emergency-red);

  background: #fff;

  border: 1px solid var(--border);

  border-radius: 9px;
}

.emergency-contact-call svg {
  width: 15px;
  height: 15px;
}

/* =========================================================
   ANIMATIONS
========================================================= */

@keyframes emergencyFadeUp {
  from {
    opacity: 0;

    transform: translateY(25px);
  }

  to {
    opacity: 1;

    transform: translateY(0);
  }
}

@keyframes livePulse {
  0% {
    transform: scale(0.8);

    opacity: 0.8;
  }

  70% {
    transform: scale(1.35);

    opacity: 0;
  }

  100% {
    transform: scale(1.35);

    opacity: 0;
  }
}

@keyframes radarRotate {
  to {
    transform: rotate(360deg);
  }
}

@keyframes radarCenterFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }
}

@keyframes floatingTop {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

@keyframes floatingBottom {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(7px);
  }
}

/* =========================================================
   FLASHLIGHT MODE
========================================================= */

body.flashlight-mode {
  background: #fff !important;
}

body.flashlight-mode > *:not(#emergencyModal) {
  opacity: 0;
  pointer-events: none;
}

body.flashlight-mode #header,
body.flashlight-mode #footer {
  display: none;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1050px) {
  .emergency-hero-grid {
    grid-template-columns: 1fr;

    gap: 40px;
  }

  .emergency-hero-content {
    max-width: 750px;

    margin-inline: auto;

    text-align: center;
  }

  .emergency-title {
    margin-inline: auto;
  }

  .emergency-description {
    margin-inline: auto;
  }

  .emergency-hero-actions,
  .emergency-trust-row {
    justify-content: center;
  }

  .emergency-hero-visual {
    min-height: 450px;
  }

  .emergency-selector-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .emergency-tools-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .emergency-sos-panel {
    grid-template-columns:
      auto
      1fr;
  }

  .sos-panel-button {
    grid-column: 1 / -1;

    width: 100%;
  }
}

@media (max-width: 760px) {
  .emergency-container {
    margin: 0px 0px 0px 0px !important;
  }

  .emergency-hero {
    min-height: auto;

    padding: 65px 0 70px;
  }

  .emergency-hero-grid {
    gap: 20px;
  }

  .emergency-title {
    font-size: clamp(2.1rem, 10vw, 3.1rem);
  }

  .emergency-description {
    font-size: 0.84rem;
  }

  .emergency-hero-actions {
    flex-direction: column;
  }

  .emergency-main-btn,
  .emergency-sos-btn {
    width: 100%;
  }

  .emergency-hero-visual {
    min-height: 380px;
  }

  .emergency-radar {
    transform: scale(0.76);
  }

  .floating-card-top {
    top: 15px;
    right: -5px;
  }

  .floating-card-bottom {
    bottom: 10px;
    left: -5px;
  }

  .emergency-status-section {
    margin-top: -20px;
  }

  .emergency-status-card {
    grid-template-columns: auto 1fr;

    gap: 12px;
  }

  .status-divider {
    display: none;
  }

  .status-tip {
    grid-column: 1 / -1;

    padding-top: 12px;

    border-top: 1px solid var(--border);
  }

  .emergency-selector-section,
  .active-guide-section,
  .emergency-tools-section {
    padding: 75px 0;
  }

  .emergency-selector-grid {
    grid-template-columns: 1fr;
  }

  .emergency-condition-card {
    min-height: 160px;
  }

  .active-guide-card {
    padding: 20px;
  }

  .active-guide-top {
    flex-direction: column;
  }

  .emergency-steps {
    grid-template-columns: 1fr;
  }

  .emergency-step {
    min-height: auto;
  }

  .emergency-tools-grid {
    grid-template-columns: 1fr 1fr;
  }

  .emergency-sos-section {
    padding-bottom: 75px;
  }
}

@media (max-width: 520px) {
  .emergency-trust-row {
    gap: 12px;
  }

  .emergency-trust-item {
    flex: 1;
    justify-content: center;
  }

  .emergency-trust-item span {
    width: 27px;
    height: 27px;
  }

  .emergency-hero-visual {
    min-height: 320px;
  }

  .emergency-radar {
    transform: scale(0.61);
  }

  .floating-emergency-card {
    min-width: 175px;

    padding: 10px;
  }

  .floating-card-top {
    right: -10px;
  }

  .floating-card-bottom {
    left: -10px;
  }

  .floating-card-icon {
    width: 34px;
    height: 34px;
  }

  .emergency-tools-grid {
    grid-template-columns: 1fr;
  }

  .emergency-tool-card {
    min-height: 145px;
  }

  .emergency-sos-panel {
    grid-template-columns: 1fr;

    padding: 22px;
  }

  .sos-panel-icon {
    width: 52px;
    height: 52px;
  }

  .sos-panel-content h2 {
    font-size: 1rem;
  }

  .sos-panel-button {
    grid-column: auto;
  }

  .emergency-modal {
    padding: 10px;
  }

  .modal-dialog {
    padding: 22px;

    border-radius: 20px;
  }

  .timer-display {
    font-size: 3rem;
  }

  .emergency-contacts {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .emergency-page *,
  .emergency-page *::before,
  .emergency-page *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* =========================================================
   RESPONSIVE — MOBILE
========================================================= */

@media (max-width: 768px) {
  .emergency-container {
    margin: -70px 0px 0px 0px !important;
  }

  .emergency-hero {
    min-height: unset;
    padding: 90px 0 60px;
  }

  .emergency-hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .emergency-hero-visual {
    display: none;
  }

  .emergency-hero-content {
    max-width: 100%;
  }

  .emergency-title {
    font-size: clamp(2rem, 8vw, 2.8rem);
    letter-spacing: -1px;
  }

  .emergency-description {
    font-size: 0.95rem;
    line-height: 2;
    max-width: 100%;
  }

  .emergency-hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-top: 28px;
  }

  .emergency-main-btn,
  .emergency-sos-btn {
    width: 100%;
    justify-content: center;
    min-height: 52px;
    font-size: 0.85rem;
  }

  .emergency-trust-row {
    gap: 16px;
    margin-top: 24px;
  }

  .emergency-trust-item {
    font-size: 0.7rem;
  }

  .emergency-glow-one,
  .emergency-glow-two {
    display: none;
  }
}

@media (max-width: 480px) {
  .emergency-hero {
    padding: 80px 0 50px;
  }

  .emergency-live-badge {
    font-size: 0.72rem;
    padding: 7px 12px;
    gap: 7px;
  }

  .emergency-title {
    font-size: clamp(1.85rem, 7.5vw, 2.4rem);
    margin-top: 18px;
    letter-spacing: -0.8px;
  }

  .emergency-description {
    font-size: 0.9rem;
    margin-top: 18px;
  }

  .emergency-hero-actions {
    margin-top: 22px;
    gap: 9px;
  }

  .emergency-main-btn,
  .emergency-sos-btn {
    min-height: 50px;
    border-radius: 12px;
    font-size: 0.82rem;
  }

  .btn-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
  }

  .btn-icon svg {
    width: 15px;
    height: 15px;
  }

  .emergency-trust-row {
    gap: 12px;
    flex-wrap: wrap;
  }

  .emergency-trust-item span {
    width: 26px;
    height: 26px;
    border-radius: 7px;
  }

  .emergency-trust-item svg {
    width: 13px;
    height: 13px;
  }
}
