@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('/fonts/plus-jakarta-sans-latin.woff2') format('woff2');
}

:root {
  color-scheme: light dark;
  --color-scheme: light;

  /* PURE MONOCHROME LIGHT THEME DEFAULTS */
  --bg-light: #F8F8FA;
  --bg-dark: #0A0A0C;
  --surface-light: #FFFFFF;
  --surface-dark: #131316;
  --surface-subtle-light: #F3F3F6;
  --surface-subtle-dark: #1A1A1E;
  --surface-hover-light: #ECECEF;
  --surface-hover-dark: #242429;
  --border-light: #E3E3E8;
  --border-dark: #26262B;
  --border-strong-light: #0A0A0C;
  --border-strong-dark: #FAFAFA;
  --text-main-light: #0A0A0C;
  --text-main-dark: #FAFAFA;
  --text-muted-light: #575762;
  --text-muted-dark: #A6A6B2;
  --text-subtle-light: #6E6E78;
  --text-subtle-dark: #8E8E98;
  --btn-bg-light: #0A0A0C;
  --btn-bg-dark: #FAFAFA;
  --btn-text-light: #FFFFFF;
  --btn-text-dark: #0A0A0C;
  --btn-hover-light: #222226;
  --btn-hover-dark: #E6E6EB;
  --btn-subtle-bg-light: #F3F3F6;
  --btn-subtle-bg-dark: #1A1A1E;
  --btn-subtle-text-light: #0A0A0C;
  --btn-subtle-text-dark: #FAFAFA;
  --btn-subtle-hover-light: #E8E8EC;
  --btn-subtle-hover-dark: #26262C;

  --bg: var(--bg-light);
  --surface: var(--surface-light);
  --surface-subtle: var(--surface-subtle-light);
  --surface-hover: var(--surface-hover-light);
  --border: var(--border-light);
  --border-strong: var(--border-strong-light);

  --text-main: var(--text-main-light);
  --text-muted: var(--text-muted-light);
  --text-subtle: var(--text-subtle-light);

  --btn-bg: var(--btn-bg-light);
  --btn-text: var(--btn-text-light);
  --btn-hover: var(--btn-hover-light);

  --btn-subtle-bg: var(--btn-subtle-bg-light);
  --btn-subtle-text: var(--btn-subtle-text-light);
  --btn-subtle-hover: var(--btn-subtle-hover-light);

  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 9999px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-modal: 0 16px 40px rgba(0, 0, 0, 0.08);

  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --transition: 150ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Subtle Atmospheric Rolling Fog/Mist */
  --fog-color: #FFFFFF;
  --fog-drop-shadow: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.08));
  --fog-op-back: 0.70;
  --fog-op-mid: 0.85;
  --fog-op-front: 0.60;

  @media (prefers-color-scheme: dark) {
    --color-scheme: dark;
    --bg: var(--bg-dark);
    --surface: var(--surface-dark);
    --surface-subtle: var(--surface-subtle-dark);
    --surface-hover: var(--surface-hover-dark);
    --border: var(--border-dark);
    --border-strong: var(--border-strong-dark);
    --text-main: var(--text-main-dark);
    --text-muted: var(--text-muted-dark);
    --text-subtle: var(--text-subtle-dark);
    --btn-bg: var(--btn-bg-dark);
    --btn-text: var(--btn-text-dark);
    --btn-hover: var(--btn-hover-dark);
    --btn-subtle-bg: var(--btn-subtle-bg-dark);
    --btn-subtle-text: var(--btn-subtle-text-dark);
    --btn-subtle-hover: var(--btn-subtle-hover-dark);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-modal: 0 16px 40px rgba(0, 0, 0, 0.6);
    --fog-color: #E2E8F0;
    --fog-drop-shadow: drop-shadow(0 12px 35px rgba(255, 255, 255, 0.1));
    --fog-op-back: 0.18;
    --fog-op-mid: 0.30;
    --fog-op-front: 0.22;
  }

  /* Map <meta name="color-scheme"> override back to CSS property & theme tokens */
  &:has(> head > meta[name="color-scheme"][content="dark"]) {
    color-scheme: dark;
    --color-scheme: dark;
    --bg: var(--bg-dark);
    --surface: var(--surface-dark);
    --surface-subtle: var(--surface-subtle-dark);
    --surface-hover: var(--surface-hover-dark);
    --border: var(--border-dark);
    --border-strong: var(--border-strong-dark);
    --text-main: var(--text-main-dark);
    --text-muted: var(--text-muted-dark);
    --text-subtle: var(--text-subtle-dark);
    --btn-bg: var(--btn-bg-dark);
    --btn-text: var(--btn-text-dark);
    --btn-hover: var(--btn-hover-dark);
    --btn-subtle-bg: var(--btn-subtle-bg-dark);
    --btn-subtle-text: var(--btn-subtle-text-dark);
    --btn-subtle-hover: var(--btn-subtle-hover-dark);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-modal: 0 16px 40px rgba(0, 0, 0, 0.6);
    --fog-color: #E2E8F0;
    --fog-drop-shadow: drop-shadow(0 12px 35px rgba(255, 255, 255, 0.1));
    --fog-op-back: 0.18;
    --fog-op-mid: 0.30;
    --fog-op-front: 0.22;
  }

  &:has(> head > meta[name="color-scheme"][content="light"]) {
    color-scheme: light;
    --color-scheme: light;
    --bg: var(--bg-light);
    --surface: var(--surface-light);
    --surface-subtle: var(--surface-subtle-light);
    --surface-hover: var(--surface-hover-light);
    --border: var(--border-light);
    --border-strong: var(--border-strong-light);
    --text-main: var(--text-main-light);
    --text-muted: var(--text-muted-light);
    --text-subtle: var(--text-subtle-light);
    --btn-bg: var(--btn-bg-light);
    --btn-text: var(--btn-text-light);
    --btn-hover: var(--btn-hover-light);
    --btn-subtle-bg: var(--btn-subtle-bg-light);
    --btn-subtle-text: var(--btn-subtle-text-light);
    --btn-subtle-hover: var(--btn-subtle-hover-light);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-modal: 0 16px 40px rgba(0, 0, 0, 0.08);
    --fog-color: #FFFFFF;
    --fog-drop-shadow: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.08));
    --fog-op-back: 0.70;
    --fog-op-mid: 0.85;
    --fog-op-front: 0.60;
  }

  @supports (color: light-dark(white, black)) {
    --bg: light-dark(var(--bg-light), var(--bg-dark));
    --surface: light-dark(var(--surface-light), var(--surface-dark));
    --surface-subtle: light-dark(var(--surface-subtle-light), var(--surface-subtle-dark));
    --surface-hover: light-dark(var(--surface-hover-light), var(--surface-hover-dark));
    --border: light-dark(var(--border-light), var(--border-dark));
    --border-strong: light-dark(var(--border-strong-light), var(--border-strong-dark));
    --text-main: light-dark(var(--text-main-light), var(--text-main-dark));
    --text-muted: light-dark(var(--text-muted-light), var(--text-muted-dark));
    --text-subtle: light-dark(var(--text-subtle-light), var(--text-subtle-dark));
    --btn-bg: light-dark(var(--btn-bg-light), var(--btn-bg-dark));
    --btn-text: light-dark(var(--btn-text-light), var(--btn-text-dark));
    --btn-hover: light-dark(var(--btn-hover-light), var(--btn-hover-dark));
    --btn-subtle-bg: light-dark(var(--btn-subtle-bg-light), var(--btn-subtle-bg-dark));
    --btn-subtle-text: light-dark(var(--btn-subtle-text-light), var(--btn-subtle-text-dark));
    --btn-subtle-hover: light-dark(var(--btn-subtle-hover-light), var(--btn-subtle-hover-dark));
    accent-color: light-dark(#0A0A0C, #FAFAFA);
    scrollbar-color: light-dark(#9898A2, #61616B) light-dark(#F3F3F6, #1A1A1E);
  }
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg);
  color: var(--text-main);
  font-family: var(--font);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 20px 16px calc(64px + env(safe-area-inset-bottom, 0px));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--transition), color var(--transition);
}

