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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro', sans-serif;
  background: #0a0a0a;
  color: #e0e0e0;
  min-height: 100vh;
  overflow-x: hidden;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

.hidden { display: none !important; }

/* Header */
.header {
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #1a1a1a;
  position: sticky;
  top: 0;
  background: #0a0a0a;
  z-index: 20;
}
.header h1 { font-size: 18px; font-weight: 600; letter-spacing: -0.3px; }
.header-left { display: flex; align-items: center; gap: 8px; }
#backBtn {
  background: none;
  border: none;
  color: #4ade80;
  font-size: 14px;
  cursor: pointer;
  padding: 4px 8px;
}
.status {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 12px;
  background: #111;
  font-weight: 500;
}
.status.connected { color: #4ade80; border: 1px solid #166534; }
.status.disconnected { color: #f87171; border: 1px solid #7f1d1d; }

/* Camera */
.camera-container {
  width: 100%;
  aspect-ratio: 4/3;
  background: #111;
  position: relative;
  overflow: hidden;
}
.camera-container video,
.camera-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.stream-info {
  position: absolute;
  bottom: 8px;
  left: 8px;
  font-size: 10px;
  color: #4ade80;
  background: rgba(0,0,0,0.7);
  padding: 2px 8px;
  border-radius: 4px;
}

/* Setup */
.setup-section {
  padding: 16px;
  border-bottom: 1px solid #151515;
}
.setup-section label {
  font-size: 13px;
  color: #666;
  display: block;
  margin-bottom: 6px;
}
.setup-section input,
.setup-section select {
  width: 100%;
  padding: 10px 12px;
  background: #151515;
  border: 1px solid #282828;
  border-radius: 8px;
  color: #e0e0e0;
  font-size: 15px;
  outline: none;
}
.setup-section input:focus,
.setup-section select:focus {
  border-color: #4ade80;
}
.setup-section small {
  color: #555;
  margin-top: 4px;
  display: block;
  font-size: 12px;
}
.setup-row {
  display: flex;
  gap: 8px;
  padding: 16px;
}
.setup-btn {
  flex: 1;
  padding: 12px 16px;
  background: #151515;
  border: 1px solid #282828;
  border-radius: 10px;
  color: #e0e0e0;
  font-size: 14px;
  cursor: pointer;
  text-align: center;
  font-weight: 500;
}
.setup-btn.primary {
  background: #0a2a0a;
  border-color: #166534;
  color: #4ade80;
}

/* Category Tabs */
.cat-tabs {
  display: flex;
  gap: 6px;
  padding: 12px 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.cat-tab {
  padding: 6px 16px;
  background: #151515;
  border: 1px solid #282828;
  border-radius: 20px;
  color: #888;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  font-weight: 500;
}
.cat-tab.active {
  color: #4ade80;
  border-color: #166534;
  background: #0a1a0a;
}

/* Feature Cards Grid */
.feature-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 16px 16px;
}
.feature-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  background: #131313;
  border: 1px solid #222;
  border-radius: 12px;
  color: #e0e0e0;
  cursor: pointer;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
  text-align: left;
}
.feature-card:active {
  background: #1a1a1a;
  transform: scale(0.97);
}
.feature-card-icon {
  font-size: 13px;
  color: #4ade80;
  background: #0a1a0a;
  padding: 4px 8px;
  border-radius: 6px;
  display: inline-block;
  width: fit-content;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border: 1px solid #1a2a1a;
}
.feature-card-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.feature-card-name {
  font-size: 14px;
  font-weight: 600;
}
.feature-card-desc {
  font-size: 11px;
  color: #666;
}

/* Feature Panel (individual feature view) */
.feature-panel {
  padding: 16px;
  padding-bottom: 90px; /* space for voice FAB */
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.feature-panel h2 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
}
.feature-desc {
  font-size: 13px;
  color: #666;
}
.feature-note {
  font-size: 12px;
  color: #555;
  font-style: italic;
}

/* Action Buttons */
.action-btn {
  padding: 14px 20px;
  background: #0a2a0a;
  border: 1px solid #166534;
  border-radius: 10px;
  color: #4ade80;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}
.action-btn:active { transform: scale(0.97); }
.action-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.action-btn.secondary {
  background: #151515;
  border-color: #333;
  color: #ccc;
}
.action-btn.active {
  background: #166534;
  color: #fff;
}
.action-btn.processing {
  border-color: #facc15;
  color: #facc15;
  background: #1a1a0a;
}
.action-btn.recording {
  background: #3b0a0a;
  border-color: #dc2626;
  color: #f87171;
  animation: pulse-red 1.5s infinite;
}
@keyframes pulse-red {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.3); }
  50% { box-shadow: 0 0 0 8px rgba(220, 38, 38, 0); }
}

