:root {
  --ink: #23202B; --paper: #F4F5F7; --card: #FFFFFF; --line: #E2E3E8; --muted: #6B6875;
  --leaf: #2F6F5E; --leaf-ink: #FFFFFF; --marigold: #E9A41B; --marigold-soft: #FBF0D6; --danger: #B3261E;
  --page: #FFFDF8; --stage: #1D1A22;
  --serif: 'Young Serif', Georgia, 'Times New Roman', serif;
  --sans: Figtree, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --r-sm: 8px; --r: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --ink: #ECEAF0; --paper: #17151B; --card: #221F28; --line: #34303C; --muted: #A29EAB;
    --leaf: #5DB39A; --leaf-ink: #0E1A16; --marigold-soft: #3A2E14; --danger: #F08C84; --page: #2A2630; color-scheme: dark; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-size: 16px; line-height: 1.5; color: var(--ink); background: var(--paper);
  padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
body.noscroll { overflow: hidden; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.2; margin: 0; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.25rem; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--marigold); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
[hidden] { display: none !important; }

/* top + bottom bars */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: var(--paper); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--serif); font-size: 1.15rem; }
.brand-mark { width: 26px; height: 26px; border-radius: 6px; background: var(--ink); position: relative; flex: none; }
.brand-mark::after { content: ''; position: absolute; inset: 5px 5px 9px 5px; border-radius: 2px; background: var(--marigold); }
.icon-btn { display: inline-grid; place-items: center; min-width: 40px; height: 40px; border: 0; background: none; border-radius: 999px; cursor: pointer; }
.icon-btn svg { width: 22px; height: 22px; fill: currentColor; }
.more-sheet { position: fixed; z-index: 30; top: calc(58px + env(safe-area-inset-top)); right: 12px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: 0 12px 40px rgba(20, 16, 28, .18); padding: 6px; min-width: 200px; display: flex; flex-direction: column; }
.more-sheet a { padding: 12px 14px; text-decoration: none; border-radius: var(--r-sm); }
.more-sheet a:active, .more-sheet a:hover { background: var(--paper); }
.tabbar { position: fixed; z-index: 20; bottom: 0; left: 0; right: 0; display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px 10px; text-decoration: none; font-size: .75rem; color: var(--muted); }
.tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a.on { color: var(--ink); font-weight: 600; }
.tabbar a.on svg { stroke: var(--leaf); }
.badge { position: absolute; top: 4px; left: calc(50% + 6px); background: var(--marigold); color: #23202B; font-size: .68rem; font-weight: 700; border-radius: 999px; padding: 1px 6px; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 16px; }
section { margin: 0 0 28px; }
.sec { margin-bottom: 12px; }
.page-head { margin: 4px 0 16px; }
.page-head p { margin: 6px 0 0; max-width: 60ch; }
.back { display: inline-block; font-size: .9rem; color: var(--muted); margin-bottom: 6px; text-decoration: none; }
.back::before { content: '‹ '; }
.empty { color: var(--muted); padding: 32px 0; text-align: center; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); text-decoration: none; font-weight: 600; font-size: .92rem; cursor: pointer; white-space: nowrap; }
.btn.primary { background: var(--leaf); color: var(--leaf-ink); border-color: var(--leaf); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); }
.btn.small { min-height: 34px; padding: 0 12px; font-size: .84rem; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .5; }
.toolbar { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 10px; scrollbar-width: none; }
.toolbar::-webkit-scrollbar { display: none; }

/* notices */
.notice { display: block; text-decoration: none; background: var(--marigold); color: #23202B; border-radius: var(--r); padding: 14px 16px; margin-bottom: 12px; }
.notice strong { display: block; }
.notice span { font-size: .9rem; }
.notice.soft { background: var(--marigold-soft); color: var(--ink); }
.notice .btn { margin-top: 10px; }
.hero-empty { padding: 28px 0; }
.hero-empty p { max-width: 46ch; color: var(--muted); }

/* home: people */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 14px; }
.person { display: flex; flex-direction: column; align-items: center; text-decoration: none; text-align: center; }
.person-pic { width: 84px; height: 84px; border-radius: 50%; background: var(--card) center/cover no-repeat; border: 3px solid var(--card);
  box-shadow: 0 0 0 1px var(--line); display: grid; place-items: center; font-family: var(--serif); font-size: 1.8rem; color: var(--muted); }
