:root {
  --bg: #1c1c20;
  --bg-elevated: #242428;
  --bg-card: #2a2a2e;
  --bg-soft: #303034;
  --text: #f2f2f3;
  --text-secondary: #a8a8b0;
  --text-muted: #75757e;
  --amber: #f0a020;
  --amber-soft: rgba(240, 160, 32, 0.16);
  --font: 'Poppins', system-ui, sans-serif;
  --radius: 16px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button, select { font-family: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}
.content-narrow {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(28, 28, 32, 0.92);
  backdrop-filter: blur(14px);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 60px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.logo img { border-radius: 7px; }
.logo .dot { color: var(--amber); }

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  justify-content: center;
}
.nav-link {
  padding: 6px 11px;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.15s, background 0.15s;
}
.nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lang-wrap { position: relative; }
.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
}
.lang-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.08); }
.lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 140px;
  background: var(--bg-card);
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  z-index: 50;
}
.lang-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
}
.lang-menu button:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.btn-chrome {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 0.84rem;
  font-weight: 600;
  transition: background 0.15s;
}
.btn-chrome:hover { background: rgba(240, 160, 32, 0.26); }

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
}
.menu-toggle span {
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
}

/* Hero — centered */
.hero {
  padding: 56px 0 28px;
}
.hero-center {
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}
.hero h1 {
  font-size: clamp(1.85rem, 4.2vw, 2.65rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 16px;
}
.hero-desc {
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}
.mark {
  color: var(--amber);
  text-decoration: underline;
  text-decoration-color: rgba(240, 160, 32, 0.55);
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
}

/* PDF section */
.pdf-section { padding: 12px 0 48px; }
.pdf-app {
  background: var(--bg-card);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  margin-bottom: 36px;
}
.pdf-dropzone {
  padding: 52px 28px;
  text-align: center;
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.pdf-dropzone.dragover { background: rgba(240, 160, 32, 0.08); }
.pdf-dropzone[hidden],
.pdf-viewer[hidden] { display: none !important; }

.dropzone-inner { max-width: 360px; }
.dropzone-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--amber-soft);
  color: var(--amber);
  display: flex;
  align-items: center;
  justify-content: center;
}
.dropzone-hint {
  margin-top: 12px;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.dropzone-privacy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 12px;
  border: none;
  background: var(--amber);
  color: #1a1200;
  font-weight: 600;
  font-size: 0.95rem;
  transition: opacity 0.2s, transform 0.2s;
}
.btn-primary:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.pdf-viewer { display: flex; flex-direction: column; }
.pdf-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.2);
  flex-wrap: wrap;
}
.pdf-toolbar-left,
.pdf-toolbar-center,
.pdf-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pdf-tool-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pdf-tool-btn:hover { background: rgba(255, 255, 255, 0.12); }
.pdf-page-info {
  font-size: 0.85rem;
  color: var(--text-secondary);
  min-width: 64px;
  text-align: center;
}
.pdf-theme-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.pdf-select {
  appearance: none;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  border-radius: 8px;
  color: var(--text);
  padding: 8px 28px 8px 12px;
  font-size: 0.85rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a8a8b0' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.pdf-select option { background: #2a2a2e; color: #f2f2f3; }
#pdf-zoom-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  min-width: 42px;
  text-align: center;
}
.pdf-canvas-wrap {
  overflow: auto;
  max-height: 70vh;
  background: #1a1a1a;
  display: flex;
  justify-content: center;
  padding: 24px;
}
#pdf-canvas {
  max-width: 100%;
  height: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  border-radius: 4px;
  transition: filter 0.25s;
}
.pdf-theme-classic #pdf-canvas { filter: invert(0.9) hue-rotate(180deg); }
.pdf-theme-warm #pdf-canvas { filter: invert(0.88) hue-rotate(180deg) sepia(0.25) contrast(0.95); }
.pdf-theme-blue #pdf-canvas { filter: invert(0.9) hue-rotate(190deg) saturate(0.85); }
.pdf-theme-green #pdf-canvas { filter: invert(0.88) hue-rotate(160deg) sepia(0.15); }
.pdf-theme-oled #pdf-canvas { filter: invert(1) hue-rotate(180deg) contrast(1.05); }
.pdf-theme-original #pdf-canvas { filter: none; }
.pdf-filename {
  padding: 10px 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  background: rgba(0, 0, 0, 0.15);
}

/* Theme showcase */
.theme-showcase {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 16px;
  align-items: end;
}
.theme-card {
  text-align: center;
}
.theme-pages {
  display: flex;
  gap: 0;
  justify-content: center;
  margin-bottom: 10px;
}
.theme-page {
  width: 100%;
  min-height: 140px;
  border-radius: 10px;
  padding: 14px 12px;
  text-align: left;
  font-size: 0.58rem;
  line-height: 1.45;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}
.theme-pages .theme-page {
  width: 48%;
  min-height: 130px;
}
.theme-pages .theme-page:first-child {
  border-radius: 10px 0 0 10px;
}
.theme-pages .theme-page:last-child {
  border-radius: 0 10px 10px 0;
}
.tp-chapter {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}
.theme-page.light {
  background: #f7f5f0;
  color: #2a2824;
}
.theme-page.warm {
  background: #2a2418;
  color: #e8d9c0;
}
.theme-page.classic {
  background: #121212;
  color: #e8e8e8;
}
.theme-page.blue {
  background: #141a24;
  color: #d0d8e8;
}
.theme-page.green {
  background: #141c16;
  color: #d0e0d4;
}
.theme-name {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Content blocks */
.content-block {
  padding: 56px 0;
}
.content-block.alt {
  background: rgba(0, 0, 0, 0.15);
}
.content-block h2 {
  font-size: clamp(1.45rem, 2.8vw, 1.85rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  text-align: center;
  margin-bottom: 20px;
}
.content-narrow p {
  color: var(--text-secondary);
  margin-bottom: 14px;
  text-align: center;
  line-height: 1.7;
}
.section-lead {
  text-align: center;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 28px;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 8px;
}
.why-card {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 22px 18px;
  text-align: center;
}
.why-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.why-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.steps {
  list-style: none;
  counter-reset: step;
  text-align: left;
  max-width: 560px;
  margin: 0 auto;
}
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 14px;
  margin-bottom: 22px;
  align-items: start;
}
.steps li::before {
  content: counter(step);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--amber-soft);
  color: var(--amber);
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.steps strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 4px;
}
.steps span {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.faq-list {
  text-align: left;
  max-width: 600px;
  margin: 0 auto;
}
.faq-item {
  background: var(--bg-card);
  border-radius: 12px;
  margin-bottom: 10px;
  padding: 0 18px;
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 1.2rem;
  color: var(--text-muted);
  font-weight: 300;
}
.faq-item[open] summary::after { content: '−'; }
.faq-item p {
  padding: 0 0 16px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
  text-align: left;
}

.tools-teaser {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.teaser-card {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 20px 16px;
  text-align: center;
}
.teaser-cat {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--amber);
}
.teaser-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 8px 0 6px;
}
.teaser-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Footer */
.footer {
  background: var(--bg-elevated);
  padding: 48px 0 0;
  margin-top: 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 36px;
}
.footer-brand p {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 260px;
}
.footer-col h4 {
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
}
.footer-col a {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.footer-col a:hover { color: var(--text-secondary); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding: 18px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 960px) {
  .nav { display: none; }
  .menu-toggle { display: flex; margin-left: auto; }
  .why-grid,
  .tools-teaser { grid-template-columns: 1fr 1fr; }
  .theme-showcase { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .why-grid,
  .tools-teaser,
  .theme-showcase { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .header-actions .btn-chrome span { /* keep short */ }
  .hero { padding: 36px 0 20px; }
}

/* ===== v2 overrides ===== */
.mark { color: inherit; text-decoration: underline; text-decoration-color: var(--amber); text-decoration-thickness: 3px; text-underline-offset: 6px; text-decoration-skip-ink: none; }
.hero-desc .mark { text-decoration-thickness: 2px; text-underline-offset: 4px; }
.hero-center { max-width: 760px; }
.flag { display: inline-block; width: 20px; height: 20px; border-radius: 50%; overflow: hidden; flex: none; box-shadow: none; }
.flag svg { width: 100%; height: 100%; display: block; }
.lang-menu button { display: flex; align-items: center; gap: 10px; }
.btn-chrome { background: #3a3a42; color: #f0f0f2; border: none; }
.btn-chrome:hover { background: #484850; }
.pdf-dropzone { margin: 14px; border: 2px dashed rgba(255,255,255,.14); border-radius: 14px; min-height: 280px; }
.pdf-dropzone.dragover { border-color: var(--amber); }
.theme-showcase { grid-template-columns: 1.6fr 1fr 1fr 1fr; align-items: stretch; }
.theme-card { display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; }
.theme-pages { display: flex; align-items: stretch; position: relative; margin: 0; }
.theme-page { font-family: 'Literata', 'Source Serif 4', 'Iowan Old Style', 'Palatino Linotype', Palatino, serif; font-size: .56rem; line-height: 1.5; padding: 16px 14px; min-height: 170px; flex: 1; }
.theme-pages .theme-page { width: auto; min-height: 170px; }
.theme-arrow { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: 22px; height: 22px; border-radius: 50%; background: #fff; color: #222; font-size: .75rem; display: flex; align-items: center; justify-content: center; z-index: 2; }
.tp-chapter { font-family: 'Literata', 'Source Serif 4', Palatino, serif; font-size: .8rem; margin-bottom: 8px; }
.theme-name { text-align: center; }
.content-block { text-align: center; }
.content-block h2 { margin-bottom: 22px; }
.block-lead { max-width: 820px; margin: 0 auto 14px; color: var(--text-secondary); line-height: 1.75; }
.why-grid { margin-top: 28px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: none; margin-top: 28px; text-align: center; }
.steps li { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 0; background: var(--bg-card); border-radius: 14px; padding: 24px 20px; }
.steps span { display: block; }
.faq-list { max-width: none; margin-top: 28px; text-align: center; }
.faq-item summary { justify-content: center; gap: 14px; text-align: center; }
.faq-item p { text-align: center; max-width: 760px; margin: 0 auto; }
@media (max-width: 960px) { .theme-showcase { grid-template-columns: 1fr 1fr; } .theme-card.wide { grid-column: 1 / -1; } .steps { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .theme-showcase { grid-template-columns: 1fr; } }

/* ===== v3: sheet-style theme previews ===== */
.showcase-panel { margin-top: 8px; padding: 36px 28px 28px; border-radius: 22px; background-color: #2b2b31; background-image: radial-gradient(rgba(255,255,255,.16) 1.2px, transparent 1.4px); background-size: 18px 18px; border: 1px solid rgba(255,255,255,.08); box-shadow: inset 0 0 60px rgba(0,0,0,.25); }
.theme-showcase { grid-template-columns: 2fr 1fr 1fr 1fr; gap: 22px; align-items: start; }
.theme-card { justify-content: flex-start; }
.theme-pages { gap: 0; }
.sheet { flex: 1; display: flex; flex-direction: column; aspect-ratio: 3 / 4; padding: 18px 16px 10px; overflow: hidden; border-radius: 6px; font-family: 'Literata', 'Source Serif 4', 'Iowan Old Style', 'Palatino Linotype', Palatino, serif; border: 1px solid rgba(255,255,255,.18); box-shadow: 0 6px 16px rgba(0,0,0,.22); }
.theme-pages .sheet:first-child { border-radius: 6px 0 0 6px; border-right: none; }
.theme-pages .sheet:last-child { border-radius: 0 6px 6px 0; border-left: none; }
.sheet-body { flex: 1; overflow: hidden; }
.sheet .tp-chapter { font-size: .95rem; font-weight: 700; margin-bottom: 10px; }
.sheet p { font-size: .6rem; line-height: 1.6; text-align: justify; hyphens: auto; margin-bottom: 6px; text-indent: 1.2em; color: inherit; }
.sheet p:first-of-type { text-indent: 0; }
.sheet-foot { display: flex; justify-content: space-between; font-size: .5rem; opacity: .55; padding-top: 6px; border-top: 1px solid currentColor; }
.sheet.light { background: #f7f5f0; color: #2a2824; }
.sheet.warm { background: #2d261a; color: #eadcc3; }
.sheet.classic { background: #151515; color: #ececec; }
.sheet.blue { background: #172033; color: #d6deee; }
.sheet.green { background: #15241a; color: #d6e6da; }
.theme-name { color: var(--text-secondary); margin-top: 4px; }
@media (max-width: 960px) { .theme-showcase { grid-template-columns: 1fr 1fr 1fr; } .theme-card.wide { grid-column: 1 / -1; } }
@media (max-width: 600px) { .theme-showcase { grid-template-columns: 1fr; } .showcase-panel { padding: 22px 14px; } .sheet p { font-size: .72rem; } }

/* v4: no dotted background */
.showcase-panel { background-image: none; background-color: transparent; border: none; box-shadow: none; padding: 8px 0 0; }

/* ===== v5 ===== */
.header .container { max-width: 1240px; }
.header-inner { height: 74px; gap: 24px; }
.header .logo { font-size: 1.3rem; gap: 11px; }
.header .logo img { width: 38px; height: 38px; border-radius: 9px; }
.nav-link { font-size: 1rem; padding: 9px 15px; }
.lang-btn {
  font-size: .9rem;
  padding: 6px 4px;
  gap: 7px;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
.lang-btn:hover {
  background: transparent !important;
  color: var(--text);
}
.lang-btn .flag { width: 24px; height: 24px; }
.lang-menu { min-width: 170px; }
.lang-menu button { font-size: .95rem; padding: 10px 12px; }
.header-actions { gap: 12px; }
.btn-chrome { background: #3a3a42; color: #f0f0f2; border-radius: 11px; padding: 10px 18px; font-size: .95rem; gap: 10px; border: none !important; box-shadow: none; }
.btn-chrome:hover { background: #484850; border: none; }
.btn-chrome img { width: 22px; height: 22px; display: block; }

/* hero */
.hero { padding: 68px 0 34px; }
.hero-center { max-width: 960px; }
.hero h1 { font-size: clamp(1.85rem, 4.2vw, 2.65rem); line-height: 1.2; margin-bottom: 16px; }
.hero-desc { font-size: clamp(0.95rem, 1.5vw, 1.1rem); line-height: 1.65; max-width: 620px; margin-left: auto; margin-right: auto; }

/* brush underline, painted behind the word */
.mark { position: relative; display: inline-block; z-index: 0; text-decoration: none; color: inherit; }
.mark::after { content: ''; position: absolute; z-index: -1; left: -5%; right: -5%; bottom: .02em; height: .42em; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 30' preserveAspectRatio='none'%3E%3Cpath fill='%23f2b01e' d='M3 17 C9 8 26 11 48 9 C74 7 96 11 126 8 C152 6 178 9 196 7 C199 12 197 16 198 21 C176 22 160 20 134 23 C108 26 82 21 58 24 C36 26 18 24 5 25 C1 23 2 20 3 17 Z'/%3E%3Cpath fill='%23f2b01e' d='M14 5 C40 3 70 5 92 4 L90 9 C60 9 36 8 12 9 Z' opacity='.55'/%3E%3C/svg%3E") center / 100% 100% no-repeat; pointer-events: none; }
.mark:nth-of-type(2n)::after { transform: scaleX(-1) rotate(-1.2deg); height: .46em; }
.hero-desc .mark::after { height: .5em; bottom: .0em; }

/* dropzone */
.dropzone-inner { max-width: none; }
.dropzone-privacy { display: flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; font-size: .85rem; }
.dropzone-privacy svg { flex: none; display: block; }

/* sheets: no outline */
.sheet { border: none !important; }
.theme-pages .sheet:first-child, .theme-pages .sheet:last-child { border: none !important; }

/* about block */
#about-pdf h2 { font-size: clamp(1.9rem, 4vw, 2.7rem); margin-bottom: 30px; }
.about-text { width: 100%; }
.about-text p { font-size: 1.1rem; line-height: 1.75; color: var(--text-secondary); text-align: center; margin: 0 0 16px; max-width: 680px; margin-left: auto; margin-right: auto; }
.block-title {
  font-size: clamp(1.25rem, 2.2vw, 1.55rem) !important;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 18px !important;
}
.block-title .mark {
  color: var(--amber);
  text-decoration: underline;
  text-decoration-color: rgba(240,160,32,0.5);
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}

@media (max-width: 1100px) { .nav-link { padding: 8px 10px; font-size: .92rem; } }
@media (max-width: 960px) { .header-inner { height: 66px; } .nav-link { font-size: 1rem; } }
@media (max-width: 600px) { .dropzone-privacy { white-space: normal; text-align: left; font-size: .8rem; } .btn-chrome { padding: 8px 12px; } .hero { padding: 40px 0 22px; } }

/* ===== v5 user tweaks ===== */
.hero h1 {
  font-size: clamp(1.65rem, 3.6vw, 2.35rem);
}
.hero-desc {
  font-size: clamp(0.88rem, 1.3vw, 1rem);
  max-width: 580px;
}

/* Lang: no background */
.lang-btn {
  background: transparent !important;
  padding: 4px 6px !important;
  border: none !important;
  box-shadow: none !important;
  gap: 8px;
}
.lang-btn:hover {
  background: transparent !important;
  color: var(--text);
}
.lang-btn .flag {
  box-shadow: none;
  outline: none;
}

/* Install free: lighter gray than site bg, no border */
.btn-chrome {
  background: #3e3e46 !important;
  color: #ececf0 !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}
.btn-chrome:hover {
  background: #4a4a54 !important;
  border: none !important;
}

/* Dropzone icon: circular */
.dropzone-icon {
  width: 76px;
  height: 76px;
  border-radius: 50% !important;
  background: var(--amber-soft);
  color: var(--amber);
}

/* Theme cards: different serif (Crimson Pro via system fallbacks) */
.sheet,
.sheet .tp-chapter,
.sheet p,
.theme-page,
.tp-chapter {
  font-family: 'Crimson Pro', 'Georgia', 'Times New Roman', serif !important;
}
.sheet .tp-chapter {
  font-weight: 700;
  letter-spacing: 0.01em;
}
.sheet p {
  font-size: 0.62rem;
  line-height: 1.55;
}

/* About block */
.block-title {
  font-size: clamp(1.15rem, 2.2vw, 1.4rem) !important;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 18px !important;
}
.block-title .mark {
  color: var(--amber);
  text-decoration: underline;
  text-decoration-color: rgba(240, 160, 32, 0.5);
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
}
.about-text {
  max-width: 640px;
  margin: 0 auto;
}
.about-text p {
  font-size: 1.1rem !important;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 12px;
  text-align: center;
}

/* ===== v6: hero size, tool card layout, about card ===== */
.hero h1 {
  font-size: clamp(2rem, 4.5vw, 2.85rem) !important;
  line-height: 1.18 !important;
  margin-bottom: 18px !important;
}
.hero-desc {
  font-size: clamp(1.05rem, 1.8vw, 1.2rem) !important;
  line-height: 1.65 !important;
  max-width: 680px !important;
}

/* PDF app card like screenshot */
.pdf-app {
  background: var(--bg-card);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  margin-bottom: 36px;
  padding: 0 0 8px;
}
.pdf-app-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 8px;
  flex-wrap: wrap;
}
.pdf-app-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.pdf-app-title h2 {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
}
.pdf-app-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.pdf-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-right: 4px;
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.5);
}
.btn-soft {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.btn-soft:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.11);
  color: var(--text);
}
.btn-soft:disabled {
  opacity: 0.55;
  cursor: default;
}
.lib-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
}

.pdf-dropzone {
  margin: 12px 20px 8px !important;
  border: 2px dashed rgba(255, 255, 255, 0.14) !important;
  border-radius: 16px !important;
  min-height: 240px !important;
  padding: 40px 24px !important;
  background: rgba(0, 0, 0, 0.12);
}
.pdf-dropzone.dragover {
  border-color: var(--amber) !important;
  background: rgba(240, 160, 32, 0.08);
}
.dropzone-icon {
  width: 56px !important;
  height: 56px !important;
  border-radius: 50% !important;
  background: var(--amber-soft) !important;
  color: var(--amber) !important;
  margin: 0 auto 16px !important;
}
.dropzone-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.dropzone-hint {
  margin-top: 0 !important;
  margin-bottom: 18px;
  font-size: 0.85rem !important;
  color: var(--text-muted);
}
.dropzone-btns {
  display: flex;
  justify-content: center;
  gap: 10px;
}
.pdf-app-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.pdf-app-foot svg {
  color: #4ade80;
  flex-shrink: 0;
}

/* About card */
#about-pdf .container {
  max-width: 900px;
}
.about-card {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 40px 36px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}
.block-title {
  font-size: clamp(1.55rem, 3.2vw, 2.1rem) !important;
  font-weight: 600 !important;
  letter-spacing: -0.025em !important;
  margin-bottom: 22px !important;
  text-align: center;
}
.about-text {
  max-width: 720px !important;
  margin: 0 auto !important;
}
.about-text p {
  font-size: 1.1rem !important;
  line-height: 1.75 !important;
  color: var(--text-secondary) !important;
  text-align: justify !important;
  margin: 0 0 14px !important;
  max-width: none !important;
}
.about-text p:last-child {
  margin-bottom: 0 !important;
}

@media (max-width: 720px) {
  .pdf-app-header {
    flex-direction: column;
  }
  .pdf-app-actions {
    width: 100%;
  }
  .about-card {
    padding: 28px 20px;
  }
  .about-text p {
    text-align: left !important;
  }
}

/* ===== v7: install btn, about card width & title ===== */
.btn-chrome {
  background: #29292c !important;
  color: #ececf0 !important;
  border: none !important;
  box-shadow: none !important;
}
.btn-chrome:hover {
  background: #343438 !important;
}

#about-pdf .container {
  max-width: 1080px !important; /* same as page container */
  width: 100%;
}
.about-card {
  background: #232327 !important;
  border-radius: 20px;
  padding: 44px 40px;
  width: 100%;
  box-shadow: none;
}
.block-title {
  font-size: 1.6rem !important;
  font-weight: 600 !important;
  letter-spacing: -0.02em !important;
  margin-bottom: 24px !important;
  text-align: center;
  line-height: 1.3;
}
.content-block h2.block-title,
.content-block h2 {
  font-size: 1.6rem !important;
  font-weight: 600 !important;
}
.about-text {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
}
.about-text p {
  font-size: 1.1rem !important;
  line-height: 1.75 !important;
  color: var(--text-secondary) !important;
  text-align: justify !important;
  margin: 0 0 16px !important;
  max-width: none !important;
}
.about-text p:last-child {
  margin-bottom: 0 !important;
}

@media (max-width: 720px) {
  .about-card { padding: 28px 20px; }
  .about-text p { text-align: left !important; }
}

/* ===== v8: force install color, about full-width, titles ===== */
.btn-chrome,
a.btn-chrome {
  background: #29292c !important;
  color: #ececf0 !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}
.btn-chrome:hover,
a.btn-chrome:hover {
  background: #343438 !important;
}

#about-pdf {
  padding-left: 0;
  padding-right: 0;
}
#about-pdf .container {
  max-width: 1080px !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 24px !important;
  padding-right: 24px !important;
}
.about-card {
  background: #232327 !important;
  border-radius: 20px !important;
  padding: 48px 40px !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  box-shadow: none !important;
  border: none !important;
}
#about-pdf .block-title,
.block-title {
  font-size: 1.6rem !important;
  font-weight: 600 !important;
  letter-spacing: -0.02em !important;
  margin-bottom: 24px !important;
  text-align: center !important;
  line-height: 1.3 !important;
  background: none !important;
  display: block !important;
  width: 100% !important;
}
.content-block h2,
.content-block h2.block-title {
  font-size: 1.6rem !important;
  font-weight: 600 !important;
}
.about-text {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
}
.about-text p {
  font-size: 1.1rem !important;
  line-height: 1.75 !important;
  color: var(--text-secondary) !important;
  text-align: justify !important;
  margin: 0 0 16px !important;
  max-width: none !important;
  width: 100% !important;
}
.about-text p:last-child {
  margin-bottom: 0 !important;
}


/* ===== v9: softer theme shadows, about without card ===== */
.sheet {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2) !important;
}
.theme-page {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18) !important;
}
.showcase-panel {
  box-shadow: none !important;
}

#about-pdf .about-card {
  display: contents;
}
#about-pdf .block-title {
  font-size: 1.6rem !important;
  font-weight: 600 !important;
  text-align: center !important;
  margin-bottom: 18px !important;
  color: var(--text) !important;
  background: none !important;
  text-decoration: none !important;
}
#about-pdf .block-title .mark {
  color: inherit !important;
  text-decoration: none !important;
  background: none !important;
}
#about-pdf .about-text {
  max-width: 820px !important;
  margin: 0 auto !important;
  width: 100% !important;
}
#about-pdf .about-text p {
  color: #f0f0f2 !important;
  text-align: justify !important;
  font-size: 1.1rem !important;
  line-height: 1.7 !important;
  margin: 0 0 0.55em !important;
}
#about-pdf .about-text p:last-child {
  margin-bottom: 0 !important;
}


/* ===== v10: softer upload card, about card back, section bg ===== */
.pdf-app {
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.16) !important;
}

#about-pdf {
  position: relative;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(240, 160, 32, 0.06) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 50% 100%, rgba(255, 255, 255, 0.02) 0%, transparent 50%),
    #1a1a1e;
  padding: 56px 0;
}