/* Atmospheric Rolling Fog/Mist Background Layer */
.sky-fog-wrap {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 280px;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.85) 60%, rgba(0, 0, 0, 0) 100%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.85) 60%, rgba(0, 0, 0, 0) 100%);
}

.mist-stream {
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  height: 100%;
  will-change: transform;
}

.mist-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.mist-stream.layer-back {
  color: var(--fog-color);
  opacity: var(--fog-op-back);
  filter: var(--fog-drop-shadow) blur(18px);
  @media (prefers-reduced-motion: no-preference) {
    animation: mistDriftBack 50s linear infinite;
  }
}

.mist-stream.layer-mid {
  color: var(--fog-color);
  opacity: var(--fog-op-mid);
  filter: var(--fog-drop-shadow) blur(12px);
  @media (prefers-reduced-motion: no-preference) {
    animation: mistDriftMid 35s linear infinite;
  }
}

.mist-stream.layer-front {
  color: var(--fog-color);
  opacity: var(--fog-op-front);
  filter: var(--fog-drop-shadow) blur(16px);
  @media (prefers-reduced-motion: no-preference) {
    animation: mistDriftFront 24s linear infinite;
  }
}

@keyframes mistDriftBack {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

@keyframes mistDriftMid {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

@keyframes mistDriftFront {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

/* Hide fog in Zen fullscreen mode so PDF stage remains undisturbed */
body:has(.zen-fullscreen) .sky-fog-wrap,
.reader-page-view.zen-fullscreen ~ .sky-fog-wrap {
  display: none !important;
}

.hidden {
  display: none !important;
}

.visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.skip-link:focus,
.skip-link:focus-visible {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10001;
  background: var(--btn-bg);
  color: var(--btn-text);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--shadow-modal);
}

.page-main {
  width: 100%;
  display: flex;
  flex-direction: column;
  flex: 1;
}

:where(
  a:any-link,
  button,
  summary,
  input,
  select,
  textarea,
  [tabindex]:not([tabindex="-1"])
):focus-visible {
  outline: 3px solid var(--border-strong);
  outline-offset: 2px;
}

/* Toast Notification (Top Layer popover="manual" + class fallback) */
.toast-pill {
  position: fixed;
  inset: 20px auto auto 50%;
  transform: translateX(-50%) translateY(-16px);
  background: var(--btn-bg);
  color: var(--btn-text);
  border: 1px solid var(--border);
  padding: 8px 12px 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-modal);
  opacity: 0;
  margin: 0;
  max-width: min(90vw, 480px);
  display: none;
  align-items: center;
  gap: 10px;
  z-index: 9999;
  transition-property: opacity, transform, display, overlay;
  transition-duration: 200ms;
  transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  transition-behavior: allow-discrete;
}

.toast-pill:is(:popover-open, .\:popover-open, .show) {
  display: inline-flex;
  opacity: 1;
  transform: translateX(-50%) translateY(0);

  @starting-style {
    opacity: 0;
    transform: translateX(-50%) translateY(-16px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .toast-pill {
    transition-duration: 80ms;
  }
  .toast-pill:is(:popover-open, .\:popover-open, .show) {
    transform: translateX(-50%) translateY(0);
    @starting-style {
      transform: translateX(-50%) translateY(0);
    }
  }
}

.toast-msg {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toast-close-btn {
  background: transparent;
  border: none;
  color: inherit;
  opacity: 0.75;
  cursor: pointer;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}
.toast-close-btn:hover {
  opacity: 1;
}

/* Native Confirmation Modal Dialog (Top Layer + Scroll Containment + Exit Fallback) */
dialog.suprax-dialog {
  margin: auto;
  padding: 0;
  width: min(92vw, 400px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text-main);
  box-shadow: var(--shadow-modal);
  opacity: 0;
  transition-property: opacity, transform, display, overlay;
  transition-duration: 220ms;
  transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  transition-behavior: allow-discrete;

  @media (prefers-reduced-motion: no-preference) {
    transform: scale(0.95);
  }
}

dialog.suprax-dialog:modal {
  overscroll-behavior: contain;
}

dialog.suprax-dialog[open]:where(:not([data-closing])) {
  display: block;
  opacity: 1;

  @starting-style {
    opacity: 0;
  }

  @media (prefers-reduced-motion: no-preference) {
    transform: scale(1);
    @starting-style {
      transform: scale(0.95);
    }
  }
}

dialog.suprax-dialog::backdrop {
  overflow: hidden;
  overscroll-behavior: contain;
  background-color: rgba(0, 0, 0, 0);
  transition-property: background-color, display, overlay;
  transition-duration: 220ms;
  transition-timing-function: ease-out;
  transition-behavior: allow-discrete;
}

dialog.suprax-dialog[open]:where(:not([data-closing]))::backdrop {
  background-color: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);

  @starting-style {
    background-color: rgba(0, 0, 0, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  dialog.suprax-dialog,
  dialog.suprax-dialog::backdrop {
    transition-duration: 100ms;
  }
}

.suprax-dialog-form {
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.suprax-dialog-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.suprax-dialog-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

.suprax-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

.suprax-dialog-cancel {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.suprax-dialog-confirm {
  margin-top: 0;
}

/* AUTH CONTAINER */
.auth-wrap {
  width: 100%;
  max-width: 400px;
  margin: auto;
  padding: 24px 0;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.auth-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--btn-bg);
  color: var(--btn-text);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.auth-titles {
  text-align: center;
}
.auth-titles h1,
.auth-titles h2 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}
.auth-titles p {
  font-size: 13.5px;
  color: var(--text-muted);
}

.auth-tabs {
  display: flex;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 3px;
}
.auth-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}
.auth-tab-btn.active {
  background: var(--surface);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

.auth-error-banner {
  display: none;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  color: var(--text-main);
  font-size: 13px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  text-align: center;
  font-weight: 500;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.field-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field-wrap label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.text-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-main);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition);
}
.text-input:focus {
  border-color: var(--border-strong);
}

.text-input:user-invalid {
  border-color: var(--border-strong);
}

.password-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrap .text-input {
  padding-right: 68px;
}

.btn-toggle-pass {
  position: absolute;
  right: 6px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 9px;
  min-height: 28px;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
}

.btn-toggle-pass:hover {
  color: var(--text-main);
  border-color: var(--border-strong);
}

.btn-solid {
  background: var(--btn-bg);
  color: var(--btn-text);
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity var(--transition);
  margin-top: 4px;
}
.btn-solid:hover {
  opacity: 0.9;
}

/* MAIN APP LAYOUT */
.app-layout {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Top Header */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 2px 4px;
  gap: 12px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-main);
}
.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--btn-bg);
  color: var(--btn-text);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.brand-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

/* Desktop Navigation Tabs */
.desktop-nav-tabs {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 3px;
  box-shadow: var(--shadow-sm);
}

.d-nav-btn {
  background: transparent;
  border: none;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}
.d-nav-btn.active {
  background: var(--btn-bg);
  color: var(--btn-text);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}
.user-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border-strong);
}
.user-name-text {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  flex-shrink: 0;
}
.btn-icon:hover {
  color: var(--text-main);
  border-color: var(--border-strong);
}

