:root{--ink:#142421;--paper:#e5d8b7;--paper2:#cdbb91;--red:#873b32;--gold:#9a733c;--moss:#344a3d;--line:rgba(43,48,36,.24)}
*{box-sizing:border-box} body{margin:0;color:var(--ink);font-family:Montserrat,sans-serif;background:#172b28 radial-gradient(circle at 50% 0,#29423b,transparent 55%);min-height:100vh}
body:before{content:"";position:fixed;inset:0;pointer-events:none;opacity:.15;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E")}
.shell{width:min(1180px,100%);margin:auto;padding:42px 22px 80px}.hero{text-align:center;color:#f0e8d1;margin-bottom:32px}.eyebrow{text-transform:uppercase;letter-spacing:.18em;font-size:11px;font-weight:600;color:#bfa471}.hero h1{font:700 clamp(44px,8vw,82px)/.9 'Cormorant Garamond',serif;margin:10px 0}.hero>p:not(.eyebrow){max-width:650px;margin:18px auto;color:#bfd0c7;line-height:1.65}.counter{display:inline-flex;gap:12px;align-items:baseline;border-top:1px solid #597069;padding:14px 22px 0}.counter strong{font:600 27px 'Cormorant Garamond',serif;color:#d5b980}.counter span{font-size:12px;text-transform:uppercase;letter-spacing:.1em}
.workbench{display:grid;grid-template-columns:minmax(310px,.8fr) minmax(430px,1.2fr);gap:24px;background:var(--paper);padding:22px;border-radius:28px;box-shadow:0 35px 80px #08131099,0 0 0 1px #d5c7a266 inset;position:relative;overflow:hidden}.workbench:after,.result:after{content:"";position:absolute;inset:0;pointer-events:none;opacity:.12;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='70' height='70'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.55' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E")}
.manuscript{position:relative;background:#ddcda8;border:1px solid #a98e5f;border-radius:18px;padding:13px;min-height:630px;display:flex;align-items:center}.manuscript:before{content:"";position:absolute;inset:8px;border:1px solid #9d7d4d66;border-radius:13px;pointer-events:none}.assembled{width:100%;display:grid;grid-template-columns:repeat(2,1fr);gap:9px;padding:25px;position:relative;z-index:1}.part-band{height:auto;aspect-ratio:1.15;background-color:#dfd0ad;background-repeat:no-repeat;background-size:330% auto;filter:saturate(.96) contrast(1.06);border:1px solid #92794b38;border-radius:10px;transform:translateZ(0)}.part-band:nth-child(2),.part-band:nth-child(3){height:auto}.part-band:nth-child(5){grid-column:1/-1;width:calc(50% - 5px);justify-self:center}.seal{position:absolute;right:22px;bottom:20px;border:2px solid var(--red);color:var(--red);width:44px;height:44px;border-radius:50%;display:grid;place-items:center;font:700 15px 'Cormorant Garamond';transform:rotate(-9deg)}.workbench.is-revealing .manuscript{animation:awaken .72s ease-in-out}.workbench.is-revealing .part-band{animation:inkIn .72s ease both}.workbench.is-revealing .part-band:nth-child(2){animation-delay:.06s}.workbench.is-revealing .part-band:nth-child(3){animation-delay:.12s}.workbench.is-revealing .part-band:nth-child(4){animation-delay:.18s}.workbench.is-revealing .part-band:nth-child(5){animation-delay:.24s}@keyframes awaken{45%{box-shadow:0 0 0 8px #873b321f,0 0 45px #873b3240}100%{box-shadow:none}}@keyframes inkIn{0%{filter:sepia(1) brightness(1.45);opacity:.2;transform:translateY(7px)}100%{filter:saturate(.92) contrast(1.04);opacity:1;transform:none}}
.controls{padding:8px 6px 8px 12px;position:relative;z-index:1}.tabs{display:flex;gap:7px;margin-bottom:27px}.tab{height:7px;flex:1;border:0;border-radius:10px;background:#b7a57d;cursor:pointer}.tab.active{background:var(--red)}.picker-head{display:flex;justify-content:space-between;align-items:end;border-bottom:1px solid var(--line);padding-bottom:14px}.step{font-size:11px;text-transform:uppercase;letter-spacing:.14em;color:#765f3e;margin:0 0 4px}.picker-head h2{font:600 35px 'Cormorant Garamond';margin:0}.icon-btn{border:1px solid #927c56;background:transparent;border-radius:50%;width:40px;height:40px;font-size:21px;cursor:pointer}.options{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin:18px 0}.option{border:1px solid #aa956e;background:#eadfbe;border-radius:12px;padding:8px;cursor:pointer;text-align:left;color:var(--ink);transition:.2s}.option:hover{transform:translateY(-2px);border-color:#755c36}.option.active{border:2px solid var(--red);padding:7px;background:#f1e6c8}.thumb{aspect-ratio:1.15;background-color:#dfd0ad;background-repeat:no-repeat;background-size:330% auto;border-radius:8px;margin-bottom:7px;transform:translateZ(0)}.option span{font:600 15px 'Cormorant Garamond';display:block;line-height:1.05}.actions,.result-actions{display:flex;gap:10px;margin-top:22px}button{font:600 12px Montserrat;text-transform:uppercase;letter-spacing:.06em}.primary,.secondary{border-radius:50px;padding:14px 18px;cursor:pointer;flex:1}.primary{background:var(--red);color:#fff7e8;border:1px solid var(--red)}.secondary{background:transparent;border:1px solid #856d47;color:#4b3b28}
.result{position:relative;margin-top:24px;background:var(--paper);padding:38px clamp(24px,7vw,80px);border-radius:24px;box-shadow:0 25px 60px #07120f77}.result>*{position:relative;z-index:1}.result h2{font:700 clamp(35px,6vw,60px)/1 'Cormorant Garamond';margin:8px 0 5px;max-width:800px}.rarity{color:var(--red);font-weight:600;text-transform:uppercase;letter-spacing:.13em;font-size:11px}.lore{font:500 22px/1.55 'Cormorant Garamond';max-width:850px}.traits{display:flex;gap:8px;flex-wrap:wrap}.trait{border:1px solid #9e8864;border-radius:20px;padding:7px 11px;font-size:11px}
.record-meta,.archive-head{display:flex;justify-content:space-between;align-items:center;gap:16px}.record-meta p{margin:0}.record-meta span{font:600 18px 'Cormorant Garamond';color:#765f3e}.formula{margin-top:24px;padding-top:18px;border-top:1px solid var(--line);display:grid;grid-template-columns:repeat(5,1fr);gap:8px}.formula-item{font-size:10px;text-transform:uppercase;letter-spacing:.06em;color:#75664d}.formula-item strong{display:block;margin-top:5px;font:600 15px/1.1 'Cormorant Garamond';text-transform:none;letter-spacing:0;color:var(--ink)}
.archive{margin-top:24px;background:#122723;color:#eee4cc;border:1px solid #52675f;border-radius:24px;padding:30px;box-shadow:0 25px 60px #07120f77}.archive .eyebrow{margin:0}.archive h2{font:600 34px 'Cormorant Garamond';margin:6px 0}.archive-head>span{font-size:12px;color:#bba875}.archive-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:11px;margin-top:18px}.archive-card{border:1px solid #52675f;background:#1b332e;border-radius:14px;padding:16px}.archive-card small{color:#bba875;text-transform:uppercase;letter-spacing:.08em}.archive-card h3{font:600 22px/1 'Cormorant Garamond';margin:10px 0 7px}.archive-card p{font-size:11px;color:#aebeb7;margin:0}.archive-actions{display:flex;flex-wrap:wrap;gap:9px 13px;margin-top:13px}.archive-card button{border:0;background:transparent;color:#c5ae78;padding:0;cursor:pointer;font-size:9px}.archive-card button[data-remove]{color:#9daea7}
.archive-meta{display:flex;align-items:center;gap:14px}.archive-meta span{font-size:12px;color:#bba875}.archive-meta button{border:1px solid #6d8078;border-radius:18px;background:transparent;color:#d3c49e;padding:7px 11px;cursor:pointer;font-size:9px}.archive-grid[hidden]{display:none}.archive-empty{grid-column:1/-1;margin:0;border:1px dashed #52675f;border-radius:14px;padding:22px;color:#aebeb7;text-align:center}
@media(max-width:800px){.shell{padding:28px 12px 55px}.workbench{grid-template-columns:1fr;padding:13px}.manuscript{min-height:560px}.controls{padding:10px 4px}.options{grid-template-columns:repeat(2,1fr)}.hero h1{font-size:52px}.actions,.result-actions{flex-direction:column}.result{padding:28px 20px}.lore{font-size:20px}.formula{grid-template-columns:repeat(2,1fr)}.archive{padding:22px 14px}.archive-grid{grid-template-columns:1fr}}

/* Individual, centered transparent assets replace the former sprite sheets. */
.part-band,.thumb{background-size:contain;background-position:center}

/* Live creature assembly */
.assembled{display:block;height:590px;padding:18px}.creature-stage{position:relative;width:100%;height:100%;overflow:hidden}.creature-layer{position:absolute;display:block;width:auto;height:auto;object-fit:contain;filter:saturate(.96) contrast(1.04) drop-shadow(0 5px 4px #4b34232c);transition:opacity .24s ease,transform .34s cubic-bezier(.2,.8,.2,1);pointer-events:none}.layer-attachment{z-index:1;width:110%;left:-5%;top:6%;opacity:.82}.layer-legs{z-index:2;width:104%;left:-2%;top:45%}.layer-body{z-index:3;width:90%;left:5%;top:25%}.layer-object{z-index:4;width:49%;left:42%;top:38%}.layer-head{z-index:5;width:72%;left:14%;top:2%}.layer-object.variant-1{width:45%;left:47%;top:36%}.layer-object.variant-2{width:53%;left:40%;top:37%}.layer-object.variant-3,.layer-object.variant-4{width:45%;left:47%;top:37%}.layer-object.variant-5{width:49%;left:43%;top:38%}.layer-attachment.variant-1{width:120%;left:-10%;top:13%}.layer-attachment.variant-2{width:116%;left:-8%;top:10%}.layer-attachment.variant-3{width:88%;left:6%;top:12%}.layer-attachment.variant-4{width:105%;left:-2%;top:22%}.layer-attachment.variant-5{width:112%;left:-6%;top:9%}.creature-shadow{position:absolute;z-index:0;width:72%;height:8%;left:14%;bottom:2%;border-radius:50%;background:#3b281d30;filter:blur(12px)}.workbench.is-revealing .creature-layer{animation:assemblePart .72s ease both}.workbench.is-revealing .layer-legs{animation-delay:.05s}.workbench.is-revealing .layer-body{animation-delay:.1s}.workbench.is-revealing .layer-head{animation-delay:.15s}.workbench.is-revealing .layer-object{animation-delay:.2s}@keyframes assemblePart{0%{opacity:0;transform:translateY(18px) scale(.94)}100%{transform:none}}
@media(max-width:800px){.assembled{height:520px}}

/* Engraving composition: anatomy in the centre, sign as aura, object as attribute. */
.layer-attachment{z-index:1;width:104%;left:-2%;top:8%;opacity:.46;filter:saturate(.75) sepia(.12) contrast(.94)}
.layer-legs{z-index:2;width:100%;left:0;top:44%}
.layer-body{z-index:3;width:85%;left:7.5%;top:25%}
.layer-head{z-index:4;width:65%;left:17.5%;top:2%}
.attribute-cartouche{position:absolute;z-index:6;right:1.5%;bottom:4%;width:41%;height:25%;padding:20px 8px 6px;border:1px solid #8f7045;border-radius:14px;background:#eadfbedb;box-shadow:0 7px 18px #402d1b32,inset 0 0 0 4px #d4c398;backdrop-filter:blur(2px)}.attribute-cartouche span{position:absolute;left:11px;top:7px;color:#745936;font:600 9px Montserrat;text-transform:uppercase;letter-spacing:.14em}.attribute-cartouche img{width:100%;height:100%;display:block;object-fit:contain;filter:saturate(.96) contrast(1.04)}

/* Specimen plate: a clean anatomical figure with two heraldic seals below. */
.creature-stage{display:grid;grid-template-rows:minmax(0,1fr) 112px;gap:10px}.anatomy-field{position:relative;min-height:0;overflow:hidden}.anatomy-field .layer-legs{width:100%;left:0;top:43%}.anatomy-field .layer-body{width:85%;left:7.5%;top:23%}.anatomy-field .layer-head{width:65%;left:17.5%;top:0}.anatomy-field .creature-shadow{bottom:0}.symbol-strip{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:0 2px}.symbol-seal{position:relative;min-width:0;border:1px solid #8f7045;border-radius:13px;background:#eadfbedb;box-shadow:inset 0 0 0 3px #d4c398;padding:19px 7px 5px;overflow:hidden}.symbol-seal span{position:absolute;left:10px;top:6px;color:#745936;font:600 8px Montserrat;text-transform:uppercase;letter-spacing:.13em}.symbol-seal img{display:block;width:100%;height:100%;object-fit:contain;filter:saturate(.94) contrast(1.04)}
@media(max-width:800px){.creature-stage{grid-template-rows:minmax(0,1fr) 98px}}

/* Fixed vertical anatomy zones keep every silhouette inside the plate. */
.anatomy-field .creature-layer{left:0;width:100%;object-fit:contain}
.anatomy-field .layer-head{top:0;height:43%}
.anatomy-field .layer-body{top:22%;height:55%}
.anatomy-field .layer-legs{top:42%;height:58%}

/* Role-based Bosch scene using the adapted final-render assets. */
.creature-stage{display:block}.anatomy-field{width:100%;height:100%}.scene-sign,.scene-object{position:absolute;display:block;object-fit:contain;pointer-events:none}.scene-sign{z-index:1;opacity:.78}.sign-0{inset:0;width:100%;height:100%;opacity:.58}.sign-1{left:-6%;top:15%;width:112%;height:56%}.sign-2{left:28%;top:2%;width:74%;height:55%}.sign-3{left:-3%;top:2%;width:106%;height:96%;opacity:.62}.sign-4{left:42%;top:38%;width:62%;height:42%}.sign-5{left:38%;top:0;width:66%;height:64%;opacity:.7}.scene-object{z-index:6;filter:saturate(.96) contrast(1.04) drop-shadow(0 6px 5px #4b342238)}.object-0{left:1%;top:70%;width:58%;height:28%}.object-1{left:57%;top:38%;width:43%;height:34%}.object-2{left:61%;top:35%;width:37%;height:38%}.object-3{left:59%;top:40%;width:41%;height:35%}.object-4{left:59%;top:31%;width:41%;height:40%}.object-5{left:1%;top:69%;width:52%;height:29%}

/* Pixel-accurate socket alignment is applied by positionAnatomy(). */
.anatomy-field .creature-layer{object-fit:contain;max-width:none}.workbench.is-revealing .creature-layer{animation:anchoredFade .72s ease both}@keyframes anchoredFade{0%{opacity:0;filter:sepia(1) brightness(1.35)}100%{opacity:1}}

/* The live plate always fits the available screen instead of being cropped. */
.manuscript{justify-content:center;overflow:visible}.assembled{width:min(100%,calc(78vh * 7 / 9));height:auto;aspect-ratio:7/9;padding:12px;margin:auto}.creature-stage,.anatomy-field{width:100%;height:100%}.sign-1{left:4%;top:17%;width:92%;height:48%;opacity:.6}.sign-2{left:36%;top:7%;width:58%;height:43%;opacity:.62}.sign-3{left:4%;top:7%;width:92%;height:83%;opacity:.38}.sign-4{left:49%;top:42%;width:48%;height:34%;opacity:.65}.sign-5{left:45%;top:4%;width:53%;height:54%;opacity:.58}.object-0{left:4%;top:72%;width:48%;height:23%}.object-1{left:65%;top:42%;width:31%;height:27%}.object-2{left:67%;top:38%;width:29%;height:31%}.object-3{left:65%;top:43%;width:31%;height:28%}.object-4{left:65%;top:35%;width:31%;height:32%}.object-5{left:4%;top:72%;width:44%;height:23%}
@media(max-width:800px){.manuscript{min-height:0}.assembled{width:min(100%,calc(72vh * 7 / 9))}}

/* Standardised anatomy modules share one scale, so every brass socket matches. */
.assembled{width:min(100%,430px);max-width:100%;aspect-ratio:7/9;height:auto;min-height:0}
.anatomy-field{overflow:hidden}
.anatomy-field .creature-layer{max-width:none;max-height:none}
@media(max-width:800px){.assembled{width:min(100%,430px)}.manuscript{min-height:0;padding:8px}.workbench{align-items:start}}
.seal.brand-seal{right:18px;bottom:16px;width:52px;height:52px;border:0;border-radius:50%;object-fit:contain;transform:none;filter:drop-shadow(0 3px 4px #3727194d)}
.anatomy-field .creature-layer{transition:opacity .18s ease,filter .18s ease}
.scene-sign,.scene-object{transition:opacity .18s ease}
.object-tether{position:absolute;z-index:5;height:2px;border-top:2px solid #6b4b27;box-shadow:0 1px 1px #ead6a877;transform-origin:0 50%;pointer-events:none}

/* Both signs are now hands attached to the body's neutral side anchors. */
.scene-left-arm{position:absolute;display:block;z-index:6;object-fit:contain;pointer-events:none;filter:saturate(.96) contrast(1.04) drop-shadow(0 6px 5px #4b342238);transition:opacity .18s ease}


/* Release: accessible controls, small screens and local collection previews. */
.shell,.workbench,.controls,.manuscript,.result,.archive,.archive-card{min-width:0}
.hero h1{font-size:clamp(2.35rem,7vw,5.125rem);overflow-wrap:anywhere}
.workbench{grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr)}
.tabs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px;margin-bottom:20px}
.tab{height:auto;min-height:60px;border-radius:9px;padding:7px 2px;font-size:12px;line-height:1.3;text-transform:none;letter-spacing:0;color:#463720;background:#d7c69f;overflow-wrap:anywhere}
.tab span{display:block;font-size:16px;margin-bottom:3px}.tab.active{color:#fff7e8}
.thumb{display:block;width:100%;height:auto;aspect-ratio:1.15;object-fit:contain;background:#dfd0ad}
.option{min-width:0}.option span{font-size:17px;line-height:1.12}
.actions{flex-wrap:wrap}.result-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.result-actions>button{min-width:0}
button:disabled{opacity:.55;cursor:default}button:focus-visible,input:focus-visible{outline:3px solid #bd7d28;outline-offset:4px}
.eyebrow,.step,.rarity,.trait,.formula-item{font-size:12px}
.archive-head,.record-meta,.archive-meta{flex-wrap:wrap}.archive-meta{gap:10px}
.archive-help{font-size:14px;line-height:1.6;color:#c4d0c9;max-width:700px}
.archive-export{color:#eee4cc;border-color:#ac986b;min-height:44px;margin:8px 0}
.archive-preview{height:220px;background:#ddcda8;border-radius:8px;display:flex;justify-content:center;margin-bottom:15px}
.archive-preview>.creature-stage{width:171px;height:220px}
.archive-actions button{font-size:12px;min-height:44px;text-align:left}
.archive-card p{font-size:13px;line-height:1.5}.archive-card small{font-size:12px}
.archive-meta button{font-size:12px;min-height:44px}
#sharePanel{margin-top:20px}#sharePanel label{display:block;font-size:14px;margin-bottom:8px}
#shareLink{width:100%;min-width:0;padding:12px;border:1px solid #856d47;border-radius:8px;background:#f1e6c8;color:#142421;font:16px Montserrat}
.feedback{position:sticky;bottom:12px;z-index:10;background:#122723;color:#eee4cc;border-radius:12px;box-shadow:0 6px 25px #07120f55;padding:0 16px}
.feedback:has(#status:empty){display:none}#status{padding:14px 0;font-size:14px;line-height:1.5;margin:0}#retryImages{color:#eee4cc;margin-bottom:14px}
@media(max-width:850px){.workbench{grid-template-columns:minmax(0,1fr)}.manuscript{min-height:0}.controls{padding:10px 4px}.options{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.result-actions{grid-template-columns:minmax(0,1fr)}}
@media(max-width:400px){.shell{padding-left:10px;padding-right:10px}.workbench{padding:10px}.tabs{grid-template-columns:repeat(3,minmax(0,1fr))}.tab{font-size:14px}.archive-head{align-items:flex-start}.archive-meta{width:100%;justify-content:space-between}.record-meta{gap:8px}.primary,.secondary{padding:13px 12px}.result-actions>button{flex-basis:auto}.formula{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* Long Russian names must fit each picker card at intermediate widths. */
.option span{max-width:100%;overflow-wrap:anywhere;hyphens:auto;letter-spacing:0;text-transform:none;font-size:18px;line-height:1.2}

/* Шапка сайта: логотип ведёт назад — к мероприятию, откуда пришли. */
.site-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;height:60px;padding:0 clamp(16px,4vw,42px);border-bottom:1px solid rgba(191,164,113,.22);background:rgba(9,20,18,.72);backdrop-filter:blur(10px);position:sticky;top:0;z-index:30}
.site-bar .brand{display:inline-flex;align-items:center;gap:.4em;color:#f0e8d1;text-decoration:none;font:600 22px 'Cormorant Garamond',serif;letter-spacing:.15em;transition:color .25s}
.site-bar .brand .dot{color:#d5b980}
.site-bar .brand:hover{color:#d5b980}
.site-bar .back-arrow{font-size:16px;color:#8fa79b;transition:transform .25s}
.site-bar .brand:hover .back-arrow{transform:translateX(-3px);color:#d5b980}
.result-actions .to-events{display:inline-flex;align-items:center;justify-content:center;text-decoration:none}
@media(max-width:420px){.site-bar{height:52px}.site-bar .brand{font-size:19px}}
