/* Shared chrome for the application and its embedded reader. */
caminho-theme-switch { display: inline-flex; flex: none; }
.theme-switch {
  display: grid; place-items: center; width: 40px; height: 44px; padding: 0;
  border: 0; border-radius: 12px; background: transparent; color: #486449;
  cursor: pointer; touch-action: manipulation;
}
.theme-switch svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-switch .theme-sun, .theme-switch[aria-pressed="true"] .theme-moon { display: none; }
.theme-switch[aria-pressed="true"] .theme-sun { display: inline; }
.theme-switch:hover { background: #eff6ed; }
.theme-switch:focus-visible { outline: 2px solid #448049; outline-offset: -2px; }
.topline .header-tools { display: flex; align-items: center; justify-content: center; justify-self: center; }
.intro-top caminho-theme-switch { margin-left: auto; }
.auth-card { position: relative; }
.auth-card > caminho-theme-switch { position: absolute; inset: 19px 16px auto auto; }
.auth-card > .auth-brand { width: fit-content; max-width: calc(100% - 38px); }
@media (max-width: 380px) {
  .topline .header-tools .page-reload-button, .topline .theme-switch { width: 31px; padding-inline: 5px; }
  .topline,.topline:has(.admin-stats) { grid-template-columns: auto minmax(62px,1fr) auto; column-gap: 2px; }
  .auth-card > caminho-theme-switch { top: 15px; right: 8px; }
}

/* The generated palettes retain component states and their responsive selectors.
   These surfaces and accents define the reading experience across both frames. */
:root[data-caminho-theme="dark"] { background: #10171b; color-scheme: dark; }
[data-caminho-theme="dark"] body { background: #10171b; color: #e7efed; }
[data-caminho-theme="dark"] :is(.app-shell,.reader-shell,.auth-card,dialog) { background-color: #172126; }
[data-caminho-theme="dark"] :is(.app-header,.bottom-nav,.quick-chapters,.reader-header,.lesson-bottom) { background-color: #182126; border-color: #35434a; }
[data-caminho-theme="dark"] .theme-switch { color: #f4cb81; }
[data-caminho-theme="dark"] .theme-switch:hover { background: #35352c; }
[data-caminho-theme="dark"] .theme-switch:focus-visible { outline-color: #e8c98b; }
[data-caminho-theme="dark"] .wordmark { color: #a3df7d; }
[data-caminho-theme="dark"] .header-confession { color: #78caff; }
[data-caminho-theme="dark"] :is(.primary,.claim-btn,.play-button,.current .part-node,.week-day.done>span) { background-color: #9cde75; color: #152414; box-shadow: 0 3px 0 #51733c; }
[data-caminho-theme="dark"] .primary.blue { background-color: #82cfff; color: #122731; }
[data-caminho-theme="dark"] .primary:disabled { background-color: #344047; color: #bcc7c9; box-shadow: none; }
[data-caminho-theme="dark"] :is(.bar,.chapter-rail) { background-color: #34463f; }
[data-caminho-theme="dark"] :is(.bar>span,.chapter-fill) { background: linear-gradient(90deg,#65bd58,#a8ec71); }
[data-caminho-theme="dark"] .chapter-fill::after { background: #c1ff84; border-color: #75b54e; box-shadow: 0 0 7px #98ef6670; }
[data-caminho-theme="dark"] :is(.speech-jesus,.speech-god) .word-info { color: inherit; }
[data-caminho-theme="dark"] .highlight-yellow { background-color: #463c25; }
[data-caminho-theme="dark"] .highlight-green { background-color: #263f31; }
[data-caminho-theme="dark"] .highlight-blue { background-color: #263e4d; }
[data-caminho-theme="dark"] ::selection { background: #426442; color: #fff; }
[data-caminho-theme="dark"] input::placeholder,[data-caminho-theme="dark"] textarea::placeholder { color: #a3b2b3; }
[data-caminho-theme="dark"] input:-webkit-autofill { -webkit-text-fill-color: #e7efed; box-shadow: 0 0 0 40px #233037 inset; }
[data-caminho-theme="dark"] dialog::backdrop { background: #070d10bc; }
[data-caminho-theme="dark"] .verse-context-fact { background: #111; color: #fff; }
[data-caminho-theme="dark"] .reading { --paper: #172126; --read-ink: #e2e9e6; --read-highlight: #293f33; --line: #38464a; }
[data-caminho-theme="dark"] .reading[data-theme="sepia"] { --paper: #28251f; --read-ink: #ece1c9; --read-highlight: #383d2d; }
[data-caminho-theme="dark"] .reading[data-theme="night"] { --paper: #111a20; --read-ink: #d8e5e9; --read-highlight: #23392f; }
[data-caminho-theme="dark"] .reading .reader-shell { background: var(--paper); }
[data-caminho-theme="dark"] .reading .reading-text .spoken { background: #f1cf71; color: #282211; box-shadow: 0 0 0 3px #f1cf71; text-decoration-color: #705c25; }
[data-caminho-theme="dark"] .reading .audio-caption>div>#audio-caption { color: #ff9c9c; }
[data-caminho-theme="dark"] :is(.library-book,.annotation-book-group) { --book-tint: color-mix(in srgb,var(--book-accent) 19%,#182126) !important; }
[data-caminho-theme="dark"] :is(.library-book .category,.library-book .book-open,.annotation-book-icon,.annotation-group-count,.saved-note-chevron,.saved-note-icon) { color: color-mix(in srgb,var(--book-accent) 50%,#f0f4f0); }
[data-caminho-theme="dark"] .theme-option.paper { background: #172126; color: #e2e9e6; }
[data-caminho-theme="dark"] .theme-option.sepia { background: #28251f; color: #ece1c9; }
[data-caminho-theme="dark"] .theme-option.night { background: #111a20; color: #d8e5e9; }
[data-caminho-theme="dark"] body:has(>main:only-child) > main { background: #172126; color: #e7efed; }
[data-caminho-theme="dark"] body:has(>main:only-child) > main :is(p,small) { color: #b8c6c5; }
