:root {
  /* Default Primary Theme Colors (Blue - 1. Farbe bleibt Standard) */
  --md-sys-color-primary: #005ac1;               
  --md-sys-color-primary-hover: #004494;         
  --md-sys-color-primary-container: #d8e2ff;     
  --md-sys-color-on-primary-container: #001a41;  

  /* Blau-Hauch für Hintergründe & Inputs */
  --md-sys-color-background: #f4f7fc;
  --md-sys-color-surface: #ffffff;
  --md-sys-color-surface-container: #ffffff;
  --md-sys-color-input-bg: #e8eef8;
  --md-sys-color-on-surface: #1d1b20;
  --md-sys-color-on-surface-variant: #44474f;
  --md-sys-color-border: rgba(68, 71, 79, 0.15);
  --md-sys-color-error-container: #ffdad6;
  --md-sys-color-on-error-container: #d32f2f;
  --md-sys-color-error-text: #d32f2f;
  --md-shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.04);
  --md-shadow-hover: 0 8px 28px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.06);
  --font-android-round: 'Comfortaa', cursive, system-ui, -apple-system, sans-serif;
  --base-font-size: 16px;
  --num-btn-height: 52px;
  --main-btn-padding: 18px 24px;
}

/* ---------------- COLOR PALETTES ---------------- */
/* Light Mode Presets */

/* 2. Farbe: GRÜN */
[data-color-theme="green"] {
  --md-sys-color-primary: #2e6c31;
  --md-sys-color-primary-hover: #1f5123;
  --md-sys-color-primary-container: #b1f5b0;
  --md-sys-color-on-primary-container: #002105;
  --md-sys-color-background: #f3f8f3;
  --md-sys-color-input-bg: #e3f2e4;
}

/* 3. Farbe: LILA */
[data-color-theme="purple"] {
  --md-sys-color-primary: #6b4ea2;
  --md-sys-color-primary-hover: #523788;
  --md-sys-color-primary-container: #ebdcfd;
  --md-sys-color-on-primary-container: #26095a;
  --md-sys-color-background: #f7f4fa;
  --md-sys-color-input-bg: #eee7f7;
}

/* 4. Farbe: GELB */
[data-color-theme="yellow"] {
  --md-sys-color-primary: #b88600;
  --md-sys-color-primary-hover: #8f6700;
  --md-sys-color-primary-container: #ffdf9e;
  --md-sys-color-on-primary-container: #261a00;
  --md-sys-color-background: #faf8f0;
  --md-sys-color-input-bg: #f5eed8;
}

/* 5. Farbe: PINK */
[data-color-theme="pink"] {
  --md-sys-color-primary: #b81d6f;
  --md-sys-color-primary-hover: #930856;
  --md-sys-color-primary-container: #ffd8e4;
  --md-sys-color-on-primary-container: #3e0021;
  --md-sys-color-background: #faf3f6;
  --md-sys-color-input-bg: #f7e2eb;
}


/* Dark Mode Presets (Standard / Original Blau-Basis) */
[data-theme="dark"] {
  --md-sys-color-background: #111318;
  --md-sys-color-surface: #1e2025;
  --md-sys-color-surface-container: #1e2025;
  --md-sys-color-input-bg: #282a30;
  --md-sys-color-primary: #adc6ff;
  --md-sys-color-primary-hover: #80a8ff;
  --md-sys-color-primary-container: #004494;
  --md-sys-color-on-primary-container: #d8e2ff;
  --md-sys-color-on-surface: #e2e2e9;
  --md-sys-color-on-surface-variant: #c4c6d0;
  --md-sys-color-border: rgba(196, 198, 208, 0.15);
  --md-sys-color-error-container: #3d1416;
  --md-sys-color-on-error-container: #ffffff;
  --md-sys-color-error-text: #ffb4ab;
  --md-shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.3), 0 1px 4px rgba(0, 0, 0, 0.2);
  --md-shadow-hover: 0 8px 28px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* 2. Farbe: GRÜN (Dark Mode) - Grautöne vom Original übernommen */