/* COLUMNS WRAPPER (DESKTOP) */
.columns-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 20px;
  align-items: start;
}

/* Full-width stage when actively reading a PDF book */
.columns-wrap.reader-mode-active {
  grid-template-columns: 1fr;
}
.columns-wrap.reader-mode-active .column-music {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.column-tasks {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.column-reader {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.column-music {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 16px;
}

/* Overview Section & Progress */
.overview-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.overview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.greeting-badge {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  display: block;
  margin-bottom: 4px;
}

.main-heading {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.metric-percent {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.progress-bar-track {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 8px;
  background: var(--surface-subtle);
  border-radius: var(--radius-pill);
  overflow: clip;
  border: 0 solid;
  box-shadow: inset 0 0 0 1px var(--border);
  container-type: inline-size;
  --progress-bar-radius: var(--radius-pill);
}

.progress-bar-track::-webkit-progress-bar {
  background: transparent;
}

.progress-bar-track::-webkit-progress-value {
  background: var(--btn-bg);
  border-radius: var(--progress-bar-radius);
  transition: inline-size 350ms cubic-bezier(0.16, 1, 0.3, 1);
}

.progress-bar-track::-moz-progress-bar {
  background: var(--btn-bg);
  border-radius: var(--progress-bar-radius);
  transition: inline-size 350ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Quick Add Task Card */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.add-task-card {
  padding: 16px 18px;
}

.add-task-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.input-main-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.input-task-title {
  flex: 1;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 11px 15px;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--text-main);
  outline: none;
  transition: all var(--transition);
}
.input-task-title:focus {
  background: var(--surface);
  border-color: var(--border-strong);
}
.input-task-title::placeholder {
  color: var(--text-subtle);
}

.btn-add-submit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--btn-bg);
  color: var(--btn-text);
  border: none;
  border-radius: var(--radius-md);
  padding: 11px 18px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity var(--transition);
  flex-shrink: 0;
  touch-action: manipulation;
}
.btn-add-submit:hover {
  opacity: 0.9;
}

.input-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.meta-inputs-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 220px;
}

.meta-input-cat {
  flex: 1;
  min-width: 110px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--text-main);
  outline: none;
  transition: border-color var(--transition);
}
.meta-input-cat:focus {
  border-color: var(--border-strong);
}

.meta-select-prio {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--text-main);
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition);
}
.meta-select-prio:focus {
  border-color: var(--border-strong);
}

