.weave-map-entry{width:100%;flex-shrink:0;padding:5px 14px;background:#efe1c9cc;z-index:3}
.weave-entry{display:flex;align-items:center;gap:12px;width:min(100%,430px);margin:auto;padding:6px 10px;border:1px solid #b3996c;background:#f8edd6dd;box-shadow:0 2px 0 #ad9065;text-align:left;border-radius:5px}
.weave-entry>span:nth-child(2){display:grid;gap:2px;min-width:0}.weave-entry strong{font-size:20px;font-weight:400}.weave-entry small{font-size:13px;color:#8b6b46}.weave-entry-arrow{margin-left:auto;font-size:25px;color:#987445}
 .weave-art{display:block;position:relative;overflow:hidden;isolation:isolate;aspect-ratio:var(--art-ratio);width:100%;background:#e8d9b7 url('assets/antique-garden-cloth.webp') center/cover;border:1px solid #b89b69;border-radius:2px;box-shadow:inset 0 0 20px #6d482821}
.weave-art>img{position:absolute;inset:0;width:100%;height:100%;object-fit:fill;pointer-events:none;user-select:none}.weave-art>.weave-sketch{filter:grayscale(1) sepia(.25);opacity:.09}.weave-piece.is-empty{visibility:hidden}.weave-piece.is-woven{opacity:1}.weave-piece.fresh{animation:heritage-reveal .85s ease-out both}.weave-seams{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.weave-seams polygon{fill:#f8ebce15;stroke:#ad8d6055;stroke-width:.35;stroke-dasharray:1.2 1;vector-effect:non-scaling-stroke}
.weave-entry .weave-art{flex:0 0 36px;width:36px;height:48px;aspect-ratio:var(--art-ratio)}
.weave-art-open{display:block;padding:0;border:0;background:transparent;width:100%;cursor:pointer;text-align:inherit}.weave-art-open:focus-visible{outline:2px solid #926139;outline-offset:3px}
.weave-reward-card{max-width:260px;margin:8px auto}.weave-reward-caption{display:block;margin:7px 0 0;text-align:center;font-size:12px;line-height:1.4;font-weight:400;letter-spacing:.02em;color:#96754d}
dialog.won.weaving .result-content>h2{margin:4px 0 3px;font-size:30px}dialog.won.weaving .flower-poem{margin:7px 0}html:lang(zh) dialog.won.weaving .flower-poem p{font-size:21px;line-height:1.4}dialog.won.weaving .flower-poem cite{font-size:12px;margin-top:5px}dialog.won.weaving .coin-reward{margin:7px auto;gap:7px}dialog.won.weaving .coin-reward>.cash-coin{width:30px;height:30px}dialog.won.weaving .coin-reward>b{font-size:25px}dialog.won.weaving .primary{margin:7px 0;padding:8px 10px}dialog.won.weaving .restart{margin-top:3px}
.weave-dialog{width:min(94vw,800px);max-width:800px;max-height:92svh;padding:22px 26px;overflow:auto;border:2px solid #ab8757;border-radius:7px;background:#f3e6cc url('assets/antique-garden-cloth.webp') center/cover;box-shadow:0 0 0 4px #e0c697,0 16px 50px #38281666;color:#705031}
.weave-dialog::backdrop{background:#392b1c80;backdrop-filter:blur(3px)}.weave-book-heading{display:flex;align-items:flex-start;justify-content:space-between;text-align:left;gap:15px}.weave-book-heading small{font-size:13px;letter-spacing:1px;color:#96754d}.weave-book-heading h2{font-size:34px;line-height:1.2;margin:7px 0 0;font-weight:400}.weave-close{flex:0 0 36px;width:36px;height:36px;border:1px solid #b79865;border-radius:50%;background:#f7ead2bb;font:27px Georgia,serif!important;line-height:1}
.weave-book-intro{font-size:16px;line-height:1.5;text-align:left;margin:12px 0 16px}.weave-scroll{position:relative;padding:9px;background:linear-gradient(90deg,#866540,#d3b27b 3%,#f5e5bd 7%,#f5e5bd 93%,#d3b27b 97%,#866540);border-block:5px solid #98744b;box-shadow:0 3px 8px #63422433;margin-bottom:16px}.weave-scroll .weave-art{border-radius:0;border:1px solid #ac8a58}
.weave-scroll-seal{position:absolute;right:25px;bottom:24px;padding:6px 9px;border:2px solid #a64a36;color:#a64a36;transform:rotate(-5deg);background:#f4e5c9de;font-size:20px}
.weave-book-progress{display:flex;justify-content:space-between;align-items:center;gap:12px;text-align:left}.weave-book-progress strong{font-size:20px;font-weight:400;color:#755433}.weave-book-progress>span{font-size:14px;color:#99784e}.weave-stages{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:7px;list-style:none;padding:0;margin:15px 0}.weave-stages li{display:flex;align-items:center;justify-content:center;gap:6px;border:1px dashed #bda985;padding:8px 5px;font-size:16px;color:#a08b68;background:#f4e9d333}.weave-stages li>span{font-family:GardenSerif,Georgia,serif!important;font-size:12px}.weave-stages .is-done{border:1px solid #91a080;color:#536646;background:#e6eadba8}.weave-stages .is-next{border:1px solid #b68a4e;color:#79542b;background:#f4dfb0aa}
.weave-book-help{font-size:15px;line-height:1.7;color:#95764d;margin:15px 0}.weave-preview{display:block;margin:8px auto 14px;padding:6px 12px;border:0;border-bottom:1px solid #a88d66;background:none;color:#8b5e3d;font-size:17px}.weave-dialog .primary{display:block;width:100%;font-size:24px;margin:10px 0 0}.hub-weave-open{display:block;margin:5px auto 0;padding:8px 15px;border:0;background:none;color:#816348;font-size:17px;text-decoration:underline;text-underline-offset:5px}
@keyframes weave-in{from{clip-path:inset(0 0 100% 0)}to{clip-path:inset(0)}}@keyframes weave-thread{from{opacity:.7}to{opacity:0}}
@media(max-width:600px){.weave-dialog{padding:18px 16px}.weave-book-heading h2{font-size:30px}.weave-book-heading small{font-size:12px}.weave-book-intro{font-size:14px;margin:10px 0 13px}.weave-book-progress{display:grid;gap:4px}.weave-book-progress strong{font-size:20px}.weave-stages{grid-template-columns:repeat(3,minmax(0,1fr));margin:12px 0}.weave-stages li{font-size:16px;padding:7px 4px}.weave-book-help{font-size:13px;margin:10px 0}.weave-entry{padding:5px 9px;gap:10px}.weave-entry .weave-art{flex-basis:60px;width:60px;height:40px}.weave-entry strong{font-size:18px}.weave-entry small{font-size:12px}.weave-map-entry{padding:5px 12px}.weave-scroll{padding:6px}.weave-scroll-seal{font-size:16px;right:16px;bottom:17px}}
@media(max-height:700px){.weave-reward-card{max-width:210px;margin:5px auto}.weave-reward-caption{margin-top:4px;font-size:11px}html:lang(zh) dialog.won.weaving .flower-poem p{font-size:19px}.weave-entry .weave-art{flex-basis:48px;width:48px;height:32px}.weave-entry strong{font-size:16px}.weave-entry small{font-size:11px}.weave-entry{padding:4px 8px}.weave-map-entry{padding-block:3px}}
html[lang=en] .weave-book-heading h2{font-size:clamp(23px,4vw,34px)}html[lang=en] .weave-entry strong{font-size:17px}html[lang=en] .weave-stages li{font-size:13px}
@media(prefers-reduced-motion:reduce){.weave-piece.fresh,.weave-piece.fresh:after{animation:none}}

/* Museum textiles keep their complete photograph and original proportions. */
.weave-entry .weave-art{width:auto;flex:0 0 auto;aspect-ratio:var(--art-ratio);height:48px}
.weave-art-open{display:flex;justify-content:center;align-items:center;height:158px}.weave-art-open .weave-art{height:158px;width:auto;max-width:100%;aspect-ratio:var(--art-ratio)}
.weave-book-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.9fr);gap:24px;align-items:start}.weave-gallery{min-width:0}.weave-scroll{display:flex;justify-content:center;align-items:center;margin:0;min-height:230px;padding:10px;background:#ecddbc88;border:1px solid #b99a67;border-block:5px solid #98744b;touch-action:pan-y pinch-zoom;user-select:none;overflow:hidden}.weave-scroll .weave-art{width:min(100%,calc(46svh * var(--art-ratio)),calc(490px * var(--art-ratio)));height:auto;flex-shrink:0;aspect-ratio:var(--art-ratio)}
.weave-scroll.is-detail{display:block;height:min(60svh,560px);overflow:auto;touch-action:auto;cursor:grab}.weave-scroll.is-detail .weave-art{width:720px;max-width:none;height:auto}.weave-scroll.is-detail .weave-scroll-seal{display:none}
.weave-catalog{display:flex;gap:9px;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;padding:2px 2px 9px;margin:0 0 16px;scrollbar-width:thin}.weave-catalog-item{width:auto;height:auto;min-height:90px;box-shadow:none;flex:0 0 105px;min-width:0;display:grid;grid-template-rows:42px auto auto;justify-items:center;gap:5px;border:1px solid #bfa782;background:#f9edcf88;padding:8px 6px;border-radius:4px;scroll-snap-align:center;color:#8a7151}.weave-catalog-item img{height:42px;width:65px;object-fit:contain}.weave-catalog-item span{font-size:15px;line-height:1.2}.weave-catalog-item small{font-size:11px;font-family:GardenSerif,Georgia,serif!important}.weave-catalog-item.is-selected{border:2px solid #966238;background:#ebd5a6b3;color:#72462b;padding:7px 5px;box-shadow:0 2px 0 #ad9065}
.weave-pagination{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:7px}.weave-pagination button{border:1px solid #b99a67;background:#f8edd0;width:34px;height:30px;font:24px Georgia,serif!important;border-radius:3px}.weave-pagination button:disabled{opacity:.3}.weave-pagination span{font-size:12px;color:#96754d}.weave-detail-toggle{display:block;margin:5px auto;padding:5px 12px;background:transparent;border:0;border-bottom:1px solid #b89b71;font-size:15px;color:#805732}.weave-book-progress{display:grid;gap:5px}.weave-book-progress strong{font-size:23px}.weave-stages{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin:12px 0}.weave-stages li{justify-content:flex-start;font-size:15px;padding:7px}.weave-description{font-size:16px;line-height:1.65;text-align:left;margin:12px 0;color:#785534}.weave-provenance{display:grid;gap:5px;border-block:1px solid #bca57b77;padding:11px 0;text-align:left;font-size:13px;line-height:1.4;color:#91734c}.weave-provenance a{color:#87512d;text-underline-offset:3px}.weave-provenance small{font-size:11px}.weave-book-help{font-size:13px;text-align:left}.weave-scroll-seal{font-size:15px;right:14px;bottom:14px;z-index:2;pointer-events:none}.weave-preview{font-size:16px;margin:9px auto}.weave-book-intro{text-align:left}.weave-collected-mark[hidden],.weave-scroll-seal[hidden]{display:none!important}
@keyframes heritage-reveal{from{opacity:0;filter:brightness(1.3)}to{opacity:1;filter:brightness(1)}}
@media(max-width:600px){.weave-book-layout{grid-template-columns:minmax(0,1fr);gap:14px}.weave-catalog-item{flex-basis:88px;grid-template-rows:34px auto auto}.weave-catalog-item img{height:34px}.weave-catalog-item span{font-size:14px}.weave-catalog{margin-bottom:12px;gap:7px}.weave-book-heading h2{font-size:29px}.weave-stages{grid-template-columns:repeat(3,minmax(0,1fr))}.weave-stages li{font-size:14px;gap:4px;padding:6px 4px}.weave-scroll{min-height:200px;padding:7px}.weave-scroll .weave-art{width:min(100%,calc(46svh * var(--art-ratio)));height:auto}.weave-book-progress{display:flex;flex-wrap:wrap;justify-content:space-between}.weave-description{font-size:15px}.weave-book-help{font-size:12px}.weave-entry .weave-art{width:auto;height:40px;flex-basis:auto}}
@media(max-height:700px){.weave-art-open,.weave-art-open .weave-art{height:130px}.weave-entry .weave-art{width:auto;height:32px;flex-basis:auto}}
@media(prefers-reduced-motion:reduce){.weave-piece.fresh{animation:none}}

.weave-finished.fresh-completion{animation:heritage-seamless .85s ease-out both}@keyframes heritage-seamless{0%,70%{opacity:0}100%{opacity:1}}
@media(prefers-reduced-motion:reduce){.weave-finished.fresh-completion{animation:none}}

/* Fragments are earned separately from the player's placements. */
.weave-fragment{display:block;position:relative;aspect-ratio:var(--piece-ratio);flex-shrink:0;pointer-events:none;user-select:none;filter:drop-shadow(0 3px 2px #543a2540)}
.weave-fragment-shape{position:absolute;inset:0;display:block;overflow:hidden;background:#d7bf8d}.weave-fragment-shape img{position:absolute;max-width:none;max-height:none;object-fit:fill;pointer-events:none;user-select:none}
.weave-fragment-open{background:radial-gradient(ellipse,#c7a36b28,transparent 70%);border:1px dashed #b2987044;border-radius:7px}.weave-fragment-open .weave-fragment{width:min(100%,calc(145px * var(--piece-ratio)));height:auto}.weave-bag-label{font-size:30px;color:#8d6238}.weave-reward-note{font-size:12px;line-height:1.4;color:#8b6b46;margin:7px 0 0}
.weave-assemble-button{display:block;width:100%;margin-top:9px;padding:9px 12px;border:1px solid #ac754a;border-radius:4px;background:#ead3a5;color:#714728;font-size:18px;box-shadow:0 2px #b6976c}
.weave-dialog.is-assembling{background-color:#f2e4c7}.is-assembling .weave-book-intro{margin:9px 0 15px}.is-assembling .weave-provenance{display:none}.is-assembling .weave-book-progress strong{font-size:20px}.is-assembly-surface{min-height:0;overflow:visible;touch-action:pan-y}.is-assembly-surface .weave-art{width:min(100%,calc(52svh * var(--art-ratio)),calc(500px * var(--art-ratio)));height:auto}
.weave-target{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;cursor:pointer}.weave-target:focus-visible{outline:0;background:#bc8e3544}.is-puzzle .weave-seams{z-index:2}.is-puzzle .weave-seams polygon{stroke-width:1;stroke:#a1804eaa;fill:#ecd9ae22}.weave-seams polygon.is-guided{stroke:#a26332;stroke-width:2;fill:#e2b66628;animation:fragment-guide 1.4s ease-in-out infinite}.weave-seams polygon.can-drop{stroke:#5f8143;stroke-width:3;fill:#9ab47744;animation:none}
.weave-fragment-pouch{text-align:left;margin:13px 0 0;padding:12px 0;border-top:1px solid #b99d6f77}.weave-pouch-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}.weave-pouch-heading strong{font-size:21px;font-weight:400}.weave-pouch-heading small{font-size:13px;color:#99794c}.weave-puzzle-instruction{font-size:15px;line-height:1.5;margin:7px 0 10px;color:#7d5832}.weave-puzzle-instruction small{font-size:12px;color:#a08359}.weave-fragment-tray{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;min-height:20px}.weave-fragment-card{min-width:0;min-height:106px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;padding:7px 4px;background:#e9d6af77;border:1px solid #b99a6e;border-radius:5px;touch-action:none;user-select:none;cursor:grab;color:#795832}.weave-fragment-card .weave-fragment{width:min(100%,calc(65px * var(--piece-ratio)));height:auto}.weave-fragment-card>span:last-child{font-size:14px;line-height:1.3}.weave-fragment-card.is-selected{border:2px solid #aa7039;padding:6px 3px;background:#f5e4b8cc;box-shadow:0 0 0 2px #af82451f}.weave-fragment-card.is-dragging{opacity:.3}.weave-placement-message{min-height:2.8em;line-height:1.5;color:#8c6238;font-size:14px;margin:9px 0 0}.weave-drag-ghost{position:fixed;z-index:30;pointer-events:none;opacity:.94;filter:drop-shadow(0 5px 8px #39281666)}.weave-drag-ghost .weave-fragment{width:100%;height:100%;filter:none}.weave-drag-ghost.can-drop{filter:drop-shadow(0 0 5px #638447aa)}
@keyframes fragment-guide{0%,100%{opacity:.55}50%{opacity:1}}
@media(max-width:600px){.is-assembling .weave-book-layout{gap:10px}.is-assembly-surface .weave-art{width:min(100%,calc(36svh * var(--art-ratio)));height:auto}.weave-fragment-tray{grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}.weave-fragment-card{min-height:92px;padding:5px 3px;gap:5px}.weave-fragment-card.is-selected{padding:4px 2px}.weave-fragment-card .weave-fragment{width:min(100%,calc(56px * var(--piece-ratio)))}.weave-fragment-card>span:last-child{font-size:12px}.weave-puzzle-instruction{font-size:14px}.weave-fragment-pouch{margin-top:8px;padding:8px 0 0}.weave-placement-message{font-size:13px;margin-top:7px}.weave-puzzle-instruction small{font-size:11px}.is-assembling .weave-book-progress strong{font-size:18px}.weave-pouch-heading strong{font-size:19px}.weave-pouch-heading small{font-size:12px}}
@media(max-height:700px){.weave-fragment-open .weave-fragment{width:min(100%,calc(118px * var(--piece-ratio)))}.weave-reward-note{font-size:11px;margin-top:5px}.is-assembly-surface .weave-art{width:min(100%,calc(32svh * var(--art-ratio)))}}
@media(prefers-reduced-motion:reduce){.weave-seams polygon.is-guided{animation:none}}

.weave-art{background:#e7d7af;background-image:repeating-linear-gradient(0deg,transparent 0 3px,#ad976019 3px 4px),repeating-linear-gradient(90deg,transparent 0 3px,#fff4da33 3px 4px)}.is-puzzle>.weave-sketch{opacity:.2;filter:grayscale(1) sepia(.45)}.weave-seams polygon.is-guided{stroke:#8b5926;stroke-width:2.5;fill:#d1b4783d}.weave-drop-cue{position:absolute;z-index:4;transform:translate(-50%,-50%);padding:3px 6px;border:1px solid #a97a43;border-radius:3px;background:#fff0cfeb;color:#8b572b;font-size:12px;white-space:nowrap;pointer-events:none}

.weave-dialog .primary:disabled{opacity:.46;cursor:default}.weave-save-later{display:block;margin:9px auto 0;padding:3px 8px;border:0;border-bottom:1px solid #aa8d69;background:transparent;color:#97764d;font-size:14px}
@media(max-width:600px){.weave-dialog.is-assembling .weave-book-intro{display:none}.weave-dialog.is-assembling .weave-book-layout{margin-top:14px}}
.weave-story{text-align:left;border-top:1px solid #b99d6f77;margin-top:12px;padding:12px 0 3px;line-height:1.65;color:#785737}.weave-story h3{font-weight:400;font-size:20px;margin:0 0 6px}.weave-story p{font-size:15px;margin:6px 0}.weave-story .weave-origin{font-size:13px;color:#94744e}.weave-piece-story{border-left:2px solid #b69a65;padding:5px 10px;margin:10px 0;background:#f6e6c444}.weave-piece-story strong{font-size:15px;font-weight:400;color:#80552f}.weave-piece-story p{font-size:14px;margin:5px 0}.weave-story>a{font-size:13px;color:#8b603b;text-underline-offset:3px}.is-assembling .weave-story{margin-top:9px}.weave-origin-line{font-size:12px;color:#94744e;margin:6px 0 10px}
@media(max-width:600px){.weave-story p{font-size:14px}.weave-story h3{font-size:19px}.weave-story .weave-origin{font-size:12px}.weave-piece-story p{font-size:13px}}

.weave-story{background:#f7ebd3f2;border:1px solid #baa27b88;border-radius:4px;padding:12px 14px;box-shadow:inset 0 0 18px #b39a6912}.weave-origin-line{line-height:1.4}.is-assembling .weave-story{padding:11px 13px}

.hub-catalog-link{display:block;width:fit-content;margin:12px auto 22px;font-size:18px;color:#7d5936;text-underline-offset:5px}.weave-all-link{display:inline-block;margin:0 0 12px;color:#805535;font-size:16px;text-underline-offset:4px}