.person-pic.fam { border-color: var(--marigold); }
.person-name { margin-top: 6px; font-weight: 600; }
.count { font-size: .8rem; color: var(--muted); }

/* albums */
.albums { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.album { display: flex; flex-direction: column; justify-content: space-between; min-height: 76px; padding: 12px 14px; border-radius: var(--r);
  background: var(--card); border: 1px solid var(--line); text-decoration: none; border-left: 4px solid var(--leaf); }
.album.fav { border-left-color: var(--marigold); }
.album-name { font-weight: 600; display: flex; align-items: center; gap: 6px; }
.album.with-cover { padding: 0; overflow: hidden; border-left-width: 1px; }
.album.with-cover .album-name, .album.with-cover .count { padding: 0 12px; }
.album.with-cover .count { padding-bottom: 10px; }
.album-cover { display: block; aspect-ratio: 4/3; background: var(--paper) center/cover; margin-bottom: 8px; }
.lock { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 7px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); text-decoration: none; font-weight: 600; }
.chip small { color: var(--muted); font-weight: 400; margin-left: 4px; }

.meter { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--leaf); border-radius: 99px; transition: width .3s; }
.meter i.warn { background: var(--danger); }
.meter.big { height: 12px; }

/* filters */
.filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.filters select, .filters input:not([type=checkbox]), .field input:not([type=checkbox]):not([type=radio]), .field select, .field textarea, .inline-form input, .stack-form input:not([type=checkbox]), .login-card input {
  width: 100%; min-height: 44px; padding: 8px 12px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--card); }
.filters .search { grid-column: 1 / -1; }
.filters .toggle { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .9rem; }
@media (min-width: 760px) { .filters { grid-template-columns: repeat(5, 1fr); } .filters .search { grid-column: auto / span 2; } }

