@font-face {
  font-family: "OpenDyslexic";
  src:
    url("/fonts/OpenDyslexic-Regular.woff2") format("woff2"),
    url("/fonts/OpenDyslexic-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f8fafc;
  --text: #0f172a;
  --muted: #475569;
  --card: #ffffff;
  --border: #e2e8f0;
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  --reader-font-size: 18px;
  --reader-line-height: 1.6;
  --reader-font-family: "Inter", system-ui, -apple-system, sans-serif;
  --reader-max-width: 720px;
  --chapter-footer-height: 82px;
  --sweetspot-topbar-h: 72px;
}

body[data-theme="dark"] {
  --bg: #0b1220;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --card: #111827;
  --border: #1f2937;
  --accent: #60a5fa;
  --accent-strong: #3b82f6;
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

body[data-theme="sepia"] {
  --bg: #f6f1e9;
  --text: #3b2f2f;
  --muted: #6b5e57;
  --card: #fffaf3;
  --border: #e8dcca;
  --accent: #d97706;
  --accent-strong: #b45309;
  --shadow: 0 12px 30px rgba(107, 54, 8, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

.reader-active .topbar {
  display: none;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  color: var(--muted);
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 12px;
}

.page-header__titles {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand__icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.brand__link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  min-width: 0;
}

.brand__link:hover {
  text-decoration: underline;
}

.brand__text {
  font-weight: 700;
  font-size: 16px;
  min-width: 0;
  max-width: min(320px, 36vw);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.library-kind-toggle {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--card) 88%, transparent);
  overflow: hidden;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

.library-kind-toggle__btn {
  border: none;
  background: transparent;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.01em;
  cursor: pointer;
  color: color-mix(in srgb, var(--text) 88%, transparent);
}

.library-kind-toggle__btn.is-active {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent-strong);
}

body[data-theme="dark"] .library-kind-toggle {
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
}

.header-actions {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

@media (max-width: 600px) {
  .library-kind-toggle__btn {
    padding: 6px 8px;
    font-size: 11px;
  }

  /* Hide the wordmark so tabs always fit in portrait */
  .brand__text {
    display: none;
  }
}

.header__icon-btn {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  padding: 0;
  font-size: 18px;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.header__icon-btn:hover {
  background: var(--border);
  color: var(--text);
  transform: translateY(-1px);
}

.header__btn--secondary {
  opacity: 0.9;
}

.header__btn--secondary:hover {
  opacity: 1;
}

.filter-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  margin: 12px 0 4px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  transition: opacity 0.18s ease, transform 0.18s ease, max-height 0.18s ease, padding 0.18s ease, margin 0.18s ease;
  max-height: 600px;
  overflow: hidden;
}

.filter-bar.is-hidden {
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  max-height: 0;
  padding: 0;
  margin: 0;
  border-width: 0;
}

.filter-bar__header {
  display: flex;
  gap: 8px;
  align-items: center;
}

.filter-bar__search input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  color: var(--text);
  min-height: 38px;
  -webkit-appearance: none;
  appearance: none;
}

.filter-bar__search {
  flex: 1 1 auto;
}

.filter-bar__close {
  flex: 0 0 auto;
}

.filter-bar__options {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.filter-bar__options .filter select {
  min-width: 140px;
}

#filter-fkgl,
#filter-words {
  min-width: 180px;
}

@media (min-width: 900px) {
  .filter-bar__options {
    flex-wrap: nowrap;
    overflow-x: auto;
  }
}

.filter {
  display: grid;
  gap: 6px;
}

.filter label {
  font-size: 12px;
  line-height: 1.1;
  color: var(--muted);
  margin-bottom: 4px;
}

.filter input[type="search"],
.filter select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  color: var(--text);
}

.filter-bar select,
.filter-bar button {
  min-width: 130px;
}

.filter-bar button#filter-clear {
  min-width: auto;
}

#filter-close {
  min-width: auto;
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.filter--actions {
  align-self: end;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 12px;
}

.filter-chip__label {
  font-weight: 600;
}

.page-title {
  margin: 4px 0 0;
}

h1, h2, h3 {
  margin: 4px 0 8px;
  font-weight: 700;
}

p {
  margin: 0 0 12px;
  color: var(--text);
}

.lead {
  color: var(--muted);
  font-size: 17px;
}

button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

button:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.2);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

button.ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

button.filter-chip {
  background: var(--bg);
  color: var(--text);
  border-color: var(--border);
  box-shadow: none;
  font-weight: 500;
  padding: 6px 10px;
  font-size: 12px;
  transform: none;
}

button.filter-chip:hover {
  background: var(--border);
  box-shadow: none;
}

button:focus-visible,
.header__icon-btn:focus-visible,
.text-settings__btn:focus-visible,
.book-card__primary:focus-visible,
.book-card__info:focus-visible,
.filter-chip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  transition: background 0.2s ease, transform 0.15s ease;
}

.button-link:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
  justify-content: center;
  align-items: stretch;
}

.book-grid .book-card {
  width: 100%;
  height: 100%;
}

.book-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  text-align: left;
  position: relative;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.book-card.is-locked {
  opacity: 1;
  filter: none;
}

.book-card__lock {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(15, 23, 42, 0.9);
  color: #fff;
  border: 1px solid rgba(226, 232, 240, 0.4);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  pointer-events: auto;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.2);
}

.book-card__lock svg {
  width: 14px;
  height: 14px;
}

.book-card__free {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #10b981;
  color: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 8px 16px rgba(16, 185, 129, 0.3);
}

.book-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
}

.book-card:focus-within {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2), 0 16px 40px rgba(15, 23, 42, 0.12);
}

.book-card__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 10px 10px 12px;
}

.book-card__cover {
  width: 100%;
  aspect-ratio: 3 / 2;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  position: relative;
  min-height: 0;
}

.book-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.placeholder-cover {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 28px;
  color: var(--muted);
}

.book-card__cover-actions {
  position: absolute;
  left: 10px;
  bottom: 12px;
  display: flex;
  gap: 8px;
  z-index: 2;
}

