.editor-body { overflow: hidden; }
.editor-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: .75rem; height: calc(100vh - 69px); padding: .75rem; }
.editor-panel { overflow-y: auto; }
.editor-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; padding: .6rem; background: var(--line); }
.editor-tabs button { padding: .55rem; color: var(--muted); border: 0; background: var(--panel); font-size: .65rem; font-weight: 700; text-transform: uppercase; }
.editor-tabs button.active { color: #18130a; background: var(--brass); }
.editor-section, .tool-panel { display: grid; gap: .75rem; padding: 1rem; border-top: 1px solid var(--line); }
.editor-section h1 { margin: .1rem 0 0; font-size: 1.15rem; }
.tool-panel label { display: grid; gap: .3rem; color: var(--muted); font-size: .62rem; font-weight: 700; text-transform: uppercase; }
.tool-panel input, .tool-panel select, .tool-panel textarea { width: 100%; padding: .55rem; color: var(--ink); border: 1px solid var(--line); border-radius: .35rem; background: #111612; font: .72rem Inter, sans-serif; text-transform: none; }
.tool-panel .check-label { display: flex; align-items: center; gap: .5rem; }
.tool-panel .check-label input { width: auto; }
.editor-muted { margin: 0; color: var(--muted); font-size: .67rem; line-height: 1.5; }
.record-list { display: grid; gap: .4rem; }
.record-item { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .5rem; border: 1px solid var(--line); border-radius: .35rem; background: #141815; font-size: .68rem; }
.record-item button { color: #cb8275; border: 0; background: none; }
.editor-map { display: flex; min-width: 0; flex-direction: column; }
.editor-toolbar { display: flex; min-height: 62px; align-items: center; justify-content: space-between; padding: .7rem 1rem; border-bottom: 1px solid var(--line); }
.editor-toolbar h2 { margin: .1rem 0 0; font-family: Cinzel, serif; font-size: 1rem; }
.editor-viewport { min-height: 0; }
.editor-stage { width: 1572px; height: 1897px; }
#hex-overlay, .game-hex-overlay { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hex-cell { fill: rgba(197,161,90,.04); stroke: rgba(238,230,190,.65); stroke-width: 1.25; vector-effect: non-scaling-stroke; cursor: pointer; }
.hex-cell:hover { fill: rgba(197,161,90,.28); stroke: #fff2b7; }
.hex-cell.missing-terrain { fill: rgba(210,30,30,.78); stroke: rgba(255,150,150,.95); }
.hex-cell.missing-terrain:hover { fill: rgba(235,45,45,.88); }
.hex-cell.selected { fill: rgba(255,105,105,.24); stroke: rgba(255,175,175,.95); stroke-width: 4; filter: drop-shadow(0 0 3px rgba(255,80,80,.9)); }
.hex-cell.unplayable { fill: rgba(80,80,80,.45); }
.hex-label { fill: #fff9d7; stroke: #101410; stroke-width: 2px; paint-order: stroke; font: 700 12px ui-monospace, monospace; text-anchor: middle; pointer-events: none; }
.terrain-assigned-marker { fill: #168cff; stroke: #d8efff; stroke-width: 1.5; vector-effect: non-scaling-stroke; pointer-events: none; }
.terrain-farmland { fill: rgba(181,121,63,.28); }.terrain-countryside { fill: rgba(122,164,79,.18); }.terrain-forest { fill: rgba(26,83,45,.35); }
.terrain-hills { fill: rgba(133,79,69,.3); }.terrain-mountains { fill: rgba(118,126,135,.32); }.terrain-swamp { fill: rgba(55,115,105,.32); }.terrain-desert { fill: rgba(208,172,73,.32); }
.edge-road { stroke: #d35d3d; stroke-width: 5; }.edge-river { stroke: #2da4dd; stroke-width: 5; }.edge-bridge { stroke: #f0d283; stroke-width: 8; stroke-dasharray: 4 4; }
.edge-feature { pointer-events: none; vector-effect: non-scaling-stroke; }
.editor-toolbar .map-button[aria-pressed="true"] { color: #fff; border-color: #e45555; background: #7f2020; }
@media (max-width: 900px) { .editor-layout { grid-template-columns: 240px minmax(0,1fr); } }