/* Countdown Configuration Widget in Form */
.meta-countdown-config {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
}

.cd-prefix-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

.cd-time-inputs {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.cd-mini-input {
  width: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 2px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  color: var(--text-main);
  outline: none;
  -moz-appearance: textfield;
}
.cd-mini-input::-webkit-outer-spin-button,
.cd-mini-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.cd-mini-input:focus {
  border-color: var(--border-strong);
}

.cd-sep {
  font-size: 11px;
  color: var(--text-subtle);
  font-weight: 600;
  padding: 0 1px;
}

.cd-auto-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  padding-left: 4px;
  border-left: 1px solid var(--border);
}
.cd-auto-label input[type="checkbox"] {
  accent-color: var(--btn-bg);
  cursor: pointer;
}

/* Toolbar: Segmented Filters & Search */
.toolbar-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.segmented-filters {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 3px;
  box-shadow: var(--shadow-sm);
}

.tab-filter {
  background: transparent;
  border: none;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  touch-action: manipulation;
}
.tab-filter {
  position: relative;
}
.tab-filter.active,
.tab-filter[aria-selected="true"] {
  background: var(--btn-bg);
  color: var(--btn-text);
}
@media (forced-colors: active) {
  .tab-filter[aria-selected="true"]::after,
  .auth-tab-btn[aria-selected="true"]::after,
  .d-nav-btn[aria-current="page"]::after {
    content: "";
    position: absolute;
    inset: auto 10px 2px;
    border-block-end: 2px solid currentColor;
  }
}
.badge-count {
  font-size: 11px;
  font-weight: 700;
  opacity: 0.8;
}

.search-input-wrapper {
  flex: 1;
  min-width: 180px;
  max-width: 240px;
  position: relative;
  display: flex;
  align-items: center;
}
.search-input-wrapper svg {
  position: absolute;
  left: 12px;
  color: var(--text-subtle);
  pointer-events: none;
}
.search-field {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 8px 14px 8px 34px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text-main);
  outline: none;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition);
}
.search-field:focus {
  border-color: var(--border-strong);
}
.search-field::placeholder {
  color: var(--text-subtle);
}

/* Task List Section */
.task-list-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.task-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Individual Task Card */
.task-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all var(--transition);
}
.task-card:hover {
  border-color: var(--border-strong);
}

/* Checkbox Toggle Button */
.task-card:nth-child(n + 12) {
  content-visibility: auto;
  contain-intrinsic-size: auto none auto 74px;
}

.task-check-btn {
  width: 24px;
  height: 24px;
  min-inline-size: 24px;
  min-block-size: 24px;
  border-radius: 6px;
  background: transparent;
  border: 2px solid var(--border-strong);
  color: var(--btn-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  transition: all var(--transition);
}
.task-check-btn:hover {
  opacity: 0.8;
}
.task-check-btn.checked {
  background: var(--btn-bg);
  border-color: var(--btn-bg);
}
.task-check-btn.locked {
  background: var(--surface-subtle);
  border-color: var(--border);
  color: var(--text-muted);
  cursor: not-allowed;
}

/* Task Content Center */
.task-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.task-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.task-title-text {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.35;
  word-break: break-word;
}

.task-meta-line {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.meta-pill-cat {
  font-size: 11px;
  font-weight: 600;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 2px 7px;
  border-radius: var(--radius-pill);
}

.meta-pill-prio {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
}
.meta-pill-prio.prio-high {
  background: var(--btn-bg);
  color: var(--btn-text);
  border-color: var(--btn-bg);
}
.meta-pill-prio.prio-medium {
  background: var(--surface-subtle);
  color: var(--text-main);
}
.meta-pill-prio.prio-low {
  background: transparent;
  color: var(--text-muted);
}

.meta-pill-time {
  font-size: 11px;
  color: var(--text-muted);
}

/* Controls on Right (Timer Pill & Delete Button) */
.task-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Timer Pill Button */
.timer-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  touch-action: manipulation;
}
.timer-pill-btn:hover {
  border-color: var(--border-strong);
}
.timer-pill-btn .btn-pill-action {
  font-family: var(--font);
  font-size: 11.5px;
  font-weight: 700;
  padding-left: 4px;
  border-left: 1px solid var(--border);
}

.timer-pill-btn.pill-idle {
  background: var(--surface-subtle);
}
.timer-pill-btn.pill-running {
  background: var(--btn-bg);
  color: var(--btn-text);
  border-color: var(--btn-bg);
}
.timer-pill-btn.pill-running .btn-pill-action {
  border-left-color: rgba(255, 255, 255, 0.3);
}
.timer-pill-btn.pill-paused {
  background: var(--surface-subtle);
  border-style: dashed;
}
.timer-pill-btn.pill-running.urgent {
  @media (prefers-reduced-motion: no-preference) {
    animation: pulse-border 1.5s infinite;
  }
}

@keyframes pulse-border {
  0% { opacity: 1; }
  50% { opacity: 0.7; }
  100% { opacity: 1; }
}

/* Static Timer Badges */
.timer-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 700;
  border: 1px solid var(--border);
}
.timer-pill.pill-done {
  background: var(--surface-subtle);
  color: var(--text-muted);
}
.timer-pill.pill-locked {
  background: var(--surface-subtle);
  color: var(--text-muted);
  border-style: dashed;
}