.book-card__cta {
  border: none;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.25);
  white-space: nowrap;
  cursor: pointer;
}

.book-card__cta.is-locked {
  background: rgba(148, 163, 184, 0.9);
  color: #1f2937;
}

.book-card__title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.3em * 2);
}

.book-card__meta {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 1.2em;
}

.book-card__info {
  position: absolute;
  right: 10px;
  bottom: 12px;
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 999px;
  border: none;
  background: rgba(15, 23, 42, 0.9);
  color: #fff;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.25);
  z-index: 2;
  white-space: nowrap;
  max-width: calc(100% - 20px);
  overflow: hidden;
  cursor: pointer;
}

.book-card__info:hover {
  background: rgba(15, 23, 42, 0.95);
  transform: none;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.28);
}

.book-card__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.book-card__status-badge {
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
}

.book-card__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 10px 12px;
}

.book-card__primary {
  flex: 1;
  text-align: center;
  font-weight: 600;
}

.book-card__primary.is-secondary {
  background: var(--card);
  color: var(--text);
  border-color: var(--border);
}

.view {
  display: none;
  margin-top: 20px;
}

.view.active {
  display: block;
}

#reader-view {
  padding-bottom: calc(var(--chapter-footer-height) + env(safe-area-inset-bottom));
}

.reader-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
  margin-bottom: 10px;
}

.reader-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  box-shadow: var(--shadow);
  position: relative;
}

.reader-header__center {
  display: grid;
  gap: 8px;
  justify-items: center;
  text-align: center;
  min-width: 0;
  width: 100%;
  max-width: 720px;
}

.reader-version-row {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  position: relative;
  flex-wrap: wrap;
}

.reader-download {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  border-radius: 10px;
  padding: 6px 12px;
  font-size: 13px;
  min-width: 90px;
}

.reader-info {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  border-radius: 10px;
  padding: 6px 12px;
  font-size: 13px;
  min-width: 80px;
}

.reader-info:hover {
  background: var(--border);
  color: var(--text);
}

.reader-download:hover {
  background: var(--border);
  color: var(--text);
}

.version-toggle {
  display: inline-flex;
  flex-wrap: wrap;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg);
}

.version-toggle__btn {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 6px 10px;
  font-size: 13px;
  min-width: 84px;
}

.version-toggle__btn.is-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.text-settings__btn {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 14px;
}

.text-settings__btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.text-settings__popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 10px;
  display: grid;
  gap: 8px;
  min-width: 210px;
  z-index: 140;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.text-settings__popover[hidden] {
  display: none;
}

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

.text-settings__popover select,
.text-settings__popover input[type="range"] {
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
}

.reader-toc-row {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: var(--reader-controls-width, 520px);
  margin: 0 auto;
}

.reader-toc-controls {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  max-width: 100%;
}

.reader-meta-row {
  font-size: 14px;
  color: var(--muted);
  display: grid;
  gap: 8px;
  width: 100%;
  max-width: var(--reader-controls-width, 520px);
  margin: 0 auto;
}

.reader-progress {
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.reader-progress__bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.2s ease;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 14px;
  align-items: flex-start;
}

.controls--reader {
  justify-content: flex-start;
}

.control {
  flex: 1 1 180px;
  min-width: 150px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px;
  box-shadow: var(--shadow);
}

.reader-controls__select {
  min-width: 0;
}

.reader-toc-row .reader-controls__select {
  width: auto;
  max-width: 100%;
  min-width: 220px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 12px;
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow);
  font-size: 14px;
  line-height: 1.3;
  appearance: none;
  cursor: pointer;
}

.reader-toc-row .reader-controls__select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

@media (max-width: 520px) {
  .reader-toc-row {
    justify-content: stretch;
  }

  .reader-toc-controls {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
}

#version-select,
#theme-select {
  min-width: 120px;
}

.control label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 14px;
}

.control select,
.control input[type="range"] {
  width: 100%;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
}

.control--details {
  padding: 0;
}

.control--details summary {
  padding: 10px;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.control--details summary::-webkit-details-marker {
  display: none;
}

.control--details summary::after {
  content: "▾";
  font-size: 12px;
}

.control--details[open] summary::after {
  content: "▴";
}

.control__details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  padding: 10px;
  border-top: 1px solid var(--border);
}

.control--details[open] {
  padding: 0;
}

.chapter-nav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 10px;
  box-shadow: var(--shadow);
}

.chapter-nav--bottom {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 180;
  border-radius: 12px 12px 0 0;
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
  padding-left: max(10px, env(safe-area-inset-left));
  padding-right: max(10px, env(safe-area-inset-right));
}

.chapter-nav button {
  padding: 6px 12px;
  font-size: 12px;
  min-width: 64px;
}

.chapter-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
  min-width: 0;
}

.chapter-nav .reader-controls__select {
  width: 100%;
}

.chapter-meta span {
  font-weight: 600;
  line-height: 1.3;
}

.reader {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  box-shadow: var(--shadow);
  font-size: var(--reader-font-size);
  line-height: var(--reader-line-height);
  font-family: var(--reader-font-family);
  margin: 10px auto 0;
  max-width: var(--reader-max-width);
  width: 100%;
}

.reader p {
  margin: 0 0 16px;
  color: var(--text);
}

.reader-footer-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(12px + env(safe-area-inset-bottom));
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: repeat(4, auto);
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  z-index: 190;
}

.reader-footer-nav button {
  padding: 6px 12px;
  font-size: 12px;
  min-width: 64px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.reader-footer-nav__bookmark {
  min-width: 38px;
  height: 38px;
  font-size: 18px;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 10px;
}

.bookmark-panel {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--chapter-footer-height) + env(safe-area-inset-bottom));
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 10px 12px;
  width: min(360px, calc(100% - 24px));
  z-index: 195;
  display: grid;
  gap: 10px;
}

.bookmark-panel[hidden] {
  display: none !important;
}

.bookmark-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.bookmark-panel__mode {
  font-weight: 700;
  font-size: 14px;
}

.bookmark-panel__back {
  padding: 6px 10px;
}

