:root {
  --bg: #11161f;
  --panel: #1a212d;
  --panel-2: #232c3b;
  --text: #e7ecf3;
  --muted: #8a96a8;
  --accent: #4fb3ff;
  --ok: #3ccf7a;
  --warn: #f2b33d;
  --bad: #ff5a5a;
  --low: #f07a3a;
  --radius: 14px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font:
    15px/1.3 system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

body {
  display: flex;
  flex-direction: column;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom)
    env(safe-area-inset-left);
}

header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  min-height: 44px;
  flex-wrap: wrap;
}

.spacer {
  flex: 1;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--panel);
  font-size: 13px;
}
.pill i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bad);
}
.pill.ok i {
  background: var(--ok);
}

.badge {
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--warn);
  color: #1b1300;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.distance {
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  min-width: 4.5em;
  text-align: right;
}
.safety {
  font-size: 13px;
  color: var(--muted);
}
.safety[data-safety="slow"],
.safety[data-safety="blind"],
.safety[data-safety="stale"] {
  color: var(--warn);
}
.safety[data-safety="stop"],
.safety[data-safety="cliff"] {
  color: var(--bad);
  font-weight: 700;
}

/* Landscape (driving with both thumbs): pads left and right, the video as
   big as possible in the middle, the quick bar in one row underneath. */
main {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(0, 2.6fr) minmax(130px, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  grid-template-areas:
    "drive view head"
    "mode tools estop";
  gap: 8px 12px;
  padding: 0 12px 10px;
}
.drive-area {
  grid-area: drive;
}
.head-area {
  grid-area: head;
}
.view {
  grid-area: view;
}
.quick-mode {
  grid-area: mode;
  display: flex;
  align-items: center;
  min-width: 0;
}
.quick-tools {
  grid-area: tools;
  display: flex;
  justify-content: center;
  gap: 6px;
  min-width: 0;
}
.quick-estop {
  grid-area: estop;
  display: flex;
  align-items: center;
  min-width: 0;
}
.quick-mode select,
.quick-estop .estop {
  width: 100%;
}

.autonomy-mode {
  font: inherit;
  color: var(--text);
  background: var(--panel-2);
  border: 0;
  border-radius: 10px;
  padding: 0 10px;
  min-height: 48px;
  min-width: 0;
}

button.tool {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 52px;
  min-height: 48px;
  padding: 4px 6px;
  font-size: 11px;
  color: var(--muted);
}
button.tool svg {
  width: 22px;
  height: 22px;
  color: var(--text);
}
button.tool.on {
  background: #1f6f4a;
  color: #fff;
}
button.tool.on svg {
  color: #fff;
}

.pad-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
}

.pad {
  position: relative;
  width: min(100%, 220px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--panel-2) 0%, var(--panel) 70%);
  border: 2px solid #2d3849;
  touch-action: none;
}
.pad.active {
  border-color: var(--accent);
}
.pad .knob {
  position: absolute;
  inset: 30%;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  transition: transform 0.12s ease-out;
}
.pad.active .knob {
  transition: none;
}
.pad.head .knob {
  background: #b48cff;
}
.pad.head.active {
  border-color: #b48cff;
}

.pad-label {
  font-size: 12px;
  color: var(--muted);
}

.view {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  min-width: 0;
}

.video {
  position: relative;
  flex: 1;
  min-height: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.video img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
}
.video img.playing {
  opacity: 1;
}
.video-message {
  position: absolute;
  color: var(--muted);
  pointer-events: none;
}
.video img.playing + .video-message {
  display: none;
}
/* How evenly the pictures arrive (#31), small in the bottom right corner. */
.video-stats {
  position: absolute;
  right: 8px;
  bottom: 10px;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgb(0 0 0 / 55%);
  color: var(--muted);
  pointer-events: auto;
}
.video-stats.poor {
  color: #f2d48a;
}
.video-stats[hidden] {
  display: none;
}
/* The depth grid on the chassis (#34), 8 x 8 zones on the right, below the
   autonomy's state. */