/* Action Delete Button */
.btn-icon-task {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--text-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-icon-task:hover {
  background: var(--surface-subtle);
  color: var(--text-main);
}

/* Task States */
.task-card.is-done {
  opacity: 0.6;
}
.task-card.is-done .task-title-text {
  text-decoration: line-through;
  color: var(--text-muted);
}

.task-card.is-locked {
  border-style: dashed;
  background: var(--surface-subtle);
  opacity: 0.7;
}
.task-card.is-locked .task-title-text {
  color: var(--text-muted);
}

/* Empty State Box */
.empty-state-box {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 44px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.empty-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface-subtle);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}
.empty-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}
.empty-desc {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 320px;
  line-height: 1.4;
}

/* --- RIGHT PANEL: FOCUS AUDIO CARD --- */
.media-card {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.media-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

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

.media-icon-badge {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.media-heading {
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-main);
  line-height: 1.2;
}

.media-subheading {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

.btn-subtle-action {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition);
}
.btn-subtle-action:hover {
  background: var(--surface-hover);
  color: var(--text-main);
}

.media-prompt-text {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 12px;
}

.media-input-wrap {
  display: flex;
  gap: 8px;
}

.media-url-input {
  flex: 1;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text-main);
  outline: none;
  transition: border-color var(--transition);
}
.media-url-input:focus {
  border-color: var(--border-strong);
}
.media-url-input::placeholder {
  color: var(--text-subtle);
}

.btn-media-save {
  background: var(--btn-bg);
  color: var(--btn-text);
  border: none;
  border-radius: var(--radius-sm);
  padding: 9px 15px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity var(--transition);
}
.btn-media-save:hover {
  opacity: 0.9;
}

/* Active Player Box */
.media-player-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.media-embed-frame {
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
  min-height: 152px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-embed-frame iframe {
  width: 100%;
  display: block;
  border: none;
}

.media-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 4px;
}

/* Minimalist Start & Pause Button */
.btn-media-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--btn-bg);
  color: var(--btn-text);
  border: none;
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity var(--transition);
  touch-action: manipulation;
}
.btn-media-toggle:hover {
  opacity: 0.9;
}
.btn-media-toggle.is-playing {
  background: var(--surface-subtle);
  color: var(--text-main);
  border: 1px solid var(--border-strong);
}

.media-status-pill {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  padding: 4px 9px;
  border-radius: var(--radius-pill);
}

.btn-media-delete {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--text-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-media-delete:hover {
  background: var(--surface-subtle);
  color: var(--text-main);
}

/* ========================================================
   KINDLE-LIKE PDF READER & NOTES STYLES
   ======================================================== */

.reader-library-view {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.library-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 2px;
}
.library-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.library-subtitle {
  font-size: 13px;
  color: var(--text-muted);
}

/* PDF Upload Card */
.pdf-upload-card {
  background: var(--surface);
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all var(--transition);
}
.pdf-upload-card:hover, .pdf-upload-card.drag-over {
  border-color: var(--border-strong);
  background: var(--surface-subtle);
}

.upload-icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--surface-subtle);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.upload-heading {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}
.upload-subtext {
  font-size: 12.5px;
  color: var(--text-muted);
  max-width: 320px;
}

.btn-solid-sm {
  background: var(--btn-bg);
  color: var(--btn-text);
  border: none;
  border-radius: var(--radius-pill);
  padding: 8px 18px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 4px;
  transition: opacity var(--transition);
}
.btn-solid-sm:hover {
  opacity: 0.9;
}

.upload-progress-box {
  width: 100%;
  max-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}
.upload-progress-track {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 6px;
  background: var(--border);
  border: 0 solid;
  border-radius: var(--radius-pill);
  overflow: clip;
  container-type: inline-size;
  --progress-bar-indeterminate-size: 35%;
  --progress-bar-indeterminate-animation-duration: 1.4s;

  @media (prefers-reduced-motion: reduce) {
    --progress-bar-indeterminate-animation-duration: 10s;
  }
}

.upload-progress-track:indeterminate {
  --progress-bar-animation: upload-progress-indeterminate var(--progress-bar-indeterminate-animation-duration) infinite linear;
}

.upload-progress-track::-webkit-progress-bar {
  background: transparent;
}

.upload-progress-track::-webkit-progress-value {
  background: var(--btn-bg);
  border-radius: var(--radius-pill);
  transition: inline-size 200ms ease;
  animation: var(--progress-bar-animation, revert-rule);
}