.bookmark-panel__slots {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.bookmark-panel__slot {
  height: 36px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
  padding: 8px;
}

.bookmark-panel__slot--active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(37, 99, 235, 0.08);
}

.bookmark-panel__slot:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.status-pill {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  font-size: 14px;
}

.status-pill[data-tone="alert"] {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecdd3;
}

body[data-theme="dark"] .status-pill[data-tone="alert"] {
  background: #331414;
  color: #fecdd3;
  border-color: #7f1d1d;
}

.empty-state {
  margin-top: 18px;
  text-align: center;
  color: var(--muted);
}

.inline-alert {
  margin: 12px 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  box-shadow: var(--shadow);
}

.inline-alert[data-tone="alert"] {
  border-color: #fecdd3;
  background: #fff1f2;
  color: #9f1239;
}

body[data-theme="dark"] .inline-alert[data-tone="alert"] {
  background: #331414;
  border-color: #7f1d1d;
  color: #fecdd3;
}

.version-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 12px;
}

.version-pill {
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 13px;
}

.footer {
  max-width: 1100px;
  margin: 32px auto;
  padding: 0 24px 32px;
  color: var(--muted);
}

.info-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  display: grid;
  place-items: center;
  z-index: 100;
}

.info-modal[hidden] {
  display: none;
}

.info-modal__backdrop {
  position: absolute;
  inset: 0;
}

.info-modal__dialog {
  position: relative;
  background: var(--card);
  color: var(--text);
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  max-width: 94vw;
  width: min(94vw, 560px);
  padding: 16px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 90vh;
  overflow: hidden;
  z-index: 1;
}

.info-modal__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
  min-height: 0;
}

.info-modal__body p {
  margin: 0;
}

.info-modal__topbar {
  display: flex;
  justify-content: flex-start;
}

.info-modal__topbar--split {
  justify-content: space-between;
  align-items: center;
}

#info-close {
  padding: 6px 10px;
  font-size: 13px;
  width: auto;
}

#back-to-library,
#unlock-cancel {
  padding: 6px 10px;
  font-size: 13px;
  width: auto;
}

#info-overlay .info-modal__body p,
#info-overlay .info-modal__body h1,
#info-overlay .info-modal__body h2,
#info-overlay .info-modal__body h3,
#info-overlay .info-modal__body h4,
#info-overlay .info-modal__body h5,
#info-overlay .info-modal__body h6 {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.info-author {
  display: flex;
  gap: 12px;
  align-items: stretch;
  min-width: 0;
}

.author-thumb {
  width: 72px;
  height: 72px;
  overflow: hidden;
  border-radius: 10px;
  border: 3px solid var(--text);
  background: var(--bg);
}

.author-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 50% 20%;
}

.info-author__bio-box {
  flex: 1 1 auto;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  padding: 8px 10px;
  display: flex;
  align-items: center;
  min-height: 72px;
  overflow-wrap: anywhere;
}

.info-author__bio-box p {
  margin: 0;
}

@media (min-width: 900px) {
  .info-author-row {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    align-items: start;
  }

  .info-author-row .info-author__bio-box {
    min-height: 72px;
  }

  .info-author-row .info-author__bio-box p {
    font-size: 13px;
    line-height: 1.35;
    max-height: 72px;
    overflow: hidden;
  }
}

#info-tags {
  overflow-wrap: anywhere;
}

.info-stats {
  display: grid;
  gap: 2px;
}

.info-stats p {
  margin: 0;
}

.info-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: auto;
}

.info-modal__actions--info {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.info-modal__actions-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.info-modal__actions--info button {
  padding: 8px 12px;
  font-size: 14px;
  width: auto;
  white-space: normal;
}

.info-modal__actions--stacked {
  flex-direction: column;
  align-items: stretch;
}

#info-novel-study {
  background: #af1f26;
  border-color: #af1f26;
  color: #fff;
}

#unlock-more-access {
  background: #af1f26;
  border-color: #af1f26;
  color: #fff;
  padding: 6px 10px;
  font-size: 13px;
  line-height: 1;
  border-radius: 10px;
}

#info-novel-study:hover {
  background: #8f1a20;
  border-color: #8f1a20;
}

#unlock-more-access:hover {
  background: #8f1a20;
  border-color: #8f1a20;
}

.info-modal__actions-group--right #info-download {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.info-modal__actions-group--right #info-download:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

@media (max-width: 720px) {
  .info-author {
    flex-direction: column;
    align-items: flex-start;
  }

  .info-author__bio-box {
    width: 100%;
    min-height: 0;
  }

  .info-modal__actions--info {
    flex-direction: column;
    align-items: stretch;
  }

  .info-modal__actions-group {
    width: 100%;
  }

  .info-modal__actions-group--left {
    justify-content: flex-start;
  }

  .info-modal__actions-group--right {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }

  .info-modal__actions--info button {
    font-size: 14px;
    padding: 8px 10px;
  }

  #info-unlock {
    grid-column: 1 / -1;
  }
}

.info-modal input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 15px;
}

.unlock-input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.unlock-input-row button {
  white-space: nowrap;
}

.unlock-input-row input[type="text"] {
  margin: 0;
}

@media (max-width: 520px) {
  .unlock-input-row {
    grid-template-columns: 1fr;
  }

  .unlock-input-row button {
    width: 100%;
  }
}

.info-modal__spacer {
  flex: 1 1 120px;
}

.offline-progress {
  font-size: 0.9em;
  opacity: 0.9;
  margin-top: 0;
  color: var(--muted);
}

.install-actions {
  display: flex;
  gap: 8px;
  margin: 8px 0;
}

.install-instructions {
  display: grid;
  gap: 6px;
}

.icon-button {
  padding: 6px 10px;
  font-size: 14px;
}

.share-row {
  display: grid;
  gap: 8px;
  background: var(--bg);
  border: 1px dashed var(--border);
  padding: 10px;
  border-radius: 12px;
}

.share-row__controls {
  display: flex;
  gap: 8px;
}

.share-row__controls input {
  flex: 1;
}

.share-row__qr {
  display: grid;
  gap: 8px;
  justify-items: start;
}

.share-row__qr canvas {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
}

