/* ==========================================================================
   SF Hebrew Fonts (Apple Official Typography)
   ========================================================================== */
@font-face {
  font-family: 'SF Hebrew';
  src: url('../assets/fonts/SF-Hebrew.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'SF Hebrew Rounded';
  src: url('../assets/fonts/SF-Hebrew-Rounded.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* 'Glass' Effect */
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-bg-dark: rgba(0, 0, 0, 0.20);
  --glass-border: rgba(255, 255, 255, 0.18);
  --glass-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  --blur: blur(8px);
  /* Blur is strictly kept at 8px as required */

  /* Colors */
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.80);
  --text-muted: rgba(255, 255, 255, 0.55);
  --accent-blue: rgba(100, 180, 255, 0.9);
  --accent-gold: rgba(255, 215, 100, 0.95);
  --accent-green: rgba(120, 220, 160, 0.9);
  --accent-orange: rgba(255, 170, 80, 0.9);
  --accent-red: rgba(220, 50, 50, 0.9);

  /* Layout */
  --radius-lg: 16px;
  --radius-sm: 10px;
}

html,
body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  font-family: 'SF Hebrew', -apple-system, BlinkMacSystemFont, 'Heebo', sans-serif;
  background: #0d1b2a;
  color: var(--text-primary);
  user-select: none;
  -webkit-user-select: none;
}

/* ==========================================================================
   Background Container & Crossfade
   ========================================================================== */
#bg-container {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: #0d1b2a;
}

.bg-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 2.5s ease-in-out;
  will-change: opacity;
}

.bg-slide.active {
  opacity: 1;
}

.bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(0, 0, 0, 0.32) 0%, rgba(0, 0, 0, 0.15) 50%, rgba(0, 0, 0, 0.32) 100%);
  pointer-events: none;
}

/* ==========================================================================
   Main Application Layout (3-Row Grid)
   ========================================================================== */
#app {
  position: relative;
  z-index: 1;
  width: 100vw;
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
}

/* ==========================================================================
   Row 1: Header
   ========================================================================== */
#header {
  padding: 10px 32px 6px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.40) 0%, transparent 100%);
  text-align: center;
}

#header h1 {
  font-size: clamp(0.95rem, 1.8vw, 1.35rem);
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.06em;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.7);
}

#header h1 strong {
  color: #84DF5A;
  font-weight: 700;
}

.header-line {
  width: 140px;
  height: 1px;
  margin: 5px auto 0;
  background: linear-gradient(to right, transparent, rgba(132, 223, 90, 0.5), transparent);
}

/* ==========================================================================
   Row 2: Main Content Grid (2 or 3 Columns, RTL)
   ========================================================================== */
#main-content {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 14px;
  padding: 8px 20px;
  align-items: start;
  overflow: hidden;
  height: 100%;
  transition: grid-template-columns 0.4s ease;
}

#main-content.emergency-active {
  grid-template-columns: 320px 1fr 340px;
}

/* Right Column (320px) — Clock, Weather, Shabbat */
#right-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Left Column (1fr) — Combined Panel */
#left-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  min-width: 0;
}

/* ==========================================================================
   Glass Panel Component
   ========================================================================== */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
  animation: panelIn 0.7s ease-out both;
}

.glass-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.35), transparent);
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.panel-label {
  font-size: 0.60rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.accent-line {
  display: inline-block;
  width: 18px;
  height: 2px;
  border-radius: 1px;
  background: var(--accent-blue);
}

/* ==========================================================================
   Panel 1: Clock & Date (#clock-panel)
   ========================================================================== */
#clock-panel {
  animation-delay: 0.05s;
  text-align: center;
}

#clock-display {
  display: flex;
  align-items: center;
  justify-content: center;
  direction: ltr;
  font-family: 'Inter', sans-serif;
  font-size: clamp(2.8rem, 5.5vw, 4.4rem);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1;
  text-shadow: 0 0 30px rgba(100, 180, 255, 0.35), 0 2px 16px rgba(0, 0, 0, 0.5);
}

#clock-h,
#clock-m {
  font-variant-numeric: tabular-nums;
  display: inline-block;
}

#clock-display .colon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transform: translateY(-0.08em);
  margin: 0 2px;
  animation: blink 1s step-end infinite;
  color: rgba(100, 180, 255, 0.85);
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.25;
  }
}

