@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Rajdhani:wght@500;600;700&display=swap");

:root {
  --bg: #0b0d10;
  --surface: #151920;
  --surface-2: #1d222a;
  --border: #2b313a;
  --gold: #d8b45a;
  --text: #f3f4f6;
  --muted: #8b929e;
  --red: #ef5b5b;
  --blue: #668cff;
  --radius: 8px;
  --font: Inter, system-ui, sans-serif;
  --display: Rajdhani, Inter, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
button, input, select { font: inherit; color: inherit; }
button {
  appearance: none;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px 10px;
  cursor: pointer;
  font-weight: 600;
}
button:hover { border-color: #3a424c; }
button.on, button.primary {
  background: var(--gold);
  border-color: var(--gold);
  color: #14160f;
}
button:disabled {
  opacity: 0.38;
  cursor: default;
}
.muted { color: var(--muted); font-size: 12px; }
label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 8px 0 4px;
}
input, select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px 8px;
}
input:focus, select:focus { outline: none; border-color: var(--gold); }

.ed-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 48px;
  padding: 0 14px;
  background: #10141a;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.ed-nav .logo {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--gold);
  text-decoration: none;
}
.ed-nav .logo span { color: var(--text); }
.ed-nav h1 {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.ed-nav .spacer { flex: 1; }
.ed-body {
  flex: 1;
  display: grid;
  grid-template-columns: 72px 1fr 280px;
  min-height: 0;
}
.ed-tools {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: auto;
}
.ed-tools button {
  width: 100%;
  padding: 8px 4px;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ed-stage {
  position: relative;
  min-width: 0;
  background: #07090c;
}
.ed-stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  outline: none;
}
.ed-hint {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  background: rgba(15, 18, 24, 0.88);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  max-width: min(520px, calc(100% - 24px));
  pointer-events: none;
}
.ed-props {
  background: var(--surface);
  border-left: 1px solid var(--border);
  overflow: auto;
  padding: 12px;
}
.ed-props h2 {
  margin: 0 0 8px;
  font-family: var(--display);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 16px;
  color: var(--gold);
}
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.prop-group-title {
  margin: 14px 0 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}
#sel-fields label { margin-top: 8px; }
#sel-fields input, #sel-fields select { font-size: 12px; }
#sel-kind { font-weight: 600; color: var(--text); }
.prop-hint { font-size: 11px; color: var(--muted); margin: 0 0 8px; }
.notice {
  background: #1a1810;
  border: 1px solid #3d3420;
  border-radius: 8px;
  padding: 10px;
  font-size: 12px;
  color: #e6d3a0;
  margin: 10px 0;
}
.file {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.img-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 140px;
  overflow: auto;
  margin-top: 6px;
}
.img-list button {
  text-align: left;
  font-size: 11px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}
.img-list button .tag {
  float: right;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}
.img-list button.on { border-color: var(--gold); }
.ed-play {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: #132016;
  border: 1px solid #2a4a30;
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 12px;
}
.ed-play b { color: #7dbe6a; }
@media (max-width: 900px) {
  .ed-body { grid-template-columns: 56px 1fr; }
  .ed-props {
    position: absolute;
    right: 0;
    top: 48px;
    bottom: 0;
    width: min(280px, 80vw);
    z-index: 4;
  }
}