.teacher-dashboard {
  display: grid;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: var(--bg);
}

.teacher-dashboard__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.teacher-dashboard__heading {
  font-weight: 600;
}

.teacher-dashboard__btn {
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: 6px 12px;
  background: #fff;
  font-weight: 600;
  cursor: pointer;
}

.teacher-dashboard__btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.18);
}

.teacher-dashboard__btn--primary:hover {
  background: var(--accent-strong);
}

.teacher-dashboard__sweetspot {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.teacher-dashboard__helper {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.teacher-dashboard__list {
  display: grid;
  gap: 6px;
  max-height: 220px;
  overflow: auto;
  padding-right: 4px;
}

.teacher-dashboard input[type='search'] {
  width: 100%;
}

.teacher-dashboard__item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.sweetspot {
  position: fixed;
  inset: 0;
  z-index: 320;
  display: none;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;
  color: #0b0b0f;
}

.sweetspot:not([hidden]) {
  display: block;
}

.sweetspot *,
.sweetspot *::before,
.sweetspot *::after {
  box-sizing: border-box;
}

.sweetspot {
  --sweetspot-page: #f2f2f7;
  --sweetspot-card: #ffffff;
  --sweetspot-muted: rgba(60, 60, 67, 0.72);
  --sweetspot-border: rgba(60, 60, 67, 0.12);
  --sweetspot-grid: rgba(60, 60, 67, 0.14);
  --sweetspot-easy: 16, 185, 129;
  --sweetspot-hard: 239, 68, 68;
  --sweetspot-fill-alpha: 0.26;
  --sweetspot-dot: #0b0b0f;
  --sweetspot-arrow: rgba(60, 60, 67, 0.7);
  --sweetspot-radius: 22px;
  --sweetspot-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
  --sweetspot-shadow-sm: 0 10px 22px rgba(0, 0, 0, 0.08);
  --sweetspot-focus: rgba(0, 122, 255, 0.32);
  --sweetspot-scrim: rgba(0, 0, 0, 0.44);
  --sweetspot-pill-bg: rgba(255, 255, 255, 0.78);
  --sweetspot-pill-border: rgba(60, 60, 67, 0.14);
  --sweetspot-pill-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
  --sweetspot-x-pill-w: 220px;
  --sweetspot-x-side-pad: 74px;
  --sweetspot-y-group-w: 72px;
  --sweetspot-y-group-offset: 90px;
  --sweetspot-y-pill-gap: 100px;
  --sweetspot-y-end-pad: 52px;
}

.sweetspot__backdrop {
  position: fixed;
  inset: 0;
  background: var(--sweetspot-scrim);
}

.sweetspot__dialog {
  position: relative;
  margin: 40px auto;
  width: min(1200px, calc(100% - 32px));
  max-height: 92vh;
  overflow: hidden;
  background: var(--sweetspot-card);
  border: 1px solid var(--sweetspot-border);
  border-radius: calc(var(--sweetspot-radius) + 2px);
  box-shadow: var(--sweetspot-shadow);
  padding: 14px;
  z-index: 1;
  display: flex;
  flex-direction: column;
}

.sweetspot__dialog.sweetspot--overflow {
  overflow: auto;
}

.sweetspot__topbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
}

.sweetspot__body {
  background: var(--sweetspot-card);
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.sweetspot__controls {
  position: sticky;
  top: var(--sweetspot-topbar-h);
  z-index: 45;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: start;
  padding: 12px;
  padding-bottom: 8px;
  margin: 0 auto;
  max-width: 1120px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  flex: 0 0 auto;
}

@media (max-width: 920px) {
  .sweetspot__controls {
    grid-template-columns: 1fr;
  }
}


.sweetspot__left {
  flex: 1 1 auto;
  min-width: 0;
}

.sweetspot__selected {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 10px 0;
  max-height: 70px;
  overflow-y: auto;
  padding-right: 4px;
}

.sweetspot__chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--sweetspot-border);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.06);
  font-size: 10px;
  font-weight: 720;
  letter-spacing: -0.01em;
  color: rgba(11, 11, 15, 0.92);
  max-width: 100%;
  line-height: 1.1;
}

.sweetspot__chip span {
  max-width: 640px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
}

.sweetspot__chip button {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  color: rgba(60, 60, 67, 0.82);
  padding: 0;
}

.sweetspot__chip button:focus {
  outline: 4px solid var(--sweetspot-focus);
  outline-offset: 2px;
  border-radius: 10px;
}

.sweetspot__dropdown {
  position: relative;
  width: 100%;
  min-width: 440px;
}

.sweetspot__dd-button {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--sweetspot-border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.95);
  color: rgba(11, 11, 15, 0.92);
  font-weight: 800;
  letter-spacing: -0.01em;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  transition: box-shadow 140ms ease, transform 140ms ease;
}

.sweetspot__dd-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.1);
}

.sweetspot__dd-button:focus {
  box-shadow: 0 0 0 4px var(--sweetspot-focus);
}

.sweetspot__dd-count {
  font-size: 12px;
  color: var(--sweetspot-muted);
  font-weight: 750;
  margin-left: 10px;
  white-space: nowrap;
}

.sweetspot__panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  bottom: auto;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--sweetspot-border);
  border-radius: 18px;
  box-shadow: var(--sweetspot-shadow);
  overflow: hidden;
  display: none;
  z-index: 200;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transform: translateY(6px);
  opacity: 0;
  transition: opacity 160ms ease, transform 160ms ease;
}

.sweetspot__panel.is-open {
  display: block;
  transform: translateY(0);
  opacity: 1;
}

.sweetspot__panel-top {
  padding: 10px;
  border-bottom: 1px solid var(--sweetspot-border);
  background: rgba(255, 255, 255, 0.6);
}

.sweetspot__panel-search {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--sweetspot-border);
  border-radius: 14px;
  outline: none;
  font-weight: 750;
  letter-spacing: -0.01em;
  color: rgba(11, 11, 15, 0.92);
  background: rgba(255, 255, 255, 0.95);
}

.sweetspot__panel-search:focus {
  box-shadow: 0 0 0 4px var(--sweetspot-focus);
}

