[hidden] { display: none !important; }

/* ============================================================
   Landsgemeinde 2026 – Mobile-first Styles
   ============================================================ */

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

:root {
  --red:    #e63946;
  --dark:   #1a1a2e;
  --mid:    #16213e;
  --light:  #e8e8e8;
  --muted:  #8888aa;
  --green:  #2dc653;
  --radius: 16px;
  --nav-h:  64px;
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--dark);
  color: var(--light);
  overflow: hidden;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100dvh; /* dynamic viewport height – handles mobile browser chrome */
}

/* ===== SCREENS ===== */
.screen {
  display: none;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.screen.active {
  display: flex;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 12px;
  background: var(--mid);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

header h1 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.status-badge {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(255,255,255,0.08);
  color: var(--muted);
  transition: background 0.3s, color 0.3s;
}

.status-badge.recording {
  background: var(--red);
  color: #fff;
  animation: pulse-badge 1.2s infinite;
}

.status-badge.sending {
  background: #f4a261;
  color: #fff;
}

.status-badge.ok {
  background: var(--green);
  color: #fff;
}

@keyframes pulse-badge {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}

/* ===== AUFNAHME SCREEN ===== */
.record-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding-bottom: var(--nav-h);
}

.btn-record {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 4px solid var(--red);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s, background 0.2s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.btn-record:active {
  transform: scale(0.93);
}

.btn-record.active {
  background: var(--red);
  animation: pulse-ring 1.4s infinite;
}

.rec-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--red);
  transition: border-radius 0.25s, width 0.25s, height 0.25s;
}

.btn-record.active .rec-icon {
  border-radius: 8px;
  width: 36px;
  height: 36px;
  background: #fff;
}

@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0   rgba(230,57,70,0.5); }
  70%  { box-shadow: 0 0 0 20px rgba(230,57,70,0); }
  100% { box-shadow: 0 0 0 0   rgba(230,57,70,0); }
}

#record-label {
  color: var(--muted);
  font-size: 0.95rem;
}

.timer {
  font-size: 2rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--red);
}

.upload-feedback {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #f4a261;
  font-size: 0.95rem;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(244,162,97,0.3);
  border-top-color: #f4a261;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.upload-success {
  color: var(--green);
  font-size: 1.1rem;
  font-weight: 600;
}

/* ===== TICKER SCREEN ===== */
.ticker-main {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0 var(--nav-h);
  -webkit-overflow-scrolling: touch;
}

.ticker-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.ticker-placeholder {
  text-align: center;
  color: var(--muted);
  padding: 40px 20px;
  font-size: 0.9rem;
}

.ticker-entry {
  background: var(--mid);
  padding: 14px 18px;
  border-left: 3px solid var(--red);
  animation: slide-in 0.3s ease;
}

.ticker-entry.new {
  border-left-color: var(--green);
}

@keyframes slide-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.entry-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 6px;
}

.entry-summary {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 4px;
}

.entry-transcript {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
}

.ticker-entry.expanded .entry-transcript {
  max-height: 300px;
}

.entry-toggle {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.72rem;
  cursor: pointer;
  padding: 4px 0 0;
  -webkit-tap-highlight-color: transparent;
}

/* ===== BOTTOM NAV ===== */
.bottom-nav {
  display: flex;
  height: var(--nav-h);
  background: var(--mid);
  border-top: 1px solid rgba(255,255,255,0.07);
  position: relative;
  z-index: 10;
}

.nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.7rem;
  cursor: pointer;
  transition: color 0.2s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.nav-btn.active {
  color: var(--red);
}

.nav-icon {
  font-size: 1.4rem;
  line-height: 1;
}

/* ===== SAFE AREA (iPhone Notch / Home Bar) ===== */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .bottom-nav {
    padding-bottom: env(safe-area-inset-bottom);
    height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  }
  header {
    padding-top: max(20px, env(safe-area-inset-top));
  }
}