#about-pdf .about-card {
  display: block !important;
  background: #1f1f24 !important;
  border-radius: 20px !important;
  padding: 44px 40px !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  box-shadow: none !important;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

#about-pdf .block-title {
  font-size: 1.6rem !important;
  font-weight: 600 !important;
  text-align: center !important;
  margin-bottom: 20px !important;
  color: #f2f2f3 !important;
  background: none !important;
}

#about-pdf .block-title .mark {
  color: #f0a020 !important;
  text-decoration: none !important;
  background: none !important;
}

#about-pdf .about-text {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
}

#about-pdf .about-text p {
  color: #e8e8ec !important;
  text-align: justify !important;
  font-size: 1.1rem !important;
  line-height: 1.7 !important;
  margin: 0 0 0.55em !important;
}

#about-pdf .about-text p:last-child {
  margin-bottom: 0 !important;
}

@media (max-width: 720px) {
  #about-pdf .about-card {
    padding: 28px 20px !important;
  }
  #about-pdf .about-text p {
    text-align: left !important;
  }
}

/* ===== v11: plain about section, no underline, gray body text ===== */
#about-pdf {
  background: transparent !important;
  padding: 48px 0 !important;
}

#about-pdf .about-card {
  background: #1f1f24 !important;
  border: none !important;
  box-shadow: none !important;
}

#about-pdf .block-title {
  text-decoration: none !important;
}
#about-pdf .block-title .mark {
  color: #f0a020 !important;
  text-decoration: none !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
}

#about-pdf .about-text p {
  color: var(--text-secondary) !important; /* gray, not white */
}

/* ===== v12: no underline under Dark Page in about title ===== */
#about-pdf .block-title .mark,
#about-pdf .block-title .mark::after {
  text-decoration: none !important;
  background: none !important;
  background-image: none !important;
  box-shadow: none !important;
  border: none !important;
}
#about-pdf .block-title .mark::after {
  content: none !important;
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}
#about-pdf .block-title .mark {
  color: #f0a020 !important;
  position: static !important;
}

/* ===== dot grid: header through the "A Dark Page" block, faded top and bottom ===== */
.dots-bg {
  position: relative;
  isolation: isolate;
}
.dots-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(255,255,255,.06) 1.1px, transparent 1.5px);
  background-size: 20px 20px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, rgba(0,0,0,.35) 140px, #000 360px, #000 calc(100% - 420px), rgba(0,0,0,.35) calc(100% - 180px), transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0, rgba(0,0,0,.35) 140px, #000 360px, #000 calc(100% - 420px), rgba(0,0,0,.35) calc(100% - 180px), transparent 100%);
}
/* let the dots show through the sticky header and the sections */
.header {
  background: rgba(28, 28, 32, 0.7) !important;
}
.pdf-section,
#about-pdf {
  background: transparent !important;
}

/* ===== v-final: type scale matched to "A Dark Page" block, new cards, FAQ redesign ===== */
.btn-chrome svg { display: block; flex: none; }

/* headings: same as #about-pdf .block-title (25.6px / 600) */
#why .block-title,
#how .block-title,
#faq .block-title {
  font-size: 25.6px;
  font-weight: 600;
  letter-spacing: -0.512px;
  line-height: 1.3;
  text-align: center;
  margin-bottom: 20px;
  color: var(--text);
}

/* body text: same as #about-pdf paragraphs (17.6px / 1.7, secondary colour) */
#why .why-card p,
#how .steps li > div > span,
#faq .faq-card p,
#faq .faq-lead {
  font-size: 17.6px;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* sub-headings inside cards: 19.2px / 600 */
#why .why-card h3,
#how .steps strong,
#faq .faq-card h3 {
  font-size: 19.2px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  margin-bottom: 8px;
}

/* shared icon tile in our amber style */
.ico {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--amber-soft);
  color: var(--amber);
  display: grid;
  place-items: center;
}

/* Why cards */
#why .why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
#why .why-card {
  background: #232327;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 18px;
  padding: 28px 28px 30px;
}
#why .why-card .ico { margin-bottom: 18px; }

/* How: numbered steps */
#how .steps {
  list-style: none;
  display: grid;
  gap: 16px;
  max-width: 760px;
  margin: 0 auto;
}
#how .steps li {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: #232327;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 18px;
  padding: 22px 26px;
}
#how .step-num {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--amber);
  color: #1c1c20;
  font-weight: 700;
  font-size: 17.6px;
  display: grid;
  place-items: center;
}
#how .steps li > div { display: flex; flex-direction: column; }
#how .steps strong { margin-bottom: 4px; }

/* FAQ: stacked cards with icon tile, like the reference */
#faq .faq-lead {
  text-align: center;
  margin: 0 auto 28px;
  max-width: 640px;
}
#faq .faq-list {
  display: grid;
  gap: 14px;
  max-width: 920px;
  margin: 0 auto;
}
#faq .faq-card {
  display: flex;
  gap: 22px;
  align-items: flex-start;
  background: #232327;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 18px;
  padding: 24px 28px;
}
#faq .faq-card > div { min-width: 0; }

@media (max-width: 860px) {
  #why .why-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  #why .why-grid { grid-template-columns: 1fr; }
  #why .block-title, #how .block-title, #faq .block-title { font-size: 22px; }
  #why .why-card p, #how .steps span, #faq .faq-card p, #faq .faq-lead { font-size: 16px; }
}

/* ===== v-final fixes: remove old step counter, left-align cards ===== */
#how .steps li::before,
#how .steps li::after,
#how .steps li > span:first-child:not(.step-num) { content: none !important; display: none !important; }
#how .steps { counter-reset: none; }
#how .steps li,
#why .why-card,
#faq .faq-card { text-align: left; }
#how .steps li > div { text-align: left; }

#how .step-num { color: #1c1c20; font-size: 17.6px; }

/* ===== v10: qooly type scale, filled icons, #1d1d20 Why block, subtitles ===== */
#about-pdf .block-title,
#why .block-title,
#how .block-title,
#faq .block-title,
.content-block h2.block-title {
  font-family: var(--font) !important;
  font-size: 35.2px !important;
  font-weight: 600 !important;
  line-height: 1.8 !important;
  letter-spacing: 0 !important;
  margin: 0 0 0 !important;
  color: var(--text) !important;
}
.block-sub {
  font-family: var(--font);
  font-size: 16px !important;
  font-weight: 400;
  line-height: 1.8 !important;
  color: var(--text-secondary) !important;
  text-align: center;
  max-width: 680px;
  margin: 0 auto 36px !important;
}
#about-pdf .block-sub { margin-bottom: 24px !important; }
#about-pdf .about-text p { font-size: 16px !important; line-height: 1.8 !important; text-align: center !important; }

#why { background: #1d1d20 !important; }
#why .why-card p,
#how .steps li > div > span,
#faq .faq-card p {
  font-size: 16px !important;
  line-height: 1.8 !important;
}
#why .why-card h3,
#how .steps strong,
#faq .faq-card h3 {
  font-size: 17.6px !important;
  font-weight: 600 !important;
}
#why .why-card h3 { font-size: 24px !important; line-height: 1.3 !important; }

/* icons: solid glyph on a filled circle */
.ico {
  width: 56px !important;
  height: 56px !important;
  border-radius: 50% !important;
  background: var(--amber) !important;
  color: #1c1c20 !important;
  flex: none;
}
.ico svg { width: 26px; height: 26px; display: block; }
#why .why-card .ico { margin: 0 auto 20px; }
#faq .faq-card .ico { width: 48px !important; height: 48px !important; }
#faq .faq-card .ico svg { width: 22px; height: 22px; }

/* how-to numbers stay filled circles, same size as icons */
#how .step-num { width: 56px !important; height: 56px !important; font-size: 19.2px !important; }

@media (max-width: 600px) {
  #about-pdf .block-title, #why .block-title, #how .block-title, #faq .block-title,
  .content-block h2.block-title { font-size: 28px !important; }
  #why .why-card h3 { font-size: 20px !important; }
}

/* ===== v11: justified text, icons left, no outlines, How without card backgrounds ===== */
#about-pdf .about-card { border: none !important; }
#about-pdf .about-text p {
  text-align: justify !important;
  text-align-last: auto !important;
  hyphens: auto;
}

/* Why: icon on the left, smaller type, no outline */
#why .why-card {
  display: grid !important;
  grid-template-columns: 56px 1fr !important;
  column-gap: 18px !important;
  row-gap: 6px !important;
  align-items: start !important;
  text-align: left !important;
  border: none !important;
  padding: 24px 26px !important;
}
#why .why-card .ico { margin: 0 !important; grid-row: 1 / span 2; grid-column: 1; }
#why .why-card h3 { grid-column: 2; grid-row: 1; font-size: 20px !important; margin: 0 !important; line-height: 1.3 !important; }
#why .why-card p { grid-column: 2; grid-row: 2; font-size: 15px !important; line-height: 1.7 !important; margin: 0 !important; }

/* How: no card background, same icon-left layout as Why */
#how .steps {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 28px 36px !important;
  max-width: none !important;
}
#how .steps li {
  display: flex !important;
  align-items: flex-start !important;
  gap: 18px !important;
  background: none !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  text-align: left !important;
}
#how .steps li > div { text-align: left !important; }
#how .steps strong { font-size: 20px !important; line-height: 1.3 !important; }
#how .steps li > div > span { font-size: 15px !important; line-height: 1.7 !important; }
#how .step-num { margin-top: 0 !important; }

/* FAQ: justified answers, no outline, full content width like the other blocks */
#faq .faq-list { max-width: none !important; }
#faq .faq-card { border: none !important; }
#faq .faq-card p { text-align: justify !important; }

@media (max-width: 860px) {
  #how .steps { grid-template-columns: 1fr !important; }
}

/* ===== v12: FAQ card colour, orange step numbers, smaller Why icons, Tips block ===== */
#faq .faq-card { background: #1f1f24 !important; }

#why .why-card { grid-template-columns: 44px 1fr !important; }
#why .why-card .ico { width: 44px !important; height: 44px !important; }
#why .why-card .ico svg { width: 20px !important; height: 20px !important; }

#how .step-num {
  width: auto !important;
  height: auto !important;
  background: none !important;
  color: var(--amber) !important;
  font-size: 28px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  display: block !important;
  min-width: 18px;
}

#tips .tips-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px 36px;
  margin-top: 8px;
  text-align: left;
}
#tips .tip { display: flex; flex-direction: column; gap: 8px; }
#tips .tip-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
}
#tips .tip h3 { font-size: 20px; font-weight: 600; line-height: 1.3; color: var(--text); margin: 0; }
#tips .tip p { font-size: 15px; line-height: 1.7; color: var(--text-secondary); margin: 0; }
@media (max-width: 860px) {
  #tips .tips-grid { grid-template-columns: 1fr; }
}

/* ===== v13: equal icon size in FAQ, separated Tips / How bands, closing CTA ===== */
#faq .faq-card .ico { width: 44px !important; height: 44px !important; }
#faq .faq-card .ico svg { width: 20px !important; height: 20px !important; }

/* each block gets its own band, so Tips and How read as separate sections */
#tips.tips-block { background: #18181b !important; padding: 80px 0 !important; }
#how.how-block { background: #1c1c20 !important; padding: 80px 0 !important; }
#tips.tips-block .block-title, #how.how-block .block-title { margin-bottom: 0 !important; }

/* closing CTA */
.cta-block { padding: 72px 0 88px !important; }
.cta-panel {
  background: #232327;
  border-radius: 24px;
  padding: 56px 40px;
  text-align: center;
  max-width: 920px;
  margin: 0 auto;
}
.cta-panel .block-sub { margin-bottom: 28px !important; }
.cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cta-btn { padding: 14px 26px; font-size: 16px; border-radius: 12px; text-decoration: none; display: inline-flex; align-items: center; }
@media (max-width: 600px) {
  .cta-panel { padding: 40px 22px; }
}

/* ===== v14: whole page #1c1c20, store block (Chrome / Edge) replaces closing CTA ===== */
body, section, footer, .footer, .pdf-section { background-color: #1c1c20 !important; }
.content-block.alt, #why, #faq, #tips.tips-block, #how.how-block { background: #1c1c20 !important; }

.stores-block { padding: 72px 0 88px !important; }
.stores-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  background: #232327;
  border-radius: 24px;
  padding: 56px 52px;
  text-align: left;
}
.stores-visual { position: relative; height: 340px; }
.mock-sheet {
  position: absolute;
  background: #2a2a2e;
  border-radius: 14px;
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
  font-family: 'Literata', 'Source Serif 4', Georgia, serif;
}
.mock-sheet--a { left: 0; top: 0; width: 58%; height: 300px; background: #2b2722; transform: rotate(-3deg); }
.mock-sheet--b { right: 0; bottom: 0; width: 56%; height: 270px; background: #222630; transform: rotate(3deg); }
.mock-tone {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 8px;
}
.mock-line { display: block; height: 7px; border-radius: 4px; background: rgba(240, 232, 218, 0.22); }
.mock-line.gap { height: 12px; background: none; }
.mock-sheet--b .mock-line { background: rgba(200, 214, 235, 0.22); }
.w40 { width: 40%; } .w60 { width: 60%; } .w65 { width: 65%; } .w70 { width: 70%; }
.w80 { width: 80%; } .w85 { width: 85%; } .w88 { width: 88%; } .w90 { width: 90%; }
.w92 { width: 92%; } .w95 { width: 95%; } .w96 { width: 96%; } .w100 { width: 100%; }

.stores-title {
  font-size: 35.2px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
  margin: 0 0 28px;
}
.stores-steps { list-style: none; display: grid; gap: 14px; margin: 0 0 36px; padding: 0; }
.stores-steps li { display: flex; align-items: baseline; gap: 16px; font-size: 19px; color: var(--text); }
.stores-num { font-size: 14px; font-weight: 600; color: var(--amber); min-width: 26px; }

.stores-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.2s var(--ease), background 0.2s;
}
.store-btn svg { width: 20px; height: 20px; flex: none; }
.store-btn--light { background: #f2f2f3; color: #1c1c20; }
.store-btn--light:hover { transform: translateY(-1px); background: #ffffff; }
.store-btn--outline { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18); }
.store-btn--outline:hover { transform: translateY(-1px); background: rgba(255, 255, 255, 0.06); }
.stores-note { margin-top: 18px; font-size: 14px; color: var(--text-muted); }

@media (max-width: 860px) {
  .stores-panel { grid-template-columns: 1fr; padding: 40px 26px; gap: 36px; }
  .stores-visual { height: 280px; }
  .stores-title { font-size: 28px; }
}

.stores-title { text-align: left !important; }

/* ===== v15: #1f1f24 cards, dots back in the upload area, tips as plain text ===== */
.pdf-app,
#about-pdf .about-card,
#why .why-card,
#faq .faq-card,
#how .steps li {
  background: #1f1f24 !important;
  border: none !important;
}
.pdf-dropzone {
  background-color: #1f1f24 !important;
  background-image: none !important;
}
.pdf-dropzone.dragover {
  background-image: none !important;
  background-color: rgba(240, 160, 32, 0.08) !important;
}
#tips .tips-grid {
  display: block !important;
  grid-template-columns: none !important;
  max-width: 760px;
}
#tips .tip {
  display: block !important;
  background: none !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 0 28px !important;
  border-radius: 0 !important;
}
#tips .tip h3 { font-size: 20px; font-weight: 600; margin: 0 0 6px; }
#tips .tip p { font-size: 16px; line-height: 1.7; margin: 0; }
#tips.tips-block { background: #1c1c20 !important; }
#how .steps li { border-radius: 16px !important; padding: 26px 26px 28px !important; }
#tips .tips-grid { margin: 0 auto !important; text-align: left; }

/* ===== v16: dots visible again behind header → About; sections in that range are transparent over the dotted layer ===== */
.dots-bg { background: #1c1c20 !important; }
.dots-bg > .header,
.dots-bg > section,
.dots-bg .hero,
.dots-bg .pdf-section,
.dots-bg #about-pdf {
  background: transparent !important;
}

/* ===== v17: How the Reader Works spans the same width as the other blocks, justified like About ===== */
#tips .tips-grid { max-width: none !important; width: 100% !important; margin: 0 !important; }
#tips .tip p { text-align: justify; }

/* ===== v18: dots across the whole page, Dark Tools dropdown, tips split with image, new footer, Dark Tools page ===== */
body {
  position: relative;
  isolation: isolate;
  background: #1c1c20 !important;
}
body.tools-page::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(255,255,255,.06) 1.1px, transparent 1.5px);
  background-size: 20px 20px;
}
.dots-bg::before { display: none; }
section,
.dots-bg,
.dots-bg > section,
.hero,
.pdf-section,
#about-pdf,
.content-block,
.content-block.alt {
  background: transparent !important;
}

/* header: Dark Tools dropdown */
.nav-link { white-space: nowrap; }
.nav-dd { position: relative; }
.nav-dd-toggle { display: inline-flex; align-items: center; gap: 6px; }
.nav-dd-toggle .chev { transition: transform 0.15s; }
.nav-dd:hover .chev,
.nav-dd:focus-within .chev { transform: rotate(180deg); }
.nav-dd::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 14px;
}
.nav-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translate(-50%, 6px);
  width: 540px;
  padding: 10px;
  background: #1f1f24;
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
  z-index: 60;
}
.nav-dd:hover .nav-panel,
.nav-dd:focus-within .nav-panel {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}
.nav-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  border-radius: 12px;
  color: var(--text);
}
.nav-item:hover { background: rgba(255, 255, 255, 0.05); }
.nav-ico {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--amber);
  color: #1c1c20;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-item-text b { display: block; font-size: 0.95rem; font-weight: 600; }
.nav-item-text small { display: block; font-size: 0.8rem; line-height: 1.4; color: var(--text-secondary); margin-top: 2px; }

/* How the Reader Works: text left, image right */
.tips-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.tips-text .block-title,
.tips-text .block-sub { text-align: left; margin-left: 0; margin-right: 0; }
#tips .tips-grid { max-width: none !important; width: auto !important; margin: 0 !important; }
#tips .tip p { text-align: left; }
.tips-visual img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 20px;
}
@media (max-width: 860px) {
  .tips-split { grid-template-columns: 1fr; gap: 32px; }
}

/* footer: single row, different from the main page */
.site-footer {
  background: #18181c;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 26px 0;
}
.sf-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px 28px;
}
.sf-links { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.sf-links a { color: var(--text-secondary); font-size: 0.88rem; }
.sf-links a:hover { color: var(--text); }
.sf-copy { margin: 0; font-size: 0.82rem; color: #7d7d86; }

/* Dark Tools page */
.tools-hero { padding: 72px 0 24px; text-align: center; }
.tools-hero h1 { font-size: 44px; font-weight: 600; margin: 0 0 12px; color: var(--text); }
.tools-section { padding: 24px 0 96px; }
.tools-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tool-card {
  background: #1f1f24;
  border-radius: 20px;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-margin-top: 120px;
}
.tool-ico {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--amber);
  color: #1c1c20;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}
.tool-card h2 { font-size: 20px; font-weight: 600; margin: 0; color: var(--text); }
.tool-card p { font-size: 15px; line-height: 1.6; color: var(--text-secondary); margin: 0; flex: 1; }
.tool-link { color: var(--amber); font-weight: 600; font-size: 0.92rem; margin-top: 8px; }
@media (max-width: 960px) { .tools-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .tools-grid { grid-template-columns: 1fr; } .tools-hero h1 { font-size: 34px; } }

/* ===== v19: centred How the Reader Works header, 3 tips, text and image share the same height ===== */
.tips-head { text-align: center; margin-bottom: 48px; }
.tips-head .block-title, .tips-head .block-sub { text-align: center; margin-left: auto; margin-right: auto; }
#tips .tips-split { grid-template-columns: 1fr 1fr; gap: 56px; align-items: stretch; }
#tips .tips-text { display: flex; flex-direction: column; justify-content: center; }
#tips .tips-grid { grid-template-columns: 1fr !important; gap: 28px !important; margin: 0 !important; }
#tips .tip p { text-align: left !important; }
#tips .tips-visual { position: relative; min-height: 100%; }
#tips .tips-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 860px) {
  #tips .tips-visual { position: static; min-height: 0; }
  #tips .tips-visual img { position: static; height: auto; }
}
/* v19 fix: text column spans the image height exactly (first line top = image top, last line bottom = image bottom) */
#tips .tips-text { justify-content: space-between; }
#tips .tips-visual { display: flex; }
#tips .tips-visual img { position: static; height: 100%; min-height: 0; }
@media (max-width: 860px) {
  #tips .tips-visual img { height: auto; }
  #tips .tips-text { justify-content: flex-start; }
}
#tips .tip { margin: 0 !important; }
#tips .tips-grid { height: 100% !important; display: flex !important; flex-direction: column !important; justify-content: space-between !important; gap: 0 !important; }
/* v19 final: no crop on the image; text column ends exactly at the image bottom */
#tips .tip { margin: 0 !important; }
#tips .tips-visual img { height: auto !important; object-fit: contain; }
#tips .tips-visual { align-items: stretch; }
#tips .tips-grid { gap: 0 !important; row-gap: 0 !important; }
/* v19 final 2: text rows spread with 28px gaps; image stretches to exactly the text column height */
#tips .tips-grid { gap: 28px !important; row-gap: 28px !important; }
#tips .tips-visual img { height: 100% !important; width: 100%; object-fit: cover !important; }

/* ===== v21: dots zone with soft fades (header edge and bottom of "What is PDF Dark Mode?"), #1f1f24 footer ===== */
.dots-zone { position: relative; isolation: isolate; }
.dots-zone::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(255,255,255,.06) 1.1px, transparent 1.5px);
  background-size: 20px 20px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 110px, #000 calc(100% - 220px), transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 110px, #000 calc(100% - 220px), transparent 100%);
}

