/* AUTO-GENERATED by apps/rist-world/prepare_css.py. */
/* rist.css is the only runtime stylesheet; canonical inputs live in apps/rist-world/css-source/. */

/* SOURCE: app.css */
*{box-sizing:border-box}html,body,#app{margin:0;min-height:100%;background:#0b0f13;color:#eee6d3;font-family:system-ui,-apple-system,Segoe UI,sans-serif}button,select,input,textarea{font:inherit}.rist{min-height:100dvh;display:grid;grid-template-rows:auto 1fr auto;background:#0b0f13}.topbar,.footer{display:flex;gap:8px;align-items:center;padding:8px;background:#121820;border-color:#6e592c;border-style:solid;border-width:0 0 1px;overflow-x:auto}.footer{border-width:1px 0 0}.brand{font-weight:800;white-space:nowrap}.control{display:grid;gap:2px;min-width:max-content}.control label{font-size:10px;color:#b9af99}.control select,.control input,.topbar button,.footer button{background:#1d2630;color:#f4ead1;border:1px solid #725d30;border-radius:7px;padding:7px 9px}.map-shell{position:relative;min-height:0;display:grid;place-items:center;overflow:hidden;padding:6px}.map{position:relative;width:min(100%,calc((100dvh - 170px)*1.7763));aspect-ratio:961/541;background:#080b0e;border:1px solid #725d30;overflow:hidden;touch-action:none;user-select:none}.world-stage{position:absolute;inset:0;transform-origin:center center;will-change:transform}.world-stage>img.base{width:100%;height:100%;object-fit:fill;display:block;pointer-events:none}.grid{position:absolute;inset:0;pointer-events:none;background-size:var(--cell) var(--cell);opacity:.3}.grid.square{background-image:linear-gradient(to right,#fff 1px,transparent 1px),linear-gradient(to bottom,#fff 1px,transparent 1px)}.grid.hex{background-image:linear-gradient(30deg,#fff3 12%,transparent 12.5%,transparent 87%,#fff3 87.5%),linear-gradient(150deg,#fff3 12%,transparent 12.5%,transparent 87%,#fff3 87.5%),linear-gradient(30deg,#fff3 12%,transparent 12.5%,transparent 87%,#fff3 87.5%);background-position:0 0,0 0,calc(var(--cell)/2) calc(var(--cell)/2)}.piece,.die-result,.gem,.tile{position:absolute;transform:translate(-50%,-50%);z-index:5}.piece{display:grid;place-items:center;width:36px;height:36px;border-radius:50%;border:2px solid #e6c35c;background:#704618;color:white;font-size:9px;font-weight:800}.piece.caravan{width:54px;border-radius:10px}.piece.token{border-radius:5px}.piece.pin{width:24px;height:24px;background:#8e2626;cursor:pointer;box-shadow:0 0 0 3px #fff3}.piece.pin:after{content:'↘';font-size:12px}.tile{z-index:3;max-width:18%;max-height:24%;filter:drop-shadow(0 2px 3px #000)}.die-result{background:#f4ead1;color:#111;padding:6px 8px;border-radius:8px;border:2px solid #6e592c;font-weight:800}.gem{width:28px;height:28px;rotate:45deg;border:2px solid #ddd;background:#4b5563;color:white;display:grid;place-items:center;font-size:10px}.gem span{rotate:-45deg}.sum{font-weight:800;padding:6px 10px;border:1px solid #725d30;border-radius:7px;white-space:nowrap}.card{min-width:92px}.card-modal{position:fixed;inset:0;z-index:50;background:#000a;display:grid;place-items:center;padding:18px}.card-panel{max-width:430px;background:#17202a;border:1px solid #8c7138;border-radius:12px;padding:18px;box-shadow:0 18px 50px #000}.card-panel h2{margin-top:0}.status{position:absolute;left:10px;bottom:10px;background:#071018dd;border:1px solid #6e592c;border-radius:6px;padding:6px 8px;font-size:11px;z-index:8;pointer-events:none}.recurse-banner{position:absolute;inset:0;z-index:12;display:grid;place-items:center;background:#06101bdd;padding:18px}.recurse-card{max-width:420px;background:#17202a;border:1px solid #8c7138;border-radius:12px;padding:18px;text-align:center}
.dice-footer{align-items:stretch}.die-button{min-width:62px!important;width:62px;height:58px;padding:3px!important;display:grid;grid-template-rows:38px 12px;place-items:center;overflow:hidden}.die-button small{font-size:9px;line-height:10px;white-space:nowrap}.die-sprite{display:block;height:38px;width:auto;aspect-ratio:var(--die-aspect,.85);background-repeat:no-repeat;filter:drop-shadow(0 2px 2px #0008)}.rolled-die{position:absolute;z-index:9;height:58px;width:auto;aspect-ratio:var(--die-aspect,.85);transform:translate(-50%,-50%);background-repeat:no-repeat;filter:drop-shadow(0 4px 4px #000a);pointer-events:none}.clear-dice{white-space:nowrap!important;align-self:center}.die-control{display:flex;gap:3px;align-items:stretch}.d5-control select{width:42px;background:#161d24;color:#f5e7c2;border:1px solid #725d30;border-radius:7px;padding:2px;text-align:center}.bonus-d5 select{border-color:#4f9a68}.penalty-d5 select{border-color:#a84d4d}
.mixer-modal{position:fixed;inset:0;z-index:70;background:#020407e8;display:grid;place-items:start center;padding:12px;overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}.character-mixer{width:min(1100px,96vw);max-height:calc(100dvh - 24px);overflow:auto;padding:18px;border:2px solid #8d6a23;border-radius:18px;background:#181510 url('../assets/ui/mixer_sprite_atlas.png') center/cover no-repeat;background-blend-mode:multiply;box-shadow:0 24px 80px #000,inset 0 0 0 2px #d4b25a44;color:#f1e6cc;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}.mixer-titlebar{position:sticky;top:0;z-index:4;display:grid;grid-template-columns:76px 1fr auto;align-items:center;gap:12px;padding:10px 14px;background:#151717f2;border:1px solid #b58a38;border-radius:12px}.character-portrait{width:64px;height:64px;border:2px solid #b58a38;background:#080b0e;display:grid;place-items:center;font-size:9px;color:#b9af99}.character-heading strong{display:block;font-size:20px;letter-spacing:.08em}.character-heading span{display:block;color:#cbbd9c;font-size:11px;margin-top:2px}.mixer-titlebar button,.mixer-identity input,.mixer-notes textarea,.mixer-channel input[type=number],.field-builder input{background:#171a1c;color:#f7edda;border:1px solid #a77b2d;border-radius:8px}.mixer-titlebar button{padding:7px 12px}.mixer-identity{display:grid;grid-template-columns:2fr 1.2fr .7fr 1.2fr;gap:10px;margin:14px 0}.mixer-identity label,.mixer-notes label,.field-builder label{display:grid;gap:5px;font-size:11px;color:#d9c8a4}.mixer-identity input,.field-builder input{padding:9px}.character-tabs{display:flex;gap:5px;overflow-x:auto;margin-bottom:12px}.character-tabs button{white-space:nowrap;background:#15191c;color:#d9c8a4;border:1px solid #715625;border-radius:8px;padding:8px 12px}.character-tabs button.active{background:#5d451b;color:#fff3cf;border-color:#c89c43}.field-builder{position:relative;max-width:520px;margin-bottom:14px}.field-suggestions{position:absolute;left:0;right:0;top:100%;z-index:10;background:#0c1012;border:1px solid #a77b2d;border-radius:8px;box-shadow:0 12px 30px #000;max-height:260px;overflow:auto}.field-suggestions button{width:100%;display:flex;justify-content:space-between;gap:8px;text-align:left;background:#12171a;color:#f1e6cc;border:0;border-bottom:1px solid #3d3320;padding:9px 11px}.field-suggestions button:hover{background:#282116}.field-suggestions small{color:#a99876}.field-suggestions .custom-field{color:#e5bd63}.mixer-channels{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:10px;min-width:720px}.mixer-channel{background:#101416e8;border:1px solid #7b5b25;border-radius:12px;padding:10px;box-shadow:inset 0 0 18px #0008}.channel-name{text-align:center;font-weight:800;margin-bottom:8px}.remove-field{float:right;border:0;background:transparent;color:#b99b63;font-size:18px}.channel-meter{height:180px;display:grid;place-items:center}.channel-meter input[type=range]{writing-mode:vertical-lr;direction:rtl;height:160px;width:24px;accent-color:#c9a34d}.channel-dials{display:grid;grid-template-columns:1fr 1fr;gap:7px}.dial{aspect-ratio:1;display:grid;place-items:center;align-content:center;border-radius:50%;border:2px solid #b48a39;background:radial-gradient(circle,#35302a 0 32%,#17191b 34% 65%,#8f6c2c 67% 72%,#121416 74%);box-shadow:inset 0 0 12px #000,0 2px 8px #0008}.dial span,.dial input{font-weight:900;font-size:18px}.dial small{font-size:8px;color:#d6c49f}.dial input{width:54%;text-align:center;border:0!important;background:transparent!important;padding:0;color:#f7edda}.skill-knob{width:100px;margin:22px auto}.ability-panel{min-height:92px;border:1px dashed #715625;border-radius:8px;display:grid;place-items:center;color:#a99876}.show-hand{width:100%;margin-top:8px;background:#272117;color:#d7bd82;border:1px solid #715625;border-radius:7px;padding:7px}.mixer-notes{margin-top:14px}.mixer-notes textarea{width:100%;resize:vertical;padding:10px;min-height:240px}.mixer-button{font-weight:800}
@media(max-width:800px){.topbar{gap:6px;padding:6px}.brand{font-size:13px}.control select,.control input,.topbar button,.footer button{padding:6px 7px;font-size:12px}.map-shell{padding:2px}.map{width:100%}.footer{padding:6px;gap:6px}.piece{width:32px;height:32px}.die-button{min-width:54px!important;width:54px;height:52px;grid-template-rows:34px 10px}.die-sprite{height:34px;width:auto}.rolled-die{height:52px;width:auto}.d5-control select{width:38px;font-size:11px}.mixer-identity{grid-template-columns:1fr 1fr;min-width:520px}.mixer-channels{grid-template-columns:repeat(4,minmax(150px,1fr));min-width:680px}.channel-meter{height:140px}.channel-meter input[type=range]{height:125px}.character-mixer{width:96vw;max-height:calc(100dvh - 16px);padding:10px}.mixer-modal{padding:8px}.mixer-titlebar{grid-template-columns:58px 1fr auto}.character-portrait{width:50px;height:50px}}


/* Private, owner-scoped spell deck */
.private-spell-row{min-height:9rem;align-items:stretch}
.private-deck-category{flex:0 0 4.7rem}
.private-deck-status{align-self:center;max-width:24rem;margin:.5rem 1rem;color:var(--muted);white-space:normal}
.private-deck-import{flex:0 0 min(24rem,72vw);display:flex;flex-direction:column;justify-content:center;gap:.32rem;padding:.75rem 1rem;border:1px dashed var(--gold);border-radius:.75rem;color:var(--text);cursor:pointer;white-space:normal}
.private-deck-import span{color:var(--muted);font-size:.8rem;line-height:1.25}
.private-deck-import input{width:100%;font-size:.78rem}
.private-deck-controls{flex:0 0 min(20rem,70vw);display:grid;grid-template-columns:minmax(0,1fr) minmax(7rem,.65fr);gap:.45rem;align-content:center;padding:.45rem}
.private-deck-controls input,.private-deck-controls select{width:100%;min-height:2.4rem;border:1px solid var(--gold);border-radius:.55rem;background:#15202b;color:var(--text);padding:.4rem .55rem}
.private-deck-count{grid-column:1/-1;color:var(--muted);font-size:.76rem}
.private-spell-card{flex:0 0 5.2rem;min-height:7.4rem;display:flex;flex-direction:column;justify-content:space-between;gap:.3rem;padding:.55rem .4rem;background:linear-gradient(165deg,#f1ead7,#cfc2a2);color:#1a1712;border-color:#b28a36;white-space:normal}
.private-spell-card small{text-transform:capitalize;font-size:.65rem;color:#5d4b2e}
.private-spell-card strong{font-family:Georgia,serif;font-size:.84rem;line-height:1.08}
.private-spell-card span{font-size:.58rem;line-height:1.1}
.private-spell-modal{position:fixed;inset:0;z-index:90;display:grid;place-items:center;padding:1rem;background:rgba(3,8,13,.78)}
.private-spell-sheet{position:relative;width:min(25rem,92vw);max-height:min(75vh,42rem);overflow:auto;padding:1.25rem;border:2px solid #c49b43;border-radius:1rem;background:linear-gradient(160deg,#f7f1df,#d9cbaa);color:#1a1712;box-shadow:0 1.2rem 3rem #000b}
.private-spell-sheet h2{margin:.35rem 2rem .1rem 0;font-family:Georgia,serif}
.private-spell-sheet dl{display:grid;gap:.3rem;margin:.8rem 0}
.private-spell-sheet dl div{display:grid;grid-template-columns:7rem 1fr;gap:.5rem;padding-bottom:.25rem;border-bottom:1px solid #8a734966}
.private-spell-sheet dt{font-weight:700}.private-spell-sheet dd{margin:0}
.private-spell-description{white-space:pre-wrap;line-height:1.42}
.private-spell-close{position:absolute;right:.6rem;top:.5rem;width:2.3rem;height:2.3rem;border-radius:50%;font-size:1.5rem}
.private-badge{display:inline-block;padding:.2rem .48rem;border-radius:999px;background:#5b1720;color:#fff;font-size:.68rem;letter-spacing:.06em;text-transform:uppercase}
.private-spell-meta{text-transform:capitalize;color:#654f29}
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
@media(max-width:540px){.private-spell-row{min-height:8rem}.private-spell-sheet{max-height:72vh}.private-spell-sheet dl div{grid-template-columns:5.7rem 1fr}}


/* SOURCE: adaptive-grid.css */
.rist{min-width:0;width:100%;overflow:hidden}
.topbar,.footer{min-width:0;max-width:100vw}
.table-workspace{position:relative;min-width:0;min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr);overflow:hidden;background:#0b0f13}
.staging-tray{min-width:0;display:flex;align-items:center;gap:8px;min-height:74px;padding:7px 12px;scroll-padding-inline:12px;overflow-x:auto;overflow-y:hidden;background:#0d1319;border-bottom:1px solid #6e592c;touch-action:pan-x;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;scrollbar-width:none}.staging-tray::-webkit-scrollbar{display:none}
.tray-hint{font-size:11px;color:#8f8879;padding:8px;white-space:nowrap}
.tray-hint strong{display:block;color:#d7be80;font-size:9px;letter-spacing:.14em}.tray-hint span{display:block}
.tray-item{position:relative;box-sizing:border-box;flex:0 0 62px;height:58px;display:grid;grid-template-rows:1fr auto;place-items:center;padding:4px!important;background:#161e26!important;border:1px solid #725d30!important;border-radius:9px!important;color:#eee6d3;touch-action:none;user-select:none}
.tray-item img{display:block;max-width:48px;max-height:36px;object-fit:contain;pointer-events:none}
.tray-item small{max-width:54px;font-size:8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none}
.token-preview{display:grid;place-items:center;width:32px;height:32px;border:2px solid #e6c35c;border-radius:6px;background:#273442;color:#fff;font-size:8px;font-weight:800}
.tile-library-button.active{background:#725d30!important;color:#fff4d2!important;box-shadow:inset 0 0 0 1px #d8b95e}
.tile-browser{position:absolute;z-index:40;top:78px;left:8px;width:min(560px,calc(100% - 16px));height:min(430px,calc(100% - 88px));max-height:min(430px,calc(100% - 88px));display:flex;flex-direction:column;overflow:hidden;border:1px solid #8d7136;border-radius:12px;background:#0e151cf5;color:#eee6d3;box-shadow:0 12px 30px #000c;backdrop-filter:blur(8px)}
.tile-browser>header{display:flex;align-items:center;gap:9px;padding:8px 9px 7px 12px;border-bottom:1px solid #40371f}.tile-browser-title{min-width:0;display:grid;gap:1px}.tile-browser>header strong{color:#f1d68f}.tile-browser>header small{color:#9f998b;font-size:10px}.tileset-upload{margin-left:auto;flex:0 0 34px;width:34px;height:34px;display:grid;place-items:center;border:1px solid #9a7937;border-radius:8px;background:#1b252d;color:#f1d68f;font-size:28px;line-height:1;cursor:pointer}.tileset-upload:active{background:#725d30;color:#fff}.tileset-upload input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.tileset-import-status{padding:5px 10px;background:#182129;color:#cfc5ad;font-size:10px;border-bottom:1px solid #40371f}
.tile-browser-path{display:flex;align-items:end;gap:7px;padding:7px 9px;background:#111920}.tile-browser-path label{display:grid;gap:2px;min-width:0;color:#b7a980;font-size:9px;text-transform:uppercase;letter-spacing:.08em}.tile-browser-path label:nth-of-type(1){flex:.75}.tile-browser-path label:nth-of-type(2),.tile-browser-path label:nth-of-type(3){flex:1}.tile-browser-path select{width:100%;min-width:0;padding:6px 24px 6px 7px;color:#eee6d3;background:#17212a;border:1px solid #69562e;border-radius:6px;font-size:11px}.tile-browser-path>span{padding-bottom:7px;color:#b89951}
.tile-filter-tools{display:flex;gap:7px;align-items:end;padding:0 9px 7px;background:#111920;border-bottom:1px solid #40371f}.tile-filter-tools label{min-width:0;flex:1;display:grid;gap:2px;color:#b7a980;font-size:9px;text-transform:uppercase;letter-spacing:.08em}.tile-filter-tools select,.tile-filter-tools button{min-width:0;padding:6px 8px;color:#eee6d3;background:#17212a;border:1px solid #69562e;border-radius:6px;font-size:10px}.tile-filter-tools button{flex:0 0 auto;color:#f1d68f}.tile-filter-tools button:disabled{opacity:.42}
.tile-tool-row{padding:7px 12px 0;background:#111920}.tile-tool-row label{display:grid;gap:2px;width:min(190px,100%);color:#b7a980;font-size:9px;text-transform:uppercase;letter-spacing:.08em}.tile-tool-row select{width:100%;padding:7px 28px 7px 8px;color:#eee6d3;background:#17212a;border:1px solid #69562e;border-radius:6px;font-size:11px}.tile-browser-grid{min-height:92px;flex:1;display:flex;align-items:flex-start;gap:8px;padding:9px 12px 14px;scroll-padding-inline:12px;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;touch-action:pan-x;scrollbar-width:none}.tile-browser-grid::-webkit-scrollbar{display:none}.tile-browser-grid>p{flex:1 0 100%;margin:18px;color:#9f998b;text-align:center;font-size:12px}
.library-tile{box-sizing:border-box;flex:0 0 68px;min-width:68px!important;width:68px!important;height:68px!important;display:grid!important;place-items:center!important;padding:5px!important;overflow:hidden;background:#161f27!important;border:1px solid #725d30!important;border-radius:8px!important;color:#e8dfcc!important;touch-action:pan-x;user-select:none}.library-tile:active{border-color:#d4b55d!important;background:#24313b!important}.tile-drag-source{width:100%;height:56px;display:grid;place-items:center;touch-action:none;cursor:grab}.library-tile img{display:block;max-width:56px;max-height:56px;object-fit:contain;pointer-events:none}.library-tile>span:last-child{display:none}

.map-shell{position:relative;min-width:0;min-height:0;display:grid;place-items:center;overflow:hidden;padding:6px}
.ocean-world{background-color:#1f6f92;background-image:radial-gradient(ellipse at 28% 20%,#72bad044 0 4%,transparent 24%),radial-gradient(ellipse at 72% 68%,#083d5a55 0 5%,transparent 30%),repeating-linear-gradient(168deg,#3c93af 0 2px,#287d9d 3px 8px,#327f9b 9px 12px);box-shadow:inset 0 0 80px #031f35aa}
.map{aspect-ratio:20/13;width:min(100%,calc((100dvh - 238px)*1.5));max-height:calc(100dvh - 238px)}
.grid{display:none}

/* Viewport grid: 20 columns x 20 rows. */
.map:has(.grid.square)::before,
.map:has(.grid.hex)::before{content:"";position:absolute;inset:0;z-index:7;pointer-events:none}
.map:has(.grid.square)::before{opacity:.42;background-image:linear-gradient(to right,rgba(255,255,255,.78) 1px,transparent 1px),linear-gradient(to bottom,rgba(255,255,255,.78) 1px,transparent 1px);background-size:5% 7.692307%}

/* Catan-style flat-top hexes with a dark keyline and warm visible edge. */
.map:has(.grid.hex)::before{opacity:.94;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='173.205' viewBox='0 0 150 173.205'%3E%3Cg fill='none' stroke-linejoin='round'%3E%3Cg stroke='%23070b0f' stroke-width='5'%3E%3Cpolygon points='0,43.301 25,0 75,0 100,43.301 75,86.603 25,86.603'/%3E%3Cpolygon points='75,43.301 100,0 150,0 175,43.301 150,86.603 100,86.603'/%3E%3Cpolygon points='-37.5,129.904 -12.5,86.603 37.5,86.603 62.5,129.904 37.5,173.205 -12.5,173.205'/%3E%3Cpolygon points='37.5,129.904 62.5,86.603 112.5,86.603 137.5,129.904 112.5,173.205 62.5,173.205'/%3E%3Cpolygon points='112.5,129.904 137.5,86.603 187.5,86.603 212.5,129.904 187.5,173.205 137.5,173.205'/%3E%3C/g%3E%3Cg stroke='%23e7c56b' stroke-width='2.4'%3E%3Cpolygon points='0,43.301 25,0 75,0 100,43.301 75,86.603 25,86.603'/%3E%3Cpolygon points='75,43.301 100,0 150,0 175,43.301 150,86.603 100,86.603'/%3E%3Cpolygon points='-37.5,129.904 -12.5,86.603 37.5,86.603 62.5,129.904 37.5,173.205 -12.5,173.205'/%3E%3Cpolygon points='37.5,129.904 62.5,86.603 112.5,86.603 137.5,129.904 112.5,173.205 62.5,173.205'/%3E%3Cpolygon points='112.5,129.904 137.5,86.603 187.5,86.603 212.5,129.904 187.5,173.205 137.5,173.205'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");background-size:7.5% 8.66025%;background-position:0 0}

/* GPS-style pin. */
.gps-pin{position:relative;display:block;width:22px;height:22px;border-radius:50% 50% 50% 0;transform:rotate(-45deg);background:#d94b3f;border:2px solid #f6e6b3;box-shadow:0 2px 5px #0008}
.gps-pin::after{content:"";position:absolute;width:7px;height:7px;border-radius:50%;background:#fff;left:50%;top:50%;transform:translate(-50%,-50%)}
.piece.pin{display:grid;place-items:center;background:transparent!important;border:0!important;box-shadow:none!important;padding:0;cursor:grab}
.piece.pin::after{content:none!important}
.piece.pin.zoom-pin{width:calc(28px / var(--placement-zoom,1));height:calc(28px / var(--placement-zoom,1));min-width:0;min-height:0}
.piece.pin.zoom-pin .gps-pin{width:78%;height:78%}

.drag-ghost{position:fixed;z-index:1000;width:42px;height:42px;display:grid;place-items:center;transform:translate(-50%,-50%);pointer-events:none;filter:drop-shadow(0 5px 7px #000b)}
.drag-ghost img{max-width:56px;max-height:56px;object-fit:contain}.drag-ghost .gps-pin{width:26px;height:26px}
.tile-cell{position:absolute;z-index:3;box-sizing:border-box;display:grid;place-items:center;transform:translate(-50%,-50%);overflow:hidden;touch-action:none;cursor:grab}.tile-cell img{display:block;width:100%;height:100%;object-fit:contain;pointer-events:none;filter:drop-shadow(0 2px 3px #000)}
.tile-image-crop{position:relative;display:block;width:100%;height:100%;overflow:hidden}.tile-image-crop>img{position:absolute;display:block;width:100%;height:100%;left:0;top:0;object-fit:fill;pointer-events:none}.tile-cell>.tile-image-crop{width:100%;height:100%}.tray-item.tile>.tile-image-crop,.drag-ghost>.tile-image-crop{width:42px;height:42px}
.tile,.piece{touch-action:none;cursor:grab}

/* Compact calibration controls. */
.scale-control{min-width:74px}.scale-control label{white-space:nowrap}.scale-control input{width:74px;min-width:74px;padding-left:7px;padding-right:5px}.unit-control{min-width:66px}.unit-control select{min-width:66px}.scale-button,.encounter-button{white-space:nowrap}.scale-readout{padding:6px 8px;border:1px solid #725d30;border-radius:7px;white-space:nowrap;font-size:11px}.encounter-button{border-color:#a27e34!important}

@media(max-width:800px){
 .scale-control{min-width:58px}.scale-control input{width:58px;min-width:58px;padding:5px}.scale-control label{font-size:9px}.unit-control{min-width:58px}.unit-control select{min-width:58px;padding-left:5px!important;padding-right:5px!important}.scale-button{padding-left:6px!important;padding-right:6px!important}.scale-readout{padding:5px 6px;font-size:10px}
 .staging-tray{min-height:66px;margin-inline:24px;padding:5px 10px;scroll-padding-inline:10px;border-inline:1px solid #40371f;border-radius:8px}.tray-item{height:52px;flex-basis:56px}.map-shell{padding:3px}.map{width:100%;max-height:none}
 .tile-browser{top:70px;max-height:min(390px,calc(100% - 76px))}.tile-browser>header{display:flex;align-items:center;min-height:0;gap:7px;padding-block:7px}.tile-browser-title{flex:1}.tile-browser-path{gap:4px}.tile-browser-grid{padding-inline:10px;scroll-padding-inline:10px}
}

/* Landscape: staging surface moves to the left and the map is centered in the
   remaining viewport. This prevents the wide toolbar from widening the page. */
@media(orientation:landscape) and (max-height:600px){
 .table-workspace{grid-template-columns:96px minmax(0,1fr);grid-template-rows:minmax(0,1fr)}
 .staging-tray{height:100%;min-height:0;display:flex;flex-direction:column;align-items:center;overflow-x:hidden;overflow-y:auto;border-bottom:0;border-right:1px solid #6e592c;padding:6px}
 .tray-hint{white-space:normal;text-align:center;font-size:9px}
 .tray-item{flex:0 0 54px;width:82px;height:54px}
 .tile-browser{top:6px;left:102px;width:min(560px,calc(100% - 110px));max-height:calc(100% - 12px)}
 .map-shell{width:100%;height:100%;padding:3px;place-items:center}
 .map{width:min(100%,calc((100dvh - 132px)*1.5));max-width:100%;max-height:calc(100dvh - 132px)}
}

/* Unified tabletop rails: header, public display, pallet, and footer share one frame. */
.topbar,.public-card-drop,.staging-tray,.footer{box-sizing:border-box;background:#0d1319;border-color:#6e592c;color:#eee6d3}
.asset-type-control{min-width:190px}.asset-type-control select{min-width:190px}
@media(max-width:800px){
 .topbar,.public-card-drop,.staging-tray,.footer{width:auto;max-width:none;margin-inline:24px;border:1px solid #6e592c;border-radius:10px;background:#0d1319;box-shadow:inset 0 1px 0 #b6923b22}
 .topbar{margin-top:7px;margin-bottom:7px;padding-inline:18px;scroll-padding-inline:18px}
 .public-card-drop{margin-block:0 7px;padding:7px 18px;scroll-padding-inline:18px}
 .public-card-empty{box-sizing:border-box;min-width:min(520px,calc(100vw - 86px));height:76px}
 .staging-tray{margin-block:0 7px;padding:7px 20px;scroll-padding-inline:20px}
 .footer{margin-top:7px;margin-bottom:7px;padding-inline:18px;scroll-padding-inline:18px}
 .asset-type-control{min-width:168px}.asset-type-control select{min-width:168px;max-width:168px}
}

/* Keep both physical frame edges visible; only inner rail content may overflow. */
@media(max-width:800px){
 .public-card-drop,.footer{display:flex!important;width:calc(100vw - 48px)!important;min-width:0!important;max-width:calc(100vw - 48px)!important;contain:inline-size;overflow-x:auto!important;overflow-y:hidden!important}
 .public-card-strip{flex:0 0 max-content;min-width:100%;max-width:none}
 .public-card-empty{flex:0 0 calc(100vw - 86px);width:calc(100vw - 86px);min-width:0;max-width:520px}
 .footer>.circular-set{flex:0 0 max-content;min-width:max-content}
}

/* Twenty square columns by thirteen complete square rows. */
.map:has(.grid.square)::before{background-size:5% 7.692307%}
@media(max-width:800px){.public-card-drop,.footer{align-self:center!important}.public-card-strip{min-width:100%;width:max-content}.public-card-empty{flex-basis:auto;width:100%;max-width:none}}

/* Single-screen tabletop: four compact rails and a flexible map row. */
@media(max-width:800px){
 html,body,#app{width:100%;height:100%;min-height:0;overflow:hidden;overscroll-behavior:none}
 .rist{--table-rail-h:72px;width:100vw;max-width:100vw;height:100dvh;min-height:0;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:var(--table-rail-h) var(--table-rail-h) minmax(0,1fr) auto var(--table-rail-h);grid-template-areas:"header" "cards" "map" "hand" "footer";gap:4px;overflow:hidden}
 .topbar{grid-area:header}.public-card-drop{grid-area:cards}.table-workspace{grid-area:map}.hand-rail{grid-area:hand}.footer{grid-area:footer}
 .topbar,.public-card-drop,.staging-tray,.footer{justify-self:center;width:calc(100% - 48px)!important;min-width:0!important;max-width:calc(100% - 48px)!important;height:var(--table-rail-h);min-height:var(--table-rail-h);max-height:var(--table-rail-h);margin:0!important;padding-block:6px!important;overflow-x:auto;overflow-y:hidden}
 .topbar{padding-inline:18px!important}.public-card-drop{padding-inline:12px!important}.footer{padding-inline:12px!important}
 .public-card-strip{width:max-content;min-width:100%;height:58px;align-items:center}
 .public-card-empty{flex:1 0 calc(100% - 2px);width:auto;min-width:0;max-width:none;height:58px;padding:4px 10px;font-size:16px}
 .table-workspace{height:100%;min-height:0;grid-template-rows:var(--table-rail-h) minmax(0,1fr);gap:4px}
 .staging-tray{width:calc(100% - 48px)!important;max-width:calc(100% - 48px)!important;padding-inline:20px!important;scroll-padding-inline:20px!important}
 .map-shell{height:100%;min-height:0;padding:0 3px!important}
 .map{height:auto;max-height:100%;width:min(100%,calc((100dvh - 300px)*20/13));max-width:100%;aspect-ratio:20/13}
 .footer>.circular-set{height:58px;min-height:58px;align-items:stretch!important}
 .dice-footer{--footer-slot-h:58px!important}
}


/* AWS-backed 4x3 header icon sheet. Each control crops one fixed cell. */
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.icon-header .header-circular-set{align-items:center}
.header-icon-button{box-sizing:border-box;flex:0 0 58px!important;width:58px!important;height:58px!important;min-width:58px!important;padding:3px!important;display:grid!important;place-items:center!important;overflow:hidden}
.header-icon{display:block;flex:0 0 auto;width:50px;height:50px;background-image:url("https://d2d6rnm6fnsp89.cloudfront.net/ui/header/shaelvien-header-icons.png?v=BJnQJ-XDKkunnsddAtV7c6QE7w-FeEt6");background-repeat:no-repeat;background-size:400% 300%;filter:drop-shadow(0 2px 2px #0008);pointer-events:none}
.icon-encounter{background-position:0 0}.icon-assets{background-position:33.333% 0}.icon-browse{background-position:66.667% 0}.icon-role{background-position:100% 0}
.icon-grid-square{background-position:0 50%}.icon-grid-hex{background-position:33.333% 50%}.icon-grid-none{background-position:0 50%;opacity:.42}.icon-unit{background-position:66.667% 50%}.icon-scale{background-position:100% 50%}
.icon-save{background-position:0 100%}.icon-load{background-position:33.333% 100%}.icon-exit{background-position:66.667% 100%}.icon-pin{background-position:100% 100%}
.icon-select-control{box-sizing:border-box;position:relative;flex:0 0 auto!important;height:58px;min-width:74px!important;padding:2px!important;display:flex!important;align-items:center!important;gap:2px;overflow:hidden}
.icon-select-control .header-icon{width:50px;height:50px}
.icon-select-control select{width:auto;max-width:168px;min-width:0;height:48px;padding-inline:6px 22px!important}
.icon-select-control.compact-select select{max-width:76px}
.icon-header .asset-type-control{min-width:220px!important}.icon-header .asset-type-control select{min-width:164px}
@media(max-width:800px){
 .header-icon-button{flex-basis:58px!important}
 .icon-header .header-circular-set{gap:7px}
 .icon-select-control{flex:0 0 126px!important;min-width:126px!important}
 .icon-select-control.compact-select{flex-basis:112px!important;min-width:112px!important}
 .icon-header .asset-type-control{flex-basis:228px!important;min-width:228px!important}
}


/* Icon-only native dropdowns: the transparent select covers the icon, so the
   entire tile opens the platform picker while option text stays accessible. */
.icon-header .icon-select-control,
.icon-header .icon-select-control.compact-select,
.icon-header .asset-type-control{box-sizing:border-box;position:relative;flex:0 0 58px!important;width:58px!important;min-width:58px!important;max-width:58px!important;height:58px!important;padding:3px!important;display:grid!important;place-items:center!important;overflow:hidden;border:1px solid #725d30;border-radius:9px;background:#161e26}
.icon-header .icon-select-control .header-icon{width:50px;height:50px}
.icon-header .icon-select-control select,
.icon-header .asset-type-control select{position:absolute!important;inset:0!important;z-index:2;width:100%!important;min-width:100%!important;max-width:100%!important;height:100%!important;margin:0!important;padding:0!important;border:0!important;opacity:0!important;cursor:pointer;-webkit-appearance:none;appearance:none}
.icon-header .icon-select-control:focus-within{border-color:#d4b55d;box-shadow:inset 0 0 0 1px #d4b55d}
@media(max-width:800px){
 .icon-header .icon-select-control,
 .icon-header .icon-select-control.compact-select,
 .icon-header .asset-type-control{flex-basis:58px!important;min-width:58px!important;max-width:58px!important}
}


/* Match the hex overlay to the square grid: same pale line color, comparable
   cell footprint, and no heavy black/gold double stroke. */
.map:has(.grid.hex)::before{opacity:.42;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='173.205' viewBox='0 0 150 173.205'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='2' stroke-linejoin='round'%3E%3Cpolygon points='0,43.301 25,0 75,0 100,43.301 75,86.603 25,86.603'/%3E%3Cpolygon points='75,43.301 100,0 150,0 175,43.301 150,86.603 100,86.603'/%3E%3Cpolygon points='-37.5,129.904 -12.5,86.603 37.5,86.603 62.5,129.904 37.5,173.205 -12.5,173.205'/%3E%3Cpolygon points='37.5,129.904 62.5,86.603 112.5,86.603 137.5,129.904 112.5,173.205 62.5,173.205'/%3E%3Cpolygon points='112.5,129.904 137.5,86.603 187.5,86.603 212.5,129.904 187.5,173.205 137.5,173.205'/%3E%3C/g%3E%3C/svg%3E");background-size:10% 15.384615%;background-position:0 0}

/* One compact rail height and one vertical rhythm across the tabletop. */
@media(max-width:800px){
 .rist{--table-rail-h:64px;--table-gap:7px;grid-template-rows:var(--table-rail-h) var(--table-rail-h) minmax(0,1fr) auto var(--table-rail-h);gap:var(--table-gap)}
 .table-workspace{grid-template-rows:var(--table-rail-h) minmax(0,1fr);gap:var(--table-gap)}
 .topbar,.public-card-drop,.staging-tray,.footer{box-sizing:border-box;height:var(--table-rail-h)!important;min-height:var(--table-rail-h)!important;max-height:var(--table-rail-h)!important;padding-block:2px!important;align-items:center!important}
 .topbar{align-content:center!important}
 .public-card-strip,.public-card-empty,.footer>.circular-set{height:58px!important;min-height:58px!important}
 .staging-tray{padding-block:3px!important}
}


/* Consolidated scale control, centered icon cells, stateful door, and rails
   locked to the same physical viewport width. */
.icon-header .header-circular-set{height:58px;min-height:58px;align-items:center!important}
.icon-header .header-icon-button,.icon-header .icon-select-control{align-self:center!important;place-items:center!important}
.icon-header .header-icon{margin:auto}
.scale-stack{box-sizing:border-box;flex:0 0 78px;width:78px;height:58px;display:grid;grid-template-rows:30px 22px;gap:2px;align-content:center;padding:2px;border:1px solid #725d30;border-radius:9px;background:#161e26}
.scale-stack input{box-sizing:border-box;width:100%;height:30px;min-width:0;padding:2px 6px;border:0;border-bottom:1px solid #725d30;border-radius:5px;background:#1b252d;color:#f5ecd7;text-align:center;font-size:14px}
.scale-stack output{display:grid;place-items:center;min-width:0;overflow:hidden;color:#d9ccb0;font-size:9px;line-height:1;white-space:nowrap}
.door-button{position:relative}
.door-button .door-label{position:absolute;z-index:2;left:7px;top:24px;width:29px;color:#172027;text-shadow:0 1px #f5e4bd;font-size:7px;font-weight:900;line-height:1;text-align:center;pointer-events:none}
.door-button.logged-out .icon-exit{transform:scaleX(-1)}
@media(max-width:800px){
 .topbar,.public-card-drop,.staging-tray,.footer{box-sizing:border-box!important;justify-self:center!important;width:calc(100dvw - 48px)!important;min-width:calc(100dvw - 48px)!important;max-width:calc(100dvw - 48px)!important}
 .public-card-strip{box-sizing:border-box;min-width:100%!important}
 .footer>.circular-set{box-sizing:border-box}
}

/* Map tiles own long-press gestures; Safari must not open text/image lookup. */
.tile-cell,.tile-cell *{-webkit-user-select:none!important;user-select:none!important;-webkit-touch-callout:none!important}
.tile-cell img{-webkit-user-drag:none!important;pointer-events:none!important}

.pin-label-callout{position:absolute;z-index:9;transform:translate(-50%,calc(-100% - 16px));max-width:18rem;padding:4px 8px;border:1px solid #b78d35;border-radius:7px;background:#071018e8;color:#f4ead1;font-weight:800;font-size:10px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;pointer-events:none;box-shadow:0 2px 8px #000a}
.pin-label-editor{display:grid;gap:4px;color:#cdbb91;font-size:11px}.pin-label-editor input{min-width:190px;background:#121b24;color:#f4ead1;border:1px solid #8c7138;border-radius:7px;padding:7px 9px}
.locked-tile-menu .danger{border-color:#a95151;color:#ffd6d0}


/* Card library: same map-overlay behavior as the tile library, with card geometry. */
.card-browser{inset:0;top:0;left:0;width:100%;height:100%;max-height:none;border-radius:0;z-index:43}
.card-create-toggle{margin-left:auto;flex:0 0 36px;width:36px;height:36px;border:1px solid #9a7937;border-radius:8px;background:#1b252d;color:#f1d68f;font-size:28px;line-height:1}
.custom-card-form{display:grid;grid-template-columns:1.2fr .7fr 1fr auto;gap:7px;align-items:end;padding:8px 10px;border-bottom:1px solid #40371f;background:#111920}
.custom-card-form label{display:grid;gap:3px;color:#b7a980;font-size:9px;text-transform:uppercase;letter-spacing:.08em}
.custom-card-form input,.custom-card-form select,.custom-card-form textarea,.custom-card-form button,.card-browser-filters input,.card-browser-filters select{box-sizing:border-box;width:100%;min-height:36px;border:1px solid #80662f;border-radius:7px;background:#17212a;color:#eee6d3;padding:6px 8px}
.custom-card-form textarea{height:36px;resize:vertical}.custom-card-form button{width:auto;color:#f1d68f;font-weight:800}
.card-browser-filters{display:grid;grid-template-columns:.7fr .65fr .8fr 1.5fr;gap:7px;padding:7px 9px;border-bottom:1px solid #40371f;background:#111920}
.card-browser-filters label{display:grid;gap:2px;min-width:0;color:#b7a980;font-size:9px;text-transform:uppercase;letter-spacing:.08em}
.card-library-import{margin:10px;flex:none;max-width:430px}
.card-library-workspace{display:grid;grid-template-columns:minmax(0,1fr) minmax(180px,27%);flex:1;min-height:0;overflow:hidden}
.card-library-results{display:grid;grid-template-columns:repeat(auto-fill,minmax(86px,1fr));align-content:start;gap:9px;padding:10px;overflow:auto;overscroll-behavior:contain}
.library-playing-card{position:relative;justify-self:center;width:min(100%,112px);aspect-ratio:2.5/3.5;display:grid;grid-template-rows:minmax(0,1fr) auto;border:1px solid #80662f;border-radius:9px;background:#17212a;overflow:hidden;box-shadow:0 4px 10px #0008;touch-action:manipulation}
.library-card-face{min-width:0;display:flex;flex-direction:column;justify-content:flex-start;gap:5px;padding:10px 7px;border:0;background:linear-gradient(#20303c,#10171d);color:#eee6d3;text-align:left}
.library-card-face small{color:#c7a95e;font-size:8px;text-transform:uppercase}.library-card-face strong{font-family:Georgia,serif;font-size:13px;line-height:1.05}.library-card-face span{display:-webkit-box;overflow:hidden;color:#aaa18e;font-size:8px;line-height:1.25;-webkit-line-clamp:5;-webkit-box-orient:vertical}
.library-card-add{min-height:27px;border:0;border-top:1px solid #80662f;background:#18242d;color:#f1d68f;font-size:8px;font-weight:800}
.character-spellbook-drop{min-width:0;display:flex;flex-direction:column;gap:8px;padding:10px;border-left:1px solid #80662f;background:#0c1217;overflow:auto}
.character-spellbook-drop>header{display:grid;gap:2px}.character-spellbook-drop>header strong{color:#f1d68f;font-family:Georgia,serif}.character-spellbook-drop>header small,.character-spellbook-drop>p{color:#9f998b;font-size:9px}
.spellbook-card-strip{display:grid;grid-template-columns:repeat(auto-fill,minmax(68px,1fr));gap:7px}
.spellbook-mini-card{aspect-ratio:2.5/3.5;display:flex;flex-direction:column;justify-content:flex-end;gap:3px;padding:7px;border:1px solid #80662f;border-radius:7px;background:linear-gradient(#20303c,#10171d);color:#eee6d3;text-align:left;overflow:hidden}.spellbook-mini-card strong{font-size:9px}.spellbook-mini-card small{font-size:7px;color:#c7a95e}
.card-detail-spellbook{width:100%;min-height:40px;border:1px solid #80662f;border-radius:8px;background:#17212a;color:#f1d68f;font-weight:800}
.spellbook-pane{height:100%;overflow:auto}.spellbook-pane>header{padding:9px 12px}.character-sheet-spellbook{display:grid;grid-template-columns:repeat(auto-fill,minmax(72px,1fr));gap:8px;padding:10px}.character-sheet-spellbook>p{grid-column:1/-1;color:#766c5c;font-size:11px}
.character-spell-card{position:relative;aspect-ratio:2.5/3.5;border:1px solid #c9ad77;border-radius:9px;background:#f0e8d8;overflow:hidden}.character-spell-card>button:first-child{width:100%;height:100%;display:flex;flex-direction:column;justify-content:flex-end;gap:3px;padding:8px;border:0;background:transparent;color:#55452f;text-align:left}.character-spell-card small{font-size:7px}.character-spell-card strong{font-family:Georgia,serif;font-size:10px}.remove-spell-card{position:absolute;top:3px;right:3px;width:24px;height:24px;border:1px solid #ad9260;border-radius:50%;background:#fff9;color:#6a3b2e}
@media(max-width:700px){
 .card-browser-filters{grid-template-columns:1fr 1fr}.custom-card-form{grid-template-columns:1fr 1fr}.custom-card-description{grid-column:1/-1}
 .card-library-workspace{grid-template-columns:1fr;grid-template-rows:minmax(0,1fr) 104px}.character-spellbook-drop{border-left:0;border-top:1px solid #80662f;padding:7px}.character-spellbook-drop>header small{display:none}.spellbook-card-strip{display:flex;overflow-x:auto}.spellbook-mini-card{flex:0 0 58px;height:80px}
 .card-library-results{grid-template-columns:repeat(auto-fill,minmax(74px,1fr));gap:7px;padding:8px}.library-playing-card{max-width:94px}
}


/* SOURCE: spatial-surface.css */
/*
 * Recursive map surfaces are asset-backed. An unpopulated spatial address must
 * stay neutral until a real terrain asset is placed or loaded for that address.
 * This intentionally overrides the legacy procedural .ocean-world paint.
 */
.world-stage > .ocean-world {
    background: #0b0f13 !important;
    background-image: none !important;
    box-shadow: none !important;
}


/* SOURCE: hand-rail.css */
/* RIST libraries behave like decks spread across a tabletop. */
.library-deck-toolbar{display:flex;align-items:center;gap:.45rem;padding:.35rem .45rem;border-top:1px solid rgba(216,195,138,.18);border-bottom:1px solid rgba(216,195,138,.18);background:rgba(4,12,17,.84);overflow-x:auto;scrollbar-width:thin}
.library-deck-toolbar label{display:flex;align-items:center;gap:.3rem;color:#b8b08d;font:700 .62rem/1 system-ui,-apple-system,sans-serif;white-space:nowrap}
.library-deck-toolbar select,.library-deck-toolbar input{min-height:30px;border:1px solid rgba(216,195,138,.3);border-radius:6px;background:#0d181d;color:#ead9aa;padding:.25rem .42rem}
.library-deck-toolbar button{min-height:30px;border:1px solid rgba(216,195,138,.34);border-radius:6px;background:#172429;color:#ead9aa;padding:.3rem .58rem}
.library-deck-rail{display:flex;align-items:stretch;gap:.55rem;padding:.55rem;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x proximity;scrollbar-width:thin;min-height:120px;background:linear-gradient(180deg,rgba(4,11,15,.7),rgba(8,17,22,.92))}
.library-deck-rail>*{flex:0 0 auto;scroll-snap-align:start}
.library-deck-folder{appearance:none;position:relative;width:82px;min-height:112px;border:0;background:transparent;padding:0;color:#ead9aa;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:.28rem;text-align:center;cursor:pointer}
.library-deck-folder .deck-stack{position:relative;width:62px;height:86px;display:block;filter:drop-shadow(0 4px 4px rgba(0,0,0,.48))}
.library-deck-folder .deck-stack::before,.library-deck-folder .deck-stack::after{content:"";position:absolute;inset:0;border-radius:7px;border:1px solid rgba(216,195,138,.42);background:#111d21}
.library-deck-folder .deck-stack::before{transform:translate(5px,-3px);opacity:.72}
.library-deck-folder .deck-stack::after{transform:translate(2px,-1px);opacity:.88}
.library-deck-folder .hand-toggle-card-back{position:absolute;inset:0;z-index:2;width:62px;height:86px;border-radius:7px;background-size:cover;background-position:center;box-shadow:inset 0 0 0 1px rgba(216,195,138,.42)}
.library-deck-folder strong{max-width:82px;font:700 .65rem/1.05 Georgia,'Times New Roman',serif;overflow-wrap:anywhere;text-shadow:0 1px 2px #000}
.library-deck-folder small{color:#819295;font:600 .52rem/1 system-ui,-apple-system,sans-serif;text-transform:uppercase;letter-spacing:.07em}
.library-deck-folder.active .deck-stack{filter:drop-shadow(0 0 7px rgba(216,195,138,.28)) drop-shadow(0 4px 4px rgba(0,0,0,.48))}
.library-deck-folder.active strong{color:#fff0c3}
.library-deck-divider{width:1px;min-height:96px;background:linear-gradient(transparent,rgba(216,195,138,.32),transparent);margin:0 .05rem}
.library-deck-rail .library-playing-card{margin:0}
.library-deck-rail .library-tile{width:98px;min-width:98px}
.library-deck-page{appearance:none;width:72px;min-height:108px;border:1px dashed rgba(216,195,138,.42);border-radius:8px;background:rgba(20,30,34,.76);color:#ead9aa;font:700 .68rem/1.1 Georgia,'Times New Roman',serif}
.library-deck-empty{align-self:center;color:#8fa0a2;font:600 .7rem/1.3 system-ui,-apple-system,sans-serif;padding:1rem}
.unified-card-library .card-path-bar{display:none!important}
.unified-card-library .card-library-results{display:block!important;overflow:visible!important;padding:0!important}
.unified-card-library .card-library-workspace{display:block!important}
.unified-card-library .character-spellbook-drop{margin:.45rem .55rem .55rem}
.tile-browser.library-deck-browser .tile-browser-path{display:none!important}
.tile-browser.library-deck-browser .tile-browser-slider{display:block!important;min-height:118px}
.tile-browser.library-deck-browser .tile-browser-grid{display:block!important;padding:0!important}
@media(max-width:800px){.library-deck-toolbar{padding-left:max(.35rem,env(safe-area-inset-left));padding-right:max(.35rem,env(safe-area-inset-right))}.library-deck-rail{gap:.42rem;padding:.45rem;min-height:112px}.library-deck-folder{width:74px;min-height:104px}.library-deck-folder .deck-stack,.library-deck-folder .hand-toggle-card-back{width:56px;height:78px}.library-deck-folder strong{max-width:74px;font-size:.61rem}.library-deck-rail .library-tile{width:90px;min-width:90px}}

.hand-rail{display:flex;gap:8px;align-items:stretch;padding:7px 50%;background:#0e141a;border-top:1px solid #40351f;border-bottom:1px solid #6e592c;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;scroll-padding-inline:50%;-webkit-overflow-scrolling:touch;overscroll-behavior-inline:contain;scrollbar-width:none}.hand-rail::-webkit-scrollbar{display:none}.hand-card{position:relative;flex:0 0 154px;min-height:102px;padding:7px 7px 7px 45px;border:1px solid #8a6c31;border-radius:9px;background:linear-gradient(#211c14,#11161b);box-shadow:0 3px 10px #0009;scroll-snap-align:center;scroll-snap-stop:always}.hand-card header{display:grid;gap:1px}.hand-card header strong{font-size:12px;color:#f2dfad;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.hand-card header span{font-size:8px;text-transform:uppercase;letter-spacing:.08em;color:#9f9275}.hand-card-value{font-size:23px;font-weight:900;line-height:34px;text-align:center;color:#fff2ca}.hand-card-tools{display:grid;grid-template-columns:24px 1fr 24px 22px;gap:3px}.hand-card-tools button{min-width:0;padding:3px;border:1px solid #675126;border-radius:5px;background:#192027;color:#e8d8b5;font-size:10px}.roll-card-button{font-weight:800}.hand-rail-empty{flex:0 0 min(430px,82vw);scroll-snap-align:center;align-self:center;text-align:center;padding:10px 14px;border:1px dashed #5d4b2b;border-radius:9px;color:#9f9275;background:#11171c;font-size:10px;white-space:normal}.dicebag-button{position:absolute;left:4px;bottom:4px;width:39px;height:49px;padding:0;border:0;background:transparent;color:#f1d49b;filter:drop-shadow(0 2px 3px #000a);overflow:visible}.dicebag-button img{display:block;width:100%;height:100%;object-fit:contain;pointer-events:none}.dicebag-button:active{transform:translateY(1px) scale(.97)}.bag-count{position:absolute;right:-3px;bottom:-2px;min-width:17px;height:17px;padding:0 3px;border-radius:9px;background:#111820e8;border:1px solid #b98b35;color:#f1d49b;font-size:9px;line-height:15px;font-weight:800}.dicebag-modal{position:fixed;inset:0;z-index:85;background:#000d;display:grid;place-items:center;padding:12px}.dicebag-workspace{width:min(680px,96vw);max-height:92dvh;overflow:auto;background:radial-gradient(circle at 50% 10%,#302114,#11171c 60%);border:2px solid #91702f;border-radius:16px;padding:14px;box-shadow:0 20px 60px #000}.dicebag-title{display:flex;justify-content:space-between;align-items:center;gap:12px}.dicebag-title strong,.dicebag-title span{display:block}.dicebag-title span{font-size:10px;color:#ad9d7c}.dicebag-workspace button,.dicebag-workspace input,.dicebag-workspace select{background:#1a2229;color:#f3e6c7;border:1px solid #755d2c;border-radius:6px;padding:6px}.physical-bag{position:relative;width:min(320px,76vw);height:min(390px,58dvh);margin:10px auto 8px;display:grid;place-items:center;background:transparent}.physical-bag img{display:block;max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;filter:drop-shadow(0 12px 24px #000a)}.bag-summary{position:absolute;left:50%;bottom:11%;transform:translateX(-50%);padding:4px 9px;border-radius:12px;background:#111820d9;border:1px solid #b98b35;color:#f5deb0;text-align:center;font-size:12px;font-weight:800;white-space:nowrap}.dicebag-help{font-size:11px;color:#b8aa8e;text-align:center}.dicebag-add{display:flex;gap:5px;overflow-x:auto;padding:5px 0 10px}.dicebag-add button{white-space:nowrap;min-width:48px}.dicebag-entries{display:grid;gap:6px}.dicebag-entry{display:grid;grid-template-columns:minmax(80px,1fr) 90px 100px auto;gap:6px;align-items:end;padding:7px;border:1px solid #3f3828;border-radius:7px;background:#0d1216}.dicebag-entry label{display:grid;gap:2px;font-size:9px;color:#b8aa8e}.dicebag-entry input,.dicebag-entry select{width:100%}.empty-bag{padding:18px;text-align:center;border:1px dashed #5f5031;border-radius:7px;color:#9b9079}.roll-bag-now{width:100%;margin-top:10px;font-weight:800;border-color:#b58a38!important;background:#362813!important}@media(max-width:700px){.hand-card{flex-basis:140px;padding-left:42px}.hand-card-tools{grid-template-columns:22px 1fr 22px 20px}.dicebag-entry{grid-template-columns:1fr 78px}.dicebag-entry>button{grid-column:1/-1}.dicebag-entry label:nth-of-type(2){grid-column:auto}.hand-rail{padding-block:6px}.physical-bag{height:min(330px,54dvh)}.dicebag-button{width:36px;height:46px}}

/* The map pin is dragged only from the token rail. Placed pins are stationary and open their menu on tap. */
.token-pin-source{touch-action:none;-webkit-user-select:none;user-select:none;display:grid;place-items:center;min-width:64px;min-height:64px;cursor:grab}
.token-pin-source:active{cursor:grabbing}
.token-pin-source .map-pin-icon{width:48px;height:48px;pointer-events:none}
.placed-pin{cursor:pointer;touch-action:manipulation}

/* One map-pin artwork authority: the AWS/CloudFront asset synced from wwwroot/assets/ui/map-pin.svg. */
.map-pin-icon{display:block;width:22px;height:22px;background-color:transparent!important;background-image:url("https://d2d6rnm6fnsp89.cloudfront.net/assets/ui/map-pin.svg?v=20260829-aws-1")!important;background-position:center!important;background-repeat:no-repeat!important;background-size:contain!important;border:0!important;border-radius:0!important;transform:none!important;box-shadow:none!important;box-sizing:border-box}
.map-pin-icon::before,.map-pin-icon::after{content:none!important}


/* SOURCE: dice-geometry.css */
/* Footer dice use optimized 256x256 source frames.
   Keep every source frame square and scale both axes together. */
.dice-footer .die-button{
 display:grid!important;
 grid-template-rows:1fr!important;
 place-items:center!important;
 overflow:hidden;
}
.dice-footer .die-sprite{
 width:44px!important;
 height:44px!important;
 min-width:44px!important;
 min-height:44px!important;
 aspect-ratio:1/1!important;
 background-repeat:no-repeat;
 background-color:transparent!important;
 background-origin:border-box;
 background-clip:border-box;
 justify-self:center;
 align-self:center;
 flex:none;
 transform:none!important;
}

/* Ordinary dice are square and exactly as tall as a footer card. */
.dice-footer .circular-set>.die-button{
 flex:0 0 var(--footer-slot-h)!important;
 width:var(--footer-slot-h)!important;
 min-width:var(--footer-slot-h)!important;
 height:var(--footer-slot-h)!important;
 min-height:var(--footer-slot-h)!important;
 max-height:var(--footer-slot-h)!important;
 padding:6px!important;
}

/* Clear Dice shares the card height but is intentionally rectangular. */
.dice-footer .clear-dice{
 flex:0 0 calc(var(--footer-slot-h) + 18px)!important;
 width:calc(var(--footer-slot-h) + 18px)!important;
 min-width:calc(var(--footer-slot-h) + 18px)!important;
 height:var(--footer-slot-h)!important;
 min-height:var(--footer-slot-h)!important;
 max-height:var(--footer-slot-h)!important;
 align-self:stretch!important;
 white-space:normal!important;
 line-height:1.1!important;
 text-align:center;
 padding:8px 12px!important;
}

/* Each D5 is a square die with a short horizontal value bar below it.
   The square plus the bar equals the card height. */
.dice-footer .d5-control{
 --d5-value-h:24px;
 --d5-square:calc(var(--footer-slot-h) - var(--d5-value-h));
 position:relative!important;
 flex:0 0 var(--d5-square)!important;
 width:var(--d5-square)!important;
 min-width:var(--d5-square)!important;
 height:var(--footer-slot-h)!important;
 min-height:var(--footer-slot-h)!important;
 max-height:var(--footer-slot-h)!important;
 display:grid!important;
 grid-template-columns:var(--d5-square)!important;
 grid-template-rows:var(--d5-square) var(--d5-value-h)!important;
 gap:0!important;
 align-items:stretch!important;
}
.dice-footer .d5-control .die-button{
 grid-column:1!important;
 grid-row:1!important;
 width:var(--d5-square)!important;
 min-width:var(--d5-square)!important;
 max-width:var(--d5-square)!important;
 height:var(--d5-square)!important;
 min-height:var(--d5-square)!important;
 max-height:var(--d5-square)!important;
 padding:4px!important;
 border-radius:10px 10px 0 0!important;
}
.dice-footer .d5-control select{
 position:static!important;
 grid-column:1!important;
 grid-row:2!important;
 z-index:2;
 display:block!important;
 width:var(--d5-square)!important;
 min-width:var(--d5-square)!important;
 max-width:var(--d5-square)!important;
 height:var(--d5-value-h)!important;
 min-height:var(--d5-value-h)!important;
 max-height:var(--d5-value-h)!important;
 padding:1px 18px 1px 6px!important;
 margin:0!important;
 border-radius:0 0 7px 7px!important;
 text-align:center;
 text-align-last:center;
}
.dice-footer .d5-control .die-sprite{
 width:34px!important;
 height:34px!important;
 min-width:34px!important;
 min-height:34px!important;
}

.rolled-die{
 width:50px!important;
 height:50px!important;
 aspect-ratio:1/1!important;
 background-repeat:no-repeat;
 background-color:transparent!important;
 background-origin:border-box;
 background-clip:border-box;
 transform:translate(-50%,-50%) translate(var(--collision-x,0px),var(--collision-y,0px))!important;
}

.character-footer-button{flex:0 0 54px!important;width:54px!important;height:52px!important;padding:7px!important;display:grid!important;place-items:center!important;background:#1d2630!important;border:1px solid #725d30!important;border-radius:9px!important;color:#f4ead1!important;touch-action:manipulation;cursor:pointer}
.character-footer-button svg{width:31px;height:31px;display:block;fill:currentColor;pointer-events:none}
.character-footer-button:active{transform:translateY(1px);background:#2b3743!important}

@media(max-width:800px){
 .dice-footer .die-sprite{width:42px!important;height:42px!important;min-width:42px!important;min-height:42px!important}
 .dice-footer .d5-control{--d5-value-h:23px}
 .dice-footer .d5-control .die-sprite{width:32px!important;height:32px!important;min-width:32px!important;min-height:32px!important}
 .rolled-die{width:44px!important;height:44px!important}
 .character-footer-button{flex-basis:50px!important;width:50px!important;height:48px!important;padding:6px!important}
 .character-footer-button svg{width:29px;height:29px}
}


/* SOURCE: tabletop-dials-mobile.css */
/* RIST tabletop rails: physical horizontal dial behavior without distorting items. */
.circular-rail{display:flex!important;flex-flow:row nowrap!important;align-items:stretch!important;overflow-x:auto!important;overflow-y:hidden!important;-webkit-overflow-scrolling:touch;overscroll-behavior-inline:none;scrollbar-width:none;scroll-snap-type:none!important;padding-inline:0!important;gap:0!important;width:100%!important;max-width:100vw!important}
.circular-rail::-webkit-scrollbar{display:none}
.circular-set{display:flex!important;flex-flow:row nowrap!important;align-items:center!important;gap:8px!important;flex:0 0 max-content!important;width:max-content!important;min-width:max-content!important;max-width:none!important;padding:8px!important;white-space:nowrap!important}
.header-circular-set,.dice-footer .circular-set,.hand-rail .circular-set{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;width:max-content!important;min-width:max-content!important}
.header-circular-set{align-items:end!important}
.dice-footer .circular-set{align-items:stretch!important}
.hand-rail .circular-set{align-items:stretch!important;padding:6px!important;gap:8px!important}
.circular-set>*{flex:0 0 auto!important;scroll-snap-align:none!important;min-width:0}
.circular-set>.control{display:grid!important;grid-auto-flow:row!important;width:auto!important;min-width:max-content!important}
.circular-set>.control select,.circular-set>.control input{width:auto!important;min-width:max-content!important;max-width:none!important}
.circular-rail.is-circular-ready{scroll-behavior:auto}
.hand-circular-set{min-width:max-content!important}

/* Keep each rail physically thin: content travels sideways, never downward. */
.topbar,.footer,.hand-rail{min-height:0!important;height:auto!important}
.footer .die-button,.footer .character-footer-button,.footer .die-control,.footer .sum,.footer .clear-dice,.footer .card{flex:0 0 auto!important}
.dice-footer .die-button,.dice-footer .character-footer-button,.dice-footer .die-control,.dice-footer .sum,.dice-footer .clear-dice,.dice-footer .card,.hand-rail .hand-card{scroll-snap-stop:always}

/* Character window: landscape keeps the mixing-board layout; portrait becomes a wrapped sheet. */
@media (orientation:portrait) and (max-width:800px){
 .mixer-modal{padding:5px;place-items:start center}
 .character-mixer{width:calc(100vw - 10px);max-height:calc(100dvh - 10px);padding:8px;border-radius:14px;overflow-x:hidden}
 .console-identity{grid-template-columns:82px 1fr 1fr!important;min-width:0!important}
 .console-identity .character-portrait{grid-row:span 2;min-height:86px}
 .console-identity label{min-width:0}.console-identity input{width:100%;min-width:0}
 .pool-strip,.skill-strip{max-width:100%;overflow-x:auto}
 .notebook-tabs{display:flex;flex-wrap:wrap;overflow:visible;gap:5px}
 .notebook-tabs button{flex:1 1 30%;min-width:max-content}
 .console-builder{max-width:none;width:100%;margin-bottom:10px}
 .console-builder input{width:100%}
 .topbar .circular-set,.footer .circular-set,.hand-rail .circular-set{flex-direction:row!important;flex-wrap:nowrap!important;width:max-content!important;min-width:max-content!important}

 /* Keyboard/focus mode: keep the console alive and devote visible viewport to search. */
 .character-console:has(.console-builder input:focus) .console-identity,
 .character-console:has(.console-builder input:focus) .console-bank,
 .character-console:has(.console-builder input:focus) .console-notebook{display:none}
 .character-console:has(.console-builder input:focus){padding-top:42px;min-height:calc(100dvh - 10px)}
 .character-console:has(.console-builder input:focus) .console-builder{position:sticky;top:0;z-index:40;background:#0b0e0ff8;padding:8px;margin:0;width:100%}
 .character-console:has(.console-builder input:focus) .field-suggestions{position:static!important;margin-top:5px;max-height:38dvh;overflow:auto;border-radius:7px}
}

@media (orientation:portrait) and (max-width:440px){
 .console-identity{grid-template-columns:72px 1fr!important}
 .console-identity .character-portrait{grid-row:span 4}
 .notebook-tabs button{font-size:11px}
}


/* SOURCE: character-console.css */
.character-console{position:relative;width:min(1020px,96vw);padding:18px 18px 210px;border:4px ridge #8f6b27;border-radius:24px;background:linear-gradient(#0c0d0de8,#17130def),url('../assets/ui/mixer_sprite_atlas.png') center/cover;color:#ead9b4;box-shadow:0 20px 70px #000,inset 0 0 0 3px #1b1307,inset 0 0 35px #000}.character-console-tools{position:sticky;top:0;z-index:30;display:flex;justify-content:flex-end;gap:8px;margin-bottom:8px}.character-console-tools button{border:1px solid #9d772c;background:#17130d;color:#ead9b4;border-radius:9px;padding:7px 12px}.console-close{font-size:20px}.console-identity{display:grid;grid-template-columns:150px 1.35fr 1fr .75fr 1fr;gap:10px;align-items:stretch;padding:12px;border:2px solid #8c6928;background:#111311e8}.console-identity .character-portrait{width:auto;height:auto;min-height:104px;border:3px ridge #a17b31;border-radius:50%;background:#121516}.console-identity label{display:grid;grid-template-rows:auto 1fr;text-align:center;font:700 12px Georgia,serif;letter-spacing:.05em}.console-identity input{min-width:0;width:100%;background:#101416;border:2px ridge #8f6b27;color:#f3e5c6;text-align:center;padding:8px}.console-bank{margin-top:10px;border:2px solid #765820;background:#111311e8;padding:10px}.bank-title{display:flex;justify-content:space-between;align-items:center;padding:0 4px 8px;font-family:Georgia,serif}.bank-title strong{font-size:20px}.bank-title span{font-size:10px;color:#a99570}.character-circular-rail{width:100%;min-height:180px}.character-control-set{align-items:stretch!important}.pool-channel,.dial-channel{position:relative;flex:0 0 auto;border:1px solid #72551f;background:#151717;box-shadow:inset 0 0 16px #000;padding:8px}.pool-channel{width:96px;height:350px;display:grid;grid-template-columns:24px 1fr;grid-template-rows:1fr 34px 30px 36px auto;gap:3px}.pool-scale{grid-row:1;display:flex;flex-direction:column;justify-content:space-between;align-items:end;font-size:9px;color:#dbc68f}.pool-slider{grid-row:1;grid-column:2;writing-mode:vertical-lr;direction:rtl;width:30px;height:205px;align-self:center;justify-self:center}.field-value-box,.field-max-box{grid-column:1/3;text-align:center;border:1px solid #805e22;background:#090b0c;color:#e4b75a;font-weight:900;padding:5px}.name-plate{grid-column:1/3;border:1px solid #8c6928;background:#d9c08a;color:#261b10;min-height:34px;display:grid;place-items:center;padding:3px}.name-plate input{width:100%;min-width:0;border:0;background:transparent;text-align:center;color:#261b10;font-weight:800}.remove-field{position:absolute;right:2px;top:0;z-index:3;background:transparent;border:0;color:#c8a96b;font-size:18px}.console-add{flex:0 0 78px;min-height:120px;align-self:center;border:2px ridge #98752e;background:#2a2114;color:#e7c66f;font-size:38px;border-radius:14px}.round-add{width:120px;height:120px;border-radius:50%}.dial-channel{width:155px;display:grid;justify-items:center;gap:6px}.max-crown{font-size:10px;color:#d8c08b;border:1px solid #77591f;background:#0a0c0d;padding:3px 8px}.rotary-dial{position:relative;width:118px;height:118px;border-radius:50%;border:7px double #9a742b;background:repeating-conic-gradient(#9a742b 0 3deg,#181818 3deg 12deg);display:grid;place-items:center;box-shadow:inset 0 0 0 12px #16191a,inset 0 0 0 15px #5e471e}.dial-center{width:58px;height:58px;border-radius:50%;display:grid;place-items:center;background:#121515;color:#e3bb55;font-size:25px;font-weight:900;z-index:2}.dial-center input{width:48px;border:0;background:transparent;color:inherit;text-align:center;font:inherit}.dial-step{position:absolute;width:32px;height:32px;border-radius:50%;border:1px solid #8e6a27;background:#211a10;color:#f0d172;font-size:20px;z-index:3}.dial-minus{left:-8px;bottom:4px}.dial-plus{right:-8px;bottom:4px}.show-hand{width:100%;background:#272117;color:#d7bd82;border:1px solid #715625;border-radius:7px;padding:5px;font-size:10px}.color-swatches{grid-column:1/3;display:flex;justify-content:center;gap:3px}.swatch{width:15px;height:15px;border-radius:50%;border:1px solid #d5bf8c!important;padding:0!important}.swatch.active{outline:2px solid #fff6d2}.swatch-red{background:#b83932!important}.swatch-orange{background:#d97824!important}.swatch-gold{background:#d1a52b!important}.swatch-green{background:#4fa151!important}.swatch-teal{background:#31a0a0!important}.swatch-blue{background:#3b69be!important}.swatch-purple{background:#8646b4!important}.color-red .rotary-dial,.color-red .pool-slider{accent-color:#b83932}.color-orange .rotary-dial,.color-orange .pool-slider{accent-color:#d97824}.color-gold .rotary-dial,.color-gold .pool-slider{accent-color:#d1a52b}.color-green .rotary-dial,.color-green .pool-slider{accent-color:#4fa151}.color-teal .rotary-dial,.color-teal .pool-slider{accent-color:#31a0a0}.color-blue .rotary-dial,.color-blue .pool-slider{accent-color:#3b69be}.color-purple .rotary-dial,.color-purple .pool-slider{accent-color:#8646b4}.console-notebook{margin-top:10px;border:2px solid #765820;background:#17130fe8;padding:10px}.notebook-tabs{display:flex;gap:5px;justify-content:center}.notebook-tabs button{flex:1;max-width:260px;border:1px solid #846324;background:#cbb27a;color:#231a0e;padding:7px;font:700 12px Georgia,serif;text-transform:uppercase}.notebook-tabs button.active{background:#f0dba7}.console-notebook textarea{width:100%;min-height:170px;margin-top:8px;padding:12px;background:#261b12cc;color:#f1dfbd;border:2px ridge #7e5d23;resize:vertical}.dial-hand-card{min-width:150px;position:relative;display:grid;grid-template-columns:1fr 44px;grid-template-rows:92px auto auto;gap:5px;padding:8px}.hand-card-dial{grid-column:1/3;justify-self:center;width:82px;height:82px;border-radius:50%;display:grid;place-items:center;border:6px double #9a742b;background:repeating-conic-gradient(#9a742b 0 3deg,#181818 3deg 12deg);box-shadow:inset 0 0 0 10px #16191a}.hand-card-dial span{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:#111;color:#e7c25c;font-size:20px;font-weight:900}.hand-card-plate{grid-column:1/2;border:1px solid #8c6928;background:#d9c08a;color:#261b10;padding:4px;text-align:center}.hand-card-plate small{display:block;font-size:8px}.dicebag-button{grid-column:2;width:42px!important;height:42px!important;padding:2px!important;align-self:center}.dicebag-button img{width:100%;height:100%;object-fit:contain}.dicebag-modal.sheet-bag-modal{z-index:95;background:#0008;padding-bottom:160px}.bag-drop-zone{outline:2px dashed #b58a38}.bag-die-chip{cursor:grab}.drag-hint{font-size:9px;color:#ad9870}body:has(.mixer-modal) .hand-rail{position:fixed!important;left:0;right:0;bottom:82px;z-index:90;background:#10161d;border-top:1px solid #6e592c}body:has(.mixer-modal) .dice-footer{position:fixed!important;left:0;right:0;bottom:0;z-index:91;background:#121820;border-top:1px solid #6e592c}.mixer-modal{align-items:start;padding-bottom:180px}
@media(max-width:650px) and (orientation:portrait){.character-console{width:96vw;padding:8px 8px 210px;border-radius:16px}.console-identity{grid-template-columns:88px 1fr 1fr}.console-identity .character-portrait{grid-row:span 2;min-height:88px}.console-bank{padding:6px}.pool-channel{width:84px;height:310px}.pool-slider{height:165px}.dial-channel{width:132px}.rotary-dial{width:96px;height:96px}.round-add{width:96px;height:96px}.bank-title span{display:none}.console-notebook textarea{min-height:140px}body:has(.mixer-modal) .hand-rail{bottom:72px}body:has(.mixer-modal) .dice-footer{height:72px}}
@media(max-height:520px) and (orientation:landscape){.character-console{width:98vw;max-height:calc(100dvh - 8px);padding:8px 8px 170px}.console-identity{grid-template-columns:90px 1.35fr 1fr .7fr 1fr}.pool-channel{height:240px}.pool-slider{height:115px}.rotary-dial{width:82px;height:82px}.dial-channel{width:118px}.round-add{width:82px;height:82px}body:has(.mixer-modal) .hand-rail{bottom:64px}body:has(.mixer-modal) .dice-footer{height:64px}}


/* SOURCE: physical-controls-refinement.css */
.finite-rail{display:block;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;scroll-snap-type:x proximity;scrollbar-width:none}.finite-rail::-webkit-scrollbar{display:none}.finite-set{display:flex!important;flex-flow:row nowrap!important;align-items:center;gap:10px;width:max-content;min-width:100%;padding:6px 12px}.header-rail .finite-set,.dice-footer .finite-set,.hand-rail .finite-set{white-space:nowrap}.character-finite-rail{width:100%;padding-bottom:4px}.character-control-set{align-items:stretch!important;gap:12px!important}.character-console{background:linear-gradient(180deg,#0b0d0cec,#17130ff4)!important}.pool-channel,.dial-channel{width:var(--control-width)!important;min-width:var(--control-width)!important;scroll-snap-align:start}.pool-channel{grid-template-rows:1fr 38px 40px auto!important}.field-value-box{grid-row:2}.name-plate{grid-row:3;min-width:max-content!important}.name-plate input{width:auto!important;max-width:26ch;min-width:6ch}.color-swatches{grid-row:4}.field-max-box,.max-crown{display:none!important}.pool-slider.scarab-slider{-webkit-appearance:none;appearance:none;background:transparent;accent-color:transparent}.pool-slider.scarab-slider::-webkit-slider-runnable-track{width:8px;border-radius:8px;background:linear-gradient(#4b4438,#151515);border:1px solid #9c782f}.pool-slider.scarab-slider::-webkit-slider-thumb{-webkit-appearance:none;width:34px;height:42px;margin-left:-13px;border:2px solid #e2c778;border-radius:48% 48% 42% 42%;background-color:#9d772c;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 80'%3E%3Cg fill='%231a1710' stroke='%23f0d78a' stroke-width='3'%3E%3Cellipse cx='32' cy='41' rx='17' ry='24'/%3E%3Cellipse cx='32' cy='18' rx='10' ry='9'/%3E%3Cpath d='M18 28L7 17M46 28L57 17M15 42H3M49 42H61M18 57L7 69M46 57L57 69' fill='none'/%3E%3Cpath d='M32 27v38M18 35c8 4 20 4 28 0M17 48c9 5 21 5 30 0' fill='none'/%3E%3C/g%3E%3C/svg%3E");background-repeat:no-repeat;background-position:center;background-size:26px 34px;box-shadow:0 2px 7px #000}.pool-slider.scarab-slider::-moz-range-track{width:8px;border-radius:8px;background:#29251e;border:1px solid #9c782f}.pool-slider.scarab-slider::-moz-range-thumb{width:32px;height:40px;border:2px solid #e2c778;border-radius:46%;background:#9d772c}.clean-dial{background:radial-gradient(circle at center,#111 0 28%,#1d1b16 29% 50%,transparent 51%),repeating-conic-gradient(from -4deg,#b68b32 0 3deg,#1a1b1b 3deg 11deg)!important;background-image:radial-gradient(circle at center,#111 0 28%,#1d1b16 29% 50%,transparent 51%),repeating-conic-gradient(from -4deg,#b68b32 0 3deg,#1a1b1b 3deg 11deg)!important}.physical-dial-card{background:#111412!important}.show-hand:disabled{opacity:.65;color:#9bc48d;border-color:#4e7351}.character-portrait{position:relative;overflow:hidden}.character-portrait img{width:100%;height:100%;object-fit:cover;border-radius:inherit}.portrait-upload{position:absolute!important;left:8px;right:8px;bottom:6px;display:block!important;padding:5px!important;background:#17130ddd!important;border:1px solid #9d772c;color:#f0dcaa!important;text-align:center!important;cursor:pointer;font:700 10px system-ui!important}.portrait-upload input{position:absolute;inset:0;opacity:0;cursor:pointer}.character-number{align-self:center;color:#cdb57e;font-size:11px}.character-switch-cluster{display:flex;align-items:stretch;flex:0 0 auto}.character-footer-button{overflow:hidden}.footer-portrait{width:100%;height:100%;object-fit:cover;border-radius:10px}.character-cycle-button{min-width:34px!important;width:34px!important;padding:0!important;font-size:22px;border-left:0!important;border-radius:0 10px 10px 0!important}.character-switch-cluster .character-footer-button{border-radius:10px 0 0 10px!important}.dial-hand-card{width:var(--hand-card-width,170px)!important;min-width:var(--hand-card-width,170px)!important}.hand-card-plate{white-space:normal}.dicebag-button{min-width:50px!important;min-height:50px!important;display:grid!important;place-items:center!important;position:relative!important}.dicebag-button img{display:block!important;width:46px!important;height:46px!important;object-fit:contain!important}.bag-count{position:absolute;right:-3px;bottom:-3px;min-width:19px;height:19px;border-radius:50%;display:grid;place-items:center;background:#c99a34;color:#17120a;font-size:10px;font-weight:900}.dicebag-workspace{max-height:min(620px,70dvh);overflow:auto}.remove-bag-die{margin-left:auto}.hand-card{scroll-snap-align:start}.topbar,.dice-footer,.hand-rail{max-width:100vw}.circular-set{display:flex!important;flex-flow:row nowrap!important}.circular-rail[data-circular-rail]{scroll-snap-type:none!important}
@media(max-width:650px){.finite-set{gap:8px;padding-inline:8px}.character-console{padding-bottom:210px!important}.character-console-tools{gap:5px}.character-console-tools button{padding:6px 9px}.character-number{font-size:9px}.pool-channel{height:300px!important}.dicebag-workspace{width:94vw}.portrait-upload{font-size:9px!important}}


/* SOURCE: character-card-pass.css */
.equalizer-bank .bank-title strong,.skills-bank .bank-title strong,.feats-bank .bank-title strong{font-family:Georgia,serif;letter-spacing:.02em}.description-toggle{margin-left:auto;border:1px solid #806124;background:#201910;color:#dfc68f;border-radius:8px;padding:6px 9px}.plate-with-bag{grid-column:1/3;display:grid;grid-template-columns:minmax(max-content,1fr) 42px;gap:5px;align-items:stretch}.plate-with-bag .name-plate{grid-column:auto;grid-row:auto;min-width:0!important}.mini-bag{position:relative;width:42px;height:42px;padding:3px!important;border:1px solid #8b6929!important;background:#17130d!important;border-radius:8px!important;display:grid!important;place-items:center!important}.mini-bag img{width:34px;height:34px;object-fit:contain}.mini-bag b{position:absolute;right:-5px;bottom:-5px;min-width:18px;height:18px;border-radius:50%;display:grid;place-items:center;background:#d7ae53;color:#17120a;font-size:9px}.field-description,.sheet-card-description{width:100%;min-height:70px;background:#17120d;color:#eddfbd;border:1px solid #7e5f24;border-radius:7px;padding:7px;resize:vertical}.field-description-read{margin:0;width:100%;font-size:11px;color:#cdbb91;white-space:normal}.field-desc-toggle{font-size:10px;color:#c7b589;display:flex;align-items:center;gap:5px}.skill-card-media{width:100%;display:grid;grid-template-columns:58px 1fr;gap:6px;align-items:start}.skill-card-image{position:relative;width:58px;height:58px;display:grid;place-items:center;border:1px solid #806124;background:#17120d;color:#c6a866;font-size:24px;overflow:hidden}.skill-card-image img{width:100%;height:100%;object-fit:cover}.skill-card-image label{position:absolute;inset:0;cursor:pointer}.skill-card-image input{position:absolute;inset:0;opacity:0;cursor:pointer}.skill-card-media .field-description,.skill-card-media .field-description-read{min-height:58px}.feat-card-set{align-items:stretch!important}.sheet-card-frame{position:relative;flex:0 0 var(--card-width);min-width:var(--card-width);max-width:var(--card-width);display:grid;grid-template-rows:auto 1fr auto auto auto;gap:7px;padding:10px;border:2px solid #7d5d21;background:#111310;box-shadow:inset 0 0 18px #000;scroll-snap-align:start}.sheet-card-name{font-size:15px;font-weight:800}.sheet-card-body{display:grid;grid-template-columns:92px minmax(110px,1fr);gap:8px;min-height:106px}.sheet-card-image{position:relative;width:92px;height:92px;display:grid;place-items:center;border:2px solid #8e6b29;background:#17120d;color:#d2b66e;font-size:34px;overflow:hidden}.sheet-card-image img{width:100%;height:100%;object-fit:cover}.sheet-card-image label{position:absolute;inset:0;cursor:pointer}.sheet-card-image input{position:absolute;inset:0;opacity:0;cursor:pointer}.sheet-card-description{min-height:92px}.sheet-card-description.read-only{overflow:auto;white-space:normal}.sheet-card-footer{display:grid;grid-template-columns:46px 1fr auto;gap:7px;align-items:center}.card-value{display:flex;align-items:center;gap:5px;padding:5px 8px;border:1px solid #7b5d24;background:#0b0d0d;color:#d9c28b;font-size:10px}.card-value input{width:58px;background:#101315;color:#f2d77b;border:0;text-align:center;font-weight:900}.feat-add{min-width:100px!important;min-height:180px!important}.dicebag-form{width:min(620px,94vw);background:#111512;border:3px ridge #9b762e;padding:14px}.dicebag-form-grid{display:grid;gap:6px;margin-top:10px}.dicebag-form-row{display:grid;grid-template-columns:minmax(80px,1fr) 40px 42px 40px auto;gap:6px;align-items:center;padding:7px;border:1px solid #70551f;background:#171a18}.dicebag-form-row button{height:38px;border:1px solid #8b6929;background:#211a10;color:#f0d077;border-radius:7px;font-size:22px}.dicebag-form-row span{text-align:center;font-size:18px;font-weight:900;color:#e7c767}.dicebag-form-row select{background:#101417;color:#eadcb8;border:1px solid #806124;padding:7px}.dicebag-example{display:flex;justify-content:flex-end;gap:10px;align-items:center;margin-top:10px}.dicebag-example button{border:1px solid #8b6929;background:#261e12;color:#efd27e;padding:9px 13px;border-radius:8px}.dicebag-example output{min-width:74px;padding:9px;text-align:center;border:1px solid #806124;background:#090b0b;color:#f0c95e;font-size:20px;font-weight:900}.map-hand-card{position:relative;flex:0 0 var(--hand-card-width);min-width:var(--hand-card-width);max-width:var(--hand-card-width);display:grid;grid-template-rows:auto 1fr auto auto;gap:6px;padding:9px;border:2px solid #745820;background:#111410;color:#e7d6ad;scroll-snap-align:start}.map-card-name{padding:6px 8px;text-align:center;border:1px solid #8b6929;background:#d7bd84;color:#21170d;font-weight:900;white-space:normal}.map-card-body{display:grid;grid-template-columns:72px 1fr;gap:8px;min-height:78px}.map-card-image{width:72px;height:72px;border:1px solid #806124;background:#19140e;display:grid;place-items:center;font-size:28px;color:#ba9d5d;overflow:hidden}.map-card-image img{width:100%;height:100%;object-fit:cover}.map-card-description{font-size:11px;line-height:1.25;overflow:auto;white-space:normal;color:#c9b991}.map-card-footer{display:flex;justify-content:space-between;align-items:center}.map-card-value{min-width:44px;padding:7px;border:1px solid #806124;background:#0b0d0d;color:#e9c75e;text-align:center;font-size:20px}.map-card-bag{width:44px!important;height:44px!important}.map-hand-card .hand-card-tools{display:flex;gap:4px;justify-content:flex-end}.map-hand-card .hand-card-tools button{padding:4px 7px}.hand-card-set{align-items:stretch!important;gap:10px!important}.hand-rail-empty{min-width:min(560px,82vw)!important}.skills-bank .dial-channel{grid-template-rows:auto auto auto auto auto auto!important}.skills-bank .plate-with-bag{width:100%}.equalizer-bank .pool-channel{grid-template-rows:1fr 38px 44px auto!important}.equalizer-bank .color-swatches{grid-row:4}.sheet-bag-modal{z-index:120!important}
@media(max-width:650px){.sheet-card-body{grid-template-columns:76px minmax(100px,1fr)}.sheet-card-image{width:76px;height:76px}.map-hand-card{max-height:210px}.map-card-body{grid-template-columns:62px 1fr}.map-card-image{width:62px;height:62px}.dicebag-form-row{grid-template-columns:minmax(70px,1fr) 36px 36px 36px}.dicebag-form-row select{grid-column:1/-1}.description-toggle{font-size:10px;padding:5px 7px}.skill-card-media{grid-template-columns:52px 1fr}.skill-card-image{width:52px;height:52px}}


/* SOURCE: tracks-pass.css */
.tracks-bank .tracks-title{display:grid;grid-template-columns:auto 1fr;gap:12px;align-items:end}.tracks-bank .tracks-title span{font-size:11px;line-height:1.3;color:#bca97e;white-space:normal}.track-channel{grid-template-rows:1fr auto auto auto auto!important;min-width:var(--control-width)!important}.track-values{grid-column:1/3;display:grid;grid-template-columns:1fr 1fr;gap:6px}.track-values label{display:grid;gap:2px;place-items:center;border:1px solid #806124;background:#090b0b;color:#f0cf69;padding:6px}.track-values small{font-size:8px;letter-spacing:.08em;color:#aa9872}.track-values strong{font-size:18px}.track-values input{width:100%;min-width:0;background:#121617;color:#f2d77b;border:1px solid #806124;text-align:center;font-weight:900;padding:5px}.track-card-button{grid-column:1/3;width:100%;margin-top:3px}.map-track-card{grid-template-rows:auto 1fr auto auto!important}.map-track-live{display:grid;gap:8px;align-content:center;padding:10px;border:1px solid #70551f;background:#0d100f}.map-track-readout{display:flex;justify-content:center;align-items:baseline;gap:6px}.map-track-readout strong{font-size:30px;color:#efc85a}.map-track-readout span{font-size:15px;color:#c3b183}.map-track-live input[type=range]{width:100%;accent-color:#c79a39}.map-track-card .map-card-value{font-size:14px;min-width:70px}.map-track-card .map-card-image{display:none}
@media(max-width:650px){.tracks-bank .tracks-title{grid-template-columns:1fr}.tracks-bank .tracks-title span{font-size:10px}.track-channel{min-width:max(150px,var(--control-width))!important}.track-values strong{font-size:16px}.map-track-readout strong{font-size:26px}}


/* SOURCE: character-families.css */
.attributes-bank,.trackers-bank,.limits-bank,.flare-bank{position:relative}.attribute-channel,.tracker-channel,.limit-channel{position:relative;flex:0 0 var(--control-width,190px);min-width:var(--control-width,190px);border:1px solid #8f6a1f;background:rgba(9,13,12,.88);padding:16px;box-sizing:border-box}.attribute-channel{display:grid;grid-template-columns:44px 1fr;grid-template-rows:260px auto auto auto;column-gap:10px}.attribute-scale{display:flex;flex-direction:column;justify-content:space-between;align-items:center;color:#d9c48a}.attribute-scale .zero{font-weight:800;color:#f0cf6a}.attribute-slider{writing-mode:vertical-lr;direction:rtl;width:38px;height:250px;justify-self:center}.attribute-value{grid-column:1/3;font-size:2rem;text-align:center;padding:8px;border:1px solid #9b741f;background:#080b0b;color:#efc34e}.tracker-channel{display:grid;grid-template-columns:52px 1fr;grid-template-rows:280px auto auto auto auto;column-gap:8px}.tracker-channel .pool-scale{display:flex;flex-direction:column;justify-content:space-between;align-items:center}.tracker-channel .pool-slider{writing-mode:vertical-lr;direction:rtl;height:270px;width:44px;justify-self:center}.track-values{grid-column:1/3;display:grid;grid-template-columns:1fr 1fr;gap:6px}.track-values label,.limit-max{display:grid;gap:3px;text-align:center;border:1px solid #9b741f;background:#080b0b;padding:6px}.track-values small,.limit-max small{font-size:.7rem;letter-spacing:.08em;color:#cbb477}.track-values strong,.limit-max strong{font-size:1.45rem;color:#efc34e}.track-values input,.limit-max input{width:100%;box-sizing:border-box;text-align:center}.limit-channel{display:flex;flex-direction:column;align-items:center;gap:8px}.limit-max{width:min(150px,100%)}.attribute-channel .plate-with-bag,.tracker-channel .plate-with-bag,.limit-channel .plate-with-bag{width:100%}.attribute-channel .show-hand,.tracker-channel .show-hand,.limit-channel .show-hand{width:100%}.bank-title span{max-width:70%;font-size:.8rem;color:#bca979;line-height:1.25}.flare-bank .sheet-card-frame{min-height:300px}.map-tracker-card .map-track-live{padding:10px}.map-tracker-card .map-track-readout{display:flex;align-items:baseline;justify-content:center;gap:4px;font-size:1.2rem}.map-tracker-card .map-track-live input{width:100%}.map-card-image{font-weight:800;letter-spacing:.05em}.map-card-value{white-space:nowrap}@media(max-width:600px){.bank-title{align-items:flex-start;gap:6px}.bank-title span{max-width:none}.attribute-channel,.tracker-channel{min-width:220px}.limit-channel{min-width:210px}}


/* SOURCE: interaction-fixes.css */
.tap-safe,.character-console button,.dicebag-form button,.show-hand{touch-action:manipulation;-webkit-user-select:none;user-select:none}.keyboard-input,.sheet-card-description,.field-description{touch-action:auto!important;-webkit-user-select:text!important;user-select:text!important;pointer-events:auto!important}.vertical-slider-shell{position:relative;height:250px;width:62px;justify-self:center;touch-action:none}.vertical-slider-shell .slider-rail{position:absolute;left:50%;top:4px;bottom:4px;width:8px;transform:translateX(-50%);border:1px solid #9c782f;border-radius:8px;background:linear-gradient(#4b4438,#151515)}.vertical-slider-shell .scarab-handle{position:absolute;left:50%;bottom:calc(var(--pct)*1%);width:48px;height:56px;transform:translate(-50%,50%);z-index:2;display:grid;place-items:center;border:2px solid #efd47b;border-radius:48% 48% 42% 42%;background:#a47b2d;color:#1a1710;font-size:27px;font-weight:900;box-shadow:0 3px 10px #000;pointer-events:none}.vertical-slider-shell .slider-hit{position:absolute!important;left:50%!important;top:50%!important;inset:auto!important;width:235px!important;height:58px!important;transform:translate(-50%,-50%) rotate(-90deg)!important;transform-origin:center!important;opacity:.002!important;z-index:4!important;cursor:pointer;touch-action:none!important;-webkit-appearance:auto!important;appearance:auto!important}.attribute-channel{grid-template-columns:48px 70px 1fr!important}.attribute-scale{grid-column:1}.attribute-channel .vertical-slider-shell{grid-column:2}.attribute-readouts{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:6px}.attribute-readouts label{display:grid;gap:3px;text-align:center;border:1px solid #9b741f;background:#080b0b;padding:6px}.attribute-readouts small{font-size:.68rem;letter-spacing:.08em;color:#cbb477}.attribute-readouts strong{font-size:1.35rem;color:#efc34e}.attribute-readouts input,.track-values input,.dial-center input,.bag-count-input{width:100%;box-sizing:border-box;text-align:center;background:#101315;color:#f2d77b;border:1px solid #806124;border-radius:5px;padding:6px;font-weight:800}.tracker-channel{grid-template-columns:52px 70px 1fr!important}.tracker-channel .pool-scale{grid-column:1}.tracker-channel .tracker-shell{grid-column:2}.tracker-channel .track-values{grid-column:1/-1}.portrait-editor-modal{position:fixed;inset:0;z-index:180;background:#000b;display:grid;place-items:center;padding:18px}.portrait-editor{width:min(520px,94vw);max-height:90dvh;overflow:auto;border:3px ridge #9b762e;border-radius:18px;background:#101410;color:#eadcb8;padding:14px;display:grid;gap:12px}.portrait-editor header,.portrait-editor footer{display:flex;align-items:center;justify-content:space-between;gap:10px}.portrait-editor header button,.portrait-editor footer button{border:1px solid #8b6929;background:#211a10;color:#efd27e;border-radius:9px;padding:9px 14px}.portrait-editor footer .primary{background:#5b4218}.portrait-crop{width:min(320px,76vw);aspect-ratio:1;margin:auto;border:4px solid #c59532;border-radius:50%;overflow:hidden;background:#090b0b;position:relative;box-shadow:0 0 0 8px #16130e,0 0 24px #000}.portrait-crop img{width:100%;height:100%;object-fit:cover;transform-origin:center}.portrait-editor label{display:grid;grid-template-columns:90px 1fr;gap:9px;align-items:center}.portrait-editor input[type=range]{width:100%}.character-portrait{min-width:128px!important;width:128px!important;aspect-ratio:1/1.25!important;overflow:hidden!important}.character-portrait>img,.footer-portrait{width:100%!important;height:100%!important;object-fit:cover!important;object-position:center center!important;display:block!important}.console-identity{grid-template-columns:140px minmax(0,1fr) minmax(0,1fr)!important}.dicebag-form-row{grid-template-columns:minmax(70px,1fr) 42px 58px 42px auto!important}.bag-count-input{font-size:18px;min-width:52px}.sheet-card-description:focus,.field-description:focus,.console-notebook textarea:focus{outline:2px solid #3b82f6;outline-offset:1px}.hand-rail-empty{display:flex;align-items:center;justify-content:center}.character-console input,.character-console textarea,.character-console select{font-size:16px}.rist{width:100%!important;max-width:100vw!important;overflow-x:hidden!important}.footer.dice-footer{width:100%!important;max-width:100vw!important;min-width:0!important;overflow-x:auto!important;overflow-y:hidden!important;flex:0 0 auto!important;padding-left:max(6px,env(safe-area-inset-left))!important;padding-right:max(6px,env(safe-area-inset-right))!important}.footer.dice-footer>.finite-set{width:max-content!important;min-width:100%!important;display:flex!important;flex-wrap:nowrap!important;align-items:stretch!important}.hand-rail,.public-card-drop{width:100%!important;max-width:100vw!important}.hand-mini-tracker,.public-tracker-slider{touch-action:none!important}.show-hand{display:block!important;visibility:visible!important;pointer-events:auto!important}
@media(max-width:650px){.console-identity{grid-template-columns:112px minmax(0,1fr)!important}.character-portrait{width:104px!important;min-width:104px!important}.dicebag-form-row{grid-template-columns:minmax(60px,1fr) 40px 54px 40px!important}.dicebag-form-row select{grid-column:1/-1!important}.vertical-slider-shell{height:235px}.vertical-slider-shell .slider-hit{width:220px!important}.attribute-channel,.tracker-channel{min-width:240px!important}.footer.dice-footer{position:relative!important;left:0!important;right:0!important}}


/* SOURCE: shaelvien-cards.css */
.hand-rail{min-height:154px!important;max-height:170px;overflow-x:auto;overflow-y:hidden}.hand-card-set{align-items:center!important;min-height:148px!important;gap:8px}.hand-card-mini{position:relative;flex:0 0 96px;width:96px;height:136px;background-image:var(--card-face);background-size:100% 100%;background-position:center;background-repeat:no-repeat;color:#2d2115;filter:drop-shadow(0 4px 5px #0009);scroll-snap-align:start;padding:20px 9px 11px;display:grid;grid-template-rows:auto 1fr auto;gap:3px;touch-action:none;user-select:none}.hand-mini-name{font:900 11px/1.05 Georgia,serif;text-align:center;white-space:normal;overflow:hidden;max-height:24px}.hand-mini-image{width:42px;height:42px;object-fit:cover;justify-self:center;border:1px solid #9f7228;background:#f0ddb3aa;border-radius:3px}.hand-mini-glyph{display:grid;place-items:center;font-weight:900}.hand-mini-value{font-size:11px;text-align:right;padding-right:2px}.hand-mini-bag{position:absolute!important;left:7px;bottom:7px;width:28px!important;height:28px!important;min-width:28px!important;min-height:28px!important;padding:1px!important;background:#f1ddb2d9!important;border-color:#9c7028!important}.hand-mini-bag img{width:24px!important;height:24px!important}.hand-mini-close{position:absolute;right:5px;top:5px;width:22px;height:22px;padding:0;border:1px solid #8c6727;border-radius:50%;background:#22190ed9;color:#f0d58c}.hand-mini-tracker{width:74px;justify-self:center;accent-color:#a37423;touch-action:none}.hand-rail-empty{min-width:320px;display:flex;align-items:center;justify-content:center;padding:12px 20px;color:#a99876;border:1px dashed #715625;border-radius:10px}
.hand-drawer-toggle{position:relative;flex:0 0 72px;width:72px;height:92px;min-width:72px!important;padding:0!important;border:1px solid #8d6a28!important;border-radius:12px!important;background:#111820!important;overflow:visible;scroll-snap-align:start;touch-action:manipulation}.hand-toggle-card-back{position:absolute;left:14px;top:7px;width:44px;height:66px;border-radius:6px;background-image:url('../assets/cards/shaelvien_card_back.jpg');background-size:cover;background-position:center;box-shadow:0 2px 5px #000a}.hand-toggle-chevron{position:absolute;left:0;right:0;bottom:1px;color:#f3e1b0;font-size:20px;line-height:18px;text-align:center}.hand-drawer-toggle.open{box-shadow:0 0 0 2px #c79a38 inset}.hand-drawer-open{animation:handDrawerOpen .16s ease-out both}@keyframes handDrawerOpen{from{opacity:.25;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}
.public-card-drop{min-height:92px;border-bottom:1px solid #6e592c;background:#0d1318;padding:7px 8px;overflow-x:auto;overflow-y:hidden}.public-card-strip{display:flex;align-items:center;justify-content:flex-start;gap:8px;min-width:max-content}.public-card-empty{height:76px;min-width:min(92vw,520px);display:grid;place-items:center;border:1px dashed #725d30;border-radius:10px;color:#a99876;padding:8px 14px}.public-table-card{position:relative;flex:0 0 88px;width:88px;height:124px;background-image:var(--card-face);background-size:100% 100%;background-position:center;background-repeat:no-repeat;color:#2d2115;padding:18px 8px 10px;display:grid;grid-template-rows:auto 1fr auto;gap:2px;filter:drop-shadow(0 3px 4px #0008)}.public-card-name{font:900 10px/1 Georgia,serif;text-align:center;max-height:21px;overflow:hidden}.public-card-image{width:38px;height:38px;object-fit:cover;justify-self:center;border:1px solid #a87b31;border-radius:3px}.public-card-glyph{display:grid;place-items:center;background:#f0ddb3aa;font-weight:900}.public-card-value,.public-tracker-value{font-size:10px;text-align:right}.public-tracker-value{display:flex;justify-content:center;gap:2px;align-items:baseline}.public-tracker-slider{width:66px;justify-self:center;accent-color:#a37423;touch-action:none}.public-card-bag{position:absolute!important;left:5px;bottom:5px;width:25px!important;height:25px!important;min-width:25px!important;min-height:25px!important;padding:0!important;background:#f1ddb2dc!important}.public-card-bag img{width:22px!important;height:22px!important}.public-card-remove{position:absolute;right:4px;top:4px;width:20px;height:20px;padding:0;border:1px solid #8c6727;border-radius:50%;background:#22190ed9;color:#f0d58c;z-index:3}
.sheet-card-frame{background-color:#f2dfb8!important;background-image:url('../assets/cards/fronts/card_front_05_two_low_roses.png')!important;background-size:100% 100%!important;background-position:center!important;background-repeat:no-repeat!important;color:#2d2115!important;border:0!important;padding:34px 20px 26px!important;box-shadow:none!important;filter:drop-shadow(0 4px 6px #0008)}.sheet-card-frame .sheet-card-name,.sheet-card-frame .sheet-card-description,.sheet-card-frame .field-desc-toggle{color:#2e2116}.sheet-card-frame .sheet-card-image{background:#f5e6c4bb;border-color:#a4772d}.sheet-card-frame .sheet-card-description{background:#f6e6c4aa;color:#332419}.sheet-card-frame .mini-bag{background:#f4e1b8cc!important}.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:650px){.hand-rail{min-height:148px!important;max-height:154px}.hand-card-set{min-height:142px!important}.hand-card-mini{flex-basis:90px;width:90px;height:128px;padding:18px 8px 10px}.hand-drawer-toggle{flex-basis:64px;width:64px;min-width:64px!important;height:88px}.hand-toggle-card-back{left:12px;width:40px;height:60px}.public-card-drop{min-height:86px;padding:5px 6px}.public-table-card{flex-basis:82px;width:82px;height:116px;padding:17px 7px 9px}.sheet-card-frame{padding:31px 17px 23px!important}}


/* SOURCE: intuitive-card-editor.css */
.attribute-readouts.mod-only{grid-template-columns:1fr!important}.attribute-readouts.mod-only label{max-width:150px;margin-inline:auto}.compact-field-control{grid-column:1/-1;display:grid;gap:8px;width:100%;box-sizing:border-box;color:var(--field-accent,#d9a82f)}.control-identity-row{display:flex;align-items:stretch;gap:7px;min-width:0;width:100%}.score-box{flex:0 0 72px;min-width:72px;border:1px solid var(--field-accent,#d9a82f);background:#0b0e0d;color:var(--field-accent,#e0c470);display:grid;place-items:center;padding:4px;box-sizing:border-box}.score-box small{font-size:9px;letter-spacing:.08em}.score-box b,.score-box input{font:800 20px system-ui;color:inherit}.score-box input{width:100%;min-width:0;text-align:center;background:#141919;border:1px solid color-mix(in srgb,var(--field-accent) 70%,#111);border-radius:6px}.nameplate-code-button{flex:1 1 74px;min-width:68px;max-width:130px;border:2px solid var(--field-accent,#d9a82f);background:#dfc78f;color:#21180c;border-radius:3px;font:800 clamp(18px,4vw,26px) Georgia,serif;letter-spacing:.08em;padding:5px 8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mod-dice-set{display:flex;align-items:center;justify-content:flex-end;gap:4px;flex:0 0 auto;min-width:38px}.mod-die-chip{position:relative;width:46px;height:50px;display:grid;place-items:center;border:1px solid var(--field-accent,#d9a82f);border-radius:8px;background:#111817;overflow:hidden}.mod-die-chip .die-sprite{position:absolute;inset:1px;opacity:.78}.mod-die-chip b{position:relative;z-index:2;font:900 15px system-ui;text-shadow:0 1px 3px #000;color:#fff}.mod-die-chip.bonus b{color:#dfffe8}.mod-die-chip.penalty b{color:#ffd8d8}.mod-die-empty{display:grid;place-items:center;width:34px;height:34px;border:1px dashed var(--field-accent);border-radius:50%;opacity:.55}.control-tools-row{display:flex;align-items:center;gap:7px;width:100%;min-width:0}.bag-dice-row{display:flex;align-items:center;gap:3px;flex:1 1 auto;min-width:0;overflow-x:auto;scrollbar-width:none}.bag-dice-row::-webkit-scrollbar{display:none}.bag-die-token{display:inline-flex;align-items:end;justify-content:center;position:relative;flex:0 0 34px;width:34px;height:38px;border:1px solid color-mix(in srgb,var(--field-accent) 70%,#111);border-radius:7px;background:#101514}.bag-die-token .die-sprite{position:absolute;inset:2px}.bag-die-token small{position:relative;z-index:2;margin-left:auto;background:#0a0c0bcc;color:#fff;border-radius:7px 0 0 0;padding:1px 3px;font:800 8px system-ui}.compact-bag{flex:0 0 44px!important;width:44px!important;height:48px!important;min-width:44px!important;margin:0!important;position:relative}.compact-bag img{width:40px!important;height:40px!important;object-fit:contain}.compact-bag b{position:absolute;right:-4px;bottom:-4px;min-width:18px;height:18px;border-radius:50%;display:grid;place-items:center;background:var(--field-accent,#d9a82f);color:#111;font:900 9px system-ui}.compact-card-back{flex:0 0 36px;width:36px;height:50px;border:2px solid var(--field-accent,#d9a82f);border-radius:6px;background:#15110b url('../assets/cards/shaelvien_card_back.jpg') center/cover no-repeat;box-shadow:0 2px 7px #0008}.expanded-colors{display:flex!important;flex-wrap:nowrap!important;gap:3px!important;grid-column:1/-1;width:100%;overflow-x:auto;overflow-y:hidden;padding:3px 1px 5px;scrollbar-width:none}.expanded-colors::-webkit-scrollbar{display:none}.expanded-colors .swatch{width:18px!important;height:18px!important;min-width:18px!important;border-radius:50%!important;background:var(--swatch)!important;border:1.5px solid #d8c18b!important}.expanded-colors .swatch.active{outline:2px solid #fff4cf;outline-offset:1px}.flare-control-card{position:relative;flex:0 0 var(--control-width,240px);min-width:var(--control-width,240px);border:1px solid var(--field-accent,#d9a82f);background:#0b0f0e;padding:14px;box-sizing:border-box}.field-editor-modal{position:fixed;inset:0;z-index:1600;background:#000b;display:grid;place-items:center;padding:14px;box-sizing:border-box}.field-editor{width:min(92vw,520px);max-height:84dvh;overflow:auto;background:#0d1210;border:3px solid var(--field-accent,#d9a82f);border-radius:22px;color:var(--field-accent,#ead59e);padding:18px;box-sizing:border-box;box-shadow:0 20px 60px #000;display:grid;gap:14px}.field-editor header{display:flex;align-items:center;justify-content:space-between;gap:10px}.field-editor header>div{display:grid}.field-editor header small{opacity:.72;letter-spacing:.14em}.field-editor header button,.field-editor footer button,.code-editor-row button{border:2px solid var(--field-accent);background:#21180b;color:var(--field-accent);border-radius:12px;padding:8px 13px;font-size:16px}.field-editor label{display:grid;gap:5px;font:700 13px system-ui;letter-spacing:.03em}.field-editor input,.field-editor textarea{width:100%;box-sizing:border-box;border:2px solid color-mix(in srgb,var(--field-accent) 72%,#333);border-radius:10px;background:#151a19;color:#f7edda;padding:10px;font:16px system-ui}.field-editor textarea{min-height:110px;resize:vertical}.field-editor footer{display:flex;align-items:center;justify-content:flex-end;gap:9px}.field-editor footer .primary{background:color-mix(in srgb,var(--field-accent) 68%,#36240a);color:#fff8e7}.code-editor-row{display:grid;grid-template-columns:1fr auto;gap:8px}.short-code-input{text-transform:uppercase;letter-spacing:.18em;font-weight:900!important;text-align:center}.card-detail-editor{width:min(94vw,560px)}.card-detail-editor>header strong{font:800 clamp(24px,6vw,34px) Georgia,serif;color:var(--field-accent)}.card-editor-image{position:relative;width:100%;aspect-ratio:16/9;border:2px solid var(--field-accent);border-radius:10px;background:#171a18;display:grid;place-items:center;overflow:hidden;color:#b7a986}.card-editor-image img{width:100%;height:100%;object-fit:cover}.card-image-upload{position:absolute!important;right:8px;bottom:8px;background:#17120ddd!important;border:1px solid var(--field-accent);border-radius:8px;padding:6px 9px!important;cursor:pointer}.card-image-upload input{position:absolute!important;inset:0!important;opacity:0!important;cursor:pointer}.card-editor-description{min-height:150px!important}.card-attribute-summary{display:flex;align-items:center;justify-content:space-between;gap:8px}.card-attribute-summary .score-box{flex-basis:100px}.card-detail-editor footer .dicebag-button{margin-right:auto;border-color:var(--field-accent)!important}.attribute-channel,.tracker-channel,.limit-channel,.dial-channel,.flare-control-card{border-color:var(--field-accent,#8f6a1f)!important}.attribute-channel input,.tracker-channel input,.limit-channel input,.dial-channel input{color:var(--field-accent,#efc34e)}.hand-card-mini,.public-table-card{outline:2px solid var(--field-accent,#d9a82f);outline-offset:-2px}.hand-card-mini .hand-mini-name,.hand-card-mini .hand-mini-value,.public-table-card .public-card-name,.public-table-card .public-card-value,.public-table-card .public-tracker-value{color:var(--field-accent,#2d2115);text-shadow:0 1px 0 #f5e5bd}.hand-mini-image,.public-card-image{border-color:var(--field-accent,#9f7228)!important}
@media(max-width:650px){.control-identity-row{gap:5px}.score-box{flex-basis:64px;min-width:64px}.nameplate-code-button{max-width:96px}.mod-die-chip{width:38px;height:44px}.control-tools-row{gap:5px}.compact-bag{width:38px!important;min-width:38px!important;height:44px!important}.compact-bag img{width:34px!important;height:34px!important}.compact-card-back{width:30px;height:44px}.field-editor-modal{align-items:start;padding-top:max(18px,env(safe-area-inset-top))}.field-editor{max-height:78dvh;padding:14px;border-radius:18px}.expanded-colors .swatch{width:17px!important;height:17px!important;min-width:17px!important}.dice-footer .character-switch-cluster{width:auto!important;min-width:0!important;display:flex!important;gap:2px!important}.dice-footer .character-footer-button{width:46px!important;min-width:46px!important;height:54px!important;padding:4px!important}.dice-footer .character-footer-button .footer-portrait{width:38px!important;height:46px!important;object-fit:cover!important}.dice-footer .character-footer-button svg{width:30px!important;height:30px!important}.dice-footer .character-cycle-button{width:26px!important;min-width:26px!important;height:54px!important;font-size:17px!important;padding:0!important}.dice-footer .hand-drawer-toggle{width:48px!important;min-width:48px!important;height:62px!important;padding:4px!important}.dice-footer .hand-toggle-card-back{width:28px!important;height:42px!important}.dice-footer .hand-toggle-chevron{font-size:16px!important}}


/* SOURCE: footer-uniform.css */
.dice-footer{--footer-slot-w:43px;--footer-slot-h:64px;align-items:stretch!important}.dice-footer .circular-set{align-items:stretch!important;gap:6px!important}.dice-footer .character-switch-cluster,.dice-footer .hand-drawer-toggle,.dice-footer>.die-button,.dice-footer .circular-set>.die-button{flex:0 0 var(--footer-slot-w)!important;width:var(--footer-slot-w)!important;min-width:var(--footer-slot-w)!important;height:var(--footer-slot-h)!important;min-height:var(--footer-slot-h)!important;max-height:var(--footer-slot-h)!important}.dice-footer .character-switch-cluster{display:grid!important;grid-template-columns:1fr 18px!important;gap:0!important;border:1px solid #725d30;border-radius:10px;overflow:hidden;background:#1d2630}.dice-footer .character-footer-button{width:100%!important;min-width:0!important;height:100%!important;min-height:0!important;border:0!important;border-radius:9px 0 0 9px!important;padding:5px!important;background:#1d2630!important}.dice-footer .character-cycle-button{width:18px!important;min-width:18px!important;height:100%!important;min-height:0!important;padding:0!important;border:0!important;border-left:1px solid #725d30!important;border-radius:0!important;background:#1d2630!important;font-size:18px!important}.dice-footer .footer-portrait{border-radius:7px!important}.dice-footer .hand-drawer-toggle{position:relative!important;padding:0!important;border:1px solid #8d6a28!important;border-radius:10px!important;overflow:hidden!important;background:#111820!important}.dice-footer .hand-toggle-card-back{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;border-radius:9px!important;background-size:cover!important;background-position:center!important;box-shadow:none!important}.dice-footer .hand-toggle-chevron{position:absolute!important;left:0!important;right:0!important;bottom:0!important;height:18px!important;display:grid!important;place-items:center!important;background:linear-gradient(transparent,#0b0d0dcc 45%,#0b0d0df2)!important;color:#fff2c8!important;font-size:20px!important;line-height:1!important;text-shadow:0 1px 3px #000!important;z-index:2}.dice-footer .die-button{height:var(--footer-slot-h)!important;min-height:var(--footer-slot-h)!important;max-height:var(--footer-slot-h)!important;min-width:var(--footer-slot-w)!important;width:var(--footer-slot-w)!important;padding:4px!important;grid-template-rows:1fr 15px!important;border-radius:10px!important}.dice-footer .die-button .die-sprite{max-height:62px!important;height:62px!important;max-width:54px!important}.dice-footer .die-button small{font-size:10px!important}.dice-footer .d5-control{height:var(--footer-slot-h)!important;align-items:stretch!important}.dice-footer .d5-control .die-button{height:var(--footer-slot-h)!important}.dice-footer .d5-control select{height:var(--footer-slot-h)!important;align-self:stretch!important;border-radius:10px!important}.dice-footer .hand-drawer-toggle.open{box-shadow:0 0 0 2px #c79a38 inset!important}
@media(max-width:650px){.dice-footer{--footer-slot-w:39px;--footer-slot-h:58px}.dice-footer .circular-set{gap:5px!important}.dice-footer .character-switch-cluster{grid-template-columns:1fr 16px!important}.dice-footer .character-cycle-button{width:16px!important;min-width:16px!important;font-size:16px!important}.dice-footer .die-button .die-sprite{height:56px!important;max-height:56px!important;max-width:50px!important}.dice-footer .hand-toggle-chevron{height:16px!important;font-size:16px!important}}

/* Approved footer geometry: horizontal rail, never compress its controls. */
.dice-footer .circular-set{
 flex-wrap:nowrap!important;
 overflow:visible!important;
}

/* Full-height ordinary dice are exact squares. */
.dice-footer .circular-set>.die-button{
 flex:0 0 var(--footer-slot-h)!important;
 width:var(--footer-slot-h)!important;
 min-width:var(--footer-slot-h)!important;
 max-width:var(--footer-slot-h)!important;
 height:var(--footer-slot-h)!important;
 min-height:var(--footer-slot-h)!important;
 max-height:var(--footer-slot-h)!important;
 grid-template-rows:1fr!important;
 padding:6px!important;
}
.dice-footer .circular-set>.die-button .die-sprite{
 width:44px!important;
 height:44px!important;
 min-width:44px!important;
 min-height:44px!important;
 max-width:44px!important;
 max-height:44px!important;
 aspect-ratio:1/1!important;
}

/* D5: square gem button above a short horizontal value selector.
   Their combined height equals the card height. */
.dice-footer .d5-control{
 --d5-value-h:18px;
 --d5-square:calc(var(--footer-slot-h) - var(--d5-value-h));
 flex:0 0 var(--d5-square)!important;
 width:var(--d5-square)!important;
 min-width:var(--d5-square)!important;
 max-width:var(--d5-square)!important;
 height:var(--footer-slot-h)!important;
 min-height:var(--footer-slot-h)!important;
 max-height:var(--footer-slot-h)!important;
 display:grid!important;
 grid-template-columns:var(--d5-square)!important;
 grid-template-rows:var(--d5-square) var(--d5-value-h)!important;
 gap:0!important;
}
.dice-footer .d5-control .die-button{
 grid-column:1!important;
 grid-row:1!important;
 width:var(--d5-square)!important;
 min-width:var(--d5-square)!important;
 max-width:var(--d5-square)!important;
 height:var(--d5-square)!important;
 min-height:var(--d5-square)!important;
 max-height:var(--d5-square)!important;
 padding:4px!important;
 grid-template-rows:1fr!important;
 border-radius:10px 10px 0 0!important;
}
.dice-footer .d5-control .die-button .die-sprite{
 width:34px!important;
 height:34px!important;
 min-width:34px!important;
 min-height:34px!important;
 max-width:34px!important;
 max-height:34px!important;
 aspect-ratio:1/1!important;
}
.dice-footer .d5-control select{
 position:static!important;
 grid-column:1!important;
 grid-row:2!important;
 width:var(--d5-square)!important;
 min-width:var(--d5-square)!important;
 max-width:var(--d5-square)!important;
 height:var(--d5-value-h)!important;
 min-height:var(--d5-value-h)!important;
 max-height:var(--d5-value-h)!important;
 margin:0!important;
 padding:1px 18px 1px 6px!important;
 align-self:stretch!important;
 border-radius:0 0 7px 7px!important;
 text-align:center!important;
 text-align-last:center!important;
}

/* Clear Dice is intentionally a full-height horizontal rectangle. */
.dice-footer .clear-dice{
 flex:0 0 calc(var(--footer-slot-h) + 18px)!important;
 width:calc(var(--footer-slot-h) + 18px)!important;
 min-width:calc(var(--footer-slot-h) + 18px)!important;
 max-width:calc(var(--footer-slot-h) + 18px)!important;
 height:var(--footer-slot-h)!important;
 min-height:var(--footer-slot-h)!important;
 max-height:var(--footer-slot-h)!important;
 white-space:normal!important;
 line-height:1.1!important;
 padding:8px 12px!important;
}

@media(max-width:650px){
 .dice-footer .circular-set>.die-button .die-sprite{
  width:40px!important;height:40px!important;
  min-width:40px!important;min-height:40px!important;
  max-width:40px!important;max-height:40px!important;
 }
 .dice-footer .d5-control{--d5-value-h:16px}
 .dice-footer .d5-control .die-button .die-sprite{
  width:28px!important;height:28px!important;
  min-width:28px!important;min-height:28px!important;
  max-width:28px!important;max-height:28px!important;
 }
}


/* Final footer control refinements. */
.dice-footer{
 --footer-character-w:64px;
 --footer-clear-w:70px;
 --footer-sum-w:58px;
}
.dice-footer .character-switch-cluster{
 flex:0 0 var(--footer-character-w)!important;
 width:var(--footer-character-w)!important;
 min-width:var(--footer-character-w)!important;
 max-width:var(--footer-character-w)!important;
}
.dice-footer .clear-dice{
 flex:0 0 var(--footer-clear-w)!important;
 width:var(--footer-clear-w)!important;
 min-width:var(--footer-clear-w)!important;
 max-width:var(--footer-clear-w)!important;
}
.dice-footer .sum{
 flex:0 0 var(--footer-sum-w)!important;
 width:var(--footer-sum-w)!important;
 min-width:var(--footer-sum-w)!important;
 max-width:var(--footer-sum-w)!important;
 height:var(--footer-slot-h)!important;
 min-height:var(--footer-slot-h)!important;
 max-height:var(--footer-slot-h)!important;
 padding:5px!important;
 display:grid!important;
 grid-template-rows:1fr 1fr!important;
 place-items:center!important;
 align-content:center!important;
 text-align:center!important;
 white-space:normal!important;
 line-height:1!important;
}
.dice-footer .sum span{
 display:block;
 width:100%;
 text-align:center;
}
@media(max-width:650px){
 .dice-footer{
  --footer-character-w:58px;
  --footer-clear-w:64px;
  --footer-sum-w:52px;
 }
}

/* Mobile browser-safe footer spacing.
   Keep the dice rail above browser chrome, with visually even breathing room
   between the slider's top and bottom borders. */
@media(max-width:800px){
 .dice-footer{
  margin-bottom:calc(26px + env(safe-area-inset-bottom, 0px))!important;
  padding-top:5px!important;
  padding-bottom:5px!important;
  box-sizing:border-box!important;
 }
 .dice-footer .circular-set{
  align-self:center!important;
 }
}


/* SOURCE: rail-final.css */
/* Final rail geometry: outer frames stay inside the app; only their inner
   control rows scroll. Horizontal insets are replaced by a small inner space. */
@media(max-width:800px){
 .rist{width:100dvw!important;max-width:100dvw!important;overflow:hidden!important}
 .topbar,.public-card-drop,.staging-tray,.footer{
  box-sizing:border-box!important;
  justify-self:stretch!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  margin-inline:0!important;
  transform:none!important;
  border-left:0!important;
  border-right:0!important;
  border-radius:0!important;
  contain:inline-size;
 }
 .topbar,.footer{overflow-x:auto!important;overflow-y:hidden!important;scroll-padding-inline:7px!important}
 .header-circular-set,.dice-footer .circular-set{box-sizing:border-box!important;padding-left:7px!important;padding-right:7px!important}
 .header-circular-set{align-items:center!important;margin:0!important}
 .public-card-drop{overflow:hidden!important;padding-inline:0!important}
 .public-card-strip{box-sizing:border-box!important;width:max-content!important;min-width:100%!important;padding-inline:7px!important}
 .public-card-empty{box-sizing:border-box!important;flex:0 0 calc(100dvw - 14px)!important;width:calc(100dvw - 14px)!important;min-width:calc(100dvw - 14px)!important;max-width:calc(100dvw - 14px)!important}
 .staging-tray{padding-inline:7px!important;scroll-padding-inline:7px!important}
 .footer>.circular-set{flex:0 0 max-content!important;width:max-content!important;min-width:max-content!important;max-width:none!important}
}


/* Header save/load popovers. */
.icon-header{position:relative}
.header-action-menu{position:fixed;z-index:80;top:72px;right:7px;width:min(290px,calc(100dvw - 14px));display:grid;gap:5px;padding:9px;border:1px solid #8d7136;border-radius:10px;background:#101820f7;box-shadow:0 12px 32px #000c}
.header-action-menu button,.header-action-menu .map-file-load{display:block;width:100%;padding:9px 10px;border:1px solid #725d30;border-radius:7px;background:#1b252d;color:#eee6d3;text-align:left;font-size:12px}
.header-action-menu button:disabled{opacity:.48}.map-file-load{position:relative;overflow:hidden}.map-file-load input{position:absolute;inset:0;opacity:0;cursor:pointer}

/* Staged tile art fills and stays centered inside its pallet square. */
.tray-item.tile{position:relative!important;display:grid!important;grid-template-rows:1fr!important;place-items:center!important;overflow:hidden!important;padding:4px!important}
.tray-item.tile>.tile-image-crop{position:absolute!important;inset:4px!important;width:auto!important;height:auto!important}
.tray-item.tile small{display:none!important}

/* Three compact card rows overlay the map instead of changing table height. */
.card-triple-drawer{position:fixed;z-index:45;left:0;right:0;bottom:71px;display:grid;grid-template-rows:repeat(3,64px);gap:7px;padding-block:7px;background:#0b0f13e8;border-top:1px solid #6e592c;border-bottom:1px solid #6e592c;backdrop-filter:blur(7px)}
.card-drawer-row{display:flex;align-items:center;gap:7px;min-width:0;padding-inline:7px;overflow-x:auto;overflow-y:hidden;scrollbar-width:none}.card-drawer-row::-webkit-scrollbar{display:none}
.drawer-category-card,.drawer-front{position:relative;box-sizing:border-box;flex:0 0 54px;width:54px;height:58px;overflow:hidden;padding:0!important;border:1px solid #725d30!important;border-radius:8px!important;background:#141d25!important;color:#f4ead1!important}
.category-card-back{position:absolute;inset:0;background:url("../assets/cards/shaelvien_card_back.jpg") center/cover no-repeat;filter:brightness(.65)}
.drawer-category-card strong,.drawer-front strong{position:absolute;z-index:2;left:2px;right:2px;bottom:3px;padding:2px;background:#071018d9;border-radius:3px;color:#f3dfae;font-size:7px;line-height:1;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.drawer-front img{width:100%;height:100%;object-fit:cover}.drawer-glyph{display:grid;place-items:center;width:100%;height:100%;font-size:18px;color:var(--field-accent,#d9a82f)}
.character-front{flex-basis:54px}.character-cards-launcher .hand-toggle-chevron{display:none!important}

/* Logged-out mode keeps local map functions but suppresses account-only upload. */
.tileset-upload:has(input:disabled){opacity:.42;cursor:not-allowed}


/* Viewport geometry correction. The five top-level children always occupy the
   same explicit rows; previously only narrow portrait screens received this
   grid, leaving landscape children in implicit rows and collapsing the map. */
html,body,#app{width:100%;height:100%;min-height:0;overflow:hidden}
.rist{
 width:100dvw!important;
 max-width:100dvw!important;
 height:100dvh!important;
 min-height:0!important;
 display:grid!important;
 grid-template-columns:minmax(0,1fr)!important;
 grid-template-rows:64px 64px minmax(0,1fr) auto 64px!important;
 grid-template-areas:"header" "cards" "map" "hand" "footer"!important;
 gap:7px!important;
 overflow:hidden!important;
}
.topbar{grid-area:header}.public-card-drop{grid-area:cards}.table-workspace{grid-area:map}.hand-rail{grid-area:hand}.footer{grid-area:footer}
.topbar,.public-card-drop,.staging-tray,.footer{
 box-sizing:border-box!important;
 justify-self:stretch!important;
 width:100%!important;
 min-width:0!important;
 max-width:100%!important;
 margin:0!important;
 transform:none!important;
 border-left:0!important;
 border-right:0!important;
 border-radius:0!important;
}
.table-workspace{
 width:100%!important;
 height:100%!important;
 min-width:0!important;
 min-height:0!important;
 grid-template-rows:64px minmax(0,1fr)!important;
 gap:7px!important;
 overflow:hidden!important;
}
.staging-tray{height:64px!important;min-height:64px!important;max-height:64px!important;padding-inline:7px!important}
.map-shell{width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;padding:0 7px!important}
.map{width:min(100%,calc((100dvh - 285px)*20/13))!important;height:auto!important;max-width:100%!important;max-height:100%!important;aspect-ratio:20/13!important}

@media(orientation:landscape){
 .rist{grid-template-rows:64px 64px minmax(0,1fr) auto 64px!important}
 .table-workspace{
  grid-template-columns:96px minmax(0,1fr)!important;
  grid-template-rows:minmax(0,1fr)!important;
  gap:7px!important;
 }
 .staging-tray{
  width:96px!important;
  height:100%!important;
  min-height:0!important;
  max-height:none!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  border-right:1px solid #6e592c!important;
  padding:7px!important;
 }
 .tray-hint{white-space:normal!important;text-align:center!important}
 .map-shell{padding:0 7px 0 0!important}
 .map{
  width:min(100%,calc((100dvh - 213px)*20/13))!important;
  height:auto!important;
  max-height:100%!important;
 }
}


/* Consolidated responsive tabletop: the visible frame, not an invisible
   wrapper, owns width. Empty utilities stay compact so the map remains primary. */
.topbar,.public-card-drop,.staging-tray,.footer{
 border:1px solid #6e592c!important;
 border-left:0!important;
 border-right:0!important;
 border-radius:0!important;
 background:#0d1319!important;
}
.header-circular-set,.dice-footer>.circular-set{
 box-sizing:border-box!important;
 width:max-content!important;
 min-width:100%!important;
 margin:0!important;
 border:0!important;
 border-radius:0!important;
 padding-inline:7px!important;
}
.topbar,.footer{overflow-x:auto!important;overflow-y:hidden!important}
.public-card-strip{box-sizing:border-box!important;width:100%!important;min-width:100%!important;padding-inline:7px!important}
.public-card-empty{box-sizing:border-box!important;width:100%!important;min-width:100%!important;max-width:none!important}
.footer>.circular-set{flex:0 0 max-content!important}

@media(orientation:portrait){
 .rist{
  grid-template-rows:64px 52px minmax(0,1fr) auto 64px!important;
  grid-template-areas:"header" "cards" "map" "hand" "footer"!important;
  gap:7px!important;
 }
 .topbar,.footer{height:64px!important;min-height:64px!important;max-height:64px!important}
 .public-card-drop{height:52px!important;min-height:52px!important;max-height:52px!important;padding:4px 7px!important}
 .public-card-strip,.public-card-empty{height:42px!important;min-height:42px!important;max-height:42px!important}
 .public-card-empty{font-size:13px!important;padding:3px 8px!important}
 .table-workspace{grid-template-rows:52px minmax(0,1fr)!important;gap:7px!important}
 .staging-tray{height:52px!important;min-height:52px!important;max-height:52px!important;padding:3px 7px!important}
 .tray-hint{padding:3px 8px!important}
 .tray-item{height:44px!important;flex-basis:50px!important}
 .map-shell{padding:0 7px!important}
 .map{width:min(100%,calc((100dvh - 260px)*20/13))!important;max-height:100%!important}
}

@media(orientation:landscape){
 .rist{
  position:relative!important;
  grid-template-columns:minmax(0,1fr)!important;
  grid-template-rows:58px minmax(0,1fr) 58px!important;
  grid-template-areas:"header" "map" "footer"!important;
  gap:7px!important;
 }
 .topbar,.footer{height:58px!important;min-height:58px!important;max-height:58px!important}
 .header-circular-set,.dice-footer>.circular-set{height:56px!important;min-height:56px!important}
 .table-workspace{
  grid-area:map!important;
  grid-template-columns:80px minmax(0,1fr)!important;
  grid-template-rows:minmax(0,1fr)!important;
  gap:7px!important;
 }
 .staging-tray{
  width:80px!important;
  height:100%!important;
  min-height:0!important;
  max-height:none!important;
  display:flex!important;
  flex-direction:column!important;
  padding:48px 5px 5px!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  border:1px solid #6e592c!important;
  border-left:0!important;
 }
 .tray-hint{padding:4px!important;white-space:normal!important;text-align:center!important;font-size:9px!important}
 .tray-item{flex:0 0 50px!important;width:68px!important;height:50px!important}
 .map-shell{padding:0 7px 0 0!important}
 .map{width:min(100%,calc((100dvh - 130px)*20/13))!important;max-height:100%!important}
 .public-card-drop{
  position:absolute!important;
  z-index:30!important;
  top:65px!important;
  left:87px!important;
  right:7px!important;
  width:auto!important;
  min-width:0!important;
  max-width:none!important;
  height:40px!important;
  min-height:40px!important;
  max-height:40px!important;
  padding:3px 7px!important;
  overflow:hidden!important;
  background:#0d1319e8!important;
  backdrop-filter:blur(6px);
  border:1px solid #6e592c!important;
  border-radius:8px!important;
 }
 .public-card-strip,.public-card-empty{height:32px!important;min-height:32px!important;max-height:32px!important}
 .public-card-empty{font-size:11px!important;padding:2px 8px!important}
}


/* Permanent player tools directly above the dice footer. */
.rist{box-sizing:border-box!important;padding-bottom:max(5px,env(safe-area-inset-bottom))!important}
.player-tools-rail{
 grid-area:hand;box-sizing:border-box;display:grid;grid-template-columns:minmax(0,1.7fr) minmax(150px,1fr);
 gap:7px;width:100%;min-width:0;height:54px;padding:3px 7px;
 overflow:hidden;background:#0d1319;border-top:1px solid #6e592c;border-bottom:1px solid #6e592c;color:#eee6d3
}
.player-hand-pane,.token-placement-pane{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:6px;min-width:0;overflow:hidden}
.token-placement-pane{border-left:1px solid #6e592c;padding-left:7px}
.player-tools-label{color:#d9bd78;font-size:9px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;writing-mode:vertical-rl;transform:rotate(180deg)}
.player-hand-strip,.token-choice-strip{display:flex;align-items:center;gap:5px;min-width:0;height:46px;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;touch-action:pan-x}
.player-hand-strip::-webkit-scrollbar,.token-choice-strip::-webkit-scrollbar{display:none}
.compact-hand-card,.token-choice-strip>button{box-sizing:border-box;position:relative;flex:0 0 40px;width:40px;height:42px;display:grid;place-items:center;overflow:hidden;padding:2px!important;border:1px solid #725d30!important;border-radius:7px!important;background:#161e26!important;color:#eee6d3!important}
.compact-hand-card img{width:100%;height:100%;object-fit:cover;border-radius:4px}
.compact-hand-card .drawer-glyph{font-size:15px}
.character-hand-card{background:url("../assets/cards/shaelvien_card_back.jpg") center/cover no-repeat!important}
.token-choice{display:grid;place-items:center;width:30px;height:30px;border:2px solid #e3bf55;border-radius:50%;background:#57320fcf;color:#fff;font-size:8px;font-weight:700}
.pawn-choice{border-radius:7px;background:#26374a}
.token-pin-icon,.map-pin-icon{display:block!important;width:34px!important;height:34px!important;min-width:34px!important;min-height:34px!important;background-repeat:no-repeat!important}
.piece.pin .map-pin-icon{width:100%!important;height:100%!important;min-width:0!important;min-height:0!important}
.drag-ghost .map-pin-icon{width:42px!important;height:42px!important}

/* Atlas crops must be allowed to enlarge beyond the generic pallet image cap. */
.tray-item.tile>.tile-image-crop>img,.drag-ghost>.tile-image-crop>img{
 max-width:none!important;max-height:none!important;object-fit:fill!important
}

@media(orientation:portrait){
 .rist{grid-template-rows:64px 52px minmax(0,1fr) 54px 64px!important}
}
@media(orientation:landscape){
 .rist{
  grid-template-rows:58px minmax(0,1fr) 48px 58px!important;
  grid-template-areas:"header" "map" "hand" "footer"!important
 }
 .player-tools-rail{height:48px;padding-block:2px}
 .player-hand-strip,.token-choice-strip{height:42px}
 .compact-hand-card,.token-choice-strip>button{height:38px;width:38px;flex-basis:38px}
 .card-triple-drawer{bottom:119px}
}
@media(max-width:430px){
 .player-tools-rail{grid-template-columns:minmax(0,1.45fr) minmax(132px,.9fr)}
 .player-tools-label{font-size:8px}
}


/* Balanced player rail and campaign approval states. */
.player-tools-rail{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important}
.player-hand-pane,.token-placement-pane{width:100%;min-width:0}
.player-hand-strip,.token-choice-strip{width:100%;min-width:0}
.header-card-deck{position:relative!important}
.header-card-back,.hand-deck-card .hand-toggle-card-back{
 display:block;width:100%;height:100%;border-radius:7px;
 background:url("../assets/cards/shaelvien_card_back.jpg") center/cover no-repeat
}
.header-card-deck .header-card-back{width:46px;height:50px}
.approval-count{position:absolute;right:2px;top:2px;display:grid;place-items:center;min-width:15px;height:15px;padding:0 3px;border-radius:10px;background:#b7332c;color:#fff;font-size:9px;font-weight:800}
.hand-card-wrap,.token-approval-chip{position:relative;flex:0 0 auto;display:grid;place-items:center}
.compact-hand-card.pending,.token-approval-chip.pending{opacity:.48}
.compact-hand-card.approved,.token-approval-chip.approved{opacity:1}
.pending-mark{position:absolute;right:2px;top:2px;display:grid;place-items:center;width:14px;height:14px;border-radius:50%;background:#d09b22;color:#081018;font-size:10px;font-weight:900}
.approval-actions{position:absolute;z-index:4;left:1px;right:1px;bottom:1px;display:grid;grid-template-columns:1fr 1fr;gap:2px}
.approval-actions button{min-width:0;height:15px;padding:0!important;border:1px solid #92783d!important;border-radius:3px!important;background:#101820ed!important;color:#f7e7bd!important;font-size:10px;line-height:1}
.token-approval-chip{box-sizing:border-box;width:40px;height:42px;border:1px solid #725d30;border-radius:7px;background:#161e26}
.hand-deck-card{padding:2px!important}
@media(max-width:430px){
 .player-tools-rail{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important}
 .player-tools-label{writing-mode:vertical-rl}
}


/* Four-row deck drawer; compact rails cover the map without changing table flow. */
.card-quad-drawer{
 bottom:126px!important;
 grid-template-rows:repeat(4,58px)!important;
 gap:5px!important;
 padding-block:5px!important;
 max-height:calc(100dvh - 198px)!important;
 overflow-y:auto!important
}
.card-quad-drawer .card-drawer-row{height:58px!important;min-height:58px!important}
.standard-game-controls{display:flex;align-items:center;gap:6px;min-width:max-content;height:100%;padding-right:7px}
.standard-counts{display:flex;align-items:center;gap:5px;height:100%}
.standard-counts label{box-sizing:border-box;display:grid;grid-template-rows:auto 24px;gap:1px;min-width:58px;color:#d9bd78;font-size:7px;text-align:center}
.standard-counts input{box-sizing:border-box;width:58px;height:24px;padding:2px 4px;border:1px solid #725d30;border-radius:5px;background:#121a22;color:#f2e6ca;text-align:center}
.draw-only-setting{box-sizing:border-box;display:grid;grid-template-columns:auto auto;align-items:center;gap:4px;height:38px;padding:4px 7px;border:1px solid #725d30;border-radius:7px;background:#161e26;color:#f2e6ca;font-size:9px;white-space:nowrap}
.standard-game-controls>button,.standard-load{box-sizing:border-box;display:grid;place-items:center;height:38px;min-width:48px;padding:4px 7px;border:1px solid #725d30;border-radius:7px;background:#161e26;color:#f2e6ca;font-size:9px}
.standard-load{position:relative;overflow:hidden}.standard-load input{position:absolute;inset:0;opacity:0}
.standard-card-face{box-sizing:border-box;display:grid;grid-template-rows:auto 1fr;place-items:center;width:100%;height:100%;padding:3px;border-radius:5px;background:#d4bd89;color:#24180d;text-align:center}
.standard-card-face small{font-size:6px;text-transform:uppercase}.standard-card-face strong{font-size:7px;line-height:1.05}

/* Character sheet is a stable playing-card surface; pages flip inside one footprint. */
.mixer-modal:has(.universal-sheet){
 position:fixed!important;z-index:88!important;inset:64px 0 126px!important;
 display:grid!important;place-items:center!important;padding:7px!important;
 overflow:hidden!important;background:#05090cb8!important;backdrop-filter:blur(5px)
}
.character-mixer.universal-sheet{
 box-sizing:border-box!important;position:relative!important;
 width:min(90dvw,430px,calc((100dvh - 211px)*5/7))!important;
 height:min(calc(100dvh - 211px),602px,calc(90dvw*7/5))!important;
 aspect-ratio:5/7!important;margin:0!important;padding:12px!important;
 overflow:hidden!important;border:2px solid #b28a44!important;border-radius:18px!important;
 background:#111820 url("../assets/cards/shaelvien_card_back.jpg") center/cover no-repeat!important;
 box-shadow:0 18px 52px #000,inset 0 0 0 3px #15100a!important
}
.character-mixer.universal-sheet:before{content:"";position:absolute;inset:8px;border:1px solid #c59b4f;border-radius:12px;background:#0c1317ed;pointer-events:none}
.character-mixer.universal-sheet>*{position:relative;z-index:1}
.character-mixer .exact-sheet-toolbar{box-sizing:border-box;height:34px!important;display:flex!important;align-items:center!important;gap:4px!important;padding:3px 5px!important;overflow-x:auto!important;border:1px solid #80642f!important;border-radius:8px!important;background:#0d1419ed!important}
.character-mixer .exact-sheet-toolbar span{margin-right:auto;white-space:nowrap;color:#e5ca8d;font-size:9px}
.character-mixer .exact-sheet-toolbar button{height:26px!important;min-width:38px!important;padding:2px 6px!important;font-size:9px!important}
.character-mixer .exact-sheet-screen{box-sizing:border-box!important;position:relative!important;height:calc(100% - 39px)!important;display:block!important;padding:7px 7px 42px!important;overflow-y:auto!important;overflow-x:hidden!important;border:1px solid #80642f!important;border-radius:9px!important;background:#d8c18f!important;color:#24190f!important}
.character-mixer .identity-badge{position:sticky!important;top:0!important;z-index:8!important;display:grid!important;grid-template-columns:54px minmax(0,1fr)!important;gap:7px!important;min-height:58px!important;margin-bottom:7px!important;padding:5px!important;border:1px solid #88682d!important;border-radius:28px 8px 8px 28px!important;background:#ead8ad!important}
.character-mixer .exact-portrait{box-sizing:border-box!important;width:54px!important;height:54px!important;min-height:54px!important;border:3px double #9d7429!important;border-radius:50%!important;overflow:hidden!important;background:#111!important}
.character-mixer .exact-portrait img{width:100%!important;height:100%!important;object-fit:cover!important}
.character-mixer .identity-badge-fields{display:grid!important;align-content:center!important;gap:3px!important}.character-mixer .exact-name{box-sizing:border-box!important;width:100%!important;height:30px!important;font-size:15px!important;font-weight:800!important}
.character-mixer .sheet-pane{margin:0 0 6px!important;border:1px solid #8c6b31!important;border-radius:7px!important;background:#f0dfb7!important;color:#24190f!important}
.character-mixer .sheet-pane header,.character-mixer .pane-toggle{min-height:30px!important}
.character-mixer .pane-content{max-height:220px!important;overflow:auto!important;padding:5px!important}
.character-mixer .exact-page-arrows{position:absolute!important;z-index:12!important;left:7px!important;right:7px!important;bottom:6px!important;display:flex!important;justify-content:space-between!important;pointer-events:none}
.character-mixer .exact-page-arrows button{pointer-events:auto!important;width:34px!important;height:34px!important;padding:2px!important;border-radius:50%!important;background:#111a20ed!important}
.character-mixer .exact-page-arrows img{width:100%!important;height:100%!important;object-fit:contain!important}
@media(orientation:landscape){
 .card-quad-drawer{bottom:119px!important}
 .mixer-modal:has(.universal-sheet){inset:58px 0 119px!important}
 .character-mixer.universal-sheet{width:min(88dvw,430px,calc((100dvh - 191px)*5/7))!important;height:min(calc(100dvh - 191px),602px,calc(88dvw*7/5))!important}
}


/* Playing-card geometry: card controls use a consistent 5:7 silhouette.
   Token controls intentionally retain their square and circular shapes. */
:root{--rist-card-height:44px;--rist-card-width:calc(var(--rist-card-height)*5/7)}
.compact-hand-card{
 flex:0 0 var(--rist-card-width)!important;
 width:var(--rist-card-width)!important;
 height:var(--rist-card-height)!important;
 aspect-ratio:5/7!important;
 padding:2px!important;
 border-radius:5px!important
}
.hand-card-wrap{
 flex:0 0 var(--rist-card-width)!important;
 width:var(--rist-card-width)!important;
 height:var(--rist-card-height)!important;
 aspect-ratio:5/7!important
}
.hand-deck-card .hand-toggle-card-back,.compact-hand-card img,.standard-card-face{
 border-radius:3px!important
}
.header-card-deck{
 box-sizing:border-box!important;
 width:46px!important;
 min-width:46px!important;
 padding:3px!important
}
.header-card-deck .header-card-back{
 width:34px!important;
 height:48px!important;
 aspect-ratio:5/7!important;
 margin:auto!important;
 border-radius:5px!important
}
.drawer-category-card,.drawer-front{
 flex:0 0 41px!important;
 width:41px!important;
 height:58px!important;
 aspect-ratio:5/7!important;
 border-radius:6px!important
}
.category-card-back{border-radius:5px!important}
@media(orientation:landscape){
 :root{--rist-card-height:40px}
 .header-card-deck .header-card-back{width:32px!important;height:45px!important}
}

.standard-game-controls>.standard-drawer-exit{
 order:99!important;
 width:38px!important;
 min-width:38px!important;
 padding:2px!important
}
.standard-drawer-exit .header-icon{
 width:32px!important;
 height:32px!important;
 min-width:32px!important;
 min-height:32px!important
}

.standard-game-controls>.standard-save-icon,.standard-game-controls>.standard-load-icon{
 box-sizing:border-box!important;
 width:38px!important;
 min-width:38px!important;
 height:38px!important;
 padding:2px!important
}
.standard-save-icon .header-icon,.standard-load-icon .header-icon{
 display:block!important;
 width:32px!important;
 height:32px!important;
 min-width:32px!important;
 min-height:32px!important
}


/* Compact hand labels and a centered three-card deck silhouette. */
.character-hand-card .drawer-glyph{
 box-sizing:border-box!important;
 max-width:100%!important;
 padding-inline:2px!important;
 overflow:hidden!important;
 color:#f0d99d!important;
 font-size:7px!important;
 line-height:1!important;
 letter-spacing:0!important;
 text-align:center!important
}
.hand-deck-card{
 display:block!important;
 overflow:hidden!important;
 padding:0!important
}
.hand-deck-card .hand-toggle-card-back{
 position:absolute!important;
 z-index:3!important;
 inset:2px 6px 6px 2px!important;
 width:auto!important;
 height:auto!important;
 margin:0!important;
 overflow:visible!important;
 border:1px solid #98783d!important;
 background:url("../assets/cards/shaelvien_card_back.jpg") center/cover no-repeat!important;
 box-shadow:
  2px 2px 0 #10171d,3px 3px 0 #98783d,
  4px 4px 0 #10171d,5px 5px 0 #98783d!important
}


/* Asset search occupies the map workspace; the pallet remains visible as its staging rail. */
.tile-browser{
 top:59px!important;
 right:7px!important;
 bottom:0!important;
 left:7px!important;
 width:auto!important;
 height:auto!important;
 max-height:none!important;
 border-radius:10px!important
}
.tile-browser-grid{
 display:grid!important;
 grid-template-columns:repeat(auto-fill,minmax(76px,1fr))!important;
 align-content:start!important;
 gap:7px!important;
 overflow-x:hidden!important;
 overflow-y:auto!important;
 touch-action:pan-y!important
}
.library-tile{
 width:100%!important;
 min-width:0!important
}

/* During play, the pallet becomes one compact initiative and timer rail. */
.encounter-control-rail{
 display:grid!important;
 grid-template-columns:auto minmax(0,1fr) auto!important;
 align-items:center!important;
 gap:7px!important;
 overflow:hidden!important
}
.initiative-heading{
 display:grid;
 gap:1px;
 min-width:max-content;
 color:#d9bd78;
 font-size:8px;
 letter-spacing:.08em;
 text-transform:uppercase
}
.initiative-heading span{color:#a99f89;font-size:7px;letter-spacing:0}
.initiative-strip{
 box-sizing:border-box;
 display:flex;
 align-items:center;
 gap:5px;
 min-width:0;
 height:46px;
 margin:0;
 padding:0;
 overflow-x:auto;
 overflow-y:hidden;
 list-style:none;
 scrollbar-width:none
}
.initiative-strip::-webkit-scrollbar{display:none}
.initiative-strip li{
 box-sizing:border-box;
 flex:0 0 auto;
 display:grid;
 grid-template-columns:18px auto;
 align-items:center;
 gap:4px;
 height:38px;
 padding:3px 7px 3px 3px;
 border:1px solid #725d30;
 border-radius:7px;
 background:#161e26;
 color:#eee6d3;
 font-size:9px
}
.initiative-strip li>span{
 display:grid;
 place-items:center;
 width:18px;
 height:30px;
 border-radius:5px;
 background:#6c4a1f;
 color:#ffe7aa;
 font-weight:800
}
.initiative-strip .initiative-empty{display:grid;grid-template-columns:1fr;color:#a99f89}
.encounter-timer{
 display:grid;
 grid-template-columns:auto auto auto;
 align-items:center;
 gap:4px;
 min-width:max-content
}
.encounter-timer time{
 min-width:58px;
 color:#f1d68f;
 font-variant-numeric:tabular-nums;
 font-size:11px;
 font-weight:800;
 text-align:center
}
.encounter-timer button{
 height:32px!important;
 min-width:38px!important;
 padding:3px 5px!important;
 border:1px solid #725d30!important;
 border-radius:6px!important;
 background:#17212a!important;
 color:#eee6d3!important;
 font-size:8px!important
}
@media(orientation:landscape){
 .tile-browser{
  top:0!important;
  left:87px!important;
  right:7px!important;
  bottom:0!important
 }
 .encounter-control-rail{
  grid-template-columns:1fr!important;
  grid-template-rows:auto minmax(0,1fr) auto!important;
  padding:5px!important
 }
 .initiative-strip{
  width:100%!important;
  height:auto!important;
  flex-direction:column!important;
  overflow-x:hidden!important;
  overflow-y:auto!important
 }
 .initiative-strip li{width:100%!important}
 .encounter-timer{
  grid-template-columns:1fr 1fr!important;
  width:100%!important
 }
 .encounter-timer time{grid-column:1/-1}
}

.tile-browser-grid>p{
 grid-column:1/-1!important;
 width:100%!important;
 margin:18px 0!important;
 white-space:normal!important;
 writing-mode:horizontal-tb!important
}


/* Mode selector reuses the encounter icon; native option text stays accessible. */
.table-mode-control{position:relative}
.table-mode-control.play,.table-mode-control.encounter{border-color:#d4b55d!important;box-shadow:inset 0 0 0 1px #d4b55d}
.table-mode-control.test{border-color:#6e91b8!important}
.table-mode-control.forge{border-color:#b96f43!important}

/* Footer chat and RPG-style over-map dialogue. */
.footer-chat-button{
 box-sizing:border-box!important;position:relative!important;flex:0 0 var(--footer-slot-h)!important;
 width:var(--footer-slot-h)!important;min-width:var(--footer-slot-h)!important;height:var(--footer-slot-h)!important;
 display:grid!important;place-items:center!important;padding:5px!important;border:1px solid #725d30!important;
 border-radius:10px!important;background:#1d2630!important;color:#f2d997!important
}
.footer-chat-button span{font-size:9px;font-weight:900;letter-spacing:.08em;text-transform:uppercase}
.footer-chat-button.active{border-color:#d4b55d!important;box-shadow:inset 0 0 0 1px #d4b55d}
.dialogue-scrim{
 position:fixed;z-index:82;inset:128px 0 126px;display:grid;align-items:end;padding:10px max(10px,env(safe-area-inset-right)) 10px max(10px,env(safe-area-inset-left));
 background:#03060966;backdrop-filter:blur(2px)
}
.dialogue-composer,.rpg-dialogue-box{
 box-sizing:border-box;width:min(760px,100%);min-height:128px;margin:0 auto;display:grid;
 grid-template-columns:96px minmax(0,1fr) auto;gap:12px;align-items:stretch;padding:10px;
 border:2px solid #d4b55d;border-radius:10px;background:#101923f2;color:#f4ead1;
 box-shadow:0 12px 38px #000,inset 0 0 0 2px #283848
}
.dialogue-portrait{box-sizing:border-box;width:96px;height:108px;overflow:hidden;border:1px solid #d4b55d;border-radius:7px;background:#080d12}
.dialogue-portrait img{display:block;width:100%;height:100%;object-fit:cover}
.dialogue-card-back{display:block;width:100%;height:100%;background:url("../assets/cards/shaelvien_card_back.jpg") center/cover no-repeat}
.dialogue-composer label{display:grid;grid-template-rows:auto 1fr;gap:5px;min-width:0;color:#e6c879;font-size:10px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.dialogue-composer textarea{box-sizing:border-box;width:100%;min-height:82px;resize:none;padding:9px;border:1px solid #725d30;border-radius:7px;background:#091018;color:#f5ecd8;font-size:16px;line-height:1.35}
.dialogue-actions{display:grid;align-content:end;gap:6px}.dialogue-actions button,.dialogue-next{height:36px!important;padding:5px 10px!important;border:1px solid #725d30!important;border-radius:7px!important;background:#18242e!important;color:#eee6d3!important;font-size:10px!important}
.dialogue-actions .primary,.dialogue-next{border-color:#b9903b!important;color:#f5dda0!important}.dialogue-actions button:disabled{opacity:.42}
.rpg-dialogue-box{grid-template-columns:96px minmax(0,1fr) auto}
.dialogue-copy{min-width:0;padding:5px 2px}.dialogue-copy strong{display:block;margin-bottom:6px;color:#e7c972;font-size:12px;letter-spacing:.07em}.dialogue-copy p{margin:0;color:#f6efe0;font-size:16px;line-height:1.45;white-space:pre-wrap}
.dialogue-next{align-self:end;min-width:62px}
@media(orientation:landscape){.dialogue-scrim{inset:58px 0 119px}.dialogue-composer,.rpg-dialogue-box{min-height:112px}.dialogue-portrait{height:92px}}
@media(max-width:600px){
 .dialogue-scrim{inset:128px 0 126px;padding:7px}
 .dialogue-composer,.rpg-dialogue-box{grid-template-columns:76px minmax(0,1fr);gap:8px;min-height:116px;padding:8px}
 .dialogue-portrait{width:76px;height:96px}.dialogue-actions{grid-column:1/-1;grid-template-columns:1fr 1fr}
 .rpg-dialogue-box .dialogue-next{grid-column:2;justify-self:end}.dialogue-copy p{font-size:14px}
}


/* Safari-safe header pin: pointer gesture only, never native image/text selection. */
.header-pin-drag,
.header-pin-drag *{
 -webkit-user-select:none!important;
 user-select:none!important;
 -webkit-touch-callout:none!important;
 touch-action:none!important;
 -webkit-user-drag:none!important
}
.header-pin-drag{cursor:grab!important}
.header-pin-drag:active{cursor:grabbing!important;border-color:#d7b75a!important;box-shadow:inset 0 0 0 1px #d7b75a!important}

/* Compact RPG dialogue: one-third-height presentation while remaining tap-friendly. */
.dialogue-scrim{padding:6px!important}
.dialogue-composer,.rpg-dialogue-box{
 width:min(620px,92%)!important;
 min-height:46px!important;
 grid-template-columns:38px minmax(0,1fr) auto!important;
 gap:6px!important;
 padding:5px 6px!important;
 border-radius:7px!important
}
.dialogue-portrait{width:38px!important;height:42px!important;border-radius:5px!important}
.dialogue-composer label{grid-template-rows:auto 30px!important;gap:2px!important;font-size:7px!important}
.dialogue-composer textarea{min-height:30px!important;height:30px!important;padding:4px 6px!important;font-size:12px!important;line-height:1.2!important}
.dialogue-actions{display:flex!important;align-items:end!important;gap:4px!important}
.dialogue-actions button,.dialogue-next{height:30px!important;min-width:46px!important;padding:3px 7px!important;font-size:8px!important}
.dialogue-copy{padding:1px!important}.dialogue-copy strong{margin:0 0 2px!important;font-size:8px!important}.dialogue-copy p{font-size:11px!important;line-height:1.2!important}
@media(max-width:600px){
 .dialogue-composer,.rpg-dialogue-box{width:96%!important;grid-template-columns:38px minmax(0,1fr) auto!important;min-height:46px!important;gap:5px!important;padding:5px!important}
 .dialogue-actions{grid-column:auto!important}.rpg-dialogue-box .dialogue-next{grid-column:auto!important}
}

/* Ivory crystal character card: every sheet page shares one stable 5:7 front. */
.character-mixer.universal-sheet{
 border-color:#b7a176!important;
 background:#eee8da!important;
 color:#4b4236!important;
 box-shadow:0 18px 52px #000,inset 0 0 0 3px #d8ccb3!important
}
.character-mixer.universal-sheet:before{
 border-color:#c7b789!important;
 background:#f4efe4!important;
 box-shadow:inset 0 0 18px #d7cbb4!important
}
.character-mixer .exact-sheet-toolbar{
 border-color:#c7b789!important;
 background:#e8dfcd!important
}
.character-mixer .exact-sheet-toolbar span{color:#665b48!important}
.character-mixer .exact-sheet-toolbar button{
 border-color:#b9a471!important;background:#f3ecdc!important;color:#554a39!important
}
.character-mixer .exact-sheet-screen{
 border-color:#c7b789!important;
 background:#f7f2e8!important;
 color:#4b4236!important
}
.character-mixer .identity-badge{
 border-color:#c1ad7f!important;
 background:#eee5d3!important
}
.character-mixer .exact-portrait{border-color:#b8a06c!important;background:#ddd3c0!important}
.character-mixer .exact-name,.character-mixer input,.character-mixer textarea,.character-mixer select{
 border-color:#c5b181!important;background:#fbf7ef!important;color:#4b4236!important
}
.character-mixer .sheet-pane{
 border-color:#c4b080!important;
 background:#eee6d6!important;
 color:#4b4236!important
}
.character-mixer .sheet-pane header,.character-mixer .pane-toggle{
 background:#e5dbc7!important;color:#574c3b!important
}
.character-mixer .pane-content{background:#f8f3e9!important}
.character-mixer .exact-page-arrows button{
 border-color:#baa36e!important;background:#ece3d1!important;color:#4b4236!important
}


/* Endemar world label sits over its assembled AWS coast tiles without blocking map gestures. */
.continent-name{
 position:absolute;z-index:4;left:50%;top:50%;transform:translate(-50%,-50%);
 pointer-events:none;color:#f1ddb0;text-shadow:0 2px 4px #071016,0 0 8px #071016;
 font-family:Georgia,serif;font-size:clamp(16px,2.4vw,32px);font-weight:700;letter-spacing:.12em
}


/* Connected terrain-zone editor */
.zone-editor{margin-left:auto;display:flex;align-items:center;gap:8px;min-width:0;padding:6px 10px;border-left:1px solid #80672d;background:rgba(11,18,24,.9)}
.zone-editor button,.zone-editor input{min-height:34px;border:1px solid #9b7927;border-radius:9px;background:#17222c;color:#f4e7c2}
.zone-editor button{padding:5px 10px;font-weight:700}
.zone-editor .zone-mode-button.active{background:#8b6b22;color:#fff4c8;box-shadow:0 0 0 2px #e2bd54 inset}
.zone-editor strong{white-space:nowrap;color:#e5c56c;text-transform:capitalize}
.zone-editor label{display:flex;align-items:center;gap:6px;min-width:150px}
.zone-editor label span{font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:#c9b88c}
.zone-editor input{width:130px;padding:4px 8px}
.tile-cell.locked{cursor:default}
.tile-cell.locked::after{content:"";position:absolute;inset:0;background:rgba(8,14,18,.08);pointer-events:none}
.tile-cell.zone-selected{z-index:3;filter:brightness(1.12)}
.tile-cell.zone-edge-top{border-top:3px solid #f3cf61}
.tile-cell.zone-edge-right{border-right:3px solid #f3cf61}
.tile-cell.zone-edge-bottom{border-bottom:3px solid #f3cf61}
.tile-cell.zone-edge-left{border-left:3px solid #f3cf61}
.map-zone-label{position:absolute;z-index:8;transform:translate(-50%,-50%);padding:3px 8px;border:1px solid #9c7b31;border-radius:8px;background:rgba(8,15,20,.78);color:#f4e3b2;font:700 clamp(10px,1.8vw,16px) Georgia,serif;white-space:nowrap;pointer-events:none;text-shadow:0 1px 2px #000}
.map-zone-label.locked{box-shadow:0 0 0 1px rgba(229,196,96,.35)}
@media(max-width:760px){.zone-editor{overflow-x:auto;max-width:72%;padding:4px 6px}.zone-editor strong{font-size:11px}.zone-editor label span{display:none}.zone-editor input{width:96px}}


/* Recursive locked-region drill-down */
.tile-cell{touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.tile-cell.locked{cursor:context-menu}
.tile-cell.recursive-region-selected{z-index:4;box-shadow:inset 0 0 0 2px rgba(125,220,255,.55);filter:brightness(1.12)}
.tile-cell.recursive-edge-top{border-top:4px solid #8de5ff}
.tile-cell.recursive-edge-right{border-right:4px solid #8de5ff}
.tile-cell.recursive-edge-bottom{border-bottom:4px solid #8de5ff}
.tile-cell.recursive-edge-left{border-left:4px solid #8de5ff}
.locked-tile-menu,.region-player-picker{position:absolute;z-index:30;left:50%;top:50%;transform:translate(-50%,-50%);display:grid;gap:8px;width:min(86%,320px);padding:14px;border:1px solid #c69a35;border-radius:14px;background:rgba(10,17,24,.98);box-shadow:0 14px 38px rgba(0,0,0,.55);color:#f2dfad}
.locked-tile-menu strong,.region-player-picker strong{font-size:13px;letter-spacing:.1em;text-transform:uppercase}
.locked-tile-menu button,.region-player-picker button,.recursive-region-actions button{min-height:42px;padding:8px 12px;border:1px solid #9b7927;border-radius:10px;background:#17222c;color:#f4e7c2;font-weight:700}
.locked-tile-menu button:disabled{opacity:.4}
.region-player-picker label{display:flex;align-items:center;gap:9px;min-height:40px;padding:6px 9px;border:1px solid rgba(155,121,39,.55);border-radius:9px;background:#121d26}
.recursive-region-actions{position:absolute;z-index:28;left:50%;bottom:14px;transform:translateX(-50%);display:flex;align-items:center;gap:8px;max-width:calc(100% - 20px);padding:7px;border:1px solid #8de5ff;border-radius:12px;background:rgba(8,20,29,.96);color:#d7f6ff;box-shadow:0 8px 24px rgba(0,0,0,.4)}
.recursive-region-actions strong{white-space:nowrap;font-size:12px}
@media(max-width:600px){.recursive-region-actions{bottom:8px;flex-wrap:wrap;justify-content:center}.recursive-region-actions button{min-height:36px}.locked-tile-menu,.region-player-picker{width:min(90%,300px)}}


/* Final orientation pass: preserve the complete tabletop in short landscape
   viewports and keep the three token sources adjacent. */
.token-choice-strip{justify-content:flex-start!important}
.token-pin-source{min-width:40px!important;min-height:42px!important}
.token-pin-source .map-pin-icon{width:34px!important;height:34px!important}

@media (orientation:landscape) and (max-height:700px){
 html,body,#app{height:100dvh!important;min-height:0!important;overflow:hidden!important}
 .rist{
  box-sizing:border-box!important;
  width:100dvw!important;
  height:100dvh!important;
  min-height:0!important;
  padding-bottom:env(safe-area-inset-bottom,0px)!important;
  grid-template-columns:minmax(0,1fr)!important;
  grid-template-rows:56px minmax(0,1fr) 50px 56px!important;
  grid-template-areas:"header" "map" "hand" "footer"!important;
  gap:5px!important;
 }
 .topbar,.footer{height:56px!important;min-height:56px!important;max-height:56px!important}
 .header-circular-set,.dice-footer>.circular-set{height:54px!important;min-height:54px!important}
 .table-workspace{
  width:100%!important;height:100%!important;min-height:0!important;
  grid-template-columns:clamp(80px,8vw,108px) minmax(0,1fr)!important;
  grid-template-rows:minmax(0,1fr)!important;
  gap:5px!important;
 }
 .staging-tray{
  box-sizing:border-box!important;width:100%!important;height:100%!important;
  padding:44px 5px 5px!important;overflow-x:hidden!important;overflow-y:auto!important;
 }
 .map-shell{box-sizing:border-box!important;width:100%!important;height:100%!important;min-height:0!important;padding:0 5px 0 0!important;place-items:center!important}
 .map{width:min(100%,calc((100dvh - 177px)*20/13))!important;height:auto!important;max-width:100%!important;max-height:100%!important}
 .public-card-drop{top:61px!important;left:calc(clamp(80px,8vw,108px) + 5px)!important;right:5px!important}
 .player-tools-rail{box-sizing:border-box!important;width:100%!important;height:50px!important;min-height:50px!important;padding:2px 6px!important}
 .player-hand-strip,.token-choice-strip{height:44px!important}
 .compact-hand-card,.token-choice-strip>button{width:40px!important;min-width:40px!important;height:40px!important;min-height:40px!important;flex-basis:40px!important}
 .token-pin-source .map-pin-icon{width:32px!important;height:32px!important}
 .footer{padding-bottom:max(2px,env(safe-area-inset-bottom,0px))!important}
}


/* Desktop map workspace: use the available canvas and expose precise controls. */
.desktop-map-zoom{display:none}
.map:focus{outline:none}
.map:focus-visible{outline:2px solid #e5c45f;outline-offset:-3px}
@media (hover:hover) and (pointer:fine){
 .map-shell{place-items:stretch!important}
 .map{
  width:100%!important;
  height:100%!important;
  max-width:none!important;
  max-height:none!important;
  aspect-ratio:auto!important;
  cursor:grab;
 }
 .map:active{cursor:grabbing}
 .desktop-map-zoom{
  position:absolute;
  z-index:35;
  top:10px;
  right:10px;
  display:flex;
  gap:6px;
  padding:5px;
  border:1px solid rgba(156,123,49,.78);
  border-radius:12px;
  background:rgba(8,15,20,.88);
  box-shadow:0 5px 18px rgba(0,0,0,.38);
 }
 .desktop-map-zoom button{
  display:grid;
  place-items:center;
  width:40px;
  height:40px;
  padding:0;
  border:1px solid #9c7b31;
  border-radius:9px;
  background:#18232d;
  color:#f5e6bb;
  font:700 27px/1 system-ui,sans-serif;
  cursor:pointer;
 }
 .desktop-map-zoom button:hover{background:#263746;border-color:#e5c45f}
 .desktop-map-zoom button:focus-visible{outline:2px solid #f3d879;outline-offset:2px}
 .map:has(.grid.square)::before,
 .map:has(.grid.hex)::before{inset:0!important;width:100%!important;height:100%!important}
}


/* Compact map state control: visible padlock, accessible action text only. */
.map-lock-button{
 display:grid!important;
 place-items:center!important;
 flex:0 0 48px!important;
 width:48px!important;
 min-width:48px!important;
 height:48px!important;
 min-height:48px!important;
 padding:0!important;
 overflow:visible!important;
 color:#f1d681!important;
}
.map-lock-glyph{
 position:relative;
 display:block;
 width:23px;
 height:18px;
 margin-top:7px;
 border:3px solid currentColor;
 border-radius:4px;
 background:rgba(229,196,95,.08);
}
.map-lock-glyph::before{
 content:"";
 position:absolute;
 left:3px;
 bottom:100%;
 width:11px;
 height:11px;
 border:3px solid currentColor;
 border-bottom:0;
 border-radius:9px 9px 0 0;
 transform-origin:left bottom;
 transition:transform .16s ease;
}
.map-lock-glyph.unlocked::before{transform:translate(8px,-1px) rotate(28deg)}
.map-lock-button:hover,.map-lock-button:focus-visible{color:#fff0ad!important}


/* Bottom browser safety shelf: reserve real layout space above mobile browser
   chrome on every viewport instead of visually translating the footer. */
:root{--rist-bottom-shelf:max(12px,env(safe-area-inset-bottom,0px))}
.rist{
 box-sizing:border-box!important;
 height:100dvh!important;
 min-height:0!important;
 padding-bottom:var(--rist-bottom-shelf)!important
}
@media (orientation:landscape) and (max-height:700px){
 .rist{padding-bottom:var(--rist-bottom-shelf)!important}
 .footer{padding-bottom:2px!important}
}


/* Fine-pointer navigation for every overflowing tabletop rail. Touch devices
   keep their full swipe surface; laptop and desktop users receive arrows. */
.rail-scroll-arrow{display:none}
.arrow-vertical{display:none}
@media (hover:hover) and (pointer:fine){
 .desktop-arrow-slider{position:relative!important}
 .rail-scroll-arrow{
  box-sizing:border-box!important;
  position:sticky!important;
  z-index:70!important;
  top:50%!important;
  display:grid!important;
  place-items:center!important;
  flex:0 0 30px!important;
  width:30px!important;
  min-width:30px!important;
  height:36px!important;
  min-height:36px!important;
  align-self:center!important;
  padding:0!important;
  border:1px solid #9c7b31!important;
  border-radius:9px!important;
  background:rgba(16,25,33,.94)!important;
  color:#f4dfa7!important;
  box-shadow:0 4px 12px rgba(0,0,0,.42)!important;
  font:700 25px/1 system-ui,sans-serif!important;
  cursor:pointer!important
 }
 .rail-scroll-arrow:hover{background:#263746!important;border-color:#e5c45f!important}
 .rail-scroll-arrow:focus-visible{outline:2px solid #f3d879!important;outline-offset:2px!important}
 .rail-scroll-prev{left:4px!important}
 .rail-scroll-next{right:4px!important;margin-left:auto!important}
 .topbar>.rail-scroll-arrow,.footer>.rail-scroll-arrow,.public-card-drop>.rail-scroll-arrow{
  position:sticky!important;top:auto!important
 }
 .tile-browser-grid>.rail-scroll-arrow{align-self:center!important}
}
@media (hover:hover) and (pointer:fine) and (orientation:landscape){
 .desktop-arrow-adaptive>.rail-scroll-arrow{
  top:auto!important;
  left:50%!important;
  right:auto!important;
  margin:0 auto!important;
  flex:0 0 32px!important;
  width:38px!important;
  height:32px!important;
  min-height:32px!important
 }
 .desktop-arrow-adaptive>.rail-scroll-prev{top:4px!important}
 .desktop-arrow-adaptive>.rail-scroll-next{bottom:4px!important;margin-top:auto!important}
 .desktop-arrow-adaptive .arrow-horizontal{display:none!important}
 .desktop-arrow-adaptive .arrow-vertical{display:inline!important}
}


/* Rail arrows are real end-cap controls, never floating overlays. */
@media (hover:hover) and (pointer:fine){
 .rail-scroll-arrow{
  position:static!important;
  inset:auto!important;
  top:auto!important;
  right:auto!important;
  bottom:auto!important;
  left:auto!important;
  margin:0!important;
  flex:0 0 40px!important;
  width:40px!important;
  min-width:40px!important;
  height:40px!important;
  min-height:40px!important;
  align-self:center!important;
  box-shadow:none!important
 }
 .rail-scroll-next{margin-left:0!important}
 .topbar>.rail-scroll-arrow,.footer>.rail-scroll-arrow,.public-card-drop>.rail-scroll-arrow{
  position:static!important;inset:auto!important
 }
}
@media (hover:hover) and (pointer:fine) and (orientation:landscape){
 .desktop-arrow-adaptive>.rail-scroll-arrow{
  position:static!important;
  inset:auto!important;
  margin:0 auto!important;
  flex:0 0 40px!important;
  width:40px!important;
  min-width:40px!important;
  height:40px!important;
  min-height:40px!important
 }
}


/* Desktop end-cap layout: arrows frame the icon window; only the center strip
   scrolls, so controls never wrap underneath or disappear with the arrows. */
@media (hover:hover) and (pointer:fine){
 .topbar.desktop-arrow-slider,
 .footer.desktop-arrow-slider,
 .public-card-drop.desktop-arrow-slider{
  display:grid!important;
  grid-template-columns:40px minmax(0,1fr) 40px!important;
  grid-template-rows:minmax(0,1fr)!important;
  align-items:center!important;
  column-gap:4px!important;
  overflow:hidden!important
 }
 .topbar.desktop-arrow-slider>.rail-scroll-prev,
 .footer.desktop-arrow-slider>.rail-scroll-prev,
 .public-card-drop.desktop-arrow-slider>.rail-scroll-prev{grid-column:1!important;grid-row:1!important}
 .topbar.desktop-arrow-slider>.rail-scroll-next,
 .footer.desktop-arrow-slider>.rail-scroll-next,
 .public-card-drop.desktop-arrow-slider>.rail-scroll-next{grid-column:3!important;grid-row:1!important}
 .topbar.desktop-arrow-slider>.header-circular-set,
 .footer.desktop-arrow-slider>.dice-circular-set,
 .public-card-drop.desktop-arrow-slider>.public-card-strip{
  box-sizing:border-box!important;
  grid-column:2!important;
  grid-row:1!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  height:100%!important;
  display:flex!important;
  flex-wrap:nowrap!important;
  align-items:center!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  scrollbar-width:none!important
 }
 .topbar.desktop-arrow-slider>.header-circular-set::-webkit-scrollbar,
 .footer.desktop-arrow-slider>.dice-circular-set::-webkit-scrollbar,
 .public-card-drop.desktop-arrow-slider>.public-card-strip::-webkit-scrollbar{display:none!important}
 .topbar.desktop-arrow-slider>.header-circular-set>*,
 .footer.desktop-arrow-slider>.dice-circular-set>*,
 .public-card-drop.desktop-arrow-slider>.public-card-strip>*{flex-shrink:0!important}
}


/* Slim, flush rail endcaps for mouse/keyboard layouts. */
@media (hover:hover) and (pointer:fine){
 .rail-scroll-arrow{
  flex:0 0 24px!important;
  width:24px!important;
  min-width:24px!important;
  height:40px!important;
  min-height:40px!important;
  border-radius:6px!important
 }
 .rail-scroll-prev{margin-left:0!important}
 .rail-scroll-next{margin-left:auto!important;margin-right:0!important}
 .topbar.desktop-arrow-slider,
 .footer.desktop-arrow-slider,
 .public-card-drop.desktop-arrow-slider{
  grid-template-columns:24px minmax(0,1fr) 24px!important;
  column-gap:0!important
 }
 .topbar.desktop-arrow-slider>.rail-scroll-prev,
 .footer.desktop-arrow-slider>.rail-scroll-prev,
 .public-card-drop.desktop-arrow-slider>.rail-scroll-prev{
  justify-self:start!important
 }
 .topbar.desktop-arrow-slider>.rail-scroll-next,
 .footer.desktop-arrow-slider>.rail-scroll-next,
 .public-card-drop.desktop-arrow-slider>.rail-scroll-next{
  justify-self:end!important
 }
 .player-hand-strip>.rail-scroll-next,
 .token-choice-strip>.rail-scroll-next,
 .card-drawer-row>.rail-scroll-next,
 .tile-browser-grid>.rail-scroll-next{
  margin-left:auto!important
 }
}
@media (hover:hover) and (pointer:fine) and (orientation:landscape){
 .desktop-arrow-adaptive>.rail-scroll-arrow{
  flex:0 0 24px!important;
  width:40px!important;
  min-width:40px!important;
  height:24px!important;
  min-height:24px!important
 }
}


/* Keep Clear dice in the same square footer slot as the dice controls. */
.footer .dice-circular-set>:last-child{
 box-sizing:border-box!important;
 flex:0 0 var(--footer-slot-h,64px)!important;
 width:var(--footer-slot-h,64px)!important;
 min-width:var(--footer-slot-h,64px)!important;
 max-width:var(--footer-slot-h,64px)!important;
 height:var(--footer-slot-h,64px)!important;
 min-height:var(--footer-slot-h,64px)!important;
 padding:5px!important;
 overflow-wrap:anywhere!important;
 text-align:center!important
}


/* Character-sheet artwork replaces font chevrons on every rail control. */
@media (hover:hover) and (pointer:fine){
 .rail-scroll-arrow{
  position:relative!important;
  color:transparent!important;
  font-size:0!important
 }
 .rail-scroll-arrow::before{
  content:"";
  display:block;
  width:18px;
  height:18px;
  background:url("../assets/ui/character-sheet/page-arrow.png") center/contain no-repeat;
  filter:drop-shadow(0 1px 2px #0008)
 }
 .rail-scroll-next::before{transform:scaleX(-1)}
 .rail-scroll-arrow .arrow-horizontal,
 .rail-scroll-arrow .arrow-vertical{display:none!important}

 /* Libraries scroll vertically between permanent up/down endcaps. */
 .tile-browser-slider{
  min-height:0!important;
  flex:1 1 auto!important;
  display:grid!important;
  grid-template-rows:24px minmax(0,1fr) 24px!important;
  overflow:hidden!important
 }
 .tile-browser-slider>.rail-scroll-arrow{
  width:100%!important;
  min-width:100%!important;
  height:24px!important;
  min-height:24px!important;
  margin:0!important;
  border-radius:5px!important
 }
 .tile-browser-slider>.rail-scroll-prev::before{transform:rotate(90deg)}
 .tile-browser-slider>.rail-scroll-next::before{transform:rotate(-90deg)}
 .tile-browser-slider>.tile-browser-grid{
  min-height:0!important;
  height:100%!important;
  padding-top:7px!important;
  padding-bottom:7px!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  overscroll-behavior-y:contain!important;
  touch-action:pan-y!important
 }
}

/* Preserve each staged tile's complete crop and original proportions. */
.tray-item.tile>.tile-image-crop{
 position:relative!important;
 inset:auto!important;
 width:min(var(--crop-box-w,42px),calc(100% - 8px))!important;
 height:min(var(--crop-box-h,42px),calc(100% - 8px))!important;
 max-width:calc(100% - 8px)!important;
 max-height:calc(100% - 8px)!important;
 flex:none!important
}
.tray-item.tile>.tile-image-crop>img{
 object-fit:fill!important
}


/* Optically center and enlarge the detailed character-sheet arrows. */
@media (hover:hover) and (pointer:fine){
 .rail-scroll-arrow{overflow:visible!important}
 .rail-scroll-arrow::before{
  position:absolute!important;
  left:50%!important;
  top:50%!important;
  width:28px!important;
  height:28px!important;
  margin:0!important;
  transform:translate(-50%,-50%)!important;
  transform-origin:center!important
 }
 .rail-scroll-next::before{
  transform:translate(-50%,-50%) scaleX(-1)!important
 }
 .tile-browser-slider{
  grid-template-rows:30px minmax(0,1fr) 30px!important
 }
 .tile-browser-slider>.rail-scroll-arrow{
  height:30px!important;
  min-height:30px!important
 }
 .tile-browser-slider>.rail-scroll-prev::before{
  transform:translate(-50%,-50%) rotate(90deg)!important
 }
 .tile-browser-slider>.rail-scroll-next::before{
  transform:translate(-50%,-50%) rotate(-90deg)!important
 }
}


/* Clear dice is a true footer slot, matching every die control. */
.dice-footer .dice-circular-set>.clear-dice{
 box-sizing:border-box!important;
 flex:0 0 var(--footer-slot-h,64px)!important;
 width:var(--footer-slot-h,64px)!important;
 min-width:var(--footer-slot-h,64px)!important;
 max-width:var(--footer-slot-h,64px)!important;
 height:var(--footer-slot-h,64px)!important;
 min-height:var(--footer-slot-h,64px)!important;
 max-height:var(--footer-slot-h,64px)!important;
 align-self:center!important;
 display:grid!important;
 place-items:center!important;
 padding:5px!important;
 border-radius:10px!important;
 white-space:normal!important;
 overflow:hidden!important;
 text-align:center!important;
 font-size:clamp(9px,1.1vw,12px)!important;
 font-weight:700!important;
 line-height:1.05!important
}


/* Give detailed arrow artwork enough horizontal breathing room. */
@media (hover:hover) and (pointer:fine){
 .rail-scroll-arrow{
  flex-basis:36px!important;
  width:36px!important;
  min-width:36px!important
 }
 .topbar.desktop-arrow-slider,
 .footer.desktop-arrow-slider,
 .public-card-drop.desktop-arrow-slider{
  grid-template-columns:36px minmax(0,1fr) 36px!important
 }
 .tile-browser-slider>.rail-scroll-arrow{
  width:100%!important;
  min-width:100%!important
 }
}


/* Final visible character-sheet arrow sizing. */
@media (hover:hover) and (pointer:fine){
 .rail-scroll-arrow{
  flex-basis:44px!important;
  width:44px!important;
  min-width:44px!important;
  height:44px!important;
  min-height:44px!important
 }
 .rail-scroll-arrow::before{
  width:38px!important;
  height:38px!important
 }
 .topbar.desktop-arrow-slider,
 .footer.desktop-arrow-slider,
 .public-card-drop.desktop-arrow-slider{
  grid-template-columns:44px minmax(0,1fr) 44px!important
 }
 .tile-browser-slider{
  grid-template-rows:44px minmax(0,1fr) 44px!important
 }
 .tile-browser-slider>.rail-scroll-arrow{
  width:100%!important;
  min-width:100%!important;
  height:44px!important;
  min-height:44px!important
 }
}


/* Desktop rails use scrollbars instead of arrow endcaps. */
@media (hover:hover) and (pointer:fine){
 .rail-scroll-arrow{
  display:none!important
 }

 .topbar.desktop-arrow-slider,
 .footer.desktop-arrow-slider,
 .public-card-drop.desktop-arrow-slider{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  grid-template-rows:minmax(0,1fr)!important;
  column-gap:0!important
 }
 .topbar.desktop-arrow-slider>.header-circular-set,
 .footer.desktop-arrow-slider>.dice-circular-set,
 .public-card-drop.desktop-arrow-slider>.public-card-strip{
  grid-column:1!important;
  grid-row:1!important
 }

 .tile-browser-slider{
  display:block!important;
  min-height:0!important;
  overflow:hidden!important
 }
 .tile-browser-slider>.tile-browser-grid{
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  overflow-x:auto!important;
  overflow-y:scroll!important
 }

 .topbar>.header-circular-set,
 .footer>.dice-circular-set,
 .public-card-drop>.public-card-strip,
 .player-hand-strip,
 .token-choice-strip,
 .card-drawer-row{
  overflow-x:scroll!important;
  overflow-y:hidden!important;
  scrollbar-width:auto!important
 }
 .staging-tray{
  scrollbar-width:auto!important
 }

 .topbar>.header-circular-set::-webkit-scrollbar,
 .footer>.dice-circular-set::-webkit-scrollbar,
 .public-card-drop>.public-card-strip::-webkit-scrollbar,
 .player-hand-strip::-webkit-scrollbar,
 .token-choice-strip::-webkit-scrollbar,
 .card-drawer-row::-webkit-scrollbar{
  display:block!important;
  height:11px!important
 }
 .tile-browser-grid::-webkit-scrollbar,
 .staging-tray::-webkit-scrollbar{
  display:block!important;
  width:11px!important;
  height:11px!important
 }

 .topbar>.header-circular-set::-webkit-scrollbar-track,
 .footer>.dice-circular-set::-webkit-scrollbar-track,
 .public-card-drop>.public-card-strip::-webkit-scrollbar-track,
 .player-hand-strip::-webkit-scrollbar-track,
 .token-choice-strip::-webkit-scrollbar-track,
 .card-drawer-row::-webkit-scrollbar-track,
 .tile-browser-grid::-webkit-scrollbar-track,
 .staging-tray::-webkit-scrollbar-track{
  background:#0b1117!important;
  border:1px solid #4e4124!important;
  border-radius:999px!important
 }
 .topbar>.header-circular-set::-webkit-scrollbar-thumb,
 .footer>.dice-circular-set::-webkit-scrollbar-thumb,
 .public-card-drop>.public-card-strip::-webkit-scrollbar-thumb,
 .player-hand-strip::-webkit-scrollbar-thumb,
 .token-choice-strip::-webkit-scrollbar-thumb,
 .card-drawer-row::-webkit-scrollbar-thumb,
 .tile-browser-grid::-webkit-scrollbar-thumb,
 .staging-tray::-webkit-scrollbar-thumb{
  background:#806a35!important;
  border:2px solid #0b1117!important;
  border-radius:999px!important
 }
 .topbar>.header-circular-set::-webkit-scrollbar-thumb:hover,
 .footer>.dice-circular-set::-webkit-scrollbar-thumb:hover,
 .public-card-drop>.public-card-strip::-webkit-scrollbar-thumb:hover,
 .player-hand-strip::-webkit-scrollbar-thumb:hover,
 .token-choice-strip::-webkit-scrollbar-thumb:hover,
 .card-drawer-row::-webkit-scrollbar-thumb:hover,
 .tile-browser-grid::-webkit-scrollbar-thumb:hover,
 .staging-tray::-webkit-scrollbar-thumb:hover{
  background:#c09a45!important
 }
}


/* Dedicated desktop library results scroller. */
@media (hover:hover) and (pointer:fine){
 .tile-browser{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  grid-template-rows:auto auto auto auto minmax(0,1fr)!important;
  min-width:0!important;
  min-height:0!important;
  overflow:hidden!important
 }
 .tile-browser>.tileset-import-status{
  min-height:0!important
 }
 .tile-browser-slider{
  display:block!important;
  width:100%!important;
  height:100%!important;
  min-width:0!important;
  min-height:0!important;
  overflow:hidden!important
 }
 .tile-browser-slider>.tile-browser-grid{
  box-sizing:border-box!important;
  width:100%!important;
  height:100%!important;
  min-width:0!important;
  min-height:0!important;
  padding-right:5px!important;
  overflow-x:hidden!important;
  overflow-y:scroll!important;
  scrollbar-gutter:stable!important;
  scrollbar-width:auto!important;
  scrollbar-color:#806a35 #0b1117!important
 }
 .tile-browser-slider>.tile-browser-grid::-webkit-scrollbar{
  display:block!important;
  width:14px!important
 }
 .tile-browser-slider>.tile-browser-grid::-webkit-scrollbar-track{
  background:#0b1117!important;
  border:1px solid #4e4124!important;
  border-radius:999px!important
 }
 .tile-browser-slider>.tile-browser-grid::-webkit-scrollbar-thumb{
  min-height:38px!important;
  background:#806a35!important;
  border:3px solid #0b1117!important;
  border-radius:999px!important
 }
 .tile-browser-slider>.tile-browser-grid::-webkit-scrollbar-thumb:hover{
  background:#c09a45!important
 }
}


/* Tile-library previews are true squares. The atlas crop fills the square
   without changing the tile's internal crop coordinates. */
.tile-browser-grid{
 grid-template-columns:repeat(auto-fill,minmax(76px,1fr))!important
}
.tile-browser-grid>.library-tile{
 box-sizing:border-box!important;
 width:100%!important;
 min-width:0!important;
 height:auto!important;
 min-height:0!important;
 aspect-ratio:1/1!important;
 display:block!important;
 padding:5px!important
}
.library-tile>.tile-drag-source,
.library-tile>.tile-drag-source.tile-image-crop{
 box-sizing:border-box!important;
 width:100%!important;
 height:100%!important;
 min-width:0!important;
 min-height:0!important;
 aspect-ratio:1/1!important;
 display:block!important;
 overflow:hidden!important
}
.library-tile>.tile-drag-source>img{
 max-width:none!important;
 max-height:none!important;
 object-fit:fill!important
}


/* Authentication door: logged-out state is neutral and carries no visual
   direction or text. Assistive text remains on the button through aria-label. */
.door-button .door-label{display:none!important}
.door-button.logged-out .icon-exit{
 transform:none!important;
 filter:grayscale(1) saturate(0)!important;
 opacity:.48!important
}
.door-button.logged-out{border-color:#596068!important;background:#182027!important}
.door-button.logged-in .icon-exit{filter:none!important;opacity:1!important}


/* Reliable tap target for the header Card Library on mobile rails. */
.header-card-deck{touch-action:manipulation!important;-webkit-user-select:none!important;user-select:none!important;cursor:pointer!important}
.header-card-deck .header-card-back{pointer-events:none!important;-webkit-user-drag:none!important}


/* Landscape workspace v2: public hand beside pallet; fluid map canvas. */
@media (orientation:landscape){
 .table-workspace{
  grid-template-columns:80px clamp(132px,17vw,220px) minmax(0,1fr)!important;
  grid-template-rows:minmax(0,1fr)!important;
  align-items:stretch!important;
 }
 .staging-tray{grid-column:1!important;grid-row:1!important}
 .map-shell{
  grid-column:3!important;
  grid-row:1!important;
  width:100%!important;
  height:100%!important;
  min-width:0!important;
  min-height:0!important;
  padding:0 7px 0 0!important;
  place-items:stretch!important;
 }
 .map{
  width:100%!important;
  height:100%!important;
  min-width:0!important;
  min-height:0!important;
  max-width:none!important;
  max-height:none!important;
  aspect-ratio:auto!important;
 }
 .map:has(.grid.square)::before,
 .map:has(.grid.hex)::before{
  inset:0!important;
  width:100%!important;
  height:100%!important;
 }
 .public-card-drop{
  position:absolute!important;
  z-index:30!important;
  top:65px!important;
  bottom:120px!important;
  left:87px!important;
  right:auto!important;
  width:clamp(132px,17vw,220px)!important;
  min-width:0!important;
  max-width:none!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  padding:7px!important;
  overflow:hidden!important;
  border:1px solid #6e592c!important;
  border-radius:0!important;
  background:#0d1319!important;
  backdrop-filter:none!important;
 }
 .public-card-drop.desktop-arrow-slider{
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
 }
 .public-card-drop>.rail-scroll-arrow{display:none!important}
 .public-card-strip{
  box-sizing:border-box!important;
  display:flex!important;
  flex:1 1 auto!important;
  flex-direction:column!important;
  align-items:stretch!important;
  gap:7px!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  height:100%!important;
  min-height:0!important;
  max-height:none!important;
  padding:0!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  touch-action:pan-y!important;
 }
 .public-card-empty{
  box-sizing:border-box!important;
  flex:1 1 auto!important;
  display:grid!important;
  place-items:center!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  height:100%!important;
  min-height:0!important;
  max-height:none!important;
  padding:10px!important;
  white-space:normal!important;
  text-align:center!important;
  writing-mode:horizontal-tb!important;
 }
 .public-table-card{
  flex:0 0 auto!important;
  width:min(100%,150px)!important;
  max-width:100%!important;
  margin-inline:auto!important;
 }
 .table-workspace>.card-browser{
  position:absolute!important;
  z-index:90!important;
  top:0!important;
  right:7px!important;
  bottom:0!important;
  left:calc(80px + clamp(132px,17vw,220px) + 14px)!important;
  width:auto!important;
  height:auto!important;
  max-width:none!important;
  max-height:none!important;
  border-radius:10px!important;
  pointer-events:auto!important;
 }
}


/* Tiled world board: preserve the native 20 x 13 square-cell geometry while
   fitting the largest possible board inside the landscape workspace. */
@media (orientation:landscape){
 .map-shell{
  place-items:center!important;
  container-type:size!important;
 }
 .map{
  width:min(100%,calc((100dvh - 130px)*20/13))!important;
  height:auto!important;
  min-width:0!important;
  min-height:0!important;
  max-width:100%!important;
  max-height:100%!important;
  aspect-ratio:20/13!important;
 }
 @supports(width:1cqw){
  .map{width:min(100cqw,153.846154cqh)!important}
 }
 .map:has(.grid.square)::before,
 .map:has(.grid.hex)::before{
  inset:0!important;
  width:100%!important;
  height:100%!important;
 }
}

/* Compact card search: keep the title/action bar, remove explanatory copy,
   and reserve the small-screen overlay for real card results. */
.card-browser>header{
 min-height:42px!important;
 padding:4px 8px!important;
}
.card-browser>header .tile-browser-title{display:flex!important;align-items:center!important}
.card-browser>header .card-create-toggle{width:34px!important;height:34px!important;flex-basis:34px!important}
@media (orientation:portrait) and (max-width:800px){
 .card-library-workspace{
  grid-template-columns:minmax(0,1fr)!important;
  grid-template-rows:minmax(0,1fr) 62px!important;
 }
 .card-library-results{min-height:0!important;padding:7px!important}
 .character-spellbook-drop{
  min-height:0!important;
  padding:5px 7px!important;
  border-left:0!important;
  border-top:1px solid #80662f!important;
  overflow:hidden!important;
 }
 .character-spellbook-drop>header,
 .character-spellbook-drop>p{display:none!important}
 .spellbook-card-strip{
  display:flex!important;
  gap:6px!important;
  min-height:0!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
 }
 .spellbook-mini-card{flex:0 0 78px!important}
 .card-browser>output.tile-browser-status{padding:2px 8px!important;font-size:9px!important}
}


/* Unified named card-library workflow. */
.unified-card-library{
 display:grid!important;
 grid-template-rows:auto auto auto auto minmax(0,1fr) auto!important;
 min-width:0!important;
 min-height:0!important;
 overflow:hidden!important;
 background:#0d141a!important
}
.card-library-source-row{
 display:flex!important;
 align-items:end!important;
 gap:7px!important;
 padding:6px 9px!important;
 border-bottom:1px solid #40371f!important;
 background:#111920!important
}
.card-library-source-row label{
 display:grid!important;
 flex:1 1 auto!important;
 gap:2px!important;
 min-width:0!important;
 color:#c5b17b!important;
 font-size:9px!important;
 letter-spacing:.1em!important;
 text-transform:uppercase!important
}
.card-library-source-row select,
.unified-card-library .card-browser-filters input,
.unified-card-library .card-browser-filters select{
 box-sizing:border-box!important;
 width:100%!important;
 min-height:32px!important;
 padding:4px 8px!important;
 border:1px solid #80662f!important;
 border-radius:7px!important;
 background:#17212a!important;
 color:#eee6d3!important
}
.card-filter-toggle{
 display:none;
 min-height:32px;
 padding:4px 12px;
 border:1px solid #80662f;
 border-radius:7px;
 background:#17212a;
 color:#f1d68f;
 font-weight:800
}
.card-library-tools{
 display:grid!important;
 grid-template-columns:repeat(5,minmax(0,1fr))!important;
 gap:6px!important;
 padding:6px 9px!important;
 border-bottom:1px solid #40371f!important;
 background:#0f171e!important
}
.card-library-tools button,
.card-library-tools label,
.card-library-tools a{
 position:relative!important;
 box-sizing:border-box!important;
 display:grid!important;
 place-items:center!important;
 min-width:0!important;
 min-height:34px!important;
 margin:0!important;
 padding:6px 8px!important;
 overflow:hidden!important;
 border:1px solid #80662f!important;
 border-radius:7px!important;
 background:#17212a!important;
 color:#f1d68f!important;
 font:700 10px/1.15 system-ui,sans-serif!important;
 text-align:center!important;
 text-decoration:none!important;
 cursor:pointer!important
}
.card-library-tools input{position:absolute!important;inset:0!important;opacity:0!important;cursor:pointer!important}
.card-library-tools .card-tools-cancel{color:#b9b4aa!important;border-color:#5f5a50!important}
.unified-card-library .card-browser-filters{
 grid-template-columns:.72fr .82fr 1.6fr!important;
 gap:6px!important;
 padding:6px 9px!important
}
.unified-card-library .card-browser-filters label{font-size:8px!important}
.card-library-workspace{
 display:grid!important;
 grid-template-columns:minmax(0,1fr) minmax(150px,24%)!important;
 min-height:0!important;
 overflow:hidden!important
}
.card-library-results{
 display:grid!important;
 grid-template-columns:repeat(auto-fill,minmax(82px,1fr))!important;
 grid-auto-rows:max-content!important;
 align-content:start!important;
 gap:8px!important;
 min-width:0!important;
 min-height:0!important;
 padding:9px!important;
 overflow:auto!important;
 overscroll-behavior:contain!important
}
.library-playing-card{
 box-sizing:border-box!important;
 width:min(100%,108px)!important;
 min-width:0!important;
 height:auto!important;
 aspect-ratio:2.5/3.5!important;
 grid-template-rows:minmax(0,1fr) 24px!important;
 border-radius:9px!important
}
.library-card-face{min-height:0!important;gap:4px!important;padding:7px 6px!important;overflow:hidden!important}
.library-card-face small{flex:0 0 auto!important}
.library-card-face strong{
 display:-webkit-box!important;
 overflow:hidden!important;
 font-size:11px!important;
 line-height:1.08!important;
 -webkit-box-orient:vertical!important;
 -webkit-line-clamp:3!important
}
.library-card-image{
 box-sizing:border-box!important;
 width:100%!important;
 min-height:0!important;
 aspect-ratio:4/3!important;
 object-fit:cover!important;
 border:1px solid #65512c!important;
 border-radius:5px!important
}
.library-card-add{min-height:24px!important;font-size:7px!important}
.library-new-card{
 grid-template-rows:1fr auto!important;
 place-items:center!important;
 padding:10px!important;
 border-style:dashed!important;
 background:
  linear-gradient(135deg,#1e2a33 0 48%,#263640 49% 51%,#1e2a33 52% 100%)!important;
 color:#f1d68f!important
}
.library-new-card>span{align-self:end!important;font:300 42px/1 system-ui,sans-serif!important}
.library-new-card>strong{align-self:start!important;font-size:9px!important;letter-spacing:.08em!important;text-transform:uppercase!important}
.library-page-card{
 position:relative!important;
 display:grid!important;
 place-items:center!important;
 grid-template-rows:1fr auto!important;
 padding:9px!important;
 background:linear-gradient(#20303c,#10171d)!important;
 color:#f1d68f!important
}
.library-page-card::before{
 content:""!important;
 align-self:end!important;
 width:52px!important;
 height:52px!important;
 background:url("../assets/ui/character-sheet/page-arrow.png") center/contain no-repeat!important;
 filter:drop-shadow(0 2px 4px #000b)!important
}
.library-page-card.page-next::before{transform:scaleX(-1)!important}
.library-page-card span{align-self:start!important;font-size:9px!important;font-weight:800!important;letter-spacing:.08em!important;text-transform:uppercase!important}
.card-library-empty{grid-column:1/-1!important}
.private-card-detail-image{
 display:block!important;
 width:100%!important;
 max-height:180px!important;
 margin-bottom:8px!important;
 object-fit:cover!important;
 border:1px solid #aa8d4a!important;
 border-radius:8px!important
}
.custom-card-editor-modal{padding:12px!important;overflow:auto!important}
.custom-card-editor-card{
 position:relative!important;
 box-sizing:border-box!important;
 width:min(88vw,340px)!important;
 height:min(84dvh,476px)!important;
 aspect-ratio:2.5/3.5!important;
 display:grid!important;
 grid-template-columns:1fr 1fr!important;
 grid-auto-rows:max-content!important;
 gap:7px!important;
 padding:16px 14px 12px!important;
 overflow:auto!important;
 border:2px solid #b59143!important;
 border-radius:16px!important;
 background:linear-gradient(160deg,#23333f,#0f171d 62%)!important;
 box-shadow:0 18px 60px #000d,inset 0 0 0 4px #2f2818!important;
 color:#eee6d3!important
}
.custom-card-editor-card h2{
 grid-column:1/-1!important;
 margin:0 28px 2px 0!important;
 color:#f1d68f!important;
 font:700 22px/1 Georgia,serif!important
}
.custom-card-editor-card>label{
 display:grid!important;
 gap:3px!important;
 min-width:0!important;
 color:#c5b17b!important;
 font-size:8px!important;
 letter-spacing:.09em!important;
 text-transform:uppercase!important
}
.custom-card-editor-card>label:nth-of-type(1),
.custom-card-editor-card>label:nth-of-type(2),
.custom-card-description{grid-column:1/-1!important}
.custom-card-editor-card input,
.custom-card-editor-card select,
.custom-card-editor-card textarea{
 box-sizing:border-box!important;
 width:100%!important;
 min-height:34px!important;
 padding:5px 7px!important;
 border:1px solid #80662f!important;
 border-radius:7px!important;
 background:#17212a!important;
 color:#eee6d3!important;
 font-size:12px!important
}
.custom-card-editor-card textarea{height:70px!important;resize:vertical!important}
.custom-card-image{
 grid-column:1/-1!important;
 position:relative!important;
 display:grid!important;
 place-items:center!important;
 min-height:108px!important;
 overflow:hidden!important;
 border:1px dashed #9a7937!important;
 border-radius:9px!important;
 background:#111920!important;
 color:#9f998b!important
}
.custom-card-image img{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;object-fit:cover!important}
.custom-card-image label{
 position:absolute!important;
 inset:auto 7px 7px auto!important;
 z-index:2!important;
 padding:5px 8px!important;
 border:1px solid #9a7937!important;
 border-radius:6px!important;
 background:#101820e8!important;
 color:#f1d68f!important;
 font-size:9px!important;
 cursor:pointer!important
}
.custom-card-image input{position:absolute!important;inset:0!important;opacity:0!important;cursor:pointer!important}
.custom-card-editor-status{grid-column:1/-1!important;margin:0!important;color:#f0c56f!important;font-size:9px!important}
.custom-card-editor-card footer{grid-column:1/-1!important;display:grid!important;grid-template-columns:1fr 1fr!important;gap:7px!important}
.custom-card-editor-card footer button{
 min-height:36px!important;
 border:1px solid #80662f!important;
 border-radius:8px!important;
 background:#17212a!important;
 color:#f1d68f!important;
 font-weight:800!important
}
.custom-card-editor-card footer .custom-card-cancel{border-color:#655f54!important;color:#c2bcb0!important}
.custom-card-editor-card footer .custom-card-save{background:#634f25!important;color:#fff2c6!important}
.custom-card-editor-card footer .custom-card-save:disabled{opacity:.45!important}
@media(orientation:portrait) and (max-width:800px){
 .unified-card-library{grid-template-rows:auto auto auto minmax(0,1fr) auto!important}
 .card-library-source-row{padding-block:5px!important}
 .card-filter-toggle{display:block!important}
 .unified-card-library .card-browser-filters{display:none!important;grid-template-columns:1fr 1fr!important}
 .unified-card-library .card-browser-filters.open{display:grid!important}
 .unified-card-library .card-browser-filters .card-search-field{grid-column:1/-1!important}
 .card-library-tools{grid-template-columns:1fr 1fr!important}
 .card-library-tools>*:first-child{grid-column:1/-1!important}
 .card-library-workspace{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr) 56px!important}
 .card-library-results{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px!important;padding:7px!important}
 .library-playing-card{width:min(100%,94px)!important}
 .character-spellbook-drop{height:56px!important;min-height:56px!important;padding:5px 7px!important}
 .custom-card-editor-card{width:min(92vw,320px)!important;height:min(82dvh,448px)!important;padding:14px 12px 10px!important}
}
@media(orientation:landscape) and (max-height:520px){
 .unified-card-library .card-browser-filters{grid-template-columns:.65fr .75fr 1.5fr!important;padding-block:4px!important}
 .card-library-source-row{padding-block:4px!important}
 .card-library-results{grid-template-columns:repeat(auto-fill,minmax(74px,1fr))!important;padding:7px!important}
 .library-playing-card{width:min(100%,92px)!important}
 .character-spellbook-drop>header small{display:none!important}
}


/* SOURCE: library-rails.css */
.rail-card-library{display:grid;gap:.55rem}.rail-card-library .library-heading{display:flex;align-items:center;justify-content:space-between;gap:.75rem}.library-rail-section{display:grid;gap:.3rem;min-width:0}.library-rail-caption{font:700 .72rem/1.1 system-ui,-apple-system,sans-serif;letter-spacing:.09em;text-transform:uppercase;color:#c9ae72;padding:0 .3rem}.library-horizontal-rail{position:relative;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:stretch;min-width:0;border-top:1px solid rgba(194,165,101,.38);border-bottom:1px solid rgba(194,165,101,.26);background:rgba(3,10,14,.58)}.library-horizontal-set{display:flex;align-items:stretch;gap:.45rem;min-width:0;overflow-x:auto;overflow-y:hidden;padding:.42rem .28rem;scroll-behavior:smooth;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch;scrollbar-width:thin}.library-horizontal-set>*{flex:0 0 auto;scroll-snap-align:start}.library-nav-card{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:.45rem;min-width:8.5rem;max-width:13rem;padding:.4rem .6rem;border:1px solid rgba(194,165,101,.45);border-radius:.65rem;background:#0b151d;color:#d7c089;text-align:left}.library-nav-card.active{box-shadow:inset 0 0 0 1px #d2b86f,0 0 12px rgba(194,165,101,.16);background:#101d27}.library-nav-card .deck-stack{width:2.25rem;height:3rem;display:grid;place-items:center;overflow:hidden}.library-nav-card .hand-toggle-card-back{transform:scale(.5);transform-origin:center}.library-nav-card strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.library-path-home{align-self:center;min-height:2.35rem;padding:.35rem .7rem;border:1px solid rgba(194,165,101,.35);border-radius:999px;background:#0b151d;color:#d7c089;white-space:nowrap}.library-path-home.active{background:#172631;border-color:#c9ae72}.library-path-divider{align-self:center;color:#806c45;font-weight:700}.library-folder-divider{align-self:stretch;width:1px;background:rgba(194,165,101,.35);margin:.15rem .12rem}.library-no-folders{align-self:center;color:#7f8b91;font-size:.76rem;padding:.45rem}.library-secondary-tools{display:flex;gap:.45rem;align-items:center;flex-wrap:wrap;padding:0 .25rem}.library-secondary-tools button{min-height:2rem}.library-content-rail .library-horizontal-set{align-items:flex-start}.card-content-set{min-height:8.8rem}.rail-card-library .library-playing-card{flex:0 0 auto}.rail-card-library .library-card-face{min-width:6.4rem}.active-card-set{min-height:4.6rem;align-items:center}.active-card-set .spellbook-mini-card{flex:0 0 auto}.library-deck-empty{align-self:center;margin:.5rem;color:#8d999f;white-space:nowrap}.rail-card-library .rail-scroll-arrow{position:relative;inset:auto;display:grid;place-items:center;min-width:2rem;width:2rem;height:auto;border-radius:0;background:rgba(6,14,19,.86);z-index:3}.rail-card-library .rail-scroll-prev{left:auto}.rail-card-library .rail-scroll-next{right:auto}.source-rail-section .library-horizontal-set,.folder-rail-section .library-horizontal-set{min-height:4rem}.card-browser-filters{margin:.1rem .25rem .15rem}
/* The card library is a tray inside the tabletop frame, never outside it. */
#card-library.rail-card-library{box-sizing:border-box!important;left:0!important;right:0!important;width:auto!important;max-width:100%!important;margin:0!important;border-left:1px solid #7a632f!important;border-right:1px solid #7a632f!important;border-radius:0!important;overflow-x:hidden!important}
@media(max-width:800px){.rail-card-library{gap:.42rem}.library-rail-caption{font-size:.64rem}.library-horizontal-set{gap:.34rem;padding:.32rem .2rem}.library-nav-card{min-width:7.4rem;padding:.32rem .48rem}.library-nav-card .deck-stack{width:1.9rem;height:2.6rem}.library-path-home{min-height:2.1rem;padding:.3rem .58rem}.rail-card-library .rail-scroll-arrow{min-width:1.8rem;width:1.8rem}.card-content-set{min-height:7.8rem}#card-library.rail-card-library{left:0!important;right:0!important;width:auto!important;max-width:100%!important}}


/* SOURCE: mobile-horizontal-rails.css */
/* =========================================================
   RIST UNIVERSAL HORIZONTAL RAIL BEHAVIOR
   Mobile shelves swipe. Desktop may retain arrow controls.
   ========================================================= */

.card-path-bar {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 4px;
    width: 100%;
    min-width: 0;
    height: 34px;
    min-height: 34px;
    padding: 3px 7px;

    overflow: hidden;

    border-bottom: 1px solid #40371f;
    background: #111920;
}

.card-path-back {
    box-sizing: border-box;
    flex: 0 0 28px;

    width: 28px;
    height: 28px;

    display: grid;
    place-items: center;

    padding: 0;

    border: 1px solid #725d30;
    border-radius: 6px;

    background: #17212a;
    color: #f1d68f;

    font-size: 20px;
    line-height: 1;
}

.card-path-scroll {
    box-sizing: border-box;

    flex: 1 1 auto;
    min-width: 0;

    display: flex;
    align-items: center;
    gap: 4px;

    overflow-x: auto;
    overflow-y: hidden;

    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;

    touch-action: pan-x;

    white-space: nowrap;

    scrollbar-width: none;
}

.card-path-scroll::-webkit-scrollbar {
    display: none;
}

.card-path-segment {
    box-sizing: border-box;

    flex: 0 0 auto;

    min-width: 0;
    height: 26px;

    padding: 3px 7px;

    border: 0;
    border-radius: 4px;

    background: transparent;
    color: #d9bd78;

    font-size: 11px;
    font-weight: 700;

    white-space: nowrap;
}

.card-path-segment:active {
    background: #24313b;
    color: #fff0c6;
}

.card-path-divider {
    flex: 0 0 auto;

    color: #80662f;

    font-size: 12px;
    font-weight: 800;
}


/* ---------------------------------------------------------
   UNIVERSAL SWIPE SHELVES
   --------------------------------------------------------- */

.player-hand-strip,
.token-choice-strip,
.card-drawer-row,
.tile-browser-grid,
.staging-tray,
.spellbook-card-strip,
.public-card-strip,
.header-circular-set,
.dice-footer > .circular-set,
.exact-sheet-toolbar {
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;

    scrollbar-width: none;
}

.player-hand-strip::-webkit-scrollbar,
.token-choice-strip::-webkit-scrollbar,
.card-drawer-row::-webkit-scrollbar,
.tile-browser-grid::-webkit-scrollbar,
.staging-tray::-webkit-scrollbar,
.spellbook-card-strip::-webkit-scrollbar,
.public-card-strip::-webkit-scrollbar,
.header-circular-set::-webkit-scrollbar,
.dice-footer > .circular-set::-webkit-scrollbar,
.exact-sheet-toolbar::-webkit-scrollbar {
    display: none;
}


/* ---------------------------------------------------------
   MOBILE
   Every shelf becomes direct-touch horizontal navigation.
   --------------------------------------------------------- */

@media (max-width: 800px) {

    /*
       Arrow buttons are desktop affordances.
       Touch users swipe the shelf directly.
    */
    .rail-scroll-arrow {
        display: none !important;
    }

    /*
       Prevent rail children from shrinking to force-fit.
       The shelf moves instead of the objects.
    */
    .player-hand-strip > *,
    .token-choice-strip > *,
    .card-drawer-row > *,
    .tile-browser-grid > *,
    .staging-tray > *,
    .spellbook-card-strip > *,
    .public-card-strip > *,
    .header-circular-set > *,
    .dice-footer > .circular-set > * {
        flex-shrink: 0;
    }

    .player-hand-strip,
    .token-choice-strip,
    .card-drawer-row,
    .tile-browser-grid,
    .staging-tray,
    .spellbook-card-strip,
    .public-card-strip,
    .header-circular-set,
    .dice-footer > .circular-set {
        overflow-x: auto !important;
        overflow-y: hidden !important;
    }

    /*
       Card browser navigation always occupies one small row.
    */
    .card-path-bar {
        height: 32px;
        min-height: 32px;

        padding: 2px 6px;
    }

    .card-path-back {
        flex-basis: 26px;

        width: 26px;
        height: 26px;

        font-size: 18px;
    }

    .card-path-scroll {
        flex-wrap: nowrap !important;
    }

    .card-path-segment {
        height: 24px;

        padding: 2px 6px;

        font-size: 10px;
    }

    /*
       Give the actual cards as much vertical room as possible.
    */
    .card-library-results {
        min-height: 0 !important;

        overflow-x: auto !important;
        overflow-y: hidden !important;

        display: flex !important;
        align-items: flex-start !important;

        gap: 7px !important;

        padding: 7px !important;

        scroll-padding-inline: 7px;

        touch-action: pan-x;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;

        scrollbar-width: none;
    }

    .card-library-results::-webkit-scrollbar {
        display: none;
    }

    .card-library-results > .library-playing-card {
        flex: 0 0 94px !important;

        width: 94px !important;
        min-width: 94px !important;
    }

    /*
       Character card drop area is also a horizontal shelf.
    */
    .character-spellbook-drop {
        overflow: hidden !important;
    }

    .spellbook-card-strip {
        display: flex !important;

        gap: 6px;

        overflow-x: auto !important;
        overflow-y: hidden !important;
    }
}


/* ---------------------------------------------------------
   SMALL PHONE
   Preserve touch targets; reclaim unnecessary chrome instead.
   --------------------------------------------------------- */

@media (max-width: 430px) {

    .card-path-bar {
        height: 30px;
        min-height: 30px;
    }

    .card-path-back {
        width: 24px;
        height: 24px;
        flex-basis: 24px;
    }

    .card-path-segment {
        height: 22px;

        font-size: 9px;
    }

    .card-library-results > .library-playing-card {
        flex-basis: 88px !important;

        width: 88px !important;
        min-width: 88px !important;
    }
}
/* Mobile Card Library uses the permanent Hand rail below it.
   Remove the redundant internal character-card drop box. */
@media (max-width: 800px) {

    .card-library-workspace {
        display: block !important;
        min-height: 0 !important;
        overflow: hidden !important;
    }

    .character-spellbook-drop {
        display: none !important;
    }

    .card-library-results {
        width: 100% !important;
        height: 100% !important;
        min-height: 0 !important;
        box-sizing: border-box !important;
    }
}/* Mobile Card Library uses the permanent Hand rail below it.
   Remove the redundant internal character-card drop box. */
@media (max-width: 800px) {

    .card-library-workspace {
        display: block !important;
        min-height: 0 !important;
        overflow: hidden !important;
    }

    .character-spellbook-drop {
        display: none !important;
    }

    .card-library-results {
        width: 100% !important;
        height: 100% !important;
        min-height: 0 !important;
        box-sizing: border-box !important;
    }
}/* =========================================================
   HEADER TRUE HORIZONTAL SCROLL
   The header has a nested finite-set that must remain wider
   than the viewport or Safari only gives elastic overscroll.
   ========================================================= */

@media (max-width: 800px) {

    #header-slider {
        display: block !important;

        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;

        overflow-x: scroll !important;
        overflow-y: hidden !important;

        -webkit-overflow-scrolling: touch !important;

        overscroll-behavior-x: auto !important;
        touch-action: pan-x !important;

        scroll-snap-type: none !important;

        white-space: nowrap !important;
    }

    #header-slider > .finite-set.header-circular-set {
        display: inline-flex !important;
        flex-wrap: nowrap !important;
        align-items: center !important;

        box-sizing: border-box !important;

        width: max-content !important;
        min-width: max-content !important;
        max-width: none !important;

        margin: 0 !important;
        padding-left: 7px !important;
        padding-right: 7px !important;

        overflow: visible !important;

        white-space: nowrap !important;
    }

    #header-slider > .finite-set.header-circular-set > * {
        flex: 0 0 auto !important;
    }

    #header-slider > .rail-scroll-arrow {
        display: none !important;
    }
}



/* SOURCE: character-native.css */
/* Universal character sheet: the reference paintings are the skin.
   Interactive controls are transparent overlays aligned to the artwork so the
   page keeps the exact Shaelvien look instead of recreating it with CSS boxes. */
:root{--character-font:#5b4932;--character-light:linear-gradient(180deg,#f6eedf,#f3e4c2)}
.native-character-modal{position:fixed;inset:0;z-index:2147483600;background:#071017ee;display:flex;align-items:flex-start;justify-content:center;padding:3px 3px 144px;box-sizing:border-box;overflow:auto;-webkit-overflow-scrolling:touch}
.native-character-sheet{position:relative;width:min(708px,100%);margin:0 auto;background:#f7efdf;color:var(--character-font);overflow:visible;border:0;border-radius:0;box-shadow:0 16px 55px #000}
.reference-artboard{position:relative;width:100%;aspect-ratio:708/1536;background-repeat:no-repeat;background-position:top center;background-size:100% 100%;overflow:hidden;color:var(--character-font);isolation:isolate}
.reference-artboard::after{content:"";position:absolute;inset:0;z-index:0;pointer-events:none;background:var(--character-light);mix-blend-mode:multiply;opacity:.10}
.reference-artboard.profile-reference-art{background-image:url('../assets/ui/character-sheet/profile-reference.jpeg')}
.reference-artboard.entries-reference-art{background-image:url('../assets/ui/character-sheet/entries-reference.jpeg')}
.reference-artboard.equipment-reference-art{background-image:url('../assets/ui/character-sheet/equipment-reference.jpeg')}
.reference-artboard.linked-reference-art{background-image:url('../assets/ui/character-sheet/linked-reference.jpeg')}
.reference-artboard>*{position:absolute;z-index:2;box-sizing:border-box}
.reference-sheet-controls{position:absolute;inset:0;z-index:5;pointer-events:none}
.reference-sheet-controls button,.reference-sheet-controls input{pointer-events:auto}
.reference-sheet-controls button{border:0;background:transparent;color:transparent;padding:0;box-shadow:none}
.reference-sheet-controls .sheet-title-control{position:absolute;left:19.5%;top:2.2%;width:61%;height:5.4%}
.reference-sheet-controls .sheet-title-control input{width:100%;height:100%;border:0;background:transparent;text-align:center;color:var(--character-font);font:700 clamp(12px,3.5vw,23px)/1.1 Georgia,serif;outline:0;padding:0 8%}
.sheet-back{position:absolute;left:3.1%;top:2.1%;width:9.5%;aspect-ratio:1;border-radius:50%!important}
.sheet-add{position:absolute;right:7.5%;top:2%;width:9%;aspect-ratio:1;border-radius:50%!important}
.sheet-close{position:absolute;right:1.2%;top:2%;width:7%;aspect-ratio:1;border-radius:50%!important}
.sheet-appearance{position:absolute;left:2.1%;top:1.1%;width:9.5%;aspect-ratio:1;border-radius:50%!important}
.profile-reference-art .sheet-back,.profile-reference-art .sheet-title-control{display:none}
.profile-reference-art .sheet-close{right:2.4%;top:1.4%;width:7.5%}
.reference-portrait{position:absolute;left:24.2%;top:2.25%;width:51.7%;aspect-ratio:1;border:0;border-radius:50%;padding:0;background:transparent;overflow:hidden;box-shadow:none}
.reference-portrait img{width:100%;height:100%;object-fit:cover;border-radius:50%;display:block}
.reference-portrait .portrait-pencil{position:absolute;right:8%;bottom:8%;width:13%;aspect-ratio:1;border-radius:50%;background:#122128 url('../assets/ui/character-sheet/portrait-edit-pencil.png') center/72% no-repeat;box-shadow:0 0 0 2px #b68b3c}
.profile-name{left:20.3%;top:25.15%;width:59.4%;height:5.2%;border:0!important;background:transparent!important;box-shadow:none!important;text-align:center;color:var(--character-font)!important;font:700 clamp(12px,3.5vw,24px)/1 Georgia,serif!important;outline:0;padding:0 8%!important}
.profile-concept{left:11.2%;top:31.1%;width:77.7%;height:5.2%;resize:none;border:0!important;background:transparent!important;box-shadow:none!important;color:var(--character-font)!important;font:600 clamp(9px,2.6vw,17px)/1.15 system-ui!important;text-align:center;padding:1.2% 3%!important;outline:0}
.profile-description{left:10%;top:72.1%;width:80%;height:13.1%;resize:none;border:0!important;background:transparent!important;box-shadow:none!important;color:var(--character-font)!important;font:500 clamp(9px,2.35vw,16px)/1.35 system-ui!important;padding:2.5% 4%!important;outline:0}
.profile-value-tiles{left:3.5%;top:37.1%;width:93%;height:34.5%;display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(2,1fr);gap:2.2% 2.6%;position:absolute!important}
.reference-value-tile{position:relative!important;display:grid;grid-template-rows:28% 1fr;border:0;background:transparent;place-items:center;overflow:hidden}
.reference-value-tile .tile-label{width:86%;height:100%;border:0!important;background:transparent!important;box-shadow:none!important;color:var(--character-font)!important;text-align:center;font:700 clamp(8px,2.3vw,15px)/1 Georgia,serif!important;padding:0 4%!important;outline:0}
.reference-value-tile .tile-number{align-self:center;width:43%;aspect-ratio:1;border:0!important;background:transparent!important;box-shadow:none!important;text-align:center;color:var(--character-font)!important;font:800 clamp(16px,5vw,30px)/1 Georgia,serif!important;padding:0!important;outline:0;-moz-appearance:textfield}
.reference-value-tile .tile-number::-webkit-inner-spin-button{display:none}
.profile-trackers{left:6.7%;top:75.4%;width:86.6%;height:10.4%;display:grid;grid-template-rows:1fr 1fr;gap:13%;position:absolute!important;pointer-events:auto}
.reference-tracker{position:relative!important;display:grid;grid-template-columns:12% 1fr 12%;align-items:center;gap:2%;color:var(--character-font)}
.reference-tracker button{border:0;background:transparent;width:100%;height:100%;padding:0}
.reference-tracker output{text-align:center;font:700 clamp(8px,2.4vw,15px)/1 Georgia,serif;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.entries-title,.equipment-title,.linked-title{left:20.5%;top:2.2%;width:59%;height:5.2%;border:0!important;background:transparent!important;box-shadow:none!important;text-align:center;color:var(--character-font)!important;font:700 clamp(11px,3vw,20px)/1 Georgia,serif!important;padding:0 5%!important;outline:0}
.entries-overlay{left:6.7%;top:15.4%;width:86.7%;height:45%;display:grid;grid-template-columns:repeat(2,1fr);grid-auto-rows:minmax(18%,1fr);gap:2%;overflow:auto;padding:1%;scrollbar-width:none;position:absolute!important}
.entries-overlay::-webkit-scrollbar{display:none}
.reference-entry-tile{position:relative!important;min-height:0;border:0;background:transparent;display:grid;align-content:center;place-items:center;text-align:center;padding:3%;overflow:hidden;color:var(--character-font)}
.reference-entry-tile strong{font:700 clamp(8px,2.4vw,15px)/1.1 Georgia,serif}.reference-entry-tile p{font:500 clamp(7px,2vw,12px)/1.2 system-ui;margin:2px 0}.reference-entry-tile input{width:54%;border:0;background:transparent;text-align:center;font:800 clamp(12px,4vw,24px)/1 Georgia,serif;color:var(--character-font);outline:0}
.entries-notes{left:7.1%;top:69%;width:85.8%;height:17%;border:0!important;background:transparent!important;box-shadow:none!important;resize:none;color:var(--character-font)!important;font:500 clamp(9px,2.25vw,15px)/1.35 system-ui!important;padding:2.5% 3.2%!important;outline:0}
.equipment-slots-text{left:5%;top:34%;width:90%;height:20%;border:0!important;background:transparent!important;box-shadow:none!important;resize:none;color:var(--character-font)!important;font:600 clamp(8px,2.3vw,15px)/1.3 system-ui!important;padding:2.5% 5%!important;outline:0}
.equipment-anatomy{left:48%;top:9%;width:45%;height:24%;border:0!important;background:transparent!important;box-shadow:none!important;resize:none;color:var(--character-font)!important;font:600 clamp(8px,2.1vw,14px)/1.25 system-ui!important;padding:3%!important;outline:0}
.equipment-notes{left:5%;top:66%;width:90%;height:20%;border:0!important;background:transparent!important;box-shadow:none!important;resize:none;color:var(--character-font)!important;font:500 clamp(9px,2.2vw,15px)/1.35 system-ui!important;padding:3.2%!important;outline:0}
.linked-card-overlay{left:8%;top:12%;width:84%;height:43%;display:grid;grid-template-columns:repeat(2,1fr);grid-auto-rows:minmax(20%,1fr);gap:2%;overflow:auto;padding:1%;position:absolute!important;scrollbar-width:none}
.linked-card-overlay::-webkit-scrollbar{display:none}.linked-card-overlay article{position:relative!important;border:0;background:transparent;display:grid;place-items:center;align-content:center;text-align:center;padding:4%;color:var(--character-font)}.linked-card-overlay strong{font:700 clamp(8px,2.4vw,15px)/1.1 Georgia,serif}.linked-card-overlay small{font-size:clamp(7px,2vw,12px)}
.linked-notes{left:7%;top:68%;width:86%;height:18%;border:0!important;background:transparent!important;box-shadow:none!important;resize:none;color:var(--character-font)!important;font:500 clamp(9px,2.2vw,15px)/1.35 system-ui!important;padding:3%!important;outline:0}
.reference-bottom-nav{left:3.2%;bottom:1.6%;width:93.6%;height:7.1%;display:grid;grid-template-columns:repeat(5,1fr);gap:1.5%;position:absolute!important;z-index:6}
.reference-bottom-nav button{border:0;background:transparent;border-radius:30%;box-shadow:none;padding:0;position:relative}
.reference-bottom-nav button.active::after{content:"";position:absolute;inset:5%;border-radius:50%;box-shadow:0 0 0 3px #9ecff2,0 0 18px #80c8ff9a;pointer-events:none}
/* Center handling from the appearance editor. */
html[data-character-center="white"] .reference-artboard::before{content:"";position:absolute;inset:8% 5% 11%;background:#fff9;z-index:1;pointer-events:none;border-radius:4%}
html[data-character-center="black"] .reference-artboard::before{content:"";position:absolute;inset:8% 5% 11%;background:#070b0dc7;z-index:1;pointer-events:none;border-radius:4%}
html[data-character-center="black"] .reference-artboard{--character-font:#f8edd1}
/* Portrait editor retains the same pale-gold skin. */
.portrait-editor-modal{position:fixed;inset:0;z-index:2147483640;background:#071017d9;display:grid;place-items:center;padding:12px}.portrait-editor{width:min(660px,calc(100vw - 24px));max-height:calc(100dvh - 28px);overflow:auto;border:2px solid #c79b46;border-radius:28px;background:#f7edda;color:#57452f;box-shadow:0 18px 60px #000}.portrait-editor header{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid #c79b46}.portrait-upload-area{padding:24px 18px;display:grid;gap:12px}.portrait-draw{min-height:44px;border:1.5px solid #b68e44;border-radius:14px;background:#17242b;color:#f4dda0;font-weight:700}.portrait-editor-controls{padding:14px}.portrait-editor-controls .portrait-crop{overflow:hidden;border:4px double #b68c42;border-radius:50%;aspect-ratio:1;background:#eadcc0}.portrait-editor-controls .portrait-crop img{width:100%;height:100%;object-fit:cover;transform-origin:center}.portrait-adjustments{display:grid;gap:10px;margin-top:12px}.portrait-editor footer{display:flex;justify-content:flex-end;gap:7px;padding:10px 14px 14px}.portrait-editor footer button{border:1.5px solid #b68e44;border-radius:999px;background:#fff8ea;color:#5b4932;padding:9px 14px;font-weight:700}.portrait-editor footer .primary{background:#17242b;color:#f4dda0}
/* Card appearance modal. */
.character-appearance-modal{position:fixed;inset:0;z-index:2147483645;background:#071017d9;display:grid;place-items:center;padding:12px}.character-appearance-panel{width:min(650px,100%);max-height:calc(100dvh - 30px);overflow:auto;border:2px solid #bd8e38;border-radius:28px;background:#f4e6c4;color:#55422f;box-shadow:0 18px 60px #000}.character-appearance-panel>header{position:sticky;top:0;z-index:2;display:flex;justify-content:space-between;align-items:center;padding:14px 16px;background:#f4e6c4;border-bottom:1px solid #bd8e38}.character-appearance-panel>header strong{font:800 24px/1 Georgia,serif}.character-appearance-panel button,.character-appearance-panel select,.character-appearance-panel input{font:600 16px system-ui}.character-appearance-panel button{border:1px solid #b68d43;border-radius:14px;background:#fff8e9;color:#57452f;padding:10px 14px}.appearance-preview{margin:14px;border:2px solid #17242b;border-radius:24px;padding:18px;background:var(--preview-light);color:var(--preview-font);display:grid;gap:5px}.appearance-preview[data-center="white"]{box-shadow:inset 0 0 0 999px #ffffff52}.appearance-preview[data-center="black"]{box-shadow:inset 0 0 0 999px #0000006b}.appearance-preview strong{font:800 30px/1 Georgia,serif}.appearance-grid{padding:0 16px 16px;display:grid;grid-template-columns:1fr 1fr;gap:12px}.appearance-grid label,.appearance-grid fieldset{display:grid;gap:6px;font:700 14px system-ui}.appearance-grid input[type="color"],.appearance-grid select{width:100%;height:52px;border:1px solid #b68d43;border-radius:14px;background:#fffaf2}.appearance-grid fieldset{grid-column:1/-1;grid-template-columns:repeat(3,1fr);border:1px solid #b68d43;border-radius:16px;padding:10px}.appearance-grid fieldset legend{padding:0 8px}.appearance-grid fieldset label{display:flex;align-items:center;gap:6px}.character-appearance-panel>footer{position:sticky;bottom:0;display:flex;justify-content:flex-end;gap:10px;padding:12px 16px;background:#f4e6c4;border-top:1px solid #bd8e38}.character-appearance-panel>footer .primary{background:#17242b;color:#f5d88a}
@media(max-width:560px){.native-character-modal{padding-left:0;padding-right:0}.native-character-sheet{width:100%}.reference-artboard{width:100%}.appearance-grid{grid-template-columns:1fr 1fr}.appearance-preview strong{font-size:24px}}


/* SOURCE: character-profile-alignment.css */
.reference-value-tile .tile-label{top:12%!important;height:18%!important;display:flex!important;align-items:center!important;justify-content:center!important;text-align:center!important;line-height:1!important;padding:0 5%!important;white-space:nowrap!important;overflow-x:auto!important;overflow-y:hidden!important;text-overflow:clip!important;touch-action:pan-x!important;-webkit-overflow-scrolling:touch!important;scrollbar-width:none!important}
.reference-value-tile .tile-label::-webkit-scrollbar{display:none!important}
.reference-value-tile .tile-number{display:flex!important;align-items:center!important;justify-content:center!important;text-align:center!important;line-height:1!important}
.reference-value-tile .tile-circle-text{display:flex!important;align-items:center!important;justify-content:center!important;text-align:center!important;line-height:1!important}
.reference-tracker .tracker-center{min-width:0;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;justify-content:center;gap:5px;padding:0 5%;text-align:center}
.reference-tracker .tracker-name{min-width:0;width:100%;height:100%;border:0!important;background:transparent!important;box-shadow:none!important;outline:0!important;color:var(--character-font)!important;text-align:center!important;font:700 clamp(8px,2.4vw,15px)/1 Georgia,serif!important;padding:0!important;white-space:nowrap!important;overflow-x:auto!important;overflow-y:hidden!important;text-overflow:clip!important;touch-action:pan-x!important;-webkit-overflow-scrolling:touch!important;scrollbar-width:none!important}
.reference-tracker .tracker-name::-webkit-scrollbar{display:none!important}
.reference-tracker output{display:block!important;min-width:max-content!important;text-align:center!important}
.reference-bottom-nav button,.reference-bottom-nav button:hover,.reference-bottom-nav button:focus,.reference-bottom-nav button:active{background:transparent!important;box-shadow:none!important;outline:0!important;-webkit-tap-highlight-color:transparent!important}
.reference-bottom-nav button.active::after{content:""!important;position:absolute!important;inset:16%!important;border-radius:50%!important;border:2px solid #6fbfff!important;box-shadow:none!important;background:transparent!important;pointer-events:none!important}


/* SOURCE: character-profile-tiles.css */
/* Profile page is composed from reusable Shaelvien tiles instead of one flat reference image.
   The control atlas is 1536x921; each sprite crop is scaled to its owning code box. */
.profile-reference-art{
  background-image:url('../assets/cards/fronts/card_front_06_minimal.png')!important;
  background-size:100% 100%!important;
  background-position:center!important;
  background-repeat:no-repeat!important;
}
.profile-reference-art::after{opacity:.05!important}

/* Sprite crop helper: x/y/w/h describe the source rectangle in controls-atlas.jpeg. */
.profile-reference-art .reference-portrait,
.profile-reference-art .profile-name,
.profile-reference-art .profile-concept,
.profile-reference-art .profile-description,
.profile-reference-art .reference-tracker,
.profile-reference-art .reference-bottom-nav button{
  background-image:url('../assets/ui/character-sheet/controls-atlas.jpeg')!important;
  background-repeat:no-repeat!important;
}

/* Portrait: large circular frame x=78 y=206 w=221 h=215. */
.profile-reference-art .reference-portrait{
  left:25.2%!important;top:2.45%!important;width:49.6%!important;height:auto!important;aspect-ratio:221/215!important;
  background-size:695.02% 428.37%!important;
  background-position:5.93% 29.18%!important;
  border-radius:0!important;overflow:visible!important;
}
.profile-reference-art .reference-portrait img{
  position:absolute!important;left:14%!important;top:11%!important;width:72%!important;height:74%!important;
  object-fit:cover!important;border-radius:50%!important;z-index:1!important;
}
.profile-reference-art .reference-portrait .portrait-pencil{
  right:10%!important;bottom:8%!important;width:12%!important;z-index:3!important;
}

/* Name: long ornate plate x=19 y=31 w=450 h=158. */
.profile-reference-art .profile-name{
  left:18.2%!important;top:26.0%!important;width:63.6%!important;height:auto!important;aspect-ratio:450/158!important;
  background-size:341.33% 582.91%!important;
  background-position:1.75% 4.06%!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
  padding:1% 8%!important;font-size:clamp(13px,3.45vw,24px)!important;
}

/* Concept: medium plate x=492 y=48 w=268 h=138. */
.profile-reference-art .profile-concept{
  left:31.0%!important;top:34.15%!important;width:38.0%!important;height:auto!important;aspect-ratio:268/138!important;
  background-size:573.13% 667.39%!important;
  background-position:38.80% 6.13%!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
  white-space:nowrap!important;overflow-x:auto!important;overflow-y:hidden!important;scrollbar-width:none!important;
  padding:0 8%!important;line-height:1!important;
}
.profile-reference-art .profile-concept::-webkit-scrollbar{display:none!important}

/* Values are real code cards. The six provided Shaelvien card fronts are used as the actual card skins. */
.profile-reference-art .profile-value-tiles{
  left:4.2%!important;top:43.0%!important;width:91.6%!important;height:30.6%!important;
  display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;grid-template-rows:repeat(2,minmax(0,1fr))!important;
  gap:2.0% 2.3%!important;
}
.profile-reference-art .reference-value-tile{
  position:relative!important;display:grid!important;grid-template-rows:23% 1fr 23%!important;place-items:center!important;
  min-width:0!important;min-height:0!important;overflow:hidden!important;
  background-size:100% 100%!important;background-repeat:no-repeat!important;background-position:center!important;
  padding:9% 8% 10%!important;box-sizing:border-box!important;
  border:0!important;
}
.profile-reference-art .reference-value-tile:nth-child(1){background-image:url('../assets/cards/fronts/card_front_01_three_roses.png')!important}
.profile-reference-art .reference-value-tile:nth-child(2){background-image:url('../assets/cards/fronts/card_front_02_two_roses.png')!important}
.profile-reference-art .reference-value-tile:nth-child(3){background-image:url('../assets/cards/fronts/card_front_03_four_roses.png')!important}
.profile-reference-art .reference-value-tile:nth-child(4){background-image:url('../assets/cards/fronts/card_front_04_single_rose.png')!important}
.profile-reference-art .reference-value-tile:nth-child(5){background-image:url('../assets/cards/fronts/card_front_05_two_low_roses.png')!important}
.profile-reference-art .reference-value-tile:nth-child(6){background-image:url('../assets/cards/fronts/card_front_06_minimal.png')!important}
.profile-reference-art .reference-value-tile .tile-label{
  position:static!important;width:100%!important;height:100%!important;min-width:0!important;
  display:block!important;align-self:center!important;text-align:center!important;
  white-space:nowrap!important;overflow-x:auto!important;overflow-y:hidden!important;scrollbar-width:none!important;
  font:700 clamp(8px,2.15vw,15px)/1 Georgia,serif!important;padding:0 4%!important;
}
.profile-reference-art .reference-value-tile .tile-label::-webkit-scrollbar{display:none!important}
.profile-reference-art .reference-value-tile .tile-number{
  position:static!important;align-self:center!important;width:64%!important;height:64%!important;aspect-ratio:auto!important;
  display:flex!important;align-items:center!important;justify-content:center!important;text-align:center!important;
  font:800 clamp(18px,5.3vw,34px)/1 Georgia,serif!important;
}
.profile-reference-art .reference-value-tile .tile-circle-row{
  position:static!important;width:100%!important;height:100%!important;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:8%!important;align-items:center!important;justify-items:center!important;
}
.profile-reference-art .reference-value-tile .tile-circle-text{
  position:static!important;width:100%!important;height:100%!important;min-width:0!important;
  border:0!important;background:transparent!important;box-shadow:none!important;text-align:center!important;
  font:700 clamp(7px,1.9vw,12px)/1 Georgia,serif!important;padding:0!important;color:var(--character-font)!important;
}

/* Description: wide rectangular tile x=778 y=34 w=289 h=167. */
.profile-reference-art .profile-description{
  left:23.5%!important;top:74.2%!important;width:53%!important;height:auto!important;aspect-ratio:289/167!important;
  background-size:531.49% 551.50%!important;
  background-position:62.39% 4.51%!important;
  padding:7% 8%!important;box-sizing:border-box!important;
  overflow:auto!important;scrollbar-width:none!important;
  font-size:clamp(8px,2.1vw,14px)!important;
}
.profile-reference-art .profile-description::-webkit-scrollbar{display:none!important}

/* Tracker bars: x=358 y=624 w=318 h=84. */
.profile-reference-art .profile-trackers{
  left:7.1%!important;top:84.25%!important;width:85.8%!important;height:7.5%!important;
  display:grid!important;grid-template-rows:1fr 1fr!important;gap:8%!important;
}
.profile-reference-art .reference-tracker{
  background-size:483.02% 1096.43%!important;
  background-position:29.39% 74.57%!important;
  grid-template-columns:15% 1fr 15%!important;gap:1%!important;
  padding:0 1%!important;box-sizing:border-box!important;
}
.profile-reference-art .reference-tracker .tracker-center{
  height:100%!important;display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:center!important;gap:4%!important;padding:0 3%!important;
}
.profile-reference-art .reference-tracker .tracker-name{
  white-space:nowrap!important;overflow-x:auto!important;overflow-y:hidden!important;scrollbar-width:none!important;
}
.profile-reference-art .reference-tracker .tracker-name::-webkit-scrollbar{display:none!important}

/* Bottom navigation: five atlas buttons x=117/395/682/954/1221, y~=744, w~=152, h~=146. */
.profile-reference-art .reference-bottom-nav{
  left:7.5%!important;bottom:1.1%!important;width:85%!important;height:7.4%!important;
  display:grid!important;grid-template-columns:repeat(5,1fr)!important;gap:2.7%!important;
}
.profile-reference-art .reference-bottom-nav button{position:relative!important;width:100%!important;height:100%!important;border-radius:0!important;background-color:transparent!important}
.profile-reference-art .reference-bottom-nav button:nth-child(1){background-size:1010.53% 630.82%!important;background-position:8.45% 96.00%!important}
.profile-reference-art .reference-bottom-nav button:nth-child(2){background-size:1010.53% 626.53%!important;background-position:28.53% 95.86%!important}
.profile-reference-art .reference-bottom-nav button:nth-child(3){background-size:1010.53% 626.53%!important;background-position:49.28% 95.86%!important}
.profile-reference-art .reference-bottom-nav button:nth-child(4){background-size:1017.22% 635.17%!important;background-position:68.86% 95.97%!important}
.profile-reference-art .reference-bottom-nav button:nth-child(5){background-size:1017.22% 635.17%!important;background-position:88.15% 95.97%!important}
.profile-reference-art .reference-bottom-nav button.active::after{
  inset:18%!important;border:2px solid #6fbfff!important;border-radius:50%!important;background:transparent!important;box-shadow:none!important;
}

/* Keep close/appearance controls above composed tiles. */
.profile-reference-art .reference-sheet-controls{z-index:20!important}

@media(max-width:560px){
  .profile-reference-art .profile-name{top:26.2%!important}
  .profile-reference-art .profile-concept{top:34.5%!important}
  .profile-reference-art .profile-value-tiles{top:43.2%!important;height:30.3%!important}
  .profile-reference-art .profile-description{top:74.4%!important}
}


/* SOURCE: shaelvien-cursors.css */
/* Cursor roles. The image data is sliced from the supplied cursor sheet at runtime. */
@media (hover:hover) and (pointer:fine){
 html.shaelvien-cursors-ready,html.shaelvien-cursors-ready body{cursor:var(--rist-cursor-sword,auto)}
 html.shaelvien-cursors-ready a,
 html.shaelvien-cursors-ready button,
 html.shaelvien-cursors-ready [role="button"],
 html.shaelvien-cursors-ready label,
 html.shaelvien-cursors-ready select{cursor:var(--rist-cursor-pointer,pointer)}
 html.shaelvien-cursors-ready input[type="text"],
 html.shaelvien-cursors-ready input[type="search"],
 html.shaelvien-cursors-ready input[type="email"],
 html.shaelvien-cursors-ready input[type="url"],
 html.shaelvien-cursors-ready input[type="number"],
 html.shaelvien-cursors-ready textarea,
 html.shaelvien-cursors-ready [contenteditable="true"]{cursor:var(--rist-cursor-text,text)}
 html.shaelvien-cursors-ready input[type="range"]{cursor:var(--rist-cursor-select,pointer)}
 html.shaelvien-cursors-ready input[type="color"],
 html.shaelvien-cursors-ready [data-tool="color"],
 html.shaelvien-cursors-ready [aria-label*="color" i]{cursor:var(--rist-cursor-colorPicker,pointer)}
 html.shaelvien-cursors-ready [draggable="true"],
 html.shaelvien-cursors-ready .draggable,
 html.shaelvien-cursors-ready .tile-item,
 html.shaelvien-cursors-ready .token-item,
 html.shaelvien-cursors-ready .library-playing-card{cursor:var(--rist-cursor-grab,grab)}
 html.shaelvien-cursors-ready [draggable="true"]:active,
 html.shaelvien-cursors-ready .draggable:active,
 html.shaelvien-cursors-ready .tile-item:active,
 html.shaelvien-cursors-ready .token-item:active,
 html.shaelvien-cursors-ready .library-playing-card:active{cursor:var(--rist-cursor-grabPinch,grabbing)}
 html.shaelvien-cursors-ready .map,
 html.shaelvien-cursors-ready .world-map,
 html.shaelvien-cursors-ready .map-surface,
 html.shaelvien-cursors-ready .board,
 html.shaelvien-cursors-ready [data-pan-surface]{cursor:var(--rist-cursor-moveRing,move)}
 html.shaelvien-cursors-ready .map:active,
 html.shaelvien-cursors-ready .world-map:active,
 html.shaelvien-cursors-ready .map-surface:active,
 html.shaelvien-cursors-ready .board:active,
 html.shaelvien-cursors-ready [data-pan-surface]:active{cursor:var(--rist-cursor-grabPinch,grabbing)}
 html.shaelvien-cursors-ready [data-tool="select"],html.shaelvien-cursors-ready [aria-label*="select" i]{cursor:var(--rist-cursor-select,pointer)}
 html.shaelvien-cursors-ready [data-tool="pen"],html.shaelvien-cursors-ready [aria-label*="pen" i]{cursor:var(--rist-cursor-pen,pointer)}
 html.shaelvien-cursors-ready [data-tool="brush"],html.shaelvien-cursors-ready [aria-label*="brush" i]{cursor:var(--rist-cursor-text,pointer)}
 html.shaelvien-cursors-ready [data-tool="paint"],html.shaelvien-cursors-ready [data-tool="spray"],html.shaelvien-cursors-ready [aria-label*="paint" i]{cursor:var(--rist-cursor-paint,pointer)}
 html.shaelvien-cursors-ready [data-tool="fill"],html.shaelvien-cursors-ready [aria-label*="fill" i]{cursor:var(--rist-cursor-fill,pointer)}
 html.shaelvien-cursors-ready [data-tool="erase"],html.shaelvien-cursors-ready [aria-label*="erase" i]{cursor:var(--rist-cursor-erase,pointer)}
 html.shaelvien-cursors-ready [aria-label*="zoom in" i]{cursor:var(--rist-cursor-zoomIn,zoom-in)}
 html.shaelvien-cursors-ready [aria-label*="zoom out" i]{cursor:var(--rist-cursor-zoomOut,zoom-out)}
 html.shaelvien-cursors-ready [aria-label*="rotate" i]{cursor:var(--rist-cursor-rotate,pointer)}
 html.shaelvien-cursors-ready [aria-label*="link" i]{cursor:var(--rist-cursor-link,pointer)}
 html.shaelvien-cursors-ready [aria-label*="card" i]{cursor:var(--rist-cursor-cards,pointer)}
 html.shaelvien-cursors-ready [aria-label*="help" i],html.shaelvien-cursors-ready .help{cursor:var(--rist-cursor-help,help)}
 html.shaelvien-cursors-ready [aria-busy="true"],html.shaelvien-cursors-ready .loading{cursor:var(--rist-cursor-wait,wait)!important}
 html.shaelvien-cursors-ready [disabled],html.shaelvien-cursors-ready [aria-disabled="true"],html.shaelvien-cursors-ready .disabled{cursor:var(--rist-cursor-forbidden,not-allowed)!important}
}
@media (hover:none),(pointer:coarse){html,body,*{cursor:auto!important}}

/* SOURCE: info-legal.css */
.header-info-button{display:grid!important;place-items:center!important;width:58px!important;min-width:58px!important;height:58px!important;min-height:58px!important;padding:0!important;border:1px solid #8d6a28!important;border-radius:10px!important;background:#111820!important;text-decoration:none!important;color:#f1d486!important;font-family:Georgia,serif!important;font-size:24px!important;font-weight:700!important;line-height:1!important;box-shadow:inset 0 0 0 1px #0a0f14!important}.header-info-button>span{display:grid;place-items:center;width:34px;height:34px;border:2px solid #c7a351;border-radius:50%;background:radial-gradient(circle,#203847 0 50%,#0d1820 76%);box-shadow:inset 0 0 0 2px #081015,0 2px 4px #0008}.header-info-button:focus-visible{outline:2px solid #d9c06c!important;outline-offset:2px!important}@media(max-width:650px){.header-info-button{width:58px!important;min-width:58px!important;height:58px!important;min-height:58px!important;border-radius:10px!important}}

/* Final mobile footer alignment: Clear Dice is the locked reference.
   Keep the 64px footer frame; center every control inside it with 3px
   breathing room above and below rather than shrinking the inner space. */
@media(max-width:800px){
 #footer-slider.dice-footer{
  padding-top:0!important;
  padding-bottom:0!important;
 }
 #footer-slider.dice-footer>.circular-set{
  height:64px!important;
  min-height:64px!important;
  max-height:64px!important;
  padding-top:3px!important;
  padding-bottom:3px!important;
  align-items:center!important;
  align-content:center!important;
 }
 #footer-slider.dice-footer>.circular-set>.die-button,
 #footer-slider.dice-footer>.circular-set>.d5-control,
 #footer-slider.dice-footer>.circular-set>.sum,
 #footer-slider.dice-footer>.circular-set>.clear-dice,
 #footer-slider.dice-footer>.circular-set>.card{
  align-self:center!important;
  margin-top:0!important;
  margin-bottom:0!important;
 }
}


/* SOURCE: grid-coordinate-system.css */
/* Fixed map glass + coordinate HUD. Nothing here may resize the map. */
.world-stage{position:absolute;inset:0;z-index:2}
.world-stage>.grid{display:none!important}
.rist-grid-overlay,.rist-hex-grid{display:none!important}

/* adaptive-grid.css owns the one glass grid. It fills the viewport, not the moving stage. */
.map:has(.grid.square)::before,.map:has(.grid.hex)::before{
 display:block!important;position:absolute!important;inset:0!important;width:100%!important;height:100%!important;
 z-index:8!important;pointer-events:none!important;transform:none!important
}

/* Coordinate frame is a HUD/cursor around the viewport. Keep the edge strips
   narrower than the first visible grid cells so the frame never covers them. */
:root{--rist-coordinate-edge:12px}
.rist-coordinate-frame{
 position:absolute!important;inset:0!important;width:auto!important;height:auto!important;box-sizing:border-box!important;
 z-index:18!important;pointer-events:none!important;overflow:hidden!important;border:1px solid #7a632f!important;
 color:#f3d88e;font:600 8px/1 system-ui,-apple-system,sans-serif;text-shadow:0 1px 2px #000,0 0 2px #000
}
.rist-coordinate-axis{position:absolute!important;pointer-events:none!important;background:#030608d9!important;margin:0!important;box-sizing:border-box!important}
/* Top is the map/status readout. */
.rist-coordinate-axis.top{left:var(--rist-coordinate-edge)!important;right:var(--rist-coordinate-edge)!important;top:0!important;height:var(--rist-coordinate-edge)!important;border-bottom:1px solid #55451f!important}
/* Left = Y, right = Z, bottom = X. */
.rist-coordinate-axis.left,.rist-coordinate-axis.right{top:var(--rist-coordinate-edge)!important;bottom:var(--rist-coordinate-edge)!important;width:var(--rist-coordinate-edge)!important}
.rist-coordinate-axis.left{left:0!important;border-right:1px solid #55451f!important}
.rist-coordinate-axis.right{right:0!important;border-left:1px solid #55451f!important}
.rist-coordinate-axis.bottom{display:block!important;left:var(--rist-coordinate-edge)!important;right:var(--rist-coordinate-edge)!important;bottom:0!important;height:var(--rist-coordinate-edge)!important;border-top:1px solid #55451f!important}
.rist-coordinate-tick{position:absolute;white-space:nowrap;opacity:.88}
.top .rist-coordinate-tick{left:var(--p);top:2px;transform:translateX(-50%)}
.bottom .rist-coordinate-tick{left:var(--p);top:2px;transform:translateX(-50%)}
.left .rist-coordinate-tick,.right .rist-coordinate-tick{top:var(--p);transform:translateY(-50%);writing-mode:vertical-rl}
.left .rist-coordinate-tick{left:2px;transform:translateY(-50%) rotate(180deg)}
.right .rist-coordinate-tick{right:2px}
.rist-coordinate-tick.zero{color:#fff7d1;font-weight:900;opacity:1}
.rist-coordinate-axis-label{position:absolute;color:#fff7d1;font-weight:900;z-index:1}
.rist-coordinate-axis.left .rist-coordinate-axis-label{left:2px;top:2px;writing-mode:horizontal-tb!important}
.rist-coordinate-axis.right .rist-coordinate-axis-label{right:2px;top:2px;writing-mode:horizontal-tb!important}
.rist-coordinate-axis.bottom .rist-coordinate-axis-label{left:2px;top:2px}
.rist-coordinate-status{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:0 4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#e6d6ad;font-weight:700}

/* The old in-map status strip is represented by the HUD top edge. */
.map-shell .map>.status{position:absolute!important;left:var(--rist-coordinate-edge)!important;right:var(--rist-coordinate-edge)!important;top:0!important;bottom:auto!important;height:var(--rist-coordinate-edge)!important;z-index:19!important;margin:0!important;padding:0 4px!important;box-sizing:border-box!important;display:flex!important;align-items:center!important;justify-content:center!important;overflow:hidden!important;white-space:nowrap!important;text-overflow:ellipsis!important;pointer-events:none!important;background:#030608e8!important;border:0!important;border-bottom:1px solid #55451f!important;color:#e6d6ad!important;font:700 8px/1 system-ui,-apple-system,sans-serif!important}

.rist-art-studio main{position:relative}.rist-art-studio main>.rist-coordinate-frame{inset:0;z-index:4}
@media(max-width:800px){.rist-coordinate-frame{font-size:7px}.map-shell .map>.status{font-size:7px!important}}

/* Stable token-rail pin. It belongs to Tokens, not the map frame. */
#token-slider .token-pin-source{position:relative!important;inset:auto!important;display:grid!important;place-items:center!important;box-sizing:border-box!important;flex:0 0 34px!important;width:34px!important;min-width:34px!important;max-width:34px!important;height:34px!important;min-height:34px!important;max-height:34px!important;margin:0!important;padding:1px!important;border:1px solid #8b6d2f!important;border-radius:6px!important;background:#000!important;box-shadow:none!important;overflow:hidden!important}
#token-slider .token-pin-source .map-pin-icon{width:29px!important;height:29px!important;min-width:29px!important;min-height:29px!important;max-width:29px!important;max-height:29px!important;margin:auto!important}

@media(orientation:landscape){
 #header-slider .header-circular-set{display:flex!important;align-items:center!important;justify-content:flex-start!important;height:38px!important;min-height:38px!important;max-height:38px!important;gap:2px!important;padding:0 2px!important}
 #header-slider .header-circular-set>.header-icon-button,#header-slider .header-circular-set>.icon-select-control{align-self:center!important;justify-self:auto!important;flex:0 0 34px!important;width:34px!important;min-width:34px!important;max-width:34px!important;height:34px!important;min-height:34px!important;max-height:34px!important;aspect-ratio:1!important;padding:1px!important;margin:0!important}
 #header-slider .header-mmo-button{flex-basis:auto!important;width:auto!important;min-width:34px!important;max-width:68px!important;aspect-ratio:auto!important}
 #header-slider .header-icon-button .header-icon,#header-slider .icon-select-control .header-icon,#header-slider .header-card-back{width:30px!important;height:30px!important;min-width:0!important;min-height:0!important;max-width:30px!important;max-height:30px!important;margin:auto!important;background-size:auto 30px!important}
 #header-slider .header-mmo-button .mmo-toggle-image{width:auto!important;height:30px!important;min-width:0!important;max-width:64px!important;max-height:30px!important;margin:auto!important}
 #header-slider .header-mmo-button .mmo-toggle-image img{display:block!important;width:auto!important;height:30px!important;max-width:64px!important;max-height:30px!important;object-fit:contain!important;margin:auto!important}
 #token-slider .token-pin-source{flex-basis:34px!important;width:34px!important;height:34px!important}
}


/* SOURCE: map-packets.css */
.map-tile-map{position:absolute;inset:0;overflow:hidden;background:#071118;pointer-events:none}.procedural-map-canvas{display:block;width:100%;height:100%;image-rendering:auto}.map-tile-map.loading::after{content:'Building world…';position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:2;padding:.35rem .55rem;border:1px solid #725d30;border-radius:.45rem;background:#071118cc;color:#c8b787;font-size:.72rem;white-space:nowrap}.map-tile-map.ready::after{display:none}.rist-map-card .library-card-face{background:linear-gradient(165deg,#13232a,#1c3540);border-color:#8c7138}.rist-map-card strong{font-family:Georgia,serif}.rist-map-card small{text-transform:uppercase;letter-spacing:.06em}


/* SOURCE: map-context-sidebar.css */
/* World context: thin readout strip above the tabletop, independent of the tabletop grid. */
.map-shell.map-context-ready{display:grid!important;grid-template-columns:minmax(0,1fr)!important;align-items:stretch!important;gap:0!important;min-width:0!important;overflow:hidden!important}.map-context-sidebar{display:none!important}
.world-context-strip{box-sizing:border-box;width:100%;min-height:18px;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));align-items:stretch;padding:0;border:0;background:#071118;color:#c2a565;font:600 7px/1.15 system-ui,-apple-system,sans-serif;letter-spacing:.025em;text-align:center;white-space:nowrap;overflow:hidden}.world-context-strip>*{box-sizing:border-box;min-width:0;display:flex;align-items:center;justify-content:center;gap:3px;padding:3px 4px;border:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.world-context-strip button{appearance:none;-webkit-appearance:none;border:0;background:transparent;color:inherit;margin:0;font:inherit;letter-spacing:inherit;cursor:pointer}.world-context-strip strong{color:#c2a565;font-weight:700;overflow:hidden;text-overflow:ellipsis}.world-context-strip .world-context-action span{color:#6fa8e3;font-weight:800}.world-context-readout{color:#d5c08b}.world-context-readout time{min-width:0;overflow:hidden;text-overflow:ellipsis;color:#eee3c2;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.world-context-utc{border:0!important;background:transparent!important}
.table-workspace{width:100%!important;max-width:none!important;grid-template-columns:minmax(0,1fr)!important}.table-workspace>.map-shell{box-sizing:border-box!important;width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;padding:0!important;margin:0!important;place-items:stretch!important}.table-workspace>.map-shell>.map{box-sizing:border-box!important;width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;aspect-ratio:auto!important;position:relative!important;overflow:hidden!important;background:#05090c}
/* Frame utilities live on the screen frame, with only their inner corners overlapping the glass. */
.map .status{left:22px!important;right:max(122px,10%)!important;bottom:1px!important;width:auto!important;max-width:none!important;min-height:16px!important;padding:3px 6px!important;border:0!important;border-top:1px solid #55451f!important;border-radius:0!important;background:#030608e8!important;box-shadow:none!important;backdrop-filter:none!important;color:#c2a565!important;font:600 7px/1.2 system-ui,-apple-system,sans-serif!important;letter-spacing:.025em!important;text-align:center!important;opacity:.92!important;text-shadow:0 1px 2px #000!important;pointer-events:none!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.map-current-coordinates{position:absolute;z-index:34;right:31px;bottom:0;left:auto;top:auto;box-sizing:border-box;max-width:min(118px,calc(100% - 78px));padding:3px 5px;border:1px solid #7a632f;border-right:0;border-bottom:0;border-radius:6px 0 0 0;background:#000;color:#f2d889;font:700 7px/1.1 ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.02em;text-align:right;text-shadow:0 1px 2px #000;pointer-events:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.map-frame-pin-source{position:absolute!important;z-index:35!important;right:0!important;bottom:0!important;width:34px!important;min-width:34px!important;max-width:34px!important;height:34px!important;min-height:34px!important;max-height:34px!important;padding:1px!important;margin:0!important;border:1px solid #8b6d2f!important;border-right:0!important;border-bottom:0!important;border-radius:7px 0 0 0!important;background:#000!important;box-shadow:-2px -2px 7px #0008!important;display:grid!important;place-items:center!important;overflow:hidden!important}.map-frame-pin-source .map-pin-icon{width:30px!important;height:30px!important;min-width:30px!important;min-height:30px!important;max-width:30px!important;max-height:30px!important}.token-choice-strip>.map-frame-pin-source{display:none!important}
.map-context-time-editor{position:fixed;z-index:2147482850;width:min(270px,calc(100vw - 16px));padding:10px;border:1px solid #8c7135;border-radius:12px;background:#101820;color:#f3ead1;box-shadow:0 14px 38px #000c;display:grid;gap:9px;font:600 12px/1.2 system-ui,-apple-system,sans-serif}.map-context-time-editor>strong{color:#f2d889;font:700 16px Georgia,serif}.map-context-time-editor label{display:grid;gap:4px}.map-context-time-editor select,.map-context-time-editor input{box-sizing:border-box;width:100%;min-height:34px;border:1px solid #725d30;border-radius:8px;background:#18232c;color:#fff0ad;padding:6px 8px}.map-context-time-actions{display:flex;justify-content:flex-end;gap:7px}.map-context-time-actions button{min-height:34px;padding:6px 10px;border:1px solid #725d30;border-radius:8px;background:#18232c;color:#f2d889;font-weight:700}.map-context-time-actions [data-save]{border-color:#477cb6;color:#7ebcff}
.rist{gap:0!important;row-gap:0!important;position:relative!important}.rist>#header-slider,.rist>.public-card-drop,.rist>.asset-slider-stack,.rist>.table-workspace,.rist>.recursion-cockpit,.rist>.player-tools-rail,.rist>.home-footer-stack{margin-top:0!important;margin-bottom:0!important}.topbar,.public-card-drop,.asset-slider-stack,.table-workspace,.player-tools-rail,.footer,.home-inline-chat{border-radius:0!important}.home-footer-stack{gap:0!important}
.site-copyright-notice{position:absolute!important;z-index:60!important;left:0!important;right:0!important;top:54px!important;box-sizing:border-box!important;display:block!important;width:100%!important;min-height:12px!important;height:12px!important;padding:1px 8px!important;border-top:1px solid #493d23!important;border-bottom:1px solid #6e592c!important;background:#05090c!important;color:#c2a565!important;font:600 6px/1.25 system-ui,-apple-system,sans-serif!important;letter-spacing:.025em!important;text-align:center!important;opacity:.9!important;text-shadow:0 1px 2px #000!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;pointer-events:none!important}body>.site-copyright-notice{display:none!important}.rist>.site-copyright-notice{display:block!important}
.header-circular-set{display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:4px!important}.header-circular-set>*{flex:0 0 auto!important;align-self:center!important}.header-icon-button,.icon-select-control{display:grid!important;place-items:center!important;box-sizing:border-box!important;aspect-ratio:1!important;padding:2px!important}.header-icon-button .header-icon,.icon-select-control .header-icon,.header-card-back,.mmo-toggle-image{margin:auto!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important}.header-mmo-button .mmo-toggle-image img{width:auto!important;height:auto!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important;margin:auto!important}.asset-type-control,.compact-select,.unit-control{width:38px!important;min-width:38px!important;max-width:38px!important}.asset-type-control select,.compact-select select,.unit-control select{position:absolute!important;inset:0!important;width:100%!important;min-width:0!important;max-width:none!important;opacity:0!important;cursor:pointer!important}
@media(max-width:520px){.world-context-strip{font-size:6px}.world-context-strip>*{gap:2px;padding-inline:2px}.map-current-coordinates{right:30px;bottom:0;max-width:88px;font-size:6px;padding:2px 4px}.map .status{font-size:6px;left:18px!important;right:max(112px,14%)!important}}
@media(orientation:portrait){.topbar,.footer,.header-circular-set,.dice-footer>.circular-set{height:54px!important;min-height:54px!important;max-height:54px!important}.header-icon-button,.icon-select-control{width:50px!important;min-width:50px!important;height:50px!important;min-height:50px!important;max-height:50px!important}.asset-type-control,.compact-select,.unit-control{width:50px!important;min-width:50px!important;max-width:50px!important}}
@media(orientation:landscape){
 :root{--rist-hand-height:38px;--rist-copy-height:12px}
 .rist{grid-template-rows:calc(var(--rist-hand-height) + var(--rist-copy-height)) minmax(0,1fr) var(--rist-hand-height) var(--rist-hand-height)!important;gap:0!important;row-gap:0!important}
 #header-slider{position:absolute!important;z-index:55!important;top:0!important;left:0!important;width:50%!important;max-width:50%!important;height:var(--rist-hand-height)!important;min-height:var(--rist-hand-height)!important;max-height:var(--rist-hand-height)!important;border-right:1px solid #6e592c!important}
 #public-card-slider{position:absolute!important;z-index:55!important;top:0!important;right:0!important;left:auto!important;width:50%!important;max-width:50%!important;height:var(--rist-hand-height)!important;min-height:var(--rist-hand-height)!important;max-height:var(--rist-hand-height)!important;display:flex!important;padding:0!important;border-left:1px solid #6e592c!important;border-radius:0!important;background:#0d1319!important;overflow:hidden!important}
 #public-card-slider .public-card-strip{height:var(--rist-hand-height)!important;min-height:var(--rist-hand-height)!important;max-height:var(--rist-hand-height)!important;align-items:center!important;padding:0 3px!important;overflow-x:auto!important;overflow-y:hidden!important}
 #public-card-slider .public-card-empty{box-sizing:border-box!important;height:var(--rist-hand-height)!important;min-height:var(--rist-hand-height)!important;max-height:var(--rist-hand-height)!important;display:flex!important;align-items:center!important;justify-content:center!important;padding:2px 6px!important;font-size:8px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
 .site-copyright-notice{top:var(--rist-hand-height)!important;height:var(--rist-copy-height)!important;min-height:var(--rist-copy-height)!important}
 .topbar,.header-circular-set,.player-tools-rail,.player-hand-strip,.token-choice-strip,.home-footer-stack #footer-slider,.footer,.dice-footer,.dice-footer>.circular-set{height:var(--rist-hand-height)!important;min-height:var(--rist-hand-height)!important;max-height:var(--rist-hand-height)!important}
 .header-circular-set,.player-tools-rail,.player-hand-strip,.token-choice-strip,.dice-footer>.circular-set{align-items:center!important;padding-top:0!important;padding-bottom:0!important}
 .header-icon-button,.icon-select-control,.compact-hand-card,.token-choice-strip>button,.elemental-token-active,.die-button,.die-control,.sum,.history-scroll-button,.clear-dice,.rail-scroll-arrow{height:var(--rist-hand-height)!important;min-height:var(--rist-hand-height)!important;max-height:var(--rist-hand-height)!important;box-sizing:border-box!important}
 .header-icon-button,.icon-select-control,.asset-type-control,.compact-select,.unit-control{width:var(--rist-hand-height)!important;min-width:var(--rist-hand-height)!important;max-width:var(--rist-hand-height)!important}.header-icon,.header-card-back,.mmo-toggle-image{max-height:34px!important}.scale-stack{height:var(--rist-hand-height)!important;min-height:var(--rist-hand-height)!important;max-height:var(--rist-hand-height)!important}
 .player-tools-rail{padding:0 5px!important;gap:5px!important}.player-hand-strip,.token-choice-strip{gap:3px!important}.compact-hand-card,.token-choice-strip>button,.elemental-token-active{width:38px!important;min-width:38px!important;flex-basis:38px!important;padding:1px!important}.elemental-token-selector{height:var(--rist-hand-height)!important}.magic-coin-sprite{width:34px!important;height:34px!important}.player-tools-label{font-size:7px!important}
 .home-footer-stack{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;grid-template-rows:var(--rist-hand-height)!important;height:var(--rist-hand-height)!important;min-height:var(--rist-hand-height)!important;max-height:var(--rist-hand-height)!important;gap:0!important}
 .home-inline-chat{grid-column:1!important;grid-row:1!important;width:100%!important;height:var(--rist-hand-height)!important;min-height:var(--rist-hand-height)!important;max-height:var(--rist-hand-height)!important;padding:2px 6px!important;gap:5px!important;border-right:1px solid #6e592c!important}
 .home-footer-stack #footer-slider{grid-column:2!important;grid-row:1!important;width:100%!important;max-width:100%!important;margin:0!important;padding:0!important;border-left:1px solid #6e592c!important;overflow-x:auto!important;overflow-y:hidden!important}
 .home-chat-compose textarea,.home-chat-send,.chat-history-toggle{height:34px!important;min-height:34px!important;max-height:34px!important}.home-chat-compose textarea{padding:4px 8px!important;font-size:11px!important}.home-chat-send{padding-inline:10px!important}.die-button{width:50px!important;min-width:50px!important;padding:1px!important}.die-sprite{max-height:34px!important}.sum{padding-block:0!important}
 .world-context-strip{min-height:16px!important;height:16px!important;font-size:6px!important}.world-context-strip>*{padding-block:1px!important}.map-frame-pin-source{width:34px!important;min-width:34px!important;max-width:34px!important;height:34px!important;min-height:34px!important;max-height:34px!important}.map-frame-pin-source .map-pin-icon{width:29px!important;height:29px!important;min-width:29px!important;min-height:29px!important}.map-current-coordinates{right:31px;bottom:0;max-width:112px;font-size:6px}
}
.portrait-editor-modal{padding:8px!important;overflow:hidden!important}.portrait-editor{box-sizing:border-box!important;width:min(660px,calc(100dvw - 16px))!important;max-width:calc(100dvw - 16px)!important;max-height:calc(100dvh - 16px)!important;overflow:auto!important}.portrait-editor header{min-height:58px!important;box-sizing:border-box!important}.portrait-upload-area{box-sizing:border-box!important;width:100%!important;padding:18px 16px!important}.portrait-upload-area input[type="file"]{max-width:100%!important;min-width:0!important;overflow:hidden!important}.portrait-draw{width:100%!important;max-width:100%!important}.portrait-editor-controls{box-sizing:border-box!important;width:100%!important;padding:14px 16px!important;display:grid!important;justify-items:center!important}.portrait-editor-controls .portrait-crop{box-sizing:border-box!important;width:min(500px,100%)!important;max-width:100%!important;height:auto!important;aspect-ratio:1!important;margin-inline:auto!important}.portrait-adjustments{width:100%!important;max-width:500px!important}.portrait-editor footer{box-sizing:border-box!important;width:100%!important;flex-wrap:wrap!important}.reference-value-tile .tile-label,.reference-value-tile .tile-number,.profile-name,.entries-title,.equipment-title,.linked-title{display:flex!important;align-items:center!important;justify-content:center!important;line-height:1.05!important}.reference-value-tile .tile-label{padding-top:0!important;padding-bottom:0!important}

/* SOURCE: portrait-profile-geometry.css */
/* Portrait/profile geometry only. Home/map width is owned by home-viewport.css. */
.portrait-editor-modal{box-sizing:border-box!important;place-items:center!important;padding:max(8px,env(safe-area-inset-top,0px)) 10px max(8px,env(safe-area-inset-bottom,0px))!important;overflow:hidden!important}
.portrait-editor{box-sizing:border-box!important;width:min(420px,calc(100dvw - 20px))!important;max-width:calc(100dvw - 20px)!important;max-height:calc(100dvh - max(20px,env(safe-area-inset-top,0px) + env(safe-area-inset-bottom,0px)))!important;display:flex!important;flex-direction:column!important;overflow:hidden!important}
.portrait-editor>header{box-sizing:border-box!important;flex:0 0 auto!important;min-height:58px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;padding:12px 14px!important}
.portrait-editor>header strong{min-width:0!important;line-height:1.1!important}
.portrait-editor>header button{box-sizing:border-box!important;flex:0 0 36px!important;width:36px!important;min-width:36px!important;max-width:36px!important;height:36px!important;min-height:36px!important;margin:0!important;padding:0!important;display:grid!important;place-items:center!important;border:1.5px solid #b68e44!important;border-radius:50%!important;background:#fff8ea!important;color:#5b4932!important;font:700 22px/1 system-ui!important;overflow:hidden!important}
.portrait-upload-area{box-sizing:border-box!important;flex:0 0 auto!important;min-width:0!important;width:100%!important;padding:8px 16px 4px!important;gap:8px!important;overflow:hidden!important}
.portrait-icon-actions{display:flex!important;align-items:center!important;justify-content:center!important;gap:12px!important}
.portrait-icon-actions input[type="file"]{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important}
.portrait-attachment-icon,.portrait-paint-icon{box-sizing:border-box!important;width:44px!important;min-width:44px!important;max-width:44px!important;height:44px!important;min-height:44px!important;padding:0!important;margin:0!important;display:grid!important;place-items:center!important;border:1.5px solid #b68e44!important;border-radius:50%!important;background:#17242e!important;color:#ffe5a6!important;font:700 21px/1 system-ui!important;cursor:pointer!important}
.portrait-attachment-icon span,.portrait-paint-icon span{display:block!important;line-height:1!important}
.portrait-draw{width:44px!important;max-width:44px!important}
.portrait-editor-controls{box-sizing:border-box!important;flex:1 1 auto!important;min-height:0!important;width:100%!important;padding:0 16px 10px!important;overflow-x:hidden!important;overflow-y:auto!important;overscroll-behavior:contain!important;-webkit-overflow-scrolling:touch!important}
.portrait-editor-controls .portrait-crop{box-sizing:border-box!important;width:min(58dvw,220px,29dvh)!important;max-width:100%!important;height:auto!important;aspect-ratio:1!important;margin:-4px auto 0!important}
.portrait-adjustments{width:100%!important;min-width:0!important;gap:7px!important;margin-top:4px!important}
.portrait-adjustments label{min-width:0!important;display:grid!important;grid-template-columns:82px minmax(0,1fr)!important;align-items:center!important;gap:8px!important;font-size:12px!important}
.portrait-adjustments input[type="range"]{width:100%!important;min-width:0!important}
.portrait-editor>footer{box-sizing:border-box!important;flex:0 0 auto!important;width:100%!important;min-width:0!important;display:flex!important;justify-content:flex-end!important;align-items:center!important;gap:7px!important;padding:9px 14px 12px!important;overflow:hidden!important}
.portrait-editor>footer button{box-sizing:border-box!important;flex:0 0 auto!important;width:auto!important;min-width:82px!important;max-width:46%!important;margin:0!important;line-height:1!important}
.profile-name,.profile-concept,.reference-value-tile input{box-sizing:border-box!important;padding-top:0!important;padding-bottom:0!important;line-height:normal!important}
.profile-concept{display:block!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.reference-value-tile{position:relative!important;display:block!important;overflow:visible!important}
.reference-value-tile .tile-label{position:absolute!important;left:7%!important;top:4%!important;width:86%!important;height:23%!important;margin:0!important;padding-inline:5%!important;text-overflow:ellipsis!important}
.reference-value-tile .tile-number{position:absolute!important;left:28.5%!important;top:31%!important;width:43%!important;height:43%!important;aspect-ratio:auto!important;margin:0!important;text-align:center!important}
.reference-value-tile .tile-circle-row{position:absolute!important;left:16%!important;right:16%!important;bottom:4.5%!important;height:17%!important;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;align-items:center!important;gap:9%!important}
.reference-value-tile .tile-circle-text{box-sizing:border-box!important;width:100%!important;height:100%!important;min-width:0!important;margin:0!important;padding:0!important;border:0!important;border-radius:50%!important;background:transparent!important;box-shadow:none!important;outline:0!important;color:var(--character-font)!important;text-align:center!important;font:700 clamp(6px,1.7vw,11px)/normal Georgia,serif!important;overflow:hidden!important}
.reference-value-tile input::placeholder{color:#7b6a52!important;opacity:.55!important}


/* SOURCE: recursion-cockpit.css */
/* Recursive Shaelvien cockpit frame. Layer selection is zoom-driven; no separate viewpoint UI. */
.rist{position:relative;isolation:isolate}
.rist::before,.rist::after{content:"";position:absolute;z-index:2;pointer-events:none;inset:2px;border:1px solid #6f5d34aa;clip-path:polygon(3% 0,97% 0,100% 6%,100% 94%,97% 100%,3% 100%,0 94%,0 6%)}
.rist::after{inset:8px;border-color:#3d6a6e66;clip-path:polygon(5% 0,95% 0,100% 8%,100% 92%,95% 100%,5% 100%,0 92%,0 8%)}
.topbar,.public-card-drop,.hand-rail,.footer,.home-inline-chat{position:relative}
.topbar::after,.hand-rail::after,.footer::after{content:"";position:absolute;pointer-events:none;inset:2px;border:1px solid #79969a33;clip-path:polygon(10px 0,calc(100% - 10px) 0,100% 50%,calc(100% - 10px) 100%,10px 100%,0 50%)}
.map-shell{position:relative;perspective:1100px}
.map-shell::after{content:"";position:absolute;z-index:24;pointer-events:none;inset:2px;border:1px solid #b79a5459;clip-path:polygon(18px 0,calc(100% - 18px) 0,100% 18px,100% calc(100% - 18px),calc(100% - 18px) 100%,18px 100%,0 calc(100% - 18px),0 18px);box-shadow:inset 0 0 24px #07111866}
.recursion-cockpit{display:none!important}
.world-stage{transform-style:preserve-3d!important;transform-origin:50% 50%!important;will-change:transform}
.world-stage>.base,.world-stage>.grid,.world-stage>.tile-cell,.world-stage>.piece,.world-stage>.map-zone-label{transform-style:preserve-3d}
.tile-cell[data-native-layer]{opacity:var(--rist-layer-opacity,1);transition:opacity .18s ease,filter .18s ease;filter:saturate(calc(.72 + var(--rist-layer-opacity,1)*.28)) brightness(calc(.82 + var(--rist-layer-opacity,1)*.18));box-shadow:0 calc((1 - var(--rist-layer-opacity,1))*4px) calc((1 - var(--rist-layer-opacity,1))*10px) #0005}
.tile-cell[data-native-layer="WORLD"]{z-index:3}.tile-cell[data-native-layer="REGION"]{z-index:5}.tile-cell[data-native-layer="LOCAL"]{z-index:7}.tile-cell[data-native-layer="SITE"]{z-index:9}.tile-cell[data-native-layer="ROOM"]{z-index:11}.tile-cell[data-native-layer="ENCOUNTER"]{z-index:13}.tile-cell[data-native-layer="OBJECT"]{z-index:15}.tile-cell[data-native-layer="CONTAINER"]{z-index:17}.tile-cell[data-native-layer="CONTENTS"]{z-index:19}.tile-cell[data-native-layer="WEATHER"]{z-index:21;pointer-events:none}
.piece[data-native-layer]{opacity:var(--rist-layer-opacity,1);transition:opacity .18s ease,filter .18s ease;filter:drop-shadow(0 3px 4px #0008)}
[data-recursion-ahead]{opacity:.08!important;pointer-events:none!important}
[data-recursion-deep]{filter:saturate(.55) brightness(.72)!important}
[data-recursion-hidden]{display:none!important}
.tile-cell[data-weather-blocker="true"]{z-index:22!important}
.map[data-recursion-layer="REGION"] .base{opacity:.52}.map[data-recursion-layer="LOCAL"] .base{opacity:.30}.map[data-recursion-layer="SITE"] .base,.map[data-recursion-layer="ROOM"] .base,.map[data-recursion-layer="ENCOUNTER"] .base,.map[data-recursion-layer="OBJECT"] .base,.map[data-recursion-layer="CONTAINER"] .base,.map[data-recursion-layer="CONTENTS"] .base,.map[data-recursion-layer="WEATHER"] .base{opacity:.16}
.map[data-recursion-layer="REGION"] .grid{opacity:.88}.map[data-recursion-layer="LOCAL"] .grid{opacity:.94}
@media(orientation:landscape){.map-shell{perspective:1400px}}


/* SOURCE: start-menu.css */
/* Shaelvien start/settings overlay. Transparent shade preserves tabletop context while pausing animated play. */
body.rist-start-open{overflow:hidden}
body.rist-start-open .rist .piece,body.rist-start-open .rist .tile-cell,body.rist-start-open .rist .world-stage *{animation-play-state:paused!important}
.rist-start-overlay{position:fixed;z-index:2147482500;inset:0;display:grid;place-items:center;padding:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));background:#02070bb8;backdrop-filter:blur(3px) brightness(.55)}
.rist-start-overlay[hidden]{display:none!important}.rist-start-panel{box-sizing:border-box;width:min(720px,96vw);max-height:92dvh;overflow:auto;padding:14px;border:1px solid #9b7d3d;border-radius:14px;background:#071118dc;box-shadow:0 20px 70px #000b;color:#eee6d3}
.rist-start-title{margin:0 0 12px;color:#e2c77f;text-align:center;font:800 18px/1.1 system-ui;letter-spacing:.12em}.rist-start-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.rist-start-button,.rist-start-back,.rist-start-exit{min-height:48px;border:1px solid #725d30;border-radius:9px;background:#151e26;color:#f0e4c5;font:700 13px/1.1 system-ui}.rist-start-button:active,.rist-start-back:active,.rist-start-exit:active{transform:translateY(1px)}.rist-start-exit{width:100%;margin-top:12px;color:#f0c9c9;border-color:#8d4949}.rist-start-sub{display:grid;gap:10px}.rist-start-sub h2{margin:0;color:#d9bd78;font-size:16px}.rist-setting-row{display:grid;grid-template-columns:minmax(90px,.7fr) minmax(0,1fr);align-items:center;gap:8px;padding:7px;border:1px solid #5f512f;border-radius:8px;background:#0d171dcc}.rist-setting-row input[type=range],.rist-setting-row select{width:100%;min-width:0}.rist-setting-row button{min-height:36px}.rist-account-profile{display:grid;grid-template-columns:72px 1fr;gap:10px;align-items:center}.rist-account-avatar{width:68px;height:68px;border-radius:50%;border:1px solid #8c743d;background:#111c24;object-fit:cover}.rist-start-note{font-size:11px;color:#b9b09b}.rist-start-settings-button{position:fixed;z-index:2147482000;right:calc(7px + env(safe-area-inset-right));top:calc(7px + env(safe-area-inset-top));width:36px;height:36px;border:1px solid #8d743b;border-radius:50%;background:#0a151dcc;color:#e5ce8e;font-size:20px;line-height:1;box-shadow:0 2px 8px #0008}
@media(max-width:520px){.rist-start-panel{width:96vw;padding:10px}.rist-start-grid{grid-template-columns:1fr}.rist-start-button{min-height:42px}.rist-setting-row{grid-template-columns:90px 1fr}.rist-start-settings-button{width:32px;height:32px;font-size:18px}}

/* Classic Shaelvien landing/title screen. This is canonical runtime CSS: it is
   compiled into wwwroot/css/rist.css by prepare_css.py. Device tilt only alters
   presentation variables; it never changes world truth or coordinates. */
.rist-game-start[hidden]{display:none!important}
.rist-game-start{position:fixed!important;inset:0!important;z-index:2147483647!important;display:flex;align-items:flex-end;justify-content:center;box-sizing:border-box;overflow:hidden;padding:0 20px max(9vh,42px);isolation:isolate;background:#03050a;color:#f7e8b7;font-family:ui-monospace,"SFMono-Regular",Menlo,Consolas,"Liberation Mono",monospace;--rist-landing-tilt-x:0px;--rist-landing-tilt-y:0px}
.rist-game-start-art{position:absolute;inset:-4%;width:108%;height:108%;object-fit:cover;object-position:center;z-index:-3;transform:translate3d(var(--rist-landing-tilt-x),var(--rist-landing-tilt-y),0) scale(1.04);transform-origin:center;will-change:transform}
.rist-game-start-shade{position:absolute;inset:0;z-index:-2;background:linear-gradient(180deg,transparent 0 50%,rgba(1,3,8,.06) 66%,rgba(1,3,8,.48) 100%);pointer-events:none}
.rist-game-start-panel{box-sizing:border-box;width:min(420px,88vw);min-height:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none;text-shadow:0 3px 7px #000,0 0 12px rgba(0,0,0,.95)}
.rist-start-menu,.rist-start-card{display:grid;gap:5px}
.rist-start-card h1{margin:0 0 9px;color:#ffe4a0;font-size:22px;line-height:1.1;letter-spacing:.08em;text-align:left;text-transform:uppercase}
.rist-game-start button{box-sizing:border-box;width:100%;min-height:38px;padding:5px 8px;border:0;border-radius:0;background:transparent!important;box-shadow:none!important;color:#e6e8ef;font:800 20px/1.1 ui-monospace,"SFMono-Regular",Menlo,Consolas,monospace;letter-spacing:.025em;text-align:left;cursor:pointer;touch-action:manipulation;text-shadow:0 3px 7px #000,0 0 10px #000}
.rist-game-start button:hover{color:#fff2b7}.rist-game-start button:active{color:#fff8dc;transform:scale(.985)}.rist-game-start button:focus{outline:none}.rist-game-start button:focus-visible{color:#fff2b7;outline:2px dashed rgba(255,241,183,.9);outline-offset:2px}
.rist-game-start button:focus-visible::before{content:"▶";display:inline-block;width:1.45em;color:#fff2b7;font-size:.72em}
.rist-start-anykey,.rist-start-welcome{border:0!important;background:transparent!important;box-shadow:none!important;text-align:center!important;text-shadow:0 3px 8px #000,0 0 12px #000!important}.rist-start-anykey{font-size:20px!important;animation:rist-start-pulse 1.45s steps(2,end) infinite}.rist-start-welcome{display:grid!important;gap:10px!important}.rist-start-welcome strong{font-size:28px}.rist-start-welcome span{font-size:16px;font-weight:700}
.rist-start-card label{display:grid;gap:4px;color:#ffe4a0;font-size:13px;font-weight:900;letter-spacing:.08em;text-transform:uppercase}.rist-start-card input[type="text"],.rist-start-card input:not([type]){box-sizing:border-box;width:100%;min-height:40px;padding:6px 2px;border:0;border-bottom:1px solid rgba(255,228,160,.72);border-radius:0;background:transparent;color:#fff6d7;font:800 18px/1 ui-monospace,"SFMono-Regular",Menlo,Consolas,monospace;text-shadow:0 2px 5px #000}.rist-start-card input:focus-visible{outline:2px dashed rgba(255,241,183,.9);outline-offset:2px}.rist-start-agreement{grid-template-columns:auto 1fr!important;align-items:center!important;margin:5px 0;text-transform:none!important;letter-spacing:0!important}.rist-start-agreement input{width:22px;height:22px;accent-color:#d6b35c}
.rist-start-card fieldset{display:grid;grid-template-columns:1fr;gap:1px;margin:4px 0;padding:0;border:0}.rist-start-card legend{margin:5px 0 1px;color:#ffe4a0;font-size:12px;font-weight:900;letter-spacing:.12em;text-transform:uppercase}.rist-start-card fieldset label{position:relative;display:block!important}.rist-start-card fieldset input{position:absolute;width:1px;height:1px;opacity:0}.rist-start-card fieldset span{display:block;min-height:34px;padding:6px 8px;border:0;border-radius:0;background:transparent;color:#dfe1e9;font-size:18px;text-transform:none;letter-spacing:0;cursor:pointer}.rist-start-card fieldset input:checked+span{color:#fff2b7;text-shadow:0 0 8px rgba(255,226,140,.65),0 3px 7px #000}.rist-start-card fieldset input:focus-visible+span{outline:2px dashed rgba(255,241,183,.9);outline-offset:1px}.rist-start-card fieldset input:focus-visible+span::before{content:"▶";display:inline-block;width:1.45em;font-size:.72em}
.rist-start-voice-row{display:grid;grid-template-columns:minmax(0,1fr) 42px;gap:8px;align-items:end}.rist-start-voice{display:grid!important;gap:4px!important}.rist-start-voice select{box-sizing:border-box;width:100%;min-width:0;height:40px;padding:5px 30px 5px 8px;border:1px solid rgba(255,228,160,.68);border-radius:6px;background:#071015e8;color:#fff2c2;font:800 14px/1 ui-monospace,"SFMono-Regular",Menlo,Consolas,monospace}.rist-start-voice select:focus-visible{outline:2px dashed rgba(255,241,183,.9);outline-offset:2px}.rist-game-start .rist-start-voice-demo{width:42px!important;min-width:42px!important;height:40px!important;min-height:40px!important;padding:0!important;display:grid!important;place-items:center!important;border:1px solid rgba(255,228,160,.68)!important;border-radius:6px!important;background:#071015e8!important;text-align:center!important;font-size:18px!important;color:#fff2b7!important}.rist-game-start .rist-start-voice-demo:focus-visible::before{content:none!important}.rist-game-start .rist-start-voice-demo:active{transform:scale(.96)}
.rist-start-back{font-size:16px!important;opacity:.82}body.rist-game-start-open{overflow:hidden!important}body.rist-game-start-open> :not(.rist-game-start){visibility:hidden!important}body.rist-game-start-open>.rist-game-start{visibility:visible!important}
@keyframes rist-start-pulse{50%{opacity:.48}}
@media(hover:none) and (pointer:coarse){.rist-game-start button:hover{color:#e6e8ef}.rist-game-start button:focus:not(:focus-visible){color:#e6e8ef}.rist-game-start button:focus:not(:focus-visible)::before{content:none!important}}
@media(max-width:620px){.rist-game-start{padding:0 24px max(8vh,38px)}.rist-game-start-panel{width:min(360px,86vw)}.rist-game-start button{min-height:40px;font-size:19px}.rist-start-card h1{font-size:20px}.rist-start-anykey{font-size:18px!important}.rist-start-welcome strong{font-size:25px}}
@media(max-height:700px) and (orientation:landscape){.rist-game-start{justify-content:flex-end;padding:0 5vw 7vh}.rist-game-start-panel{width:min(360px,42vw)}.rist-start-menu,.rist-start-card{gap:2px}.rist-game-start button{min-height:32px;font-size:16px}}
/* The normal pulsing prompt respects Reduce Motion. Parallax itself is an
   explicit user opt-in and therefore remains reactive when Parallax is On. */
@media(prefers-reduced-motion:reduce){.rist-start-anykey{animation:none}}


/* SOURCE: mmo-mode.css */
.header-mmo-button{background:#050708!important;color:#d7d7d7!important;border-color:#3b4145!important;font:800 8px/1 system-ui!important;letter-spacing:.04em!important}
.header-mmo-button.active{background:#0b5d2a!important;color:#dfffe9!important;border-color:#35b96a!important;box-shadow:inset 0 0 12px #123,0 0 7px #24a85e66!important}
.rist-mmo-shaelvien:not(.rist-mmo-owned-zone) .tile-browser,.rist-mmo-shaelvien:not(.rist-mmo-owned-zone) .pallet .tray-item,.rist-mmo-shaelvien:not(.rist-mmo-owned-zone) .zone-editor{filter:grayscale(.75) brightness(.55);pointer-events:none!important}
.rist-mmo-shaelvien:not(.rist-mmo-owned-zone) .tile-cell,.rist-mmo-shaelvien:not(.rist-mmo-owned-zone) .piece:not(.pin){pointer-events:none!important}
.mmo-build-overlay{position:fixed;z-index:2147482600;inset:0;display:grid;place-items:center;padding:12px;background:#02070bbc;backdrop-filter:blur(3px)}
.mmo-build-overlay[hidden]{display:none!important}
.mmo-build-panel{box-sizing:border-box;width:min(520px,94vw);padding:18px;border:1px solid #88703c;border-radius:14px;background:#071118ee;color:#eee6d3;box-shadow:0 18px 70px #000c;text-align:center}
.mmo-build-panel h2{margin:0 0 16px;color:#dfc77f;font:800 18px/1.1 system-ui}
.mmo-build-panel p{font:500 12px/1.45 system-ui;color:#d7d0c0}
.mmo-choice-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.mmo-choice-row button,.mmo-build-panel>button{min-height:44px;border:1px solid #715d31;border-radius:8px;background:#151e26;color:#f0e5c7;font-weight:800}
.mmo-close{width:100%;margin-top:12px;color:#f0caca!important;border-color:#815050!important}
@media(max-width:520px){.mmo-choice-row{grid-template-columns:1fr}}


/* SOURCE: prelogin-visitor.css */
/* Logged-out visitor mode: guests may build/export a limited local world. */
.rist.auth-visitor .topbar .finite-set>*{pointer-events:auto!important;filter:none!important;opacity:1!important}
.rist.auth-visitor .topbar .header-mmo-button,
.rist.auth-visitor .topbar .header-settings-button{pointer-events:none!important;filter:saturate(.55)!important;opacity:.45!important}

/* Public visitors see Shaelvien's ocean presentation. This is visual-only and
   never materializes terrain into saved world state until the guest places it. */
.rist.auth-visitor .map .base{
 background-color:#1f6f92!important;
 background-image:radial-gradient(ellipse at 28% 20%,#72bad044 0 4%,transparent 24%),radial-gradient(ellipse at 72% 68%,#083d5a55 0 5%,transparent 30%),repeating-linear-gradient(168deg,#3c93af 0 2px,#287d9d 3px 8px,#327f9b 9px 12px)!important;
 box-shadow:inset 0 0 80px #031f35aa!important;
}

.rist.auth-visitor .rail-scroll-arrow{pointer-events:auto!important;opacity:1!important;filter:none!important}
.rist.auth-visitor .map{pointer-events:auto!important}
.rist.auth-visitor .desktop-map-zoom,
.rist.auth-visitor .desktop-map-zoom button{pointer-events:auto!important;opacity:1!important;filter:none!important}

/* Local terrain/piece editing, asset browsing, recursion controls, save/export,
   grid and tabletop tools are deliberately usable before login. Server-backed
   operations remain gated in component code by Session.IsLoggedIn. */
.rist.auth-visitor .tile-browser,
.rist.auth-visitor .staging-tray,
.rist.auth-visitor .pallet,
.rist.auth-visitor .recursion-cockpit,
.rist.auth-visitor .recursion-cockpit button,
.rist.auth-visitor .recursion-cockpit input,
.rist.auth-visitor .recursion-cockpit select,
.rist.auth-visitor .map .tile-cell,
.rist.auth-visitor .map .piece,
.rist.auth-visitor .map .placed-pin,
.rist.auth-visitor .locked-tile-menu,
.rist.auth-visitor .recursive-region-actions{pointer-events:auto!important;filter:none!important;opacity:1!important}

/* Account/private-character/social actions remain authenticated features. */
.rist.auth-visitor .hand-rail button:not(.rail-scroll-arrow),
.rist.auth-visitor .public-card-rail button:not(.rail-scroll-arrow),
.rist.auth-visitor .dice-footer button:not(.rail-scroll-arrow),
.rist.auth-visitor .dice-footer input,
.rist.auth-visitor .dice-footer select,
.rist.auth-visitor .chat-composer,
.rist.auth-visitor .chat-composer *,
.rist.auth-visitor .character-mixer,
.rist.auth-visitor .mmo-zone-actions,
.rist.auth-visitor .region-player-picker{pointer-events:none!important;filter:saturate(.55);opacity:.56}

.rist.auth-visitor .map-context-sidebar .map-context-item{pointer-events:auto!important;filter:none!important;opacity:1!important}
.rist.auth-visitor .map-context-sidebar .map-context-toggle{pointer-events:auto!important;opacity:1!important;filter:none!important}
.rist.auth-visitor .door-button{box-shadow:0 0 0 1px #c2a56566 inset,0 0 8px #c2a56533}


/* SOURCE: rist-tutorial.css */
.rist-tutorial-shell{position:fixed;inset:0;z-index:2147481000;display:grid;place-items:center;padding:calc(18px + env(safe-area-inset-top,0px)) 18px calc(18px + env(safe-area-inset-bottom,0px));overflow:hidden;background:#071118;color:#f5e6b3}.rist-tutorial-tabletop{position:absolute;inset:0;background:radial-gradient(ellipse at center,rgba(45,63,67,.34),rgba(5,12,16,.94) 72%),repeating-linear-gradient(30deg,rgba(190,153,72,.045) 0 1px,transparent 1px 34px),repeating-linear-gradient(150deg,rgba(190,153,72,.035) 0 1px,transparent 1px 34px);pointer-events:none}.rist-tutorial-card{position:relative;width:min(92vw,560px);display:flex;flex-direction:column;gap:26px;padding:28px 22px;border:1px solid rgba(190,153,72,.72);border-radius:24px;background:rgba(8,18,24,.88);box-shadow:0 22px 70px #000,0 0 0 1px rgba(255,220,132,.08) inset;text-align:center}.rist-tutorial-intro{min-height:118px;display:grid;align-content:center;gap:8px}.rist-tutorial-prefix{font:500 clamp(18px,4.8vw,26px)/1.2 Georgia,serif;color:#d7c08a}.rist-tutorial-wordcycle{position:relative;height:48px;overflow:hidden}.rist-tutorial-wordcycle span{position:absolute;inset:0;display:grid;place-items:center;opacity:0;font:700 clamp(27px,7vw,42px)/1 Georgia,serif;letter-spacing:.035em;color:#fff2c8;text-shadow:0 0 18px rgba(126,206,255,.18);animation:ristTutorialWord 12s infinite;animation-delay:calc(var(--i) * 2s)}@keyframes ristTutorialWord{0%{opacity:0;transform:translateY(7px)}8%,13%{opacity:1;transform:translateY(0)}16.66%,100%{opacity:0;transform:translateY(-7px)}}.rist-tutorial-options{display:grid;gap:10px}.rist-tutorial-options button{min-height:50px;border:1px solid #9c7933;border-radius:15px;background:#12202a;color:#f7e7ae;font:700 16px/1.15 system-ui,-apple-system,sans-serif;letter-spacing:.02em;box-shadow:inset 0 0 0 1px rgba(255,231,166,.04);touch-action:manipulation}.rist-tutorial-options button:active{transform:translateY(1px);background:#1a2b36}.rist-tutorial-options .skip{margin-top:5px;background:transparent;color:#bba97f;border-color:rgba(156,121,51,.55);font-weight:600}@media (orientation:landscape) and (max-height:600px){.rist-tutorial-card{width:min(86vw,720px);padding:18px 22px;gap:14px}.rist-tutorial-intro{min-height:76px}.rist-tutorial-options{grid-template-columns:1fr 1fr}.rist-tutorial-options .skip{grid-column:1/-1}.rist-tutorial-wordcycle{height:38px}}


/* SOURCE: discord-login.css */
.login-door-first{order:-100}.door-button.login-pulse{animation:rist-login-pulse 2.6s ease-in-out infinite;will-change:box-shadow,filter;box-shadow:0 0 0 1px rgba(88,101,242,.45),0 0 10px rgba(88,101,242,.55),0 0 22px rgba(88,101,242,.28)!important;filter:drop-shadow(0 0 4px rgba(88,101,242,.55))}@keyframes rist-login-pulse{0%,100%{box-shadow:0 0 0 1px rgba(88,101,242,.35),0 0 7px rgba(88,101,242,.45),0 0 15px rgba(88,101,242,.2);filter:drop-shadow(0 0 3px rgba(88,101,242,.4))}50%{box-shadow:0 0 0 2px rgba(123,137,255,.9),0 0 15px rgba(88,101,242,.95),0 0 34px rgba(88,101,242,.58);filter:drop-shadow(0 0 8px rgba(123,137,255,.92))}}@media(prefers-reduced-motion:reduce){.door-button.login-pulse{animation:none;box-shadow:0 0 0 1px rgba(88,101,242,.65),0 0 12px rgba(88,101,242,.7),0 0 24px rgba(88,101,242,.35)!important;filter:drop-shadow(0 0 5px rgba(88,101,242,.65))}}.discord-login-overlay{position:fixed;inset:0;z-index:2147482500;display:grid;place-items:center;padding:20px;background:rgba(3,8,12,.76);backdrop-filter:blur(5px)}.discord-login-card{position:relative;width:min(92vw,430px);padding:30px 24px 24px;border:1px solid #a8873e;border-radius:24px;background:#101820;color:#f4e8c7;text-align:center;box-shadow:0 24px 70px rgba(0,0,0,.58)}.discord-login-close{position:absolute;right:14px;top:12px;width:42px;height:42px;border:1px solid #8b723a;border-radius:50%;background:#17222b;color:#ead59b;font-size:29px;line-height:1}.discord-brand-mark{width:82px;height:82px;margin:4px auto 16px;display:grid;place-items:center;border-radius:24px;background:#5865f2;box-shadow:0 0 0 1px rgba(255,255,255,.12),0 10px 28px rgba(88,101,242,.28)}.discord-brand-mark svg{width:56px;height:46px;fill:#fff}.discord-login-card h2{margin:0 0 12px;font-size:clamp(22px,6vw,30px);color:#fff}.discord-login-card p{margin:0 auto 22px;max-width:340px;line-height:1.45;color:#d4d8df}.discord-login-primary,.discord-login-cancel{width:100%;min-height:52px;border-radius:14px;font:700 16px/1 system-ui,-apple-system,sans-serif}.discord-login-primary{border:0;background:#5865f2;color:#fff}.discord-login-cancel{margin-top:10px;border:1px solid #806c40;background:#17222b;color:#e8d8ae}.discord-login-primary:active,.discord-login-cancel:active{transform:translateY(1px)}

/* SOURCE: mobile-history-fixes.css */
/* Mobile interaction pass: preserve tuned dice geometry while fixing reachability. */
.header-mmo-button{padding:3px!important;overflow:hidden!important}
.header-mmo-button .mmo-toggle-art{display:block;width:100%;height:100%;background:url('../assets/ui/sandbox-toggle.webp') center/contain no-repeat}
.header-mmo-button.active .mmo-toggle-art{background-image:url('../assets/ui/mmo-toggle.webp')}
.header-settings-button>span{display:grid!important;place-items:center!important;width:100%!important;height:100%!important;color:#e3bd55!important;font-size:34px!important;line-height:1!important;text-shadow:0 0 9px #d5a42f88!important}

/* The footer frame stays fixed. The inner dice strip owns horizontal movement,
   which lets the final history/clear/card controls travel fully clear of the arrows. */
.dice-footer{overflow:hidden!important}
.dice-footer .dice-circular-set{box-sizing:border-box!important;flex:1 1 auto!important;width:100%!important;min-width:0!important;max-width:none!important;overflow-x:auto!important;overflow-y:hidden!important;-webkit-overflow-scrolling:touch!important;scrollbar-width:none!important;touch-action:pan-x!important;scroll-padding-inline:10px 74px!important;padding-left:10px!important;padding-right:74px!important}
.dice-footer .dice-circular-set::-webkit-scrollbar{display:none!important}

.history-scroll-button{box-sizing:border-box;display:grid;place-items:center;flex:0 0 42px;width:42px;min-width:42px;height:var(--footer-slot-h,58px);padding:0;border:1px solid #8d6a28;border-radius:10px;background:#111a21;color:#e2c36f;font-size:22px;line-height:1}
.roll-history-toggle{height:var(--footer-slot-h,58px)!important}

/* Chat remains one fixed row. 16px prevents Safari/Chrome on iPhone from
   zooming the viewport when the composer receives focus. */
.home-inline-chat{position:relative!important;display:grid!important;grid-template-columns:42px minmax(0,1fr) 72px!important;gap:6px!important;height:58px!important;min-height:58px!important;max-height:58px!important;padding:5px 7px!important;overflow:hidden!important;align-items:stretch!important}
.home-inline-chat .chat-history-toggle{width:42px!important;min-width:42px!important;height:46px!important;align-self:center!important}
.home-chat-compose{display:block!important;min-width:0!important;width:100%!important;height:46px!important;margin:0!important}
.home-chat-compose>span{display:none!important}
.home-chat-compose textarea{box-sizing:border-box!important;width:100%!important;min-width:0!important;height:46px!important;min-height:46px!important;max-height:46px!important;margin:0!important;padding:8px 10px!important;resize:none!important;font-size:16px!important;line-height:1.2!important}
.home-chat-send{box-sizing:border-box!important;width:72px!important;min-width:72px!important;height:46px!important;align-self:center!important;padding:0 8px!important}

/* History is a separate parchment scroll, never an expanding home-screen row. */
.history-scroll-scrim{position:fixed;z-index:2147482500;inset:0;display:grid;place-items:center;padding:18px;background:#02070bd9;backdrop-filter:blur(5px)}
.history-scroll-sheet{box-sizing:border-box;width:min(540px,94vw);height:min(70dvh,640px);display:grid;grid-template-rows:52px minmax(0,1fr);overflow:hidden;border:2px solid #a77d2f;border-radius:18px;background:linear-gradient(#f7edcf,#e8d4a6);color:#4c3821;box-shadow:0 22px 60px #000d}
.history-scroll-sheet>header{display:grid;grid-template-columns:minmax(0,1fr) 42px;align-items:center;padding:6px 8px 6px 18px;border-bottom:1px solid #a77d2f;background:#f2e2ba}
.history-scroll-sheet>header strong{font:700 18px/1.1 Georgia,serif;text-align:center}
.history-scroll-sheet>header button{width:38px;height:38px;border:1px solid #a77d2f;border-radius:50%;background:#fff7df;color:#5a4023;font-size:24px}
.history-scroll-body{min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:12px 15px 28px;overscroll-behavior:contain}
.chat-history-entry,.roll-history-entry{padding:10px 3px;border-bottom:1px solid #9d7e4659}
.chat-history-entry strong,.roll-history-entry strong{display:block;color:#5a4023;font:700 14px/1.2 Georgia,serif}
.chat-history-entry p,.roll-history-entry p{margin:5px 0 0;white-space:pre-wrap;font:500 14px/1.35 system-ui}
.roll-history-entry small{display:block;margin-top:3px;color:#735d38;font:600 11px/1.25 system-ui}
.roll-history-entry p{font-family:ui-monospace,SFMono-Regular,Menlo,monospace}
.history-empty{text-align:center;color:#7c6844;margin-top:35px}

@media(max-width:430px){
 .home-inline-chat{grid-template-columns:40px minmax(0,1fr) 66px!important;padding-inline:5px!important;gap:4px!important}
 .home-inline-chat .chat-history-toggle{width:40px!important;min-width:40px!important}
 .home-chat-send{width:66px!important;min-width:66px!important}
}


/* SOURCE: calforth-token-lite.css */
.calforth-token-button{position:relative!important;overflow:hidden!important;padding:0!important;border:1px solid #8d6a28!important;background:#111820!important}
.calforth-token-face{display:block;width:100%;height:100%;background:center 35%/cover no-repeat url(data:image/webp;base64,UklGRuIMAABXRUJQVlA4INYMAABwLACdASpgAGAAPn0okEgkoiGhOr98AJAPiWwAvgMqwifEeZFyr2Q+2XozrN9T/F+pTbUeYXzdfRT/dfUA/YrrPvQO6VH+5/+awrfwngT+MfNv6D+scFTpbzF+rKK3kO8K9Qj2R5i30fZSbH/pvQC71+BDqQeFPYA8u++LoBeK7n/euPYLZUcypPwoxAyPpAvGUE8RJ/O7DI7ljThSj/KXGXt31kBo/YNb0qtkGuJlqvc2rhNHUQM6cFwoWyRC47o6vhlXC6zR6d0T1rmOVBSO4Z4jRRwJrHmfda3lhYfb+onCsPmQwZMJyRuH6ZhYwJzvvh8UlScCUFT1EccVBGXThH06/rIroMEvoQx4A+1sPXUhODm9qFlatEB/aEcBWlGhSvnpQwcjNM6ixSxMSH3iZ/ewm7zvqja94wTH/+N6E+pNs6dAwWOrDfM3GFVc4ItN6rKmPeBx76o5fHnbJglm90LCE6oPNNF1NEboAP7/XQEf4eYWHg5/F3NYMKWbRI3aZA9Vm5LQrntp0CMqmZE0u4SmEC4xiZpy1Zkl/7PDMJFe/VC0VqlKDmCVik2A7+fmz5w33W0QFkNd9h7huqXJD8AQPdHTLy2QOxn8USc04oKK5WmM6r6WV1et/oMaiJ5Ek+Agn7LW8OWfkyrULSFpjIojtCd9nw9FCUkr5xmHKZWwuA4tuMvYXBhppt8uEhtCSTgOIsNPsi9Z5fow0XJiFbJN+bCdHmdx0v44GFHDTrGUCMC3Dtkpk7Pj5QmCMjLslMtC+Sm/bto3QUs5lPIvYp9PjiCwgrWhKMeVI7F6gUbFXgUNDXjPEx3JKfNvYr8pQuBm013cv/AXsDq8byANRcEfbit0B6LejSSusVzxdA7KtOnEu+o6tDC2rHAFwTiggCZLr76fPz2j2FWAubWmG31q0VD/+dZjvm12dJZkO+wU8clHG9f6sYAjkUeFbpBHfur6SKhBbPYBKggT87JFCj0+eRZk/n+BszkUQ+By+sRG6KBSbXRM4bE3F8w+wqmb/f8L44OnAzSPkCCqQnbGIFESG7ld5/fTSeo/CsCQbSku4eUmw6fj7/K9pKCdTdfi53R4Vj+FUv8JXU4Ge5BUxpTR75CDNeEKfu2IB+VpXgdu4bipvVuRWjL7yIURwepr9MYZ9olEzxumMx8TVWY7AKcT4yumPyxP6Q+r9deURewob/e+wKLoTFOSXPl3GfHSt/Nam5lbxDd9LFVfwxBO+LTQbA5L21BXBnbx2vZgNqIx/7bFhwgpi7y0AeFkLO/tT/Y9nPCVqt/RJj5+REifgWCLG/LmHtn0TGiSIm0dmIkSLE+WPGK1/laTdVyXxsGcXL5R5odpjDGbdpHHTagZfdfnNC6MUPi6WABev6p1W499h6f57DT3FwJJlErl6kGFt/zqadQIJgZC+46jcTH3Zh7sBGDpFLdKpb5PBOT4GbocZWiqG2sX7L0O2uW7gnpU3b1IGaB7hYupTSt2AKeom72EVKyfdLdgNBhTpBkyIPLunPfC2JZHU1BTyK3Cg8WjOUZtKWNnlNcx37l9bdqgCux9qwv6OPBYx5m06EUWNB0r9UrIw/C2e0ywdJ2Z7n4lbTcnHxe5tZ4imAjkwwlaW/CvxLROu05d4dMV1kT+mlF3PCNMN5jWz2C/kLlzbLSxZCJnnqfl1iOUGxsK/L/1rMHRqkPDwMUMFwgUbX2W7LMckLJOIFd5+y3pXVGFKR3Ztt0ZfPEG4CBbw5gsOfSp9QHj6wHE+lqTx1fK2ivfYjCF5iJ4QnpjgRlUL8QW6RZo9GAaIRC+xGfZd7pFe8l9dJROzQXdIRdTFzMu7HL8SOFyYquT3Xn9MoU+NjiJwJafyyxW/2ysTRov+0Kd8i1HJCMBwrzKUedbk5sM8FIbiVmbyA4Pi3OgpRf//owQjwmNhIUjEyytMXa6KS+iuG7z76YpuMz2Zb//ulFBzmRCiYz/9vmf4s38KjHTbLw4Pj34jE8fhSDm9/DJx4Q3yIuymuD1K+PuIgshTUOHxiCvFE65CipE24sdU8Cexq2UCde1h9UvgogWXpI7HcyaQoiQA/DsRkwpk6K+aZ3w1qv03DRNATIgiVLpznsH+2YyXdOu7Krla8W7IjGTRQNriD/OUTMXeFOGxwZFXPB6y1OBZJcWvYRyfGGyIyyJpze+KfgzpzApOa8PAmej3le97nzzt0OBlWLoyE53cKFgGctMNS6CT1ZdWbzFj+Mz6GwfnFFhC/B94ocMSuFWpPo1GKBXyfSv4z1y2z/g+Gs6alu/j7g4CUIiLOXeYXMBif6EyZr9GTVOOIbttEddm9MNbbsBC1UUpjM028qCmyQkNwAnYtVgfFoYMwiPaVU1I6sbQqBZOIcY7AJSVM6FwRsTxeZbzlNDwH43Mv89KcP9vfg/prpxcR+CkMAzg9bYa2uwRhUtltxVpm5kPhViAuLgKRsPo5aBadMSdfWjgpKiVuKnwu8IFvyk3hdTsRVZFLmwrhqYy1e7Q3/x5TP0CTDVdz5FX5Seg5OXODhxL3vX/0Qohrymc4yPjhV2OuYOOg1hP1cQGrWoqmH6ByEEWu0Afofslygmv4QqO6eQ3cK8x1QqABdpaRKbPQIqvIXAuApqG6fwadkP8F30hmTZZDG1CdTNyU8O5X3IafVTGXr6AQSd+h30LBN0WOJnoOzC9KZIx8QuBIaSk5W4h8P/rG3TfVHs00BrvxeIidbxTeJgTDGV8sfuiGzUPYfSjxhxIw9Abz4ehL0mnLoSfDaqiR2zWCHEtQVIYjptv5DOoL9uUm4+AEwmMVR9p0rtJLkzB4jBrNZxsdlwWa/hnqWZDGVX3Q3hzcj7jXaFp1XQ8b/WCvYY99RrsJhozR6iAQtAWsXUCFlbXa6dEid78Ytya4Kl8b5oyT9ihZaisgDUfcACHN+yuBTDuv3/kBq4YDt/UGw/jr16XHdWiSok0kPcFE9MjWv/viK+Xl4pUHN+FGkyDn1T8qD+6w2Rv9zA/diBYoNLpOW57AMkujkTXRfDfDH/kXZpca5TG1Tqtj2c3F5hUL9ASLkdj/ZK+QLwH96SrQFwWfBrLtiU9zDExy8v4ojgKzM8t3KjtnDFShrRuBvNnlv/cYg34SvWCPjPEVwl6rWQHUbHjBq0jUboWxtMPF89sJyLyPZ93EhL/sLzPD64FIUrPiTwLiyFWYw/st5VIXXqem5NfQfi6+8/FrTHYFZoC7kAHfAIU/C840RSpT5mTQQVOV6BSdtm7qpEh/khlT3SrlVjDabUbIF8bw9BddlU8w+Y0BnI1sCmBFJfhaf8Pwkm1flIEDzPIZRvxn4xPD8Q9Vj6DNX9cPvjR75G8ggtN6rK/hfK5rMfrgUnlQkuOHGiW/BldS+r2ew35zHXwQtvjf/totm8q41nHeaXAmwgdwyMP+VX/hBAUG8BgOfycMrGWmlcUUywdsLoLQhMr/DIuYtDnV5Dj5kYWLQJFaD77rPW4PK3cymJB1PlUZRyLuPLM7QQpwChceycBZQ/ZNqs48EKjhZ51aXla6cSKWW8Kk+LbT0Ujx5VjBYPBp8EGEYSMcdZfWzDdTxPJbmocDSYYntO6D3w8+BLBXsa1DDVoGqkQM0yoWUFSidkM2ps42xlorIF5s8OmGRNUXp+THtqr0LRzHaPCl/bjY1VZmmCN+O7Cgo9ggRenfjOC/cSOqYaDZBvF8240o720Lq8EFcrM7IIj1XY37vGIsC2Dbsm50Cpy52MXR83FlrfGvgaJ4DWQIA5zdXuNJCpLlgjA0N82fXe/8sCPm1+IozR08gWk+2F8wsDXFeVRiNQAU8SpoihAH9NwYCVHyX3dylo6oCPZDMQKGIP4YUG+orRTC4AGijZw3wQtl7yC0YaCkIGEvyWd14J2lOwo32q0Pg6nx02VmsZQjun7r4GVU9mIsUMPog8gCqoedBXIpJA+ACZj/fs55ryCkEBtSwBx0DqkSMNujwejG26rurzcRslKyDXFQZjpUKolXtmSwX+tOf8DWA9VRmIDU6mKYejEcIl5KHeVx8znPNhsXsA/SS9BavwCq5/f6yua29p4C0PYxru8T3Z4M24b+z7aqmJledAiskY5/ZmyRmBzfSEGjtMtM/dCN6vKgAWaXObs+QygaQFaQZD9nnbkiNB0pjK6vmdcjUK131BLHiFjQ0JT+xrngJw19KAgOiNxgCrcV/9y+zpwUiOCc33A0mX887A0gqr0kRiU03P4OSNXGLE2mAsDWS7Q/caZWhZ3G0RpQPt9qPsx85+P1FAnmiWEe35Lstpw50dB/ytTGdTD/fFc3Vdzmy+i0erS3/zyfU/uM5Os7pPpBw6MhCE3dor9hBJWLWQiajHtTe8dAIF3+Z1kt8euDt+Ma05Xtb6AAAA) center/cover no-repeat}


/* SOURCE: token-rail-visuals.css */
.coin-token-source,.character-token-source{position:relative!important;overflow:hidden!important}.coin-choice,.character-front-token{width:46px!important;height:46px!important;margin:auto!important}.coin-choice{position:relative!important;border:0!important;border-radius:0!important;background:transparent!important;color:transparent!important}.coin-choice::before,.coin-choice::after,.coin-choice{filter:drop-shadow(0 2px 2px #0008)}.coin-choice::before,.coin-choice::after{content:"";position:absolute;border-radius:50%;background-image:url("https://d2d6rnm6fnsp89.cloudfront.net/assets/spritesheets/magic-coins.webp?v=20260829-aws-1");background-repeat:no-repeat;background-size:600% 1500%;background-position:0 0}.coin-choice::before{width:32px;height:32px;left:4px;top:10px}.coin-choice::after{width:29px;height:29px;right:1px;top:3px}.coin-token-source::after{content:"";position:absolute;width:25px;height:25px;left:21px;top:28px;border-radius:50%;background-image:url("https://d2d6rnm6fnsp89.cloudfront.net/assets/spritesheets/magic-coins.webp?v=20260829-aws-1");background-repeat:no-repeat;background-size:600% 1500%;background-position:0 0;filter:drop-shadow(0 2px 3px #0009);pointer-events:none}.character-front-token{display:block!important;border:2px solid #d7ab35!important;border-radius:10px!important;background:#111820 center/cover no-repeat!important;color:transparent!important;box-shadow:inset 0 0 0 1px #74c8e055}.character-front-token.has-character-token{background-position:center!important;background-size:cover!important}.character-front-token.no-character-token{background-image:radial-gradient(circle,#d9b95333,#10171d 70%)!important}.character-front-token.no-character-token::after{content:"♟";display:grid;place-items:center;width:100%;height:100%;color:#f2dfac;font-size:25px}.calforth-token-button{flex:0 0 64px!important;width:64px!important;height:64px!important}.rist.auth-visitor .calforth-token-button{pointer-events:auto!important;filter:none!important;opacity:1!important}

/* AWS is the runtime artwork authority. Repository files under wwwroot/assets are deployment sources only. */
.header-mmo-button .mmo-toggle-art.mmo-toggle-image{
 display:grid!important;place-items:center!important;width:100%!important;height:100%!important;
 background:url("https://d2d6rnm6fnsp89.cloudfront.net/assets/ui/sandbox-toggle.webp?v=20260829-aws-1") center/contain no-repeat!important;
 overflow:hidden!important
}
.header-mmo-button.mmo-art-active .mmo-toggle-art.mmo-toggle-image{
 background-image:url("https://d2d6rnm6fnsp89.cloudfront.net/assets/ui/mmo-toggle.webp?v=20260829-aws-1")!important
}
.header-mmo-button .mmo-toggle-image img{display:none!important}

/* The shared pin artwork is an AWS-synced SVG, not a CSS-drawn fallback. */
.icon-pin.map-pin-icon,.map-pin-icon{
 display:block!important;box-sizing:border-box!important;width:34px!important;height:34px!important;
 min-width:34px!important;min-height:34px!important;border:0!important;border-radius:0!important;box-shadow:none!important;
 transform:none!important;background-color:transparent!important;
 background-image:url("https://d2d6rnm6fnsp89.cloudfront.net/assets/ui/map-pin.svg?v=20260829-aws-1")!important;
 background-position:center!important;background-repeat:no-repeat!important;background-size:contain!important
}
.icon-pin.map-pin-icon::before,.icon-pin.map-pin-icon::after,.map-pin-icon::before,.map-pin-icon::after{content:none!important}
.piece.pin .map-pin-icon{width:100%!important;height:100%!important;min-width:0!important;min-height:0!important}

/* WORLD miniatures use the AWS magic-coin sheet. Hide the obsolete missing PNG element. */
.token-preview:has(>img[src*="main-world-coin"]),.piece.mini:has(>img[src*="main-world-coin"]){
 position:relative!important;overflow:visible!important;background-color:transparent!important;border:0!important;box-shadow:none!important;
 background-image:url("https://d2d6rnm6fnsp89.cloudfront.net/assets/spritesheets/magic-coins.webp?v=20260829-aws-1")!important;
 background-repeat:no-repeat!important;background-size:600% 1500%!important;background-position:0 0!important
}
.token-preview>img[src*="main-world-coin"],.piece.mini>img[src*="main-world-coin"]{display:none!important}
.token-preview:has(>img[src*="main-world-coin"])::before,.token-preview:has(>img[src*="main-world-coin"])::after,.piece.mini:has(>img[src*="main-world-coin"])::before,.piece.mini:has(>img[src*="main-world-coin"])::after{content:none!important}

/* Non-world miniature fallback uses the AWS humanoid direction sheet until the selected character token is available. */
.token-preview:has(>img[src*="main-token"]),.piece.mini:has(>img[src*="main-token"]){
 position:relative!important;background-color:transparent!important;border:0!important;
 background-image:url("https://d2d6rnm6fnsp89.cloudfront.net/assets/spritesheets/directional-humanoids.webp?v=20260829-aws-1")!important;
 background-repeat:no-repeat!important;background-size:800% auto!important;background-position:0 0!important
}
.token-preview>img[src*="main-token"],.piece.mini>img[src*="main-token"]{display:none!important}
.token-preview:has(>img[src*="main-token"])::before,.token-preview:has(>img[src*="main-token"])::after,.piece.mini:has(>img[src*="main-token"])::before,.piece.mini:has(>img[src*="main-token"])::after{content:none!important}

/* Private rail geometry: keep the pin artwork transparent and fully inside a themed button. */
.private-assets-rail .token-pin-source{
 box-sizing:border-box!important;flex:0 0 54px!important;width:54px!important;height:58px!important;min-width:54px!important;min-height:58px!important;
 display:grid!important;place-items:center!important;padding:6px!important;overflow:hidden!important;
 border:1px solid #725d30!important;border-radius:9px!important;background:transparent!important;box-shadow:none!important
}
.private-assets-rail .token-pin-source .map-pin-icon{
 width:34px!important;height:42px!important;min-width:34px!important;min-height:42px!important;
 background-color:transparent!important;background-size:contain!important;background-position:center!important
}

/* Private cards need a wider frame so the full card artwork reads at phone scale. */
.private-assets-rail .private-assets-items .compact-hand-card,
.private-assets-rail .private-assets-items .hand-card-wrap{
 flex:0 0 52px!important;width:52px!important;min-width:52px!important
}
.private-assets-rail .private-assets-items .compact-hand-card{
 height:58px!important;min-height:58px!important;padding:3px!important;border:1px solid #725d30!important;border-radius:8px!important;background-color:#111920!important
}
.private-assets-rail .private-assets-items .compact-hand-card img,
.private-assets-rail .private-assets-items .hand-toggle-card-back{
 max-width:100%!important;max-height:100%!important;object-fit:contain!important
}


/* SOURCE: faux-depth.css */
.map{
  --rist-depth-x:0px;
  --rist-depth-y:0px;
  --rist-depth-base-x:0px;
  --rist-depth-base-y:0px;
  --rist-depth-grid-x:0px;
  --rist-depth-grid-y:0px;
  --rist-depth-tile-x:0px;
  --rist-depth-tile-y:0px;
  --rist-depth-piece-x:0px;
  --rist-depth-piece-y:0px;
  perspective:1100px;
  perspective-origin:50% 50%;
}
.world-stage{
  transform-style:preserve-3d;
  transform-origin:50% 50%;
  will-change:transform;
}
.world-stage>.base{
  translate:var(--rist-depth-base-x) var(--rist-depth-base-y);
  transform:translateZ(-10px) scale(1.01);
  will-change:translate;
}
.world-stage>.grid{
  translate:var(--rist-depth-grid-x) var(--rist-depth-grid-y);
  transform:translateZ(0);
  will-change:translate;
}
.world-stage>.tile-cell,
.world-stage>.map-zone-label,
.world-stage>.pin-label-callout{
  translate:var(--rist-depth-tile-x) var(--rist-depth-tile-y);
  transform:translateZ(8px);
  will-change:translate;
}
.world-stage>.piece,
.world-stage>.rolled-die{
  translate:var(--rist-depth-piece-x) var(--rist-depth-piece-y);
  transform:translateZ(18px);
  will-change:translate;
}
@media (prefers-reduced-motion:reduce){
  .world-stage>.base,.world-stage>.grid,.world-stage>.tile-cell,.world-stage>.map-zone-label,.world-stage>.pin-label-callout,.world-stage>.piece,.world-stage>.rolled-die{translate:0 0!important;transform:none!important}
}


/* SOURCE: home-viewport.css */
/*
 * RIST home viewport contract.
 * One structural order in both orientations:
 * header -> public assets -> map -> private assets -> dice/chat/legal.
 * Orientation changes dimensions only; it must not move components into
 * implicit columns or absolute overlay layouts.
 */
:root{
  --rist-header-h:54px;
  --rist-public-h:86px;
  --rist-private-h:86px;
  --rist-dice-h:64px;
  --rist-chat-h:58px;
  --rist-legal-h:10px;
  --rist-footer-h:132px;
}

html,body,#app{width:100%;max-width:100%;min-width:0;overflow-x:hidden}
.rist{
  box-sizing:border-box!important;
  position:relative!important;
  width:100%!important;
  max-width:100dvw!important;
  min-width:0!important;
  min-height:100dvh!important;
  height:100dvh!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  grid-template-areas:"header" "public" "map" "private" "footer"!important;
  grid-template-rows:var(--rist-header-h) var(--rist-public-h) minmax(0,1fr) var(--rist-private-h) var(--rist-footer-h)!important;
  gap:0!important;
  overflow:hidden!important;
  padding-bottom:max(2px,env(safe-area-inset-bottom))!important;
}

/* Explicitly retire all historical absolute/side-column placement. */
.rist>#header-slider,
.rist>.public-assets-rail,
.rist>.private-assets-rail,
.rist>.table-workspace,
.rist>.home-footer-stack{
  position:relative!important;
  inset:auto!important;
  left:auto!important;
  right:auto!important;
  top:auto!important;
  bottom:auto!important;
  grid-column:1!important;
  min-width:0!important;
  max-width:100%!important;
  width:100%!important;
}
.rist>#header-slider{grid-area:header!important;height:var(--rist-header-h)!important;min-height:var(--rist-header-h)!important;max-height:var(--rist-header-h)!important}
.rist>.public-assets-rail{grid-area:public!important;height:var(--rist-public-h)!important;min-height:var(--rist-public-h)!important;max-height:var(--rist-public-h)!important}
.rist>.private-assets-rail{grid-area:private!important;height:var(--rist-private-h)!important;min-height:var(--rist-private-h)!important;max-height:var(--rist-private-h)!important}

/* Public and Private Assets intentionally share the same two-row visual grammar. */
.rist>.public-assets-rail,
.rist>.private-assets-rail{display:grid!important;grid-template-rows:34px minmax(0,1fr)!important;background:#0d1319!important;border-block:1px solid #6e592c!important;overflow:hidden!important}
.rist .asset-rail-header{box-sizing:border-box!important;height:34px!important;min-height:34px!important;display:flex!important;align-items:center!important;gap:8px!important;padding:3px 8px!important;border-bottom:1px solid #40371f!important;overflow:hidden!important}
.rist .asset-rail-header>strong{flex:0 0 auto!important;color:#d7be80!important;font:800 10px/1 system-ui!important;letter-spacing:.13em!important;text-transform:uppercase!important;white-space:nowrap!important}
.rist .asset-type-tabs{min-width:0!important;display:flex!important;gap:4px!important;overflow-x:auto!important;overflow-y:hidden!important;scrollbar-width:none!important}
.rist .asset-type-tabs::-webkit-scrollbar{display:none!important}
.rist .asset-type-tabs button{flex:0 0 auto!important;height:27px!important;padding:0 10px!important;border:1px solid #51462d!important;border-radius:7px!important;background:#111920!important;color:#a99d82!important;font:700 8px/1 system-ui!important;text-transform:uppercase!important}
.rist .asset-type-tabs button.active{border-color:#c49a3b!important;background:#1b252d!important;color:#f1d68f!important}
.rist .public-assets-strip,
.rist .private-assets-strip{height:100%!important;min-height:0!important}
.rist .public-assets-items,
.rist .private-assets-items{height:100%!important;min-height:0!important;padding:5px 4px!important}

/* Pallet presentation is retired; staging state remains in WorldSession. */
.rist>.table-workspace{
  grid-area:map!important;
  box-sizing:border-box!important;
  min-height:0!important;
  height:100%!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  grid-template-rows:minmax(0,1fr)!important;
  gap:0!important;
  overflow:hidden!important;
}
.rist>.table-workspace>.staging-tray.pallet{display:none!important}
.rist>.table-workspace>.map-shell{
  box-sizing:border-box!important;
  position:relative!important;
  grid-column:1!important;
  grid-row:1!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  min-height:0!important;
  height:100%!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  grid-template-rows:minmax(0,1fr)!important;
  place-items:stretch!important;
  padding:0!important;
  margin:0!important;
  overflow:hidden!important;
}
.rist>.table-workspace>.map-shell>.map{
  box-sizing:border-box!important;
  position:relative!important;
  grid-column:1!important;
  grid-row:1!important;
  display:block!important;
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  height:100%!important;
  max-height:none!important;
  min-height:0!important;
  aspect-ratio:auto!important;
  margin:0!important;
  overflow:hidden!important;
}

/* Encounter initiative remains a separate first row when play mode is active. */
.rist>.table-workspace:has(>.encounter-control-rail){grid-template-rows:auto minmax(0,1fr)!important}
.rist>.table-workspace>.encounter-control-rail{grid-column:1!important;grid-row:1!important;position:relative!important;max-width:100%!important}
.rist>.table-workspace:has(>.encounter-control-rail)>.map-shell{grid-row:2!important}

.home-footer-stack{
  grid-area:footer!important;
  box-sizing:border-box!important;
  min-width:0!important;
  height:var(--rist-footer-h)!important;
  min-height:var(--rist-footer-h)!important;
  max-height:var(--rist-footer-h)!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  grid-template-rows:var(--rist-dice-h) var(--rist-chat-h) var(--rist-legal-h)!important;
  gap:0!important;
  overflow:hidden!important;
}
.home-footer-stack #footer-slider{box-sizing:border-box!important;width:100%!important;max-width:100%!important;height:var(--rist-dice-h)!important;min-height:var(--rist-dice-h)!important;max-height:var(--rist-dice-h)!important;margin:0!important}
.home-inline-chat{box-sizing:border-box!important;width:100%!important;max-width:100%!important;min-width:0!important;height:var(--rist-chat-h)!important;min-height:var(--rist-chat-h)!important;max-height:var(--rist-chat-h)!important;margin:0!important}
.site-copyright-notice{
  box-sizing:border-box!important;
  position:static!important;
  grid-column:1!important;
  grid-row:3!important;
  width:100%!important;
  height:var(--rist-legal-h)!important;
  min-height:var(--rist-legal-h)!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:0 6px!important;
  overflow:hidden!important;
  pointer-events:none!important;
  color:#c2a565!important;
  background:#071118!important;
  border-top:1px solid #4d4023!important;
  font:600 7px/1 system-ui,-apple-system,sans-serif!important;
  letter-spacing:.025em!important;
  text-align:center!important;
  white-space:nowrap!important;
  text-overflow:ellipsis!important;
  opacity:.82!important;
  text-shadow:0 1px 2px #000!important;
}

.map-context-sidebar{display:none!important;width:0!important;min-width:0!important;max-width:0!important}
.map-shell.map-context-ready{grid-template-columns:minmax(0,1fr)!important}

@media(orientation:landscape){
  :root{
    --rist-header-h:50px;
    --rist-public-h:72px;
    --rist-private-h:72px;
    --rist-dice-h:54px;
    --rist-chat-h:54px;
    --rist-legal-h:10px;
    --rist-footer-h:64px;
  }
  .rist{
    grid-template-areas:"header" "public" "map" "private" "footer"!important;
    grid-template-rows:var(--rist-header-h) var(--rist-public-h) minmax(0,1fr) var(--rist-private-h) var(--rist-footer-h)!important;
  }
  .rist>#header-slider{position:relative!important;inset:auto!important;width:100%!important;max-width:100%!important;height:var(--rist-header-h)!important;min-height:var(--rist-header-h)!important;max-height:var(--rist-header-h)!important}
  .rist>.public-assets-rail,.rist>.private-assets-rail{position:relative!important;inset:auto!important;grid-column:1!important;width:100%!important;max-width:100%!important;grid-template-rows:30px minmax(0,1fr)!important}
  .rist .asset-rail-header{height:30px!important;min-height:30px!important;padding:2px 8px!important}
  .rist .asset-rail-header>strong{font-size:10px!important}
  .rist .asset-type-tabs button{height:25px!important;padding-inline:10px!important}

  .rist>.table-workspace{grid-column:1!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr)!important}
  .rist>.table-workspace>.staging-tray.pallet{display:none!important}
  .rist>.table-workspace>.map-shell{display:grid!important;grid-column:1!important;grid-row:1!important;width:100%!important;height:100%!important;min-height:0!important;padding:0!important;margin:0!important}
  .rist>.table-workspace>.map-shell>.map{grid-column:1!important;grid-row:1!important;width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;margin:0!important}
  .rist>.table-workspace:has(>.encounter-control-rail){grid-template-rows:auto minmax(0,1fr)!important}
  .rist>.table-workspace:has(>.encounter-control-rail)>.map-shell{grid-row:2!important}

  .home-footer-stack{
    height:64px!important;
    min-height:64px!important;
    max-height:64px!important;
    grid-template-columns:minmax(0,1fr) minmax(0,1.25fr)!important;
    grid-template-rows:54px 10px!important;
  }
  .home-inline-chat{grid-column:1!important;grid-row:1!important;height:54px!important;min-height:54px!important;max-height:54px!important;padding:3px 6px!important}
  .home-footer-stack #footer-slider{grid-column:2!important;grid-row:1!important;height:54px!important;min-height:54px!important;max-height:54px!important}
  .site-copyright-notice{grid-column:1 / -1!important;grid-row:2!important;height:10px!important;min-height:10px!important;font-size:7px!important}
  .home-inline-chat .chat-history-toggle,.home-chat-compose,.home-chat-compose textarea,.home-chat-send{height:48px!important;min-height:48px!important;max-height:48px!important}
  .home-chat-compose{display:block!important}
  .home-chat-compose textarea{font-size:16px!important;padding:6px 9px!important}
}


/* ========================================================================== */
/* RIST VISUAL AUTHORITY — 2026-08-30                                         */
/* Static artwork is one AWS object per control. Only functional spritesheets */
/* may use frame cropping. Container geometry owns size; artwork never does.  */
/* ========================================================================== */
:root{
 --rist-gold:#725d30;
 --rist-gold-bright:#d7be80;
 --rist-panel:#0d1319;
 --rist-control:#111920;
 --rist-header-h:54px!important;
 --rist-public-h:86px!important;
 --rist-private-h:86px!important;
 --rist-dice-h:60px!important;
 --rist-chat-h:58px!important;
 --rist-legal-h:14px!important;
 --rist-footer-h:132px!important;
}

/* ----- header rail -------------------------------------------------------- */
.rist #header-slider{overflow:hidden!important;background:var(--rist-panel)!important}
.rist #header-slider .header-circular-set{height:100%!important;align-items:center!important;gap:8px!important;padding:3px 8px!important}
.rist #header-slider .header-icon-button,
.rist #header-slider .control{
 box-sizing:border-box!important;flex:0 0 96px!important;width:96px!important;min-width:96px!important;max-width:96px!important;
 height:48px!important;min-height:48px!important;max-height:48px!important;margin:0!important;
 border:1px solid var(--rist-gold)!important;border-radius:10px!important;background:var(--rist-control)!important;overflow:hidden!important
}
.rist #header-slider .header-icon-button{display:grid!important;place-items:center!important;padding:4px!important}
.rist #header-slider .control{position:relative!important;display:grid!important;place-items:center!important;padding:3px!important}
.rist #header-slider .header-icon{
 display:block!important;width:34px!important;height:34px!important;min-width:34px!important;min-height:34px!important;max-width:34px!important;max-height:34px!important;
 margin:auto!important;background-color:transparent!important;background-position:center!important;background-repeat:no-repeat!important;background-size:contain!important;
 filter:none!important;transform:none!important;pointer-events:none!important
}
.rist #header-slider .header-icon::before,.rist #header-slider .header-icon::after{content:none!important}
.rist #header-slider .icon-exit{background-image:url("https://d2d6rnm6fnsp89.cloudfront.net/assets/ui/icons/door.svg?v=20260830-clean-2")!important}
.rist #header-slider .icon-encounter{background-image:url("https://d2d6rnm6fnsp89.cloudfront.net/assets/ui/icons/mode.svg?v=20260830-clean-2")!important}
.rist #header-slider .icon-assets{background-image:url("https://d2d6rnm6fnsp89.cloudfront.net/assets/ui/icons/assets.svg?v=20260830-clean-2")!important}
.rist #header-slider .icon-browse{background-image:url("https://d2d6rnm6fnsp89.cloudfront.net/assets/ui/icons/browse.svg?v=20260830-clean-2")!important}
.rist #header-slider .icon-role{background-image:url("https://d2d6rnm6fnsp89.cloudfront.net/assets/ui/icons/role.svg?v=20260830-clean-2")!important}
.rist #header-slider [class*="icon-grid-"]{background-image:url("https://d2d6rnm6fnsp89.cloudfront.net/assets/ui/icons/grid.svg?v=20260830-clean-2")!important}
.rist #header-slider .icon-scale{background-image:url("https://d2d6rnm6fnsp89.cloudfront.net/assets/ui/icons/scale.svg?v=20260830-clean-2")!important}
.rist #header-slider .icon-save{background-image:url("https://d2d6rnm6fnsp89.cloudfront.net/assets/ui/icons/save.svg?v=20260830-clean-2")!important}
.rist #header-slider .icon-load{background-image:url("https://d2d6rnm6fnsp89.cloudfront.net/assets/ui/icons/load.svg?v=20260830-clean-2")!important}
.rist #header-slider .control select{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;opacity:0!important;cursor:pointer!important}
.rist #header-slider .scale-stack{box-sizing:border-box!important;flex:0 0 96px!important;width:96px!important;height:48px!important;display:grid!important;align-content:center!important;padding:4px!important;border:1px solid var(--rist-gold)!important;border-radius:10px!important;background:var(--rist-control)!important}

/* Static icon utilities used outside the header also use individual files. */
.rist .standard-save-icon .header-icon,.rist .standard-load-icon .header-icon,.rist .standard-drawer-exit .header-icon{
 display:block!important;width:28px!important;height:28px!important;margin:auto!important;background-position:center!important;background-repeat:no-repeat!important;background-size:contain!important
}
.rist .standard-save-icon .icon-save{background-image:url("https://d2d6rnm6fnsp89.cloudfront.net/assets/ui/icons/save.svg?v=20260830-clean-2")!important}
.rist .standard-load-icon .icon-load{background-image:url("https://d2d6rnm6fnsp89.cloudfront.net/assets/ui/icons/load.svg?v=20260830-clean-2")!important}
.rist .standard-drawer-exit .icon-exit{background-image:url("https://d2d6rnm6fnsp89.cloudfront.net/assets/ui/icons/door.svg?v=20260830-clean-2")!important}
.rist .standard-save-icon .header-icon::before,.rist .standard-save-icon .header-icon::after,.rist .standard-load-icon .header-icon::before,.rist .standard-load-icon .header-icon::after,.rist .standard-drawer-exit .header-icon::before,.rist .standard-drawer-exit .header-icon::after{content:none!important}

/* MMO is already a standalone static image pair. */
.rist .header-mmo-button .mmo-toggle-art{display:block!important;width:100%!important;height:100%!important;background:url("https://d2d6rnm6fnsp89.cloudfront.net/assets/ui/sandbox-toggle.webp?v=20260830-clean-2") center/contain no-repeat!important}
.rist .header-mmo-button.mmo-art-active .mmo-toggle-art{background-image:url("https://d2d6rnm6fnsp89.cloudfront.net/assets/ui/mmo-toggle.webp?v=20260830-clean-2")!important}
.rist .header-mmo-button .mmo-toggle-art>img{display:none!important}

/* ----- shared public/private asset rails --------------------------------- */
.rist>.public-assets-rail,.rist>.private-assets-rail{overflow:hidden!important;background:var(--rist-panel)!important;color:#eee6d3!important}
.rist .asset-rail-header{min-width:0!important;display:flex!important;align-items:center!important;gap:8px!important;padding:3px 8px!important;border-bottom:1px solid #40371f!important;overflow:hidden!important}
.rist .asset-rail-header>strong{flex:0 0 auto!important;color:var(--rist-gold-bright)!important;font:800 10px/1 system-ui!important;letter-spacing:.13em!important;text-transform:uppercase!important;white-space:nowrap!important}
.rist .asset-type-tabs{min-width:0!important;display:flex!important;gap:4px!important;overflow-x:auto!important;overflow-y:hidden!important;scrollbar-width:none!important}
.rist .asset-type-tabs::-webkit-scrollbar{display:none!important}
.rist .asset-type-tabs button{flex:0 0 auto!important;height:27px!important;padding:0 10px!important;border:1px solid #51462d!important;border-radius:7px!important;background:var(--rist-control)!important;color:#a99d82!important;font:700 8px/1 system-ui!important;text-transform:uppercase!important}
.rist .asset-type-tabs button.active{border-color:#c49a3b!important;background:#1b252d!important;color:#f1d68f!important}
.rist .public-assets-strip,.rist .private-assets-strip{display:block!important;width:100%!important;min-width:0!important;height:100%!important;overflow:hidden!important}
.rist .public-assets-items,.rist .private-assets-items{
 box-sizing:border-box!important;width:100%!important;min-width:0!important;height:100%!important;display:flex!important;align-items:center!important;gap:8px!important;
 overflow-x:auto!important;overflow-y:hidden!important;padding:5px 8px!important;scrollbar-width:none!important
}
.rist .public-assets-items::-webkit-scrollbar,.rist .private-assets-items::-webkit-scrollbar{display:none!important}
.rist .public-assets-strip>.rail-scroll-arrow,.rist .private-assets-strip>.rail-scroll-arrow{display:none!important}
.rist .public-assets-empty,.rist .private-assets-empty{color:#8f8879!important;font-size:10px!important;white-space:nowrap!important}
.rist .public-assets-items>button,.rist .private-assets-items>button,.rist .private-assets-items .hand-card-wrap{
 box-sizing:border-box!important;flex:0 0 58px!important;width:58px!important;min-width:58px!important;max-width:58px!important
}
.rist .public-assets-items .public-asset-card,.rist .private-assets-items .compact-hand-card,.rist .private-assets-items .standard-hand-card{
 height:46px!important;min-height:46px!important;max-height:46px!important;display:grid!important;place-items:center!important;padding:3px!important;overflow:hidden!important;
 border:1px solid var(--rist-gold)!important;border-radius:8px!important;background:var(--rist-control)!important
}
.rist .public-assets-items .public-asset-card>img,.rist .private-assets-items .compact-hand-card>img,.rist .private-assets-items .standard-hand-card>img{
 display:block!important;width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important;object-position:center!important;margin:0!important
}
.rist .public-assets-items .public-asset-card small{display:none!important}
.rist .private-assets-items .hand-toggle-card-back{display:block!important;width:100%!important;height:100%!important;background-size:contain!important;background-position:center!important;background-repeat:no-repeat!important}

/* Map pin is one standalone AWS SVG. Never crop it as a sprite. */
.rist .public-assets-rail .token-pin-source,.rist .private-assets-rail .token-pin-source{
 box-sizing:border-box!important;flex:0 0 58px!important;width:58px!important;min-width:58px!important;max-width:58px!important;height:46px!important;min-height:46px!important;max-height:46px!important;
 display:grid!important;place-items:center!important;padding:5px!important;overflow:hidden!important;border:1px solid var(--rist-gold)!important;border-radius:8px!important;background:var(--rist-control)!important;box-shadow:none!important
}
.rist .public-assets-rail .map-pin-icon,.rist .private-assets-rail .map-pin-icon{
 display:block!important;width:30px!important;height:36px!important;min-width:30px!important;min-height:36px!important;max-width:30px!important;max-height:36px!important;margin:auto!important;
 border:0!important;border-radius:0!important;box-shadow:none!important;transform:none!important;background:transparent url("https://d2d6rnm6fnsp89.cloudfront.net/assets/ui/map-pin.svg?v=20260830-clean-2") center/contain no-repeat!important;pointer-events:none!important
}
.rist .map-pin-icon::before,.rist .map-pin-icon::after{content:none!important}
.rist .piece.pin{background:transparent!important;border:0!important;box-shadow:none!important}.rist .piece.pin::after{content:none!important}

/* True sprites retain frame math; sprite sheets are the only intentional multi-image assets. */
.rist .die-sprite,.rist .rolled-die,.rist .magic-coin-sprite,.rist .mixer-sprite,.rist .sprite-sheet,.rist [class*="sprite-"]{max-width:none}
.rist .elemental-token-selector{position:relative!important;flex:0 0 auto!important;height:46px!important;display:flex!important;align-items:center!important;overflow:visible!important;z-index:18!important}
.rist .elemental-token-active,.rist .elemental-token-option{display:grid!important;place-items:center!important;padding:3px!important;border:1px solid #745c25!important;border-radius:9px!important;background:#111a21!important;color:#e8d49a!important}
.rist .elemental-token-active{width:58px!important;height:46px!important;min-width:58px!important;min-height:46px!important}
.rist .elemental-token-active:active,.rist .elemental-token-option:active,.rist .elemental-token-option.selected{border-color:#d7ad49!important;background:#1a2730!important;box-shadow:inset 0 0 0 1px #d7ad4966!important}
.rist .magic-coin-sprite{display:block!important;width:38px!important;height:38px!important;background-image:url("https://d2d6rnm6fnsp89.cloudfront.net/assets/spritesheets/magic-coins.webp?v=20260830-clean-2")!important;background-repeat:no-repeat!important;background-size:600% 1500%!important;background-position-x:0%;filter:drop-shadow(0 2px 2px #0009)}
.rist .magic-coin-animated{animation:magic-coin-cycle 900ms linear infinite}
.rist .elemental-token-menu{position:absolute!important;z-index:120!important;left:0!important;bottom:calc(100% + 8px)!important;width:232px!important;display:grid!important;grid-template-columns:repeat(5,42px)!important;gap:4px!important;padding:7px!important;border:1px solid #96752e!important;border-radius:10px!important;background:#0a1218f5!important;box-shadow:0 -8px 26px #000b!important;backdrop-filter:blur(6px)}
.rist .elemental-token-option{width:42px!important;height:42px!important;padding:2px!important}.rist .elemental-token-option .magic-coin-sprite{width:36px!important;height:36px!important}
@keyframes magic-coin-cycle{0%,16.65%{background-position-x:0%}16.66%,33.31%{background-position-x:20%}33.32%,49.97%{background-position-x:40%}49.98%,66.63%{background-position-x:60%}66.64%,83.29%{background-position-x:80%}83.3%,100%{background-position-x:100%}}

/* ----- footer/legal ------------------------------------------------------- */
.rist .home-footer-stack{box-sizing:border-box!important;height:var(--rist-footer-h)!important;min-height:var(--rist-footer-h)!important;max-height:var(--rist-footer-h)!important;grid-template-rows:var(--rist-dice-h) var(--rist-chat-h) var(--rist-legal-h)!important;overflow:hidden!important}
.rist .home-footer-stack #footer-slider{height:var(--rist-dice-h)!important;min-height:var(--rist-dice-h)!important;max-height:var(--rist-dice-h)!important}
.rist .home-inline-chat{height:var(--rist-chat-h)!important;min-height:var(--rist-chat-h)!important;max-height:var(--rist-chat-h)!important}
.rist .site-copyright-notice{display:flex!important;align-items:center!important;justify-content:center!important;height:var(--rist-legal-h)!important;min-height:var(--rist-legal-h)!important;padding:0 6px!important;color:#d2b873!important;background:#071118!important;border-top:1px solid #4d4023!important;font:600 7px/1 system-ui,-apple-system,sans-serif!important;opacity:1!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}

@media(orientation:landscape){
 :root{--rist-header-h:50px!important;--rist-public-h:72px!important;--rist-private-h:72px!important;--rist-dice-h:54px!important;--rist-chat-h:54px!important;--rist-legal-h:10px!important;--rist-footer-h:64px!important}
 .rist .home-footer-stack{height:64px!important;min-height:64px!important;max-height:64px!important;grid-template-columns:minmax(0,1fr) minmax(0,1.25fr)!important;grid-template-rows:54px 10px!important}
 .rist .home-inline-chat{grid-column:1!important;grid-row:1!important}.rist .home-footer-stack #footer-slider{grid-column:2!important;grid-row:1!important}.rist .site-copyright-notice{grid-column:1/-1!important;grid-row:2!important;height:10px!important;min-height:10px!important}
}

/* ========================================================================== */
/* RIST RELEASE WORLD AUTHORITY                                                */
/* WORLD is a fixed recursive tabletop: context -> root menu -> public assets */
/* -> map -> private assets -> character/dice -> chat -> legal.                */
/* ========================================================================== */
:root{
 --rw-context:28px;
 --rw-menu:58px;
 --rw-public:66px;
 --rw-private:66px;
 --rw-footer:112px;
 --rw-dice:58px;
 --rw-chat:42px;
 --rw-legal:12px;
 --rw-bg:#070c10;
 --rw-panel:#0b1217;
 --rw-panel2:#111a20;
 --rw-border:#725d30;
 --rw-border-soft:#3d3423;
 --rw-gold:#d7be80;
 --rw-text:#eee6d3;
 --rw-muted:#918875;
}

html,body,#app{width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;margin:0!important;overflow:hidden!important;background:var(--rw-bg)!important;color:var(--rw-text)!important}
body{overscroll-behavior:none!important}

.world-context-strip{
 box-sizing:border-box!important;width:100%!important;height:var(--rw-context)!important;min-height:var(--rw-context)!important;max-height:var(--rw-context)!important;
 display:flex!important;align-items:center!important;gap:4px!important;padding:2px max(6px,env(safe-area-inset-left))!important;
 overflow-x:auto!important;overflow-y:hidden!important;scrollbar-width:none!important;white-space:nowrap!important;
 border:0!important;border-bottom:1px solid var(--rw-border-soft)!important;background:#060a0d!important;
}
.world-context-strip::-webkit-scrollbar{display:none!important}
.world-context-strip>*{box-sizing:border-box!important;flex:0 0 auto!important;height:22px!important;min-height:22px!important;margin:0!important;padding:0 8px!important;border:1px solid #504326!important;border-radius:7px!important;background:#0d151a!important;color:#c7b98f!important;font:700 9px/20px system-ui,-apple-system,sans-serif!important;white-space:nowrap!important}
.world-context-strip strong{color:var(--rw-gold)!important}

.rist.release-world{
 box-sizing:border-box!important;position:relative!important;width:100%!important;height:calc(100dvh - var(--rw-context))!important;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;
 display:block!important;overflow:hidden!important;padding:0!important;margin:0!important;background:var(--rw-bg)!important;
}
.release-world-shell{
 box-sizing:border-box!important;position:absolute!important;inset:0!important;width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;
 display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:var(--rw-menu) var(--rw-public) minmax(0,1fr) var(--rw-private) var(--rw-footer)!important;
 gap:0!important;padding:0!important;margin:0!important;overflow:hidden!important;background:var(--rw-bg)!important;
}
.release-region{box-sizing:border-box!important;position:relative!important;inset:auto!important;width:100%!important;min-width:0!important;max-width:100%!important;height:100%!important;min-height:0!important;max-height:none!important;margin:0!important;padding:0!important;overflow:hidden!important}
.release-menu-region{grid-row:1!important;z-index:80!important;overflow:visible!important;background:var(--rw-panel)!important}
.release-public-region{grid-row:2!important;z-index:20!important}
.release-map-region{grid-row:3!important;z-index:1!important;background:#071116!important}
.release-private-region{grid-row:4!important;z-index:20!important}
.release-footer-region{grid-row:5!important;z-index:30!important}
.release-region>*,.release-region>*>*{min-width:0!important}

/* Root rails: arrows live inside the border, never outside the page. */
.release-world .release-root-rail,
.release-world .public-assets-strip,
.release-world .private-assets-strip{
 box-sizing:border-box!important;position:relative!important;inset:auto!important;width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;max-width:100%!important;
 display:grid!important;grid-template-columns:30px minmax(0,1fr) 30px!important;align-items:stretch!important;
 overflow:hidden!important;margin:0!important;padding:0!important;border:1px solid var(--rw-border)!important;border-radius:0!important;background:var(--rw-panel)!important;
}
.release-world .release-root-rail>.rail-scroll-arrow,
.release-world .public-assets-strip>.rail-scroll-arrow,
.release-world .private-assets-strip>.rail-scroll-arrow{
 box-sizing:border-box!important;display:grid!important;place-items:center!important;position:relative!important;inset:auto!important;z-index:12!important;width:30px!important;height:100%!important;min-width:30px!important;min-height:0!important;margin:0!important;padding:0!important;
 border:0!important;border-radius:0!important;background:#091015!important;color:var(--rw-gold)!important;font:800 24px/1 system-ui!important;opacity:1!important;filter:none!important;pointer-events:auto!important;
}
.release-world .release-root-rail>.rail-scroll-prev,.release-world .public-assets-strip>.rail-scroll-prev,.release-world .private-assets-strip>.rail-scroll-prev{grid-column:1!important;border-right:1px solid var(--rw-border-soft)!important}
.release-world .release-root-rail>.rail-scroll-next,.release-world .public-assets-strip>.rail-scroll-next,.release-world .private-assets-strip>.rail-scroll-next{grid-column:3!important;border-left:1px solid var(--rw-border-soft)!important}

.release-world .header-circular-set,
.release-world .public-assets-items,
.release-world .private-assets-items,
.release-world .dice-circular-set{
 box-sizing:border-box!important;grid-column:2!important;min-width:0!important;width:100%!important;max-width:100%!important;height:100%!important;min-height:0!important;
 display:flex!important;flex-wrap:nowrap!important;align-items:center!important;gap:6px!important;
 overflow-x:auto!important;overflow-y:hidden!important;scrollbar-width:none!important;-webkit-overflow-scrolling:touch!important;touch-action:pan-x!important;overscroll-behavior-x:contain!important;scroll-snap-type:x proximity!important;
}
.release-world .header-circular-set::-webkit-scrollbar,.release-world .public-assets-items::-webkit-scrollbar,.release-world .private-assets-items::-webkit-scrollbar,.release-world .dice-circular-set::-webkit-scrollbar{display:none!important}
.release-world .header-circular-set>* ,.release-world .public-assets-items>* ,.release-world .private-assets-items>* ,.release-world .dice-circular-set>*{flex-shrink:0!important;scroll-snap-align:start!important}

/* Main menu is a root browser, not a row of hidden selects. */
.release-world #header-slider{overflow:visible!important;border-width:0 0 1px!important}
.release-world .release-root-track{padding:4px 6px!important}
.release-world .root-menu-button{
 box-sizing:border-box!important;position:relative!important;flex:0 0 74px!important;width:74px!important;min-width:74px!important;max-width:74px!important;height:48px!important;min-height:48px!important;max-height:48px!important;
 display:grid!important;grid-template-rows:minmax(0,1fr) 12px!important;place-items:center!important;gap:0!important;margin:0!important;padding:2px!important;overflow:hidden!important;
 border:1px solid #5f4d29!important;border-radius:8px!important;background:var(--rw-panel2)!important;color:var(--rw-text)!important;text-decoration:none!important;box-shadow:inset 0 0 0 1px #0007!important;
}
.release-world .root-menu-button.active{border-color:#d2aa51!important;background:#17242c!important;box-shadow:inset 0 0 0 1px #d2aa5133!important}
.release-world .root-menu-button small{display:block!important;width:100%!important;overflow:hidden!important;color:#c6b88d!important;font:800 7px/10px system-ui!important;letter-spacing:.08em!important;text-align:center!important;text-transform:uppercase!important;text-overflow:ellipsis!important;white-space:nowrap!important}
.release-world .root-menu-art{display:block!important;width:30px!important;height:30px!important;background-position:center!important;background-repeat:no-repeat!important;background-size:contain!important;pointer-events:none!important}
.release-world .root-menu-button .icon-exit{background-image:url("https://d2d6rnm6fnsp89.cloudfront.net/assets/ui/icons/door.svg?v=release-1")!important}
.release-world .root-menu-button .icon-encounter{background-image:url("https://d2d6rnm6fnsp89.cloudfront.net/assets/ui/icons/mode.svg?v=release-1")!important}
.release-world .root-menu-button .icon-assets{background-image:url("https://d2d6rnm6fnsp89.cloudfront.net/assets/ui/icons/assets.svg?v=release-1")!important}
.release-world .root-menu-button .icon-browse{background-image:url("https://d2d6rnm6fnsp89.cloudfront.net/assets/ui/icons/browse.svg?v=release-1")!important}
.release-world .root-menu-button .icon-role{background-image:url("https://d2d6rnm6fnsp89.cloudfront.net/assets/ui/icons/role.svg?v=release-1")!important}
.release-world .root-menu-button .icon-grid{background-image:url("https://d2d6rnm6fnsp89.cloudfront.net/assets/ui/icons/grid.svg?v=release-1")!important}
.release-world .root-menu-button .icon-scale{background-image:url("https://d2d6rnm6fnsp89.cloudfront.net/assets/ui/icons/scale.svg?v=release-1")!important}
.release-world .root-menu-button .icon-save{background-image:url("https://d2d6rnm6fnsp89.cloudfront.net/assets/ui/icons/save.svg?v=release-1")!important}
.release-world .root-menu-button .icon-load{background-image:url("https://d2d6rnm6fnsp89.cloudfront.net/assets/ui/icons/load.svg?v=release-1")!important}
.release-world .root-menu-text strong{color:var(--rw-gold)!important;font:900 14px/1 system-ui!important}
.release-world .header-card-back{display:block!important;width:31px!important;height:31px!important;margin:0!important;background-position:center!important;background-repeat:no-repeat!important;background-size:contain!important}
.release-world .header-mmo-button .mmo-toggle-art{display:block!important;width:34px!important;height:31px!important;background:url("https://d2d6rnm6fnsp89.cloudfront.net/assets/ui/sandbox-toggle.webp?v=release-1") center/contain no-repeat!important}
.release-world .header-mmo-button.mmo-art-active .mmo-toggle-art{background-image:url("https://d2d6rnm6fnsp89.cloudfront.net/assets/ui/mmo-toggle.webp?v=release-1")!important}

.release-world .root-menu-panel,.release-world .release-action-menu{
 box-sizing:border-box!important;position:absolute!important;z-index:500!important;left:31px!important;top:calc(100% + 4px)!important;width:min(520px,calc(100dvw - 62px))!important;max-height:min(55dvh,420px)!important;overflow:auto!important;
 display:grid!important;gap:8px!important;padding:10px!important;border:1px solid #9b7c36!important;border-radius:10px!important;background:#071017f2!important;color:var(--rw-text)!important;box-shadow:0 14px 38px #000d!important;backdrop-filter:blur(8px)!important;
}
.release-world .root-menu-panel>strong,.release-world .release-action-menu>strong{color:var(--rw-gold)!important;font:900 11px/1 system-ui!important;letter-spacing:.11em!important;text-transform:uppercase!important}
.release-world .root-choice-grid{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(100px,1fr))!important;gap:6px!important}
.release-world .root-choice-grid button,.release-world .release-action-menu button,.release-world .release-action-menu label,.release-world .release-action-menu a{
 box-sizing:border-box!important;min-height:36px!important;padding:7px 9px!important;border:1px solid #554829!important;border-radius:7px!important;background:#111b22!important;color:#ded3b4!important;font:700 10px/1.2 system-ui!important;text-decoration:none!important;text-align:center!important;
}
.release-world .root-choice-grid button.selected{border-color:#d2aa51!important;background:#20313a!important;color:#ffe8aa!important}
.release-world .scale-root-panel label{display:grid!important;grid-template-columns:auto minmax(90px,1fr)!important;align-items:center!important;gap:8px!important;color:#bfb18b!important;font:700 10px/1 system-ui!important}
.release-world .scale-root-panel input{box-sizing:border-box!important;width:100%!important;height:34px!important;border:1px solid #5c4d2a!important;border-radius:6px!important;background:#0d171d!important;color:#fff3d0!important;padding:4px 7px!important}
.release-world .scale-root-panel output{color:#d6c497!important;font:700 10px/1 system-ui!important}

/* Public/private rails are compact root shelves above/below the map. */
.release-world .release-public-region>.public-assets-rail,.release-world .release-private-region>.private-assets-rail{
 box-sizing:border-box!important;position:relative!important;inset:auto!important;width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;max-width:100%!important;max-height:none!important;
 display:grid!important;grid-template-rows:24px minmax(0,1fr)!important;margin:0!important;padding:0!important;overflow:hidden!important;background:var(--rw-panel)!important;border:0!important;
}
.release-world .release-public-region>.public-assets-rail{border-bottom:1px solid var(--rw-border-soft)!important}
.release-world .release-private-region>.private-assets-rail{border-top:1px solid var(--rw-border-soft)!important}
.release-world .asset-rail-header{box-sizing:border-box!important;height:24px!important;min-height:24px!important;max-height:24px!important;display:flex!important;align-items:center!important;gap:6px!important;padding:2px 6px!important;overflow:hidden!important;border:0!important;border-bottom:1px solid #29251c!important;background:#080f13!important}
.release-world .asset-rail-header>strong{flex:0 0 auto!important;color:var(--rw-gold)!important;font:900 8px/1 system-ui!important;letter-spacing:.11em!important;text-transform:uppercase!important;white-space:nowrap!important}
.release-world .asset-type-tabs{min-width:0!important;height:20px!important;display:flex!important;align-items:center!important;gap:3px!important;overflow-x:auto!important;overflow-y:hidden!important;scrollbar-width:none!important}
.release-world .asset-type-tabs::-webkit-scrollbar{display:none!important}
.release-world .asset-type-tabs button{box-sizing:border-box!important;flex:0 0 auto!important;height:19px!important;min-height:19px!important;margin:0!important;padding:0 7px!important;border:1px solid #463d28!important;border-radius:5px!important;background:#10181d!important;color:#9d947f!important;font:700 7px/17px system-ui!important;text-transform:uppercase!important;white-space:nowrap!important}
.release-world .asset-type-tabs button.active{border-color:#b58c34!important;color:#f0d58f!important;background:#172229!important}
.release-world .public-assets-strip,.release-world .private-assets-strip{border-width:0!important}
.release-world .public-assets-items,.release-world .private-assets-items{padding:3px 5px!important;gap:5px!important}
.release-world .public-assets-items>button,.release-world .private-assets-items>button,.release-world .private-assets-items .hand-card-wrap{flex-basis:50px!important;width:50px!important;min-width:50px!important;max-width:50px!important}
.release-world .public-assets-items .public-asset-card,.release-world .private-assets-items .compact-hand-card,.release-world .private-assets-items .standard-hand-card,.release-world .public-assets-rail .token-pin-source,.release-world .private-assets-rail .token-pin-source{box-sizing:border-box!important;height:36px!important;min-height:36px!important;max-height:36px!important;border-radius:6px!important}
.release-world .public-assets-rail .map-pin-icon,.release-world .private-assets-rail .map-pin-icon{width:24px!important;height:30px!important;min-width:24px!important;min-height:30px!important;background:transparent url("https://d2d6rnm6fnsp89.cloudfront.net/assets/ui/map-pin.svg?v=release-1") center/contain no-repeat!important}

/* Map owns every pixel left by fixed rails. Old page geometry cannot resize it. */
.release-world .release-map-region>.table-workspace{
 box-sizing:border-box!important;position:absolute!important;inset:0!important;width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;
 display:block!important;margin:0!important;padding:0!important;overflow:hidden!important;background:#071116!important;
}
.release-world .release-map-region>.table-workspace>.map-shell{
 box-sizing:border-box!important;position:absolute!important;inset:0!important;width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;
 display:block!important;margin:0!important;padding:0!important;overflow:hidden!important;
}
.release-world .release-map-region>.table-workspace>.map-shell>.map{
 box-sizing:border-box!important;position:absolute!important;inset:0!important;width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;
 display:block!important;margin:0!important;padding:0!important;aspect-ratio:auto!important;overflow:hidden!important;border:0!important;border-radius:0!important;box-shadow:none!important;
}
.release-world .release-map-region>.table-workspace>.staging-tray{position:absolute!important;z-index:35!important;left:8px!important;right:8px!important;top:8px!important;width:auto!important;max-width:none!important;height:42px!important;min-height:42px!important;margin:0!important;border:1px solid #725d3099!important;border-radius:8px!important;background:#071016df!important;backdrop-filter:blur(5px)!important}
.release-world .release-map-region>.table-workspace>.staging-tray.pallet:empty{display:none!important}
.release-world .desktop-map-zoom{right:8px!important;bottom:8px!important;top:auto!important;left:auto!important}
.release-world .map-context-sidebar{display:none!important;width:0!important}
.release-world .map-shell.map-context-ready{grid-template-columns:minmax(0,1fr)!important}

/* Footer is never allowed to collapse or become a landscape side column. */
.release-world .release-footer-region>.home-footer-stack{
 box-sizing:border-box!important;position:absolute!important;inset:0!important;width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;
 display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:var(--rw-dice) var(--rw-chat) var(--rw-legal)!important;gap:0!important;margin:0!important;padding:0!important;overflow:hidden!important;background:#080f14!important;border-top:1px solid var(--rw-border)!important;
}
.release-world #footer-slider{grid-row:1!important;width:100%!important;height:100%!important;min-height:0!important;max-height:none!important;border-width:0 0 1px!important}
.release-world #footer-slider>.dice-circular-set{padding:4px 5px!important;gap:5px!important}
.release-world .footer-character-button{box-sizing:border-box!important;flex:0 0 104px!important;width:104px!important;min-width:104px!important;height:48px!important;min-height:48px!important;max-height:48px!important;display:grid!important;grid-template-columns:38px minmax(0,1fr)!important;align-items:center!important;gap:5px!important;padding:3px!important;border:1px solid var(--rw-border)!important;border-radius:8px!important;background:#111a20!important;color:#e7d39a!important;overflow:hidden!important}
.release-world .footer-character-button img{display:block!important;width:38px!important;height:38px!important;border-radius:50%!important;object-fit:cover!important}
.release-world .footer-character-button span{min-width:0!important;display:grid!important;text-align:left!important}
.release-world .footer-character-button strong,.release-world .footer-character-button small{overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
.release-world .footer-character-button strong{font:800 9px/1.1 system-ui!important}.release-world .footer-character-button small{color:#9e947d!important;font:700 7px/1.1 system-ui!important;text-transform:uppercase!important}
.release-world #footer-slider .die-button,.release-world #footer-slider .die-control,.release-world #footer-slider .sum,.release-world #footer-slider .clear-dice,.release-world #footer-slider .history-scroll-button{height:48px!important;min-height:48px!important;max-height:48px!important}
.release-world .home-inline-chat{box-sizing:border-box!important;grid-row:2!important;width:100%!important;height:100%!important;min-height:0!important;max-height:none!important;display:grid!important;grid-template-columns:34px minmax(0,1fr) 56px!important;gap:4px!important;align-items:center!important;margin:0!important;padding:3px 5px!important;border:0!important;background:#080f13!important}
.release-world .home-inline-chat .chat-history-toggle{box-sizing:border-box!important;width:34px!important;height:34px!important;min-height:34px!important}
.release-world .home-chat-compose{box-sizing:border-box!important;min-width:0!important;height:34px!important;display:grid!important;grid-template-columns:auto minmax(0,1fr)!important;align-items:center!important;gap:5px!important;margin:0!important}
.release-world .home-chat-compose>span{color:#c7b98e!important;font:700 8px/1 system-ui!important;white-space:nowrap!important}
.release-world .home-chat-compose textarea{box-sizing:border-box!important;width:100%!important;height:34px!important;min-height:34px!important;max-height:34px!important;resize:none!important;overflow:auto!important;margin:0!important;padding:5px 7px!important;border:1px solid #4b4028!important;border-radius:6px!important;background:#050c10!important;color:#eee6d3!important;font-size:16px!important}
.release-world .home-chat-send{box-sizing:border-box!important;width:56px!important;height:34px!important;min-height:34px!important;margin:0!important;border:1px solid #5b4b29!important;border-radius:6px!important;background:#111a20!important;color:#e3cc8f!important;font:800 9px/1 system-ui!important}
.release-world .site-copyright-notice{box-sizing:border-box!important;grid-row:3!important;width:100%!important;height:100%!important;min-height:0!important;display:flex!important;align-items:center!important;justify-content:center!important;margin:0!important;padding:0 5px!important;overflow:hidden!important;border:0!important;background:#05090c!important;color:#736d60!important;font:600 7px/1 system-ui!important;white-space:nowrap!important;text-overflow:ellipsis!important}

/* Overlay products float above WORLD instead of consuming WORLD rows. */
.release-world>.asset-slider-stack,.release-world>.character-mixer,.release-world>.recursion-cockpit,.release-world>.mmo-zone-actions,.release-world>.rist-welcome-tutorial,.release-world .card-library-overlay,.release-world .tile-browser{z-index:300!important}

@media (max-height:560px) and (orientation:landscape){
 :root{--rw-context:22px;--rw-menu:48px;--rw-public:54px;--rw-private:54px;--rw-footer:94px;--rw-dice:46px;--rw-chat:38px;--rw-legal:10px}
 .world-context-strip>*{height:18px!important;min-height:18px!important;font-size:8px!important;line-height:16px!important}
 .release-world .root-menu-button{flex-basis:66px!important;width:66px!important;min-width:66px!important;max-width:66px!important;height:40px!important;min-height:40px!important;max-height:40px!important;grid-template-rows:minmax(0,1fr) 9px!important}
 .release-world .root-menu-art{width:25px!important;height:25px!important}.release-world .header-card-back{width:26px!important;height:26px!important}.release-world .header-mmo-button .mmo-toggle-art{width:29px!important;height:26px!important}
 .release-world .asset-rail-header{height:19px!important;min-height:19px!important;max-height:19px!important}.release-world .release-public-region>.public-assets-rail,.release-world .release-private-region>.private-assets-rail{grid-template-rows:19px minmax(0,1fr)!important}
 .release-world .public-assets-items .public-asset-card,.release-world .private-assets-items .compact-hand-card,.release-world .private-assets-items .standard-hand-card,.release-world .public-assets-rail .token-pin-source,.release-world .private-assets-rail .token-pin-source{height:30px!important;min-height:30px!important;max-height:30px!important}
 .release-world #footer-slider .die-button,.release-world #footer-slider .die-control,.release-world #footer-slider .sum,.release-world #footer-slider .clear-dice,.release-world #footer-slider .history-scroll-button,.release-world .footer-character-button{height:38px!important;min-height:38px!important;max-height:38px!important}
 .release-world .footer-character-button{flex-basis:92px!important;width:92px!important;min-width:92px!important;grid-template-columns:30px minmax(0,1fr)!important}.release-world .footer-character-button img{width:30px!important;height:30px!important}
 .release-world .home-inline-chat{grid-template-columns:30px minmax(0,1fr) 50px!important}.release-world .home-inline-chat .chat-history-toggle,.release-world .home-chat-compose,.release-world .home-chat-compose textarea,.release-world .home-chat-send{height:30px!important;min-height:30px!important;max-height:30px!important}
}
/* ========================================================================== */
/* RIST MAP VIEWER AUTHORITY                                                   */
/* The recursive map is the bounded viewer for every open workspace/menu.      */
/* ========================================================================== */
.release-world .map-viewer-region{position:relative!important;isolation:isolate!important;overflow:hidden!important}
.release-world .map-viewer-region>.table-workspace{position:absolute!important;inset:0!important;z-index:1!important;width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;overflow:hidden!important}
.release-world .map-viewer-overlays{box-sizing:border-box!important;position:absolute!important;inset:0!important;z-index:200!important;width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;overflow:hidden!important;pointer-events:none!important}

.release-world .map-viewer-region .card-browser,
.release-world .map-viewer-overlays>.asset-slider-stack,
.release-world .map-viewer-overlays>.native-character-modal,
.release-world .map-viewer-overlays>.rist-tutorial-shell,
.release-world .map-viewer-overlays>.map-account-viewer{
 box-sizing:border-box!important;position:absolute!important;inset:6px!important;z-index:230!important;width:auto!important;height:auto!important;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;margin:0!important;overflow:hidden!important;border-radius:10px!important;pointer-events:auto!important
}
.release-world .map-viewer-region .card-browser,
.release-world .map-viewer-overlays>.asset-slider-stack,
.release-world .map-viewer-overlays>.rist-tutorial-shell,
.release-world .map-viewer-overlays>.map-account-viewer{background:#071017f8!important;border:1px solid var(--rw-border)!important;box-shadow:0 12px 34px #000c!important}

/* Account access uses the map as its viewer. Chat output occupies the lower area. */
.release-world .map-viewer-overlays>.map-account-viewer{display:grid!important;grid-template-rows:38px minmax(0,1fr)!important;padding:0!important}
.release-world .map-account-viewer>.map-viewer-header{box-sizing:border-box!important;position:relative!important;display:flex!important;align-items:center!important;min-height:38px!important;padding:0 46px 0 12px!important;border-bottom:1px solid var(--rw-border-soft)!important;background:#091116!important;color:var(--rw-gold)!important}
.release-world .map-account-body{box-sizing:border-box!important;display:grid!important;grid-template-rows:minmax(0,2fr) minmax(82px,1fr)!important;gap:7px!important;min-width:0!important;min-height:0!important;padding:7px!important;overflow:hidden!important}
.release-world .map-account-card,.release-world .map-chat-output{box-sizing:border-box!important;min-width:0!important;min-height:0!important;overflow:auto!important;border:1px solid #554829!important;border-radius:8px!important;background:#0b141a!important}
.release-world .map-account-card{padding:9px!important}
.release-world .map-auth-tabs{display:flex!important;gap:6px!important;margin:0 0 9px!important}
.release-world .map-auth-tabs button,.release-world .map-plan-picker button,.release-world .map-auth-form>button{min-height:34px!important;border:1px solid #5f4d29!important;border-radius:7px!important;background:#111b22!important;color:#ded3b4!important}
.release-world .map-auth-tabs button.active,.release-world .map-plan-picker button.selected{border-color:#d2aa51!important;background:#20313a!important;color:#ffe8aa!important}
.release-world .map-auth-form{display:grid!important;gap:8px!important;max-width:640px!important;margin:0 auto!important}
.release-world .map-auth-form h2{margin:0!important;color:var(--rw-gold)!important;font-size:17px!important}
.release-world .map-auth-form label{display:grid!important;gap:4px!important;color:#c9bb97!important;font-size:10px!important}
.release-world .map-auth-form input:not([type="checkbox"]){box-sizing:border-box!important;width:100%!important;min-height:34px!important;border:1px solid #554829!important;border-radius:6px!important;background:#071017!important;color:#fff3d0!important;padding:6px 8px!important}
.release-world .map-plan-picker{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important;margin:0!important;padding:7px!important;border:1px solid #3f3726!important;border-radius:7px!important}
.release-world .map-plan-picker legend{padding:0 4px!important;color:#c9bb97!important;font-size:9px!important}
.release-world .map-plan-picker button{display:grid!important;gap:2px!important;padding:6px!important;text-align:left!important}
.release-world .map-plan-picker span{font-size:9px!important;color:#a99c7b!important}
.release-world .map-terms{grid-template-columns:auto minmax(0,1fr)!important;align-items:start!important}
.release-world .map-chat-output{display:grid!important;grid-template-rows:auto minmax(0,1fr)!important}
.release-world .map-chat-output>header{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:7px!important;padding:4px 7px!important;border-bottom:1px solid #3f3726!important}
.release-world .map-chat-slide{overflow:auto!important;padding:6px 8px!important}
.release-world .map-chat-slide article p{margin:3px 0 0!important}
.release-world .map-chat-empty{margin:0!important;color:#817866!important;font-size:9px!important}
.release-world .chat-playback-controls{display:flex!important;align-items:center!important;gap:4px!important}
.release-world .chat-playback-controls button,.release-world .chat-playback-controls select{height:25px!important;min-height:25px!important;border:1px solid #514426!important;border-radius:5px!important;background:#0e181e!important;color:#d7c9a6!important;font-size:8px!important}
.release-world .chat-playback-controls label{display:flex!important;align-items:center!important;gap:4px!important;color:#998e74!important;font-size:8px!important}

/* Character sheet and libraries consume the same map viewer and scroll internally. */
.release-world .map-viewer-overlays>.native-character-modal{display:grid!important;place-items:stretch!important;padding:0!important;background:#03070ac7!important}
.release-world .map-viewer-overlays .native-character-sheet{box-sizing:border-box!important;position:relative!important;inset:auto!important;width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;min-width:0!important;min-height:0!important;margin:0!important;overflow:auto!important}
.release-world .map-viewer-region .card-browser{display:grid!important;grid-template-rows:auto minmax(0,1fr)!important}
.release-world .map-viewer-region .card-library-workspace,.release-world .map-viewer-region .card-library-results,.release-world .map-viewer-overlays .asset-slider-stack,.release-world .map-viewer-overlays .asset-horizontal-rail{min-width:0!important;min-height:0!important;max-width:100%!important;max-height:100%!important}
.release-world .map-viewer-region .card-library-workspace,.release-world .map-viewer-region .card-library-results{overflow:auto!important}
.release-world .map-viewer-overlays>.asset-slider-stack{display:grid!important;grid-template-rows:auto minmax(0,1fr)!important}

/* Root menus also occupy exactly the map rectangle. */
.release-world .root-menu-panel,.release-world .release-action-menu{box-sizing:border-box!important;position:fixed!important;z-index:950!important;top:calc(var(--rw-context) + var(--rw-menu) + var(--rw-public) + 6px)!important;right:6px!important;bottom:calc(var(--rw-private) + var(--rw-footer) + 6px)!important;left:6px!important;width:auto!important;height:auto!important;max-width:none!important;max-height:none!important;margin:0!important;overflow:auto!important;padding:44px 12px 12px!important;border:1px solid var(--rw-border)!important;border-radius:10px!important;background:#071017f8!important;box-shadow:0 12px 34px #000c!important;backdrop-filter:blur(7px)!important}

.release-world .map-viewer-overlays>.recursion-cockpit{box-sizing:border-box!important;position:absolute!important;z-index:210!important;top:8px!important;right:8px!important;left:auto!important;bottom:auto!important;max-width:min(360px,calc(100% - 16px))!important;max-height:calc(100% - 16px)!important;overflow:auto!important;pointer-events:auto!important}
.release-world .map-viewer-overlays>.mmo-zone-actions:not([hidden]){box-sizing:border-box!important;position:absolute!important;z-index:220!important;inset:8px!important;overflow:auto!important;pointer-events:auto!important}

/* Every map viewer owns its close button. */
.map-viewer-close,.root-panel-close{box-sizing:border-box!important;position:absolute!important;z-index:1200!important;top:7px!important;right:7px!important;width:32px!important;height:32px!important;min-width:32px!important;min-height:32px!important;display:grid!important;place-items:center!important;margin:0!important;padding:0!important;border:1px solid #9b7c36!important;border-radius:8px!important;background:#0b1319f5!important;color:#f0d58f!important;font:900 22px/28px system-ui,-apple-system,sans-serif!important;box-shadow:0 3px 10px #0009!important;cursor:pointer!important;pointer-events:auto!important}
.map-viewer-close:active,.root-panel-close:active{background:#24313a!important;color:#fff4cf!important}
.release-world .root-menu-panel>.root-panel-close,.release-world .release-action-menu>.root-panel-close{position:fixed!important;top:calc(var(--rw-context) + var(--rw-menu) + var(--rw-public) + 13px)!important;right:13px!important}

/* Login is discoverable before interaction. */
.release-world.auth-visitor .door-button.login-pulse{animation:rist-login-glow 1.7s ease-in-out infinite!important;border-color:#d7be80!important}
@keyframes rist-login-glow{0%,100%{box-shadow:inset 0 0 0 1px #0007,0 0 3px #d7be8055}50%{box-shadow:inset 0 0 0 1px #d7be8088,0 0 14px #f0d58fcc,0 0 24px #d7be8066}}
@media (prefers-reduced-motion:reduce){.release-world.auth-visitor .door-button.login-pulse{animation:none!important;box-shadow:inset 0 0 0 1px #d7be8088,0 0 10px #d7be8088!important}}

/* Natural gestures need no instructional status strip. */
.release-world .map .status{display:none!important}

@media (max-height:600px) and (orientation:landscape){
 .release-world .root-menu-panel,.release-world .release-action-menu{padding-top:38px!important}
 .map-viewer-close,.root-panel-close{width:28px!important;height:28px!important;min-width:28px!important;min-height:28px!important;font-size:19px!important}
 .release-world .map-account-body{grid-template-rows:minmax(0,2.2fr) minmax(70px,.8fr)!important;gap:5px!important;padding:5px!important}
 .release-world .map-auth-form{gap:5px!important}
 .release-world .map-plan-picker{padding:4px!important}
}