#date-day {
  font-size: clamp(1.15rem, 1.8vw, 1.35rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 6px;
  letter-spacing: 0.02em;
}

#date-combined {
  font-size: clamp(0.82rem, 1.3vw, 0.96rem);
  font-weight: 500;
  color: var(--text-secondary);
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
}

#date-gregorian {
  color: var(--text-secondary);
}

.date-sep {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.85rem;
  margin: 0 3px;
}

#date-hebrew {
  color: var(--text-primary);
  font-weight: 500;
}

.parasha-tag {
  display: inline-block;
  margin-top: 6px;
  padding: 3px 12px;
  background: rgba(255, 215, 100, 0.12);
  border: 1px solid rgba(255, 215, 100, 0.30);
  border-radius: 20px;
  font-size: 0.70rem;
  color: var(--accent-gold);
  font-weight: 600;
}

/* ==========================================================================
   Panel 2: Weather (#weather-panel)
   ========================================================================== */
#weather-panel {
  animation-delay: 0.15s;
}

.weather-main {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.w-icon {
  font-size: 2.3rem;
  line-height: 1;
  min-width: 44px;
  text-align: center;
}

.w-temp {
  font-family: 'Inter', sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.w-temp sup {
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-secondary);
  vertical-align: super;
}

.w-desc {
  font-size: 0.80rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.w-loc {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.forecast {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.fc-day {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  padding: 6px 4px;
  text-align: center;
}

.fc-day .dn {
  font-size: 0.60rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.fc-day .di {
  font-size: 1.1rem;
  margin: 2px 0;
  line-height: 1.2;
}

.fc-day .dt {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
}

.fc-day .dl {
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Panel 3: Shabbat / Chag (#shabbat-panel)
   ========================================================================== */
#shabbat-panel {
  animation-delay: 0.2s;
  background: rgba(255, 215, 100, 0.06);
  border-color: rgba(255, 215, 100, 0.22);
}

.shabbat-times {
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.sh-block {
  text-align: center;
}

.sh-block .sh-label {
  font-size: 0.60rem;
  color: rgba(255, 215, 100, 0.75);
  font-weight: 700;
  letter-spacing: 0.09em;
  margin-bottom: 3px;
}

.sh-block .sh-time {
  font-family: 'Inter', sans-serif;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-weight: 700;
  color: var(--accent-gold);
  text-shadow: 0 0 12px rgba(255, 215, 100, 0.3);
}

.sh-divider {
  width: 1px;
  height: 30px;
  background: rgba(255, 215, 100, 0.18);
}

/* ==========================================================================
   Panel 4: Combined Left Panel (#combined-panel)
   ========================================================================== */
#combined-panel {
  animation-delay: 0.1s;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  background: none;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 0;
}

.slide-container {
  position: relative;
  flex: 1;
  width: 100%;
  min-height: 220px;
}

.slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 1.0s cubic-bezier(0.16, 1, 0.3, 1), transform 1.0s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
}

.slide.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  z-index: 2;
}

.hoa-glass-card {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  border-radius: var(--radius-lg);
  animation: none !important;
  padding: 12px 14px 8px;
  box-sizing: border-box;
}

/* Individual Announcement Glass Cards (No outer wrapper) */
.ann-slide-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  gap: 12px;
  padding: 0;
}

.ann-glass-item {
  background: var(--glass-bg);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  padding: 18px 22px;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: right;
  transition: transform 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}

.ann-glass-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.35), transparent);
}

.ann-glass-item:hover {
  border-color: rgba(255, 255, 255, 0.25);
}

.ann-item-content {
  font-size: clamp(0.95rem, 1.35vw, 1.22rem);
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.55;
  white-space: pre-line;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  word-break: break-word;
  text-align: right;
}

/* Date in Bottom-Left Corner of the Card */
.ann-item-date {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 400;
  text-align: left;
  direction: ltr;
  margin-top: 12px;
  letter-spacing: 0.02em;
  opacity: 0.85;
}

/* Sizing based on items count per slide (Top-aligned, expanding downwards) */
.ann-slide-list.count-1 .ann-glass-item {
  padding: 24px 28px;
  min-height: 150px;
}

.ann-slide-list.count-1 .ann-item-content {
  font-size: clamp(1.12rem, 1.75vw, 1.42rem);
  line-height: 1.65;
}