/* header lang button: code + arrow only */
.lang-btn .flag { display: none !important; }

/* footer: #1f1f24, four columns */
.site-footer {
  background: #1f1f24 !important;
  border-top: 0;
  padding: 64px 0 0;
}
.site-footer .sf-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr 1fr;
  gap: 40px;
  align-items: start;
}
.site-footer .sf-brand .logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; color: var(--text); text-decoration: none; }
.site-footer .sf-brand p { margin: 16px 0 0; font-size: 15px; line-height: 1.7; color: var(--text-secondary); max-width: 300px; }
.site-footer h4 {
  margin: 0 0 18px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.site-footer ul a { font-size: 15px; color: var(--text-secondary); text-decoration: none; }
.site-footer ul a:hover { color: var(--text); }
.site-footer .sf-soon {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: var(--amber);
  background: rgba(242, 176, 30, 0.12);
  vertical-align: middle;
}
.site-footer .sf-bottom {
  margin-top: 56px;
  padding: 22px 0 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.site-footer .sf-bottom p { margin: 0; font-size: 14px; color: var(--text-secondary); text-align: center; }
@media (max-width: 860px) {
  .site-footer .sf-grid { grid-template-columns: 1fr 1fr; gap: 36px 24px; }
}
@media (max-width: 520px) {
  .site-footer .sf-grid { grid-template-columns: 1fr; }
}

/* v22: light/dark before-after slider in "How the Reader Works" */
#tips .tips-visual { position: relative; display: block; min-height: 420px; }
.ba {
  --pos: 50%;
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 420px;
  border-radius: 20px;
  overflow: hidden;
  background: #1f1f24;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
}
.ba-layer {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: #f4f1ea;
  color: #2a2a2e;
}
.ba-layer.dark {
  background: #18181c;
  color: #d9d6cf;
  clip-path: inset(0 0 0 var(--pos));
}
.ba-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 14px;
  background: rgba(0, 0, 0, 0.06);
}
.ba-layer.dark .ba-bar { background: rgba(255, 255, 255, 0.04); }
.ba-bar span { width: 9px; height: 9px; border-radius: 50%; background: #c9c4b8; }
.ba-layer.dark .ba-bar span { background: #3a3a42; }
.ba-bar em { flex: 1; height: 8px; margin-left: 10px; border-radius: 4px; background: rgba(0,0,0,0.08); font-style: normal; }
.ba-bar em + em { flex: 0 0 40px; margin-left: 0; }
.ba-layer.dark .ba-bar em { background: rgba(255,255,255,0.07); }
.ba-stage { flex: 1; padding: 22px 26px; overflow: hidden; }
.ba-sheet { display: flex; flex-direction: column; gap: 14px; }
.ba-h1 { width: 58%; height: 16px; border-radius: 4px; background: #2a2a2e; }
.ba-h2 { width: 38%; height: 9px; border-radius: 4px; background: #9a958a; margin-top: -6px; }
.ba-layer.dark .ba-h1 { background: #e8e4da; }
.ba-layer.dark .ba-h2 { background: #7d786e; }
.ba-text { display: flex; flex-direction: column; gap: 7px; }
.ba-text i { display: block; height: 6px; border-radius: 3px; background: #b8b3a8; }
.ba-layer.dark .ba-text i { background: #55534e; }
.ba-fig { width: 100%; height: auto; aspect-ratio: 300 / 110; display: block; }
.ba-fig .fig-bg { fill: #e4dfd2; }
.ba-fig .fig-sun { fill: #e0a33a; }
.ba-fig .fig-mtn { fill: #8f9a86; }
.ba-layer.dark .ba-fig .fig-bg { fill: #24242a; }
.ba-layer.dark .ba-fig .fig-sun { fill: #f0b04a; }
.ba-layer.dark .ba-fig .fig-mtn { fill: #3d4640; }
.ba-chart { display: flex; align-items: flex-end; gap: 10px; height: 80px; }
.ba-chart b { flex: 1; border-radius: 4px 4px 0 0; background: #e0a33a; }
.ba-layer.dark .ba-chart b { background: #b9832c; }

.ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 2px;
  margin-left: -1px;
  background: #f0b04a;
  cursor: ew-resize;
  z-index: 2;
  outline: none;
}
.ba-handle:focus-visible .ba-knob { box-shadow: 0 0 0 3px rgba(240,176,74,0.45), 0 4px 16px rgba(0,0,0,0.4); }
.ba-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #f0b04a;
  color: #1f1f24;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.ba-label {
  position: absolute;
  top: 14px;
  z-index: 3;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: rgba(20,20,24,0.72);
  color: #f2efe8;
  pointer-events: none;
}
.ba-label-l { left: 14px; }
.ba-label-r { right: 14px; }

/* v23: PDF reader — continuous scroll, 80% default, light page outline, action bar, highlight tool */
.pdf-viewer { display: flex; flex-direction: column; }
.pdf-page-input {
  width: 52px;
  padding: 5px 4px;
  margin-right: 4px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  text-align: center;
  -moz-appearance: textfield;
}
.pdf-page-input::-webkit-outer-spin-button,
.pdf-page-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pdf-tool-text { width: auto; padding: 0 12px; font-size: 0.8rem; font-weight: 500; }
.pdf-tool-btn.is-on { background: rgba(240, 176, 74, 0.25); color: #f0b04a; }

.pdf-actionbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 16px;
  background: rgba(0, 0, 0, 0.15);
}
.pdf-actionbar .pdf-filename {
  margin: 0;
  padding: 0;
  min-width: 0;
  flex: 1 1 200px;
  text-align: left;
  background: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pdf-action-btns { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pdf-action-btns .btn-soft { display: inline-flex; align-items: center; gap: 6px; }
.pdf-action-btns .btn-soft.is-done { color: #f0b04a; }

.pdf-scroll {
  height: 70vh;
  min-height: 420px;
  overflow: auto;
  position: relative;
  padding: 20px 16px;
  background: #1c1c20;
}
.pdf-scroll.pdf-theme-classic { background: #1c1c20; }
.pdf-scroll.pdf-theme-warm { background: #1f1b16; }
.pdf-scroll.pdf-theme-blue { background: #1a1d24; }
.pdf-scroll.pdf-theme-green { background: #18201b; }
.pdf-scroll.pdf-theme-oled { background: #000; }
.pdf-scroll.pdf-theme-original { background: #3a3a3f; }

/* page frame: light outline separates the sheet from the background, no shadow */
.pdf-page {
  position: relative;
  margin: 0 auto 18px;
  outline: 1px solid rgba(255, 255, 255, 0.28);
  outline-offset: 0;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.03);
}
.pdf-page canvas {
  display: block;
  border-radius: 2px;
  transition: filter 0.25s;
}
.pdf-theme-classic .pdf-page canvas { filter: invert(0.9) hue-rotate(180deg); }
.pdf-theme-warm .pdf-page canvas { filter: invert(0.88) hue-rotate(180deg) sepia(0.25) contrast(0.95); }
.pdf-theme-blue .pdf-page canvas { filter: invert(0.9) hue-rotate(190deg) saturate(0.85); }
.pdf-theme-green .pdf-page canvas { filter: invert(0.88) hue-rotate(160deg) sepia(0.15); }
.pdf-theme-oled .pdf-page canvas { filter: invert(1) hue-rotate(180deg) contrast(1.05); }
.pdf-theme-original .pdf-page canvas { filter: none; }

/* highlight overlay sits above the canvas and is never inverted */
.pdf-hl-layer { position: absolute; inset: 0; pointer-events: none; }
.pdf-hl {
  position: absolute;
  background: rgba(240, 176, 74, 0.38);
  border-radius: 2px;
  pointer-events: none;
}
.pdf-hl-draft { background: rgba(240, 176, 74, 0.22); outline: 1px dashed #f0b04a; }
.pdf-hl-on .pdf-page { cursor: crosshair; }
.pdf-hl-on .pdf-hl { pointer-events: auto; cursor: pointer; }
.pdf-hl-on .pdf-hl:hover { background: rgba(240, 176, 74, 0.18); }

.pdf-msg {
  margin: 0;
  padding: 10px 16px;
  font-size: 0.85rem;
  color: #f0b04a;
}
.tips-text .block-title { text-align: left !important; width: auto !important; padding: 0 !important; margin: 0 0 14px !important; }

/* ===== v26: zoom render fix, My Library quick panel ===== */
.lib-wrap {
  position: relative;
}
.lib-chevron {
  margin-left: 2px;
  opacity: 0.6;
  transition: transform 0.2s var(--ease);
}
#pdf-library[aria-expanded='true'] .lib-chevron {
  transform: rotate(180deg);
}
#pdf-library[aria-expanded='true'] {
  background: rgba(255, 255, 255, 0.11);
  color: var(--text);
}
.lib-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 50;
  width: 340px;
  max-width: calc(100vw - 32px);
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  animation: libIn 0.18s var(--ease);
}
.lib-panel[hidden] {
  display: none;
}
@keyframes libIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}
.lib-panel-body {
  max-height: 380px;
  overflow-y: auto;
  padding: 18px 12px 8px;
}
.lib-group-title {
  margin: 10px 10px 6px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.lib-group-title:first-child {
  margin-top: 0;
}
.lib-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 12px;
  transition: background 0.15s;
}
.lib-item:hover {
  background: rgba(255, 255, 255, 0.05);
}
.lib-item-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--amber-soft);
  color: var(--amber);
}
.lib-item-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.lib-item-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lib-item-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.lib-empty {
  margin: 8px 10px 14px;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--text-secondary);
}
.lib-panel-foot {
  display: block;
  width: 100%;
  padding: 14px;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--amber);
  text-align: center;
  cursor: pointer;
  transition: background 0.15s;
}
.lib-panel-foot:hover {
  background: rgba(255, 255, 255, 0.04);
}

/* PDF page: no white shadow, light outline instead (kept here so it wins over older rules) */
.pdf-page {
  box-shadow: none;
  outline: 1px solid rgba(255, 255, 255, 0.14);
  outline-offset: 0;
}

/* ===== v27: search, page thumbnails ===== */
.pdf-searchbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: #1f1f24;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.pdf-searchbar[hidden] { display: none !important; }
.pdf-search-input {
  flex: 0 1 320px;
  min-width: 0;
  padding: 7px 12px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  outline: none;
}
.pdf-search-input:focus { background: rgba(255, 255, 255, 0.12); }
.pdf-search-count {
  min-width: 92px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
}
#pdf-search-btn.is-on { background: rgba(240, 176, 74, 0.25); color: #f0b04a; }

.pdf-find-layer { position: absolute; inset: 0; pointer-events: none; }
.pdf-find {
  position: absolute;
  background: rgba(120, 190, 255, 0.34);
  border-radius: 2px;
  pointer-events: none;
}
.pdf-find-cur { background: rgba(240, 176, 74, 0.6); outline: 1px solid #f0b04a; }

.pdf-body { display: flex; align-items: stretch; min-width: 0; }
.pdf-body > .pdf-scroll { flex: 1 1 auto; min-width: 0; }
.pdf-thumbs {
  flex: 0 0 150px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  background: #1c1c20;
}
.pdf-thumbs[hidden] { display: none !important; }
.pdf-thumbs.pdf-theme-classic { background: #1c1c20; }
.pdf-thumbs.pdf-theme-warm { background: #1f1b16; }
.pdf-thumbs.pdf-theme-blue { background: #1a1d24; }
.pdf-thumbs.pdf-theme-green { background: #18201b; }
.pdf-thumbs.pdf-theme-oled { background: #000; }
.pdf-thumbs.pdf-theme-original { background: #3a3a3f; }
.pdf-thumb-list {
  position: relative;
  flex: 1 1 auto;
  height: 70vh;
  min-height: 420px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
}
.pdf-thumb {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  font: inherit;
  font-size: 0.75rem;
  cursor: pointer;
}
.pdf-thumb:hover { background: rgba(255, 255, 255, 0.06); }
.pdf-thumb canvas {
  display: block;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.03);
  outline: 1px solid rgba(255, 255, 255, 0.28);
  transition: filter 0.25s;
}
.pdf-thumb.is-current { color: #f0b04a; }
.pdf-thumb.is-current canvas { outline: 2px solid #f0b04a; }
.pdf-theme-classic .pdf-thumb canvas { filter: invert(0.9) hue-rotate(180deg); }
.pdf-theme-warm .pdf-thumb canvas { filter: invert(0.88) hue-rotate(180deg) sepia(0.25) contrast(0.95); }
.pdf-theme-blue .pdf-thumb canvas { filter: invert(0.9) hue-rotate(190deg) saturate(0.85); }
.pdf-theme-green .pdf-thumb canvas { filter: invert(0.88) hue-rotate(160deg) sepia(0.15); }
.pdf-theme-oled .pdf-thumb canvas { filter: invert(1) hue-rotate(180deg) contrast(1.05); }
.pdf-theme-original .pdf-thumb canvas { filter: none; }

@media (max-width: 700px) {
  .pdf-thumbs { flex-basis: 96px; }
  .pdf-search-input { flex-basis: 140px; }
}

/* ===== v29: dark-tools guide text ===== */
#guide { padding: 72px 0 96px; }
#guide .block-title { text-align: center; margin: 0 0 14px; }
#guide .block-sub { text-align: center; margin: 0 auto 28px; }
#guide .about-text { margin-top: 0; }
#guide .about-text p { max-width: 760px; }
.guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 36px auto 36px; max-width: 1040px; }
.guide-grid .guide-card { display: block; }
.guide-card { background: #1f1f24; border-radius: 14px; padding: 24px 22px; text-align: left; }
.guide-card h3 { font-size: 20px; font-weight: 600; line-height: 1.3; margin: 0 0 10px; color: #f2f2f3; }
.guide-card p { font-size: 15px; line-height: 1.6; color: #a8a8b0; margin: 0; text-align: left; }
@media (max-width: 820px) { .guide-grid { grid-template-columns: 1fr; } }

/* ===== v30: My Library page (library.html) ===== */
.lp-section { padding: 56px 0 72px; }
.lp-section .block-title { margin-bottom: 10px; }
.lp-section .block-sub { margin-bottom: 32px; }
.lp-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.lp-stat { background: #2a2a2e; border-radius: var(--radius); padding: 20px 22px; display: flex; flex-direction: column; gap: 6px; }
.lp-stat-label { font-size: 14px; color: var(--text-secondary); }
.lp-stat-value { font-size: 24px; font-weight: 600; color: var(--text); }
.lp-stat-small { font-size: 16px; font-weight: 400; }
.lp-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 16px; }
.lp-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.lp-tab { font: inherit; font-size: 15px; color: var(--text-secondary); background: #2a2a2e; border: 0; border-radius: 999px; padding: 8px 16px; cursor: pointer; }
.lp-tab:hover { color: var(--text); }
.lp-tab.is-active { background: var(--amber-soft); color: var(--amber); }
.lp-tools { display: flex; gap: 10px; flex-wrap: wrap; }
.lp-input { font: inherit; font-size: 15px; color: var(--text); background: #2a2a2e; border: 0; border-radius: 12px; padding: 10px 14px; min-width: 200px; }
.lp-input::placeholder { color: var(--text-muted); }
.lp-input:focus { outline: 1px solid rgba(240, 160, 32, 0.6); }
.lp-select { min-width: 160px; }
.lp-table-card { background: #1f1f24; border-radius: var(--radius); overflow: hidden; }
.lp-table-head, .lp-row { display: grid; grid-template-columns: minmax(0, 3fr) 1.2fr 0.7fr 0.8fr minmax(200px, 1.6fr); align-items: center; gap: 12px; padding: 14px 22px; }
.lp-table-head { font-size: 13px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; border-bottom: 1px solid rgba(255,255,255,0.06); }
.lp-row { font-size: 15px; color: var(--text-secondary); border-top: 1px solid rgba(255,255,255,0.04); }
.lp-row:first-child { border-top: 0; }
.lp-right { text-align: right; }
.lp-name { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.lp-name-text { color: var(--text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-name-meta { font-size: 13px; color: var(--text-muted); }
.lp-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.lp-action { font: inherit; font-size: 14px; border: 0; border-radius: 999px; padding: 6px 12px; cursor: pointer; background: #2a2a2e; color: var(--text); }
.lp-action:hover { background: #303034; }
.lp-open { background: var(--amber-soft); color: var(--amber); }
.lp-open:hover { background: rgba(240, 160, 32, 0.26); }
.lp-delete { color: #e08a8a; }
.lp-empty { padding: 36px 22px; text-align: center; color: var(--text-secondary); margin: 0; }
.lp-foot-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 40px; align-items: center; }
.lp-danger { color: #e08a8a; }
.lp-add { margin-left: auto; }
.lp-info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.lp-info-card { background: #2a2a2e; border-radius: var(--radius); padding: 22px 24px; }
.lp-info-card h3 { font-size: 17.6px; font-weight: 600; margin: 0 0 8px; color: var(--text); }
.lp-info-card p { font-size: 15px; color: var(--text-secondary); margin: 0; line-height: 1.6; }
.nav-link-active { color: var(--text); }
@media (max-width: 860px) {
  .lp-stats, .lp-info-grid { grid-template-columns: 1fr; }
  .lp-table-head { display: none; }
  .lp-row { grid-template-columns: 1fr; gap: 6px; padding: 16px 18px; }
  .lp-row .lp-date::before { content: 'Added: '; color: var(--text-muted); }
  .lp-row .lp-type::before { content: 'Type: '; color: var(--text-muted); }
  .lp-row .lp-size-cell::before { content: 'Size: '; color: var(--text-muted); }
  .lp-actions { justify-content: flex-start; margin-top: 6px; }
  .lp-add { margin-left: 0; }
}

/* ===== v31: My Library title sizes match Dark Tools hero; select arrow spacing; PDF-only filter ===== */
.lp-title { font-size: 44px; font-weight: 600; margin: 0 0 12px; color: var(--text); text-align: center; letter-spacing: normal; line-height: 1.2; }
.lp-section .block-sub { text-align: center; }
.lp-select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a8a8b0' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}
@media (max-width: 600px) { .lp-title { font-size: 34px; } }

/* ===== EPUB reader (epub.html) ===== */
.epub-app { min-height: 0; }
.epub-viewer { min-height: 0; }
.epub-size-val {
  font-size: 0.8rem;
  color: var(--text-muted);
  min-width: 24px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.epub-toc {
  max-width: 220px;
  text-overflow: ellipsis;
}
.epub-searchbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(0, 0, 0, 0.12);
}
.epub-searchbar[hidden] { display: none !important; }
.epub-searchbar .pdf-search-input { flex: 1; min-width: 0; }
.epub-results {
  max-height: 200px;
  overflow-y: auto;
  padding: 6px 16px;
  background: rgba(0, 0, 0, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.epub-results[hidden] { display: none !important; }
.epub-hit {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.5;
}
.epub-hit:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.epub-hit b { color: var(--text); font-weight: 600; }
mark.epub-hit-mark {
  background: rgba(240, 160, 32, 0.4);
  color: inherit;
  border-radius: 3px;
  padding: 0 1px;
}
.epub-body {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 560px;
  max-height: 70vh;
}
.epub-side {
  padding: 18px 18px 20px;
  background: rgba(0, 0, 0, 0.14);
  overflow-y: auto;
  border-right: 1px solid rgba(255, 255, 255, 0.04);
}
.epub-side-title {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 6px 0 10px;
}
.epub-side-title + .epub-meta { margin-bottom: 18px; }
.epub-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 12px;
  font-size: 0.85rem;
}
.epub-meta dt { color: var(--text-muted); }
.epub-meta dd {
  color: var(--text);
  overflow-wrap: anywhere;
  text-align: right;
}
.epub-progress {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin: 18px 0 8px;
}
.epub-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--amber);
  border-radius: 999px;
  transition: width 0.3s var(--ease);
}
.epub-progress-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}
.epub-bm-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.epub-bm-list li {
  display: flex;
  align-items: center;
  gap: 6px;
}
.epub-bm-go {
  flex: 1;
  min-width: 0;
  text-align: left;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  border-radius: 8px;
  padding: 7px 10px;
  color: var(--text);
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.epub-bm-go:hover { background: rgba(255, 255, 255, 0.1); }
.epub-bm-del {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1;
}
.epub-bm-del:hover { color: var(--text); background: rgba(255, 255, 255, 0.08); }
.epub-bm-empty {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 4px 0;
}
.epub-scroll {
  overflow-y: auto;
  padding: 36px clamp(20px, 5vw, 64px) 28px;
  background: #1f1f24;
  color: #e6e6ea;
  outline: none;
}
.epub-scroll.th-classic { background: #1f1f24; color: #e6e6ea; }
.epub-scroll.th-warm { background: #2a241c; color: #ecdcc4; }
.epub-scroll.th-blue { background: #182231; color: #d2def0; }
.epub-scroll.th-oled { background: #000000; color: #d8d8d8; }
.epub-scroll.ff-serif { font-family: Georgia, 'Times New Roman', serif; }
.epub-scroll.ff-sans { font-family: var(--font); }
.epub-text {
  max-width: 68ch;
  margin: 0 auto;
  font-size: var(--epub-size, 19px);
  line-height: 1.75;
  overflow-wrap: break-word;
}
.epub-text h1,
.epub-text h2,
.epub-text h3 {
  line-height: 1.3;
  margin: 1.4em 0 0.6em;
  font-weight: 600;
  color: inherit;
}
.epub-text h1 { font-size: 1.6em; }
.epub-text h2 { font-size: 1.3em; }
.epub-text h3 { font-size: 1.12em; }
.epub-text p { margin: 0 0 0.9em; text-align: justify; hyphens: auto; }
.epub-text img,
.epub-text svg { max-width: 100%; height: auto; margin: 1em auto; }
.epub-text a { color: var(--amber); text-decoration: underline; text-underline-offset: 3px; }
.epub-text a.epub-link { cursor: pointer; }
.epub-text blockquote {
  margin: 1em 0;
  padding-left: 16px;
  border-left: 3px solid rgba(255, 255, 255, 0.18);
  opacity: 0.9;
}
.epub-text pre,
.epub-text code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.85em;
}
.epub-text pre { overflow-x: auto; background: rgba(255, 255, 255, 0.05); padding: 12px; border-radius: 8px; }
.epub-pager {
  max-width: 68ch;
  margin: 36px auto 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.epub-pager button:disabled { opacity: 0.4; cursor: default; }
.epub-lib-note { font-size: 0.78rem; color: var(--text-muted); }
.epub-lib-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
}
.epub-lib-row .lib-item-open {
  flex: 1;
  min-width: 0;
  text-align: left;
  background: none;
  border: none;
  color: var(--text);
  font-size: 0.85rem;
  padding: 6px 8px;
  border-radius: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.epub-lib-row .lib-item-open:hover { background: rgba(255, 255, 255, 0.07); }
.epub-lib-empty {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 10px 8px;
}

/* EPUB page: cross-links, articles, prose, compare */
.epub-compare-wrap { max-width: 880px; margin: 0 auto; }
.epub-prose {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.epub-prose p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-secondary);
  text-align: justify;
}
.epub-prose h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 10px;
}
.epub-articles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-width: 980px;
  margin: 28px auto 0;
}
.epub-article {
  background: #2a2a2e;
  border-radius: var(--radius);
  padding: 24px 24px 22px;
}
.epub-article h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.epub-article p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-secondary);
  text-align: justify;
}
.epub-xlinks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  max-width: 980px;
  margin: 28px auto 0;
}
.epub-xlink {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #1f1f24;
  border-radius: var(--radius);
  padding: 22px 22px 20px;
  transition: background 0.2s var(--ease);
}
.epub-xlink:hover { background: #26262b; }
.epub-xlink b { font-size: 1.05rem; font-weight: 600; }
.epub-xlink span {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-secondary);
}
.epub-xlink em {
  margin-top: auto;
  font-style: normal;
  font-size: 0.88rem;
  color: var(--amber);
}

@media (max-width: 860px) {
  .epub-body {
    grid-template-columns: 1fr;
    max-height: none;
    min-height: 0;
  }
  .epub-side {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    max-height: 260px;
  }
  .epub-scroll { max-height: 70vh; }
  .epub-articles { grid-template-columns: 1fr; }
  .epub-toc { max-width: 150px; }
}
.epub-bm-go b,
.epub-bm-go small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.epub-bm-go b { font-weight: 600; color: var(--text); }
.epub-bm-go small { font-size: 0.74rem; color: var(--text-muted); margin-top: 2px; }
.epub-viewer .pdf-toolbar-center,
.epub-viewer .pdf-toolbar-left,
.epub-viewer .pdf-toolbar-right { flex-wrap: wrap; min-width: 0; max-width: 100%; }
@media (max-width: 600px) {
  .epub-viewer .pdf-toolbar { padding: 10px 12px; }
  .epub-viewer .pdf-toolbar-center { justify-content: center; }
  .epub-viewer .pdf-toolbar-left { justify-content: center; }
  .epub-viewer .pdf-toolbar-right { justify-content: center; width: 100%; }
  .epub-viewer .epub-toc { max-width: 200px; }
  .epub-scroll { padding: 24px 18px 20px; }
}

/* ---- EPUB page, turn 20 ---- */
#about-epub { background: #1f1f24 !important; }
#epub-guide .epub-article { background: #1f1f24 !important; }
#epub-features .why-grid { grid-template-columns: repeat(3, 1fr) !important; }
@media (max-width: 900px) { #epub-features .why-grid { grid-template-columns: repeat(2, 1fr) !important; } }
@media (max-width: 560px) { #epub-features .why-grid { grid-template-columns: 1fr !important; } }
#epub-compare .ba-layer img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
#epub-compare .ba-layer.dark img { }
#epub-compare .ba { min-height: 0; aspect-ratio: 1920 / 1088; }
#epub-why { padding-top: 0; }
#epub-why .epub-prose { margin-top: 20px; }
#epub-why .epub-prose p { font-size: 16px; line-height: 1.7; text-align: justify; }
#epub-how .steps li::before { flex: none; }
.q-ico { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgba(224, 163, 58, 0.14); color: var(--amber, #e0a33a); margin-right: 12px; vertical-align: middle; }
#faq .faq-card h3 { display: flex; align-items: center; gap: 0; }
.xl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 28px; }
.xl-card { display: flex; flex-direction: column; gap: 10px; background: #1f1f24; border-radius: 16px; padding: 28px 24px; color: inherit; text-decoration: none; transition: background .2s ease; }
.xl-card:hover { background: #2a2a2e; }
.xl-card h3 { font-size: 19.2px; font-weight: 600; margin: 4px 0 0; }
.xl-card p { font-size: 16px; line-height: 1.6; margin: 0; color: #c9c6be; }
.xl-card em { font-style: normal; font-size: 15px; color: var(--amber, #e0a33a); margin-top: auto; padding-top: 8px; }
.xl-ico { width: 48px; height: 48px; border-radius: 12px; background: #2a2a2e; display: flex; align-items: center; justify-content: center; color: var(--amber, #e0a33a); }
@media (max-width: 900px) { .xl-grid { grid-template-columns: 1fr; } }
.epub-lib-head { margin: 10px 4px 4px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #9b988f; }
/* EPUB type sizes = home page (index.html) */
#about-epub .about-text p { font-size: 16px; line-height: 1.7; }
#epub-guide .epub-article h3 { font-size: 20px; font-weight: 600; }
#epub-guide .epub-article p { font-size: 15px; line-height: 1.7; }
#epub-features .why-card h3 { font-size: 20px; font-weight: 600; }
#epub-features .why-card p { font-size: 15px; line-height: 1.6; }
.xl-card h3 { font-size: 20px; }
.xl-card p { font-size: 15px; }
#about-epub .about-text p { font-size: 16px !important; line-height: 1.8 !important; text-align: justify !important; }
.xl-card { text-align: left; align-items: flex-start; }
.xl-card em { align-self: flex-start; }

/* ===== epub page polish: section bg, cards, icons, type scale ===== */

/* What is the EPUB Reader? — section = page bg, card = #1f1f24 */
#about-epub {
  background: transparent !important;
}
#about-epub .about-card {
  background: #1f1f24 !important;
  border-radius: 20px !important;
  padding: 44px 40px !important;
  box-shadow: none !important;
  border: none !important;
  width: 100% !important;
  max-width: none !important;
}
#about-epub .block-title {
  font-size: 35.2px !important;
  font-weight: 600 !important;
  text-align: center !important;
  margin: 0 0 12px !important;
}
#about-epub .block-sub {
  font-size: 16px !important;
  text-align: center !important;
  color: var(--text-secondary) !important;
  margin: 0 auto 24px !important;
  max-width: 560px;
}
#about-epub .about-text {
  max-width: none !important;
  width: 100% !important;
}
#about-epub .about-text p {
  font-size: 16px !important;
  line-height: 1.7 !important;
  color: var(--text-secondary) !important;
  text-align: justify !important;
  margin: 0 0 16px !important;
}
#about-epub .about-text p:last-child { margin-bottom: 0 !important; }

/* What the EPUB Reader Does — cards #1f1f24, icons like main Why block */
#epub-features {
  background: transparent !important;
}
#epub-features .block-title {
  font-size: 35.2px !important;
  font-weight: 600 !important;
}
#epub-features .block-sub {
  font-size: 16px !important;
}
#epub-features .why-card {
  background: #1f1f24 !important;
  border-radius: 16px !important;
  padding: 22px 20px !important;
  display: grid !important;
  grid-template-columns: 44px 1fr !important;
  column-gap: 14px !important;
  row-gap: 6px !important;
  align-items: start !important;
  box-shadow: none !important;
  border: none !important;
}
#epub-features .why-card .ico {
  width: 44px !important;
  height: 44px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  grid-column: 1 !important;
  grid-row: 1 / span 2 !important;
  align-self: start !important;
  background: rgba(240, 160, 32, 0.12) !important;
  color: var(--amber, #f0a020) !important;
}
#epub-features .why-card .ico svg {
  width: 20px !important;
  height: 20px !important;
  display: block !important;
}
#epub-features .why-card h3 {
  grid-column: 2 !important;
  grid-row: 1 !important;
  font-size: 20px !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  margin: 0 !important;
  align-self: center !important;
}
#epub-features .why-card p {
  grid-column: 2 !important;
  grid-row: 2 !important;
  font-size: 15px !important;
  line-height: 1.7 !important;
  margin: 0 !important;
  color: var(--text-secondary) !important;
}

/* Why the comparison matters — full width like other blocks */
#epub-why,
#epub-compare {
  background: transparent !important;
}
#epub-why .block-title,
#epub-compare .block-title {
  font-size: 35.2px !important;
  font-weight: 600 !important;
}
#epub-why .block-sub,
#epub-compare .block-sub {
  font-size: 16px !important;
}
#epub-why .container,
#epub-compare .container {
  max-width: 1080px !important;
}
#epub-why p,
#epub-compare .epub-compare-wrap,
#epub-compare p {
  max-width: none !important;
  width: 100% !important;
}
#epub-why .about-text,
#epub-why .guide-prose,
#epub-why > .container > p,
#epub-compare > .container > p {
  max-width: none !important;
  width: 100% !important;
  font-size: 16px !important;
  line-height: 1.7 !important;
  text-align: justify !important;
  color: var(--text-secondary) !important;
}
#epub-compare .epub-compare-wrap {
  max-width: 1080px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* FAQ — icons like main page, type scale */
#faq.epub-faq,
body:has(.epub-app) #faq,
#faq {
  background: transparent !important;
}
#faq .block-title {
  font-size: 35.2px !important;
  font-weight: 600 !important;
}
#faq .block-sub {
  font-size: 16px !important;
}
#faq .faq-card {
  background: #1f1f24 !important;
  border: none !important;
  border-radius: 16px !important;
}
#faq .faq-card h3 {
  font-size: 20px !important;
  font-weight: 600 !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  line-height: 1.3 !important;
}
#faq .faq-card p {
  font-size: 16px !important;
  line-height: 1.7 !important;
  text-align: justify !important;
  color: var(--text-secondary) !important;
}
/* q-ico → same as main .ico circles */
#faq .q-ico {
  flex: 0 0 auto !important;
  width: 44px !important;
  height: 44px !important;
  border-radius: 50% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(240, 160, 32, 0.12) !important;
  color: var(--amber, #f0a020) !important;
  margin-right: 0 !important;
  vertical-align: middle !important;
}
#faq .q-ico svg {
  width: 20px !important;
  height: 20px !important;
  display: block !important;
}

/* General type scale on epub page content blocks */
#epub-guide .block-title,
#epub-how .block-title,
#epub-tools .block-title {
  font-size: 35.2px !important;
  font-weight: 600 !important;
}
#epub-guide .block-sub,
#epub-how .block-sub,
#epub-tools .block-sub {
  font-size: 16px !important;
}
#epub-guide p,
#epub-how .steps li span {
  font-size: 15px !important;
  line-height: 1.7 !important;
}
#epub-guide h3,
#epub-how .steps strong {
  font-size: 20px !important;
  font-weight: 600 !important;
}

@media (max-width: 720px) {
  #about-epub .about-card { padding: 28px 20px !important; }
  #about-epub .about-text p,
  #epub-why p { text-align: left !important; }
  #about-epub .block-title,
  #epub-features .block-title,
  #epub-why .block-title,
  #epub-compare .block-title,
  #faq .block-title {
    font-size: 28px !important;
  }
}

/* epub-why prose full width aligned with other blocks */
#epub-why .epub-prose {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
}
#epub-why .epub-prose p {
  font-size: 16px !important;
  line-height: 1.7 !important;
  color: var(--text-secondary) !important;
  text-align: justify !important;
  margin: 0 0 16px !important;
}
#epub-why .epub-prose p:last-child { margin-bottom: 0 !important; }

/* ===== sticky header stays visible for the whole page ===== */
.header {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 1000 !important;
  background: rgba(28, 28, 32, 0.92) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
/* room under fixed header */
body {
  padding-top: 74px !important;
}
@media (max-width: 960px) {
  body { padding-top: 66px !important; }
}

/* Don’t let dots-bg create a sticky trapping context */
.dots-bg,
.dots-zone {
  overflow: visible !important;
  transform: none !important;
  filter: none !important;
  perspective: none !important;
  contain: none !important;
}

/* EPUB feature cards: left-align like main Why cards */
#epub-features {
  text-align: left !important;
}
#epub-features .block-title,
#epub-features .block-sub {
  text-align: center !important;
}
#epub-features .why-grid {
  text-align: left !important;
}
#epub-features .why-card {
  text-align: left !important;
}
#epub-features .why-card h3,
#epub-features .why-card p {
  text-align: left !important;
}

/* Main Why cards also left */
#why {
  text-align: center !important; /* title centered */
}
#why .why-grid,
#why .why-card,
#why .why-card h3,
#why .why-card p {
  text-align: left !important;
}


/* ===== breadcrumbs ===== */
.crumbs {
  padding: 18px 0 0;
  background: transparent;
}
.crumbs-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-muted, #8a8a94);
}
.crumbs a {
  color: var(--text-muted, #8a8a94);
  text-decoration: none;
  transition: color 0.15s;
}
.crumbs a:hover {
  color: var(--text, #f0f0f2);
}
.crumbs-home {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.crumbs-home svg {
  flex: none;
  opacity: 0.85;
}
.crumbs-sep {
  color: rgba(255, 255, 255, 0.28);
  user-select: none;
  font-weight: 400;
}
.crumbs-current {
  color: var(--text-secondary, #b0b0b8);
  font-weight: 500;
}

/* ===== Text Reader page ===== */
.text-paste { margin: 14px 0 0; padding: 18px; background: #1f1f24; border-radius: 14px; }
.text-paste-label { display: block; font-size: 0.9rem; color: var(--text-muted); margin-bottom: 8px; }
.text-paste-area {
  display: block; width: 100%; min-height: 140px; resize: vertical;
  padding: 14px 16px; border: 0; border-radius: 10px;
  background: #2a2a2e; color: #e6e6ea;
  font-family: Georgia, 'Times New Roman', serif; font-size: 1rem; line-height: 1.6;
  box-sizing: border-box;
}
.text-paste-area:focus { outline: 2px solid rgba(240, 160, 32, 0.45); outline-offset: 0; }
.text-paste-foot { display: flex; justify-content: flex-end; margin-top: 12px; }
#text-input-wrap[hidden], #text-viewer[hidden], #text-msg[hidden], #text-clear[hidden], #text-new[hidden] { display: none !important; }
#text-msg:not([hidden]) { margin: 12px 0 0; color: var(--amber); font-size: 0.9rem; }
mark.text-hit-current { background: rgba(240, 160, 32, 0.85); color: #1f1f24; }
#text-body mark.epub-hit-mark { border-radius: 3px; }
#text-scroll { max-height: 72vh; min-height: 320px; }
@media (max-width: 720px) { #text-scroll { max-height: 66vh; } }

/* ===== Text Reader: listen + bookmarks + library ===== */
.text-speaking { background: rgba(240, 160, 32, 0.12); border-radius: 6px; transition: background 0.2s ease; }
#text-bm-add { width: 100%; margin: 6px 0 10px; justify-content: center; }
#text-listen[aria-pressed="true"] { color: var(--text); background: rgba(255, 255, 255, 0.12); }
#text-speed { width: auto; }

/* ===== text.html polish (mirror epub.html) ===== */

/* What is the Text Reader? — card #1f1f24, section transparent */
#about-text {
  background: transparent !important;
}
#about-text .about-card {
  background: #1f1f24 !important;
  border-radius: 20px !important;
  padding: 44px 40px !important;
  box-shadow: none !important;
  border: none !important;
  width: 100% !important;
  max-width: none !important;
}
#about-text .block-title {
  font-size: 35.2px !important;
  font-weight: 600 !important;
  text-align: center !important;
  margin: 0 0 12px !important;
}
#about-text .block-sub {
  font-size: 16px !important;
  text-align: center !important;
  color: var(--text-secondary) !important;
  margin: 0 auto 24px !important;
  max-width: 560px;
}
#about-text .about-text {
  max-width: none !important;
  width: 100% !important;
}
#about-text .about-text p {
  font-size: 16px !important;
  line-height: 1.7 !important;
  color: var(--text-secondary) !important;
  text-align: justify !important;
  margin: 0 0 16px !important;
}
#about-text .about-text p:last-child { margin-bottom: 0 !important; }

/* What the Text Reader Does — 3 columns, cards #1f1f24, icons like epub */
#text-features {
  background: transparent !important;
  text-align: left !important;
}
#text-features .block-title {
  font-size: 35.2px !important;
  font-weight: 600 !important;
  text-align: center !important;
}
#text-features .block-sub {
  font-size: 16px !important;
  text-align: center !important;
}
#text-features .why-grid {
  grid-template-columns: repeat(3, 1fr) !important;
  text-align: left !important;
  gap: 16px !important;
}
#text-features .why-card {
  background: #1f1f24 !important;
  border-radius: 16px !important;
  padding: 22px 20px !important;
  display: grid !important;
  grid-template-columns: 44px 1fr !important;
  column-gap: 14px !important;
  row-gap: 6px !important;
  align-items: start !important;
  box-shadow: none !important;
  border: none !important;
  text-align: left !important;
}
#text-features .why-card .ico {
  width: 44px !important;
  height: 44px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  grid-column: 1 !important;
  grid-row: 1 / span 2 !important;
  align-self: start !important;
  background: rgba(240, 160, 32, 0.12) !important;
  color: var(--amber, #f0a020) !important;
}
#text-features .why-card .ico svg {
  width: 20px !important;
  height: 20px !important;
  display: block !important;
}
#text-features .why-card h3 {
  grid-column: 2 !important;
  grid-row: 1 !important;
  font-size: 20px !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  margin: 0 !important;
  align-self: center !important;
  text-align: left !important;
}
#text-features .why-card p {
  grid-column: 2 !important;
  grid-row: 2 !important;
  font-size: 15px !important;
  line-height: 1.7 !important;
  margin: 0 !important;
  color: var(--text-secondary) !important;
  text-align: left !important;
}
@media (max-width: 900px) {
  #text-features .why-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 560px) {
  #text-features .why-grid { grid-template-columns: 1fr !important; }
}

