:root{
  color-scheme:dark;
  --bg:#131b1c;--surface:#1b2727;--line:#35413e;--text:#edece4;--muted:#aab9b5;--gold:#eac78b;--focus:#ffe1a5;
  font-family:system-ui,-apple-system,"Segoe UI",sans-serif;font-size:16px;
}
*{box-sizing:border-box}
[hidden]{display:none!important}
html{scroll-behavior:smooth}
body{margin:0;background:var(--bg);color:var(--text)}
a{color:inherit;text-underline-offset:3px}
input,select,button{font:inherit}
button,select{cursor:pointer}
button{color:inherit}
button:disabled{cursor:default}
button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible{outline:2px solid var(--focus);outline-offset:3px}
.sr,.skip:not(:focus){position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.skip:focus{position:fixed;z-index:10;top:8px;left:8px;background:var(--bg);padding:8px}
.frame{width:min(1232px,calc(100% - clamp(32px,9vw,144px)));margin-inline:auto}
.mast{background:#101918;border-bottom:1px solid #34413a}
.mast-inner{height:65px;display:flex;align-items:center;gap:16px}
.brand{display:inline-flex;gap:11px;align-items:center;text-decoration:none;font-size:1.16rem;letter-spacing:-.045em;font-weight:550}
.brand img{image-rendering:pixelated}
.brand b{color:#dfbe80;font-weight:650}
.mast-rule{width:1px;height:20px;background:var(--line)}
.mast-label,.mast-link{font-size:.84rem;color:var(--muted)}
.mast-link{margin-left:auto;text-decoration:none}
.mast-link span{margin-left:4px;color:var(--gold)}
.hero{position:relative;isolation:isolate;background:#142420;overflow:hidden;border-bottom:1px solid #54604a}
.hero-art{position:absolute;inset:0 0 0 25%;z-index:-2;background:url('/guide-media/castles/13-6/cover.webp') center 48% / cover no-repeat;image-rendering:pixelated}
.hero::before{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(90deg,#142420 5%,rgba(20,36,32,.97) 24%,rgba(20,36,32,.82) 42%,rgba(20,36,32,.32) 66%,rgba(16,31,28,.05) 88%),linear-gradient(0deg,rgba(11,24,20,.62),transparent 35%)}
.hero-inner{padding-block:clamp(34px,4.7vw,74px) clamp(39px,5vw,80px)}
h1,h2,h3,p{margin:0}
h1,h2{font-family:Georgia,"Times New Roman",serif;font-weight:500}
h1{font-size:clamp(3rem,6.7vw,6.6rem);line-height:.99;letter-spacing:-.055em;color:#faf1da}
.hero p{color:#d4ddd1;line-height:1.5;font-size:clamp(.93rem,1.3vw,1.12rem);margin:15px 0 25px}
#search-form{display:flex;align-items:center;gap:13px;width:min(480px,65%);min-height:54px;border:1px solid #758073;background:#101d1beb;box-shadow:0 3px 12px #0c171533;border-radius:5px;padding:5px 7px 5px 15px}
#search-form:focus-within{outline:2px solid var(--focus);outline-offset:2px}
#search-form>svg{flex-shrink:0;color:var(--gold)}
#search{border:0;outline:none;background:none;color:var(--text);min-width:0;flex:1;font-size:1rem}
#search::placeholder{color:#aebbb1;opacity:1}
.key{display:grid;place-items:center;padding:0;background:#33443b;border:1px solid #647160;border-radius:3px;width:36px;height:34px;font-size:1.3rem;color:#f5deb2}
.location{position:absolute;bottom:15px;right:max(4.5vw,calc((100vw - 1232px)/2));background:#0e1b18cc;padding:5px 9px;border-radius:3px;color:#e7eadc;font-size:.73rem;text-decoration:none}
.location span{color:var(--gold);padding-left:2px}
.library{padding-block:clamp(25px,4.5vw,58px) 55px;min-height:45vh;scroll-margin:12px}
.library:focus{outline:0}
.section-head{display:flex;align-items:baseline;justify-content:space-between;gap:14px;margin-bottom:18px}
.section-head h2{font-size:clamp(1.95rem,3.6vw,3.1rem);line-height:1.12;letter-spacing:-.04em;overflow-wrap:anywhere}
#summary,.section-head p{color:var(--muted);font-size:.88rem;font-variant-numeric:tabular-nums;text-align:right}
#group-nav{display:flex;flex-wrap:wrap;gap:5px 8px;padding-bottom:12px}
#group-nav a{border:1px solid #3c4a45;border-radius:3px;text-decoration:none;padding:5px 10px;font-size:.82rem;color:#c6d2c9}
#group-nav a:hover,.mast-link:hover,.location:hover{color:var(--gold)}
.collection-group{margin:24px 0 34px;scroll-margin:18px}
.collection-group>h3{font-weight:550;font-size:1rem;color:var(--gold);display:flex;gap:12px;align-items:center;margin:0 0 13px}
.collection-group>h3::after{content:"";height:1px;flex:1;background:var(--line)}
.collections{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.collection{isolation:isolate;position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:1fr auto;gap:8px;align-items:start;align-content:start;min-height:115px;background:linear-gradient(110deg,#21312d,#1b2525);border:1px solid #394740;text-decoration:none;text-align:left;border-radius:5px;padding:17px 16px;overflow:hidden}
.collection::after{content:"↗";position:absolute;bottom:13px;right:15px;color:#b3c3b5}
.collection:hover,.asset:hover{border-color:#9f916b;background-color:#23312e}
.collection:hover .collection-name,.asset:hover .asset-name{color:var(--gold)}
.collection-name{font-weight:625;line-height:1.22;font-size:clamp(1rem,1.45vw,1.28rem);letter-spacing:-.025em}
.collection-count{grid-column:1;font-size:.8rem;color:var(--muted);align-self:end}
.samples{display:flex;align-items:center;flex-direction:row-reverse;position:relative;grid-row:1;grid-column:2;padding:2px 0 0 4px}
.samples img{image-rendering:pixelated;width:34px;height:34px;object-fit:contain;position:relative;filter:drop-shadow(0 2px 1px #0a1718)}
.samples img+img{margin-right:-11px}
.samples img:nth-child(2){transform:translateY(4px)}
.samples img:nth-child(3){transform:translateY(8px)}
.samples .wide{object-fit:cover;width:57px;height:38px;border:1px solid #81917d;border-radius:1px;image-rendering:auto}
#crumbs{display:flex;align-items:center;gap:9px;font-size:.83rem;color:var(--muted);margin-bottom:12px}
#crumbs a{color:var(--gold)}
.controls{display:flex;flex-wrap:wrap;gap:12px;margin:0 0 24px;padding:12px 0 18px;border-bottom:1px solid var(--line)}
.controls label{display:grid;gap:5px;color:var(--muted);font-size:.79rem}
select{height:38px;max-width:100%;border-radius:3px;border:1px solid #475650;background:#1c2927;color:var(--text);padding:0 25px 0 9px;font-size:.88rem}
.message{color:var(--muted);border:1px solid var(--line);padding:18px;margin:12px 0;border-radius:4px;line-height:1.5}
.message button,.pages button,.switches button,.quiet{background:none;border:1px solid var(--line);color:var(--text);border-radius:3px;padding:6px 10px}
.message button{margin-left:8px}
.gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(156px,1fr));gap:12px}
.asset{appearance:none;display:flex;flex-direction:column;min-width:0;border:1px solid var(--line);border-radius:4px;padding:0;overflow:hidden;text-align:left;background:#1b2625;color:var(--text)}
.asset-image{height:106px;width:100%;display:grid;place-items:center;overflow:hidden;background:radial-gradient(ellipse at center,#2a3832 0%,#202d29 70%);border-bottom:1px solid #34423b}
.asset-image img{display:block;object-fit:contain;image-rendering:pixelated;max-width:100%;max-height:100%}
.asset-image img.landscape{image-rendering:auto;width:100%;height:100%;object-fit:contain}
.asset-text{display:grid;gap:4px;padding:10px 11px 13px}
.asset-name{font-size:.91rem;font-weight:550;line-height:1.3;overflow-wrap:anywhere}
.asset-group{font-size:.75rem;line-height:1.34;color:var(--muted);overflow-wrap:anywhere}
.pages{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;margin:26px 0 0;gap:11px;color:var(--muted);font-size:.85rem}
.pages button{font-size:.85rem;min-height:37px}
.pages button:disabled{opacity:.4}
.footer{display:flex;gap:20px;align-items:center;justify-content:space-between;border-top:1px solid var(--line);color:var(--muted);padding:20px 0 27px;font-size:.78rem}
dialog{color:var(--text);padding:0;width:min(760px,calc(100% - 24px));max-height:94dvh;border:1px solid #647367;background:#1c2826;border-radius:7px;box-shadow:0 12px 90px #03080799}
dialog::backdrop{background:#050c0be0}
body:has(dialog[open]){overflow:hidden}
.dialog-head,.viewer-tools,.copy-options,.copy-line{display:flex;align-items:center;gap:10px}
.dialog-head{justify-content:space-between;padding:8px 16px;color:var(--muted);font-size:.82rem}
.quiet{border:0;font-size:1.55rem;padding:0 4px;min-width:35px;min-height:34px}
.stage{min-height:120px;height:min(37vh,360px);overflow:auto;text-align:center;display:flex;align-items:safe center;justify-content:safe center;background-color:#18211f;background-image:conic-gradient(#212c29 25%,transparent 0 50%,#212c29 0 75%,transparent 0);background-size:24px 24px;overscroll-behavior:contain}
.stage img{display:block;flex:none;object-fit:contain;image-rendering:pixelated}
.stage.fit img{max-width:100%;max-height:100%}
.viewer-tools{padding:8px 16px;justify-content:space-between;border-bottom:1px solid var(--line);font-size:.79rem;color:var(--muted)}
.switches{display:flex;gap:3px;flex-wrap:wrap}
.switches button{border-color:transparent;color:var(--muted);font-size:.79rem;min-height:33px}
.switches button[aria-pressed="true"]{background:#36423a;border-color:#677362;color:var(--gold)}
.viewer-body{padding:16px}
.viewer-body h2{font-size:clamp(1.55rem,3.4vw,2.25rem);letter-spacing:-.02em;line-height:1.2;margin-bottom:18px;overflow-wrap:anywhere}
.copy-options{justify-content:space-between;margin-bottom:7px}
.file-actions{display:flex;flex-wrap:wrap;gap:5px 12px;justify-content:flex-end}
.copy-options{flex-wrap:wrap}
.copy-options a{font-size:.83rem;color:var(--gold)}
.copy-line input{flex:1;min-width:0;border:1px solid #4a5850;border-radius:3px;background:#131d1b;color:#e1e7db;padding:10px 8px;font-size:.82rem}
.copy-line button{border:0;border-radius:3px;background:var(--gold);color:#17241d;padding:10px 14px;font-size:.86rem;font-weight:650}
@media(min-width:1500px){.hero-art{inset-inline-start:30%}}
@media(max-width:900px){.collections{grid-template-columns:repeat(2,minmax(0,1fr))}.hero-art{inset-inline-start:14%}.gallery{grid-template-columns:repeat(auto-fill,minmax(135px,1fr))}}
@media(max-width:600px){
 .frame{width:calc(100% - 32px)}.mast-inner{height:52px;gap:11px}.brand{font-size:1.04rem;gap:8px}.brand img{width:26px;height:26px}.mast-link{font-size:.82rem}
 .hero-inner{padding-block:33px 49px}.hero-art{inset:0;background-position:62% center}.hero::before{background:linear-gradient(95deg,#172720f0 4%,#172720bb 39%,#1727204d 86%),linear-gradient(0deg,#101d1bd9,transparent 90%)}
 .hero p{max-width:260px;margin:11px 0 17px}.location{right:16px;bottom:8px;font-size:.65rem}#search-form{width:100%;min-height:46px;gap:9px;padding:4px 5px 4px 10px}#search{font-size:16px}.key{height:32px;width:32px}
 .section-head{align-items:flex-end;margin-bottom:11px}.section-head p{font-size:.78rem}
 .collections{gap:8px}.collection{min-height:122px;padding:12px;display:flex;flex-direction:column;gap:4px}.samples{order:-1;height:33px;flex-direction:row;align-self:flex-start;padding:0 9px 0 0;margin-bottom:5px}.samples img{width:29px;height:29px}.samples img+img{margin-right:0;margin-left:-6px}.samples img:nth-child(n){transform:none}.samples .wide{width:40px;height:28px}.collection-count{align-self:start;margin-top:auto}.collection::after{bottom:9px;right:9px;font-size:.8rem}
 .collection-group{margin:18px 0 24px}#group-nav{gap:5px;padding-bottom:3px}
 .gallery{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.asset-image{height:80px}.asset-text{padding:7px;gap:3px}.asset-name{font-size:.78rem}.asset-group{font-size:.68rem}
 .controls{gap:7px;margin-bottom:16px}.controls label{flex:1 1 110px;min-width:0}.controls select{width:100%;padding-right:3px}
 .viewer-body{padding:12px}.viewer-tools,.dialog-head{padding-inline:10px}.viewer-tools .switches button,.copy-options .switches button{padding:5px 7px}.copy-line{gap:5px}.copy-line button{padding-inline:10px}
 .footer{align-items:flex-start;gap:12px}.footer span:last-child{text-align:right}
}
@media(max-width:370px){.gallery{grid-template-columns:repeat(2,minmax(0,1fr))}.mast-label,.mast-rule{display:none}.section-head{display:block}.section-head p{text-align:left;margin-top:4px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