.sweetspot__list {
  max-height: min(40vh, 300px);
  overflow: auto;
  padding: 6px;
}

.sweetspot__item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 14px;
  cursor: pointer;
  transition: background 120ms ease;
}

.sweetspot__item:hover {
  background: rgba(60, 60, 67, 0.06);
}

.sweetspot__item input {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  accent-color: rgb(var(--sweetspot-easy));
  cursor: pointer;
  flex: 0 0 auto;
}

.sweetspot__item-label {
  font-size: 12px;
  font-weight: 780;
  letter-spacing: -0.01em;
  color: rgba(11, 11, 15, 0.9);
  line-height: 1.25;
  user-select: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sweetspot__item-meta {
  display: inline;
  margin-left: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--sweetspot-muted);
  user-select: none;
  white-space: nowrap;
}

.sweetspot__right {
  flex: 0 0 auto;
  display: flex;
  gap: 10px;
  align-items: center;
  margin-left: auto;
  padding-top: 2px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.sweetspot__toggle {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: -0.01em;
  color: var(--sweetspot-muted);
  user-select: none;
  white-space: nowrap;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--sweetspot-border);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.06);
  transition: transform 140ms ease;
}

.sweetspot__toggle:hover {
  transform: translateY(-1px);
}

.sweetspot__toggle input {
  width: 16px;
  height: 16px;
  accent-color: rgb(var(--sweetspot-easy));
  cursor: pointer;
}

.sweetspot__swatch {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.sweetspot__swatch--solid {
  background: #0b0b0f;
}

.sweetspot__swatch--hollow {
  border: 2px solid rgba(11, 11, 15, 0.52);
  background: transparent;
}

.sweetspot__btn {
  border: 1px solid var(--sweetspot-border);
  background: rgba(255, 255, 255, 0.88);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 820;
  letter-spacing: -0.01em;
  cursor: pointer;
  color: rgba(11, 11, 15, 0.88);
  transition: transform 140ms ease, box-shadow 140ms ease;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.06);
  font-size: 12px;
  white-space: nowrap;
}

.sweetspot__btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.1);
}

.sweetspot__btn:focus {
  outline: 4px solid var(--sweetspot-focus);
  outline-offset: 2px;
}

.sweetspot__mode {
  display: grid;
  gap: 6px;
  align-items: center;
  justify-items: start;
}

.sweetspot__mode-label {
  font-size: 11px;
  font-weight: 750;
  color: var(--sweetspot-muted);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 4px;
}

.sweetspot__mode-toggle {
  display: inline-flex;
  border-radius: 999px;
  border: 1px solid var(--sweetspot-border);
  background: rgba(255, 255, 255, 0.88);
  overflow: hidden;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.06);
}

.sweetspot__mode-btn {
  border: none;
  background: transparent;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.01em;
  cursor: pointer;
  color: rgba(11, 11, 15, 0.88);
}

.sweetspot__mode-btn.is-active {
  background: rgba(0, 122, 255, 0.15);
  color: rgba(0, 122, 255, 0.92);
}

.sweetspot__limit {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.18);
  z-index: 300;
}

.sweetspot__limit[hidden] {
  display: none;
}

.sweetspot__limit-card {
  width: min(420px, calc(100% - 40px));
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--sweetspot-border);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

.sweetspot__limit-title {
  font-weight: 850;
  margin-bottom: 6px;
}

.sweetspot__limit-text {
  font-size: 12px;
  line-height: 1.35;
  margin-bottom: 12px;
}

.sweetspot__fkglhelp {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.18);
  z-index: 320;
}

.sweetspot__fkglhelp[hidden] {
  display: none;
}

.sweetspot__fkglhelp-card {
  width: min(440px, calc(100% - 40px));
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--sweetspot-border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.2);
  display: grid;
  gap: 12px;
}

.sweetspot__fkglhelp-title {
  font-weight: 850;
  font-size: 14px;
}

.sweetspot__fkglhelp-text {
  font-size: 12px;
  line-height: 1.4;
  color: rgba(11, 11, 15, 0.82);
}

.sweetspot__fkglhelp-table {
  font-size: 11px;
  font-weight: 700;
  color: rgba(11, 11, 15, 0.85);
}

.sweetspot__fkglhelp-table table {
  width: 100%;
  border-collapse: collapse;
}

.sweetspot__fkglhelp-table th,
.sweetspot__fkglhelp-table td {
  text-align: left;
  padding: 4px 0;
  font-size: 11px;
}

.sweetspot__fkglhelp-dontshow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(11, 11, 15, 0.78);
}

.sweetspot__chart {
  position: relative;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.sweetspot__chartgrid {
  display: grid;
  grid-template-columns: 70px 1fr;
  grid-template-rows: 1fr 64px;
  gap: 10px 14px;
  align-items: stretch;
  flex: 1 1 auto;
  width: min(1120px, 100%);
  height: clamp(360px, 56vh, 520px);
  margin: 0 auto;
}

.sweetspot__plot {
  margin: 0 auto;
  max-width: 1120px;
  position: relative;
  width: 100%;
  height: 100%;
  border: 1px solid var(--sweetspot-border);
  border-radius: var(--sweetspot-radius);
  overflow: hidden;
  background: #fbfbfd;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.06);
  flex: 1 1 auto;
  min-height: 260px;
  grid-column: 2;
  grid-row: 1;
}

.sweetspot__quadrant {
  position: absolute;
  width: 50%;
  height: 50%;
}

.sweetspot__quadrant--left {
  left: 0;
  background: rgba(var(--sweetspot-easy), var(--sweetspot-fill-alpha));
}

.sweetspot__quadrant--right {
  left: 50%;
  background: rgba(var(--sweetspot-hard), var(--sweetspot-fill-alpha));
}

.sweetspot__quadrant--top {
  top: 0;
}

.sweetspot__quadrant--bottom {
  top: 50%;
}

.sweetspot__veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1000px 700px at 20% 12%, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 60%),
    radial-gradient(900px 650px at 88% 92%, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0) 60%);
  pointer-events: none;
  opacity: 0.6;
}