/* Why the comparison matters — full width, justified */
#text-why {
  background: transparent !important;
}
#text-why .block-title {
  font-size: 35.2px !important;
  font-weight: 600 !important;
  text-align: center !important;
}
#text-why .container {
  max-width: 1080px !important;
}
#text-why .epub-prose {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
}
#text-why .epub-prose p {
  font-size: 16px !important;
  line-height: 1.7 !important;
  color: var(--text-secondary) !important;
  text-align: justify !important;
  margin: 0 0 16px !important;
}
#text-why .epub-prose p:last-child { margin-bottom: 0 !important; }

/* Reading Long Text in the Dark — cards #1f1f24 */
#text-guide {
  background: transparent !important;
}
#text-guide .block-title {
  font-size: 35.2px !important;
  font-weight: 600 !important;
  text-align: center !important;
}
#text-guide .block-sub {
  font-size: 16px !important;
  text-align: center !important;
}
#text-guide .epub-article {
  background: #1f1f24 !important;
  border-radius: 16px !important;
  box-shadow: none !important;
  border: none !important;
}
#text-guide .epub-article h3 {
  font-size: 20px !important;
  font-weight: 600 !important;
  text-align: left !important;
}
#text-guide .epub-article p {
  font-size: 15px !important;
  line-height: 1.7 !important;
  color: var(--text-secondary) !important;
  text-align: left !important;
}

@media (max-width: 720px) {
  #about-text .about-card { padding: 28px 20px !important; }
  #about-text .about-text p,
  #text-why .epub-prose p { text-align: left !important; }
  #about-text .block-title,
  #text-features .block-title,
  #text-why .block-title,
  #text-guide .block-title {
    font-size: 28px !important;
  }
}

/* ===== Dark Notepad ===== */
.np-search-wrap { padding: 0 0 10px; }
.np-search { flex: 1 1 auto; width: 100%; box-sizing: border-box; }
.np-list { max-height: 260px; overflow-y: auto; }
.np-item.is-current { background: rgba(255, 255, 255, 0.12); }
.np-item.is-current b { color: #f0c27a; }
.np-delete { width: 100%; margin-top: 12px; }
.np-delete:disabled, #np-copy:disabled, #np-export:disabled { opacity: 0.45; cursor: default; }
.np-title {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 14px;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 1.9em;
  font-weight: 600;
  line-height: 1.25;
  outline: none;
}
.np-title::placeholder { color: rgba(230, 230, 234, 0.35); }
.np-body {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 52vh;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: var(--epub-size, 18px);
  line-height: 1.7;
  resize: none;
  overflow: hidden;
  outline: none;
}
.np-body::placeholder { color: rgba(230, 230, 234, 0.35); }
.np-body:disabled, .np-title:disabled { opacity: 0.6; }
.epub-scroll.th-warm .np-title::placeholder, .epub-scroll.th-warm .np-body::placeholder { color: rgba(236, 220, 196, 0.35); }
.epub-scroll.th-blue .np-title::placeholder, .epub-scroll.th-blue .np-body::placeholder { color: rgba(210, 222, 240, 0.35); }
@media (max-width: 600px) {
  .np-title { font-size: 1.5em; }
  .np-list { max-height: 180px; }
}

/* ===== Dark Notepad features ===== */
.np-tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 0 10px; }
.np-chip {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: transparent;
  color: rgba(230, 230, 234, 0.8);
  border-radius: 999px;
  padding: 3px 10px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.np-chip:hover { border-color: rgba(255, 255, 255, 0.35); }
.np-chip[aria-pressed="true"] { background: #f0c27a; border-color: #f0c27a; color: #1c1c20; }
.np-meta-row { display: flex; gap: 10px; align-items: center; margin: 0 0 14px; }
.np-tags-input {
  flex: 1 1 auto;
  min-width: 0;
  box-sizing: border-box;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  font: inherit;
  font-size: 14px;
  outline: none;
}
.np-tags-input:focus { border-color: rgba(240, 194, 122, 0.6); }
.np-tags-input::placeholder { color: rgba(230, 230, 234, 0.35); }
.np-tags-input:disabled { opacity: 0.6; }
.np-pin { flex: 0 0 auto; }
.np-pin[aria-pressed="true"] { color: #f0c27a; border-color: rgba(240, 194, 122, 0.6); }
.np-preview { font-size: var(--epub-size, 18px); line-height: 1.7; overflow-wrap: anywhere; }
.np-preview h2, .np-preview h3, .np-preview h4 { margin: 1.2em 0 0.4em; line-height: 1.3; font-weight: 600; }
.np-preview h2 { font-size: 1.5em; }
.np-preview h3 { font-size: 1.25em; }
.np-preview h4 { font-size: 1.1em; }
.np-preview p { margin: 0 0 0.8em; }
.np-preview ul, .np-preview ol { margin: 0 0 0.8em; padding-left: 1.4em; }
.np-preview blockquote { margin: 0 0 0.8em; padding: 0.2em 0 0.2em 14px; border-left: 3px solid rgba(240, 194, 122, 0.6); color: rgba(230, 230, 234, 0.8); }
.np-preview hr { border: none; border-top: 1px solid rgba(255, 255, 255, 0.15); margin: 1.2em 0; }
.np-preview code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.9em; padding: 0.05em 0.35em; border-radius: 4px; background: rgba(255, 255, 255, 0.08); }
.np-tasks { list-style: none; padding-left: 0; }
.np-task label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.np-task input[type="checkbox"] { margin-top: 0.45em; accent-color: #f0c27a; }
.np-task.is-done span { text-decoration: line-through; opacity: 0.6; }
.np-empty { color: rgba(230, 230, 234, 0.5); font-style: italic; }

/* ===== notepad.html polish (mirror epub/text) ===== */

/* What is the Dark Notepad? */
#about-notes {
  background: transparent !important;
}
#about-notes .about-card {
  background: #1f1f24 !important;
  border-radius: 20px !important;
  padding: 44px 40px !important;
  box-shadow: none !important;
  border: none !important;
  width: 100% !important;
  max-width: none !important;
}
#about-notes .block-title {
  font-size: 35.2px !important;
  font-weight: 600 !important;
  text-align: center !important;
  margin: 0 0 12px !important;
}
#about-notes .block-sub {
  font-size: 16px !important;
  text-align: center !important;
  color: var(--text-secondary) !important;
  margin: 0 auto 24px !important;
  max-width: 560px;
}
#about-notes .about-text {
  max-width: none !important;
  width: 100% !important;
}
#about-notes .about-text p {
  font-size: 16px !important;
  line-height: 1.7 !important;
  color: var(--text-secondary) !important;
  text-align: justify !important;
  margin: 0 0 16px !important;
}
#about-notes .about-text p:last-child { margin-bottom: 0 !important; }