/* grid */
.year-head { font-size: 1.4rem; margin: 18px 0 8px; position: sticky; top: calc(61px + env(safe-area-inset-top)); background: var(--paper); padding: 6px 0; z-index: 5; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }
@media (min-width: 600px) { .grid { grid-template-columns: repeat(5, 1fr); } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(7, 1fr); } }
.grid.strip { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 30%; overflow-x: auto; }
.tile { position: relative; aspect-ratio: 1; padding: 0; border: 0; background: var(--line); overflow: hidden; cursor: pointer; border-radius: 3px; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tfav { position: absolute; left: 5px; bottom: 3px; color: var(--marigold); font-size: 14px; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.tcheck { display: none; position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff; background: rgba(0,0,0,.25); }
.selecting .tcheck { display: block; }
.tile.sel { outline: 3px solid var(--leaf); outline-offset: -3px; }
.tile.sel img { transform: scale(.9); border-radius: 4px; }
.tile.sel .tcheck { background: var(--leaf); border-color: #fff; }
.tile.sel .tcheck::after { content: ''; position: absolute; left: 6px; top: 2px; width: 6px; height: 11px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.tag-days { position: absolute; left: 4px; top: 4px; font-size: 11px; background: rgba(0,0,0,.55); color: #fff; border-radius: 4px; padding: 0 5px; }

/* selection bar */
.selbar { position: fixed; z-index: 25; left: 0; right: 0; bottom: calc(62px + env(safe-area-inset-bottom)); background: var(--ink); color: var(--paper);
  padding: 10px 12px; display: flex; gap: 8px; align-items: center; overflow-x: auto; scrollbar-width: none; }
.selbar::-webkit-scrollbar { display: none; }
.selbar .count-l { font-weight: 700; white-space: nowrap; margin-right: 4px; }
.selbar .btn { background: transparent; color: var(--paper); border-color: rgba(255,255,255,.3); min-height: 38px; }
.selbar .btn.primary { background: var(--marigold); color: #23202B; border-color: var(--marigold); }
@media (prefers-color-scheme: dark) { .selbar .btn { border-color: rgba(0,0,0,.25); } }

/* modal */
.modal-back { position: fixed; inset: 0; z-index: 60; background: rgba(15, 12, 20, .55); display: flex; align-items: flex-end; justify-content: center; }
.modal { background: var(--card); width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; border-radius: 20px 20px 0 0;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); }
@media (min-width: 700px) { .modal-back { align-items: center; } .modal { border-radius: 20px; } }
.modal h2 { margin-bottom: 14px; }
.field { margin-bottom: 14px; }
.field > span, .field-label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.field textarea { min-height: 70px; resize: vertical; }
.pick { display: flex; flex-wrap: wrap; gap: 8px; }
.pick label { cursor: pointer; }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick span { display: inline-block; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); font-weight: 600; font-size: .9rem; }
.pick input:checked + span { background: var(--leaf); color: var(--leaf-ink); border-color: var(--leaf); }
.pick input:focus-visible + span { outline: 3px solid var(--marigold); }
.pick .fam input:checked + span { background: var(--marigold); color: #23202B; border-color: var(--marigold); }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; position: sticky; bottom: -18px; background: var(--card); padding: 10px 0; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 600; font-size: .92rem; }
.check input, .filters .toggle input { width: 20px; height: 20px; accent-color: var(--leaf); flex: none; margin: 0; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-error { color: var(--danger); font-weight: 600; }

/* viewer */
.viewer { position: fixed; inset: 0; z-index: 50; background: #0F0D12; color: #F4F2F6; display: flex; flex-direction: column; }
.v-top { display: flex; align-items: center; justify-content: space-between; padding: calc(8px + env(safe-area-inset-top)) 8px 8px; }
.v-top .icon-btn { color: #fff; }
.v-top .icon-btn svg { fill: none; stroke: currentColor; stroke-width: 2; }
.v-stage { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; touch-action: pan-y; }
.v-stage img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.v-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 64px; border: 0; background: rgba(255,255,255,.08); color: #fff; font-size: 26px; border-radius: 10px; cursor: pointer; }
.v-nav.prev { left: 6px; } .v-nav.next { right: 6px; }
@media (hover: none) { .v-nav { display: none; } }
.v-info { padding: 10px 16px 4px; font-size: .9rem; }
.v-info strong { font-family: var(--serif); font-weight: 400; font-size: 1.05rem; }
.v-info p { margin: 2px 0; color: #C9C5CF; }
.v-actions { display: flex; gap: 6px; overflow-x: auto; padding: 8px 12px calc(12px + env(safe-area-inset-bottom)); scrollbar-width: none; }
.v-actions::-webkit-scrollbar { display: none; }
.v-actions .btn { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.15); color: #fff; }
.v-actions .btn.on { background: var(--marigold); color: #23202B; border-color: var(--marigold); }

/* editor */
.editor-stage { flex: 1; display: flex; align-items: center; justify-content: center; padding: 16px; overflow: hidden; }
.crop-wrap { position: relative; display: inline-block; line-height: 0; }
.crop-box { position: absolute; border: 2px solid #fff; box-shadow: 0 0 0 9999px rgba(0,0,0,.55); touch-action: none; cursor: move; }
.crop-box i { position: absolute; width: 26px; height: 26px; border: 4px solid var(--marigold); }
.crop-box i[data-h=tl] { left: -5px; top: -5px; border-right: 0; border-bottom: 0; cursor: nwse-resize; }
.crop-box i[data-h=tr] { right: -5px; top: -5px; border-left: 0; border-bottom: 0; cursor: nesw-resize; }
.crop-box i[data-h=bl] { left: -5px; bottom: -5px; border-right: 0; border-top: 0; cursor: nesw-resize; }
.crop-box i[data-h=br] { right: -5px; bottom: -5px; border-left: 0; border-top: 0; cursor: nwse-resize; }

/* upload */
.upload-choices { display: grid; gap: 12px; grid-template-columns: 1fr; margin-bottom: 20px; }
@media (min-width: 600px) { .upload-choices { grid-template-columns: 1fr 1fr; } }
.drop { display: flex; flex-direction: column; gap: 4px; padding: 26px 20px; border-radius: var(--r); background: var(--leaf); color: var(--leaf-ink); cursor: pointer; }
.drop strong { font-family: var(--serif); font-weight: 400; font-size: 1.35rem; }
.drop.alt { background: var(--card); color: var(--ink); border: 1px dashed var(--muted); }
.up-list { list-style: none; padding: 0; margin: 12px 0; font-size: .88rem; max-height: 45vh; overflow-y: auto; }
.up-list li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.up-list li span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-list .st-ok { color: var(--leaf); } .up-list .st-dup { color: var(--muted); } .up-list .st-err { color: var(--danger); }

/* settings & lists */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.panel h2 { margin-bottom: 6px; }
.rows { list-style: none; padding: 0; margin: 10px 0; }
.rows li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.row-actions { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.inline-form { display: flex; gap: 8px; margin: 10px 0; }
.stack-form { display: grid; gap: 10px; max-width: 420px; margin-top: 10px; }
.pill { display: inline-block; font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--marigold-soft); }
.share-list { list-style: none; padding: 0; display: grid; gap: 10px; }
.share-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.share-item.live { border-left: 4px solid var(--leaf); }
.share-item.dead { opacity: .75; }
.share-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.views { margin: 4px 0 10px; padding-left: 18px; font-size: .85rem; color: var(--muted); }
.eb-list { list-style: none; padding: 0; display: grid; gap: 6px; }
.eb-list li { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 6px; }
.eb-list img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; }
.eb-list .pn { font-family: var(--serif); width: 28px; text-align: center; color: var(--muted); }
.eb-list .meta { flex: 1; font-size: .85rem; min-width: 0; }

/* compare + map */
.compare { position: relative; width: 100%; max-width: 560px; aspect-ratio: 4/5; margin: 0 auto 20px; border-radius: var(--r); overflow: hidden; background: #000; touch-action: none; }
.cmp-img { position: absolute; inset: 0; background: center/cover no-repeat; }
.cmp-img.top { clip-path: inset(0 50% 0 0); }
.cmp-handle { position: absolute; top: 0; bottom: 0; left: 50%; width: 0; }
.cmp-handle::before { content: ''; position: absolute; top: 0; bottom: 0; left: -1px; width: 2px; background: #fff; }
.cmp-handle span { position: absolute; top: 50%; left: -20px; width: 40px; height: 40px; margin-top: -20px; border-radius: 50%; background: var(--marigold); border: 3px solid #fff; }
.cmp-tag { position: absolute; bottom: 10px; background: rgba(0,0,0,.6); color: #fff; font-size: .8rem; padding: 3px 8px; border-radius: 6px; }
.cmp-tag.l { left: 10px; } .cmp-tag.r { right: 10px; }
.side-by-side { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.side-by-side img { width: 100%; border-radius: var(--r-sm); }
.side-by-side figure { margin: 0; } .side-by-side figcaption { font-size: .85rem; color: var(--muted); }
.map { height: 65vh; border-radius: var(--r); border: 1px solid var(--line); }
.map-pop img { width: 160px; height: 120px; object-fit: cover; border-radius: 6px; display: block; }

/* login */
.login-page { display: grid; place-items: center; min-height: 100vh; padding: 20px; }
.login-card { width: 100%; max-width: 360px; background: var(--card); border-radius: 20px; padding: 28px 24px; border: 1px solid var(--line); }
.login-card label { display: block; font-weight: 600; font-size: .9rem; margin-top: 12px; }
.login-card input { margin-top: 6px; }
.login-card .btn { margin-top: 20px; }
.login-mark { width: 54px; height: 54px; border-radius: 12px; background: var(--ink); position: relative; margin-bottom: 16px; }
.login-mark::after { content: ''; position: absolute; inset: 10px 10px 18px 10px; background: var(--marigold); border-radius: 3px; }

/* toast */
#toast { position: fixed; z-index: 90; left: 50%; bottom: calc(140px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 12px; max-width: 90vw; font-size: .9rem; transition: opacity .2s, transform .2s; text-align: center; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== E-book ===== */
.book-page { background: var(--stage); color: #F4F2F6; padding: 0; min-height: 100vh; overflow: hidden; }
.book { position: fixed; inset: 0; display: flex; flex-direction: column; }
.b-top { display: flex; align-items: center; gap: 8px; padding: calc(8px + env(safe-area-inset-top)) 12px 8px; }
.b-title { flex: 1; font-family: var(--serif); font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b-top .icon-btn { color: #fff; }
.b-top .icon-btn svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.b-timer { font-size: .8rem; background: rgba(233, 164, 27, .2); color: var(--marigold); padding: 3px 10px; border-radius: 99px; white-space: nowrap; }
.b-stage { flex: 1; position: relative; perspective: 1800px; display: flex; align-items: center; justify-content: center; padding: 6px 14px; touch-action: pan-y; }
.b-page { position: absolute; inset: 6px 14px; margin: auto; max-width: 720px; background: var(--page); color: #23202B; border-radius: 4px 12px 12px 4px;
  box-shadow: 0 20px 50px rgba(0,0,0,.45), inset 10px 0 18px -12px rgba(0,0,0,.35); display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 22px 18px 16px; transform-origin: left center; backface-visibility: hidden; }
@media (prefers-color-scheme: dark) { .b-page { color: #ECEAF0; } }
.b-mount { position: relative; flex: 1; width: 100%; display: flex; align-items: center; justify-content: center; min-height: 0; }
.b-photo { position: relative; max-width: 100%; max-height: 100%; }
.b-photo .img { width: 100%; height: 100%; background: center/contain no-repeat; }
.b-photo .c { position: absolute; width: 22px; height: 22px; background: #23202B; opacity: .82; }
.b-photo .c.tl { left: -6px; top: -6px; clip-path: polygon(0 0, 100% 0, 0 100%); }
.b-photo .c.tr { right: -6px; top: -6px; clip-path: polygon(0 0, 100% 0, 100% 100%); }
.b-photo .c.bl { left: -6px; bottom: -6px; clip-path: polygon(0 0, 0 100%, 100% 100%); }
.b-photo .c.br { right: -6px; bottom: -6px; clip-path: polygon(100% 0, 100% 100%, 0 100%); }
@media (prefers-color-scheme: dark) { .b-photo .c { background: var(--marigold); } }
.b-cap { margin-top: 14px; text-align: center; max-width: 52ch; font-family: var(--serif); font-size: 1.05rem; min-height: 1.3em; }
.b-date { font-size: .82rem; color: #8C8794; margin-top: 2px; }
.b-pno { position: absolute; bottom: 10px; right: 16px; font-size: .78rem; color: #8C8794; }
.b-cover { text-align: center; padding: 30px; }
.b-cover h1 { font-size: clamp(2rem, 8vw, 3.4rem); line-height: 1.1; margin-bottom: 14px; }
.b-cover .rule { width: 60px; height: 4px; background: var(--marigold); margin: 0 auto 14px; border-radius: 2px; }
.b-cover p { color: #6B6875; margin: 0; }
.b-end h2 { font-size: 1.6rem; }
.b-bottom { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 8px 12px calc(12px + env(safe-area-inset-bottom)); }
.b-bottom .count { color: #C9C5CF; min-width: 70px; text-align: center; font-size: .9rem; }
.b-btn { width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.06); color: #fff; font-size: 22px; cursor: pointer; display: grid; place-items: center; }
.b-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.b-btn.play.on { background: var(--marigold); color: #23202B; border-color: var(--marigold); }
.flip-out { animation: flipOut .55s ease-in forwards; z-index: 3; }
.flip-in { animation: flipIn .55s ease-out; z-index: 3; }
@keyframes flipOut { to { transform: rotateY(-96deg); opacity: .6; } }
@keyframes flipIn { from { transform: rotateY(-96deg); opacity: .6; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .flip-out, .flip-in { animation-duration: .01s; } }
.shared .b-page, .shared .b-photo { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.closed { max-width: 420px; margin: 18vh auto 0; padding: 20px; text-align: center; }
.closed p { color: #C9C5CF; }
.share-box { background: var(--paper); border-radius: var(--r-sm); padding: 10px; word-break: break-all; font-size: .85rem; margin: 10px 0; }
@media print { .shared * { display: none !important; } }
.book-page .modal, .book-page .btn:not(.primary) { color: var(--ink); }
.b-top .btn { background: var(--marigold); color: #23202B; border-color: var(--marigold); }
