/* Compact light/dark switch beside the comments shortcut. */
.hero-secondary-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:10px 14px}
.hero-theme-switch{display:inline-flex;align-items:center;gap:8px;min-height:44px;color:#f4e5c3;font-size:12px;font-weight:750;cursor:pointer;user-select:none}
.hero-theme-switch input{position:absolute;opacity:0;width:1px;height:1px}
.hero-theme-track{position:relative;flex:none;width:38px;height:22px;border:1px solid #d5c096;border-radius:99px;background:#47604c;transition:background .15s}
.hero-theme-thumb{position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;background:#f6eacf;box-shadow:0 1px 3px #091a15a0;transition:transform .15s}
.hero-theme-switch input:checked+.hero-theme-track{background:#327653}
.hero-theme-switch input:checked+.hero-theme-track .hero-theme-thumb{transform:translateX(16px)}
.hero-theme-switch input:focus-visible+.hero-theme-track{outline:3px solid #f1d39b;outline-offset:3px}
.hero-theme-switch:hover .hero-theme-track{border-color:#f3dca8}
@media(max-width:520px){.hero-secondary-actions{width:100%;justify-content:center;gap:9px 14px}}
@media(prefers-reduced-motion:reduce){.hero-theme-track,.hero-theme-thumb{transition:none}}

html[data-theme="dark"]{
 color-scheme:dark;
 --paper:#111a16;
 --card:#1b2922;
 --ink:#e5eee6;
 --muted:#a9bbac;
 --line:#344a3b;
 --soft:#22332a;
 --check:#59a57e;
 --sh:#00000050;
}
html[data-theme="dark"] body{background:var(--paper);color:var(--ink)}
html[data-theme="dark"] .skip{background:#26392d;color:#f2f5eb}
html[data-theme="dark"] .hero{background:radial-gradient(ellipse 600px 360px at 100% -10%,#2a5740 0%,transparent 70%),linear-gradient(150deg,#102b23,#091b16)}
html[data-theme="dark"] .button.secondary,
html[data-theme="dark"] .area-mark-all,
html[data-theme="dark"] .hint-reveal,
html[data-theme="dark"] .stage-reveal-button,
html[data-theme="dark"] .area-feedback button,
html[data-theme="dark"] .area-comment-add,
html[data-theme="dark"] .feedback-reply-button,
html[data-theme="dark"] .feedback-reply-context button{
 background:#22372b;color:#c4e9cd;border-color:#45614c;box-shadow:none
}
html[data-theme="dark"] .button.secondary:hover,
html[data-theme="dark"] .area-mark-all:hover:not(:disabled),
html[data-theme="dark"] .hint-reveal:hover,
html[data-theme="dark"] .stage-reveal-button:hover,
html[data-theme="dark"] .area-feedback button:hover,
html[data-theme="dark"] .area-comment-add:hover,
html[data-theme="dark"] .feedback-reply-button:hover{background:#2b4937}
html[data-theme="dark"] .stat,
html[data-theme="dark"] .stage,
html[data-theme="dark"] .stage-card,
html[data-theme="dark"] .heart-tracker,
html[data-theme="dark"] .guide-summary,
html[data-theme="dark"] .player-comments{background:var(--card);border-color:var(--line)}
html[data-theme="dark"] .stat.complete{background:#203f2b;border-color:#477e59}
html[data-theme="dark"] .stat-number,
html[data-theme="dark"] .heart-tracker h2,
html[data-theme="dark"] .guide-summary h3{color:#e5efe5}
html[data-theme="dark"] .stat-number small,
html[data-theme="dark"] .stat-label,
html[data-theme="dark"] .section-intro p,
html[data-theme="dark"] .section-intro .route-flex-note,
html[data-theme="dark"] .stage-toolbar,
html[data-theme="dark"] .stage-subtitle,
html[data-theme="dark"] .stage-progress,
html[data-theme="dark"] .stage-progress small,
html[data-theme="dark"] .stage-location,
html[data-theme="dark"] .stage-checkpoint,
html[data-theme="dark"] .heart-tracker h2 small,
html[data-theme="dark"] .heart-next,
html[data-theme="dark"] .heart-breakdown,
html[data-theme="dark"] .empty-state{color:#a6b7a8}
html[data-theme="dark"] .kicker{color:#87d0a5}
html[data-theme="dark"] .textbutton,
html[data-theme="dark"] .notes-companion a,
html[data-theme="dark"] .site-footer .creator-credit a{color:#94d8aa}
html[data-theme="dark"] .filters,
html[data-theme="dark"] .area-actions,
html[data-theme="dark"] .stage-info,
html[data-theme="dark"] .stage-reveal-control,
html[data-theme="dark"] .area-tool-legend,
html[data-theme="dark"] .area-feedback,
html[data-theme="dark"] .area-comment-content,
html[data-theme="dark"] .hint-options,
html[data-theme="dark"] .install-guide,
html[data-theme="dark"] .personal-notes,
html[data-theme="dark"] .feedback-spoiler-setting{
 background:#202f27;border-color:#354b3b;color:#d9e8db
}
html[data-theme="dark"] .search-wrap,
html[data-theme="dark"] .filters select,
html[data-theme="dark"] .feedback-field input,
html[data-theme="dark"] .feedback-field textarea,
html[data-theme="dark"] .feedback-field select,
html[data-theme="dark"] .personal-notes-editor textarea,
html[data-theme="dark"] .scarecrow-reminder textarea{
 background:#14231b;border-color:#46604b;color:#e5eee6
}
html[data-theme="dark"] .search-wrap input{color:#e5eee6}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder{color:#95a99a;opacity:1}
html[data-theme="dark"] .stage-number,
html[data-theme="dark"] .phase-pill,
html[data-theme="dark"] .install-icon,
html[data-theme="dark"] .personal-note-indicator,
html[data-theme="dark"] #feedbackCount,
html[data-theme="dark"] .area-feedback-count{background:#2b4936;color:#c3e8cb}
html[data-theme="dark"] .stage[open] .stage-number{background:#37694d;color:#fff}
html[data-theme="dark"] .stage.is-complete>summary{background:linear-gradient(110deg,#194a35,#236044);color:#fff}
html[data-theme="dark"] .stage.is-complete>summary .stage-number{background:#cbe7d0;color:#174c34}
html[data-theme="dark"] .stage.is-complete>summary .stage-subtitle,
html[data-theme="dark"] .stage.is-complete>summary .stage-progress,
html[data-theme="dark"] .stage.is-complete>summary .stage-progress small{color:#e4f5e5}
html[data-theme="dark"] .stage-body,
html[data-theme="dark"] .stage-info,
html[data-theme="dark"] .area-tool-legend,
html[data-theme="dark"] .check-row,
html[data-theme="dark"] .area-actions{border-color:#34463b}
html[data-theme="dark"] .check-row:active{background:#28382d}
html[data-theme="dark"] .check-row input[type="checkbox"]{background:#122218;border-color:#799580}
html[data-theme="dark"] .check-row input[type="checkbox"]:checked{background:#378965;border-color:#378965}
html[data-theme="dark"] .check-row .item-text{color:#e0ebe2}
html[data-theme="dark"] .check-row.checked .item-text{color:#a1b4a5;text-decoration-color:#6b816e}
html[data-theme="dark"] .check-row.skipped .item-text{color:#aac5b2}
html[data-theme="dark"] .item-badge{background:#2b4c37;color:#b7e9c2}
html[data-theme="dark"] .item-badge.heart{background:#52362f;color:#ffb5a7}
html[data-theme="dark"] .item-badge.boss{background:#493d2d;color:#f0d29f}
html[data-theme="dark"] .item-badge.other{background:#303e59;color:#becdf2}
html[data-theme="dark"] .check-row.skipped .optional-tag{background:#2a4b37;color:#b8efc8}
html[data-theme="dark"] .check-row.story-checkpoint-active{background:#1d3046;border-color:#638cc4;border-left-color:#7ea8dd}
html[data-theme="dark"] .check-row.story-checkpoint-active .item-text{color:#c8ddfa}
html[data-theme="dark"] .check-row.story-checkpoint-active .checkpoint-caption{color:#acccf5}
html[data-theme="dark"] .check-row.heart8-deferred{background:#2d2b21}
html[data-theme="dark"] .hint-placeholder,
html[data-theme="dark"] .hint-options-help,
html[data-theme="dark"] .hint-switch-copy small,
html[data-theme="dark"] .install-summary-copy small,
html[data-theme="dark"] .install-guide-content .install-caution{color:#a6baaa}
html[data-theme="dark"] .hint-switch,
html[data-theme="dark"] .hint-switch-copy strong,
html[data-theme="dark"] .install-guide>details>summary,
html[data-theme="dark"] .install-guide-content,
html[data-theme="dark"] .notes-companion strong,
html[data-theme="dark"] .area-comment-details>summary{color:#c6e8cc}
html[data-theme="dark"] .notes-companion,
html[data-theme="dark"] .area-tool-legend,
html[data-theme="dark"] .water-route-hint{color:#a9c3af}
html[data-theme="dark"] .water-route-hint strong{color:#b5e0c0}
html[data-theme="dark"] .skulltula-longshot-label{background:#35465c;color:#d5e6fa}
html[data-theme="dark"] .area-return-note,
html[data-theme="dark"] .storage-warning{background:#353024;color:#eedfba;border-color:#5a4d34}
html[data-theme="dark"] .area-return-note strong{color:#efd39b}
html[data-theme="dark"] .heart8-defer-status,
html[data-theme="dark"] .trading-chain-status,
html[data-theme="dark"] .scarecrow-reminder .scarecrow-input-label,
html[data-theme="dark"] .scarecrow-reminder .scarecrow-note-status{color:#e2cb9b}
html[data-theme="dark"] .personal-notes-heading,
html[data-theme="dark"] .personal-notes{color:#e0ece2}
html[data-theme="dark"] .personal-note-status{color:#9cbaa3}
html[data-theme="dark"] .personal-note-merge-notice{background:#274333;color:#c8e6d0}
html[data-theme="dark"] .heart-icon:not(.filled) .heart-pixel-outline{fill:#8ba397}
html[data-theme="dark"] .heart-icon:not(.filled) .heart-pixel-body{fill:#2e4136}
html[data-theme="dark"] .heart-icon:not(.filled) .heart-pixel-shine{fill:#4a6151}
html[data-theme="dark"] .heart-icon:not(.filled) .heart-pixel-shade{fill:#23382d}
html[data-theme="dark"] .support-project,
html[data-theme="dark"] .heart-support{background:#24382b;border-color:#405b46}
html[data-theme="dark"] .support-project p,
html[data-theme="dark"] .heart-support>span{color:#becfbe}
html[data-theme="dark"] .maker-note{background:linear-gradient(155deg,#253328,#1b2922);border-color:#554b35}
html[data-theme="dark"] .maker-note-features{background:#203025;border-color:#354b3b}
html[data-theme="dark"] .maker-note h2,
html[data-theme="dark"] .maker-note-feature strong{color:#e8eddd}
html[data-theme="dark"] .maker-note-main p,
html[data-theme="dark"] .maker-note-feature span:last-child{color:#b5c7b5}
html[data-theme="dark"] .maker-note-heading{color:#dec288}
html[data-theme="dark"] .studio-credit{background:#29283c;border-color:#4d476a}
html[data-theme="dark"] .studio-loopy{content:url("loopy-wink-dark.svg")}
html[data-theme="dark"] .studio-tag,
html[data-theme="dark"] .studio-credit a{color:#c9b2ff}
html[data-theme="dark"] .site-footer,
html[data-theme="dark"] .site-footer .footer-practical li,
html[data-theme="dark"] .site-footer .footer-privacy summary,
html[data-theme="dark"] .site-footer .studio-credit-copy p{color:#adbdad}
html[data-theme="dark"] .site-footer{border-color:#344a3b}
html[data-theme="dark"] .site-footer strong,
html[data-theme="dark"] .site-footer .footer-practical h2{color:#cae4cf}
html[data-theme="dark"] .site-footer .corrections{background:#213428;border-color:#415949;color:#b3d6bf}
html[data-theme="dark"] .site-footer .corrections a{color:#a6e0b5}
html[data-theme="dark"] .player-comments>details>summary{background:#243b2d;color:#e6efe5}
html[data-theme="dark"] .player-comments>details>summary:hover,
html[data-theme="dark"] .area-comment-details>summary:hover{background:#2c4938}
html[data-theme="dark"] .feedback-content{border-color:#344a3b}
html[data-theme="dark"] .feedback-summary-description,
html[data-theme="dark"] .feedback-intro,
html[data-theme="dark"] .feedback-status,
html[data-theme="dark"] .feedback-field,
html[data-theme="dark"] .feedback-flag,
html[data-theme="dark"] .feedback-spoiler-setting-copy>span{color:#b7c9ba}
html[data-theme="dark"] .feedback-heading,
html[data-theme="dark"] .feedback-form h3,
html[data-theme="dark"] .feedback-group-title,
html[data-theme="dark"] .feedback-spoiler-setting-label,
html[data-theme="dark"] .feedback-reply-context{color:#e1ede2}
html[data-theme="dark"] .feedback-comment,
html[data-theme="dark"] .feedback-comment.feedback-creator,
html[data-theme="dark"] .feedback-reply{background:#24342a;border-color:#3a5140}
html[data-theme="dark"] .feedback-comment.feedback-creator{background:#283d2e}
html[data-theme="dark"] .feedback-comment p,
html[data-theme="dark"] .feedback-meta strong{color:#dceadf}
html[data-theme="dark"] .feedback-meta,
html[data-theme="dark"] .feedback-empty{color:#aabbaf}
html[data-theme="dark"] .feedback-group-title{background:#2c4534;border-left-color:#71b88b}
html[data-theme="dark"] .feedback-creator-badge{background:#34543c;color:#d5eed9;border-color:#4a7552}
html[data-theme="dark"] .feedback-spoiler{background:#393221;border-color:#665535}
html[data-theme="dark"] .feedback-spoiler summary{color:#e8d29a}
html[data-theme="dark"] .feedback-reply-context{background:#2b4634}
html[data-theme="dark"] .feedback-form,
html[data-theme="dark"] .area-comment-content{border-color:#344a3b}
html[data-theme="dark"] .feedback-spoiler-setting{background:#213329}
html[data-theme="dark"] dialog.completion-celebration,
html[data-theme="dark"] .completion-banner{background:linear-gradient(155deg,#28372a,#1b2921);border-color:#786439;color:#e4ebdc}
html[data-theme="dark"] .completion-celebration h2,
html[data-theme="dark"] .completion-banner h2{color:#f0dcab}
html[data-theme="dark"] .completion-celebration p,
html[data-theme="dark"] .completion-banner p{color:#c9d7c6}
html[data-theme="dark"] .completion-close,
html[data-theme="dark"] .completion-return{color:#d2e4ce}
html[data-theme="dark"] .completion-close:hover,
html[data-theme="dark"] .completion-return:hover{background:#344b39}
html[data-theme="dark"] .update-notice,
html[data-theme="dark"] .comments-update-notice{background:#24372b;border-color:#547354;color:#edf4e8}
html[data-theme="dark"] .update-notice p,
html[data-theme="dark"] .comments-update-notice p{color:#bed0bf}
html[data-theme="dark"] #updateLater,
html[data-theme="dark"] #commentsUpdateLater{color:#c6e2ca;border-color:#58725b}

/* Collapsible guide help: keep the new information panels readable in dark mode. */
html[data-theme="dark"] .section-intro .checklist-progress-warning{color:#b8c9ba}
html[data-theme="dark"] .section-intro .checklist-progress-warning strong{color:#d7e9d7}
html[data-theme="dark"] .checklist-howto{background:#1b2922;border-color:#344a3b}
html[data-theme="dark"] .checklist-howto>details>summary{color:#c6e8cc}
html[data-theme="dark"] .checklist-howto>details>summary:hover{background:#263a2c}
html[data-theme="dark"] .howto-content{border-color:#344a3b}
html[data-theme="dark"] .howto-content>p{color:#b3c6b6}
html[data-theme="dark"] .howto-content>p strong{color:#d7ead9}
html[data-theme="dark"] .howto-content a{color:#9adab1}
html[data-theme="dark"] .howto-content .install-guide{background:#202f27;border-color:#354b3b}

/* Inline Heart Piece #8 reminder stays visible without a separate panel. */
html[data-theme="dark"] .heart8-inline-label{color:#afc9b6;border-color:#486c56}
html[data-theme="dark"] .heart8-inline-actions .heart8-defer-status{color:#c2dac5}

/* Collapsed comments count in dark mode. */
html[data-theme="dark"] .area-comment-preview{background:#202f27;border-color:#354b3b;color:#c6e8cc}
html[data-theme="dark"] .area-comment-preview:hover{background:#2c4938}
html[data-theme="dark"] .area-comment-preview.has-comments .area-feedback-count{background:#285b43;color:#fff}

/* Matching dark-mode contrast for the redesigned hint controls. */
html[data-theme="dark"] .hint-options-heading strong{color:#d1ead5}
html[data-theme="dark"] .hint-status-pill{background:#31513a;color:#cae8d0}
html[data-theme="dark"] .hint-options-description{color:#b3c6b6}
html[data-theme="dark"] .hint-all-button{background:#398c60;border-color:#398c60;color:#fff}
html[data-theme="dark"] .hint-all-button:hover{background:#2b754e;border-color:#2b754e}
html[data-theme="dark"] .hint-all-button.is-revealed{background:transparent;border-color:#5f896b;color:#c8e8ce}
html[data-theme="dark"] .hint-all-button.is-revealed:hover{background:#2b4634}
html[data-theme="dark"] .area-hints-button{background:#23452f;border-color:#4d7658;color:#d0eed6}
html[data-theme="dark"] .area-hints-button:hover{background:#315740}