.ann-slide-list.count-1 .ann-item-date {
  font-size: 0.76rem;
  margin-top: 16px;
}

.ann-slide-list.count-2 {
  gap: 12px;
}

.ann-slide-list.count-2 .ann-glass-item {
  padding: 16px 20px;
}

.ann-slide-list.count-2 .ann-item-content {
  font-size: clamp(0.96rem, 1.4vw, 1.20rem);
}

.ann-slide-list.count-3 {
  gap: 10px;
}

.ann-slide-list.count-3 .ann-glass-item {
  padding: 12px 18px;
}

.ann-slide-list.count-3 .ann-item-content {
  font-size: clamp(0.86rem, 1.2vw, 1.05rem);
  line-height: 1.42;
}

.ann-slide-list.count-3 .ann-item-date {
  font-size: 0.68rem;
  margin-top: 6px;
}

/* HOA Report Slide */
.hoa-img-container {
  width: 100%;
  flex: 1;
  min-height: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.hoa-report-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.hoa-img-placeholder {
  width: 100%;
  max-height: 240px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 20px;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-align: center;
}

.hoa-img-placeholder .img-icon {
  font-size: 1.8rem;
  opacity: 0.5;
}

.hoa-updated-tag {
  margin-top: 6px;
  font-size: 0.72rem;
  color: var(--accent-orange);
  flex-shrink: 0;
}

/* Pikud HaOref City Guidelines Slide */
.pakar-glass-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 220px;
  padding: 16px 20px;
}

.pakar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  padding-bottom: 12px;
  margin-bottom: 12px;
}

.pakar-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pakar-icon {
  font-size: 1.5rem;
}

.pakar-main-title {
  font-size: clamp(0.92rem, 1.3vw, 1.05rem);
  font-weight: 700;
  color: var(--text-primary);
}

.pakar-city-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.pakar-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.pakar-status-pill.status-green {
  background: rgba(0, 166, 76, 0.18);
  border: 1px solid rgba(0, 166, 76, 0.50);
  color: #55ef94;
}

.pakar-status-pill.status-yellow {
  background: rgba(238, 192, 45, 0.18);
  border: 1px solid rgba(238, 192, 45, 0.50);
  color: #ffdf6d;
}

.pakar-status-pill.status-orange {
  background: rgba(232, 144, 36, 0.18);
  border: 1px solid rgba(232, 144, 36, 0.50);
  color: #ffaa5a;
}

.pakar-status-pill.status-red {
  background: rgba(225, 0, 0, 0.22);
  border: 1px solid rgba(225, 0, 0, 0.60);
  color: #ff6b6b;
}

.pakar-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.pakar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  flex: 1;
}

.pakar-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pakar-item.highlight-item {
  background: rgba(0, 166, 76, 0.08);
  border-color: rgba(0, 166, 76, 0.25);
}

.pakar-item-icon {
  font-size: 1.3rem;
  opacity: 0.9;
}

.pakar-item-info {
  display: flex;
  flex-direction: column;
}

.pakar-item-title {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 500;
}

.pakar-item-value {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 2px;
}

.pakar-footer {
  margin-top: 10px;
  font-size: 0.65rem;
  color: var(--text-muted);
  text-align: left;
}

.slide-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}

.slide-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  transition: background 0.3s, transform 0.3s;
}

.slide-dot.active {
  background: rgba(255, 255, 255, 0.85);
  transform: scale(1.2);
}

/* ==========================================================================
   Emergency Side Panel (#emergency-side-panel) — Orange Glassmorphism
   ========================================================================== */
.emergency-glass-panel {
  background: linear-gradient(165deg, rgba(255, 102, 0, 0.20) 0%, rgba(180, 50, 0, 0.12) 100%);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1.5px solid rgba(255, 120, 30, 0.45);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(255, 80, 0, 0.22), inset 0 1px 0 rgba(255, 200, 140, 0.35);
  padding: 16px;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
  animation: espSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes espSlideIn {
  from {
    opacity: 0;
    transform: translateX(-20px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.esp-header {
  display: flex;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 140, 50, 0.30);
}

.esp-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.esp-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.45));
  flex-shrink: 0;
}

.esp-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* Inner Glass Cards */
.esp-card {
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.esp-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.82);
  letter-spacing: 0.04em;
}

