@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600;700&family=Cormorant+Garamond:wght@400;500;600&family=DM+Sans:wght@400;500;600&display=swap');
:root{--gold:#c8ad74;--pale:#e8dec5;--dark:#111b19;--line:#88764e66}*{box-sizing:border-box}body{margin:0;background:#071211;color:var(--pale);font:13px 'DM Sans',sans-serif;overflow:hidden}button,input,select,textarea{font:inherit}button{cursor:pointer;color:inherit;background:none;border:0}button:disabled{opacity:.35;cursor:default}button:focus-visible,a:focus-visible,summary:focus-visible,svg [tabindex="0"]:focus-visible{outline:2px solid #f4d18b;outline-offset:4px}input,select,textarea{color:var(--pale);background:#0d1918;border:1px solid var(--line);border-radius:3px;padding:10px;min-width:0}input:focus,textarea:focus,select:focus{outline:1px solid var(--gold)}a{color:#d5b67c;text-decoration:none}a:hover{text-decoration:underline}.topbar{height:70px;padding:0 24px;display:flex;gap:15px;align-items:center;background:linear-gradient(#1a211e,#101916);border-bottom:1px solid var(--line);position:relative;z-index:20;box-shadow:0 5px 18px #0006}.topbar h1{font:500 clamp(18px,2vw,27px) 'Cinzel',Georgia;letter-spacing:.1em;margin:0 auto 0 0;white-space:nowrap;color:#ddc995}.topbar>button{border:1px solid var(--line);padding:10px 13px;border-radius:3px;font-size:11px;white-space:nowrap}.topbar>button[aria-pressed="true"]{background:#92703a;color:#fff1cd;box-shadow:0 0 16px #d2a04f33}.topbar .square{font-size:20px;line-height:15px;padding:11px}.topbar select{font-size:11px;max-width:165px}.searchbox{position:relative;display:flex;align-items:center;width:240px}.searchbox>span{position:absolute;left:11px;color:#bfaa80;font-size:21px}.searchbox input{width:100%;padding-left:34px;font-size:11px}#results{position:absolute;top:43px;left:0;right:0;background:#14201e;border:1px solid #7e704c;max-height:380px;overflow:auto;box-shadow:0 14px 30px #000b}#results button{display:block;text-align:left;width:100%;padding:12px;border-bottom:1px solid #88764e33;font-size:12px}#results button:hover{background:#bc9e5722}#results small{display:block;color:#999f90;margin-top:3px}#table{height:calc(100svh - 70px);position:relative;isolation:isolate;overflow:hidden;background:radial-gradient(#284038,#091613 70%)}#viewport{position:absolute;inset:0;overflow:hidden;touch-action:none;cursor:grab}#viewport:active{cursor:grabbing}#board{width:100%;height:100%;display:block;user-select:none;-webkit-user-select:none;touch-action:none}#board.editing{cursor:crosshair}#board.editing .token{cursor:grab}#board.editing .token:active{cursor:grabbing}.board-art{filter:brightness(.72) saturate(.7)}.cell{stroke-width:1;fill-opacity:.19;stroke-opacity:.35;transition:fill-opacity .2s,stroke-opacity .2s}.cell:hover{fill-opacity:.42;stroke:#f8d68b;stroke-opacity:1;stroke-width:2}.cell.court{fill:#b39144;fill-opacity:.28;stroke:#d7b96f;stroke-opacity:.75}.cell.throne-cell{stroke:#ffe3a1;stroke-width:3;fill-opacity:.42;filter:drop-shadow(0 0 12px #e6b95866)}.cell.drop-target{stroke:#fff6d1;stroke-width:4;fill:#d5b66c;fill-opacity:.55}.frontier{fill:none;stroke-width:2;stroke-opacity:.8;pointer-events:none;filter:drop-shadow(0 1px 2px #000)}.region-label{cursor:pointer}.region-label text{font:600 24px 'Cinzel',Georgia;letter-spacing:3px;fill:#f0e5cb;paint-order:stroke;stroke:#101c19;stroke-width:5px;filter:drop-shadow(0 3px 5px #000)}.region-label .realm-name{font:12px 'Cormorant Garamond',Georgia;font-style:italic;letter-spacing:1.2px;fill:#d0c6a6;stroke-width:3px}.agency{cursor:pointer}.agency text{fill:#f3e8c8;font:500 15px 'DM Sans';paint-order:stroke;stroke:#101713;stroke-width:5px;stroke-linejoin:round}.agency>path{fill:#d2bd87;stroke:#141c18;stroke-width:1}.agency .secondary{fill:#c9c8aa}.token{cursor:pointer;filter:drop-shadow(0 5px 4px #0009);transition:opacity .2s}.token .base-ring{fill:#14231d;stroke-width:2.5}.token .base-shadow{fill:#080f0c;stroke:#c9b57d;stroke-width:.7}.token .miniature{stroke:#211e17;stroke-width:1.3;stroke-linejoin:round;fill:url(#metal)}.token .initials{font:600 10px 'Cinzel';fill:#fff3ce;text-anchor:middle;paint-order:stroke;stroke:#19241c;stroke-width:2px}.token .tag{font:500 11px 'DM Sans';fill:#fff0c8;paint-order:stroke;stroke:#0c1712;stroke-width:4px;stroke-linejoin:round;text-anchor:middle}.token:hover .base-ring,.token:focus .base-ring,.token.selected .base-ring{stroke:#fff3b7;stroke-width:4;filter:drop-shadow(0 0 10px #f2c56a)}.token.manual .base-ring{stroke-dasharray:4 3}.token .manual-mark{fill:#f1b75b;stroke:#2a2518;stroke-width:1}.token.dragging{opacity:.8;pointer-events:none}.token.dim,.agency.dim{opacity:.15}.cell.dim{fill-opacity:.04;stroke-opacity:.06}.throne-name{font:600 14px 'Cinzel';letter-spacing:1px;fill:#ffdf96;paint-order:stroke;stroke:#162017;stroke-width:4px;text-anchor:middle}.throne-rank{font:10px 'DM Sans';fill:#e2cfa2;text-anchor:middle;paint-order:stroke;stroke:#162017;stroke-width:3px}.wall-line{stroke:#a6c8cc;stroke-width:8;stroke-linecap:round;filter:drop-shadow(0 3px 3px #000);fill:none}.wall-top{stroke:#dae5d5;stroke-width:2;stroke-dasharray:10 5;fill:none}.wall-label{font:12px 'Cinzel';letter-spacing:5px;fill:#d6e5df;paint-order:stroke;stroke:#172825;stroke-width:5px}.route{fill:none;stroke:#ffde86;stroke-width:3;stroke-dasharray:9 5;filter:drop-shadow(0 0 4px #fff0a6);pointer-events:none}.route-dot{fill:#ffe6a5;stroke:#4a401e;stroke-width:2;pointer-events:none}.route-date{font:11px 'DM Sans';fill:#fff2bf;paint-order:stroke;stroke:#14221b;stroke-width:4px;pointer-events:none}.raven-marker{cursor:pointer;filter:drop-shadow(0 3px 3px #000)}.raven-marker circle{fill:#172820;stroke:#c4ac6c;stroke-width:1.5}.raven-marker text{font:16px Georgia;fill:#c8b479}.dock{position:absolute;z-index:8;left:16px;top:50%;transform:translateY(-50%);padding:7px 4px;background:#0d1915ed;border:1px solid #93805766;box-shadow:0 7px 25px #0007;border-radius:5px;display:flex;flex-direction:column;gap:3px}.dock button{width:63px;height:62px;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:#b8ac8a}.dock button:hover,.dock button.active{color:#ffe0a0;background:#ac8f4a22;border-radius:3px}.dock button>span{font:27px Georgia}.dock small{font-size:8px;letter-spacing:.03em}.dock b{position:absolute;top:5px;right:7px;font-size:8px;background:#815230;border-radius:10px;padding:2px 4px;color:#f6dfae;font-weight:400}.raven-icon{transform:rotate(-25deg)}.zoom{position:absolute;right:20px;bottom:75px;z-index:7;display:flex;flex-direction:column;background:#11221be8;border:1px solid #94805688;border-radius:3px}.zoom button{width:38px;height:36px;font-size:20px;border-bottom:1px solid #947f4933}.zoom button:last-child{border:0}.zoom button:hover{background:#ad934c33}.throne-jump{position:absolute;right:20px;top:20px;background:#14241ce8;border:1px solid #99845977;border-radius:50%;font-size:28px;width:43px;height:43px;color:#dfba69}.bottom-bar{position:absolute;z-index:7;bottom:14px;left:100px;right:76px;min-height:35px;display:flex;gap:18px;align-items:center;padding:8px 14px;background:#0b1914e8;border:1px solid #8f7b4e55;border-radius:3px;font-size:9px;color:#c5b796;box-shadow:0 6px 20px #0006}.bottom-bar>button{font-size:9px;color:#d0bc85}.bottom-bar>button:first-child{letter-spacing:1px}.bottom-bar>span{color:#8f9b86}.mini-legend{display:flex;gap:16px;align-items:center;margin-left:auto;color:#afad90}.mini-legend>span{display:flex;gap:5px;align-items:center;white-space:nowrap}.mini-legend svg{width:25px;height:25px;fill:#cfb477;stroke:#2c3020;stroke-width:2}#undo{border-left:1px solid #9e824655;padding-left:16px;white-space:nowrap}#tooltip{position:fixed;z-index:40;background:#10221def;border:1px solid #a38b55;padding:10px 14px;pointer-events:none;max-width:270px;border-radius:3px;box-shadow:0 6px 25px #000a;font-size:12px}#tooltip b{display:block;color:#ecd599;font-weight:500}#tooltip small{display:block;color:#aeb49c;margin-top:4px;font-size:10px}#toast{position:absolute;bottom:65px;left:50%;transform:translateX(-50%);z-index:25;background:#24352bef;color:#ffe6aa;border:1px solid #bc9f5a;padding:11px 18px;border-radius:4px;max-width:80%;font-size:11px;opacity:0;pointer-events:none;transition:opacity .2s}#toast.show{opacity:1}.move-hint{position:absolute;z-index:9;top:18px;left:50%;transform:translateX(-50%);padding:10px 17px;border:1px solid #e2bd70;background:#41351eeb;color:#ffe6ab;font-size:11px;border-radius:3px;pointer-events:none;white-space:nowrap}#panel{position:absolute;z-index:18;right:0;top:0;bottom:0;width:360px;max-width:calc(100% - 40px);background:linear-gradient(120deg,#1d2a24fa,#111e19fc);border-left:1px solid #af9257;padding:34px 25px;box-shadow:-20px 0 70px #0008;overflow-y:auto;scrollbar-color:#79643e #15231b}#closePanel{position:absolute;right:13px;top:7px;font:30px Georgia;color:#c1a671}.eyebrow{font:9px 'Cinzel',Georgia;color:#c7a76b;letter-spacing:1.5px}h2{font:500 35px/1.08 'Cormorant Garamond',Georgia;color:#e5d3aa;margin:13px 0 20px}h3{font:500 13px 'Cinzel';color:#c4a56b;letter-spacing:.05em;margin:26px 0 12px}p{line-height:1.65}.muted{color:#a0aa96;font-size:11px}.chip{font-size:9px;border:1px solid #8b754d66;padding:4px 8px;border-radius:20px;display:inline-block;margin:3px 3px 3px 0}.chip.manual{border-color:#d3a558;color:#e9bb6b}.chip.base{color:#bccab2}.panel-actions{display:flex;gap:8px;flex-wrap:wrap;margin:20px 0}.panel-actions button,.small-button{font-size:10px;border:1px solid #8b754d77;border-radius:3px;padding:9px 11px;color:#d5c096}.primary{background:#97783e!important;border:1px solid #bd9c58!important;color:#fff1c9!important;padding:11px 16px!important;border-radius:3px}.source{border-top:1px solid #7b694333;padding:12px 0;font-size:11px}.source small{font-size:9px;color:#9ba78f;display:block;margin-top:6px}.timeline{border-left:1px solid #bca05e88;padding-left:17px;margin-left:3px}.timeline>div{margin:12px 0;font-size:12px}.timeline small{display:block;color:#a4ad96;font-size:10px}.no-data{border:1px dashed #8d794c66;padding:13px;font-size:11px;color:#a3ac97}.realm-card,.news-card,.change-card{display:block;width:100%;text-align:left;padding:14px 0;border-bottom:1px solid #7f724944;color:#dfd1af}.realm-card{border-left:3px solid var(--c);padding-left:13px;margin:15px 0}.realm-card b{font:14px 'Cinzel';display:block}.realm-card small,.news-card small,.change-card small{font-size:10px;color:#a0ab96;display:block;margin-top:6px;line-height:1.6}.news-card strong{display:block;font:500 19px/1.2 'Cormorant Garamond';margin:5px 0}.news-card .date{font-size:9px;letter-spacing:1px;color:#ba9e68}.news-card button{font-size:10px;color:#e2c38a;padding:8px 0}.person-list button{display:flex;flex-direction:column;align-items:start;width:100%;padding:10px;border:1px solid #7d6e4433;margin:7px 0;text-align:left}.person-list small{font-size:10px;color:#a3ac97;margin-top:4px}.legend-row{display:flex;gap:15px;align-items:center;padding:14px 0;border-bottom:1px solid #8d785744}.legend-row svg{width:55px;height:55px;fill:#c7b078;stroke:#1c271c;stroke-width:1.5;flex:none}.legend-row b{font-size:12px;display:block;color:#dfc38b}.legend-row small{display:block;font-size:10px;color:#a3ad97;margin-top:5px;line-height:1.6}details{margin:18px 0;border-top:1px solid #8c754433;padding-top:14px}summary{cursor:pointer;color:#c7b17b;font-size:11px}dialog{width:420px;max-width:calc(100% - 24px);max-height:90svh;overflow:auto;border:1px solid #a38a54;background:#17261e;color:#deceaa;padding:30px;box-shadow:0 25px 80px #000b}dialog::backdrop{background:#04100bbb;backdrop-filter:blur(4px)}.dialog-close{position:absolute;right:10px;top:8px;font:27px Georgia}form{display:flex;flex-direction:column;gap:14px}form label{font-size:10px;color:#b8b79f;display:flex;flex-direction:column;gap:6px}form textarea{resize:vertical;min-height:70px}form small{font-size:10px;line-height:1.6;color:#9fa990}.storage-error{color:#e5a75f!important}.court-boundary{fill:none;stroke:#e2bf6d;stroke-width:2;stroke-dasharray:4 4;pointer-events:none}.water-label{font:italic 21px 'Cormorant Garamond';letter-spacing:4px;fill:#c8d7c0;opacity:.55}.date-label{font:11px 'Cinzel';letter-spacing:2px;fill:#d5c395}.raven-path{stroke:#d2ba7844;stroke-dasharray:4 6;fill:none;pointer-events:none}@media(max-width:1000px){.topbar{padding:0 14px;gap:9px}.topbar h1{font-size:21px;letter-spacing:.06em}.searchbox{width:190px}.topbar select{max-width:130px}.mini-legend{gap:8px}.bottom-bar{gap:10px}.mini-legend>span{font-size:8px}}@media(max-width:700px){.topbar{height:108px;flex-wrap:wrap;align-content:center;gap:8px;padding:10px 12px}.topbar h1{font-size:22px;flex-basis:calc(100% - 144px);order:0}.topbar #editMode{order:1;font-size:10px;padding:8px}.topbar #add{order:2}.searchbox{order:3;flex:1}.topbar select{order:4;max-width:135px;font-size:10px}.topbar input{font-size:10px}#table{height:calc(100svh - 108px)}.dock{left:8px;padding:3px;gap:0}.dock button{width:44px;height:52px}.dock button>span{font-size:23px}.dock small{font-size:7px}.dock b{right:1px;top:3px}.bottom-bar{left:8px;right:8px;bottom:8px;min-height:37px;padding:7px;gap:8px;flex-wrap:wrap}.bottom-bar>span{font-size:8px}.mini-legend{display:none}.bottom-bar #undo{margin-left:auto}.bottom-bar>button{font-size:8px}.zoom{right:9px;bottom:70px}.zoom button{width:33px;height:32px}.throne-jump{right:10px;top:12px;width:35px;height:35px;font-size:25px}.move-hint{font-size:9px;max-width:70%;white-space:normal;top:12px;text-align:center}#panel{width:340px;padding:30px 23px}h2{font-size:33px}#toast{bottom:62px;width:max-content;max-width:85%}.topbar>button.square{font-size:17px;padding:8px}.region-label text{font-size:24px}}@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
/* Individual creative units, named on the board rather than identified only by initials. */
.person-label{font:600 11.5px 'DM Sans',sans-serif;fill:#fff2ce;text-anchor:middle;paint-order:stroke;stroke:#111c15;stroke-width:4px;stroke-linejoin:round;pointer-events:none}.mini-face{filter:saturate(.55) sepia(.15) contrast(1.05)}.personalized:hover{filter:drop-shadow(0 0 8px #f0c97a88)}.figure-showcase{height:185px;display:flex;align-items:center;justify-content:center;background:radial-gradient(ellipse,#bfa16722,transparent 65%);margin:-12px 0 10px;border-bottom:1px solid #9d814733}.personal-figure{height:190px;width:220px;filter:drop-shadow(0 9px 8px #0008)}.figure-showcase .mini-face{filter:saturate(.7) sepia(.1)}
/* A physical board on walnut, with a bevel and directional miniature shadows. */
#table{background:radial-gradient(ellipse at 25% 10%,#cb8c4030,transparent 65%),url('assets/walnut-table.png') center/cover,#26190f;perspective:1500px}
#table::after{content:"";position:absolute;inset:0;pointer-events:none;z-index:2;box-shadow:inset 0 0 100px 25px #050302b0;background:linear-gradient(120deg,#ffda8c0c,transparent 45%,#0003)}
#viewport{inset:28px 55px 68px 88px;border:9px solid #4b3522;border-radius:5px;background:#14241d;box-shadow:0 3px 0 #a17b41,0 8px 0 #372315,0 13px 0 #21170f,12px 33px 28px #000b,0 0 0 1px #c3a16488,inset 0 0 22px #000b;transform:rotateX(9deg) rotateZ(-.6deg);transform-origin:50% 55%}
#viewport::after{content:"";position:absolute;inset:0;pointer-events:none;border:2px solid #e5c88b55;box-shadow:inset 0 0 25px #0008;background:linear-gradient(130deg,#fff3c00c,transparent 28%,#0001)}
#board{background:#17271f}.board-art{filter:brightness(.92) saturate(.65) sepia(.12)}
.cell{fill-opacity:.09;stroke-opacity:.22}.frontier{stroke-width:1.4;stroke-opacity:.55}.cell.court{fill-opacity:.15}.cell.throne-cell{filter:none;fill-opacity:.24}
.token{filter:none}.cast-shadow{fill:#090704;opacity:.7;filter:blur(4px);transform:skewX(-27deg)}.resin-miniature{filter:drop-shadow(7px 8px 3px #0b070b99)}.token .base-ring{fill:#51442e;stroke-width:1.7}.token:hover .resin-miniature,.token.selected .resin-miniature{filter:drop-shadow(7px 8px 3px #080508aa) drop-shadow(0 0 3px #f6d59199)}
.personalized:hover{filter:none}.person-label{font-size:11px;fill:#fff1ca;stroke:#1b2018;stroke-width:3.7px}.figure-showcase{height:300px;background:radial-gradient(ellipse at 50% 85%,#b18b3b33,transparent 65%)}.personal-figure{height:290px;width:100%;object-fit:contain;filter:drop-shadow(13px 17px 8px #0009)}
.topbar{background:linear-gradient(#251f18,#151711);border-color:#a1844c77}.dock,.zoom,.bottom-bar{background:linear-gradient(115deg,#30271cf5,#171b15f5);border-color:#ab8a4b77;box-shadow:2px 6px 14px #0008,inset 0 1px #e7c58422}
@media(max-width:700px){#viewport{inset:20px 15px 75px 53px;border-width:5px;transform:rotateX(5deg)}.figure-showcase{height:280px}.personal-figure{height:270px}}
@media(prefers-reduced-motion:reduce){#viewport{transform:none}}
#viewport{top:60px;cursor:default}#viewport:active{cursor:default}
#perchedRaven{position:absolute;right:145px;top:-4px;width:110px;height:115px;z-index:4;padding:0;filter:drop-shadow(9px 12px 5px #000b)}#perchedRaven img{width:100%;height:100%;object-fit:contain}#perchedRaven span{position:absolute;right:8px;top:35px;background:#7c3e21;border:1px solid #c8a366;border-radius:50%;padding:3px 6px;color:#ffe6b5;font-size:9px}#perchedRaven:hover{filter:drop-shadow(9px 12px 5px #000b) drop-shadow(0 0 3px #e8c17c)}
@media(max-width:700px){#viewport{top:60px}#perchedRaven{right:62px;width:90px;height:105px}}

#perchedRaven{top:8px;height:105px}
/* A monumental war table: the map is inset into carved timber, without a game tray. */
#table{background:linear-gradient(110deg,#27170b22,#05060644),url('assets/war-table.png') center/cover,#20170f;perspective:1300px}
#viewport{inset:60px 88px 61px 102px;border:0;border-radius:2px;background:transparent;box-shadow:none;transform:rotateX(12deg) rotateZ(-.5deg)}
#board{background:transparent;filter:drop-shadow(3px 9px 5px #000a)}
#viewport::after{border:0;box-shadow:none;background:linear-gradient(120deg,#ffc76b0a,transparent 40%,#0001)}
#table::after{box-shadow:inset 0 0 100px 18px #0009}
.topbar{background:linear-gradient(#171916,#0b100e);box-shadow:0 7px 22px #000a}
.dock{left:12px;background:linear-gradient(100deg,#211c16ed,#101612ed);border-color:#8d774d66}.bottom-bar{background:#10150fe8}
#perchedRaven{right:155px;top:5px}
@media(max-width:700px){#viewport{inset:65px 18px 70px 55px;transform:rotateX(8deg)}#perchedRaven{right:58px}}
/* One sculptural continent-shaped table, with the geography carved into it. */
#table{background:radial-gradient(ellipse at 50% 40%,#231d15,#090c0c 75%);perspective:1400px}
#viewport{inset:16px 50px 49px 78px;transform:rotateX(7deg);background:none;box-shadow:none;border:0}
#board{background:none;filter:none}
.board-art{filter:brightness(.95) saturate(.8)}
#viewport::after{display:none}.cell{fill-opacity:.045;stroke-opacity:.11}.frontier{stroke-opacity:.34;stroke-width:1.2}.cell.court{fill-opacity:.07}.cell.throne-cell{fill-opacity:.12;stroke-width:2}
#table::after{box-shadow:inset 0 0 80px 10px #0009;background:linear-gradient(120deg,#eebb6408,transparent 50%,#0002)}
#perchedRaven{right:170px;top:3px}.region-label text{fill:#ead6ad}.region-label .realm-name{fill:#beab89}
@media(max-width:700px){#viewport{inset:25px 8px 60px 48px;transform:rotateX(5deg)}#perchedRaven{right:50px}}
#viewport{transform:rotateX(24deg);transform-origin:50% 55%}
.house-standard{filter:drop-shadow(5px 7px 3px #000a)}.region-label .flag-sigil{font:25px Georgia;fill:#1d231f;stroke:none;filter:none;letter-spacing:0}.flag-cloth{transition:filter .2s}.region-label:hover .flag-cloth{filter:brightness(1.3)}
#selectionTitle{position:absolute;left:50%;top:47%;transform:translate(-50%,-50%);z-index:17;pointer-events:none;text-align:center;padding:17px 40px;background:linear-gradient(90deg,transparent,#090e0deb 20%,#090e0deb 80%,transparent);min-width:340px;max-width:75%;border-block:1px solid color-mix(in srgb,var(--selection-color),transparent 55%);transition:top .6s,transform .6s,padding .6s}
#selectionTitle small{display:block;font:9px 'Cinzel';letter-spacing:3px;color:var(--selection-color);margin-bottom:7px}#selectionTitle strong{display:block;font:500 31px 'Cinzel';color:#f1dfb4;text-shadow:0 3px 8px #000}#selectionTitle.settled{top:17px;transform:translate(-50%,0);padding:8px 28px}#selectionTitle.settled strong{font-size:20px}#selectionTitle.settled small{font-size:8px;margin-bottom:4px}
@media(max-width:700px){#viewport{transform:rotateX(18deg)}#selectionTitle{min-width:240px;padding:14px 25px}#selectionTitle strong{font-size:23px}#selectionTitle.settled{max-width:60%;top:10px}#selectionTitle.settled strong{font-size:15px}}
/* The scene already contains the inclined stone map-table; overlay coordinates follow its surface. */
#table{background:#101110;perspective:none}#viewport{inset:0;transform:none!important;background:none;overflow:hidden;cursor:grab}#viewport:active{cursor:grabbing}#board{background:none}.board-art{filter:brightness(.9) saturate(.8)}.water-label{display:none}.cell{fill-opacity:.025;stroke-opacity:.10}.cell.court{fill-opacity:.05}.cell.throne-cell{fill-opacity:.09}.frontier{stroke-opacity:.2}.region-label text{font-size:19px;letter-spacing:2px}.region-label .realm-name{font-size:10px}.agency text{font-size:12px}.person-label{font-size:10px}.house-standard{filter:drop-shadow(4px 5px 2px #000a)}.cast-shadow{opacity:.65}.token .base-ring{rx:23px;ry:8px;stroke-width:1.2}.bottom-bar{background:#10130fe8}.dock{background:#111512df}.zoom{display:flex}#perchedRaven{right:9%;top:23%;width:85px;height:95px}.figure-showcase .personal-figure{height:290px}#selectionTitle.settled{top:18px}
@media(max-width:700px){#viewport{inset:0;transform:none!important}#perchedRaven{width:65px;height:75px;right:7%;top:28%}}
#perchedRaven{right:6%;top:19%}.zoom{bottom:80px}.throne-jump{top:18px}.region-label text{font-size:17px}.region-label .realm-name{font-size:9px}.person-label{font-size:9px;stroke-width:3px}.cell:not(.drop-target):not(:hover){fill-opacity:0;stroke-opacity:0}.frontier{display:none}.agency path{opacity:.65}.route-date{font-size:10px}.bottom-bar::before{content:'↔ Scroll lateral';font-size:9px;color:#baac8a;white-space:nowrap}
/* Restrained opening sequence. Click the title to skip. */
#intro{position:fixed;inset:0;z-index:100;background:#000;display:grid;place-items:center;width:100%;height:100%;padding:0;color:#d7c39a}#intro[hidden]{display:none}#intro span{font:400 clamp(28px,4vw,58px) 'Cinzel',Georgia;letter-spacing:.18em;text-align:center;opacity:1;text-shadow:0 0 25px #d9b57822}
.opening .topbar,.opening .dock,.opening .bottom-bar,.opening .zoom,.opening .throne-jump{opacity:0;pointer-events:none}.opening #board{filter:brightness(.025)}
.igniting #intro{animation:open-black 2.9s forwards;pointer-events:auto}.igniting #intro span{animation:open-name 2.6s forwards}.igniting #board{animation:torch-ignition 4.4s forwards}.igniting .topbar,.igniting .dock,.igniting .bottom-bar,.igniting .zoom,.igniting .throne-jump{animation:reveal-tools 1s 4.9s forwards}
@keyframes open-black{0%,48%{background:#000}100%{background:transparent}}@keyframes open-name{0%,40%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(-8px)}}@keyframes torch-ignition{0%,28%{filter:brightness(.025) sepia(.5)}42%{filter:brightness(.12) sepia(.65)}52%{filter:brightness(.34) sepia(.45)}67%{filter:brightness(.62) sepia(.22)}100%{filter:brightness(1) sepia(0)}}@keyframes reveal-tools{to{opacity:1}}
.perched-raven-scene{cursor:pointer;filter:drop-shadow(4px 6px 3px #000b)}
@media(prefers-reduced-motion:reduce){#intro{display:none}.opening #board{filter:none}.opening .topbar,.opening .dock,.opening .bottom-bar,.opening .zoom,.opening .throne-jump{opacity:1;pointer-events:auto}}
.agency-logo{mix-blend-mode:multiply}.agency-logo.ink{filter:brightness(0);mix-blend-mode:normal}.agency-standard{filter:drop-shadow(4px 6px 2px #0009)}.agency:hover .agency-standard{filter:drop-shadow(4px 6px 2px #0009) drop-shadow(0 0 2px #f3d690)}.region-label .flag-sigil{font-size:9px;font-family:'DM Sans',sans-serif;font-weight:700}.sculpted-wall{filter:drop-shadow(8px 9px 4px #000a)}
.torch{opacity:.7;mix-blend-mode:screen}.torch-flame{transform-origin:0 6px;animation:flame-breathe 2.6s ease-in-out infinite alternate}.torch-1 .torch-flame{animation-delay:-1.1s}.opening .torch{opacity:0}.igniting .torch-0{animation:light-torch .8s 1.25s forwards}.igniting .torch-1{animation:light-torch .8s 1.8s forwards}@keyframes light-torch{0%{opacity:0}35%{opacity:.3}60%{opacity:.85}100%{opacity:.7}}@keyframes flame-breathe{from{transform:scale(.92,1)}to{transform:scale(1.03,.9)}}
@media(prefers-reduced-motion:reduce){.torch-flame{animation:none}}

/* Restrained material palette, faction color only in heraldic accents. */
.livery-palette{display:flex;align-items:center;gap:8px;margin:10px 0 18px;color:#c4bda9;font-size:12px}
.livery-palette i{width:20px;height:25px;flex:none;background:linear-gradient(110deg,#ffffff18,transparent 48%,#0005),var(--pigment);border:1px solid #a99b6a55;clip-path:polygon(0 0,100% 0,100% 80%,50% 100%,0 80%)}
.palette-entry{padding:10px 0;border-bottom:1px solid #c1b18c1f}.palette-entry b{font-size:12px;letter-spacing:.08em}.palette-entry .livery-palette{margin:8px 0 0}
.token .base-ring{stroke-opacity:.45;stroke-width:.8}

/* Faction color belongs on the plinth, not on a separate miniature flag. */
.house-base-rim{filter:drop-shadow(0 1px 1px #0009)}
.token:hover .house-base-rim,.token:focus .house-base-rim,.token.selected .house-base-rim{stroke-width:3.6;filter:drop-shadow(0 0 2px #eee7)}
.token.manual .house-base-rim{stroke-dasharray:4 2}
#tooltip{background:var(--faction-color,#55504a);border-color:color-mix(in srgb,var(--faction-color,#55504a),white 35%);color:var(--faction-text,#fff);box-shadow:0 6px 25px #000a}
#tooltip b,#tooltip small{color:inherit}#tooltip small{opacity:1}

/* Strategic scale: terrain plots, fine cells and a camera free to travel in two axes. */
.bottom-bar::before{content:'Arrastrar · Rueda para zoom'}
#board .region-label>text{font-size:15px;letter-spacing:1.4px;stroke-width:2px}
#board .region-label .realm-name{font-size:9px;letter-spacing:.7px}
#board .region-label .house-standard{opacity:.95}
#board .agency>text{font-size:6.5px;stroke-width:1.8px;fill:#d5c7a5}
#board .agency .medieval-standard path{opacity:1}
.medieval-standard .heraldic-logo{filter:grayscale(1) sepia(.65) brightness(.65);mix-blend-mode:multiply}
#board .agency-standard{filter:drop-shadow(1px 2px 1px #000a)}
#board .person-label{font-size:6px;stroke-width:1.8px;opacity:0;pointer-events:none}
#board.detail-view .person-label,#board .token:hover .person-label,#board .token.selected .person-label,#board .token:focus .person-label{opacity:1}
#board .throne-rank{font-size:5.5px;stroke-width:1.5px}
#board .cell{stroke-width:.35;fill-opacity:0;stroke-opacity:0}
#board.editing .cell{fill-opacity:.045;stroke-opacity:.22}
#board.editing .cell:hover,#board .cell.drop-target{fill:#b8b084;fill-opacity:.4;stroke:#e1d7a8;stroke-opacity:.9;stroke-width:.7}
#board .cell.drop-invalid{fill:#a3483d;fill-opacity:.55;stroke:#d4866c;stroke-opacity:1}
.wall-titles text{font:9px Cinzel,Georgia;fill:#c0b8a3;letter-spacing:1px;paint-order:stroke;stroke:#151410;stroke-width:2}
.wall-titles .realm-subtitle{font-size:7px}
.realm-terrain{filter:drop-shadow(1px 2px 1px #0008)}
#board .resin-miniature{filter:drop-shadow(2px 3px 1px #08060588)}
.house-base-side{pointer-events:none}
.token .cast-shadow{filter:blur(1px);transform:none;opacity:.4}

#board .agency>text{opacity:.85} #board .agency:hover>text{opacity:1;fill:#fff0cd}

#board.editing .cell.occupied-footprint{fill-opacity:.28;stroke-opacity:.85;stroke-width:.7}

/* All permanent controls live on the table, not in screen-space menus. */
.topbar,.dock,.zoom,.throne-jump,.bottom-bar{display:none!important}
#table{height:100svh;width:100vw;background:#171613}
#viewport{inset:0!important}#board{width:100%;height:100%}
.table-prop{cursor:pointer;filter:drop-shadow(4px 6px 3px #0009)}
.table-prop:hover,.table-prop:focus{filter:drop-shadow(4px 6px 3px #0009) drop-shadow(0 0 2px #dfc898)}
.castle-realm .physical-castle{filter:drop-shadow(4px 6px 2px #0008)}
.castle-realm:hover .physical-castle{filter:drop-shadow(4px 6px 2px #0008) drop-shadow(0 0 2px #dfc898)}
.atlas-search{display:block;margin:20px 0}.atlas-search input{display:block;width:100%;margin-top:10px}
#panel{top:0;max-height:100svh}#selectionTitle.settled{top:12px}
#board .cell.drop-target{stroke-width:.8}#board.editing .cell{stroke-width:.45}
/* Nested sprite viewports must retain their physical dimensions. */
#board svg.physical-castle{width:56px!important;height:56px!important;overflow:hidden!important}
#board .agency text{font-size:5px;stroke-width:1.4px}
#board .region-label>text{font-size:11px;letter-spacing:.7px}
#board .region-label .realm-name{font-size:5px;letter-spacing:.3px}
#board .person-label{font-size:4px;stroke-width:1.2px}
#board .throne-rank{font-size:3.5px;stroke-width:1px}
#board .throne-rank{display:none}
#board.detail-view .cell:not(.drop-target):not(.drop-invalid){stroke-opacity:.09;stroke-width:.3;fill-opacity:0}
#board .physical-standard{filter:drop-shadow(2px 3px 1px #0008)}

/* Etched hexes remain legible at the widest view. */
#board .cell:not(.drop-target):not(.drop-invalid){stroke:#c6ad80;stroke-opacity:.42;stroke-width:.45;fill-opacity:.018}
#board.detail-view .cell:not(.drop-target):not(.drop-invalid){stroke-opacity:.48;stroke-width:.4}
#board.editing .cell{stroke-opacity:.7!important;stroke-width:.65!important}
#board .cell.occupied-footprint{stroke:#ffe1a0!important;stroke-opacity:1!important;fill:#d4a957;fill-opacity:.18!important}
.igniting #intro{animation:none!important;background:#000;mask-composite:intersect}
.opening #board,.igniting #board{filter:none!important;animation:none!important}
.igniting #intro span{animation:none!important}
.igniting .torch-0{animation:light-torch .65s 1.9s forwards}
.igniting .torch-1{animation:light-torch .65s 2.8s forwards}

.ground-hex-grid polygon{fill:none;stroke:#d0b78c;stroke-width:.35;stroke-opacity:.32}
#board.detail-view .person-label{opacity:0}
#board .token:hover .person-label,#board .token.selected .person-label,#board .token:focus .person-label{opacity:1}

.capital-hit{stroke:transparent;stroke-width:1}.castle-realm:hover .capital-hit,.castle-realm:focus-visible .capital-hit{stroke:#d6bd82;stroke-dasharray:2 3;fill:#d6bd820a}

/* Neutral carved geography; faction identity remains on standards and figures. */
#board .board-art{filter:brightness(.85) saturate(.65)}
#board .cell:not(.drop-target):not(.drop-invalid){stroke:#383d40;stroke-opacity:.48;stroke-width:.48;fill-opacity:0}
#board .ground-hex-grid polygon{stroke:#383d40;stroke-opacity:.32;stroke-width:.4}
#board.detail-view .cell:not(.drop-target):not(.drop-invalid){stroke-opacity:.52}

#board .person-label{display:none!important}
.wall-fire{opacity:1}.opening .wall-fire{opacity:0}.igniting .wall-fire{animation:wallIgnition .45s ease-out var(--fire-delay) both}
.live-flame{transform-box:fill-box;transform-origin:50% 100%;animation:liveFire .71s ease-in-out var(--flicker-delay) infinite alternate;mix-blend-mode:screen}
.fire-glow{animation:wallGlow 1.17s ease-in-out var(--flicker-delay) infinite alternate;mix-blend-mode:screen}
@keyframes wallIgnition{0%{opacity:0}35%{opacity:.9}55%{opacity:.55}100%{opacity:1}}
@keyframes liveFire{0%{transform:scale(.87,.91) skewX(-4deg);opacity:.84}32%{transform:scale(1.05,1.04) skewX(3deg);opacity:1}67%{transform:scale(.94,1.09) skewX(-2deg);opacity:.9}100%{transform:scale(1.02,.96) skewX(4deg);opacity:1}}
@keyframes wallGlow{from{opacity:.55}to{opacity:.95}}

.battle-horn .music-indicator{opacity:.25}.battle-horn.playing .music-indicator{opacity:1;filter:drop-shadow(0 0 3px #dfc78c)}

#board .cell:not(.drop-target):not(.drop-invalid){stroke:#aaa99e;stroke-opacity:.38}#board .ground-hex-grid polygon{stroke:#a7a79e;stroke-opacity:.27}#board .cell[data-snow]{stroke:#42494e}

.realm-light{fill:#e0e0cf;fill-opacity:0;stroke:#dfdfcc;stroke-opacity:0;stroke-width:1.2;filter:drop-shadow(0 0 7px #d9d9c9);transition:fill-opacity .3s,stroke-opacity .3s;mix-blend-mode:screen}.realm-light.active{fill-opacity:.16;stroke-opacity:.6}.castle-realm:hover .capital-hit{stroke:transparent;fill:transparent}

.realm-light{opacity:0;fill:none;stroke:none;filter:none;transition:opacity .25s;mix-blend-mode:screen}.realm-light.active{opacity:1}.realm-hex{fill:#deded2;fill-opacity:.12;stroke:#dfdfd6;stroke-width:.35;stroke-opacity:.28}.realm-edge{fill:none;stroke:#eeeece;stroke-width:1.1;stroke-opacity:.7;filter:drop-shadow(0 0 3px #e9e9d0)}

/* Fourteen faction lights: discrete engraved hexes, one crisp perimeter. */
.realm-light{mix-blend-mode:normal;transition:opacity .18s ease;filter:none}
.realm-light .realm-hex{fill:var(--realm-color);fill-opacity:.23;stroke:var(--realm-color);stroke-width:.7;stroke-opacity:.72}
.realm-light .realm-edge{fill:none;stroke:var(--realm-color);stroke-width:1.8;stroke-opacity:1;filter:drop-shadow(0 0 2px var(--realm-color)) drop-shadow(0 0 6px var(--realm-color));stroke-linejoin:round}
.realm-light.active{opacity:1;fill-opacity:1;stroke-opacity:1}

/* Volumetric-looking heat tongues stay anchored inside the brazier. */
.live-heat-flame{mix-blend-mode:screen;filter:drop-shadow(0 0 1.5px #ff9d35);pointer-events:none}
.fire-glow{animation:torchBreath 2.7s ease-in-out var(--flicker-delay) infinite;opacity:.75}
@keyframes torchBreath{0%,100%{opacity:.62}19%{opacity:.8}42%{opacity:.68}64%{opacity:.9}83%{opacity:.72}}
.igniting #intro{mask-image:none!important;transition:none!important}
@media(prefers-reduced-motion:reduce){.fire-glow{animation:none!important}}

/* On-table interaction follows the sculpture's silhouette, never a focus box. */
#board:focus,#board:focus-visible,#board [tabindex]:focus,#board [tabindex]:focus-visible{outline:none!important}
#board .capital-hit,#board .castle-realm:focus-visible .capital-hit,#board .castle-realm:hover .capital-hit{stroke:transparent!important;fill:transparent!important}
#board .table-prop:is(:hover,:focus,:focus-visible),
#board .perched-raven-scene:is(:hover,:focus,:focus-visible),
#board .agency:is(:hover,:focus,:focus-visible){filter:drop-shadow(4px 6px 3px #0009) drop-shadow(0 0 2px #dfc898) drop-shadow(0 0 5px #dfc89888)}
#board .castle-realm:is(:hover,:focus,:focus-visible) .royal-standard{filter:drop-shadow(0 0 2px #dfc898) drop-shadow(0 0 5px #dfc89888)}
#board .token:is(:hover,:focus,:focus-visible,.selected){filter:drop-shadow(3px 5px 3px #0009) drop-shadow(0 0 2px #dfc898) drop-shadow(0 0 5px #dfc89888)}

/* Independent castle artwork and alpha-derived halo above the continuous mesh. */
#board .castle-light{opacity:0;transition:opacity .18s;filter:none}
#board .castle-realm:is(:hover,:focus-visible,.castle-lit) .castle-light{opacity:1}
#board .castle-realm .capital-hit{pointer-events:all}
#board .agency:is(:hover,:focus-visible){filter:drop-shadow(0 0 2px #dfc898) drop-shadow(0 0 5px #dfc89888)}

#board .castle-handles{opacity:0;pointer-events:none;transition:opacity .15s}
#board .castle-realm:is(:hover,:focus-within,.resizing) .castle-handles{opacity:1;pointer-events:all}
#board .castle-resize-handle{fill:#e6dbc4;stroke:#4a4031;stroke-width:1;vector-effect:non-scaling-stroke;touch-action:none}
#board .castle-resize-handle:is(.nw,.se){cursor:nwse-resize}
#board .castle-resize-handle:is(.ne,.sw){cursor:nesw-resize}
#board .castle-resize-handle:focus{fill:#fff;stroke:#d8b267;stroke-width:2}