.upload-progress-track::-moz-progress-bar {
  background: var(--btn-bg);
  border-radius: var(--radius-pill);
  transition: inline-size 200ms ease;
  animation: var(--progress-bar-animation, revert-rule);
}

@keyframes upload-progress-indeterminate {
  from, to {
    inline-size: var(--progress-bar-indeterminate-size);
    margin-right: auto;
  }
  from { translate: -100%; }
  to { translate: 100cqi; }
}
.upload-progress-text {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

/* Books Collection Grid */
.books-collection-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.collection-header h3 {
  font-size: 15px;
  font-weight: 700;
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.book-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all var(--transition);
  cursor: pointer;
}
.book-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.book-card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.book-cover-icon {
  width: 38px;
  height: 48px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  flex-shrink: 0;
}

.book-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.book-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.book-meta {
  font-size: 11.5px;
  color: var(--text-muted);
}

.book-progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.book-progress-text {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}
.book-card:nth-child(n + 9) {
  content-visibility: auto;
  contain-intrinsic-size: auto none auto 190px;
}

.book-progress-track {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 5px;
  background: var(--surface-subtle);
  border: 0 solid;
  box-shadow: inset 0 0 0 1px var(--border);
  border-radius: var(--radius-pill);
  overflow: clip;
}

.book-progress-track::-webkit-progress-bar {
  background: transparent;
}

.book-progress-track::-webkit-progress-value {
  background: var(--btn-bg);
  border-radius: var(--radius-pill);
}

.book-progress-track::-moz-progress-bar {
  background: var(--btn-bg);
  border-radius: var(--radius-pill);
}

.book-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 4px;
  border-top: 1px solid var(--border);
}
.btn-read-book {
  background: var(--btn-bg);
  color: var(--btn-text);
  border: none;
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity var(--transition);
}
.btn-read-book:hover {
  opacity: 0.9;
}

.book-notes-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface-subtle);
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
}

.btn-book-delete {
  background: transparent;
  border: none;
  color: var(--text-subtle);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.btn-book-delete:hover {
  color: var(--text-main);
  background: var(--surface-subtle);
}

.empty-books-state {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

/* KINDLE READER PAGE VIEW */
.reader-page-view {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: calc(100vh - 120px);
  min-height: 600px;
  position: relative;
  transition: all 0.2s ease;
}

/* Zen Fullscreen Mode (Pure PDF Stage) */
.reader-page-view.zen-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  border-radius: 0;
  border: none;
  height: 100vh;
  width: 100vw;
  margin: 0;
  background: #0f0f10;
}

.reader-page-view.zen-fullscreen .reader-top-bar,
.reader-page-view.zen-fullscreen .reader-bottom-bar,
.reader-page-view.zen-fullscreen .reader-notes-drawer {
  display: none !important;
}

.reader-page-view.zen-fullscreen .reader-main-split {
  height: 100vh;
  width: 100vw;
  min-height: 100vh;
}

.reader-page-view.zen-fullscreen .reader-canvas-viewport {
  background: transparent;
  padding: 0;
  height: 100vh;
  width: 100vw;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.reader-page-view.zen-fullscreen #pdfCanvas {
  box-shadow: 0 0 45px rgba(0, 0, 0, 0.9);
  border-radius: 2px;
  max-height: 98vh;
  max-width: 98vw;
}

/* Floating Exit Button for Pure Zen Fullscreen */
.zen-exit-floating-btn {
  display: none;
  position: fixed;
  top: 16px;
  right: 18px;
  z-index: 10001;
  background: rgba(20, 20, 20, 0.85);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  align-items: center;
  gap: 7px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  transition: all 0.2s ease;
  opacity: 0.7;
}
.zen-exit-floating-btn:hover {
  opacity: 1;
  background: #000000;
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.04);
}
.reader-page-view.zen-fullscreen .zen-exit-floating-btn {
  display: inline-flex;
}

/* Floating Page Badge for Pure Zen Fullscreen */
.zen-floating-page-badge {
  display: none;
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10001;
  background: rgba(20, 20, 20, 0.75);
  color: #E2E8F0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  pointer-events: none;
  opacity: 0.75;
}
.reader-page-view.zen-fullscreen .zen-floating-page-badge {
  display: block;
}

/* Reader Top Bar */
.reader-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  gap: 12px;
  flex-shrink: 0;
  z-index: 20;
}

.reader-top-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.reader-book-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 360px;
}

.btn-reader-action {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.btn-reader-action:hover {
  border-color: var(--border-strong);
}
.btn-reader-action.active {
  background: var(--btn-bg);
  color: var(--btn-text);
  border-color: var(--btn-bg);
}

.reader-top-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.zoom-controls {
  display: inline-flex;
  align-items: center;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 2px 6px;
  gap: 4px;
}
.btn-zoom {
  background: transparent;
  border: none;
  font-weight: 800;
  font-size: 14px;
  color: var(--text-main);
  cursor: pointer;
  padding: 0 6px;
  min-inline-size: 26px;
  min-block-size: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xs);
}
.btn-zoom:hover {
  color: var(--text-muted);
}
.zoom-text {
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-muted);
  min-width: 34px;
  text-align: center;
}

.btn-reader-music-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-reader-music-pill:hover {
  border-color: var(--border-strong);
}

/* Reader Main Split (Canvas + Slide-over Drawer) */
.reader-main-split {
  display: flex;
  flex: 1;
  position: relative;
  overflow: hidden;
  min-height: 0;
}