.esp-card-icon {
  font-size: 1rem;
}

/* Activity Level Badge */
.esp-level-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: var(--radius-lg);
  font-size: 1.08rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  letter-spacing: 0.02em;
  transition: all 0.3s ease;
}

.esp-level-badge.level-green {
  background: rgba(0, 168, 89, 0.30);
  border: 1.5px solid #00A859;
  box-shadow: 0 0 14px rgba(0, 168, 89, 0.35);
  color: #4ade80;
}

.esp-level-badge.level-yellow {
  background: rgba(234, 184, 40, 0.30);
  border: 1.5px solid #EAB828;
  box-shadow: 0 0 14px rgba(234, 184, 40, 0.35);
  color: #fde047;
}

.esp-level-badge.level-orange {
  background: rgba(229, 145, 36, 0.30);
  border: 1.5px solid #E59124;
  box-shadow: 0 0 14px rgba(229, 145, 36, 0.35);
  color: #fb923c;
}

.esp-level-badge.level-red {
  background: rgba(195, 13, 14, 0.30);
  border: 1.5px solid #C30D0E;
  box-shadow: 0 0 14px rgba(195, 13, 14, 0.35);
  color: #f87171;
}

/* Migun Time Card */
.esp-migun-val-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 0;
  width: 100%;
}

.esp-migun-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* Admin Message Card */
.esp-message-card {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.esp-admin-message {
  font-size: 0.90rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 500;
  padding: 2px 0;
  overflow-y: auto;
  word-break: break-word;
}

#news-ticker {
  background: var(--glass-bg-dark);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  display: flex;
  align-items: center;
  height: 46px;
  overflow: hidden;
}

.ticker-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  background: rgba(255, 255, 255, 0.08);
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  height: 100%;
  white-space: nowrap;
  flex-shrink: 0;
  color: #ffffff;
  position: relative;
  z-index: 2;
}

.kan-news-logo {
  height: 22px;
  width: auto;
  display: block;
  color: #ffffff;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.35));
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff3300;
  box-shadow: 0 0 8px rgba(255, 51, 0, 0.7);
  animation: livePulse 1.5s ease-in-out infinite;
}

@keyframes livePulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.35;
    transform: scale(0.65);
  }
}

.ticker-track {
  flex: 1;
  overflow: hidden;
  height: 100%;
  display: flex;
  align-items: center;
  position: relative;
  direction: ltr;
}

.ticker-inner {
  display: flex;
  align-items: center;
  white-space: nowrap;
  width: max-content;
  flex-shrink: 0;
  animation: tickerScroll 75s linear infinite;
  font-size: 0.84rem;
  color: var(--text-secondary);
  will-change: transform;
}

.ticker-inner span {
  flex-shrink: 0;
  direction: rtl;
}

.ticker-sep {
  color: var(--accent-gold);
  margin: 0 20px;
  opacity: 0.7;
}

@keyframes tickerScroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* ==========================================================================
   Emergency Popup (#emergency-popup) — Compact 480px Floating Modal
   ========================================================================== */
#emergency-popup {
  display: none;
  position: fixed;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: min(480px, 88vw);
  background: rgba(165, 10, 10, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid rgba(255, 80, 80, 0.5);
  border-radius: 18px;
  box-shadow: 0 0 40px rgba(255, 0, 0, 0.35), 0 8px 32px rgba(0, 0, 0, 0.6);
  padding: 18px 24px;
  text-align: center;
  animation: popupIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#emergency-popup.visible {
  display: block;
}

@keyframes popupIn {
  from {
    opacity: 0;
    transform: translateX(-50%) scale(0.85) translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) scale(1) translateY(0);
  }
}

.ep-stripe {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 8px;
}

.ep-icon {
  font-size: 1.5rem;
  animation: flash 0.55s ease-in-out infinite alternate;
}

@keyframes flash {
  from {
    opacity: 1;
  }

  to {
    opacity: 0.35;
  }
}

.ep-title {
  font-size: 1.25rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.03em;
}

.ep-body {
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.90);
  line-height: 1.5;
}

.ep-dismiss {
  margin-top: 12px;
  display: inline-block;
  padding: 5px 18px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  font-family: inherit;
  background: transparent;
  transition: background 0.2s;
}

.ep-dismiss:hover {
  background: rgba(255, 255, 255, 0.15);
}