/* Shared Hindi reading theme */
html[data-hindi-theme="light"],
html[data-hindi-theme="light"] body {
  --hindi-bg: #f7f9f8;
  --hindi-surface: #ffffff;
  --hindi-surface-muted: #eef3f1;
  --hindi-text: #18211e;
  --hindi-text-secondary: #43514c;
  --hindi-muted: #5d6b65;
  --hindi-border: rgba(24,33,30,.10);
  --hindi-border-strong: rgba(24,33,30,.17);
  --hindi-accent-rgb: 11,119,104;
  --hindi-accent: #0b7768;
  --hindi-accent-strong: #075e53;
  --hindi-accent-soft: rgba(11,119,104,.09);
  --hindi-warm: #805800;
  --hindi-warm-soft: rgba(128,88,0,.09);
  --hindi-danger: #a9443e;
  --hindi-danger-soft: rgba(169,68,62,.09);
  --hindi-sky: #236c99;
  --hindi-violet: #7256a4;
  --hindi-shadow: 0 2px 10px rgba(28,45,39,.07);
}

html[data-hindi-theme="dark"],
html[data-hindi-theme="dark"] body {
  --hindi-bg: #111315;
  --hindi-surface: #181c1f;
  --hindi-surface-muted: #20252a;
  --hindi-text: #f3f6f5;
  --hindi-text-secondary: #c3cdca;
  --hindi-muted: #8d9995;
  --hindi-border: rgba(225,235,232,.10);
  --hindi-border-strong: rgba(225,235,232,.18);
  --hindi-accent-rgb: 92,199,178;
  --hindi-accent: #5cc7b2;
  --hindi-accent-strong: #7bd8c5;
  --hindi-accent-soft: rgba(92,199,178,.12);
  --hindi-warm: #e8c46d;
  --hindi-warm-soft: rgba(232,196,109,.13);
  --hindi-danger: #e88b84;
  --hindi-danger-soft: rgba(232,139,132,.12);
  --hindi-sky: #75bde8;
  --hindi-violet: #b9a0e8;
  --hindi-shadow: 0 2px 10px rgba(0,0,0,.16);
}

html[data-hindi-theme] body {
  --bg: var(--hindi-bg) !important;
  --bg2: var(--hindi-surface) !important;
  --bg3: var(--hindi-surface-muted) !important;
  --paper: var(--hindi-bg) !important;
  --paper2: var(--hindi-surface) !important;
  --paper3: var(--hindi-surface-muted) !important;
  --surface: var(--hindi-surface) !important;
  --surface2: var(--hindi-surface-muted) !important;
  --bg-elevated: var(--hindi-surface) !important;
  --sidebar-bg: var(--hindi-surface-muted) !important;
  --card: var(--hindi-surface) !important;
  --card2: var(--hindi-surface-muted) !important;
  --ink: var(--hindi-text) !important;
  --ink2: var(--hindi-text-secondary) !important;
  --ink3: var(--hindi-muted) !important;
  --ink4: var(--hindi-muted) !important;
  --text: var(--hindi-text) !important;
  --text-secondary: var(--hindi-text-secondary) !important;
  --border: var(--hindi-border) !important;
  --border2: var(--hindi-border-strong) !important;
  --accent-rgb: var(--hindi-accent-rgb) !important;
  --accent: var(--hindi-accent) !important;
  --accent-soft: var(--hindi-accent-soft) !important;
  --forest: var(--hindi-accent) !important;
  --forest-soft: var(--hindi-accent-soft) !important;
  --forest-l: var(--hindi-accent-soft) !important;
  --teal: var(--hindi-accent) !important;
  --teal-d: var(--hindi-accent-strong) !important;
  --teal-l: var(--hindi-accent-soft) !important;
  --teal-m: var(--hindi-accent-soft) !important;
  --saffron: var(--hindi-accent) !important;
  --saffron-d: var(--hindi-accent-strong) !important;
  --saffron-l: var(--hindi-accent-soft) !important;
  --gold: var(--hindi-warm) !important;
  --gold-l: var(--hindi-warm-soft) !important;
  --gold-dim: var(--hindi-warm-soft) !important;
  --amber: var(--hindi-warm) !important;
  --amber-d: var(--hindi-warm) !important;
  --amber-l: var(--hindi-warm-soft) !important;
  --marigold: var(--hindi-warm) !important;
  --marigold-l: var(--hindi-warm-soft) !important;
  --crimson: var(--hindi-danger) !important;
  --crimson-l: var(--hindi-danger-soft) !important;
  --rose: var(--hindi-danger) !important;
  --rose-soft: var(--hindi-danger-soft) !important;
  --rose-dim: var(--hindi-danger-soft) !important;
  --sky: var(--hindi-sky) !important;
  --violet: var(--hindi-violet) !important;
  --shadow: var(--hindi-shadow) !important;
  --shadow-sm: var(--hindi-shadow) !important;
  background-color: var(--hindi-bg) !important;
  background-image: none !important;
  color: var(--hindi-text) !important;
  transform: none !important;
  transition: none !important;
}

