#floor1-developer-editor {
  position: fixed; inset: 8px 8px 8px auto; z-index: 2147483000;
  width: 288px; box-sizing: border-box; overflow: hidden;
  border: 2px solid #4ade80; border-radius: 7px;
  background: rgba(8, 18, 13, .96); color: #ecfdf5;
  font: 12px/1.25 system-ui, sans-serif; box-shadow: 0 8px 28px rgba(0,0,0,.55); user-select: none;
}
#floor1-developer-editor[hidden] { display: none; }
#floor1-developer-editor.collapsed { width: 47px; height: 45px; left: auto; bottom: auto; }
#floor1-developer-editor.collapsed .f1e-title > div,
#floor1-developer-editor.collapsed .f1e-body { display: none; }
#floor1-developer-editor .f1e-title { height: 43px; box-sizing: border-box; padding: 7px 8px; display: flex; align-items: center; justify-content: space-between; color: #86efac; border-bottom: 1px solid #294735; }
#floor1-developer-editor .f1e-title > div { display: grid; min-width: 0; }
#floor1-developer-editor .f1e-title strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#floor1-developer-editor .f1e-tabs { display: flex; margin-left: auto; margin-right: 6px; border: 1px solid #3f6851; border-radius: 5px; overflow: hidden; background: #0f1d16; }
#floor1-developer-editor .f1e-tabs button { min-height: 24px; border: 0; border-radius: 0; padding: 2px 9px; background: transparent; color: #a7c8b4; font-weight: 600; }
#floor1-developer-editor .f1e-tabs button.active { background: #225c37; color: #ecfdf5; }
#floor1-developer-editor .f1e-tabs button[data-view="admin"].active { background: #7c4a0b; color: #fef3c7; }
#floor1-developer-editor.admin-view { border-color: #f59e0b; }
#floor1-developer-editor.admin-view .f1e-title { color: #fcd34d; border-bottom-color: #5a3d12; }
#floor1-developer-editor.collapsed .f1e-tabs { display: none; }
#floor1-developer-editor .f1e-title small { color: #a7c8b4; font-size: 10px; font-weight: 400; }
#floor1-developer-editor .f1e-body { height: calc(100% - 43px); overflow: auto; padding: 7px; box-sizing: border-box; scrollbar-width: thin; }
#floor1-developer-editor section { padding: 5px 0 7px; border-bottom: 1px solid #294735; }
#floor1-developer-editor h3 { margin: 0 0 5px; color: #bbf7d0; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
#floor1-developer-editor button { min-height: 27px; border: 1px solid #3f6851; border-radius: 4px; padding: 3px 6px; background: #17251d; color: #ecfdf5; cursor: pointer; }
#floor1-developer-editor button:hover,
#floor1-developer-editor button.active { border-color: #4ade80; background: #225c37; }
#floor1-developer-editor .f1e-tools { display: grid; grid-template-columns: repeat(4,1fr); gap: 4px; }
#floor1-developer-editor .f1e-actions { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
#floor1-developer-editor .f1e-play { margin-left: auto; background: #166534; font-weight: 700; }
#floor1-developer-editor .f1e-brush { display: flex; align-items: center; gap: 6px; margin: 7px 0; }
#floor1-developer-editor .f1e-brush input { min-width: 0; flex: 1; accent-color: #4ade80; }
#floor1-developer-editor .f1e-palette-filter { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 5px; }
#floor1-developer-editor .f1e-palette-filter input,
#floor1-developer-editor .f1e-palette-filter select { min-width: 0; height: 27px; border: 1px solid #3f6851; border-radius: 4px; padding: 2px 5px; background: #0f1d16; color: #ecfdf5; font: inherit; }
#floor1-developer-editor .f1e-spawn-form { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin: 6px 0; }
#floor1-developer-editor .f1e-spawn-form label { display: grid; gap: 2px; color: #a7c8b4; }
#floor1-developer-editor .f1e-spawn-form input,
#floor1-developer-editor .f1e-spawn-form select { min-width: 0; height: 27px; box-sizing: border-box; border: 1px solid #3f6851; border-radius: 4px; padding: 2px 5px; background: #0f1d16; color: #ecfdf5; font: inherit; }
#floor1-developer-editor .f1e-spawn-form.disabled { opacity: .45; }
#floor1-developer-editor .f1e-palette { display: grid; grid-template-columns: repeat(4,1fr); gap: 4px; max-height: 168px; overflow-y: auto; }
#floor1-developer-editor .f1e-palette-empty { grid-column: 1/-1; padding: 10px; color: #a7c8b4; text-align: center; }
#floor1-developer-editor .f1e-swatch { min-width: 0; padding: 3px 2px; display: grid; justify-items: center; gap: 1px; }
#floor1-developer-editor .f1e-swatch canvas { width: 32px; height: 32px; image-rendering: pixelated; background: #0b1510; }
#floor1-developer-editor .f1e-swatch span { width: 100%; overflow: hidden; text-overflow: ellipsis; font-size: 9px; }
#floor1-developer-editor .f1e-minimap { display: block; width: 250px; height: 240px; max-width: 100%; margin: 0 auto 6px; border: 1px solid #3f6851; background: #07110c; image-rendering: pixelated; cursor: crosshair; }
#floor1-developer-editor .f1e-layers { display: grid; grid-template-columns: repeat(3,1fr); gap: 3px; }
#floor1-developer-editor .f1e-layers label { white-space: nowrap; }
#floor1-developer-editor .f1e-help { color: #a7c8b4; margin: 6px 0; }
#floor1-developer-editor footer { display: flex; justify-content: space-between; gap: 6px; padding-top: 6px; }
#floor1-developer-editor footer span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#floor1-developer-editor [data-kind="error"] { color: #fca5a5; }
#floor1-developer-editor [data-kind="ok"] { color: #86efac; }
body.floor1-editor-active::after { content: "EDITOR MODE"; position: fixed; right: 308px; top: 12px; z-index: 2147482999; padding: 7px 10px; border: 1px solid #4ade80; border-radius: 4px; background: rgba(5,46,22,.9); color: #bbf7d0; font: 700 12px system-ui,sans-serif; pointer-events: none; }
body.floor1-editor-active canvas { cursor: crosshair; }
@media (max-width: 700px) { #floor1-developer-editor { width: 240px; } #floor1-developer-editor .f1e-palette { grid-template-columns: repeat(3,1fr); } body.floor1-editor-active::after { right: 260px; } }

/* ---- Admin tab ---- */
#floor1-developer-editor .f1e-admin-view[hidden] { display: none; }
#floor1-developer-editor .f1e-admin-view section { border-bottom-color: #3d3520; }
#floor1-developer-editor .f1e-admin-view h3 { display: flex; align-items: center; gap: 6px; color: #fde68a; }
#floor1-developer-editor .f1e-adm-count { font-weight: 400; text-transform: none; letter-spacing: 0; color: #a7c8b4; }
#floor1-developer-editor .f1e-adm-mini { margin-left: auto; min-height: 20px; padding: 0 6px; font-size: 12px; line-height: 1; }
#floor1-developer-editor .f1e-adm-input { min-width: 0; flex: 1; width: 100%; height: 28px; box-sizing: border-box; border: 1px solid #4b5c3a; border-radius: 5px; padding: 2px 7px; background: #0f1d16; color: #ecfdf5; font: inherit; }
#floor1-developer-editor .f1e-adm-input:focus { outline: none; border-color: #f59e0b; }
#floor1-developer-editor .f1e-adm-select { flex: 0 0 96px; }
#floor1-developer-editor .f1e-adm-amount { flex: 0 0 60px; }
#floor1-developer-editor .f1e-adm-row { display: flex; align-items: center; gap: 5px; margin-top: 6px; }
#floor1-developer-editor .f1e-adm-row button { flex: 0 0 auto; white-space: nowrap; }
#floor1-developer-editor .f1e-admin-view button:disabled { opacity: .5; cursor: default; }
#floor1-developer-editor .f1e-adm-primary { background: #92400e; border-color: #f59e0b; font-weight: 700; }
#floor1-developer-editor .f1e-adm-primary:hover { background: #b45309; }
#floor1-developer-editor .f1e-adm-empty { grid-column: 1 / -1; padding: 8px; color: #a7c8b4; text-align: center; font-size: 11px; }
/* target card */
#floor1-developer-editor .f1e-adm-target-wrap { padding-top: 7px; }
#floor1-developer-editor .f1e-adm-target { display: flex; align-items: center; gap: 10px; min-height: 84px; box-sizing: border-box; padding: 6px 10px; border: 1px solid #f59e0b; border-radius: 8px; background: linear-gradient(135deg, rgba(120,53,15,.45), rgba(15,29,22,.9)); }
#floor1-developer-editor .f1e-adm-target-empty { width: 100%; text-align: center; color: #fcd34d; }
#floor1-developer-editor .f1e-adm-target-info { display: grid; gap: 3px; min-width: 0; }
#floor1-developer-editor .f1e-adm-target-info strong { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 2px rgba(0,0,0,.7); }
#floor1-developer-editor .f1e-adm-target-info span { color: #d6d3d1; font-size: 11px; }
/* avatars */
#floor1-developer-editor .f1e-adm-avatar { position: relative; flex: 0 0 auto; overflow: visible; image-rendering: pixelated; }
#floor1-developer-editor .f1e-adm-avatar-fallback { display: flex; align-items: center; justify-content: center; border-radius: 50%; background: #1f2937; color: #fde68a; font-weight: 700; font-size: 20px; }
/* player cards */
#floor1-developer-editor .f1e-adm-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; max-height: 214px; overflow-y: auto; margin-top: 6px; padding: 2px; }
#floor1-developer-editor .f1e-adm-card { min-width: 0; display: grid; justify-items: center; gap: 2px; padding: 6px 3px 5px; border-radius: 7px; background: #111f18; }
#floor1-developer-editor .f1e-adm-card:hover { background: #1c3326; }
#floor1-developer-editor .f1e-adm-card.active { border-color: #f59e0b; background: #3b2a12; box-shadow: 0 0 0 1px #f59e0b inset; }
#floor1-developer-editor .f1e-adm-card .f1e-adm-avatar { margin: 2px 0 4px; }
#floor1-developer-editor .f1e-adm-card-name { width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; font-size: 11px; text-shadow: 0 1px 2px rgba(0,0,0,.8); }
#floor1-developer-editor .f1e-adm-card-meta { width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #86efac; font-size: 9px; }
#floor1-developer-editor .f1e-adm-card-meta:empty { display: none; }
/* coins */
#floor1-developer-editor .f1e-adm-chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
#floor1-developer-editor .f1e-adm-chip { background: #1a2a20; color: #fde68a; font-weight: 700; }
/* items */
#floor1-developer-editor .f1e-adm-items { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; max-height: 176px; overflow-y: auto; margin-top: 6px; padding: 2px; }
#floor1-developer-editor .f1e-adm-item { min-width: 0; min-height: 0; display: grid; justify-items: center; gap: 2px; padding: 4px 2px 3px; border-radius: 6px; background: #111f18; }
#floor1-developer-editor .f1e-adm-item:hover { background: #1c3326; }
#floor1-developer-editor .f1e-adm-item.active { border-color: #f59e0b; background: #3b2a12; box-shadow: 0 0 0 1px #f59e0b inset; }
#floor1-developer-editor .f1e-adm-item > :first-child { width: 36px; height: 36px; flex: 0 0 auto; image-rendering: pixelated; }
#floor1-developer-editor .f1e-adm-item span { width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 8px; color: #d1fae5; }
#floor1-developer-editor .f1e-adm-item-noicon { display: flex; align-items: center; justify-content: center; border-radius: 6px; background: #1f2937; color: #fde68a; font-weight: 700; text-transform: uppercase; }
#floor1-developer-editor .f1e-adm-item-selected { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; height: 40px; box-sizing: border-box; padding: 0 6px; border: 1px dashed #4b5c3a; border-radius: 6px; color: #a7c8b4; font-size: 11px; }
#floor1-developer-editor .f1e-adm-item-selected > :first-child:not(span) { width: 30px; height: 30px; flex: 0 0 auto; image-rendering: pixelated; }
#floor1-developer-editor .f1e-adm-item-selected span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #fde68a; font-weight: 700; }
/* colors */
#floor1-developer-editor .f1e-adm-swatches { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; }
#floor1-developer-editor .f1e-adm-swatch { min-height: 0; height: 24px; padding: 0; border: 2px solid rgba(0,0,0,.45); border-radius: 6px; }
#floor1-developer-editor .f1e-adm-swatch.active { border-color: #fff; box-shadow: 0 0 0 2px #f59e0b; }
#floor1-developer-editor .f1e-adm-row input[type="color"] { flex: 0 0 36px; width: 36px; height: 28px; padding: 1px 2px; border: 1px solid #4b5c3a; border-radius: 5px; background: #0f1d16; cursor: pointer; }
#floor1-developer-editor .f1e-adm-preview { flex: 1; min-width: 0; height: 28px; box-sizing: border-box; display: flex; align-items: center; padding: 0 8px; border: 1px solid #4b5c3a; border-radius: 5px; background: #06100a; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 2px rgba(0,0,0,.8); }
/* log + status */
#floor1-developer-editor .f1e-adm-log { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
#floor1-developer-editor .f1e-adm-log li { display: flex; gap: 6px; font-size: 11px; color: #d1fae5; overflow-wrap: anywhere; }
#floor1-developer-editor .f1e-adm-log li[data-kind="error"] { color: #fca5a5; }
#floor1-developer-editor .f1e-adm-log time { flex: 0 0 auto; color: #78716c; font-variant-numeric: tabular-nums; }
#floor1-developer-editor .f1e-adm-status { min-height: 16px; padding: 6px 0 2px; color: #a7c8b4; overflow-wrap: anywhere; }
#floor1-developer-editor .f1e-adm-status[data-kind="ok"] { color: #86efac; }
#floor1-developer-editor .f1e-adm-status[data-kind="error"] { color: #fca5a5; }
@media (max-width: 700px) { #floor1-developer-editor .f1e-adm-cards { grid-template-columns: repeat(2, 1fr); } #floor1-developer-editor .f1e-adm-items { grid-template-columns: repeat(4, 1fr); } }
