/* Approved C — Modern Library. Shared learner presentation; no studio overrides. */
html[data-theme="light"][data-appearance="matcha"]{--bg:#faf9f5;--panel:#fcfbf7;--text:#222b25;--muted:#737c70;--line:#d8ddcf;--accent:#526746;--appearance-tint:#edf0e5;--appearance-hover:#e4eadb;--appearance-primary-hover:#405637}
.portal-shell{--library-photo:url('assets/library/library-side.webp');--library-paper:var(--bg);--cinema-shadow:none}
html[data-appearance] .portal-shell{background:var(--bg);font-family:'Source Sans 3',Arial,sans-serif;font-size:20px;line-height:1.5;position:relative;isolation:isolate;min-height:100vh}
.portal-shell::before{content:none;position:absolute;z-index:-1;left:0;top:86px;bottom:0;width:clamp(110px,14vw,210px);background:var(--library-photo) center top/auto 960px no-repeat;pointer-events:none}
/* A decorative rail is opt-in: only mounted pages that reserve its column. */
.portal-shell:where([data-library-page]:has(>.portal-page):not(.startup-shell))::before{content:''}
html[data-appearance] .portal-shell .portal-header{background:var(--bg);border-bottom:1px solid var(--line);padding:0 3.5%;height:86px;min-height:86px;gap:34px;box-shadow:none}
html[data-appearance] .portal-shell .portal-header .brand{font-size:clamp(27px,2.5vw,38px);font-family:'PT Serif',Georgia,serif;letter-spacing:-1.2px}
html[data-appearance] .portal-shell .portal-header .brand-logo{height:44px;width:44px;filter:grayscale(1) sepia(.3) hue-rotate(48deg) brightness(.67)}
html[data-appearance] .portal-shell .portal-nav{gap:25px;height:86px;align-items:stretch;margin-left:auto}
html[data-appearance] .portal-shell .portal-nav a{font-size:20px;font-weight:500;display:flex;align-items:center;border-bottom-width:3px;padding:10px 4px;white-space:nowrap}
html[data-appearance] .portal-shell .portal-nav a.active{font-weight:600;border-bottom-width:3px}
.portal-shell .portal-header-actions{gap:22px;margin-left:20px}
.portal-shell .cinema-help-link{font-size:19px;color:var(--text)}
html[data-appearance] .portal-shell .portal-user-menu summary{border:0;border-radius:0;background:none;font-size:20px;max-width:190px;padding:10px 0}
.portal-shell .portal-user-menu summary::before{content:'●';background:var(--appearance-tint);color:var(--accent);border-radius:50%;height:40px;min-width:40px;display:grid;place-items:center;margin-right:8px;font-size:23px}
html[data-appearance] .portal-shell .portal-page{max-width:1536px;padding:42px 48px 0 max(48px,calc(clamp(110px,14vw,210px) + 36px));margin:0 auto;min-height:calc(100vh - 86px);background:transparent}
html[data-appearance] .portal-shell :is(h1,h2,h3){font-weight:400;letter-spacing:-.025em;color:var(--text)}
html[data-appearance] .portal-shell h1{font-size:clamp(34px,3.4vw,52px);line-height:1.17;margin-bottom:18px}
html[data-appearance] .portal-shell h2{font-size:clamp(27px,2.35vw,35px);line-height:1.24}
html[data-appearance] .portal-shell h3{font-family:'Source Sans 3',Arial,sans-serif;font-size:25px;line-height:1.3;font-weight:600;letter-spacing:0}
.portal-shell :is(.page-heading,.journey-heading) p{font-size:22px;line-height:1.55;max-width:70ch;color:var(--muted)}
.portal-shell :is(.journey-eyebrow,.eyebrow){font-size:13px;letter-spacing:.17em;color:var(--accent)}
html[data-appearance] .portal-shell :is(.panel,.journey-current-material,.journey-book,.journey-next-action,.journey-progress-lesson,.journey-progress-book,.catalog-card){border-radius:4px;box-shadow:none;background:var(--panel);border-color:var(--line)}
html[data-appearance] .portal-shell :is(.btn,.scope-choice,.phrase-audio,.chip){border-radius:4px}
html[data-appearance] .portal-shell .btn{font-size:20px;font-weight:500;padding:14px 23px;min-height:53px;line-height:1.25}
.portal-shell .btn.primary{font-weight:600}
.portal-shell :is(input:not([type=checkbox]):not([type=radio]),select,textarea){border-radius:4px;border-color:#bdc7b2;font-family:inherit;font-size:20px;min-height:56px;background:var(--panel);color:var(--text)}
.portal-shell :is(input[type=checkbox],input[type=radio]){accent-color:var(--accent)}
.portal-shell .text-link{font-size:18px;text-underline-offset:5px}
.portal-shell .help{font-size:16px;line-height:1.55}
.portal-shell .portal-footer{font-size:15px;margin-top:65px;padding:26px 0;border-top:1px solid var(--line);opacity:.9;flex-wrap:wrap}
.portal-shell .portal-footer .brand{font-size:25px}
.portal-shell :is(.back,.catalog-breadcrumbs){font-size:17px;margin-bottom:25px}
/* Registration and existing sign-in methods retain their validated forms. */
.portal-shell.library-entry{--library-content-width:55%}
.portal-shell.library-entry::before{inset:86px 0 0 var(--library-content-width);width:auto;background:url('assets/library/library-entry.webp') center/cover no-repeat}
html[data-appearance] .portal-shell.library-entry .portal-page{width:var(--library-content-width);max-width:none!important;min-width:0;padding:46px clamp(24px,4vw,64px) 0!important;margin:0!important;background:var(--bg)!important;border-radius:0}
html[data-appearance] .portal-shell .account-entry-card{max-width:565px;width:100%;min-width:0;margin:0 auto;padding:12px 0 35px;border:0;background:transparent;box-shadow:none;border-radius:0}
.portal-shell .account-entry-card h1{font-size:clamp(42px,4.2vw,65px);letter-spacing:-.035em}
.portal-shell .library-entry-tagline{font-size:25px;line-height:1.5;margin:10px 0 27px;color:var(--muted)}
.portal-shell .account-entry-tabs{margin:24px 0;border-bottom:1px solid var(--line);gap:30px}
.portal-shell .account-entry-tabs a{background:none!important;border:0!important;border-bottom:2px solid transparent!important;border-radius:0!important;padding:10px 0!important;font-size:21px}
.portal-shell .account-entry-tabs a[aria-current]{border-bottom-color:var(--accent)!important;color:var(--accent)}
.portal-shell .account-login-pane form{gap:18px}
.portal-shell .account-entry-card .account-field{font-size:21px}
.portal-shell .account-entry-card :is(.account-method-link,.account-entry-intro){font-size:18px}
.portal-shell.library-entry .portal-footer{max-width:565px;margin-inline:auto}
/* Home mirrors the approved left photo / lesson / progress composition. */
.portal-shell[data-library-page=home] .portal-page,.portal-shell[data-library-page=lessons]:has(.cinema-dashboard-grid) .portal-page{padding-top:37px}
.portal-shell .journey-heading{margin-bottom:30px;align-items:flex-start;gap:20px}
.portal-shell .journey-heading>.btn{font-size:17px;white-space:nowrap;min-height:46px}
.portal-shell .cinema-dashboard-grid{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:33px}
html[data-appearance] .portal-shell .journey-resume{padding:24px;grid-template-columns:205px minmax(0,1fr);gap:22px;background:var(--panel)}
.portal-shell .journey-resume-cover{grid-row:1 / span 2;align-self:start}
.portal-shell .journey-resume-cover .catalog-cover{width:100%;height:278px;aspect-ratio:auto;border-radius:2px;box-shadow:3px 4px 8px #35402b18}
.portal-shell .journey-resume-cover .catalog-cover img{object-fit:cover}
.portal-shell .journey-resume-action{grid-column:2;gap:13px}
.portal-shell .journey-resume-book-title{font:32px 'PT Serif',Georgia,serif!important}
.portal-shell .journey-resume-path{font-size:17px}
.portal-shell .journey-resume-lesson{margin:13px 0 6px;font-size:23px}
.portal-shell .journey-resume-bars{gap:12px;margin-top:20px}
.portal-shell .journey-progress-label{font-size:17px}
.portal-shell .journey-progress-track{height:8px;background:#e1e5db;border-radius:8px}
.portal-shell .journey-progress-track>span{background:#71895d;border-radius:8px}
.portal-shell .journey-resume-help{font-size:15px;line-height:1.45}
.portal-shell .journey-material-footer{font-size:15px;padding:15px 24px}
.portal-shell .journey-material-footer .text-link{font-size:15px}
.portal-shell .journey-contents{padding:15px 24px;font-size:17px}
.portal-shell .journey-contents p{font-size:17px}
html[data-appearance] .portal-shell .cinema-progress-aside{border:0;border-left:1px solid var(--line);background:transparent;border-radius:0;padding:0 0 0 28px;box-shadow:none;position:static}
.portal-shell .cinema-progress-aside h2{font-size:29px}
.portal-shell .cinema-progress-aside .journey-resume-progress{margin:27px 0 10px}
.portal-shell .cinema-progress-aside .journey-progress-label{gap:10px;align-items:flex-start}
.portal-shell .cinema-progress-aside hr{margin:27px 0;border:0;border-top:1px solid var(--line)}
.library-rail-photo{display:block;width:100%;height:315px;object-fit:cover;object-position:center 65%;margin-top:28px;border-radius:2px}
.portal-shell .journey-next-action{padding:25px 26px 25px 87px;margin-top:24px;position:relative;background:var(--appearance-tint)!important;display:grid;grid-template-columns:1fr auto;gap:10px 20px;align-items:center}
.portal-shell .journey-next-action::before{content:'↻';font:40px 'PT Serif',serif;color:var(--accent);position:absolute;left:27px;top:38px}
.portal-shell .journey-next-action .journey-eyebrow{grid-column:1}.portal-shell .journey-next-action h2{font:25px 'Source Sans 3',Arial,sans-serif;font-weight:600;margin:0;grid-column:1}
.portal-shell .journey-next-action p{font-size:17px;grid-column:1;margin:0}
.portal-shell .journey-next-action>.btn{grid-column:2;grid-row:1 / span 3;white-space:nowrap;font-size:18px}
.portal-shell .journey-books{gap:23px}.portal-shell .journey-book{padding:22px;gap:23px}.portal-shell .journey-book .catalog-cover{max-width:130px;border-radius:2px}
.portal-shell .journey-section{margin-top:35px}
/* Catalogue: real cover images remain real; only absent covers receive illustrated artwork. */
.portal-shell .catalog-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:35px}
.portal-shell .catalog-card{border:0!important;padding:0!important;background:transparent!important;box-shadow:none!important;overflow:visible}
.portal-shell .catalog-cover{border-radius:2px;box-shadow:3px 5px 10px #3c452220;background:#f0eee3;border-left:5px solid #bdc6ac55}
.portal-shell .catalog-card .catalog-cover{height:auto;aspect-ratio:2/3;max-height:410px}
.portal-shell .catalog-cover img{width:100%;height:100%;object-fit:cover}
.portal-shell .catalog-cover-placeholder{position:relative;overflow:hidden;min-height:220px;padding:25px;background:var(--appearance-tint)}
.portal-shell .catalog-cover-placeholder::before{content:'';position:absolute;inset:0;background:url('assets/library/cover-a1.webp') center/cover;z-index:0}
.portal-shell .catalog-cover-placeholder>*{position:relative;z-index:1;color:#324b2d}.portal-shell .catalog-cover-placeholder strong{font:30px/1.15 'PT Serif',Georgia,serif}.portal-shell .catalog-cover-placeholder small{align-self:end;background:#f7f5ecd9;padding:5px 8px}
.portal-shell .catalog-card:nth-child(3n+2) .catalog-cover-placeholder::before{background-image:url('assets/library/cover-a2.webp')}.portal-shell .catalog-card:nth-child(3n+3) .catalog-cover-placeholder::before{background-image:url('assets/library/cover-b1.webp')}
.portal-shell .catalog-card h3{font-size:27px;margin-top:20px}.portal-shell .catalog-card p{font-size:19px}
.portal-shell :is(.catalog-discovery,.catalog-filter-list){border-radius:0;background:transparent;padding-left:0;padding-right:0}
.portal-shell .catalog-discovery{margin-bottom:30px;border-bottom:1px solid var(--line);padding-bottom:24px}
.portal-shell .catalog-search input{max-width:580px}.portal-shell .catalog-filter{border-radius:4px;padding:9px 16px;font-size:17px}
.portal-shell .catalog-book-hero{border:0;background:transparent;gap:38px}.portal-shell .catalog-book-hero .catalog-cover{max-width:310px}
/* Onboarding, self-selected level and the existing optional assessment. */
.portal-shell[data-library-page=welcome]{--library-content-width:68%}
.portal-shell[data-library-page=welcome]::before{left:var(--library-content-width);right:0;width:auto;background:url('assets/library/library-entry.webp') center/cover no-repeat}
html[data-appearance] .portal-shell[data-library-page=welcome] .portal-page{width:var(--library-content-width);max-width:none;margin:0;padding:42px clamp(24px,3.5vw,64px) 0;background:var(--bg)}
.portal-shell .journey-onboarding{max-width:none;margin:0;padding:5px 0 25px;border:0;background:transparent;border-radius:0}
.portal-shell .cinema-start-paths{grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));gap:19px;margin:35px 0}.portal-shell .cinema-start-paths button{min-height:300px;align-content:start;text-align:center;justify-items:center;border-radius:4px;background:#fafbf6ed;padding:28px 22px}
.portal-shell .cinema-start-paths button::before{content:'▤';border-radius:50%;width:76px;height:76px;background:var(--appearance-tint);color:var(--accent);font-size:35px;display:grid;place-items:center;margin-bottom:8px}
.portal-shell .cinema-start-paths button:nth-child(2)::before{content:'❧'}.portal-shell .cinema-start-paths button:nth-child(3)::before{content:'▥'}
.portal-shell .cinema-start-paths strong{font-size:23px}.portal-shell .cinema-start-paths span{font-size:19px}.portal-shell .placement-answers{gap:16px}.portal-shell .journey-level-option{border-radius:4px}
/* Lesson selection and phrase table. The native controls retain their data attributes. */
.portal-shell[data-library-page=lesson]:not(.library-block-view)::before{display:none}
html[data-appearance] .portal-shell[data-library-page=lesson]:not(.library-block-view) .portal-page{padding-left:4%;padding-right:4%}
.portal-shell .library-block-link{display:inline-flex;margin:3px 0 24px}
.portal-shell .cinema-blocks{padding:0;border:0;margin:0 0 30px}.portal-shell .cinema-blocks>p{font-size:22px}
.portal-shell .cinema-block-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;margin-top:30px}
.portal-shell .cinema-block-grid>button{border-radius:4px;padding:30px;text-align:left;min-height:245px;background:var(--panel);display:flex;flex-direction:column;gap:17px}
.portal-shell .cinema-block-grid>button strong{font-size:29px;font-family:'PT Serif',Georgia,serif;font-weight:400}
.portal-shell .cinema-block-grid>button span{font-size:19px}.portal-shell .cinema-block-grid>button[aria-pressed=true]{background:var(--appearance-tint);border-color:var(--accent)}
.portal-shell .library-block-examples{font-size:21px!important;line-height:1.6;color:var(--muted);font-family:'Source Sans 3',sans-serif}
.portal-shell .scope-picker{padding:0 0 20px;border:0!important;background:transparent!important;margin-top:10px}.portal-shell .scope-picker>div:first-child h2{font:25px 'Source Sans 3',Arial,sans-serif}.portal-shell .scope-picker>div:first-child p{font-size:18px}
.portal-shell .scope-options{display:flex;gap:12px;flex-wrap:wrap;margin-top:20px}.portal-shell .scope-choice{min-height:58px!important;padding:13px 20px!important;width:auto;flex:1;background:transparent}
.portal-shell .scope-choice-heading{gap:14px}.portal-shell .scope-choice-title{font-size:19px}.portal-shell .scope-choice-count{font-size:17px}.portal-shell .scope-choice-description{display:none}.portal-shell .scope-picker>small{font-size:16px}
.portal-shell .lesson-stage-toolbar{margin:25px 0;gap:14px}.portal-shell .steps a{font-size:17px;border-radius:4px;padding:13px 20px}
.portal-shell .lesson-overview-layout{grid-template-columns:minmax(0,1fr) 310px;gap:33px}
.portal-shell .lesson-phrase-panel{padding:26px;border-radius:4px;background:var(--panel)}
.portal-shell .lesson-phrases-heading h2{font-size:31px}.portal-shell .lesson-phrases-heading p{font-size:18px}
.portal-shell .lesson-phrase-table th{font-size:13px;font-weight:500;color:var(--muted);padding:14px 8px}
.portal-shell .lesson-phrase-table td{padding:23px 8px}.portal-shell .phrase-copy>span{font-size:24px;line-height:1.4}.portal-shell .phrase-copy p{font-size:19px;line-height:1.4;color:var(--muted);font-weight:400}
.portal-shell .phrase-metric{width:95px}.portal-shell .phrase-metric small{font-size:12px}.portal-shell .phrase-audio{font-size:16px!important;padding:8px 10px!important;min-width:56px}
.portal-shell .lesson-progress-card{padding:26px;background:var(--appearance-tint)!important}.portal-shell .lesson-progress-card h2{font-size:29px}.portal-shell .lesson-progress-metric h3{font-size:20px}.portal-shell .lesson-progress-note{font-size:16px}
/* Learning workspace: book contents on the left, task in the middle, progress on the right. */
.portal-shell:is([data-library-page=memorize],[data-library-page=practice],[data-library-page=exercise],[data-library-page=session])::before{display:none}
html[data-appearance] .portal-shell:is([data-library-page=memorize],[data-library-page=practice],[data-library-page=exercise],[data-library-page=session]) .portal-page{padding:27px 35px 0;background:var(--bg)}
.portal-shell .memory-page{max-width:none}.portal-shell .memory-topline{margin-bottom:20px}.portal-shell .memory-lesson-nav{padding-bottom:22px;border-bottom:1px solid var(--line)}
.portal-shell .memory-layout{grid-template-columns:265px minmax(0,1fr) 250px;gap:28px;margin-top:26px;align-items:start}
.portal-shell .memory-workspace{grid-column:2;grid-row:1;border:0!important;border-radius:0;padding:20px 20px 35px;background:#fcfbf7ed;min-width:0}
.portal-shell .memory-sidebar{grid-column:3;grid-row:1;position:static;padding:22px 0 22px 25px;border:0;border-left:1px solid var(--line);border-radius:0;background:transparent}
.portal-shell .memory-sidebar h1{font:28px 'PT Serif',Georgia,serif}.portal-shell .memory-sidebar p{font-size:17px}.portal-shell .memory-stages li{padding:16px 9px;font-size:17px}.portal-shell .memory-stage{font-size:17px}.portal-shell .memory-stage strong{font-size:19px}
.library-study-nav{grid-column:1;grid-row:1;min-width:0;border-right:1px solid var(--line);padding:15px 22px 25px 0}
.library-study-book{display:flex;gap:16px;align-items:center;padding:15px;background:var(--appearance-tint);border-radius:4px;text-decoration:none;margin-bottom:25px}
.library-study-book>.catalog-cover,.library-study-book>img{width:82px;height:111px;flex-shrink:0;object-fit:cover;border-radius:2px}.library-study-book strong{font-size:19px;display:block}.library-study-book span{display:block;font-size:17px;color:var(--muted);margin-top:7px}.library-study-book .catalog-cover-placeholder{min-height:111px!important;padding:8px!important}.library-study-book .catalog-cover-placeholder strong{font-size:13px!important}.library-study-book .catalog-cover-placeholder :is(span,small){display:none}
.library-study-nav nav>a{display:flex;align-items:center;gap:14px;padding:20px 9px;border-bottom:1px solid var(--line);font-size:19px;text-decoration:none}.library-study-nav nav>a small{display:block;color:var(--muted);font-size:16px}.library-study-nav nav>a>span:last-child{margin-left:auto}.library-page-icon{color:var(--accent);font-size:26px}
.portal-shell .cycle-repeat-cards{display:grid;grid-template-columns:1fr;gap:22px}.portal-shell .cycle-repeat-card{border:1px solid var(--line);border-radius:4px;padding:25px;background:var(--panel)}
.portal-shell .cycle-repeat-card.cycle-phrase-card{background:var(--appearance-tint);text-align:center}.portal-shell .cycle-repeat-card>header{border:0;display:none}.portal-shell .cycle-repeat-card:not(.cycle-phrase-card)>header{display:block}.portal-shell .cycle-repeat-card:not(.cycle-phrase-card)>header .cycle-card-number{display:none}
.portal-shell .cycle-source{font-size:clamp(28px,2.65vw,41px);line-height:1.35}.portal-shell .cycle-translation{font-size:24px;font-weight:400;line-height:1.4;color:var(--muted)}
.portal-shell .cycle-audio-options{justify-content:center;gap:12px}.portal-shell .cycle-audio-options .btn{min-height:42px;padding:9px 14px;font-size:17px}
.portal-shell .cycle-instruction h2{font-size:38px}.portal-shell .cycle-instruction p{font-size:22px}.portal-shell .cycle-counter,.portal-shell .memory-counter{font-size:17px}
.portal-shell .recall-cards.knowledge-cards{display:block}.portal-shell .knowledge-card:not(.is-active){display:none}.portal-shell .knowledge-card.is-active{border:0;border-radius:4px;background:transparent;padding:0}
.portal-shell .knowledge-card.is-active>header{padding:20px 0}.portal-shell .knowledge-card.is-active>header .recall-number{display:none}.portal-shell .knowledge-card h3{font:36px 'PT Serif',Georgia,serif;font-weight:400}
.portal-shell .recall-body{padding:20px 0}.portal-shell .recall-prompt{font-size:32px}.portal-shell .recall-cards{gap:18px}.portal-shell .recall-card{border-radius:4px}
.portal-shell .cinema-timer{border-radius:4px;background:#fcfbf7;border-color:var(--line);padding:15px 24px}.portal-shell [data-learning-reminder]:not([hidden]){background:#fbf0d7;border:0;border-radius:4px;margin:8px -8px -4px;padding:24px;font-size:21px}.portal-shell [data-learning-reminder]>span{font-size:18px}
.library-session-layout{display:grid;grid-template-columns:275px minmax(0,850px);gap:42px;max-width:1320px;margin:0 auto}.portal-shell .cinema-session-setup{padding:25px 10px!important;border:0!important;background:transparent!important;margin:0;max-width:none}.portal-shell .cinema-session-setup>p{font-size:23px}.portal-shell .cinema-options{gap:17px}.portal-shell .cinema-options label{border-radius:4px;padding:21px;font-size:21px}.portal-shell .cinema-options small{font-size:17px}
.portal-shell .cinema-fields label{font-size:20px}.portal-shell .cinema-session-result{padding:36px!important;border-radius:4px}.portal-shell .cinema-result-grid>div{border-radius:4px;background:var(--appearance-tint);padding:28px}
/* Results use three separate measures with their actual denominators. */
.portal-shell[data-library-page=progress]::before{display:none}html[data-appearance] .portal-shell[data-library-page=progress] .portal-page{padding-left:4%;padding-right:4%}
.portal-shell .journey-progress-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:25px;padding:0;border:0;background:none}
.portal-shell .journey-progress-summary>div{display:flex;flex-direction:column;align-items:center;text-align:center;padding:26px;border:1px solid var(--line);background:var(--panel);border-radius:4px;min-width:0}
.portal-shell .journey-progress-summary h2{font-size:28px}.portal-shell .library-ring{width:146px;height:146px;margin:22px auto;border-radius:50%;background:conic-gradient(#71885c var(--library-value),#e0e4d9 0);display:grid;place-items:center}
.portal-shell .library-ring>strong{width:124px;height:124px;background:var(--panel);border-radius:50%;display:flex;justify-content:center;align-items:center;font-size:35px;font-weight:400;gap:5px;color:var(--text)}
.portal-shell .library-ring>strong small{font-size:23px}.portal-shell .journey-progress-summary>div>span{font-size:20px}.portal-shell .library-metric-description{font-size:17px;line-height:1.5;color:var(--muted);margin-top:12px}
.portal-shell .cinema-retention{background:var(--appearance-tint)!important;padding:26px;border-radius:4px}.portal-shell .journey-progress-lesson{padding:28px}.portal-shell .journey-progress-lesson .journey-resume-bars{margin-top:26px}
.portal-shell .journey-week-days>div{border-radius:4px}.portal-shell .journey-week-days .is-active{background:var(--appearance-tint);border-color:#a9b99a}
/* Settings use calm horizontal rows. Help is searchable and grouped by topic. */
.portal-shell .account-settings-nav{border-bottom:1px solid var(--line);padding-bottom:16px;margin:25px 0;gap:22px;flex-wrap:wrap}.portal-shell .account-settings-nav a{font-size:20px;border-radius:0;background:none;padding:12px 0}
.portal-shell .cinema-settings{border:0!important;background:transparent!important;padding:20px 0!important;margin:0 0 35px;max-width:930px}
.portal-shell .cinema-settings .cinema-fields{display:block;margin-top:23px}.portal-shell .cinema-settings .cinema-fields>label{display:grid;grid-template-columns:1fr 250px;gap:30px;align-items:center;border-bottom:1px solid var(--line);padding:22px 0;font-size:23px}.portal-shell .cinema-settings .cinema-fields select{width:100%}
.portal-shell .cinema-checkbox{padding:20px 0;font-size:22px}.portal-shell .cinema-checkbox input{width:23px;height:23px}
.portal-shell .cinema-help>h1{font-size:50px}.portal-shell .cinema-help-grid{grid-template-columns:1fr;gap:0;margin-top:32px}.portal-shell .cinema-help-grid article{padding:23px 0;border:0!important;border-top:1px solid var(--line)!important;border-radius:0;background:transparent!important;scroll-margin-top:110px}.portal-shell .cinema-help-grid h2{font-family:'Source Sans 3',Arial,sans-serif;font-size:26px!important;font-weight:600}.portal-shell .cinema-help-grid p{font-size:20px;margin:14px 0}
.library-help-search{display:block;margin-top:30px}.library-help-search input{width:100%}.library-help-categories{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin-top:24px}.library-help-categories button{font:21px 'Source Sans 3',sans-serif;text-align:left;color:var(--text);background:var(--appearance-tint);border:1px solid var(--line);border-radius:4px;padding:23px;min-height:97px;cursor:pointer}
.portal-shell .grammar-page :is(.panel,article),.portal-shell .vocabulary-page :is(.panel,article){border-radius:4px}.portal-shell .grammar-page h1,.portal-shell .vocabulary-page h1{font-size:47px}
.portal-shell .scene{background:url('assets/library/library-side.webp') center 66%/cover;border-radius:2px;min-height:180px}
.portal-shell :is(.notice,.feedback,.answer-comparison,.memory-finish){border-radius:4px}
html[data-appearance] .portal-shell .memory-sidebar h1{font:28px/1.25 'PT Serif',Georgia,serif;letter-spacing:-.025em;overflow-wrap:normal}
@media(max-width:600px){html[data-appearance] .portal-shell .journey-resume-cover{grid-column:1;grid-row:1;order:0}html[data-appearance] .portal-shell .journey-resume-copy{grid-column:2;grid-row:1;display:block;order:0}html[data-appearance] .portal-shell .journey-resume-action{grid-column:1/-1;grid-row:2;padding:0;border:0}html[data-appearance] .portal-shell .journey-resume-book-title{overflow-wrap:normal;font-size:24px!important}html[data-appearance] .portal-shell .journey-resume-bars{margin-top:22px}.portal-shell .journey-resume-copy .journey-eyebrow{display:block}.portal-shell .journey-resume-rich .journey-resume-help{font-size:13px}}
.portal-shell .memory-sidebar,.library-study-nav{background:color-mix(in srgb,var(--bg) 94%,transparent)}
.portal-shell .knowledge-card.is-active{display:block!important}
.portal-shell .knowledge-card.is-active>header{border-right:0;border-bottom:1px solid var(--line)}
.portal-shell .knowledge-card.is-active .recall-body{padding:25px 0}
html[data-appearance] .portal-shell .account-entry-card>h1,.portal-shell .library-entry-tagline{text-align:left}
html[data-theme=dark] .portal-shell::before{opacity:.2}html[data-theme=dark] .portal-shell.library-entry::before{opacity:.2}html[data-theme=dark] .portal-shell :is(.memory-workspace,.cinema-start-paths button){background:var(--panel)}
@media(min-width:1700px){.portal-shell::before{width:calc((100vw - 1536px)/2 + 185px);background-size:cover}html[data-appearance] .portal-shell .portal-page{padding-left:225px}}
@media(max-width:1250px){html[data-appearance] .portal-shell .portal-header{gap:20px;padding:0 25px}.portal-shell .portal-header-actions{gap:14px;margin-left:0}html[data-appearance] .portal-shell .portal-nav{gap:20px}html[data-appearance] .portal-shell .portal-nav a{font-size:18px}.portal-shell .cinema-dashboard-grid{grid-template-columns:minmax(0,1fr) 240px;gap:25px}html[data-appearance] .portal-shell .journey-resume{grid-template-columns:135px minmax(0,1fr);gap:18px}.portal-shell .journey-resume-cover .catalog-cover{height:210px}.portal-shell .memory-layout{grid-template-columns:210px minmax(0,1fr) 210px;gap:20px}.portal-shell .memory-workspace{padding:18px 5px}.library-study-nav{padding-right:16px}.library-study-book{flex-direction:column;align-items:flex-start}.portal-shell .phrase-metric{width:70px}.portal-shell .lesson-overview-layout{grid-template-columns:1fr;gap:24px}.portal-shell .lesson-overview-sidebar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.portal-shell .lesson-progress-card{grid-row:span 3}.portal-shell .lesson-overview-sidebar .library-rail-photo{height:245px}.portal-shell .cinema-start-paths button{padding:24px 15px}.portal-shell .cinema-help-link{font-size:17px}}
@media(max-width:1050px){.portal-shell.library-entry,.portal-shell[data-library-page=welcome]{--library-content-width:100%}.portal-shell.library-entry::before{display:none}.portal-shell::before{width:110px}html[data-appearance] .portal-shell .portal-page{padding-left:142px;padding-right:28px}.portal-shell .cinema-dashboard-grid{grid-template-columns:minmax(0,1fr)}.portal-shell .cinema-progress-aside{display:grid;grid-template-columns:1fr 1fr;gap:15px 25px;border-left:0!important;border-top:1px solid var(--line)!important;padding:28px 0!important}.portal-shell .cinema-progress-aside h2{grid-column:1 / -1}.portal-shell .cinema-progress-aside .library-rail-photo{display:none}.portal-shell .cinema-progress-aside hr{display:none}.portal-shell .catalog-grid{gap:22px}.portal-shell .memory-layout{grid-template-columns:minmax(0,1fr) 225px}.library-study-nav{display:none}.portal-shell .memory-workspace{grid-column:1}.portal-shell .memory-sidebar{grid-column:2}.library-session-layout{grid-template-columns:1fr}.portal-shell .lesson-overview-layout{grid-template-columns:1fr}.portal-shell .lesson-overview-sidebar{display:grid;grid-template-columns:1fr 1fr;gap:20px}.portal-shell .lesson-progress-card{grid-row:span 3}.portal-shell .lesson-overview-sidebar .library-rail-photo{height:245px}.portal-shell .cinema-help-link{display:none}.portal-shell .portal-header .portal-nav{gap:14px!important}.portal-shell .catalog-cover-placeholder strong{font-size:24px}html[data-appearance] .portal-shell[data-library-page=welcome] .portal-page{padding-left:5%;padding-right:5%;background:var(--bg)}.portal-shell[data-library-page=welcome]::before{display:none}}
@media(max-width:820px){.portal-shell::before{display:none}html[data-appearance] .portal-shell .portal-page{padding:28px 24px 0}.portal-shell .catalog-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.portal-shell .journey-progress-summary{grid-template-columns:1fr}.portal-shell .journey-progress-summary>div{display:grid;grid-template-columns:130px 1fr;text-align:left;gap:10px 22px}.portal-shell .journey-progress-summary h2{grid-column:2;margin:0}.portal-shell .library-ring{grid-column:1;grid-row:1 / span 3;width:122px;height:122px;margin:0}.portal-shell .library-ring>strong{width:104px;height:104px;font-size:30px}.portal-shell .library-metric-description{margin:0}.portal-shell .memory-layout{display:flex;flex-direction:column}.portal-shell .memory-workspace{width:100%;padding:22px}.portal-shell .memory-sidebar{width:100%;order:2;border-left:0;border-top:1px solid var(--line);padding:22px}.portal-shell .memory-stages{display:flex;gap:15px;flex-wrap:wrap}.portal-shell .library-help-categories{grid-template-columns:repeat(2,minmax(0,1fr))}.portal-shell .cinema-start-paths{grid-template-columns:1fr}.portal-shell .cinema-start-paths button{min-height:0;display:grid;grid-template-columns:70px 1fr;text-align:left;justify-items:start;gap:6px 22px}.portal-shell .cinema-start-paths button::before{grid-row:span 2;width:65px;height:65px;margin:0}.portal-shell .cinema-start-paths strong{align-self:end}html[data-appearance] .portal-shell .account-entry-card{width:100%;max-width:560px;min-width:0;background:var(--bg);padding:25px}.portal-shell.library-entry .portal-footer{background:var(--bg)}}
@media(max-width:600px){html[data-appearance] .portal-shell .portal-header{min-height:76px;height:auto;padding:14px 16px;gap:12px}html[data-appearance] .portal-shell .portal-header .brand{font-size:27px}.portal-shell .portal-header .brand-logo{width:34px!important;height:34px!important}.portal-shell .portal-header-actions{gap:10px}.portal-shell .portal-user-menu summary::before{display:none}html[data-appearance] .portal-shell .portal-user-menu summary{font-size:17px;padding:8px 0;max-width:120px}.portal-shell .menu-toggle{padding:9px 12px!important;min-height:42px!important;font-size:16px!important}html[data-appearance] .portal-shell .portal-page,html[data-appearance] .portal-shell:is([data-library-page=memorize],[data-library-page=practice],[data-library-page=exercise],[data-library-page=session]) .portal-page{padding:25px 16px 0}.portal-shell h1{font-size:35px!important}.portal-shell .journey-heading{display:block}.portal-shell .journey-heading>.btn{margin-top:17px}.portal-shell .journey-heading p{font-size:20px}html[data-appearance] .portal-shell .journey-resume{grid-template-columns:85px minmax(0,1fr)!important;padding:20px;gap:16px!important}.portal-shell .journey-resume-cover .catalog-cover{height:127px}.portal-shell .journey-resume-cover{grid-row:1}.portal-shell .journey-resume-action{grid-column:1 / -1}.portal-shell .journey-resume-book-title{font-size:25px!important}.portal-shell .journey-resume-copy .journey-eyebrow{font-size:11px}.portal-shell .journey-resume-bars{margin-left:0}.portal-shell .journey-next-action{display:block;padding:22px 22px 22px 61px}.portal-shell .journey-next-action::before{left:18px;top:25px;font-size:32px}.portal-shell .journey-next-action p{margin:12px 0}.portal-shell .journey-next-action>.btn{margin-top:12px}.portal-shell .cinema-progress-aside{display:block}.portal-shell .catalog-grid{gap:22px 17px}.portal-shell .catalog-card .catalog-cover{max-height:290px}.portal-shell .catalog-card h3{font-size:22px}.portal-shell .catalog-cover-placeholder{min-height:190px;padding:15px}.portal-shell .catalog-cover-placeholder strong{font-size:21px}.portal-shell .catalog-cover-placeholder>span{font-size:10px}.portal-shell .catalog-card .btn{font-size:16px;padding:11px}.portal-shell .catalog-filter{font-size:15px;padding:7px 10px}.portal-shell .cinema-block-grid{grid-template-columns:1fr}.portal-shell .cinema-block-grid>button{min-height:0;padding:23px}.portal-shell .scope-options{gap:7px}.portal-shell .scope-choice{flex-basis:100%;padding:13px!important}.portal-shell .scope-choice-heading{justify-content:space-between}.portal-shell .lesson-stage-toolbar{display:block}.portal-shell .steps{flex-wrap:wrap;margin-top:15px}.portal-shell .steps a{font-size:15px;padding:10px}.portal-shell .lesson-overview-sidebar{display:block}.portal-shell .lesson-overview-sidebar .library-rail-photo{display:none}.portal-shell .lesson-phrase-panel{padding:20px 12px}.portal-shell .lesson-phrase-table td{padding:12px 6px}.portal-shell .phrase-copy>span{font-size:21px}.portal-shell .phrase-copy p{font-size:18px}.portal-shell .phrase-metric{width:auto}.portal-shell .lesson-phrases-heading h2{font-size:27px}.portal-shell .memory-workspace{padding:18px 5px}.portal-shell .memory-sidebar{padding:22px 0}.portal-shell .cycle-repeat-card{padding:21px 18px}.portal-shell .cycle-source{font-size:29px}.portal-shell .cycle-translation{font-size:21px}.portal-shell .knowledge-card h3{font-size:29px}.portal-shell .cinema-settings .cinema-fields>label{grid-template-columns:1fr;gap:13px;padding:19px 0;font-size:22px}.portal-shell .cinema-help>h1{font-size:35px}.portal-shell .library-help-categories{gap:13px}.library-help-categories button{font-size:18px;padding:17px;min-height:88px}.portal-shell .journey-progress-summary>div{grid-template-columns:100px 1fr;padding:22px 16px;gap:9px 17px}.portal-shell .journey-progress-summary h2{font-size:23px}.portal-shell .library-ring{width:100px;height:100px}.portal-shell .library-ring>strong{width:86px;height:86px;font-size:24px}.portal-shell .library-ring>strong small{font-size:16px}.portal-shell .journey-progress-summary>div>span{font-size:17px}.portal-shell .library-metric-description{font-size:15px}.portal-shell .account-entry-card{padding:8px 0!important}.portal-shell.library-entry::before{display:none}html[data-appearance] .portal-shell.library-entry .portal-page{padding:26px 22px 0!important}.portal-shell .library-entry-tagline{font-size:23px}.portal-shell .portal-footer{gap:16px}.portal-shell .account-settings-nav a{font-size:18px}}

/* The first visit has one clear action, before any personal results exist. */
.portal-shell .cinema-dashboard-grid.cinema-dashboard-empty{grid-template-columns:minmax(0,1fr)}
.portal-shell .cinema-dashboard-empty .journey-empty{max-width:760px;padding-top:8px}

/* Memorization B: a wide phrase and two distinct listening/recording areas. */
.portal-shell .memory-design-heading{display:flex;justify-content:space-between;align-items:center;gap:24px;margin:28px 0}
.portal-shell .memory-design-heading h1{font-size:50px!important;font-weight:700!important;margin-bottom:12px}
.portal-shell .memory-design-heading p{font-size:21px;display:flex;flex-wrap:wrap;gap:10px 24px}
.portal-shell .memory-design-heading p a{font-size:17px;text-decoration:underline;text-underline-offset:4px}
.portal-shell .memory-design-heading>.btn{font-size:18px;white-space:normal;text-align:center;max-width:390px}
.portal-shell .memory-guided-stages{display:flex;flex-wrap:wrap;gap:16px 30px;margin:20px 0;padding:0;list-style:none}
.portal-shell .memory-guided-stages li{display:block!important;padding:0;margin:0;border:0;background:none}
.portal-shell .memory-guided-stages .memory-stage{display:flex;align-items:center;gap:14px;padding:10px 0;font-size:21px;border:0;background:none;color:var(--muted);text-align:left}
.portal-shell .memory-guided-stages .active .memory-stage{color:var(--accent)}
.portal-shell .memory-guided-stages li::after{display:none}
.portal-shell .memory-guided-stages .memory-stage strong{font:600 20px/1.4 'Source Sans 3',Arial,sans-serif}
.portal-shell .memory-guided-stages .memory-step-number{display:grid;place-items:center;width:40px;height:40px;flex:0 0 40px;border:1px solid var(--line);border-radius:50%;font-size:19px}
.portal-shell .memory-guided-stages .active .memory-step-number{background:var(--accent);color:var(--bg);border-color:var(--accent)}
.portal-shell .memory-layout.memory-guided-layout{display:block;margin-top:0}
.portal-shell .memory-guided .memory-workspace{width:100%;min-width:0;padding:30px!important;background:var(--panel);border:1px solid var(--line)!important;border-radius:8px}
.portal-shell .memory-guided .memory-counter{font-size:20px;margin:0 0 22px}
.portal-shell .memory-guided .cycle-repeat-cards.memory-guided-card{display:block}
.portal-shell .memory-guided .memory-guided-phrase{display:block;padding:0 0 28px;background:none;border:0;border-radius:0;text-align:left}
.portal-shell .memory-guided .cycle-source{font:700 clamp(34px,4.2vw,62px)/1.22 'PT Serif',Georgia,serif;max-width:none;margin:0;color:var(--text);overflow-wrap:anywhere}
.portal-shell .memory-guided .cycle-translation{font:400 clamp(24px,2.5vw,36px)/1.4 'PT Serif',Georgia,serif;margin:16px 0 0;text-align:left;color:var(--muted)}
.portal-shell .memory-guided-controls{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.4fr);gap:32px;border-top:1px solid var(--line);padding-top:28px}
.portal-shell .memory-guided-controls>section{min-width:0}
html[data-appearance] .portal-shell .memory-guided-controls h2{font:600 23px/1.4 'Source Sans 3',Arial,sans-serif;margin:0 0 14px}
.portal-shell .memory-record-zone{border-left:1px solid var(--line);padding-left:32px}
.portal-shell .memory-record-zone>p{font-size:19px;margin:0 0 18px}
.portal-shell .memory-guided .cycle-audio-options{display:flex;gap:14px;flex-wrap:wrap;margin:0;justify-content:flex-start}
html[data-theme][data-appearance] .portal-shell .memory-guided .cycle-audio-options .btn{background:var(--accent);color:var(--bg);display:flex;justify-content:center;align-items:center;gap:12px;min-width:130px;min-height:62px;padding:16px 24px;border-radius:6px}
.portal-shell .memory-guided .cycle-audio-options .btn>span{display:none}
.portal-shell .memory-guided .cycle-audio-options svg{width:24px;height:24px}
.portal-shell .memory-record-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:16px}
.portal-shell .memory-record-controls .memory-recorder{display:flex;flex-direction:column;align-items:stretch;gap:10px;padding:0;margin:0}
.portal-shell .memory-record-controls .memory-recorder-status{order:2;font-size:14px;margin:0;text-align:left}
.portal-shell .memory-record-controls :is(.memory-record-button,.memory-play-own){width:100%;min-height:62px;min-width:0;border-radius:6px;white-space:normal;padding:14px!important;font:600 19px/1.3 'Source Sans 3',Arial,sans-serif}
.portal-shell .memory-record-controls .memory-record-button{background:var(--accent);color:var(--bg);border:1px solid var(--accent)}
.portal-shell .memory-record-controls #cycle-recording-preview{display:grid;gap:10px;text-align:left}
.portal-shell .memory-record-check{margin-top:18px;font-size:16px}.portal-shell .memory-record-check summary{cursor:pointer;text-decoration:underline;text-underline-offset:4px}.portal-shell .memory-record-check p{font-size:15px;margin-top:10px}
.portal-shell .memory-guided-actions{display:flex;justify-content:space-between;align-items:start;gap:22px;border-top:1px solid var(--line);padding-top:24px;margin-top:28px}
.portal-shell .memory-guided-actions>div{display:grid;gap:10px}.portal-shell .memory-guided-actions small{font-size:15px}
.portal-shell .memory-guided-actions>.btn{min-width:190px}
.portal-shell .memory-extras{margin-top:24px;font-size:17px}.portal-shell .memory-extras>summary{cursor:pointer}.portal-shell .memory-extras>.anki-export{margin-top:16px}
@media(max-width:900px){.portal-shell .memory-design-heading{display:block}.portal-shell .memory-design-heading>.btn{margin-top:18px}.portal-shell .memory-guided-controls{grid-template-columns:1fr;gap:26px}.portal-shell .memory-record-zone{border-left:0;border-top:1px solid var(--line);padding:24px 0 0}}
@media(max-width:600px){.portal-shell .memory-design-heading h1{font-size:36px!important}.portal-shell .memory-design-heading p{font-size:19px}.portal-shell .memory-guided-stages{display:grid;gap:8px}.portal-shell .memory-guided-stages .memory-stage{font-size:18px}.portal-shell .memory-guided .memory-workspace{padding:22px 16px!important}.portal-shell .memory-guided .cycle-source{font-size:32px}.portal-shell .memory-guided .cycle-translation{font-size:23px}.portal-shell .memory-guided-actions{flex-direction:column}.portal-shell .memory-guided-actions>.btn,.portal-shell .memory-guided-actions>div{width:100%}.portal-shell .memory-record-controls{grid-template-columns:1fr}.portal-shell .memory-guided .cycle-audio-options .btn{min-width:105px;flex:1}}

/* Phrase list A: the text gets its own line; metrics never compete with audio. */
.portal-shell .lesson-stage-toolbar .steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;width:100%;margin:0}
.portal-shell .lesson-stage-toolbar .steps a{display:flex;align-items:center;justify-content:center;min-height:70px;padding:18px 16px;border:1px solid var(--accent);background:var(--panel);font-size:21px;font-weight:600;text-align:center;line-height:1.3;white-space:normal}
.portal-shell .lesson-stage-toolbar .steps a.current{background:var(--accent);color:var(--panel);box-shadow:inset 0 -4px 0 #0002}
.portal-shell .lesson-stage-toolbar .steps a:focus-visible{outline:3px solid var(--accent);outline-offset:4px}
.portal-shell .lesson-stage-toolbar{position:sticky;top:var(--lesson-header-height,86px);z-index:25;background:var(--bg);padding:10px 0 12px;margin:12px 0 24px;border-bottom:1px solid var(--line);box-shadow:0 8px 12px -12px #2227}
.portal-shell .lesson-overview-sidebar{top:calc(var(--lesson-header-height,86px) + var(--lesson-toolbar-height,93px) + 16px)}
.portal-shell .lesson-phrase-table :is(input,button){scroll-margin-top:calc(var(--lesson-header-height,86px) + var(--lesson-toolbar-height,93px) + 24px)}
html[data-theme][data-appearance] .portal-shell .lesson-stage-toolbar .steps a.current{background:var(--accent);color:var(--bg);border-color:var(--accent)}
html[data-theme][data-appearance] .portal-shell .lesson-stage-toolbar .steps a:not(.current):hover{background:var(--appearance-tint);color:var(--accent);border-color:var(--accent)}
html[data-theme][data-appearance] .portal-shell .lesson-stage-toolbar .steps a.current:hover{color:var(--bg);filter:brightness(.9)}
.portal-shell .lesson-phrase-table,.portal-shell .lesson-phrase-table tbody{display:block}
.portal-shell .lesson-phrase-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.portal-shell .lesson-phrase-table tr{display:grid;grid-template-columns:30px repeat(2,minmax(0,1fr)) 184px;gap:24px 20px;align-items:start;padding:30px 0;border-bottom:1px solid var(--line)}
.portal-shell .lesson-phrase-table td{display:block;min-width:0;padding:0;border:0;width:auto}
.portal-shell .lesson-phrase-table .phrase-select{grid-column:1;grid-row:1;padding-top:7px!important;text-align:left}
.portal-shell .lesson-phrase-table .phrase-copy{grid-column:2/4;grid-row:1}
.portal-shell .phrase-copy>span{display:block;font-size:30px;line-height:1.35;font-weight:700;color:var(--text)}
.portal-shell .phrase-copy p{font-size:20px;line-height:1.5;margin-top:8px}
.portal-shell .lesson-phrase-table .phrase-metric:nth-child(3){grid-column:2;grid-row:2}
.portal-shell .lesson-phrase-table .phrase-metric:nth-child(4){grid-column:3;grid-row:2}
.portal-shell .phrase-mobile-label{display:block;margin-bottom:10px;color:var(--muted);font-size:15px;line-height:1.4}
.portal-shell .phrase-metric .phrase-meter{max-width:none;height:6px}
.portal-shell .phrase-metric>small{font-size:14px;line-height:1.4;margin-top:8px}
.portal-shell .lesson-phrase-table .phrase-audio-cell{grid-column:4;grid-row:1;display:grid;grid-template-columns:repeat(2,max-content);gap:8px;align-items:center;justify-content:end;padding-top:1px}
.portal-shell .phrase-audio-cell::before{content:'Послушать';grid-column:1/-1;font-size:14px;color:var(--muted);line-height:1.2}
.portal-shell .phrase-audio{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:48px;min-width:84px;white-space:nowrap;background:var(--accent);color:var(--bg);border-color:var(--accent);font-weight:700}
.portal-shell .phrase-audio:hover{background:var(--accent);color:var(--bg);filter:brightness(.9)}
.portal-shell .phrase-audio+.phrase-audio{margin-left:0}
.portal-shell .lesson-overview-sidebar>.anki-export{width:100%;min-width:0}
.portal-shell .lesson-overview-sidebar .anki-export-trigger{display:flex;justify-content:center;align-items:center;gap:8px;white-space:normal;width:100%;max-width:none;min-height:60px;padding:16px;font-size:19px;line-height:1.35;text-align:center}
.portal-shell .lesson-overview-sidebar .anki-export-options{position:static;width:100%;min-width:0;max-width:100%;margin-top:12px;padding:20px;box-sizing:border-box}
.portal-shell .lesson-overview-sidebar .anki-export-options :is(select,button){max-width:100%;white-space:normal}
@media(max-width:1250px){
 .portal-shell .lesson-overview-sidebar{grid-template-columns:minmax(0,1fr);position:static}
 .portal-shell .lesson-overview-sidebar>.anki-export{grid-column:1/-1}
 .portal-shell .lesson-progress-card{grid-template-columns:repeat(2,minmax(0,1fr));grid-row:auto;min-width:0}
 .portal-shell .lesson-progress-card>.cinema-session-entry{grid-column:1/-1}
 .portal-shell .lesson-progress-metric{min-width:0}
 .portal-shell .lesson-progress-metric h3{font-size:18px}
 .portal-shell .lesson-overview-sidebar .library-rail-photo{display:none}
}
@media(max-width:700px){
 .portal-shell .lesson-stage-toolbar .steps{gap:7px}
 .portal-shell .lesson-stage-toolbar .steps a{font-size:16px;min-height:76px;padding:12px 8px}
 .portal-shell .lesson-phrases-heading{flex-wrap:wrap;gap:12px}
 .portal-shell .lesson-phrases-heading>span{text-align:left;font-size:16px}
 .portal-shell .lesson-phrases-heading>span small{display:inline;margin-left:7px;font-size:14px}
 .portal-shell .lesson-phrase-table tr{grid-template-columns:24px repeat(2,minmax(0,1fr));gap:20px 14px;padding:26px 0}
 .portal-shell .lesson-phrase-table .phrase-copy{grid-column:2/-1}
 .portal-shell .phrase-copy>span{font-size:25px}.portal-shell .phrase-copy p{font-size:18px}
 .portal-shell .lesson-phrase-table .phrase-audio-cell{grid-column:2/-1;grid-row:2;justify-content:flex-start}
 .portal-shell .lesson-phrase-table .phrase-metric:nth-child(3),.portal-shell .lesson-phrase-table .phrase-metric:nth-child(4){grid-row:3}
 .portal-shell .phrase-mobile-label{font-size:14px}.portal-shell .phrase-metric>small{font-size:13px}
 .portal-shell .lesson-progress-card.panel{display:block;margin-top:16px;padding:24px 20px}
 .portal-shell .lesson-progress-card dl{display:block}
}

/* Memorization workspace: size the chrome for the task, not a landing page.
   Keep natural overflow for unusually long content and accessibility zoom. */
html[data-appearance] .portal-shell:has(.memory-guided) .portal-header{height:56px;min-height:56px;padding:0 24px;gap:20px}
html[data-appearance] .portal-shell:has(.memory-guided) .portal-header .brand{font-size:26px}
html[data-appearance] .portal-shell:has(.memory-guided) .portal-header .brand-logo{width:30px!important;height:30px!important}
html[data-appearance] .portal-shell:has(.memory-guided) .portal-nav{height:56px;gap:18px}
html[data-appearance] .portal-shell:has(.memory-guided) .portal-nav a,
html[data-appearance] .portal-shell:has(.memory-guided) .portal-user-menu summary{font-size:16px}
html[data-appearance] .portal-shell:has(.memory-guided) .portal-page{width:100%;min-width:0;max-width:1200px;min-height:0;padding:12px 24px 20px}
.portal-shell:has(.memory-guided) .portal-footer{display:none}
.portal-shell .memory-guided{font-size:16px;min-width:0}
.portal-shell .memory-guided .memory-lesson-nav{display:block;position:static;margin:0 0 12px;padding:0 0 10px;box-shadow:none;min-width:0}
.portal-shell .memory-guided .memory-lesson-nav .steps{width:100%;min-width:0;gap:8px;overflow:visible}
.portal-shell .memory-guided .memory-lesson-nav .steps a{min-width:0;min-height:40px;padding:8px 10px;font-size:15px;white-space:normal;overflow-wrap:anywhere}
.portal-shell .memory-guided .memory-design-heading{display:flex;gap:16px;align-items:center;margin:0 0 10px}
.portal-shell .memory-guided .memory-design-heading>div{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 18px;min-width:0}
.portal-shell .memory-guided .memory-design-heading h1{font-size:27px!important;margin:0;line-height:1.2}
.portal-shell .memory-guided .memory-design-heading p{font-size:15px;margin:0;gap:6px 14px}
.portal-shell .memory-guided .memory-design-heading p a{font-size:14px}
.portal-shell .memory-guided .memory-design-heading>.btn{font-size:14px;min-height:36px;padding:8px 10px;margin:0;max-width:240px}
.portal-shell .memory-guided-stages{display:flex;gap:8px 24px;margin:0 0 10px}
.portal-shell .memory-guided-stages li,.portal-shell .memory-guided-stages li:last-child{min-height:0}
.portal-shell .memory-guided-stages .memory-stage{min-height:40px;padding:4px 0;gap:9px;flex-direction:row}
.portal-shell .memory-guided-stages .memory-stage strong{font-size:16px}
.portal-shell .memory-guided-stages .memory-step-number{width:28px;height:28px;flex-basis:28px;font-size:15px}
.portal-shell .memory-layout.memory-guided-layout{min-height:0}
.portal-shell .memory-guided .memory-workspace{padding:14px 20px!important}
.portal-shell .memory-guided .memory-counter{font-size:14px;margin:0 0 10px}
.portal-shell .memory-guided .memory-guided-card{margin:0}
.portal-shell .memory-guided .memory-guided-phrase{padding:0 0 16px;margin:0}
.portal-shell .memory-guided .cycle-source{font-size:clamp(25px,2.6vw,36px);line-height:1.25}
.portal-shell .memory-guided .cycle-translation{font-size:clamp(19px,1.8vw,24px);line-height:1.3;margin:8px 0 0}
.portal-shell .memory-guided-controls{grid-template-columns:minmax(0,.8fr) minmax(0,1.5fr);gap:22px;padding-top:14px}
html[data-appearance] .portal-shell .memory-guided-controls h2{font-size:17px;margin:0 0 8px}
.portal-shell .memory-guided .memory-record-zone{border-top:0;border-left:1px solid var(--line);padding:0 0 0 22px}
.portal-shell .memory-guided .memory-record-zone>p{font-size:14px;margin:0 0 8px}
.portal-shell .memory-guided .cycle-audio-options{gap:8px}
html[data-theme][data-appearance] .portal-shell .memory-guided .cycle-audio-options .btn{min-width:76px;min-height:44px;padding:10px 14px;gap:8px;font-size:16px}
.portal-shell .memory-guided .memory-record-controls{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.portal-shell .memory-guided .memory-record-controls :is(.memory-record-button,.memory-play-own){min-height:44px;padding:10px!important;font-size:15px}
.portal-shell .memory-guided .memory-record-controls .memory-recorder{gap:5px}
.portal-shell .memory-guided .memory-recorder-status{font-size:13px;line-height:1.3}
.portal-shell .memory-guided .memory-record-check{margin-top:8px;font-size:13px}
.portal-shell .memory-guided .memory-guided-actions{flex-direction:row;align-items:center;gap:12px;padding-top:12px;margin-top:14px}
.portal-shell .memory-guided .memory-guided-actions>div{width:auto;gap:3px}
.portal-shell .memory-guided .memory-guided-actions small{font-size:12px}
html[data-appearance] .portal-shell .memory-guided .btn{min-height:40px;padding:9px 14px;font-size:16px}
.portal-shell .memory-guided .memory-guided-actions>.btn{width:auto;min-width:130px}
.portal-shell .memory-guided .cycle-progress{display:inline-block;font-size:13px;margin:8px 16px 0 0;padding:0;border:0;line-height:1.4}
.portal-shell .memory-guided .memory-extras{font-size:13px;margin-top:6px}
.portal-shell .memory-guided .memory-workspace>h2{font-size:23px;margin:0 0 5px}
.portal-shell .memory-guided .memory-workspace>h2+p{font-size:14px;margin:0 0 10px}
.portal-shell .memory-guided .recall-cards{gap:8px;margin:12px 0}
.portal-shell .memory-guided .recall-card{grid-template-columns:minmax(160px,.7fr) minmax(0,2fr);gap:18px;padding:14px 16px;border-radius:6px}
.portal-shell .memory-guided .recall-card>header{gap:10px;padding-right:12px}
.portal-shell .memory-guided .recall-card h3{font-size:18px;margin:0 0 5px}
.portal-shell .memory-guided .recall-card header p{font-size:13px;margin:0;line-height:1.3}
.portal-shell .memory-guided .recall-number{flex-basis:28px;height:28px;font-size:16px}
.portal-shell .memory-guided .recall-card[data-recall-active=false]{display:block;padding:6px 12px}
.portal-shell .memory-guided .recall-card[data-recall-active=false]>header{align-items:center;border:0;padding:0}
.portal-shell .memory-guided .recall-card[data-recall-active=false] h3{font-size:14px;margin:0}
.portal-shell .memory-guided .recall-card[data-recall-active=false] header p,
.portal-shell .memory-guided .recall-card[data-recall-active=false] .recall-body{display:none}
.portal-shell .memory-guided .recall-prompt{font-size:23px;margin:0 0 8px}
.portal-shell .memory-guided .recall-body #cycle-form{gap:8px}
.portal-shell .memory-guided .recall-body #cycle-form label{font-size:14px}
.portal-shell .memory-guided .recall-body #cycle-input{font-size:18px;min-height:42px;padding:8px}
.portal-shell .memory-guided .recall-body #cycle-form button{min-height:42px}
.portal-shell .memory-guided .cycle-actions{margin:10px 0 0;gap:8px}
.portal-shell .memory-guided .recall-body{padding:0}
html[data-appearance] .portal-shell .memory-guided .memory-design-heading>.btn{font-size:14px;min-height:36px;max-width:none;white-space:nowrap;padding:8px 10px}
.portal-shell .memory-guided .memory-record-controls #cycle-recording-preview small{font-size:13px;margin:0}
.portal-shell .memory-guided .memory-record-zone>p{display:none}
.portal-shell .memory-guided .memory-design-heading>.btn{display:none}
.portal-shell .memory-guided .memory-workspace[data-cycle-phase="2"]>h2,
.portal-shell .memory-guided .memory-workspace[data-cycle-phase="2"]>h2+p{display:none}
.portal-shell .memory-guided .recall-cards{grid-template-columns:1fr 1fr}
.portal-shell .memory-guided .recall-card[data-recall-active=true]{grid-column:1/-1;order:0}
.portal-shell .memory-guided .recall-card[data-recall-active=false]{order:1}
.portal-shell .memory-guided .recall-body #cycle-form label{margin:0}
.portal-shell .memory-guided .recall-compact-feedback{display:flex;flex-wrap:wrap;align-items:baseline;gap:12px 36px;margin:0 0 20px;font-size:18px;line-height:1.6}
.portal-shell .memory-guided .recall-compact-feedback .recall-comparison-item{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 10px;min-width:0;max-width:100%;margin:0;color:inherit}
.portal-shell .memory-guided .recall-comparison-label{font-size:16px;font-weight:500;white-space:nowrap}
.portal-shell .memory-guided .recall-comparison-text{min-width:0;overflow-wrap:anywhere;font-size:20px;line-height:1.6}
.portal-shell .memory-guided .recall-help .recall-compact-feedback .memory-reference-error{color:inherit;text-underline-offset:.2em}
@media(max-width:600px){.portal-shell .memory-guided .recall-compact-feedback{flex-direction:column;align-items:stretch;gap:12px}.portal-shell .memory-guided .recall-comparison-text{font-size:18px}}
.portal-shell .memory-guided .recall-compact-restart{font-size:13px;margin-left:auto;padding:4px;min-height:32px}
.portal-shell .memory-guided .recall-compact-feedback mark{background:#f5ded2;color:#863d2b;border-radius:3px;padding:2px 5px}
.portal-shell .memory-guided .recall-help .recall-compact-feedback{color:#fff}
.portal-shell .memory-review-settings-link{margin:24px 0 20px;font-size:16px}
.portal-shell .memory-review-settings-link a{text-underline-offset:4px}
.portal-shell .repetition-settings{max-width:820px;scroll-margin-top:90px}
.portal-shell .repetition-settings h2{font-size:34px;margin:0 0 12px}
.portal-shell .repetition-settings fieldset{border:0;border-bottom:1px solid var(--line);padding:0 0 24px;margin:28px 0 24px;min-width:0}
.portal-shell .repetition-settings legend{font-size:20px;font-weight:600;margin-bottom:16px}
.portal-shell .repetition-options,.portal-shell .repetition-days{display:flex;flex-wrap:wrap;gap:12px 24px;margin:12px 0}
.portal-shell .repetition-options label,.portal-shell .repetition-days label{display:flex;align-items:center;gap:10px;min-height:44px;margin:0;font-size:17px;cursor:pointer}
.portal-shell .repetition-settings input[type=radio],.portal-shell .repetition-settings input[type=checkbox]{width:20px;height:20px;margin:0;accent-color:var(--accent)}
.portal-shell .repetition-intervals{display:flex;flex-wrap:wrap;gap:10px;list-style:none;padding:0;margin:16px 0}
.portal-shell .repetition-intervals li{padding:12px 18px;border:1px solid var(--line);font-size:18px}
.portal-shell .repetition-settings .help{font-size:15px;line-height:1.6;max-width:70ch}
.portal-shell .repetition-settings [hidden]{display:none!important}
.portal-shell .repetition-settings select,.portal-shell .repetition-settings input[type=text]{width:100%;max-width:520px}
.portal-shell .repetition-actions{display:flex;flex-wrap:wrap;align-items:center;gap:20px;margin-top:24px}
.portal-shell .repetition-settings [data-repetition-status]{min-height:1.6em}
@media(max-width:600px){.portal-shell .repetition-settings h2{font-size:28px}.portal-shell .repetition-options{gap:8px 16px}.portal-shell .repetition-intervals li{padding:10px 12px}}
.portal-shell .memory-guided .memory-extras{padding:0;line-height:1.4}
.portal-shell .memory-guided .memory-extras summary{padding:0}
.portal-shell .memory-guided .recall-body .memory-recorder{display:grid;grid-template-columns:76px minmax(0,1fr);align-items:center;gap:4px 12px;margin:8px 0;padding:8px 0;border:0}
html[data-theme][data-appearance] .portal-shell .memory-guided .recall-body .memory-record-circle{grid-column:1;grid-row:1/3;width:72px;min-width:72px;max-width:72px;height:72px;min-height:72px;padding:6px!important;gap:2px;border-radius:50%;color:var(--bg)}
.portal-shell .memory-guided .recall-body .memory-record-symbol svg{width:28px;height:28px}
.portal-shell .memory-guided .recall-body .memory-record-caption{grid-column:2;grid-row:1;margin:0;font-size:14px}
.portal-shell .memory-guided .recall-body .memory-recorder-status{grid-column:2;grid-row:2;margin:0;font-size:12px}
.portal-shell .memory-guided .recall-body .memory-recorder-note{grid-column:1/-1;margin:4px 0 0;font-size:12px;line-height:1.3}
.portal-shell .memory-guided .recall-body .memory-recording-preview{grid-column:1/-1;width:100%;height:36px;margin:4px 0 0}
.portal-shell .memory-guided .recall-body:has(#cycle-oral:not(:empty))>[data-cycle=recall-compare],
.portal-shell .memory-guided .recall-body:has(#cycle-oral:not(:empty))>#cycle-check-note{display:none}
.portal-shell .memory-guided .recall-body #cycle-check-note{font-size:12px;line-height:1.35;margin:6px 0}
.portal-shell .memory-guided .memory-record-check{padding:0;border:0;line-height:1.4}
.portal-shell .memory-guided .memory-record-check #cycle-check-note{margin-top:10px;font-size:14px;line-height:1.45}
.portal-shell .memory-guided .memory-speech-result{margin:8px 0 12px;padding:12px 14px;border:1px solid currentColor;border-radius:8px;overflow-wrap:anywhere}
.portal-shell .memory-guided .memory-speech-success{color:#285332;background:#edf5eb}
.portal-shell .memory-guided .memory-speech-error{color:#922d31;background:#fff0ec}
.portal-shell .memory-guided .memory-speech-result p{color:inherit;font-size:14px;line-height:1.45;margin:4px 0}
.portal-shell .memory-guided .memory-speech-result .memory-speech-verdict{display:flex;align-items:center;gap:8px;font-size:17px;margin:0 0 8px}
.portal-shell .memory-guided .memory-speech-verdict svg{flex:0 0 24px}
.portal-shell .memory-guided .memory-speech-result .recall-answer{font-size:17px;color:#242b24}
.portal-shell .memory-guided .memory-speech-result .recall-answer :is(mark,[aria-label="Пропущено слово"]){color:#861d29;background:#f9d7d3;padding:1px 3px;border-radius:3px;font-weight:700;text-decoration:underline;text-underline-offset:3px}
html[data-theme="dark"] .portal-shell .memory-guided .memory-speech-success{color:#c4e3bf;background:#202e24}
html[data-theme="dark"] .portal-shell .memory-guided .memory-speech-error{color:#ffc0be;background:#362125}
html[data-theme="dark"] .portal-shell .memory-guided .memory-speech-result .recall-answer{color:#f6f3ed}
html[data-theme="dark"] .portal-shell .memory-guided .memory-speech-result .recall-answer :is(mark,[aria-label="Пропущено слово"]){color:#ffdddd;background:#66303a}
.portal-shell .memory-guided #cycle-repeat-translation:empty{display:none}
.portal-shell .memory-guided .memory-record-controls #cycle-recording-preview small{display:none}
.portal-shell .memory-guided .memory-guided-actions>div{display:flex;align-items:center;flex-wrap:wrap;gap:4px 12px}
.portal-shell .memory-guided .memory-guided-actions small{line-height:1.3}
@media(min-width:701px){.portal-shell .memory-guided .memory-extras{display:inline-block;vertical-align:baseline;margin-top:8px}}
@media(min-width:701px) and (max-height:760px){
 html[data-appearance] .portal-shell:has(.memory-guided) .portal-page{padding-top:8px;padding-bottom:8px}
 .portal-shell .memory-guided .memory-design-heading,.portal-shell .memory-guided-stages{margin-bottom:6px}
 .portal-shell .memory-guided .memory-lesson-nav{margin-bottom:8px}
 .portal-shell .memory-guided .memory-workspace{padding:12px 20px!important}
}
.portal-shell .memory-guided .recall-body #cycle-oral:not(:empty){margin-top:10px;padding-top:10px}
.portal-shell .memory-guided .recall-body #cycle-oral .cycle-source{font-size:24px;margin:0 0 10px}
.portal-shell .memory-guided .recall-body #cycle-oral .cycle-audio-options{margin:0 0 8px}
.portal-shell .memory-guided .recall-body #cycle-oral>p{font-size:14px;line-height:1.35;margin:0 0 5px}
.portal-shell .memory-guided .recall-body #cycle-oral .recall-answer{font-size:18px}
@media(min-width:901px){
 .portal-shell .memory-guided .recall-body:has(#cycle-oral:not(:empty)){display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:6px 20px;align-content:start;align-items:start}
 .portal-shell .memory-guided .recall-body:has(#cycle-oral:not(:empty))>*{grid-column:1}
 .portal-shell .memory-guided .recall-body #cycle-oral:not(:empty){grid-column:2;grid-row:1/6;margin:0;border-top:0;border-left:1px solid var(--line);padding:0 0 0 20px}
}
.portal-shell .memory-guided .recall-self-assessment{margin-top:8px;gap:8px}
@media(max-width:700px){
 html[data-appearance] .portal-shell:has(.memory-guided) .portal-page{padding:10px 12px 16px}
 html[data-appearance] .portal-shell:has(.memory-guided) .portal-header{padding:6px 12px;height:auto;min-height:52px;gap:8px}
 html[data-appearance] .portal-shell:has(.memory-guided) .portal-header .brand{font-size:22px;letter-spacing:-1px;gap:6px}
 html[data-appearance] .portal-shell:has(.memory-guided) .portal-header .brand-logo{width:24px!important;height:24px!important}
 .portal-shell:has(.memory-guided) .portal-header-actions{gap:6px;margin:0}
 html[data-appearance] .portal-shell:has(.memory-guided) .portal-user-menu summary{max-width:76px;font-size:13px;padding:6px 0}
 .portal-shell:has(.memory-guided) .menu-toggle{font-size:13px!important;padding:8px!important;min-height:36px!important}
 .portal-shell .memory-guided .memory-design-heading>.btn{display:none}
 .portal-shell .memory-guided .memory-design-heading h1{font-size:23px!important}
 .portal-shell .memory-guided .memory-design-heading h1{display:none}
 .portal-shell .memory-guided .memory-lesson-nav .steps{gap:4px}
 .portal-shell .memory-guided .memory-lesson-nav .steps a{font-size:13px;padding:7px 4px;min-height:44px}
 .portal-shell .memory-guided-stages{display:grid;grid-template-columns:1fr 1fr;gap:8px}
 .portal-shell .memory-guided-stages .memory-stage strong{font-size:13px;line-height:1.25}
 .portal-shell .memory-guided .memory-workspace{padding:12px!important}
 .portal-shell .memory-guided-controls{grid-template-columns:1fr;gap:12px;padding-top:12px}
 .portal-shell .memory-guided .memory-model-zone{display:flex;align-items:center;justify-content:space-between;gap:8px}
 html[data-appearance] .portal-shell .memory-guided .memory-model-zone h2{margin:0;font-size:15px}
 .portal-shell .memory-guided .memory-record-zone{border-left:0;border-top:1px solid var(--line);padding:10px 0 0}
 .portal-shell .memory-guided .memory-guided-actions>.btn{min-width:90px}
 .portal-shell .memory-guided .memory-guided-actions .btn{font-size:14px;padding:9px 10px}
 .portal-shell .memory-guided .memory-guided-actions{display:grid;grid-template-columns:minmax(0,1fr) 90px;gap:8px}
 .portal-shell .memory-guided .memory-guided-actions>div{display:grid;gap:4px}
 .portal-shell .memory-guided .memory-guided-actions small{font-size:11px}
 .portal-shell .memory-guided .recall-card{grid-template-columns:1fr;gap:10px;padding:12px}
 .portal-shell .memory-guided .recall-card>header{border-right:0;border-bottom:1px solid var(--line);padding:0 0 8px}
 .portal-shell .memory-guided .recall-card>header p{display:none}
 .portal-shell .memory-guided .recall-card[data-recall-active=false] .recall-number{display:none}
 .portal-shell .memory-guided .recall-card[data-recall-active=false] h3{font-size:12px}
 .portal-shell .memory-guided .recall-body #cycle-form{grid-template-columns:minmax(0,1fr) auto}
 .portal-shell .memory-guided .recall-body #cycle-form.recall-gap-form{grid-template-columns:minmax(0,1fr)}
}