/* Duration Selector */
.duration-selector {
  display: flex;
  gap: 8px;
}
.dur-btn {
  flex: 1;
  padding: 10px;
  background: #151515;
  border: 1px solid #282828;
  border-radius: 8px;
  color: #888;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.dur-btn.active {
  color: #4ade80;
  border-color: #166534;
  background: #0a1a0a;
}

/* Record Dot */
.record-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #dc2626;
  margin-right: 6px;
}

/* Feature Status */
.feature-status {
  font-size: 13px;
  color: #666;
  min-height: 20px;
}
.feature-status.info { color: #60a5fa; }
.feature-status.success { color: #4ade80; }
.feature-status.error { color: #f87171; }

/* Result Card */
.result-card {
  padding: 14px;
  background: #111;
  border: 1px solid #282828;
  border-radius: 10px;
}
.result-card h3 {
  font-size: 13px;
  color: #4ade80;
  margin-bottom: 8px;
  font-weight: 600;
}
.result-card p, .result-card pre {
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  -webkit-user-select: text;
  user-select: text;
}

/* Context Box (Rizz Coach) */
.context-box {
  padding: 12px;
  background: #111;
  border: 1px solid #222;
  border-radius: 8px;
}
.context-label {
  font-size: 11px;
  color: #555;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.transcript {
  font-size: 13px;
  color: #aaa;
  white-space: pre-wrap;
  max-height: 120px;
  overflow-y: auto;
}
.transcript-interim {
  font-size: 13px;
  color: #4ade80;
  font-style: italic;
  margin-top: 4px;
  min-height: 18px;
}
.suggestion {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  line-height: 1.4;
}

/* Rizz Coach Prominent Result */
.result-card-prominent {
  padding: 20px;
  background: #0a1a0a;
  border: 2px solid #166534;
  border-radius: 14px;
}
.suggestion-label {
  font-size: 13px;
  color: #4ade80;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}
.suggestion-text {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  line-height: 1.4;
}

/* Babysitter Mode */
.babysitter-settings {
  display: flex;
  gap: 12px;
  align-items: center;
}
.babysitter-settings label {
  font-size: 13px;
  color: #888;
  display: flex;
  align-items: center;
  gap: 6px;
}
.babysitter-settings input,
.babysitter-settings select {
  padding: 6px 10px;
  background: #151515;
  border: 1px solid #282828;
  border-radius: 6px;
  color: #e0e0e0;
  font-size: 14px;
  width: 70px;
}
.bac-display {
  text-align: center;
  padding: 20px;
  background: #111;
  border-radius: 12px;
  border: 1px solid #222;
}
.bac-value {
  font-size: 36px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.bac-green { color: #4ade80; }
.bac-yellow { color: #facc15; }
.bac-red { color: #f87171; }
.bac-label { font-size: 13px; color: #888; margin-top: 4px; }
.drink-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.drink-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  background: #151515;
  border: 1px solid #282828;
  border-radius: 10px;
  color: #ccc;
  font-size: 12px;
  cursor: pointer;
}
.drink-btn:active { background: #1a1a1a; }
.drink-icon { font-size: 11px; font-weight: 600; color: #4ade80; }
.drink-count {
  font-size: 13px;
  color: #888;
  display: flex;
  align-items: center;
  gap: 12px;
}
.text-btn {
  background: none;
  border: none;
  color: #4ade80;
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
}

/* Captions Overlay */
.captions-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  text-align: center;
  z-index: 5;
}
.captions-overlay-enhanced {
  padding: 16px 20px;
  background: rgba(0, 0, 0, 0.85);
  line-height: 1.5;
  font-weight: 500;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  white-space: pre-wrap;
}
.captions-overlay.size-small { font-size: 16px; }
.captions-overlay.size-medium { font-size: 24px; }
.captions-overlay.size-large { font-size: 32px; }
.captions-size-selector {
  display: flex;
  gap: 8px;
}
.size-btn {
  padding: 8px 16px;
  background: #151515;
  border: 1px solid #282828;
  border-radius: 6px;
  color: #888;
  cursor: pointer;
}
.size-btn:nth-child(1) { font-size: 12px; }
.size-btn:nth-child(2) { font-size: 16px; }
.size-btn:nth-child(3) { font-size: 20px; }
.size-btn.active { color: #4ade80; border-color: #166534; }

/* Karaoke */
.karaoke-input {
  display: flex;
  gap: 8px;
}
.karaoke-input input {
  flex: 1;
  padding: 10px 12px;
  background: #151515;
  border: 1px solid #282828;
  border-radius: 8px;
  color: #e0e0e0;
  font-size: 15px;
  outline: none;
}
.quick-songs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.quick-song-btn {
  padding: 6px 12px;
  background: #151515;
  border: 1px solid #282828;
  border-radius: 20px;
  color: #aaa;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}
.quick-song-btn:active {
  background: #0a1a0a;
  border-color: #166534;
  color: #4ade80;
}
.lyrics-display {
  max-height: 400px;
  overflow-y: auto;
  padding: 16px;
  background: #111;
  border-radius: 10px;
  border: 1px solid #222;
}
.lyrics-display-large {
  max-height: 60vh;
  padding: 24px;
}
.lyric-line {
  padding: 6px 0;
  color: #555;
  font-size: 16px;
  transition: all 0.3s;
}
.lyrics-display-large .lyric-line {
  font-size: 20px;
  padding: 8px 0;
  line-height: 1.5;
}
.lyric-line.active {
  color: #4ade80;
  font-size: 20px;
  font-weight: 600;
}
.lyrics-display-large .lyric-line.active {
  font-size: 28px;
  font-weight: 700;
}
.lyrics-controls {
  display: flex;
  justify-content: center;
  gap: 16px;
}
.control-btn {
  padding: 8px 20px;
  background: #151515;
  border: 1px solid #282828;
  border-radius: 8px;
  color: #ccc;
  font-size: 13px;
  cursor: pointer;
}
.scroll-speed-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #888;
}
.speed-btn {
  padding: 6px 14px;
  background: #151515;
  border: 1px solid #282828;
  border-radius: 20px;
  color: #888;
  font-size: 13px;
  cursor: pointer;
}
.speed-btn.active {
  color: #4ade80;
  border-color: #166534;
  background: #0a1a0a;
}

/* Insider Options */
.insider-options {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.category-btn {
  padding: 6px 14px;
  background: #151515;
  border: 1px solid #282828;
  border-radius: 20px;
  color: #888;
  font-size: 12px;
  cursor: pointer;
}
.category-btn.active {
  color: #4ade80;
  border-color: #166534;
  background: #0a1a0a;
}
.insider-result, .menu-result {
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
}

/* Teleprompter */
.prompter-input {
  width: 100%;
  padding: 12px;
  background: #151515;
  border: 1px solid #282828;
  border-radius: 8px;
  color: #e0e0e0;
  font-size: 15px;
  resize: vertical;
  font-family: inherit;
  outline: none;
}
.prompter-input:focus { border-color: #4ade80; }
.prompter-controls {
  display: flex;
  gap: 16px;
  align-items: center;
}
.prompter-controls label {
  font-size: 13px;
  color: #888;
  display: flex;
  align-items: center;
  gap: 8px;
}
.prompter-controls input[type="range"] {
  width: 100px;
}
.prompter-controls select {
  padding: 6px 10px;
  background: #151515;
  border: 1px solid #282828;
  border-radius: 6px;
  color: #e0e0e0;
  font-size: 13px;
}
.prompter-buttons { display: flex; gap: 8px; }
#prompterOverlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 100;
  display: flex;
  flex-direction: column;
}
.prompter-scroll-container {
  flex: 1;
  overflow: hidden;
  padding: 40px 24px;
}
.prompter-scroll-text {
  color: #fff;
  line-height: 1.8;
  transition: transform 0.05s linear;
}
.prompter-scroll-text p { margin-bottom: 16px; }
.prompter-overlay-controls {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 16px;
}
.overlay-btn {
  padding: 10px 24px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}

/* Star Map Canvas */
.star-map-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  pointer-events: none;
}

/* Chess */
.chess-fen { font-size: 11px; color: #555; font-family: monospace; }
.chess-turn { font-size: 13px; color: #888; margin-bottom: 8px; }

/* Receipt History */
.receipt-history { margin-top: 8px; }
.receipt-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.receipt-header h3 { font-size: 14px; font-weight: 600; }
.receipt-item {
  padding: 10px 12px;
  background: #111;
  border: 1px solid #1a1a1a;
  border-radius: 8px;
  margin-bottom: 6px;
}
.receipt-merchant { font-size: 14px; font-weight: 600; }
.receipt-meta { font-size: 12px; color: #666; margin-top: 2px; }
.receipt-detail div { margin-bottom: 4px; font-size: 14px; }
.empty-state { font-size: 13px; color: #444; }

/* OpenClaw Terminal */
.openclaw-mode-selector {
  display: flex;
  gap: 6px;
}
.openclaw-terminal {
  background: #0d0d0d;
  border: 1px solid #222;
  border-radius: 10px;
  overflow: hidden;
}
.terminal-output {
  padding: 12px;
  max-height: 300px;
  overflow-y: auto;
  font-family: 'SF Mono', 'Menlo', 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.6;
}
.term-line { padding: 2px 0; }
.term-line.user { color: #4ade80; }
.term-line.assistant { color: #e0e0e0; white-space: pre-wrap; }
.term-line.system { color: #555; font-style: italic; }
.term-line.error { color: #f87171; }
.terminal-input-row {
  display: flex;
  gap: 6px;
}
.terminal-input-row input {
  flex: 1;
  padding: 10px 12px;
  background: #151515;
  border: 1px solid #282828;
  border-radius: 8px;
  color: #4ade80;
  font-size: 14px;
  font-family: 'SF Mono', 'Menlo', monospace;
  outline: none;
}
.terminal-input-row input:focus { border-color: #4ade80; }
.openclaw-quick-commands {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* Terminal Viewer (Remote) */
.terminal-viewer {
  background: #0a0a0a;
  border: 1px solid #222;
  border-radius: 10px;
  overflow: hidden;
}
.terminal-screen {
  padding: 10px;
  font-family: 'SF Mono', 'Menlo', 'Courier New', monospace;
  font-size: 11px;
  line-height: 1.4;
  color: #ccc;
  max-height: 350px;
  overflow-y: auto;
  white-space: pre;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0;
}
.terminal-quick-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.quick-action {
  padding: 10px 16px;
  background: #151515;
  border: 1px solid #282828;
  border-radius: 8px;
  color: #ccc;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.quick-action:active { background: #1a1a1a; }
.quick-action.approve-btn {
  background: #0a2a0a;
  border-color: #166534;
  color: #4ade80;
  flex: 1;
}
.quick-action.deny-btn {
  background: #2a0a0a;
  border-color: #7f1d1d;
  color: #f87171;
  flex: 1;
}
code {
  background: #1a1a1a;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 12px;
  color: #4ade80;
}

/* Live Translation */
.translate-lang-selectors {
  display: flex;
  gap: 12px;
}
.lang-selector-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.lang-selector-group label {
  font-size: 12px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.lang-selector-group select {
  padding: 10px 12px;
  background: #151515;
  border: 1px solid #282828;
  border-radius: 8px;
  color: #e0e0e0;
  font-size: 15px;
  outline: none;
}
.lang-selector-group select:focus {
  border-color: #4ade80;
}
.translation-display-prominent {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  background: #111;
  border: 1px solid #222;
  border-radius: 12px;
  text-align: center;
}
.translation-source-text {
  font-size: 14px;
  color: #888;
  line-height: 1.4;
}
.translation-main-result {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  min-height: 32px;
}
.translation-display {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #111;
  border: 1px solid #222;
  border-radius: 10px;
}
.translation-original {
  flex: 1;
  font-size: 14px;
  color: #aaa;
}
.translation-arrow {
  color: #4ade80;
  font-weight: 600;
}
.translation-result {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

/* Navigation */
.nav-input {
  display: flex;
  gap: 8px;
}
.nav-input input {
  flex: 1;
  padding: 10px 12px;
  background: #151515;
  border: 1px solid #282828;
  border-radius: 8px;
  color: #e0e0e0;
  font-size: 15px;
  outline: none;
}
.nav-input input:focus { border-color: #4ade80; }
.nav-quick-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.nav-step {
  padding: 20px;
  background: #0a2a0a;
  border: 1px solid #166534;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 600;
  color: #4ade80;
  text-align: center;
  cursor: pointer;
}
.nav-step::after {
  content: ' (tap for next step)';
  font-size: 11px;
  font-weight: 400;
  color: #555;
  display: block;
  margin-top: 4px;
}

/* Notifications */
.notif-settings {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toggle-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #ccc;
  cursor: pointer;
}
.toggle-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #4ade80;
}
.notif-test { margin-top: 4px; }

/* Video Recording */
.video-status { text-align: center; padding: 12px; }
.rec-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 24px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #555;
}
.rec-indicator.active {
  color: #f87171;
}
.rec-indicator.active .record-dot {
  animation: blink 1s infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Networking Mode */
.network-add {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: #111;
  border: 1px solid #222;
  border-radius: 10px;
}
.network-add input {
  padding: 10px 12px;
  background: #151515;
  border: 1px solid #282828;
  border-radius: 8px;
  color: #e0e0e0;
  font-size: 14px;
  outline: none;
}
.network-add input:focus { border-color: #4ade80; }
.match-result { color: #facc15; margin-top: 8px; font-size: 13px; }

/* Log */
.log {
  margin: 0 16px 16px;
  padding: 10px;
  background: #0d0d0d;
  border: 1px solid #1a1a1a;
  border-radius: 8px;
  font-family: 'SF Mono', 'Menlo', monospace;
  font-size: 11px;
  max-height: 150px;
  overflow-y: auto;
}
.log-entry { padding: 1px 0; color: #555; }
.log-entry.success { color: #4ade80; }
.log-entry.error { color: #f87171; }
.log-entry.info { color: #60a5fa; }

/* Voice FAB */
.voice-fab {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #151515;
  border: 2px solid #333;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: #888;
  cursor: pointer;
  z-index: 50;
  -webkit-tap-highlight-color: transparent;
}
.voice-fab.listening {
  border-color: #4ade80;
  color: #4ade80;
  background: #0a1a0a;
  animation: pulse-green 1.5s infinite;
}
@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74,222,128,0.4); }
  50% { box-shadow: 0 0 0 12px rgba(74,222,128,0); }
}

/* ===== Babysitter Mode: Large BAC Display ===== */
.bac-value-big {
  font-size: 64px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -1px;
  line-height: 1;
}
.drink-icon-large {
  font-size: 28px;
  line-height: 1;
  display: block;
}
.ride-buttons {
  display: flex;
  gap: 8px;
}
.ride-btn {
  flex: 1;
}

/* ===== Navigation: Maps Primary Button ===== */
.maps-primary-btn {
  display: block;
  width: 100%;
  padding: 16px 20px;
  background: #0a2a0a;
  border: 2px solid #166534;
  border-radius: 12px;
  color: #4ade80;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  transition: all 0.15s;
}
.maps-primary-btn:active {
  transform: scale(0.97);
  background: #166534;
  color: #fff;
}
.nav-context-line {
  font-size: 14px;
  line-height: 1.6;
  color: #ccc;
  margin-bottom: 6px;
}

/* ===== Local Insider: Recommendation Cards ===== */
.recommendation-card {
  padding: 14px;
  background: #111;
  border: 1px solid #222;
  border-radius: 10px;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rec-name {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}
.rec-distance {
  font-size: 12px;
  color: #888;
}
.rec-description {
  font-size: 13px;
  color: #bbb;
  line-height: 1.5;
}
.rec-maps-link {
  display: inline-block;
  padding: 6px 14px;
  background: #0a1a0a;
  border: 1px solid #166534;
  border-radius: 6px;
  color: #4ade80;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  width: fit-content;
  margin-top: 4px;
}
.rec-maps-link:active {
  background: #166534;
  color: #fff;
}

/* ===== Notifications: Improved Layout ===== */
.notif-perm-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.notif-test-row {
  display: flex;
  gap: 8px;
}
.notif-test-row input {
  flex: 1;
  padding: 10px 12px;
  background: #151515;
  border: 1px solid #282828;
  border-radius: 8px;
  color: #e0e0e0;
  font-size: 14px;
  outline: none;
}
.notif-test-row input:focus { border-color: #4ade80; }
.notif-native-note {
  padding: 12px;
  background: #111;
  border: 1px solid #222;
  border-radius: 8px;
}
.notif-native-note h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #ccc;
}

/* ===== Teleprompter: Enhanced Overlay ===== */
#prompterOverlay {
  background: rgba(0, 0, 0, 0.92);
}
.prompter-scroll-container {
  padding: 60px 28px 40px;
}
.prompter-scroll-text {
  color: #fff;
  line-height: 2;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  font-weight: 500;
}
.prompter-overlay-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.8);
  flex-wrap: wrap;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.overlay-control-group {
  display: flex;
  align-items: center;
  gap: 6px;
}
.overlay-label {
  font-size: 12px;
  color: #aaa;
  white-space: nowrap;
}
.overlay-slider {
  width: 80px;
  accent-color: #4ade80;
}
.overlay-select {
  padding: 4px 8px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  color: #fff;
  font-size: 13px;
}
.overlay-btn-close {
  background: rgba(248, 113, 113, 0.15);
  border-color: rgba(248, 113, 113, 0.3);
  color: #f87171;
}
.overlay-stats {
  font-size: 11px;
  color: #666;
  white-space: nowrap;
}
.prompter-stats {
  font-size: 12px;
  color: #666;
  min-height: 16px;
}

/* ===== Memory Journal: Search-First Layout ===== */
.journal-search {
  display: flex;
  gap: 8px;
}
.journal-search input {
  flex: 1;
  padding: 10px 12px;
  background: #151515;
  border: 1px solid #282828;
  border-radius: 8px;
  color: #e0e0e0;
  font-size: 15px;
  outline: none;
}
.journal-search input:focus { border-color: #4ade80; }
.journal-record-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.journal-storage-note {
  font-size: 11px;
  color: #555;
  margin-bottom: 4px;
}

/* ===== Star Map: Fullscreen Fallback ===== */
.star-map-canvas-fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 50;
  background: #000010;
}

/* ===== Terminal Link: Large Terminal + Big Approve/Deny ===== */
.terminal-viewer-large {
  background: #0a0a0a;
  border: 1px solid #222;
  border-radius: 10px;
  overflow: hidden;
}
.terminal-screen-large {
  padding: 10px;
  font-family: 'SF Mono', 'Menlo', 'Courier New', monospace;
  font-size: 11px;
  line-height: 1.4;
  color: #ccc;
  min-height: 50vh;
  max-height: 65vh;
  overflow-y: auto;
  white-space: pre;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0;
}
.terminal-approve-deny {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}
.approve-deny-btn {
  flex: 1;
  padding: 20px 24px;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
  border: 2px solid;
}
.approve-deny-btn:active { transform: scale(0.96); }
.approve-btn-large {
  background: #0a2a0a;
  border-color: #166534;
  color: #4ade80;
}
.approve-btn-large:active {
  background: #166534;
  color: #fff;
}
.deny-btn-large {
  background: #2a0a0a;
  border-color: #7f1d1d;
  color: #f87171;
}
.deny-btn-large:active {
  background: #7f1d1d;
  color: #fff;
}

/* Ring Dashboard */
.ring-connect-section {
  display: flex;
  gap: 10px;
}
.ring-card {
  flex: 1;
  padding: 14px;
  background: #131313;
  border: 1px solid #222;
  border-radius: 12px;
}
.ring-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.ring-label {
  font-weight: 600;
  font-size: 14px;
}
.ring-status {
  font-size: 11px;
  color: #666;
}
.ring-hr-section {
  padding: 16px 0;
}
.ring-hr-section h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
}
.ring-hr-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 12px;
}
.ring-hr-person {
  text-align: center;
}
.ring-hr-label {
  font-size: 12px;
  color: #888;
  margin-bottom: 4px;
}
.ring-hr-value {
  font-size: 48px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.ring-hr-person:first-child .ring-hr-value {
  color: #4ade80;
}
.ring-hr-person:last-child .ring-hr-value {
  color: #f472b6;
}
.ring-hr-unit {
  font-size: 11px;
  color: #555;
  margin-top: 2px;
}
.ring-hr-sync {
  font-size: 12px;
  color: #555;
  min-width: 60px;
  text-align: center;
}
.ring-hr-sync.sync-close {
  color: #4ade80;
  font-weight: 600;
}
.ring-hr-sync.sync-medium {
  color: #facc15;
}
.ring-chart {
  width: 100%;
  height: 120px;
  background: rgba(0,0,0,0.3);
  border-radius: 10px;
}
.ring-stats-section h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
}
.ring-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.ring-stat-card {
  padding: 12px;
  background: #131313;
  border: 1px solid #1a1a1a;
  border-radius: 10px;
  text-align: center;
}
.ring-stat-label {
  font-size: 11px;
  color: #666;
  margin-bottom: 4px;
}
.ring-stat-value {
  font-size: 22px;
  font-weight: 700;
  color: #e0e0e0;
  font-variant-numeric: tabular-nums;
}
.ring-history-section {
  padding: 12px 0;
}
.ring-history-section h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
}
.ring-history-card {
  padding: 12px;
  background: #111;
  border: 1px solid #1a1a1a;
  border-radius: 10px;
  margin-bottom: 8px;
}
.ring-history-title {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 6px;
}
.ring-history-stats {
  font-size: 12px;
  color: #888;
  margin-bottom: 8px;
}
.ring-sparkline {
  width: 100%;
  height: 50px;
  border-radius: 6px;
}
