/* Phone layout: a readable type scale and 44px+ touch targets. Loaded after every other stylesheet. */
/* The backup import button is a label; keep its native file picker invisible but clickable at every size. */
.import-label{position:relative;overflow:hidden;cursor:pointer}
.import-label input{position:absolute;inset:0;opacity:0;cursor:pointer}
.import-label:focus-within{outline:2px solid var(--accent);outline-offset:2px}
@media(max-width:700px){
/* Header and navigation */
header{height:124px;padding-top:12px;gap:8px}
.reading-page header{height:66px;padding-top:0}
.brand{font-size:21px}
.brand-icon{font-size:26px}
.icon{width:44px;height:44px;font-size:22px;flex:none}
.account-button{min-height:44px;padding:0 14px;font-size:14px;font-weight:600}
.search{top:68px;min-height:48px;padding:0 6px 0 14px;border-radius:10px}
.search input{font-size:16px;min-height:46px;min-width:0}
.clear-search{min-width:40px;min-height:40px;font-size:22px}
html{scroll-padding-top:140px}
header,.mobile-nav{transition:transform .25s var(--ease-out,ease)}
.chrome-hidden header{transform:translateY(-100%)}
.demo-label{font-size:11px;letter-spacing:1.2px}
.mobile-nav a{font-size:22px;gap:5px}
.mobile-nav span{font-size:11px;font-weight:500}
footer{font-size:13px;line-height:1.6}
footer a{min-height:44px;display:inline-flex;align-items:center}
#toast{font-size:14px;padding:13px 18px}

/* Shared type and controls */
.eyebrow,.feature-slide .eyebrow,.detail .eyebrow,.settings-head .eyebrow{font-size:11px;letter-spacing:1.4px}
.notice{font-size:13px;line-height:1.6}
.page-title{font-size:30px}
.page-sub{font-size:15px;line-height:1.6}
.button{font-size:15px;min-height:48px;padding:12px 18px;justify-content:center;gap:8px}
.text-button{font-size:14px;min-height:44px}
.section{margin-top:34px}
.section-head{margin-bottom:14px}
.section-head h2{font-size:21px}
.section-head a{font-size:14px;min-height:44px;display:inline-flex;align-items:center;white-space:nowrap;flex:none}
.section-head h2{line-height:1.3}
.section-head small{font-size:13px}
#app>a.notice,.reader>a.notice,.access-reader>a.notice{display:inline-flex;align-items:center;min-height:44px;font-size:14px}
.empty{font-size:15px}

/* Featured carousel */
.feature-slide.hero{min-height:300px}
.feature-slide.hero h1{font-size:24px;margin:12px 0 10px}
.feature-slide.hero .feature-meta{font-size:13px}
.feature-slide.hero .feature-description{font-size:14px;line-height:1.6;-webkit-line-clamp:3}
.feature-adult{font-size:10px;padding:2px 5px;margin-left:4px}
.feature-copy{padding-bottom:76px}
.feature-actions{bottom:82px;gap:16px}
.feature-actions .button{font-size:15px;padding:12px 18px;min-height:48px}
.feature-actions .feature-details{font-size:14px;min-height:44px;display:inline-flex;align-items:center;border-bottom:0;text-decoration:underline;text-decoration-color:#ffffff55;text-underline-offset:5px}
.feature-count{font-size:12px}

/* Novel carousel and shelves */
.novel-carousel-kicker{font-size:11px;letter-spacing:1.3px}
.novel-carousel-head h2{font-size:22px}
.novel-carousel-controls [data-novel-step]{display:none}
.novel-carousel-track .card{flex-basis:140px;width:140px}
.novel-carousel-track .cover{height:200px}
.novel-carousel-track .card h3{font-size:14px;line-height:1.35;min-height:38px;max-width:140px}
.novel-carousel-track .card .meta{font-size:12px}
.novel-carousel-footer{font-size:13px;align-items:center}
.novel-carousel-footer>span{max-width:none}
.novel-carousel-footer a{min-height:44px;display:inline-flex;align-items:center;gap:6px}
.card{width:140px;flex-basis:140px}
.card .cover{height:200px}
.card h3{font-size:14px;line-height:1.35;min-height:38px}
.card .meta{font-size:12px;margin-top:4px}
.library-grid .card{width:100%}
.library-grid .cover{height:226px}
.cover .age{font-size:10px}
.filters{gap:8px;padding-bottom:4px}
.filter{min-height:44px;font-size:14px;padding:0 15px}
.filter-count{font-size:12px}
.library-toolbar{font-size:14px;align-items:center}
.library-toolbar p{padding-top:0}
.library-toolbar select{font-size:14px;min-height:44px;max-width:160px;padding:0 10px}

/* Continue reading, updates, editor's shelf */
.resume-card{padding:18px 16px}
.resume-label{font-size:11px;letter-spacing:1.3px}
.resume-card h3{font-size:16px}
.resume-card p{font-size:13px}
.update{gap:14px;padding:14px 0}
.update h3{font-size:15px;line-height:1.4}
.update p{font-size:13px;line-height:1.5}
.update:has(time){display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:14px;align-items:center}
.update:has(time) .cover{grid-row:1/3}
.update time{grid-column:2;margin:4px 0 0;font-size:12px}
.pick h3{font-size:15px}
.pick small{font-size:13px}
.read-ahead p{font-size:14px;line-height:1.7}

/* Novel detail and chapter list */
.detail h1{font-size:24px}
.detail h1+p{font-size:13px!important}
.detail .tags{gap:6px}
.detail .tag{font-size:12px;padding:5px 9px}
.detail .eyebrow:before{display:none}
.detail .summary{font-size:15px;line-height:1.7}
.detail .summary small{font-size:13px}
.detail>.detail-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.detail>.detail-actions>*{width:100%;font-size:14px;padding:10px 8px;white-space:nowrap}
.detail{grid-template-columns:112px minmax(0,1fr)}
.detail>.cover{height:168px}
.detail .cover-title{letter-spacing:0}
.detail>.detail-actions>[data-resume]{grid-column:1/-1}
#order{font-size:14px;min-height:44px;padding:0 10px!important}
.section-head label.notice{display:flex;align-items:center;gap:8px;font-size:14px}
.chapter-search{padding:0 12px;min-height:48px}
.chapter-search input{font-size:16px;min-width:0}
#chapter-results{font-size:13px}
.chapter-row{padding:15px 4px;min-height:52px;gap:12px}
.chapter-row .chapter-name{font-size:15px}
.chapter-row .chapter-number{font-size:12px;min-width:36px}
.last-read-tag{font-size:11px!important}
.chapter-status{font-size:12px}

/* Reader */
.reader-top{font-size:13px;margin-bottom:12px}
.reader-top>a{min-height:44px;display:inline-flex;align-items:center}
.reading-page .reader h1{font-size:26px}
.reader .chapter-sub{font-size:13px}
.reader-tools{gap:6px;padding:6px}
.reader-tools button{font-size:14px;min-height:44px;padding:0 12px}
.reader-tools [data-size]{min-width:44px;padding:0}
.reader-tools #open-settings,.reader-tools #add-bookmark{font-size:14px;padding:0 12px;flex:1}
#size-value{display:none}
.progress-text{font-size:12px}
#chapter-start{min-height:48px;font-size:14px}
.reader-footer{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.reader-footer .button{font-size:14px;padding:6px 8px;min-height:48px;white-space:normal;text-align:center;line-height:1.25}
.reader-footer>.notice{align-self:center;text-align:center;font-size:12px}
.reader-promo{font-size:14px}
.reader-promo a{min-height:44px;display:inline-flex;align-items:center}
#exit-focus{min-height:44px;font-size:14px}

/* Dialogs become bottom sheets */
dialog{width:100%;max-width:100%;margin:auto 0 0;border-radius:20px 20px 0 0;border-bottom:0;padding:20px 20px calc(20px + env(safe-area-inset-bottom));max-height:90dvh}
.settings-head h2{font-size:24px}
.settings-head .icon{width:44px;height:44px}
dialog .notice{font-size:13px}
.setting-select{font-size:15px}
.setting-select select{font-size:16px;min-height:44px}
.setting-range{font-size:15px;gap:4px;margin:14px 0}
.setting-range output{font-size:14px}
.setting-range input{height:32px}
.setting-label{font-size:15px}
.theme-swatch{font-size:14px;min-height:48px}
.setting-check{grid-template-columns:24px 1fr;font-size:15px;align-items:center}
.setting-check input{width:22px;height:22px}
.setting-check span{font-size:13px}
.settings-actions .button{font-size:15px;flex:1;padding:10px;white-space:nowrap}
.setting-range:has([data-pref=width]){display:none}
.auth-tabs button{font-size:15px;min-height:44px}
#account-form>label:not(.password-toggle){font-size:14px}
#account-form input:not([type=checkbox]){font-size:16px;min-height:48px;width:100%}
.password-toggle{font-size:14px;min-height:44px}
.password-toggle input{width:20px;height:20px}
.account-notice{font-size:13px}
.account-email{font-size:17px}
#continue-guest{width:100%}
#account-dialog .buttons>*{flex:1}

/* Shelf history, bookmarks and backup */
.history-entry>.text-button{margin-left:56px}
.bookmark-entry strong{font-size:15px}
.bookmark-entry span{font-size:13px}
.bookmark-entry .text-button{min-width:44px}
#export-reading,.import-label{flex:1;white-space:nowrap;justify-content:center}
/* overflow:hidden lets the label shrink under its text; keep it whole and let the pair wrap instead. */
.import-label{flex-wrap:nowrap;min-width:fit-content}

/* Access and billing */
.access-panel .notice,.access-panel p{font-size:14px}
.access-panel .buttons{flex-direction:column;align-items:stretch}
.access-panel .buttons>*{width:100%;justify-content:center}
.billing-small,.billing-preview,.billing-source,.billing-pass dt{font-size:13px}
.billing-status{font-size:12px}
.billing-account-line{font-size:14px}
.billing-help summary{font-size:15px;min-height:44px;display:flex;align-items:center}
.billing-help p{font-size:14px}
}
@media(max-width:360px){
.feature-actions .button{font-size:14px;padding:12px 14px}
.feature-actions .feature-details{font-size:13px}
.reader-tools #open-settings,.reader-tools #add-bookmark{font-size:13px;padding:0 8px}
.card,.novel-carousel-track .card{width:128px;flex-basis:128px}
}
@media(max-width:700px) and (prefers-reduced-motion:reduce){header,.mobile-nav{transition:none}}
