/* Scoped reuse of oz-collection-book.css; standalone layout is retained. */
#collectionPanel *{box-sizing:border-box}
#collectionPanel{margin:0;height:100dvh;display:flex;flex-direction:column;padding:24px 28px 18px;background:#294735;color:#36533d;font:600 16px Oz Sans,sans-serif;overflow:hidden}
#collectionPanel h1,#collectionPanel h2{font-family:Oz Story,serif}
#collectionPanel button,#collectionPanel a{-webkit-tap-highlight-color:transparent;touch-action:manipulation}
#collectionPanel button{font:inherit;color:inherit;border:0;cursor:pointer}
#collectionPanel button:disabled{cursor:default}
#collectionPanel button:focus-visible,#collectionPanel a:focus-visible,#collectionPanel textarea:focus-visible{outline:3px solid #b99235;outline-offset:4px}
#collectionPanel [hidden]{display:none!important}
#collectionPanel .album-heading{display:flex;justify-content:space-between;align-items:center;gap:20px;flex:none;color:#fff4d5;margin:0 4px 18px}
#collectionPanel .album-kicker{font-size:12px;letter-spacing:.1em}
#collectionPanel .album-heading h1{font-size:29px;margin:7px 0}
#collectionPanel .album-heading p{font-size:13px;margin:0;color:#dcdcc3}
#collectionPanel .album-link,#collectionPanel .album-review button{display:inline-flex;align-items:center;justify-content:center;min-height:48px;padding:10px 22px;border-radius:25px;background:#f2e8c8;color:#3c5a40;text-decoration:none;box-shadow:0 4px #af9c70}
#collectionPanel .album-link:active,#collectionPanel .album-review button:active,#collectionPanel .reader-nav button:active{transform:translateY(3px);box-shadow:0 1px #af9c70}
#collectionPanel .album-review{display:flex;gap:15px;align-items:center;flex:none;color:#fff1d0;font-size:13px;margin:0 4px 18px}
#collectionPanel .album{display:flex;flex-direction:column;flex:1;min-height:0;border:6px solid #c7ad6b;border-radius:32px;background:#faf0d7;box-shadow:0 7px #173428;overflow:hidden}
#collectionPanel .album-tabs{display:flex;align-items:center;gap:8px;flex:none;padding:15px 20px;border-bottom:1px solid #daceaa;background:#eaddb9}
#collectionPanel .album-tabs button{min-height:48px;padding:10px 22px;border-radius:24px;background:#f4edda}
#collectionPanel .album-tabs [aria-selected=true]{background:#526e47;color:#fff4d9;box-shadow:0 4px #39543b}
#collectionPanel .album-tabs>span{margin-left:auto;font-size:13px;color:#758058}
#collectionPanel .album-sheet{flex:1;min-height:0;overflow:auto;padding:24px;scrollbar-color:#c1a55e #eee2be;background:linear-gradient(90deg,#f5e8c766,transparent 48%,#dfcd9940 50%,transparent 52%)}
#collectionPanel .album-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}
#collectionPanel .album-card{padding:10px 10px 16px;border-radius:22px;background:#fff9e9;box-shadow:0 4px #d0bf8c;text-align:left;min-width:0;display:flex;flex-direction:column;gap:9px}
#collectionPanel .album-card img,#collectionPanel .album-empty{height:136px;width:100%;border-radius:16px;object-fit:cover}
#collectionPanel .album-card strong{font:700 18px Oz Story}
#collectionPanel .album-card small{font-size:12px;color:#7a8061}
#collectionPanel .album-empty{display:grid;place-items:center;background:linear-gradient(130deg,#ece4ce,#dfdac7);border:1px dashed #c5c3a7}
#collectionPanel .album-empty svg{width:64px;height:64px;fill:none;stroke:#9faaa0;stroke-width:1.2;opacity:.6}
#collectionPanel .album-card[data-collected=false]{background:#f0e9d6;color:#8b947e;box-shadow:0 3px #d4c9a8}
#collectionPanel .album-foot{color:#dfe4cb;font-size:13px;padding:21px 4px 0;flex:none}
#collectionPanel .wish-intro{text-align:center;margin:2px 0 24px;color:#6b7957;font-size:15px}
#collectionPanel .wish-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}
#collectionPanel .wish-card{padding:24px 20px;background:#fff8e5;border:2px solid #e3d3a1;border-radius:30px;text-align:center;min-width:0}
#collectionPanel .wish-card>img{width:98px;height:98px;border-radius:50%;background:#e8e2c8}
#collectionPanel .wish-card h2{display:flex;align-items:center;justify-content:center;gap:9px;font-size:25px;margin:15px 0 10px}
#collectionPanel .wish-card svg{width:28px;height:28px;fill:none;stroke:currentColor;stroke-width:1.8}
#collectionPanel .wish-card [data-token-symbol=courage]{color:#a6662d}
#collectionPanel .wish-count{font:700 31px Oz Story;color:#576f46}
#collectionPanel .wish-card>p{font-size:14px;line-height:1.7;word-break:keep-all;min-height:47px}
#collectionPanel .wish-card ul{list-style:none;padding:14px 0 0;border-top:1px solid #ded6af;margin-bottom:0;color:#7b8260;font-size:13px;line-height:2.2}
#collectionPanel .notes-sheet>h2{margin-top:0}
#collectionPanel .notes-sheet article{padding:16px 24px;margin-bottom:20px;background:#fff8e4;border-radius:24px}
#collectionPanel .notes-sheet article h2{font-size:19px;margin:0 0 10px}
#collectionPanel .notes-sheet article p{white-space:pre-wrap;line-height:1.8;margin:0}
#collectionPanel .notes-sheet textarea{width:100%;min-height:90px;font:inherit;line-height:1.7;padding:14px;border:1px solid #c3c4a0;border-radius:16px;background:#fffaeb;color:#41583b;resize:vertical}
#collectionPanel .notes-sheet label{display:block;margin:22px 0 10px}
#collectionPanel .draft-note{font-size:12px;color:#788361}
#collectionPanel .album-reader{width:min(1020px,calc(100vw - 64px));max-height:calc(100dvh - 64px);border:5px solid #c8ad67;border-radius:32px;padding:26px;background:#fff3d9;color:#35543d;box-shadow:0 15px 80px #14322275;overflow:auto}
#collectionPanel .album-reader::backdrop{background:#193b2ccb}
#collectionPanel .reader-close{position:absolute;right:14px;top:14px;width:48px;height:48px;border-radius:50%;background:#e9ddba;font-size:27px;z-index:1}
#collectionPanel .reader-grid{display:grid;grid-template-columns:45% 1fr;gap:28px}
#collectionPanel .reader-grid>img{height:430px;width:100%;object-fit:cover;border:6px solid #fffaf0;border-radius:24px;box-shadow:0 4px #d3c69a}
#collectionPanel .reader-grid article{padding:16px 12px 0 0;min-width:0}
#collectionPanel .reader-grid h2{font-size:25px;line-height:1.5;margin:10px 20px 14px 0}
#collectionPanel .reader-body{font:600 20px/1.8 Oz Story;white-space:pre-wrap;word-break:keep-all;margin:0 0 18px}
#collectionPanel .reader-source{border-top:1px solid #d6c9a0;padding-top:12px;font-size:12px;line-height:1.7;color:#79815f}
#collectionPanel .reader-source p{margin:3px 0 10px;word-break:keep-all}
#collectionPanel .reader-nav{display:flex;gap:24px;align-items:center;justify-content:center;margin:24px 0 0;font-size:13px;color:#6d795c}
#collectionPanel .reader-nav button{width:54px;height:48px;border-radius:24px;background:#e5d8b4;font-size:23px;box-shadow:0 4px #b5a172}
#collectionPanel .reader-nav button:disabled{opacity:.35}
@media(max-height:800px){#collectionPanel .reader-grid>img{height:380px}
#collectionPanel .reader-body{font-size:19px}
#collectionPanel .reader-grid h2{font-size:23px}
#collectionPanel .album-card img,#collectionPanel .album-empty{height:120px}
#collectionPanel .album-sheet{padding:20px}
}
@media(prefers-reduced-motion:reduce){#collectionPanel *{scroll-behavior:auto}
}