html[data-hindi-theme] body a { color:var(--hindi-accent); }
html[data-hindi-theme] body.page-enter { animation:none !important;opacity:1 !important;transform:none !important; }
html[data-hindi-theme] body .sidebar,
html[data-hindi-theme] body #sidebar { background:var(--hindi-surface-muted) !important;border-color:var(--hindi-border-strong) !important;box-shadow:none !important; }
html[data-hindi-theme] body .topbar,
html[data-hindi-theme] body #topbar { background:var(--hindi-surface) !important;border-color:var(--hindi-border-strong) !important;box-shadow:none !important;backdrop-filter:none !important;-webkit-backdrop-filter:none !important; }
html[data-hindi-theme] body .sidebar-logo,
html[data-hindi-theme] body .sidebar-header { background:var(--hindi-surface-muted) !important;border-color:var(--hindi-border-strong) !important; }
html[data-hindi-theme] body .topic-card,
html[data-hindi-theme] body .poet-card,
html[data-hindi-theme] body .accordion,
html[data-hindi-theme] body .alankar-section,
html[data-hindi-theme] body .clue,
html[data-hindi-theme] body .word { background-color:var(--hindi-surface) !important;border-color:var(--hindi-border-strong) !important;box-shadow:none !important; }
html[data-hindi-theme] body .hero { background-color:var(--hindi-surface) !important;background-image:none !important;border-color:var(--hindi-border-strong) !important; }
html[data-hindi-theme] body .hero { color:var(--hindi-text) !important; }
html[data-hindi-theme] body .hero h1,
html[data-hindi-theme] body .hero h2,
html[data-hindi-theme] body .hero h3,
html[data-hindi-theme] body .hero strong { color:var(--hindi-text) !important; }
html[data-hindi-theme] body .hero p { color:var(--hindi-text-secondary) !important;opacity:1 !important; }
html[data-hindi-theme] body .hero .hero-eyebrow { color:var(--hindi-accent) !important;opacity:1 !important; }
html[data-hindi-theme] body .hero .hero-tag { background:var(--hindi-accent-soft) !important;border-color:var(--hindi-border-strong) !important;color:var(--hindi-accent) !important;backdrop-filter:none !important;-webkit-backdrop-filter:none !important; }
html[data-hindi-theme] body .hero .hero-formula { background:var(--hindi-surface-muted) !important;border-color:var(--hindi-border-strong) !important;color:var(--hindi-text) !important;backdrop-filter:none !important;-webkit-backdrop-filter:none !important; }
html[data-hindi-theme] body .hero .hero-formula * { color:inherit !important; }
html[data-hindi-theme] body .hero::before { color:var(--hindi-accent-soft) !important;-webkit-text-stroke-color:var(--hindi-border-strong) !important; }
html[data-hindi-theme] body .bg-canvas { display:none !important; }

#dark-btn,
#themeToggle,
button:has(> #mnav-theme-icon),
.setting-row:has(#themeToggle),
.topic-page [onclick="toggleTheme()"],
[data-recall-control],
.font-ctrl-group,
#cheatsheet-btn,
.cheatsheet-banner,
#mobile-nav,
.float-toolbar,
.scroll-top,
.settings { display:none !important; }

.hindi-page-actions {
  display:flex;
  align-items:center;
  gap:8px;
}

.hindi-page-actions--floating {
  position:fixed;
  right:18px;
  bottom:18px;
  z-index:10000;
}

.hindi-action-button {
  display:grid;
  width:38px;
  height:38px;
  place-items:center;
  padding:0;
  border:1px solid var(--hindi-border-strong);
  border-radius:50%;
  background:var(--hindi-surface);
  color:var(--hindi-accent);
  box-shadow:var(--hindi-shadow);
  cursor:pointer;
  text-decoration:none !important;
  font:700 1.15rem/1 system-ui,sans-serif;
}
.hindi-action-button:hover { background:var(--hindi-accent-soft);border-color:var(--hindi-accent);color:var(--hindi-accent); }
.hindi-action-button:focus-visible { outline:2px solid var(--hindi-accent);outline-offset:3px; }
.hindi-page-actions--inline .hindi-action-button { width:34px;height:34px;box-shadow:none; }

@media (max-width:768px) {
  .hindi-page-actions--floating { right:14px;bottom:14px; }
  .hindi-action-button { width:40px;height:40px; }
  .hindi-page-actions--inline { gap:6px; }
  .hindi-page-actions--inline .hindi-action-button { width:34px;height:34px; }
}

@media (prefers-reduced-motion:reduce) {
  html[data-hindi-theme] *,
  html[data-hindi-theme] *::before,
  html[data-hindi-theme] *::after { transition-duration:.01ms !important; }
}