.depth-grid {
  position: absolute;
  right: 8px;
  top: 44px;
  width: 64px;
  height: 64px;
  image-rendering: pixelated;
  border-radius: 6px;
  border: 1px solid rgb(255 255 255 / 25%);
  pointer-events: none;
}
.depth-grid.cliff {
  border-color: var(--bad);
}
.depth-grid[hidden] {
  display: none;
}

.distance-track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
}
.distance-bar {
  height: 100%;
  width: 100%;
  background: var(--ok);
  transition:
    width 0.15s,
    background 0.15s;
}
.distance-bar[data-safety="slow"],
.distance-bar[data-safety="blind"],
.distance-bar[data-safety="stale"] {
  background: var(--warn);
}
.distance-bar[data-safety="stop"],
.distance-bar[data-safety="cliff"] {
  background: var(--bad);
}

/* "Mehr": a sheet sliding in from the bottom. */
.sheet {
  margin: auto auto 0;
  width: min(560px, 100%);
  max-width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 8px 16px calc(16px + env(safe-area-inset-bottom));
  border: 0;
  border-radius: 18px 18px 0 0;
  background: var(--panel);
  color: var(--text);
  touch-action: pan-y;
}
.sheet[open] {
  animation: slide-up 0.18s ease-out;
}
@keyframes slide-up {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
}
.sheet::backdrop {
  background: rgba(0, 0, 0, 0.5);
}
.sheet-grip {
  width: 40px;
  height: 4px;
  margin: 4px auto 8px;
  border-radius: 2px;
  background: var(--panel-2);
}
.sheet h3 {
  margin: 12px 0 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.sheet-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sheet-row > * {
  flex: 1 1 120px;
}
.sheet .speed {
  margin: 4px 0 10px;
}
.sheet .close {
  background: var(--panel-2);
}
/* Flat screens: the groups side by side, so nothing needs scrolling. */
@media (orientation: landscape) and (max-height: 480px) {
  .sheet[open] {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
    width: min(760px, 100%);
    max-height: 92vh;
  }
  .sheet .sheet-grip {
    grid-column: 1 / -1;
  }
  .sheet h3 {
    margin-top: 6px;
  }
}

button {
  font: inherit;
  color: var(--text);
  background: var(--panel-2);
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  min-height: 44px;
  cursor: pointer;
}
button:active {
  filter: brightness(1.3);
}
a.button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--panel-2);
  color: var(--muted);
  text-decoration: none;
}
a.button[hidden] {
  display: none;
}

body.login-page {
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}
.login {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: min(320px, calc(100vw - 32px));
  padding: 24px;
  border-radius: 16px;
  background: var(--panel);
}
.login h1 {
  margin: 0 0 8px;
  font-size: 22px;
}
.login input {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid #2d3849;
  border-radius: 10px;
  padding: 10px 12px;
  user-select: text;
  -webkit-user-select: text;
}
.login button {
  width: 100%;
  background: #1f6f4a;
  color: #fff;
}
.login-error {
  margin: 0;
  color: #ffb0b0;
  font-size: 14px;
}

.speed {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 160px;
  font-size: 13px;
  color: var(--muted);
}
.speed input {
  flex: 1;
  accent-color: var(--accent);
}
.speed output {
  min-width: 3em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.estop {
  background: var(--bad);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 10px 12px;
  min-height: 48px;
}
.estop.engaged {
  background: var(--warn);
  color: #1b1300;
}

body.offline .pad,
body.estop .pad {
  opacity: 0.4;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--panel-2);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition:
    opacity 0.2s,
    transform 0.2s;
  pointer-events: none;
  max-width: calc(100% - 32px);
}
.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Claude ------------------------------------------------------------------ */

