*{box-sizing:border-box}
body{margin:0;background:#fff8ec;color:#273e46;font:16px/1.65 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
a{color:inherit;text-decoration:none}
button,input,select{font:inherit}
button,a{touch-action:manipulation}
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #4bae9b;outline-offset:4px}
img{max-width:100%;height:auto;display:block}
h1,h2,h3{line-height:1.18;letter-spacing:-.035em}
h1{font-size:clamp(34px,4.4vw,60px);margin:20px 0}
h2{font-size:clamp(27px,3vw,40px)}
h3{font-size:21px}
p,small{color:#637980}
small{display:block}
.site-header{border-bottom:1px solid #273e4610}
.header-inner{max-width:1200px;margin:auto;padding:22px 32px;display:flex;align-items:center;justify-content:space-between;gap:30px}
.brand{min-width:0;font-size:24px;font-weight:850;display:flex;align-items:center;gap:12px;letter-spacing:-.04em}
.brand span{overflow-wrap:anywhere}
.brand small{font-size:12px;font-weight:600;letter-spacing:.02em}
.brand-mark{display:block;flex-shrink:0;width:44px;height:52px;overflow:hidden}
#language-picker{flex-shrink:0;border:1px solid #273e4620;border-radius:12px;background:#fffdf9;padding:10px 12px;color:#273e46;max-width:190px;direction:ltr}
.hero,.section,.page{max-width:1200px;margin:auto;padding-inline:32px}
.hero{display:flex;flex-direction:column;align-items:flex-start;text-align:start;padding-block:52px 44px;gap:18px}
.hero h1{margin:0;font-size:clamp(26px,4vw,54px)}
.hero .hero-description{font-size:15px;font-weight:400;margin:0}
.hero-description a{color:#273e46;text-decoration:underline;text-underline-offset:3px}
html[lang^="zh"] .hero-title{white-space:nowrap;font-size:clamp(22px,5.5vw,54px)}
.button{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid #273e4620;border-radius:16px;min-height:54px;padding:12px 22px;font-weight:700;cursor:pointer;background:white;color:#273e46}
.primary{background:#f77d68;border-color:#f77d68}
.secondary{background:#fffefb}
button:disabled{opacity:.5}
.section{padding-block:20px 72px}
.section-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:24px}
.filters{display:flex;gap:12px;margin:0;max-width:440px}
.filters input{flex:1;min-width:0;padding:12px 16px;border:1px solid #273e4618;background:white;border-radius:14px;min-height:52px}
.filters .button{flex-shrink:0}
/* The App's first row: direct picture themes, then collection containers. */
.library-nav{display:flex;gap:12px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none;margin:18px 0 28px;padding:12px 10px 12px 0}
.library-nav::-webkit-scrollbar{display:none}
.nav-tile{flex:0 0 124px;border-radius:20px;display:block;color:#111}
.nav-tile>.card-face{height:132px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:10px 6px;border:2px solid transparent;border-radius:inherit;background:white}
.nav-tile img{width:64px;height:64px;object-fit:contain;border-radius:18px;background:white}
.nav-tile .card-face>span{display:flex;align-items:center;justify-content:center;text-align:center;font-size:14px;font-weight:650;line-height:1.3;height:36px;max-width:100%;overflow-wrap:anywhere}
.nav-tile.selected>.card-face{background:color-mix(in srgb,#f4be42 40%,#fff8ec);border-color:#f77d68}
.nav-tile.stacked{margin-inline-end:8px}
/* Three paper layers reproduce PaperStack's 8/-8 and 4/-4 offsets. */
.stacked{position:relative;isolation:isolate;overflow:visible;background:transparent;border:0}
.stacked::before,.stacked::after{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;z-index:-1}
.stacked::before{transform:translate(8px,-8px);background:color-mix(in srgb,#4bae9b 16%,#fff8ec);border:1.5px solid #4bae9ba6}
.stacked::after{transform:translate(4px,-4px);background:white;border:1.5px solid #4bae9b73}
.stacked>.card-face{display:block;background:white;border:1px solid #4bae9b73;border-radius:inherit;min-height:100%}
.nav-tile.stacked>.card-face{display:flex}
.nav-tile.stacked.selected>.card-face{background:color-mix(in srgb,#f4be42 65%,#fff8ec);border:2px solid #f77d68}
.art-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:22px;padding-top:10px;padding-inline-end:8px}
.art-card{display:block;background:white;border-radius:24px;overflow:hidden;border:1px solid #273e460b;transition:transform .2s}
.art-card:hover{transform:translateY(-4px)}
.art-card>img,.art-card>.card-face>img{width:100%;aspect-ratio:1;object-fit:contain;padding:12px;border-radius:24px;background:white}
.art-card>div:not(.card-face),.card-body{padding:0 20px 22px}
.art-card h3{margin:12px 0 8px;overflow-wrap:anywhere}
.art-card p{font-size:14px;margin:0 0 10px;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.art-card.stacked{background:transparent;border:0;overflow:visible;margin-top:8px;margin-inline-end:8px}
.book-group{margin-top:20px}
.book-group>h3{margin:0 0 16px;font-size:21px}
.book-group+.book-group{margin-top:34px}
.collection-heading{margin-bottom:18px}
.collection-heading h3{margin:18px 0 8px;font-size:24px}
.collection-heading p{margin:0;max-width:760px;font-size:15px}
.library-back{display:inline-flex;align-items:center;gap:8px;font-size:14px;font-weight:700;color:#3f8e80}
.library-back img{width:34px;height:34px;object-fit:contain}
.pagination{display:flex;gap:10px;flex-wrap:wrap;margin-top:30px}
.chip{display:inline-flex;padding:10px 18px;background:white;border-radius:30px;white-space:nowrap;font-weight:650}
.chip.selected{background:#f9c7b7}
.information-page{max-width:850px;min-height:60vh;padding-block:72px}
.information-page p{font-size:18px}
footer{max-width:1200px;margin:30px auto 0;padding:40px 32px;border-top:1px solid #273e4614;display:flex;gap:24px;justify-content:flex-start;flex-wrap:wrap;font-size:13px}
footer span,footer a[href^="mailto:"]{direction:ltr;unicode-bidi:isolate}
.skip-link{position:absolute;inset-inline-start:16px;top:-60px;background:white;padding:12px;z-index:10}
.skip-link:focus{top:10px}
#toast{max-width:800px;margin:auto;color:#be513e;text-align:center}
dialog{border:0;border-radius:26px;max-width:min(1050px,calc(100vw - 32px));padding:36px;box-shadow:0 20px 80px #0004;background:#fff8ec;color:#273e46}
dialog::backdrop{background:#273e4670}
.dialog-close{position:absolute;inset-inline-end:12px;top:8px;border:0;background:none;font-size:30px;width:44px;height:44px;cursor:pointer;color:#273e46}
.picture-detail-layout{display:grid;grid-template-columns:1.1fr 1fr;align-items:center;gap:30px}
.preview-art{background:white;border-radius:24px;position:relative;overflow:hidden}
.preview-art img{width:100%;max-height:65vh;object-fit:contain}
.watermark-qr{position:absolute;right:12px;bottom:12px;width:clamp(72px,18%,96px);display:block;line-height:0;background:white}
.watermark-qr svg{display:block;width:100%;height:auto}
.watermark-qr.qr-embedded{background:transparent}
.watermark-qr.qr-embedded svg{visibility:hidden}
dialog h2{font-size:28px}
html[dir="rtl"] h1,html[dir="rtl"] h2,html[dir="rtl"] h3,html[dir="rtl"] .brand{letter-spacing:normal}
html[dir="rtl"] .stacked::before{transform:translate(-8px,-8px)}
html[dir="rtl"] .stacked::after{transform:translate(-4px,-4px)}
html[dir="rtl"] .library-nav{padding:12px 0 12px 10px}
html[dir="rtl"] .library-back img{transform:scaleX(-1)}
.back-arrow{display:inline-block}
html[dir="rtl"] .back-arrow{transform:scaleX(-1)}
@media(max-width:900px){
 .art-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:600px){
 .header-inner{padding:16px 20px;gap:10px}
 .brand{font-size:18px;gap:10px}
 .brand small{font-size:10px}
 .brand-mark{width:36px;height:43px}
 #language-picker{font-size:12px;max-width:132px;padding:8px 12px}
 .hero,.section,.page{padding-inline:20px}
 .hero{padding-block:36px 40px}
 .hero h1{overflow-wrap:anywhere}
 .hero .hero-description{font-size:13px}
 .section-heading{align-items:flex-start;flex-direction:column;gap:12px}
 .section-heading h2{font-size:26px}
 .section-heading .filters{width:100%}
 .filters .button{padding-inline:14px}
 .library-nav{margin-block:18px 24px}
 .nav-tile{flex-basis:106px}
 .nav-tile>.card-face{height:104px;padding:6px;gap:6px}
 .nav-tile img{width:50px;height:50px}
 .nav-tile .card-face>span{font-size:13px;height:30px}
 .art-grid{gap:16px}
 .art-card>div:not(.card-face),.card-body{padding:0 14px 18px}
 .art-card h3{font-size:18px}
 .art-card p{font-size:12px}
 .book-group>h3{font-size:20px}
 dialog{padding:42px 18px 22px}
 .picture-detail-layout{grid-template-columns:1fr;gap:32px}
 .preview-art img{max-height:44vh}
 footer{padding:30px 20px;gap:14px;font-size:11px}
}
