/* Encaja Atelier: warm paper, botanical ink and an unhurried editorial rhythm. */
:root { --paper:#f5f2e9; --white:#fffdf7; --ink:#233e34; --muted:#6d766b; --line:#ddded1; --green:#294e3f; --green-pale:#e7ebdf; --rust:#bf623e; --rust-hover:#a64d30; }
body { background-image:radial-gradient(#415d3610 .6px,transparent .6px); background-size:5px 5px; }
button { transition:background .18s, border-color .18s, transform .18s, box-shadow .18s; }
.shell { width:min(1220px,calc(100% - 80px)); }
.site-header { background:#f5f2e9ed; border-color:#d6dacb; }
.header-inner { min-height:92px; }
.brand { font-size:38px; letter-spacing:-.065em; }
.brand-mark { width:43px; height:43px; background:var(--green); color:#f5eddb; border-radius:15px 15px 6px 15px; }
.brand-point { color:var(--rust); }
.navigation { gap:8px; }
.navigation button { padding:12px 20px; font-size:.9rem; border-radius:999px; }
.navigation button[aria-current="page"] { background:var(--green); color:var(--white); }
.button,.icon-button { min-height:46px; border-radius:12px; }
.button-outline { background:transparent; }
.import-button { padding-inline:18px; border-color:#94a28b; }
.button-primary { background:var(--green); box-shadow:0 3px 0 #173629; }
.button-primary:hover { background:#365e4c; }
.catalog { padding-block:28px 56px; }
.eyebrow { font-size:.67rem; letter-spacing:.18em; font-weight:750; color:var(--muted); line-height:1.6; display:block; }
.collection-intro { display:grid; grid-template-columns:1fr auto; column-gap:30px; align-items:end; margin:15px 0 32px; }
.collection-intro .eyebrow { grid-column:1/-1; margin-bottom:13px; }
.collection-intro p { margin:0; font:normal clamp(2.6rem,4.9vw,4.4rem)/1.02 var(--serif); letter-spacing:-.06em; }
.intro-note { color:var(--muted); font-size:.91rem; line-height:1.65; padding-bottom:6px; }
.hero { border-radius:24px; min-height:460px; box-shadow:0 16px 38px #243a2312; background:#1b3c33; }
.hero-image { width:100%; object-position:center 50%; }
.hero::after { background:linear-gradient(90deg,#122c23d9,#122c2370 45%,#122c2300 80%),linear-gradient(0deg,#122c2370,transparent 55%); }
.hero-content { padding:48px; align-self:center; }
.hero-category { font-size:.66rem; letter-spacing:.16em; color:#efe9cf; }
.live-dot { height:6px; width:6px; border-radius:50%; background:#dbbd78; }
.hero h1 { font-size:clamp(3rem,5vw,4.7rem); line-height:1.02; letter-spacing:-.055em; margin:20px 0 18px; text-shadow:0 2px 12px #14281b28; }
.hero p { font-size:.96rem; line-height:1.6; margin-bottom:28px; }
.hero-button { background:#f1eddd; color:#233e34; border:0; box-shadow:none; border-radius:999px; padding:15px 23px; gap:20px; font-size:.9rem; min-height:52px; }
.hero-button:hover { background:white; }
.hero-button span { font-size:1.2rem; }
.hero-caption { position:absolute; bottom:25px; right:30px; font-size:.61rem; letter-spacing:.19em; color:#fff9e0; }
.collection-notes { display:flex; justify-content:space-between; gap:16px; padding:24px 4px; border-bottom:1px solid var(--line); font-size:.79rem; color:var(--muted); }
.collection-notes b { font-weight:650; color:var(--ink); margin-right:5px; }
.gallery-section { margin-top:42px; }
.section-heading { align-items:end; margin-bottom:23px; gap:20px; }
.section-heading .eyebrow { margin-bottom:11px; }
.section-heading h2 { font-size:2.8rem; letter-spacing:-.055em; }
.filters { gap:6px; }
.filters button { font-size:.76rem; border:1px solid transparent; background:transparent; min-height:42px; padding:9px 13px; }
.filters button:hover { color:var(--green); background:#e4e9dc; }
.filters button[aria-pressed="true"] { background:var(--green); color:white; }
.gallery { grid-template-columns:repeat(4,minmax(0,1fr)); gap:28px 20px; }
.card { border:0; border-radius:0; overflow:visible; background:transparent; box-shadow:none; }
.card:hover { transform:translateY(-4px); box-shadow:none; }
.card img { aspect-ratio:1.13; border-radius:18px; box-shadow:0 5px 12px #20352d0d; }
.card-body { padding:15px 26px 0 2px; position:relative; }
.category-label { color:#7b6849; font-size:.65rem; letter-spacing:.1em; text-transform:uppercase; font-weight:700; }
.card-title { font:normal 1.4rem/1.12 var(--serif); letter-spacing:-.035em; margin-top:8px; }
.card-meta { display:block; font-size:.67rem; color:var(--muted); margin-top:9px; line-height:1.5; }
.card-arrow { position:absolute; right:2px; top:36px; font-size:1.15rem; color:#74846b; }
.resume-latest { background:#e7ecdf; border:1px solid #d6ddcb; border-radius:16px; margin-bottom:30px; padding:13px 18px; }
.resume-latest img { border-radius:9px; }
.resume-latest strong { font-family:var(--serif); font-size:1.2rem; font-weight:normal; }
.saved-view { padding-block:50px 60px; }
.saved-view h1 { font-size:clamp(2.4rem,5vw,4rem); margin:12px 0; }
.saved-subtitle { margin:0 0 32px; color:var(--muted); font-size:.94rem; }
.home-footer { border-top:1px solid var(--line); margin-inline:auto; padding:30px 20px 40px; font-size:1.4rem; }
.home-footer span { font-size:.72rem; }
.dialog { border:0; border-radius:24px; box-shadow:0 24px 90px #0e271a52; }
.dialog::backdrop { background:#142c24b3; backdrop-filter:blur(5px); }
.dialog-photo { height:210px; }
.dialog-close { border-radius:50%; background:#fffdf7f0; box-shadow:0 2px 8px #18302615; border:0; }
.dialog-body { padding:24px 28px 28px; }
.dialog-body h2 { font-size:2.35rem; line-height:1.04; margin-top:10px; }
.sizes { gap:8px; }
.size-button { min-height:51px; border-radius:12px; background:#f0f0e5; border-color:transparent; }
.size-button[aria-pressed="true"] { box-shadow:0 0 0 2px var(--white),0 0 0 3px var(--green); }
.dialog-start { margin-top:20px; min-height:50px; border-radius:999px; }
.detail-dialog { width:min(430px,calc(100% - 24px)); }
.detail-dialog .dialog-body { padding-top:40px; }
#detail-preview { display:grid; place-items:center; background:radial-gradient(ellipse,#ede5d0, #f3f0e6 70%); border-radius:18px; margin-top:22px; }
#detail-preview canvas { display:block; width:min(100%,300px); height:auto; }
.detail-dialog p { font-size:.85rem; line-height:1.5; }
.game-header { background:#f8f6edef; border-bottom:1px solid #d5dacb; box-shadow:0 1px 10px #24382805; }
.game-title h1 { font-weight:normal; font-size:1.3rem; }
.game-actions .button,.game-actions .icon-button { background:#fdfbf4; border-color:#dfe3d6; }
.game-actions [aria-pressed="true"] { background:#dce7d3; }
.surface { background:#e7e2d4; background-image:radial-gradient(#6f725512 .65px,transparent .65px),linear-gradient(125deg,#f0ede3,#e5e0d1); background-size:6px 6px,100% 100%; }
.play[data-tone="sage"] .surface { background-color:#ccd8c7; background-image:radial-gradient(#526a501a .7px,transparent .7px),linear-gradient(125deg,#dce5d6,#c4d2bf); }
.play[data-tone="night"] .surface { background-color:#213d35; background-image:radial-gradient(#a6baa216 .7px,transparent .7px),linear-gradient(125deg,#2c493f,#19352d); }
.board-note { padding:8px 14px; font-size:.72rem; border:0; background:#fffdf7e0; box-shadow:0 2px 8px #20352d09; }
.zoom-buttons,.elapsed { border:0; border-radius:14px; background:#fffdf7ed; box-shadow:0 3px 15px #20352d12; }
.zoom-buttons button { border-radius:12px; }
.tray { background:#f8f6ec; border-color:#d3d9c8; }
.tray-header { padding:10px 14px 5px; }
.tray-header h2 { font-weight:normal; font-size:1.2rem; }
.tray-paging .icon-button { border:0; background:#eeeee3; }
.tray-header #piece-detail { width:36px; min-height:36px; border:0; background:#eeeee3; }
.edge-filter { border-color:#d7ddcb; min-height:38px; }
.tray-list { padding:8px 14px 12px; gap:10px; }
.tray-piece { background:#efeddf; border:1px solid #e1e2d1; border-radius:14px; }
.tray-piece:hover { background:#e0e6d4; }
.tray-piece[aria-pressed="true"] { background:#e0e7d4; border-color:#647f53; box-shadow:0 0 0 2px #6a805829; }
.toast { background:#244737; border-radius:14px; padding:13px 18px; }
@media(min-width:941px) { .gallery .card:nth-child(3n+2) img { border-radius:70px 18px 18px 18px; } }
@media(max-width:1050px) { .gallery { grid-template-columns:repeat(3,minmax(0,1fr)); } .section-heading { display:block; } .filters { margin-top:18px; } }
@media(max-width:700px) {
 .shell { width:calc(100% - 36px); }
 .header-inner { min-height:0; padding-top:calc(16px + env(safe-area-inset-top)); gap:14px; }
 .brand { font-size:31px; }
 .brand-mark { width:35px; height:35px; border-radius:12px 12px 4px 12px; }
 .import-button { min-height:44px; border-radius:999px; font-size:.76rem; padding:10px 13px; }
 .navigation { background:#e8e9dc; margin-bottom:13px; border-radius:999px; padding:4px; }
 .navigation button { border-radius:999px; min-height:42px; font-size:.83rem; }
 .navigation button[aria-current="page"] { background:var(--green); color:white; box-shadow:none; }
 .catalog { padding-block:22px 40px; }
 .collection-intro { margin:0 0 25px; display:block; }
 .collection-intro .eyebrow { font-size:.58rem; margin-bottom:12px; }
 .collection-intro p { font-size:clamp(2.35rem,9.3vw,3.8rem); line-height:1.04; letter-spacing:-.055em; }
 .intro-note { display:block; margin-top:14px; padding:0; font-size:.8rem; line-height:1.5; }
 .intro-note br { display:none; }
 .hero { min-height:390px; border-radius:20px; }
 .hero-image { object-position:60% 50%; }
 .hero::after { background:linear-gradient(0deg,#102d23ed,#16352a80 45%,transparent 80%); }
 .hero-content { padding:29px 24px 42px; align-self:end; }
 .hero-category { font-size:.55rem; letter-spacing:.14em; }
 .hero h1 { font-size:clamp(2.4rem,10vw,3.8rem); margin:13px 0; }
 .hero p { font-size:.82rem; max-width:220px; margin-bottom:21px; }
 .hero-button { min-height:48px; font-size:.79rem; padding:12px 17px; gap:18px; }
 .hero-caption { bottom:16px; right:20px; font-size:.49rem; letter-spacing:.14em; }
 .collection-notes { display:grid; grid-template-columns:1fr 1fr; gap:13px; padding:20px 0; font-size:.65rem; line-height:1.6; }
 .collection-notes span:last-child { grid-column:1/-1; }
 .collection-notes b { display:block; font-size:.9rem; }
 .collection-notes span:last-child b { display:inline; font-size:.65rem; }
 .gallery-section { margin-top:29px; }
 .section-heading { margin-bottom:17px; }
 .section-heading .eyebrow { font-size:.53rem; margin-bottom:9px; }
 .section-heading h2 { font-size:2.15rem; }
 .filters { margin-top:16px; gap:5px; padding-bottom:8px; }
 .filters button { min-height:42px; font-size:.72rem; padding:8px 12px; }
 .gallery { grid-template-columns:repeat(2,minmax(0,1fr)); gap:26px 13px; }
 .card img { aspect-ratio:.96; border-radius:14px; }
 .gallery .card:nth-child(3n+2) img { border-top-left-radius:40px; }
 .card-body { padding:12px 16px 0 1px; }
 .category-label { font-size:.55rem; letter-spacing:.08em; }
 .card-title { font-size:1.12rem; margin-top:6px; line-height:1.15; }
 .card-meta { font-size:.57rem; margin-top:7px; }
 .card-arrow { font-size:.95rem; top:29px; }
 .resume-latest { padding:12px; margin-bottom:24px; gap:10px; }
 .resume-latest strong { font-size:1.05rem; }
 .resume-latest span span { font-size:.7rem; }
 .resume-latest img { height:49px; width:49px; }
 .saved-view { padding-top:30px; }
 .saved-view h1 { font-size:2.5rem; line-height:1.03; }
 .saved-subtitle { font-size:.8rem; line-height:1.5; margin-bottom:26px; }
 .home-footer { font-size:1.2rem; }
 .home-footer span { font-size:.66rem; }
 .dialog-photo { height:min(24dvh,200px); }
 .dialog-body { padding:20px; }
 .dialog-body h2 { font-size:2rem; }
 .dialog-body p { font-size:.83rem; line-height:1.5; }
 .dialog-body .difficulty-note { font-size:.72rem; }
 .size-button { min-height:47px; font-size:.84rem; }
 .dialog-start { min-height:48px; }
 .game-header { padding-inline:10px; gap:9px; }
 .game-title h1 { font-size:1.15rem; }
 .game-actions { gap:5px; }
 .game-actions .button { font-size:.75rem; padding-inline:7px; }
 .game-actions .tone-tool { flex:none; width:44px; }
 .game-actions svg { width:18px; height:18px; }
 .tray-header { padding:8px 8px 4px; gap:5px; }
 .tray-header h2 { font-size:1rem; }
 #tray-count { font-size:.64rem; }
 .tray-paging { gap:3px!important; }
 .tray-paging .icon-button { width:30px; min-height:36px; }
 .tray-header #piece-detail { width:34px; min-height:38px; }
 .edge-filter { min-height:40px; padding:6px 8px; font-size:.72rem; gap:3px; }
 .tray-list { padding:8px 10px 12px; gap:9px; }
 .board-note { max-width:calc(100% - 24px); font-size:.67rem; }
 [data-layout="side"] .tray-header { padding-inline:7px; }
}
@media(max-height:510px) and (orientation:landscape) {
 .game-header { padding-block:4px; }
 .game-actions .button { min-height:40px; }
 .game-actions .tone-tool { min-height:40px; }
 .tray-header { padding-block:4px; }
 .tray-list { padding-block:4px; }
 .board-note { padding-block:5px; }
}
@media(prefers-reduced-motion:reduce) { button { transition:none; } }
