:root{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#171717;background:#f6f3ec;color-scheme:light}*{box-sizing:border-box}body{margin:0;min-height:100vh}.topbar{height:66px;padding:0 max(18px,env(safe-area-inset-right)) 0 max(18px,env(safe-area-inset-left));display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #ddd6c8;background:rgba(246,243,236,.94);position:sticky;top:0;z-index:20;backdrop-filter:blur(16px)}.brand{display:flex;align-items:baseline;gap:9px}.brand strong{font-size:24px;letter-spacing:-.08em}.brand .box{font-size:.82em;margin-left:2px}.brand small{font-size:12px;color:#726d64;letter-spacing:.12em}.primary,button{font:inherit;border:1px solid #cfc7b8;background:#fff;border-radius:999px;padding:10px 15px;cursor:pointer;color:#222}.primary{background:#1f1f1f;color:#fff;border-color:#1f1f1f;font-weight:700}main{max-width:1120px;margin:auto;padding:30px 22px 80px}.intro{display:flex;justify-content:space-between;gap:28px;align-items:flex-end;padding:28px 0 34px;border-bottom:1px solid #ddd6c8}.eyebrow{font-size:10px;letter-spacing:.2em;color:#8b8377;margin:0 0 10px}.intro h1{font-size:clamp(27px,4vw,43px);line-height:1.15;letter-spacing:-.04em;margin:0 0 12px}.intro p:not(.eyebrow){max-width:650px;margin:0;color:#69645b;line-height:1.8}.intro-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}.shelf-head{display:flex;align-items:end;justify-content:space-between;margin:36px 0 16px}.shelf-head h2{font-size:22px;margin:0 0 4px}.shelf-head p{margin:0;font-size:12px;color:#858074}.local-note{padding:6px 10px;border:1px solid #d9d1c3;border-radius:999px}.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(205px,1fr));gap:22px}.book{appearance:none;text-align:left;padding:0;border:0;background:transparent;border-radius:0;cursor:pointer}.cover{aspect-ratio:3/4;background:#e8e1d5;border-radius:9px;overflow:hidden;box-shadow:0 9px 24px rgba(43,34,21,.12);position:relative}.cover img{width:100%;height:100%;display:block;object-fit:cover}.cover-fallback{width:100%;height:100%;display:flex;align-items:center;justify-content:center;font-size:42px;color:#9d9588}.book-meta{padding:12px 3px 0}.book-meta h3{font-size:15px;line-height:1.45;margin:0 0 5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.book-meta p{margin:0;color:#807a70;font-size:11px}.badge{position:absolute;top:9px;left:9px;padding:5px 8px;border-radius:999px;font-size:9px;letter-spacing:.08em;background:rgba(20,20,20,.76);color:#fff;backdrop-filter:blur(8px)}.empty{text-align:center;padding:75px 20px;border:1px dashed #d0c8b9;border-radius:18px;background:rgba(255,255,255,.35)}.empty-mark{font-size:50px;color:#a49b8b}.empty h2{margin:12px 0 8px}.empty p{color:#797267;line-height:1.7;max-width:530px;margin:0 auto 22px}.detail-dialog{width:min(560px,calc(100vw - 24px));border:0;border-radius:20px;padding:0;box-shadow:0 24px 80px rgba(0,0,0,.28)}.detail-dialog::backdrop{background:rgba(15,13,10,.52);backdrop-filter:blur(3px)}.dialog-close{position:absolute;right:12px;top:12px;width:36px;height:36px;padding:0;z-index:2;background:rgba(255,255,255,.9)}.detail-hero{display:grid;grid-template-columns:145px 1fr;gap:22px;padding:26px}.detail-cover{aspect-ratio:3/4;background:#eee7dc;border-radius:10px;overflow:hidden}.detail-cover img{width:100%;height:100%;object-fit:cover}.detail-copy{align-self:end}.detail-copy .eyebrow{margin-bottom:7px}.detail-copy h2{font-size:24px;line-height:1.25;margin:0 0 8px}.detail-copy p{margin:3px 0;color:#706a61;font-size:12px}.actions{display:grid;grid-template-columns:1fr 1fr;gap:9px;padding:0 26px 26px}.actions button{border-radius:12px;padding:13px 10px}.actions .edit{grid-column:1/-1;background:#1f1f1f;color:#fff;border-color:#1f1f1f;font-weight:700}.actions .danger{color:#a13a35}.detail-note{margin:0 26px 25px;padding-top:16px;border-top:1px solid #eee8df;color:#8a8378;font-size:11px;line-height:1.6}.toast{position:fixed;left:50%;bottom:max(24px,env(safe-area-inset-bottom));transform:translateX(-50%);background:#191919;color:#fff;border-radius:999px;padding:11px 16px;font-size:12px;z-index:100;box-shadow:0 8px 30px rgba(0,0,0,.2)}@media(max-width:680px){.topbar{height:60px}.topbar .primary{padding:9px 12px;font-size:12px}main{padding:18px 14px 65px}.intro{display:block;padding:20px 2px 25px}.intro-actions{justify-content:flex-start;margin-top:20px}.grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:17px 13px}.detail-hero{grid-template-columns:110px 1fr;padding:22px 18px}.actions{padding:0 18px 20px}.detail-note{margin:0 18px 20px}.book-meta h3{font-size:14px}}

/* Local Bookshelf Phase 2 — author journey view */
.actions .journey{grid-column:1/-1;background:#f4efe5;border-color:#cfc3b0;font-weight:700}.actions .journey:disabled{opacity:.6;cursor:wait}.journey-panel{margin:0 26px 18px;padding:18px;border:1px solid #e5ddd0;border-radius:16px;background:#faf8f3}.journey-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin-bottom:14px}.journey-head .eyebrow{margin-bottom:4px}.journey-head h3{margin:0;font-size:18px}.journey-head>span{font-size:10px;color:#8a8378}.journey-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.journey-stats>div{min-width:0;padding:11px 10px;border:1px solid #e8e0d4;border-radius:12px;background:#fff}.journey-stats small{display:block;color:#847d72;font-size:10px;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.journey-stats strong{display:block;margin-top:5px;font-size:21px;letter-spacing:-.03em}.journey-list{margin-top:15px;border-top:1px solid #e8e0d4;padding-top:12px}.journey-list-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px}.journey-list-head strong{font-size:12px}.journey-list-head span{font-size:9px;color:#928b80}.journey-row{display:grid;grid-template-columns:1fr auto auto;gap:12px;align-items:center;padding:8px 0;border-top:1px solid #eee8df;font-size:11px}.journey-row:first-of-type{border-top:0}.journey-row b{font-size:13px}.journey-row small{color:#8b8378}.journey-note,.journey-empty{margin:13px 0 0;color:#8a8378;font-size:10px;line-height:1.65}.journey-loading,.journey-error{padding:10px 2px;color:#7d766b;font-size:12px}.journey-error{display:grid;gap:4px;color:#8d463f}.journey-error span{font-size:10px;color:#8a8378}
@media(max-width:680px){.journey-panel{margin:0 18px 16px;padding:14px}.journey-stats{grid-template-columns:repeat(2,1fr)}.journey-head{align-items:flex-start}.journey-head>span{padding-top:2px}.journey-row{grid-template-columns:1fr auto}.journey-row small{display:none}}

/* Local Bookshelf Phase 2.1 — lifetime + recent + journey visualization */
.journey-section-label{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin:2px 0 9px}.journey-section-label strong{font-size:12px}.journey-section-label span{font-size:9px;color:#928b80}.journey-recent{margin-top:12px;padding:12px 13px;border:1px solid #e8e0d4;border-radius:12px;background:#fff}.journey-recent>div{display:flex;align-items:baseline;justify-content:space-between;gap:10px}.journey-recent strong{font-size:12px}.journey-recent span{font-size:9px;color:#928b80}.journey-recent p{margin:7px 0 0;font-size:11px;color:#6f695f;word-spacing:.15em}.journey-recent p b{font-size:15px;color:#171717;margin-right:2px}.journey-track{display:flex;align-items:center;min-width:74px;gap:3px}.journey-track i{display:block;width:5px;height:5px;border-radius:50%;background:#6f695f;position:relative}.journey-track i+ i:before{content:"";position:absolute;right:100%;top:2px;width:3px;height:1px;background:#c9c0b3}.journey-track i.origin{width:7px;height:7px;background:#1f1f1f}.journey-row{grid-template-columns:minmax(56px,1fr) minmax(74px,1.4fr) auto auto}.journey-row small{min-width:34px;text-align:right}
@media(max-width:680px){.journey-section-label span,.journey-recent span{display:none}.journey-recent>div{justify-content:flex-start}.journey-row{grid-template-columns:52px minmax(66px,1fr) auto}.journey-row small{display:none}.journey-track{min-width:66px}.journey-track i{width:4px;height:4px}.journey-track i.origin{width:6px;height:6px}}

/* V57 — RELAY arrival tree */
.journey-tree-card{padding:10px 0 12px;border-top:1px solid #eee8df}.journey-tree-card:first-of-type{border-top:0}.journey-tree-meta{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:5px}.journey-tree-meta strong{font-size:11px}.journey-tree-meta span{font-size:9px;color:#8b8378}.journey-tree-scroll{overflow-x:auto;overflow-y:hidden;padding:2px 0 4px;-webkit-overflow-scrolling:touch}.journey-tree-svg{display:block;width:100%;min-width:300px;height:auto;max-height:250px}.journey-tree-svg .branches path{fill:none;stroke:#c9c0b3;stroke-width:1.4}.journey-tree-svg .reader{fill:#222}.journey-tree-svg .pending{fill:#fff;stroke:#9d958a;stroke-width:1.5;stroke-dasharray:2 2}.journey-tree-svg .issue circle{fill:#6f695f}.journey-tree-svg .issue text{font-size:8px;fill:#8a8378}.journey-recent small{font-size:9px;color:#928b80}.journey-list-head span{white-space:nowrap}
@media(max-width:680px){.journey-tree-meta{align-items:flex-start;flex-direction:column;gap:2px}.journey-tree-svg{min-width:320px}.journey-list-head span{font-size:8px}}
/* V58: work-level journey tree — one work grows as one tree */
.journey-list-head>div{display:flex;flex-direction:column;gap:2px}.journey-list-head small{font-size:8px;font-weight:400;color:#928b80}.work-tree-meta{display:flex;gap:14px;justify-content:flex-end;margin:7px 0 2px;font-size:9px;color:#8b8378}.journey-tree-svg.work-tree{max-height:360px}.journey-tree-svg .work-root path{fill:#6f695f}.journey-tree-svg .work-root line{stroke:#6f695f;stroke-width:1.5}.journey-tree-svg .work-root text{font-size:8px;fill:#8a8378}.journey-tree-svg.work-tree .issue circle{fill:#8b8479}
@media(max-width:680px){.journey-list-head>div{min-width:0}.work-tree-meta{justify-content:flex-start}.journey-tree-svg.work-tree{min-width:340px;max-height:420px}}


/* V59: two-stage work tree — compact preview + full-screen tree view */
.tree-preview{position:relative;max-height:190px;overflow:hidden;margin-top:2px}.tree-preview:after{content:"";position:absolute;left:0;right:0;bottom:0;height:28px;background:linear-gradient(to bottom,rgba(250,248,243,0),#faf8f3);pointer-events:none}.tree-preview .journey-tree-scroll{overflow:hidden}.tree-preview .journey-tree-svg.work-tree{max-height:190px;min-width:0}.open-tree-view{display:block;width:100%;margin-top:8px;border-radius:11px;padding:10px 12px;background:#fff;border-color:#d9d0c2;font-size:11px;font-weight:700}
.tree-dialog{width:100vw;max-width:none;height:100dvh;max-height:none;margin:0;border:0;border-radius:0;padding:0;background:#f8f5ef;color:#171717}.tree-dialog::backdrop{background:rgba(15,13,10,.65)}.tree-dialog-bar{position:sticky;top:0;z-index:5;display:flex;align-items:center;justify-content:space-between;gap:18px;padding:18px max(22px,env(safe-area-inset-right)) 14px max(22px,env(safe-area-inset-left));border-bottom:1px solid #ded6c9;background:rgba(248,245,239,.94);backdrop-filter:blur(14px)}.tree-dialog-bar .eyebrow{margin:0 0 4px}.tree-dialog-bar h2{margin:0;font-size:20px}.tree-dialog-close{width:40px;height:40px;padding:0;flex:0 0 auto;background:#fff}.tree-dialog-meta{display:flex;flex-wrap:wrap;gap:8px 18px;padding:12px max(22px,env(safe-area-inset-right)) 10px max(22px,env(safe-area-inset-left));font-size:11px;color:#756e64;border-bottom:1px solid #e6ded2}.tree-dialog-canvas{height:calc(100dvh - 150px);overflow:auto;padding:24px;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}.tree-dialog-canvas .journey-tree-scroll{overflow:visible;min-width:max-content;padding:0}.tree-dialog-canvas .journey-tree-svg.work-tree{width:auto;min-width:900px;max-width:none;max-height:none;height:auto;min-height:520px}.tree-dialog-note{position:fixed;left:50%;bottom:max(10px,env(safe-area-inset-bottom));transform:translateX(-50%);max-width:min(760px,calc(100vw - 30px));margin:0;padding:8px 12px;border:1px solid #ded6c9;border-radius:999px;background:rgba(255,255,255,.9);font-size:9px;color:#817a70;line-height:1.4;text-align:center;backdrop-filter:blur(10px)}
@media(max-width:680px){.tree-preview{max-height:155px}.tree-preview .journey-tree-svg.work-tree{max-height:155px}.tree-dialog-bar{padding-top:max(14px,env(safe-area-inset-top));padding-left:16px;padding-right:16px}.tree-dialog-meta{padding-left:16px;padding-right:16px}.tree-dialog-canvas{padding:18px 14px 60px;height:calc(100dvh - 138px)}.tree-dialog-canvas .journey-tree-svg.work-tree{min-width:760px;min-height:480px}.tree-dialog-note{border-radius:12px}}

/* V59.1: pot/stem correction — branches grow from the top-center stem, never from the pot side */
.journey-tree-svg .work-root .work-trunk{stroke:#6f695f;stroke-width:1.8;stroke-linecap:round}

/* V59.2: WORK TREE vertical growth — pot at bottom, arrivals grow upward */
.tree-preview .journey-tree-svg.work-tree{width:100%;min-width:0;max-height:190px}
.tree-dialog-canvas .journey-tree-scroll{display:flex;justify-content:center;align-items:flex-end;min-width:100%;min-height:100%;overflow:visible}
.tree-dialog-canvas .journey-tree-svg.work-tree{width:auto;min-width:0;max-width:none;max-height:none;height:min(74vh,820px);min-height:560px}
@media(max-width:680px){
  .tree-preview .journey-tree-svg.work-tree{min-width:0;max-height:155px}
  .tree-dialog-canvas .journey-tree-svg.work-tree{min-width:0;min-height:520px;height:70vh}
}

/* V67.1 — public author shelf entry point */
.author-public-shelf-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:4px}.author-public-shelf-actions a,.author-public-shelf-actions button{min-height:42px;display:grid;place-items:center;padding:9px 11px;border:1px solid #d8d0c2;border-radius:12px;background:#fff;color:#222;text-align:center;text-decoration:none;font-size:10px;font-weight:800}.author-public-shelf-actions a{background:#1f1f1f;border-color:#1f1f1f;color:#fff}@media(max-width:480px){.author-public-shelf-actions{grid-template-columns:1fr}}

/* V63.9 — Reader Bookshelf */
.badge.reader-badge{background:rgba(246,243,236,.94);color:#1f1f1f;border:1px solid rgba(31,31,31,.16)}

.topbar-actions{display:flex;align-items:center;gap:8px}
@media(max-width:680px){
  .topbar-actions{gap:5px}
  .topbar-actions button{padding:8px 9px;font-size:11px;white-space:nowrap}
  .brand small{display:none}
}

/* V63.9.1 — contextual bookshelf tabs */
.shelf-tabs{width:min(1180px,calc(100% - 32px));margin:0 auto 18px;display:flex;gap:6px;padding:5px;border:1px solid var(--line);border-radius:14px;background:rgba(255,255,255,.025)}
.shelf-tab{flex:1;min-width:0;border:0;border-radius:10px;background:transparent;color:var(--muted);font-weight:700;padding:10px 14px}
.shelf-tab.is-active{background:rgba(255,255,255,.09);color:var(--text);box-shadow:inset 0 0 0 1px rgba(255,255,255,.06)}
@media(max-width:680px){.shelf-tabs{width:calc(100% - 24px);margin-bottom:14px}.shelf-tab{padding:9px 8px;font-size:13px}}

/* V63.9.2 — desktop .scene drag & drop */
.scene-drop-overlay{position:fixed;inset:0;z-index:50000;display:none;place-items:center;padding:24px;background:rgba(12,14,16,.72);backdrop-filter:blur(4px);pointer-events:none}
.scene-drag-active .scene-drop-overlay{display:grid}
.scene-drop-card{width:min(520px,calc(100vw - 48px));padding:34px 28px;border:2px dashed rgba(255,255,255,.55);border-radius:22px;background:rgba(24,26,29,.96);text-align:center;box-shadow:0 18px 70px rgba(0,0,0,.32)}
.scene-drop-card strong{display:block;font-size:22px;letter-spacing:.01em}
.scene-drop-card span{display:block;margin-top:9px;color:var(--muted);font-size:13px;line-height:1.6}
@media(pointer:coarse){.scene-drop-overlay{display:none!important}}

/* V63.16 — Bookshelf home + work signals */
.shelf-tabs{border-color:#ddd6c8;background:rgba(255,255,255,.34)}
.shelf-tab{color:#746e64}
.shelf-tab.is-active{background:#fff;color:#171717;box-shadow:0 1px 7px rgba(43,34,21,.08),inset 0 0 0 1px rgba(207,199,184,.55)}
.official-shelf{margin:8px 0 0;padding:46px 34px 54px;border:1px solid #ddd6c8;border-radius:20px;background:rgba(255,255,255,.42);text-align:center}
.official-shelf-mark{width:68px;height:68px;margin:0 auto 16px;display:grid;place-items:center;border:1px solid #d5ccbd;border-radius:18px;background:#fff;font-size:24px;font-weight:800;letter-spacing:-.08em;box-shadow:0 10px 30px rgba(43,34,21,.07)}
.official-shelf .eyebrow{margin-bottom:7px}
.official-shelf h2{margin:0 0 10px;font-size:28px;letter-spacing:-.035em}
.official-shelf>p:not(.eyebrow){margin:0 auto;color:#716a60;line-height:1.8;max-width:560px}
.official-empty{max-width:560px;margin:28px auto 0;padding:18px 20px;border-top:1px solid #e2dbcf;display:grid;gap:5px;color:#716a60;font-size:12px}
.official-empty strong{color:#2b2925;font-size:14px}

.strength-panel{margin:0 26px 18px;padding:18px;border:1px solid #e5ddd0;border-radius:16px;background:#faf8f3}
.strength-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin-bottom:13px}
.strength-head .eyebrow{margin-bottom:4px}.strength-head h3{margin:0;font-size:18px}.strength-head>span{font-size:10px;color:#8a8378}
.strength-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.strength-card{min-width:0;padding:13px 12px;border:1px solid #e8e0d4;border-radius:13px;background:#fff}
.strength-label strong{display:block;font-size:12px;line-height:1.35}.strength-label span{display:block;margin-top:4px;color:#91897e;font-size:9px;line-height:1.35}
.strength-value{margin-top:12px;font-size:29px;font-weight:800;letter-spacing:-.055em;line-height:1}.strength-value small{font-size:12px;margin-left:2px;font-weight:700;color:#756e64}
.strength-meter{height:4px;margin-top:10px;border-radius:999px;background:#ebe4d8;overflow:hidden}.strength-meter i{display:block;height:100%;border-radius:inherit;background:#24221f}
.strength-card.is-observing{display:flex;min-height:118px;flex-direction:column}.strength-observing{margin-top:auto;padding-top:16px;font-size:14px;font-weight:800}.strength-sample{margin-top:4px;color:#8e867b;font-size:10px}
.strength-card p{margin:10px 0 0;padding-top:8px;border-top:1px solid #eee8df;color:#90887d;font-size:8px;line-height:1.5}
.strength-note{margin:12px 1px 0;color:#857e74;font-size:9px;line-height:1.6}.strength-loading,.strength-error{padding:10px 2px;color:#7d766b;font-size:12px}.strength-error{color:#8d463f}

@media(max-width:680px){
  .shelf-tabs{gap:4px;padding:4px}.shelf-tab{font-size:11px;padding:9px 5px}
  .official-shelf{padding:34px 18px 42px}.official-shelf h2{font-size:24px}
  .strength-panel{margin:0 18px 16px;padding:14px}.strength-grid{grid-template-columns:1fr}.strength-card{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:12px;align-items:end}.strength-label{grid-row:1/3}.strength-value{margin:0}.strength-meter{grid-column:1/-1}.strength-card.is-observing{display:grid;min-height:0}.strength-observing{margin:0;padding:0;text-align:right}.strength-sample{text-align:right}.strength-card p{grid-column:1/-1}.strength-head{align-items:flex-start}.strength-head>span{padding-top:2px}
}

/* V63.17 — quiet bookshelf chrome */
.topbar{padding-left:max(20px,env(safe-area-inset-left));padding-right:max(14px,env(safe-area-inset-right))}
.bookshelf-menu{position:relative;margin-left:auto}
.bookshelf-author-button{margin-left:auto;max-width:230px;padding:9px 13px;border-color:#d5ccbd;font-size:10px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bookshelf-author-button.is-signed-in::before{content:'●';margin-right:6px;color:#4e9a62;font-size:8px}.bookshelf-menu{margin-left:8px}
.bookshelf-menu>summary{list-style:none;width:42px;height:42px;display:grid;place-items:center;border:1px solid #d5ccbd;border-radius:999px;background:#fff;font-size:17px;font-weight:800;letter-spacing:.08em;cursor:pointer;user-select:none}
.bookshelf-menu>summary::-webkit-details-marker{display:none}
.bookshelf-menu[open]>summary{background:#1f1f1f;color:#fff;border-color:#1f1f1f}
.bookshelf-menu-panel{position:absolute;right:0;top:50px;width:min(300px,calc(100vw - 28px));padding:10px;border:1px solid #d8d0c2;border-radius:17px;background:rgba(250,248,243,.98);box-shadow:0 18px 55px rgba(43,34,21,.18);backdrop-filter:blur(18px);display:grid;gap:6px;z-index:40}
.bookshelf-menu-panel button{width:100%;text-align:left;border:0;border-radius:11px;background:transparent;padding:12px 13px}
.bookshelf-menu-panel button:hover{background:#f0ebe2}
.bookshelf-menu-panel .menu-primary{font-weight:800}
.menu-separator{height:1px;margin:4px 6px;background:#e2dbcf}
.bookshelf-menu-panel p{margin:5px 8px 4px;color:#827a6f;font-size:10px;line-height:1.65}
.bookshelf-menu-toggle{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:10px 13px;border-radius:11px;cursor:pointer;color:#27231f}
.bookshelf-menu-toggle:hover{background:#f0ebe2}
.bookshelf-menu-toggle span{display:grid;gap:2px;min-width:0}
.bookshelf-menu-toggle strong{font-size:11px;line-height:1.4}
.bookshelf-menu-toggle small{color:#8b8378;font-size:8px;line-height:1.4}
.bookshelf-menu-toggle input{width:30px;height:18px;min-width:30px;margin:0;accent-color:#1f1f1f;cursor:pointer}
.bookshelf-service-links{display:flex;flex-wrap:wrap;align-items:center;gap:5px 12px;padding:5px 8px 3px}
.bookshelf-service-links a{color:#8f877c;font-size:9px;line-height:1.55;text-decoration:none;-webkit-tap-highlight-color:transparent}
.bookshelf-service-links a:hover,.bookshelf-service-links a:focus-visible{color:#4f4941;text-decoration:underline;text-underline-offset:2px}
main{padding-top:22px}
.shelf-head{margin:0 0 14px;padding:4px 2px 0;align-items:end}
.shelf-head h1{font-size:25px;letter-spacing:-.04em;margin:0 0 3px}
.shelf-head p{margin:0}
.shelf-tabs{width:100%;margin:0 0 18px;position:relative;z-index:2}
.empty{margin-top:0}
.official-shelf{margin-top:0}
@media(max-width:680px){
  main{padding-top:20px}
  .shelf-head{margin-bottom:12px}
  .shelf-head h1{font-size:23px}
  .shelf-tabs{width:100%;margin-bottom:14px}
  .bookshelf-menu>summary{width:38px;height:38px;font-size:15px}
  .bookshelf-menu-panel{top:45px}
}

/* V66 — author-visible session and bookshelf-first series boxes */
.series-shelf{margin:0 0 28px}.series-shelf-head{display:flex;align-items:end;justify-content:space-between;margin-bottom:12px}.series-shelf-head h2{margin:0;font-size:20px}.series-shelf-head .eyebrow{margin-bottom:4px}.series-shelf-head button{padding:9px 13px;font-size:11px;font-weight:800}.series-boxes{display:grid;gap:14px}.series-box{padding:15px;border:1px solid #d9d0c2;border-radius:18px;background:rgba(255,255,255,.42)}.series-box>header{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:14px}.series-box>header>div{display:flex;align-items:baseline;gap:9px;min-width:0}.series-box>header small{font-size:8px;letter-spacing:.16em;color:#978d7e}.series-box>header h3{margin:0;font-size:17px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.series-box>header span{font-size:10px;color:#81796e}.series-box>header button{padding:7px 12px;font-size:10px}.series-box-books{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,190px));gap:17px}.series-box-empty{margin:0;padding:26px;text-align:center;border:1px dashed #d8d0c2;border-radius:15px;color:#837b70;font-size:12px}
.author-dialog,.series-box-dialog{width:min(620px,calc(100vw - 24px));max-height:86dvh;border:0;border-radius:22px;padding:0;box-shadow:0 24px 80px rgba(0,0,0,.28)}.author-dialog::backdrop,.series-box-dialog::backdrop{background:rgba(15,13,10,.52);backdrop-filter:blur(4px)}.author-dialog-body,.series-box-dialog-body{padding:30px}.author-dialog-body h2,.series-box-dialog-body h2{margin:0 0 20px}.author-dialog form,.author-dialog [id$="SignedIn"]{display:grid;gap:12px}.author-dialog label,.series-box-dialog label{display:grid;gap:6px;color:#655e55;font-size:11px;font-weight:700}.author-dialog input,.series-box-dialog input{width:100%;padding:13px;border:1px solid #d8d0c2;border-radius:12px;background:#fff;font:inherit}.author-dialog button.primary,.series-box-dialog button.primary{border-radius:12px}.author-dialog #bookshelfAuthorSignedIn strong{font-size:20px}.author-dialog #bookshelfAuthorSignedIn small{word-break:break-all;color:#8c8377}.author-status{min-height:1.5em;margin:13px 0 0;color:#777066;font-size:11px}.author-status.is-error{color:#b6413c}.series-box-dialog-body>p:not(.eyebrow){color:#7b746a;font-size:11px}.series-book-choices{display:grid;gap:8px;max-height:48dvh;overflow:auto;margin:16px 0}.series-choice{display:grid;grid-template-columns:28px minmax(0,1fr) auto;align-items:center;gap:9px;padding:10px;border:1px solid #ded6c9;border-radius:13px;background:#fff}.series-choice.is-selected{border-color:#8b7a64;background:#f4efe6}.series-choice.is-disabled{opacity:.48}.series-choice-handle{font-size:15px;text-align:center;cursor:grab}.series-choice>span:nth-child(2){display:grid;gap:3px;min-width:0}.series-choice strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}.series-choice small{color:#857d72;font-size:9px}.series-choice button{padding:7px 10px;font-size:9px}.series-box-actions{display:flex;justify-content:flex-end;gap:8px}.series-box-actions .danger{margin-right:auto;color:#a13a35}.series-box-actions button{border-radius:12px}
@media(max-width:680px){.bookshelf-author-button{max-width:118px;padding:8px 9px;font-size:8px}.series-shelf{margin-bottom:20px}.series-box{padding:12px}.series-box-books{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 10px}.series-box>header h3{font-size:15px}.author-dialog-body,.series-box-dialog-body{padding:26px 18px 20px}.series-book-choices{max-height:45dvh}}
.series-choice-actions{display:flex;align-items:center;gap:4px}.series-choice-actions button{min-width:30px;padding:7px 8px}
.author-dialog [hidden],.series-box-dialog [hidden],.series-shelf[hidden]{display:none!important}
.created-shelf-group-heading{grid-column:1/-1;display:flex;align-items:end;justify-content:space-between;min-height:54px;padding:4px 1px 10px;border-bottom:1px solid #ddd4c6}.created-shelf-group-heading>div{display:flex;align-items:baseline;gap:9px}.created-shelf-group-heading small{font-size:8px;letter-spacing:.18em;color:#918778}.created-shelf-group-heading h2{margin:0;font-size:20px}.created-shelf-group-heading>span{color:#81786c;font-size:10px}.created-draft-heading{margin-top:18px}.series-choice.is-dragging{opacity:.35}.series-choice.is-drop-target{border-color:#554936;box-shadow:0 0 0 2px rgba(85,73,54,.12)}
@media(max-width:680px){.created-shelf-group-heading{min-height:46px;padding-bottom:8px}.created-shelf-group-heading h2{font-size:17px}.created-draft-heading{margin-top:10px}}

/* V68 — public author bookshelf header editor */
.author-dialog-body{max-height:86dvh;overflow:auto}
.author-profile-editor{margin:8px 0 2px;padding:16px;display:grid;gap:11px;border:1px solid #d9d0c2;border-radius:16px;background:#f8f5ef}
.author-profile-editor-head small{display:block!important;margin-bottom:4px;color:#9a8d7b!important;font-size:7px!important;letter-spacing:.18em}
.author-profile-editor-head h3{margin:0;font-size:15px}
.author-profile-editor label{gap:5px}
.author-profile-editor input{background:#fff}
.author-profile-note{margin:0;color:#81786d;font-size:9px;line-height:1.55}
.author-short-url{overflow:hidden;margin:-4px 0 0;color:#7d7468;font-size:8px;line-height:1.4;text-overflow:ellipsis;white-space:nowrap}
.author-profile-editor>button{justify-self:end;padding:9px 12px;font-size:10px;font-weight:800}
.author-profile-editor>.author-status{margin:0}
.author-header-editor{margin:8px 0 2px;padding:16px;border:1px solid #d9d0c2;border-radius:16px;background:#f8f5ef}
.author-header-editor-head{display:flex;align-items:end;justify-content:space-between;gap:14px}
.author-header-editor-head small{display:block!important;margin-bottom:4px;color:#9a8d7b!important;font-size:7px!important;letter-spacing:.18em}
.author-header-editor-head h3{margin:0;font-size:15px}
.author-header-editor-head button{padding:8px 11px;font-size:10px;font-weight:800}
.author-header-previews{display:grid;grid-template-columns:minmax(0,1fr);align-items:end;gap:12px;margin-top:13px}
.author-header-previews>div>span{display:block;margin:0 0 5px;color:#877e71;font-size:8px;font-weight:800;letter-spacing:.12em}
.author-header-preview{position:relative;overflow:hidden;border:1px solid #d5ccbe;border-radius:10px;background:#24262a center/cover no-repeat;box-shadow:inset 0 0 0 999px rgba(0,0,0,.2)}
.author-header-preview.desktop{aspect-ratio:4.4/1}
.author-header-preview.mobile{aspect-ratio:1.35/1}
.author-header-preview em{position:absolute;inset:0;display:grid;place-items:center;color:#aaa39a;font-size:9px;font-style:normal}
.author-header-position-controls{margin-top:13px;display:grid;gap:10px}
.author-header-position-controls fieldset{margin:0;padding:10px;border:1px solid #ded6ca;border-radius:12px;background:#fff}
.author-header-position-controls legend{padding:0 5px;color:#665f55;font-size:9px;font-weight:800}
.author-header-position-controls fieldset label{grid-template-columns:34px minmax(0,1fr);align-items:center;gap:8px;margin:4px 0;font-size:9px}
.author-header-position-controls input[type="range"]{min-height:24px;padding:0;border:0;background:transparent}
.author-header-actions{display:flex;justify-content:flex-end;gap:8px}
.author-header-actions #deleteAuthorHeader{margin-right:auto;color:#a23f38}
.author-header-actions button{padding:9px 12px;font-size:10px}
.author-header-editor>.author-status{margin-bottom:0}
@media(max-width:680px){
  .author-profile-editor{padding:13px}
  .author-header-editor{padding:13px}
  .author-header-previews{grid-template-columns:minmax(0,1fr);gap:9px}
  .author-header-preview.desktop{aspect-ratio:3.5/1}
  .author-header-preview.mobile{aspect-ratio:1.05/1}
  .author-header-position-controls fieldset{padding:8px}
}

/* V66.2 — compact horizontal series boxes + desktop density */
.desktop-density-control{display:flex;align-items:center;justify-content:flex-end;gap:4px;margin:-8px 0 14px}.desktop-density-control>span{margin-right:4px;color:#8a8175;font-size:9px}.desktop-density-control button{width:28px;height:28px;padding:0;border-radius:8px;font-size:10px}.desktop-density-control button.is-active{border-color:#1f1f1f;background:#1f1f1f;color:#fff}.desktop-density-control[hidden]{display:none!important}
.series-shelf{min-width:0;overflow:hidden}.series-boxes{display:flex;gap:14px;overflow-x:auto;overflow-y:hidden;padding:3px 3px 12px;scroll-snap-type:x proximity;overscroll-behavior-x:contain;scrollbar-width:thin}.series-box{position:relative;flex:0 0 184px;width:184px;min-height:202px;padding:12px!important;border:1px solid #d9d0c2!important;border-radius:17px!important;background:rgba(255,255,255,.48)!important;color:#191919;text-align:left;scroll-snap-align:start;overflow:visible}.series-box:hover{background:#fff!important}.series-cover-stack{position:relative;display:block;width:104px;height:132px;margin:0 auto 10px}.series-stack-cover{position:absolute;inset:0;width:86px;aspect-ratio:3/4;border:1px solid rgba(210,201,187,.9);border-radius:8px;background:#e9e2d7;overflow:hidden;box-shadow:0 7px 18px rgba(44,35,23,.13);transform-origin:bottom center}.series-stack-cover img{width:100%;height:100%;display:block;object-fit:cover}.series-stack-cover-0{z-index:3;transform:translate(0,5px) rotate(-1deg)}.series-stack-cover-1{z-index:2;transform:translate(10px,1px) rotate(3deg)}.series-stack-cover-2{z-index:1;transform:translate(18px,0) rotate(6deg)}.series-stack-empty{display:grid;width:100%;height:100%;place-items:center;color:#aaa091;font-size:24px}.series-box-copy{display:grid;gap:3px;min-width:0}.series-box-copy small{color:#968c7c;font-size:7px;letter-spacing:.16em}.series-box-copy strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}.series-box-copy em{color:#81786c;font-size:9px;font-style:normal}.series-box-empty{flex:0 0 100%;box-sizing:border-box}
@media(min-width:681px){#grid.grid[data-desktop-columns="3"],.shelf-swipe-page .grid[data-desktop-columns="3"]{grid-template-columns:repeat(3,minmax(0,1fr))}#grid.grid[data-desktop-columns="4"],.shelf-swipe-page .grid[data-desktop-columns="4"]{grid-template-columns:repeat(4,minmax(0,1fr))}#grid.grid[data-desktop-columns="5"],.shelf-swipe-page .grid[data-desktop-columns="5"]{grid-template-columns:repeat(5,minmax(0,1fr));gap:20px 16px}#grid.grid[data-desktop-columns="6"],.shelf-swipe-page .grid[data-desktop-columns="6"]{grid-template-columns:repeat(6,minmax(0,1fr));gap:18px 14px}#grid.grid[data-desktop-columns="5"] .book-meta h3,#grid.grid[data-desktop-columns="6"] .book-meta h3{font-size:12px}#grid.grid[data-desktop-columns="6"] .book-meta p{font-size:9px}}
@media(max-width:680px){.desktop-density-control{display:none}.series-boxes{gap:11px;margin-right:-14px;padding-right:14px}.series-box{flex-basis:154px;width:154px;min-height:181px;padding:10px!important}.series-cover-stack{width:91px;height:116px}.series-stack-cover{width:75px}.series-box-copy strong{font-size:11px}}

/* V66.3 — direct BOX drop, compact density menu and usable BOX contents */
.desktop-density-control>label{margin-right:3px;color:#8a8175;font-size:9px}.desktop-density-control select{height:30px;padding:0 28px 0 10px;border:1px solid #d5ccbd;border-radius:9px;background:#fff;color:#27231f;font:700 10px/1 system-ui;cursor:pointer}.series-box.is-drag-over{border-color:#554936!important;background:#f2eadf!important;box-shadow:0 0 0 3px rgba(85,73,54,.14),0 12px 30px rgba(53,42,27,.13)!important;transform:translateY(-3px)}.series-box.is-drag-over::after{content:'このBOXへ入れる';position:absolute;inset:auto 8px 8px;padding:7px;border-radius:999px;background:#1f1f1f;color:#fff;font-size:9px;font-weight:800;text-align:center}.series-choice-actions{flex-wrap:nowrap}.series-choice-actions button{min-width:30px;padding:7px 7px}.series-choice-actions button[data-action="detail"]{min-width:40px}.series-choice-empty{margin:0;padding:28px 14px;border:1px dashed #d8d0c2;border-radius:13px;color:#81796e;text-align:center;font-size:11px}
@media(max-width:680px){.series-choice{grid-template-columns:24px minmax(0,1fr)}.series-choice>button,.series-choice-actions{grid-column:2;justify-self:start}.series-choice-actions{display:flex;flex-wrap:wrap}.series-choice-actions button{min-width:34px}}

/* V66.4 — stable, manually ordered series boxes */
.series-box[draggable="true"]{cursor:grab}.series-box.is-box-dragging{opacity:.42;cursor:grabbing}.series-box.is-box-drop-target{border-color:#6f604c!important;transform:translateX(3px);box-shadow:0 0 0 2px rgba(111,96,76,.12)!important}.series-boxes.is-reordering{scroll-snap-type:none}


/* V63.18 — Studio <-> Bookshelf creation/save routes */
.shelf-create-link{margin-left:auto;align-self:center;min-height:34px;padding:7px 13px;border:1px solid #d8d0c2;border-radius:999px;background:#fff;color:#25221e;font-size:11px;font-weight:800;white-space:nowrap}
.shelf-create-link:hover{background:#f0ebe2}
.empty #emptyCreateButton{margin-right:6px}
@media(max-width:680px){
  .shelf-create-link{min-height:32px;padding:6px 11px;font-size:10px}
  .empty #emptyCreateButton{margin-right:0}
}

/* V63.19 — shelf actions, manual order, cardboard storage box */
.backup-private-note{padding-top:7px!important;border-top:1px solid #e3dccf;color:#9a5e4e!important}
.shelf-head-actions{margin-left:auto;display:flex;align-items:center;gap:7px}
.shelf-icon-action{width:35px;height:35px;min-width:35px;padding:0;display:grid;place-items:center;border-radius:999px;background:#fff;border:1px solid #d8d0c2;font-size:20px;line-height:1;font-weight:500}
.shelf-icon-action:hover{background:#f0ebe2}.shelf-icon-pen{font-size:18px;padding-bottom:2px}
.book[draggable="true"]{cursor:grab}.book.is-dragging{opacity:.35}.book.is-drag-target{transform:translateY(-3px)}
.book.is-drag-target .cover{outline:2px solid #8f806c;outline-offset:3px}.book.is-touch-dragging{opacity:.25}
.book-drag-ghost{position:fixed!important;z-index:70000!important;pointer-events:none!important;margin:0!important;opacity:.9;transform:rotate(2deg) scale(.98);filter:drop-shadow(0 18px 24px rgba(45,35,22,.25));transition:none!important}
.archive-drop-zone{width:100%;margin:28px 0 0;padding:17px 20px;display:flex;align-items:center;gap:13px;border:1px dashed #cfc4b2;border-radius:16px;background:rgba(255,255,255,.28);color:#625c53;text-align:left;transition:.16s ease}
.archive-drop-zone:hover{background:rgba(255,255,255,.5)}.archive-drop-zone.is-drag-over{border-style:solid;border-color:#7e6f5b;background:#eee5d8;transform:scale(1.01)}
.archive-box-icon{font-size:30px;filter:saturate(.72)}.archive-box-copy{display:grid;gap:2px}.archive-box-copy strong{font-size:13px}.archive-box-copy small{font-size:10px;color:#8a8175}.archive-box-hint{margin-left:auto;font-size:10px;color:#8c8378}
.archive-dialog{width:min(620px,calc(100vw - 24px));max-height:min(82dvh,760px);border:0;border-radius:20px;padding:0;box-shadow:0 24px 80px rgba(0,0,0,.28)}.archive-dialog::backdrop{background:rgba(15,13,10,.52);backdrop-filter:blur(3px)}
.archive-dialog-head{padding:28px 28px 18px;border-bottom:1px solid #eee7dc}.archive-dialog-head h2{margin:0 0 7px;font-size:24px}.archive-dialog-head p:not(.eyebrow){margin:0;color:#7c7469;font-size:12px}
.archive-list{padding:16px 20px 22px;display:grid;gap:10px;overflow:auto;max-height:60dvh}.archive-empty{padding:44px 20px;text-align:center;color:#8d8579;font-size:13px}
.archive-item{display:grid;grid-template-columns:56px minmax(0,1fr) auto;gap:12px;align-items:center;padding:9px;border:1px solid #e5ddd0;border-radius:13px;background:#fbf9f5}.archive-thumb{width:56px;aspect-ratio:3/4;border-radius:7px;overflow:hidden;background:#eee7dc}.archive-thumb img{width:100%;height:100%;object-fit:cover}.archive-thumb .cover-fallback{font-size:20px}.archive-item-copy{min-width:0;display:grid;gap:4px}.archive-item-copy strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}.archive-item-copy span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#81796e;font-size:10px}.archive-restore{padding:8px 11px;font-size:10px;white-space:nowrap}
@media(max-width:680px){
  .shelf-icon-action{width:33px;height:33px;min-width:33px;font-size:19px}.shelf-icon-pen{font-size:17px}
  .archive-drop-zone{margin-top:24px;padding:14px 15px}.archive-box-icon{font-size:27px}.archive-box-hint{font-size:9px}.book[draggable="true"]{cursor:pointer}
  .archive-dialog-head{padding:24px 20px 16px}.archive-list{padding:13px 14px 18px}.archive-item{grid-template-columns:48px minmax(0,1fr);}.archive-thumb{width:48px}.archive-restore{grid-column:2;justify-self:start;margin-top:-2px}
}

/* V63.20 — tab-aware actions, quiet storage target, drag conflict guard */
.archive-drop-zone{
  position:relative;
  width:min(520px,100%);
  min-height:126px;
  margin:68px auto 0;
  padding:28px 34px;
  display:grid;
  place-items:center;
  border:0;
  background:transparent;
  color:#625c53;
  text-align:center;
  overflow:visible;
}
.archive-drop-zone:hover{background:transparent}
.archive-box-shell{
  display:inline-flex;
  align-items:center;
  gap:9px;
  min-width:154px;
  padding:10px 14px;
  border:1px solid #d8cfbf;
  border-radius:13px;
  background:rgba(255,255,255,.5);
  box-shadow:0 5px 18px rgba(43,34,21,.045);
  transition:transform .18s ease,background .18s ease,border-color .18s ease,box-shadow .18s ease;
}
.archive-box-icon{font-size:22px}.archive-box-copy{display:grid;gap:1px;text-align:left}.archive-box-copy strong{font-size:11px}.archive-box-copy small{font-size:9px}
.archive-box-hint{position:absolute;left:50%;bottom:10px;transform:translateX(-50%);font-size:9px;color:#aaa194;white-space:nowrap;opacity:.72}
.archive-drop-zone.is-drag-over{border:0;background:rgba(228,219,205,.18);transform:none;border-radius:24px}
.archive-drop-zone.is-drag-over .archive-box-shell{transform:scale(1.07);background:#eee5d8;border-color:#8f806c;box-shadow:0 10px 28px rgba(56,44,28,.12)}
.book-box-flight{position:fixed!important;z-index:70020!important;pointer-events:none!important;margin:0!important;transform-origin:center center!important}
@media(max-width:680px){
  .archive-drop-zone{width:100%;min-height:118px;margin-top:56px;padding:24px 22px}.archive-box-shell{min-width:142px;padding:9px 12px}.archive-box-icon{font-size:21px}.archive-box-hint{bottom:9px;font-size:8px}
}

/* V63.20.1 — hidden state must win over component display rules */
.shelf-head-actions[hidden],
.shelf-icon-action[hidden],
.archive-drop-zone[hidden],
.official-shelf[hidden],
#grid[hidden],
#localShelfMount > .grid[hidden],
.shelf-tab[hidden],
#emptyState[hidden],
.local-note[hidden]{display:none!important}

/* V63.21 — iPhone long-press reorder + floating storage dock */
.book,.book *{
  -webkit-user-select:none!important;
  user-select:none!important;
  -webkit-touch-callout:none!important;
}
.book img{-webkit-user-drag:none;user-drag:none;pointer-events:none}
.book-meta,.book-meta *,.cover,.cover *{pointer-events:none}
.book.reorder-shift{will-change:transform}
.archive-launcher{display:none}
@media(max-width:680px) and (pointer:coarse){
  #grid .book{touch-action:none}
  .archive-launcher{
    position:fixed;left:max(14px,env(safe-area-inset-left));bottom:max(14px,env(safe-area-inset-bottom));z-index:3100;
    width:44px;height:44px;padding:0;border:1px solid #d7cebf;border-radius:14px;background:rgba(250,247,241,.94);
    box-shadow:0 7px 24px rgba(45,35,22,.12);display:grid;place-items:center;font-size:21px;line-height:1;
    -webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);transition:transform .18s ease,opacity .18s ease;
  }
  .archive-launcher span{position:absolute;right:-5px;top:-5px;min-width:18px;height:18px;padding:0 4px;display:grid;place-items:center;border-radius:999px;background:#25221e;color:#fff;font-size:9px;font-weight:800}
  .archive-launcher[hidden]{display:none!important}
  .archive-launcher.is-open{transform:translateY(78px);opacity:0;pointer-events:none}
  .archive-drop-zone{
    position:fixed;left:0;right:0;bottom:0;z-index:3000;width:100%;height:92px;min-height:92px;margin:0;padding:12px max(18px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left));
    border-top:1px solid #ddd4c7;border-radius:18px 18px 0 0;background:rgba(248,245,239,.96);box-shadow:0 -12px 34px rgba(45,35,22,.10);
    -webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px);transform:translateY(110%);opacity:0;pointer-events:none;transition:transform .22s cubic-bezier(.2,.75,.25,1),opacity .18s ease;
  }
  .archive-drop-zone.is-dock-open{transform:translateY(0);opacity:1;pointer-events:auto}
  .archive-drop-zone .archive-box-shell{min-width:148px;padding:8px 12px;background:rgba(255,255,255,.62)}
  .archive-drop-zone .archive-box-hint{bottom:max(5px,env(safe-area-inset-bottom));font-size:8px}
  .archive-drop-zone.is-drag-over{background:rgba(232,223,209,.96)}
  .archive-dock-close{position:absolute;right:max(12px,env(safe-area-inset-right));top:10px;width:30px;height:30px;display:grid;place-items:center;border-radius:999px;font-size:22px;line-height:1;color:#70695f;background:rgba(255,255,255,.72);border:1px solid #ddd4c7;z-index:2}
  .archive-dock-close:active{transform:scale(.92)}
  body.archive-dock-open{padding-bottom:92px}
  .book.is-touch-dragging{opacity:.16}
  .book-drag-ghost{transform:rotate(1deg) scale(.96);opacity:.94}
}

/* V63.21.2 — calmer iPhone shelf scroll + live desktop FLIP reorder */
@media (pointer:fine){
  #grid .book{transition:none}
  #grid .book.is-drag-target .cover{transition:outline-color .12s ease,transform .12s ease}
}

/* V63.21.3 — native iPhone scrolling + unified floating storage dock */
@media (pointer:coarse){
  /* Normal swipes that begin on a book must remain ordinary Safari scrolling.
     Reorder only takes over after the long-press timer has armed it. */
  #grid .book{touch-action:auto}
}

/* The cardboard box uses the same launcher -> bottom dock interaction on desktop
   and mobile. Keep the launcher visually small; the dock is the actual drop area. */
.archive-launcher{
  position:fixed;
  left:max(16px,env(safe-area-inset-left));
  bottom:max(16px,env(safe-area-inset-bottom));
  z-index:3100;
  width:46px;height:46px;padding:0;
  border:1px solid #d7cebf;border-radius:14px;
  background:rgba(250,247,241,.94);
  box-shadow:0 7px 24px rgba(45,35,22,.12);
  display:grid;place-items:center;
  font-size:21px;line-height:1;
  -webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);
  transition:transform .18s ease,opacity .18s ease;
}
.archive-launcher span{
  position:absolute;right:-5px;top:-5px;min-width:18px;height:18px;padding:0 4px;
  display:grid;place-items:center;border-radius:999px;
  background:#25221e;color:#fff;font-size:9px;font-weight:800;
}
.archive-launcher[hidden]{display:none!important}
.archive-launcher.is-open{transform:translateY(78px);opacity:0;pointer-events:none}
.archive-drop-zone{
  position:fixed;left:0;right:0;bottom:0;z-index:3000;
  width:100%;height:96px;min-height:96px;margin:0;
  padding:12px max(20px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left));
  border:0;border-top:1px solid #ddd4c7;border-radius:18px 18px 0 0;
  background:rgba(248,245,239,.96);box-shadow:0 -12px 34px rgba(45,35,22,.10);
  -webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px);
  transform:translateY(110%);opacity:0;pointer-events:none;
  transition:transform .22s cubic-bezier(.2,.75,.25,1),opacity .18s ease;
}
.archive-drop-zone.is-dock-open{transform:translateY(0);opacity:1;pointer-events:auto}
.archive-drop-zone .archive-box-shell{min-width:154px;padding:8px 13px;background:rgba(255,255,255,.62)}
.archive-drop-zone .archive-box-hint{bottom:max(5px,env(safe-area-inset-bottom));font-size:8px}
.archive-drop-zone.is-drag-over{background:rgba(232,223,209,.96)}
.archive-dock-close{
  position:absolute;right:max(16px,env(safe-area-inset-right));top:12px;
  width:30px;height:30px;display:grid;place-items:center;border-radius:999px;
  font-size:22px;line-height:1;color:#70695f;background:rgba(255,255,255,.72);
  border:1px solid #ddd4c7;z-index:2;
}
.archive-dock-close:active{transform:scale(.92)}
body.archive-dock-open{padding-bottom:96px}

@media(max-width:680px) and (pointer:coarse){
  .archive-launcher{left:max(14px,env(safe-area-inset-left));bottom:max(14px,env(safe-area-inset-bottom));width:44px;height:44px}
  .archive-drop-zone{height:92px;min-height:92px;padding:12px max(18px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left))}
  .archive-dock-close{right:max(12px,env(safe-area-inset-right));top:10px}
  body.archive-dock-open{padding-bottom:92px}
}


/* V63.22: iPhone pinch shelf density (2 / 3 / 4 columns). */
@media(max-width:680px){
  #grid.grid[data-mobile-columns="2"]{grid-template-columns:repeat(2,minmax(0,1fr));gap:17px 13px}
  #grid.grid[data-mobile-columns="3"]{grid-template-columns:repeat(3,minmax(0,1fr));gap:15px 9px}
  #grid.grid[data-mobile-columns="4"]{grid-template-columns:repeat(4,minmax(0,1fr));gap:13px 7px}
  #grid.grid[data-mobile-columns="3"] .book-meta{padding-top:9px}
  #grid.grid[data-mobile-columns="4"] .book-meta{padding-top:7px}
  #grid.grid[data-mobile-columns="3"] .book-meta h3{font-size:11px;margin-bottom:3px}
  #grid.grid[data-mobile-columns="3"] .book-meta p{font-size:9px}
  #grid.grid[data-mobile-columns="4"] .book-meta h3{font-size:9px;margin-bottom:2px}
  #grid.grid[data-mobile-columns="4"] .book-meta p{font-size:8px}
  #grid.grid[data-mobile-columns="3"] .badge{top:6px;left:6px;padding:4px 6px;font-size:7px}
  #grid.grid[data-mobile-columns="4"] .badge{top:5px;left:5px;padding:3px 5px;font-size:6px}
  #grid.grid[data-mobile-columns="3"] .cover,#grid.grid[data-mobile-columns="4"] .cover{border-radius:7px}
}

/* V63.24 — manga-viewer style interactive shelf paging */
@media(max-width:680px) and (pointer:coarse){
  .shelf-swipe-stage{
    position:fixed;left:0;right:0;bottom:0;z-index:1450;overflow:hidden;
    background:#f6f3ec;pointer-events:none;contain:layout paint;
  }
  .shelf-swipe-page{
    position:absolute;inset:0;will-change:transform;backface-visibility:hidden;
  }
  .shelf-swipe-page-inner{max-width:1120px;margin:0 auto;padding:0 14px 80px;min-height:100%;display:flow-root}
  .shelf-swipe-page .book{pointer-events:none}
  .shelf-swipe-page .grid[data-mobile-columns="2"]{grid-template-columns:repeat(2,minmax(0,1fr));gap:17px 13px}
  .shelf-swipe-page .grid[data-mobile-columns="3"]{grid-template-columns:repeat(3,minmax(0,1fr));gap:15px 9px}
  .shelf-swipe-page .grid[data-mobile-columns="4"]{grid-template-columns:repeat(4,minmax(0,1fr));gap:13px 7px}
  .shelf-swipe-page .grid[data-mobile-columns="3"] .book-meta{padding-top:9px}
  .shelf-swipe-page .grid[data-mobile-columns="4"] .book-meta{padding-top:7px}
  .shelf-swipe-page .grid[data-mobile-columns="3"] .book-meta h3{font-size:11px;margin-bottom:3px}
  .shelf-swipe-page .grid[data-mobile-columns="3"] .book-meta p{font-size:9px}
  .shelf-swipe-page .grid[data-mobile-columns="4"] .book-meta h3{font-size:9px;margin-bottom:2px}
  .shelf-swipe-page .grid[data-mobile-columns="4"] .book-meta p{font-size:8px}
  .shelf-swipe-page .grid[data-mobile-columns="3"] .badge{top:6px;left:6px;padding:4px 6px;font-size:7px}
  .shelf-swipe-page .grid[data-mobile-columns="4"] .badge{top:5px;left:5px;padding:3px 5px;font-size:6px}
  .shelf-swipe-page .empty{margin-top:0}
}


/* V63.24.2 — freeze the bookshelf behind menus / modal sheets on iPhone.
   Archive dock itself stays scrollable; only the archive contents dialog locks. */
body.bookshelf-scroll-locked{
  position:fixed;
  left:0;
  right:0;
  width:100%;
  overflow:hidden;
  overscroll-behavior:none;
}

/* V63.25 — portable storage-box ZIP */
.archive-transfer{padding:0 20px 20px;display:grid;grid-template-columns:1fr 1fr;gap:10px;border-top:1px solid #eee7dc;background:#fff}
.archive-transfer button{margin-top:16px;padding:12px 14px;border-radius:12px;font-size:12px;font-weight:800}
.archive-transfer p{grid-column:1/-1;margin:0;color:#81796e;font-size:10px;line-height:1.65}
@media(max-width:680px){.archive-transfer{padding:0 14px 16px}.archive-transfer button{padding:11px 10px;font-size:11px}}


/* V63.25.3 — compact box drop target, batch unpack, per-shelf scroll memory */
.archive-launcher.is-drag-over{
  transform:scale(1.12);
  background:#eee5d8;
  border-color:#8f806c;
  box-shadow:0 9px 28px rgba(56,44,28,.18);
}
.archive-item{
  position:relative;
  cursor:pointer;
  padding-right:42px;
}
.archive-check{
  position:absolute;
  right:13px;
  top:50%;
  transform:translateY(-50%);
  width:20px;
  height:20px;
  margin:0;
  accent-color:#25221e;
}
.archive-item:has(.archive-check:checked){
  border-color:#9b8c76;
  background:#f1ebe1;
  box-shadow:0 0 0 1px rgba(126,111,91,.12) inset;
}
.archive-batch-actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:13px 20px;
  border-top:1px solid #eee7dc;
  background:#fff;
}
.archive-batch-actions span{
  color:#81796e;
  font-size:10px;
  font-weight:700;
}
.archive-batch-actions button{
  padding:10px 14px;
  border-radius:12px;
  font-size:11px;
  font-weight:800;
}
.archive-batch-actions button:disabled{opacity:.38;cursor:default}
@media(max-width:680px){
  .archive-item{padding-right:42px}
  .archive-check{right:12px;width:21px;height:21px}
  .archive-batch-actions{position:sticky;bottom:0;z-index:2;padding:11px 14px;box-shadow:0 -7px 18px rgba(45,35,22,.06)}
  .archive-batch-actions button{padding:10px 12px;font-size:10px}
}

/* V63.25.5 — atomic per-shelf scroll restore on iPhone.
   The manga swipe snapshot remains visible while the freshly rendered live shelf
   is positioned once, preventing Safari from showing an intermediate Y position. */
@media(max-width:680px) and (pointer:coarse){
  body.shelf-scroll-restoring #grid,
  body.shelf-scroll-restoring #emptyState,
  body.shelf-scroll-restoring #officialShelf{visibility:hidden!important}
}

/* V63.26 — fixed compact shelf chrome + stable manga-viewer viewport */
.shelf-chrome{position:relative;z-index:12;background:#f6f3ec}
@media(max-width:680px){
  main{padding-top:6px}
  .shelf-chrome{
    position:sticky;top:60px;z-index:18;
    margin:0 -14px 10px;padding:8px 14px 9px;
    background:rgba(246,243,236,.97);
    border-bottom:1px solid rgba(221,214,200,.72);
    -webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);
  }
  .shelf-head{margin:0 0 7px;padding:0;min-height:39px;align-items:center}
  .shelf-head h1{font-size:20px;line-height:1.05;margin:0 0 1px}
  .shelf-head p{font-size:10px;line-height:1.1}
  .shelf-head-actions{gap:6px}
  .shelf-icon-action{width:32px;height:32px;min-width:32px;font-size:18px}
  .shelf-icon-pen{font-size:16px}
  .shelf-tabs{margin:0;width:100%;padding:3px;gap:3px;border-radius:13px}
  .shelf-tab{padding:7px 5px;font-size:11px;border-radius:10px}
  #grid,.empty,.official-shelf{scroll-margin-top:132px}
}

/* V63.26.1 — keep the whole mobile shelf chrome physically fixed.
   V63.26 used sticky, so the chrome still travelled from its natural position
   to top:60px and looked as if it slid under / compressed into the top bar. */
@media(max-width:680px) and (pointer:coarse){
  .topbar{
    position:fixed;
    top:0;left:0;right:0;
    width:100%;
    z-index:30;
  }
  main{
    /* 60px top bar + ~96px shelf chrome + a small breathing gap. */
    padding-top:166px;
  }
  .shelf-chrome{
    position:fixed;
    top:60px;
    left:0;right:0;
    width:100%;
    margin:0;
    padding:8px 14px 9px;
    z-index:28;
    min-height:96px;
  }
  #grid,.empty,.official-shelf{
    scroll-margin-top:166px;
  }
}

/* V63.26.2 — short shelves must not manufacture vertical scroll travel.
   iOS Safari's legacy 100vh can be taller than the visible dynamic viewport,
   which allowed a one-row shelf to slip under the fixed chrome and leaked that
   bogus Y into the neighbouring shelf snapshot. */
@media(max-width:680px) and (pointer:coarse){
  body{min-height:100dvh}
  /* Do not switch the root scroller to overflow:hidden here.  iOS Safari can
     restore the previous Visual Viewport offset after a long shelf is replaced
     by a short one, even after scrollTo(0) succeeded.  The JS scroll guard
     already clamps short shelves without changing the root scrolling mode. */
  body.shelf-no-vertical-scroll{overscroll-behavior-y:none}
}

/* V63.27 — reclaim mobile shelf viewport + keep storage-box transfer controls visible. */
@media(max-width:680px) and (pointer:coarse){
  .topbar{height:52px}
  main{padding-top:140px}
  .shelf-chrome{
    top:52px;
    min-height:82px;
    padding:5px 14px 6px;
  }
  .shelf-head{min-height:32px;margin:0 0 4px;align-items:center}
  .shelf-head h1{font-size:19px;line-height:1;margin:0 0 1px}
  .shelf-head p{font-size:9px;line-height:1}
  .shelf-head-actions{gap:5px}
  .shelf-icon-action{width:30px;height:30px;min-width:30px;font-size:17px}
  .shelf-icon-pen{font-size:15px}
  .shelf-tabs{padding:2px;gap:2px;border-radius:12px}
  .shelf-tab{padding:6px 4px;font-size:10.5px;border-radius:9px}
  #grid,.empty,.official-shelf{scroll-margin-top:140px}
}

/* The dialog itself never scrolls. Only the book list does, so both the
   selection action and box transfer controls remain visible at all times. */
.archive-dialog{
  display:none;
  flex-direction:column;
  overflow:hidden;
}
.archive-dialog[open]{display:flex}
.archive-dialog-head{flex:0 0 auto}
.archive-list{
  flex:1 1 auto;
  min-height:0;
  max-height:none;
  overflow:auto;
  overscroll-behavior:contain;
}
.archive-batch-actions,.archive-transfer{flex:0 0 auto}
@media(max-width:680px){
  .archive-dialog{max-height:min(82dvh,760px)}
  .archive-dialog-head{padding:20px 20px 12px}
  .archive-dialog-head h2{font-size:22px;margin-bottom:5px}
  .archive-list{padding:11px 14px 12px}
  .archive-batch-actions{
    position:relative;
    bottom:auto;
    z-index:3;
    padding:9px 14px;
    box-shadow:0 -5px 14px rgba(45,35,22,.045);
  }
  .archive-transfer{
    position:relative;
    z-index:3;
    padding:8px 14px 12px;
    gap:8px;
    box-shadow:0 -4px 12px rgba(45,35,22,.035);
  }
  .archive-transfer button{margin-top:0;padding:10px 8px;font-size:10.5px}
  .archive-transfer p{font-size:9px;line-height:1.45}
}

/* V63.28 — tabs-only top chrome + bottom-corner shelf actions. */
.shelf-head-meta{display:none!important}
.shelf-floating-actions{
  position:fixed;
  right:max(18px,env(safe-area-inset-right));
  bottom:max(18px,env(safe-area-inset-bottom));
  z-index:24;
  display:flex;
  gap:8px;
  align-items:center;
}
.shelf-floating-actions[hidden]{display:none!important}
.shelf-floating-actions .shelf-icon-action{
  width:48px;height:48px;min-width:48px;
  border-radius:15px;
  background:rgba(255,255,255,.88);
  box-shadow:0 8px 24px rgba(45,35,22,.08);
  -webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);
}
@media(max-width:680px) and (pointer:coarse){
  /* Top area now contains only the global header and the three shelf tabs. */
  main{padding-top:100px}
  .shelf-chrome{
    top:52px;
    min-height:48px;
    padding:5px 14px 6px;
  }
  .shelf-tabs{margin:0;padding:2px;gap:2px;border-radius:12px}
  .shelf-tab{padding:7px 4px;font-size:11px;border-radius:9px}
  #grid,.empty,.official-shelf{scroll-margin-top:100px}

  .shelf-floating-actions{
    right:max(14px,env(safe-area-inset-right));
    bottom:max(14px,env(safe-area-inset-bottom));
    gap:7px;
  }
  .shelf-floating-actions .shelf-icon-action{
    width:44px;height:44px;min-width:44px;
    border-radius:14px;
    font-size:20px;
  }
  .shelf-floating-actions .shelf-icon-pen{font-size:17px}
}

/* V63.29 — reader-visible journey for the exact owned Distribution copy */
.copy-journey-panel{margin:0 26px 18px;padding:16px 18px;border:1px solid #e5ddd0;border-radius:16px;background:#faf8f3}
.copy-journey-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin-bottom:9px}.copy-journey-head .eyebrow{margin:0 0 4px}.copy-journey-head h3{margin:0;font-size:17px}.copy-journey-head>span{font-size:9px;color:#91897e}
.copy-journey-lead{margin:0 0 12px;font-size:14px;font-weight:800;line-height:1.55;letter-spacing:-.02em}.copy-journey-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.copy-journey-stats>div{padding:9px 10px;border:1px solid #e8e0d4;border-radius:11px;background:#fff}.copy-journey-stats small{display:block;font-size:9px;color:#8a8378}.copy-journey-stats strong{display:block;margin-top:3px;font-size:19px}.copy-journey-now{margin:10px 0 0;padding:9px 10px;border-radius:10px;background:#f3eee5;color:#6e665b;font-size:10px;line-height:1.5}.copy-journey-note{margin:10px 0 0;color:#8a8378;font-size:9px;line-height:1.6}.copy-journey-preview{margin-top:11px;padding-top:10px;border-top:1px solid #e8e0d4;max-height:150px;overflow:hidden}.copy-journey-preview .journey-tree-scroll{overflow:hidden}.copy-journey-preview .journey-tree-svg{max-height:145px;min-width:0}.copy-tree-button{display:block;width:100%;margin-top:8px;border-radius:11px;padding:9px 11px;background:#fff;border-color:#d8cfc1;font-size:11px;font-weight:700}.copy-journey-loading,.copy-journey-error{padding:4px 0;color:#7d766b;font-size:11px}.copy-journey-error{color:#8d463f}.journey-tree-svg .copy-root path{fill:#1f1f1f}.journey-tree-svg .copy-root line{stroke:#1f1f1f}
@media(max-width:680px){.copy-journey-panel{margin:0 18px 16px;padding:14px}.copy-journey-lead{font-size:13px}.copy-journey-stats>div{padding:8px}.copy-journey-stats strong{font-size:17px}.copy-journey-preview{max-height:135px}.copy-journey-preview .journey-tree-svg{max-height:130px}}


/* V63.33 — generic cross-context claim handoff guard */
body.x-claim-handoff-active{overflow:hidden;background:#f6f3ec}
body.x-claim-handoff-active>.topbar,
body.x-claim-handoff-active>main,
body.x-claim-handoff-active>dialog,
body.x-claim-handoff-active>#sceneDropOverlay,
body.x-claim-handoff-active>#toast{display:none!important}
.x-claim-handoff{position:fixed;inset:0;z-index:90000;display:grid;place-items:center;padding:max(28px,env(safe-area-inset-top)) max(20px,env(safe-area-inset-right)) max(34px,env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left));background:#f6f3ec;color:#171717;overflow:auto}
.x-claim-handoff-card{width:min(560px,100%);padding:30px 26px;border:1px solid #d8d0c2;border-radius:24px;background:rgba(255,255,255,.72);box-shadow:0 18px 55px rgba(43,34,21,.10)}
.x-claim-handoff-card .eyebrow{margin:0 0 9px}.x-claim-handoff-card h1{margin:0;font-size:30px;line-height:1.18;letter-spacing:-.045em}.x-claim-handoff-lead{margin:15px 0 0;color:#6f695f;font-size:14px;line-height:1.7}.x-claim-handoff-guide{margin-top:24px;padding:20px;border:1px solid #ded6c9;border-radius:18px;background:#fff}.x-claim-handoff-guide strong{display:block;font-size:17px;line-height:1.55}.x-claim-handoff-guide span{display:block;margin-top:8px;color:#746e64;font-size:12px;line-height:1.7}.x-claim-handoff-note{margin:18px 2px 0;color:#8a8378;font-size:10px;line-height:1.7}
@media(max-width:680px){.x-claim-handoff{align-items:end;padding-bottom:max(96px,calc(env(safe-area-inset-bottom) + 76px))}.x-claim-handoff-card{padding:25px 22px;border-radius:22px}.x-claim-handoff-card h1{font-size:27px}.x-claim-handoff-guide{padding:18px}.x-claim-handoff-guide strong{font-size:16px}}

.x-claim-handoff .claim-current-browser{display:block;width:100%;margin-top:14px;padding:14px 16px;border:1px solid #d8d0c2;border-radius:14px;background:#f6f3ec;color:#292622;font-size:12px;font-weight:800;line-height:1.45;cursor:pointer}
.x-claim-handoff .claim-current-browser:disabled{opacity:.45;cursor:default}

/* V63.33.1 — simplified MY COPY handoff surface; V63.33 guard logic unchanged */
.x-claim-handoff-card{padding:28px 26px}
.x-claim-handoff-card h1{font-size:32px}
.x-claim-handoff-guide{margin-top:22px;padding:18px 20px}
.x-claim-handoff-guide strong{font-size:18px}
.x-claim-handoff-guide span{margin-top:7px;font-size:13px;line-height:1.65}
.x-claim-handoff .claim-current-browser{margin-top:12px;padding:13px 16px}
@media(max-width:680px){
  .x-claim-handoff-card{padding:24px 22px}
  .x-claim-handoff-card h1{font-size:29px}
  .x-claim-handoff-guide{padding:17px 18px}
}

/* V63.33.2 EXPERIMENT — direct Safari handoff probe */
.x-claim-handoff .claim-open-safari{display:block;width:100%;margin-top:14px;padding:15px 16px;border:1px solid #171717;border-radius:14px;background:#171717;color:#fff;font-size:14px;font-weight:850;line-height:1.45;cursor:pointer}
.x-claim-handoff .claim-experiment-note{margin:11px 3px 0;color:#8a8378;font-size:10px;line-height:1.65;text-align:center}

/* V63.35 — あ箱の本: seed / bloom shelf */
.official-books{margin-top:22px;display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:16px;text-align:left}
.official-book-card{overflow:hidden;border:1px solid #ded6c9;border-radius:18px;background:rgba(255,255,255,.78);box-shadow:0 8px 26px rgba(43,34,21,.06)}
.official-book-cover{position:relative;aspect-ratio:3/4;background:#eee8dd;overflow:hidden}.official-book-cover img{width:100%;height:100%;object-fit:cover;display:block}.official-cover-fallback{width:100%;height:100%;display:grid;place-items:center;font-size:30px;font-weight:850;color:#756c60}
.official-kind{position:absolute;left:10px;top:10px;padding:6px 9px;border-radius:999px;background:rgba(255,255,255,.9);font-size:10px;font-weight:850;box-shadow:0 3px 12px rgba(0,0,0,.08)}
.official-book-copy{padding:14px}.official-book-copy h3{margin:0;font-size:15px;line-height:1.45}.official-book-copy p{margin:4px 0 10px;color:#81796e;font-size:10px}.official-remaining{display:block;margin:0 0 11px;font-size:11px}.official-actions{display:grid;grid-template-columns:.72fr 1.28fr;gap:8px}.official-book-copy button{width:100%;padding:11px 12px;border-radius:12px;background:#171717;color:#fff;border-color:#171717;font-weight:800}.official-book-copy button.official-read{background:#fff;color:#171717;border:1px solid #cfc7ba}.official-book-copy button:disabled{opacity:.42}
.official-book-card.bloom{box-shadow:0 10px 32px rgba(43,34,21,.10)}
@media(max-width:680px){.official-books{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:18px}.official-book-card{border-radius:15px}.official-book-copy{padding:11px}.official-book-copy h3{font-size:13px}.official-book-copy button{padding:10px 8px;font-size:11px}.official-kind{left:7px;top:7px;font-size:9px}}

/* V63.35.6 — newest owned copy first + richer official book cards */
.official-book-copy .official-author{margin:4px 0 5px}
.official-subtitle{margin:3px 0 0;color:#5f594f;font-size:11px;line-height:1.45}
.official-facts{margin:0 0 8px;color:#8a8276;font-size:9px;letter-spacing:.03em}
.official-description{margin:0 0 10px;color:#5e584f;font-size:11px;line-height:1.65;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}
.official-actions{grid-template-columns:auto minmax(0,1fr)}
.official-actions .official-read{min-width:66px}
.official-book-copy button{white-space:nowrap}
@media(max-width:680px){
  .official-books{grid-template-columns:1fr;max-width:330px;margin-left:auto;margin-right:auto}
  .official-book-card{display:grid;grid-template-columns:minmax(0,42%) minmax(0,58%)}
  .official-book-cover{aspect-ratio:auto;min-height:100%;height:100%}
  .official-book-copy{padding:12px}
  .official-description{-webkit-line-clamp:4;font-size:10.5px}
  .official-actions{gap:6px}
  .official-book-copy button{padding:10px 7px;font-size:10.5px}
}


/* V63.35.7 — official shelf: card opens reader; claim stays the only action button. */
.official-book-card[data-official-read]{cursor:pointer}
.official-book-card[data-official-read]:focus-visible{outline:2px solid #171717;outline-offset:3px}
.official-actions{display:block}
.official-actions [data-official-claim]{width:100%}
@media(max-width:680px){
  .official-actions{display:block}
  .official-actions [data-official-claim]{width:100%;min-height:44px}
}


/* V63.35.8 — cover-only read target + unified official card geometry. */
.official-books{grid-template-columns:repeat(auto-fill,minmax(220px,240px));justify-content:start;align-items:stretch}
.official-book-card{display:flex;flex-direction:column;height:100%;min-width:0;cursor:default}
.official-book-cover[data-official-read]{cursor:pointer}
.official-book-cover[data-official-read]:focus-visible{outline:2px solid #171717;outline-offset:-3px}
.official-book-copy{display:flex;flex:1;flex-direction:column;min-height:212px}
.official-book-meta{min-height:128px}
.official-book-copy h3{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.official-subtitle{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;overflow:hidden}
.official-description{-webkit-line-clamp:2;min-height:3.3em;margin-bottom:8px}
.official-book-footer{margin-top:auto}
.official-remaining{min-height:1.5em;margin-bottom:10px}
.official-actions [data-official-claim]{min-height:46px}
@media(max-width:680px){
  .official-books{grid-template-columns:1fr;max-width:340px}
  .official-book-card{display:grid;grid-template-columns:42% 58%;min-height:232px}
  .official-book-cover{aspect-ratio:auto;min-height:232px;height:100%}
  .official-book-copy{min-height:232px;padding:12px 12px 11px}
  .official-book-meta{min-height:150px}
  .official-description{-webkit-line-clamp:3;min-height:0;margin-bottom:8px}
  .official-book-footer{margin-top:auto}
  .official-actions [data-official-claim]{min-height:44px}
}


/* V63.35.9 — aligned local shelf cards + richer detail info */
#grid{padding-top:8px}
#grid .book-meta{display:grid;grid-template-rows:auto auto auto;align-content:start;min-height:88px}
#grid .book-meta h3{
  white-space:normal;overflow:hidden;text-overflow:clip;
  display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;
  line-height:1.45;min-height:2.9em;margin-bottom:4px;
}
#grid .book-subtitle{
  margin:0 0 3px;color:#6f685f;font-size:10px;line-height:1.4;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-height:1.4em;
}
#grid .book-subtitle.is-empty{visibility:hidden}
#grid .book-facts{
  margin:0;color:#807a70;font-size:11px;line-height:1.45;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-height:1.45em;
}
.detail-work-info{margin:0 26px 22px;padding:16px 18px;border:1px solid #e3dbcf;border-radius:14px;background:#faf7f1}
.detail-work-info .eyebrow{margin-bottom:7px}
.detail-work-info h3{margin:0 0 7px;font-size:15px;line-height:1.5}
.detail-work-info p:not(.eyebrow){margin:0;color:#665f56;font-size:12px;line-height:1.75;white-space:pre-wrap}
@media(max-width:680px){
  #grid{padding-top:10px}
  #grid .book-meta{min-height:82px}
  #grid .book-meta h3{min-height:2.9em}
  .detail-work-info{margin:0 18px 18px;padding:14px 15px}
  #grid.grid[data-mobile-columns="3"] .book-meta{min-height:67px}
  #grid.grid[data-mobile-columns="3"] .book-meta h3{min-height:2.8em;line-height:1.4}
  #grid.grid[data-mobile-columns="3"] .book-subtitle{font-size:8px}
  #grid.grid[data-mobile-columns="3"] .book-facts{font-size:9px}
  #grid.grid[data-mobile-columns="4"] .book-meta{min-height:57px}
  #grid.grid[data-mobile-columns="4"] .book-meta h3{min-height:2.7em;line-height:1.35}
  #grid.grid[data-mobile-columns="4"] .book-subtitle{font-size:7px}
  #grid.grid[data-mobile-columns="4"] .book-facts{font-size:8px}
}


/* V63.35.10 — stable swipe geometry + richer local cards + authored cover preview */
@media(max-width:680px) and (pointer:coarse){
  /* Swipe snapshots must include the same top breathing space as the live shelf. */
  .shelf-swipe-grid{padding-top:10px}
}
#grid .book{height:100%}
#grid .book-meta{display:flex;flex-direction:column;min-height:148px}
#grid .book-meta h3{flex:0 0 auto}
#grid .book-work-info{display:flex;flex-direction:column;gap:3px;min-height:72px;overflow:hidden}
#grid .book-series,#grid .book-subtitle,#grid .book-description{margin:0;color:#6f685f;font-size:10px;line-height:1.42}
#grid .book-series{font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#grid .book-subtitle{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#grid .book-description{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;color:#746d63}
#grid .book-facts{margin-top:auto!important;padding-top:5px}
.shelf-cover-authored{position:absolute;inset:0;z-index:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:14% 9%;text-align:center;color:#fff;text-shadow:0 1px 8px rgba(0,0,0,.72);pointer-events:none;background:linear-gradient(to bottom,rgba(0,0,0,.05),rgba(0,0,0,.22))}
.shelf-cover-authored>*{max-width:100%;overflow:hidden}
.shelf-cover-title{font-family:"Yu Mincho","Hiragino Mincho ProN",serif;font-size:clamp(13px,1.55vw,22px);line-height:1.18;letter-spacing:.015em;white-space:pre-line;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3}
.shelf-cover-subtitle{margin-top:5px;font-family:"Yu Mincho","Hiragino Mincho ProN",serif;font-size:clamp(8px,.8vw,12px);line-height:1.3;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}
.shelf-cover-author{margin-top:8px;font-family:"Yu Mincho","Hiragino Mincho ProN",serif;font-size:clamp(7px,.68vw,10px);letter-spacing:.08em}
.shelf-cover-episode{margin-top:11px;font-family:"Yu Mincho","Hiragino Mincho ProN",serif;font-size:clamp(7px,.72vw,11px);line-height:1.35;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}
.cover .badge{z-index:3}
.detail-work-info .detail-series{margin:0 0 7px!important;color:#8a8176!important;font-size:10px!important;font-weight:700;letter-spacing:.03em}
.detail-work-info .detail-subtitle{margin:0 0 9px!important;color:#59534b!important;font-size:12px!important;font-weight:700}
.detail-work-info .detail-description{margin:0!important}
@media(max-width:680px){
  #grid .book-meta{min-height:132px}
  #grid .book-work-info{min-height:60px}
  #grid.grid[data-mobile-columns="3"] .book-meta{min-height:110px}
  #grid.grid[data-mobile-columns="3"] .book-work-info{min-height:50px}
  #grid.grid[data-mobile-columns="3"] .book-description{-webkit-line-clamp:2;font-size:8px}
  #grid.grid[data-mobile-columns="3"] .book-series,#grid.grid[data-mobile-columns="3"] .book-subtitle{font-size:8px}
  #grid.grid[data-mobile-columns="4"] .book-meta{min-height:96px}
  #grid.grid[data-mobile-columns="4"] .book-work-info{min-height:42px}
  #grid.grid[data-mobile-columns="4"] .book-description{display:none}
  #grid.grid[data-mobile-columns="4"] .book-series,#grid.grid[data-mobile-columns="4"] .book-subtitle{font-size:7px}
  .shelf-cover-authored{padding:14% 8%}
  .shelf-cover-title{font-size:clamp(10px,4vw,18px)}
  .shelf-cover-subtitle{font-size:clamp(7px,2.4vw,10px)}
  .shelf-cover-author,.shelf-cover-episode{font-size:clamp(6px,2vw,9px)}
}


/* V63.35.11 — single-stage shelf swipe + tighter metadata + split episode cover lines */
#grid .book-meta{min-height:124px}
#grid .book-work-info{min-height:50px;gap:2px}
#grid .book-facts{padding-top:3px}
.shelf-cover-episode{margin-top:10px}
.shelf-cover-episode-title{
  margin-top:3px;
  font-family:"Yu Mincho","Hiragino Mincho ProN",serif;
  font-size:clamp(7px,.72vw,11px);
  line-height:1.35;
  display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;
}
@media(max-width:680px){
  #grid .book-meta{min-height:112px}
  #grid .book-work-info{min-height:44px}
  #grid.grid[data-mobile-columns="3"] .book-meta{min-height:94px}
  #grid.grid[data-mobile-columns="3"] .book-work-info{min-height:38px}
  #grid.grid[data-mobile-columns="4"] .book-meta{min-height:82px}
  #grid.grid[data-mobile-columns="4"] .book-work-info{min-height:32px}
}

/* V63.35.12 — exact swipe snapshot geometry + compact authored cover + unified detail identity */
/* The swipe snapshot must use the same local-card rules as the live #grid.
   Previous V63.35.x rules were scoped to #grid only, so Safari first showed a
   differently-sized snapshot, then the correctly-sized live shelf: the visible
   two-stage redraw. */
:is(#grid,.shelf-swipe-grid) .book{height:100%}
:is(#grid,.shelf-swipe-grid) .book-meta{display:flex;flex-direction:column;min-height:148px}
:is(#grid,.shelf-swipe-grid) .book-meta h3{
  flex:0 0 auto;white-space:normal;overflow:hidden;text-overflow:clip;
  display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;
  line-height:1.45;min-height:2.9em;margin-bottom:4px;
}
:is(#grid,.shelf-swipe-grid) .book-work-info{display:flex;flex-direction:column;gap:3px;min-height:72px;overflow:hidden}
:is(#grid,.shelf-swipe-grid) .book-series,
:is(#grid,.shelf-swipe-grid) .book-subtitle,
:is(#grid,.shelf-swipe-grid) .book-description{margin:0;color:#6f685f;font-size:10px;line-height:1.42}
:is(#grid,.shelf-swipe-grid) .book-series{font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
:is(#grid,.shelf-swipe-grid) .book-subtitle{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
:is(#grid,.shelf-swipe-grid) .book-description{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;color:#746d63}
:is(#grid,.shelf-swipe-grid) .book-facts{margin-top:auto!important;padding-top:5px;color:#807a70;font-size:11px;line-height:1.45;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-height:1.45em}

.shelf-cover-episode-line{margin-top:9px;display:flex;max-width:100%;align-items:baseline;justify-content:center;gap:0;font-family:"Yu Mincho","Hiragino Mincho ProN",serif;font-size:clamp(7px,.72vw,11px);line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.shelf-cover-episode-line .shelf-cover-episode,
.shelf-cover-episode-line .shelf-cover-episode-title{margin:0;display:inline;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.shelf-cover-episode-sep{flex:0 0 auto}
/* Undo the previous separate-row spacing. */
.shelf-cover-episode{margin-top:0}

.detail-copy{align-self:center;min-width:0}
.detail-copy .eyebrow{margin:0 0 7px}
.detail-copy h2{font-size:24px;line-height:1.2;margin:0 0 6px;letter-spacing:-.02em}
.detail-copy p{margin:2px 0;color:#756e64;font-size:11px;line-height:1.4}
.detail-copy .detail-hero-subtitle{margin:0 0 7px;color:#4f4942;font-size:12px;font-weight:650;line-height:1.4}
.detail-copy .detail-hero-author{color:#665f56;font-weight:600}
.detail-copy .detail-hero-episode{margin-top:7px;color:#877e72;font-size:10px;font-weight:700;letter-spacing:.03em}
.detail-copy .detail-hero-episode-title{color:#25211d;font-size:12px;font-weight:800;line-height:1.35}
.detail-copy .detail-hero-facts,.detail-copy .detail-hero-date{color:#81796f;font-size:10.5px}
.detail-work-info{margin-top:-2px}
.detail-work-info .detail-series{margin-bottom:6px!important}
.detail-work-info .detail-description{color:#5f584f!important;font-size:11.5px!important;line-height:1.68!important}

@media(max-width:680px){
  :is(#grid,.shelf-swipe-grid) .book-meta{min-height:132px}
  :is(#grid,.shelf-swipe-grid) .book-work-info{min-height:60px}
  :is(#grid,.shelf-swipe-grid)[data-mobile-columns="3"] .book-meta{min-height:110px}
  :is(#grid,.shelf-swipe-grid)[data-mobile-columns="3"] .book-work-info{min-height:50px}
  :is(#grid,.shelf-swipe-grid)[data-mobile-columns="3"] .book-description{-webkit-line-clamp:2;font-size:8px}
  :is(#grid,.shelf-swipe-grid)[data-mobile-columns="3"] .book-series,
  :is(#grid,.shelf-swipe-grid)[data-mobile-columns="3"] .book-subtitle{font-size:8px}
  :is(#grid,.shelf-swipe-grid)[data-mobile-columns="3"] .book-facts{font-size:9px}
  :is(#grid,.shelf-swipe-grid)[data-mobile-columns="4"] .book-meta{min-height:96px}
  :is(#grid,.shelf-swipe-grid)[data-mobile-columns="4"] .book-work-info{min-height:42px}
  :is(#grid,.shelf-swipe-grid)[data-mobile-columns="4"] .book-description{display:none}
  :is(#grid,.shelf-swipe-grid)[data-mobile-columns="4"] .book-series,
  :is(#grid,.shelf-swipe-grid)[data-mobile-columns="4"] .book-subtitle{font-size:7px}
  :is(#grid,.shelf-swipe-grid)[data-mobile-columns="4"] .book-facts{font-size:8px}
  .detail-hero{grid-template-columns:110px minmax(0,1fr);gap:18px;padding:22px 18px 16px}
  .detail-copy h2{font-size:20px;line-height:1.16;margin-bottom:5px}
  .detail-copy .detail-hero-subtitle{font-size:10.5px;margin-bottom:6px}
  .detail-copy .detail-hero-author{font-size:10.5px}
  .detail-copy .detail-hero-episode{font-size:9px;margin-top:5px}
  .detail-copy .detail-hero-episode-title{font-size:10.5px}
  .detail-copy .detail-hero-facts,.detail-copy .detail-hero-date{font-size:9.5px}
  .detail-work-info{margin-top:0;padding-top:13px}
  .detail-work-info .eyebrow{margin-bottom:6px}
}

/* V63.35.16 — MY COPY hierarchy: read/relay first, compact journey, safe management */
.reader-primary-actions{padding-bottom:16px}
.reader-primary-actions .journey{grid-column:1/-1;font-weight:700;background:#f6f1e7}
.detail-management{display:flex;justify-content:flex-start;padding:0 26px 16px}
.detail-management .compact-danger{width:auto;max-width:100%;padding:9px 13px;border-radius:10px;font-size:11px;line-height:1.2;white-space:nowrap;color:#9a3f38;background:#fff}
.copy-journey-panel.is-compact{min-height:80px;padding:0;overflow:hidden;background:#faf8f3}
.copy-journey-panel.is-compact>.copy-journey-loading,
.copy-journey-panel.is-compact>.copy-journey-error{min-height:78px;display:flex;align-items:center;padding:0 14px}
.copy-journey-summary{display:flex;width:100%;align-items:center;justify-content:space-between;gap:14px;border:0;border-radius:15px;padding:14px 16px;background:transparent;text-align:left}
.copy-journey-summary>span{display:flex;min-width:0;flex-direction:column;gap:2px}
.copy-journey-summary small{color:#8b8377;font-size:9px;letter-spacing:.18em}
.copy-journey-summary strong{font-size:15px;line-height:1.35}
.copy-journey-summary em{margin-top:2px;color:#6d665c;font-size:10.5px;font-style:normal;font-weight:600;line-height:1.45;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.copy-journey-summary>b{flex:0 0 auto;color:#877f74;font-size:25px;font-weight:400;line-height:1;transition:transform .18s ease}
.copy-journey-summary[aria-expanded="true"]>b{transform:rotate(90deg)}
.copy-journey-details{padding:0 16px 15px}
.copy-journey-details[hidden]{display:none!important}
.copy-journey-panel.is-open{padding-bottom:0}
@media(max-width:680px){
  .reader-primary-actions{padding:0 18px 14px}
  .detail-management{padding:0 18px 14px}
  .detail-management .compact-danger{font-size:10.5px;padding:8px 11px}
  .copy-journey-panel.is-compact{margin:0 18px 14px;padding:0}
  .copy-journey-summary{padding:13px 14px}
  .copy-journey-summary strong{font-size:14px}
  .copy-journey-summary em{font-size:10px}
  .copy-journey-details{padding:0 14px 14px}
}

/* V63.35.17 — safe permanent delete inside Storage Box + bottom action clearance */
.archive-selection-buttons{display:flex;align-items:center;justify-content:flex-end;gap:8px;min-width:0}
.archive-batch-actions .archive-delete-button{color:#9a3f38;border-color:#d8bcb8;background:#fff;white-space:nowrap}
.archive-delete-dialog{width:min(440px,calc(100vw - 34px));border:0;border-radius:20px;padding:0;box-shadow:0 24px 80px rgba(0,0,0,.32)}
.archive-delete-dialog::backdrop{background:rgba(15,13,10,.58);backdrop-filter:blur(4px)}
.archive-delete-dialog-inner{padding:26px 24px 22px;background:#fff}
.archive-delete-dialog-inner .eyebrow{margin-bottom:8px}
.archive-delete-dialog-inner h2{margin:0 0 12px;font-size:22px;letter-spacing:-.03em}
.archive-delete-summary{margin:0 0 10px;font-size:13px;font-weight:800;line-height:1.55}
.archive-delete-warning{margin:0;padding:13px 14px;border:1px solid #ead6d2;border-radius:12px;background:#fbf6f4;color:#8e433d;font-size:11px;line-height:1.65}
.archive-delete-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:18px}
.archive-delete-actions button{border-radius:12px;padding:12px 10px;font-weight:800}
.archive-delete-actions .danger-confirm{background:#9a3f38;border-color:#9a3f38;color:#fff}
.archive-delete-actions .danger-confirm:disabled{opacity:.55;cursor:default}
@media(max-width:680px){
  .archive-batch-actions{gap:8px}
  .archive-selection-buttons{gap:6px;flex:1;justify-content:flex-end}
  .archive-batch-actions .archive-delete-button{padding:10px 11px}
  .archive-batch-actions #restoreSelectedButton{padding:10px 11px}
  .archive-delete-dialog-inner{padding:24px 20px 20px}
  /* Keep final book metadata clear of the fixed cardboard / add actions. */
  main{padding-bottom:max(138px,calc(env(safe-area-inset-bottom) + 112px))}
  #grid,.empty,.official-shelf{padding-bottom:18px}
}

/* V63.35.18 — MASTER hierarchy + stronger bottom clearance */
.master-primary-actions{padding-bottom:14px}
.master-primary-actions .edit{grid-column:1/-1}
.master-signal-panel{margin:0 26px 16px;border:1px solid #ddd6c8;border-radius:18px;background:#faf8f3;overflow:hidden}
.master-signal-summary{display:flex;width:100%;align-items:center;justify-content:space-between;gap:14px;border:0;padding:14px 16px;background:transparent;text-align:left}
.master-signal-summary>span{display:flex;min-width:0;flex-direction:column;gap:2px}
.master-signal-summary small{color:#8b8377;font-size:9px;letter-spacing:.18em}
.master-signal-summary strong{font-size:16px;line-height:1.35}
.master-signal-summary em{margin-top:2px;color:#6d665c;font-size:10.5px;font-style:normal;font-weight:600}
.master-signal-summary>b{flex:0 0 auto;color:#877f74;font-size:25px;font-weight:400;line-height:1;transition:transform .18s ease}
.master-signal-summary[aria-expanded="true"]>b{transform:rotate(90deg)}
.master-signal-details{padding:0 14px 15px}
.master-signal-details[hidden]{display:none!important}
.master-signal-details .strength-panel{margin:0;padding:0;border:0;background:transparent}
.master-signal-details .strength-head{display:none}
.master-signal-details .strength-note{margin-bottom:12px}
.master-journey-button{width:100%;margin-top:8px}
.master-file-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px;padding:0 26px 14px}
.master-file-actions button{padding:11px 10px;border-radius:11px;font-size:12px;font-weight:700}
.master-management{padding-top:0}
@media(max-width:680px){
  .master-primary-actions{padding:0 18px 12px}
  .master-signal-panel{margin:0 18px 14px}
  .master-signal-summary{padding:13px 14px}
  .master-signal-summary strong{font-size:14px}
  .master-signal-summary em{font-size:10px}
  .master-signal-details{padding:0 12px 13px}
  .master-file-actions{padding:0 18px 12px;gap:8px}
  .master-file-actions button{font-size:10.5px;padding:10px 8px;white-space:nowrap}
  .master-management{padding:0 18px 14px}
  /* Clearance belongs to the shelf content itself: fixed 📦 / ＋ must never cover final metadata. */
  main{padding-bottom:max(172px,calc(env(safe-area-inset-bottom) + 146px))}
  #grid,.empty,.official-shelf{padding-bottom:max(118px,calc(env(safe-area-inset-bottom) + 96px))}
}


/* V63.35.19 — official shelf breathing space + local-shelf-style work metadata */
.official-shelf{margin-top:10px}
.official-shelf .eyebrow{margin-top:0}
.official-book-meta{display:flex;flex-direction:column}
.official-work-info{display:flex;flex-direction:column;gap:3px;min-height:72px;overflow:hidden}
.official-subtitle,.official-episode,.official-episode-title,.official-description{margin:0!important;color:#6f685f;font-size:10px;line-height:1.42;text-align:left}
.official-subtitle,.official-episode,.official-episode-title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.official-episode{font-weight:700}
.official-description{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;color:#746d63;min-height:0!important}
.official-facts{margin-top:auto!important;padding-top:5px;color:#807a70;font-size:10px;line-height:1.45;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:left}
.official-book-copy .official-author{display:none}
@media(max-width:680px){
  .official-shelf{margin-top:10px;padding-top:28px}
  .official-book-meta{min-height:150px}
  .official-work-info{min-height:82px}
  .official-subtitle,.official-episode,.official-episode-title,.official-description{font-size:10px}
  .official-description{-webkit-line-clamp:3}
  .official-facts{font-size:9px}
}


/* V63.35.21 — keep live/snapshot top-margin geometry identical during shelf swipe.
   flow-root prevents the official shelf margin from collapsing through the swipe wrapper. */

/* V63.35.22 — one shared top-gap coordinate for every shelf body.
   The gap lives outside the shelf card/grid, so live and swipe snapshots land
   at exactly the same Y. Do not reintroduce per-tab top margins here. */
.shelf-body-viewport{padding-top:10px;display:flow-root}
.official-shelf{margin-top:0!important}
@media(max-width:680px){
  #grid{padding-top:0!important}
  .shelf-swipe-grid{padding-top:0!important}
  .official-shelf{margin-top:0!important}
}


/* V63.35.25 — local swipe snapshot/live typography must be pixel-identical. */
:is(#grid,.shelf-swipe-grid) .book-meta{min-height:124px}
:is(#grid,.shelf-swipe-grid) .book-work-info{min-height:50px;gap:2px}
:is(#grid,.shelf-swipe-grid) .book-facts{padding-top:3px}
@media(max-width:680px){
  :is(#grid,.shelf-swipe-grid) .book-meta{min-height:112px}
  :is(#grid,.shelf-swipe-grid) .book-work-info{min-height:44px}
  :is(#grid,.shelf-swipe-grid)[data-mobile-columns="3"] .book-meta{min-height:94px}
  :is(#grid,.shelf-swipe-grid)[data-mobile-columns="3"] .book-work-info{min-height:38px}
  :is(#grid,.shelf-swipe-grid)[data-mobile-columns="4"] .book-meta{min-height:82px}
  :is(#grid,.shelf-swipe-grid)[data-mobile-columns="4"] .book-work-info{min-height:32px}
}

/* V63.35.27 — active V63.35.26 rules (the previous ZIP contained literal
   backslash-n text, so these declarations never entered the CSSOM).
   The real official shelf is the outgoing visual; only the incoming page is
   opaque. */
html{
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
}
@media(max-width:680px) and (pointer:coarse){
  html,body{height:100%;overflow:hidden;overflow-anchor:none}
  #shelfBodyViewport{
    position:fixed;
    top:100px;right:0;bottom:0;left:0;
    z-index:1;
    padding:10px 14px max(118px,calc(env(safe-area-inset-bottom) + 96px));
    overflow-x:hidden;
    overflow-y:auto;
    overscroll-behavior-y:contain;
    -webkit-overflow-scrolling:touch;
    overflow-anchor:none;
  }
  #grid,.empty,.official-shelf{padding-bottom:0}
  body.bookshelf-scroll-locked #shelfBodyViewport{overflow-y:hidden}
  .shelf-swipe-page{background:#f6f3ec}
  .shelf-swipe-stage.uses-live-current{background:transparent}
  .shelf-swipe-stage.uses-live-current .shelf-swipe-page.is-current{background:transparent}
  .shelf-swipe-stage.uses-live-current .shelf-swipe-page.is-next{background:#f6f3ec}
}

/* V63.35.29 — only these two ellipsized metadata lines were being repainted.
   Give their shared box a definite formatting/paint context in both the live
   grid and the swipe grid. This prevents WebKit from recomputing its intrinsic
   width and clip when the already-visible grid leaves the transformed stage. */
@media(max-width:680px) and (pointer:coarse){
  :is(#grid,.shelf-swipe-grid) .book-work-info{
    width:100%;
    min-width:0;
    max-width:100%;
    box-sizing:border-box;
    contain:layout paint;
    transform:translateZ(0);
    -webkit-backface-visibility:hidden;
    backface-visibility:hidden;
  }
  :is(#grid,.shelf-swipe-grid)[data-mobile-columns="3"] .book-work-info{height:38px;min-height:38px;max-height:38px}
  :is(#grid,.shelf-swipe-grid)[data-mobile-columns="4"] .book-work-info{height:32px;min-height:32px;max-height:32px}
}

/* V63.35.34 — diagnostic V33 proved a real computed-style mismatch.
   Legacy #grid rules resolve every compact metadata paragraph to 9px/8px,
   while the temporary class-only grid resolved series/subtitle to 8px/7px.
   Match the swipe snapshot to the established live #grid values. */
@media(max-width:680px) and (pointer:coarse){
  :is(#grid,.shelf-swipe-grid).grid[data-mobile-columns="3"] .book-meta p{font-size:9px}
  :is(#grid,.shelf-swipe-grid).grid[data-mobile-columns="4"] .book-meta p{font-size:8px}
}

/* V63.35.35 — after the paragraph size was aligned, the diagnostic geometry
   exposed the remaining ~2.09px landing contraction above .book-work-info.
   The live #grid had compact title metrics that the class-only swipe grid did
   not inherit. Apply the established live values to both layout roots. */
@media(max-width:680px) and (pointer:coarse){
  :is(#grid,.shelf-swipe-grid).grid[data-mobile-columns="3"] .book-meta h3{
    font-size:11px;line-height:1.4;min-height:2.8em;margin-bottom:3px
  }
  :is(#grid,.shelf-swipe-grid).grid[data-mobile-columns="4"] .book-meta h3{
    font-size:9px;line-height:1.35;min-height:2.7em;margin-bottom:2px
  }
}

/* V63.35.37 — iPhone Safari focuses the first button when a dialog opens.
   Suppress only the native blue ring/tap highlight on circular close controls;
   their existing border remains the visible button boundary. */
.dialog-close,.tree-dialog-close{
  -webkit-tap-highlight-color:transparent;
}
.dialog-close:focus,.dialog-close:focus-visible,
.tree-dialog-close:focus,.tree-dialog-close:focus-visible{
  outline:none;
  box-shadow:none;
}

/* V63.35.45 — metadata quantity must never change card geometry.
   V63.35.44 split subtitle / episode / episode title into independent rows.
   The 3/4-column layouts already had a definite work-info height, but the
   default/2-column layout still used only min-height and therefore grew when
   more rows were present. Keep live and swipe roots on the same fixed boxes. */
:is(#grid,.shelf-swipe-grid) .book{
  display:block;
  width:100%;
  align-self:start;
}
:is(#grid,.shelf-swipe-grid) .book-work-info{
  height:82px;
  min-height:82px;
  max-height:82px;
  flex:0 0 82px;
  overflow:hidden;
}
@media(max-width:680px){
  :is(#grid,.shelf-swipe-grid)[data-mobile-columns="3"] .book-work-info{
    height:38px;min-height:38px;max-height:38px;flex-basis:38px
  }
  :is(#grid,.shelf-swipe-grid)[data-mobile-columns="4"] .book-work-info{
    height:32px;min-height:32px;max-height:32px;flex-basis:32px
  }
}

/* Official cards use a different component, so lock its title/info/meta boxes
   as well. This prevents future shelf items with more optional fields from
   producing unequal card heights. */
.official-book-copy h3{min-height:2.9em}
.official-work-info{height:82px;min-height:82px;max-height:82px;flex:0 0 82px;overflow:hidden}
.official-book-meta{height:150px;min-height:150px;max-height:150px;overflow:hidden}

/* V63.35.46 — the local shelf is an index, not the detail view.
   It now renders only episode / episode title between the fixed title and
   author. Compact the reserved box without changing live/swipe geometry. */
:is(#grid,.shelf-swipe-grid) .book-work-info{
  height:32px;
  min-height:32px;
  max-height:32px;
  flex:0 0 32px;
}
@media(max-width:680px){
  .author-dialog input{font-size:16px!important}
  :is(#grid,.shelf-swipe-grid).grid[data-mobile-columns="3"] .book-work-info{
    height:28px;min-height:28px;max-height:28px;flex-basis:28px
  }
  :is(#grid,.shelf-swipe-grid).grid[data-mobile-columns="4"] .book-work-info{
    height:25px;min-height:25px;max-height:25px;flex-basis:25px
  }
}

/* V68.7 — public bookstore discovery inside the existing A-HAKO BOOKS tab */
.official-books{display:block;max-width:none;margin-top:28px;text-align:left}
.public-discovery-block+.public-discovery-block,.official-seed-block+.public-discovery-block{margin-top:48px;padding-top:36px;border-top:1px solid #ddd4c6}
.public-discovery-heading{display:flex;align-items:end;justify-content:space-between;gap:20px;margin-bottom:16px}
.public-discovery-heading .eyebrow{margin:0 0 5px}
.public-discovery-heading h3{margin:0;font-size:21px;letter-spacing:-.03em}
.public-discovery-heading>span{color:#81786c;font-size:10px}
.public-author-rail{display:flex;gap:14px;overflow-x:auto;overflow-y:hidden;padding:2px 2px 13px;scroll-snap-type:inline mandatory;scroll-padding-inline:2px;overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch;touch-action:pan-x pan-y}
.public-author-card{position:relative;overflow:hidden;flex:0 0 260px;height:142px;border:1px solid #363940;border-radius:18px;background:#1d2026;color:#fff;text-decoration:none;scroll-snap-align:start;box-shadow:0 12px 28px rgba(48,39,27,.11)}
.public-author-card-image,.public-author-card-shade{position:absolute;inset:0}
.public-author-card-image img{width:100%;height:100%;display:block;object-fit:cover}
.public-author-card-image>span{height:100%;display:grid;place-items:center;color:#5f6268;font:700 34px/1 Georgia,serif}
.public-author-card-shade{background:linear-gradient(90deg,rgba(12,14,18,.82),rgba(12,14,18,.37))}
.public-author-card-copy{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:flex-end;padding:17px;text-shadow:0 2px 12px rgba(0,0,0,.35)}
.public-author-card-copy small{margin-bottom:6px;color:#d8b87f;font-size:7px;letter-spacing:.16em}
.public-author-card-copy strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:18px}
.public-author-card-copy em{margin-top:5px;color:#dedbd4;font-size:9px;font-style:normal}
.public-discovery-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:27px 16px}
.public-discovery-book{min-width:0}
.public-discovery-cover{appearance:none;overflow:hidden;display:block;width:100%;aspect-ratio:3/4;padding:0;border:1px solid #d7cebf;border-radius:11px;background:#e9e2d6;color:#9b8c78;text-align:left;text-decoration:none;box-shadow:0 10px 23px rgba(56,46,31,.1);transition:.18s ease}
.public-discovery-cover:hover{transform:translateY(-3px);box-shadow:0 15px 28px rgba(56,46,31,.15)}
.public-discovery-cover img{width:100%;height:100%;display:block;object-fit:cover}
.public-discovery-cover>span{height:100%;display:grid;place-items:center;font:600 28px/1 Georgia,serif}

/* V69.1 — a public work that can become the reader's own copy */
.public-discovery-cover{position:relative}
.own-copy-available{position:absolute!important;z-index:3;top:8px;right:8px;width:auto!important;height:auto!important;min-height:0!important;padding:5px 7px;display:inline-flex!important;align-items:center;gap:4px;border:1px solid rgba(255,255,255,.72);border-radius:999px;background:rgba(23,26,32,.84);color:#fff;font:inherit!important;line-height:1!important;box-shadow:0 3px 12px rgba(0,0,0,.16);backdrop-filter:blur(7px)}
.own-copy-available b{font-size:9px;letter-spacing:-.08em}.own-copy-available em{font-size:8px;font-weight:800;font-style:normal;letter-spacing:.06em}
.detail-author-shelf-link.detail-author-inline-link{width:max-content;max-width:100%;margin:3px 0 2px;padding:0;display:inline-flex;align-items:center;gap:6px;border:0;border-radius:0;background:transparent;color:#665f56;text-decoration:none;line-height:1.35}
.detail-author-inline-link strong{overflow:hidden;max-width:12em;font-size:11px;font-weight:650;text-overflow:ellipsis;white-space:nowrap}
.detail-author-inline-link span{font-size:9px;color:#8a6b42;white-space:nowrap}.detail-author-inline-link b{font-size:14px;font-weight:400;line-height:.8;color:#8a6b42}
.detail-author-inline-link:hover strong{text-decoration:underline}.detail-author-inline-link:hover span{color:#5f4729}
@media(max-width:680px){.own-copy-available{top:6px;right:6px;padding:4px 6px;gap:3px}.own-copy-available b{font-size:8px}.own-copy-available em{font-size:7px}.detail-author-shelf-link.detail-author-inline-link{gap:4px;margin:2px 0}.detail-author-inline-link strong{max-width:8em;font-size:10px}.detail-author-inline-link span{font-size:8px}.detail-author-inline-link b{font-size:12px}}
.public-discovery-copy{padding:10px 2px 0}
.public-discovery-copy h4{min-height:2.8em;margin:0;font-size:12px;line-height:1.4}
.public-discovery-copy h4 :is(a,button){display:-webkit-box;overflow:hidden;width:100%;padding:0;border:0;border-radius:0;background:transparent;color:inherit;text-align:left;text-decoration:none;font:inherit;-webkit-box-orient:vertical;-webkit-line-clamp:2}
.public-discovery-copy p{overflow:hidden;margin:6px 0 0;color:#7c7469;font-size:9px;text-overflow:ellipsis;white-space:nowrap}
.public-discovery-author{display:inline-block;overflow:hidden;max-width:100%;margin-top:7px;color:#705b3e;font-size:9px;font-weight:700;text-decoration:none;text-overflow:ellipsis;white-space:nowrap}
.public-discovery-author:hover{text-decoration:underline}
.public-discovery-more{display:block;min-width:180px;margin:30px auto 18px;padding:11px 20px;border-radius:999px;background:#fff;font-size:11px;font-weight:800}
.official-seed-lead{margin:-7px 0 17px!important;color:#776f64!important;font-size:10px!important;text-align:left}
.official-seed-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:stretch;gap:16px}
.official-seed-dots{display:none}
@media(max-width:900px){.public-discovery-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:680px){
  .official-books{max-width:none;margin-top:24px}
  .public-discovery-block+.public-discovery-block,.official-seed-block+.public-discovery-block{margin-top:36px;padding-top:29px}
  .public-discovery-heading h3{font-size:18px}
  .public-author-card{flex-basis:226px;height:126px}
  .public-author-card-copy{padding:14px}
  .public-author-card-copy strong{font-size:16px}
  .public-discovery-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:27px 10px}
  .public-discovery-copy h4{font-size:11px}
  .official-seed-carousel{margin-right:-14px;overscroll-behavior-x:contain}
  .official-seed-grid{display:flex;max-width:none;margin:0;padding:2px 14px 8px 0;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;scroll-padding-left:0;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;touch-action:auto;scrollbar-width:none}
  .official-seed-grid::-webkit-scrollbar{display:none}
  .official-seed-grid>.official-book-card{flex:0 0 min(84vw,330px);scroll-snap-align:start}
  .official-seed-dots{display:flex;align-items:center;justify-content:center;gap:2px;margin-right:14px;padding:3px 0 0}
  .official-seed-dots button{position:relative;width:24px;height:24px;margin:0;padding:0;border:0;background:transparent;cursor:pointer}
  .official-seed-dots button::after{content:"";position:absolute;left:50%;top:50%;width:7px;height:7px;border:1px solid #8c8377;border-radius:50%;background:transparent;transform:translate(-50%,-50%);transition:background-color .16s ease,transform .16s ease}
  .official-seed-dots button.is-active::after{background:#514a41;transform:translate(-50%,-50%) scale(1.08)}
  .public-discovery-more{margin:24px auto 20px}
}

/* V68.13 — local read-later list for public books */
.read-later-launch{display:inline-flex;align-items:center;gap:10px;margin:18px auto 0;padding:9px 10px 9px 15px;border-color:#d4cbbd;background:#fff;font-size:11px;font-weight:800}.read-later-launch strong{min-width:25px;height:25px;display:grid;place-items:center;border-radius:999px;background:#1f1f1f;color:#fff;font-size:10px}.read-later-dialog{width:min(680px,calc(100vw - 24px));max-height:min(82dvh,760px);padding:0;border:0;border-radius:22px;background:#fbfaf7;box-shadow:0 24px 80px rgba(0,0,0,.3)}.read-later-dialog::backdrop{background:rgba(15,13,10,.58);backdrop-filter:blur(4px)}.read-later-dialog[open]{display:flex;flex-direction:column}.read-later-dialog-head{flex:0 0 auto;padding:30px 30px 20px;border-bottom:1px solid #e4ddd1}.read-later-dialog-head .eyebrow{margin-bottom:7px}.read-later-dialog-head h2{margin:0 0 7px;font-size:25px;letter-spacing:-.035em}.read-later-dialog-head>p:last-child{max-width:520px;margin:0;color:#777066;font-size:11px;line-height:1.6}.read-later-list{min-height:180px;padding:16px 20px 22px;overflow:auto;-webkit-overflow-scrolling:touch}.read-later-item{display:grid;grid-template-columns:82px minmax(0,1fr);gap:15px;padding:10px;border-bottom:1px solid #e7e0d5}.read-later-item:last-child{border-bottom:0}.read-later-cover{display:block;overflow:hidden;width:82px;aspect-ratio:3/4;border:1px solid #ddd4c7;border-radius:9px;background:#ebe5da;color:#998e7f;text-decoration:none}.read-later-cover img{width:100%;height:100%;display:block;object-fit:cover}.read-later-cover>span{height:100%;display:grid;place-items:center;font:600 24px/1 Georgia,serif}.read-later-copy{min-width:0;align-self:center}.read-later-copy h3{margin:0;font-size:14px;line-height:1.4}.read-later-copy p{overflow:hidden;margin:5px 0 0;color:#716a60;font-size:10px;text-overflow:ellipsis;white-space:nowrap}.read-later-copy small{display:block;margin-top:6px;color:#8a8175;font-size:9px}.read-later-actions{display:flex;gap:7px;margin-top:12px}.read-later-actions a,.read-later-actions button{min-width:82px;padding:8px 13px;border:1px solid #d4cbbd;border-radius:10px;background:#fff;color:#26231f;text-align:center;text-decoration:none;font-size:10px;font-weight:800}.read-later-actions a{border-color:#1f1f1f;background:#1f1f1f;color:#fff}.read-later-empty{min-height:230px;display:grid;place-items:center;align-content:center;gap:8px;text-align:center}.read-later-empty>span{font-size:31px;color:#a19789}.read-later-empty strong{font-size:15px}.read-later-empty p{max-width:380px;margin:0;color:#7e766b;font-size:11px;line-height:1.7}
@media(max-width:680px){.read-later-launch{margin-top:15px}.read-later-dialog{max-height:86dvh;border-radius:20px}.read-later-dialog-head{padding:25px 20px 17px}.read-later-dialog-head h2{font-size:22px}.read-later-list{padding:10px 10px 18px}.read-later-item{grid-template-columns:72px minmax(0,1fr);gap:12px;padding:10px 8px}.read-later-cover{width:72px}.read-later-copy h3{font-size:12px}.read-later-actions{margin-top:9px}.read-later-actions a,.read-later-actions button{min-width:70px;padding:8px 10px}}

/* V68.15 — new public books open in place; only the author link leaves the shelf. */
.public-work-dialog{width:min(680px,calc(100vw - 24px));max-height:min(82dvh,720px);padding:0;border:0;border-radius:22px;background:#fbfaf7;color:#211f1b;box-shadow:0 24px 80px rgba(0,0,0,.3)}
.public-work-dialog::backdrop{background:rgba(15,13,10,.58);backdrop-filter:blur(4px)}
.public-work-dialog-layout{display:grid;grid-template-columns:190px minmax(0,1fr);gap:25px;padding:30px}
.public-work-dialog-cover{overflow:hidden;width:190px;aspect-ratio:3/4;border:1px solid #ddd4c7;border-radius:12px;background:#ebe5da;color:#998e7f;box-shadow:0 12px 28px rgba(54,43,29,.12)}
.public-work-dialog-cover img{width:100%;height:100%;display:block;object-fit:cover}.public-work-dialog-cover>span{height:100%;display:grid;place-items:center;font:600 36px/1 Georgia,serif}
.public-work-dialog-body{min-width:0;display:flex;flex-direction:column}.public-work-dialog-info{padding:9px 42px 0 0}.public-work-dialog-info .eyebrow{margin-bottom:8px}.public-work-dialog-info h2{margin:0;font-size:24px;line-height:1.32;letter-spacing:-.03em}.public-work-dialog-info>p:not(.eyebrow){margin:8px 0 0;color:#716a60;font-size:11px;line-height:1.6}
.public-work-dialog-author{display:inline-block;margin-top:11px;color:#705b3e;font-size:10px;font-weight:800;text-decoration:none}.public-work-dialog-author:hover{text-decoration:underline}
.public-work-dialog-description{margin:18px 0;color:#625c53;font-size:11px;line-height:1.75}.public-work-dialog-actions{display:grid;grid-template-columns:1fr 1.35fr;gap:8px;margin-top:auto}.public-work-dialog-actions button,.public-work-dialog-actions a{display:grid;place-items:center;min-height:43px;padding:10px;border:1px solid #d4cbbd;border-radius:11px;background:#fff;color:#24211d;text-align:center;text-decoration:none;font-size:10px;font-weight:800}.public-work-dialog-actions a{border-color:#1f1f1f;background:#1f1f1f;color:#fff}.public-work-dialog-actions button.is-saved{background:#eee9df;color:#686158}
@media(max-width:680px){.public-work-dialog{max-height:86dvh;border-radius:20px}.public-work-dialog-layout{grid-template-columns:106px minmax(0,1fr);gap:15px;padding:24px 18px 19px}.public-work-dialog-cover{width:106px}.public-work-dialog-info{padding:4px 34px 0 0}.public-work-dialog-info h2{font-size:17px}.public-work-dialog-description{grid-column:1/-1;margin:15px 0 0}.public-work-dialog-actions{grid-column:1/-1;margin-top:17px}.public-work-dialog-body{display:contents}.public-work-dialog-actions button,.public-work-dialog-actions a{min-height:42px}}


/* V70.5 — author wallet: balance + Ahako transaction history */
.commerce-wallet-button{display:flex;flex-direction:column;align-items:flex-end;justify-content:center;gap:1px;min-width:76px;padding:6px 10px;border:1px solid #d8d0c4;border-radius:11px;background:#fff;color:#26221d}.commerce-wallet-button small{font-size:7px;color:#8b8174}.commerce-wallet-button strong{font-size:13px;letter-spacing:-.02em}.commerce-wallet-dialog{width:min(620px,calc(100vw - 24px));max-height:82dvh;padding:0;border:0;border-radius:22px;background:#fbfaf7;color:#211f1b;box-shadow:0 24px 80px rgba(0,0,0,.3)}.commerce-wallet-dialog::backdrop{background:rgba(15,13,10,.58);backdrop-filter:blur(4px)}.commerce-wallet-body{padding:30px}.commerce-wallet-body h2{margin:3px 0 20px;font-size:26px}.commerce-wallet-balance{padding:18px 20px;border:1px solid #ddd5c9;border-radius:16px;background:#fff}.commerce-wallet-balance span{display:block;color:#81786c;font-size:9px}.commerce-wallet-balance strong{display:block;margin-top:3px;font-size:31px;letter-spacing:-.04em}.commerce-wallet-balance small{display:block;margin-top:4px;color:#8b8174;font-size:9px}.commerce-wallet-note{margin:10px 2px 22px;color:#777066;font-size:10px;line-height:1.65}.commerce-wallet-history-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.commerce-wallet-history-head strong{font-size:13px}.commerce-wallet-history-head button{padding:6px 10px;font-size:9px}.commerce-wallet-history{overflow:auto;max-height:42dvh;border-top:1px solid #e1dacf}.commerce-wallet-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px 12px;padding:12px 2px;border-bottom:1px solid #e8e1d6}.commerce-wallet-row>div{min-width:0}.commerce-wallet-row strong{display:block;overflow:hidden;font-size:11px;text-overflow:ellipsis;white-space:nowrap}.commerce-wallet-row span{display:block;margin-top:3px;color:#7c7469;font-size:9px}.commerce-wallet-row b{align-self:center;font-size:13px}.commerce-wallet-row b.is-in{color:#356b46}.commerce-wallet-row b.is-out{color:#7b4d43}.commerce-wallet-empty{padding:28px 4px;color:#81786c;font-size:10px;text-align:center}@media(max-width:680px){.commerce-wallet-button{min-width:66px;padding:5px 8px}.commerce-wallet-button strong{font-size:11px}.commerce-wallet-dialog{max-height:86dvh;border-radius:20px}.commerce-wallet-body{padding:25px 18px}.commerce-wallet-balance strong{font-size:28px}}

/* V70.6 — wallet lives in the overflow menu, not the global header */
.commerce-wallet-menu-item{display:flex!important;align-items:center;justify-content:space-between;gap:16px;width:100%;text-align:left}
.commerce-wallet-menu-item[hidden]{display:none!important}
.commerce-wallet-menu-item span{display:grid;gap:2px;min-width:0}
.commerce-wallet-menu-item span strong{font-size:12px}
.commerce-wallet-menu-item span small{font-size:9px;color:#82796d;font-weight:500}
.commerce-wallet-menu-item b{flex:0 0 auto;font-size:12px;color:#2d5f40}
.commerce-wallet-balance{display:grid;gap:5px}
.commerce-wallet-balance>strong{order:0}
.commerce-wallet-balance>span{order:1!important;color:#81786c!important;font-size:10px!important;line-height:1.55}
.commerce-wallet-balance>small{order:2}


/* iOS installed bookshelf: the browser status area scrolls the inner shelf. */
.shelf-status-tap-top{display:none}
@media(max-width:680px) and (pointer:coarse){
  .shelf-status-tap-top{position:fixed;top:0;left:0;right:0;z-index:25;display:block;width:100%;height:env(safe-area-inset-top,0px);min-height:0;margin:0;padding:0;border:0;border-radius:0;background:transparent;cursor:default;touch-action:manipulation}
}

/* V37: distinguish episodes in the author's editable series BOX. */
.series-choice>span:nth-child(2)>strong{white-space:normal;overflow-wrap:anywhere;line-height:1.4}
.series-choice-work-title{display:block;color:#756d62;font-size:10px;line-height:1.4;overflow-wrap:anywhere}

/* V38: visible, keyboard-accessible top-scroll control; no safe-area reliance. */
.topbar>button.brand{margin:0;padding:0;border:0;border-radius:0;background:transparent;color:inherit;text-align:left}
.topbar>button.brand:focus-visible{outline:2px solid #817260;outline-offset:5px}

/* V39: lightweight cover thumbnails in both editable BOX lists. */
.series-choice{grid-template-columns:58px minmax(0,1fr) auto}
.series-choice-handle{display:flex;align-items:center;gap:5px}
.series-choice-grip{flex:0 0 12px;font-size:13px}
.series-choice-cover{display:block;flex:0 0 34px;width:34px;aspect-ratio:3/4;overflow:hidden;border-radius:4px;background:#e9e2d7;border:1px solid #d8d0c3}
.series-choice-cover img{display:block;width:100%;height:100%;object-fit:cover}
.series-choice-cover>span{display:grid;height:100%;place-items:center;color:#9d9385;font-size:16px}
.series-box.is-saving{opacity:.65;cursor:progress}
@media(max-width:680px){.series-choice{grid-template-columns:49px minmax(0,1fr)}.series-choice-cover{flex-basis:29px;width:29px}.series-choice-handle{gap:3px}}

/* V40: whole-card long press and animated insertion gap. */
.series-choice.is-selected{cursor:grab;-webkit-touch-callout:none;user-select:none;-webkit-user-select:none}
.series-book-choices{position:relative;overscroll-behavior:contain}
.series-book-choices.is-sorting{touch-action:none;overflow-anchor:none}
.series-choice.is-sort-gap{opacity:.18;border-style:dashed;pointer-events:none}
.series-choice.series-sort-ghost{position:fixed;z-index:10;margin:0;pointer-events:none;box-sizing:border-box;opacity:.96;box-shadow:0 12px 30px #0003;transform:scale(1.02);cursor:grabbing}