#collection{width:min(1140px,calc(100vw - 32px));height:calc(100dvh - 32px);max-height:calc(100dvh - 32px);padding:0;border:0;border-radius:28px;background:#294735;overflow:hidden}
#collectionPanel{height:100%;padding:20px;display:flex;flex-direction:column}
#collectionPanel .album-heading{margin-bottom:12px}
#collectionPanel .album-tabs{flex-wrap:wrap;padding:10px}
#collectionPanel .album-tabs button{min-height:48px;padding:8px 16px}
#collectionPanel .album-tabs>span{white-space:nowrap}
#collectionPanel .album-sheet{overscroll-behavior:contain}
#collection::backdrop,#stageResult::backdrop{background:#15352dc7}
#stageResult{background:transparent;border:0;padding:0;width:min(640px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto}
#adventureLoading{position:absolute;inset:0;z-index:12;display:grid;place-content:center;background:#294735}
#adventureLoading[hidden]{display:none}
#replayExit{position:absolute;top:112px;right:24px;z-index:5;border:2px solid #dac587;border-radius:24px;min-height:48px;padding:8px 16px;background:#fff3d8;color:#36533d;font:600 14px Oz Sans}
@media(max-width:1050px){#collectionPanel .album-grid{gap:16px}#collectionPanel .wish-grid{gap:12px}#collectionPanel .reader-grid{gap:16px}}
@media(max-height:800px){#collectionPanel{padding:16px}#collectionPanel .album-heading h1{font-size:25px}#collectionPanel .reader-grid>img{height:320px}#collectionPanel .album-reader{padding:20px}}

/* M5: scrollable ending/archive dialogs fit a 768px high screen. */
.journey-panel{box-sizing:border-box;width:min(680px,calc(100vw - 32px));max-height:calc(100dvh - 48px);overflow:auto;border:1px solid #d3bea0;border-radius:22px;padding:28px;background:#fcf4e5;color:#3c3931;line-height:1.7;overscroll-behavior:contain}.journey-panel::backdrop{background:#162a2bc4}.journey-panel h2{font-size:clamp(24px,3vw,34px);margin:0 0 14px}.journey-panel nav{display:flex;flex-wrap:wrap;gap:10px;margin-top:20px}.journey-panel button{min-height:48px;padding:10px 16px;border:1px solid #577262;border-radius:12px;background:#edf0e3;color:#263e35;font:inherit;cursor:pointer}.journey-panel button:focus-visible,.journey-panel summary:focus-visible{outline:3px solid #975813;outline-offset:3px}.journey-panel details{border-top:1px solid #dbceb9;padding:10px 0}.journey-panel summary{cursor:pointer;min-height:40px}.journey-panel li{margin-bottom:6px}.journey-panel header{display:flex;align-items:center;justify-content:space-between;gap:14px}.journey-panel [role=status]{font-size:.9em;color:#555d45}#journeyArchiveList{display:grid;gap:12px}#journeyArchiveList button{text-align:left}@media(max-height:768px){.journey-panel{padding:20px;max-height:calc(100dvh - 32px)}}
#collectionPanel .album-card img[data-captured=true]{object-fit:contain;background:#eee3c9}#collectionPanel .album-reader img[hidden]{display:none}
