.tactical-map-page{margin:0;background:#08101b;color:#e3edf5;font:14px/1.5 "Noto Sans KR","Malgun Gothic",system-ui,sans-serif;color-scheme:dark}
.tm-root,.tm-root *{box-sizing:border-box}.tm-root [hidden]{display:none!important}
.tm-root{height:100dvh;display:flex;flex-direction:column;gap:10px;padding:14px;min-height:620px}
.tm-root button,.tm-root input,.tm-root select,.tm-root textarea,.tm-root a{font:inherit}
.tm-root button,.tm-root .tm-header a{border:1px solid #31465f;background:#162537;color:#e5f2ff;border-radius:7px;padding:7px 10px;cursor:pointer;text-decoration:none}
.tm-root button:hover,.tm-root a:hover{background:#213c55;border-color:#66bbf2}.tm-root button:focus-visible,.tm-root input:focus-visible,.tm-root textarea:focus-visible,.tm-root select:focus-visible,.tm-root a:focus-visible{outline:2px solid #72cfff;outline-offset:2px}
.tm-root button[aria-pressed=true]{background:#114f55;border-color:#4ce8c3;color:#b8ffeb}.tm-root button:disabled,.tm-root input:disabled,.tm-root textarea:disabled,.tm-root select:disabled{opacity:.48;cursor:not-allowed}
.tm-terrain-controls{border-bottom:1px solid #31465f;padding-bottom:10px;margin-bottom:10px}.tm-terrain-controls h2{margin:8px 0 5px}.tm-terrain-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px}.tm-terrain-grid button:first-child{grid-column:1/-1}.tm-baron-buttons{display:grid;gap:4px}.tm-root .tm-terrain-controls button{font-size:12px;padding:6px 3px;margin:0;min-height:32px}.tm-terrain-controls .tm-help{font-size:11px;line-height:1.45;margin-top:7px}.tm-root #tmCanvas{background:#050a0d}
.tm-header{display:flex;justify-content:space-between;align-items:center;gap:16px}.tm-root h1{font-size:23px;margin:0}.tm-root h2{font-size:14px;margin:0 0 9px}.tm-root p{margin:4px 0}.tm-header p{font-size:12px;color:#9fb7c9}.tm-header-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap;justify-content:flex-end}
.tm-root .tm-header .tm-home-link{display:inline-block;padding:0;border:0;background:none;color:#a4dbce;font-size:12px;white-space:nowrap;text-decoration:underline;text-underline-offset:3px}.tm-root .tm-header .tm-home-link:hover{color:#e5f2ff}
.tm-root #tmStatus{color:#89edbd;font-size:12px;max-width:260px}.tm-root #tmStatus[data-state=error]{color:#ffa5aa}.tm-root #tmStatus[data-state=pending]{color:#ffda83}
.tm-notices{display:flex;align-items:center;flex-wrap:wrap;gap:7px 14px;background:#132433;border:1px solid #345168;border-radius:7px;padding:7px 12px;font-size:12px}.tm-notices strong{color:#f2d087}.tm-root #tmError{color:#ffadaf;white-space:pre-line}.tm-root #tmSourceNotice{color:#b9d4e3;white-space:pre-line}
.tm-workspace{display:grid;grid-template-columns:128px minmax(240px,1fr) 290px;gap:10px;min-height:0;flex:1}.tm-tools,.tm-sidebar{min-height:0;overflow:auto;scrollbar-width:thin}.tm-tools{display:flex;flex-direction:column;gap:5px;padding:9px;background:#0e1a29;border:1px solid #263b50;border-radius:9px}.tm-tools button{font-size:12px;text-align:left;white-space:nowrap}.tm-draw-tools{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}.tm-draw-tools button{padding:6px 2px;font-size:11px;text-align:center}.tm-tools summary{cursor:pointer;padding:5px 0}.tm-tools hr{border:0;border-top:1px solid #31465f;width:100%;margin:5px 0}.tm-zoom{display:flex;align-items:center;justify-content:space-between;font-size:10px}.tm-zoom button{padding:3px 6px}.tm-map-wrap{position:relative;border:1px solid #375365;background:#070e15;border-radius:9px;overflow:hidden;min-width:0;min-height:0}.tm-root #tmCanvas{width:100%;height:100%;display:block;touch-action:none;user-select:none}.tm-root #tmCanvas[data-tool=hand]{cursor:grab}.tm-root #tmCanvas[data-tool=pen],.tm-root #tmCanvas[data-tool=ward]{cursor:crosshair}.tm-map-caption{pointer-events:none;position:absolute;bottom:7px;left:7px;right:7px;text-align:center;font-size:10px;color:#c5d4db;text-shadow:0 1px 3px #000;background:#07121ecc;border-radius:5px}
.tm-sidebar{display:flex;flex-direction:column;gap:10px}.tm-sidebar section{border:1px solid #2b4056;border-radius:9px;background:#101d2c;padding:12px}.tm-root small,.tm-help{font-size:11px;color:#98b1c3}.tm-root h2 small{display:block;font-size:10px;font-weight:400}.tm-fields{display:flex;flex-direction:column;gap:8px}.tm-fields label,.tm-sidebar>section>label{display:block;font-size:12px}.tm-root input:not([type=checkbox]):not([type=range]),.tm-root select,.tm-root textarea{width:100%;background:#08121e;border:1px solid #35516b;border-radius:5px;padding:6px 8px;color:#ecf5fa}.tm-root input[type=range]{width:100%;accent-color:#43cfb6}.tm-root textarea{resize:vertical;min-height:95px;max-height:300px}.tm-root input[type=checkbox]{accent-color:#42d9bc;vertical-align:middle;margin-right:7px}
.tm-markers{display:grid;gap:5px;margin:12px 0}.tm-marker-row{display:flex;align-items:center;gap:4px}.tm-marker-row button{flex:1;text-align:left;font-size:11px;padding:5px 7px}.tm-marker-row select{width:142px;font-size:11px}.tm-marker-row[data-side=blue]{border-left:3px solid #40a9ff}.tm-marker-row[data-side=red]{border-left:3px solid #ff646d}.tm-backup-actions{display:grid;grid-template-columns:1fr 1fr;gap:5px}.tm-backup-actions button{font-size:11px}.tm-root .tm-danger{border-color:#955060;color:#ffb8c0}
.tm-root dialog{max-width:560px;width:90vw;max-height:85vh;background:#111f30;color:#e3edf5;border:1px solid #54738c;border-radius:12px;padding:20px}.tm-root dialog::backdrop{background:#000b}.tm-root #tmBackupList{display:grid;gap:8px;margin:16px 0}.tm-root #tmBackupList button{text-align:left}.tm-root #tmSelected{color:#83daca;font-size:12px}
.tm-background-status{position:absolute;top:8px;left:8px;right:8px;display:flex;align-items:center;justify-content:center;gap:8px;pointer-events:none;color:#ffd697;font-size:12px}.tm-background-status button{pointer-events:auto}.tm-background-status span:not(:empty){background:#07121ee8;padding:5px 9px;border-radius:5px}
.tm-note-status{display:flex;justify-content:space-between;gap:8px}.tm-note-status #tmNotesState{color:#89edbd}.tm-root #tmPanelNotice:not(:empty){margin:6px 0 10px}.tm-root #tmPanelNotice[data-conflict=true]{color:#ffda83}.tm-root #tmSizeValue{float:right;color:#a8eaff}.tm-root #tmPanelReload{margin-bottom:10px}.tm-root #tmCanvas[data-tool=select] [data-object]{cursor:grab}.tm-root #tmCanvas[data-dragging=true],.tm-root #tmCanvas[data-dragging=true] [data-object]{cursor:grabbing}.tm-root #tmCanvas[data-tool=erase] [data-object]{cursor:crosshair}
@media(max-width:1050px){.tm-workspace{grid-template-columns:112px minmax(200px,1fr) 245px}.tm-root{padding:7px}.tm-draw-tools button{font-size:10px}.tm-tools>button{padding:7px 4px}.tm-header-actions button,.tm-header-actions a{font-size:11px}.tm-header{gap:8px}.tm-root h1{font-size:19px}}
@media(max-width:720px){.tm-root{height:auto;min-height:100dvh}.tm-header{align-items:flex-start;flex-direction:column}.tm-header-actions{justify-content:flex-start}.tm-workspace{grid-template-columns:75px minmax(0,1fr);grid-template-rows:68dvh auto}.tm-tools{padding:5px}.tm-draw-tools{grid-template-columns:1fr}.tm-tools button{padding:7px 3px;font-size:10px}.tm-sidebar{grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));overflow:visible}.tm-sidebar section{padding:9px}.tm-zoom{flex-wrap:wrap}.tm-map-caption{font-size:9px}}
@media(max-width:440px){.tm-sidebar{grid-template-columns:1fr}.tm-marker-row select{width:160px}}
.tm-workspace{grid-template-columns:160px minmax(240px,1fr) 290px}.tm-terrain-controls{flex-shrink:0}.tm-terrain-controls button{text-align:center}
@media(max-width:1050px){.tm-workspace{grid-template-columns:144px minmax(200px,1fr) 245px}}
@media(max-width:720px){.tm-workspace{grid-template-columns:85px minmax(0,1fr)}.tm-terrain-grid{grid-template-columns:1fr}.tm-root .tm-terrain-controls button{white-space:normal;font-size:11px}}
.tm-root{padding:6px;gap:6px}.tm-header{gap:8px;min-height:38px}.tm-root h1{font-size:19px}.tm-header p{font-size:11px;margin:0}.tm-notices{padding:4px 9px}.tm-workspace{gap:6px}.tm-terrain-controls>summary{font-size:12px;font-weight:600;cursor:pointer;padding:5px 0}.tm-expanded .tm-workspace{grid-template-columns:160px minmax(0,1fr)}.tm-expanded .tm-sidebar{display:none}.tm-expanded .tm-header h1,.tm-expanded .tm-header p{display:none}.tm-expanded .tm-header{min-height:30px}.tm-expanded .tm-header-actions{width:100%}.tm-expanded .tm-header-actions button,.tm-expanded .tm-header-actions a{padding:4px 8px}
@media(max-width:720px){.tm-expanded .tm-workspace{grid-template-columns:85px minmax(0,1fr);grid-template-rows:calc(100dvh - 110px)}.tm-root h1{font-size:17px}}

.tm-sidebar .tm-terrain-controls{border-bottom:0;border-top:1px solid #31465f;margin:10px 0 0;padding:7px 0 0}
.tm-root #tmTextEditor{position:absolute;z-index:20;display:flex;flex-wrap:wrap;gap:6px;width:272px;max-width:calc(100% - 8px);padding:10px;border:1px solid #72cfff;border-radius:8px;background:#101d2c;box-shadow:0 4px 18px #0008}
.tm-root #tmTextEditor label,.tm-root #tmTextEditor input,.tm-root #tmTextEditor small{flex-basis:100%}
.tm-header-actions #tmQuickRecovery { display:flex; gap:5px; }
#tmBackupList details { margin:8px 0; padding:10px; border:1px solid #496078; border-radius:6px; }
#tmBackupList summary { cursor:pointer; }
#tmBackupList svg { border:1px solid #496078; }
#tmRosterSearchWrap { display:grid; gap:5px; margin:10px 0; }
#tmRosterSearchWrap[hidden] { display:none; }
#tmRosterSearch { min-width:0; width:100%; box-sizing:border-box; }
