:root { color-scheme: light; font-family: Georgia, 'Times New Roman', serif; color: #49301d; background: #976133; --wood: #c69251; --paper: #f7efdd; --ink: #513b29; --focus: #294f61; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { font: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--focus); outline-offset: 5px; }
.toolbar { height: 78px; padding: 0 max(24px, env(safe-area-inset-right)) 0 max(24px, env(safe-area-inset-left)); display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 2; background: linear-gradient(#f4d79d, #d4a362 49%, #c4914e 51%, #dbaf6b); border-top: 1px solid #fce6ba; border-bottom: 1px solid #7c4c25; box-shadow: 0 2px 5px #49270890, inset 0 -2px #ecc991; }
h1 { position: absolute; left: 50%; transform: translateX(-50%); margin: 0; font-size: 29px; font-weight: normal; text-shadow: 0 1px #f7ddac; }
.wood-button, .view-switch { border: 1px solid #956231; border-radius: 5px; background: linear-gradient(#e1ba7e, #b9803f); box-shadow: inset 0 1px #f6d7a3, 0 1px #f0cc92; }
.wood-button { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; padding: 9px 13px; color: #49301d; text-decoration: none; font-size: 14px; text-shadow: 0 1px #e5bc7e; }
.view-switch { display: flex; overflow: hidden; }
.view-switch button { border: 0; width: 44px; height: 44px; background: transparent; color: #64401f; display: grid; place-items: center; }
.view-switch button + button { border-left: 1px solid #976731; }
.view-switch button[aria-pressed=true] { background: #89572860; box-shadow: inset 0 2px 5px #5c361960; color: #fff0cb; }
.view-switch svg { width: 19px; height: 19px; fill: currentColor; }
.cabinet { padding: 0 5.5%; min-height: calc(100svh - 124px); background-image: linear-gradient(90deg, #57301366, transparent 7%, transparent 93%, #57301366), url('wood.svg'); background-size: auto, 540px 820px; border: solid #84532b; border-width: 0 9px; box-shadow: inset 2px 0 #e7bb77, inset -2px 0 #e7bb77; }
.shelf { position: relative; height: 305px; display: flex; align-items: flex-end; gap: clamp(28px, 6vw, 88px); padding: 32px 35px 18px; background: linear-gradient(#653a2555, transparent 28%, transparent 80%, #4e2a1466); box-shadow: inset 0 8px 16px #4f2d1838; }
.shelf::after { content: ''; position: absolute; z-index: 1; bottom: 0; height: 17px; left: -3%; right: -3%; background: linear-gradient(#f2d399 0, #d4a565 16%, #bc8744 25%, #c5924f 68%, #97602c 74%, #7b4823); border-top: 1px solid #ffe1a5; box-shadow: 0 7px 8px #4c291d75; }
.book-entry { position: relative; flex-shrink: 0; padding: 0; border: 0; background: none; text-align: left; color: inherit; }
.cover { position: relative; display: flex; flex-direction: column; align-items: center; width: 178px; height: 246px; padding: 20px 12px 13px 18px; overflow: hidden; border-radius: 2px 4px 3px 1px; box-shadow: 5px 4px 5px #40271570, 13px 10px 15px #40271535, inset -3px 0 #fff5; text-align: center; transition: transform .22s cubic-bezier(.22, 1, .36, 1); }
.cover::after { content: ''; pointer-events: none; position: absolute; inset: 0; background: linear-gradient(90deg, #26312555, #ffffff20 3%, #26312540 5%, #ffffff30 7%, transparent 10%, transparent 97%, #29231650), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.7' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23000' opacity='.12' filter='url(%23n)' d='M0 0h140v140H0z'/%3E%3C/svg%3E"); mix-blend-mode: multiply; }
.cover::before { content: ''; position: absolute; inset: 9px 8px 8px 13px; border: 1px solid currentColor; opacity: .22; pointer-events: none; }
.cover-perfect { background: #365953; color: #f5e3b7; transform: rotate(-2deg); }
.cover-sorry { background: #efdbb5; color: #684431; transform: rotate(1deg); }
.cover-kicker { font: 7px/1.5 Georgia, serif; letter-spacing: 1.4px; }
.book-title { text-shadow: 0 1px 1px #1b221c22; display: block; margin-top: 14px; font-size: 26px; line-height: 1.07; letter-spacing: -.8px; }
.book-title em { font-weight: normal; }
.cover-sorry .book-title { font-size: 21px; line-height: 1.13; margin-top: 13px; }
.art { flex: 1; min-height: 0; width: 123px; margin: 5px 0 2px; }
.cover-footer { font-size: 6px; letter-spacing: 1.2px; margin-top: 5px; }
.list-copy { display: none; }
@media (hover: hover) { .book-entry:hover .cover { transform: translateY(-7px) rotate(0); box-shadow: 6px 10px 9px #40271560, 16px 17px 20px #40271535; } }
.empty { height: 246px; }
.last { height: max(220px, calc(100svh - 675px)); }
.shelf-note { margin: auto; display: grid; justify-items: center; gap: 14px; font-size: 16px; font-style: italic; color: #644020; text-shadow: 0 1px #f0c78688; }
.shelf-note::before { content: '❦'; font-style: normal; font-size: 24px; opacity: .6; }
.library-footer { min-height: 46px; padding: 14px 24px max(14px, env(safe-area-inset-bottom)); display: flex; justify-content: center; gap: 18px; background: #926032; color: #f6dfb9; font-size: 12px; box-shadow: inset 0 2px 4px #57301466; }
.cabinet.list-view { background: #f1e7d4; padding: 22px 6%; }
.list-view .occupied { display: block; height: auto; padding: 0; box-shadow: none; background: none; }
.list-view .shelf::after, .list-view .empty { display: none; }
.list-view .book-entry { display: flex; width: 100%; align-items: center; gap: 30px; padding: 24px 0; border-bottom: 1px solid #cbb99b; }
.list-view .cover { zoom: .55; flex-shrink: 0; }
.list-view .list-copy { display: grid; gap: 10px; min-width: 0; padding-right: 24px; }
.list-view .book-entry::after { content: '›'; position: absolute; right: 0; font-size: 28px; color: #917452; }
.list-copy strong { font-size: 23px; font-weight: normal; }
.list-copy span { color: #765f46; font-size: 14px; font-style: italic; }
.list-copy small { text-transform: uppercase; letter-spacing: 1.5px; font-size: 10px; color: #765f46; }
dialog { width: min(460px, calc(100% - 36px)); max-height: calc(100svh - 40px); padding: 38px 34px; border: 1px solid #b9a27d; border-radius: 4px; background: linear-gradient(90deg, #d5c5a84d, transparent 5%, transparent 95%, #d5c5a84d), var(--paper); color: var(--ink); text-align: center; box-shadow: 0 2px #e8dac0, 0 4px #ad9670, 0 6px #e8dac0, 0 20px 80px #25170f70; }
dialog::backdrop { background: #27180fb8; }
.close-preview { position: absolute; top: 6px; right: 9px; border: 0; background: none; color: #71583d; font: 30px Georgia, serif; width: 44px; height: 44px; }
.preview-illustration { display: flex; justify-content: center; margin: 0 0 30px; }
.preview-illustration .cover { width: 142px; height: 197px; padding: 14px 10px; }
.preview-illustration .book-title { font-size: 21px; }
.preview-illustration .cover-sorry .book-title { font-size: 17px; }
.preview-illustration .cover-kicker { font-size: 5px; }
.preview-illustration .cover-footer { font-size: 5px; }
.preview-eyebrow { font-size: 10px; letter-spacing: 2px; color: #806747; }
h2 { font-weight: normal; font-size: 28px; line-height: 1.15; margin: 12px 0; }
dialog p:not(.preview-eyebrow) { font-size: 15px; line-height: 1.65; color: #785f47; }
.coming-soon { display: inline-block; margin-top: 10px; padding: 8px 16px; border: 1px solid #c4af8e; border-radius: 2px; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; }
@media (min-width: 1100px) { .cabinet { padding-left: calc((100% - 1000px) / 2); padding-right: calc((100% - 1000px) / 2); } .shelf { padding-left: 65px; } }
@media (max-width: 520px) { .toolbar { height: 66px; padding: 0 14px; } h1 { font-size: 25px; } .wood-button { font-size: 12px; padding: 10px; } .view-switch button { width: 44px; } .cabinet { border-width: 5px; padding: 0 5%; } .shelf { padding: 26px 12px 17px; gap: 26px; height: 266px; } .cover { width: 138px; height: 210px; padding: 17px 9px 11px 14px; } .book-title { font-size: 23px; } .cover-sorry .book-title { font-size: 18px; } .cover-kicker { font-size: 5.5px; letter-spacing: 1px; } .cover-footer { font-size: 5px; letter-spacing: .8px; } .art { width: 105px; } .empty { height: 220px; } .last { height: max(200px, calc(100svh - 598px)); } .shelf-note { font-size: 14px; } .list-copy strong { font-size: 19px; } }
@media (max-width: 360px) { .shelf { gap: 18px; padding-left: 5px; padding-right: 5px; } .cover { width: 119px; height: 187px; } .book-title { font-size: 20px; } .cover-sorry .book-title { font-size: 16px; } }
.view-switch button:focus-visible { outline: 2px solid var(--focus); outline-offset: -4px; border-radius: 3px; }
.wood-button:active, .view-switch button:active { box-shadow: inset 0 2px 5px #5c361960; }
.book-entry:active .cover { transform: translateY(-2px) rotate(0); }
.close-preview:hover { color: #3f532f; background: #e8ddc9; border-radius: 50%; }
.preview-description { margin: 18px auto; max-width: 31ch; }
.preview-return { min-height: 44px; margin-top: 22px; padding: 10px 26px; border: 1px solid #ac9167; border-radius: 4px; color: var(--ink); background: linear-gradient(#f5e6ca, #e4d0ab); box-shadow: inset 0 1px #fff6, 0 1px #d2bd97; }
.preview-return:hover { background: #e6d4b3; }
.preview-return:active { box-shadow: inset 0 2px 4px #94754b44; }
body:has(dialog[open]) { overflow: hidden; }
dialog[open] { animation: preview-enter .2s cubic-bezier(.22, 1, .36, 1); }
@keyframes preview-enter { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@media (max-width: 360px) { .toolbar { padding-inline: 10px; } .wood-button { padding-inline: 8px; } h1 { font-size: 23px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* Presentation is independent of the shelf/list layout. The default palette
   and typography follow the hub; the wooden cabinet remains opt-in. */
.library-intro { display: none; }
.library-controls { display: flex; justify-content: flex-end; align-items: center; gap: 12px; padding: 12px 24px; background: #d5ad72; border-bottom: 1px solid #9c703f; }
.style-label { font-size: 14px; }
.style-switch { display: flex; border: 1px solid #997045; border-radius: 7px; padding: 3px; background: #c19861; }
.style-switch button { min-height: 44px; padding: 9px 15px; background: transparent; border: 0; border-radius: 4px; color: #49301d; font-size: 14px; }
.style-switch button[aria-pressed=true] { background: #f0d5a4; box-shadow: 0 1px 3px #68471c40; }
.style-switch button:focus-visible { outline-offset: -3px; }
:root[data-style] { color-scheme: light dark; --paper: #F5F2EC; --ink: #1A1613; --soft: #6B6259; --line: #E3DCD0; --card: #FFFDF9; --accent: #426853; --focus: #426853; --shadow: 0 1px 2px #1a16130d, 0 10px 30px #1a161312; background: var(--paper); color: var(--ink); font-family: ui-rounded, 'SF Pro Rounded', 'Hiragino Maru Gothic ProN', system-ui, sans-serif; }
[data-style] body { background: var(--paper); color: var(--ink); line-height: 1.55; -webkit-font-smoothing: antialiased; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
[data-style] .toolbar, [data-style] main { width: min(700px, calc(100% - 44px)); margin-inline: auto; }
[data-style] .toolbar { height: 88px; padding: 0; border: 0; border-bottom: 1px solid var(--line); background: none; box-shadow: none; }
[data-style] .retro-title { display: none; }
[data-style] .wood-button { padding: 0; background: none; border: 0; color: var(--soft); box-shadow: none; text-shadow: none; font-size: 14px; }
[data-style] .view-switch { background: var(--paper); border-color: var(--line); border-radius: 10px; box-shadow: none; padding: 3px; }
[data-style] .view-switch button { border: 0; border-radius: 7px; color: var(--soft); }
[data-style] .view-switch button[aria-pressed=true] { color: var(--accent); background: var(--card); box-shadow: 0 1px 3px #1a16131a; }
[data-style] .library-intro { display: block; padding-top: 44px; }
[data-style] h1 { position: static; transform: none; font-size: clamp(2.2rem, 7vw, 3.1rem); font-weight: 700; line-height: 1.05; letter-spacing: -.02em; text-shadow: none; margin: 0 0 16px; }
[data-style] .lead { margin: 0; color: var(--soft); font-size: 1.06rem; max-width: 52ch; }
[data-style] .library-controls { padding: 26px 0 22px; background: none; border: 0; justify-content: flex-start; }
[data-style] .style-label { color: var(--soft); font-size: 13px; }
[data-style] .style-switch { border-color: var(--line); background: var(--paper); border-radius: 10px; }
[data-style] .style-switch button { color: var(--soft); border-radius: 7px; }
[data-style] .style-switch button[aria-pressed=true] { color: var(--accent); background: var(--card); box-shadow: 0 1px 3px #1a16131a; }
[data-style=modern] .cabinet { padding: 0; min-height: 0; background: none; border: 0; box-shadow: none; }
[data-style=modern] .shelf.occupied { height: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 20px; padding: 0; background: none; box-shadow: none; }
[data-style=modern] .shelf::after, [data-style=modern] .empty { display: none; }
[data-style=modern] .book-entry { min-width: 0; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 24px; padding: 28px 26px 24px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
[data-style=modern] .cover { font-family: Georgia, 'Times New Roman', serif; flex-shrink: 0; width: 178px; height: 246px; padding: 20px 12px 13px 18px; transform: none; border-radius: 3px 8px 8px 3px; box-shadow: 0 4px 10px #1a16131a; }
[data-style=modern] .cover::after { display: none; }
[data-style=modern] .book-title { font-size: 26px; text-shadow: none; }
[data-style=modern] .cover-sorry .book-title { font-size: 21px; }
[data-style=modern] .cover-kicker { font-size: 7px; letter-spacing: 1.4px; }
[data-style=modern] .cover-footer { font-size: 6px; letter-spacing: 1.2px; }
[data-style=modern] .art { width: 123px; }
[data-style=modern] .list-copy { display: flex; flex: 1; width: 100%; flex-direction: column; gap: 7px; padding: 0; }
[data-style=modern] .list-copy strong { color: var(--ink); font-size: 18px; line-height: 1.4; font-weight: 650; }
[data-style=modern] .list-copy span { color: var(--soft); font-size: 14px; font-style: normal; }
[data-style=modern] .list-copy small { color: var(--accent); font: 10px/1.6 ui-monospace, 'SF Mono', Menlo, monospace; letter-spacing: .08em; padding-top: 14px; margin-top: auto; }
[data-style=modern] .list-view .occupied { grid-template-columns: 1fr; gap: 14px; }
[data-style=modern] .list-view .book-entry { flex-direction: row; gap: 24px; padding: 24px; }
[data-style=modern] .list-view .cover { zoom: .48; }
[data-style=modern] .list-view .book-entry::after { position: static; color: var(--soft); }
[data-style=modern] .list-view .list-copy small { padding-top: 6px; }
[data-style] .library-footer { justify-content: space-between; align-items: center; flex-wrap: wrap; background: none; box-shadow: none; color: var(--soft); padding: 24px 0 36px; margin-top: 30px; border-top: 1px solid var(--line); font-size: 13px; }
[data-style] dialog { background: var(--card); border: 1px solid var(--line); border-radius: 22px; color: var(--ink); box-shadow: var(--shadow); }
[data-style] dialog::backdrop { background: #1a161380; }
[data-style] dialog h2 { font-size: 26px; line-height: 1.25; font-weight: 650; }
[data-style] .preview-eyebrow, [data-style] dialog p:not(.preview-eyebrow), [data-style] .close-preview { color: var(--soft); }
[data-style] .close-preview:hover { background: var(--paper); color: var(--ink); }
[data-style=modern] .preview-illustration .cover { width: 142px; height: 197px; padding: 14px 10px; }
[data-style=modern] .preview-illustration .book-title { font-size: 21px; }
[data-style=modern] .preview-illustration .cover-sorry .book-title { font-size: 17px; }
[data-style=modern] .preview-illustration .cover-kicker, [data-style=modern] .preview-illustration .cover-footer { font-size: 5px; }
[data-style] .coming-soon { color: var(--accent); border-color: var(--line); border-radius: 8px; }
[data-style] .preview-return { background: var(--paper); border-color: var(--line); border-radius: 10px; color: var(--ink); box-shadow: none; }
@media (hover: hover) { [data-style=modern] .book-entry:hover { border-color: var(--accent); } [data-style=modern] .book-entry:hover .cover { transform: translateY(-3px); box-shadow: 0 4px 10px #1a16131a; } [data-style] .preview-return:hover { border-color: var(--accent); } }
@media (max-width: 520px) { [data-style] .toolbar { height: 76px; } [data-style] .library-intro { padding-top: 32px; } [data-style=modern] .shelf.occupied { grid-template-columns: 1fr; } [data-style=modern] .book-entry { padding: 28px; } [data-style=modern] .list-view .book-entry { padding: 20px 16px; gap: 16px; } .library-controls { padding-inline: 14px; } }
@media (prefers-color-scheme: dark) { :root[data-style] { --paper: #151310; --ink: #F4EFE7; --soft: #B5AA9C; --line: #302B24; --card: #221E19; --accent: #9BC6AA; --focus: #9BC6AA; --shadow: 0 1px 2px #0006, 0 10px 30px #0005; } }

[data-style=skeuomorph] .cabinet { min-height: 0; padding: 0 24px; border: 6px solid #986936; border-radius: 22px; box-shadow: inset 2px 0 #e7bb77, inset -2px 0 #e7bb77, var(--shadow); color: #49301d; overflow: hidden; }
[data-style=skeuomorph] .shelf { padding-left: 24px; padding-right: 24px; gap: 58px; }
[data-style=skeuomorph] .cover { font-family: Georgia, 'Times New Roman', serif; line-height: normal; }
[data-style=skeuomorph] .empty:not(.last) { display: none; }
[data-style=skeuomorph] .last { height: 150px; }
[data-style=skeuomorph] .shelf-note { font-family: Georgia, 'Times New Roman', serif; }
[data-style=skeuomorph] .list-view .shelf { padding: 0; }
[data-style=skeuomorph] .list-view .book-entry { padding-block: 24px; }
@media (max-width: 520px) { [data-style=skeuomorph] .cabinet { padding-inline: 12px; } [data-style=skeuomorph] .shelf { padding-inline: 0; gap: 20px; justify-content: space-evenly; } [data-style=skeuomorph] .cover { width: clamp(100px, calc((100vw - 112px) / 2), 138px); } [data-style=skeuomorph] .shelf-note { font-size: 13px; } }
@media (max-width: 360px) { [data-style=skeuomorph] .shelf { height: 224px; } [data-style=skeuomorph] .last { height: 130px; } [data-style=skeuomorph] .cover-kicker { font-size: 5px; letter-spacing: .5px; } }