/* What the Dark Notepad Does — 3 cols, cards #1f1f24 */
#notes-features {
  background: transparent !important;
  text-align: left !important;
}
#notes-features .block-title {
  font-size: 35.2px !important;
  font-weight: 600 !important;
  text-align: center !important;
}
#notes-features .block-sub {
  font-size: 16px !important;
  text-align: center !important;
}
#notes-features .why-grid {
  grid-template-columns: repeat(3, 1fr) !important;
  text-align: left !important;
  gap: 16px !important;
}
#notes-features .why-card {
  background: #1f1f24 !important;
  border-radius: 16px !important;
  padding: 22px 20px !important;
  display: grid !important;
  grid-template-columns: 44px 1fr !important;
  column-gap: 14px !important;
  row-gap: 6px !important;
  align-items: start !important;
  box-shadow: none !important;
  border: none !important;
  text-align: left !important;
}
#notes-features .why-card .ico {
  width: 44px !important;
  height: 44px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  grid-column: 1 !important;
  grid-row: 1 / span 2 !important;
  align-self: start !important;
  background: rgba(240, 160, 32, 0.12) !important;
  color: var(--amber, #f0a020) !important;
}
#notes-features .why-card .ico svg {
  width: 20px !important;
  height: 20px !important;
  display: block !important;
}
#notes-features .why-card h3 {
  grid-column: 2 !important;
  grid-row: 1 !important;
  font-size: 20px !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  margin: 0 !important;
  align-self: center !important;
  text-align: left !important;
}
#notes-features .why-card p {
  grid-column: 2 !important;
  grid-row: 2 !important;
  font-size: 15px !important;
  line-height: 1.7 !important;
  margin: 0 !important;
  color: var(--text-secondary) !important;
  text-align: left !important;
}
@media (max-width: 900px) {
  #notes-features .why-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 560px) {
  #notes-features .why-grid { grid-template-columns: 1fr !important; }
}

/* Why a dark page for notes — full width justified */
#notes-why {
  background: transparent !important;
}
#notes-why .block-title {
  font-size: 35.2px !important;
  font-weight: 600 !important;
  text-align: center !important;
}
#notes-why .container {
  max-width: 1080px !important;
}
#notes-why .epub-prose {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
}
#notes-why .epub-prose p,
#notes-why p {
  font-size: 16px !important;
  line-height: 1.7 !important;
  color: var(--text-secondary) !important;
  text-align: justify !important;
  margin: 0 0 16px !important;
  max-width: none !important;
}
#notes-why .epub-prose p:last-child,
#notes-why p:last-child { margin-bottom: 0 !important; }

/* Writing Notes in the Dark — cards #1f1f24 */
#notes-guide {
  background: transparent !important;
}
#notes-guide .block-title {
  font-size: 35.2px !important;
  font-weight: 600 !important;
  text-align: center !important;
}
#notes-guide .block-sub {
  font-size: 16px !important;
  text-align: center !important;
}
#notes-guide .epub-article,
#notes-guide .guide-card {
  background: #1f1f24 !important;
  border-radius: 16px !important;
  box-shadow: none !important;
  border: none !important;
}
#notes-guide .epub-article h3,
#notes-guide .guide-card h3 {
  font-size: 20px !important;
  font-weight: 600 !important;
  text-align: left !important;
}
#notes-guide .epub-article p,
#notes-guide .guide-card p {
  font-size: 15px !important;
  line-height: 1.7 !important;
  color: var(--text-secondary) !important;
  text-align: left !important;
}

@media (max-width: 720px) {
  #about-notes .about-card { padding: 28px 20px !important; }
  #about-notes .about-text p,
  #notes-why .epub-prose p,
  #notes-why p { text-align: left !important; }
  #about-notes .block-title,
  #notes-features .block-title,
  #notes-why .block-title,
  #notes-guide .block-title {
    font-size: 28px !important;
  }
}

/* ===== Focus Timer (focus.html) ===== */
#ft-app .pdf-app-header { align-items: center; }
.ft-stage {
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px clamp(18px, 4vw, 48px) 36px;
  box-sizing: border-box;
}
.ft-layout {
  width: 100%;
  max-width: 880px;
  display: grid;
  grid-template-columns: minmax(0, 230px) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}
.ft-side { align-self: start; }
.ft-side-title {
  margin: 0 0 14px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.ft-stats { margin: 0 0 18px; }
.ft-settings {
  display: grid;
  gap: 14px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.ft-settings[hidden] { display: none; }
.ft-field { display: grid; gap: 6px; font-size: 0.82rem; color: var(--text-muted); }
.ft-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
}
.ft-field input:focus { outline: none; border-color: rgba(240, 176, 74, 0.6); }

.ft-main { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.ft-task {
  width: 100%;
  max-width: 420px;
  box-sizing: border-box;
  padding: 8px 4px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  text-align: center;
}
.ft-task::placeholder { color: var(--text-muted); }
.ft-task:focus { outline: none; border-bottom-color: rgba(240, 176, 74, 0.6); }
.ft-phase {
  margin: 22px 0 0;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.ft-ring-wrap {
  position: relative;
  width: min(300px, 74vw);
  aspect-ratio: 1;
  margin: 18px 0 0;
}
.ft-ring { width: 100%; height: 100%; transform: rotate(-90deg); display: block; }
.ft-track { fill: none; stroke: rgba(255, 255, 255, 0.07); stroke-width: 6; }
.ft-progress {
  fill: none;
  stroke: #f0b04a;
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.25s linear, stroke 0.3s ease;
}
.ft-stage.is-short .ft-progress { stroke: #7fc8a9; }
.ft-stage.is-long .ft-progress { stroke: #8fb4f0; }
.ft-stage.th-warm .ft-progress { stroke: #e0a050; }
.ft-stage.th-blue .ft-progress { stroke: #8fb4f0; }
.ft-digits {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(3.2rem, 11vw, 4.6rem);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: var(--text);
}
.ft-dots { display: flex; gap: 10px; margin-top: 26px; min-height: 12px; align-items: center; }
.ft-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-sizing: border-box;
}
.ft-dot.done { background: #f0b04a; border-color: #f0b04a; }
.ft-dot.now { box-shadow: 0 0 0 3px rgba(240, 176, 74, 0.25); }
.ft-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 26px; }
.ft-start { min-width: 132px; }
.ft-hint { margin: 16px 0 0; font-size: 0.8rem; color: var(--text-muted); }
#ft-app #ft-sound.is-on { background: rgba(240, 176, 74, 0.25); color: #f0b04a; }
#ft-app #ft-settings-btn.is-on { background: rgba(240, 176, 74, 0.25); color: #f0b04a; }

/* tone tweaks for the timer surface */
.ft-stage.th-warm .ft-track { stroke: rgba(236, 220, 196, 0.1); }
.ft-stage.th-blue .ft-track { stroke: rgba(210, 222, 240, 0.1); }
.ft-stage.th-oled .ft-track { stroke: rgba(255, 255, 255, 0.06); }

@media (max-width: 760px) {
  .ft-stage { min-height: 0; padding: 26px 16px 28px; align-items: flex-start; }
  .ft-layout { grid-template-columns: 1fr; gap: 26px; }
  .ft-side { order: 2; }
  .ft-main { order: 1; }
}

/* ===== focus.html polish (mirror epub/text/notepad) ===== */

/* What is the Focus Timer? */
#about-focus {
  background: transparent !important;
}
#about-focus .about-card {
  background: #1f1f24 !important;
  border-radius: 20px !important;
  padding: 44px 40px !important;
  box-shadow: none !important;
  border: none !important;
  width: 100% !important;
  max-width: none !important;
}
#about-focus .block-title {
  font-size: 35.2px !important;
  font-weight: 600 !important;
  text-align: center !important;
  margin: 0 0 12px !important;
}
#about-focus .block-sub {
  font-size: 16px !important;
  text-align: center !important;
  color: var(--text-secondary) !important;
  margin: 0 auto 24px !important;
  max-width: 560px;
}
#about-focus .about-text {
  max-width: none !important;
  width: 100% !important;
}
#about-focus .about-text p {
  font-size: 16px !important;
  line-height: 1.7 !important;
  color: var(--text-secondary) !important;
  text-align: justify !important;
  margin: 0 0 16px !important;
}
#about-focus .about-text p:last-child { margin-bottom: 0 !important; }

/* What the Focus Timer Does — 3 cols, cards #1f1f24 */
#focus-features {
  background: transparent !important;
  text-align: left !important;
}
#focus-features .block-title {
  font-size: 35.2px !important;
  font-weight: 600 !important;
  text-align: center !important;
}
#focus-features .block-sub {
  font-size: 16px !important;
  text-align: center !important;
}
#focus-features .why-grid {
  grid-template-columns: repeat(3, 1fr) !important;
  text-align: left !important;
  gap: 16px !important;
}
#focus-features .why-card {
  background: #1f1f24 !important;
  border-radius: 16px !important;
  padding: 22px 20px !important;
  display: grid !important;
  grid-template-columns: 44px 1fr !important;
  column-gap: 14px !important;
  row-gap: 6px !important;
  align-items: start !important;
  box-shadow: none !important;
  border: none !important;
  text-align: left !important;
}
#focus-features .why-card .ico {
  width: 44px !important;
  height: 44px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  grid-column: 1 !important;
  grid-row: 1 / span 2 !important;
  align-self: start !important;
  background: rgba(240, 160, 32, 0.12) !important;
  color: var(--amber, #f0a020) !important;
}
#focus-features .why-card .ico svg {
  width: 20px !important;
  height: 20px !important;
  display: block !important;
}
#focus-features .why-card h3 {
  grid-column: 2 !important;
  grid-row: 1 !important;
  font-size: 20px !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  margin: 0 !important;
  align-self: center !important;
  text-align: left !important;
}
#focus-features .why-card p {
  grid-column: 2 !important;
  grid-row: 2 !important;
  font-size: 15px !important;
  line-height: 1.7 !important;
  margin: 0 !important;
  color: var(--text-secondary) !important;
  text-align: left !important;
}
@media (max-width: 900px) {
  #focus-features .why-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 560px) {
  #focus-features .why-grid { grid-template-columns: 1fr !important; }
}

/* Why a quiet timer helps — full width justified */
#focus-why {
  background: transparent !important;
}
#focus-why .block-title {
  font-size: 35.2px !important;
  font-weight: 600 !important;
  text-align: center !important;
}
#focus-why .container {
  max-width: 1080px !important;
}
#focus-why .epub-prose {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
}
#focus-why .epub-prose p,
#focus-why p {
  font-size: 16px !important;
  line-height: 1.7 !important;
  color: var(--text-secondary) !important;
  text-align: justify !important;
  margin: 0 0 16px !important;
  max-width: none !important;
}
#focus-why .epub-prose p:last-child,
#focus-why p:last-child { margin-bottom: 0 !important; }

/* Working in Timed Blocks — cards #1f1f24 */
#focus-guide {
  background: transparent !important;
}
#focus-guide .block-title {
  font-size: 35.2px !important;
  font-weight: 600 !important;
  text-align: center !important;
}
#focus-guide .block-sub {
  font-size: 16px !important;
  text-align: center !important;
}
#focus-guide .epub-article,
#focus-guide .guide-card {
  background: #1f1f24 !important;
  border-radius: 16px !important;
  box-shadow: none !important;
  border: none !important;
}
#focus-guide .epub-article h3,
#focus-guide .guide-card h3 {
  font-size: 20px !important;
  font-weight: 600 !important;
  text-align: left !important;
}
#focus-guide .epub-article p,
#focus-guide .guide-card p {
  font-size: 15px !important;
  line-height: 1.7 !important;
  color: var(--text-secondary) !important;
  text-align: left !important;
}

@media (max-width: 720px) {
  #about-focus .about-card { padding: 28px 20px !important; }
  #about-focus .about-text p,
  #focus-why .epub-prose p,
  #focus-why p { text-align: left !important; }
  #about-focus .block-title,
  #focus-features .block-title,
  #focus-why .block-title,
  #focus-guide .block-title {
    font-size: 28px !important;
  }
}

/* ===== Image Color (imgc.html) ===== */
.imgc-stage {
  min-height: 0;
  padding: 24px clamp(14px, 3vw, 32px) 28px;
  box-sizing: border-box;
}
.imgc-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 360px;
  padding: 36px 24px;
  border: 1.5px dashed rgba(240, 176, 74, 0.35);
  border-radius: 20px;
  background: #2a2a2e;
  color: #b9b4aa;
  text-align: center;
  cursor: pointer;
  box-sizing: border-box;
}
.imgc-drop:hover { border-color: rgba(240, 176, 74, 0.7); }
.imgc-drop strong { font-family: 'Poppins', sans-serif; font-size: 1.05rem; font-weight: 600; color: #f2efe8; }
.imgc-drop span:last-child { font-size: 0.9rem; }
.imgc-drop-ico {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(240, 176, 74, 0.12);
  color: #f0b04a;
  margin-bottom: 6px;
}
.imgc-work {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: start;
}
.imgc-work[hidden], .imgc-drop[hidden] { display: none; }
.imgc-view {
  min-width: 0;
  background: #1f1f24;
  border-radius: 20px;
  padding: 12px;
  box-sizing: border-box;
}
.imgc-ba {
  min-height: 0;
  height: auto;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  border-radius: 14px;
  aspect-ratio: 4 / 3;
}
.imgc-ba .ba-layer { display: block; }
.imgc-ba .ba-layer canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.imgc-panel {
  background: #2a2a2e;
  border-radius: 20px;
  padding: 22px 22px 20px;
  box-sizing: border-box;
  color: #e6e6ea;
}
.imgc-side-title {
  margin: 0 0 14px;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #f2efe8;
}
.imgc-side-title + .imgc-sliders,
.imgc-side-title + .imgc-stats { margin-top: 0; }
.imgc-panel .imgc-side-title:not(:first-child) { margin-top: 24px; }
.imgc-sliders { display: flex; flex-direction: column; gap: 16px; }
.imgc-field { display: flex; flex-direction: column; gap: 8px; font-size: 0.9rem; color: #d6d2c8; }
.imgc-field > span { display: flex; justify-content: space-between; align-items: baseline; }
.imgc-field output { font-variant-numeric: tabular-nums; color: #f0b04a; font-weight: 600; min-width: 2.5em; text-align: right; }
.imgc-field input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #3a3a42;
  outline: none;
  margin: 0;
}
.imgc-field input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f0b04a;
  border: 0;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.imgc-field input[type=range]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f0b04a;
  border: 0;
  cursor: pointer;
}
.imgc-field input[type=range]:focus-visible { box-shadow: 0 0 0 3px rgba(240, 176, 74, 0.35); }
.imgc-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  font-size: 0.9rem;
  color: #d6d2c8;
  cursor: pointer;
}
.imgc-check input { width: 16px; height: 16px; accent-color: #f0b04a; margin: 0; }
.imgc-stats { margin: 0 0 14px; }
.imgc-stats dd { font-variant-numeric: tabular-nums; }
.imgc-hist {
  display: block;
  width: 100%;
  height: 90px;
  border-radius: 10px;
  background: #1f1f24;
  box-sizing: border-box;
}
.imgc-advice {
  margin: 14px 0 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #c9c4b8;
  text-align: justify;
}
.imgc-stage.th-warm .imgc-panel { background: #332b21; }
.imgc-stage.th-blue .imgc-panel { background: #1d2a3b; }
.imgc-stage.th-oled .imgc-panel { background: #111114; }
.imgc-stage.th-warm .imgc-view, .imgc-stage.th-blue .imgc-view, .imgc-stage.th-oled .imgc-view { background: transparent; padding: 0; }
.imgc-stage .pdf-select { min-width: 120px; }
.imgc-stage .pdf-tool-btn:disabled { opacity: 0.4; cursor: not-allowed; }

@media (max-width: 760px) {
  .imgc-work { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .imgc-drop { min-height: 240px; padding: 28px 18px; }
  .imgc-view { padding: 8px; }
  .imgc-panel { padding: 18px 16px; }
}

/* ===== imgc.html polish (mirror epub/text/notepad/focus) ===== */

/* What is Image Color? */
#about-imgc {
  background: transparent !important;
}
#about-imgc .about-card {
  background: #1f1f24 !important;
  border-radius: 20px !important;
  padding: 44px 40px !important;
  box-shadow: none !important;
  border: none !important;
  width: 100% !important;
  max-width: none !important;
}
#about-imgc .block-title {
  font-size: 35.2px !important;
  font-weight: 600 !important;
  text-align: center !important;
  margin: 0 0 12px !important;
}
#about-imgc .block-sub {
  font-size: 16px !important;
  text-align: center !important;
  color: var(--text-secondary) !important;
  margin: 0 auto 24px !important;
  max-width: 560px;
}
#about-imgc .about-text {
  max-width: none !important;
  width: 100% !important;
}
#about-imgc .about-text p {
  font-size: 16px !important;
  line-height: 1.7 !important;
  color: var(--text-secondary) !important;
  text-align: justify !important;
  margin: 0 0 16px !important;
}
#about-imgc .about-text p:last-child { margin-bottom: 0 !important; }

/* What Image Color Does — 3 cols, cards #1f1f24 */
#imgc-features {
  background: transparent !important;
  text-align: left !important;
}
#imgc-features .block-title {
  font-size: 35.2px !important;
  font-weight: 600 !important;
  text-align: center !important;
}
#imgc-features .block-sub {
  font-size: 16px !important;
  text-align: center !important;
}
#imgc-features .why-grid {
  grid-template-columns: repeat(3, 1fr) !important;
  text-align: left !important;
  gap: 16px !important;
}
#imgc-features .why-card {
  background: #1f1f24 !important;
  border-radius: 16px !important;
  padding: 22px 20px !important;
  display: grid !important;
  grid-template-columns: 44px 1fr !important;
  column-gap: 14px !important;
  row-gap: 6px !important;
  align-items: start !important;
  box-shadow: none !important;
  border: none !important;
  text-align: left !important;
}
#imgc-features .why-card .ico {
  width: 44px !important;
  height: 44px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  grid-column: 1 !important;
  grid-row: 1 / span 2 !important;
  align-self: start !important;
  background: rgba(240, 160, 32, 0.12) !important;
  color: var(--amber, #f0a020) !important;
}
#imgc-features .why-card .ico svg {
  width: 20px !important;
  height: 20px !important;
  display: block !important;
}
#imgc-features .why-card h3 {
  grid-column: 2 !important;
  grid-row: 1 !important;
  font-size: 20px !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  margin: 0 !important;
  align-self: center !important;
  text-align: left !important;
}
#imgc-features .why-card p {
  grid-column: 2 !important;
  grid-row: 2 !important;
  font-size: 15px !important;
  line-height: 1.7 !important;
  margin: 0 !important;
  color: var(--text-secondary) !important;
  text-align: left !important;
}
@media (max-width: 900px) {
  #imgc-features .why-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 560px) {
  #imgc-features .why-grid { grid-template-columns: 1fr !important; }
}

/* Why image colour matters — full width justified */
#imgc-why {
  background: transparent !important;
}
#imgc-why .block-title {
  font-size: 35.2px !important;
  font-weight: 600 !important;
  text-align: center !important;
}
#imgc-why .container {
  max-width: 1080px !important;
}
#imgc-why .epub-prose {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
}
#imgc-why .epub-prose p,
#imgc-why p {
  font-size: 16px !important;
  line-height: 1.7 !important;
  color: var(--text-secondary) !important;
  text-align: justify !important;
  margin: 0 0 16px !important;
  max-width: none !important;
}
#imgc-why .epub-prose p:last-child,
#imgc-why p:last-child { margin-bottom: 0 !important; }

/* Adjusting Images for a Dark Screen — cards #1f1f24 */
#imgc-guide {
  background: transparent !important;
}
#imgc-guide .block-title {
  font-size: 35.2px !important;
  font-weight: 600 !important;
  text-align: center !important;
}
#imgc-guide .block-sub {
  font-size: 16px !important;
  text-align: center !important;
}
#imgc-guide .epub-article,
#imgc-guide .guide-card {
  background: #1f1f24 !important;
  border-radius: 16px !important;
  box-shadow: none !important;
  border: none !important;
}
#imgc-guide .epub-article h3,
#imgc-guide .guide-card h3 {
  font-size: 20px !important;
  font-weight: 600 !important;
  text-align: left !important;
}
#imgc-guide .epub-article p,
#imgc-guide .guide-card p {
  font-size: 15px !important;
  line-height: 1.7 !important;
  color: var(--text-secondary) !important;
  text-align: left !important;
}

@media (max-width: 720px) {
  #about-imgc .about-card { padding: 28px 20px !important; }
  #about-imgc .about-text p,
  #imgc-why .epub-prose p,
  #imgc-why p { text-align: left !important; }
  #about-imgc .block-title,
  #imgc-features .block-title,
  #imgc-why .block-title,
  #imgc-guide .block-title {
    font-size: 28px !important;
  }
}

/* ===== Dark Screenshots (shot.html) ===== */
.shot-caption input[type=text] {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #1a1a1e;
  color: #f2efe8;
  font: inherit;
  font-size: 0.95rem;
}
.shot-caption input[type=text]::placeholder { color: #8a867d; }
.shot-caption input[type=text]:focus-visible {
  outline: none;
  border-color: rgba(240, 176, 74, 0.7);
  box-shadow: 0 0 0 3px rgba(240, 176, 74, 0.25);
}
#shot-frame-btn[aria-pressed="true"] { color: #f0b04a; border-color: rgba(240, 176, 74, 0.6); }
#shot-app .imgc-stage .pdf-select { min-width: 120px; }
.shot-caption { margin-top: 8px; }

/* Dark Screenshots: edit toolbar, marks, combine list */
.shot-edit[hidden], .shot-hint[hidden], #shot-images[hidden], #shot-crop-apply[hidden], #shot-crop-cancel[hidden], #shot-crop-reset[hidden] { display: none !important; }
#shot-app .shot-edit { border-top: 1px solid rgba(255, 255, 255, 0.06); }
#shot-app .shot-group { flex-wrap: wrap; }
#shot-app .shot-tool-btn[aria-pressed="true"],
#shot-app #shot-crop[aria-pressed="true"] { background: rgba(240, 176, 74, 0.22); color: #f0b04a; }
#shot-app .pdf-tool-btn:disabled { opacity: 0.4; cursor: default; }
#shot-app .shot-colour {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px; background: rgba(255, 255, 255, 0.06); cursor: pointer;
}
#shot-app .shot-colour input[type=color] {
  width: 22px; height: 22px; border: none; padding: 0; background: none; cursor: pointer;
}
#shot-app .shot-colour input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
#shot-app .shot-colour input[type=color]::-webkit-color-swatch { border: 2px solid #e6e6ea; border-radius: 6px; }
#shot-app .shot-colour input[type=color]::-moz-color-swatch { border: 2px solid #e6e6ea; border-radius: 6px; }
#shot-app .shot-add-btn { width: auto; padding: 0 12px; cursor: pointer; }
#shot-app .shot-hint {
  margin: 0; padding: 8px 16px; font-size: 0.85rem; color: #f0b04a;
  background: rgba(240, 176, 74, 0.08);
}
#shot-app .shot-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
#shot-app .shot-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 0.85rem; color: #d6d2c8; min-width: 0;
}
#shot-app .shot-list li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
#shot-app .shot-remove { width: auto; padding: 0 10px; height: 28px; font-size: 0.8rem; flex: none; }
#shot-app .shot-add-btn:hover { background: rgba(255, 255, 255, 0.12); }
#ba.shot-marking { cursor: crosshair; touch-action: none; }
#ba.shot-marking .ba-handle { pointer-events: none; opacity: 0.5; }
#ba.shot-marking .ba-label { pointer-events: none; }