.ai-toggle {
  min-height: 32px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  background: var(--panel);
  color: var(--muted);
}
.ai-toggle.on {
  background: #6d4bd8;
  color: #fff;
}
.ai-toggle.unavailable {
  opacity: 0.5;
}
body.ai-busy .ai-toggle.on {
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse {
  50% {
    filter: brightness(1.5);
  }
}

.ai-bar {
  display: none;
}
body.ai-on .ai-bar {
  display: block;
}

.ai-form {
  display: flex;
  gap: 6px;
}
.ai-form input {
  flex: 1;
  min-width: 0;
  font: inherit;
  color: var(--text);
  background: var(--panel);
  border: 1px solid #2d3849;
  border-radius: 10px;
  padding: 8px 12px;
  user-select: text;
  -webkit-user-select: text;
  touch-action: auto;
}
.ai-form input:focus {
  outline: none;
  border-color: #8f6cff;
}
.ai-form button {
  padding: 8px 12px;
}
.ai-form .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  padding: 0;
}
.ai-form .icon.listening {
  background: var(--bad);
  animation: pulse 1s infinite;
}
.ai-form .ai-stop {
  background: var(--warn);
  color: #1b1300;
  font-weight: 700;
}
button:disabled {
  opacity: 0.5;
}

.ai-meta {
  display: none;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
}
body.ai-on .ai-meta {
  display: flex;
}
.ai-off-hint {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
body.ai-on .ai-off-hint {
  display: none;
}
.sim-row select,
.ai-meta select {
  font: inherit;
  color: var(--text);
  background: var(--panel-2);
  border: 0;
  border-radius: 10px;
  padding: 0 10px;
  min-height: 44px;
  flex: 1;
  max-width: 16em;
}
.sim-row select {
  max-width: none;
}
.update-row {
  align-items: center;
}
.update-row .hint {
  flex: 2 1 12em;
  margin: 0;
}
.ai-cost {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ai-log {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 14px;
  max-height: 60%;
  overflow: hidden;
  display: none;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
  pointer-events: none;
}
body.ai-on .ai-log {
  display: flex;
}
.ai-log .entry {
  flex-shrink: 0;
  max-width: 85%;
  padding: 5px 10px;
  border-radius: 10px;
  font-size: 13px;
  background: rgba(17, 22, 31, 0.78);
  backdrop-filter: blur(4px);
  animation: fade-in 0.2s ease-out;
}
.ai-log .entry.user {
  align-self: flex-end;
  background: rgba(79, 179, 255, 0.85);
  color: #04131f;
}
.ai-log .entry.text {
  border-left: 3px solid #8f6cff;
}
.ai-log .entry.tool,
.ai-log .entry.info {
  color: var(--muted);
  font-size: 12px;
  background: rgba(17, 22, 31, 0.55);
}
.ai-log .entry.error {
  color: #ffd0d0;
  background: rgba(120, 20, 20, 0.8);
}
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}

/* Local image recognition */
.vision-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.map-radar {
  position: absolute;
  top: 6px;
  left: 6px;
  /* As large as fits: 104 px, smaller when the video is flat (landscape). */
  height: min(104px, calc(100% - 12px));
  width: auto;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: rgba(17, 22, 31, 0.72);
  cursor: pointer;
}
.map-radar[hidden] {
  display: none;
}
.map-dialog {
  width: min(640px, calc(100vw - 32px));
}
.map-canvas {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 60vh;
  border-radius: 10px;
  background: var(--bg);
  margin: 8px 0;
}
.map-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.map-chooser {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
}
.map-chooser select {
  flex: 1;
  min-width: 0;
  font: inherit;
  color: var(--text);
  background: var(--panel-2);
  border: 0;
  border-radius: 10px;
  padding: 0 10px;
  min-height: 44px;
}
.map-chooser .icon {
  width: 44px;
  padding: 0;
}
.map-actions + .map-actions {
  margin-top: 8px;
}
.map-legend .wall {
  display: inline-block;
  width: 14px;
  height: 3px;
  border-radius: 2px;
  background: var(--text);
  vertical-align: middle;
}
.map-room-settings {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0 0;
  border: 1px solid var(--muted);
  border-radius: 8px;
  padding: 8px 12px;
}
.map-room-settings label {
  display: flex;
  align-items: center;
  gap: 6px;
}
.map-room-settings[hidden],
.map-actions[hidden],
.map-actions button[hidden],
.map-lost[hidden] {
  display: none;
}
.map-lost {
  position: absolute;
  left: 6px;
  top: calc(min(104px, 100% - 12px) + 12px);
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 0;
  background: #3a2f12;
  color: #f2d48a;
  cursor: pointer;
  backdrop-filter: blur(4px);
}
.map-actions button {
  flex: 1;
}
.map-legend .dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  vertical-align: middle;
}
.dot.ok {
  background: var(--ok);
}
.dot.accent {
  background: var(--accent);
}
.dot.muted {
  background: var(--muted);
}
.dot.warn {
  background: var(--warn);
}
.dot.low {
  background: var(--low);
}
.dot.bad {
  background: var(--bad);
}
.map-legend .ring {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1px solid var(--ok);
  vertical-align: middle;
}
button.toggle.on {
  background: #1f6f4a;
  color: #fff;
}
button.toggle.unavailable {
  opacity: 0.5;
}

