
:root{
  --bg:#f4efe3; --paper:#fffaf0; --ink:#22251f; --muted:#716f66; --line:#c9bea8;
  --road:#d6c39c; --port:#c98d5e; --red:#d96a63; --blue:#5e8ec4; --green:#6e9f6a;
  --special:#d8b55a; --empty:#ece7dd; --accent:#3e5e4e; --danger:#a94442;
}
*{box-sizing:border-box} body{margin:0;font-family:Inter,"PingFang SC","Microsoft YaHei",sans-serif;background:var(--bg);color:var(--ink)}
button,input,select{font:inherit} button{cursor:pointer;border:1px solid #9d927d;background:#fffaf0;border-radius:9px;padding:7px 10px;color:var(--ink)}
button:hover:not(:disabled){transform:translateY(-1px);box-shadow:0 2px 0 rgba(0,0,0,.08)} button:disabled{opacity:.42;cursor:not-allowed}
.primary{background:var(--accent);color:white;border-color:var(--accent)} .danger{background:#8a403d;color:white;border-color:#8a403d}
.small{font-size:12px;padding:4px 7px}.pill{display:inline-block;padding:2px 7px;border-radius:999px;background:#eee6d7;font-size:12px;margin:2px}
#app{min-height:100vh}.topbar{display:flex;gap:10px;align-items:center;padding:10px 14px;background:#282d28;color:white;position:sticky;top:0;z-index:20;box-shadow:0 2px 8px rgba(0,0,0,.15)}
.topbar .brand{font-weight:800;letter-spacing:.4px;margin-right:auto}.topbar button{background:#f8f2e5}.topbar .round{font-weight:700}
.layout{display:grid;grid-template-columns:minmax(460px,1.2fr) minmax(360px,.8fr);gap:14px;padding:14px;max-width:1500px;margin:auto}
.panel{background:var(--paper);border:1px solid var(--line);border-radius:16px;padding:12px;box-shadow:0 4px 16px rgba(70,55,35,.08)}
.panel h2,.panel h3{margin:0 0 8px}.board-wrap{display:grid;grid-template-columns:1fr;gap:10px}.board{display:grid;grid-template-columns:repeat(7,1fr);gap:5px;aspect-ratio:1/1;max-width:820px;margin:auto;width:100%;user-select:none}
.cell{position:relative;border:1px solid #b6aa94;border-radius:10px;display:flex;align-items:center;justify-content:center;min-width:0;overflow:hidden;background:var(--empty);transition:.15s}
.cell.road{background:var(--road)} .cell.port{background:var(--port);color:white}.cell.blank{background:repeating-linear-gradient(135deg,#f1ede5,#f1ede5 9px,#e9e3d8 9px,#e9e3d8 18px);border-style:dashed}
.cell.resource.red{background:linear-gradient(145deg,#f0c0bd,#d96a63)} .cell.resource.blue{background:linear-gradient(145deg,#bfd4ec,#5e8ec4)} .cell.resource.green{background:linear-gradient(145deg,#c6ddc4,#6e9f6a)}
.cell.special{background:linear-gradient(145deg,#f2df9d,#d8b55a)} .cell.depleted{filter:grayscale(.65);opacity:.72}
.cell.movable,.cell.targetable{outline:3px solid #3d7c61;outline-offset:-3px}.cell.path{box-shadow:inset 0 0 0 3px #fff}.cell .label{font-size:12px;font-weight:800;text-align:center;padding:2px 4px;line-height:1.1;text-shadow:0 1px rgba(255,255,255,.35)}
.cell .sub{font-size:10px;font-weight:600}.tokens{position:absolute;left:3px;right:3px;bottom:3px;display:flex;gap:3px;justify-content:center;flex-wrap:wrap}.token{width:22px;height:22px;border-radius:50%;border:2px solid #fff;box-shadow:0 1px 3px rgba(0,0,0,.35);display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:900;color:white}.p0{background:#3949ab}.p1{background:#c33f52}.p2{background:#2f7c57}.p3{background:#9a6b29}
.firstflag{position:absolute;top:3px;right:3px;background:#222;color:#fff;border-radius:7px;padding:1px 4px;font-size:9px}.roadnum{position:absolute;top:3px;left:4px;font-size:9px;opacity:.65}.crystals{position:absolute;top:3px;right:3px;font-size:10px;background:rgba(255,255,255,.75);border-radius:8px;padding:1px 4px}
.statusline{display:flex;flex-wrap:wrap;gap:7px;align-items:center}.notice{padding:8px 10px;border-radius:10px;background:#eee7d7;border-left:4px solid var(--accent);font-size:13px}.notice.warn{border-left-color:#bd6c42;background:#f8e4d5}
.players{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:8px}.player-card{border:1px solid var(--line);border-radius:12px;padding:9px;background:#fffdf7}.player-card.active{outline:3px solid #3e5e4e}.player-card.returned{background:#edf5eb}.player-title{display:flex;align-items:center;gap:7px;font-weight:800}.dot{width:12px;height:12px;border-radius:50%;display:inline-block}.stats{font-size:12px;line-height:1.55;color:#4d4d47;margin-top:5px}.charge{display:inline-flex;gap:2px;vertical-align:middle}.charge i{display:block;width:12px;height:7px;border-radius:2px;background:#ddd}.charge i.on{background:#d59b31}
.hand{display:flex;flex-wrap:wrap;gap:7px}.card{width:138px;min-height:86px;border:1px solid #afa48f;border-radius:11px;background:white;padding:7px;position:relative;box-shadow:0 2px 4px rgba(0,0,0,.06)}.card.move{background:#f3ead9}.card.func{background:#edf2ec}.card .name{font-weight:800;font-size:13px}.card .desc{font-size:11px;color:#5d5c55;margin-top:5px;line-height:1.3}.card button{margin-top:6px;width:100%}
.actions{display:flex;gap:6px;flex-wrap:wrap}.section{border-top:1px dashed #cec4b1;padding-top:10px;margin-top:10px}.tasks{display:grid;gap:5px}.task{font-size:12px;padding:6px 7px;border-radius:9px;background:#f2ede2;border:1px solid #ddd1bd}.task.done{background:#e1efe0;text-decoration:none}.task .secret{filter:blur(5px);user-select:none}.task.reveal .secret{filter:none}.task.easy{border-left:4px solid #7fa771}.task.medium{border-left:4px solid #d6a94d}.task.hard{border-left:4px solid #9d5854}
.log{height:245px;overflow:auto;background:#242824;color:#dfe7dc;border-radius:12px;padding:8px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11px;line-height:1.45}.log div{border-bottom:1px solid rgba(255,255,255,.06);padding:3px 0}.log .turn{color:#ffd77a}.log .score{color:#9de19b}.log .bad{color:#f7a3a3}
#setup{max-width:760px;margin:40px auto;padding:24px}.setup-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.setup-grid label{display:grid;gap:5px;font-size:13px}.setup-grid input,.setup-grid select{padding:9px;border:1px solid var(--line);border-radius:9px;background:white}
.modal-back{position:fixed;inset:0;background:rgba(24,25,21,.63);z-index:100;display:flex;align-items:center;justify-content:center;padding:20px}.modal{max-width:650px;width:100%;max-height:85vh;overflow:auto;background:#fffaf0;border-radius:16px;padding:18px;border:1px solid #a99b82;box-shadow:0 16px 60px rgba(0,0,0,.3)}.modal h3{margin-top:0}.choice-list{display:grid;gap:7px}.choice{padding:9px;border:1px solid #c8bda8;border-radius:10px;background:white;text-align:left}.choice.selected{outline:3px solid #4e7c62}.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:12px}
.debug-grid{display:flex;flex-wrap:wrap;gap:5px}.hidden{display:none!important}.world{padding:8px;border-radius:10px;background:#e8eef2;border:1px solid #b9c7d1}.world strong{display:block}.endbox{padding:14px;border-radius:14px;background:#242824;color:white}.scoretable{width:100%;border-collapse:collapse}.scoretable td,.scoretable th{padding:7px;border-bottom:1px solid #ddd;text-align:left}
@media(max-width:980px){.layout{grid-template-columns:1fr}.board{max-width:700px}.card{width:150px}}@media(max-width:560px){.layout{padding:7px}.panel{border-radius:10px}.cell{border-radius:6px}.cell .label{font-size:9px}.token{width:18px;height:18px}.setup-grid{grid-template-columns:1fr}}
.rr-replay{max-width:1472px;margin:20px auto 0;padding:20px}.rr-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}.rr-heading h2{font-size:25px;margin:4px 0 0}.rr-kicker{font-size:11px;font-weight:800;letter-spacing:1px;color:var(--accent)}.rr-intro,.rr-note{font-size:13px;line-height:1.7;color:var(--muted)}.rr-games{display:flex;gap:10px;flex-wrap:wrap}.rr-game{flex:1;min-width:240px;text-align:left;padding:13px 15px}.rr-game strong{display:block;font-size:16px;margin-bottom:5px}.rr-game span{display:block;font-size:12px;line-height:1.6;overflow-wrap:anywhere}.rr-game[aria-pressed=true]{outline:2px solid var(--accent);background:#e5eee3}.rr-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:7px;margin-top:14px}.rr-toolbar label{font-size:12px;display:flex;align-items:center;gap:5px}.rr-toolbar select,.rr-seek select{padding:7px;border:1px solid var(--line);border-radius:8px;background:white}.rr-toolbar #rrExit{margin-left:auto}.rr-seek{display:grid;grid-template-columns:auto minmax(220px,1fr) minmax(100px,1fr);align-items:center;gap:10px;margin:12px 0;font-size:12px}.rr-seek select{min-width:0;width:100%}.rr-seek input{width:100%;accent-color:var(--accent)}.rr-current{display:flex;gap:12px;justify-content:space-between;align-items:center;background:#e7ede2;border-radius:9px;padding:10px 12px;font-size:13px}.rr-current span{white-space:nowrap;font-size:12px;color:var(--muted)}.rr-fold{border-top:1px solid var(--line);margin-top:12px;padding-top:10px;font-size:13px;line-height:1.65}.rr-fold>summary{cursor:pointer;font-weight:700}.rr-fold p{margin:8px 0}.rr-table-wrap{overflow-x:auto;margin:10px 0}.rr-table{width:100%;border-collapse:collapse;font-size:12px;white-space:nowrap}.rr-table th,.rr-table td{padding:8px;text-align:left;border-bottom:1px solid var(--line)}.rr-table th{background:#f0eadc}.rr-list{padding-left:21px;margin:8px 0}.rr-list li{margin:5px 0}.rr-replay-mode #setup,.rr-replay-mode #game>.topbar>button,.rr-replay-mode #game .layout>aside:not(#rrReplayState),.rr-replay-mode #debugPanel,.rr-replay-mode #moveControls,.rr-replay-mode #moveNotice{display:none!important}.rr-replay-mode #game>.topbar{position:sticky;top:0;gap:7px;flex-wrap:wrap}.rr-replay-mode .rr-intro,.rr-replay-mode .rr-kicker{display:none}.rr-replay-mode .rr-heading h2{font-size:20px}.rr-replay-mode .rr-game{padding:8px 12px}.rr-replay-mode .rr-replay{padding-top:12px;padding-bottom:12px}#rrBoardControls{display:none}.rr-replay-mode #rrBoardControls{display:flex;align-items:center;gap:6px;margin-left:auto}.rr-replay-mode #rrBoardControls span{font-size:12px;white-space:nowrap;min-width:40px}.rr-replay-mode #game>.topbar .brand{font-size:13px}.rr-replay-mode #game>.topbar .round{font-size:12px}.rr-replay-mode #game .board{cursor:default}.rr-replay-mode #game .cell.rr-arrival{outline:3px solid #263f32;outline-offset:-3px}.rr-replay-mode #game .cell{transition:none}.rr-replay-mode .player-card.rr-actor{outline:3px solid var(--accent)}#rrReplayState{display:none}.rr-replay-mode #rrReplayState{display:block}.rr-state-panel{margin-bottom:14px}.rr-state-panel h3{font-size:16px}.rr-action-list{font-size:13px;line-height:1.65;padding-left:22px;margin:8px 0;max-height:310px;overflow:auto}.rr-action-list li{padding:3px 0}.rr-deltas{display:grid;gap:6px;font-size:12px;line-height:1.7}.rr-delta{background:#f0eadf;border-radius:8px;padding:7px 9px}.rr-player-tasks{border:1px solid var(--line);border-radius:10px;padding:9px;margin-top:9px}.rr-player-tasks>summary{font-size:13px;font-weight:700;cursor:pointer}.rr-task{font-size:12px;line-height:1.5;padding:7px 0;border-bottom:1px dashed var(--line)}.rr-task:last-child{border:0}.rr-task strong{display:block}.rr-task.done{color:#28603d}.rr-task-progress{color:var(--muted);font-size:11px;margin-top:3px}.rr-hands{font-size:12px;line-height:1.7;background:#f2ecdf;border-radius:8px;padding:8px;margin-top:9px}.rr-mini{font-size:11px;line-height:1.6;color:var(--muted);margin-top:6px}.rr-iteration{border-left:3px solid var(--accent);padding:0 0 0 12px;margin:15px 0}.rr-iteration h4{margin:0;font-size:14px}.rr-tag{font-size:11px;padding:2px 6px;border-radius:5px;background:#eee4d1;margin-left:5px}.rr-replay-mode .player-card .rr-score-extra{border-top:1px dashed var(--line);margin-top:6px;padding-top:6px;font-size:11px;line-height:1.6}
@media(max-width:1500px){.rr-replay{margin-left:14px;margin-right:14px}}@media(max-width:680px){.rr-replay{padding:13px;margin:10px 7px 0}.rr-game{min-width:0;flex-basis:100%}.rr-seek{grid-template-columns:auto minmax(0,1fr)}.rr-seek input{grid-column:1/-1}.rr-toolbar #rrExit{margin-left:0}.rr-current{align-items:flex-start}.rr-current strong{font-size:12px}.rr-toolbar button{font-size:12px;padding:7px 8px}.rr-heading h2{font-size:22px}}


:root{--bg:#f2f6fa;--paper:#fff;--ink:#193044;--muted:#697c8d;--line:#dce5ec;--accent:#174e68;--danger:#ba4056;--road:#e5ecf3;--empty:#f5f8fb;--port:#215a75;--red:#d35c76;--blue:#4682c4;--green:#32917a;--special:#efd48c}
body{font-family:"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;background:var(--bg);color:var(--ink);font-size:14px;line-height:1.5}
button,input,select{font:inherit}button{border:1px solid var(--line);border-radius:9px;background:white;color:var(--ink);padding:8px 11px;font-weight:600;transition:background .12s,border-color .12s}
button:hover:not(:disabled){transform:none;box-shadow:none;background:#f0f6fa;border-color:#adc3d2}button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #91cbd9;outline-offset:3px}button:disabled{opacity:.45;cursor:not-allowed}
button.primary{background:var(--accent);border-color:var(--accent);color:white}button.primary:hover:not(:disabled){background:#103e56;border-color:#103e56}button.danger{background:#fff5f6;border-color:#ecc2ca;color:#a93449}
.hidden{display:none!important}.panel{background:white;border:1px solid var(--line);border-radius:14px;box-shadow:none}.pill,.ux-tag{background:#edf3f7;border-radius:6px;font-size:11px;color:#526a7b;padding:3px 7px}.ux-text-button{border-color:transparent;background:transparent;color:#536e81}.ux-brand-mark{font-size:25px;line-height:1;color:#276a83}.ux-eyebrow{font-size:11px;font-weight:700;letter-spacing:.6px;color:#7c909f}.notice{background:#eff6f8;border-left:3px solid #337c94;border-radius:9px;padding:10px 12px;font-size:13px}.notice.warn{background:#fff3ee;border-left-color:#c6784c}
.ux-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}.live-archive:not([open]){display:none}

/* Setup: one clear choice, optional configuration below. */
#setup.ux-setup{max-width:1060px;margin:38px auto;padding:34px 38px;background:white;border:1px solid var(--line);border-radius:20px;box-shadow:0 8px 28px #19304406}
.ux-setup-brand{display:flex;align-items:center;gap:9px;font-size:13px;font-weight:800;letter-spacing:1.1px}.ux-setup-brand .ux-tag{margin-left:auto;letter-spacing:0;font-weight:500}
.ux-setup h1{font-size:29px;line-height:1.35;letter-spacing:-.6px;margin:24px 0 10px;font-weight:750}.ux-setup-intro{font-size:14px;color:var(--muted);line-height:1.8;margin:0 0 25px}
.ux-quick-guide{display:grid;grid-template-columns:repeat(3,1fr);list-style:none;padding:13px 15px;margin:0 0 25px;border:1px solid #e3edf3;border-radius:11px;background:#f7fafc;gap:15px}.ux-quick-guide li{display:flex;align-items:center;gap:11px}.ux-quick-guide li>span{font-size:23px;font-weight:500;color:#7299ae;width:24px;text-align:center}.ux-quick-guide strong{display:block;font-size:12px;font-weight:650;color:#4b6a7f}.ux-quick-guide small{display:block;font-size:10px;color:#94a6b3;margin-top:3px}
.ux-role-picker{padding:0;margin:0;border:0;min-width:0}.ux-role-picker legend{font-weight:750;font-size:16px;padding:0}.ux-role-picker>p{font-size:12px;color:var(--muted);margin:6px 0 14px}
.ux-role-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.ux-role-option{display:flex;flex-direction:column;gap:7px;padding:17px 15px;border:1px solid var(--line);border-radius:13px;cursor:pointer;background:#fcfdfe;transition:background .12s,border-color .12s}
.ux-role-option:has(input:checked){background:#edf6f8;border-color:#4d8ba3;box-shadow:inset 0 0 0 1px #4d8ba3}.ux-role-option:focus-within{outline:3px solid #91cbd9;outline-offset:2px}.ux-role-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:3px}.ux-role-top input{width:18px;height:18px;margin:0;accent-color:var(--accent)}
.ux-role-icon{width:35px;height:35px;display:inline-flex;justify-content:center;align-items:center;border-radius:11px;font-size:15px;font-weight:800}.ux-role-explorer{background:#e9e8ff;color:#6560b2}.ux-role-disruptor{background:#ffe9ed;color:#aa4663}.ux-role-collector{background:#dff3eb;color:#287d67}.ux-role-gambler{background:#fff1d8;color:#967023}
.ux-role-option>strong{font-size:17px}.ux-role-caption{font-size:11px;color:#577085}.ux-role-description{font-size:12px;color:#758795;line-height:1.6;min-height:39px}.ux-role-control{font-size:11px;margin-top:7px;padding-top:10px;border-top:1px solid #dce7eb;color:#8496a4}.ux-control-human{display:none;color:#1d637c;font-weight:700}.ux-role-option:has(input:checked) .ux-control-human{display:inline}.ux-role-option:has(input:checked) .ux-control-ai{display:none}
.ux-setup-options{margin-top:23px;padding-top:17px;border-top:1px solid var(--line)}.ux-setup-options summary{font-size:12px;color:#617b8e;cursor:pointer;font-weight:600}.ux-options-grid{display:grid;grid-template-columns:1fr 1fr 1.25fr;gap:14px;margin-top:14px}.ux-options-grid label{display:grid;gap:6px;font-size:12px;color:#4c6476}.ux-options-grid input,.ux-options-grid select{width:100%;padding:9px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--ink);font-size:12px}.ux-options-grid small{font-size:10px;color:#8495a1;line-height:1.5}
.ux-setup-footer{display:flex;align-items:center;gap:10px;margin-top:24px}.ux-start{min-width:155px;padding:11px 18px}.ux-start span{margin-left:18px}.ux-setup #setupError:not(.hidden){margin-top:16px}

/* The play view keeps score, board and the current decision in one screen. */
#game>.ux-topbar{position:relative;top:auto;display:flex;align-items:center;gap:18px;min-height:58px;padding:10px max(20px,calc((100% - 1200px)/2));background:white;color:var(--ink);border-bottom:1px solid var(--line);box-shadow:none;z-index:20}
.ux-topbar .brand{display:flex;align-items:center;gap:8px;margin:0;font-size:12px;letter-spacing:1px;font-weight:800;white-space:nowrap}.ux-round{font-size:12px;color:#627a8d;background:#f1f5f8;padding:4px 9px;border-radius:6px;white-space:nowrap}.ux-header-actions{display:flex;align-items:center;gap:6px;margin-left:auto}.ux-header-actions button{font-size:12px;padding:6px 10px}
.ux-score-strip{max-width:1240px;margin:13px auto 0;padding:0 20px}.ux-scoreboard{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.ux-scoreboard .player-card{position:relative;background:white;border:1px solid var(--line);border-radius:11px;padding:10px 12px;min-width:0;box-shadow:none}.ux-scoreboard .player-card.active,.ux-scoreboard .player-card.is-active{outline:none;border-color:#528ba2;box-shadow:inset 0 0 0 1px #528ba2;background:#f1f8fa}.ux-scoreboard .player-card.returned{background:#eef8f3}.ux-scoreboard .player-title{font-size:12px;gap:6px;line-height:1.4}.ux-scoreboard .stats{font-size:11px;color:#78909f;line-height:1.55;margin-top:5px}.ux-scoreboard .dot{width:9px;height:9px;flex-shrink:0}.ux-scoreboard .live-score{font-size:11px;border:0;padding:3px 0 0;margin:0}.ux-scoreboard .live-score .pill{display:none}
.ux-player-top{display:flex;align-items:center;justify-content:space-between;gap:8px}.ux-player-name{font-size:12px;font-weight:700;display:flex;align-items:center;gap:6px}.ux-player-total,.ux-player-score{font-size:24px;line-height:1.1;font-weight:750;font-variant-numeric:tabular-nums;letter-spacing:-.5px}.ux-player-total small,.ux-player-score small{font-size:10px;font-weight:500;color:#8ca0ae;margin-left:3px}.ux-player-meta{display:flex;gap:10px;flex-wrap:wrap;color:#78909f;font-size:10px;margin-top:7px}.ux-player-status{font-size:9px;color:#658091;border-radius:4px;background:#f0f4f7;padding:1px 4px}.ux-player-progress{height:3px;margin-top:8px;background:#eaf0f4;border-radius:3px;overflow:hidden}.ux-player-progress>i{display:block;height:100%;background:#729dac}
.ux-scoreboard .ux-player{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;column-gap:10px;background:white;border:1px solid var(--line);border-radius:11px;padding:10px 12px;min-width:0}.ux-scoreboard .ux-player.is-active{background:#f0f8fa;border-color:#528ba2;box-shadow:inset 0 0 0 1px #528ba2}.ux-scoreboard .ux-player.is-returned{background:#eff8f3}.ux-player-title{display:flex;align-items:center;gap:6px;font-size:12px;font-weight:650;min-width:0}.ux-player-title .ux-role{font-size:11px}.ux-control{font-size:9px;font-weight:500;color:#8c9eab;margin-left:3px}.ux-score{font-size:25px;font-weight:750;line-height:1.15;font-variant-numeric:tabular-nums;letter-spacing:-.5px;text-align:right}.ux-score-label{font-size:9px;font-weight:500;color:#97a8b5;letter-spacing:0;margin-left:3px}.ux-player-stats{grid-column:1/-1;display:flex;gap:10px;flex-wrap:wrap;font-size:10px;color:#8298a8;margin-top:7px}.ux-player-stats b,.ux-player-stats strong{font-weight:600;color:#668094}
.ux-player-title{grid-column:1/-1}.ux-player-title .ux-score{margin-left:auto;display:flex;flex-direction:column;align-items:flex-end;gap:1px;flex-shrink:0}.ux-player-title .ux-score-label{margin-left:0;font-size:8px;white-space:nowrap}.ux-player[onclick],.ux-player[role=button]{cursor:pointer}.ux-player[onclick]:hover,.ux-player[role=button]:hover{border-color:#9cb9c8}
.ux-play-status{max-width:1240px;display:flex;align-items:center;justify-content:space-between;gap:12px;margin:8px auto;padding:0 22px;min-height:29px}.ux-play-status>strong{font-size:11px;font-weight:600;color:#708797}.ux-ai-controls{display:flex;align-items:center;gap:6px}.ux-ai-controls button{font-size:11px;padding:4px 8px;color:#59778b;background:transparent}.ux-ai-controls label{font-size:10px;color:#90a0ac;margin-left:5px}.ux-ai-controls select{font-size:11px;border:1px solid var(--line);border-radius:6px;padding:3px 5px;background:white;color:#536f82}
.ux-play-status .ux-ai-controls{margin-left:auto}.ux-task-panel-title{font-size:13px;font-weight:650;color:#48677c;margin:0 0 7px}.board-pane>.ux-feed{margin:10px 0 0;max-width:none}
#game>.ux-game-layout{display:grid;grid-template-columns:minmax(0,1fr) 352px;gap:15px;max-width:1240px;padding:0 20px;margin:0 auto;align-items:start}.board-pane{min-width:0}.ux-board-panel{padding:17px;background:white;border:1px solid var(--line);border-radius:15px}.ux-legacy-status{display:none}.ux-board-panel #worldBox:empty{display:none}.world{background:#edf4fb;border:1px solid #cfdfed;border-radius:9px;font-size:11px;line-height:1.5;margin-bottom:10px;padding:8px 10px}.world strong{font-size:12px}
#game .board{width:min(100%,calc(100dvh - 315px),560px);max-width:none;aspect-ratio:1/1;margin:0 auto;gap:5px;user-select:none}.cell{border:1px solid #d6e1e9;border-radius:9px;background:#f5f8fb;transition:background .1s;min-width:0;position:relative;overflow:hidden;cursor:pointer}.cell.road{background:#e5ecf3;border-color:#d4dfe8}.cell.port{background:#215b76;border-color:#174862;color:white}.cell.blank{background:#f8fafc;border:1px dashed #dce5ed;cursor:default}.cell.blank .label{display:none}.cell.resource.red{background:#ffe6eb;border-color:#eabac5;color:#91324a}.cell.resource.blue{background:#e3efff;border-color:#bdcfe9;color:#2c558e}.cell.resource.green{background:#e1f3eb;border-color:#b8dccc;color:#296b55}.cell.special{background:#fff2d4;border-color:#e6d4a6;color:#816626}.cell.depleted{filter:none;opacity:.65}.cell .label{font-size:11px;line-height:1.2;font-weight:700;padding:0 3px 12px;text-shadow:none}.cell.road:not(.port)>.label{font-size:0}.cell .sub{font-size:9px;font-weight:500;opacity:.68}.cell .roadnum{font-size:10px;top:4px;left:5px;color:#91a4b3;opacity:1}.cell.port .roadnum{color:#bed7e2}.cell .crystals{right:3px;top:3px;font-size:9px;line-height:1.2;padding:2px 4px;background:#ffffffa6;border-radius:4px}.cell .firstflag{top:3px;left:3px;right:auto;bottom:auto;font-size:8px;line-height:1.2;padding:2px 3px;border-radius:3px;background:#2543559c;color:white}.cell.movable,.cell.targetable{outline:2px solid #3b9b8b;outline-offset:-2px;background-color:#dff0eb}.cell.path{box-shadow:inset 0 0 0 3px #437f94}.cell.rr-arrival{outline:3px solid #3b8597;outline-offset:-3px}.tokens{bottom:4px;left:3px;right:3px;gap:2px}.token{width:23px;height:23px;border:2px solid white;border-radius:50%;font-size:11px;font-weight:800;box-shadow:0 1px 4px #28465b35}.p0{background:#7161ba}.p1{background:#bd5974}.p2{background:#378d75}.p3{background:#b88b3d}
.board-footer{border-top:1px solid #edf1f5;margin-top:14px;padding-top:10px}.ux-board-hint{font-size:12px;line-height:1.5;color:#315f76;font-weight:600}.ux-tile-preview{font-size:11px;line-height:1.6;color:#8598a6;margin-top:5px;min-height:18px}.ux-tile-preview>span:first-child{color:#b0bdc7;margin-right:7px}.ux-tile-preview strong{font-weight:600;color:#536e81}
.cell.ux-reachable{outline:2px solid #43a391;outline-offset:-2px;cursor:pointer}.cell.ux-selected{box-shadow:inset 0 0 0 3px #327a91}.cell.ux-current{border-color:#285f7e;box-shadow:inset 0 0 0 2px #285f7e}.cell.ux-occupied{cursor:default}.cell.ux-next-voyage::before{content:'航程';position:absolute;left:3px;top:3px;color:#3f7d91;background:#eff8fb;font-size:8px;line-height:1.2;padding:2px 3px;border-radius:3px;z-index:1}.cell[data-step]::after{content:attr(data-step);position:absolute;right:3px;top:3px;min-width:15px;height:15px;display:flex;align-items:center;justify-content:center;background:#2f788f;color:white;border-radius:5px;font-size:9px;font-weight:750;z-index:2}.cell[data-step=""]::after{display:none}.ux-tile-info{font-size:11px;line-height:1.6;color:#7a90a1}.ux-tile-title{font-size:11px;font-weight:650;color:#4d6a7f}.ux-tile-effects{font-size:10px;color:#90a2ae;margin-top:3px;display:flex;gap:8px;flex-wrap:wrap}.ux-tile-info.is-invalid{color:#b8755e}.ux-tile-info.is-invalid .ux-tile-title{color:#a86551}

/* A persistent end-turn action; only the decision area scrolls. */
.ux-sidebar{height:calc(100dvh - 208px);min-height:480px;max-height:635px;display:flex;flex-direction:column;border:1px solid var(--line);border-radius:15px;background:white;overflow:hidden}.ux-turn-header{padding:17px 18px 13px;border-bottom:1px solid #eef2f6}.ux-turn-header h2{font-size:19px;font-weight:750;line-height:1.3;letter-spacing:-.3px;margin:3px 0 5px}.ux-turn-header p{font-size:11px;line-height:1.6;color:#738a9c;margin:0}.ux-turn-header .ux-turn-badge{font-size:10px;display:inline-block;padding:2px 6px;border-radius:5px;background:#e9f3f5;color:#3b7588;margin-left:6px;vertical-align:middle}
.ux-action-tabs{display:flex;gap:18px;padding:0 18px;border-bottom:1px solid #e9eff4;flex-shrink:0}.ux-action-tabs button{border:0;border-radius:0;background:transparent;padding:11px 1px 9px;font-size:12px;color:#8c9eac;border-bottom:2px solid transparent}.ux-action-tabs button.active,.ux-action-tabs button[aria-selected=true]{color:#1d5973;border-bottom-color:#216783}.ux-action-tabs button:hover:not(:disabled){background:transparent}.ux-action-tabs span{font-size:10px;margin-left:4px;font-weight:500}
.ux-tab-body{min-height:0;flex:1;overflow-y:auto;padding:14px 17px;scrollbar-width:thin;scrollbar-color:#d1dfe8 transparent}.ux-active-summary:empty{display:none}.ux-active-summary{font-size:11px;color:#698395;margin-bottom:12px}.ux-active-summary .notice{padding:8px 9px;font-size:11px;border:0;background:#f3f7fa;color:#657e90}.ux-active-summary .rr-mini{font-size:10px;line-height:1.6;color:#8b9dac;margin:6px 0}.ux-action-group+.ux-action-group{margin-top:16px}.ux-section-head{display:flex;justify-content:space-between;align-items:center;gap:7px;margin-bottom:8px}.ux-section-head h3{margin:0;font-size:12px;font-weight:750}.ux-section-head>span{font-size:10px;color:#9aabb7}.ux-action-group .hand{gap:6px}
#moveHand{display:flex;flex-wrap:wrap;gap:6px}#moveHand>button,.ux-step-button{min-width:49px;padding:8px 11px;border-radius:8px;background:#f2f7fb;border-color:#dce7ef;font-size:14px;color:#2b5d79}.ux-step-button small{font-size:10px;margin-left:2px;font-weight:500}.ux-step-button.selected{border-color:#4d879d;background:#e7f2f6}.ux-step-button.free{font-size:11px;flex:1}#moveHand .card.move{width:auto;min-width:49px;min-height:0;padding:7px 8px;box-shadow:none;border-color:#dce7ef;border-radius:8px;background:#f2f7fb;flex:1}#moveHand .card .name{font-size:13px}#moveHand .card .desc{display:none}#moveHand .card button{font-size:10px;padding:3px 4px;margin-top:5px;border-color:#d1e0ea;background:white}
#funcHand{display:grid;grid-template-columns:1fr;gap:6px}#funcHand .card.func,.ux-function-card{width:100%;min-height:0;background:#fff;border:1px solid #e0e8ef;border-radius:8px;padding:9px 10px;box-shadow:none;text-align:left}#funcHand .card .name{font-size:12px;color:#3f5b70}#funcHand .card .desc{font-size:10px;line-height:1.5;color:#8a9ba9;margin-top:3px}#funcHand .card button{padding:4px 7px;font-size:10px;width:auto;margin-top:5px}.ux-function-card .ux-card-top{display:flex;align-items:center;justify-content:space-between;gap:8px}.ux-function-card .ux-card-name{font-size:12px;font-weight:650}.ux-function-card .ux-card-tag{font-size:9px;color:#8d9eab;background:#f3f6f9;padding:2px 4px;border-radius:4px}.ux-function-card .ux-card-description{font-size:11px;line-height:1.55;color:#7c91a1;margin-top:5px}.ux-function-card.selected{background:#edf6f8;border-color:#6ba0b3}.ux-function-card .ux-card-use{margin-top:8px;font-size:11px;padding:6px 10px}.ux-function-card.is-reaction{background:#f9fbfd}.ux-function-card.is-unavailable{opacity:.5}
.ux-sidebar .actions{gap:6px}.ux-sidebar .actions>button{font-size:11px;padding:7px 9px}.ux-move-controls:empty{display:none}.ux-move-controls{margin-top:9px;padding:9px;background:#eff6f8;border-radius:8px}.ux-move-controls .primary{flex:1}.ux-other-actions{margin-top:15px;padding-top:12px;border-top:1px solid #edf2f6}.ux-other-actions:empty{display:none}.ux-empty-state{font-size:11px;color:#98a8b3;padding:4px 0}
.ux-section-label{font-size:12px;font-weight:750;color:#47657a;margin:0 0 8px}#moveHand.ux-move-options,.ux-move-options{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.ux-move-option{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-height:55px;padding:7px 5px;background:#f3f8fb;border:1px solid #dce7ef;border-radius:8px;color:#37637b}.ux-move-option b,.ux-move-option strong{font-size:21px;font-weight:650;line-height:1.1}.ux-move-option small{font-size:9px;color:#8b9fad;font-weight:500}.ux-move-option.selected{border-color:#5793a9;background:#e7f3f6}.ux-move-option:disabled{opacity:.5;background:#f8fafc}#funcHand.ux-card-list,.ux-card-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.ux-func-card{min-height:52px;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;padding:9px 10px;text-align:left;border:1px solid #dfe8ef;border-radius:8px;background:white}.ux-func-card .name,.ux-func-card .ux-card-name,.ux-func-card>strong{font-size:12px;font-weight:650;color:#43657a}.ux-func-card .type,.ux-func-card .ux-card-type,.ux-func-card>small{font-size:9px;color:#94a6b3;margin-top:3px;font-weight:500}.ux-func-card.selected{border-color:#609aae;background:#eaf5f8;box-shadow:inset 0 0 0 1px #609aae}.ux-func-card.selected .name{color:#205a74}.ux-card-detail:empty{display:none}.ux-card-detail{padding:11px 12px;margin-top:8px;background:#f1f7fa;border:1px solid #d8e7ee;border-radius:9px}.ux-card-detail h3,.ux-card-detail h4{font-size:13px;margin:0 0 5px;color:#3a6178}.ux-card-detail p{font-size:11px;color:#788e9e;line-height:1.65;margin:5px 0}.ux-card-detail button{font-size:11px;padding:7px 12px;margin-top:7px}.ux-card-detail .ux-card-status{font-size:10px;color:#9aacb8}.ux-route-summary{width:100%;font-size:11px;color:#548095;line-height:1.6;margin-bottom:5px}.ux-turn-header .ux-allowances{display:flex;gap:6px;margin-top:9px;flex-wrap:wrap}.ux-turn-header .ux-allowances span,.ux-turn-header .ux-chip{display:inline-flex;font-size:10px;padding:3px 6px;border-radius:5px;background:#edf5f8;color:#598498}.ux-turn-header .ux-chip.used{color:#9dacb7;background:#f3f6f8}
.ux-task-help{margin:0 0 12px;font-size:11px;color:#869aa9;line-height:1.6}.ux-sidebar .tasks{gap:8px}.ux-sidebar .task{padding:11px;background:#f9fbfd;border:1px solid #e2eaf1;border-radius:9px;font-size:11px;line-height:1.55}.ux-sidebar .task.easy,.ux-sidebar .task.medium,.ux-sidebar .task.hard{border-left:1px solid #e2eaf1}.ux-sidebar .task.done{background:#eff8f3;border-color:#cce5d9;color:#467e64}.ux-task-header{display:flex;gap:8px;justify-content:space-between;align-items:start}.ux-task-header strong{font-size:12px;color:#476377}.ux-task-points{font-size:10px;white-space:nowrap;color:#788e9e}.ux-task-description{font-size:11px;color:#8598a6;margin-top:5px}.ux-task-progress{width:100%;height:4px;border:0;border-radius:4px;background:#e5edf3;overflow:hidden;display:block;margin:9px 0 5px;appearance:none}.ux-task-progress::-webkit-progress-bar{background:#e5edf3;border-radius:4px}.ux-task-progress::-webkit-progress-value{background:#6a9cb0;border-radius:4px}.ux-task-progress::-moz-progress-bar{background:#6a9cb0;border-radius:4px}.ux-task-progress>i{display:block;height:100%;background:#6a9cb0}.ux-task-progress-label{font-size:10px;color:#8fa2af}
.ux-turn-footer{padding:11px 17px 14px;border-top:1px solid #e6eef4;background:#fbfcfe;flex-shrink:0}.ux-turn-footer p{font-size:10px;line-height:1.5;color:#95a7b3;margin:0 0 7px}#uxEndTurn{width:100%;display:flex;justify-content:space-between;align-items:center;font-size:13px;padding:11px 14px;border-radius:9px}#uxEndTurn:disabled{background:#edf2f6;border-color:#e0e8ef;color:#9cacb7;opacity:1}
.ux-task{padding:11px;background:#f9fbfd;border:1px solid #e2eaf1;border-radius:9px;font-size:11px;line-height:1.55}.ux-task+.ux-task{margin-top:8px}.ux-task.is-done{background:#eff8f3;border-color:#cce5d9}.ux-task-title{display:flex;justify-content:space-between;gap:7px;font-size:12px;font-weight:650;color:#4a697d}.ux-task-title small,.ux-task-title>span:last-child{font-size:10px;white-space:nowrap;color:#8aa0ae;font-weight:500}.ux-task-detail{font-size:11px;line-height:1.6;color:#879ca9;margin-top:5px}.ux-progress{height:3px;border-radius:3px;background:#e5edf3;overflow:hidden;margin-top:9px}.ux-progress-fill{height:100%;background:#77a5b7;border-radius:3px}.ux-progress-text{font-size:10px;color:#96a9b5;margin-top:4px}.ux-task.is-done .ux-progress-fill{background:#7cb89d}.ux-task.is-done .ux-task-title{color:#4d876d}
.ux-progress-fill{display:block}
/* Essential instructions and statistics remain readable at normal browser zoom. */
.ux-role-description{color:#61788a}.ux-role-caption,.ux-role-control{font-size:11px}.ux-quick-guide small{font-size:11px;color:#718698}.ux-player-title .ux-score-label{font-size:10px;color:#748999}.ux-player-stats{font-size:11px;color:#687f91}.ux-control{font-size:10px;color:#738899}.ux-section-head>span{font-size:11px;color:#768d9e}.ux-turn-header p{font-size:12px;color:#637d90}.ux-task-detail,.ux-task-description{font-size:12px;color:#60798b}.ux-task-help,.ux-task-progress-label,.ux-progress-text{font-size:11px;color:#6b8293}.ux-task-title>span:last-child{font-size:11px;color:#657f91}.ux-func-card .type,.ux-func-card .ux-card-type,.ux-func-card>small{font-size:10px;color:#6d8698}.ux-func-card .name,.ux-func-card .ux-card-name,.ux-func-card>strong{font-size:13px}.ux-card-detail p{font-size:12px;color:#617c90}.ux-card-detail .ux-card-status{font-size:11px;color:#758c9d}.ux-move-option small{font-size:10px;color:#6f8799}.ux-turn-footer p{font-size:11px;color:#718a9c}.ux-tile-effects{font-size:11px;color:#728a9c}.ux-tile-title{font-size:12px}.ux-task.is-done .ux-task-title{color:#387255}
.ux-feed{max-width:1200px;margin:12px auto 22px;border:1px solid var(--line);border-radius:10px;background:#ffffff80;font-size:11px}.ux-feed>summary{padding:10px 13px;color:#698293;cursor:pointer;font-weight:600}.ux-feed>summary span{font-size:10px;color:#a1b0bb;margin-left:9px;font-weight:400}.ux-feed .log{margin:0 10px 10px;height:180px;border-radius:8px;background:#f6f9fc;color:#698293;font-size:11px;line-height:1.6;font-family:inherit}.ux-feed .log div{border-color:#e8eff5}.ux-feed .log .turn{color:#427993}.ux-feed .log .score{color:#37886e}.ux-feed .log .bad{color:#b57057}
#moveNotice.ux-toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);width:max-content;max-width:calc(100% - 32px);z-index:110;background:#183e53;color:white;border:0;box-shadow:0 6px 25px #19304425;padding:12px 18px;border-radius:10px;font-size:12px;line-height:1.5}.modal-back{background:#18304270;backdrop-filter:blur(3px)}.modal{border:1px solid #d5e1ea;border-radius:17px;background:white;box-shadow:0 16px 80px #122b4930;color:var(--ink)}.modal h3{font-size:19px}.choice{border-color:#dce6ed;border-radius:9px}.choice.selected{outline:2px solid #5d92a7}.modal p,.modal li{line-height:1.75}.modal-actions{border-top:1px solid #e7eef4;padding-top:12px}

/* Existing recorded games keep their own controls and use the same board. */
.rr-replay-mode #game>.ux-topbar{position:sticky;top:0}.rr-replay-mode .ux-header-actions,.rr-replay-mode #play-status,.rr-replay-mode #uxSidebar,.rr-replay-mode .board-footer,.rr-replay-mode .ux-feed{display:none!important}.rr-replay-mode .ux-legacy-status{display:flex;align-items:center;gap:8px;font-size:12px;margin-bottom:12px}.rr-replay-mode #game>.ux-game-layout{grid-template-columns:minmax(0,1fr) 352px;margin-top:14px}.rr-replay-mode #game .board{width:min(100%,560px)}.rr-replay-mode #rrReplayState{font-size:12px}.rr-replay-mode .rr-score-extra{font-size:10px}.rr-replay-mode .ux-scoreboard .player-card.rr-actor{outline:none;border-color:#528ba2;box-shadow:inset 0 0 0 1px #528ba2}.rr-replay-mode #game>.ux-topbar #rrBoardControls button{color:#34576d;background:#f3f7fa}

@media(max-width:1100px){#setup.ux-setup{margin:24px 20px;padding:26px}.ux-role-grid{gap:9px}.ux-role-option{padding:14px 12px}#game>.ux-game-layout{grid-template-columns:minmax(0,1fr) 325px;gap:12px}.ux-board-panel{padding:13px}.ux-feed{margin-left:20px;margin-right:20px}.ux-player-meta{gap:7px}}
@media(max-width:820px){.ux-role-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.ux-role-description{min-height:0}.ux-options-grid{grid-template-columns:1fr 1fr}.ux-seed-option{grid-column:1/-1}#game>.ux-game-layout,.rr-replay-mode #game>.ux-game-layout{grid-template-columns:1fr;max-width:640px}.ux-score-strip,.ux-play-status{max-width:640px}.ux-scoreboard{gap:6px}.ux-scoreboard .player-card{padding:8px}.ux-scoreboard .player-title{font-size:10px}.ux-player-total,.ux-player-score{font-size:20px}.ux-player-meta{gap:4px;font-size:9px}.ux-play-status{padding:0 21px}#game .board{width:min(100%,500px)}.ux-sidebar{height:auto;min-height:0;max-height:none}.ux-tab-body{overflow:visible;max-height:none}.ux-turn-header{padding:14px 17px 11px}.ux-turn-header h2{font-size:18px}.ux-turn-footer{position:sticky;bottom:0;z-index:10;border-top:1px solid #dce6ed;box-shadow:0 -4px 12px #18304204}.ux-feed{max-width:600px;margin-left:auto;margin-right:auto}#funcHand{grid-template-columns:repeat(2,minmax(0,1fr))}.ux-move-group .hand{gap:7px}}
@media(max-width:520px){#setup.ux-setup{margin:12px;padding:20px 17px;border-radius:15px}.ux-setup h1{font-size:23px;margin-top:21px}.ux-setup-intro{font-size:12px;margin-bottom:20px}.ux-setup-brand{font-size:11px}.ux-setup-brand .ux-tag{font-size:9px}.ux-role-picker legend{font-size:15px}.ux-role-picker>p{font-size:11px}.ux-role-grid{gap:8px}.ux-role-option{padding:12px;gap:5px}.ux-role-option>strong{font-size:16px}.ux-role-caption{font-size:10px}.ux-role-description{font-size:11px}.ux-role-icon{width:30px;height:30px;font-size:13px}.ux-setup-footer{gap:4px;flex-wrap:wrap}.ux-start{width:100%;margin-bottom:5px}.ux-setup-footer>.ux-text-button{flex:1;font-size:11px;padding:8px 5px}#game>.ux-topbar{padding:9px 12px;gap:10px;min-height:52px}.ux-topbar .brand{font-size:10px;gap:5px}.ux-brand-mark{font-size:21px}.ux-header-actions{gap:0}.ux-header-actions .ux-text-button{display:none}.ux-header-actions button{font-size:10px;padding:6px 8px}.ux-round{font-size:10px;padding:3px 6px}.ux-score-strip{padding:0 10px;margin-top:9px}.ux-scoreboard{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.ux-player-top{gap:6px}.ux-player-name{font-size:11px}.ux-player-meta{font-size:9px;gap:8px}.ux-play-status{padding:0 12px;margin:7px auto;gap:6px;align-items:flex-start}.ux-play-status>strong{font-size:10px;padding-top:4px}.ux-ai-controls{gap:4px;flex-shrink:0}.ux-ai-controls label{display:none}.ux-ai-controls button,.ux-ai-controls select{font-size:10px}#game>.ux-game-layout{padding:0 10px;gap:10px}.ux-board-panel{padding:10px;border-radius:12px}#game .board{gap:3px}.cell{border-radius:6px}.cell .label{font-size:9px;padding-bottom:11px}.cell .sub{font-size:8px}.cell .roadnum{font-size:8px;left:4px;top:3px}.cell .crystals{font-size:8px;padding:1px 3px}.cell .firstflag{font-size:7px;padding:1px 2px;top:2px;left:2px}.token{width:18px;height:18px;font-size:9px;border-width:1.5px}.tokens{bottom:3px}.board-footer{margin-top:10px;padding-top:8px}.ux-board-hint{font-size:11px}.ux-tile-preview{font-size:10px}.ux-feed{margin:10px 10px 18px}.ux-feed>summary span{display:none}.ux-sidebar{border-radius:12px}.rr-replay-mode #game>.ux-topbar{flex-wrap:wrap}.rr-replay-mode #rrBoardControls{width:100%;margin-top:3px;justify-content:flex-end}}
@media(max-width:520px){.ux-quick-guide{padding:11px 9px;gap:8px;margin-bottom:20px}.ux-quick-guide li{display:block}.ux-quick-guide li>span{font-size:20px;display:block;width:auto;text-align:left;margin-bottom:4px}.ux-quick-guide strong{font-size:11px}.ux-quick-guide small{font-size:9px;line-height:1.5}.ux-scoreboard .ux-player{padding:8px 10px;gap:6px}.ux-player-title{font-size:11px;gap:5px}.ux-score{font-size:21px}.ux-player-stats{font-size:9px;gap:8px;margin-top:5px}.ux-control{font-size:8px}.ux-tile-effects{font-size:9px;gap:5px}}

/* Adapter for the final human-ui.js markup. Keep containers separate from their button grids. */
#moveHand,#funcHand,#roleActions,#otherActions{display:block}
#uxMoveGroup:has(#moveHand:empty):has(#moveControls:empty),#uxFuncGroup:has(#funcHand:empty):has(#uxCardDetail:empty),#uxRoleGroup:has(#roleActions:empty){display:none}
#uxCardDetail:empty,#otherActions:empty{display:none}
.ux-section-label{display:flex;align-items:center;justify-content:space-between;gap:9px;width:100%;font-size:13px;line-height:1.5;margin:0 0 9px}
.ux-section-label>b{font-size:13px;font-weight:700;color:#3f6076}.ux-section-label>span{font-size:11px;font-weight:400;color:#73899b;white-space:nowrap}
.ux-move-options{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}.ux-move-option{width:100%;min-width:0;min-height:62px;padding:9px 4px;gap:5px}.ux-move-option>strong{font-size:24px;line-height:1.1}.ux-move-option>span{font-size:11px;line-height:1.3;font-weight:500;color:#6e8798;white-space:nowrap}
.ux-card-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.ux-func-card{width:100%;min-width:0;min-height:59px;padding:10px 11px;gap:4px}.ux-func-card>b{font-size:13px;line-height:1.35;font-weight:650;color:#355e76}.ux-func-card>span{font-size:11px;line-height:1.35;font-weight:400;color:#738a9c}.ux-func-card.selected>b{color:#1f627d}.ux-card-detail>b{font-size:14px;line-height:1.5;color:#335f77}.ux-card-detail p{font-size:12px}.ux-card-detail button{font-size:12px}
.ux-muted{font-size:12px!important;line-height:1.65;color:#6b8395;font-weight:400;margin:8px 0}.ux-done-line{font-size:12px;line-height:1.6;color:#4b8b76;padding:8px 10px;margin:0;border-radius:7px;background:#f0f8f4}
.ux-turn-header h2{display:flex;align-items:center;gap:8px;font-size:20px;line-height:1.4;margin-top:7px}.ux-turn-header h2>.dot{width:11px;height:11px;flex-shrink:0}.ux-turn-header h2>small{font-size:12px;font-weight:500;color:#8a9eac;margin-left:auto}.ux-turn-header .ux-turn-badge{font-size:11px;line-height:1.45;margin-left:0;padding:3px 7px}.ux-turn-badge.is-you{background:#e7f3ee;color:#3f826d}
.ux-turn-budget{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-top:9px}.ux-turn-budget>span{font-size:11px;font-weight:500;line-height:1.5;white-space:nowrap;padding:3px 7px;border:1px solid #dce8ef;border-radius:6px;background:#f2f7fa;color:#698496}.ux-turn-budget>span.done{background:#f1f5f7;border-color:#e5ebf0;color:#97a8b3}
.ux-watch{padding:21px 12px 17px;text-align:center;background:#f6f9fc;border:1px solid #e6edf3;border-radius:11px}.ux-watch>b{display:block;margin:7px 0;font-size:16px;line-height:1.45;font-weight:650;color:#496c82}.ux-watch>p{font-size:12px;line-height:1.75;color:#728c9d;margin:8px 0}.ux-watch>.ux-muted{display:block;font-size:12px;margin-top:13px}.ux-watch button{font-size:12px;margin-top:7px}.ux-wait-dots{font-size:12px;color:#8cb1c2;letter-spacing:5px}
.ux-move-controls{display:block;padding:12px;margin-top:0;background:#f1f7fa;border:1px solid #dbe9ef;border-radius:10px}.ux-route-summary{width:100%;margin:0 0 12px}.ux-route-summary .ux-eyebrow{font-size:11px;line-height:1.5}.ux-route-summary h3{font-size:35px;line-height:1.1;font-weight:650;letter-spacing:-.6px;color:#285e7a;margin:9px 0 7px}.ux-route-summary h3>small{font-size:14px;font-weight:450;letter-spacing:0;color:#8ba2b1;margin-left:3px}.ux-route-summary p{font-size:12px;line-height:1.6;color:#6e889a;margin:4px 0}
.ux-route-modes{display:flex;align-items:stretch;gap:4px;padding:3px;background:#e8f0f5;border-radius:8px;margin:0 0 10px}.ux-route-modes>button{flex:1;min-width:0;padding:7px 3px;background:transparent;border-color:transparent;border-radius:6px;font-size:11px;font-weight:500;color:#698699;white-space:nowrap}.ux-route-modes>button.selected{background:white;border-color:#d2e2eb;color:#356980;box-shadow:0 1px 3px #1f526510}.ux-move-controls>.ux-confirm-move{display:block;width:100%;padding:11px 10px;font-size:13px;margin-top:13px}.ux-route-tools{display:flex;gap:6px;margin-top:8px}.ux-route-tools>button{flex:1;min-width:0;font-size:11px;padding:8px 4px;color:#6a8598;background:#fff;border-color:#dce7ef}
.ux-ability-buttons{display:flex;gap:7px;flex-wrap:wrap}.ux-ability-buttons>button{font-size:12px;line-height:1.4;padding:8px 10px;flex:1;min-width:0}.ux-ability-buttons>button:disabled{background:#f7f9fb}.ux-ability-buttons+*{margin-top:9px}
.ux-menu-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:17px 0}.ux-menu-grid>button{min-height:45px;padding:11px 12px;text-align:left;font-size:13px;font-weight:550;background:#f8fbfd;border-color:#dce7ef}.ux-menu-grid>button:hover:not(:disabled){background:#edf5f9}.choice[data-ux-discard]>b{display:block;font-size:13px;line-height:1.5}.choice[data-ux-discard]>span{display:block;font-size:12px;line-height:1.6;color:#7a90a0;margin-top:4px}
.ux-player-title .ux-score-label,.ux-control{font-size:11px}.ux-player-stats{font-size:11px}.ux-tile-effects{font-size:11px}.ux-task-title{font-size:13px}.ux-task-title>strong{font-weight:650}
@media(max-width:520px){.ux-player-stats{font-size:11px;gap:5px 8px}.ux-player-title .ux-control{font-size:11px}.ux-player-title .ux-score-label{font-size:11px}.ux-quick-guide small{font-size:11px}.cell .label{font-size:11px}.cell .sub{display:none}.ux-tile-effects{font-size:11px}.ux-move-options{grid-template-columns:repeat(4,minmax(0,1fr))}.ux-section-label>span{font-size:11px}.ux-menu-grid{gap:7px}.ux-menu-grid>button{font-size:12px;padding:10px}.ux-turn-header h2{font-size:19px}}
#uxBriefEvent{font-size:12px;color:#526f82;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.ux-ai-controls{flex-shrink:0}#uxSetupCount{font-size:12px;color:#55798c}.live-archive[open]{max-width:1200px;margin:20px auto;padding:16px;background:white;border:1px solid var(--line);border-radius:12px}.live-archive>summary{font-weight:600;cursor:pointer}.ux-archive-back{margin-top:12px}.rr-replay-mode #setup{display:none!important}.rr-replay-mode #rrReplayState{display:block!important}.ux-player:focus-visible,.cell:focus-visible{outline:3px solid #2f7a97;outline-offset:2px}
@media(min-width:821px) and (max-height:820px){#setup.ux-setup{margin:20px auto;padding:25px 30px}.ux-setup h1{margin:15px 0 8px;font-size:27px}.ux-setup-intro{margin-bottom:16px}.ux-quick-guide{margin-bottom:18px;padding:11px 14px}.ux-role-option{padding:13px 14px;gap:5px}.ux-role-description{min-height:35px}.ux-role-control{padding-top:7px;margin-top:3px}.ux-setup-options{margin-top:17px;padding-top:12px}.ux-setup-footer{margin-top:18px}}
@media(max-width:520px){#uxSetupCount{width:100%;text-align:center;margin:5px 0}.ux-setup-footer{flex-wrap:wrap}#uxBriefEvent{white-space:normal;font-size:11px;line-height:1.5}.ux-scoreboard .ux-role{white-space:nowrap}.ux-control{display:none}}
#game .board{position:relative;grid-template-rows:repeat(7,minmax(0,1fr))}.cell .label{padding:0;font-size:11px;position:absolute;top:17px;left:2px;right:2px}.cell .sub{display:none}.cell .firstflag{padding:1px 3px;font-size:8px}.tokens{bottom:3px}.token{width:20px;height:20px}.cell.port .label{top:5px}.cell.port .tokens{flex-wrap:nowrap;gap:1px;left:1px;right:1px}.cell.port .token{width:14px;height:16px;border-width:1px;font-size:9px}.ux-map-center{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:38%;text-align:center;pointer-events:none;display:flex;flex-direction:column;align-items:center;gap:5px;color:#6d8b9e}.ux-map-center>span{font-size:40px;line-height:1.2;color:#a4becb}.ux-map-center>b{font-size:13px;color:#54798e}.ux-map-center>small{font-size:11px;color:#819ba9}.ux-final-notice{color:#a96025!important;font-weight:600}.ux-topbar button{background:white}.ux-topbar button.ux-text-button{background:transparent}
@media(max-width:520px){.cell .label{font-size:10px;top:14px}.token{width:16px;height:16px}.cell .crystals{font-size:8px}.ux-map-center>span{font-size:30px}.ux-map-center>b{font-size:12px}.ux-map-center>small{font-size:10px}}
#game>.ux-topbar{position:sticky;top:0}.ux-footer-actions{display:flex;align-items:stretch;gap:7px}.ux-footer-actions #uxEndTurn{flex:1;width:auto}.ux-footer-actions #uxCancelAction{flex:0 0 54px;padding:8px;color:#687e8d}.ux-move-controls>.ux-confirm-move{display:none}.ux-route-tools>button:last-child{display:none}.ux-route-summary{margin-bottom:9px}.ux-route-summary h3{font-size:30px;margin:6px 0 4px}.ux-route-summary p{margin:3px 0}.ux-route-modes{margin-bottom:5px}.ux-move-controls>.ux-muted{margin:5px 0;font-size:11px!important}.ux-route-tools{margin-top:5px}
.ux-seat{width:18px;height:18px;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;color:white;font-size:11px;flex-shrink:0}.ux-sidebar:has(.ux-move-controls:not(:empty)) .ux-turn-footer{background:#edf6fa}.ux-topbar .brand{width:auto!important}

.ux-map-status{display:flex;justify-content:space-between;gap:12px;margin:0 0 10px;color:#55788d;font-size:12px}.ux-map-status b{color:#244d65}.ux-map-viewport{overflow:auto;overscroll-behavior:contain}
#game .board.ux-discovery-map{grid-template-columns:repeat(11,minmax(0,1fr));grid-template-rows:repeat(11,minmax(0,1fr));width:min(100%,590px);gap:4px;background:#f1f6f9;border-radius:10px;padding:5px}
.ux-discovery-map .cell.blank{border:0;background:transparent;pointer-events:none}.ux-discovery-map .cell{border-radius:7px}.ux-discovery-map .cell.unknown{background:#d6e6dc;border:1px solid #94b4a3;color:#466e58}.ux-discovery-map .unknown .label{position:static;font-size:23px;text-align:center;line-height:1;display:block;padding-top:7px;font-weight:500}.ux-coordinate{position:absolute;right:4px;bottom:3px;font-size:8px;opacity:.75}.ux-discovery-map .cell .label{font-size:10px;top:17px}.ux-discovery-map .cell.unknown .label{font-size:23px;top:auto}.ux-discovery-map .cell .roadnum{font-size:10px;color:#688297}.ux-discovery-map .cell.road{background:#dbe6ee;border-color:#9bb1c2}.ux-discovery-map .cell.port{background:#215b76;border-color:#174862}.ux-discovery-map .cell.port .label{top:4px}.ux-discovery-map .cell .crystals{font-size:8px;right:2px;top:2px;padding:1px 2px}.ux-discovery-map .cell .firstflag{font-size:7px;padding:1px 2px}.ux-discovery-map .token{width:17px;height:17px;font-size:10px}.ux-discovery-map .cell.port .token{width:12px;height:14px;font-size:8px}.ux-discovery-map .tokens{bottom:2px}
.ux-scanner{margin-top:15px;padding-top:13px;border-top:1px solid #e2ebf1}.ux-scanner>b{font-size:13px;color:#355e76}.ux-scanner .ux-muted{font-size:11px;line-height:1.7;margin:6px 0}.ux-scanner button{width:100%;font-size:12px;padding:9px}.ux-scan-map{display:grid;grid-template-columns:repeat(11,1fr);gap:3px;max-width:440px;margin:14px auto}.ux-scan-cell{aspect-ratio:1;min-width:0;padding:0;display:flex;align-items:center;justify-content:center;border-radius:4px;font-size:11px;background:#f5f8fa;color:#738a9b;border:1px solid transparent}.ux-scan-cell.land{background:#e0ece4}.ux-scan-cell.road{background:#dde8ee}.ux-scan-cell.here{background:#286b86;color:white}.ux-scan-cell.target{flex-direction:column;gap:2px;background:#d9f0e1;color:#32664b;border:2px solid #4b9773;cursor:pointer}.ux-scan-cell.target small{font-size:8px}.ux-scan-cell.target:hover{background:#b7dfc7}.ux-test-table{width:100%;border-collapse:collapse;font-size:12px;margin:12px 0}.ux-test-table th,.ux-test-table td{padding:9px 8px;border-bottom:1px solid #dce7ed;text-align:left}.ux-test-table th{color:#3f647a;background:#f2f7fa}.ux-test-evidence p,.ux-test-evidence li{font-size:12px;line-height:1.8;color:#557285}.ux-test-evidence h4{font-size:14px;color:#355c73;margin:14px 0 5px}
.rr-replay-mode .ux-map-status{display:none}.rr-replay-mode #game .board.ux-discovery-map{width:min(100%,590px)}
@media(min-width:821px){.ux-sidebar{position:sticky;top:70px}}
@media(max-width:520px){#game .board.ux-discovery-map{width:460px;max-width:none;gap:3px}.ux-map-viewport{scrollbar-width:thin}.ux-map-status{font-size:11px}.ux-map-status::after{content:'地图可横向滑动';font-size:10px;color:#91a5b1}.ux-map-status{flex-wrap:wrap}.ux-discovery-map .cell .label{font-size:9px;top:14px}.ux-discovery-map .cell.unknown .label{font-size:21px;padding-top:5px}.ux-discovery-map .token{width:15px;height:15px;font-size:9px}.ux-test-table{font-size:10px}.ux-test-table th,.ux-test-table td{padding:7px 5px}}

.ux-discovery-map .cell.blank.ux-reachable{pointer-events:auto;border:1px dashed #398976;background:#e0f2ea;cursor:pointer}
.ux-discovery-map .cell.ux-cluster-origin{outline:2px solid #537a9b;outline-offset:-2px}
.ux-discovery-map .cell.ux-cluster-ghost{background:#bcddcd!important;border:2px dashed #267d62!important;box-shadow:inset 0 0 0 2px #edf9f0;pointer-events:auto}
.ux-cluster-ghost::after{content:'搬移';position:absolute;bottom:2px;left:3px;font-size:8px;color:#1c6955;font-weight:700}




#ring-salvage-game { --rr-ink:#17284c; --rr-paper:#fff7df; --rr-muted:#586582; --rr-blue:#3a98ed; --rr-orange:#ff9c3b; --rr-green:#67bd81; --rr-purple:#ad89ee; --rr-yellow:#ffd457; --rr-sky:#113476; --rr-crew:url("../img/crew.webp"); --rr-atlas:url("../img/atlas.webp"); --rr-board:url("../img/board.webp"); --rr-portraits:var(--rr-crew); font:14px/1.45 "Microsoft YaHei","PingFang SC",system-ui,sans-serif; color:var(--rr-ink); }
#ring-salvage-game * { box-sizing:border-box; }
#ring-salvage-game [hidden] { display:none!important; }
#ring-salvage-game button,#ring-salvage-game select,#ring-salvage-game input { font:inherit; }
#ring-salvage-game button { color:inherit; touch-action:manipulation; }
#ring-salvage-game button:disabled { opacity:.42; }
#ring-salvage-game .rr-review { display:flex; align-items:center; flex-wrap:wrap; gap:10px 15px; padding:12px 110px 12px 0; font-size:12px; color:light-dark(#273b65,#e4eafd); }
#ring-salvage-game .rr-review-pages { display:flex; flex-wrap:wrap; gap:5px; }
#ring-salvage-game .rr-review-pages button { border:1px solid light-dark(#bac5d7,#58667b); border-radius:5px; background:light-dark(#f2f4fa,#293645); color:inherit; padding:6px 9px; }
#ring-salvage-game .rr-review-pages button[aria-pressed="true"] { background:light-dark(#243e71,#d3e0fb); color:light-dark(#fff,#17284c); border-color:transparent; }
#ring-salvage-game .rr-review-state { display:flex; align-items:center; gap:7px; }
#ring-salvage-game .rr-review-state select { color:light-dark(#273b65,#e4eafd); background:light-dark(#fff,#293645); border:1px solid light-dark(#bac5d7,#58667b); border-radius:4px; padding:5px; max-width:170px; }
#ring-salvage-game .rr-app { background:var(--rr-sky); color:var(--rr-ink); position:relative; border:3px solid var(--rr-ink); border-radius:16px; overflow:clip; }
#ring-salvage-game .rr-preview-caption { padding:9px 0; font-size:12px; color:light-dark(#63718b,#bdc9df); }
#ring-salvage-game .rr-app button { border:0; background:none; padding:0; }
#ring-salvage-game .rr-app .rr-button { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:42px; padding:9px 16px; background:var(--rr-paper); color:var(--rr-ink); border:2px solid var(--rr-ink); border-radius:9px; box-shadow:0 3px 0 var(--rr-ink); font-weight:700; text-align:center; }
#ring-salvage-game .rr-app .rr-button:hover { transform:translateY(-1px); }
#ring-salvage-game .rr-app .rr-button:active { transform:translateY(2px); box-shadow:0 1px 0 var(--rr-ink); }
#ring-salvage-game .rr-app .rr-button-yellow { background:var(--rr-yellow); }
#ring-salvage-game .rr-app .rr-button-blue { background:#74cfff; }
#ring-salvage-game .rr-app .rr-button-small { min-height:35px; padding:6px 10px; font-size:12px; }
#ring-salvage-game .rr-app .rr-link { padding:8px 6px; text-decoration:underline; font-size:13px; }
#ring-salvage-game .rr-app .rr-face { display:block; background-image:var(--rr-crew); border:2px solid var(--rr-ink); border-radius:50%; width:50px; height:50px; flex-shrink:0; background-repeat:no-repeat; }
#ring-salvage-game .rr-app .rr-art { display:block; background-image:var(--rr-atlas); background-repeat:no-repeat; background-size:400% 200%; }
#ring-salvage-game .rr-app .rr-full { --rr-portrait-height:310px; display:block; position:relative; overflow:hidden; width:calc(var(--rr-portrait-height) * var(--rr-portrait-width)); max-width:100%; height:var(--rr-portrait-height); margin:auto; }
#ring-salvage-game .rr-app .rr-full > span { position:absolute; background-image:var(--rr-portraits); background-size:100% 100%; background-repeat:no-repeat; }
#ring-salvage-game .rr-app .rr-portrait-1 { clip-path:polygon(0 0,100% 0,100% 90%,90% 90%,90% 100%,0 100%); }
#ring-salvage-game .rr-app .rr-portrait-2 { clip-path:polygon(8% 0,92% 0,92% 88%,100% 88%,100% 100%,0 100%,0 88%,8% 88%); }
#ring-salvage-game .rr-app .rr-portrait-3 { clip-path:polygon(0 0,100% 0,100% 100%,7% 100%,7% 88%,0 88%); }
#ring-salvage-game .rr-app .rr-asset-0 { background-position:0 0; }
#ring-salvage-game .rr-app .rr-asset-1 { background-position:33.333% 0; }
#ring-salvage-game .rr-app .rr-asset-2 { background-position:66.666% 0; }
#ring-salvage-game .rr-app .rr-asset-3 { background-position:100% 0; }
#ring-salvage-game .rr-app .rr-asset-4 { background-position:0 100%; }
#ring-salvage-game .rr-app .rr-asset-5 { background-position:33.333% 100%; }
#ring-salvage-game .rr-app .rr-asset-6 { background-position:66.666% 100%; }
#ring-salvage-game .rr-app .rr-asset-7 { background-position:100% 100%; }
#ring-salvage-game .rr-app .rr-kicker { font-size:11px; letter-spacing:1.5px; font-weight:700; }
#ring-salvage-game .rr-app .rr-logo { font-size:27px; font-weight:900; letter-spacing:1px; line-height:1; color:var(--rr-yellow); text-shadow:2px 2px 0 var(--rr-ink); }
#ring-salvage-game .rr-app .rr-gamebar { display:flex; align-items:center; justify-content:space-between; gap:15px; padding:14px 18px; color:var(--rr-paper); border-bottom:3px solid var(--rr-ink); background:#174c92; }
#ring-salvage-game .rr-app .rr-gamebar .rr-button { color:var(--rr-ink); }
#ring-salvage-game .rr-app .rr-bar-left,#ring-salvage-game .rr-app .rr-bar-right { display:flex; align-items:center; flex-wrap:wrap; gap:9px; }
#ring-salvage-game .rr-app .rr-day { border-left:2px solid #8fcaf0; padding-left:14px; font-size:12px; }
#ring-salvage-game .rr-app .rr-day b { font-size:22px; font-variant-numeric:tabular-nums; }
#ring-salvage-game .rr-app .rr-subtitle { color:var(--rr-muted); font-size:12px; }
#ring-salvage-game .rr-app .rr-roster { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:9px; padding:12px 15px; background:#b2d9ef; border-bottom:3px solid var(--rr-ink); }
#ring-salvage-game .rr-app .rr-worker { display:flex; align-items:center; gap:8px; padding:7px 10px; min-width:0; text-align:left; background:var(--rr-paper); border:2px solid var(--rr-ink); border-radius:8px; box-shadow:0 3px 0 #23375d; position:relative; }
#ring-salvage-game .rr-app .rr-worker.rr-working { background:var(--rr-yellow); transform:translateY(-2px); }
#ring-salvage-game .rr-app .rr-worker.rr-target-worker { border:3px solid #ef812a; padding:6px 9px; }
#ring-salvage-game .rr-app .rr-worker-copy { flex:1; min-width:0; }
#ring-salvage-game .rr-app .rr-worker-copy strong { display:block; font-size:13px; }
#ring-salvage-game .rr-app .rr-worker-copy small { display:block; font-size:11px; }
#ring-salvage-game .rr-app .rr-worker-score { font-size:24px; font-weight:900; font-variant-numeric:tabular-nums; line-height:1.1; }
#ring-salvage-game .rr-app .rr-score-label { display:block; font-size:11px; font-weight:400; }
#ring-salvage-game .rr-app .rr-arena { display:grid; grid-template-columns:minmax(0,1fr) 208px; padding:0 15px; gap:14px; background:#14397b; }
#ring-salvage-game .rr-app .rr-map-area { min-width:0; }
#ring-salvage-game .rr-app .rr-map-caption { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:9px 0; font-size:11px; color:#d0e6ff; }
#ring-salvage-game .rr-app .rr-map { position:relative; width:100%; aspect-ratio:1; background-image:var(--rr-board); background-repeat:no-repeat; background-position:center; background-size:82% 82%; background-color:#123476; border-radius:12px; }
#ring-salvage-game .rr-app .rr-map-cell { position:absolute; width:8.6%; height:8.6%; display:flex; align-items:center; justify-content:center; z-index:3; border-radius:8px; color:var(--rr-ink); }
#ring-salvage-game .rr-app .rr-map-cell:disabled,#ring-salvage-game .rr-app .rr-worker:disabled { opacity:1; }
#ring-salvage-game .rr-app .rr-map-cell.rr-road { width:7.4%; height:7.4%; margin:.6%; font-size:12px; font-weight:700; }
#ring-salvage-game .rr-app .rr-road-number { background:#fff9e6e6; padding:2px 4px; border-radius:4px; border:1px solid #21365e; min-width:24px; }
#ring-salvage-game .rr-app .rr-road.rr-port .rr-road-number { background:var(--rr-yellow); }
#ring-salvage-game .rr-app .rr-room .rr-cabin-art { position:absolute; inset:-14% -5% -8%; pointer-events:none; }
#ring-salvage-game .rr-app .rr-tile-tag { position:absolute; left:0; bottom:0; min-width:24px; font-size:11px; line-height:1.2; font-weight:700; color:var(--rr-paper); background:var(--rr-ink); border:1px solid #8ccbef; border-radius:3px; padding:2px 3px; }
#ring-salvage-game .rr-app .rr-stock { position:absolute; top:0; right:0; color:var(--rr-ink); background:var(--rr-yellow); border:1px solid var(--rr-ink); border-radius:50%; padding:2px; min-width:19px; font-size:11px; font-weight:700; }
#ring-salvage-game .rr-app .rr-map-cell.rr-can-land { background:#ffcf584a; box-shadow:inset 0 0 0 2px #ffe77b; }
#ring-salvage-game .rr-app .rr-map-cell.rr-selected-cell { box-shadow:0 0 0 3px #fff6cd,inset 0 0 0 2px #ffc84a; background:#ffbc635c; }
#ring-salvage-game .rr-app .rr-map-cell.rr-group-selected { box-shadow:0 0 0 2px #ffcf58; }
#ring-salvage-game .rr-app .rr-map-cell.rr-ghost { opacity:.75; border:2px dashed #ffdf79; box-shadow:none; z-index:8; }
#ring-salvage-game .rr-app .rr-pawn { position:absolute; right:-4px; top:-14px; z-index:9; width:35px; height:38px; background:var(--rr-role); border:2px solid var(--rr-ink); border-radius:12px 12px 5px 5px; box-shadow:0 3px 0 #071a44; }
#ring-salvage-game .rr-app .rr-pawn .rr-face { width:27px; height:27px; border-width:1px; margin:1px auto; }
#ring-salvage-game .rr-app .rr-pawn b { position:absolute; right:-6px; bottom:-5px; color:var(--rr-ink); font-size:11px; background:var(--rr-role); border:1px solid var(--rr-ink); border-radius:50%; min-width:17px; text-align:center; }
#ring-salvage-game .rr-app .rr-map-path { position:absolute; width:100%; height:100%; inset:0; pointer-events:none; z-index:7; }
#ring-salvage-game .rr-app .rr-map-path polyline { fill:none; stroke:#ffd85f; stroke-width:.8; stroke-linecap:round; stroke-linejoin:round; stroke-dasharray:1.4 1; }
#ring-salvage-game .rr-app .rr-map-path circle { fill:#fff9d9; stroke:#fca431; stroke-width:.5; }
#ring-salvage-game .rr-app .rr-map-legend { display:flex; flex-wrap:wrap; gap:13px; padding:8px 0 12px; color:#d8eaff; font-size:11px; }
#ring-salvage-game .rr-app .rr-map-legend b { color:var(--rr-yellow); }
#ring-salvage-game .rr-app .rr-mobile-choices { display:none; }
#ring-salvage-game .rr-app .rr-work-panel { display:flex; flex-direction:column; gap:11px; padding:13px 0; min-width:0; }
#ring-salvage-game .rr-app .rr-current-work { background:var(--rr-paper); border:3px solid var(--rr-ink); border-radius:13px; padding:13px; box-shadow:3px 4px 0 #071c47; flex:1; }
#ring-salvage-game .rr-app .rr-current-work h2 { font-size:21px; line-height:1.2; margin:8px 0; }
#ring-salvage-game .rr-app .rr-current-work p { font-size:13px; margin:8px 0; }
#ring-salvage-game .rr-app .rr-current-work .rr-tool-illustration { height:100px; width:100%; max-width:125px; margin:0 auto; }
#ring-salvage-game .rr-app .rr-expected { margin:12px 0; padding:9px 0; border-top:2px dashed #bcc0bd; border-bottom:2px dashed #bcc0bd; font-size:12px; }
#ring-salvage-game .rr-app .rr-expected b { color:#aa471d; }
#ring-salvage-game .rr-app .rr-current-work .rr-button { width:100%; }
#ring-salvage-game .rr-app .rr-current-work .rr-active-portrait { --rr-portrait-height:280px; margin-top:18px; }
#ring-salvage-game .rr-app .rr-move-options { display:flex; flex-wrap:wrap; gap:5px; margin:9px 0; }
#ring-salvage-game .rr-app .rr-move-options .rr-button { width:auto; font-size:11px; padding:5px 7px; }
#ring-salvage-game .rr-app .rr-move-options button[aria-pressed="true"] { background:var(--rr-yellow); }
#ring-salvage-game .rr-app .rr-cargo { border:2px solid var(--rr-ink); border-radius:9px; background:#d2e8f0; padding:10px 12px; font-size:12px; }
#ring-salvage-game .rr-app .rr-cargo strong { display:block; margin-bottom:5px; }
#ring-salvage-game .rr-app .rr-cargo-row { display:flex; justify-content:space-between; gap:6px; margin-top:4px; }
#ring-salvage-game .rr-app .rr-cargo-row b { font-variant-numeric:tabular-nums; }
#ring-salvage-game .rr-app .rr-charge { display:flex; align-items:center; justify-content:space-between; gap:5px; border-top:1px solid #8ea5b2; margin-top:7px; padding-top:7px; }
#ring-salvage-game .rr-app .rr-charge button { text-decoration:underline; }
#ring-salvage-game .rr-app .rr-hand { padding:13px 16px 17px; border-top:3px solid var(--rr-ink); background:#c2e0ed; }
#ring-salvage-game .rr-app .rr-hand-head { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px; margin-bottom:10px; }
#ring-salvage-game .rr-app .rr-hand-head strong { font-size:14px; }
#ring-salvage-game .rr-app .rr-free { padding:7px 10px; background:var(--rr-paper); border:2px solid var(--rr-ink); border-radius:7px; font-size:12px; }
#ring-salvage-game .rr-app .rr-free b { font-size:17px; }
#ring-salvage-game .rr-app .rr-hand-cards { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:12px; align-items:end; }
#ring-salvage-game .rr-app .rr-card { position:relative; border:2px solid var(--rr-ink); border-radius:11px; box-shadow:2px 4px 0 #233b61; padding:10px; background:var(--rr-paper); text-align:left; min-height:156px; display:flex; flex-direction:column; align-items:stretch; gap:4px; transition:transform .15s; }
#ring-salvage-game .rr-app .rr-card:nth-child(2n) { transform:rotate(1deg); }
#ring-salvage-game .rr-app .rr-card:hover { transform:translateY(-5px); }
#ring-salvage-game .rr-app .rr-card[aria-pressed="true"] { transform:translateY(-8px) rotate(-1deg); border:3px solid #ac5815; padding:9px; background:#fff0bb; box-shadow:2px 7px 0 #233b61; }
#ring-salvage-game .rr-app .rr-card-top { display:flex; justify-content:space-between; align-items:center; font-size:11px; font-weight:700; letter-spacing:.5px; }
#ring-salvage-game .rr-app .rr-card-art { display:flex; align-items:center; justify-content:center; height:73px; }
#ring-salvage-game .rr-app .rr-card-art .rr-art { width:94px; height:73px; }
#ring-salvage-game .rr-app .rr-card-art .rr-face { margin:0 -3px; width:47px; height:47px; }
#ring-salvage-game .rr-app .rr-card-art .rr-big-number { font-size:56px; color:#257ac6; font-weight:900; line-height:1; text-shadow:2px 2px 0 #143657; }
#ring-salvage-game .rr-app .rr-card strong { font-size:15px; }
#ring-salvage-game .rr-app .rr-card small { font-size:11px; color:var(--rr-muted); line-height:1.4; }
#ring-salvage-game .rr-app .rr-command-bar { display:flex; align-items:center; flex-wrap:wrap; gap:8px; padding:11px 16px; background:var(--rr-paper); border-top:3px solid var(--rr-ink); }
#ring-salvage-game .rr-app .rr-action-note { flex:1; min-width:180px; font-size:12px; }
#ring-salvage-game .rr-app .rr-action-note b { color:#a14f0e; }
#ring-salvage-game .rr-app .rr-cover { padding:22px; min-height:740px; position:relative; background-color:#153d89; background-image:radial-gradient(#fff5 .8px,transparent .8px); background-size:35px 35px; }
#ring-salvage-game .rr-app .rr-cover-top { display:flex; align-items:center; justify-content:space-between; gap:15px; color:var(--rr-paper); }
#ring-salvage-game .rr-app .rr-cover-main { display:grid; grid-template-columns:310px minmax(0,1fr); gap:18px; align-items:center; margin-top:25px; }
#ring-salvage-game .rr-app .rr-title { font-size:76px; font-weight:900; line-height:1.05; letter-spacing:3px; color:var(--rr-paper); text-shadow:4px 5px 0 #0b204b,-2px -2px 0 #0b204b; transform:rotate(-3deg); margin:0 0 22px; }
#ring-salvage-game .rr-app .rr-title span { color:var(--rr-yellow); }
#ring-salvage-game .rr-app .rr-cover-copy { color:var(--rr-paper); font-size:17px; max-width:300px; }
#ring-salvage-game .rr-app .rr-cover-actions { display:flex; flex-direction:column; gap:12px; margin-top:25px; max-width:280px; }
#ring-salvage-game .rr-app .rr-cover-actions .rr-button { min-height:51px; font-size:17px; }
#ring-salvage-game .rr-app .rr-cover-art { position:relative; min-height:540px; }
#ring-salvage-game .rr-app .rr-cover-map { position:absolute; width:92%; aspect-ratio:1; left:8%; top:0; background-image:var(--rr-board); background-size:100%; transform:rotate(6deg); border:3px solid var(--rr-ink); border-radius:15px; box-shadow:8px 10px 0 #09224d; }
#ring-salvage-game .rr-app .rr-cover-lineup { background-color:var(--rr-paper); position:absolute; left:0; right:0; bottom:0; aspect-ratio:1597/985; background-image:var(--rr-crew); background-size:100% 100%; border:3px solid var(--rr-ink); border-radius:12px; transform:rotate(-3deg); box-shadow:7px 8px 0 #09224d; }
#ring-salvage-game .rr-app .rr-cover-stamp { display:inline-block; background:var(--rr-yellow); border:2px solid var(--rr-ink); border-radius:6px; padding:7px 11px; transform:rotate(-3deg); color:var(--rr-ink); font-size:12px; font-weight:700; }
#ring-salvage-game .rr-app .rr-cover-bottom { color:#d6e7ff; font-size:12px; margin-top:27px; }
#ring-salvage-game .rr-app .rr-selection-page { background:var(--rr-paper); padding:22px; min-height:830px; }
#ring-salvage-game .rr-app .rr-page-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; margin-bottom:19px; }
#ring-salvage-game .rr-app .rr-page-heading h1 { font-size:30px; line-height:1.15; margin:6px 0 9px; }
#ring-salvage-game .rr-app .rr-role-cards { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
#ring-salvage-game .rr-app .rr-role-card { border:3px solid var(--rr-ink); border-radius:12px; overflow:hidden; background:var(--rr-role-light); box-shadow:3px 5px 0 #b5b9b0; }
#ring-salvage-game .rr-app .rr-role-card .rr-character-space { height:310px; display:flex; align-items:end; justify-content:center; overflow:hidden; background:var(--rr-role-light); }
#ring-salvage-game .rr-app .rr-role-card .rr-role-info { padding:12px; border-top:2px solid var(--rr-ink); }
#ring-salvage-game .rr-app .rr-role-info h2 { margin:0 0 7px; font-size:19px; }
#ring-salvage-game .rr-app .rr-role-info p { font-size:12px; margin:5px 0 12px; min-height:35px; }
#ring-salvage-game .rr-app .rr-role-toggle { display:grid; grid-template-columns:1fr 1fr; gap:4px; }
#ring-salvage-game .rr-app .rr-role-toggle button { padding:8px 4px; border:2px solid var(--rr-ink); border-radius:6px; background:var(--rr-paper); font-size:12px; }
#ring-salvage-game .rr-app .rr-role-toggle button[aria-pressed="true"] { background:var(--rr-ink); color:var(--rr-paper); }
#ring-salvage-game .rr-app .rr-setup-footer { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-top:25px; padding-top:18px; border-top:2px dashed #a2afbc; }
#ring-salvage-game .rr-app .rr-setup-options { font-size:12px; }
#ring-salvage-game .rr-app .rr-setup-options summary { padding:8px 0; }
#ring-salvage-game .rr-app .rr-setup-options label { display:flex; align-items:center; gap:8px; padding:7px 0; }
#ring-salvage-game .rr-app .rr-setup-options input[type="text"] { border:1px solid var(--rr-muted); border-radius:4px; padding:6px; width:150px; }
#ring-salvage-game .rr-app .rr-selection-error { color:#a4292f; font-size:12px; min-height:18px; }
#ring-salvage-game .rr-app .rr-overlay { position:absolute; inset:0; z-index:30; background:#071c49d9; padding:28px; display:flex; align-items:flex-start; justify-content:center; }
#ring-salvage-game .rr-app .rr-dialog { width:min(660px,100%); margin-top:35px; background:var(--rr-paper); border:3px solid var(--rr-ink); border-radius:16px; box-shadow:7px 8px 0 #092451; overflow:hidden; }
#ring-salvage-game .rr-app .rr-dialog-head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:16px 20px; border-bottom:3px solid var(--rr-ink); background:#bbe0f1; }
#ring-salvage-game .rr-app .rr-dialog-head h2 { font-size:22px; margin:0; }
#ring-salvage-game .rr-app .rr-dialog-body { padding:20px; }
#ring-salvage-game .rr-app .rr-dialog-body p { margin:9px 0; }
#ring-salvage-game .rr-app .rr-dialog-actions { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:10px; margin-top:18px; }
#ring-salvage-game .rr-app .rr-dialog-crew { display:flex; align-items:center; gap:13px; margin-bottom:16px; }
#ring-salvage-game .rr-app .rr-dialog-crew .rr-face { width:74px; height:74px; }
#ring-salvage-game .rr-app .rr-dialog-crew strong { font-size:21px; }
#ring-salvage-game .rr-app .rr-dialog-highlight { padding:13px 16px; background:#f9d983; border:2px solid var(--rr-ink); border-radius:9px; font-size:14px; }
#ring-salvage-game .rr-app .rr-order-list { display:grid; gap:10px; }
#ring-salvage-game .rr-app .rr-mission { background:#fffcf1; border:2px solid #668099; border-radius:8px; padding:12px 14px; display:grid; grid-template-columns:minmax(0,1fr) 52px; gap:10px; }
#ring-salvage-game .rr-app .rr-mission h3 { font-size:15px; margin:0 0 5px; }
#ring-salvage-game .rr-app .rr-mission p { font-size:12px; color:var(--rr-muted); margin:4px 0; }
#ring-salvage-game .rr-app .rr-mission .rr-reward { align-self:center; font-size:20px; font-weight:900; color:#9e570b; text-align:center; }
#ring-salvage-game .rr-app .rr-mission .rr-reward small { display:block; font-size:11px; }
#ring-salvage-game .rr-app .rr-help-tabs { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:16px; }
#ring-salvage-game .rr-app .rr-help-tabs button[aria-pressed="true"] { background:var(--rr-yellow); }
#ring-salvage-game .rr-app .rr-help-rule { display:flex; align-items:flex-start; gap:12px; margin:15px 0; font-size:14px; }
#ring-salvage-game .rr-app .rr-help-rule b { font-size:18px; color:#1a75b8; }
#ring-salvage-game .rr-app .rr-pause-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
#ring-salvage-game .rr-app .rr-discard { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
#ring-salvage-game .rr-app .rr-discard button { min-height:85px; background:#d4e6f4; border:2px solid var(--rr-ink); border-radius:8px; padding:10px; }
#ring-salvage-game .rr-app .rr-discard button[aria-pressed="true"] { background:#f9d983; border:3px solid #aa5717; }
#ring-salvage-game .rr-app .rr-result-page { padding:22px; background:#143d85; color:var(--rr-paper); min-height:860px; }
#ring-salvage-game .rr-app .rr-result-page .rr-page-heading h1 { font-size:34px; }
#ring-salvage-game .rr-app .rr-result-grid { display:grid; grid-template-columns:220px minmax(0,1fr); gap:24px; }
#ring-salvage-game .rr-app .rr-winner { border:3px solid var(--rr-ink); border-radius:12px; background:#bee7cd; color:var(--rr-ink); text-align:center; overflow:hidden; box-shadow:5px 6px 0 #082251; }
#ring-salvage-game .rr-app .rr-winner .rr-full { --rr-portrait-height:390px; }
#ring-salvage-game .rr-app .rr-winner-copy { padding:15px; background:#f9d983; border-top:3px solid var(--rr-ink); }
#ring-salvage-game .rr-app .rr-winner-copy h2 { margin:0 0 7px; font-size:22px; }
#ring-salvage-game .rr-app .rr-rank-list { display:grid; gap:10px; }
#ring-salvage-game .rr-app .rr-rank { display:grid; grid-template-columns:27px 49px minmax(0,1fr) 45px; align-items:center; gap:10px; background:var(--rr-paper); color:var(--rr-ink); padding:11px 12px; border:2px solid var(--rr-ink); border-radius:10px; }
#ring-salvage-game .rr-app .rr-rank .rr-face { width:45px; height:45px; }
#ring-salvage-game .rr-app .rr-rank-total { font-size:29px; font-weight:900; }
#ring-salvage-game .rr-app .rr-rank small { display:block; margin-top:3px; font-size:12px; color:var(--rr-muted); }
#ring-salvage-game .rr-app .rr-score-table { margin-top:17px; width:100%; border-collapse:collapse; font-size:12px; }
#ring-salvage-game .rr-app .rr-score-table th,#ring-salvage-game .rr-app .rr-score-table td { padding:10px 5px; text-align:right; border-bottom:1px solid #77a3d3; }
#ring-salvage-game .rr-app .rr-score-table th:first-child,#ring-salvage-game .rr-app .rr-score-table td:first-child { text-align:left; }
#ring-salvage-game .rr-app .rr-result-footer { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:12px; margin-top:23px; }
#ring-salvage-game .rr-app .rr-replay-player { background:var(--rr-paper); border-top:3px solid var(--rr-ink); padding:14px 18px; }
#ring-salvage-game .rr-app .rr-replay-mainline { display:flex; align-items:center; gap:12px; justify-content:space-between; flex-wrap:wrap; margin-bottom:12px; }
#ring-salvage-game .rr-app .rr-replay-controls { display:flex; gap:6px; flex-wrap:wrap; }
#ring-salvage-game .rr-app .rr-replay-range { width:100%; accent-color:#245899; }
#ring-salvage-game .rr-app .rr-frame-labels { display:flex; justify-content:space-between; font-size:11px; padding-top:4px; }
#ring-salvage-game .rr-app .rr-replay-library { display:grid; gap:10px; }
#ring-salvage-game .rr-app .rr-replay-library button { border:2px solid var(--rr-ink); background:#d8edf3; border-radius:9px; padding:13px; text-align:left; }
#ring-salvage-game .rr-app .rr-replay-library strong { display:block; font-size:16px; }
#ring-salvage-game .rr-app .rr-replay-library small { display:block; margin-top:4px; font-size:12px; }
#ring-salvage-game .rr-app i[data-lucide] { width:17px; height:17px; }
@media(max-width:820px) {
  #ring-salvage-game .rr-app .rr-current-work .rr-active-portrait { display:none; }
  #ring-salvage-game .rr-app .rr-arena { grid-template-columns:minmax(0,1fr) 190px; padding:0 10px; gap:10px; }
  #ring-salvage-game .rr-app .rr-worker { padding:6px; gap:5px; }
  #ring-salvage-game .rr-app .rr-worker .rr-face { width:36px; height:36px; }
  #ring-salvage-game .rr-app .rr-worker-score { font-size:22px; }
  #ring-salvage-game .rr-app .rr-cover-main { grid-template-columns:240px minmax(0,1fr); }
  #ring-salvage-game .rr-app .rr-title { font-size:62px; }
  #ring-salvage-game .rr-app .rr-cover-art { min-height:450px; }
  #ring-salvage-game .rr-app .rr-hand-cards { gap:8px; }
  #ring-salvage-game .rr-app .rr-card { padding:8px; }
  #ring-salvage-game .rr-app .rr-role-cards { gap:8px; }
  #ring-salvage-game .rr-app .rr-role-info { padding:9px!important; }
  #ring-salvage-game .rr-app .rr-role-info h2 { font-size:16px; }
}
@media(max-width:680px) {
  #ring-salvage-game .rr-review { padding-right:95px; }
  #ring-salvage-game .rr-app .rr-gamebar { flex-wrap:wrap; padding:13px 12px; }
  #ring-salvage-game .rr-app .rr-bar-right { width:100%; }
  #ring-salvage-game .rr-app .rr-logo { font-size:23px; }
  #ring-salvage-game .rr-app .rr-roster { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; padding:10px; }
  #ring-salvage-game .rr-app .rr-worker .rr-face { width:41px; height:41px; }
  #ring-salvage-game .rr-app .rr-arena { grid-template-columns:minmax(0,1fr); gap:0; }
  #ring-salvage-game .rr-app .rr-work-panel { padding-top:0; }
  #ring-salvage-game .rr-app .rr-current-work { padding:13px; }
  #ring-salvage-game .rr-app .rr-current-work .rr-tool-illustration { width:95px; height:82px; float:right; margin:0 0 6px 8px; }
  #ring-salvage-game .rr-app .rr-current-work .rr-button { width:auto; }
  #ring-salvage-game .rr-app .rr-current-work .rr-active-portrait { display:none; }
  #ring-salvage-game .rr-app .rr-cargo { display:flex; flex-wrap:wrap; gap:5px 16px; }
  #ring-salvage-game .rr-app .rr-cargo strong { width:100%; }
  #ring-salvage-game .rr-app .rr-cargo-row { gap:12px; }
  #ring-salvage-game .rr-app .rr-charge { width:100%; }
  #ring-salvage-game .rr-app .rr-mobile-choices { display:flex; flex-wrap:wrap; gap:6px; margin:0 0 10px; }
  #ring-salvage-game .rr-app .rr-mobile-choices button { background:#fff7df; padding:9px 11px; border:2px solid var(--rr-ink); border-radius:7px; min-height:44px; font-size:12px; }
  #ring-salvage-game .rr-app .rr-hand-cards { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
  #ring-salvage-game .rr-app .rr-card { min-height:146px; }
  #ring-salvage-game .rr-app .rr-hand-head { align-items:flex-start; }
  #ring-salvage-game .rr-app .rr-map-cell { border-radius:4px; }
  #ring-salvage-game .rr-app .rr-road-number { font-size:11px; min-width:19px; padding:1px 2px; }
  #ring-salvage-game .rr-app .rr-pawn { width:26px; height:29px; top:-10px; right:-2px; }
  #ring-salvage-game .rr-app .rr-pawn .rr-face { width:20px; height:20px; }
  #ring-salvage-game .rr-app .rr-pawn b { min-width:15px; right:-4px; bottom:-4px; font-size:11px; }
  #ring-salvage-game .rr-app .rr-stock { min-width:16px; font-size:11px; padding:1px; }
  #ring-salvage-game .rr-app .rr-tile-tag { min-width:19px; padding:1px 2px; font-size:11px; }
  #ring-salvage-game .rr-app .rr-cover { padding:18px; }
  #ring-salvage-game .rr-app .rr-cover-main { display:flex; flex-direction:column; align-items:stretch; margin-top:27px; }
  #ring-salvage-game .rr-app .rr-title { font-size:64px; }
  #ring-salvage-game .rr-app .rr-cover-copy { font-size:15px; }
  #ring-salvage-game .rr-app .rr-cover-art { min-height:410px; width:100%; max-width:490px; align-self:center; }
  #ring-salvage-game .rr-app .rr-cover-actions { max-width:none; }
  #ring-salvage-game .rr-app .rr-role-cards { grid-template-columns:repeat(2,minmax(0,1fr)); gap:13px; }
  #ring-salvage-game .rr-app .rr-role-card .rr-character-space { height:270px; }
  #ring-salvage-game .rr-app .rr-role-card .rr-full { --rr-portrait-height:270px; }
  #ring-salvage-game .rr-app .rr-selection-page { padding:17px; }
  #ring-salvage-game .rr-app .rr-page-heading { flex-wrap:wrap; gap:12px; }
  #ring-salvage-game .rr-app .rr-page-heading h1 { font-size:26px; }
  #ring-salvage-game .rr-app .rr-setup-footer { flex-direction:column; align-items:stretch; }
  #ring-salvage-game .rr-app .rr-overlay { padding:12px; }
  #ring-salvage-game .rr-app .rr-dialog { margin-top:22px; }
  #ring-salvage-game .rr-app .rr-dialog-head { padding:12px; }
  #ring-salvage-game .rr-app .rr-dialog-head h2 { font-size:19px; }
  #ring-salvage-game .rr-app .rr-dialog-body { padding:14px; }
  #ring-salvage-game .rr-app .rr-mission { padding:10px; grid-template-columns:minmax(0,1fr) 35px; }
  #ring-salvage-game .rr-app .rr-pause-grid { grid-template-columns:minmax(0,1fr); }
  #ring-salvage-game .rr-app .rr-discard { grid-template-columns:repeat(2,minmax(0,1fr)); }
  #ring-salvage-game .rr-app .rr-result-page { padding:17px; }
  #ring-salvage-game .rr-app .rr-result-grid { grid-template-columns:minmax(0,1fr); }
  #ring-salvage-game .rr-app .rr-winner { display:grid; grid-template-columns:115px minmax(0,1fr); }
  #ring-salvage-game .rr-app .rr-winner .rr-full { --rr-portrait-height:290px; }
  #ring-salvage-game .rr-app .rr-winner-copy { border-top:0; border-left:3px solid var(--rr-ink); display:flex; flex-direction:column; justify-content:center; }
  #ring-salvage-game .rr-app .rr-rank { gap:6px; grid-template-columns:20px 38px minmax(0,1fr) 35px; padding:9px; }
  #ring-salvage-game .rr-app .rr-rank .rr-face { width:36px; height:36px; }
  #ring-salvage-game .rr-app .rr-rank small { font-size:11px; }
  #ring-salvage-game .rr-app .rr-rank-total { font-size:25px; }
  #ring-salvage-game .rr-app .rr-score-table { font-size:11px; }
}
@media(pointer:coarse) {
  #ring-salvage-game .rr-review-pages button,#ring-salvage-game .rr-review select,#ring-salvage-game .rr-app .rr-button,#ring-salvage-game .rr-app .rr-role-toggle button,#ring-salvage-game .rr-app .rr-free,#ring-salvage-game .rr-app .rr-link { min-height:44px; }
}
@media(max-width:420px) {
  #ring-salvage-game .rr-app .rr-worker { display:grid; grid-template-columns:36px minmax(0,1fr); gap:6px; }
  #ring-salvage-game .rr-app .rr-worker .rr-face { width:36px; height:36px; }
  #ring-salvage-game .rr-app .rr-worker-copy { grid-column:1 / -1; grid-row:2; }
  #ring-salvage-game .rr-app .rr-worker-score { grid-column:2; grid-row:1; text-align:right; }
}
@media(prefers-reduced-motion:reduce) { #ring-salvage-game .rr-app .rr-card { transition:none; } }

html {color-scheme:light; background:#0b224c}
body {margin:0;background:#0b224c;padding:16px;color:#17284c;font-family:"Microsoft YaHei","PingFang SC",system-ui,sans-serif}
#legacy-runtime {display:none!important}
#ring-salvage-game #cartoon-language-bar {display:flex;align-items:center;justify-content:flex-end;gap:6px;padding:6px 14px;background:#0b224c;color:#fff7df;font-size:12px}
#ring-salvage-game #cartoon-language-bar button,#modalRoot .rr-modal-language button {border:1px solid #8ec5eb;border-radius:5px;background:#fff7df;color:#17284c;padding:4px 8px;min-height:27px;font-size:12px;box-shadow:none;cursor:pointer}
#ring-salvage-game #cartoon-language-bar button[aria-pressed="true"],#modalRoot .rr-modal-language button[aria-pressed="true"] {background:#ffd457;border-color:#ffd457}
#modalRoot .rr-modal-language {display:flex;gap:4px;flex-shrink:0}
#modalRoot .rr-modal-head {flex-wrap:wrap}
.rr-en #ring-salvage-game .rr-app .rr-title {font-size:48px;letter-spacing:0;overflow-wrap:normal}
.rr-en #ring-salvage-game .rr-app .rr-logo {font-size:22px;letter-spacing:0}
.rr-en #ring-salvage-game .rr-app .rr-gamebar {flex-wrap:wrap}
.rr-en #ring-salvage-game .rr-app .rr-bar-left {min-width:0}
.rr-en #ring-salvage-game .rr-app .rr-worker-copy strong {font-size:12px}
.rr-en #ring-salvage-game .rr-app .rr-worker-score {font-size:22px}
.rr-en #ring-salvage-game .rr-app .rr-roster .rr-score-label {font-size:10px}
.rr-en #ring-salvage-game .rr-app .rr-card-top {letter-spacing:0;font-size:10px}
.rr-en #ring-salvage-game .rr-app .rr-role-info p {min-height:52px}
.rr-en #ring-salvage-game .rr-app .rr-cargo-row {flex-wrap:wrap}
.rr-en #ring-salvage-game .rr-app .rr-work-panel .rr-charge {flex-wrap:wrap}
.rr-en #ring-salvage-game .rr-app .rr-free {max-width:100%;text-align:left}
.rr-en #ring-salvage-game .rr-app .rr-map-cell.rr-road .rr-road-number {font-size:10px;min-width:18px}
@media(max-width:420px){.rr-en #ring-salvage-game .rr-app .rr-title{font-size:42px}.rr-en #ring-salvage-game .rr-app .rr-worker-copy strong{overflow-wrap:anywhere}.rr-en #ring-salvage-game .rr-app .rr-day{padding-left:8px}.rr-en #ring-salvage-game .rr-app .rr-result-page h1{font-size:26px}}
#ring-salvage-game {max-width:1400px;margin:auto}
#ring-salvage-game .rr-app button {cursor:pointer}
#ring-salvage-game .rr-app button:disabled {cursor:default}
#ring-salvage-game .rr-app button:focus-visible {outline:3px solid #ffaf28;outline-offset:3px}
#ring-salvage-game .rr-app .rr-hand-cards {grid-template-columns:repeat(auto-fit,minmax(140px,1fr))}
#ring-salvage-game .rr-app .rr-hand-cards .rr-card {max-width:260px}
#ring-salvage-game .rr-app .rr-card small {white-space:normal}
#ring-salvage-game .rr-app .rr-map-cell {cursor:pointer}
#ring-salvage-game .rr-app .rr-pawn {pointer-events:none}
#ring-salvage-game .rr-app .rr-map-cell .rr-pawn-shared {width:25px;height:28px;border-radius:8px;right:auto;bottom:auto;top:-12px;left:-6px}
#ring-salvage-game .rr-app .rr-map-cell .rr-pawn-shared .rr-face {width:20px;height:20px}
#ring-salvage-game .rr-app .rr-map-cell .rr-pawn-shared b {min-width:13px;font-size:9px;right:-3px;bottom:-2px}
#ring-salvage-game .rr-app .rr-map-cell .rr-pawn-slot-1.rr-pawn-shared {left:21px}
#ring-salvage-game .rr-app .rr-map-cell .rr-pawn-slot-2.rr-pawn-shared {top:18px}
#ring-salvage-game .rr-app .rr-map-cell .rr-pawn-slot-3.rr-pawn-shared {top:18px;left:21px}
#ring-salvage-game .rr-app .rr-can-land {outline:3px solid #ffd457;outline-offset:-1px}
#ring-salvage-game .rr-app .rr-selected-cell {outline:4px solid #fff;z-index:6}
#ring-salvage-game .rr-app .rr-map-path {z-index:7;pointer-events:none}
#ring-salvage-game .rr-app .rr-depleted .rr-cabin-art {filter:grayscale(.75);opacity:.7}
#ring-salvage-game .rr-app .rr-voyage-fill {height:5px;background:#17284c22;margin-top:4px;border-radius:4px;overflow:hidden}
#ring-salvage-game .rr-app .rr-voyage-fill i {display:block;height:100%;background:#3a98ed}
#ring-salvage-game .rr-app .rr-work-panel {min-width:0}
#ring-salvage-game .rr-app .rr-current-work h2 {overflow-wrap:anywhere}
#ring-salvage-game .rr-app .rr-current-work .rr-button {width:100%;margin-top:8px}
#ring-salvage-game .rr-app .rr-expected {overflow-wrap:anywhere}
#ring-salvage-game .rr-app .rr-expected .notice {padding:7px;background:#fff7df;border:0;color:#17284c;margin:0;line-height:1.6}
#ring-salvage-game .rr-app .rr-expected .ux-tile-title {display:flex;gap:6px}
#ring-salvage-game .rr-app .rr-expected .ux-tile-title button {display:none}
#ring-salvage-game .rr-app .rr-expected .ux-tile-line {margin:5px 0;font-size:12px}
#ring-salvage-game .rr-app .rr-expected .ux-pill {display:inline-block;background:#e5d3a0;padding:1px 3px;border-radius:3px}
#ring-salvage-game .rr-app .rr-expected .ux-muted {color:#586582;font-size:12px}
#ring-salvage-game .rr-app .rr-current-work .rr-move-options {max-height:170px;overflow:auto}
#ring-salvage-game .rr-app .rr-current-work .rr-move-options .rr-button {margin:3px 0}
#ring-salvage-game .rr-app .rr-work-panel .rr-supply {background:#c2e5c6;padding:12px;border:2px solid #17284c;border-radius:9px;margin-top:10px;font-size:12px}
#ring-salvage-game .rr-app .rr-command-bar {flex-wrap:wrap}
#ring-salvage-game .rr-app .rr-log {background:#fff7df;padding:10px 16px;border-top:2px solid #17284c;font-size:12px}
#ring-salvage-game .rr-app .rr-log summary {cursor:pointer;font-weight:bold}
#ring-salvage-game .rr-app .rr-log-body {max-height:200px;overflow:auto;padding-top:8px;line-height:1.8}
#ring-salvage-game .rr-app .rr-roster-public {padding:10px 14px;background:#fff7df;font-size:12px}
#ring-salvage-game .rr-app .rr-worker-copy small {white-space:normal}
#ring-salvage-game .rr-app .rr-hand-note {padding:18px;background:#fff7df;text-align:center}
#ring-salvage-game .rr-app .rr-rank {min-width:0}
#ring-salvage-game .rr-app .rr-rank > div {min-width:0}
#ring-salvage-game .rr-app .rr-score-table {width:100%}
#ring-salvage-game .rr-app .rr-result-page .rr-page-heading p {color:#d0e6ff}
#ring-salvage-game .rr-app .rr-cover .rr-kicker,#ring-salvage-game .rr-app .rr-result-page .rr-kicker {color:#fff7df}
#ring-salvage-game .rr-app .rr-replay-controls {flex-wrap:wrap}
#ring-salvage-game .rr-app .rr-replay-player select {max-width:100%;border:2px solid #17284c;border-radius:5px;padding:5px;color:#17284c;background:#fff7df}
#ring-salvage-game .rr-app .rr-replay-summary {font-size:13px}
#ring-salvage-game .rr-app .rr-route-tools {display:flex;flex-wrap:wrap;gap:4px;margin:10px 0}
#ring-salvage-game .rr-app .rr-route-tools .rr-button {width:auto;font-size:11px;padding:5px 7px;min-height:30px}
#ring-salvage-game .rr-app .rr-route-tools button[aria-pressed="true"] {background:#ffd457}
#ring-salvage-game .rr-app .rr-mission p {white-space:normal}
#modalRoot .rr-modal-body .rr-button {margin:4px;min-height:40px}
#modalRoot .rr-modal-body .rr-dialog-actions {margin-top:12px}
#modalRoot .rr-modal-body .rr-help-tabs {display:flex;flex-wrap:wrap;gap:4px;margin-bottom:14px}
#modalRoot .rr-modal-body .rr-help-rule {padding:10px 0;border-bottom:1px solid #17284c30;display:flex;gap:10px}
#modalRoot .rr-modal-body .rr-help-rule > b {color:#2f6bab}
#modalRoot .rr-modal-body .rr-order-list {display:grid;gap:9px}
#modalRoot .rr-modal-body .rr-mission {display:flex;gap:12px;align-items:center;background:#fffaf0;border:2px solid #17284c;border-radius:8px;padding:12px}
#modalRoot .rr-modal-body .rr-mission > div:first-child {flex:1}
#modalRoot .rr-modal-body .rr-mission h3 {font-size:16px;margin:0}
#modalRoot .rr-modal-body .rr-mission p {margin:6px 0}
#modalRoot .rr-modal-body .rr-reward {font-size:26px;font-weight:bold;color:#17284c}
#modalRoot .rr-modal-body .rr-reward small {display:block;font-size:11px}
#modalRoot .rr-modal-body .rr-complete {background:#c2e5c6}
#modalRoot .rr-modal-body .rr-pause-grid {display:grid;grid-template-columns:1fr 1fr;gap:9px}
#modalRoot .rr-modal-body .rr-score-table {border-collapse:collapse;width:100%}
#modalRoot .rr-modal-body .rr-score-table th,#modalRoot .rr-modal-body .rr-score-table td {padding:6px;border-bottom:1px solid #17284c40;text-align:left;font-size:12px}
#modalRoot .rr-modal-body .rr-replay-summary .rr-score-table {min-width:530px}
#moveNotice.ux-toast {z-index:1000;max-width:calc(100vw - 30px);background:#fff7df;border:2px solid #17284c;color:#17284c;box-shadow:0 4px 0 #17284c}
@media(max-width:820px){body{padding:8px} #ring-salvage-game .rr-app .rr-hand-cards{grid-template-columns:repeat(auto-fit,minmax(130px,1fr))}}
@media(min-width:421px) and (max-width:820px){#ring-salvage-game .rr-app .rr-roster{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){#ring-salvage-game .rr-app .rr-map-cell .rr-pawn{width:23px;height:25px;top:-8px;right:-2px;border-width:1px} #ring-salvage-game .rr-app .rr-map-cell .rr-pawn .rr-face{width:18px;height:18px} #ring-salvage-game .rr-app .rr-map-cell .rr-pawn b{min-width:11px;font-size:8px;right:-2px;bottom:-2px} #ring-salvage-game .rr-app .rr-map-cell .rr-pawn-shared{width:18px;height:20px;top:-7px;left:-5px} #ring-salvage-game .rr-app .rr-map-cell .rr-pawn-shared .rr-face{width:14px;height:14px;margin:0 auto} #ring-salvage-game .rr-app .rr-map-cell .rr-pawn-slot-1.rr-pawn-shared{left:14px} #ring-salvage-game .rr-app .rr-map-cell .rr-pawn-slot-2.rr-pawn-shared{top:15px} #ring-salvage-game .rr-app .rr-map-cell .rr-pawn-slot-3.rr-pawn-shared{top:15px;left:14px}}
@media(max-width:420px){body{padding:0} #ring-salvage-game .rr-app{border-radius:0;border-width:0} #ring-salvage-game .rr-app .rr-arena{padding:0 8px;gap:8px} #ring-salvage-game .rr-app .rr-map-cell .rr-face{border-width:1px} #ring-salvage-game .rr-app .rr-map-cell .rr-pawn b{font-size:8px} #ring-salvage-game .rr-app .rr-hand-cards{grid-template-columns:repeat(2,minmax(0,1fr))} #ring-salvage-game .rr-app .rr-hand-cards .rr-card{max-width:none} #modalRoot .rr-modal-body .rr-pause-grid{grid-template-columns:1fr}}

/* Existing engine dialogs; no rules or choice controls are replaced. */
#modalRoot { --rr-ink:#17284c; --rr-paper:#fff7df; --rr-yellow:#ffd457; --rr-muted:#586582; color:var(--rr-ink); font:14px/1.5 "Microsoft YaHei","PingFang SC",system-ui,sans-serif; position:relative; z-index:1000; }
#modalRoot * { box-sizing:border-box; }
#modalRoot [hidden] { display:none!important; }
#modalRoot .modal-back { position:fixed; inset:0; z-index:1000; display:flex; align-items:center; justify-content:center; padding:24px; overflow:auto; overscroll-behavior:contain; background:#071c49d9; }
#modalRoot .modal { width:min(680px,100%); max-width:680px; max-height:calc(100vh - 48px); max-height:calc(100dvh - 48px); margin:0; padding:0; display:flex; flex-direction:column; overflow:hidden; color:var(--rr-ink); background:var(--rr-paper); border:3px solid var(--rr-ink); border-radius:16px; box-shadow:7px 8px 0 #092451; }
#modalRoot .rr-modal-head { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-shrink:0; padding:16px 20px; border-bottom:3px solid var(--rr-ink); background:#bbe0f1; }
#modalRoot .rr-modal-head h2,#modalRoot .rr-modal-head h3 { margin:0; font-size:21px; line-height:1.35; overflow-wrap:anywhere; }
#modalRoot .rr-modal-body { padding:20px; min-height:0; overflow:auto; overscroll-behavior:contain; scrollbar-gutter:stable; }
#modalRoot p { margin:9px 0 14px; }
#modalRoot h4 { margin:20px 0 10px; font-size:15px; padding-bottom:7px; border-bottom:2px dashed #bcc0bd; }
#modalRoot .ux-eyebrow { color:var(--rr-muted); font-size:12px; font-weight:700; }
#modalRoot .ux-muted,#modalRoot .rr-mini { color:var(--rr-muted); font-size:12px; }
#modalRoot button { min-height:42px; max-width:100%; padding:9px 15px; border:2px solid var(--rr-ink); border-radius:9px; box-shadow:0 3px 0 var(--rr-ink); background:var(--rr-paper); color:var(--rr-ink); font:inherit; font-weight:700; cursor:pointer; touch-action:manipulation; overflow-wrap:anywhere; }
#modalRoot button:hover:not(:disabled) { transform:translateY(-1px); background:#fff0bb; }
#modalRoot button:active:not(:disabled) { transform:translateY(2px); box-shadow:0 1px 0 var(--rr-ink); }
#modalRoot button:disabled { opacity:.45; cursor:default; }
#modalRoot button:focus-visible,#modalRoot .modal:focus-visible { outline:3px solid #ed7832; outline-offset:4px; }
#modalRoot button.primary,#modalRoot button.rr-modal-positive { background:var(--rr-yellow); }
#modalRoot .rr-modal-close { flex-shrink:0; min-height:36px; padding:5px 10px; font-size:12px; }
#modalRoot .choice-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(230px,100%),1fr)); gap:11px; margin:12px 0 16px; }
#modalRoot .choice { display:block; width:100%; text-align:left; padding:12px; line-height:1.55; }
#modalRoot .choice strong,#modalRoot .choice b { font-size:15px; }
#modalRoot .choice > span { font-size:13px!important; font-weight:400; }
#modalRoot .choice.selected,#modalRoot .choice[aria-pressed="true"] { background:#fff0bb; border-color:#ac5815; box-shadow:inset 0 0 0 1px #ac5815,0 3px 0 var(--rr-ink); }
#modalRoot .modal-actions { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:10px; flex-shrink:0; margin:0; padding:14px 20px 17px; border-top:2px solid var(--rr-ink); background:var(--rr-paper); }
#modalRoot .modal-actions:empty { display:none; }
#modalRoot .rr-modal-owner { display:flex; align-items:center; gap:13px; padding-bottom:15px; margin-bottom:15px; border-bottom:2px dashed #bcc0bd; }
#modalRoot .rr-modal-owner strong { display:block; font-size:18px; }
#modalRoot .rr-modal-owner small { display:block; color:var(--rr-muted); font-size:12px; }
#modalRoot .rr-face { display:block; width:68px; height:68px; flex-shrink:0; border:2px solid var(--rr-ink); border-radius:50%; background-image:var(--rr-crew); background-repeat:no-repeat; background-color:#bbe0f1; }
#modalRoot .rr-modal-face-placeholder { display:flex; align-items:center; justify-content:center; font-size:28px; }
#modalRoot table { width:100%; border-collapse:collapse; font-size:13px; }
#modalRoot th,#modalRoot td { padding:9px 7px; border-bottom:1px solid #bfc8c8; text-align:left; }
#modalRoot th { background:#d2e8f0; }
#modalRoot .ux-menu-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:11px; }
#modalRoot .ux-scan-map { max-width:470px; margin:16px auto; padding:7px; background:#c8e5f0; border:2px solid var(--rr-ink); border-radius:10px; }
#modalRoot .ux-scan-cell { color:var(--rr-ink); }
#modalRoot button.ux-scan-cell { min-height:0; padding:0; border-radius:4px; box-shadow:none; }
#modalRoot .ux-scan-cell.target { background:var(--rr-yellow); border:2px solid var(--rr-ink); }
#modalRoot .ux-scan-cell.here { background:#174c92; color:var(--rr-paper); }
@media (max-width:600px) {
 #modalRoot .modal-back { padding:10px; }
 #modalRoot .modal { max-height:calc(100vh - 20px); max-height:calc(100dvh - 20px); border-radius:12px; box-shadow:4px 5px 0 #092451; }
 #modalRoot .rr-modal-head { padding:12px 14px; gap:8px; }
 #modalRoot .rr-modal-head h2,#modalRoot .rr-modal-head h3 { font-size:18px; }
 #modalRoot .rr-modal-body { padding:14px; }
 #modalRoot .modal-actions { padding:12px 14px 15px; }
 #modalRoot .modal-actions button { flex:1 1 120px; }
 #modalRoot .choice-list { grid-template-columns:1fr; }
 #modalRoot .rr-modal-owner strong { font-size:16px; }
 #modalRoot .rr-face { width:56px; height:56px; }
 #modalRoot .ux-menu-grid { grid-template-columns:1fr; }
 #modalRoot table { font-size:11px; }
 #modalRoot th,#modalRoot td { padding:7px 4px; }
}
