:root {
  --bg: #f2e8cf;
  --paper: #fffaf0;
  --paper-2: #fff8e8;
  --line: #dfcb9b;
  --line-2: #cfb27a;
  --gold: #8f5a16;
  --gold-dark: #5a3f00;
  --text: #4a3820;
  --muted: #806c4d;
  --danger: #922b2b;
  --ok: #4e7b2b;
  --shadow: 0 14px 28px rgba(0,0,0,.28);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; color: var(--text); background: radial-gradient(circle at top, #f9f0dc 0%, var(--bg) 56%, #e6d1a6 100%); }
body { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
input, select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; color: var(--text);
}
textarea { resize: vertical; }
label { display: block; }
.twmpw-overlay { position: fixed; inset: 0; padding: 18px; display: flex; }
.twmpw-card {
  width: min(1600px, 100%); height: calc(100vh - 36px); margin: auto; display: flex; flex-direction: column;
  background: linear-gradient(180deg, #fffdf7 0%, #fff7e7 100%); border: 1px solid #cfa968; border-radius: 18px; box-shadow: var(--shadow); overflow: hidden;
}
.twmpw-card.is-minimized { height: auto; }
.twmpw-card.is-minimized .twmpw-body { display: none; }
.twmpw-card.is-maximized { width: 100%; height: 100%; border-radius: 0; }
.twmpw-header {
  display: grid; grid-template-columns: minmax(250px, 1fr) minmax(340px, 520px) minmax(420px, max-content);
  gap: 12px; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #f4e5c1 0%, #e9d4a1 100%);
}
.twmpw-title { font-size: 29px; font-weight: 800; color: var(--gold-dark); }
.twmpw-sub { margin-top: 4px; font-size: 13px; color: #77602d; }
.twmpw-world-meta { font-size: 12px; color: #654d1d; padding: 0 8px; }
.twmpw-world-meta-title { font-weight: 800; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.twmpw-world-meta-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.twmpw-header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.twmpw-header-main-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.twmpw-window-controls { display: flex; gap: 6px; }
.twmpw-win-btn { width: 34px; height: 34px; border: 1px solid #c9b37f; border-radius: 10px; background: rgba(255,255,255,.75); color: var(--gold-dark); }
.twmpw-win-close { color: #7d1d1d; }
.twmpw-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 260px 1fr; }
.twmpw-body.twmpw-sidebar-collapsed { grid-template-columns: 76px 1fr; }
.twmpw-sidebar {
  border-right: 1px solid var(--line); background: linear-gradient(180deg, #f4ead1 0%, #efe2c2 100%);
  display: flex; flex-direction: column; gap: 8px; padding: 14px;
  min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-gutter: stable;
}
.twmpw-sidebar::-webkit-scrollbar { width: 10px; }
.twmpw-sidebar::-webkit-scrollbar-track { background: rgba(255,255,255,.35); border-radius: 999px; }
.twmpw-sidebar::-webkit-scrollbar-thumb { background: #c6a160; border-radius: 999px; border: 2px solid #f1e4c6; }
.twmpw-sidebar { scrollbar-width: thin; scrollbar-color: #c6a160 rgba(255,255,255,.35); }

.twmpw-main { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.twmpw-status { padding: 10px 16px; border-bottom: 1px solid var(--line); background: #fff5df; font-size: 13px; color: #6a4c13; }
.twmpw-content { padding: 18px; overflow: auto; min-height: 0; }
.twmpw-content::-webkit-scrollbar { width: 10px; height: 10px; }
.twmpw-content::-webkit-scrollbar-track { background: rgba(255,255,255,.35); border-radius: 999px; }
.twmpw-content::-webkit-scrollbar-thumb { background: #c6a160; border-radius: 999px; border: 2px solid #f1e4c6; }
.twmpw-content { scrollbar-width: thin; scrollbar-color: #c6a160 rgba(255,255,255,.35); }
.twmpw-footer { padding: 14px 18px; border-top: 1px solid var(--line); background: #fbf4e3; display: flex; justify-content: space-between; gap: 12px; }
.twmpw-footer-right { margin-left: auto; display: flex; gap: 8px; }
.twmpw-step {
  display: inline-flex; align-items: center; gap: 8px; width: 100%; text-align: left; border: 1px solid #d3bf95; border-radius: 12px;
  background: #fff9eb; color: var(--gold-dark); font-weight: 700; padding: 11px 12px;
}
.twmpw-step.active { background: linear-gradient(180deg, #aa7424 0%, #8f5a16 100%); color: #fff; border-color: #814d0d; box-shadow: inset 0 1px 0 rgba(255,255,255,.18); }
.twmpw-step-stats, .twmpw-step-diagnostics { margin-top: 8px; }
.twmpw-collapse-btn { justify-content: center; font-size: 18px; }
.twmpw-body.twmpw-sidebar-collapsed .twmpw-step { justify-content: center; }
.twmpw-body.twmpw-sidebar-collapsed .twmpw-step-text { display: none; }
.twmpw-btn {
  border: 1px solid #7d4f13; background: linear-gradient(180deg, #aa7424 0%, #8f5a16 100%); color: #fff; padding: 10px 14px; border-radius: 10px; font-weight: 700;
}
.twmpw-btn-ghost { background: rgba(255,255,255,.72); color: var(--gold-dark); border-color: #c5a56a; }
.twmpw-btn-xs { padding: 6px 10px; font-size: 12px; }
.twmpw-btn[disabled] { opacity: .5; cursor: not-allowed; }
.twmpw-link-danger { background: transparent; border: 0; color: var(--danger); font-weight: 700; }
.twmpw-help { padding: 12px 14px; border: 1px solid #dbc184; border-radius: 12px; background: #fff4d8; color: #624811; line-height: 1.5; }
.twmpw-help-grid { display: grid; gap: 10px; }
.twmpw-help-title { font-weight: 800; color: var(--gold-dark); }
.twmpw-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.top-gap { margin-top: 8px; }
.twmpw-block { margin-top: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); padding: 14px; box-shadow: 0 2px 10px rgba(111,73,18,.06); }
.twmpw-block-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.twmpw-grid2, .twmpw-grid3, .twmpw-grid4 { display: grid; gap: 12px; }
.twmpw-grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.twmpw-grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.twmpw-grid4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.twmpw-summary { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: #fff1cf; border: 1px solid #dbc184; color: #6a4d13; }
.twmpw-subhead { margin: 10px 0 8px; font-size: 12px; font-weight: 800; color: var(--gold-dark); text-transform: uppercase; letter-spacing: .04em; }
.twmpw-subhead-inline { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.twmpw-table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.twmpw-coords-table-wrap{height:320px;max-height:320px;overflow-y:auto;overflow-x:hidden}
.twmpw-coords-table-wrap .twmpw-table{width:100%}

.twmpw-table { width: 100%; border-collapse: collapse; min-width: 0; }
.twmpw-table th, .twmpw-table td { padding: 10px 12px; border-bottom: 1px solid #eee1c1; text-align: left; vertical-align: top; }
.twmpw-table th { position: sticky; top: 0; z-index: 1; background: #f7ead0; color: var(--gold-dark); }
.twmpw-result-table-summary{margin-bottom:12px}
.twmpw-result-table-scroll{max-height:520px;overflow-y:auto;overflow-x:hidden}
.twmpw-result-table{table-layout:fixed;font-size:13px}
.twmpw-result-table th,.twmpw-result-table td{white-space:normal;word-break:break-word;overflow-wrap:anywhere;padding:8px 8px;line-height:1.25}
.twmpw-result-table th:nth-child(1),.twmpw-result-table td:nth-child(1){width:4%}
.twmpw-result-table th:nth-child(2),.twmpw-result-table td:nth-child(2){width:6%}
.twmpw-result-table th:nth-child(3),.twmpw-result-table td:nth-child(3){width:8%}
.twmpw-result-table th:nth-child(4),.twmpw-result-table td:nth-child(4){width:12%}
.twmpw-result-table th:nth-child(5),.twmpw-result-table td:nth-child(5),.twmpw-result-table th:nth-child(6),.twmpw-result-table td:nth-child(6){width:10%}
.twmpw-result-table th:nth-child(7),.twmpw-result-table td:nth-child(7){width:4%}
.twmpw-result-table th:nth-child(8),.twmpw-result-table td:nth-child(8),.twmpw-result-table th:nth-child(9),.twmpw-result-table td:nth-child(9){width:8%}
.twmpw-result-table th:nth-child(10),.twmpw-result-table td:nth-child(10),.twmpw-result-table th:nth-child(11),.twmpw-result-table td:nth-child(11){width:8%}
.twmpw-result-table th:nth-child(12),.twmpw-result-table td:nth-child(12){width:7%}
.twmpw-result-table th:last-child,.twmpw-result-table td:last-child{width:7%}
.twmpw-result-table .muted{font-size:11px;line-height:1.2}
.twmpw-result-table .twmpw-btn-xs{padding:4px 6px;font-size:11px;white-space:normal}

.twmpw-chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.twmpw-chip { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 6px 10px; background: #fff4d8; border: 1px solid #dcc180; }
.twmpw-inline-check { display: inline-flex; gap: 8px; align-items: center; margin-right: 14px; }
.twmpw-kv { display: grid; grid-template-columns: 180px 1fr; gap: 6px 12px; }
.muted { color: var(--muted); }
.twmpw-tag { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 8px; background: #f6ecd2; border: 1px solid #dbc184; font-size: 12px; }
.twmpw-toolbar { display: flex; gap: 8px; flex-wrap: wrap; }
.twmpw-filter-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.twmpw-bar-row { display: grid; grid-template-columns: 200px 1fr 70px; gap: 12px; align-items: center; margin-top: 12px; }
.twmpw-bar-track { height: 12px; border-radius: 999px; overflow: hidden; background: #efe2c1; border: 1px solid #dcc180; }
.twmpw-bar-fill { height: 100%; background: linear-gradient(180deg, #aa7424 0%, #8f5a16 100%); }
.twmpw-strategy-card { border: 1px solid #dbc184; border-radius: 12px; background: #fff8e6; padding: 14px; }
.twmpw-strategy-card-title, .twmpw-strategy-name { font-weight: 800; color: var(--gold-dark); }
.twmpw-strategy-name { margin-top: 6px; }
.twmpw-strategy-text { margin-top: 8px; line-height: 1.5; }
.twmpw-strategy-badge { margin-top: 10px; display: inline-flex; padding: 6px 10px; border-radius: 999px; background: #f6ecd2; border: 1px solid #dbc184; }
.twmpw-strategy-chain { margin-top: 14px; display: grid; gap: 10px; }
.twmpw-strategy-step { display: grid; gap: 4px; padding: 10px 12px; border-radius: 10px; background: #fffdf7; border: 1px solid #ead9b0; }
.twmpw-map-toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.twmpw-map-wrap { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.twmpw-map { width: 100%; height: 520px; display: block; }
.twmpw-cat-buildings { display: grid; gap: 10px; }
.twmpw-cat-building-card { border: 1px solid #e2cf9c; border-radius: 12px; background: #fffef9; padding: 10px; display: grid; grid-template-columns: 1fr 160px; gap: 12px; }
.twmpw-cat-building-main { display: flex; gap: 10px; align-items: center; }
.twmpw-cat-building-icon { width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(180deg, #e1c88e, #c9a45a); flex: 0 0 auto; }
.twmpw-cat-building-side { display: grid; gap: 6px; }
.twmpw-cat-building-badge { font-size: 12px; color: var(--muted); font-weight: 700; }
.twmpw-render-skip { contain: content; }
.twmpw-sm-backdrop::backdrop { background: rgba(47,34,17,.48); }
.twmpw-sm-modal { width: min(880px, 92vw); border: 1px solid #cfa968; border-radius: 16px; background: linear-gradient(180deg, #fffdf7 0%, #fff7e7 100%); box-shadow: var(--shadow); }
.twmpw-sm-head, .twmpw-sm-actions { padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.twmpw-sm-body { padding: 0 16px 16px; }
.twmpw-sm-title { font-size: 18px; font-weight: 800; color: var(--gold-dark); }
.twmpw-hide { display: none !important; }
@media (max-width: 1200px) {
  .twmpw-header { grid-template-columns: 1fr; }
  .twmpw-grid4, .twmpw-grid3, .twmpw-grid2, .twmpw-filter-grid { grid-template-columns: 1fr; }
}


.twmpw-hide{display:none!important}
.twmpw-toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.twmpw-block.is-collapsed .twmpw-block-body{display:none}
.twmpw-help-box{margin-bottom:14px;position:relative}
.twmpw-help-trigger{border:1px solid #dbc184;background:#fff4d8;color:#624811;border-radius:12px;padding:10px 12px;font-weight:800;width:100%;text-align:left}
.twmpw-help-popup{display:none;margin-top:8px;padding:12px 14px;border:1px solid #dbc184;border-radius:12px;background:#fff4d8;color:#624811;line-height:1.5}
.twmpw-help-popup.is-open{display:block}
.twmpw-validation-box{margin-top:12px;padding:10px 12px;border-radius:10px;background:#fff1cf;border:1px solid #dbc184;color:#6a4d13}
.twmpw-validation-row{margin-bottom:8px}
.twmpw-validation-body{overflow:auto;display:flex;gap:8px;flex-wrap:wrap}
.twmpw-tag-danger{background:#fde8e8;border-color:#d9aaaa;color:#8b2d2d}
.twmpw-tag-ok{background:#e7f4df;border-color:#b6d1a0;color:#355d17}
.twmpw-filter-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.twmpw-map-toolbar,.twmpw-bar-row{display:flex;align-items:center;gap:12px}.twmpw-map-toolbar{margin-bottom:12px;justify-content:space-between;flex-wrap:wrap}
.twmpw-map-wrap{border:1px solid var(--line);border-radius:12px;background:#fff;overflow:hidden}
.twmpw-map{display:block;width:100%;height:auto}
.twmpw-bar-row{margin-bottom:10px}.twmpw-bar-row>div:first-child{width:180px}.twmpw-bar-track{flex:1;height:12px;border-radius:999px;background:#efe3c7;overflow:hidden;border:1px solid #dcc699}.twmpw-bar-fill{height:100%;background:linear-gradient(90deg,#8f5a16,#c69a45)}
.twmpw-strategy-card{border:1px solid var(--line);border-radius:14px;background:linear-gradient(180deg,#fffdf8 0%,#fff8ea 100%);padding:16px;box-shadow:0 2px 10px rgba(111,73,18,.06)}
.twmpw-strategy-card-title{font-size:12px;font-weight:800;color:var(--gold-dark);text-transform:uppercase;letter-spacing:.04em;margin-bottom:8px}.twmpw-strategy-name{font-size:20px;font-weight:800;color:var(--gold-dark);margin-bottom:8px}.twmpw-strategy-text{line-height:1.55;color:#5b4520}.twmpw-strategy-badge{display:inline-flex;margin-top:10px;padding:8px 10px;border-radius:999px;background:#fff1cf;border:1px solid #dbc184;color:#6a4d13;font-weight:700}.twmpw-strategy-chain{display:grid;gap:10px;margin-top:14px}.twmpw-strategy-step{display:grid;gap:4px;padding:10px 12px;border-radius:12px;border:1px solid #e2cfab;background:#fffaf0}
.twmpw-cat-buildings{display:grid;gap:12px}.twmpw-cat-building-card{display:flex;justify-content:space-between;gap:14px;align-items:flex-start;padding:12px;border:1px solid var(--line);border-radius:12px;background:#fffaf0}.twmpw-cat-building-main{display:flex;align-items:center;gap:10px;flex:1}.twmpw-cat-building-icon{width:28px;height:28px;border-radius:8px;background:linear-gradient(180deg,#ead4a7 0%,#d7ba77 100%);border:1px solid #c7a25b}.twmpw-cat-building-side{width:140px}.twmpw-cat-building-badge{display:block;font-size:12px;font-weight:800;color:var(--gold-dark);margin-bottom:6px}.twmpw-cat-building-add{display:flex;flex-direction:column;gap:8px}
@media (max-width:1200px){.twmpw-grid4,.twmpw-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.twmpw-header{grid-template-columns:1fr}.twmpw-header-actions{justify-content:flex-start}.twmpw-world-meta-line{white-space:normal}}
@media (max-width:860px){.twmpw-body{grid-template-columns:1fr}.twmpw-sidebar{border-right:0;border-bottom:1px solid var(--line)}.twmpw-grid3,.twmpw-grid2,.twmpw-grid4,.twmpw-filter-grid{grid-template-columns:1fr}.twmpw-kv{grid-template-columns:1fr}.twmpw-bar-row{flex-direction:column;align-items:flex-start}.twmpw-bar-row>div:first-child{width:auto}}

.twmpw-header-title{display:flex;flex-direction:column;gap:4px}
.twmpw-status-main{display:flex;align-items:center;justify-content:space-between;gap:12px}
.twmpw-status-text{font-weight:700;color:#6d521d}
.twmpw-status-pct{font-weight:800;color:#8f5a16;min-width:48px;text-align:right}
.twmpw-status-bar{margin-top:6px;height:10px;border-radius:999px;background:#efe3c7;overflow:hidden;border:1px solid #dcc699}
.twmpw-status-bar-fill{height:100%;background:linear-gradient(90deg,#8f5a16,#c69a45);transition:width .16s ease}
.twmpw-step-icon{font-size:15px;line-height:1}
.twmpw-unit-select{display:flex;align-items:center;gap:8px}
.twmpw-unit-icon-placeholder{width:24px;height:24px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;background:#efe3c7;border:1px solid #dcc699;color:#6d521d;font-size:12px}
.twmpw-note{background:#fff7e9;border:1px solid #ead6ae;border-radius:12px;padding:12px 14px;color:#5a4211;line-height:1.45}
.twmpw-note-compact{background:#fff7e9;border:1px solid #ead6ae;border-radius:12px;padding:12px 14px;color:#5a4211;line-height:1.45}
.twmpw-summary-plain{background:transparent;border:0;padding:0;margin-top:8px}
.twmpw-row-actions{display:flex;justify-content:flex-end;margin:10px 0 14px}
.twmpw-subblock{background:#fffdf7;border:1px solid #eadfc1;border-radius:14px;padding:14px;margin-top:14px}
.twmpw-subblock-title{font-weight:800;color:#4b3207;margin-bottom:10px}
.twmpw-spacer{height:12px}
.twmpw-label-row{display:inline-flex;align-items:center;gap:8px}
.twmpw-block-soft{background:#fffdf7;border:1px dashed #dcc699}
.twmpw-cat-settings-left{display:flex;flex-direction:column;gap:8px}
.twmpw-cat-settings-note{font-size:12px;color:#7b653b}
.twmpw-toggle-stack{display:flex;flex-direction:column;gap:10px}
.twmpw-toggle-row{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid #eadfc1;border-radius:12px;padding:10px 12px;background:#fff}
.twmpw-toggle{position:relative;display:inline-flex;align-items:center}
.twmpw-toggle input{position:absolute;opacity:0;pointer-events:none}
.twmpw-toggle-slider{width:42px;height:24px;border-radius:999px;background:#d7c29b;position:relative;display:inline-block;transition:background .16s ease}
.twmpw-toggle-slider::after{content:'';position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.2);transition:left .16s ease}
.twmpw-toggle input:checked + .twmpw-toggle-slider{background:#8f5a16}
.twmpw-toggle input:checked + .twmpw-toggle-slider::after{left:21px}
.twmpw-coords-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:10px 0 8px}
.twmpw-lazy-block .twmpw-block-body{display:block}
.twmpw-lazy-note{padding:10px 12px;border-top:1px dashed #e0c98b;background:#fff7e4;color:#6d521d;font-size:13px}
.twmpw-warn{display:grid;gap:8px;margin:12px 0;padding:12px 14px;border-radius:12px;background:#fff0d7;border:1px solid #e0bf7d;color:#7a4f12}
.twmpw-tiny-preview{margin:10px 0 14px;padding:10px 12px;border-radius:12px;background:#fffdf7;border:1px dashed #dcc699;color:#6d521d}
.twmpw-link-danger{border:0;background:transparent;color:#9f2d16;font-weight:800}
.twmpw-lazy-block textarea{width:100%;min-height:180px}

body{background:radial-gradient(circle at top,#f5e4be 0%,#ebd09a 28%,#d7b173 58%,#b98c4d 100%);}
.twmpw-card{background:linear-gradient(180deg,#fffaf0 0%,#fff4df 38%,#f8e5bf 100%);border:1px solid #b98a43;box-shadow:0 18px 44px rgba(64,38,9,.28), inset 0 1px 0 rgba(255,255,255,.5);}
.twmpw-header{background:linear-gradient(180deg,#6f4d17 0%,#5b3d10 100%);color:#fff1d2;border-bottom:1px solid #8f6727;}
.twmpw-title,.twmpw-sub,.twmpw-world-meta-title,.twmpw-world-meta-line{color:#fff1d2}
.twmpw-world-meta{background:rgba(255,245,220,.08);border-color:rgba(255,233,182,.24)}
.twmpw-sidebar{background:linear-gradient(180deg,#fff2d4 0%,#f5dfb1 100%)}
.twmpw-step.active{box-shadow:inset 0 0 0 1px #ffd27a, 0 6px 14px rgba(143,90,22,.18)}
.twmpw-block,.twmpw-subblock,.twmpw-note,.twmpw-note-compact,.twmpw-validation-box,.twmpw-warn,.twmpw-help,.twmpw-help-popup{box-shadow:inset 0 1px 0 rgba(255,255,255,.45)}
.twmpw-table thead th{position:sticky;top:0;z-index:1}
.twmpw-btn{box-shadow:inset 0 1px 0 rgba(255,255,255,.45),0 2px 6px rgba(90,56,13,.12)}
.twmpw-row-actions{gap:8px;flex-wrap:wrap}
.twmpw-help.small{font-size:13px}


.twmpw-world-meta{justify-self:center;text-align:center;border-radius:18px;padding:14px 18px}
.twmpw-step{display:flex;align-items:center;gap:10px}
.twmpw-step-num{display:inline-flex;align-items:center;justify-content:center;min-width:28px;width:28px;height:28px;border-radius:999px;background:#ead4a7;border:1px solid #c7a25b;color:#5b3d10;font-weight:800;flex:0 0 28px}
.twmpw-sidebar-collapsed .twmpw-step{justify-content:center;padding-left:8px;padding-right:8px}
.twmpw-sidebar-collapsed .twmpw-step-text{display:none}
.twmpw-sidebar-collapsed .twmpw-step-num{display:inline-flex}
.twmpw-info-btn{margin-left:8px;border:1px solid #d9be83;background:#fff7e4;color:#6d521d;border-radius:999px;width:18px;height:18px;font-size:11px;font-weight:800;line-height:1;cursor:help;display:inline-flex;align-items:center;justify-content:center;user-select:none;flex:0 0 18px;text-transform:none !important;font-variant:normal !important;font-style:normal !important;font-family:Segoe UI,Tahoma,sans-serif !important;}
.twmpw-unit-icon-img{width:24px;height:24px;object-fit:contain}
.twmpw-textarea-top-gap textarea{margin-top:10px}
.twmpw-color-field-wrap{display:flex;align-items:center}
.twmpw-color-square{width:24px;height:24px;border-radius:6px;border:1px solid rgba(0,0,0,.18);box-shadow:inset 0 1px 0 rgba(255,255,255,.35);cursor:pointer;display:inline-block}
.twmpw-color-square-large{width:40px;height:40px;border-radius:10px}
.twmpw-stack{display:grid;gap:14px}
.twmpw-collapsed-line{align-items:center}
.twmpw-collapsed-main{display:flex;align-items:center;gap:10px;flex-wrap:wrap;min-width:0}
.twmpw-collapsed-label{font-weight:800;color:#6d521d}
.twmpw-collapsed-name{font-weight:900}
.twmpw-collapsed-stats{font-weight:800;color:#4b3207;background:#fff4df;border:1px solid #e6c98f;border-radius:999px;padding:4px 10px}
.twmpw-collapsed-unit{display:inline-flex;align-items:center;gap:6px;font-weight:700;color:#5b4520}
.twmpw-collapsed-unit img{width:18px;height:18px;object-fit:contain}
.twmpw-color-popover{margin:12px 0 0;padding:12px;border:1px solid #dcc699;border-radius:12px;background:#fffaf0;box-shadow:0 10px 24px rgba(64,38,9,.12)}
.twmpw-color-popover-title{font-size:12px;font-weight:800;text-transform:uppercase;color:#6d521d;margin-bottom:10px}
.twmpw-color-popover-row{margin-bottom:10px}
.twmpw-color-popover input[type="color"]{width:72px;height:42px;padding:0;border:1px solid #d8bb7f;border-radius:10px;background:#fff;cursor:pointer}
.twmpw-color-presets{display:grid;grid-template-columns:repeat(6,24px);gap:8px}
.twmpw-color-preset{width:24px;height:24px;border-radius:6px;border:1px solid rgba(0,0,0,.18);cursor:pointer}
.twmpw-color-preset.is-active{outline:2px solid #5b3d10;outline-offset:1px}
.twmpw-grid2 > label:first-child{grid-column:span 1}
.twmpw-grid2 input[data-bind="attack-name"]{min-width:320px}

.twmpw-collapsed-name-pill{display:inline-flex;align-items:center;min-height:30px;padding:4px 12px;border-radius:999px;background:color-mix(in srgb, var(--attack-color) 12%, #fff7e4 88%);border:1px solid color-mix(in srgb, var(--attack-color) 38%, #d8bb7f 62%);font-weight:900;box-shadow:inset 0 1px 0 rgba(255,255,255,.45)}
.twmpw-collapsed-unit-pill{display:inline-flex;align-items:center;gap:6px;min-height:30px;padding:4px 12px;border-radius:999px;background:#fff7e4;border:1px solid #e6c98f;font-weight:800;color:#5b4520;box-shadow:inset 0 1px 0 rgba(255,255,255,.45)}
.twmpw-collapsed-unit-pill img{width:18px;height:18px;object-fit:contain}
.twmpw-collapsed-color-square{width:28px;height:28px;border-radius:8px}
.twmpw-color-presets-title{margin:2px 0 8px;font-size:11px;font-weight:800;letter-spacing:.03em;text-transform:uppercase;color:#7a5c24}


.twmpw-step-icon{display:inline-flex;align-items:center;justify-content:center;min-width:28px;width:28px;height:28px;border-radius:999px;background:#ead4a7;border:1px solid #c7a25b;color:#5b3d10;font-size:15px;flex:0 0 28px}
.twmpw-sidebar-collapsed .twmpw-step-plan-map .twmpw-step-icon,.twmpw-sidebar-collapsed .twmpw-step-stats .twmpw-step-icon,.twmpw-sidebar-collapsed .twmpw-step-diagnostics .twmpw-step-icon{display:inline-flex}
.twmpw-sidebar-collapsed .twmpw-step:not(.twmpw-step-stats):not(.twmpw-step-diagnostics) .twmpw-step-num{display:inline-flex}
.twmpw-sidebar-collapsed .twmpw-step .twmpw-step-icon{display:none}
.twmpw-sidebar-collapsed .twmpw-step-stats .twmpw-step-num,.twmpw-sidebar-collapsed .twmpw-step-diagnostics .twmpw-step-num{display:none}
.twmpw-subhead-with-info{display:flex;align-items:center;gap:8px}
.twmpw-info-wrap{position:relative;display:inline-flex;align-items:center}
.twmpw-hover-tooltip{position:absolute;left:50%;top:calc(100% + 8px);transform:translateX(-50%);min-width:220px;max-width:280px;padding:10px 12px;border:1px solid #d9be83;border-radius:12px;background:#fff7e4;color:#624811;line-height:1.45;box-shadow:0 10px 24px rgba(64,38,9,.12);opacity:0;visibility:hidden;pointer-events:none;transition:opacity .14s ease,visibility .14s ease;z-index:30}
.twmpw-hover-tooltip code{background:#fffdf7;border:1px solid #ead6ae;border-radius:6px;padding:1px 4px}
.twmpw-info-btn:hover + .twmpw-hover-tooltip{opacity:1;visibility:visible}
.twmpw-color-square{padding:0;appearance:none;-webkit-appearance:none;flex:0 0 auto}
.twmpw-color-square:focus,.twmpw-color-square:active{transform:none}
.twmpw-color-field-wrap{position:relative;display:inline-flex;align-items:flex-start}
.twmpw-color-popover{position:relative;margin:8px 0 0}
.twmpw-collapsed-line{margin-bottom:0;align-items:center}


.twmpw-color-inline-anchor{position:relative;display:inline-flex;align-items:center;vertical-align:middle;overflow:visible}
.twmpw-color-inline-anchor .twmpw-color-popover{position:absolute;left:calc(100% + 10px);top:50%;transform:translateY(-50%);margin:0;z-index:40;min-width:260px}
.twmpw-color-field-wrap{display:inline-flex;align-items:center;overflow:visible}
.twmpw-color-square,.twmpw-color-square-large,.twmpw-collapsed-color-square{flex:0 0 auto;transform:none !important}

.twmpw-step-svg{width:16px;height:16px;display:block;fill:currentColor}
.twmpw-sidebar-collapsed .twmpw-step-plan-map .twmpw-step-icon,.twmpw-sidebar-collapsed .twmpw-step-stats .twmpw-step-icon,.twmpw-sidebar-collapsed .twmpw-step-diagnostics .twmpw-step-icon{display:inline-flex !important}
.twmpw-sidebar-collapsed .twmpw-step-stats .twmpw-step-num,.twmpw-sidebar-collapsed .twmpw-step-diagnostics .twmpw-step-num{display:none !important}


/* targeted fixes: collapsed spacing + sticky footer */
.twmpw-content{flex:1 1 auto;}
.twmpw-block-collapsed{margin-top:8px;padding-top:10px;padding-bottom:10px;}
.twmpw-block-collapsed .twmpw-block-head{margin-bottom:0;}


.twmpw-region-card .twmpw-block-body{display:grid;gap:14px}
.twmpw-region-header-grid>label:nth-child(2){max-width:74px}
.twmpw-region-type-panel{display:grid;gap:14px;padding:14px 16px}
.twmpw-region-type-section{display:grid;gap:10px}
.twmpw-region-type-section-title{font-size:13px;font-weight:800;text-transform:uppercase;color:#6d521d}
.twmpw-region-type-list{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-start}
.twmpw-region-type-chip{display:inline-flex;align-items:center;gap:10px;padding:8px 12px;border:1px solid #e0c98b;border-radius:999px;background:#fffaf0;max-width:100%}
.twmpw-region-type-chip-main{display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap;min-width:0}
.twmpw-region-type-badge{width:10px;height:10px;border-radius:999px;display:inline-block;box-shadow:0 0 0 1px rgba(0,0,0,.12)}
.twmpw-region-type-name{font-weight:900;color:#5c3910}
.twmpw-region-type-unit{display:inline-flex;align-items:center;gap:6px;padding:3px 9px;border-radius:999px;background:#fff7e4;border:1px solid #e6c98f;font-weight:700;color:#5b4520}
.twmpw-region-type-unit img{width:16px;height:16px;object-fit:contain}
.twmpw-region-type-chip-side{display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap}
.twmpw-region-count-inline{display:inline-flex;align-items:center;gap:8px;margin:0;padding:3px 8px;border-radius:999px;background:#fff7e4;border:1px solid #e6c98f}
.twmpw-region-count-inline span{font-size:12px;font-weight:700;color:#6d521d;white-space:nowrap}
.twmpw-region-count-inline input{width:56px;min-width:56px;padding:5px 8px;border-radius:999px;text-align:center}
.twmpw-region-count-inline{display:flex;align-items:center;gap:8px;color:#6d521d;font-size:13px;font-weight:700}
.twmpw-region-count-inline input{width:80px}
.twmpw-region-type-add-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px}
.twmpw-region-type-add{display:grid;gap:4px;text-align:left;padding:12px 14px;border:1px dashed #d7bb7b;border-radius:14px;background:#fffdf6;color:#68481a;cursor:pointer}
.twmpw-region-type-add:hover{background:#fff8e8}
.twmpw-region-type-add-name{font-weight:800}
.twmpw-region-type-add-meta{font-size:12px;color:#876631}


.twmpw-region-collapsed-types{display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap}
.twmpw-region-type-pill{display:inline-flex;align-items:center;gap:6px;min-height:30px;padding:4px 12px;border-radius:999px;background:color-mix(in srgb, var(--attack-color) 12%, #fff7e4 88%);border:1px solid color-mix(in srgb, var(--attack-color) 38%, #d8bb7f 62%);font-weight:800;color:#5b4520;box-shadow:inset 0 1px 0 rgba(255,255,255,.45)}
.twmpw-region-type-pill-dot{width:10px;height:10px;border-radius:999px;display:inline-block;box-shadow:0 0 0 1px rgba(255,255,255,.6) inset}
.twmpw-region-collapsed-empty{display:inline-flex;align-items:center;min-height:30px;padding:4px 12px;border-radius:999px;background:#fff7e4;border:1px solid #e6c98f;font-weight:700;color:#8a6a32}


.twmpw-cat-source-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 280px;gap:16px;align-items:start}
.twmpw-cat-source-col{display:flex;flex-direction:column;gap:8px}
.twmpw-cat-source-side{display:flex;align-items:flex-start}
.twmpw-toggle-row-tall{min-height:100%;width:100%;padding:16px 14px}
.twmpw-cat-buildings-picker{display:flex;flex-direction:column;gap:12px}
.twmpw-cat-buildings-toolbar{display:flex;flex-wrap:wrap;gap:10px}
.twmpw-building-choice{display:inline-flex;align-items:center;gap:8px;padding:8px 10px;border-radius:12px;border:1px solid #d8c18c;background:#fffaf0;color:var(--gold-dark);font-weight:800;cursor:pointer}
.twmpw-building-choice.is-active{background:#f2e0b7;border-color:#b78a37;box-shadow:inset 0 0 0 1px rgba(255,255,255,.45)}
.twmpw-building-choice-icon{width:22px;height:22px;border-radius:6px;flex:0 0 22px}
.twmpw-cat-buildings-list{display:grid;gap:10px}
.twmpw-cat-building-name{font-weight:800;color:#6f5320}
@media (max-width: 1200px){.twmpw-cat-source-grid{grid-template-columns:1fr}.twmpw-cat-source-side{max-width:420px}}


/* step3 targeted layout */
.twmpw-cat-source-top-line{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.twmpw-cat-source-top-toggle{max-width:540px;flex:0 0 auto}
.twmpw-cat-source-grid-two{grid-template-columns:1fr 1fr}
.twmpw-cat-buildings-list-pills{display:flex;flex-wrap:wrap;gap:12px}
.twmpw-cat-building-pill{display:flex;align-items:center;justify-content:space-between;gap:14px;min-width:260px;max-width:340px;padding:14px 16px}
.twmpw-cat-building-text{display:flex;flex-direction:column;gap:4px}
.twmpw-cat-building-side-inline{width:auto;min-width:72px}
.twmpw-cat-building-side-inline input{width:72px;text-align:center}
.twmpw-label-row{display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap}
@media (max-width: 1180px){.twmpw-cat-source-grid-two{grid-template-columns:1fr}}

.twmpw-hover-tooltip{font-family:Segoe UI,Tahoma,sans-serif !important;font-size:16px !important;font-weight:400 !important;font-style:normal !important;line-height:1.45 !important;text-transform:none !important;letter-spacing:normal !important;color:#624811 !important;}
.twmpw-hover-tooltip *{font-family:Segoe UI,Tahoma,sans-serif !important;font-size:16px !important;font-weight:400 !important;font-style:normal !important;line-height:1.45 !important;text-transform:none !important;letter-spacing:normal !important;color:#624811 !important;}
.twmpw-hover-tooltip b,.twmpw-hover-tooltip strong{font-weight:800 !important;}
.twmpw-hover-tooltip br{content:"";}
.twmpw-hover-tooltip code{font-family:Consolas,Monaco,monospace !important;font-size:15px !important;}
.twmpw-hover-tooltip .twmpw-tooltip-html,.twmpw-hover-tooltip .twmpw-tooltip-html *{display:initial;}
.twmpw-hover-tooltip .twmpw-tooltip-title{display:block;font-weight:800 !important;margin-bottom:4px;color:#624811 !important;}

.twmpw-toggle-row-with-actions{gap:16px;align-items:center}
.twmpw-toggle-row-right{display:flex;align-items:center;gap:10px;margin-left:auto;flex-wrap:wrap;justify-content:flex-end}
.twmpw-inline-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.twmpw-btn-icon{display:inline-flex;align-items:center;justify-content:center;margin-right:6px}
.twmpw-inline-modal-backdrop{position:fixed;inset:0;background:rgba(34,22,4,.18);display:flex;align-items:center;justify-content:center;padding:24px;z-index:80}
.twmpw-inline-modal{width:min(760px,92vw);border:1px solid #cfa968;border-radius:18px;background:linear-gradient(180deg,#fffdf7 0%,#fff7e7 100%);box-shadow:0 28px 60px rgba(73,45,2,.18);overflow:hidden}
.twmpw-inline-modal-head{display:flex;justify-content:space-between;align-items:center;padding:16px 18px;border-bottom:1px solid #eadbb6;background:#fff8ea}
.twmpw-inline-modal-title{font-weight:800;color:#6f4a0b;font-size:22px}
.twmpw-inline-modal-body{padding:18px}
.twmpw-bbtime-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.twmpw-bbtime-col{border:1px solid #e4d2aa;border-radius:14px;background:#fff;padding:14px;display:flex;flex-direction:column;gap:12px}
.twmpw-bbtime-col label{display:flex;flex-direction:column;gap:6px}
.twmpw-input-label{font-weight:700;color:#7b5719}
.twmpw-quick-presets{display:flex;gap:8px;flex-wrap:wrap}
.twmpw-inline-modal-actions{display:flex;justify-content:flex-end;gap:10px}
.twmpw-cat-source-top-toggle{max-width:540px;flex:0 0 auto}
.twmpw-bbtime-modal input{font-size:18px;letter-spacing:.02em}
@media (max-width: 900px){.twmpw-bbtime-grid{grid-template-columns:1fr}.twmpw-toggle-row-right{justify-content:flex-start}}


.twmpw-cat-region-arrive-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.twmpw-help-inline-note{margin:0;flex:1 1 320px}
.twmpw-cat-source-top-line .twmpw-inline-actions{margin-left:auto}
.twmpw-bbtime-modal input[type="datetime-local"]{min-height:44px}


.twmpw-cat-timewindows{display:flex;flex-direction:column;gap:10px;margin-top:8px}
.twmpw-timewindow-list{display:flex;flex-direction:column;gap:10px}
.twmpw-timewindow-card{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:12px 14px;border:1px solid #d7bb79;border-radius:14px;background:#f4ead1}
.twmpw-timewindow-title{font-weight:800;color:#6d4a11;min-width:70px}
.twmpw-timewindow-grid{display:flex;flex-direction:column;gap:4px;flex:1;color:#6a4e23}

.twmpw-help-error{background:#fff0ea;border-color:#d38b6d;color:#8a3f25;font-weight:700}

.twmpw-modal-x{width:38px;height:38px;border:1px solid #d4b16f;border-radius:12px;background:#fff7ea;color:#7a520d;font-size:26px;line-height:1;font-weight:700;display:inline-flex;align-items:center;justify-content:center;box-shadow:0 2px 8px rgba(122,82,13,.14);cursor:pointer}.twmpw-modal-x:hover{background:#fff1d3}


.twmpw-btn-prominent{
  min-height: 48px;
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 800;
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(122,80,13,.10);
}
.twmpw-cat-region-arrive-row .twmpw-btn-prominent{
  align-self:flex-start;
}


.twmpw-help-spaced{ margin-bottom:12px; }
.twmpw-towers-toggle-row{
  display:grid;
  grid-template-columns:minmax(260px,.88fr) minmax(420px,1.12fr);
  gap:14px;
  align-items:stretch;
}
.twmpw-towers-toggle-item .twmpw-toggle-row{
  margin:0;
  min-height:56px;
}
.twmpw-towers-toggle-item{ min-width:0; }
.twmpw-towers-toggle-item:last-child .twmpw-label-row{
  flex-wrap:nowrap;
}
@media (max-width: 900px){
  .twmpw-towers-toggle-row{ grid-template-columns:1fr; }
  .twmpw-towers-toggle-item:last-child .twmpw-label-row{ flex-wrap:wrap; }
}


.twmpw-window-list{display:flex;flex-direction:column;gap:8px}
.twmpw-pair-group-row td{background:#f7edd8;font-weight:800;color:#6a4a14}
.twmpw-sm-backdrop{position:fixed;inset:0;border:none;padding:24px;background:transparent;z-index:1000;display:none;align-items:center;justify-content:center;max-width:none;max-height:none}
.twmpw-sm-backdrop[open]{display:flex}
.twmpw-sm-actions{justify-content:flex-end}
.twmpw-sm-modal{max-height:min(84vh,960px);overflow:auto;width:min(1100px,94vw)}
.twmpw-sm-body{padding:0 20px 20px}
.twmpw-sm-head,.twmpw-sm-actions{padding:16px 20px}


/* step 5 targeted spacing and window modal */
.twmpw-step5{display:grid;gap:18px}
.twmpw-step5>.twmpw-block:first-child{display:grid;gap:18px}
.twmpw-step5 .twmpw-block,.twmpw-step5 .twmpw-subblock{margin-top:0}
.twmpw-step5 .twmpw-subblock{padding:18px}
.twmpw-step5 .twmpw-subblock-title{margin-bottom:14px}
.twmpw-step5 .twmpw-grid2{row-gap:18px;column-gap:14px;align-items:start}
.twmpw-step5 .twmpw-grid2>label,.twmpw-step5 .twmpw-field-stack{display:grid;gap:8px;align-content:start}
.twmpw-step5 .twmpw-note-compact,.twmpw-step5 .twmpw-help,.twmpw-step5 .twmpw-help.small{margin-top:6px;margin-bottom:6px}
.twmpw-step5 .twmpw-row-actions{margin:0}
.twmpw-step5-help-card{align-self:stretch;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:6px}.twmpw-step5-help-card b{display:block}.twmpw-step5-help-card span{display:block;line-height:1.5}.twmpw-step5-inline-warning,.twmpw-step5-inline-success{margin-top:8px}.twmpw-step5-inline-success{color:var(--success);font-weight:700}.twmpw-step5-warning-text{color:var(--danger);font-weight:700}
.twmpw-toggle-row-soft{background:#fffdf7;border-color:#eadfc1}
.twmpw-pair-link-wrap{min-width:260px}
.twmpw-window-launch{display:grid;gap:8px;align-content:start}
.twmpw-window-launch.is-compact .twmpw-help{margin:0}
.twmpw-window-pair-buttons{display:grid;gap:10px;min-width:220px}
.twmpw-window-pair-single{min-width:260px}
.twmpw-window-pair-single .twmpw-btn{justify-self:start}
.twmpw-timewindow-list-compact{gap:8px}
.twmpw-timewindow-card-compact{padding:10px 12px}
.twmpw-window-modal-stack{gap:16px}
.twmpw-window-modal-col{min-width:0}
.twmpw-window-modal-list{display:grid;gap:12px;min-width:0}
.twmpw-window-modal-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;gap:12px;align-items:end;padding:12px 14px;border:1px solid #eadfc1;border-radius:14px;background:#fffdf7;min-width:0}
.twmpw-window-modal-row>*{min-width:0}
.twmpw-window-modal-row label{display:grid;gap:6px;min-width:0}
.twmpw-window-modal-row input{min-width:0}
.twmpw-window-modal-row .twmpw-btn{align-self:end;white-space:nowrap}
.twmpw-window-modal-toolbar{display:flex;justify-content:flex-start;padding-top:4px}
@media (max-width: 980px){
  .twmpw-window-modal-row{grid-template-columns:1fr}
  .twmpw-pair-link-wrap{min-width:0}
  .twmpw-window-pair-buttons,.twmpw-window-pair-single{min-width:0}
}


.twmpw-step6{display:grid;gap:14px}
.twmpw-step6 .twmpw-row{align-items:flex-start}
.twmpw-step6 .twmpw-summary{flex:1;min-width:320px}
.twmpw-step6 .twmpw-row-actions{margin:0;justify-content:flex-end}
.twmpw-unit-cell{display:inline-flex;align-items:center;gap:8px;white-space:nowrap}
.twmpw-unit-icon{width:20px;height:20px;object-fit:contain;flex:0 0 20px}
.twmpw-map-shell{display:grid;gap:10px}
.twmpw-virtual-map-panel{display:grid;gap:14px}
.twmpw-virtual-map-top{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:10px}
.twmpw-virtual-metric{display:grid;gap:6px;padding:12px 14px;border:1px solid #eadfc1;border-radius:14px;background:#fffdf7}
.twmpw-virtual-metric span{font-size:12px;color:#6a5427}
.twmpw-virtual-metric b{font-size:18px;color:#5a3f00}
.twmpw-virtual-map-layout{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(260px,.9fr);gap:14px;align-items:start}
.twmpw-virtual-map-main,.twmpw-virtual-side-card{display:grid;gap:10px;padding:12px 14px;border:1px solid #eadfc1;border-radius:14px;background:#fffdf7}
.twmpw-virtual-map-main-full{width:100%;grid-column:1/-1}
.twmpw-virtual-map-caption{display:grid;gap:4px;color:#5f4b20}
.twmpw-virtual-map-caption span{font-size:12px;line-height:1.45;color:#6a5427}
.twmpw-virtual-map-side{display:grid;gap:12px}
.twmpw-virtual-side-title{font-weight:700;color:#5a3f00}
.twmpw-virtual-chip-wrap{display:flex;flex-wrap:wrap;gap:8px}
.twmpw-virtual-stat-list{display:grid;gap:8px}
.twmpw-virtual-stat-row{display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px dashed #e4d5b4;color:#5f4b20}
.twmpw-virtual-stat-row:last-child{border-bottom:0;padding-bottom:0}
.twmpw-quick-preview-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}
.twmpw-quick-preview-card{display:grid;gap:10px;padding:12px 14px;border:1px solid #eadfc1;border-radius:14px;background:#fffdf7}
.twmpw-quick-preview-head{display:flex;justify-content:space-between;gap:10px;align-items:center}
.twmpw-quick-preview-index{display:inline-flex;align-items:center;justify-content:center;min-width:34px;height:26px;padding:0 8px;border-radius:999px;background:#fff4d8;border:1px solid #dcc699;color:#5a3f00;font-weight:700}
.twmpw-quick-preview-type{font-weight:700;text-align:right}
.twmpw-quick-preview-route{display:flex;gap:8px;align-items:center;flex-wrap:wrap;color:#5a3f00}
.twmpw-quick-preview-meta{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;font-size:12px;color:#6a5427}
.twmpw-quick-preview-times{display:grid;gap:8px}
.twmpw-quick-preview-times div{display:grid;gap:2px;padding:8px 10px;border-radius:10px;background:#fff7e5;border:1px solid #eadfc1}
.twmpw-quick-preview-times span,.twmpw-quick-preview-risk{font-size:12px;color:#6a5427}
.twmpw-quick-preview-times b,.twmpw-quick-preview-risk b{color:#5a3f00}
.twmpw-step6 textarea[readonly]{min-height:220px;background:#fffdf7}
.twmpw-step6 .twmpw-toggle-row{margin-top:10px}
@media (max-width: 980px){
  .twmpw-virtual-map-layout{grid-template-columns:1fr}
}

.twmpw-world-modal{max-width:760px}
.twmpw-sm-backdrop-open{display:flex}
.twmpw-sm-body input[data-bind="world-url"]{width:100%;margin-top:8px}
.twmpw-header-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px}
.twmpw-header-main-actions{display:flex;flex-wrap:wrap;gap:10px;justify-content:flex-end}

.twmpw-diag-list{display:grid;grid-template-columns:1fr;gap:8px;padding:12px}.twmpw-diag-list-row{display:flex;justify-content:space-between;gap:12px;border-bottom:1px solid rgba(151,103,29,.18);padding-bottom:6px}.twmpw-diag-list-row span{color:#7a5420}.twmpw-diag-list-row b{text-align:right;word-break:break-word}.twmpw-note-active{outline:2px solid rgba(170,111,24,.35)}

@media (max-width: 1100px){
.twmpw-result-table{font-size:12px}
.twmpw-result-table th,.twmpw-result-table td{padding:6px 6px}
.twmpw-result-table .muted{font-size:10px}
.twmpw-result-table .twmpw-unit-cell{gap:4px}
.twmpw-result-table .twmpw-unit-icon{width:14px;height:14px}
}

.twmpw-step6-stack{display:grid;gap:14px}
.twmpw-step6-stack .twmpw-help{margin:0}


.twmpw-server-job-card{border:1px solid var(--line);border-radius:14px;padding:12px 14px;background:#fbf4df;display:grid;gap:10px;margin-bottom:2px}
.twmpw-server-job-card.is-running{background:#fbf4df}
.twmpw-server-job-card.is-completed{background:#f3f8ea}
.twmpw-server-job-card.is-failed{background:#fff0ea}
.twmpw-server-job-head{font-size:14px;line-height:1.4}
.twmpw-server-job-bar{height:12px;border-radius:999px;background:#ead9b6;overflow:hidden}
.twmpw-server-job-bar-fill{height:100%;border-radius:999px;background:linear-gradient(90deg,#b8781f,#d5a146);transition:width .25s ease}
.twmpw-server-job-card.is-completed .twmpw-server-job-bar-fill{background:linear-gradient(90deg,#6a9d2f,#8cc64a)}
.twmpw-server-job-card.is-failed .twmpw-server-job-bar-fill{background:linear-gradient(90deg,#ba5e38,#dd8b61)}
.twmpw-server-job-meta{display:grid;gap:4px;font-size:13px;color:var(--muted)}

.twmpw-debug-log{background:#1f1f1f;color:#f3f3f3;padding:12px;border-radius:10px;max-height:260px;overflow:auto;white-space:pre-wrap;font:12px/1.45 ui-monospace,SFMono-Regular,Consolas,monospace;}

input[disabled], select[disabled], textarea[disabled]{cursor:not-allowed;opacity:.7}

.twmpw-boot-block{min-height:220px}
.twmpw-boot-loader{width:42px;height:42px;border-radius:50%;border:4px solid rgba(151,103,29,.16);border-top-color:#a96f18;animation:twmpw-spin 1s linear infinite;margin:4px 0 10px}
@keyframes twmpw-spin{to{transform:rotate(360deg)}}


.twmpw-sm-modal-explain{max-height:min(86vh,980px);overflow:hidden;display:flex;flex-direction:column}
.twmpw-sm-body-explain{padding:0 20px 20px;overflow:hidden;display:flex;flex-direction:column;gap:10px;min-height:0}
.twmpw-modal-table-scroll{max-height:52vh;min-height:180px;height:52vh;overflow-y:auto;overflow-x:auto;flex:1 1 auto;display:block}.twmpw-modal-table-scroll::-webkit-scrollbar{width:12px;height:12px}


.twmpw-collapsible{display:flex;flex-direction:column;min-width:0;height:100%}
.twmpw-collapsible-head{margin-bottom:10px;font-weight:800;color:#6d4a11}
.twmpw-collapsible-body{min-height:0;min-width:0}
.twmpw-collapsible-scroll{min-height:0;min-width:0;overflow:auto;max-height:100%}
.twmpw-stats-mini-block{min-width:0}
.twmpw-stats-table-wrap{height:100%;max-height:100%;overflow:auto}
.twmpw-stats-table-wrap .twmpw-table{min-width:0;width:100%}
.twmpw-stats-mini-block{margin-top:16px;margin-bottom:16px}
.twmpw-stats-mini-block .twmpw-block-head{margin-bottom:0}
.twmpw-stats-mini-block .twmpw-block-body{padding-top:12px}
.twmpw-stats-mini-table-wrap{max-height:360px;overflow:auto}
.twmpw-stats-mini-table-wrap .twmpw-table thead th{position:sticky;top:0;z-index:2}

.twmpw-grid2>.twmpw-stats-mini-block,.twmpw-grid2>.twmpw-block{min-width:0}

.twmpw-cat-settings-block{margin-top:8px}
.twmpw-cat-settings-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;align-items:start}
.twmpw-cat-settings-left,.twmpw-cat-settings-right{display:flex;flex-direction:column;gap:12px}
.twmpw-cat-settings-note{margin:0}
@media (max-width: 900px){.twmpw-cat-settings-grid{grid-template-columns:1fr}}

.twmpw-step5-main-strategy-label .twmpw-label-row{display:flex;margin-bottom:8px;}

.twmpw-global-loader{position:fixed;inset:0;background:rgba(58,40,14,.28);display:flex;align-items:center;justify-content:center;z-index:9999;padding:20px}
.twmpw-global-loader-card{width:min(520px,calc(100vw - 32px));background:linear-gradient(180deg,#fffdf7 0%,#fff4df 100%);border:1px solid #cfa968;border-radius:18px;box-shadow:var(--shadow);padding:22px;display:grid;gap:12px;text-align:center}
.twmpw-global-loader-title{font-size:22px;font-weight:800;color:var(--gold-dark)}
.twmpw-global-loader-text{color:#6a4c13;line-height:1.45}
.twmpw-global-loader-progress{font-weight:800;color:var(--gold-dark)}

/* TWMP admin world catalog final fix 2026-05-01 */
#worldCatalog.twmpw-admin-world-list,
.twmpw-admin-pane #worldCatalog.twmpw-admin-world-list{
  max-height:420px!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  padding-right:6px!important;
}

#worldCatalog .twmpw-admin-world-card,
.twmpw-admin-pane #worldCatalog .twmpw-admin-world-card{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:10px!important;
  align-items:start!important;
  padding:12px!important;
  min-width:0!important;
  width:100%!important;
  overflow:hidden!important;
}

#worldCatalog .twmpw-admin-world-meta,
#worldCatalog .twmpw-admin-world-meta b,
#worldCatalog .twmpw-admin-muted{
  min-width:0!important;
  white-space:normal!important;
  word-break:break-word!important;
  overflow-wrap:anywhere!important;
}

#worldCatalog .twmpw-admin-world-actions,
.twmpw-admin-pane #worldCatalog .twmpw-admin-world-actions{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:8px!important;
  align-items:stretch!important;
  justify-content:stretch!important;
  width:100%!important;
  min-width:0!important;
  overflow:visible!important;
}

#worldCatalog .twmpw-admin-world-actions label,
.twmpw-admin-pane #worldCatalog .twmpw-admin-world-actions label{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:7px!important;
  min-width:0!important;
  min-height:36px!important;
  width:100%!important;
  margin:0!important;
  padding:6px 8px!important;
  border:1px solid #ead7af!important;
  border-radius:10px!important;
  background:#fffdf7!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}

#worldCatalog .twmpw-admin-world-actions input[type="checkbox"]{
  width:16px!important;
  height:16px!important;
  min-width:16px!important;
  margin:0!important;
  padding:0!important;
  flex:0 0 16px!important;
  appearance:auto!important;
  -webkit-appearance:checkbox!important;
  accent-color:#8b5c0b!important;
}

#worldCatalog .twmpw-admin-world-actions .twmpw-btn,
#worldCatalog .twmpw-admin-world-actions .twmpw-icon-btn,
.twmpw-admin-pane #worldCatalog .twmpw-admin-world-actions .twmpw-btn,
.twmpw-admin-pane #worldCatalog .twmpw-admin-world-actions .twmpw-icon-btn{
  width:100%!important;
  min-width:0!important;
  height:38px!important;
  min-height:38px!important;
  padding:8px 10px!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}

#worldCatalog .twmpw-admin-world-actions [data-act="save-world-flags"]{
  grid-column:1 / -1!important;
}

@media (max-width:760px){
  #worldCatalog .twmpw-admin-world-actions,
  .twmpw-admin-pane #worldCatalog .twmpw-admin-world-actions{
    grid-template-columns:1fr!important;
  }
}

/* TWMP hotfix: Userscript Center admin spacing */
.twmpw-userscript-center,
.twmpw-admin-userscripts,
.twmpw-userscripts-admin,
#twmpwUserscriptCenter,
[data-admin-section="userscripts"],
[data-tab-panel="userscripts"] {
  box-sizing: border-box !important;
  padding: 22px 24px 34px !important;
}

.twmpw-userscript-center > *,
.twmpw-admin-userscripts > *,
.twmpw-userscripts-admin > *,
#twmpwUserscriptCenter > *,
[data-admin-section="userscripts"] > *,
[data-tab-panel="userscripts"] > * {
  max-width: 100%;
}

.twmpw-userscript-center h1,
.twmpw-userscript-center h2,
.twmpw-userscript-center h3,
.twmpw-admin-userscripts h1,
.twmpw-admin-userscripts h2,
.twmpw-admin-userscripts h3,
.twmpw-userscripts-admin h1,
.twmpw-userscripts-admin h2,
.twmpw-userscripts-admin h3,
#twmpwUserscriptCenter h1,
#twmpwUserscriptCenter h2,
#twmpwUserscriptCenter h3 {
  margin-top: 0 !important;
  margin-bottom: 14px !important;
}

.twmpw-userscript-center .twmpw-admin-card,
.twmpw-userscript-center .twmpw-admin-block,
.twmpw-userscript-center .twmpw-admin-table-wrap,
.twmpw-admin-userscripts .twmpw-admin-card,
.twmpw-admin-userscripts .twmpw-admin-block,
.twmpw-admin-userscripts .twmpw-admin-table-wrap,
.twmpw-userscripts-admin .twmpw-admin-card,
.twmpw-userscripts-admin .twmpw-admin-block,
.twmpw-userscripts-admin .twmpw-admin-table-wrap,
#twmpwUserscriptCenter .twmpw-admin-card,
#twmpwUserscriptCenter .twmpw-admin-block,
#twmpwUserscriptCenter .twmpw-admin-table-wrap {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.twmpw-userscript-center table,
.twmpw-admin-userscripts table,
.twmpw-userscripts-admin table,
#twmpwUserscriptCenter table {
  width: 100% !important;
}

/* TWMP V205 VISUAL MAP STEP START */
.twmpw-visual-map-step .twmpw-block-head{gap:10px;align-items:center;}
.twmpw-visual-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;}
.twmpw-visual-toggle{width:auto;min-width:260px;margin:0;}
.twmpw-visual-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(340px,520px);gap:12px;align-items:start;min-width:0;}
.twmpw-visual-map-card{border:1px solid #d8bf88;border-radius:14px;background:#fff8e8;padding:10px;min-width:0;}
.twmpw-visual-map-scroll{height:min(62vh,620px);min-height:380px;overflow:hidden;border:1px solid rgba(95,64,16,.22);border-radius:12px;background:linear-gradient(90deg, rgba(120,84,25,.08) 1px, transparent 1px),linear-gradient(0deg, rgba(120,84,25,.08) 1px, transparent 1px),#fffdf7;background-size:28px 28px;}
.twmpw-visual-svg{display:block;width:100%;height:100%;min-width:0;min-height:0;}
.twmpw-visual-svg circle{vector-effect:non-scaling-stroke;}
.twmpw-vm-attack{stroke:#fff;stroke-width:.45;}
.twmpw-vm-region{stroke:#1c1202;stroke-width:.35;opacity:.88;}
.twmpw-visual-side{min-width:0;max-height:min(72vh,760px);overflow-y:auto;overflow-x:hidden;padding-right:2px;}
.twmpw-visual-layer{border:1px solid rgba(120,84,25,.18);border-radius:12px;background:#fffdf7;padding:8px 10px;}
.twmpw-visual-layer summary{cursor:pointer;display:flex;align-items:center;gap:8px;min-width:0;}
.twmpw-color-dot{display:inline-block;width:12px;height:12px;border-radius:999px;border:1px solid rgba(0,0,0,.25);box-shadow:0 1px 2px rgba(0,0,0,.14);flex:0 0 auto;}
.twmpw-visual-coords-scroll{max-height:220px;overflow-y:auto;overflow-x:hidden;margin-top:8px;}
.twmpw-visual-coords-scroll table{width:100%;border-collapse:collapse;table-layout:fixed;}
.twmpw-visual-coords-scroll td{padding:5px 4px;border-bottom:1px solid rgba(120,84,25,.12);vertical-align:middle;}
.twmpw-visual-coords-scroll td:first-child{width:42%;}.twmpw-visual-coords-scroll td:last-child{text-align:right;}
.twmpw-visual-map-step textarea[data-role="visual-map-reserve"]{width:100%;box-sizing:border-box;}
@media (max-width:1100px){.twmpw-visual-grid{grid-template-columns:1fr}.twmpw-visual-map-scroll{height:440px}.twmpw-visual-side{max-height:none}.twmpw-visual-svg{min-width:0;min-height:0}}
/* TWMP V205 VISUAL MAP STEP END */

/* v206 visual map selection/layer controls */
.twmpw-visual-svg{cursor:crosshair;user-select:none;touch-action:none;}
.twmpw-visual-select-rect{fill:rgba(40,95,180,.12);stroke:#285fb4;stroke-width:.55;stroke-dasharray:2 1;vector-effect:non-scaling-stroke;pointer-events:none;}
.twmpw-vm-selected{fill:none;stroke:#111;stroke-width:.75;vector-effect:non-scaling-stroke;pointer-events:none;}
.twmpw-visual-layer-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:6px;}
.twmpw-visual-layer-toggle{width:100%;margin:0;justify-content:flex-start;gap:8px;min-width:0;}
.twmpw-visual-layer-toggle b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.twmpw-visual-layer summary{justify-content:space-between;border-top:1px solid rgba(120,84,25,.12);padding-top:6px;margin-top:4px;}
.twmpw-visual-row-selected td{background:rgba(40,95,180,.10);}
.twmpw-visual-help{font-size:12px;color:#6f4d16;margin-top:6px;line-height:1.35;}
.twmpw-visual-side select[data-role="visual-map-select-mode"],
.twmpw-visual-side select[data-role="visual-map-target-layer"]{width:100%;}

/* v207 visual map selected state and group filtering */
.twmpw-vm-selected-halo{fill:rgba(255,255,255,.82);stroke:#111;stroke-width:1.15;vector-effect:non-scaling-stroke;pointer-events:none;filter:drop-shadow(0 0 2px rgba(0,0,0,.35));}
.twmpw-vm-selected{fill:rgba(40,95,180,.34);stroke:#fff;stroke-width:.55;vector-effect:non-scaling-stroke;pointer-events:none;}
.twmpw-visual-selected-groups{border:1px solid rgba(120,84,25,.18);border-radius:12px;background:#fffdf7;padding:8px;display:flex;flex-direction:column;gap:6px;}
.twmpw-visual-selected-group{display:grid;grid-template-columns:18px 14px minmax(0,1fr) auto;align-items:center;gap:8px;padding:5px 6px;border-radius:9px;background:rgba(120,84,25,.055);}
.twmpw-visual-selected-group input{margin:0;}
.twmpw-visual-selected-group span:nth-child(3){overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.twmpw-visual-selected-preview{display:flex;flex-wrap:wrap;gap:6px;max-height:132px;overflow:auto;}
.twmpw-visual-selected-chip{display:inline-flex;align-items:center;gap:5px;border:1px solid rgba(120,84,25,.20);border-radius:999px;background:#fff8e8;padding:4px 8px;font-size:12px;}
.twmpw-visual-canvas-wrap{position:relative;width:100%;height:100%;min-width:0;min-height:0;}
.twmpw-visual-canvas{display:block;width:100%;height:100%;cursor:crosshair;user-select:none;touch-action:none;}
.twmpw-visual-select-box{position:absolute;border:1px dashed #285fb4;background:rgba(40,95,180,.12);pointer-events:none;border-radius:3px;}
@media (max-width:1100px){.twmpw-visual-canvas-wrap{min-width:0;min-height:0}}

.twmpw-vm-row-actions{display:flex;align-items:center;justify-content:flex-end;gap:6px;flex-wrap:wrap;min-width:0;}
.twmpw-vm-row-actions .twmpw-btn{margin:0;}
.twmpw-vm-coord-meta{display:flex;align-items:center;gap:7px;min-width:0;flex-wrap:wrap;}
.twmpw-vm-coord-meta code{flex:0 0 auto;}
.twmpw-vm-owner{display:inline-flex;align-items:center;gap:4px;min-width:0;max-width:100%;font-size:11px;color:#6f4d16;vertical-align:middle;}
.twmpw-vm-owner span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:115px;}
.twmpw-vm-owner span:last-child{display:inline-flex;align-items:center;border:1px solid rgba(120,84,25,.22);border-radius:999px;padding:1px 5px;background:#fff8e8;color:#5f4010;max-width:64px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.twmpw-visual-selected-chip{max-width:100%;white-space:normal;overflow-wrap:anywhere;}
.twmpw-visual-selected-chip .twmpw-vm-owner{margin-left:2px;}
.twmpw-vm-continent{font-size:32px;font-weight:800;fill:rgba(120,84,25,.105);stroke:rgba(255,255,255,.55);stroke-width:.8;text-anchor:middle;dominant-baseline:middle;user-select:none;pointer-events:none;}
.twmpw-visual-map-step .twmpw-row-actions{gap:8px;}

/* TWMP V210 visual map zoom/fullscreen polish */
.twmpw-visual-toolbar-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap;min-width:0;}
.twmpw-visual-zoom-controls{display:inline-flex;align-items:center;gap:6px;flex-wrap:wrap;min-width:0;}
.twmpw-visual-zoom-controls .twmpw-btn{min-width:34px;padding-left:10px;padding-right:10px;}
.twmpw-visual-zoom-label{display:inline-flex;align-items:center;justify-content:center;min-width:56px;padding:6px 9px;border:1px solid rgba(120,84,25,.22);border-radius:10px;background:#fff8e8;color:#5f4010;font-weight:800;font-size:12px;}
.twmpw-visual-map-fullscreen{position:fixed;inset:10px;z-index:100000;background:#fff8e8;border:1px solid #d8bf88;border-radius:16px;box-shadow:0 18px 55px rgba(0,0,0,.36);margin:0!important;padding:12px;display:flex;flex-direction:column;overflow:hidden;}
.twmpw-visual-map-fullscreen>.twmpw-block-head{flex:0 0 auto;}
.twmpw-visual-map-fullscreen>.twmpw-block-body{flex:1 1 auto;min-height:0;overflow:hidden;display:flex;flex-direction:column;gap:10px;}
.twmpw-visual-map-fullscreen .twmpw-note{flex:0 0 auto;margin:0;}
.twmpw-visual-map-fullscreen .twmpw-visual-toolbar{flex:0 0 auto;}
.twmpw-visual-map-fullscreen .twmpw-visual-grid{flex:1 1 auto;min-height:0;grid-template-columns:minmax(0,1fr) minmax(360px,500px);align-items:stretch;}
.twmpw-visual-map-fullscreen .twmpw-visual-map-card{display:flex;flex-direction:column;min-height:0;}
.twmpw-visual-map-fullscreen .twmpw-visual-map-scroll{flex:1 1 auto;height:auto;min-height:0;}
.twmpw-visual-map-fullscreen .twmpw-visual-side{height:100%;max-height:none;overflow:auto;padding-right:4px;}
.twmpw-visual-map-fullscreen .twmpw-visual-help{margin-bottom:0;}
@media (max-width:1100px){.twmpw-visual-map-fullscreen{inset:6px;padding:10px;overflow:auto}.twmpw-visual-map-fullscreen>.twmpw-block-body{overflow:visible}.twmpw-visual-map-fullscreen .twmpw-visual-grid{grid-template-columns:1fr}.twmpw-visual-map-fullscreen .twmpw-visual-map-scroll{height:60vh;min-height:360px}.twmpw-visual-map-fullscreen .twmpw-visual-side{height:auto;max-height:none}}

/* TWMP V211 visual map zoom/pan fix */
.twmpw-visual-svg,
.twmpw-visual-canvas{cursor:crosshair;}
.twmpw-visual-map-step .twmpw-visual-map-scroll{overscroll-behavior:contain;}
.twmpw-visual-map-step .twmpw-visual-svg[data-zoom]:not([data-zoom="1.00"]),
.twmpw-visual-map-step .twmpw-visual-canvas[data-zoom]:not([data-zoom="1.00"]){cursor:grab;}
.twmpw-visual-map-step .twmpw-visual-map-panning{cursor:grabbing!important;}

/* TWMP V217 visual map adaptive canvas zoom/cursor fix */
.twmpw-visual-map-step.twmpw-visual-map-shift-selection .twmpw-visual-svg[data-zoom]:not([data-zoom="1.00"]),
.twmpw-visual-map-step.twmpw-visual-map-shift-selection .twmpw-visual-canvas[data-zoom]:not([data-zoom="1.00"]){cursor:crosshair!important;}

/* v218: visual map of the calculated plan */
.twmpw-plan-map-step .twmpw-visual-toolbar{align-items:center;gap:12px;flex-wrap:wrap}
.twmpw-pvm-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(340px,420px);gap:14px;align-items:stretch;min-width:0}
.twmpw-pvm-map-card,.twmpw-pvm-side{min-width:0}
.twmpw-pvm-canvas-wrap{position:relative;width:100%;height:min(64vh,620px);min-height:430px;border:1px solid #dec89c;border-radius:14px;overflow:hidden;background:#fffaf0;box-shadow:inset 0 1px 0 rgba(255,255,255,.65)}
.twmpw-pvm-canvas{display:block;width:100%;height:100%;cursor:crosshair;touch-action:none}
.twmpw-pvm-panning .twmpw-pvm-canvas{cursor:grab}
.twmpw-pvm-select-rect{position:absolute;border:1px solid #1d4ed8;background:rgba(29,78,216,.12);pointer-events:none;border-radius:4px;box-shadow:0 0 0 1px rgba(255,255,255,.78) inset}
.twmpw-pvm-tooltip{position:absolute;z-index:5;max-width:280px;padding:9px 11px;border-radius:12px;background:rgba(36,24,7,.94);color:#fff;font-size:12px;line-height:1.38;box-shadow:0 10px 24px rgba(0,0,0,.25);pointer-events:none}
.twmpw-pvm-side .twmpw-block-body{min-width:0}
.twmpw-pvm-active-card{border:1px solid #eadbb6;border-radius:12px;background:#fffaf0;padding:10px;display:grid;gap:8px}
.twmpw-pvm-selected-list{display:grid;gap:6px;max-height:260px;overflow:auto;overflow-x:hidden;padding-right:2px}
.twmpw-pvm-selected-row{display:grid;gap:2px;border:1px solid #eadbb6;border-radius:10px;background:#fffdf7;padding:7px 9px;min-width:0}
.twmpw-pvm-selected-row b,.twmpw-pvm-selected-row span{white-space:normal;overflow-wrap:anywhere}
@media (max-width: 980px){.twmpw-pvm-grid{grid-template-columns:1fr}.twmpw-pvm-canvas-wrap{height:460px;min-height:360px}}


/* TWMP V219 visual plan map fullscreen polish */
.twmpw-pvm-fullscreen{position:fixed;inset:10px;z-index:100000;background:#fff8e8;border:1px solid #d8bf88;border-radius:16px;box-shadow:0 18px 55px rgba(0,0,0,.36);margin:0!important;padding:12px;display:flex;flex-direction:column;overflow:hidden}
.twmpw-pvm-fullscreen>.twmpw-block-head{flex:0 0 auto}
.twmpw-pvm-fullscreen>.twmpw-block-body{flex:1 1 auto;min-height:0;overflow:hidden;display:flex;flex-direction:column;gap:10px}
.twmpw-pvm-fullscreen .twmpw-note{flex:0 0 auto;margin:0}
.twmpw-pvm-fullscreen .twmpw-visual-toolbar{flex:0 0 auto}
.twmpw-pvm-fullscreen .twmpw-pvm-grid{flex:1 1 auto;min-height:0;grid-template-columns:minmax(0,1fr) minmax(360px,500px);align-items:stretch}
.twmpw-pvm-fullscreen .twmpw-pvm-map-card{display:flex;flex-direction:column;min-height:0}
.twmpw-pvm-fullscreen .twmpw-pvm-canvas-wrap{flex:1 1 auto;height:auto;min-height:0}
.twmpw-pvm-fullscreen .twmpw-pvm-side{height:100%;max-height:none;overflow:auto;padding-right:4px}
.twmpw-pvm-fullscreen .twmpw-visual-help{margin-bottom:0}
@media (max-width:1100px){.twmpw-pvm-fullscreen{inset:6px;padding:10px;overflow:auto}.twmpw-pvm-fullscreen>.twmpw-block-body{overflow:visible}.twmpw-pvm-fullscreen .twmpw-pvm-grid{grid-template-columns:1fr}.twmpw-pvm-fullscreen .twmpw-pvm-canvas-wrap{height:60vh;min-height:360px}.twmpw-pvm-fullscreen .twmpw-pvm-side{height:auto;max-height:none}}


/* v223 visual plan map deterministic selection fixed */
/* v222 visual plan map selection links fixed */
.twmpw-pvm-link-toggles{display:grid;gap:8px;margin-top:8px;min-width:0}
.twmpw-pvm-link-toggle-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:8px;min-width:0;max-height:168px;overflow:auto;padding:2px}
.twmpw-pvm-link-toggle{min-width:0;gap:10px;align-items:center}
.twmpw-pvm-link-toggle>span:first-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;color:#5f4417}
.twmpw-plan-map-step.twmpw-pvm-shift-selection .twmpw-pvm-canvas{cursor:crosshair!important}
.twmpw-pvm-route-dragging .twmpw-pvm-canvas{cursor:move!important}
.twmpw-pvm-fullscreen .twmpw-pvm-link-toggle-list{max-height:128px}

/* v224 visual plan map selection no reset and pan priority fixed */

/* v225 visual plan map is visible before result with collapsed icon */


/* v237 visual plan map context target/tower bypass polish */
.twmpw-pvm-selected-links{margin-bottom:10px;}
.twmpw-pvm-context-menu{position:absolute;z-index:8;min-width:170px;padding:6px;border:1px solid #d5b879;border-radius:12px;background:#fffaf0;box-shadow:0 10px 26px rgba(0,0,0,.22);}
.twmpw-pvm-context-menu .twmpw-btn{width:100%;justify-content:flex-start;text-align:left;}
.twmpw-plan-map-step.twmpw-pvm-target-pick .twmpw-pvm-canvas{cursor:crosshair!important;}
.twmpw-pvm-target-hint{position:absolute;left:12px;top:12px;z-index:6;padding:7px 10px;border-radius:999px;background:rgba(36,24,7,.86);color:#fff;font-size:12px;pointer-events:none;}

/* TWMP CHURCH ZONE V285 */
.twmpw-church-zone-step .twmpw-block-body{gap:14px}
.twmpw-church-zone-step .twmpw-church-zone-settings{align-items:end;row-gap:12px;column-gap:14px}
.twmpw-church-zone-step .twmpw-field-stack{display:grid;gap:8px;align-content:start}
.twmpw-church-zone-step .twmpw-input-label{display:inline-flex;align-items:center;gap:6px;margin-bottom:0}
.twmpw-church-zone-step .twmpw-church-zone-toggle{min-height:52px;height:52px;margin:0;align-self:end;box-sizing:border-box}
.twmpw-church-zone-step textarea{min-height:132px}
.twmpw-church-zone-step .twmpw-summary{margin:0}
.twmpw-church-zone-table-card .twmpw-block-body{padding-top:10px}
.twmpw-church-zone-table{min-width:720px}
.twmpw-church-zone-table th,.twmpw-church-zone-table td{padding:8px 10px;vertical-align:middle}
.twmpw-church-zone-table td:first-child,.twmpw-church-zone-table th:first-child{width:42px;text-align:center}
.twmpw-church-zone-table .twmpw-badge{display:inline-flex;align-items:center;border-radius:999px;padding:2px 8px;font-size:12px;font-weight:800;border:1px solid #eadfc1;background:#fff7df;color:#6f4b0a;white-space:nowrap}
.twmpw-church-zone-table .twmpw-badge.ok{background:#eef8e9;color:#2f6b22;border-color:#cfe7c3}
.twmpw-church-zone-table .twmpw-badge.warn{background:#fff1d8;color:#8a4b00;border-color:#f0d0a0}

/* TWMP CHURCH ZONE V286 */
.twmpw-church-zone-step .twmpw-block-body{gap:14px}
.twmpw-church-zone-step .twmpw-church-zone-settings{align-items:end;row-gap:12px;column-gap:14px}
.twmpw-church-zone-step .twmpw-field-stack{display:grid;gap:8px;align-content:start}
.twmpw-church-zone-step .twmpw-input-label{display:inline-flex;align-items:center;gap:6px;margin-bottom:0}
.twmpw-church-zone-step .twmpw-church-zone-toggle{min-height:52px;height:52px;margin:0;align-self:end;box-sizing:border-box}
.twmpw-church-zone-step textarea{min-height:132px}
.twmpw-church-zone-step .twmpw-summary{margin:0}
.twmpw-church-zone-table-card .twmpw-block-body{padding-top:10px}
.twmpw-church-zone-table{min-width:720px}
.twmpw-church-zone-table th,.twmpw-church-zone-table td{padding:8px 10px;vertical-align:middle}
.twmpw-church-zone-table td:first-child,.twmpw-church-zone-table th:first-child{width:42px;text-align:center}
.twmpw-church-zone-table .twmpw-badge{display:inline-flex;align-items:center;border-radius:999px;padding:2px 8px;font-size:12px;font-weight:800;border:1px solid #eadfc1;background:#fff7df;color:#6f4b0a;white-space:nowrap}
.twmpw-church-zone-table .twmpw-badge.ok{background:#eef8e9;color:#2f6b22;border-color:#cfe7c3}
.twmpw-church-zone-table .twmpw-badge.warn{background:#fff1d8;color:#8a4b00;border-color:#f0d0a0}

/* TWMP CHURCH ZONE V287 */
.twmpw-church-zone-step .twmpw-block-body{gap:14px}
.twmpw-church-zone-step .twmpw-church-zone-settings{align-items:end;row-gap:12px;column-gap:14px}
.twmpw-church-zone-step .twmpw-field-stack{display:grid;gap:8px;align-content:start}
.twmpw-church-zone-step .twmpw-input-label{display:inline-flex;align-items:center;gap:6px;margin-bottom:0}
.twmpw-church-zone-step .twmpw-church-zone-toggle{min-height:52px;height:52px;margin:0;align-self:end;box-sizing:border-box}
.twmpw-church-zone-step textarea{min-height:132px}
.twmpw-church-zone-step .twmpw-summary{margin:0}
.twmpw-church-zone-table-card .twmpw-block-body{padding-top:10px}
.twmpw-church-zone-table{min-width:720px}
.twmpw-church-zone-table th,.twmpw-church-zone-table td{padding:8px 10px;vertical-align:middle}
.twmpw-church-zone-table td:first-child,.twmpw-church-zone-table th:first-child{width:42px;text-align:center}
.twmpw-church-zone-table .twmpw-badge{display:inline-flex;align-items:center;border-radius:999px;padding:2px 8px;font-size:12px;font-weight:800;border:1px solid #eadfc1;background:#fff7df;color:#6f4b0a;white-space:nowrap}
.twmpw-church-zone-table .twmpw-badge.ok{background:#eef8e9;color:#2f6b22;border-color:#cfe7c3}
.twmpw-church-zone-table .twmpw-badge.warn{background:#fff1d8;color:#8a4b00;border-color:#f0d0a0}

/* TWMP CHURCH ZONE V288 */
.twmpw-church-zone-step .twmpw-block-body{gap:14px}
.twmpw-church-zone-step .twmpw-church-zone-settings{align-items:end;row-gap:12px;column-gap:14px}
.twmpw-church-zone-step .twmpw-field-stack{display:grid;gap:8px;align-content:start}
.twmpw-church-zone-step .twmpw-input-label{display:inline-flex;align-items:center;gap:6px;margin-bottom:0}
.twmpw-church-zone-step .twmpw-church-zone-toggle{min-height:52px;height:52px;margin:0;align-self:end;box-sizing:border-box}
.twmpw-church-zone-step textarea{min-height:132px}
.twmpw-church-zone-step .twmpw-summary{margin:0}
.twmpw-church-zone-table-card .twmpw-block-body{padding-top:10px}
.twmpw-church-zone-table{min-width:720px}
.twmpw-church-zone-table th,.twmpw-church-zone-table td{padding:8px 10px;vertical-align:middle}
.twmpw-church-zone-table td:first-child,.twmpw-church-zone-table th:first-child{width:42px;text-align:center}
.twmpw-church-zone-table .twmpw-badge{display:inline-flex;align-items:center;border-radius:999px;padding:2px 8px;font-size:12px;font-weight:800;border:1px solid #eadfc1;background:#fff7df;color:#6f4b0a;white-space:nowrap}
.twmpw-church-zone-table .twmpw-badge.ok{background:#eef8e9;color:#2f6b22;border-color:#cfe7c3}
.twmpw-church-zone-table .twmpw-badge.warn{background:#fff1d8;color:#8a4b00;border-color:#f0d0a0}

/* TWMP CHURCH ZONE V289 */
.twmpw-church-zone-step .twmpw-block-body{gap:14px}
.twmpw-church-zone-step .twmpw-church-zone-settings{align-items:end;row-gap:12px;column-gap:14px}
.twmpw-church-zone-step .twmpw-field-stack{display:grid;gap:8px;align-content:start}
.twmpw-church-zone-step .twmpw-input-label{display:inline-flex;align-items:center;gap:6px;margin-bottom:0}
.twmpw-church-zone-step .twmpw-church-zone-toggle{min-height:52px;height:52px;margin:0;align-self:end;box-sizing:border-box}
.twmpw-church-zone-step textarea{min-height:132px}
.twmpw-church-zone-step .twmpw-summary{margin:0}
.twmpw-church-zone-table-card .twmpw-block-body{padding-top:10px}
.twmpw-church-zone-table{min-width:720px}
.twmpw-church-zone-table th,.twmpw-church-zone-table td{padding:8px 10px;vertical-align:middle}
.twmpw-church-zone-table td:first-child,.twmpw-church-zone-table th:first-child{width:42px;text-align:center}
.twmpw-church-zone-table .twmpw-badge{display:inline-flex;align-items:center;border-radius:999px;padding:2px 8px;font-size:12px;font-weight:800;border:1px solid #eadfc1;background:#fff7df;color:#6f4b0a;white-space:nowrap}
.twmpw-church-zone-table .twmpw-badge.ok{background:#eef8e9;color:#2f6b22;border-color:#cfe7c3}
.twmpw-church-zone-table .twmpw-badge.warn{background:#fff1d8;color:#8a4b00;border-color:#f0d0a0}

/* TWMP CHURCH ZONE V290 */
.twmpw-church-zone-step .twmpw-block-body{gap:14px}
.twmpw-church-zone-step .twmpw-church-zone-settings{align-items:end;row-gap:12px;column-gap:14px}
.twmpw-church-zone-step .twmpw-field-stack{display:grid;gap:8px;align-content:start}
.twmpw-church-zone-step .twmpw-input-label{display:inline-flex;align-items:center;gap:6px;margin-bottom:0}
.twmpw-church-zone-step .twmpw-church-zone-toggle{min-height:52px;height:52px;margin:0;align-self:end;box-sizing:border-box}
.twmpw-church-zone-step textarea{min-height:132px}
.twmpw-church-zone-step .twmpw-summary{margin:0}
.twmpw-church-zone-table-card .twmpw-block-body{padding-top:10px}
.twmpw-church-zone-table{min-width:720px}
.twmpw-church-zone-table th,.twmpw-church-zone-table td{padding:8px 10px;vertical-align:middle}
.twmpw-church-zone-table td:first-child,.twmpw-church-zone-table th:first-child{width:42px;text-align:center}
.twmpw-church-zone-table .twmpw-badge{display:inline-flex;align-items:center;border-radius:999px;padding:2px 8px;font-size:12px;font-weight:800;border:1px solid #eadfc1;background:#fff7df;color:#6f4b0a;white-space:nowrap}
.twmpw-church-zone-table .twmpw-badge.ok{background:#eef8e9;color:#2f6b22;border-color:#cfe7c3}
.twmpw-church-zone-table .twmpw-badge.warn{background:#fff1d8;color:#8a4b00;border-color:#f0d0a0}

/* TWMP CHURCH ZONE V291 */
.twmpw-church-zone-step .twmpw-block-body{gap:14px}
.twmpw-church-zone-step .twmpw-church-zone-settings{align-items:end;row-gap:12px;column-gap:14px}
.twmpw-church-zone-step .twmpw-field-stack{display:grid;gap:8px;align-content:start}
.twmpw-church-zone-step .twmpw-input-label{display:inline-flex;align-items:center;gap:6px;margin-bottom:0}
.twmpw-church-zone-step .twmpw-church-zone-toggle{min-height:52px;height:52px;margin:0;align-self:end;box-sizing:border-box}
.twmpw-church-zone-step textarea{min-height:132px}
.twmpw-church-zone-step .twmpw-summary{margin:0}
.twmpw-church-zone-table-card .twmpw-block-body{padding-top:10px}
.twmpw-church-zone-table{min-width:720px}
.twmpw-church-zone-table th,.twmpw-church-zone-table td{padding:8px 10px;vertical-align:middle}
.twmpw-church-zone-table td:first-child,.twmpw-church-zone-table th:first-child{width:42px;text-align:center}
.twmpw-church-zone-table .twmpw-badge{display:inline-flex;align-items:center;border-radius:999px;padding:2px 8px;font-size:12px;font-weight:800;border:1px solid #eadfc1;background:#fff7df;color:#6f4b0a;white-space:nowrap}
.twmpw-church-zone-table .twmpw-badge.ok{background:#eef8e9;color:#2f6b22;border-color:#cfe7c3}
.twmpw-church-zone-table .twmpw-badge.warn{background:#fff1d8;color:#8a4b00;border-color:#f0d0a0}
.twmpw-church-zone-settings-panel{margin-top:14px}
.twmpw-church-zone-settings-panel .twmpw-block-body{gap:12px}
.twmpw-church-zone-calc-grid{align-items:end;gap:14px}
.twmpw-church-zone-settings-panel .twmpw-field-stack{display:grid;gap:8px}
.twmpw-church-zone-unknown-toggle{min-height:52px;height:52px;align-self:end;margin:0;box-sizing:border-box}
.twmpw-church-zone-settings-panel select{min-height:38px}

/* TWMP CHURCH ZONE V292 ALIGN FIX */
.twmpw-church-zone-settings-panel .twmpw-church-zone-calc-grid{display:grid!important;grid-template-columns:minmax(280px,1fr) minmax(280px,1fr);align-items:end!important;gap:14px!important}
.twmpw-church-zone-settings-panel .twmpw-field-stack{display:grid!important;gap:8px!important;align-content:start!important;margin:0!important}
.twmpw-church-zone-settings-panel .twmpw-field-stack .twmpw-input-label{display:inline-flex!important;align-items:center!important;gap:6px!important;margin:0!important;line-height:1.2!important}
.twmpw-church-zone-settings-panel .twmpw-field-stack select{height:42px!important;min-height:42px!important;box-sizing:border-box!important}
.twmpw-church-zone-settings-panel .twmpw-church-zone-unknown-toggle{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;height:42px!important;min-height:42px!important;margin:0!important;padding:0 12px!important;box-sizing:border-box!important;align-self:end!important;width:100%!important;overflow:visible!important}
.twmpw-church-zone-unknown-toggle>.twmpw-label-row{display:inline-flex!important;align-items:center!important;gap:6px!important;min-width:0!important;line-height:1.2!important;margin:0!important;flex:1 1 auto!important;white-space:normal!important}
.twmpw-church-zone-unknown-toggle>.twmpw-toggle{flex:0 0 auto!important;margin-left:auto!important;align-self:center!important;display:inline-flex!important;align-items:center!important;justify-content:center!important}
@media (max-width: 820px){.twmpw-church-zone-settings-panel .twmpw-church-zone-calc-grid{grid-template-columns:1fr!important}.twmpw-church-zone-settings-panel .twmpw-church-zone-unknown-toggle{align-self:stretch!important}}

/* v303: compact and readable data validation modal */
.twmpw-validation-report{display:grid;gap:14px}
.twmpw-validation-hero{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding:14px 16px;border-radius:16px;border:1px solid #e4cf9f;background:#fff8e8;box-shadow:inset 0 1px 0 rgba(255,255,255,.55)}
.twmpw-validation-hero b{display:block;font-size:16px;color:#5b3f00;margin-bottom:4px}
.twmpw-validation-hero span{color:#6b5427;line-height:1.45}
.twmpw-validation-hero>span{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;min-width:42px;min-height:30px;padding:3px 10px;border-radius:999px;font-weight:900;border:1px solid #e1c587;background:#fff1cf;color:#6a4d13}
.twmpw-validation-hero.is-ok{background:#f5faed;border-color:#cfe5bd}.twmpw-validation-hero.is-ok>span{background:#eef8e9;border-color:#cfe7c3;color:#2f6b22}
.twmpw-validation-hero.is-warn{background:#fff4df;border-color:#e6c98f}.twmpw-validation-hero.is-warn>span{background:#fff1d8;border-color:#f0d0a0;color:#8a4b00}
.twmpw-validation-card{display:grid;gap:10px;padding:14px 16px;border-radius:16px;border:1px solid #e4cf9f;background:#fffaf0;box-shadow:inset 0 1px 0 rgba(255,255,255,.55)}
.twmpw-validation-card.is-ok{background:#fbfff6;border-color:#d3e7c5}.twmpw-validation-card.is-warn{background:#fff8eb;border-color:#e7c990}
.twmpw-validation-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.twmpw-validation-card-head b{display:block;color:#5b3f00}.twmpw-validation-card-head span{display:block;color:#7a6030;font-size:12px;margin-top:2px}
.twmpw-validation-status{display:inline-flex!important;align-items:center;justify-content:center;min-height:24px;padding:2px 9px;border-radius:999px;border:1px solid #e1c587;background:#fff1cf;color:#6a4d13!important;font-size:12px!important;font-weight:900;white-space:nowrap}
.twmpw-validation-card.is-ok .twmpw-validation-status{background:#eef8e9;border-color:#cfe7c3;color:#2f6b22!important}.twmpw-validation-card.is-warn .twmpw-validation-status{background:#fff1d8;border-color:#f0d0a0;color:#8a4b00!important}
.twmpw-validation-card-title{font-weight:900;color:#4d3600}.twmpw-validation-card-text{color:#675126;line-height:1.45}.twmpw-validation-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.twmpw-validation-metrics>div{display:grid;gap:2px;padding:9px 10px;border-radius:12px;background:rgba(255,255,255,.62);border:1px solid rgba(210,177,112,.45)}
.twmpw-validation-metrics span{font-size:12px;color:#7a6030}.twmpw-validation-metrics b{font-size:15px;color:#4d3600}.twmpw-validation-main-metrics{grid-template-columns:repeat(4,minmax(0,1fr))}
.twmpw-validation-samples{padding:9px 10px;border-radius:12px;background:#fff4dc;border:1px dashed #e4c384;color:#6a4d13;line-height:1.45}
.twmpw-validation-list{display:grid;gap:8px}.twmpw-validation-list>div{padding:9px 10px;border-radius:12px;background:#fffdfa;border:1px solid #eadfc1;color:#5b4520;line-height:1.4}
.twmpw-validation-scroll{max-height:300px;overflow-y:auto;overflow-x:auto;margin-top:2px}
@media (max-width: 760px){.twmpw-validation-hero,.twmpw-validation-card-head{flex-direction:column}.twmpw-validation-metrics,.twmpw-validation-main-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}

.twmpw-validation-conflict-summary{display:grid;gap:10px;padding:12px;border-radius:14px;background:rgba(255,255,255,.55);border:1px solid rgba(210,177,112,.42)}
.twmpw-validation-conflict-metrics{grid-template-columns:repeat(4,minmax(0,1fr))}
.twmpw-validation-conflict-list{display:grid;gap:10px}
.twmpw-validation-conflict-group{display:grid;gap:8px;padding:10px;border-radius:13px;background:#fffdfa;border:1px solid #eadfc1}
.twmpw-validation-conflict-title{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.twmpw-validation-conflict-title b{color:#5b3f00}.twmpw-validation-conflict-title span{font-size:12px;color:#7a6030;white-space:nowrap}
.twmpw-validation-conflict-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.twmpw-validation-conflict-label{font-size:12px;font-weight:900;color:#6a4d13;margin-bottom:5px}
.twmpw-validation-chiplist{display:flex;flex-wrap:wrap;gap:6px}
.twmpw-validation-chip{display:inline-flex;align-items:center;gap:5px;max-width:100%;padding:5px 8px;border-radius:999px;background:#fff4dc;border:1px solid #e6c98f;color:#5b3f00;line-height:1.15}
.twmpw-validation-chip b{font-size:12px}.twmpw-validation-chip small{font-size:11px;color:#765b28;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:190px}.twmpw-validation-chip.is-more{font-size:12px;font-weight:900;background:#fffaf0}
@media (max-width: 760px){.twmpw-validation-conflict-columns{grid-template-columns:1fr}.twmpw-validation-conflict-title{flex-direction:column}.twmpw-validation-conflict-title span{white-space:normal}.twmpw-validation-conflict-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* v304: unified scrollbars for validation and project modals */
.twmpw-sm-modal,
.twmpw-sm-body,
.twmpw-validation-scroll,
.twmpw-modal-table-scroll,
#projectDialog .twmpw-sm-body,
#projectDialog .twmpw-project-table-wrap,
#projectDialog .twmpw-project-history{
  scrollbar-width: thin;
  scrollbar-color: #c6a160 rgba(255,255,255,.35);
}
.twmpw-sm-modal::-webkit-scrollbar,
.twmpw-sm-body::-webkit-scrollbar,
.twmpw-validation-scroll::-webkit-scrollbar,
.twmpw-modal-table-scroll::-webkit-scrollbar,
#projectDialog .twmpw-sm-body::-webkit-scrollbar,
#projectDialog .twmpw-project-table-wrap::-webkit-scrollbar,
#projectDialog .twmpw-project-history::-webkit-scrollbar{
  width:10px;
  height:10px;
}
.twmpw-sm-modal::-webkit-scrollbar-track,
.twmpw-sm-body::-webkit-scrollbar-track,
.twmpw-validation-scroll::-webkit-scrollbar-track,
.twmpw-modal-table-scroll::-webkit-scrollbar-track,
#projectDialog .twmpw-sm-body::-webkit-scrollbar-track,
#projectDialog .twmpw-project-table-wrap::-webkit-scrollbar-track,
#projectDialog .twmpw-project-history::-webkit-scrollbar-track{
  background:rgba(255,255,255,.35);
  border-radius:999px;
}
.twmpw-sm-modal::-webkit-scrollbar-thumb,
.twmpw-sm-body::-webkit-scrollbar-thumb,
.twmpw-validation-scroll::-webkit-scrollbar-thumb,
.twmpw-modal-table-scroll::-webkit-scrollbar-thumb,
#projectDialog .twmpw-sm-body::-webkit-scrollbar-thumb,
#projectDialog .twmpw-project-table-wrap::-webkit-scrollbar-thumb,
#projectDialog .twmpw-project-history::-webkit-scrollbar-thumb{
  background:#c6a160;
  border-radius:999px;
  border:2px solid #f1e4c6;
}
.twmpw-sm-modal::-webkit-scrollbar-corner,
.twmpw-sm-body::-webkit-scrollbar-corner,
.twmpw-validation-scroll::-webkit-scrollbar-corner,
.twmpw-modal-table-scroll::-webkit-scrollbar-corner,
#projectDialog .twmpw-sm-body::-webkit-scrollbar-corner,
#projectDialog .twmpw-project-table-wrap::-webkit-scrollbar-corner,
#projectDialog .twmpw-project-history::-webkit-scrollbar-corner{
  background:rgba(255,255,255,.35);
}

/* v305: smooth validation modal and virtualized conflict table */
.twmpw-sm-modal{
  overflow:hidden;
  display:flex;
  flex-direction:column;
  min-height:0;
}
.twmpw-sm-head,
.twmpw-sm-actions{
  flex:0 0 auto;
}
.twmpw-sm-body{
  min-height:0;
  overflow:auto;
}
.twmpw-validation-virtual{
  max-height:min(38vh,360px);
  min-height:220px;
  contain:content;
  will-change:scroll-position;
}
.twmpw-validation-virtual-table{
  table-layout:fixed;
  width:100%;
}
.twmpw-validation-virtual-table th,
.twmpw-validation-virtual-table td{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.twmpw-validation-spacer-row td{
  padding:0!important;
  border:0!important;
  height:inherit!important;
  background:transparent!important;
}

/* UI perf stage15: canvas-backed result map for large plans. */
.twmpw-map-shell-canvas .twmpw-map-wrap{
  contain: layout paint style;
  content-visibility: auto;
  contain-intrinsic-size: 1px 420px;
}
.twmpw-map-canvas{
  width: 100%;
  height: auto;
  display: block;
  touch-action: none;
  image-rendering: auto;
  background: #fffaf0;
}
.twmpw-map-perf-label{
  margin-left: auto;
  font-size: 12px;
  color: var(--muted, #766b5b);
  white-space: nowrap;
}
@media (max-width: 720px){
  .twmpw-map-perf-label{ width: 100%; white-space: normal; }
}
.twmpw-ui-perf-stage12-marker{content-visibility:auto;}
.twmpw-ui-perf-stage12-marker-2{contain:layout paint style;}
/* UI perf stage13 virtual result table. */
.twmpw-result-vtable{position:relative;contain:layout paint style;}
.twmpw-vtable-viewport{position:relative;max-height:620px;overflow:auto;contain:layout paint style;}
.twmpw-vtable-spacer{height:var(--twmpw-vtable-height,0px);pointer-events:none;}
.twmpw-vtable-table{position:absolute;left:0;top:0;width:100%;will-change:transform;}
.twmpw-ui-perf-stage13-marker{will-change:transform;}

/* UI perf stage16: clean virtual table labels and keep header fixed while virtual body scrolls */
.twmpw-result-vtable{position:relative;}
.twmpw-vtable-header{position:sticky;top:0;z-index:5;background:#f5ecd9;border-bottom:1px solid rgba(120,82,24,.25);overflow:hidden;}
.twmpw-vtable-head-table{width:100%;margin:0;table-layout:fixed;}
.twmpw-vtable-body-table{table-layout:fixed;}
.twmpw-vtable-viewport{position:relative;max-height:620px;overflow:auto;contain:layout paint style;}
.twmpw-vtable-viewport .twmpw-vtable-table thead{display:none;}
.twmpw-vtable-spacer{height:var(--twmpw-vtable-height,0px);pointer-events:none;}
.twmpw-vtable-table{position:absolute;left:0;top:0;width:100%;will-change:transform;}

/* UI Performance Stage 22: preloader for heavy row explanation modal */
.twmpw-explain-loading{display:flex;align-items:flex-start;gap:14px;padding:14px 4px;color:#5f420f;line-height:1.45}
.twmpw-explain-loading .twmpw-boot-loader{flex:0 0 auto;width:34px;height:34px;margin:0;border-width:3px}
.twmpw-sm-body-explain[aria-busy="true"]{min-height:180px;cursor:progress}

/* 04.06 targeted UX fixes: tower builder modal and small inline hints */
.twmpw-muted-mini{
  font-size:12px;
  font-weight:700;
  color:var(--muted,#766b5b);
  text-transform:none;
  letter-spacing:0;
}
.twmpw-row-actions-tight{margin:0 0 8px 0;}
.twmpw-tower-builder-row{
  display:grid;
  grid-template-columns:minmax(260px,1fr) 180px auto;
  gap:12px;
  align-items:end;
  border:1px solid rgba(120,82,24,.18);
  background:rgba(255,250,235,.7);
  border-radius:12px;
  padding:12px;
  margin:10px 0;
}
.twmpw-tower-builder-row textarea{min-height:110px;resize:vertical;}
.twmpw-tower-builder-remove{align-self:end;white-space:nowrap;}
@media (max-width: 760px){
  .twmpw-tower-builder-row{grid-template-columns:1fr;}
  .twmpw-tower-builder-remove{justify-self:start;}
}


/* twmpw-v387-pair-settings-fullscreen-css */
.twmpw-collapsible-fullscreen-capable .twmpw-collapsible-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.twmpw-collapsible-title-text{
  min-width:0;
}
.twmpw-pair-table-fullscreen-btn{
  white-space:nowrap;
}
html.twmpw-pair-table-fullscreen-open,
html.twmpw-pair-table-fullscreen-open body{
  overflow:hidden !important;
}
.twmpw-collapsible-fullscreen{
  position:fixed !important;
  inset:18px !important;
  z-index:9998 !important;
  height:auto !important;
  max-height:none !important;
  min-height:0 !important;
  display:flex !important;
  flex-direction:column !important;
  padding:14px !important;
  border:1px solid #d6b166 !important;
  border-radius:18px !important;
  background:#fffaf0 !important;
  box-shadow:0 18px 60px rgba(55, 34, 8, .38) !important;
}
.twmpw-collapsible-fullscreen .twmpw-collapsible-head{
  flex:0 0 auto;
  margin-bottom:12px;
  padding:0 2px 10px;
  border-bottom:1px solid rgba(166, 109, 18, .22);
}
.twmpw-collapsible-fullscreen .twmpw-collapsible-body{
  flex:1 1 auto !important;
  min-height:0 !important;
  max-height:none !important;
  height:auto !important;
}
.twmpw-collapsible-fullscreen .twmpw-collapsible-scroll{
  height:100% !important;
  max-height:none !important;
  overflow:auto !important;
  border-radius:12px;
}
.twmpw-collapsible-fullscreen .twmpw-table{
  min-width:1040px;
}
.twmpw-collapsible-fullscreen .twmpw-table thead th{
  position:sticky;
  top:0;
  z-index:2;
}
@media (max-width: 700px){
  .twmpw-collapsible-fullscreen{inset:8px !important; padding:10px !important; border-radius:14px !important;}
  .twmpw-collapsible-fullscreen-capable .twmpw-collapsible-head{align-items:flex-start; flex-direction:column;}
}


/* twmpw-v388-pair-time-exclusive-css */
.twmpw-pair-arrival-disabled-by-exact,
.twmpw-pair-exact-disabled-by-arrival{
  opacity:.72;
}
.twmpw-pair-arrival-disabled-by-exact input:disabled,
.twmpw-pair-arrival-disabled-by-exact select:disabled,
.twmpw-pair-arrival-disabled-by-exact textarea:disabled,
.twmpw-pair-arrival-disabled-by-exact button:disabled,
.twmpw-pair-exact-disabled-by-arrival input:disabled{
  cursor:not-allowed;
}
.twmpw-pair-arrival-disabled-by-exact::after{
  content:'Окна прихода недоступны, пока задано точное время прихода.';
  display:block;
  margin-top:8px;
  padding:8px 10px;
  border:1px solid rgba(166,109,18,.22);
  border-radius:10px;
  background:#fff4cf;
  color:#6b4208;
  font-size:12px;
  line-height:1.35;
}


/* twmpw-v389-pair-time-exclusive-css */
.twmpw-v389-arrival-locked-by-exact,
.twmpw-v389-exact-locked-by-arrival{
  opacity:.72;
}
.twmpw-v389-arrival-locked-by-exact input:disabled,
.twmpw-v389-arrival-locked-by-exact select:disabled,
.twmpw-v389-arrival-locked-by-exact textarea:disabled,
.twmpw-v389-arrival-locked-by-exact button:disabled,
.twmpw-v389-exact-locked-by-arrival input:disabled{
  cursor:not-allowed;
}
.twmpw-v389-arrival-locked-by-exact::after{
  content:'Окна прихода недоступны, пока задано точное время прихода.';
  display:block;
  margin-top:8px;
  padding:8px 10px;
  border:1px solid rgba(166,109,18,.22);
  border-radius:10px;
  background:#fff4cf;
  color:#6b4208;
  font-size:12px;
  line-height:1.35;
}
.twmpw-v389-exact-locked-by-arrival::after{
  content:'Точное время прихода недоступно, пока заданы окна прихода.';
  display:block;
  margin-top:8px;
  padding:8px 10px;
  border:1px solid rgba(166,109,18,.22);
  border-radius:10px;
  background:#fff4cf;
  color:#6b4208;
  font-size:12px;
  line-height:1.35;
}
