:root { --ink: #172b4d; --ink-2: #33486c; --paper: #f7f4ed; --surface: #fffdf8; --line: #ded9cd; --muted: #6f7785; --gold: #f2b84b; --teal: #1f7a78; --blue: #2864dc; --shadow: 0 18px 50px rgba(23, 43, 77, 0.12); --radius: 22px; }
* { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; line-height: 1.55; }
a { color: inherit; text-decoration: none; }
button,
input,
textarea { font: inherit; }
button,
summary,
a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
img { max-width: 100%; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 100; padding: 0.75rem 1rem; background: white; border-radius: 8px; }
.skip-link:focus { top: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.site-header { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--paper) 88%, transparent); border-bottom: 1px solid rgba(23, 43, 77, 0.09); backdrop-filter: blur(18px); }
.header-inner { max-width: 1240px; height: 76px; margin: auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand-mark,
.raman-orb { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--ink); color: white; font: 700 19px Georgia, serif; box-shadow: inset -6px -6px 0 rgba(242, 184, 75, 0.24); }
.brand strong { display: block; letter-spacing: -0.02em; }
.brand small { display: block; color: var(--muted); font-size: 11px; margin-top: -2px; }
.header-actions { display: flex; align-items: center; gap: 18px; }
.nav-link { padding: 10px 4px; color: var(--muted); font-weight: 650; }
.nav-link.active { color: var(--ink); }
.button,
.google-button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 20px; border: 0; border-radius: 13px; color: white; background: var(--ink); font-weight: 750; cursor: pointer; box-shadow: 0 9px 20px rgba(23, 43, 77, 0.16); }
.button:hover,
.google-button:hover { transform: translateY(-1px); }
.button-small { min-height: 38px; padding: 0 15px; border-radius: 10px; font-size: 14px; }
.profile-menu { position: relative; }
.profile-menu summary { list-style: none; cursor: pointer; }
.profile-menu summary::-webkit-details-marker { display: none; }
.profile-menu summary img,
.profile-menu summary > span { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; object-fit: cover; background: var(--ink); color: white; font-weight: 700; }
.profile-popover { position: absolute; right: 0; top: 48px; width: 240px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: var(--shadow); }
.profile-popover strong,
.profile-popover small { display: block; overflow: hidden; text-overflow: ellipsis; }
.profile-popover small { color: var(--muted); margin: 3px 0 12px; }
.text-button { padding: 8px 0; border: 0; background: none; color: #a43838; font-weight: 700; cursor: pointer; }
.hero { max-width: 1240px; min-height: 690px; margin: auto; padding: 72px 24px 56px; display: grid; grid-template-columns: 1.02fr 0.98fr; align-items: center; gap: 72px; }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; color: var(--teal); text-transform: uppercase; letter-spacing: 0.14em; font-size: 12px; font-weight: 850; }
.eyebrow::before { content: ''; width: 24px; height: 2px; background: var(--gold); }
.hero h1 { margin: 20px 0 22px; font: 700 clamp(48px, 6vw, 82px)/0.98 Georgia, 'Times New Roman', serif; letter-spacing: -0.055em; }
.hero h1 span { color: var(--teal); }
.hero-copy > p { max-width: 650px; color: var(--ink-2); font-size: clamp(17px, 2vw, 20px); }
.hero-actions { margin-top: 32px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.google-button { background: white; color: #25272b; border: 1px solid var(--line); box-shadow: 0 10px 25px rgba(23, 43, 77, 0.1); }
.google-button svg { width: 21px; margin-right: 12px; }
.privacy-note { max-width: 220px; color: var(--muted); font-size: 12px; }
.hero-preview { overflow: hidden; border: 1px solid rgba(23, 43, 77, 0.12); border-radius: 25px; background: white; box-shadow: 0 30px 80px rgba(23, 43, 77, 0.18); transform: rotate(1deg); }
.preview-bar { height: 47px; padding: 0 18px; display: flex; gap: 7px; align-items: center; border-bottom: 1px solid #e6e8ec; background: #f8f9fb; }
.preview-bar span { width: 9px; height: 9px; border-radius: 50%; background: #d4d8df; }
.preview-bar b { margin-left: auto; margin-right: auto; font-size: 11px; color: var(--muted); }
.preview-body { min-height: 450px; display: grid; grid-template-columns: 1.2fr 0.8fr; background: #e8ebef; }
.preview-page { margin: 28px 12px 28px 28px; padding: 48px 30px; background: #fffdf6; box-shadow: 0 8px 25px rgba(0, 0, 0, 0.09); }
.preview-page small { color: var(--teal); font-weight: 800; letter-spacing: 0.08em; }
.preview-page h2 { font: 700 28px/1.12 Georgia, serif; }
.page-lines { height: 105px; margin-top: 25px; opacity: 0.4; background: repeating-linear-gradient(to bottom, var(--muted) 0 2px, transparent 2px 17px); }
.page-lines.short { width: 70%; height: 70px; }
.preview-chat { margin: 18px 18px 18px 6px; padding: 24px 18px; align-self: end; border-radius: 18px; background: var(--ink); color: white; box-shadow: 0 14px 30px rgba(23, 43, 77, 0.25); }
.preview-chat .raman-orb { background: white; color: var(--ink); margin-bottom: 12px; }
.preview-chat p { color: #dce4f1; font-size: 13px; }
.preview-chat button { border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 999px; padding: 7px 11px; background: transparent; color: white; font-size: 12px; }
.trust-strip { max-width: 1192px; margin: 0 auto 70px; padding: 22px 30px; display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid var(--line); border-radius: 18px; background: rgba(255, 255, 255, 0.58); }
.trust-strip div { display: flex; flex-direction: column; align-items: center; border-right: 1px solid var(--line); }
.trust-strip div:last-child { border: 0; }
.trust-strip strong { font: 700 28px Georgia, serif; }
.trust-strip span { color: var(--muted); font-size: 12px; }
.feature-section { max-width: 1192px; margin: 0 auto 90px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-section > div { padding: 30px; border-top: 3px solid var(--ink); background: rgba(255, 255, 255, 0.38); }
.feature-number { color: var(--gold); font-weight: 850; }
.feature-section h2 { margin-bottom: 8px; font: 700 25px Georgia, serif; }
.feature-section p { color: var(--muted); }
.library-shell { min-height: 80vh; max-width: 1240px; margin: auto; padding: 54px 24px 90px; }
.library-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.library-heading h1 { margin: 14px 0 7px; font: 700 clamp(37px, 5vw, 58px)/1.05 Georgia, serif; letter-spacing: -0.04em; }
.library-heading p { color: var(--muted); }
.search-box { width: min(360px, 100%); min-height: 50px; padding: 0 15px; display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; }
.recent-section { margin: 45px 0 50px; }
.section-heading h2 { font: 700 25px Georgia, serif; }
.recent-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.recent-card { min-height: 130px; padding: 20px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.recent-card strong { margin: 6px 0 auto; }
.recent-card small { color: var(--muted); }
.book-class { color: var(--teal); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.class-tabs { position: sticky; top: 76px; z-index: 20; margin: 0 -4px 28px; padding: 12px 4px; display: flex; gap: 8px; overflow-x: auto; background: var(--paper); scrollbar-width: none; }
.class-tab { flex: none; padding: 9px 16px; border: 1px solid var(--line); border-radius: 999px; background: transparent; font-weight: 700; cursor: pointer; }
.class-tab.active { background: var(--ink); border-color: var(--ink); color: white; }
.book-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px 20px; }
.book-card { min-width: 0; }
.book-card[hidden] { display: none; }
.book-cover { aspect-ratio: 0.76; padding: 22px; display: flex; flex-direction: column; border-radius: 8px 16px 16px 8px; color: white; box-shadow: 7px 12px 22px rgba(23, 43, 77, 0.15); transition: transform 0.18s ease; }
.book-card:hover .book-cover { transform: translateY(-5px) rotate(0.5deg); }
.book-cover span { font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; opacity: 0.8; }
.book-cover strong { margin: auto 0; font: 700 clamp(19px, 2vw, 27px)/1.05 Georgia, serif; overflow-wrap: anywhere; }
.book-cover small { opacity: 0.7; }
.cover-1 { background: linear-gradient(145deg, #164e63, #0f766e); }
.cover-2 { background: linear-gradient(145deg, #7c2d12, #c2410c); }
.cover-3 { background: linear-gradient(145deg, #312e81, #5b21b6); }
.cover-4 { background: linear-gradient(145deg, #1e3a5f, #2563a5); }
.cover-5 { background: linear-gradient(145deg, #3f6212, #648d24); }
.cover-6 { background: linear-gradient(145deg, #6b2138, #a33d58); }
.book-meta { padding: 15px 3px; }
.book-meta > span { color: var(--teal); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.book-meta h2 { margin: 3px 0 4px; font-size: 16px; line-height: 1.25; }
.book-meta small { color: var(--muted); }
.empty-state { padding: 70px; text-align: center; color: var(--muted); }
.study-app { height: 100dvh; overflow: hidden; background: #e7e9ed; }
.study-header { height: 68px; padding: 0 18px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; border-bottom: 1px solid #d5d9df; background: var(--surface); }
.study-back { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; font-size: 23px; }
.study-back:hover { background: #eef0f3; }
.study-title { min-width: 0; }
.study-title span,
.study-title strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.study-title span { color: var(--muted); font-size: 11px; }
.study-title strong { font-size: 15px; }
.study-header-actions { display: flex; align-items: center; gap: 8px; }
.icon-button { width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; font-size: 21px; cursor: pointer; }
.icon-button:hover { background: #edf0f4; }
.assistant-toggle { display: none; height: 38px; padding: 0 14px; border: 0; border-radius: 10px; color: white; background: var(--ink); font-weight: 750; cursor: pointer; }
.assistant-toggle span { color: var(--gold); }
.study-workspace { height: calc(100dvh - 68px); display: grid; grid-template-columns: minmax(0, 1fr) 430px; }
.reader-pane { min-width: 0; display: grid; grid-template-rows: auto auto 1fr; }
.chapter-toolbar { min-height: 73px; padding: 10px 16px; display: flex; align-items: center; gap: 20px; background: white; border-bottom: 1px solid #d9dce2; }
.chapter-toolbar label span { display: block; margin-bottom: 3px; color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.chapter-toolbar input { border: 1px solid #d4d8df; border-radius: 8px; padding: 8px 10px; background: #fbfbfc; outline: 0; }
.chapter-toolbar input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(40, 100, 220, 0.12); }
.detected-context { min-width: 0; flex: 1; }
.detected-context > span { display: block; margin-bottom: 3px; color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.detected-context strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.detected-context strong.loading { color: var(--muted); font-weight: 600; animation: pulse 1s infinite alternate; }
.page-range { display: flex; align-items: end; gap: 7px; }
.page-range input { width: 70px; }
.range-message { min-height: 29px; padding: 5px 16px; color: var(--muted); background: #f8f9fa; font-size: 12px; border-bottom: 1px solid #d9dce2; }
.range-message.error { color: #a43838; background: #fff0f0; }
.pdf-reader { width: 100%; height: 100%; border: 0; background: #52565d; }
.assistant-panel { min-width: 0; display: flex; flex-direction: column; border-left: 1px solid #d9d9d9; background: #fff; box-shadow: -8px 0 25px rgba(23, 43, 77, 0.04); }
.assistant-head { min-height: 64px; padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; gap: 11px; border-bottom: 1px solid #ececec; }
.assistant-identity { min-width: 0; display: flex; align-items: center; gap: 10px; }
.raman-spark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: #111; color: white; font-size: 17px; }
.assistant-identity strong,
.assistant-identity span { display: block; }
.assistant-identity strong { color: #191919; font-size: 14px; }
.assistant-identity span { color: #767676; font-size: 10px; }
.assistant-identity i { width: 6px; height: 6px; display: inline-block; border-radius: 50%; background: #19a463; }
.assistant-actions { display: flex; align-items: center; }
.assistant-actions .icon-button { width: 34px; height: 34px; color: #555; font-size: 18px; }
.assistant-head #assistant-close { display: none; }
.study-tabs { flex: 0 0 auto; display: flex; gap: 3px; padding: 7px 8px; overflow-x: auto; border-bottom: 1px solid #ececec; scrollbar-width: none; }
.study-tabs::-webkit-scrollbar { display: none; }
.study-tabs button { flex: 0 0 auto; padding: 7px 10px; border: 0; border-radius: 8px; background: transparent; color: #747474; font-size: 10px; font-weight: 700; cursor: pointer; }
.study-tabs button:hover { background: #f4f4f4; color: #333; }
.study-tabs button.active { background: #111; color: #fff; }
.assistant-view { min-height: 0; flex: 1; display: flex; flex-direction: column; }
.assistant-view[hidden] { display: none; }
.setup-notice { margin: 12px; padding: 12px; border: 1px solid #efd59d; border-radius: 10px; background: #fff7df; font-size: 12px; }
.setup-notice p { margin: 4px 0 0; }
.chat-log { min-height: 0; flex: 1; padding: 18px 14px 28px; overflow-y: auto; overscroll-behavior: contain; scrollbar-color: #d4d4d4 transparent; }
.chat-welcome { max-width: 360px; margin: clamp(30px, 10vh, 90px) auto 20px; text-align: center; }
.chat-welcome[hidden] { display: none; }
.welcome-spark { width: 46px; height: 46px; margin: auto; display: grid; place-items: center; border: 1px solid #e5e5e5; border-radius: 15px; background: #f7f7f7; color: #111; font-size: 22px; }
.chat-welcome h2 { margin: 17px 0 6px; color: #202020; font-size: 20px; letter-spacing: -0.02em; }
.chat-welcome > p { margin: 0; color: #787878; font-size: 13px; }
.prompt-grid { margin-top: 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; text-align: left; }
.prompt-grid button { min-height: 72px; padding: 12px; border: 1px solid #e3e3e3; border-radius: 14px; background: #fff; cursor: pointer; transition: background 0.15s ease, border-color 0.15s ease; }
.prompt-grid button:hover { border-color: #cdcdcd; background: #f8f8f8; }
.prompt-grid strong,
.prompt-grid span { display: block; }
.prompt-grid strong { color: #292929; font-size: 12px; }
.prompt-grid span { margin-top: 3px; color: #858585; font-size: 10px; line-height: 1.35; }
.chat-message { width: 100%; margin: 0 auto 22px; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; color: #242424; font-size: 14px; }
.message-avatar { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: #111; color: white; font-size: 11px; font-weight: 750; }
.user-message { display: flex; justify-content: flex-end; }
.user-message .message-avatar { display: none; }
.user-message .message-content { max-width: 82%; padding: 10px 14px; border-radius: 18px; background: #f1f1f1; }
.assistant-message .message-content { min-width: 0; padding: 3px 2px; line-height: 1.6; }
.message-content p { margin: 0 0 10px; white-space: pre-wrap; }
.message-content p:last-child { margin-bottom: 0; }
.message-content ul { margin: 5px 0 12px; padding-left: 20px; }
.message-content li { margin: 5px 0; }
.error-message .message-content { color: #a43838; }
.thinking-dots { min-height: 28px; display: flex; align-items: center; gap: 4px; }
.thinking-dots i { width: 6px; height: 6px; border-radius: 50%; background: #9a9a9a; animation: thinking 1.2s infinite ease-in-out; }
.thinking-dots i:nth-child(2) { animation-delay: 0.16s; }
.thinking-dots i:nth-child(3) { animation-delay: 0.32s; }

@keyframes thinking {0%,
  60%,
  100% { transform: translateY(0); opacity: 0.4; }
30% { transform: translateY(-4px); opacity: 1; }

}
@keyframes pulse {to { opacity: 0.55; }

}.composer-area { padding: 8px 12px 10px; background: linear-gradient(to top, #fff 80%, rgba(255, 255, 255, 0.2)); }
.composer-context { max-width: calc(100% - 20px); margin: 0 auto 7px; display: flex; align-items: center; justify-content: center; gap: 5px; color: #777; font-size: 10px; }
.composer-context span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-form { padding: 8px 8px 8px 14px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 6px; border: 1px solid #d5d5d5; border-radius: 24px; background: #fff; box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08); transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.chat-form:focus-within { border-color: #b8b8b8; box-shadow: 0 3px 16px rgba(0, 0, 0, 0.1); }
.chat-form textarea { width: 100%; min-height: 28px; max-height: 180px; padding: 5px 0; resize: none; overflow-y: auto; border: 0; outline: 0; background: transparent; color: #222; line-height: 1.45; }
.chat-form textarea::placeholder { color: #8a8a8a; }
.chat-form button { width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 50%; background: #111; color: white; font-size: 18px; cursor: pointer; }
.chat-form button.stop { font-size: 10px; }
.chat-form button:disabled { opacity: 0.25; cursor: default; }
.assistant-disclaimer { display: block; padding-top: 7px; color: #8a8a8a; text-align: center; font-size: 9px; }
.reference-view { overflow-y: auto; overscroll-behavior: contain; }
.reference-content { padding: 22px 16px 36px; }
.reference-content > header { margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid #e8e8e8; }
.reference-content > header span { display: block; margin-bottom: 5px; color: #818181; font-size: 10px; font-weight: 750; letter-spacing: 0.06em; text-transform: uppercase; }
.reference-content > header h2 { margin: 0; font: 700 20px/1.2 Georgia, serif; letter-spacing: -0.015em; }
.summary-list { margin: 0; padding-left: 20px; color: #303030; font-size: 13px; line-height: 1.6; }
.summary-list li { margin-bottom: 11px; padding-left: 3px; }
.reference-list { display: grid; gap: 8px; }
.reference-list article { padding: 11px 12px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 9px; border: 1px solid #e4e4e4; border-radius: 11px; background: #fafafa; }
.reference-list p { margin: 0; color: #333; font-size: 12px; line-height: 1.5; white-space: pre-wrap; }
.formula-list article { background: #f5f7fb; }
.formula-list p { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
.page-reference { padding: 4px 6px; border: 0; border-radius: 6px; background: #e8edf8; color: #315aab; font-size: 9px; font-weight: 750; cursor: pointer; white-space: nowrap; }
.page-reference:hover { background: #dbe4f7; }
.reference-empty { margin: 40px 15px; color: #818181; font-size: 12px; line-height: 1.55; text-align: center; }
.reckoner-summary { margin-bottom: 14px; padding: 13px; border-radius: 12px; background: #f2f0e9; }
.reckoner-summary p { margin: 0 0 8px; color: #333; font-size: 12px; line-height: 1.5; }
.reckoner-summary p:last-child { margin-bottom: 0; }
.focus-mode .assistant-panel { display: none; }
.focus-mode .study-workspace { grid-template-columns: 1fr; }
.site-footer { max-width: 1192px; margin: 50px auto 0; padding: 35px 0 45px; display: grid; grid-template-columns: 1fr 1.5fr auto; gap: 30px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.site-footer strong { color: var(--ink); }
.error-page { max-width: 700px; min-height: 65vh; margin: auto; padding: 100px 24px; text-align: center; }
.error-page .raman-orb { margin: auto; }
.error-page h1 { font: 700 48px Georgia, serif; }
.error-page p { margin-bottom: 28px; color: var(--muted); }
.content-page { max-width: 900px; min-height: 65vh; margin: auto; padding: 72px 24px 90px; }
.narrow-page { max-width: 760px; }
.content-page h1 { margin: 16px 0 28px; font: 700 clamp(40px, 6vw, 62px)/1.04 Georgia, serif; letter-spacing: -0.04em; }
.content-page h2 { margin: 34px 0 8px; font: 700 25px Georgia, serif; }
.content-page p { color: var(--ink-2); }
.site-footer a { text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 1020px) {.hero { grid-template-columns: 1fr; gap: 45px; padding-top: 55px; }
.hero-copy { text-align: center; }
.hero-copy > p { margin-inline: auto; }
.hero-actions { justify-content: center; }
.hero-preview { max-width: 720px; margin: auto; transform: none; }
.book-grid { grid-template-columns: repeat(3, 1fr); }
.study-workspace { grid-template-columns: minmax(0, 1fr) 370px; }
.chapter-toolbar { flex-wrap: wrap; gap: 8px; }
.detected-context { flex-basis: 100%; }

}

@media (max-width: 760px) {.header-inner { height: 65px; padding: 0 16px; }
.brand small,
  .nav-link { display: none; }
.hero { min-height: auto; padding: 48px 18px 36px; }
.hero h1 { font-size: clamp(43px, 14vw, 64px); }
.hero-actions { flex-direction: column; }
.privacy-note { max-width: 300px; }
.preview-body { min-height: 390px; grid-template-columns: 1fr; }
.preview-page { margin: 18px; }
.preview-chat { width: 70%; margin: -140px 10px 16px auto; position: relative; }
.trust-strip { margin: 0 18px 50px; padding: 16px 8px; overflow-x: auto; grid-template-columns: repeat(5, 120px); }
.feature-section { margin: 0 18px 60px; grid-template-columns: 1fr; }
.library-shell { padding: 35px 16px 70px; }
.library-heading { align-items: stretch; flex-direction: column; }
.search-box { width: 100%; }
.recent-row { grid-template-columns: 1fr; }
.book-grid { grid-template-columns: repeat(2, 1fr); gap: 22px 13px; }
.book-cover { padding: 15px; }
.book-cover strong { font-size: 18px; }
.site-footer { margin-inline: 16px; padding-inline: 0; grid-template-columns: 1fr; gap: 12px; }
.study-header { height: 60px; padding: 0 10px; }
.study-title span { display: none; }
.assistant-toggle { display: block; }
.study-workspace { height: calc(100dvh - 60px); display: block; }
.reader-pane { height: 100%; }
.chapter-toolbar { min-height: auto; padding: 8px; }
.page-range { width: 100%; }
.page-range label { flex: 1; }
.page-range input { width: 100%; }
.page-range .button { flex: 1.2; }
.assistant-panel { position: fixed; z-index: 60; inset: 60px 0 0; transform: translateY(105%); transition: transform 0.25s ease; border: 0; box-shadow: 0 -20px 50px rgba(23, 43, 77, 0.2); }
.assistant-panel.open { transform: translateY(0); }
.assistant-head #assistant-close { display: grid; }
.chat-welcome { margin-top: clamp(24px, 8vh, 70px); }
.focus-mode .assistant-panel { display: flex; }

}

@media (max-width: 420px) {.book-grid { grid-template-columns: 1fr 1fr; }
.book-meta h2 { font-size: 14px; }
.study-header-actions > .icon-button { display: none; }

}

@media (prefers-reduced-motion: reduce) {*,
  *::before,
  *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }

}
