:root { color-scheme: light; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif; color: #25343c; background: #f5f6f5; font-size: 14px; --border: #dde3df; --muted: #6c797f; --accent: #2c665d; }
* { box-sizing: border-box; }
body { margin: 0; }
button, select, input { font: inherit; color: inherit; }
button, select { border: 1px solid var(--border); border-radius: 6px; background: #fff; padding: 7px 10px; }
button { cursor: pointer; white-space: nowrap; }
button:hover { background: #edf2ef; border-color: #a7b9ad; }
button:disabled { opacity: .4; cursor: default; }
button:focus-visible, select:focus-visible, input:focus-visible, summary:focus-visible, canvas:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
input[type="checkbox"] { accent-color: var(--accent); width: 15px; height: 15px; }
input[type="range"] { width: 100%; margin: 10px 0 16px; accent-color: var(--accent); }
input[type="number"] { width: 60px; padding: 6px; border: 1px solid var(--border); border-radius: 5px; background: white; }
button.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
button.primary:hover { background: #21534b; }
a { color: var(--accent); text-underline-offset: 3px; }
p { line-height: 1.65; }
[hidden] { display: none !important; }
.header { padding: 24px 28px 20px; display: flex; gap: 20px; justify-content: space-between; align-items: center; background: #fff; border-bottom: 1px solid var(--border); }
h1 { font-size: 20px; font-weight: 650; margin: 0 0 6px; }
h1 span { margin-left: 8px; border: 1px solid var(--border); border-radius: 4px; padding: 2px 5px; vertical-align: middle; font-size: 11px; font-weight: 400; color: var(--muted); }
.header p { margin: 0; color: var(--muted); font-size: 12px; }
.header-actions { display: flex; align-items: center; gap: 18px; }
.local-note { font-size: 11px; white-space: nowrap; color: var(--muted); }
.local-note i { display: inline-block; width: 6px; height: 6px; background: #69a689; border-radius: 50%; margin-right: 6px; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 330px; align-items: start; gap: 22px; padding: 24px 28px; max-width: 1800px; margin: auto; }
.preview { min-width: 0; position: sticky; top: 20px; scroll-margin-top: 20px; }
.viewbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.segmented { display: inline-flex; gap: 3px; background: #e8ede9; padding: 3px; border-radius: 7px; }
.segmented button { border: 1px solid transparent; background: transparent; padding: 6px 11px; font-size: 13px; }
.segmented button[aria-pressed="true"] { background: #fff; color: var(--accent); border-color: #d9e3db; box-shadow: 0 1px 2px #152e2710; }
.compact { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.compact select { font-size: 12px; max-width: 170px; }
.canvas-scroll { overflow: auto; border: 1px solid #cbdbe1; background: #d8eafa; border-radius: 8px; height: min(65vh, max(260px, calc(100dvh - 330px))); display: grid; justify-items: center; align-items: center; min-height: 200px; }
#scene { display: block; image-rendering: pixelated; flex-shrink: 0; }
#scene.fit { width: 100%; height: auto; }
#scene.editable { cursor: crosshair; touch-action: none; }
.canvas-footer { display: flex; justify-content: space-between; gap: 16px; margin: 10px 2px 16px; font-size: 11px; color: var(--muted); line-height: 1.65; }
#canvas-size { white-space: nowrap; }
.projection-controls, .editor-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.note { color: var(--muted); font-size: 12px; margin: 14px 1px; }
#status { background: #ebf1ec; color: #4b6859; padding: 11px 13px; font-size: 12px; line-height: 1.6; border-radius: 6px; }
#status.error { background: #fbeee9; color: #9c4938; }
.settings { display: grid; gap: 14px; }
.panel { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 17px; min-width: 0; }
.panel-intro { font-size: 12px; color: var(--muted); margin: -7px 0 20px; }
.optional-panel { padding: 0; color: inherit; font-size: 12px; }
.optional-panel > summary { padding: 17px; font-size: 14px; font-weight: 550; }
.optional-panel > summary span { float: right; font-size: 12px; font-weight: 400; color: var(--muted); }
.optional-panel[open] > summary { border-bottom: 1px solid var(--border); }
.optional-content { padding: 17px; }
.settings-section + .settings-section { border-top: 1px solid var(--border); margin-top: 20px; padding-top: 20px; }
.settings-section h2 { margin-bottom: 14px; }
.view-zoom { margin: 18px 0 0; }
h2 { font-size: 14px; margin: 0 0 17px; font-weight: 650; }
h2 span { font-size: 11px; font-weight: 400; color: var(--muted); margin-left: 5px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.inline { display: flex; align-items: center; gap: 5px; }
.inline button { font-size: 12px; }
.small { font-size: 11px; color: var(--muted); line-height: 1.65; margin: 8px 0; }
.checks { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 14px; font-size: 12px; }
.checks label { display: flex; align-items: center; gap: 3px; }
.field { display: grid; gap: 7px; font-size: 12px; margin-bottom: 14px; }
.field select { width: 100%; min-width: 0; font-size: 12px; }
.terrain-source { display: flex; align-items: center; gap: 14px; }
.terrain-source canvas { width: 78px; height: auto; image-rendering: pixelated; border: 1px solid var(--border); background: repeating-conic-gradient(#e6eae8 0% 25%, #fff 0% 50%) 50% / 12px 12px; }
.terrain-source > div { flex: 1; min-width: 0; }
.terrain-source strong { font-size: 12px; display: block; overflow-wrap: anywhere; }
.base-source { margin-top: 12px; }
.base-source canvas { width: 90px; max-height: 150px; object-fit: contain; }
.scheme-note { margin: -4px 0 14px; padding: 8px 10px; border-left: 2px solid #8fac9f; background: #f0f5f1; font-size: 12px; line-height: 1.65; color: #466255; }
.upload { font-size: 12px; }
.text-button { border: 0; padding: 7px 0; font-size: 11px; color: var(--muted); background: transparent; }
.wide { width: 100%; font-size: 12px; margin: 6px 0; }
details { font-size: 11px; color: var(--muted); }
summary { cursor: pointer; padding: 8px 0; }
details p { margin: 7px 0; }
.sprite { border-bottom: 1px solid #eef0ee; margin-bottom: 18px; padding-bottom: 18px; }
.sprite:last-child { border-bottom: 0; margin-bottom: 0; }
.sprite:last-child { padding-bottom: 0; }
.sprite-name { font-size: 14px; font-weight: 550; }
.sprite-note { display: block; font-size: 11px; color: var(--muted); margin-top: 6px; }
.sprite-meta { font-size: 11px; color: var(--muted); overflow-wrap: anywhere; display: block; margin: 0 0 12px; }
.sprite .row { align-items: center; }
.sprite .upload { padding: 9px 12px; }
.sprite details .row { align-items: center; margin: 7px 0; }
.sprite details input { width: 70px; }
.sprite details .text-button { padding: 4px 0; }
.sprite fieldset { margin: 14px 0 0; padding: 0; border: 0; min-width: 0; }
.sprite fieldset:disabled { opacity: .5; }
.scale-controls { display: flex; gap: 10px; align-items: center; font-size: 12px; }
.scale-controls > label { white-space: nowrap; }
.scale-controls input[type="range"] { flex: 1; min-width: 35px; margin: 0; }
.percent { display: flex; gap: 3px; align-items: center; }
.percent input[type="number"] { width: 60px; font-size: 12px; padding: 5px; }
.scale-info { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.scale-info .small { font-size: 11px; }
.scale-info .text-button { font-size: 11px; }
.auto-fit { display: flex; align-items: center; gap: 5px; font-size: 11px; margin: 4px 0 8px; }
.auto-fit span { color: var(--muted); margin-left: auto; font-size: 10px; }
.alignment-preview { display: block; width: 100%; height: auto; border: 1px solid var(--border); border-radius: 4px; background: repeating-conic-gradient(#e6eae8 0% 25%, #fff 0% 50%) 50% / 12px 12px; touch-action: none; cursor: crosshair; }
.alignment-preview[aria-disabled="true"] { cursor: default; }
.alignment-note { color: #985325; }
.range-label { display: flex; justify-content: space-between; font-size: 12px; }
.range-label output { color: var(--accent); font-variant-numeric: tabular-nums; }
.page-footer { max-width: 1800px; margin: 0 auto; padding: 0 28px 24px; font-size: 11px; color: var(--muted); }
@media (min-width: 1500px) { .workspace { grid-template-columns: minmax(0, 1fr) 344px; gap: 28px; } }
@media (max-width: 1100px) { .header-actions .local-note { display: none; } .workspace { padding: 18px; gap: 16px; grid-template-columns: minmax(0, 1fr) 288px; } .header { padding: 20px 18px; } .segmented button { padding: 6px 8px; } }
@media (max-width: 800px) { .workspace { grid-template-columns: 1fr; } .preview { position: static; } .settings { grid-template-columns: 1fr; } .canvas-scroll { height: min(55vh, 360px); } .header { align-items: start; } .header h1 { font-size: 18px; } .header-actions button { font-size: 12px; } .header p { max-width: 460px; } }
@media (max-width: 480px) { .workspace { padding: 14px 12px; } .header { padding: 17px 12px; flex-wrap: wrap; gap: 12px; } .header-actions { width: 100%; justify-content: space-between; } .header-actions .local-note { display: inline; } .settings { grid-template-columns: 1fr; } .canvas-footer { flex-wrap: wrap; gap: 3px; } .page-footer { padding: 0 12px 20px; } }
