* { box-sizing: border-box; }
body { margin: 0; background: #14151a; color: #f1f5f9; font-family: 'Minecraft', ui-monospace, monospace, sans-serif; }
.loom-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; background: #1e2028; border-bottom: 3px solid #0d0e12; }
.loom-title h1 { margin: 0; font-size: 1.25rem; color: #f59e0b; text-shadow: 2px 2px 0 #000; }
.loom-title p { margin: 4px 0 0; font-size: 0.8rem; color: #94a3b8; }
.loom-banner { padding: 10px 20px; font-size: 0.85rem; background: #262934; border-bottom: 2px solid #0d0e12; }
.loom-banner.is-artist { border-left: 5px solid #22c55e; }
.loom-banner.is-citizen { border-left: 5px solid #38bdf8; }
.loom-banner.is-readonly { border-left: 5px solid #f59e0b; }
.loom-main { max-width: 1280px; margin: 20px auto; padding: 0 16px; }
.loom-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.mc-btn { background: #3b3f4e; color: #fff; border: 2px solid #0d0e12; padding: 8px 14px; font-family: inherit; font-size: 0.85rem; cursor: pointer; box-shadow: inset 2px 2px 0 rgba(255,255,255,0.22), inset -2px -2px 0 rgba(0,0,0,0.45); }
.mc-btn:hover { background: #4b5063; }
.mc-btn.is-copper { background: #b45309; }
.mc-btn.is-green { background: #15803d; }
.mc-btn.is-active { outline: 2px solid #facc15; background: #52586e; }
.sprite-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: 12px; }
.sprite-card { background: #1e2028; border: 2px solid #0d0e12; padding: 10px; text-align: center; display: flex; flex-direction: column; gap: 8px; justify-content: space-between; }
.sprite-preview { height: 84px; display: flex; align-items: center; justify-content: center; background: repeating-conic-gradient(#262934 0% 25%, #1b1d24 0% 50%) 50% / 16px 16px; }
.sprite-preview img { width: 64px; height: 64px; image-rendering: pixelated; object-fit: contain; }
.sprite-path { font-size: 0.7rem; color: #cbd5e1; word-break: break-all; }
.editor-modal { position: fixed; inset: 0; z-index: 9999; background: rgba(10, 11, 15, 0.92); display: none; align-items: center; justify-content: center; padding: 16px; }
.editor-modal.is-open { display: flex; }
.editor-box { background: #1e2028; border: 3px solid #0d0e12; width: min(960px, 100%); max-height: 94vh; overflow-y: auto; padding: 16px; }
.editor-workspace { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: start; margin-top: 14px; }
@media (max-width: 768px) { .editor-workspace { grid-template-columns: 1fr; } }
.canvas-stage { width: 320px; height: 320px; background: repeating-conic-gradient(#2c303d 0% 25%, #1d2029 0% 50%) 50% / 20px 20px; border: 3px solid #0d0e12; cursor: crosshair; touch-action: none; }
.canvas-stage canvas { width: 100%; height: 100%; image-rendering: pixelated; display: block; }
.editor-controls { display: flex; flex-direction: column; gap: 10px; }
.tools-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.field-group { display: flex; flex-direction: column; gap: 4px; font-size: 0.78rem; color: #cbd5e1; }
.field-group input, .field-group select, .field-group textarea { background: #121318; color: #fff; border: 2px solid #0d0e12; padding: 7px 10px; font-family: inherit; }
.status-msg { font-size: 0.82rem; padding: 8px; background: #121318; border-left: 3px solid #38bdf8; display: none; }
