:root {
  --ink: #172226;
  --muted: #5d6a6f;
  --paper: #fffdf8;
  --surface: #f3f0e8;
  --accent: #0f766e;
  --accent-dark: #075a55;
  --line: #d9d5c9;
  --danger: #b42318;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 7%, rgba(232, 190, 95, .28), transparent 19rem),
    radial-gradient(circle at 94% 24%, rgba(25, 128, 122, .17), transparent 22rem),
    linear-gradient(135deg, #f6f1e7 0%, #eef3ec 49%, #f3eee5 100%);
  font-family: Georgia, 'Times New Roman', serif;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; }

.site-header {
  min-height: 74px;
  padding: 14px clamp(18px, 5vw, 70px);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: linear-gradient(105deg, #092a2b 0%, #155c59 51%, #0d3434 100%);
  color: white;
  box-shadow: 0 6px 20px rgba(12, 53, 51, .25);
}
.site-header::after {
  content: '✦  ✦  ✦  ✦  ✦  ✦  ✦  ✦';
  position: absolute;
  right: -28px;
  top: -9px;
  color: rgba(255,255,255,.1);
  font-size: 2.1rem;
  letter-spacing: 1.7rem;
  white-space: nowrap;
  transform: rotate(-6deg);
}
.brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 11px; color: white; text-decoration: none; font-size: 1.25rem; font-weight: bold; }
.brand span, .book-mark { width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 50%; background: linear-gradient(145deg, #ffe299, #d9a83e); color: #173133; box-shadow: inset 0 0 0 2px rgba(255,255,255,.38), 0 2px 8px rgba(0,0,0,.18); font-family: Arial, sans-serif; font-size: .66rem; font-weight: 900; letter-spacing: .05em; }
.site-header nav { position: relative; z-index: 1; display: flex; gap: 20px; font-family: Arial, sans-serif; font-size: .92rem; }
.site-header nav a { color: white; text-decoration: none; opacity: .9; }
.app-shell { max-width: 1120px; padding: clamp(28px, 6vw, 74px) clamp(18px, 5vw, 40px) 58px; margin: auto; }

.hero { max-width: 710px; margin-bottom: 42px; padding: 0 0 0 22px; border-left: 4px solid #dfae48; }
.eyebrow, .book-number, .paper-meta { margin: 0; color: var(--accent); font-family: Arial, sans-serif; font-weight: bold; letter-spacing: .11em; font-size: .73rem; text-transform: uppercase; }
h1, h2 { line-height: 1.1; }
.hero h1 { margin: 8px 0 12px; font-size: clamp(2.3rem, 7vw, 4.8rem); letter-spacing: -.04em; text-shadow: 0 2px 0 #fff; }
.hero p:not(.eyebrow) { color: var(--muted); font-size: 1.08rem; line-height: 1.55; }
.book-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 20px; }
.book-card {
  --cover: #d3e5dd;
  --spine: #4c8b7d;
  min-height: 224px;
  padding: 27px 28px 25px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(135deg, #fffefa 0%, var(--cover) 100%);
  border: 1px solid rgba(46, 76, 69, .18);
  border-radius: 8px 16px 16px 8px;
  box-shadow: 10px 12px 0 rgba(29, 87, 81, .08), 0 13px 27px rgba(20, 37, 38, .08);
  transition: transform .18s ease, box-shadow .18s ease;
}
.book-card:hover { transform: translateY(-5px) rotate(-.5deg); box-shadow: 12px 17px 0 rgba(29, 87, 81, .08), 0 19px 30px rgba(20,37,38,.12); }
.book-card::before { content: '✦'; position: absolute; z-index: -1; right: 18px; top: 14px; color: rgba(255,255,255,.54); font-size: 6rem; line-height: 1; }
.book-card::after { content: ''; position: absolute; left: 0; top: 0; width: 10px; height: 100%; background: var(--spine); box-shadow: 2px 0 0 rgba(255,255,255,.35); }
.book-card:nth-child(4n + 2) { --cover: #fae0bc; --spine: #c46d36; }
.book-card:nth-child(4n + 3) { --cover: #d9d2ee; --spine: #7164a5; }
.book-card:nth-child(4n + 4) { --cover: #efcbd0; --spine: #a45e68; }
.book-card-cover { width: calc(100% + 56px); height: 128px; margin: -27px -28px 19px; display: block; object-fit: cover; border-bottom: 5px solid rgba(255,255,255,.78); }
.book-card h2 { margin: 18px 0 8px; font-size: 1.75rem; }
.book-card p { color: var(--muted); }
.card-link { display: flex; justify-content: space-between; margin-top: 34px; font-family: Arial, sans-serif; font-weight: bold; text-decoration: none; }
.card-link span { color: var(--accent); }

.reader-topbar { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin: 0 auto 20px; max-width: 830px; font-family: Arial, sans-serif; font-size: .88rem; }
.reader-topbar a { color: var(--accent); font-weight: bold; text-decoration: none; }
.book-search { max-width: 830px; margin: 0 auto 20px; padding: 13px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; background: #fffdf8; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 5px 14px rgba(24,40,40,.05); }
.book-search label { grid-column: 1 / -1; }
.book-search button { white-space: nowrap; }
.search-panel { max-width: 830px; margin: 0 auto; padding: clamp(24px, 5vw, 42px); background: linear-gradient(145deg, #fffefa, #f6f2e6); border: 1px solid var(--line); border-radius: 15px; box-shadow: 0 15px 35px rgba(24,40,40,.08); }
.search-panel h1 { margin: 8px 0 25px; font-size: clamp(1.8rem, 5vw, 2.7rem); }
.search-panel .book-search { max-width: none; margin-bottom: 25px; }
.search-summary { margin: 0 0 16px; color: var(--muted); }
.search-results { display: grid; gap: 12px; }
.search-result { display: block; padding: 16px 18px; background: #fffdf8; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 7px; color: var(--ink); text-decoration: none; }
.search-result span { color: var(--accent); font-family: Arial, sans-serif; font-size: .85rem; font-weight: bold; }
.search-result p { margin: 7px 0 0; color: var(--muted); line-height: 1.55; }
.search-result:hover { background: #fff7df; }
.settings-panel { max-width: 650px; margin: 0 auto; padding: clamp(24px, 5vw, 42px); background: linear-gradient(145deg, #fffefa, #f6f2e6); border: 1px solid var(--line); border-radius: 15px; box-shadow: 0 15px 35px rgba(24,40,40,.08); }
.settings-panel h1 { margin: 8px 0 13px; font-size: clamp(1.8rem, 5vw, 2.7rem); }
.settings-panel > p:not(.eyebrow):not(.message) { color: var(--muted); line-height: 1.55; }
.account-form { display: grid; gap: 16px; margin-top: 25px; }
.account-form button { justify-self: start; }
.search-hit { padding: 1px 3px; background: #ffe17b; color: inherit; border-radius: 2px; box-shadow: 0 0 0 2px rgba(205,142,16,.32); scroll-margin-top: 110px; }
.search-focus { animation: search-pulse 1.2s ease-in-out 2; }
@keyframes search-pulse { 50% { background: #ffb83e; box-shadow: 0 0 0 5px rgba(205,142,16,.22); } }
.paper { width: min(100%, 210mm); min-height: 297mm; margin: auto; padding: clamp(28px, 7vw, 76px); position: relative; overflow: hidden; background: linear-gradient(130deg, #fffefa, #fdf9ef); border: 1px solid #e5e1d8; box-shadow: 0 12px 32px rgba(24, 40, 40, .1); }
.paper::before, .paper::after { content: '❧'; position: absolute; color: #d7ae52; font-size: 3rem; opacity: .65; }
.paper::before { left: 22px; top: 18px; }
.paper::after { right: 22px; bottom: 14px; transform: rotate(180deg); }
.paper h1 { margin: 29px 0 45px; font-size: clamp(2.2rem, 6vw, 3.7rem); letter-spacing: -.035em; }
.book-cover-reading { width: min(100%, 650px); max-height: 420px; display: block; margin: 18px auto 26px; object-fit: contain; background: #f4eee1; border: 7px solid #fff; border-radius: 7px; box-shadow: 0 9px 22px rgba(24,40,40,.15); }
.page-title { margin: -22px 0 34px; color: #72592f; font-size: clamp(1.25rem, 3vw, 1.7rem); font-weight: 600; }
.page-content { max-width: 68ch; font-size: clamp(1.05rem, 2.4vw, 1.22rem); line-height: 1.85; }
.empty-page { color: var(--muted); font-style: italic; }
.page-navigation { max-width: 830px; padding: 24px 0 8px; margin: auto; display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; font-family: Arial, sans-serif; font-size: .88rem; }
.page-navigation a { color: var(--accent); font-weight: bold; text-decoration: none; }
.page-navigation a:last-child { text-align: right; }
.page-navigation span:nth-child(2) { color: var(--muted); }
.print-button { display: block; margin: 14px auto; padding: 11px 15px; border: 1px solid var(--line); border-radius: 7px; background: white; color: var(--ink); cursor: pointer; font-family: Arial, sans-serif; font-weight: bold; }

.login-body { min-height: 100vh; display: grid; place-items: center; padding: 22px; background: radial-gradient(circle at 15% 20%, #e9c66d 0 2%, transparent 18%), radial-gradient(circle at 85% 80%, #25857e 0 3%, transparent 22%), #123334; }
.login-card { width: min(100%, 430px); padding: 43px 36px; position: relative; text-align: center; background: linear-gradient(145deg, #fffefa, #f6efdb); border: 1px solid rgba(236,200,116,.85); border-radius: 18px; box-shadow: 0 22px 55px rgba(0, 0, 0, .25), inset 0 0 0 7px rgba(255,255,255,.42); }
.login-card::before, .login-card::after { content: '✦'; position: absolute; color: #daaf51; font-size: 1.3rem; }
.login-card::before { left: 18px; top: 16px; }
.login-card::after { right: 18px; bottom: 16px; }
.login-card .book-mark { margin: auto; width: 56px; height: 56px; font-size: .78rem; }
.login-card h1 { margin: 17px 0 9px; font-size: 2.1rem; }
.login-card > p { color: var(--muted); line-height: 1.5; }
.stacked-form, .edit-form { text-align: left; display: grid; gap: 16px; margin-top: 26px; }
label { display: grid; gap: 7px; font-family: Arial, sans-serif; font-size: .84rem; font-weight: bold; }
input, select, textarea { width: 100%; padding: 11px 12px; border: 1px solid #c7c5bd; border-radius: 7px; background: rgba(255,255,255,.82); color: var(--ink); font-family: Arial, sans-serif; font-weight: normal; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(223,174,72,.26); border-color: #bf8932; }
button { padding: 12px 15px; border: 0; border-radius: 7px; background: linear-gradient(135deg, #13877d, #0b625d); box-shadow: 0 3px 0 #094c49; color: #fff; cursor: pointer; font-family: Arial, sans-serif; font-weight: bold; }
button:hover { background: linear-gradient(135deg, #15958a, #0b625d); }
.message { padding: 10px 12px; border-radius: 7px; font-family: Arial, sans-serif; font-size: .9rem; text-align: left; }
.error { color: #7a271a; background: #fef3f2; }
.success { color: #065f46; background: #ecfdf3; }

.editor-panel { padding: clamp(20px, 5vw, 40px); background: linear-gradient(145deg, #fffefa, #f6f2e6); border: 1px solid var(--line); border-radius: 15px; box-shadow: 0 15px 35px rgba(24,40,40,.08); }
.editor-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 28px; border-bottom: 1px solid var(--line); padding-bottom: 20px; }
.editor-heading h1 { margin: 7px 0 0; font-size: clamp(1.7rem, 5vw, 2.6rem); }
.rename-form { min-width: 200px; display: grid; gap: 8px; }
.rename-form button { justify-self: start; }
.jump-form { display: flex; flex-wrap: wrap; gap: 12px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.jump-form label { min-width: 160px; }
.page-title-form { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.page-title-form label { flex: 1 1 280px; }
.writer-studio { display: grid; gap: 18px; margin-top: 24px; padding: 20px; border: 1px solid #b7d7d0; border-radius: 11px; background: linear-gradient(135deg, #eef9f5, #fffdf5); }
.writer-studio h2 { margin: 5px 0 7px; font-size: 1.3rem; }
.writer-studio p { margin: 0; color: var(--muted); line-height: 1.55; }
.writer-tool-grid { display: grid; grid-template-columns: minmax(150px, .7fr) 1fr 1fr; gap: 12px; }
.writer-tool-actions, .writer-stats { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.writer-stats { gap: 18px; padding: 12px 14px; border-radius: 8px; background: rgba(255,255,255,.76); color: #304b48; font-family: Arial, sans-serif; font-size: .9rem; }
.writer-stats b { color: #0b625d; font-size: 1.12rem; }
.writer-tool-status { font-family: Arial, sans-serif; font-size: .87rem; }
.grammar-note { padding: 12px 14px; border-left: 3px solid #c58d31; background: rgba(255,247,222,.75); font-family: Arial, sans-serif; font-size: .86rem; }
.edit-form textarea { min-height: 390px; resize: vertical; line-height: 1.6; }
.edit-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 11px; align-items: end; }
.edit-actions > button, .edit-actions > a { min-height: 44px; display: grid; place-items: center; text-align: center; white-space: nowrap; }
.secondary-button { display: inline-block; padding: 10px 13px; border: 1px solid var(--line); border-radius: 7px; background: #fffdf8; box-shadow: none; color: var(--ink); text-decoration: none; font-family: Arial, sans-serif; font-size: .85rem; font-weight: bold; cursor: pointer; }
.add-page-form { margin-top: 22px; }
.page-photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-top: 30px; max-width: 68ch; }
.page-photos img { width: 100%; max-height: 500px; object-fit: contain; background: #f3ede0; border: 7px solid #fff; border-radius: 5px; box-shadow: 0 8px 20px rgba(24,40,40,.14); }
.page-video-block { max-width: 760px; margin: 28px auto; }
.page-video-block video { width: 100%; max-height: 520px; display: block; border: 7px solid #fff; border-radius: 6px; background: #102829; box-shadow: 0 8px 20px rgba(24,40,40,.14); }
.page-drawing-block { max-width: 100%; margin: 30px 0; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: #fffdf8; }
.page-drawing-block p { margin: 0 0 10px; }
.page-drawing-block img { width: 100%; display: block; background: #fff; border: 1px solid #ded8c9; }
.page-pdf-block { max-width: 900px; margin: 30px auto; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: #fffdf8; }
.page-pdf-block p { margin: 0 0 10px; }
.page-pdf-block iframe { width: 100%; height: min(75vh, 760px); display: block; border: 1px solid #cbc3b4; background: #fff; }
.page-pdf-block .secondary-button { margin-top: 12px; }
.photo-editor { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.photo-editor h2 { margin: 0 0 7px; font-size: 1.42rem; }
.photo-editor p { margin: 0; color: var(--muted); font-size: .93rem; line-height: 1.55; }
.photo-upload-form, .video-upload-form, .audio-upload-form, .pdf-upload-form { display: flex; flex-wrap: wrap; align-items: end; gap: 13px; margin-top: 15px; }
.photo-upload-form label, .video-upload-form label, .audio-upload-form label, .pdf-upload-form label { flex: 1 1 250px; }
.photo-upload-form button, .video-upload-form button, .audio-upload-form button, .pdf-upload-form button { white-space: nowrap; }
.uploaded-photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-top: 18px; }
.uploaded-photos img { width: 100%; height: 125px; object-fit: cover; border: 4px solid #fff; border-radius: 7px; box-shadow: 0 5px 13px rgba(24,40,40,.12); }
.content-block-text + .page-photo-block { margin-top: 26px; }
.block-guide, .add-content-block { margin-top: 26px; padding: 19px 20px; border-left: 4px solid var(--accent); background: rgba(252,245,222,.65); }
.block-guide h2, .add-content-block h2 { margin: 0 0 7px; font-size: 1.2rem; }
.block-guide p, .add-content-block p { margin: 0; color: var(--muted); line-height: 1.55; }
.content-block { margin-top: 22px; padding: 20px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.42); }
.block-editor { display: grid; gap: 14px; }
.block-editor textarea { min-height: 240px; resize: vertical; line-height: 1.65; }
.underline-tip { margin: -4px 0 0; color: var(--muted); font-family: Arial, sans-serif; font-size: .82rem; }
.underline-button { text-decoration: none; }
.color-picker { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 7px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; background: #fffdf8; color: var(--ink); white-space: nowrap; }
.color-picker input[type="color"] { width: 34px; height: 28px; padding: 1px; border: 1px solid #c7c5bd; border-radius: 4px; cursor: pointer; }
.formatting-options-bar, .book-cover-bar { margin-top: 18px; border: 1px solid #bad1cd; border-radius: 8px; overflow: hidden; background: #fffdf8; }
.formatting-options-bar summary, .book-cover-bar summary { padding: 13px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; cursor: pointer; list-style: none; background: linear-gradient(135deg, #edf5f1, #fdf7df); color: #124f4a; font-family: Arial, sans-serif; font-weight: bold; }
.formatting-options-bar summary::-webkit-details-marker, .book-cover-bar summary::-webkit-details-marker { display: none; }
.formatting-options-bar summary::after, .book-cover-bar summary::after { content: '⌄'; font-size: 1.25rem; }
.formatting-options-bar[open] summary::after, .book-cover-bar[open] summary::after { content: '⌃'; }
.formatting-options-content, .book-cover-content { padding: 16px; background: #f9fcfa; }
.format-select { width: 100%; min-width: 0; display: grid; gap: 4px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; background: #fffdf8; color: var(--ink); white-space: nowrap; }
.format-select select { min-width: 0; padding: 7px 8px; }
.editor-save-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.cover-upload-form { display: flex; flex-wrap: wrap; align-items: end; gap: 13px; }
.cover-upload-form label { flex: 1 1 260px; }
.current-cover { margin-top: 15px; display: flex; flex-wrap: wrap; align-items: end; gap: 14px; }
.current-cover img { width: min(100%, 240px); max-height: 170px; object-fit: cover; border: 4px solid #fff; border-radius: 6px; box-shadow: 0 5px 13px rgba(24,40,40,.12); }
.text-font.font-serif { font-family: Georgia, 'Times New Roman', serif; }
.text-font.font-sans { font-family: Arial, Helvetica, sans-serif; }
.text-font.font-mono { font-family: 'Courier New', monospace; }
.text-font.font-hand { font-family: cursive; }
.text-headline { display: block; margin: .55em 0 .28em; color: #183f3c; font-family: Georgia, 'Times New Roman', serif; font-weight: 800; line-height: 1.18; }
.headline-1 { font-size: 1.85em; }
.headline-2 { font-size: 1.48em; }
.headline-3 { font-size: 1.22em; }
.text-effect.effect-shadow { text-shadow: 2px 2px 3px rgba(20,38,38,.35); }
.text-effect.effect-glow { text-shadow: 0 0 5px #f4bc4e, 0 0 10px rgba(244,188,78,.52); }
.text-effect.effect-outline { color: #fffdf8; text-shadow: -1px -1px 0 #17423f, 1px -1px 0 #17423f, -1px 1px 0 #17423f, 1px 1px 0 #17423f; }
.text-effect.effect-highlight { padding: 0 3px; background: linear-gradient(transparent 38%, #ffe277 38%); }
.live-code-preview { margin-top: 4px; padding: 13px 14px 2px; border: 1px solid #b9d3cf; border-radius: 8px; background: #eef6f3; }
.live-code-preview .eyebrow { margin: 0; }
.code-block { display: block; margin: 1em 0; padding: 16px 18px; overflow-x: auto; border: 1px solid #244b50; border-radius: 8px; background: #10282d; color: #eaf7f4; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), 0 5px 13px rgba(15,45,47,.16); font-family: 'Courier New', Consolas, monospace; font-size: .86em; line-height: 1.6; white-space: pre-wrap; tab-size: 4; }
.code-block code { font: inherit; color: inherit; }
.code-keyword { color: #ff9ac1; font-weight: bold; }
.code-string { color: #b9e986; }
.code-number { color: #ffd37e; }
.code-comment { color: #82a4ab; font-style: italic; }
.code-tag { color: #7edcf1; }
.after-block-form { padding-top: 16px; margin-top: 18px; border-top: 1px dashed #c6c1ae; }
.editing-options-bar { margin-top: 18px; border: 1px solid #bad1cd; border-radius: 8px; overflow: hidden; background: #fffdf8; }
.editing-options-bar summary { padding: 13px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; cursor: pointer; list-style: none; background: linear-gradient(135deg, #e6f2ee, #fdf7df); color: #124f4a; font-family: Arial, sans-serif; font-weight: bold; }
.editing-options-bar summary::-webkit-details-marker { display: none; }
.editing-options-bar summary::after { content: '⌄'; font-size: 1.25rem; }
.editing-options-bar[open] summary::after { content: '⌃'; }
.editing-options-content { padding: 0 16px 14px; }
.editing-options-content .after-block-form { margin-top: 0; padding: 15px 0; }
.editing-options-content .after-block-form:first-child { border-top: 0; }
.image-editor { display: grid; gap: 14px; }
.image-editor > img { width: min(100%, 560px); max-height: 460px; object-fit: contain; background: #f3ede0; border: 7px solid #fff; border-radius: 5px; box-shadow: 0 8px 20px rgba(24,40,40,.14); }
.video-editor, .audio-editor, .drawing-editor { display: grid; gap: 14px; }
.video-editor > video { width: min(100%, 700px); max-height: 500px; background: #102829; border: 7px solid #fff; border-radius: 5px; box-shadow: 0 8px 20px rgba(24,40,40,.14); }
.audio-editor > audio, .page-audio-block > audio { width: min(100%, 640px); }
.drawing-editor > img { width: min(100%, 800px); background: #fff; border: 1px solid #ded8c9; box-shadow: 0 6px 16px rgba(24,40,40,.11); }
.pdf-editor { display: grid; gap: 14px; }
.pdf-editor > iframe { width: 100%; height: min(70vh, 700px); border: 1px solid #cbc3b4; background: #fff; }
.page-audio-block { margin-top: 26px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: rgba(243,240,232,.66); }
.page-audio-block .eyebrow { margin-bottom: 10px; }
.delete-media-form { margin-top: 15px; }
.danger-button { background: var(--danger); box-shadow: 0 3px 0 #7d160f; }
.add-after-form { margin-top: 14px; }
.add-content-block .photo-upload-form { margin-top: 18px; }
.handwriting-form { display: grid; gap: 12px; }
.handwriting-form .eyebrow { margin: 0; }
.handwriting-canvas { width: 100%; min-height: 260px; display: block; border: 1px solid #bfb7a5; border-radius: 7px; background: repeating-linear-gradient(to bottom, #fffefa 0, #fffefa 34px, #d8e7ef 35px, #fffefa 36px); cursor: crosshair; touch-action: none; }
.handwriting-actions { display: flex; flex-wrap: wrap; align-items: end; gap: 11px; }
.handwriting-actions label { width: auto; min-width: 120px; }
.handwriting-actions input[type="color"] { width: 48px; min-height: 38px; padding: 2px; }
.handwriting-actions input[type="range"] { min-width: 130px; padding: 0; }
.focus-mode .site-header, .focus-mode .editor-heading, .focus-mode .book-cover-bar, .focus-mode .jump-form, .focus-mode .page-title-form, .focus-mode .writer-studio, .focus-mode .block-guide, .focus-mode .add-content-block, .focus-mode .add-page-form, .focus-mode .editing-options-bar, .focus-mode .formatting-options-bar, .focus-mode .after-block-form, .focus-mode .image-editor, .focus-mode .video-editor, .focus-mode .audio-editor, .focus-mode .drawing-editor, .focus-mode .pdf-editor, .focus-mode .delete-media-form { display: none !important; }
.focus-mode .editor-panel { max-width: 860px; margin: 0 auto; }
.focus-mode .content-block { border-color: transparent; background: transparent; box-shadow: none; }

@media (max-width: 620px) {
  .site-header { min-height: 62px; }
  .site-header nav { gap: 13px; }
  .reader-topbar { align-items: flex-start; font-size: .78rem; }
  .reader-topbar span { display: none; }
  .paper { min-height: calc(100vh - 150px); padding: 31px 22px; }
  .paper h1 { margin: 24px 0 32px; }
  .page-navigation { font-size: .78rem; }
  .book-search { grid-template-columns: 1fr; }
  .editor-heading { display: block; }
  .rename-form { margin-top: 20px; }
  .writer-tool-grid { grid-template-columns: 1fr; }
}

@media print {
  body { background: #fff; }
  .site-header, .reader-topbar, .page-navigation, .print-button { display: none !important; }
  .app-shell { padding: 0; max-width: none; }
  .paper { width: 210mm; min-height: 297mm; padding: 18mm; margin: 0; border: 0; box-shadow: none; }
  @page { size: A4; margin: 0; }
}
/* पहले पेज की दोनों साइड की खाली जगह हटाएँ */

