/* Photos stay in the same order as the source album. */
.library-photo-strip{display:flex;gap:9px;overflow-x:auto;padding:3px 2px 9px;scrollbar-width:thin}.library-photo-strip>button{flex:0 0 62px;height:76px;padding:3px;border:1px solid var(--line);border-radius:12px;background:var(--panel);opacity:.65}.library-photo-strip>button.active{border-color:var(--ink);opacity:1;box-shadow:0 0 0 1px var(--ink)}.library-photo-strip img{width:100%;height:100%;object-fit:cover;border-radius:8px}.library-photo-caption{font-size:10px;color:var(--muted);margin:0 0 19px}.library-detail:has(.library-photo-strip) .library-detail-photo{margin-bottom:12px}
/* The prompt archive uses the same porcelain, graphite and sculpted-paper language. */
.prompt-library-banner{display:flex;align-items:center;gap:25px;width:100%;padding:24px 28px;margin:30px 0 42px;text-align:left;border:1px solid var(--edge);border-radius:25px;background:var(--raised);box-shadow:var(--card-shadow),var(--inset)}
.prompt-library-banner>span:nth-child(2){display:grid;gap:6px}.prompt-library-banner small{font-size:8px;letter-spacing:1.6px;color:var(--muted)}.prompt-library-banner strong{font-size:24px;letter-spacing:-.8px}.prompt-library-banner>span:nth-child(2)>span{font-size:12px;color:var(--muted)}.library-banner-arrow{display:grid;place-items:center;margin-left:auto;height:42px;width:42px;border-radius:50%;background:var(--panel);box-shadow:var(--surface-shadow);flex-shrink:0}
.library-book{position:relative;width:87px;height:94px;flex-shrink:0;perspective:600px}.library-book>i{position:absolute;inset:8px 12px;border:1px solid #c3cbd7;border-radius:12px;background:linear-gradient(130deg,#fff,#d8dee7);box-shadow:2px 4px 0 #aeb7c6,5px 13px 15px #16213922;transform:rotate(-13deg)}.library-book>i:nth-child(2){transform:translate(8px,2px) rotate(0deg)}.library-book>i:nth-child(3){display:grid;place-items:center;background:linear-gradient(140deg,#667084,#252c38);color:#fff;transform:translate(16px,4px) rotate(13deg)}.library-book .icon{width:28px;height:28px}
.library-heading{display:flex;justify-content:space-between;align-items:center;gap:25px;margin:6px 0 32px}.library-heading h1{font-size:48px;letter-spacing:-2px;line-height:1.12}.library-heading h1 em{color:var(--muted);font-family:Georgia,serif;font-weight:400}.library-heading p{color:var(--muted);font-size:13px;line-height:1.7;margin-top:13px;max-width:500px}.library-total{display:grid;gap:1px;text-align:right;white-space:nowrap}.library-total strong{font-size:44px;font-weight:500;letter-spacing:-2px}.library-total span{font-size:10px;color:var(--muted)}
.library-search-row{display:flex;align-items:center}.library-search{display:flex;align-items:center;gap:13px;flex:1;min-width:0;padding:2px 18px;border:1px solid var(--line);border-radius:17px;background:var(--panel);box-shadow:inset 0 1px 2px #00000003}.library-search>.icon{width:19px;color:var(--muted);flex-shrink:0}.library-search input{border:0;box-shadow:none;background:transparent;font-size:14px;min-height:55px;padding:13px 0;min-width:0;width:100%}.library-search input:focus{outline:none;box-shadow:none}.library-search:focus-within{outline:2px solid #8a96aa;outline-offset:2px}
.library-type-tabs{display:flex;align-items:center;gap:6px;padding:21px 0 18px;overflow-x:auto;scrollbar-width:none}.library-type-tabs>span{flex:1}.library-type-tabs>button{display:flex;align-items:center;gap:7px;white-space:nowrap;min-height:40px;padding:9px 15px;border-radius:13px;color:var(--muted);font-size:12px}.library-type-tabs>button.active{color:var(--ink);background:var(--panel2);box-shadow:inset 0 1px 1px #ffffff20}.library-type-tabs .icon{width:16px;height:16px}.library-categories{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;padding:2px 0 13px}.library-categories .chip{flex-shrink:0;font-size:11px;padding:9px 15px;min-height:37px}
.library-sync-note{display:flex;align-items:center;gap:7px;font-size:10px;line-height:1.6;color:var(--muted);margin:8px 0 29px}.library-sync-note>.icon{width:13px;height:13px;flex-shrink:0}.library-results-head{display:flex;justify-content:space-between;align-items:center;margin:0 0 15px;gap:10px}.library-results-head>span{font-size:12px;font-weight:550}.library-results-head>small{font-size:10px;color:var(--muted)}
.library-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:23px}.library-card{position:relative;overflow:hidden;border:1px solid var(--line);border-radius:23px;background:var(--panel);box-shadow:var(--card-shadow);transition:transform .3s,box-shadow .3s}.library-card-open{display:block;text-align:left;width:100%;height:100%;padding:0}.library-card-art{position:relative;height:246px;overflow:hidden;background:var(--panel2);border-bottom:1px solid var(--line)}.library-card-art>img{height:100%;width:100%;object-fit:cover}.library-card-kind{display:flex;gap:5px;align-items:center;position:absolute;left:14px;top:14px;padding:6px 9px;line-height:1;background:#ffffffd9;color:#333c4a;border:1px solid #fff6;border-radius:9px;font-size:9px;backdrop-filter:blur(12px)}.library-card-kind>.icon{width:13px;height:13px}.library-new{position:absolute;left:14px;bottom:13px;padding:5px 9px;border-radius:7px;background:#292f3d;color:#fff;font-size:9px}.library-favorite{position:absolute;right:12px;top:12px;width:32px;height:32px;display:grid;place-items:center;border:1px solid #ffffff60;border-radius:50%;background:#ffffffcc;color:#586274;backdrop-filter:blur(12px)}.library-favorite.on{background:#252c39;color:#fff}.library-favorite.on .icon{fill:currentColor}
.paper-cover{background:radial-gradient(ellipse at 50% 25%,#ffffff30,transparent 65%),var(--well);perspective:700px}.paper-layer{display:block;position:absolute;width:64%;height:178px;left:18%;top:45px;border-radius:14px;transform:rotate(-8deg);border:1px solid #ffffff70;background:linear-gradient(140deg,#edf1f7,#b1bbc9);box-shadow:2px 3px 0 #a4afbf,0 12px 15px #172b4520}.paper-front{display:flex;flex-direction:column;align-items:flex-start;gap:10px;padding:20px;transform:rotate(5deg);color:#293244;background:linear-gradient(145deg,#fff,#edf0f5);border-color:#fff}.paper-icon{display:grid;place-items:center;width:30px;height:30px;border-radius:9px;background:linear-gradient(145deg,#616d81,#252d3b);color:#fff;box-shadow:inset 0 1px 1px #ffffff99,1px 3px 0 #8b98aa}.paper-icon>.icon{height:16px;width:16px}.paper-kicker{font-size:6px;letter-spacing:1px;text-transform:uppercase;color:#778399}.paper-front>strong{font-size:13px;line-height:1.45;max-height:39px;overflow:hidden;letter-spacing:-.2px}.paper-lines{display:grid;width:100%;gap:5px;margin-top:auto}.paper-lines>i{display:block;width:100%;height:3px;background:#b6bfcc55;border-radius:3px}.paper-lines>i:nth-child(2){width:84%}.paper-lines>i:nth-child(3){width:60%}
.library-card-copy{padding:16px 18px}.library-card-copy h3{font-size:17px;letter-spacing:-.4px;line-height:1.35;margin:0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:46px}.library-more{display:flex;margin:28px auto 0;min-width:180px;justify-content:center}.library-source-note{display:flex;align-items:center;justify-content:space-between;gap:25px;color:var(--muted);font-size:10px;line-height:1.8;margin-top:35px}.library-source-note a{display:flex;align-items:center;gap:5px;white-space:nowrap}
.library-loading{display:grid;place-items:center;gap:20px;padding:75px 20px;color:var(--muted);font-size:12px}.library-loading-book{width:60px;height:80px;border-radius:10px;border:1px solid var(--line);background:var(--raised);box-shadow:4px 5px 0 var(--line),0 14px 24px #15233b15;transform:rotate(-8deg);animation:libraryBreathe 2s ease-in-out infinite}@keyframes libraryBreathe{50%{opacity:.5;transform:translateY(-5px) rotate(4deg)}}
.modal-prompt-library{max-width:650px}.modal-prompt-library .modal-head h2{font-size:17px;line-height:1.4;letter-spacing:-.3px}.library-detail-photo{display:block;width:100%;max-height:350px;object-fit:contain;border-radius:17px;background:var(--panel2);margin-bottom:20px}.library-detail-emblem{display:flex;align-items:center;gap:12px;padding:18px 20px;background:var(--raised);border:1px solid var(--line);border-radius:16px;margin-bottom:23px;box-shadow:var(--surface-shadow)}.library-detail-emblem>.icon{height:27px;width:27px}.library-detail-emblem>span{font-size:12px;color:var(--muted)}.library-variants{display:flex;gap:8px;overflow-x:auto;margin-bottom:13px}.library-prompt-text{white-space:pre-wrap;word-break:break-word;font:12px/1.85 Inter,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color:var(--ink);margin:0;padding:16px;border:0;border-top:1px solid var(--line);border-radius:0 0 12px 12px;background:var(--well);user-select:text}.library-detail-actions{display:flex;gap:10px;margin:0}.library-detail-actions>.btn{flex:1;min-width:0;padding-inline:10px;justify-content:center;min-height:48px;font-size:12px;white-space:normal;line-height:1.4;gap:7px}.library-detail-actions>.btn>.icon{flex-shrink:0}
@media(hover:hover) and (pointer:fine){.library-card:hover{transform:translateY(-4px);box-shadow:0 12px 25px #15233b18}.prompt-library-banner:hover .library-book>i:nth-child(3){transform:translate(16px,0) rotate(8deg);transition:transform .4s}.library-card-open:hover .paper-front{transform:rotate(2deg);transition:transform .4s}}
@media(max-width:1100px){.library-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.library-heading h1{font-size:40px}}
@media(max-width:800px){.prompt-library-banner{padding:18px 18px 20px;gap:15px;margin:24px 0 33px;border-radius:21px}.prompt-library-banner strong{font-size:19px;letter-spacing:-.7px}.prompt-library-banner small{font-size:6px;letter-spacing:1px}.prompt-library-banner>span:nth-child(2)>span{font-size:10px;line-height:1.6}.library-book{transform:scale(.74);transform-origin:center;width:66px;height:72px;margin-left:-8px;margin-right:-3px}.library-book>i{inset:0 2px}.library-banner-arrow{width:29px;height:29px}.library-banner-arrow>.icon{width:16px}.library-heading{margin:7px 0 25px;gap:16px;align-items:flex-start}.library-heading h1{font-size:34px;letter-spacing:-1.4px}.library-heading p{font-size:11px;margin-top:12px}.library-heading .eyebrow{font-size:7px;letter-spacing:1.25px}.library-total{padding-top:24px}.library-total strong{font-size:30px;letter-spacing:-1px}.library-total span{font-size:8px}.library-search{padding:1px 13px;border-radius:14px;gap:9px}.library-search input{font-size:16px;min-height:48px}.library-search input::placeholder{font-size:12px}.library-search>.icon{width:17px}.library-type-tabs{gap:2px;padding-top:17px;padding-bottom:15px}.library-type-tabs>button{padding:9px 11px;font-size:11px;min-height:39px}.library-type-tabs>span{display:none}.library-categories{gap:7px}.library-categories .chip{font-size:10px;min-height:34px;padding:8px 12px}.library-sync-note{font-size:9px;align-items:flex-start;margin:5px 0 23px;gap:7px}.library-sync-note>.icon{margin-top:2px}.library-grid{gap:13px}.library-card{border-radius:18px}.library-card-art{height:186px}.paper-layer{width:70%;left:15%;height:134px;top:38px;border-radius:10px}.paper-front{padding:12px;gap:7px}.paper-icon{width:24px;height:24px;border-radius:7px}.paper-icon>.icon{height:13px;width:13px}.paper-front>strong{font-size:10px;line-height:1.45;max-height:30px}.paper-kicker{font-size:5px;letter-spacing:.6px}.paper-lines{gap:4px}.paper-lines>i{height:2px}.library-card-kind{top:10px;left:10px;font-size:8px;padding:5px 7px;border-radius:7px}.library-card-kind>.icon{height:11px;width:11px}.library-favorite{height:28px;width:28px;right:9px;top:9px}.library-favorite>.icon{width:14px;height:14px}.library-new{font-size:8px;left:10px;bottom:10px}.library-card-copy{padding:13px 12px 14px}.library-card-copy h3{font-size:13px;line-height:1.45;min-height:38px;letter-spacing:-.2px;margin:0}.library-results-head{margin-bottom:13px}.library-results-head>span{font-size:11px}.library-results-head>small{font-size:8px}.library-source-note{display:grid;gap:11px;font-size:9px}.library-prompt-text{font-size:12px;padding:14px}.library-detail-actions{gap:8px}.library-detail-actions>.btn{font-size:11px}.library-detail-photo{max-height:260px}.modal-prompt-library .modal-head h2{font-size:15px}}
@media(max-width:370px){.library-heading h1{font-size:30px}.library-total strong{font-size:25px}.library-total span{font-size:7px}.library-card-art{height:170px}.paper-layer{height:120px}.library-card-copy{padding:12px 10px}.library-card-copy h3{font-size:12px}.prompt-library-banner strong{font-size:17px}.library-banner-arrow{display:none}}
@media(prefers-reduced-motion:reduce){.library-loading-book{animation:none}.library-card:hover{transform:none}}

.library-photo-count{position:absolute;right:12px;bottom:12px;display:flex;align-items:center;gap:5px;padding:6px 9px;border:1px solid #ffffff50;border-radius:9px;background:#20242bcc;color:#fff;font-size:9px;backdrop-filter:blur(10px)}.library-photo-count .icon{height:12px;width:12px}

.library-media-note{position:absolute;bottom:9px;left:9px;right:9px;text-align:center;padding:5px 7px;border-radius:8px;background:var(--panel);color:var(--muted);font-size:9px;border:1px solid var(--line)}

/* Full prompt is optional; the short action row remains outside its scroll area. */
.library-prompt-disclosure{border:1px solid var(--line);border-radius:12px;background:var(--panel)}
.library-prompt-disclosure>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:46px;padding:12px 14px;list-style:none;font-size:13px;font-weight:500;cursor:pointer;border-radius:12px}
.library-prompt-disclosure>summary::-webkit-details-marker{display:none}
.library-prompt-disclosure>summary::marker{content:''}
.library-prompt-disclosure>summary:focus-visible{outline:2px solid var(--ink);outline-offset:3px}
.library-prompt-disclosure>summary>.icon{flex-shrink:0;color:var(--muted)}
.library-prompt-disclosure[open]>summary>.icon{transform:rotate(180deg)}
