/* R126: contrast shared by the four editions; existing phrases and colors stay intact. */
html[data-theme] body #app #main-content :is(.question,.reading-answer,.answer,.memory-option-copy,.memory-feedback,.review-response) :is(mark.study-marker,mark.custom-study-mark),html[data-theme] body #app #main-content :is(.question,.reading-answer,.answer,.memory-option-copy,.memory-feedback,.review-response) :is(mark.study-marker,mark.custom-study-mark) *,html[data-theme] body .hl-editor-body mark,html[data-theme] body .hl-editor-body mark *{color:#203744!important;-webkit-text-fill-color:#203744!important;text-shadow:none!important;opacity:1!important;mix-blend-mode:normal!important;font-weight:inherit!important}
html[data-theme] body #app #main-content mark.study-marker{background:var(--marker-color,#ffe784)!important;border-radius:2px!important;padding:0 .04em!important;box-decoration-break:clone;-webkit-box-decoration-break:clone}
html[data-theme] body #app #main-content :is(.marker-assoc-0,.marker-concept){--marker-color:#ffe784}html[data-theme] body #app #main-content .marker-assoc-1{--marker-color:#bde6c8}html[data-theme] body #app #main-content :is(.marker-assoc-2,.marker-context-2,.marker-relation){--marker-color:#d9c9ef}html[data-theme] body #app #main-content :is(.marker-assoc-3,.marker-context-3,.marker-anchor){--marker-color:#c5e3fa}html[data-theme] body #app #main-content :is(.marker-assoc-4,.marker-context-4){--marker-color:#f7c5ce}
html[data-theme] body :is(#app,.highlight-editor-dialog) .answer-edge,html[data-theme] body :is(#app,.highlight-editor-dialog) .answer-edge *{color:#203744!important;-webkit-text-fill-color:#203744!important;text-shadow:none!important;opacity:1!important}html[data-theme] body :is(#app,.highlight-editor-dialog) .answer-edge-first{background:#f7c5ce!important}html[data-theme] body :is(#app,.highlight-editor-dialog) .answer-edge-last{background:#c5e3fa!important}
html[data-theme] body #app #main-content .highlight-edit-button{width:28px!important;min-width:28px!important;height:28px!important;min-height:28px!important;padding:5px!important;flex:none!important;border-radius:8px!important;font-size:0!important;display:inline-flex!important;align-items:center!important;justify-content:center!important}
html[data-theme] body #app #main-content .highlight-edit-button svg{width:17px!important;height:17px!important;stroke-width:1.7;fill:none;stroke:currentColor}.question-edit-tools{flex:none!important;margin:0!important}.question-annotation-head{margin-bottom:8px!important;align-items:center!important}.hl-editable-text mark{padding:0!important;box-decoration-break:clone;-webkit-box-decoration-break:clone}.hl-editable-text mark .hl-word{background:transparent!important}
/* Keep one concise block label, with the selector beside it. */
html body #app .block-choice,html body #app .memory-block-choice{display:grid!important;grid-template-columns:minmax(0,1fr) 42px!important;align-items:center!important;gap:0!important;min-height:0!important;margin:0 0 9px!important;padding:0!important;border:1px solid var(--line,#c3d4cd)!important;border-radius:12px!important;background:var(--card,var(--field))!important;box-shadow:none!important;overflow:hidden!important}
html body #app .block{display:grid!important;grid-template-columns:minmax(0,1fr) 22px!important;align-items:center!important;gap:10px!important;width:100%!important;min-width:0!important;min-height:64px!important;margin:0!important;padding:11px 12px!important;border:0!important;border-radius:0!important;box-shadow:none!important;background:transparent!important;text-align:left!important;color:var(--ink)!important}
html body #app .block .num{display:none!important}html body #app .block>span:not(.chevron):not(.num){min-width:0!important}html body #app .block strong{display:block;font-size:15px!important;line-height:1.35!important;margin:0!important;font-weight:700!important}html body #app .block small{display:block;font-size:11px!important;line-height:1.4!important;color:var(--muted)!important;margin-top:3px!important}html body #app .block .chevron{display:flex!important;align-items:center!important;justify-content:center!important}html body #app .block .chevron svg{width:20px!important;height:20px!important}
html body #app :is(.block-question-button,.memory-block-pick){display:flex!important;align-items:center!important;justify-content:center!important;width:42px!important;min-width:42px!important;max-width:42px!important;height:100%!important;min-height:44px!important;padding:9px!important;margin:0!important;border:0!important;border-left:1px solid var(--line)!important;border-radius:0!important;background:var(--panel,var(--field))!important;box-shadow:none!important;color:var(--ink)!important;font-size:0!important}html body #app :is(.block-question-button,.memory-block-pick) svg{width:19px!important;height:19px!important;fill:none;stroke:currentColor;stroke-width:1.7}
html body #app .ps-block-list{gap:9px!important}.memory-book-intro,.book-intro{margin-bottom:14px!important}.memory-book-intro img,.book-intro>img{max-height:132px!important;width:auto!important}.memory-settings-link{font-size:13px!important}
/* Compact controls, with the clock at the geometric center. */
html body #app .mobile-study-toolbar[data-centered-clock]{display:grid!important;grid-template-columns:minmax(0,1fr) 64px minmax(0,1fr)!important;gap:5px!important;min-height:44px!important;padding:5px!important;align-items:center!important}
html body #app .r126-tool-side{display:flex!important;align-items:center!important;gap:4px!important;min-width:0!important}.r126-tool-right{justify-content:flex-end!important}
html body #app .mobile-study-toolbar .r126-tool-side>button,html body #app .mobile-study-toolbar .r126-tool-side>select{width:30px!important;min-width:28px!important;max-width:42px!important;height:32px!important;min-height:32px!important;margin:0!important;padding:4px!important;border-radius:8px!important;font-size:11px!important;flex:none!important;gap:0!important}
html body #app .mobile-study-toolbar .r126-tool-side>select{width:45px!important;max-width:48px!important;font-size:14px!important}html body #app .mobile-study-toolbar .r126-tool-side>button>span{display:none!important}html body #app .mobile-study-toolbar .r126-tool-side>button svg{width:17px!important;height:17px!important}
html body #app .mobile-study-toolbar[data-centered-clock]>.timer{width:64px!important;min-width:64px!important;max-width:64px!important;height:34px!important;min-height:34px!important;border:1px solid var(--line)!important;padding:3px!important;margin:0!important;font-size:17px!important;font-weight:800!important;border-radius:9px!important;font-variant-numeric:tabular-nums;white-space:nowrap!important;color:var(--ink)!important;background:var(--field)!important}
html body #app .mobile-study-toolbar[data-centered-clock]>.timer:is(.paused,.reading,.reviewed,.shuffling,.untimed){font-size:10px!important}html body #app .mobile-study-toolbar[data-centered-clock]>.timer.urgent{color:#8e2344!important;background:#ffe1e9!important;border-color:#d98ba3!important}
html body #app .mobile-study-header{margin-bottom:6px!important;min-height:44px!important}.mobile-study-toolbar{box-shadow:none!important}
.mode-settings-button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:38px;padding:8px 11px;border:1px solid var(--line,#c3d4cd);border-radius:9px;background:var(--field,#fffef9);color:var(--ink,#203744);font:650 13px/1.3 inherit;cursor:pointer;margin:0 0 12px}.mode-settings-button svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;flex:none}.mode-settings-button.icon-only{width:34px;min-width:34px;height:34px;min-height:34px;margin:0;padding:7px;gap:0;font-size:0}
.cpu-main-exam{width:100%;max-width:1180px;margin:0 auto;min-width:0}.cpu-exam-heading{margin:0 0 12px;text-align:left}.cpu-exam-heading small{font-size:10px;letter-spacing:1px;font-weight:750;color:var(--muted)}.cpu-exam-heading h1{font-size:19px!important;line-height:1.3!important;margin:4px 0!important}.cpu-exam-heading>span{font-size:12px;color:var(--muted)}
html body #app .cpu-exam-tools{display:grid!important;grid-template-columns:minmax(0,1fr) 82px minmax(0,1fr)!important;gap:8px;align-items:center;margin:0 0 15px;padding:7px;border:1px solid var(--line);border-radius:12px;background:var(--panel,var(--card))}
html body #app .cpu-exam-tools button{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:38px;max-width:135px;margin:0;padding:7px 10px;border:1px solid var(--line);border-radius:9px;font:700 12px/1.2 system-ui,sans-serif;box-shadow:none}.cpu-exam-back{justify-self:start;background:var(--field);color:var(--ink)}.cpu-exam-back svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7}
html body #app .cpu-exam-submit{justify-self:end;background:#bc2944!important;color:#fff!important;-webkit-text-fill-color:#fff!important;border-color:#a51f39!important;min-width:0!important;white-space:normal;text-align:center}
html[data-cpu-main-exam][data-theme] body #app .cpu-main-exam .cpu-exam-tools>span#timer{box-sizing:border-box!important;display:flex!important;align-items:center;justify-content:center;width:82px!important;min-width:82px!important;height:36px!important;min-height:36px!important;padding:4px!important;margin:0!important;font-size:18px!important;font-weight:800!important;line-height:1!important;font-variant-numeric:tabular-nums;background:var(--field)!important;color:var(--ink)!important;border:1px solid var(--line)!important;border-radius:9px!important;white-space:nowrap!important}
html[data-cpu-main-exam][data-theme] body #app .cpu-main-exam .cpu-exam-tools>span#timer.urgent{background:#ffe1e9!important;color:#922442!important;border-color:#d489a0!important}.cpu-main-exam>.question{margin:0 0 14px!important;padding:13px!important;border:1px solid var(--line);border-radius:12px;background:var(--card)}.cpu-exam-navigation{display:flex;align-items:center;gap:10px;margin:14px 0}.cpu-exam-navigation>button{flex:1;min-height:42px;margin:0}.cpu-exam-navigation svg{width:18px;height:18px}.cpu-exam-map{margin:12px 0;color:var(--muted);font-size:12px}.cpu-exam-map .question-dots{margin-top:9px}html[data-cpu-main-exam] #app .session-progress{display:none!important}html[data-cpu-main-exam] #app #main-content{padding-bottom:24px!important}
.mode-settings-dialog{box-sizing:border-box;width:min(620px,calc(100vw - 20px));max-height:calc(100dvh - 20px);height:min(730px,calc(100dvh - 20px));padding:0;border:1px solid var(--line,#bed2c8);border-radius:16px;background:var(--card,#fffef9);color:var(--ink,#203744);font:400 15px/1.5 system-ui,sans-serif;overflow:hidden;box-shadow:0 20px 70px #102d384a}.mode-settings-dialog[open]{display:flex;flex-direction:column}.mode-settings-dialog::backdrop{background:#102d3866;backdrop-filter:blur(2px)}.mode-settings-dialog>header{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px 16px;border-bottom:1px solid var(--line)}.mode-settings-dialog header small{font-size:10px;letter-spacing:1px;color:var(--muted)}.mode-settings-dialog h2{font-size:21px;line-height:1.3;margin:2px 0}.mode-settings-dialog header>button{width:36px;height:36px;min-width:36px;font-size:24px;border:1px solid var(--line);border-radius:9px;background:var(--field);color:inherit}.mode-settings-tabs{display:flex;gap:5px;overflow:auto;flex:none;padding:10px 12px;border-bottom:1px solid var(--line)}.mode-settings-tabs button{white-space:nowrap;min-height:35px;padding:7px 10px;border-radius:8px;border:1px solid var(--line);background:var(--field);color:inherit;font:600 12px/1.2 system-ui,sans-serif}.mode-settings-tabs [aria-selected=true]{background:var(--accent-soft,#d9ebe2);border-color:var(--brand,#28725d)}.mode-settings-body{overflow:auto;min-height:0;flex:1;padding:12px 16px 18px;overscroll-behavior:contain}.mode-field{display:grid;grid-template-columns:minmax(0,1fr) minmax(105px,.65fr);gap:10px;align-items:center;margin:0 0 12px;font-size:13px;line-height:1.4}.mode-field input,.mode-field select{box-sizing:border-box;width:100%;min-width:0;min-height:39px;padding:7px 9px;border:1px solid var(--line);border-radius:8px;background:var(--field);color:inherit;font-size:16px}.mode-range{display:block;margin:0 0 16px;font-size:13px}.mode-range>span{display:flex;justify-content:space-between;gap:10px}.mode-range output{font-weight:700}.mode-range input{width:100%;accent-color:var(--brand,#27745e)}.mode-toggle{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:13px;margin-bottom:14px}.mode-toggle input{width:20px;height:20px;accent-color:var(--brand,#27745e)}.mode-help{font-size:12px;line-height:1.6;color:var(--muted);margin:0 0 14px}.mode-color{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:14px;font-size:13px}.mode-color label{display:flex;align-items:center;justify-content:space-between;flex:1;gap:12px}.mode-color input{width:46px;height:36px;padding:2px;border:1px solid var(--line);border-radius:7px}.mode-color button{min-height:36px;border:1px solid var(--line);border-radius:8px;background:var(--field);color:inherit;padding:6px 10px}.mode-settings-dialog>footer{display:flex;align-items:center;justify-content:space-between;gap:10px;flex:none;padding:10px 16px;border-top:1px solid var(--line);background:var(--panel,var(--card))}.mode-settings-dialog footer span{font-size:11px;color:var(--muted)}.mode-settings-dialog footer>button{min-height:38px;border:0;border-radius:9px;padding:8px 19px;background:var(--brand,#27745e);color:#fff;font-weight:700}
/* Kawaii stationery: calm paper and clear ink, without covering study content. */
html[data-theme="kawaii"]{--bg:#fffaf2;--card:#fffefb;--field:#fffefd;--panel:#f3faf4;--raised:#f0f8f2;--ink:#203e37;--muted:#597067;--line:#c3d9cc;--brand:#76589b;--brand2:#326f60;--brand-ink:#fff;--accent:#76589b;--accent-soft:#eee6f7;--good:#27724d;--good-bg:#d7efdf;--bad:#a83c54;--bad-bg:#ffe2e8;--urgent-ink:#922442;--urgent-bg:#ffe4ed;--urgent-line:#dda0b3}
html[data-theme="kawaii"] body{background:#fffaf2!important;color:#203e37!important}html[data-theme="kawaii"] body #app{color:#203e37}html[data-theme="kawaii"] :is(.top,.nav,.reader-toolbar,.ps-session-head,.mobile-study-footer){background:#edf8f1!important;border-color:#c3d9cc!important;box-shadow:none!important}html[data-theme="kawaii"] #app :is(.question,.memory-prompt,.ps-question-card,.ps-answer-card,.card,.reading-entry,.settings-group,.book){background:#fffefb!important;border-color:#c3d9cc!important;color:#203e37!important;box-shadow:none!important}html[data-theme="kawaii"] #app :is(.question-context,.asked,.reading-answer strong,.mobile-option-copy,.memory-option-copy,.ps-option-copy){color:var(--custom-question-color,#203e37)}html[data-theme="kawaii"] #app .question-sign{color:#a33764!important}html[data-theme="kawaii"] #app :is(.answer,.memory-choice){background:#fffefb!important;border-color:#bcd4c7!important;color:#203e37!important}html[data-theme="kawaii"] #app :is(.answer.correct,.memory-choice[data-state="correct"]){background:#d7efdf!important;border-color:#27724d!important}html[data-theme="kawaii"] #app :is(.answer.wrong,.memory-choice[data-state="wrong"]){background:#ffe2e8!important;border-color:#a83c54!important}
html[data-theme="kawaii"] .book-intro,html[data-theme="kawaii"] .ps-catalog-heading{position:relative;background:linear-gradient(115deg,#edf8f2,#fffaf2 65%);border:1px solid #d2e2d7;border-radius:14px;padding:12px!important}html[data-theme="kawaii"] :is(.book-intro,.ps-catalog-heading)::after{content:'✦';position:absolute;right:10px;top:8px;color:#b99ad1;font-size:18px;line-height:1;pointer-events:none}html[data-theme="kawaii"] .theme-preview.kawaii{background:#fffaf2!important}html[data-theme="kawaii"] .theme-preview.kawaii i:nth-child(1){background:#bde3d0}html[data-theme="kawaii"] .theme-preview.kawaii i:nth-child(2){background:#dec9ed}html[data-theme="kawaii"] .theme-preview.kawaii i:nth-child(3){background:#ffd5b6}.theme-preview.kawaii{background:linear-gradient(130deg,#fffaf2 45%,#d9efdf 45% 70%,#dfcdec 70%)!important}
@media(max-width:480px){html body #app .block{min-height:61px!important;padding:10px!important}html body #app .block strong{font-size:14px!important}html body #app .block small{font-size:10px!important}.memory-book-intro img,.book-intro>img{max-height:105px!important}.mode-settings-dialog{width:calc(100vw - 12px);height:calc(100dvh - 12px);max-height:calc(100dvh - 12px);border-radius:13px}.mode-settings-dialog>header{padding:12px}.mode-settings-dialog h2{font-size:19px}.mode-settings-body{padding:12px}.mode-field{grid-template-columns:minmax(0,1fr) 110px;font-size:12px}.mode-settings-tabs{padding:8px;gap:4px}.mode-settings-tabs button{font-size:11px;padding:7px 8px}.mode-settings-dialog>footer{padding:9px 12px}.mode-settings-button{font-size:12px}.memory-book-intro h1,.book-intro h1{font-size:23px!important}}

html body #app #main-content>.block{border:1px solid var(--line)!important;border-radius:12px!important;background:var(--card,var(--field))!important;margin-bottom:9px!important}

html[data-theme="kawaii"] body #app :is(.question-label,.book-n,.eyebrow,.ps-kicker,.memory-preview-label,.reading-subject,.reader-location,.cpu-exam-map summary,.small-copy,.subtitle){color:#587066!important;-webkit-text-fill-color:#587066!important}
html[data-theme="kawaii"] .mode-settings-button,html[data-theme="kawaii"] .highlight-edit-button{background:#edf7f0!important;border-color:#bfd6ca!important;color:#315e50!important}

html[data-theme="kawaii"] .study-mode-quiz .study-mode-art,html[data-theme="kawaii"] .ps-catalog-icon{background:#edf8f1 url('kawaii-apuntes.png') center/68px auto no-repeat!important}html[data-theme="kawaii"] .study-mode-quiz .study-mode-art svg,html[data-theme="kawaii"] .ps-catalog-icon svg{opacity:0}
html[data-theme="kawaii"] :is(.mode-settings-dialog>header,.ps-settings-head)>div{position:relative;flex:1;min-width:0;padding-right:47px}html[data-theme="kawaii"] :is(.mode-settings-dialog>header,.ps-settings-head)>div::after{content:'';position:absolute;right:-4px;top:-2px;width:52px;height:46px;background:url('kawaii-apuntes.png') center/76px auto no-repeat;pointer-events:none}

html[data-theme="kawaii"] #app .top-actions>button,html[data-theme="kawaii"] #app .block svg{color:#76589b!important;-webkit-text-fill-color:#76589b!important}html[data-theme="kawaii"] #app .top-actions>button svg{stroke:currentColor!important}
@media(max-width:480px){.mode-field:has(select){grid-template-columns:minmax(0,1fr);gap:5px}.mode-field select{font-size:14px}}