/* ===== shot.html polish (mirror other tool pages) ===== */

/* What are Dark Screenshots? */
#about-shot {
  background: transparent !important;
}
#about-shot .about-card {
  background: #1f1f24 !important;
  border-radius: 20px !important;
  padding: 44px 40px !important;
  box-shadow: none !important;
  border: none !important;
  width: 100% !important;
  max-width: none !important;
}
#about-shot .block-title {
  font-size: 35.2px !important;
  font-weight: 600 !important;
  text-align: center !important;
  margin: 0 0 12px !important;
}
#about-shot .block-sub {
  font-size: 16px !important;
  text-align: center !important;
  color: var(--text-secondary) !important;
  margin: 0 auto 24px !important;
  max-width: 560px;
}
#about-shot .about-text {
  max-width: none !important;
  width: 100% !important;
}
#about-shot .about-text p {
  font-size: 16px !important;
  line-height: 1.7 !important;
  color: var(--text-secondary) !important;
  text-align: justify !important;
  margin: 0 0 16px !important;
}
#about-shot .about-text p:last-child { margin-bottom: 0 !important; }

/* What Dark Screenshots Does — 3 cols, cards #1f1f24 */
#shot-features {
  background: transparent !important;
  text-align: left !important;
}
#shot-features .block-title {
  font-size: 35.2px !important;
  font-weight: 600 !important;
  text-align: center !important;
}
#shot-features .block-sub {
  font-size: 16px !important;
  text-align: center !important;
}
#shot-features .why-grid {
  grid-template-columns: repeat(3, 1fr) !important;
  text-align: left !important;
  gap: 16px !important;
}
#shot-features .why-card {
  background: #1f1f24 !important;
  border-radius: 16px !important;
  padding: 22px 20px !important;
  display: grid !important;
  grid-template-columns: 44px 1fr !important;
  column-gap: 14px !important;
  row-gap: 6px !important;
  align-items: start !important;
  box-shadow: none !important;
  border: none !important;
  text-align: left !important;
}
#shot-features .why-card .ico {
  width: 44px !important;
  height: 44px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  grid-column: 1 !important;
  grid-row: 1 / span 2 !important;
  align-self: start !important;
  background: rgba(240, 160, 32, 0.12) !important;
  color: var(--amber, #f0a020) !important;
}
#shot-features .why-card .ico svg {
  width: 20px !important;
  height: 20px !important;
  display: block !important;
}
#shot-features .why-card h3 {
  grid-column: 2 !important;
  grid-row: 1 !important;
  font-size: 20px !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  margin: 0 !important;
  align-self: center !important;
  text-align: left !important;
}
#shot-features .why-card p {
  grid-column: 2 !important;
  grid-row: 2 !important;
  font-size: 15px !important;
  line-height: 1.7 !important;
  margin: 0 !important;
  color: var(--text-secondary) !important;
  text-align: left !important;
}
@media (max-width: 900px) {
  #shot-features .why-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 560px) {
  #shot-features .why-grid { grid-template-columns: 1fr !important; }
}

/* Why a dark screenshot fits a dark screen — full width justified */
#shot-why {
  background: transparent !important;
}
#shot-why .block-title {
  font-size: 35.2px !important;
  font-weight: 600 !important;
  text-align: center !important;
}
#shot-why .container {
  max-width: 1080px !important;
}
#shot-why .epub-prose {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
}
#shot-why .epub-prose p,
#shot-why p {
  font-size: 16px !important;
  line-height: 1.7 !important;
  color: var(--text-secondary) !important;
  text-align: justify !important;
  margin: 0 0 16px !important;
  max-width: none !important;
}
#shot-why .epub-prose p:last-child,
#shot-why p:last-child { margin-bottom: 0 !important; }

/* Sharing Screenshots from a Dark Screen — cards #1f1f24, left titles */
#shot-guide {
  background: transparent !important;
}
#shot-guide .block-title {
  font-size: 35.2px !important;
  font-weight: 600 !important;
  text-align: center !important;
}
#shot-guide .block-sub {
  font-size: 16px !important;
  text-align: center !important;
}
#shot-guide .epub-article,
#shot-guide .guide-card {
  background: #1f1f24 !important;
  border-radius: 16px !important;
  box-shadow: none !important;
  border: none !important;
  text-align: left !important;
}
#shot-guide .epub-article h3,
#shot-guide .guide-card h3 {
  font-size: 20px !important;
  font-weight: 600 !important;
  text-align: left !important;
}
#shot-guide .epub-article p,
#shot-guide .guide-card p {
  font-size: 15px !important;
  line-height: 1.7 !important;
  color: var(--text-secondary) !important;
  text-align: left !important;
}

@media (max-width: 720px) {
  #about-shot .about-card { padding: 28px 20px !important; }
  #about-shot .about-text p,
  #shot-why .epub-prose p,
  #shot-why p { text-align: left !important; }
  #about-shot .block-title,
  #shot-features .block-title,
  #shot-why .block-title,
  #shot-guide .block-title {
    font-size: 28px !important;
  }
}

/* ===== docx.html ===== */
#about-docx { background: transparent !important; }
#about-docx .about-card {
  background: #1f1f24 !important; border-radius: 20px !important;
  padding: 44px 40px !important; border: none !important; box-shadow: none !important;
}
#about-docx .block-title { font-size: 35.2px !important; font-weight: 600 !important; text-align: center !important; }
#about-docx .block-sub { font-size: 16px !important; text-align: center !important; }
#about-docx .about-text p {
  font-size: 16px !important; line-height: 1.7 !important; text-align: justify !important;
  color: var(--text-secondary) !important; margin: 0 0 16px !important;
}
#docx-features { background: transparent !important; text-align: left !important; }
#docx-features .block-title { font-size: 35.2px !important; font-weight: 600 !important; text-align: center !important; }
#docx-features .block-sub { font-size: 16px !important; text-align: center !important; }
#docx-features .why-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 16px !important; }
#docx-features .why-card {
  background: #1f1f24 !important; border-radius: 16px !important; padding: 22px 20px !important;
  display: grid !important; grid-template-columns: 44px 1fr !important;
  column-gap: 14px !important; row-gap: 6px !important; text-align: left !important;
  border: none !important; box-shadow: none !important;
}
#docx-features .why-card .ico {
  width: 44px !important; height: 44px !important; border-radius: 50% !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
  margin: 0 !important; grid-column: 1 !important; grid-row: 1 / span 2 !important;
  background: rgba(240, 160, 32, 0.12) !important; color: var(--amber, #f0a020) !important;
}
#docx-features .why-card .ico svg { width: 20px !important; height: 20px !important; }
#docx-features .why-card h3 {
  grid-column: 2 !important; grid-row: 1 !important; font-size: 20px !important;
  font-weight: 600 !important; margin: 0 !important; text-align: left !important;
}
#docx-features .why-card p {
  grid-column: 2 !important; grid-row: 2 !important; font-size: 15px !important;
  line-height: 1.7 !important; margin: 0 !important; text-align: left !important;
  color: var(--text-secondary) !important;
}
@media (max-width: 900px) { #docx-features .why-grid { grid-template-columns: repeat(2, 1fr) !important; } }
@media (max-width: 560px) { #docx-features .why-grid { grid-template-columns: 1fr !important; } }
#docx-why .epub-prose p {
  font-size: 16px !important; line-height: 1.7 !important; text-align: justify !important;
  color: var(--text-secondary) !important; max-width: none !important;
}
#docx-guide .epub-article {
  background: #1f1f24 !important; border-radius: 16px !important;
  border: none !important; box-shadow: none !important; text-align: left !important;
}
#docx-guide .epub-article h3 { font-size: 20px !important; font-weight: 600 !important; text-align: left !important; }
#docx-guide .epub-article p { font-size: 15px !important; line-height: 1.7 !important; text-align: left !important; color: var(--text-secondary) !important; }
.docx-body img { max-width: 100%; height: auto; border-radius: 6px; margin: 12px 0; }
.docx-body table { border-collapse: collapse; width: 100%; margin: 16px 0; font-size: 0.95em; }
.docx-body th, .docx-body td { border: 1px solid rgba(255,255,255,0.12); padding: 8px 10px; text-align: left; }
.docx-body h1, .docx-body h2, .docx-body h3 { margin: 1.2em 0 0.5em; line-height: 1.25; }
.docx-body p { margin: 0 0 0.85em; }
mark.docx-hit { background: rgba(240, 160, 32, 0.35); color: inherit; border-radius: 2px; }
mark.docx-hit-active { background: rgba(240, 160, 32, 0.7); outline: 1px solid var(--amber, #f0a020); }

#docx-why .epub-prose {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
}
#docx-why .block-title { font-size: 35.2px !important; font-weight: 600 !important; text-align: center !important; }
#docx-why .container { max-width: 1080px !important; }
.lib-empty { margin: 0; padding: 12px 4px; color: var(--text-secondary); font-size: 14px; line-height: 1.5; }
#docx-app .pdf-dropzone { cursor: pointer; }
.lib-panel { min-width: 280px; max-width: 340px; }
.lib-panel-body { max-height: 320px; overflow-y: auto; }

/* Fix My Library dropdown items (button reset — no light/white native chrome) */
.lib-panel .lib-item,
button.lib-item {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  width: 100% !important;
  margin: 0 0 2px !important;
  padding: 10px 12px !important;
  border: none !important;
  border-radius: 12px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--text, #f0f0f2) !important;
  font: inherit !important;
  text-align: left !important;
  cursor: pointer !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}
.lib-panel .lib-item:hover,
button.lib-item:hover {
  background: rgba(255, 255, 255, 0.06) !important;
}
.lib-panel .lib-item-text {
  display: flex !important;
  flex-direction: column !important;
  min-width: 0 !important;
  flex: 1 !important;
}
.lib-panel .lib-item-name {
  font-size: 0.9rem !important;
  font-weight: 500 !important;
  color: var(--text, #f0f0f2) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.lib-panel .lib-item-meta {
  font-size: 0.78rem !important;
  color: var(--text-muted, #8a8a94) !important;
  margin-top: 2px !important;
}
.lib-panel .lib-group-title {
  margin: 12px 10px 6px !important;
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: var(--text-muted, #8a8a94) !important;
}
.lib-panel .lib-empty {
  margin: 4px 10px 10px !important;
  font-size: 0.86rem !important;
  color: var(--text-secondary, #a8a8b0) !important;
  background: none !important;
  border: none !important;
}
.lib-panel {
  background: #25252b !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 16px !important;
  overflow: hidden !important;
}
.lib-panel-body {
  background: transparent !important;
  padding: 12px 8px 8px !important;
}
.lib-panel-foot {
  background: transparent !important;
  border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
  color: var(--amber, #f0a020) !important;
}

/* My Library panel: never clip under tool card, solid footer */
.pdf-app-actions,
.pdf-app-header,
.lib-wrap {
  overflow: visible !important;
}
.pdf-app {
  overflow: visible !important;
}
.lib-wrap {
  position: relative !important;
  z-index: 40;
}
.lib-panel {
  position: absolute !important;
  top: calc(100% + 8px) !important;
  right: 0 !important;
  z-index: 80 !important;
  width: 320px !important;
  max-width: min(320px, calc(100vw - 24px)) !important;
  max-height: min(420px, 70vh) !important;
  display: flex !important;
  flex-direction: column !important;
  background: #25252b !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 16px !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55) !important;
  overflow: hidden !important;
}
.lib-panel[hidden] {
  display: none !important;
}
.lib-panel-body {
  flex: 1 1 auto !important;
  max-height: 300px !important;
  overflow-y: auto !important;
  padding: 12px 8px 8px !important;
  background: transparent !important;
}
.lib-panel-foot {
  flex: 0 0 auto !important;
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 14px 12px !important;
  border: 0 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 0 !important;
  background: #1f1f24 !important;
  color: var(--amber, #f0a020) !important;
  font: inherit !important;
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  text-align: center !important;
  cursor: pointer !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  box-shadow: none !important;
}
.lib-panel-foot:hover {
  background: #2a2a30 !important;
}
.lib-panel-note { display: none !important; }

.lib-panel-foot {
  background: transparent !important;
  border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
}
.lib-panel-foot:hover {
  background: rgba(255, 255, 255, 0.04) !important;
}

/* ===== contrast.html ===== */
#about-cc .about-card {
  background: #1f1f24 !important; border-radius: 20px !important;
  padding: 44px 40px !important; border: none !important; box-shadow: none !important;
}
#about-cc .block-title, #cc-features .block-title, #cc-why .block-title, #cc-guide .block-title {
  font-size: 35.2px !important; font-weight: 600 !important; text-align: center !important;
}
#about-cc .about-text p {
  font-size: 16px !important; line-height: 1.7 !important; text-align: justify !important;
  color: var(--text-secondary) !important; margin: 0 0 16px !important;
}
#cc-features .why-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 16px !important; }
#cc-features .why-card {
  background: #1f1f24 !important; border-radius: 16px !important; padding: 22px 20px !important;
  display: grid !important; grid-template-columns: 44px 1fr !important;
  column-gap: 14px !important; row-gap: 6px !important; text-align: left !important;
  border: none !important; box-shadow: none !important;
}
#cc-features .why-card .ico {
  width: 44px !important; height: 44px !important; border-radius: 50% !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
  margin: 0 !important; grid-column: 1 !important; grid-row: 1 / span 2 !important;
  background: rgba(240, 160, 32, 0.12) !important; color: var(--amber, #f0a020) !important;
}
#cc-features .why-card h3 { grid-column: 2; grid-row: 1; font-size: 20px !important; font-weight: 600 !important; margin: 0; text-align: left; }
#cc-features .why-card p { grid-column: 2; grid-row: 2; font-size: 15px !important; margin: 0; text-align: left; color: var(--text-secondary); }
@media (max-width: 900px) { #cc-features .why-grid { grid-template-columns: repeat(2, 1fr) !important; } }
@media (max-width: 560px) { #cc-features .why-grid { grid-template-columns: 1fr !important; } }
#cc-why .epub-prose { max-width: none !important; width: 100% !important; }
#cc-why .epub-prose p { font-size: 16px !important; line-height: 1.7 !important; text-align: justify !important; color: var(--text-secondary); }
#cc-guide .epub-article { background: #1f1f24 !important; border-radius: 16px !important; border: none !important; box-shadow: none !important; text-align: left; }
#cc-guide .epub-article h3 { font-size: 20px !important; font-weight: 600; text-align: left; }
#cc-guide .epub-article p { font-size: 15px !important; color: var(--text-secondary); text-align: left; }

.cc-grid {
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: 24px;
  padding: 8px 4px 20px;
}
@media (max-width: 800px) {
  .cc-grid { grid-template-columns: 1fr; }
}
.cc-controls { display: flex; flex-direction: column; gap: 16px; }
.cc-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cc-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cc-input-row input[type="color"] {
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
}
.cc-input-row input[type="text"] {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: #1a1a1e;
  color: var(--text);
  font: inherit;
  font-family: ui-monospace, monospace;
  letter-spacing: 0.04em;
}
.cc-presets { display: flex; flex-wrap: wrap; gap: 8px; }
.cc-preset {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: #1f1f24;
  color: var(--text-secondary);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}
.cc-preset:hover { border-color: rgba(240,160,32,0.4); color: var(--text); }
.cc-result { text-align: center; padding: 12px 0; }
.cc-ratio {
  margin: 0;
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}
.cc-ratio-label {
  margin: 4px 0 14px;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.cc-badges { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.cc-badge {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}
.cc-badge.pass { background: rgba(70, 190, 120, 0.15); color: #6dd49a; }
.cc-badge.fail { background: rgba(220, 90, 90, 0.15); color: #e88; }
.cc-suggest {
  padding: 14px 16px;
  border-radius: 14px;
  background: #1f1f24;
}
.cc-suggest h3 { margin: 0 0 6px; font-size: 0.95rem; }
.cc-suggest p { margin: 0 0 12px; font-size: 0.9rem; color: var(--text-secondary); line-height: 1.5; }
.cc-preview {
  border-radius: 16px;
  padding: 28px 28px 32px;
  min-height: 280px;
  transition: background 0.15s, color 0.15s;
}
.cc-preview-label {
  margin: 0 0 16px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
}
.cc-prev-h { margin: 0 0 12px; font-size: 1.45rem; font-weight: 700; }
.cc-prev-p { margin: 0 0 12px; font-size: 1rem; line-height: 1.65; opacity: 0.95; }
.cc-prev-large { font-size: 1.25rem; font-weight: 600; }
.cc-prev-a { font-weight: 600; text-decoration: underline; }
.cc-prev-btn {
  margin-top: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid;
  font: inherit;
  font-weight: 600;
  cursor: default;
}

/* Contrast tool layout: more breathing room, less edge-hugging */
#contrast-tool .pdf-app {
  padding: 28px 32px 24px !important;
}
#contrast-tool .pdf-app-header {
  margin-bottom: 20px !important;
  padding: 0 4px !important;
}
#contrast-tool .cc-grid {
  gap: 28px !important;
  padding: 12px 8px 28px !important;
  align-items: start !important;
}
#contrast-tool .cc-controls {
  gap: 20px !important;
  padding: 4px 8px 0 4px !important;
}
#contrast-tool .cc-field label {
  margin-bottom: 10px !important;
}
#contrast-tool .cc-input-row input[type="text"] {
  padding: 11px 14px !important;
  font-size: 0.95rem !important;
}
#contrast-tool .cc-input-row input[type="color"] {
  width: 40px !important;
  height: 40px !important;
}
#contrast-tool .cc-ratio {
  font-size: 2rem !important;
  line-height: 1.15 !important;
}
#contrast-tool .cc-ratio-label {
  margin: 6px 0 12px !important;
}
#contrast-tool .cc-badges {
  gap: 8px !important;
  max-width: 280px;
  margin: 0 auto;
}
#contrast-tool .cc-preview {
  padding: 32px 36px 36px !important;
  min-height: 320px !important;
  border-radius: 18px !important;
  border: 1px solid rgba(255,255,255,0.06);
}
#contrast-tool .cc-prev-h {
  font-size: 1.35rem !important;
  margin-bottom: 14px !important;
}
#contrast-tool .cc-prev-p {
  font-size: 0.98rem !important;
  line-height: 1.7 !important;
  margin-bottom: 14px !important;
}
#contrast-tool .cc-prev-large {
  font-size: 1.15rem !important;
}
#contrast-tool .pdf-app-foot {
  margin-top: 8px !important;
  padding-top: 16px !important;
}
@media (max-width: 800px) {
  #contrast-tool .pdf-app { padding: 20px 18px 18px !important; }
  #contrast-tool .cc-preview { padding: 24px 22px 28px !important; }
}

/* ===== sheet.html (CSV / Excel Viewer) ===== */
#about-sv .about-card {
  background: #1f1f24 !important; border-radius: 20px !important;
  padding: 44px 40px !important; border: none !important; box-shadow: none !important;
}
#about-sv .block-title, #sv-features .block-title, #sv-why .block-title, #sv-guide .block-title {
  font-size: 35.2px !important; font-weight: 600 !important; text-align: center !important;
}
#about-sv .about-text p {
  font-size: 16px !important; line-height: 1.7 !important; text-align: justify !important;
  color: var(--text-secondary) !important; margin: 0 0 16px !important;
}
#sv-features .why-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 16px !important; }
#sv-features .why-card {
  background: #1f1f24 !important; border-radius: 16px !important; padding: 22px 20px !important;
  display: grid !important; grid-template-columns: 44px 1fr !important;
  column-gap: 14px !important; row-gap: 6px !important; text-align: left !important;
  border: none !important; box-shadow: none !important;
}
#sv-features .why-card .ico {
  width: 44px !important; height: 44px !important; border-radius: 50% !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
  margin: 0 !important; grid-column: 1 !important; grid-row: 1 / span 2 !important;
  background: rgba(240, 160, 32, 0.12) !important; color: var(--amber, #f0a020) !important;
}
#sv-features .why-card h3 { grid-column: 2; grid-row: 1; font-size: 20px !important; font-weight: 600 !important; margin: 0; text-align: left; }
#sv-features .why-card p { grid-column: 2; grid-row: 2; font-size: 15px !important; margin: 0; text-align: left; color: var(--text-secondary); }
@media (max-width: 900px) { #sv-features .why-grid { grid-template-columns: repeat(2, 1fr) !important; } }
@media (max-width: 560px) { #sv-features .why-grid { grid-template-columns: 1fr !important; } }
#sv-why .epub-prose { max-width: none !important; width: 100% !important; }
#sv-why .epub-prose p { font-size: 16px !important; line-height: 1.7 !important; text-align: justify !important; color: var(--text-secondary); }
#sv-guide .epub-article { background: #1f1f24 !important; border-radius: 16px !important; border: none !important; box-shadow: none !important; text-align: left; }
#sv-guide .epub-article h3 { font-size: 20px !important; font-weight: 600; text-align: left; }
#sv-guide .epub-article p { font-size: 15px !important; color: var(--text-secondary); text-align: left; }

#sheet-tool .pdf-app { padding: 28px 32px 24px !important; overflow: visible !important; }
.sv-viewer { margin-top: 8px; }
.sv-toolbar { flex-wrap: wrap; gap: 10px; }
.sv-meta {
  margin-left: 10px;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.sv-search {
  min-width: 160px;
  max-width: 220px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  background: #1a1a1e;
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
}
.sv-table-wrap {
  max-height: min(62vh, 640px);
  overflow: auto;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.06);
  background: #1a1a1e;
}
.sv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.sv-table th,
.sv-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  white-space: nowrap;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sv-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #25252b;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  user-select: none;
}
.sv-table th:hover { color: var(--text); }
.sv-table th.sort-asc::after { content: ' ▲'; font-size: 0.7em; color: var(--amber); }
.sv-table th.sort-desc::after { content: ' ▼'; font-size: 0.7em; color: var(--amber); }
.sv-table tbody tr:nth-child(even) td { background: rgba(255,255,255,0.02); }
.sv-table tbody tr:hover td { background: rgba(240,160,32,0.06); }
.sv-table td { color: var(--text-secondary); }



/* Dark Tools dropdown: 3 tools per row */
.nav-panel {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(200px, 1fr)) !important;
  gap: 6px !important;
  width: min(720px, calc(100vw - 32px)) !important;
  padding: 12px !important;
  box-sizing: border-box !important;
}
.nav-panel .nav-item {
  display: flex !important;
  align-items: flex-start !important;
  gap: 12px !important;
  margin: 0 !important;
  padding: 12px 12px !important;
  border-radius: 12px !important;
}
@media (max-width: 720px) {
  .nav-panel {
    grid-template-columns: 1fr !important;
    width: min(340px, calc(100vw - 24px)) !important;
  }
}