.sweetspot__line {
  position: absolute;
  background: var(--sweetspot-grid);
}

.sweetspot__line--v {
  width: 1px;
  top: 0;
  bottom: 0;
  left: 50%;
}

.sweetspot__line--h {
  height: 1px;
  left: 0;
  right: 0;
  top: 50%;
}

.sweetspot__quad-title {
  position: absolute;
  font-size: 12.5px;
  font-weight: 820;
  letter-spacing: -0.01em;
  color: rgba(11, 11, 15, 0.88);
  line-height: 1.25;
  padding: 12px 12px 0 12px;
  max-width: 46%;
  pointer-events: none;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.16);
  z-index: 2;
}

.sweetspot__quad-title--tl {
  left: 0;
  top: 0;
}

.sweetspot__quad-title--tr {
  left: 50%;
  top: 0;
}

.sweetspot__quad-title--bl {
  left: 0;
  top: 50%;
}

.sweetspot__quad-title--br {
  left: 50%;
  top: 50%;
}

.sweetspot__ticks {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 16px;
  display: flex;
  justify-content: space-between;
  padding: 0 16px;
  font-size: 11px;
  font-weight: 780;
  letter-spacing: -0.01em;
  color: rgba(11, 11, 15, 0.52);
  pointer-events: none;
}

.sweetspot__quad-hit {
  position: absolute;
  width: 50%;
  height: 50%;
  cursor: pointer;
  background: transparent;
}

.sweetspot__quad-hit--tl {
  left: 0;
  top: 0;
}

.sweetspot__quad-hit--tr {
  left: 50%;
  top: 0;
}

.sweetspot__quad-hit--bl {
  left: 0;
  top: 50%;
}

.sweetspot__quad-hit--br {
  left: 50%;
  top: 50%;
}

.sweetspot__quad-hint {
  position: absolute;
  inset: 10px;
  border-radius: 18px;
  border: 2px solid rgba(0, 122, 255, 0);
  pointer-events: none;
  transition: border-color 140ms ease;
}

.sweetspot__plot:hover .sweetspot__quad-hint {
  border-color: rgba(0, 122, 255, 0.14);
}

.sweetspot__quad-hint.is-on {
  border-color: rgba(0, 122, 255, 0.32);
}

.sweetspot__axis-pill {
  background: var(--sweetspot-pill-bg);
  border: 1px solid var(--sweetspot-pill-border);
  border-radius: 999px;
  box-shadow: var(--sweetspot-pill-shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: rgba(60, 60, 67, 0.92);
  font-weight: 850;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 12px;
  user-select: none;
}

.sweetspot__xaxis {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sweetspot__axis-x {
  position: relative;
  width: 100%;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sweetspot__axis-pill--x {
  width: var(--sweetspot-x-pill-w);
  text-align: center;
  padding: 8px 12px;
}

.sweetspot__axis-label {
  font-size: 11px;
  font-weight: 820;
  letter-spacing: -0.01em;
  color: rgba(60, 60, 67, 0.92);
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--sweetspot-pill-bg);
  border: 1px solid var(--sweetspot-pill-border);
  box-shadow: var(--sweetspot-pill-shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  line-height: 1;
  pointer-events: none;
  z-index: 2;
}

.sweetspot__axis-x .sweetspot__axis-label {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.sweetspot__axis-label--easy {
  left: 0;
}

.sweetspot__axis-label--hard {
  right: 0;
}

.sweetspot__axis-line--left,
.sweetspot__axis-line--right {
  position: absolute;
  top: 50%;
  height: 0;
  border-top: 1px solid var(--sweetspot-arrow);
  opacity: 0.95;
  transform: translateY(-50%);
}

.sweetspot__axis-line--left {
  left: var(--sweetspot-x-side-pad);
  right: calc(50% + (var(--sweetspot-x-pill-w) / 2) + 14px);
}

.sweetspot__axis-line--right {
  right: var(--sweetspot-x-side-pad);
  left: calc(50% + (var(--sweetspot-x-pill-w) / 2) + 14px);
}

.sweetspot__axis-arrow {
  position: absolute;
  top: 50%;
  width: 0;
  height: 0;
  transform: translateY(-50%);
  opacity: 0.95;
  pointer-events: none;
}

.sweetspot__axis-arrow--left {
  left: var(--sweetspot-x-side-pad);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-right: 7px solid var(--sweetspot-arrow);
  transform: translate(-12px, -50%);
}

.sweetspot__axis-arrow--right {
  right: var(--sweetspot-x-side-pad);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 7px solid var(--sweetspot-arrow);
  transform: translate(12px, -50%);
}

.sweetspot__yaxis {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  pointer-events: none;
}

.sweetspot__yaxis-mid {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.sweetspot__axis-pill--y {
  padding: 10px 10px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  text-align: center;
  z-index: 1;
}

.sweetspot__axis-line--y {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: var(--sweetspot-arrow);
  border-radius: 2px;
}

.sweetspot__axis-arrow--up,
.sweetspot__axis-arrow--down {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0.95;
  left: 50%;
  transform: translateX(-50%);
}

.sweetspot__axis-arrow--up {
  top: 4px;
  bottom: auto;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 9px solid var(--sweetspot-arrow);
}

.sweetspot__axis-arrow--down {
  top: auto;
  bottom: 4px;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 9px solid var(--sweetspot-arrow);
}

.sweetspot__layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.sweetspot__dot {
  position: absolute;
  transform: translate(-50%, -50%);
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;
  z-index: 3;
}

.sweetspot__dot--solid {
  width: 13px;
  height: 13px;
  border-radius: 999px;
  background: var(--sweetspot-dot);
  box-shadow: var(--sweetspot-shadow-sm);
}

.sweetspot__dot--hollow {
  width: 13px;
  height: 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  border: 2px solid rgba(11, 11, 15, 0.52);
  box-shadow: var(--sweetspot-shadow-sm);
}

.sweetspot__tag {
  position: absolute;
  font-size: 10px;
  font-weight: 760;
  letter-spacing: -0.01em;
  color: rgba(11, 11, 15, 0.88);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--sweetspot-border);
  border-radius: 999px;
  padding: 4px 6px;
  white-space: nowrap;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.08);
  max-width: min(240px, 60%);
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.1;
  pointer-events: none;
  z-index: 4;
}

.sweetspot__hovercard {
  position: absolute;
  min-width: 200px;
  max-width: 260px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--sweetspot-border);
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 720;
  color: rgba(11, 11, 15, 0.88);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.14);
  display: none;
  z-index: 4;
  pointer-events: none;
}

.sweetspot__hovercard.is-open {
  display: block;
}

.sweetspot__hovercard-title {
  font-size: 12px;
  font-weight: 820;
  margin-bottom: 6px;
  color: rgba(11, 11, 15, 0.95);
}

.sweetspot__hovercard-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.sweetspot__hovercard-row + .sweetspot__hovercard-row {
  margin-top: 4px;
}

.sweetspot__disclaimer {
  margin: 14px auto 0;
  max-width: 980px;
  font-size: 12px;
  font-weight: 720;
  letter-spacing: -0.01em;
  color: rgba(60, 60, 67, 0.86);
  line-height: 1.35;
}

.sweetspot__drawer-scrim {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.18);
  display: none;
  z-index: 330;
}