/* PDF Canvas Viewport */
.reader-canvas-viewport {
  flex: 1;
  background: var(--surface-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: auto;
  padding: 24px 20px;
  min-width: 0;
  user-select: none;
}

/* Floating Page Chevrons on Desktop */
.floating-page-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-main);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  z-index: 15;
  transition: all var(--transition);
  opacity: 0.85;
}
.floating-page-btn:hover {
  opacity: 1;
  background: var(--btn-bg);
  color: var(--btn-text);
  border-color: var(--btn-bg);
  transform: translateY(-50%) scale(1.08);
}
.floating-page-btn.prev {
  left: 20px;
}
.floating-page-btn.next {
  right: 20px;
}

.canvas-center-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 5;
}

#pdfCanvas {
  display: block;
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.16);
  border-radius: 4px;
  max-width: 100%;
  background: #FFFFFF;
}

:root:has(> head > meta[name="color-scheme"][content="dark"]) #pdfCanvas {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
@media (prefers-color-scheme: dark) {
  :root:not(:has(> head > meta[name="color-scheme"][content="light"])) #pdfCanvas {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
  }
}

/* Tap Zones for Quick Navigation */
.turn-tap-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 18%;
  z-index: 10;
  cursor: pointer;
}
.turn-tap-zone.zone-left {
  left: 0;
}
.turn-tap-zone.zone-right {
  right: 0;
}

.reader-spinner-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #FFF;
  font-size: 13px;
  font-weight: 600;
  z-index: 25;
}
.reader-spinner {
  width: 30px;
  height: 30px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #FFF;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Slide-Over Notes Drawer */
.reader-notes-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 360px;
  max-width: 90vw;
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: -8px 0 28px rgba(0, 0, 0, 0.14);
  display: flex;
  flex-direction: column;
  padding: 16px 18px;
  gap: 12px;
  z-index: 30;
  animation: slideDrawerIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes slideDrawerIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
.reader-notes-drawer.hidden {
  display: none !important;
}

.notes-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 4px;
}
.notes-heading-group {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
}
.notes-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.notes-saved-status {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}
.btn-close-notes {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-close-notes:hover {
  background: var(--surface-subtle);
  color: var(--text-main);
}

.notes-helper-bar {
  display: flex;
}
.btn-stamp-page {
  background: var(--surface-subtle);
  border: 1px dashed var(--border);
  color: var(--text-main);
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-stamp-page:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
}

.book-notes-textarea {
  flex: 1;
  width: 100%;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-main);
  outline: none;
  resize: none;
  min-height: 220px;
  transition: border-color var(--transition);
}
.book-notes-textarea:focus {
  border-color: var(--border-strong);
  background: var(--surface);
}

/* Reader Bottom Kindle Bar */
.reader-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 18px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  gap: 16px;
  flex-shrink: 0;
  z-index: 20;
}

.btn-page-step {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  color: var(--text-main);
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
}
.btn-page-step:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
}

.reader-bottom-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  max-width: 460px;
}

.reader-page-status {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
}
.page-sep {
  padding: 0 4px;
  opacity: 0.5;
}

.page-scrubber {
  width: 100%;
  height: 5px;
  accent-color: var(--btn-bg);
  cursor: pointer;
}

/* MOBILE BOTTOM NAVIGATION BAR (3 TABS) */
.mobile-bottom-nav {
  display: none;
}