/* Sheet tool: identical dropzone metrics to home PDF reader */
#sheet-tool .pdf-app {
  background: #1f1f24 !important;
  border-radius: 20px !important;
  overflow: visible !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18) !important;
  margin-bottom: 36px !important;
  padding: 0 !important;
}
#sheet-tool .pdf-app-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  padding: 20px 24px 8px !important;
  margin: 0 !important;
}
#sheet-tool .pdf-dropzone {
  margin: 12px 20px 8px !important;
  border: 2px dashed rgba(255, 255, 255, 0.14) !important;
  border-radius: 16px !important;
  min-height: 240px !important;
  padding: 40px 24px !important;
  background: #1f1f24 !important;
  background-color: #1f1f24 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  box-sizing: border-box !important;
}
#sheet-tool .pdf-dropzone.dragover {
  background: rgba(240, 160, 32, 0.08) !important;
  background-color: rgba(240, 160, 32, 0.08) !important;
}
#sheet-tool .dropzone-inner {
  max-width: 360px !important;
  margin: 0 auto !important;
}
#sheet-tool .dropzone-icon {
  width: 56px !important;
  height: 56px !important;
  margin: 0 auto 16px !important;
  border-radius: 50% !important;
  background: var(--amber-soft) !important;
  color: var(--amber) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
#sheet-tool .dropzone-title {
  font-size: 1.05rem !important;
  font-weight: 600 !important;
  color: var(--text) !important;
  margin: 0 0 6px !important;
}
#sheet-tool .dropzone-hint {
  margin: 0 0 18px !important;
  font-size: 0.85rem !important;
  color: var(--text-muted) !important;
  background: none !important;
  height: auto !important;
  padding: 0 !important;
  border-radius: 0 !important;
  min-width: 0 !important;
}
#sheet-tool .dropzone-btns {
  display: flex !important;
  justify-content: center !important;
  gap: 10px !important;
}
#sheet-tool .pdf-app-foot {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 12px 20px 16px !important;
  font-size: 0.8rem !important;
  color: var(--text-muted) !important;
  margin: 0 !important;
}
#sheet-tool .sv-viewer {
  margin: 0 12px 16px !important;
}

/* Sheet dropzone: same surface as epub card (no darker inset) */
#sheet-tool .pdf-dropzone {
  background: #1f1f24 !important;
  background-color: #1f1f24 !important;
  background-image: none !important;
}
#sheet-tool .pdf-app {
  background: #1f1f24 !important;
}

#sheet-tool .pdf-dropzone[hidden],
#sheet-tool .pdf-app-foot[hidden] {
  display: none !important;
}
#sheet-tool .sv-viewer[hidden] {
  display: none !important;
}

/* Image tools: dropzone like other tools; hide toolbar until open */
#imgc-app .pdf-dropzone,
#shot-app .pdf-dropzone {
  margin: 12px 20px 8px !important;
  border: 2px dashed rgba(255, 255, 255, 0.14) !important;
  border-radius: 16px !important;
  min-height: 240px !important;
  padding: 40px 24px !important;
  background: #1f1f24 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  box-sizing: border-box !important;
}
#imgc-app .pdf-dropzone[hidden],
#shot-app .pdf-dropzone[hidden],
#imgc-app .pdf-app-foot[hidden],
#shot-app .pdf-app-foot[hidden],
#imgc-viewer[hidden],
#shot-viewer[hidden] {
  display: none !important;
}
#imgc-app .pdf-app-actions,
#shot-app .pdf-app-actions {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}
#imgc-app,
#shot-app {
  overflow: visible !important;
}

/* Contrast Checker v2 — scoped to preserve other tools */
#contrast-tool .pdf-app-actions { flex-wrap: wrap; gap: 8px; }
#contrast-tool .cc-field select,
#contrast-tool .cc-field textarea { width: 100%; padding: 11px 12px; background: #1a1a1e; color: var(--text); border: 1px solid rgba(255,255,255,.13); border-radius: 10px; font: inherit; font-size: .88rem; }
#contrast-tool .cc-field textarea { resize: vertical; line-height: 1.6; }
#contrast-tool input[type=range] { width: 100%; accent-color: #f0a020; }
#contrast-tool :is(input,select,textarea,button):focus-visible { outline: 2px solid #f0a020; outline-offset: 3px; }
#contrast-tool input[aria-invalid=true] { border-color: #ee9999; }
#contrast-tool .cc-error { display: block; color: #ee9999; font-size: .75rem; line-height: 1.5; margin-top: 6px; }
#contrast-tool .cc-error:empty { display: none; }
#contrast-tool .cc-help { font-size: .78rem; line-height: 1.6; color: var(--text-secondary); margin: 0; }
#contrast-tool .cc-preview-column { display: grid; gap: 18px; min-width: 0; }
#contrast-tool .cc-preview-settings { display: grid; grid-template-columns: 1fr 130px; gap: 20px; align-items: end; }
#contrast-tool .cc-prev-p { opacity: 1; }
#contrast-tool .cc-prev-large { font-size: 24px !important; font-weight: 400; }
#contrast-tool #cc-sample { overflow-wrap: anywhere; white-space: pre-wrap; }
#contrast-tool .cc-status { font-size: .85rem; margin: 0 0 14px; line-height: 1.5; }
#contrast-tool .cc-status.pass { color: #6dd49a; }
#contrast-tool .cc-status.fail { color: #ee9999; }
#contrast-tool .cc-suggest[hidden] { display: none; }
#contrast-tool .cc-saved-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
#contrast-tool .cc-saved-head h3 { margin: 0; font-size: 1rem; }
#contrast-tool .cc-saved { display: grid; gap: 8px; }
#contrast-tool .cc-saved-row { display: flex; gap: 8px; }
#contrast-tool .cc-saved-pair { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; background: #1a1a1e; color: var(--text); font: .78rem ui-monospace, monospace; text-align: left; cursor: pointer; }
#contrast-tool .cc-swatch { padding: 8px; border-radius: 5px; font-weight: 700; }
#contrast-tool .cc-notice { color: var(--text-secondary); font-size: .85rem; padding: 0 8px; }
#contrast-tool .cc-notice:empty { display: none; }
#contrast-tool button:disabled { opacity: .45; cursor: not-allowed; }
#cc-compare .ba { aspect-ratio: 16 / 9; }
@media (max-width: 540px) {
  #contrast-tool .cc-grid { padding-left: 0 !important; padding-right: 0 !important; gap: 22px !important; }
  #contrast-tool .cc-controls { padding: 0 !important; }
  #contrast-tool .cc-preview-settings { grid-template-columns: 1fr 110px; gap: 12px; }
  #contrast-tool .pdf-app-header { flex-direction: column; align-items: flex-start; gap: 14px; }
  #contrast-tool .cc-saved-pair { flex-wrap: wrap; font-size: .72rem; }
}

/* Contrast controls: clean range track and comfortably inset select arrows. */
#contrast-tool #cc-size { appearance: none; -webkit-appearance: none; height: 20px; background: transparent; border: 0; box-shadow: none; padding: 0; cursor: pointer; }
#contrast-tool #cc-size::-webkit-slider-runnable-track { height: 5px; border: 0; border-radius: 4px; background: #414148; box-shadow: none; }
#contrast-tool #cc-size::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 16px; height: 16px; margin-top: -5.5px; border: 0; border-radius: 50%; background: #f0a020; box-shadow: none; }
#contrast-tool #cc-size::-moz-range-track { height: 5px; border: 0; border-radius: 4px; background: #414148; }
#contrast-tool #cc-size::-moz-range-progress { height: 5px; background: #f0a020; border-radius: 4px; }
#contrast-tool #cc-size::-moz-range-thumb { height: 16px; width: 16px; background: #f0a020; border: 0; border-radius: 50%; }
#contrast-tool .cc-field select, #sheet-tool select { appearance: none; -webkit-appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23bbb9c3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-position: right 14px center; background-repeat: no-repeat; background-size: 16px; }
#sheet-tool .sv-controls, #sheet-tool .sv-pagination, #sheet-tool .sv-page-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
#sheet-tool .sv-controls { padding: 14px 0; }
#sheet-tool .sv-control { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: .8rem; color: var(--text-secondary); }
#sheet-tool select { max-width: 100%; border: 1px solid rgba(255,255,255,.12); border-radius: 9px; background-color: #1a1a1e; color: var(--text); padding: 9px 40px 9px 10px; font: inherit; font-size: .8rem; }
#sheet-tool .sv-check { display: flex; gap: 7px; align-items: center; font-size: .8rem; color: var(--text-secondary); }
#sheet-tool input[type=checkbox] { accent-color: #f0a020; width: 15px; height: 15px; }
#sheet-tool .sv-pagination { justify-content: space-between; padding: 14px 0; }
#sheet-tool #sv-page-info { font-size: .8rem; color: var(--text-secondary); }
#sheet-tool .sv-statistics { padding: 14px; background: #1a1a1e; border-radius: 12px; }
#sheet-tool #sv-stats, #sheet-tool .sv-note { margin: 10px 0 0; font-size: .78rem; color: var(--text-secondary); line-height: 1.7; }
#sheet-tool .sv-note { margin-bottom: 12px; }
#sheet-tool .sv-sort-button { border: 0; background: transparent; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; text-align: left; padding: 3px 0; cursor: pointer; }
#sheet-tool :is(button,select,input):focus-visible { outline: 2px solid #f0a020; outline-offset: 3px; }
#sheet-tool .sv-wrap td { white-space: pre-wrap; overflow-wrap: anywhere; min-width: 150px; max-width: 340px; }
#sheet-tool .sv-table { min-width: 100%; width: max-content; }
#sheet-tool .sv-table-wrap { width: 100%; }
#sheet-tool .pdf-toolbar-left, #sheet-tool .pdf-toolbar-right { flex-wrap: wrap; min-width: 0; }
#sheet-tool .pdf-filename { overflow-wrap: anywhere; white-space: normal; }
#sheet-tool .sv-search { max-width: 100%; }
#sheet-tool button:disabled { opacity: .45; cursor: not-allowed; }
#sv-compare .ba { aspect-ratio: 16 / 9; }
@media (max-width: 600px) {
  #sheet-tool .sv-viewer { margin: 0 8px 16px !important; min-width: 0; }
  #sheet-tool .sv-controls { gap: 12px 10px; }
  #sheet-tool .sv-pagination { align-items: flex-start; }
  #sheet-tool .sv-page-actions { gap: 8px; }
  #sheet-tool .sv-toolbar > div { width: 100%; justify-content: flex-start; }
}
#contrast-tool #cc-size::-webkit-slider-runnable-track { background: linear-gradient(to right, #f0a020 0 var(--range-fill, 14.29%), #414148 var(--range-fill, 14.29%) 100%); }

/* DOCX Reader: bounded independent reading surface, never overlaps site content. */
#docx-app, #docx-viewer { min-width: 0; }
#docx-app #docx-viewer { overflow: hidden; }
#docx-app .epub-body { height: clamp(360px, 65vh, 720px); min-height: 0; max-height: none; overflow: hidden; grid-template-columns: 230px minmax(0,1fr); align-items: stretch; }
#docx-app .epub-side { min-height: 0; min-width: 0; overflow: auto; overscroll-behavior: contain; }
#docx-app #docx-scroll { min-height: 0; min-width: 0; height: 100%; max-height: none; overflow: auto; overscroll-behavior: contain; box-sizing: border-box; }
#docx-app #docx-body { max-width: 68ch; width: 100%; min-width: 0; box-sizing: border-box; line-height: var(--docx-line-height,1.75); overflow-wrap: anywhere; word-break: normal; }
#docx-app #docx-body p { text-align: var(--docx-align,left); line-height: inherit; }
#docx-app #docx-body :is(li,blockquote,td,th) { overflow-wrap: anywhere; }
#docx-app #docx-body :is(h1,h2,h3,h4,h5,h6) { color: inherit; text-align: left; overflow-wrap: anywhere; }
#docx-app .docx-table-scroll { width: 100%; max-width: 100%; overflow-x: auto; margin: 16px 0; }
#docx-app .docx-table-scroll table { min-width: 100%; width: max-content; max-width: none; margin: 0; }
#docx-app .docx-table-scroll td, #docx-app .docx-table-scroll th { min-width: 80px; max-width: 240px; white-space: normal; }
#docx-app #docx-body img { display: block; max-width: 100%; height: auto; }
#docx-app .docx-options { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 12px 16px; }
#docx-app .docx-options label { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--text-secondary); }
#docx-app select { appearance: none; -webkit-appearance: none; background-color: #1a1a1e; color: var(--text); border: 1px solid rgba(255,255,255,.12); border-radius: 9px; padding: 9px 38px 9px 10px; font: inherit; font-size: .8rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23bbb9c3' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; }
#docx-app .docx-progress { display: flex; gap: 12px; align-items: center; padding: 0 16px 12px; }
#docx-app progress { flex: 1; width: 100%; height: 5px; appearance: none; border: 0; border-radius: 4px; background: #414148; }
#docx-app progress::-webkit-progress-bar { background: #414148; border-radius: 4px; }
#docx-app progress::-webkit-progress-value { background: #f0a020; border-radius: 4px; }
#docx-app progress::-moz-progress-bar { background: #f0a020; }
#docx-app #docx-progress-label { white-space: nowrap; color: var(--text-secondary); font-size: .75rem; }
#docx-app #docx-outline { display: grid; gap: 6px; margin-bottom: 18px; }
#docx-app .docx-outline-link { display: block; width: 100%; text-align: left; padding: 8px; color: var(--text-secondary); background: rgba(255,255,255,.04); border: 0; border-radius: 7px; font: inherit; font-size: .78rem; line-height: 1.5; overflow-wrap: anywhere; cursor: pointer; }
#docx-app .docx-outline-link:hover { background: rgba(240,160,32,.1); color: var(--text); }
#docx-app #docx-m-name, #docx-app #docx-filename { overflow-wrap: anywhere; white-space: normal; }
#docx-app .pdf-toolbar { flex-wrap: wrap; gap: 10px; }
#docx-app .pdf-toolbar-right { flex-wrap: wrap; gap: 6px; }
#docx-app .pdf-searchbar { flex-wrap: wrap; }
#docx-app .pdf-searchbar input { min-width: 0; }
#docx-app [hidden] { display: none !important; }
#docx-app :is(button,select,input):focus-visible { outline: 2px solid #f0a020; outline-offset: 3px; }
#docx-app button:disabled { opacity: .45; cursor: not-allowed; }
#docx-compare .ba { aspect-ratio: 16 / 9; }
@media (max-width: 760px) {
  #docx-app .epub-body { grid-template-columns: minmax(0,1fr); grid-template-rows: auto minmax(0,1fr); height: clamp(480px, 78vh, 780px); }
  #docx-app .epub-side { max-height: 145px; padding: 14px 16px; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.08); }
  #docx-app .epub-meta { display: none; }
  #docx-app .epub-side > .epub-lib-note { display: none; }
  #docx-app .epub-side > .epub-side-title:first-child { display: none; }
  #docx-app .docx-options { gap: 10px; padding: 12px; }
  #docx-app .pdf-toolbar > div { flex-wrap: wrap; min-width: 0; }
  #docx-app #docx-scroll { padding: 22px 18px; }
}

/* Resources dropdown: single column */
.nav-panel-resources {
  grid-template-columns: 1fr !important;
  width: min(320px, calc(100vw - 32px)) !important;
  min-width: 260px !important;
}

/* ===== About page ===== */
.about-hero { padding: 56px 0 24px; text-align: center; }
.about-hero h1 { font-size: clamp(1.85rem, 4.2vw, 2.65rem); line-height: 1.2; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 16px; }
.about-lead { max-width: 720px; margin: 0 auto 36px; font-size: clamp(0.98rem, 1.5vw, 1.1rem); line-height: 1.7; color: var(--text-secondary); }
.about-figure { max-width: 960px; margin: 0 auto; border-radius: 20px; overflow: hidden; background: var(--bg-elevated); }
.about-figure img { width: 100%; height: auto; }
.about-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; max-width: 1040px; margin: 28px auto 14px; }
.about-stat { background: var(--bg-card); border-radius: 14px; padding: 24px 16px; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.about-stat strong { font-size: 1.7rem; font-weight: 600; color: var(--amber); }
.about-stat span { font-size: .95rem; color: var(--text-secondary); line-height: 1.5; }
.about-note { text-align: center; font-size: .85rem; color: var(--text-muted); }
.about-cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 32px; }
.about-cta .btn-soft { display: inline-flex; align-items: center; padding: 10px 18px; border-radius: 11px; }
@media (max-width: 820px) { .about-stats { grid-template-columns: 1fr 1fr; } .about-hero { padding: 36px 0 16px; } }
@media (max-width: 480px) { .about-stats { grid-template-columns: 1fr; } }


/* ===== Legal pages (Privacy Policy, Terms) — soft fills, no borders ===== */
.legal-hero { padding: 56px 0 8px; text-align: center; }
.legal-hero h1 { font-size: clamp(1.85rem, 4.2vw, 2.65rem); line-height: 1.2; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 16px; }
.legal-lead { max-width: 640px; margin: 0 auto 20px; font-size: clamp(0.98rem, 1.5vw, 1.1rem); line-height: 1.7; color: var(--text-secondary); }
.legal-updated { display: inline-block; background: var(--bg-card); color: var(--text-secondary); border-radius: 999px; padding: 6px 16px; font-size: .88rem; }
.legal-body { padding: 8px 0 72px; }
.legal-wrap { max-width: 860px; }
.legal-toc { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 28px 0 8px; }
.legal-toc a { background: var(--bg-card); color: var(--text-secondary); border-radius: 999px; padding: 8px 16px; font-size: .92rem; text-decoration: none; transition: background .15s, color .15s; }
.legal-toc a:hover { background: var(--bg-soft); color: var(--text); }
.legal-part { margin-top: 44px; scroll-margin-top: 90px; }
.legal-part h2 { font-size: clamp(1.3rem, 2.4vw, 1.65rem); font-weight: 600; letter-spacing: -0.02em; text-align: left; margin: 0 0 8px; color: var(--text); }
.legal-sub { color: var(--text-secondary); font-size: 1rem; line-height: 1.7; margin: 0 0 18px; }
.legal-part > h2 + .legal-card { margin-top: 18px; }
.legal-card { background: var(--bg-card); border-radius: 16px; padding: 24px 28px; margin: 0 0 14px; text-align: left; }
.legal-card h3 { font-size: 1.1rem; font-weight: 600; line-height: 1.35; margin: 0 0 12px; color: var(--text); }
.legal-card p, .legal-card li { font-size: 15.5px; line-height: 1.75; color: var(--text-secondary); text-align: left; }
.legal-card p { margin: 0 0 12px; }
.legal-card p:last-child, .legal-card ul:last-child { margin-bottom: 0; }
.legal-card ul { margin: 0 0 12px; padding-left: 20px; }
.legal-card li { margin: 0 0 8px; }
.legal-card li:last-child { margin-bottom: 0; }
.legal-card strong { color: var(--text); font-weight: 600; }
.legal-card a { color: var(--amber); text-decoration: underline; text-decoration-color: rgba(240,160,32,.45); text-underline-offset: 3px; }
.legal-card a:hover { text-decoration-color: var(--amber); }
@media (max-width: 640px) { .legal-card { padding: 20px 18px; } .legal-hero { padding: 36px 0 4px; } .legal-part { margin-top: 34px; } }

