:root { --content-width: 1240px; }

* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--text); font-family: Arial, Helvetica, sans-serif; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
::selection { background: var(--selected-bg); color: var(--selected-text); }
a { color: inherit; text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
input { min-width: 0; accent-color: var(--accent); caret-color: var(--text); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.icon { flex: none; display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 30; top: 8px; left: 12px; padding: 12px 16px; background: var(--button-bg); color: var(--button-text); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.site-header { position: relative; z-index: 10; background: var(--page); border-bottom: 1px solid var(--line); }
.header-inner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; max-width: var(--content-width); margin-inline: auto; padding-inline: 12px; }
.site-brand { display: flex; align-items: center; flex: 0 1 auto; min-width: 0; min-height: 44px; font: 700 22px/1.1 Georgia, 'Times New Roman', serif; }
.site-brand:hover { text-decoration: none; }
.site-brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-logo { filter: var(--logo-filter); display: block; width: 90px; height: auto; max-width: 100%; object-fit: contain; }
.site-brand:has(.site-logo) { width: 100px; height: 60px; }
.desktop-nav { display: none; }
.header-actions { display: flex; align-items: center; flex: none; gap: 0; }
.icon-button { display: inline-flex; justify-content: center; align-items: center; flex: none; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--text); }
.icon-button:hover, .icon-button[aria-expanded="true"] { background: var(--surface); text-decoration: none; }
.account-avatar { display: block; width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.avatar-fallback { display: flex; }
.header-panel { position: absolute; top: calc(100% + 8px); right: 12px; width: min(360px, calc(100% - 24px)); padding: 12px 16px 20px; background: var(--page); border: 1px solid var(--line); border-radius: 8px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.panel-heading h2 { margin: 0; font-size: 18px; line-height: 1.35; font-weight: 600; }
.panel-heading .icon-button { margin-right: -8px; }
.header-panel p { margin: 8px 0 16px; color: var(--muted); font-size: 15px; line-height: 1.6; }
.header-panel p:last-child { margin-bottom: 0; }
.search-form { display: flex; align-items: stretch; border: 1px solid var(--input-border); border-radius: 6px; overflow: clip; }
.search-form:focus-within { outline: 2px solid var(--focus); outline-offset: 3px; }
.search-form input { width: 100%; min-height: 48px; padding: 10px 12px; border: 0; background: var(--page); color: var(--text); font-size: 16px; outline: none; }
.search-form input::placeholder { color: var(--muted); opacity: 1; }
.search-submit { display: grid; place-items: center; flex: none; width: 48px; min-height: 48px; padding: 0; border: 0; background: var(--button-bg); color: var(--button-text); }
.search-submit:hover, .button:hover { background: var(--button-hover); text-decoration: none; }
.search-submit:focus-visible { outline-offset: -4px; outline-color: var(--focus); }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 20px; border-radius: 6px; background: var(--button-bg); color: var(--button-text); font-size: 15px; font-weight: 600; }
.notification-list { list-style: none; padding: 0; margin: 0; }
.notification-list a { display: block; padding: 12px 0; font-size: 15px; line-height: 1.5; }
.notification-list li + li { border-top: 1px solid var(--line); }
.site-main { max-width: var(--content-width); margin: 0 auto; padding: 28px 12px 48px; }
.site-main:focus { outline: none; }
.novels-heading { margin: 0 0 20px; font: 700 26px/1.2 Georgia, 'Times New Roman', serif; }
.empty-state { margin: 16px 0; color: var(--muted); font-size: 16px; line-height: 1.6; }

@media (min-width: 641px) {
    .header-inner { min-height: 72px; padding-inline: 24px; }
    .site-main { padding: 36px 24px 64px; }
    .header-panel { right: 24px; }
    .novels-heading { font-size: 30px; margin-bottom: 24px; }
}

@media (min-width: 901px) {
    .desktop-nav { display: flex; align-items: center; justify-content: center; gap: 28px; margin-inline: auto; }
    .desktop-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 0; border-bottom: 2px solid transparent; color: var(--muted); font-size: 14px; line-height: 1.5; font-weight: 600; white-space: nowrap; }
    .desktop-nav a:hover, .desktop-nav a[aria-current="page"] { color: var(--text); border-bottom-color: currentColor; text-decoration: none; }
}

@media (prefers-reduced-motion: no-preference) {
    .icon-button, .button, .search-submit { transition: background-color 120ms ease-out; }
}

.reading-content { max-width: 70ch; margin-inline: auto; font: 18px/1.8 Georgia, serif; overflow-wrap: anywhere; }
.reading-content img { max-width: 100%; height: auto; }
