/* Connected portal shell only; prototype and embedded fonts are unchanged. */
.site { max-width: none; margin: 0; min-height: 100dvh; border: 0; border-radius: 0; box-shadow: none; }
.topbar { display: block; padding: 0 28px; min-height: 76px; }
.topbar-inner { max-width: 1200px; margin: auto; display: flex; align-items: center; gap: 28px; min-height: 76px; }
.brand-name { font-size: 27px; }
.mark { width: 34px; height: 38px; font-size: 23px; }
.brand { min-height: 44px; }
.top-nav { gap: 22px; flex-shrink: 0; font-size: 14px; }
.top-nav a { display: inline-flex; align-items: center; min-height: 76px; border-bottom: 2px solid transparent; }
.top-nav a[aria-current=page] { border-color: var(--green); color: var(--green); }
.top-search { margin-left: auto; display: flex; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; width: 256px; min-width: 145px; }
.top-search input { min-width: 0; width: 100%; border: 0; background: transparent; padding: 10px 12px; font-size: 13px; min-height: 44px; }
.top-search button { display: grid; place-items: center; min-width: 44px; }
.top-actions { margin-left: 0; gap: 12px; }
.account { display: flex; align-items: center; gap: 10px; padding: 0; font-size: 13px; }
.account a { display: inline-flex; flex-direction: column; justify-content: center; min-height: 44px; min-width: 44px; margin: 0; text-decoration: none; white-space: nowrap; }
.account .account-credit { font-size: 11px; color: var(--muted); }
.account .account-name { max-width: 125px; overflow: hidden; text-overflow: ellipsis; }
.account button { min-width: 44px; padding: 7px 10px; font-size: 12px; }
.shell { display: block; }
.main { max-width: 1256px; margin: auto; padding: 28px 28px 32px; }
.page-footer a, .back-link { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
summary { cursor: pointer; }
summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.novel-description { margin: 20px 0; color: var(--muted); white-space: pre-line; }
.novel-count { margin-top: 16px; color: var(--green); font-size: 14px; }
.toc-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 28px 0 12px; }
.toc-heading .section-title { margin: 0; }
.toc-groups details { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; margin-bottom: 10px; }
.toc-groups summary { min-height: 52px; padding: 13px 18px; color: var(--green); }
.toc-groups .toc { margin: 0; }
.toc-groups details .toc { padding: 0 18px; }
.toc-groups .toc li:last-child { border-bottom: 0; }
@media(max-width:1050px) { .topbar-inner { gap: 18px; } .brand-name { font-size: 24px; } .top-nav { gap: 14px; } .account .account-name { max-width: 80px; } }
@media(max-width:850px) {
  .topbar { padding: 12px 24px; }
  .topbar-inner { min-height: 0; flex-wrap: wrap; gap: 12px; }
  .top-nav { display: none; }
  .top-actions { margin-left: auto; }
  .top-search { order: 3; width: 100%; }
  .top-actions .account-credit, .top-actions #logout { display: none; }
  .main { padding: 0 24px 24px; }
  .mobile-tabs { margin: 0; gap: 20px; border-bottom: 1px solid var(--line); }
  .mobile-tabs a { display: inline-flex; align-items: center; min-height: 48px; min-width: 44px; font-size: 13px; padding: 10px 0; }
  #mobileAccount { padding: 0; min-height: 44px; margin-bottom: 16px; }
  #mobileAccount a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
}
@media(max-width:600px) { .topbar { padding: 12px 18px; } .main { padding: 0 18px 24px; } .topbar-inner { gap: 10px; } .top-actions { gap: 8px; } .brand-name { font-size: 24px; } }
@media(max-width:360px) { .topbar { padding: 12px 15px; } .main { padding: 0 15px 24px; } .brand-name { font-size: 22px; } .brand { gap: 7px; } }