.sweetspot__drawer-scrim.is-open {
  display: block;
}

.sweetspot__drawer {
  position: fixed;
  right: 16px;
  top: 88px;
  width: min(420px, calc(100% - 32px));
  max-height: calc(100vh - 120px);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--sweetspot-border);
  border-radius: 22px;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  overflow: hidden;
  display: none;
  z-index: 340;
}

.sweetspot__drawer.is-open {
  display: block;
}

.sweetspot__drawer-head {
  padding: 14px 14px 10px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--sweetspot-border);
  background: rgba(255, 255, 255, 0.55);
}

.sweetspot__drawer-title {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: rgba(11, 11, 15, 0.92);
  line-height: 1.2;
}

.sweetspot__drawer-sub {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 720;
  color: var(--sweetspot-muted);
  letter-spacing: -0.01em;
}

.sweetspot__drawer-close {
  border: 1px solid var(--sweetspot-border);
  background: rgba(255, 255, 255, 0.82);
  width: 34px;
  height: 34px;
  border-radius: 999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: rgba(60, 60, 67, 0.78);
}

.sweetspot__drawer-close:focus {
  outline: 4px solid var(--sweetspot-focus);
  outline-offset: 2px;
  border-radius: 12px;
}

.sweetspot__drawer-actions {
  padding: 10px 14px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  border-bottom: 1px solid var(--sweetspot-border);
  background: rgba(255, 255, 255, 0.4);
}

.sweetspot__drawer-actions .sweetspot__btn {
  box-shadow: none;
}

.sweetspot__drawer-list {
  padding: 8px;
  overflow: auto;
  max-height: calc(100vh - 240px);
}

.sweetspot__drawer-row {
  display: flex;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 14px;
  align-items: flex-start;
  cursor: pointer;
  transition: background 120ms ease;
}

.sweetspot__drawer-row:hover {
  background: rgba(60, 60, 67, 0.06);
}

.sweetspot__drawer-row input {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  accent-color: rgba(0, 122, 255, 0.9);
  cursor: pointer;
  flex: 0 0 auto;
}

.sweetspot__drawer-text {
  min-width: 0;
}

.sweetspot__drawer-line {
  font-size: 12px;
  font-weight: 780;
  letter-spacing: -0.01em;
  color: rgba(11, 11, 15, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.sweetspot__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--sweetspot-border);
  background: rgba(255, 255, 255, 0.7);
  font-size: 11px;
  font-weight: 860;
  letter-spacing: -0.01em;
  color: rgba(60, 60, 67, 0.88);
  margin-left: 8px;
}

.sweetspot__onboarding {
  position: fixed;
  inset: 0;
  background: var(--sweetspot-scrim);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px 14px;
  z-index: 360;
}

.sweetspot__onboarding.is-open {
  display: flex;
}

.sweetspot__onboarding-dialog {
  width: min(640px, 100%);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  overflow: hidden;
}