/* ===== About page: tools overview ===== */
.about-tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 1040px; margin: 32px auto 0; }
.about-tool { display: flex; flex-direction: column; gap: 6px; background: var(--bg-card); border-radius: 14px; padding: 20px 22px; text-align: left; text-decoration: none; transition: background .15s; }
.about-tool:hover { background: var(--bg-soft); }
.about-tool b { font-size: 1.02rem; font-weight: 600; color: var(--text); }
.about-tool span { font-size: .93rem; line-height: 1.6; color: var(--text-secondary); }
.about-links { text-align: center; margin-top: 18px; font-size: .95rem; color: var(--text-secondary); }
.about-links a { color: var(--amber); text-decoration: underline; text-decoration-color: rgba(240,160,32,.45); text-underline-offset: 3px; }
@media (max-width: 820px) { .about-tools { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .about-tools { grid-template-columns: 1fr; } }


/* ===== Unified mega menu (Dark Tools + Resources) ===== */
.nav-mega {
  position: static;
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-mega-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.nav-mega-toggle .chev {
  transition: transform 0.15s;
}
.nav-mega:hover .nav-mega-toggle .chev,
.nav-mega:focus-within .nav-mega-toggle .chev {
  transform: rotate(180deg);
}
.nav-mega-toggle.is-active {
  color: var(--amber, #f0a020);
}
.nav-mega-panel {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: calc(100% + 0px);
  z-index: 90;
  display: none;
  grid-template-columns: minmax(320px, 1.4fr) minmax(200px, 0.9fr);
  gap: 0;
  width: min(720px, calc(100vw - 32px));
  padding: 0;
  background: #25252b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}
.nav-mega:hover .nav-mega-panel,
.nav-mega:focus-within .nav-mega-panel,
.nav-mega-panel.is-open {
  display: grid;
}
.nav-mega-panel[hidden] {
  display: none !important;
}
.nav-mega:hover .nav-mega-panel[hidden],
.nav-mega:focus-within .nav-mega-panel[hidden] {
  display: grid !important;
}
/* bridge so cursor can move into panel */
.nav-mega::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 16px;
}
.mega-col {
  padding: 18px 20px 20px;
  min-height: 220px;
}
.mega-tools {
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}
.mega-col-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted, #8a8a94);
}
.mega-col-ico {
  display: inline-flex;
  color: var(--amber, #f0a020);
}
.mega-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 20px;
}
.mega-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mega-link {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text, #f0f0f2);
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
}
.mega-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}
.mega-col.is-dim {
  opacity: 0.45;
}
.mega-col.is-focus {
  opacity: 1;
  background: rgba(255, 255, 255, 0.02);
}
@media (max-width: 720px) {
  .nav-mega-panel {
    left: 12px;
    right: 12px;
    transform: none;
    width: auto;
    grid-template-columns: 1fr;
  }
  .mega-tools {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }
  .mega-grid {
    grid-template-columns: 1fr;
  }
}
/* header must allow overflow for panel */
.header {
  position: relative;
  z-index: 100;
  overflow: visible !important;
}
.header-inner {
  position: relative;
  overflow: visible !important;
}
.nav {
  overflow: visible !important;
}


/* ===== Header shell mega-menu (Sound Booster style) ===== */
.header {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  overflow: visible !important;
  padding: 12px 0 0 !important;
}
.header > .container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  overflow: visible !important;
}
.header-shell {
  position: relative;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 18px;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
  overflow: visible;
}
.header-shell.is-open {
  background: #25252b;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}
.header-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 64px;
  padding: 0 18px;
}
.header-shell.is-open .header-bar {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.header-bar .logo {
  flex: 0 0 auto;
}
.header-bar .nav {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  overflow: visible !important;
}
.header-bar .header-actions {
  flex: 0 0 auto;
  margin-left: auto;
}
.nav-mega {
  position: static;
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-mega-panel {
  position: static !important;
  left: auto !important;
  transform: none !important;
  top: auto !important;
  width: 100% !important;
  max-width: none !important;
  display: none !important;
  grid-template-columns: 1.4fr 0.9fr !important;
  gap: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 0 18px 18px !important;
  box-shadow: none !important;
  overflow: hidden !important;
}
.header-shell.is-open .nav-mega-panel,
.nav-mega-panel.is-open {
  display: grid !important;
}
.nav-mega-panel[hidden] {
  display: none !important;
}
.header-shell.is-open .nav-mega-panel[hidden] {
  display: grid !important;
}
.mega-col {
  padding: 20px 24px 24px !important;
  min-height: 200px;
}
.mega-tools {
  border-right: 1px solid rgba(255, 255, 255, 0.06) !important;
}
.mega-grid {
  grid-template-columns: 1fr 1fr 1fr !important;
  gap: 2px 16px !important;
}
@media (max-width: 900px) {
  .mega-grid { grid-template-columns: 1fr 1fr !important; }
  .nav-mega-panel { grid-template-columns: 1fr !important; }
  .mega-tools { border-right: none !important; border-bottom: 1px solid rgba(255,255,255,0.06) !important; }
}
/* body offset under fixed header */
body {
  padding-top: 88px;
}

/* Header dropdown: no grey outline */
.header-shell.is-open { border-color: transparent !important; }

/* Legal pages: no grey card blocks, justified text */
.legal-card { background: transparent !important; padding: 0 !important; border-radius: 0 !important; margin: 0 0 28px !important; }
.legal-card p, .legal-card li, .legal-sub { text-align: justify !important; font-size: 16px; line-height: 1.7; }
.legal-card p { margin: 0 0 16px; }
.legal-card p:last-child, .legal-card ul:last-child { margin-bottom: 0; }
.legal-card h3 { margin: 0 0 10px; }
.legal-toc a { background: transparent; }
@media (max-width: 640px) { .legal-card { padding: 0 !important; } .legal-card p, .legal-card li, .legal-sub { text-align: left !important; } }

/* Legal pages: wider text, plain "Last updated" */
.legal-wrap { max-width: 1040px !important; }
.legal-updated { background: transparent !important; padding: 0 !important; border-radius: 0 !important; border: none !important; }

/* ===== Contact page ===== */
.contact-body { padding: 8px 0 80px; }
.contact-wrap { max-width: 1040px; display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 28px; align-items: start; margin-top: 24px; }
.contact-info { display: flex; flex-direction: column; gap: 14px; }
.contact-card { background: var(--bg-card); border-radius: 16px; padding: 22px 24px; text-align: left; }
.contact-ico { display: inline-flex; width: 42px; height: 42px; align-items: center; justify-content: center; border-radius: 12px; background: rgba(240,160,32,.12); color: var(--amber); margin-bottom: 12px; }
.contact-card h3 { font-size: 1.05rem; font-weight: 600; margin: 0 0 6px; color: var(--text); }
.contact-card p { font-size: .95rem; line-height: 1.65; color: var(--text-secondary); margin: 0; }
.contact-card a { color: var(--amber); text-decoration: underline; text-decoration-color: rgba(240,160,32,.45); text-underline-offset: 3px; }
.contact-form { background: var(--bg-card); border-radius: 18px; padding: 28px; text-align: left; display: flex; flex-direction: column; gap: 18px; }
.contact-form h2 { font-size: 1.4rem; font-weight: 600; margin: 0; text-align: left; letter-spacing: -0.01em; }
.cf-topics { display: flex; flex-wrap: wrap; gap: 8px; }
.cf-topics label { cursor: pointer; }
.cf-topics input { position: absolute; opacity: 0; pointer-events: none; }
.cf-topics span { display: inline-block; padding: 8px 16px; border-radius: 999px; background: var(--bg-soft, #2a2a30); color: var(--text-secondary); font-size: .9rem; transition: background .15s, color .15s; }
.cf-topics label:hover span { color: var(--text); }
.cf-topics input:checked + span { background: var(--amber); color: #1a1200; font-weight: 600; }
.cf-topics input:focus-visible + span { outline: 2px solid var(--amber); outline-offset: 2px; }
.cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cf-field { display: flex; flex-direction: column; gap: 7px; font-size: .88rem; color: var(--text-secondary); }
.cf-field i { font-style: normal; color: var(--text-muted); }
.cf-field input, .cf-field textarea { width: 100%; padding: 12px 14px; background: #1a1a1e; color: var(--text); border: none; border-radius: 11px; font: inherit; font-size: .95rem; transition: box-shadow .15s; }
.cf-field textarea { resize: vertical; line-height: 1.6; min-height: 150px; }
.cf-field input:focus, .cf-field textarea:focus { outline: none; box-shadow: 0 0 0 2px rgba(240,160,32,.6); }
.cf-honey { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.cf-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.cf-actions .btn-primary { cursor: pointer; }
.cf-actions .btn-primary:disabled { opacity: .6; cursor: default; }
.cf-status { margin: 0; font-size: .92rem; color: var(--text-secondary); }
.cf-status.ok { color: #6fcf97; }
.cf-status.err { color: #f2837a; }
@media (max-width: 860px) { .contact-wrap { grid-template-columns: 1fr; } .cf-row { grid-template-columns: 1fr; } .contact-form { padding: 22px 18px; } }
.contact-card, .contact-form { background: #1f1f24 !important; }

/* ===== Blog ===== */
.blog-hero { padding-bottom: 8px; }
.blog-hero h1 { max-width: 860px; margin-left: auto; margin-right: auto; }
.blog-list { padding: 28px 0 80px; }
.blog-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; max-width: 1080px; }
.blog-card { background: #1f1f24; border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; text-align: left; transition: transform .2s var(--ease), background .2s; }
.blog-card:hover { transform: translateY(-3px); background: #232329; }
.blog-card-img { display: block; overflow: hidden; aspect-ratio: 16 / 9; background: #15151a; }
.blog-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s var(--ease); }
.blog-card:hover .blog-card-img img { transform: scale(1.03); }
.blog-card-body { padding: 22px 26px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.blog-cat { font-size: .74rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--amber); }
.blog-card h2 { font-size: 1.28rem; line-height: 1.35; font-weight: 600; letter-spacing: -0.01em; text-align: left; margin: 0; }
.blog-card h2 a:hover { color: var(--amber); }
.blog-card p { font-size: .95rem; line-height: 1.65; color: var(--text-secondary); margin: 0; }
.blog-card-foot { margin-top: auto; padding-top: 8px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: .85rem; color: var(--text-muted); }
.blog-more { color: var(--amber); font-weight: 600; }
.blog-more:hover { text-decoration: underline; text-underline-offset: 3px; }
.blog-more-posts { padding-top: 0; }
.blog-more-posts .block-title { margin-bottom: 28px; }

.post-hero { padding: 48px 0 8px; text-align: center; }
.post-hero .container { max-width: 880px; }
.post-hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.22; font-weight: 600; letter-spacing: -0.02em; margin: 10px 0 16px; }
.post-lead { font-size: clamp(1rem, 1.5vw, 1.15rem); line-height: 1.7; color: var(--text-secondary); margin: 0 auto 14px; max-width: 760px; }
.post-meta { font-size: .88rem; color: var(--text-muted); }
.post-wrap { max-width: 1040px; }
.post-cover { margin: 28px 0 8px; border-radius: 20px; overflow: hidden; background: #15151a; }
.post-cover img { width: 100%; height: auto; }
.post-body { max-width: 880px; margin: 34px auto 0; text-align: left; }
.post-body h2 { font-size: clamp(1.35rem, 2.4vw, 1.7rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1.3; text-align: left; margin: 44px 0 14px; color: var(--text); }
.post-body h3 { font-size: 1.12rem; font-weight: 600; margin: 24px 0 8px; color: var(--text); }
.post-body p, .post-body li { font-size: 16.5px; line-height: 1.8; color: var(--text-secondary); text-align: justify; }
.post-body p { margin: 0 0 16px; }
.post-body ul, .post-body ol { margin: 0 0 18px; padding-left: 22px; }
.post-body li { margin: 0 0 9px; padding-left: 4px; }
.post-body li::marker { color: var(--amber); }
.post-body strong { color: var(--text); font-weight: 600; }
.post-body a { color: var(--amber); text-decoration: underline; text-decoration-color: rgba(240,160,32,.45); text-underline-offset: 3px; }
.post-body a:hover { text-decoration-color: var(--amber); }
.post-figure { margin: 30px 0; border-radius: 18px; overflow: hidden; background: #1f1f24; }
.post-figure img { width: 100%; height: auto; }
.post-figure figcaption { padding: 12px 20px 16px; font-size: .86rem; color: var(--text-muted); text-align: center; }
.post-callout { background: #1f1f24; border-radius: 16px; padding: 20px 24px; margin: 26px 0; font-size: 16px; line-height: 1.75; color: var(--text-secondary); border-left: 4px solid var(--amber); }
.post-callout strong { color: var(--text); }
.post-table-wrap { overflow-x: auto; margin: 22px 0; border-radius: 14px; background: #1f1f24; }
.post-table { width: 100%; border-collapse: collapse; font-size: .95rem; text-align: left; }
.post-table th, .post-table td { padding: 12px 18px; color: var(--text-secondary); }
.post-table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); font-weight: 600; }
.post-table tbody tr + tr td { border-top: 1px solid rgba(255,255,255,.05); }
.post-table td:first-child { color: var(--text); font-family: ui-monospace, Menlo, Consolas, monospace; }
.post-cta { max-width: 880px; margin: 48px auto 0; background: #1f1f24; border-radius: 20px; padding: 32px 28px; text-align: center; }
.post-cta h3 { font-size: 1.3rem; font-weight: 600; margin: 0 0 8px; }
.post-cta p { color: var(--text-secondary); margin: 0 0 4px; line-height: 1.7; }
.blog-more-posts { padding-top: 56px; }
@media (max-width: 820px) { .blog-grid { grid-template-columns: 1fr; } .post-body p, .post-body li { text-align: left; } }
@media (max-width: 520px) { .blog-card-body { padding: 18px 18px 20px; } .post-cta { padding: 26px 18px; } }

/* ===== Guides ===== */
.guide-card { display: flex; gap: 20px; background: #1f1f24; border-radius: 20px; padding: 26px; text-align: left; transition: transform .2s var(--ease), background .2s; }
.guide-card:hover { transform: translateY(-3px); background: #232329; }
.guide-ico { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 14px; background: rgba(240,160,32,.12); color: var(--amber); }
.guide-ico-lg { width: 64px; height: 64px; border-radius: 18px; margin-bottom: 8px; }
.guide-ico-lg svg { width: 32px; height: 32px; }
.guide-card-body { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 0; }
.guide-card h2 { font-size: 1.2rem; line-height: 1.35; font-weight: 600; letter-spacing: -0.01em; text-align: left; margin: 0; }
.guide-card:hover h2 { color: var(--amber); }
.guide-card p { font-size: .94rem; line-height: 1.65; color: var(--text-secondary); margin: 0; }
.guide-card-foot { margin-top: auto; padding-top: 8px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .85rem; color: var(--text-muted); }
.guide-more .block-title .mark, .guide-more .block-title { }
.guide .post-hero .about-cta { margin-top: 22px; }
.gsteps { list-style: none; margin: 0 0 8px; padding: 0 !important; display: flex; flex-direction: column; gap: 18px; }
.post-body .gsteps .gstep { display: flex; gap: 16px; align-items: flex-start; padding: 0; margin: 0; background: none; }
.gstep-n { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; background: var(--amber); color: #1a1200; font-weight: 700; font-size: .95rem; display: inline-flex; align-items: center; justify-content: center; margin-top: 2px; }
.post-body .gstep h3 { margin: 0 0 4px; font-size: 1.1rem; }
.post-body .gstep p { margin: 0; }
.post-body .gstep::marker { content: ''; }
@media (max-width: 820px) { .guide-two { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .guide-card { padding: 20px 18px; gap: 14px; } }

/* Dark Tools: whole card is clickable */
.tool-card { position: relative; cursor: pointer; }
.tool-card .tool-link::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.tool-card:hover { background: #232329; }
.tool-card:hover .tool-link { text-decoration: underline; text-underline-offset: 3px; }

/* Help Center */
.help-text { padding: 8px 0 0; }
.help-text + #faq { padding-top: 40px; }
.help-text .post-body { margin-top: 20px; }
.help-text .post-body h3 { margin: 26px 0 6px; font-size: 1.12rem; }
.help-text .post-body h3 + p { margin-top: 0; }

/* ===== Theme Gallery ===== */
.tg-section { padding: 28px 0 8px; }
.tg-top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; margin-bottom: 22px; }
.tg-filters { display: flex; flex-wrap: wrap; gap: 10px; }
.tg-filter { border: 0; background: #1f1f24; color: var(--text-secondary); border-radius: 999px; padding: 9px 20px; font: inherit; font-size: .93rem; cursor: pointer; transition: background .15s, color .15s; }
.tg-filter:hover { background: #26262c; color: var(--text); }
.tg-filter[aria-pressed="true"] { background: var(--amber); color: #1a1200; font-weight: 600; }
.tg-count { font-size: .9rem; color: var(--text-muted); }
.tg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tg-card { background: #1f1f24; border-radius: 20px; padding: 14px; display: flex; flex-direction: column; gap: 14px; text-align: left; }
.tg-card[hidden] { display: none; }
.tg-preview { border-radius: 14px; padding: 16px; background: var(--tb); }
.tg-mock-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.tg-mock-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--ta); }
.tg-mock-l { height: 6px; border-radius: 3px; background: var(--tm); opacity: .55; }
.tg-mock-l.w1 { width: 46px; }
.tg-mock-l.w2 { width: 30px; }
.tg-mock-title { font-size: 16px; font-weight: 600; line-height: 1.3; color: var(--tt); margin-bottom: 4px; }
.tg-mock-text { font-size: 12.5px; line-height: 1.5; color: var(--tm); margin-bottom: 14px; }
.tg-mock-panel { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--ts); border-radius: 12px; padding: 10px 12px; }
.tg-mock-chip { font-size: 12px; color: var(--tt); }
.tg-mock-btn { background: var(--ta); color: var(--tab); font-size: 12px; font-weight: 600; padding: 6px 14px; border-radius: 8px; }
.tg-info { display: flex; flex-direction: column; gap: 12px; padding: 2px 8px 8px; flex: 1; }
.tg-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tg-info h2 { font-size: 1.12rem; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; text-align: left; margin: 0; color: var(--text); }
.tg-tag { font-size: .76rem; padding: 3px 11px; border-radius: 999px; background: #2a2a30; color: var(--text-secondary); }
.tg-desc { font-size: .9rem; line-height: 1.55; color: var(--text-secondary); margin: 0; text-align: left; }
.tg-tray { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; background: #34343b; border-radius: 14px; padding: 8px; margin-top: auto; }
.tg-sw { border: 0; background: none; padding: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 7px; color: var(--text-secondary); font: inherit; }
.tg-sw i { display: block; width: 100%; height: 34px; border-radius: 9px; background: var(--c); transition: transform .15s; }
.tg-sw:hover i, .tg-sw:focus-visible i { transform: translateY(-2px); }
.tg-sw span { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 10.5px; letter-spacing: .01em; }
.tg-sw:hover span, .tg-sw:focus-visible span { color: var(--text); }
.tg-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.tg-contrast { font-size: .84rem; color: var(--text-muted); }
.tg-copy { border: 0; background: #2a2a30; color: var(--text); border-radius: 10px; padding: 8px 14px; font: inherit; font-size: .88rem; cursor: pointer; transition: background .15s, color .15s; }
.tg-copy:hover { background: #34343b; color: var(--amber); }
.tg-toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 16px); background: #2f2f36; color: var(--text); padding: 10px 18px; border-radius: 12px; font-size: .92rem; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 200; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.tg-toast.show { opacity: 1; transform: translate(-50%, 0); }
.post-body code, .faq-card code { background: #2a2a30; color: var(--text); border-radius: 6px; padding: 1px 6px; font-size: .9em; }
.tg-section + .help-text { padding-top: 24px; }
@media (max-width: 900px) { .tg-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .tg-grid { grid-template-columns: 1fr; } }
.guide-more .about-text { max-width: 640px; margin: 0 auto; }
.guide-more .about-text p { text-align: center; }

/* ---------- Templates & Samples ---------- */
.ts-title { margin-bottom: 6px; }
.tg-section .block-sub { margin-bottom: 22px; }
.ts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 36px; }
.ts-card { background: #1f1f24; border-radius: 20px; padding: 14px; display: flex; flex-direction: column; gap: 14px; text-align: left; }
.ts-card[hidden] { display: none; }
.ts-preview { position: relative; height: 196px; border-radius: 14px; overflow: hidden; background: #15151a; padding: 52px 18px 16px; display: flex; flex-direction: column; justify-content: flex-start; }
.ts-badge { position: absolute; top: 12px; left: 12px; box-shadow: 0 2px 8px rgba(0,0,0,.35); background: var(--bc, #f0a020); color: var(--bt, #1a1200); font-size: 12px; font-weight: 700; letter-spacing: .02em; padding: 4px 11px; border-radius: 999px; z-index: 2; }
.ts-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.ts-doc { display: flex; flex-direction: column; gap: 9px; }
.ts-l { display: block; height: 8px; border-radius: 4px; background: #5b5b66; width: 100%; }
.ts-l.s { width: 62%; }
.ts-l.ts-h { height: 13px; width: 48%; background: #ececee; margin-bottom: 4px; }
.ts-tbl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; background: #26262c; border-radius: 10px; padding: 10px; }
.ts-tbl i { display: block; height: 8px; border-radius: 4px; background: #4a4a54; }
.ts-tbl i:nth-child(-n+3) { background: #7a8fc4; }
.ts-sheet { display: flex; flex-direction: column; gap: 6px; }
.ts-row { display: grid; grid-template-columns: 1.3fr 1fr 1fr .7fr; gap: 8px; padding: 6px 10px; border-radius: 8px; background: #1f1f24; }
.ts-row:nth-child(odd) { background: #26262c; }
.ts-row i { display: block; height: 7px; border-radius: 4px; background: #5b5b66; }
.ts-row.ts-rh { background: #1d3a2c; }
.ts-row.ts-rh i { background: #3fbf7f; opacity: .85; }
.ts-tpl { gap: 6px; background: #1b1b20; padding-top: 46px; }
.ts-tpl > * { flex-shrink: 0; }
.tp-s { height: 7px; width: 70%; border-radius: 4px; background: #4a4a54; margin: 3px 0 2px; }
.tp-title { position: absolute; top: 13px; left: 62px; right: 14px; font-size: 15px; font-weight: 600; color: #f2f2f3; margin-bottom: 4px; line-height: 1.2; }
.tp-h { font-size: 11px; font-weight: 600; color: #f0a020; letter-spacing: .02em; margin-top: 5px; }
.tp-c span, .tp-b span { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tp-c, .tp-b { display: flex; align-items: center; gap: 9px; font-size: 12px; line-height: 1.3; color: #a8a8b0; white-space: nowrap; overflow: hidden; }
.tp-c i { flex: 0 0 13px; height: 13px; border: 2px solid #6a6a76; border-radius: 4px; }
.tp-b b { flex: 0 0 5px; height: 5px; border-radius: 50%; background: #8a8a96; margin: 0 4px; }
.ts-info { display: flex; flex-direction: column; gap: 12px; padding: 2px 8px 8px; flex: 1; }
.ts-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ts-info h3 { font-size: 1.12rem; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; text-align: left; margin: 0; color: var(--text); }
.ts-meta { display: flex; justify-content: space-between; gap: 10px; font-size: .8rem; color: var(--text-muted); font-family: ui-monospace, Menlo, Consolas, monospace; margin-top: auto; }
.ts-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ts-btn { border: 0; background: #2a2a30; color: var(--text); border-radius: 10px; padding: 9px 14px; font: inherit; font-size: .88rem; cursor: pointer; text-decoration: none; text-align: center; transition: background .15s, color .15s; }
.ts-btn:hover { background: #34343b; color: var(--amber); }
.ts-primary { flex: 1 1 100%; background: var(--amber); color: #1a1200; font-weight: 600; }
.ts-primary:hover { background: var(--amber); color: #1a1200; filter: brightness(1.08); }
.ts-actions .ts-btn:not(.ts-primary) { flex: 1; }
@media (max-width: 900px) { .ts-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .ts-grid { grid-template-columns: 1fr; } }

/* ---------- Install block (home) ---------- */
.install-cta { text-align: center; }
.install-btns { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; margin: 26px 0 0; }
.install-btn { display: inline-flex; align-items: center; gap: 10px; background: #3a3a42; color: #f0f0f2; border-radius: 12px; padding: 13px 24px; font-size: 1rem; font-weight: 600; text-decoration: none; transition: background .15s, transform .15s; }
.install-btn:hover { background: #484850; transform: translateY(-2px); }
.install-btn img { width: 22px; height: 22px; display: block; }

/* Mobile header: collapse the inline nav behind the hamburger (overrides .header-bar .nav display) */
@media (max-width: 960px) {
  .header-bar .nav { display: none; }
  .header-bar .nav.nav-open { display: flex; }
}
@media (max-width: 600px) {
  .header-bar .btn-chrome span { display: none; }
  .header-bar .btn-chrome { padding: 8px; }
  .header-bar .header-actions { gap: 6px; }
}
@media (max-width: 960px) {
  .header-bar .nav.nav-open { background: #25252b !important; border-radius: 0 0 18px 18px; box-shadow: 0 24px 60px rgba(0,0,0,.55); }
}

/* Translated text is often longer: stop grid tracks and cards from growing past the viewport */
.tg-grid, .ts-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tg-tray { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tg-grid > *, .ts-grid > *, .tg-tray > *, .tg-card > *, .ts-card > *,
.sf-grid > *, .cc-grid > *, .xl-grid > *, .why-grid > *, .faq-list > *, .faq-card, .faq-card > div { min-width: 0; }
@media (max-width: 900px) { .tg-grid, .ts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .tg-grid, .ts-grid { grid-template-columns: minmax(0, 1fr); } }

/* Long translated compound words must wrap instead of pushing the page wider */
body { overflow-wrap: anywhere; }

/* Keep small labels and badges whole; only long text may wrap anywhere */
.tg-tag, .ts-badge, .tg-count, .ts-head h3 + *, .tg-head > *:last-child { overflow-wrap: normal; word-break: normal; flex-shrink: 0; white-space: nowrap; }
.tg-head h3, .tg-head h2, .ts-head h3 { overflow-wrap: break-word; }

.tg-tag, .ts-badge, .tg-count { white-space: normal; max-width: 50%; }
