/* 18312 — white app surfaces; existing reader theme and profile artwork retained. */
html[data-theme="light"]{
  --bg:#ffffff;--sidebar:#ffffff;--panel:#ffffff;--panel-2:#f3f4f6;
  --surface:#ffffff;--surface-2:#f3f4f6;
  --line:#e3e5e8;--line-soft:#eef0f2;--text:#20242a;
  --muted:#606873;--muted-2:#737b85;--accent:#bd9557;--accent-strong:#805d2e;
}
html[data-theme="light"] body,
html[data-theme="light"] .app-shell,
html[data-theme="light"] .main-view,
html[data-theme="light"] .sidebar,
html[data-theme="light"] .route-view[data-route="profile"]{background:#fff;color:var(--text)}
html[data-theme="light"] .hero-bg{background:linear-gradient(120deg,#fff,#f5f6f8)}
html[data-theme="light"] .hero-bg::before{opacity:.12}
html[data-theme="light"] .hero-bg::after{background:linear-gradient(180deg,rgba(255,255,255,.15),#fff)}
html[data-theme="light"] .genre-section{background:#fff}
html[data-theme="light"] .topbar.topbar-ott,
html[data-theme="light"] .topbar.topbar-ott.is-depth-route{background:rgba(255,255,255,.97)!important;border-bottom-color:#e9ebee!important;box-shadow:0 2px 12px rgba(20,30,40,.025)}
html[data-theme="light"] .account-popover,
html[data-theme="light"] .profile-settings-menu,
html[data-theme="light"] .shortbook-common-dialog-card,
html[data-theme="light"] .shortbook-comment-delete-card,
html[data-theme="light"] .shortbook-profile-shop-card,
html[data-theme="light"] .genre-preference-panel,
html[data-theme="light"] .shortbook-my-comments-panel,
html[data-theme="light"] .catalog-empty-state-inner{background:#fff;border-color:var(--line);box-shadow:0 16px 48px rgba(20,30,40,.10)}
html[data-theme="light"] .route-view[data-route="records"] .reading-record-primary,
html[data-theme="light"] .reading-record-book,
html[data-theme="light"] .reading-record-summary>div,
html[data-theme="light"] .reading-calendar-panel,
html[data-theme="light"] .profile-shop-item,
html[data-theme="light"] .profile-showcase-title-chip,
html[data-theme="light"] .profile-showcase-theme-chip{background:#fff;border-color:var(--line)}
html[data-theme="light"] .search-shell,
html[data-theme="light"] .topbar-search-shell{background:#f5f6f8;border-color:var(--line)}
html[data-theme="light"] .global-search-input{color:var(--text)}
html[data-theme="light"] .global-search-input::placeholder{color:var(--muted)}
html[data-theme="light"] .hero-copy h1,
html[data-theme="light"] .section-head h3,
html[data-theme="light"] .route-page-head h1,
html[data-theme="light"] .book-info strong,
html[data-theme="light"] .reading-record-heading strong{color:var(--text)}
html[data-theme="light"] .hero-description,
html[data-theme="light"] .book-info span,
html[data-theme="light"] .reading-record-heading span,
html[data-theme="light"] .reading-record-meta span,
html[data-theme="light"] .reading-calendar-head span{color:var(--muted)}
html[data-theme="light"] .reading-record-read{background:#f3f4f6;border-color:#d9dde2;color:#303741}
html[data-theme="light"] .shortbook-mobile-bottom-nav{background:rgba(255,255,255,.98)!important;border-top-color:var(--line)!important;box-shadow:0 -4px 20px rgba(20,30,40,.05)!important}
html[data-theme="light"].shortbook-phone-ui .shortbook-mobile-tab{color:#646d78}
html[data-theme="light"].shortbook-phone-ui .shortbook-mobile-tab.is-active{color:#20242a}
html[data-theme="light"].shortbook-phone-ui .shortbook-mobile-tab.is-active::before{background:#20242a}
.account-menu-item.theme-toggle{display:grid;width:100%;height:auto;min-height:44px;flex:none;border:0;border-radius:10px;padding:7px 10px;text-align:left;box-shadow:none;background:transparent;color:inherit;transform:none}
.account-menu-item.theme-toggle:hover{transform:none;background:rgba(128,128,128,.08)}
:where(button,a,input,textarea,select):focus-visible{outline:2px solid var(--accent-strong);outline-offset:3px}
/* Phone layout reuses the shared runtime's classification, including landscape. */
html.shortbook-phone-ui .topbar.topbar-ott{padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right));gap:6px}
html.shortbook-phone-ui .topbar-left{gap:6px}
html.shortbook-phone-ui .topbar-brand{flex:0 1 auto;min-width:0}
html.shortbook-phone-ui .topbar-brand-logo{display:block;width:auto;height:35px;max-width:116px;max-height:35px;object-fit:contain}
html.shortbook-phone-ui .topbar-actions{gap:2px;flex-shrink:0}
html.shortbook-phone-ui .search-toggle-button,
html.shortbook-phone-ui .notification-button,
html.shortbook-phone-ui .topbar-quiz-button,
html.shortbook-phone-ui .topbar-ott .account-preview{width:44px;min-width:44px;height:44px;padding:0;flex:0 0 44px}
html.shortbook-phone-ui .topbar-quiz-button>span{display:none}
html.shortbook-phone-ui .topbar-search-cluster.is-expanded .topbar-search-shell{position:fixed;left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));top:72px;width:auto!important;height:48px;transform:none;z-index:60;box-shadow:0 8px 24px rgba(0,0,0,.15)}
html.shortbook-phone-ui :is(input,textarea,select){font-size:16px}
html.shortbook-phone-ui .account-popover{max-width:calc(100vw - 24px);max-height:calc(100dvh - 150px);overflow-y:auto;overscroll-behavior:contain}
html.shortbook-phone-ui .hero-copy h1{font-size:clamp(30px,8vw,42px);line-height:1.2;overflow-wrap:anywhere}
html.shortbook-phone-ui .hero-copy{padding-top:18px}
html.shortbook-phone-ui .hero-description{-webkit-line-clamp:3}
html.shortbook-phone-ui .hero-actions>#heroReadButton{min-height:48px;justify-content:center;width:100%}
html.shortbook-phone-ui .hero-cover-zone{padding-top:20px}
html.shortbook-phone-ui .book-rail{scroll-snap-type:x proximity;scroll-padding-inline:2px;overscroll-behavior-x:contain}
html.shortbook-phone-ui .book-rail>.book-card{scroll-snap-align:start}
html.shortbook-phone-ui .main-view{padding-bottom:calc(80px + env(safe-area-inset-bottom,0px))}
html.shortbook-phone-ui .shortbook-mobile-tab{min-height:48px;font-size:11px}
html.shortbook-phone-ui body.shortbook-book-intro-open .shortbook-mobile-bottom-nav{display:none!important}
html.shortbook-phone-ui .route-view{padding-left:max(16px,env(safe-area-inset-left));padding-right:max(16px,env(safe-area-inset-right))}
html.shortbook-phone-ui .route-book-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px 14px}
html.shortbook-phone-ui .route-page-head{gap:12px;flex-wrap:wrap}
html.shortbook-phone-ui .route-view[data-route="records"]{height:auto;min-height:0;overflow:visible;padding-bottom:24px}
html.shortbook-phone-ui .route-view[data-route="records"] .reading-record-dashboard{grid-template-columns:minmax(0,1fr);gap:16px}
html.shortbook-phone-ui .route-view[data-route="records"] .reading-record-primary{padding:12px;overflow:visible}
html.shortbook-phone-ui .route-view[data-route="records"] .reading-record-list{overflow:visible;max-height:none;padding:0;scrollbar-gutter:auto}
html.shortbook-phone-ui .reading-record-primary .reading-record-book{grid-template-columns:60px minmax(0,1fr);gap:10px 12px;padding:12px}
html.shortbook-phone-ui .reading-record-primary .reading-record-cover{width:60px;height:90px;grid-row:1 / 3}
html.shortbook-phone-ui .reading-record-heading,
html.shortbook-phone-ui .reading-record-heading>div{align-items:flex-start;flex-direction:column;gap:4px}
html.shortbook-phone-ui .reading-record-primary .reading-record-heading strong{font-size:14px;white-space:normal;overflow-wrap:anywhere;line-height:1.45}
html.shortbook-phone-ui .reading-record-heading span{font-size:12px;white-space:normal}
html.shortbook-phone-ui .reading-record-meta{flex-wrap:wrap;gap:6px}
html.shortbook-phone-ui .reading-record-read{grid-column:2;justify-self:start;min-height:44px;padding:0 16px}
html.shortbook-phone-ui .reading-calendar-head button{min-width:44px;min-height:44px}
html.shortbook-phone-ui .profile-showcase-collections{min-width:0}
html.shortbook-phone-ui .profile-showcase-title-chip,
html.shortbook-phone-ui .profile-showcase-theme-chip{max-width:100%;min-height:44px;overflow-wrap:anywhere}
@media(hover:none){
  .book-card:hover img,.rank-card:hover>img{transform:none;filter:none}
}
@media(prefers-reduced-motion:reduce){
  .theme-toggle,.shortbook-mobile-tab,.book-card img{transition:none!important}
  .book-rail{scroll-behavior:auto}
}
html[data-theme="light"] .auth-dialog-panel,
html[data-theme="light"] .shortbook-book-intro-card,
html[data-theme="light"] .shortbook-book-intro-toc-view,
html[data-theme="light"] .shortbook-comments-panel{background:#fff;border-color:var(--line);color:var(--text)}
html[data-theme="light"] .shortbook-book-intro-card h2,
html[data-theme="light"] .shortbook-book-intro-hook,
html[data-theme="light"] .shortbook-book-toc-row-head>strong{color:var(--text)}
html[data-theme="light"] .shortbook-book-intro-author,
html[data-theme="light"] .shortbook-book-intro-reading-time,
html[data-theme="light"] .shortbook-book-intro-reading-time>strong,
html[data-theme="light"] .shortbook-book-toc-subtitle,
html[data-theme="light"] .shortbook-book-toc-row-head>em,
html[data-theme="light"] .shortbook-book-toc-row p,
html[data-theme="light"] .shortbook-book-intro-reactions button>em{color:var(--muted)}
html[data-theme="light"] .shortbook-book-toc-row{background:#f7f8fa;border-color:var(--line)}
html[data-theme="light"] .shortbook-book-intro-genres span,
html[data-theme="light"] .shortbook-book-toc-row-head>span{color:var(--accent-strong)}
html[data-theme="light"] .shortbook-book-intro-toc-button,
html[data-theme="light"] .shortbook-book-toc-read,
html[data-theme="light"] .shortbook-book-intro-reactions button,
html[data-theme="light"] .shortbook-book-intro-close{color:#434b55;background:#f3f4f6;border-color:#d9dde2}
html[data-theme="light"] .shortbook-book-intro-reactions button.is-selected{color:#805d2e;background:#f4eadb;border-color:#c9aa7d}
html.shortbook-phone-ui .shortbook-book-toc-read,
html.shortbook-phone-ui .shortbook-book-intro-toc-button,
html.shortbook-phone-ui .shortbook-book-intro-reactions button,
html.shortbook-phone-ui .shortbook-book-intro-close{min-height:44px;min-width:44px}
html[data-theme="light"] .shortbook-book-toc-summary,
html[data-theme="light"] .shortbook-book-toc-back{color:var(--muted)}
html.shortbook-phone-ui .shortbook-book-toc-back{min-height:44px;padding:0 8px}
/* 18314: mobile account menu owns notification and quiz controls. */
.mobile-account-actions{display:none}
[data-notification-menu-label]{display:none}
html.shortbook-phone-ui .mobile-account-actions{display:grid;gap:4px;padding:4px 0 10px;margin-bottom:6px;border-bottom:1px solid var(--line)}
html.shortbook-phone-ui .mobile-account-actions .is-mobile-account-action{position:relative;display:flex;align-items:center;justify-content:flex-start;gap:12px;width:100%;min-width:0;min-height:48px;padding:10px 12px;border:0;border-radius:10px;background:transparent;color:var(--text);font-size:14px;flex:auto}
html.shortbook-phone-ui .mobile-account-actions .is-mobile-account-action:hover{background:var(--panel-2)}
html.shortbook-phone-ui .mobile-account-actions .is-mobile-account-action>svg{width:22px;height:22px;flex:0 0 22px}
html.shortbook-phone-ui .mobile-account-actions .topbar-quiz-button>span,
html.shortbook-phone-ui .mobile-account-actions [data-notification-menu-label]{display:inline}
html.shortbook-phone-ui .mobile-account-actions .notification-unread-badge{position:static;margin-left:auto;order:1}
html.shortbook-phone-ui .topbar-ott .account-preview{width:auto;max-width:140px;padding:0 8px;gap:6px;flex:0 1 auto;border-radius:22px}
html.shortbook-phone-ui .topbar-ott .account-preview .account-name{display:block!important;max-width:76px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}

/* 18320: theme-aware navigation including signed-in links and iPad scroll state. */
html[data-theme="light"] .topbar.topbar-ott .topbar-nav-link { color:#606873; }
html[data-theme="light"] .topbar.topbar-ott .topbar-nav-link:hover { color:#20242a; }
html[data-theme="light"] .topbar.topbar-ott .topbar-nav-link.is-active {
  color:#765329; opacity:1; font-weight:800;
}
html[data-theme="light"] .topbar.topbar-ott .topbar-nav-link.is-active::after { background:#a67c43; }
html[data-theme="light"].shortbook-ipad-ui .topbar.topbar-ott.is-depth-route.is-scrolled {
  --topbar-bg-alpha:.97; --topbar-border-alpha:.08; --topbar-shadow-alpha:.06;
  background:rgba(255,255,255,.97)!important;
  border-bottom-color:#e9ebee!important;
  box-shadow:0 4px 16px rgba(20,30,40,.06)!important;
}
.account-popover .account-menu-item.theme-toggle {
  display:grid; grid-template-columns:22px minmax(0,1fr); align-items:center; justify-items:start; gap:8px;
  width:100%; min-height:44px; height:auto; padding:10px; border-radius:10px;
}
.account-popover .account-menu-item.theme-toggle .account-menu-icon{position:relative;width:22px;height:22px}
.account-popover .account-menu-item.theme-toggle .theme-icon{inset:0}
/* Touch surfaces show a heart only when the existing reaction state is liked. */
html.shortbook-phone-ui .shortbook-cover-like-button:not(.is-liked),
html.shortbook-ipad-ui .shortbook-cover-like-button:not(.is-liked) { display:none!important; }
html.shortbook-phone-ui .shortbook-cover-like-button.is-liked,
html.shortbook-ipad-ui .shortbook-cover-like-button.is-liked {
  display:inline-flex!important; opacity:1!important; visibility:visible;
  transform:none!important; color:#d94879; background:#fff3f7; border-color:#f4c4d4;
}
html.shortbook-phone-ui .shortbook-cover-like-button.is-liked svg,
html.shortbook-ipad-ui .shortbook-cover-like-button.is-liked svg { fill:currentColor; stroke:currentColor; }
html.shortbook-phone-ui .ranking-section .rank-card .shortbook-cover-like-button.is-liked {
  display:inline-flex!important; width:22px; height:22px; left:4px; bottom:4px;
  opacity:1!important; transform:none!important;
}
html.shortbook-phone-ui .ranking-section .rank-card .shortbook-cover-like-button.is-liked svg { width:13px; height:13px; }
html.shortbook-ipad-ui .ranking-section .rank-card .shortbook-cover-like-button.is-liked {
  opacity:1!important; transform:none!important;
}