[data-theme="dark"][data-color-theme="green"] {
  --md-sys-color-primary: #96d996;
  --md-sys-color-primary-hover: #7cbd7c;
  --md-sys-color-primary-container: #1f5123;
  --md-sys-color-on-primary-container: #b1f5b0;
  --md-sys-color-background: #111318;
  --md-sys-color-input-bg: #282a30;
}

/* 3. Farbe: LILA (Dark Mode) - Grautöne vom Original übernommen */
[data-theme="dark"][data-color-theme="purple"] {
  --md-sys-color-primary: #d5bbfb;
  --md-sys-color-primary-hover: #b993f3;
  --md-sys-color-primary-container: #523788;
  --md-sys-color-on-primary-container: #ebdcfd;
  --md-sys-color-background: #111318;
  --md-sys-color-input-bg: #282a30;
}

/* 4. Farbe: GELB (Dark Mode) - Grautöne vom Original übernommen */
[data-theme="dark"][data-color-theme="yellow"] {
  --md-sys-color-primary: #ffcd56;
  --md-sys-color-primary-hover: #e5b33c;
  --md-sys-color-primary-container: #5c4300;
  --md-sys-color-on-primary-container: #ffdf9e;
  --md-sys-color-background: #111318;
  --md-sys-color-input-bg: #282a30;
}

/* 5. Farbe: PINK (Dark Mode) - Grautöne vom Original übernommen */
[data-theme="dark"][data-color-theme="pink"] {
  --md-sys-color-primary: #ffb1c7;
  --md-sys-color-primary-hover: #f783a7;
  --md-sys-color-primary-container: #930856;
  --md-sys-color-on-primary-container: #ffd8e4;
  --md-sys-color-background: #111318;
  --md-sys-color-input-bg: #282a30;
}

/* OLED Black Mode Presets */
[data-theme="black"] {
  --md-sys-color-background: #000000;
  --md-sys-color-surface: #121212;
  --md-sys-color-surface-container: #121212;
  --md-sys-color-input-bg: #1e1e1e;
  --md-sys-color-primary: #ffffff;
  --md-sys-color-primary-hover: #e0e0e0;
  --md-sys-color-primary-container: #ffffff;
  --md-sys-color-on-primary-container: #000000;
  --md-sys-color-on-surface: #ffffff;
  --md-sys-color-on-surface-variant: #d0d0d0;
  --md-sys-color-border: rgba(255, 255, 255, 0.2);
  --md-sys-color-error-container: #3d1416;
  --md-sys-color-on-error-container: #ffffff;
  --md-sys-color-error-text: #ff8e83;
  --md-shadow-soft: 0 4px 20px rgba(255, 255, 255, 0.05), 0 1px 4px rgba(255, 255, 255, 0.03);
  --md-shadow-hover: 0 8px 28px rgba(255, 255, 255, 0.12), 0 2px 8px rgba(255, 255, 255, 0.08);
}

/* 2. Farbe: GRÜN (OLED Mode) */
[data-theme="black"][data-color-theme="green"] {
  --md-sys-color-primary: #96d996;
  --md-sys-color-primary-hover: #7cbd7c;
  --md-sys-color-primary-container: #96d996;
  --md-sys-color-on-primary-container: #000000;
}

/* 3. Farbe: LILA (OLED Mode) */
[data-theme="black"][data-color-theme="purple"] {
  --md-sys-color-primary: #d5bbfb;
  --md-sys-color-primary-hover: #b993f3;
  --md-sys-color-primary-container: #d5bbfb;
  --md-sys-color-on-primary-container: #000000;
}

/* 4. Farbe: GELB (OLED Mode) */
[data-theme="black"][data-color-theme="yellow"] {
  --md-sys-color-primary: #ffcd56;
  --md-sys-color-primary-hover: #eabc4e;
  --md-sys-color-primary-container: #ffcd56;
  --md-sys-color-on-primary-container: #000000;
}

/* 5. Farbe: PINK (OLED Mode) */
[data-theme="black"][data-color-theme="pink"] {
  --md-sys-color-primary: #ffb1c7;
  --md-sys-color-primary-hover: #f783a7;
  --md-sys-color-primary-container: #ffb1c7;
  --md-sys-color-on-primary-container: #000000;
}