.sweetspot__onboarding-header {
  padding: 18px 18px 10px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.sweetspot__onboarding-title {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: rgba(11, 11, 15, 0.94);
}

.sweetspot__onboarding-close {
  border: 1px solid var(--sweetspot-border);
  background: rgba(255, 255, 255, 0.82);
  width: 34px;
  height: 34px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(60, 60, 67, 0.78);
  transition: transform 140ms ease;
}

.sweetspot__onboarding-close:hover {
  transform: translateY(-1px);
}

.sweetspot__onboarding-close:focus {
  outline: 4px solid var(--sweetspot-focus);
  outline-offset: 2px;
}

.sweetspot__onboarding-body {
  padding: 0 18px 16px;
}

.sweetspot__onboarding-copy {
  margin: 0 0 14px;
  color: rgba(11, 11, 15, 0.84);
  font-weight: 720;
  letter-spacing: -0.01em;
  line-height: 1.42;
  font-size: 13px;
}

.sweetspot__legend {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.sweetspot__legend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid var(--sweetspot-border);
  background: rgba(255, 255, 255, 0.62);
}

.sweetspot__legend-label {
  font-size: 12px;
  font-weight: 860;
  letter-spacing: -0.01em;
  color: rgba(11, 11, 15, 0.82);
}

.sweetspot__legend-hint {
  font-size: 12px;
  font-weight: 780;
  letter-spacing: -0.01em;
  color: var(--sweetspot-muted);
  white-space: nowrap;
}

.sweetspot__onboarding-note {
  font-size: 12px;
  font-weight: 720;
  letter-spacing: -0.01em;
  color: rgba(60, 60, 67, 0.86);
  margin: 0 0 12px;
  line-height: 1.35;
}

.sweetspot__how {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.sweetspot__how-card {
  border-radius: 18px;
  padding: 12px;
  border: 1px solid var(--sweetspot-border);
  background: rgba(255, 255, 255, 0.86);
}

.sweetspot__how-title {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
  color: rgba(11, 11, 15, 0.92);
}

.sweetspot__how-sub {
  font-size: 12px;
  font-weight: 730;
  letter-spacing: -0.01em;
  color: var(--sweetspot-muted);
  line-height: 1.35;
}

.sweetspot__onboarding-footer {
  padding: 0 18px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.sweetspot__dont-show {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 780;
  letter-spacing: -0.01em;
  color: var(--sweetspot-muted);
  user-select: none;
}

.sweetspot__dont-show input {
  width: 16px;
  height: 16px;
  accent-color: rgba(0, 122, 255, 0.9);
  cursor: pointer;
}

.sweetspot__primary-btn {
  border: none;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 900;
  letter-spacing: -0.01em;
  cursor: pointer;
  background: rgba(0, 122, 255, 0.92);
  color: #fff;
  box-shadow: 0 18px 44px rgba(0, 122, 255, 0.25);
  transition: transform 140ms ease;
}

.sweetspot__primary-btn:hover {
  transform: translateY(-1px);
}

.sweetspot__primary-btn:focus {
  outline: 4px solid var(--sweetspot-focus);
  outline-offset: 2px;
}

@media (max-width: 1020px) {
  .sweetspot__controls {
    flex-direction: column;
  }

  .sweetspot__dropdown {
    min-width: 0;
  }

  .sweetspot__right {
    width: 100%;
    justify-content: space-between;
    margin-left: 0;
  }

  .sweetspot__chip span {
    max-width: 78vw;
  }

  .sweetspot__drawer {
    top: 132px;
  }
}

@media (max-width: 880px) {
  .sweetspot__how {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .sweetspot__plot {
    min-height: 240px;
  }

  .sweetspot__panel {
    max-height: min(50vh, 320px);
  }

  .sweetspot__panel.is-open {
    display: block;
  }
}

@media (max-width: 560px) {
  .sweetspot__drawer {
    right: 10px;
    left: 10px;
    width: auto;
  }
}

.unlock-confirmation {
  display: grid;
  gap: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 10px;
  border-radius: 10px;
}

.unlock-confirmation[hidden] {
  display: none !important;
}

.unlock-confirmation p {
  margin: 0;
}

.bookmark-dialog {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 250;
}

.bookmark-dialog:not([hidden]) {
  display: block;
}

.bookmark-dialog[hidden] {
  display: none;
}

.bookmark-dialog__content {
  position: absolute;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 10px 12px;
  min-width: 320px;
  max-width: min(520px, calc(100% - 16px));
}

.bookmark-dialog__row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.bookmark-dialog__title {
  margin: 0;
  font-weight: 700;
  white-space: nowrap;
}

.bookmark-dialog__slots {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  flex: 1 1 auto;
}

.bookmark-dialog__slot {
  padding: 6px 8px;
  min-width: 32px;
  height: 32px;
  font-size: 13px;
  line-height: 1;
}

.bookmark-dialog__cancel {
  margin-left: auto;
  flex-shrink: 0;
}

.bookmark-hit {
  animation: bookmarkFlash 1.2s ease;
}

@keyframes bookmarkFlash {
  0% {
    background: rgba(37, 99, 235, 0.25);
  }
  100% {
    background: transparent;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.noscript {
  text-align: center;
  padding: 20px;
  background: #fee2e2;
  color: #991b1b;
  margin: 16px;
  border-radius: 12px;
}

.settings {
  position: relative;
}

.reader-controls__select {
  width: auto;
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 420px) {
  .reader-header {
    gap: 6px;
  }

  .reader-version-row {
    gap: 6px;
  }

  .reader-footer-nav {
    gap: 6px;
  }
}

.settings-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 12px;
  min-width: 220px;
  z-index: 20;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.settings-menu[hidden] {
  display: none;
}

.settings-menu__label {
  font-size: 13px;
  color: var(--muted);
}

.settings-menu__section {
  display: grid;
  gap: 8px;
}

.settings-menu__heading {
  margin: 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.settings-menu__select {
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
}

.settings-menu__action {
  width: 100%;
  justify-content: center;
}

.settings-menu__action.is-ready {
  outline: 2px solid color-mix(in srgb, var(--accent), transparent 55%);
  outline-offset: 2px;
}

.library-unlock-toast {
  position: fixed;
  top: 16px;
  right: 16px;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 12px 14px;
  min-width: 240px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 200;
}

.library-unlock-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.library-unlock-toast__heading {
  font-weight: 700;
  margin: 0 0 6px;
}

.library-unlock-toast__detail {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 720px) {
  main {
    padding: 16px;
  }

  .controls {
    gap: 6px;
  }

  .control {
    padding: 6px;
  }

  .control__details-grid {
    grid-template-columns: 1fr;
  }

  .reader-header h2 {
    font-size: 22px;
    line-height: 1.2;
  }
}

@media (orientation: landscape) and (max-width: 767px) {
  .book-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 600px) and (orientation: portrait) {
  .book-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 768px) and (orientation: landscape) {
  .book-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (min-width: 768px) and (orientation: portrait) {
  .book-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .book-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
  }

  .book-card {
    padding: 0;
  }
}



/* =========================
   Sweet Spot UI fixes (2026-01-24)
   ========================= */

.sweetspot__controls{
  position: sticky !important;
  top: var(--sweetspot-topbar-h) !important;
  z-index: 45 !important;
  display: grid !important;
  grid-template-columns: 1fr auto !important;
  gap: 10px !important;
  align-items: start !important;
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(10px) !important;
}

.sweetspot__left{
  min-width: 0 !important;
}

.sweetspot__right{
  width: auto !important;
  justify-content: flex-end !important;
  align-items: center !important;
  flex-wrap: wrap !important;
}

#sweetspot-select{
  width: 100% !important;
  max-width: 360px !important;
}

.sweetspot__selected{
  max-height: 84px !important;
}


/* Teacher dashboard: Sweet Spot share-row hint */
.share-row__hint{
  font-size: 13px;
  color: var(--muted);
  line-height: 1.2;
  align-self: center;
}

/* Info modal typography: keep top line and read time aligned */
#info-hook,
#info-tags{
  font-size: 14px;
}