/* RESPONSIVE OPTIMIZATIONS (TABLET & MOBILE) */
@media (max-width: 899px) {
  body {
    padding: 16px 12px calc(80px + env(safe-area-inset-bottom, 0px));
  }

  .desktop-nav-tabs {
    display: none;
  }

  .app-layout {
    max-width: 680px;
    gap: 14px;
  }

  .columns-wrap {
    display: block;
  }

  .column-music {
    position: static;
  }

  /* Keeps iframe playing continuously when switched away on mobile */
  .mobile-tab-hidden {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
  }

  /* Reader on Mobile: top bar, bottom sheet notes drawer & responsive stage */
  .floating-page-btn {
    display: none;
  }
  .reader-page-view {
    height: auto;
    min-height: calc(100vh - 160px);
  }

  /* Mobile Top Bar: 2 dedicated rows so Back button NEVER gets squeezed */
  .reader-top-bar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 10px 14px;
    gap: 8px;
  }

  .reader-top-left {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-width: 0;
  }

  .btn-back-library {
    flex-shrink: 0 !important;
    background: var(--btn-bg) !important;
    color: var(--btn-text) !important;
    border: 1px solid var(--btn-bg) !important;
    padding: 7px 14px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    cursor: pointer !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
    border-radius: var(--radius-pill) !important;
  }
  .btn-back-library:active {
    opacity: 0.85;
    transform: scale(0.97);
  }

  .reader-book-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    max-width: 60%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: right;
  }

  .reader-top-right {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    width: 100%;
    padding-top: 6px;
    border-top: 1px dashed var(--border);
  }

  .reader-top-right .btn-reader-action,
  .reader-top-right .btn-reader-music-pill {
    padding: 5px 9px;
    font-size: 11.5px;
    white-space: nowrap;
  }

  .reader-top-right .zoom-controls {
    padding: 2px 4px;
  }
  .reader-top-right .zoom-text {
    min-width: 28px;
    font-size: 10px;
  }

  @media (max-width: 440px) {
    .btn-zen-text {
      display: none;
    }
  }

  .zen-exit-floating-btn span {
    display: none;
  }
  .zen-exit-floating-btn {
    padding: 7px 10px;
    top: 10px;
    right: 12px;
  }
  .zen-floating-page-badge {
    bottom: 12px;
    font-size: 10.5px;
    padding: 3px 10px;
  }

  .reader-notes-drawer {
    width: 100%;
    max-width: 100vw;
    border-left: none;
    border-top: 1px solid var(--border);
    max-height: 48vh;
    top: auto;
    bottom: 0;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.16);
    animation: slideDrawerUp 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  }
  @keyframes slideDrawerUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }

  /* Bottom Navigation Bar (3 Tabs) */
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--surface);
    border-top: 1px solid var(--border);
    z-index: 999;
    align-items: center;
    justify-content: space-around;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -2px 14px rgba(0, 0, 0, 0.05);
  }

  .mobile-nav-btn {
    flex: 1;
    height: 100%;
    background: transparent;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: color var(--transition);
    touch-action: manipulation;
  }
  .mobile-nav-btn.active {
    color: var(--text-main);
  }
  .mobile-nav-btn.active svg {
    stroke-width: 2.6;
  }

  .nav-icon-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .nav-playing-indicator {
    position: absolute;
    top: -1px;
    right: -4px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--border-strong);
    @media (prefers-reduced-motion: no-preference) {
      animation: pulse-dot 1.4s infinite;
    }
  }

  @keyframes pulse-dot {
    0% { transform: scale(0.9); opacity: 0.6; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.6; }
  }

  .overview-section {
    padding: 18px 18px;
  }
  .main-heading {
    font-size: 17px;
  }
  .metric-percent {
    font-size: 24px;
  }

  .add-task-card {
    padding: 14px 14px;
  }
  .btn-add-submit span {
    display: none;
  }
  .btn-add-submit {
    padding: 11px 14px;
  }

  .input-meta-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .meta-inputs-left {
    min-width: 100%;
  }

  .meta-countdown-config {
    justify-content: space-between;
    width: 100%;
  }

  .toolbar-section {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .segmented-filters {
    width: 100%;
    justify-content: space-between;
  }
  .tab-filter {
    flex: 1;
    justify-content: center;
    padding: 8px 10px;
    font-size: 12.5px;
  }
  .search-input-wrapper {
    max-width: 100%;
  }

  .task-card {
    padding: 12px 14px;
    gap: 10px;
  }
  .task-title-text {
    font-size: 13.5px;
  }
  .timer-pill-btn {
    padding: 5px 8px;
    font-size: 11px;
  }
  .timer-pill-btn .btn-pill-action {
    font-size: 10.5px;
  }
}

/* ===== Emboss Surface (vanilla port of SmoothUI EmbossSurface) ===== */
/* JS sets --es-dx/--es-dy/--es-blur; defaults below keep it safe without JS. */
.emboss-surface {
  --es-dx: -2.83px;
  --es-dy: -2.83px;
  --es-blur: 4.8px;
  --emboss-hl: color-mix(in oklab, var(--bg), white 46%);
  --emboss-sh: color-mix(in oklab, var(--bg), black 34%);
  background: var(--bg);
  border: none;
  box-shadow:
    var(--es-dx) var(--es-dy) var(--es-blur) var(--emboss-hl),
    calc(var(--es-dx) * -1) calc(var(--es-dy) * -1) var(--es-blur) var(--emboss-sh);
  transition: box-shadow 240ms cubic-bezier(0.645, 0.045, 0.355, 1);
}
.emboss-surface .emboss-title {
  text-shadow:
    var(--es-dx) var(--es-dy) var(--es-blur) var(--emboss-hl),
    calc(var(--es-dx) * -1) calc(var(--es-dy) * -1) var(--es-blur) var(--emboss-sh);
}
@media (prefers-reduced-motion: reduce) {
  .emboss-surface {
    transition: none;
  }
}
@supports not (color: color-mix(in oklab, red, white)) {
  .emboss-surface {
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
  }
  .emboss-surface .emboss-title {
    text-shadow: none;
  }
}

/* ===== Opening Splash (non-blocking, reduced-motion safe) ===== */
.splash-intro {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: grid;
  place-items: center;
  background: var(--bg);
  overflow: hidden;
  pointer-events: none;
  animation: splash-fade-out 450ms cubic-bezier(0.16, 1, 0.3, 1) 1.1s forwards;
}
.splash-ripple-wrap {
  position: absolute;
  inset: 0;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, white, transparent);
  mask-image: linear-gradient(to bottom, white, transparent);
}
.ripple-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: var(--radius-pill);
  border: 1px solid var(--text-main);
  background: color-mix(in oklab, var(--text-main), transparent 75%);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  animation: ripple-pulse 1.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: calc(var(--i, 0) * 0.06s);
}
.splash-brand {
  position: relative;
  z-index: 1;
  text-align: center;
  animation: splash-brand-in 500ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.splash-title {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
}
.splash-sub {
  margin-top: 6px;
  font-size: 13.5px;
  color: var(--text-muted);
}
@keyframes ripple-pulse {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0.9;
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.45;
  }
}
@keyframes splash-brand-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes splash-fade-out {
  0% {
    opacity: 1;
    visibility: visible;
  }
  99% {
    opacity: 0;
  }
  100% {
    opacity: 0;
    visibility: hidden;
  }
}
@media (max-width: 640px) {
  .splash-intro {
    animation-duration: 400ms;
    animation-delay: 0.9s;
  }
  .ripple-circle {
    animation-duration: 1.2s;
    animation-delay: calc(var(--i, 0) * 0.04s);
  }
}
@media (prefers-reduced-motion: reduce) {
  .splash-intro {
    display: none;
    animation: none;
  }
}