/* Mood */
.mood {
  min-height: 32px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--panel);
  font-size: 18px;
  line-height: 1;
}
.mood.off {
  filter: grayscale(1);
  opacity: 0.45;
}

/* Autonomy (the selector itself is styled with the quick bar above) */
body.autonomous .autonomy-mode {
  background: #b8860b;
  color: #1b1300;
  font-weight: 700;
}
.autonomy-state {
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #3a2f12;
  color: #f2d48a;
  white-space: nowrap;
  max-width: 45vw;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Places */
.place {
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--panel);
  white-space: nowrap;
}
.place.unknown {
  color: var(--muted);
}
button.unavailable {
  opacity: 0.5;
}

.teach-dialog {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 16px;
  border: 0;
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}
.teach-dialog::backdrop {
  background: rgba(0, 0, 0, 0.55);
}
.teach-dialog h2 {
  margin: 0 0 6px;
  font-size: 18px;
}
.teach-dialog .hint {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--muted);
}
.teach-form {
  display: flex;
  gap: 8px;
}
.teach-form input {
  flex: 1;
  min-width: 0;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid #2d3849;
  border-radius: 10px;
  padding: 8px 12px;
  user-select: text;
  -webkit-user-select: text;
  touch-action: auto;
}
.teach-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 13px;
}
.teach-progress .track {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--bg);
  overflow: hidden;
}
.teach-progress .bar {
  height: 100%;
  width: 0;
  background: var(--ok);
  transition: width 0.3s;
}
.teach-list {
  list-style: none;
  margin: 12px 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 40vh;
  overflow-y: auto;
  touch-action: pan-y;
}
.teach-list li {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 6px 8px;
  border-radius: 10px;
  background: var(--panel-2);
}
.teach-list li.empty {
  color: var(--muted);
  background: none;
}
.teach-list .name {
  font-weight: 600;
}
.teach-list .views {
  font-size: 12px;
  color: var(--muted);
  margin-right: auto;
}
.teach-list button {
  min-height: 32px;
  padding: 4px 10px;
  font-size: 13px;
  background: var(--panel);
}
.teach-list button.danger {
  color: #ffb0b0;
}
.teach-dialog .close {
  width: 100%;
}
.memory-form {
  flex-wrap: wrap;
}
.memory-form input:first-child {
  flex-basis: 100%;
}
.teach-list .fact {
  flex-basis: 100%;
  font-weight: 400;
}
.diary-auto {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  margin-bottom: 10px;
}
.badge.guard {
  background: #6b2b2b;
  color: #fff;
}
.diary-auto input {
  width: 20px;
  height: 20px;
}
.diary-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.diary-pending {
  font-size: 13px;
  color: var(--muted);
}
.diary-list {
  max-height: 50vh;
}
.diary-text {
  flex-basis: 100%;
  margin: 2px 0 0;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
}

