#deal-route-game{position:fixed;inset:0;width:100vw;max-width:none;height:100dvh;max-height:none;margin:0;padding:0;border:0;overflow:hidden;background:#0e1117;color:#ebdec4;font:14px/1.4 ui-monospace,SFMono-Regular,Consolas,monospace;isolation:isolate}
#deal-route-game::backdrop{background:#080b10}
#deal-route-game::before{content:'';position:fixed;inset:0;z-index:-1;background:linear-gradient(90deg,#080b11ed,#080b1199 36% 64%,#080b11ed),var(--dr-art) center/cover no-repeat;opacity:.65;pointer-events:none}
#deal-route-game *,.dr-panel *{box-sizing:border-box}
#deal-route-game [hidden],.dr-panel [hidden]{display:none!important}
#deal-route-game button,.dr-panel button{font:inherit;min-height:44px;color:inherit;touch-action:manipulation;-webkit-tap-highlight-color:transparent;cursor:pointer}
#deal-route-game button:focus-visible,.dr-panel button:focus-visible,.dr-panel input:focus-visible,.dr-analytics-table:focus-visible{outline:2px solid #efcc90;outline-offset:2px}
#deal-route-game button:disabled,.dr-panel button:disabled{cursor:default}
.dr-shell{height:100%;width:min(100%,650px);margin:auto;display:flex;flex-direction:column;overflow:hidden;background:#12151beb;border-inline:1px solid #625043;box-shadow:0 0 70px #0007}
.dr-head{flex:none;display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:58px;padding:6px 17px;border-bottom:1px solid #6c563b;background:#211e26}
.dr-head h1{margin:0;font:600 23px/1.1 ui-serif,Georgia,serif;color:#f0dfbd;letter-spacing:.015em}
.dr-head-actions{display:flex;align-items:center;gap:12px}
#dr-ranking-button{min-width:82px;border:0;background:var(--dr-button-art,linear-gradient(#493139,#2d242b)) center/100% 100% no-repeat;color:#e4cda5;padding:7px 14px;font-size:11px}
#deal-route-game .dr-close,.dr-panel .dr-close{flex:none;display:grid;place-items:center;width:44px;min-height:44px;border:1px solid #745e42;border-radius:5px;background:#2b2730;padding:0;color:#ecd5aa;font-size:27px;line-height:1}
.dr-participants{flex:none;display:grid;grid-template-columns:1fr 1.1fr 1fr;align-items:center;gap:8px;padding:7px 21px 0;min-height:158px}
.dr-person{display:flex;flex-direction:column;align-items:center;gap:0;min-width:0;color:#c7b291}
.dr-person>img{display:block;width:100%;height:88px;object-fit:contain;user-select:none;pointer-events:none}
.dr-person span{font-size:10px;line-height:1.2;letter-spacing:.015em}
.dr-endpoint-heading{display:flex;align-items:center;justify-content:center;gap:3px;min-height:62px;width:100%;color:#eda88b}
.dr-buyer .dr-endpoint-heading{color:#9bcfe6}
.dr-terminal-frame{position:relative;display:block;flex:none;width:48px;height:62px;overflow:hidden;pointer-events:none;user-select:none}
.dr-terminal-art{position:absolute;display:block;left:50%;top:50%;width:74px;height:80px;max-width:none;object-fit:contain;transform:translate(-50%,-50%);pointer-events:none;user-select:none}
.dr-buyer .dr-terminal-art{left:calc(50% - 6px);width:64px;height:72px}
.dr-endpoint-name{min-width:0;text-align:left}
.dr-endpoint-name strong{display:block;font-size:12px;font-weight:700;line-height:1.3}
.dr-endpoint-name span{display:block;margin-top:3px;color:#baa78b;font-size:9px;line-height:1.2}
.dr-clock{align-self:center;text-align:center;padding:10px 0 7px;min-width:0}
.dr-clock>span{display:block;color:#b4a78e;font-size:10px;line-height:1.3;letter-spacing:.04em}
.dr-time-value{display:flex;align-items:center;justify-content:center;gap:6px;margin:3px 0 8px;min-width:0}
.dr-timer-art{display:block;flex:none;width:27px;height:31px;object-fit:contain;pointer-events:none;user-select:none}
.dr-clock output{display:block;font-size:31px;line-height:1.05;font-weight:600;color:#f2dbac;font-variant-numeric:tabular-nums;letter-spacing:.03em}
.dr-time-track{height:5px;margin:0 auto;max-width:135px;overflow:hidden;border:1px solid #715b3e;border-radius:3px;background:#080d14;box-shadow:0 1px #dec3960d}
.dr-time-track i{display:block;width:100%;height:100%;background:#c59c61;transform-origin:left center;will-change:transform;transition:transform .12s linear}
.is-urgent .dr-clock output{color:#e3a584}
.is-urgent .dr-time-track i{background:#b96d54}
.dr-table{position:relative;flex:1;min-height:0;display:flex;align-items:center;justify-content:center;padding:3px 9px 7px;isolation:isolate}
.dr-board{position:relative;flex:none;aspect-ratio:1;width:min(100%,calc(100dvh - 284px));max-height:100%;isolation:isolate}
.dr-board-art{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:fill;border-radius:10px;pointer-events:none;user-select:none}
.dr-grid{position:absolute;inset:7.5%;display:grid;grid-template-columns:repeat(var(--dr-size,6),minmax(0,1fr));grid-template-rows:repeat(var(--dr-size,6),minmax(0,1fr));gap:0;background:#151923;border:1px solid #7e6847;box-shadow:inset 0 0 0 1px #070b12;isolation:isolate}
#deal-route-game .dr-tile{position:relative;display:block;min-width:0;min-height:0;width:100%;height:100%;border:0;padding:0;border-radius:0;background:#171c25;user-select:none;outline-offset:-3px}
.dr-cell,.dr-turn,.dr-wire,.dr-current{position:absolute;inset:0;display:block;width:100%;height:100%;pointer-events:none;user-select:none}
.dr-cell{object-fit:fill}
.dr-turn{z-index:1}
.dr-tile::after{content:'';position:absolute;inset:2px;pointer-events:none;border:1px solid transparent;z-index:0}
.dr-turn{transform-origin:50% 50%;transition:transform .2s cubic-bezier(.22,.72,.25,1)}
.dr-wire,.dr-current{object-fit:fill}
.dr-current{opacity:0;filter:drop-shadow(0 0 3px #ffcf70) drop-shadow(0 0 1px #ffdeac);transition:opacity .16s}
.dr-wire{z-index:1}
.dr-tile.is-connected .dr-wire{filter:brightness(1.25)}
.dr-tile.is-connected .dr-current{opacity:.3}
.dr-tile.is-connected::after{background:#e4be5a08;border-color:#f4d58b16}
.dr-tile.is-queued::after{border-color:#e5bf7f36}
@media(hover:hover){.dr-tile:not(:disabled):hover::after{background:#e8c6880c;border-color:#bca17166}.dr-tile:not(:disabled):active::after{background:#e8c68815}.dr-head button:hover{color:#ffe5b8}}
.dr-port{position:absolute;z-index:2;width:7.5%;height:10%;transform:translateY(-50%);pointer-events:none;--dr-port-color:#ed8567}
.dr-port::after{content:'';position:absolute;top:calc(50% - 3px);left:15%;right:-1px;height:6px;background:var(--dr-port-color);border-block:1px solid #f4d4ab;box-shadow:0 0 5px #000b}
.dr-port-seller{left:0}
.dr-port-buyer{right:0;--dr-port-color:#7fcbed}
.dr-port-buyer::after{left:-1px;right:15%}
.dr-port-station{display:none;position:absolute;z-index:2;right:30%;top:50%;width:112%;height:auto;max-height:140%;object-fit:contain;transform:translateY(-50%);filter:drop-shadow(0 2px 2px #000a)}
.dr-port-buyer .dr-port-station{left:30%;right:auto}
.dr-port-socket{position:absolute;left:5%;top:50%;z-index:2;width:66%;aspect-ratio:1;border:2px solid #d5b06f;border-radius:50%;background:radial-gradient(circle at 35% 30%,#fff1c0 0 6%,var(--dr-port-color) 18% 42%,#1b1417 48%);transform:translateY(-50%);box-shadow:0 1px 4px #000}
.dr-port-buyer .dr-port-socket{left:auto;right:5%}
.dr-port-arrow{position:absolute;z-index:4;right:0;top:50%;width:10px;height:10px;border-top:3px solid var(--dr-port-color);border-right:3px solid var(--dr-port-color);transform:translate(45%,-50%) rotate(45deg);filter:drop-shadow(0 1px 1px #000)}
.dr-port-buyer .dr-port-arrow{left:0;right:auto;transform:translate(-45%,-50%) rotate(45deg)}
.dr-tile.is-seller{box-shadow:inset 3px 0 #ed8567,inset 0 2px #ed85673b,inset 0 -2px #ed85673b}
.dr-tile.is-buyer{box-shadow:inset -3px 0 #7fcbed,inset 0 2px #7fcbed3b,inset 0 -2px #7fcbed3b}
.dr-tile.is-seller::after{border:2px solid #ed856775;border-left:4px solid #ed8567;background:#ed85670a}
.dr-tile.is-buyer::after{border:2px solid #7fcbed75;border-right:4px solid #7fcbed;background:#7fcbed0a}
.dr-tile.is-seller .dr-cell,.dr-tile.is-buyer .dr-cell{opacity:.85}
.is-source-waiting .dr-port-seller .dr-port-socket{animation:dr-source-pulse 1.65s ease-in-out infinite}
@keyframes dr-source-pulse{0%,100%{opacity:1;box-shadow:0 0 0 0 #ed856700}50%{opacity:.72;box-shadow:0 0 0 4px #ed856747}}
.is-complete .dr-port-buyer{--dr-port-color:#f0ca7e}
.dr-start-layer{position:absolute;inset:0;z-index:5;display:grid;place-items:center;background:#080d157a;border-radius:10px}
#deal-route-game .dr-primary,.dr-panel .dr-primary{border:1px solid #b59460;border-radius:5px;background:#6d3443;box-shadow:inset 0 1px #f5d09924,0 3px 0 #191016;color:#ffedc9;padding:11px 21px;font-weight:600}
#dr-start{min-width:150px;max-width:90%;font-size:15px!important;background:var(--dr-button-art,linear-gradient(#733e49,#59313e)) center/100% 100% no-repeat;box-shadow:0 4px 20px #000a!important}
.dr-footer{flex:none;display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:56px;padding:6px 17px 8px;border-top:1px solid #675238;background:#191a22}
#dr-status{margin:0;min-width:0;max-height:42px;overflow:auto;color:#d3ad92;font-size:10px;line-height:1.35;overflow-wrap:anywhere}
.dr-footer-actions{display:flex;align-items:center;gap:8px;margin-left:auto;flex:none}
.dr-footer-actions button{min-width:82px;border:0;background:var(--dr-button-art,linear-gradient(#493139,#2d242b)) center/100% 100% no-repeat;color:#e4cda5;padding:7px 14px;font-size:11px!important}
.dr-footer-actions button:disabled{opacity:.45}
body.deal-route-open #scene *{animation-play-state:paused!important}
.dr-panel{width:min(530px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:88dvh;margin:auto;padding:0;border:1px solid #97764c;border-top:2px solid #b59158;border-radius:8px;background:#191b24;color:#e9dac0;box-shadow:0 20px 80px #000c;font:13px/1.45 ui-monospace,SFMono-Regular,Consolas,monospace;overflow:hidden}
.dr-panel::backdrop{background:#070b12df}
.dr-panel[open]{display:flex;flex-direction:column}
.dr-panel button{padding:11px 18px;border:1px solid #7e6547;border-radius:4px;background:#302934;color:#ecdbbc}
.dr-panel button:not(.dr-close){border:0;background:var(--dr-button-art,linear-gradient(#493139,#2d242b)) center/100% 100% no-repeat}
.dr-panel .dr-primary{background:var(--dr-button-art,linear-gradient(#733e49,#59313e)) center/100% 100% no-repeat;box-shadow:none}
.dr-panel button:hover{background:#44313b}
.dr-panel button:disabled{opacity:.5}
.dr-panel-head{flex:none;display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:64px;padding:8px 14px;border-bottom:1px solid #65513b;background:#29232c}
.dr-panel-head h2{margin:0;font-size:19px;line-height:1.25;color:#f1dfbb}
.dr-panel-content{min-height:0;padding:16px;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#94704e #14161e}
.dr-panel-content>label{display:block;margin-bottom:6px;font-size:11px;color:#baab91}
#dr-ranking-search{display:block;width:100%;min-height:44px;margin-bottom:17px;padding:10px 12px;border:1px solid #6e5b43;border-radius:4px;background:#101720;color:#eedfc2;font:inherit}
.dr-ranking-columns,#dr-ranking-list li{display:grid;grid-template-columns:44px minmax(0,1fr) 105px;align-items:center;gap:8px;padding:11px 7px}
.dr-ranking-columns{padding-top:0;font-size:10px;color:#b9a689;border-bottom:1px solid #66533c}
.dr-ranking-columns>:last-child{text-align:right}
#dr-ranking-list{list-style:none;margin:0;padding:0}
#dr-ranking-list li{min-height:48px;border-bottom:1px solid #ffffff0d}
#dr-ranking-list strong{min-width:0;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#dr-ranking-list time{text-align:right;white-space:nowrap;font-size:12px;font-variant-numeric:tabular-nums;color:#edd19b}
.dr-rank{font-size:12px;color:#ac9170}
#dr-ranking-list li.is-self{background:#b3864910;box-shadow:inset 2px 0 #c4a16a}
.dr-panel-status{min-height:17px;margin:12px 0 0;color:#cab699;font-size:11px;overflow-wrap:anywhere}
.dr-more{display:block;margin:12px auto 0}
.dr-result{position:relative;width:min(480px,calc(100vw - 24px));overflow:auto;background:#161a23}
.dr-result .dr-result-close{position:absolute;top:10px;right:10px;z-index:3;background:#1d1a24e8}
.dr-result-art{position:relative;flex:none;width:100%;height:min(43dvh,350px);padding:16px 20px 0;background:radial-gradient(ellipse at 50% 75%,#91654420,transparent 65%)}
.dr-result-hunter{display:block;width:100%;height:100%;object-fit:contain;object-position:center bottom;pointer-events:none;user-select:none}
.dr-result-pair{display:none;align-items:center;justify-content:center;gap:10px;height:100%}
.dr-result-pair img{display:block;width:43%;height:100%;object-fit:contain;pointer-events:none;user-select:none}
.dr-result-pair span{font-size:25px;color:#cfa360}
.dr-result.is-success .dr-result-hunter{display:none}
.dr-result.is-success .dr-result-pair{display:flex}
.dr-result.is-success .dr-result-art{height:min(32dvh,250px);padding-bottom:8px}
.dr-result-copy{position:relative;flex:none;padding:20px 23px 24px;text-align:center;border-top:1px solid #8d704855;background:#191b24}
.dr-result-copy h2{margin:0 0 12px;font:600 27px/1.2 ui-serif,Georgia,serif;color:#f1dfb8}
.dr-result-copy p{max-width:350px;margin:0 auto 17px;font-size:13px;line-height:1.6;color:#cdbb9e}
.dr-result-copy time{display:block;margin:0 0 18px;color:#e5ca96;font-size:19px;font-variant-numeric:tabular-nums}
.dr-result-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:9px}
#deal-route-analytics{width:min(820px,calc(100vw - 24px))}
.dr-analytics-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:16px}
.dr-analytics-summary>div{min-width:0;padding:11px;border:1px solid #5b4d3c;border-radius:4px;background:#20232c}
.dr-analytics-summary span{display:block;font-size:10px;color:#bca98c;overflow-wrap:anywhere}
.dr-analytics-summary strong{display:block;margin-top:5px;font-size:24px;color:#ecd2a1;font-variant-numeric:tabular-nums}
.dr-analytics-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}
.dr-analytics-table{max-height:45dvh;margin-top:10px;overflow:auto;overscroll-behavior:contain;border:1px solid #514536;border-radius:3px;scrollbar-width:thin;scrollbar-color:#94704e #14161e}
.dr-analytics-table table{min-width:540px;width:100%;border-collapse:collapse;font-size:12px;font-variant-numeric:tabular-nums}
.dr-analytics-table th,.dr-analytics-table td{padding:11px 10px;text-align:right;white-space:nowrap;border-bottom:1px solid #ffffff0e}
.dr-analytics-table th:first-child,.dr-analytics-table td:first-child{text-align:left}
.dr-analytics-table th{position:sticky;top:0;background:#302832;font-size:10px;font-weight:500;color:#d6b68a}
.dr-analytics-table td:first-child{max-width:220px;overflow:hidden;text-overflow:ellipsis}
.dr-analytics-table tr:nth-child(even){background:#ffffff03}
.dr-analytics-table .dr-analytics-empty{text-align:center;padding:25px;color:#bba98c}
@media(min-width:700px){.dr-shell{height:calc(100dvh - 20px);margin-top:10px;border:1px solid #796041;border-radius:9px}.dr-head{padding-inline:21px}.dr-head h1{font-size:25px}.dr-participants{padding:8px 35px 0;min-height:120px}.dr-board{width:min(100%,calc(100dvh - 270px))}.dr-footer{padding-inline:22px}}
@media(max-width:360px){.dr-head{min-height:52px;padding:4px 10px;gap:6px}.dr-head h1{font-size:20px}.dr-head-actions{gap:7px}#dr-ranking-button{font-size:10px}.dr-participants{min-height:96px;padding:3px 13px 0;gap:5px}.dr-person img{height:76px}.dr-person span{font-size:9px}.dr-clock output{font-size:26px}.dr-clock>span{font-size:9px}.dr-clock{padding:5px 0}.dr-table{padding:1px 4px 5px}.dr-board{width:min(100%,calc(100dvh - 210px))}.dr-footer{min-height:52px;padding:4px 11px 6px}.dr-panel-content{padding:12px}.dr-panel-head{padding:7px 11px}.dr-panel-head h2{font-size:17px}.dr-ranking-columns,#dr-ranking-list li{grid-template-columns:35px minmax(0,1fr) 94px;gap:5px;padding-inline:3px}#dr-ranking-list time{font-size:11px}.dr-result-copy{padding:16px 15px 20px}.dr-result-copy h2{font-size:24px}.dr-result-copy p{font-size:12px}.dr-analytics-summary{gap:6px}.dr-analytics-summary>div{padding:9px 7px}}
@media(max-height:440px) and (min-width:440px){.dr-shell{position:relative;display:grid;grid-template-columns:190px minmax(0,1fr);grid-template-rows:96px 1fr 55px;width:min(100%,820px);height:100dvh;margin-top:0;border:0;border-radius:0}.dr-head{grid-column:1;grid-row:1;flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:4px;padding:12px 15px;border:0;background:transparent}.dr-head h1{font-size:23px}.dr-head-actions{gap:12px}.dr-participants{grid-column:1;grid-row:2;grid-template-columns:1fr 1fr;grid-template-rows:1fr 62px;align-self:center;gap:0;padding:0 12px}.dr-person img{height:min(23dvh,90px)}.dr-person span{font-size:8px}.dr-clock{grid-column:1/3;grid-row:2;padding:4px 15px}.dr-clock output{font-size:26px;margin:2px 0 5px}.dr-clock>span{font-size:8px}.dr-table{grid-column:2;grid-row:1/4;padding:5px 10px 5px 0}.dr-board{width:min(100%,calc(100dvh - 10px))}.dr-footer{grid-column:1;grid-row:3;align-self:end;flex-direction:column;gap:0;min-height:0;padding:1px 12px;border:0;background:transparent}.dr-footer-actions{margin:0}.dr-footer-actions button{padding:4px 7px;min-height:39px}#dr-status{font-size:9px;max-height:26px}.dr-result-art{height:40dvh}.dr-result-copy{padding:13px 18px}.dr-result-copy h2{font-size:23px}.dr-result-copy p{font-size:12px;line-height:1.45;margin-bottom:12px}}
@media(prefers-reduced-motion:reduce){.dr-turn,.dr-current,.dr-time-track i{transition:none!important}}
@media(max-width:360px){.dr-timer-art{width:22px;height:27px}.dr-time-value{gap:4px}.dr-clock output{font-size:24px}}
@media(max-height:440px) and (min-width:440px){.dr-head h1{font-size:19px;white-space:nowrap}}
@media(max-width:420px){.dr-head h1{font-size:20px;white-space:nowrap}.dr-table{align-items:flex-start;padding-top:clamp(12px,3dvh,26px);padding-bottom:12px}}
@media(max-width:360px){.dr-head h1{font-size:19px;white-space:normal}.dr-table{padding-top:12px}}
@media(min-width:700px){.dr-participants{min-height:157px}.dr-board{width:min(calc(100% - 50px),calc(100dvh - 305px))}.dr-port-station{display:block;width:80px;height:88px;min-width:80px;min-height:88px;max-height:none}.dr-port-socket{display:none}.dr-port::after{z-index:1}.dr-terminal-frame{display:none}.dr-endpoint-heading{min-height:39px}.dr-endpoint-name{text-align:center}.dr-endpoint-name strong{font-size:13px}.dr-endpoint-name span{font-size:10px}.dr-person>img{height:105px}}
@media(max-width:699px) and (min-height:441px){.dr-person>img{height:76px}.dr-participants{min-height:145px;padding-inline:12px}.dr-terminal-frame{width:48px;height:62px}.dr-endpoint-heading{min-height:62px;gap:1px}.dr-endpoint-name strong{font-size:11px}.dr-endpoint-name span{font-size:8px}.dr-board{width:min(100%,calc(100dvh - 272px))}}
@media(max-width:360px) and (min-height:441px){.dr-person>img{height:62px}.dr-participants{min-height:128px;padding-inline:9px;grid-template-columns:1fr 1fr 1fr}.dr-terminal-frame{width:44px;height:58px}.dr-endpoint-heading{min-height:60px;gap:1px}.dr-endpoint-name strong{font-size:11px}.dr-endpoint-name span{font-size:8px}.dr-board{width:min(100%,calc(100dvh - 246px))}}
@media(max-height:440px) and (min-width:440px){.dr-person>img{height:50px}.dr-terminal-frame{display:block;width:34px;height:42px;overflow:hidden}.dr-terminal-art{width:49px;height:53px}.dr-buyer .dr-terminal-art{width:43px;height:48px;left:calc(50% - 4px)}.dr-endpoint-heading{min-height:44px;gap:0}.dr-endpoint-name strong{font-size:10px}.dr-endpoint-name span{font-size:7px}.dr-participants{min-height:0}.dr-port-station{display:none}.dr-port-socket{display:block}.dr-board{width:min(100%,calc(100dvh - 10px))}}
@media(prefers-reduced-motion:reduce){.dr-port-socket{animation:none!important}}