/* Color Picker Swatches */
.color-swatch.blue   { background-color: #005ac1; } /* Original (Blau) */
.color-swatch.green  { background-color: #2e6c31; } /* Grün */
.color-swatch.purple { background-color: #6b4ea2; } /* Lila */
.color-swatch.yellow { background-color: #b88600; } /* Gelb */
.color-swatch.pink   { background-color: #b81d6f; } /* Pink */

[data-font-size="large"] { --base-font-size: 19px; }

[data-large-buttons="true"] {
  --num-btn-height: 64px;
  --main-btn-padding: 22px 28px;
}

[data-high-contrast="true"] {
  --md-sys-color-border: #000000;
  --md-sys-color-on-surface: #000000;
  --md-sys-color-on-surface-variant: #000000;
  --md-sys-color-input-bg: #e2e8f0;
}

[data-theme="dark"][data-high-contrast="true"],
[data-theme="black"][data-high-contrast="true"] {
  --md-sys-color-border: #ffffff;
  --md-sys-color-on-surface: #ffffff;
  --md-sys-color-on-surface-variant: #ffffff;
  --md-sys-color-input-bg: #2d3748;
}

[data-high-contrast="true"] .icon-btn,
[data-high-contrast="true"] .einstellungen-card,
[data-high-contrast="true"] .person-karte,
[data-high-contrast="true"] .modal-card,
[data-high-contrast="true"] .tools-modal-card,
[data-high-contrast="true"] .pin-card,
[data-high-contrast="true"] .num-btn,
[data-high-contrast="true"] .main-btn,
[data-high-contrast="true"] .task-checkbox-btn,
[data-high-contrast="true"] .counter-action-btn,
[data-high-contrast="true"] .live-stopwatch-btn,
[data-high-contrast="true"] .color-swatch {
  border: 2px solid var(--md-sys-color-border) !important;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  touch-action: manipulation;
}

html {
  font-size: var(--base-font-size);
  transition: font-size 0.2s ease;
  touch-action: manipulation;
}

body {
  font-family: var(--font-android-round);
  background-color: var(--md-sys-color-background);
  color: var(--md-sys-color-on-surface);
  padding: 24px 16px;
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  touch-action: manipulation;
}

button, input, a, .num-btn, .counter-action-btn, .stepper-btn, .task-checkbox-btn {
  touch-action: manipulation;
}

body.eye-protection::after {
  content: "";
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(255, 170, 0, 0.12);
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: multiply;
}

.container { max-width: 900px; margin: 0 auto; position: relative; }
.hidden { display: none !important; }
.header-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.header-actions { display: flex; align-items: center; gap: 10px; }

h1 { font-family: var(--font-android-round); color: var(--md-sys-color-on-surface); font-size: 2.1rem; font-weight: 700; letter-spacing: -0.5px; flex-grow: 1; text-align: center; }
.icon-btn {
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  border: none; width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; border-radius: 20px; corner-shape: superellipse;
  box-shadow: var(--md-shadow-soft); transition: all 0.2s ease;
}
.icon-btn:hover { box-shadow: var(--md-shadow-hover); transform: translateY(-2px); }
.icon-btn:active { transform: scale(0.92); }

.live-stopwatch-btn {
  background-color: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  border: none;
  padding: 0 16px;
  height: 48px;
  width: 110px;
  border-radius: 20px;
  corner-shape: superellipse;
  font-family: var(--font-android-round);
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: var(--md-shadow-soft);
  transition: all 0.2s ease;
  font-variant-numeric: tabular-nums;
}
.live-stopwatch-btn:hover { box-shadow: var(--md-shadow-hover); transform: translateY(-2px); }
.live-stopwatch-btn:active { transform: scale(0.95); }

.einstellungen-card {
  background: var(--md-sys-color-surface); padding: 28px; margin-bottom: 32px;
  box-shadow: var(--md-shadow-soft); border: none; border-radius: 36px; corner-shape: superellipse;
  transition: opacity 0.2s ease;
}
.einstellungen-card.disabled {
  opacity: 0.6;
  pointer-events: none;
}

.input-group { display: flex; flex-direction: column; margin-bottom: 20px; }
.input-group label { font-family: var(--font-android-round); font-weight: 700; margin-bottom: 8px; color: var(--md-sys-color-on-surface-variant); font-size: 0.9rem; white-space: pre-wrap; }

.number-stepper-wrapper { position: relative; width: 100%; display: flex; align-items: center; }
input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; }
.number-stepper-wrapper input {
  font-family: var(--font-android-round); width: 100%; padding: 14px 105px 14px 16px;
  background-color: var(--md-sys-color-input-bg); border: 1.5px solid transparent;
  border-radius: 20px; corner-shape: superellipse; font-size: 1rem; font-weight: 600;
  color: var(--md-sys-color-on-surface); outline: none; transition: all 0.2s ease;
}

.standard-input {
  font-family: var(--font-android-round); width: 100%; padding: 14px 16px;
  background-color: var(--md-sys-color-input-bg); border: 1.5px solid transparent;
  border-radius: 20px; corner-shape: superellipse; font-size: 1rem; font-weight: 600;
  color: var(--md-sys-color-on-surface); outline: none; transition: all 0.2s ease;
}

.range-input-container {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}
.range-input-container .standard-input {
  flex: 1;
  text-align: center;
}
.range-separator {
  font-weight: 700;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 0.95rem;
}

.stepper-pill-floating { position: absolute; right: 8px; display: flex; align-items: center; gap: 4px; background: transparent; user-select: none; }

.stepper-btn {
  background: var(--md-sys-color-surface); border: none; width: 34px; height: 32px;
  display: flex; align-items: center; justify-content: center; color: var(--md-sys-color-primary);
  cursor: pointer; box-shadow: var(--md-shadow-soft); padding: 0; corner-shape: superellipse;
  transition: all 0.2s ease;
}
.stepper-btn .material-symbols-rounded { font-size: 22px; line-height: 1; }
.stepper-btn:hover { background-color: var(--md-sys-color-input-bg); box-shadow: var(--md-shadow-hover); }
.stepper-btn:active { transform: scale(0.92); box-shadow: none; }
.stepper-btn.down { border-top-left-radius: 12px; border-bottom-left-radius: 12px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; }
.stepper-btn.up { border-top-right-radius: 12px; border-bottom-right-radius: 12px; border-top-left-radius: 4px; border-bottom-left-radius: 4px; }

.main-btn {
  font-family: var(--font-android-round); width: 100%; background-color: var(--md-sys-color-primary);
  color: #ffffff; border: none; padding: var(--main-btn-padding); font-size: 1rem; font-weight: 700;
  cursor: pointer; border-radius: 20px; corner-shape: superellipse; box-shadow: var(--md-shadow-soft); transition: all 0.2s ease;
}
[data-theme="dark"] .main-btn { color: #001a41; }
[data-theme="black"] .main-btn { color: #000000; }
.main-btn:hover { background-color: var(--md-sys-color-primary-hover); box-shadow: var(--md-shadow-hover); transform: translateY(-2px); }
.main-btn:active { transform: scale(0.98); box-shadow: none; }

.main-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.person-karte { background: var(--md-sys-color-surface-container); padding: 28px; box-shadow: var(--md-shadow-soft); border: none; border-radius: 36px; corner-shape: superellipse; margin-bottom: 24px; }
.person-karte .badge { font-family: var(--font-android-round); display: inline-block; background-color: var(--md-sys-color-primary-container); color: var(--md-sys-color-on-primary-container); padding: 6px 16px; font-weight: 700; font-size: 0.9rem; margin-bottom: 16px; border-radius: 20px; corner-shape: superellipse; }
.person-karte ul { list-style-type: none; }
.person-karte li { padding: 12px 0; border-bottom: 1px solid var(--md-sys-color-border); font-size: 0.95rem; font-weight: 600; color: var(--md-sys-color-on-surface-variant); display: flex; align-items: center; gap: 12px; }
.person-karte li:last-child { border-bottom: none; }

.person-karte li.completed { opacity: 0.5; }
.person-karte li.completed > span:last-child { text-decoration: line-through; }

.task-checkbox-btn {
  background: var(--md-sys-color-surface);
  border: none;
  width: 34px;
  height: 32px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--md-sys-color-primary);
  cursor: pointer;
  box-shadow: var(--md-shadow-soft);
  padding: 0;
  border-radius: 10px;
  corner-shape: superellipse;
  transition: all 0.2s ease;
}
.task-checkbox-btn:hover { background-color: var(--md-sys-color-input-bg); box-shadow: var(--md-shadow-hover); }
.task-checkbox-btn:active { transform: scale(0.92); box-shadow: none; }
.task-checkbox-btn .material-symbols-rounded { font-size: 22px; line-height: 1; }

.modal-overlay {
  position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(0, 0, 0, 0.4); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 16px; transition: background 0.3s ease;
}

.modal-overlay.full-page-modal {
  background: var(--md-sys-color-background) !important;
  backdrop-filter: none !important;
  z-index: 2000;
  padding: 0;
  align-items: flex-start;
}

.tools-modal-card {
  background: var(--md-sys-color-background);
  width: 100%;
  height: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.modal-card {
  background: var(--md-sys-color-surface); padding: 28px 24px; max-width: 440px; width: 100%;
  border-radius: 36px; corner-shape: superellipse; box-shadow: var(--md-shadow-hover); text-align: center;
  display: flex; flex-direction: column; align-items: center;
  max-height: 90vh; overflow-y: auto;
}
.modal-card h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; }
.modal-card p { color: var(--md-sys-color-on-surface-variant); font-size: 0.9rem; margin-bottom: 16px; line-height: 1.5; }

.cancel-btn-full {
  width: 100%; max-width: 260px; margin-top: 14px; padding: 12px; border: none;
  font-family: var(--font-android-round); font-weight: 700; font-size: 0.85rem;
  border-radius: 18px; corner-shape: superellipse; cursor: pointer;
  background-color: var(--md-sys-color-input-bg); color: var(--md-sys-color-on-surface);
  transition: all 0.2s ease;
}

.setting-item {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 4px;
  border-bottom: 1px solid var(--md-sys-color-border);
}
.setting-item:last-of-type { border-bottom: none; }

.setting-item.flex-column-setting {
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.setting-info { text-align: left; padding-right: 12px; }
.setting-title { font-weight: 700; font-size: 0.92rem; color: var(--md-sys-color-on-surface); }
.setting-subtitle { font-size: 0.78rem; color: var(--md-sys-color-on-surface-variant); }

/* Color Picker Palette Grid */
.color-picker-grid {
  display: flex;
  gap: 10px;
  width: 100%;
  justify-content: space-between;
  padding: 4px 0;
}

.color-swatch {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.color-swatch:hover { transform: scale(1.1); }
.color-swatch.active {
  border-color: var(--md-sys-color-on-surface);
  transform: scale(1.15);
}

.segmented-btn-group {
  display: flex;
  background-color: var(--md-sys-color-input-bg);
  border-radius: 16px;
  padding: 4px;
  gap: 4px;
  flex-shrink: 0;
}
.segmented-btn {
  border: none;
  background: transparent;
  color: var(--md-sys-color-on-surface-variant);
  padding: 6px 12px;
  font-family: var(--font-android-round);
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.segmented-btn.active {
  background-color: var(--md-sys-color-surface);
  color: var(--md-sys-color-primary);
  box-shadow: var(--md-shadow-soft);
}

.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
  flex-shrink: 0;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--md-sys-color-input-bg);
  transition: .3s;
  border-radius: 34px;
}
.slider:before {
  position: absolute; content: ""; height: 20px; width: 20px; left: 4px; bottom: 4px;
  background-color: var(--md-sys-color-on-surface-variant);
  transition: .3s;
  border-radius: 50%;
}
input:checked + .slider { background-color: var(--md-sys-color-primary); }
input:checked + .slider:before {
  transform: translateX(22px);
  background-color: #ffffff;
}

.accordion-item {
  background-color: var(--md-sys-color-surface);
  border-radius: 24px;
  corner-shape: superellipse;
  margin-bottom: 12px;
  overflow: hidden;
  transition: all 0.2s ease;
  box-shadow: var(--md-shadow-soft);
}
.accordion-header {
  width: 100%;
  padding: 16px 20px;
  background: transparent;
  border: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-android-round);
  font-weight: 700;
  font-size: 1rem;
  color: var(--md-sys-color-on-surface);
  cursor: pointer;
  text-align: left;
}
.accordion-header .material-symbols-rounded {
  transition: transform 0.2s ease;
  color: var(--md-sys-color-primary);
}
.accordion-item.open .accordion-header .material-symbols-rounded {
  transform: rotate(180deg);
}
.accordion-content {
  padding: 0 20px 20px 20px;
  display: none;
}
.accordion-item.open .accordion-content {
  display: block;
}

.counter-display {
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--md-sys-color-primary);
  margin: 8px 0 16px 0;
  line-height: 1;
  user-select: none;
  text-align: center;
}
.counter-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.counter-action-btn {
  background-color: var(--md-sys-color-input-bg);
  color: var(--md-sys-color-on-surface);
  border: none;
  height: 52px;
  flex: 1;
  border-radius: 18px;
  corner-shape: superellipse;
  font-size: 1.4rem;
  font-weight: 700;
  font-family: var(--font-android-round);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--md-shadow-soft);
  transition: all 0.15s ease;
  user-select: none;
}
.counter-action-btn:hover { box-shadow: var(--md-shadow-hover); }
.counter-action-btn:active { transform: scale(0.92); box-shadow: none; }

.counter-action-btn.reset-btn {
  flex: 0 0 52px;
  height: 52px;
  background-color: var(--md-sys-color-error-container);
  color: var(--md-sys-color-error-text);
  font-size: 1.2rem;
  font-weight: 800;
}

.randomizer-results {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
}
.random-badge {
  background-color: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  font-weight: 700;
  font-size: 1.2rem;
  padding: 8px 16px;
  border-radius: 16px;
  corner-shape: superellipse;
  box-shadow: var(--md-shadow-soft);
}

.stopwatch-display {
  font-size: 3.2rem;
  font-weight: 700;
  color: var(--md-sys-color-primary);
  text-align: center;
  margin: 8px auto;
  font-family: monospace, var(--font-android-round);
  font-variant-numeric: tabular-nums;
  width: 250px;
  display: block;
}

.pin-card {
  background: var(--md-sys-color-surface);
  padding: 32px 24px; max-width: 380px; margin: 32px auto 0 auto;
  box-shadow: var(--md-shadow-soft); border-radius: 36px; corner-shape: superellipse;
  text-align: center; display: flex; flex-direction: column; align-items: center;
}
.pin-card h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 6px; }
.pin-card p { color: var(--md-sys-color-on-surface-variant); font-size: 0.85rem; margin-bottom: 16px; }
.pin-dots { display: flex; justify-content: center; gap: 14px; margin-bottom: 14px; }
.dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--md-sys-color-on-surface-variant); transition: all 0.2s ease; }
.dot.filled { background-color: var(--md-sys-color-primary); border-color: var(--md-sys-color-primary); transform: scale(1.15); }
.error-msg {
  color: var(--md-sys-color-on-error-container); background-color: var(--md-sys-color-error-container);
  border-radius: 12px; padding: 4px 12px; font-size: 0.8rem; font-weight: 700;
  min-height: 24px; margin-bottom: 12px; display: flex; align-items: center; justify-content: center; text-align: center;
}
.numpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; max-width: 280px; }
.num-btn {
  background-color: var(--md-sys-color-input-bg);
  color: var(--md-sys-color-on-surface);
  border: none;
  height: var(--num-btn-height);
  border-radius: 18px;
  corner-shape: superellipse;
  font-size: 1.2rem;
  font-weight: 700;
  font-family: var(--font-android-round);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--md-shadow-soft);
  transition: all 0.15s ease;
  user-select: none;
}
.num-btn:hover { box-shadow: var(--md-shadow-hover); }
.num-btn:active { transform: scale(0.92); box-shadow: none; }