/* Confirmed batch: existing phone font sizes are preserved. */
.home-focus .hf-modules-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.home-focus .hf-brand-mark{display:block;width:174px;max-width:42%;height:auto;aspect-ratio:3/1;object-fit:contain;flex:none}
.phone .bottom{height:calc(54px + env(safe-area-inset-bottom));padding-block:0 env(safe-area-inset-bottom)}
.phone.tasting .bottom{min-height:calc(54px + env(safe-area-inset-bottom))}
.phone .bottom .navbtn{min-height:48px;margin:2px 0;padding:2px;gap:1px}
.phone:not(.learning):not(.overview-learning):not(.tasting) .screen{padding-bottom:calc(74px + env(safe-area-inset-bottom))}
.phone .study-navigation{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:8px 0 12px}
.phone.learning .study-navigation,html[data-language=en] .phone.learning .study-navigation{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.phone .pagehead .back{width:auto;min-width:60px;min-height:44px;padding:8px 10px;background:#174f86;color:#fff;font:inherit;font-weight:750;border:1px solid #174f86;border-radius:10px}
.phone .study-navigation button{min-width:0;min-height:44px;padding:9px 12px;border:1px solid transparent;border-radius:10px;font-weight:750;line-height:1.35;text-align:center}
.phone.learning .study-navigation button:first-child,.phone .study-navigation button:first-child{grid-column:auto}
.phone .study-navigation button.nav-back,.phone .study-navigation button.nav-back:hover{background:#174f86;border-color:#174f86;color:#fff}
.phone .study-navigation button[data-action=home],.phone .study-navigation button[data-action=home]:hover{background:#f3c663;border-color:#f3c663;color:#174f86}
.phone .study-navigation button:focus-visible{outline:3px solid #c18a12;outline-offset:3px}
.tone-overview-sidebar>.overview-study-navigation{display:block}
.tone-overview-study{grid-template-rows:auto auto auto auto minmax(0,1fr) auto}
.taster-sidebar{min-width:0;min-height:0}
.taster-welcome-copy{overflow:auto}
.taster-welcome-copy p{line-height:1.75;margin:0 0 1em}
.taster-welcome-copy h2{color:#174f86;margin:0 0 16px}
.usage-categories button{color:#244b70;font-weight:750}
.usage-categories button.selected{color:#fff}
.usage-category-section>h3,.usage-directory-item b{color:#244b70;font-weight:750}
.usage-category-section>h3>small{color:#3c5670;font-weight:650}
.leisure-filters button{color:#244c40;font-weight:750}
.leisure-filters button.on{color:#173f32;font-weight:800}
.leisure-group-heading h3{color:#244c40;font-weight:750}
.leisure-reader .leisure-text>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#174f86;color:#fff;font-weight:750;margin-inline:-15px;padding:14px 15px;border-radius:15px;list-style:none}
.leisure-reader .leisure-text>summary::-webkit-details-marker{display:none}
.leisure-reader .leisure-text[open]>summary{border-radius:15px 15px 0 0}
.reading-disclosure-chevron{display:block;font-weight:800;line-height:1;transition:transform .15s}
.leisure-text[open] .reading-disclosure-chevron{transform:rotate(180deg)}
.leisure-text>summary:focus-visible{outline:3px solid #c18a12;outline-offset:3px}

@media (min-width:700px) and (min-height:500px){
 .phone.tasting #content{padding:8px 18px 0}
 .phone.tasting .guided-taster{display:grid;grid-template-columns:clamp(190px,23vw,260px) minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto;gap:10px 18px;padding-bottom:8px}
 .phone.tasting .guided-scroll{display:contents}
 .phone.tasting .taster-sidebar{grid-column:1;grid-row:1;overflow-y:auto;padding-right:10px;border-right:1px solid #d5e1ec}
 .phone.tasting .taster-sidebar .study-navigation{grid-template-columns:1fr;gap:10px;margin:0 0 10px}
 .phone.tasting .taster-sidebar .pagehead{padding:4px 0}
 .phone.tasting .taster-sidebar .pagehead h2{font-size:20px}
 .phone.tasting .taster-sidebar .pagehead p{font-size:14px;line-height:1.4}
 .phone.tasting .guided-lessons button{min-height:44px;padding:7px 9px}
 .phone.tasting .guided-lessons b{font-size:26px}
 .phone.tasting .guided-stages{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
 .phone.tasting .guided-stages button{padding:6px;min-height:44px;font-size:14px}
 .phone.tasting .guided-footer{display:grid;grid-template-columns:1fr;gap:6px}
 .phone.tasting .guided-footer button{min-height:44px}
 .phone.tasting .guided-card{grid-column:2;grid-row:1/3;display:flex;flex-direction:column;min-height:0;min-width:0;flex:1 1 0;margin:0;padding:12px 16px;overflow:hidden}
 .phone.tasting .guided-card-heading{flex:none;display:flex;align-items:center;flex-wrap:wrap;gap:6px;justify-content:space-between;margin:0 0 4px}
 .phone.tasting .taster-sidebar .explanation-toggle{margin:8px 0}
 .phone.tasting .guided-study-viewport{flex:1 1 0;min-height:0;min-width:0}
 .phone.tasting .guided-card-details{max-height:none;overflow:visible}
 .phone.tasting .guided-controls{grid-column:1;grid-row:2;display:flex;flex-direction:column;gap:8px;padding:4px 10px 0 0;border-top:0}
 .phone.tasting .guided-controls button{min-height:48px;padding:10px 8px}
 .phone.tasting .guided-tip{font-size:17px;line-height:1.4}
 .phone.tasting .guided-word-meaning{font-size:18px}
 .phone.tasting .guided-source{font-size:13px}
 .phone.tasting .taster-welcome-copy{justify-content:safe center;overflow:auto}
 .phone.tasting .taster-welcome-copy p{font-size:clamp(18px,2.2vw,24px);line-height:1.7}
 .phone.tasting .taster-welcome-copy h2{font-size:28px}
 .phone.learning .reading-copy .sentence-meaning>p,.phone.learning .reading-copy .usage-meaning>b{font-size:18px!important;line-height:1.4!important}
 .phone.learning .reading-copy .teaching-copy p{font-size:17px;line-height:1.4}
 .phone.learning .tone-stage .learning-detail-scroll{padding-top:0}
 .phone.learning .tone-stage .tone-lesson-detail{font-size:16px;line-height:1.4}
 .phone.learning .tone-repeat-hint{font-size:14px;line-height:1.4;margin:5px 0}
 .phone.overview-learning .tone-card,.phone.overview-learning .tone-card.active{padding:8px 7px}
 .phone.overview-learning .tone-card header>b{font-size:18px}
 .phone.overview-learning .tone-card header>span{font-size:14px;line-height:1.3}
 .phone.overview-learning .tone-card-example>b{font-size:clamp(42px,5.5vh,54px);font-weight:800}
 .phone.overview-learning .tone-card-example>span{font-size:clamp(28px,3.8vh,36px);font-weight:750}
 .phone.overview-learning .tone-overview-text p,.phone.overview-learning .tone-overview-text li{font-size:16px;line-height:1.5}
 .phone.reviewing #content{padding-bottom:calc(64px + env(safe-area-inset-bottom))}
}

/* Full-width horizontal course rows, followed by the two wider library entrances. */
@media (min-width:900px) and (min-height:500px) and (orientation:landscape){
 .phone.course-browsing #content{padding:6px 18px calc(64px + env(safe-area-inset-bottom))}
 .phone.course-browsing .course-directory{display:block}
 .course-directory .course-overview{display:flex;gap:12px;margin-bottom:6px}
 .course-directory .course-top{padding:4px 8px}
 .course-directory .course-top h2{font-size:19px;margin-bottom:3px}
 .course-directory .course-top p{font-size:13px;line-height:1.25;margin-bottom:4px}
 .course-directory .daylist{display:grid;grid-template-columns:minmax(0,1fr);gap:4px;margin:0}
 .course-directory .daylist .course-day-card{grid-column:auto;grid-template-columns:80px minmax(0,1fr) auto;min-height:48px;padding:6px 12px;gap:12px}
 .course-directory .daylist .course-day-card:last-child{grid-column:auto}
 .course-directory .day-card-body{display:grid;grid-template-columns:minmax(0,1fr) 100px auto;align-items:center;gap:12px}
 .course-directory .daylist .course-day-card h3{grid-column:1;grid-row:1;font-size:15px;line-height:1.3;margin:0}
 .course-directory .day-progress-track{grid-column:2;grid-row:1}
 .course-directory .day-progress-heading>strong{grid-column:3;grid-row:1}
 .course-directory .course-extra-entries{grid-column:auto;grid-row:auto;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto;gap:4px;margin-top:4px}
 .course-directory .course-extra-entries>button{min-height:48px;padding:7px 12px;margin:0;justify-content:space-between}
 .course-directory .course-extra-entries>button>span,.course-directory .course-extra-entries>button>div{display:flex;align-items:center;flex-wrap:wrap;gap:6px 20px}
 .course-directory .course-extra-entries strong,.course-directory .course-extra-entries b{font-size:18px;line-height:1.3}
 .course-directory .course-extra-entries small,.course-directory .course-extra-entries span{font-size:14px;line-height:1.3}
 .course-directory .course-extra-entries .literature-entry b{order:-1}
 .course-directory .course-extra-entries .literature-entry small{display:none}
 .course-directory .course-support{display:block;margin-top:6px}
 .course-directory .course-support .course-explainer{margin:0}
 .phone.learning .study-navigation,html[data-language=en] .phone.learning .study-navigation,.phone.overview-learning .study-navigation{grid-template-columns:1fr;gap:12px}
}

/* Retain touch-sized horizontal rows when the browser chrome reduces iPad height. */
@media (min-width:900px) and (min-height:500px) and (max-height:740px) and (orientation:landscape){
 .course-directory .daylist .course-day-card{min-height:44px;padding-block:4px}
 .course-directory .course-extra-entries>button{min-height:44px;padding-block:4px}
}
@media (min-width:900px) and (min-height:500px) and (max-height:660px) and (orientation:landscape){
 .course-directory .course-extra-entries{grid-template-columns:repeat(2,minmax(0,1fr))}
 .course-directory .course-extra-entries>button>span,.course-directory .course-extra-entries>button>div{display:block}
 .course-directory .course-extra-entries small,.course-directory .course-extra-entries .literature-entry span{display:none}
}