/* Briefly frames the video when a picture is sent to Claude. */
.ai-flash {
  position: absolute;
  inset: 0;
  border: 3px solid #8f6cff;
  border-radius: var(--radius);
  opacity: 0;
  pointer-events: none;
}
.ai-flash.on {
  animation: flash 0.8s ease-out;
}
@keyframes flash {
  15% {
    opacity: 1;
  }
}

/* Small screens: the coloured distance bar under the video already shows
   the safety state, so the text gives way to the status pills. */
@media (max-width: 900px) {
  .safety {
    display: none;
  }
  .autonomy-state {
    max-width: 32vw;
  }
}

/* Portrait phones: video on top, the quick bar in two rows, pads below. */
@media (orientation: portrait) {
  main {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: minmax(0, 1fr) auto auto auto;
    grid-template-areas:
      "view view"
      "mode estop"
      "tools tools"
      "drive head";
  }
  .quick-tools {
    justify-content: space-between;
  }
  .quick-tools .tool {
    flex: 1;
  }
  /* The picture is 4:3: no black bars, the room goes to the pads. */
  main {
    grid-template-rows: auto auto auto minmax(0, 1fr);
  }
  .video {
    flex: none;
    aspect-ratio: 4 / 3;
    max-height: 48vh;
  }
  .pad {
    width: min(100%, 44vw, 230px);
  }
}

.badge .short {
  display: none;
}

/* The autonomy state (e.g. the countdown when playing hide and seek) on the video. */
.video .autonomy-state {
  position: absolute;
  top: 8px;
  right: 8px;
  max-width: calc(100% - 130px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  backdrop-filter: blur(4px);
}

/* Small screens: shorter header. */
@media (max-width: 480px), (max-height: 480px) {
  .badge .long {
    display: none;
  }
  .badge .short {
    display: inline;
  }
  header {
    gap: 5px;
    padding: 6px 8px;
    min-height: 40px;
  }
  .pill .label {
    display: none;
  }
  .pill {
    padding: 6px;
  }
  .distance {
    font-size: 18px;
    min-width: 3.1em;
  }
  .pad-label {
    display: none;
  }
}
/* Very flat (landscape phones): smaller pads so the video gets the height. */
@media (orientation: landscape) and (max-height: 420px) {
  .pad {
    width: min(100%, 170px);
  }
}

/* Backups */
.backup-status {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

/* Battery in the top bar (docs/akku.md) */
.battery {
  font-size: 12px;
  padding: 3px 7px;
  border-radius: 999px;
  border: 0;
  min-height: 0;
  background: var(--panel);
  color: var(--text);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.battery[hidden] {
  display: none;
}
.battery[data-level="low"] {
  background: #3a2f12;
  color: #f2d48a;
}
.listen[data-on="true"] {
  background: #173a24;
  color: #a8f0c0;
}
.battery[data-level="empty"] {
  background: #4a1717;
  color: #ffb4b4;
}
@media (max-width: 480px) {
  .battery {
    padding: 3px 5px;
  }
  .mood {
    padding: 2px 6px;
  }
}

/* Log (docs/protokoll-dateien.md) */
.logs-dialog {
  width: min(900px, calc(100vw - 24px));
}
.logs-top {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
.logs-top select {
  flex: 1;
  min-width: 0;
  font: inherit;
  color: var(--text);
  background: var(--panel-2);
  border: 0;
  border-radius: 10px;
  padding: 0 10px;
  min-height: 44px;
}
.logs-lines {
  margin: 0;
  padding: 8px;
  max-height: 50vh;
  overflow: auto;
  background: var(--bg);
  border-radius: 10px;
  font-size: 11px;
  line-height: 1.35;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  user-select: text;
  -webkit-user-select: text;
}
.logs-files {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.logs-files .button {
  font-size: 13px;
  padding: 6px 10px;
}
