#range-simulator{color-scheme:light;--ink:#172b40;--line:#c8d4df;--navy:#13283c;--gold:#b69559}
#range-simulator *{box-sizing:border-box}
#range-simulator{margin:0;background:#e9eef3;color:var(--ink);font:14px/1.45 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
#range-simulator button,#range-simulator input,#range-simulator select{font:inherit;color:var(--ink);min-height:42px;border:1px solid #9fb1c3;border-radius:6px;background:#fff;padding:7px 10px}
#range-simulator button{cursor:pointer;font-weight:650}
#range-simulator button:hover{background:#edf3f8}
#range-simulator button:disabled{opacity:.4;cursor:default}
#range-simulator button:focus-visible,#range-simulator input:focus-visible,#range-simulator select:focus-visible,#range-simulator .token:focus-visible{outline:3px solid #0866b2;outline-offset:2px}
#range-simulator input,#range-simulator select{width:100%;min-width:0}
#range-simulator label{display:flex;flex-direction:column;gap:5px;font-size:12px;font-weight:650}
#range-simulator .mast{background:var(--navy);color:#fff;padding:22px max(20px,calc((100vw - 1520px)/2));display:flex;align-items:center;justify-content:space-between;gap:20px;border-bottom:5px solid var(--gold)}
#range-simulator .mast small{font-size:10px;letter-spacing:.11em;color:#c6d4e2}
#range-simulator .mast h1{margin:6px 0;font-size:clamp(23px,3vw,34px);letter-spacing:-.03em}
#range-simulator .mast p{margin:5px 0 0;font-size:13px;color:#d6e0e9}
#range-simulator .mast button{flex:none;background:#233f59;color:#fff;border-color:#7d94aa}
#range-simulator main{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:16px;max-width:1560px;padding:18px 20px 40px;margin:auto;align-items:start}
#range-simulator .workspace{background:#fff;border:1px solid var(--line);border-radius:9px;overflow:hidden;min-width:0}
#range-simulator .tools{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 14px;border-bottom:1px solid var(--line);background:#f6f8fa}
#range-simulator .tools strong{font-size:16px;display:block}
#range-simulator .tools span{display:block;font-size:11px;color:#50667b}
#range-simulator .tool-buttons{display:flex;gap:5px;flex-wrap:wrap}
#range-simulator .tool-buttons button{font-size:11px;min-height:36px;padding:6px 8px}
#range-simulator .map-tools{padding:10px 14px;display:flex;gap:8px;align-items:flex-end;flex-wrap:wrap}
#range-simulator .map-tools label{flex:1;min-width:140px}
#range-simulator .map-tools button{font-size:12px}
#range-simulator .range-legend{display:flex;flex-wrap:wrap;gap:6px 12px;padding:6px 14px 12px;font-size:10px;color:#354b60}
#range-simulator .range-legend span{display:flex;align-items:center;gap:5px}
#range-simulator .range-legend span:before{content:'';display:inline-block;width:12px;height:12px;background:var(--swatch);border:1px solid #9aabba;clip-path:polygon(25% 0,75% 0,100% 50%,75% 100%,25% 100%,0 50%)}
#range-simulator #map-shell{position:relative;background:#e6edf3;border-block:1px solid #cbd6e1;overflow:hidden}
#range-simulator #map{display:block;width:100%;height:clamp(350px,65vh,740px);touch-action:manipulation}
#range-simulator #map-caption{position:absolute;bottom:8px;left:10px;right:10px;text-align:center;font-size:11px;color:#273e54;pointer-events:none;background:#f8fafbe6;border:1px solid #cbd6e1;border-radius:4px;padding:4px}
#range-simulator .hex-cell{cursor:pointer}
#range-simulator .hex-cell:hover polygon{stroke:#075ba5;stroke-width:2}
#range-simulator .terrain-text{font:700 6px system-ui,sans-serif;letter-spacing:.1px;pointer-events:none}
#range-simulator .token{cursor:pointer}
#range-simulator .token polygon{filter:drop-shadow(0 1px 1px #10203055)}
#range-simulator .token:hover polygon{stroke:#f7b530;stroke-width:3}
#range-simulator .token text{pointer-events:none}
#range-simulator .move-bar{padding:10px 14px;background:#e3eef9;border-bottom:1px solid #b8ccdf;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
#range-simulator .move-bar span{flex:1;font-size:12px;min-width:180px}
#range-simulator .move-bar button{font-size:12px}
#range-simulator .move-bar button:first-of-type{background:#23547c;color:white}
#range-simulator #status{margin:10px 14px;font-size:12px;color:#3e566d;min-height:18px}
#range-simulator .direction-bar{display:flex;justify-content:center;gap:6px;padding:0 14px 13px}
#range-simulator .direction-bar button{min-width:42px;min-height:36px;padding:5px;font-size:11px}
#range-simulator aside{display:grid;gap:14px;min-width:0}
#range-simulator .panel{background:#fff;border:1px solid var(--line);border-radius:8px;overflow:hidden}
#range-simulator .panel>header{background:#dfe7ef;padding:10px 12px;display:flex;justify-content:space-between;align-items:center;gap:5px}
#range-simulator .panel h2{font-size:14px;margin:0}
#range-simulator .panel header>span{font-size:9px;color:#455e75}
#range-simulator .panel>label{margin:10px 12px}
#range-simulator .hint{font-size:11px;color:#4c6379;margin:10px 12px;line-height:1.5}
#range-simulator #roster{max-height:440px;overflow:auto}
#range-simulator .roster-row{border:0;border-radius:0;border-top:1px solid #e1e7ed;width:100%;display:flex;align-items:center;gap:7px;padding:7px 10px;text-align:left;font-size:12px;min-height:43px}
#range-simulator .roster-row strong{flex:1;min-width:0;overflow-wrap:anywhere;font-size:12px}
#range-simulator .roster-row[aria-pressed=true]{background:#dfebf7;box-shadow:inset 3px 0 #075ba5}
#range-simulator .badge{display:grid;place-items:center;min-width:28px;height:28px;clip-path:polygon(25% 0,75% 0,100% 50%,75% 100%,25% 100%,0 50%);color:#fff;font-size:10px;font-weight:750}
#range-simulator .pc .badge{background:#1e704f}
#range-simulator .npc .badge{background:#a23340}
#range-simulator .range-tag{font-size:10px;color:#425c73;text-align:right}
#range-simulator .pair{padding:12px;font-size:12px;line-height:1.5}
#range-simulator .pair p{margin:7px 0}
#range-simulator .pair button{font-size:12px;margin-top:4px}
#range-simulator .save-buttons{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:10px 12px}
#range-simulator .save-buttons button,#range-simulator .file-button{font-size:11px;padding:7px;min-height:36px;text-align:center}
#range-simulator .file-button{background:#fff;border:1px solid #9fb1c3;border-radius:6px;cursor:pointer;display:flex;align-items:center;justify-content:center}
#range-simulator .file-button input{position:absolute;width:1px;height:1px;opacity:0;min-height:0;padding:0}
#range-simulator dialog{width:min(440px,calc(100vw - 24px));max-height:90dvh;border:1px solid #95abc1;border-radius:10px;padding:18px;color:var(--ink);background:#fff}
#range-simulator dialog::backdrop{background:#0a1929b8}
#range-simulator dialog header{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px}
#range-simulator dialog h2{font-size:20px;margin:0}
#range-simulator dialog header button{min-width:36px;min-height:36px;padding:3px}
#range-simulator dialog label{margin:12px 0}
#range-simulator dialog p,#range-simulator dialog li{font-size:13px;line-height:1.6}
#range-simulator dialog .hint{margin:12px 0}
#range-simulator .primary{background:#233f59;color:white;border-color:#233f59;width:100%;margin-top:6px}
#range-simulator dialog ol{padding-left:19px}
#range-simulator #help{width:min(620px,calc(100vw - 24px))}
#range-simulator [hidden]{display:none!important}
@media(max-width:1100px){#range-simulator main{grid-template-columns:minmax(0,1fr) 270px;padding:14px;gap:12px}
#range-simulator .tools{align-items:flex-start;flex-direction:column}
#range-simulator .map-tools{padding:10px}
#range-simulator .range-legend{padding-inline:10px}
}
@media(max-width:760px){#range-simulator .mast{padding:16px;gap:10px;align-items:flex-start}
#range-simulator .mast h1{font-size:24px}
#range-simulator .mast button{font-size:11px;padding:7px;min-width:74px}
#range-simulator .mast p{font-size:12px}
#range-simulator main{grid-template-columns:minmax(0,1fr);padding:10px;gap:12px}
#range-simulator .tools{padding:10px}
#range-simulator .tool-buttons{width:100%}
#range-simulator .tool-buttons button{flex:1}
#range-simulator .map-tools{display:grid;grid-template-columns:1fr 1fr;gap:8px}
#range-simulator .map-tools label{min-width:0}
#range-simulator .map-tools button{font-size:11px}
#range-simulator .range-legend{gap:5px 10px;font-size:9px}
#range-simulator #map{height:420px;max-height:65vh}
#range-simulator aside{grid-template-columns:minmax(0,1fr)}
#range-simulator #roster{max-height:290px}
#range-simulator .direction-bar{gap:5px;padding-inline:10px}
#range-simulator .direction-bar button{flex:1;min-width:0}
#range-simulator .move-bar{padding:9px}
#range-simulator .move-bar span{flex-basis:100%}
}
#range-simulator .control-deck{display:grid;grid-template-columns:minmax(0,1fr) 74px;gap:12px;padding:12px 14px;background:#f6f8fa;border-bottom:1px solid #c8d4df}
#range-simulator .deck-main{min-width:0}
#range-simulator .deck-title{margin-bottom:9px}
#range-simulator .deck-title strong{display:block;font-size:16px}
#range-simulator .deck-title>span{display:block;font-size:11px;color:#50667b}
#range-simulator .deck-tabs{display:flex;flex-direction:column;gap:7px;align-self:start}
#range-simulator .deck-tabs button{width:100%;min-height:44px;padding:8px 5px;font-size:12px}
#range-simulator .deck-tabs [aria-pressed=true],#range-simulator .brush[aria-pressed=true],#range-simulator .draw-mode [aria-pressed=true]{background:#233f59;color:#fff;border-color:#233f59}
#range-simulator #combat-info{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:9px;align-items:flex-end}
#range-simulator .combat-stat{display:flex;gap:5px;align-items:center;border:1px solid #c8d4df;border-radius:5px;padding:5px;background:#fff;min-width:0}
#range-simulator .combat-stat>span{font-size:11px;font-weight:650;margin-right:4px}
#range-simulator .combat-stat button{min-height:34px;min-width:30px;padding:3px;font-size:17px}
#range-simulator .combat-stat strong{min-width:22px;text-align:center;font-size:18px}
#range-simulator #combat-info>label{min-width:76px;max-width:100px;font-size:11px;gap:3px}
#range-simulator #combat-info input{min-height:34px;padding:5px;width:100%}
#range-simulator .view-actions{display:flex;flex-wrap:wrap;gap:6px}
#range-simulator .view-actions button{font-size:11px;min-height:35px;padding:6px 8px}
#range-simulator .view-actions #remove{color:#973442}
#range-simulator .deck-history{display:flex;gap:6px;margin-top:9px}
#range-simulator .deck-history button{font-size:10px;min-height:29px;padding:3px 9px}
#range-simulator .deck-empty{font-size:12px;color:#50667b;margin:7px 0}
#range-simulator .brushes{display:flex;gap:6px;flex-wrap:wrap}
#range-simulator .brush{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;padding:6px 7px;min-height:58px;min-width:64px;flex:1 0 64px;max-width:105px}
#range-simulator .brush-icon{font-size:23px;line-height:1.1}
#range-simulator .brush small{font-size:9px;line-height:1.2;white-space:normal;max-width:70px}
#range-simulator .draw-actions{display:flex;flex-wrap:wrap;align-items:center;gap:7px;margin-top:9px}
#range-simulator .draw-actions button{font-size:11px;min-height:35px;padding:6px 9px}
#range-simulator .draw-mode{display:flex;gap:4px}
#range-simulator .draw-hint{font-size:11px;line-height:1.5;color:#455d74;margin:7px 0 0}
#range-simulator #movement-controls{margin-top:9px;padding:9px;border:1px solid #bdcede;border-radius:5px;background:#e8f0f7}
#range-simulator #movement-controls>label{max-width:240px}
#range-simulator #movement-controls .direction-bar{justify-content:flex-start;padding:8px 0 0}
#range-simulator #movement-controls .move-bar{padding:7px 0 0;border:0;background:transparent}
#range-simulator #movement-controls .move-bar span{min-width:0}
@media(max-width:760px){#range-simulator .control-deck{grid-template-columns:minmax(0,1fr) 58px;gap:8px;padding:10px}
#range-simulator .deck-tabs button{font-size:11px}
#range-simulator .deck-title strong{font-size:14px}
#range-simulator .combat-stat{flex:1 0 110px;justify-content:space-between;gap:3px}
#range-simulator .combat-stat>span{font-size:10px;margin:0}
#range-simulator .combat-stat button{min-width:28px;min-height:34px}
#range-simulator #combat-info{gap:6px}
#range-simulator #combat-info>label{flex:1;max-width:100%;min-width:82px}
#range-simulator .brush{flex:1 0 55px;min-width:55px;padding:5px 3px;min-height:53px;max-width:90px}
#range-simulator .brush small{font-size:9px}
#range-simulator .view-actions button{flex:1 0 auto}
#range-simulator .deck-history{flex-wrap:wrap}
#range-simulator .draw-actions{gap:5px}
#range-simulator .draw-actions button{padding:5px 7px}
#range-simulator .draw-mode{flex-wrap:wrap}
#range-simulator #movement-controls{padding:6px}
#range-simulator .roster-row strong{font-size:11px}
}
#range-simulator .roster-info{flex:1;min-width:0;font-size:11px;line-height:1.4}
#range-simulator .roster-info strong{font-size:12px}
#range-simulator .roster-combat{font-weight:400;color:#425c73}
#range-simulator .history-host{display:inline-flex;align-items:center;margin-left:auto}
#range-simulator .history-icons{display:inline-flex;gap:5px;align-items:center}
#range-simulator .history-icons button{width:34px;min-width:34px;min-height:34px;padding:2px;font-size:23px;line-height:1;font-weight:450}
#range-simulator .impassable-check{display:inline-flex;flex-direction:row;align-items:center;gap:6px;font-size:11px;margin:0}
#range-simulator .impassable-check input{width:18px;height:18px;min-height:18px;padding:0}
#range-simulator .deck-title{position:relative;padding-right:35px}
#range-simulator .deck-title>#help-open{position:absolute;right:0;top:0;width:27px;min-height:27px;padding:1px;font-size:13px;border-radius:50%}
#range-simulator .view-actions .history-icons button,#range-simulator .draw-actions .history-icons button{flex:none;font-size:23px;padding:2px}
#range-simulator .view-actions .history-host{flex:0 0 auto}
@media(max-width:760px){#range-simulator .roster-info strong{font-size:11px}
#range-simulator .history-icons button{width:30px;min-width:30px;min-height:32px}
#range-simulator .draw-actions .history-host{margin-left:auto}
#range-simulator .impassable-check{font-size:10px}
}
#range-simulator .view-actions{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px;align-items:center}
#range-simulator .view-actions #overview{grid-column:1;grid-row:1;justify-self:start}
#range-simulator .view-actions .history-host{grid-column:2;grid-row:1;justify-self:end}
#range-simulator .view-actions #move-toggle{grid-column:1;grid-row:2;justify-self:start}
#range-simulator .view-actions #remove{grid-column:2;grid-row:2;justify-self:end}
#range-simulator .draw-actions{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px;align-items:center}
#range-simulator .draw-actions .draw-mode{grid-column:1;grid-row:1}
#range-simulator .draw-actions .history-host{grid-column:2;grid-row:1;justify-self:end}
#range-simulator .draw-actions .impassable-check{grid-column:1;grid-row:2;justify-self:start}
#range-simulator .draw-actions #add-open{grid-column:2;grid-row:2;justify-self:end}
#range-simulator .draw-actions #line-cancel{grid-column:1/-1;grid-row:3;justify-self:start}
#range-simulator .view-actions{display:flex;flex-wrap:nowrap;gap:6px;align-items:center}
#range-simulator .view-actions .action-icon,#range-simulator .history-icons .action-icon{display:inline-grid;place-items:center;flex:0 0 38px;width:38px;min-width:38px;height:38px;min-height:38px;padding:6px;background:#233f59;color:#f2f4ff;border:1px solid #233f59;border-radius:5px}
#range-simulator .view-actions .history-host{display:inline-flex;flex:0 0 auto;margin-left:auto}
#range-simulator .history-icons{gap:6px}
#range-simulator .view-actions #remove.action-icon{color:#f2f4ff;background:#8f3543;border-color:#8f3543}
#range-simulator .action-icon svg{display:block;width:24px;height:24px;flex:none;pointer-events:none}
#range-simulator .view-actions #move-toggle[aria-pressed=true]{background:#075b92;border-color:#075b92;box-shadow:0 0 0 2px #b69559}
#range-simulator .deck-title>#help-open.action-icon{display:grid;place-items:center;width:30px;height:30px;min-height:30px;padding:3px;background:#233f59;color:#f2f4ff;border:0;border-radius:5px}
#range-simulator .round-controls{display:flex;gap:5px;align-items:center;padding:9px 12px;background:#f6f8fa;border-bottom:1px solid #d7e0e9}
#range-simulator .round-controls strong{font-size:13px;flex:1}
#range-simulator .round-controls button{min-height:32px;min-width:30px;font-size:13px;padding:4px 8px}
#range-simulator .round-controls #round-reset{font-size:10px}
#range-simulator .conditions-open{min-height:34px;padding:5px 9px;font-size:11px;align-self:flex-end}
#range-simulator .roster-conditions{display:block;margin-top:3px;color:#775515;font-size:10px;font-weight:500;line-height:1.4}
#range-simulator #conditions{width:min(560px,calc(100vw - 24px))}
#range-simulator .condition-option{padding:10px 0;border-top:1px solid #d7e0e9}
#range-simulator .condition-option label{display:flex;flex-direction:row;align-items:center;gap:9px;margin:0;font-size:14px}
#range-simulator .condition-option input{width:20px;height:20px;min-height:20px;padding:0}
#range-simulator .condition-option p{margin:6px 0 0 29px;font-size:12px;line-height:1.5;color:#455d74}
@media(max-width:760px){#range-simulator .view-actions .action-icon,#range-simulator .history-icons .action-icon{width:36px;min-width:36px;flex-basis:36px;height:36px;min-height:36px;padding:5px}
#range-simulator .view-actions{gap:5px}
#range-simulator .history-icons{gap:5px}
#range-simulator .round-controls{padding:8px 10px}
}
#range-simulator #movement-controls{padding:7px 0 0;margin-top:7px;border:0;background:transparent}
#range-simulator #movement-controls .move-bar{padding:0;background:transparent;display:flex;align-items:center;gap:6px;flex-wrap:nowrap}
#range-simulator #movement-controls .move-bar #move-text{flex:1;font-size:12px;line-height:1.4;min-width:0}
#range-simulator #movement-controls .move-bar .action-icon,#range-simulator .conditions-open.action-icon{position:relative;display:inline-grid;place-items:center;flex:0 0 36px;width:36px;min-width:36px;height:36px;min-height:36px;padding:5px;background:#233f59;border:0;color:#f2f4ff;border-radius:5px}
#range-simulator #movement-controls #move-confirm.action-icon{background:#237249}
#range-simulator #movement-controls #move-cancel.action-icon{background:#a03543}
#range-simulator .condition-count{position:absolute;top:-4px;right:-4px;border-radius:9px;min-width:16px;padding:0 3px;text-align:center;background:#f1dca4;color:#332b19;font-size:10px;font-weight:750;line-height:16px}
#range-simulator .control-deck{display:block}
#range-simulator .deck-title{display:grid;grid-template-columns:minmax(0,1fr) auto;padding-right:0;gap:0 10px;align-items:center;min-height:30px}
#range-simulator .deck-title>strong{grid-column:1;grid-row:1}
#range-simulator .deck-title>#focus-sub{grid-column:1;grid-row:2}
#range-simulator .deck-tabs{grid-column:2;grid-row:1/3;display:flex;flex-direction:row;gap:5px;align-items:center}
#range-simulator .deck-tabs .action-icon{display:grid;place-items:center;width:30px;min-width:30px;height:30px;min-height:30px;padding:3px;border-radius:5px;background:#233f59;color:#f2f4ff;border:1px solid #233f59}
#range-simulator .deck-tabs [aria-pressed=true]{background:#075b92;box-shadow:0 0 0 2px #b69559}
#range-simulator #combat-info{display:grid;grid-template-columns:1fr 1fr 1fr 36px;gap:8px;align-items:end}
#range-simulator #combat-info .combat-stat{display:grid;grid-template-columns:26px minmax(20px,1fr) 26px;gap:0;padding:0;border:0;background:transparent;min-width:0}
#range-simulator #combat-info .combat-stat>span{grid-column:1/-1;font-size:11px;line-height:16px;margin:0 0 3px}
#range-simulator #combat-info .combat-stat button,#range-simulator #combat-info .combat-stat strong,#range-simulator #combat-info input{height:32px;min-height:32px;font-size:14px;line-height:30px;padding:0;text-align:center}
#range-simulator #combat-info .combat-stat strong{background:white;border-block:1px solid #9fb1c3;min-width:0;font-weight:500}
#range-simulator #combat-info .combat-stat button{min-width:26px;border-radius:4px 0 0 4px}
#range-simulator #combat-info .combat-stat button:last-child{border-radius:0 4px 4px 0}
#range-simulator #combat-info>label{min-width:0;max-width:none;gap:3px;line-height:16px}
#range-simulator #combat-info>.deck-empty{grid-column:1/-1}
#range-simulator .conditions-open.action-icon{height:32px;min-height:32px}
#range-simulator .view-actions{gap:5px}
#range-simulator #observer-conditions{flex:1;display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:4px;min-width:0}
#range-simulator .view-actions .history-host{margin-left:0}
#range-simulator .view-actions .action-icon,#range-simulator .history-icons .action-icon{width:30px;min-width:30px;height:30px;min-height:30px;flex-basis:30px;padding:3px}
#range-simulator .history-icons{gap:5px}
#range-simulator .condition-tag{font-size:11px;display:inline-flex;align-items:center;gap:4px;white-space:normal}
#range-simulator .round-pill{display:inline-grid;place-items:center;background:#233f59;color:#fff;font-size:10px;font-weight:650;min-width:18px;height:18px;padding:0 4px;border-radius:10px;margin-left:3px}
#range-simulator .roster-conditions{display:flex;flex-wrap:wrap;gap:3px 8px;color:#4b3c1b}
#range-simulator .brushes{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}
#range-simulator .brushes .brush{width:100%;min-width:0;max-width:none;min-height:54px;padding:5px 2px;background:#233f59;color:#f2f4ff;border-color:#233f59}
#range-simulator .brushes .brush[aria-pressed=true]{background:#075b92;box-shadow:inset 0 0 0 2px #b69559}
#range-simulator .brush small{font-size:9px;line-height:1.15}
#range-simulator .draw-actions{display:flex;flex-wrap:nowrap;gap:5px;align-items:center}
#range-simulator .draw-actions .draw-mode{display:flex;flex-wrap:nowrap;gap:5px}
#range-simulator .draw-actions .action-icon{display:grid;place-items:center;width:30px;min-width:30px;height:30px;min-height:30px;padding:3px;background:#233f59;color:#f2f4ff;border:1px solid #233f59;border-radius:5px}
#range-simulator .draw-mode [aria-pressed=true]{background:#075b92;box-shadow:0 0 0 2px #b69559}
#range-simulator .impassable-check{position:relative;display:block;flex:none;width:30px;height:30px}
#range-simulator .impassable-check input{position:absolute;inset:0;width:30px;height:30px;margin:0;opacity:0;cursor:pointer;z-index:1}
#range-simulator .impassable-check input:checked+span{background:#8f3543;box-shadow:0 0 0 2px #b69559}
#range-simulator .impassable-check input:focus-visible+span{outline:3px solid #0866b2;outline-offset:2px}
#range-simulator .draw-actions #add-open{margin-left:7px}
#range-simulator .draw-actions .history-host{margin-left:0}
#range-simulator .draw-actions #line-cancel{font-size:10px;min-height:30px;padding:3px}
#range-simulator .draw-actions:has(#line-cancel:not([hidden])){flex-wrap:wrap}
#range-simulator .condition-heading{display:flex;align-items:center;gap:6px}
#range-simulator .condition-heading strong{flex:1;min-width:0;font-size:14px}
#range-simulator .condition-heading button{min-width:29px;min-height:29px;height:29px;padding:0;font-size:17px}
#range-simulator .condition-heading input{margin-left:6px;flex:none}
#range-simulator .condition-duration{min-width:20px;text-align:center;font-size:13px}
#range-simulator .condition-option p{margin:7px 0 0}
#range-simulator .party-controls{margin:14px 12px;border-top:1px solid #c8d4df;padding-top:10px}
#range-simulator .party-controls h3{font-size:13px;margin:0 0 8px}
#range-simulator .party-controls .save-buttons{margin:9px 0;grid-template-columns:1fr 1fr}
#range-simulator .party-controls .save-buttons button:first-child{grid-column:1/-1}
#range-simulator textarea{font:inherit;border:1px solid #9fb1c3;border-radius:6px;padding:8px;width:100%;resize:vertical;color:var(--ink);background:white}
@media(max-width:430px){#range-simulator .deck-title strong{font-size:13px}
#range-simulator .deck-title{gap:0 5px}
#range-simulator .deck-tabs{gap:4px}
#range-simulator #combat-info{gap:5px;grid-template-columns:1fr 1fr 1fr 32px}
#range-simulator .brush small{font-size:8px}
#range-simulator .condition-tag{font-size:10px}
#range-simulator .view-actions{gap:4px}
}
#range-simulator #view-panel{display:flex;align-items:flex-end;gap:8px;flex-wrap:wrap}
#range-simulator #combat-info{display:flex;flex:1;gap:6px;margin-bottom:0;align-items:flex-end;min-width:0}
#range-simulator #combat-info .combat-stat{flex:1;min-width:66px;grid-template-columns:22px minmax(22px,1fr) 22px}
#range-simulator #combat-info .combat-stat button{min-width:22px}
#range-simulator #combat-info>label{flex:0 0 54px}
#range-simulator #combat-info>.deck-empty{flex:1}
#range-simulator .view-actions{flex:none;gap:4px;padding-bottom:1px}
#range-simulator .view-actions .history-icons{gap:4px}
#range-simulator #movement-controls{flex:0 0 100%}
#range-simulator .roster-conditions{gap:8px 12px;padding-top:4px;line-height:1.6}
#range-simulator .roster-conditions .condition-tag{position:relative;display:inline-block;padding-right:12px;white-space:nowrap}
#range-simulator .roster-conditions .round-pill{position:absolute;right:0;top:-5px;min-width:20px;height:14px;padding:0 5px;margin:0;border-radius:7px;font-size:9px;line-height:14px;box-shadow:0 0 0 1px white}
@media(max-width:600px){#range-simulator #view-panel{gap:4px;flex-wrap:nowrap}
#range-simulator #view-panel:has(#movement-controls:not([hidden])){flex-wrap:wrap}
#range-simulator #combat-info{gap:3px}
#range-simulator #combat-info .combat-stat{min-width:52px;grid-template-columns:16px minmax(20px,1fr) 16px}
#range-simulator #combat-info .combat-stat button{min-width:16px;font-size:13px}
#range-simulator #combat-info .combat-stat>span,#range-simulator #combat-info>label{font-size:9px;line-height:13px}
#range-simulator #combat-info>label{flex:0 0 32px}
#range-simulator #combat-info .combat-stat button,#range-simulator #combat-info .combat-stat strong,#range-simulator #combat-info input{height:28px;min-height:28px;line-height:26px;font-size:12px}
#range-simulator #combat-info .conditions-open.action-icon{width:26px;min-width:26px;flex-basis:26px;height:28px;min-height:28px;padding:2px}
#range-simulator .view-actions{gap:3px;padding-bottom:1px}
#range-simulator .view-actions .history-icons{gap:3px}
#range-simulator .view-actions .action-icon,#range-simulator .view-actions .history-icons .action-icon{width:26px;min-width:26px;height:26px;min-height:26px;flex-basis:26px;padding:2px}
#range-simulator .view-actions .action-icon svg,#range-simulator #combat-info .conditions-open svg{width:22px;height:22px}
}
@media(min-width:601px){#range-simulator #combat-info{flex:0 1 auto}
#range-simulator #combat-info .combat-stat{width:80px;flex:none}
#range-simulator .conditions-open.action-icon{flex:none}
}
#range-simulator .view-actions{--action-gap:4px;gap:var(--action-gap)}
#range-simulator .view-actions #remove{margin-left:var(--action-gap)}
#range-simulator .view-actions #view-history{margin-left:var(--action-gap)}
#range-simulator .view-actions #movement-controls{flex:none;padding:0;margin:0 0 0 var(--action-gap);border:0;background:transparent}
#range-simulator .view-actions #movement-controls .move-bar{padding:0;gap:calc(2 * var(--action-gap));flex-wrap:nowrap}
#range-simulator .view-actions #movement-controls .action-icon{width:30px;min-width:30px;height:30px;min-height:30px;flex-basis:30px;padding:3px}
#range-simulator .view-actions .conditions-open.action-icon{width:30px;min-width:30px;height:30px;min-height:30px;flex-basis:30px;padding:3px;align-self:center}
#range-simulator #view-panel:has(#movement-controls:not([hidden])){flex-wrap:nowrap}
#range-simulator .draw-actions #expand-map{margin-left:auto}
#range-simulator .draw-actions #add-open{margin-left:0}
#range-simulator .setup-party-row{display:flex;align-items:flex-end;gap:10px}
#range-simulator .setup-party-row label{margin:12px 0;min-width:0}
#range-simulator .setup-party-row label:first-child{flex:0 0 64px}
#range-simulator .setup-party-row label:last-child{flex:1}
#range-simulator .setup-party-row>span{align-self:center;font-size:12px}
#range-simulator .combatant-name{cursor:text;touch-action:manipulation}
@media(max-width:600px){#range-simulator .view-actions{--action-gap:3px}
#range-simulator .view-actions .conditions-open.action-icon,#range-simulator .view-actions #movement-controls .action-icon{width:26px;min-width:26px;height:26px;min-height:26px;flex-basis:26px;padding:2px}
#range-simulator #view-panel:has(#movement-controls:not([hidden])) #combat-info .combat-stat{min-width:46px;grid-template-columns:13px minmax(20px,1fr) 13px}
#range-simulator #view-panel:has(#movement-controls:not([hidden])) #combat-info .combat-stat button{min-width:13px}
#range-simulator #view-panel:has(#movement-controls:not([hidden])) #combat-info>label{flex-basis:28px}
#range-simulator .view-actions:has(#movement-controls:not([hidden])){--action-gap:2px}
#range-simulator .view-actions:has(#movement-controls:not([hidden])) .action-icon,#range-simulator .view-actions:has(#movement-controls:not([hidden])) #movement-controls .action-icon{width:22px;min-width:22px;height:26px;min-height:26px;flex-basis:22px;padding:1px}
#range-simulator .view-actions:has(#movement-controls:not([hidden])) .action-icon svg{width:20px;height:20px}
#range-simulator .view-actions .history-icons{gap:var(--action-gap)}
}

/* Fit the shared tool inside the main website frame without styling its chrome. */
#range-simulator{display:block;border-radius:8px;overflow:hidden;isolation:isolate;color-scheme:light}
#range-simulator main{padding:12px 0 24px;max-width:none}
#range-simulator .mast{padding:18px 16px}
#range-simulator dialog{line-height:1.45}
#range-simulator button,#range-simulator input,#range-simulator select{letter-spacing:normal;text-transform:none;box-shadow:none}
#range-simulator .roster-row{color:#172b40}
#range-simulator .local-note{margin:0;padding:8px 16px;font-size:11px;background:#f6f8fa;color:#425c73}
