/* Warm Paper Study — dark mode. Loaded after warm-paper.css and warm-paper-surfaces.css.
   Palette follows the dark login screen (auth-login.css): paper #191c20, surface #24282d, ink #edece7,
   muted #a4a59f, line #363b40, accent text #e37b70, brick buttons #bc4940.
   The first part mirrors the light rules one-to-one (same selectors + .theme-dark, colours only), so when a
   light rule gains or changes a colour, update its twin here. The tail holds dark-only adjustments. */
body.skin-warm-paper.theme-dark{--warm-page:#191c20;--warm-ink:#edece7;--warm-muted:#a4a59f;--warm-border:#363b40;--warm-accent:#bc4940}
body.skin-warm-paper.theme-dark button:focus-visible,body.skin-warm-paper.theme-dark summary:focus-visible,body.skin-warm-paper.theme-dark [role=button]:focus-visible{outline:2px solid #e37b70}
body.skin-warm-paper.theme-dark{--warm-panel-page:#191c20;--warm-panel-surface:#24282d;--warm-panel-ink:#edece7;--warm-panel-muted:#a4a59f;--warm-panel-accent:#bc4940;--warm-panel-line:#363b40;--warm-panel-tint:#3a2a28;--warm-panel-shadow:0 16px 48px rgb(0 0 0 / 36%), 0 2px 8px rgb(0 0 0 / 12%)}
body.skin-warm-paper.theme-dark[class] :is(#randomModalContent, #exportModalContent, #predictTargetContent, #blueprintContent, #dangerConfirmContent, #fusionSuccessContent, #successChoiceContent, #subscriptionCheckoutContent, .past-paper-preview-shell, .legal-modal-panel),body.skin-warm-paper.theme-dark[class] #accountModalContent > .account-shell,body.skin-warm-paper.theme-dark[class] #pwaInstallHelpModal > div,body.skin-warm-paper.theme-dark[class] #avatarCropperModal > div{color-scheme:dark}
body.skin-warm-paper.theme-dark[class] :is(#accountModalContent, #randomModalContent, #exportModalContent, #predictTargetContent, #subscriptionCheckoutContent) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]), select, textarea){color-scheme:dark}
body.skin-warm-paper.theme-dark[class] :is(#accountModalContent, #randomModalContent, #exportModalContent, #predictTargetContent, #mobileSheetBody) :is(input, select, textarea):focus-visible{border-color:#e37b70 !important;outline:2px solid rgb(227 123 112 / 25%)}
body.skin-warm-paper.theme-dark[class] :is(#accountModalContent, #randomModalContent, #exportModalContent) .bg-st-red:not(:disabled),body.skin-warm-paper.theme-dark[class] :is(.subscription-pay-btn, .capybara-send-primary):not(:disabled){border-color:#e37b70 !important;box-shadow:0 3px 9px rgb(0 0 0 / 36%) !important}
body.skin-warm-paper.theme-dark[class] #accountModalContent .account-tab-button.is-active{color:#e37b70 !important}
body.skin-warm-paper.theme-dark[class] :is(#boxNum, #boxMarks).border-st-red{border-color:#e37b70 !important}
body.skin-warm-paper.theme-dark[class] :is(#boxNum, #boxMarks).border-st-red :is(input[type="number"], label > span){color:#e37b70 !important;border-color:#e37b70 !important}
body.skin-warm-paper.theme-dark[class] .filter-dropdown > div[id],body.skin-warm-paper.theme-dark[class] :is(.question-search-suggestions, .theme-picker-menu){color-scheme:dark;box-shadow:0 10px 28px rgb(0 0 0 / 30%) !important}
body.skin-warm-paper.theme-dark[class] :is(.question-search-option > strong, .theme-picker-check){color:#e37b70 !important}
body.skin-warm-paper.theme-dark[class] :is(.capybara-drawer, .capybara-drawer-header, .capybara-input-area, .capybara-question-meta, .capybara-message.assistant){color-scheme:dark}
body.skin-warm-paper.theme-dark[class] .capybara-drawer{box-shadow:-12px 0 40px rgb(0 0 0 / 30%) !important}
body.skin-warm-paper.theme-dark[class] :is(.capybara-tab.active, .capybara-message.user, .capybara-quota-hint:not(.is-empty)){color:#e37b70 !important;border-color:#5b3d38 !important}
body.skin-warm-paper.theme-dark[class] .capybara-message.assistant{box-shadow:0 2px 7px rgb(0 0 0 / 9%) !important}
body.skin-warm-paper.theme-dark[class] .capybara-textarea:focus{border-color:#e37b70 !important;box-shadow:0 0 0 3px rgb(0 0 0 / 30%) !important}
body.skin-warm-paper.theme-dark[class] :is(.photo-dialog, .capybara-drawer){--photo-ink:#edece7;--photo-muted:#a4a59f;--photo-line:#363b40;--photo-panel:#24282d;--photo-soft:#191c20;--photo-accent:#d66a5f}
body.skin-warm-paper.theme-dark[class] :is(.photo-dialog, .question-selection-dialog){color-scheme:dark}
body.skin-warm-paper.theme-dark[class] .question-selection-actions button.primary:not(:disabled){border-color:#e37b70}
body.skin-warm-paper.theme-dark[class] .subscription-region-btn.is-active{border-color:#e37b70 !important}
body.skin-warm-paper.theme-dark[class] :is(#previewImageList > div, #previewImageList img, #questionSelectionPreview, .question-selection-crop, .mobile-question-image-wrap, .mobile-question-image, .mobile-answer-body > img, .mobile-answer-snippet-frame, .past-paper-preview-shell iframe, .photo-question > img){background-color:#24282d !important}
@media(min-width:768px){
 body.skin-warm-paper.theme-dark :is(#sidebarDrawerHandle,#hallFilterDrawerHandle){background:#24282d;color:#a4a59f;box-shadow:0 2px 8px rgb(0 0 0 / 18%)}
 body.skin-warm-paper.theme-dark :is(#sidebarDrawerHandle,#hallFilterDrawerHandle):hover{background:#24282d;border-color:#565c64;color:#e37b70;box-shadow:0 3px 10px rgb(0 0 0 / 30%)}
 body.skin-warm-paper.theme-dark :is(#sidebarDrawerHandle,#hallFilterDrawerHandle):active{background:#191c20}
 body.skin-warm-paper.theme-dark #sidebarDrawerHandle .sidebar-drawer-count{color:#e37b70}
 body.skin-warm-paper.theme-dark #btnRandomPanel,body.skin-warm-paper.theme-dark #btnSmartFusion{background:#24282d!important;border:1px solid #363b40!important;color:#e7e6e1!important}
 body.skin-warm-paper.theme-dark #btnRandomPanel:hover,body.skin-warm-paper.theme-dark #btnSmartFusion:hover{background:#2d3238!important;border-color:#565c64!important}
 body.skin-warm-paper.theme-dark #btnRandomPanel.warm-relabel:before,body.skin-warm-paper.theme-dark #btnSmartFusion.warm-relabel:before{color:#e37b70}
 body.skin-warm-paper.theme-dark #cartDropZone>div:first-child>h3{color:#ecebe6!important}
 body.skin-warm-paper.theme-dark #cartDropZone>div:first-child>h3.warm-relabel:after{color:#ecebe6}
 body.skin-warm-paper.theme-dark #cartDropZone>div:first-child>div>button{color:#a4a59f!important}
 body.skin-warm-paper.theme-dark #cartDropZone>div:first-child>div>button:hover{background:#2d3238!important;color:#e37b70!important}
 body.skin-warm-paper.theme-dark #cartList::-webkit-scrollbar-thumb{background:#4a5058}
 body.skin-warm-paper.theme-dark #cartList::-webkit-scrollbar-thumb:hover{background-color:#4a5058}
 body.skin-warm-paper.theme-dark #cartList>.cart-item:hover{background:#2d3238!important}
 body.skin-warm-paper.theme-dark #cartList>.cart-item>div:first-child>div{background:#2d3238;color:#dad9d4!important}
 body.skin-warm-paper.theme-dark #cartList>.cart-item>div:first-child>span{color:#ecebe6!important}
 body.skin-warm-paper.theme-dark #cartList>.cart-item:hover>div:first-child>span{color:#e37b70!important}
 body.skin-warm-paper.theme-dark #cartList>.cart-item>.cart-part-selection{color:#f0b2a9;background:#3a2a28;border:1px solid #5b3d38}
 body.skin-warm-paper.theme-dark #cartList>.cart-item>button[onclick^="removeFromCart"]{color:#a4a59f!important}
 body.skin-warm-paper.theme-dark #cartList>.cart-item>button[onclick^="removeFromCart"]:hover{background:#2d3238;color:#e37b70!important}
 body.skin-warm-paper.theme-dark #cartList>div:not(.cart-item):not(.cart-drop-indicator){background:#24282d!important;border:1px dashed #363b40!important}
 body.skin-warm-paper.theme-dark #cartList .cart-drop-indicator{border-color:#e37b70!important}
 body.skin-warm-paper.theme-dark #appBrandTitle{color:#edece7!important}
 body.skin-warm-paper.theme-dark #appBrandText{color:#edece7!important}
 body.skin-warm-paper.theme-dark .warm-brand-caption{color:#a4a59f}
 body.skin-warm-paper.theme-dark #mainTabs>button{color:#cbcac4!important}
 body.skin-warm-paper.theme-dark #mainTabs>button.bg-st-red{color:#e37b70!important;border-bottom-color:#e37b70!important}
 body.skin-warm-paper.theme-dark #appTopHeader .user-info-card:hover #sidebar_username{color:#e37b70!important}
 body.skin-warm-paper.theme-dark #appTopHeader #sidebar_username{color:#ecebe6!important}
 body.skin-warm-paper.theme-dark #appTopHeader>div:first-child>div:last-child>div:first-child{background:#2d3238!important}
 body.skin-warm-paper.theme-dark #appTopHeader .lang-choice-btn{color:#a4a59f!important}
 body.skin-warm-paper.theme-dark #appTopHeader .lang-choice-btn:hover{color:#ecebe6!important}
 body.skin-warm-paper.theme-dark #appTopHeader .lang-choice-btn.bg-white{background:#24282d!important;color:#ecebe6!important;box-shadow:0 1px 3px rgb(0 0 0 / 36%)!important}
 body.skin-warm-paper.theme-dark :is(.style-toggle-btn,.theme-toggle-btn){background:#24282d!important;color:#d7d6d0!important}
 body.skin-warm-paper.theme-dark :is(.style-toggle-btn,.theme-toggle-btn):hover{border-color:#565c64!important;background:#191c20!important}
 body.skin-warm-paper.theme-dark #hallPanel>.sticky:after{background:linear-gradient(var(--warm-page),rgb(25 28 32 / 0))}
 body.skin-warm-paper.theme-dark #questionSearchControl{background:#24282d!important;box-shadow:0 2px 4px #0000000c!important}
 body.skin-warm-paper.theme-dark #questionSearchControl:before{background:#6b7178}
 body.skin-warm-paper.theme-dark #questionSearchControl input{color:#e6e5e0!important}
 body.skin-warm-paper.theme-dark .hall-favorites-filter{color:#dfded9}
 body.skin-warm-paper.theme-dark .photo-search-entry{background:#24282d!important;color:#dfded9!important}
 body.skin-warm-paper.theme-dark #filterBar>div>div[role=button],body.skin-warm-paper.theme-dark #filterBar select,body.skin-warm-paper.theme-dark #filter_marks{background:#24282d!important;color:#e3e2dd!important}
 body.skin-warm-paper.theme-dark #filterBar>div>div[role=button]:before{background:#6b7178}
 body.skin-warm-paper.theme-dark #filterBar [id^=label_]{color:#e3e2dd!important}
 body.skin-warm-paper.theme-dark .warm-filter-count{color:#a4a59f}
 body.skin-warm-paper.theme-dark .warm-chip{background:#2d3238;color:#cbcac4}
 body.skin-warm-paper.theme-dark .warm-chip:hover{background:#363b40;color:#f0b2a9}
 body.skin-warm-paper.theme-dark .warm-filter-reset{color:#cbcac4}
 body.skin-warm-paper.theme-dark .warm-result-count{color:#a4a59f}
 body.skin-warm-paper.theme-dark .question-card[data-question-id]{background:#24282d!important;border:1px solid #363b40!important;box-shadow:0 4px 16px #00000010!important}
 body.skin-warm-paper.theme-dark .question-card[data-question-id]:hover{box-shadow:0 7px 22px #00000020!important}
 body.skin-warm-paper.theme-dark .warm-card-header{border-bottom:1px solid #363b40}
 body.skin-warm-paper.theme-dark .warm-card-header h3{color:#e9e8e2!important}
 body.skin-warm-paper.theme-dark .warm-card-info{color:#a4a59f}
 body.skin-warm-paper.theme-dark .warm-card-controls>button{color:#d7d6d0!important}
 body.skin-warm-paper.theme-dark .warm-card-controls>button.warm-is-saved{color:#e37b70!important}
 body.skin-warm-paper.theme-dark .warm-card-controls>button:hover{background-color:#191c20!important}
 body.skin-warm-paper.theme-dark .warm-question-body{background:#24282d!important}
 body.skin-warm-paper.theme-dark .warm-question-body img{background:#24282d!important}
 body.skin-warm-paper.theme-dark .warm-card-footer{background:#24282d!important}
 body.skin-warm-paper.theme-dark .warm-card-footer>details>summary,body.skin-warm-paper.theme-dark .warm-card-footer>button{color:#dcdbd6!important}
 body.skin-warm-paper.theme-dark .warm-card-footer>details>summary:hover,body.skin-warm-paper.theme-dark .warm-card-footer>button:hover{background:#2d3238!important}
 body.skin-warm-paper.theme-dark .warm-card-footer>details[open]>div{border:1px solid #363b40!important;background:#24282d!important}
 body.skin-warm-paper.theme-dark .warm-card-footer>details[open]>summary{color:#e37b70!important}
 body.skin-warm-paper.theme-dark .warm-card-footer>[id^=btn_cart_]{border:1px solid #e37b70!important}
 body.skin-warm-paper.theme-dark .warm-card-footer>[id^=btn_cart_].warm-in-cart{background:#24282d!important;border-color:#363b40!important;color:#d7d6d0!important}
}
@media(min-width:768px){
@supports not selector(::-webkit-scrollbar-thumb){
  body.skin-warm-paper.theme-dark #cartList{scrollbar-color:#565c64 transparent}
}
}
@media (max-width: 767px){
 body.skin-warm-paper.theme-dark[class] :is(.mobile-study-app, .mobile-sheet-panel){color-scheme:dark}
 body.skin-warm-paper.theme-dark[class] :is(.mobile-question-card, .mobile-menu-card, .mobile-filter-group, .mobile-cart-summary, .mobile-cart-item:not(.is-dragging), .mobile-paper-row, .mobile-account-card, .mobile-generate-modal){box-shadow:0 2px 8px rgb(0 0 0 / 9%) !important}
 body.skin-warm-paper.theme-dark[class] .mobile-bottom-nav{box-shadow:0 -3px 16px rgb(0 0 0 / 12%) !important}
 body.skin-warm-paper.theme-dark[class] :is(.mobile-bottom-nav button.is-active, .mobile-bottom-nav button.has-filter, .mobile-sheet-tab.is-active, .mobile-topbar-filter.has-filter, .mobile-filter-chip.is-selected, .mobile-action-btn.preview-exit):not(:disabled){color:#e37b70 !important;border-color:#5b3d38 !important}
 body.skin-warm-paper.theme-dark[class] :is(.mobile-action-btn.primary, .mobile-action-btn.dark):not(:disabled){border-color:#e37b70 !important}
 body.skin-warm-paper.theme-dark[class] :is(.mobile-sheet-eyebrow, .mobile-answer-eyebrow, .mobile-question-marks){color:#e37b70 !important}
 body.skin-warm-paper.theme-dark[class] .mobile-answer-drawer{box-shadow:0 -10px 34px rgb(0 0 0 / 36%) !important}
 body.skin-warm-paper.theme-dark[class] .mobile-answer-handle span{background:#4a5058}
 body.skin-warm-paper.theme-dark[class] #accountModal.account-mobile-detail{--account-page:#191c20;--account-surface:#24282d;--account-ink:#edece7;--account-muted:#a4a59f;--account-line:#363b40;--account-tint:#3a2a28;--account-accent:#d66a5f}
 body.skin-warm-paper.theme-dark[class] #accountModal.account-mobile-detail :is(.account-security-body button, .mobile-sub-plan-row[data-featured="true"] .mobile-sub-plan-action):not(:disabled){border-color:#e37b70}
}

/* ---------- dark-only adjustments ---------- */
/* Filled brick buttons keep a border in their own fill (the mirror above would give them the lighter accent line). */
body.skin-warm-paper.theme-dark .warm-card-footer>[id^=btn_cart_]:not(.warm-in-cart){border-color:#bc4940!important}
body.skin-warm-paper.theme-dark[class] .question-selection-actions button.primary:not(:disabled){border-color:#bc4940}
body.skin-warm-paper.theme-dark #sidebarContent>.p-5:last-child>button:hover{background:#a63e36!important}
body.skin-warm-paper.theme-dark #cartList::-webkit-scrollbar-thumb:hover{background-color:#5c636c}
/* Question images: same monochrome inversion the classic dark theme uses, blended onto the card surface. */
body.skin-warm-paper.theme-dark .warm-question-body img{filter:invert(1) hue-rotate(180deg) grayscale(1) contrast(1.2) brightness(.96)!important;background:transparent!important;mix-blend-mode:screen!important}
/* The classic dark theme paints card buttons with its own fills at higher specificity; these stay flat here. */
body.skin-warm-paper.theme-dark .warm-card-footer>details>summary,body.skin-warm-paper.theme-dark .warm-card-footer>button:not([id^=btn_cart_]),body.skin-warm-paper.theme-dark .warm-card-controls>button:not(.warm-xiaobala){background:transparent!important;border-color:transparent!important;box-shadow:none!important}
body.skin-warm-paper.theme-dark .warm-card-footer>details>summary:hover,body.skin-warm-paper.theme-dark .warm-card-footer>button:not([id^=btn_cart_]):hover,body.skin-warm-paper.theme-dark .warm-card-controls>button:not(.warm-xiaobala):hover{background:#2d3238!important}
body.skin-warm-paper.theme-dark .warm-card-controls>button.warm-xiaobala{background-color:transparent!important;border-color:transparent!important;box-shadow:none!important}
/* The warm outline is dark brown and vanishes on the dark card; the dark variant draws the same capybara in light tan. */
body.skin-warm-paper.theme-dark .warm-card-controls>button.warm-xiaobala{background-image:url('/static/assets/capybara/xiaobala-outline-dark-v1.png')!important}
/* The classic dark theme gives the image wrapper its own near-black plate; here the inverted image sits straight on the card. */
body.skin-warm-paper.theme-dark .warm-question-body .answer-anchor-wrapper{background:transparent!important}
