/* The editor's shared frame: the map browser's look (tools/map_browser/style.css). */
* { box-sizing: border-box; }
:root { color-scheme: dark; font-family: Segoe UI, Arial, sans-serif; background: #10151c; color: #d8e0e9; font-size: 13px; }
body { margin: 0; height: 100vh; display: flex; flex-direction: column; }
header { height: 56px; background: #17212c; border-bottom: 1px solid #354352; display: flex; align-items: center; gap: 28px; padding: 0 22px; flex: none; }
.brand { display: flex; align-items: center; gap: 12px; font-size: 17px; white-space: nowrap; }
.brand b { font-weight: 600; }
.brand small { display: block; color: #8c9fb1; font-size: 11px; margin-top: 2px; }
.mark { font-size: 28px; color: #7fddc6; }
nav { display: flex; gap: 6px; align-self: flex-end; }
nav button { white-space: nowrap; font: inherit; background: transparent; border: 1px solid transparent; border-bottom: 0; color: #a6b8ca; border-radius: 6px 6px 0 0; padding: 10px 18px; cursor: pointer; }
nav button:hover { background: #202b39; }
nav button[aria-selected=true] { background: #10151c; border-color: #354352; color: #e2eaf3; position: relative; top: 1px; }
nav button:focus-visible { outline: 2px solid #7cdbc5; outline-offset: 2px; }
main { flex: 1; min-height: 0; position: relative; }
iframe { border: 0; width: 100%; height: 100%; display: block; }
iframe[hidden], [hidden] { display: none !important; }
#missing { padding: 40px; color: #8c9fb1; }
.spacer { flex: 1; }
/* The top bar's actions: what Build makes, Revert (this tab), Save (every tab), Build. */
.actions { display: flex; align-items: center; gap: 8px; }
.actions button { font: inherit; background: #233244; color: #d8e0e9; border: 1px solid #3a4b5f; border-radius: 5px; padding: 7px 14px; cursor: pointer; }
.actions button:hover:not(:disabled) { background: #2b3d52; }
.actions button:disabled { opacity: .45; cursor: default; }
.actions button.primary { background: #1d5c50; border-color: #3f9883; color: #eafff9; }
.target { color: #8c9fb1; font-size: 12px; margin-right: 6px; white-space: nowrap; }
nav button.dirty::after { content: " ●"; color: #efc66e; }
/* The build drawer under the top bar. */
.buildpanel { flex: none; background: #121b25; border-bottom: 1px solid #354352; padding: 10px 22px; display: flex; flex-direction: column; gap: 8px; max-height: 45vh; }
.buildhead { display: flex; align-items: center; gap: 14px; }
.buildhead button { font: inherit; background: #233244; color: #d8e0e9; border: 1px solid #3a4b5f; border-radius: 5px; padding: 4px 12px; cursor: pointer; }
#buildSummary { color: #8c9fb1; }
#buildLog { margin: 0; flex: 1; min-height: 80px; overflow: auto; background: #0b1016; border: 1px solid #263342; border-radius: 4px; padding: 8px; font: 11px/1.45 Consolas, monospace; color: #b4c4d3; white-space: pre-wrap; }
.roms { display: flex; flex-direction: column; gap: 4px; }
.rom { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; font-size: 12px; }
.rom code { color: #d5b780; }
.good { color: #7fddc6; } .warn { color: #efc66e; } .bad { color: #ef8a8a; }
/* Home. */
.home { height: 100%; overflow: auto; }
.homecards { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 16px; padding: 20px 22px; max-width: 1200px; }
.hcard { background: #131c26; border: 1px solid #2a3746; border-radius: 8px; padding: 14px 16px; }
.hcard.wide { grid-column: 1 / -1; }
.hcard h2 { margin: 0 0 12px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #8297ac; }
.hcard h2 small { text-transform: none; letter-spacing: 0; color: #5f7388; margin-left: 8px; font-weight: normal; }
.fieldrow { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.fieldname { width: 80px; color: #a6b8ca; }
.checks { display: flex; gap: 16px; }
.checks label { display: flex; align-items: center; gap: 5px; }
.hcard select { font: inherit; background: #0f161e; color: #e5edf5; border: 1px solid #364456; border-radius: 5px; padding: 5px 8px; }
.note { color: #8297ac; font-size: 12px; line-height: 1.5; margin: 8px 0 0; }
.note code, .hcard code { color: #a6b8ca; }
.options { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px 24px; }
.optgroup h3 { margin: 0 0 6px; font-size: 13px; color: #d8e0e9; }
.option { display: flex; align-items: flex-start; gap: 8px; padding: 4px 0; line-height: 1.4; }
.option input[type=checkbox] { margin-top: 3px; }
.option input[type=number] { width: 56px; font: inherit; background: #0f161e; color: #e5edf5; border: 1px solid #364456; border-radius: 4px; padding: 2px 4px; }
.option.off { opacity: .45; }
.badge { font-size: 10px; color: #efc66e; border: 1px solid #6b5a2e; border-radius: 8px; padding: 0 6px; margin-left: 4px; white-space: nowrap; }
#notice { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: #1d3c3a; border: 1px solid #4b8a7a; padding: 9px 16px; border-radius: 6px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 10; }
#notice.show { opacity: 1; }
#notice.error { background: #3a1d22; border-color: #8a4b55; }
/* Narrow windows: the actions stay; the brand's subtitle and the target give way. */
header { gap: 18px; padding: 0 16px; }
nav button { padding: 10px 13px; }
.actions { flex: none; }
@media (max-width: 1150px) { .brand small, .target { display: none; } }
@media (max-width: 860px) { .brand > div { display: none; } nav button { padding: 10px 9px; } }

.development-card{border-color:#796841}.development-card h2{color:#efc66e}#developmentTools[aria-pressed="true"]{border-color:#b39552;background:#3b3321}

.option .badge{color:#a6b8ca;border-color:#38485b}
