/* META.UNIVERSE — Honey palette with φ accents */
* { box-sizing: border-box; }
html, body { height: 100%; }
:root {
  --bg: #0b0a09;
  --fg: #f2efe7;
  --muted: #b9b2a6;
  --honey: #f7c948;
  --amber: #f19f00;
  --gold: #e3b341;
  --leaf: #66c18c;
  --neon: #7dd3fc;
  --panel: rgba(20, 18, 14, 0.65);
  --btn: rgba(255,255,255,0.08);
  --btnh: rgba(255,255,255,0.16);
  --shadow: 0 8px 24px rgba(0,0,0,0.35);
}

body {
  margin: 0;
  background: radial-gradient(1000px 600px at 80% 20%, rgba(247,201,72,0.05), transparent 60%),
              radial-gradient(800px 500px at 20% 80%, rgba(125,211,252,0.05), transparent 60%),
              var(--bg);
  color: var(--fg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  overflow: hidden;
}

#world {
  position: fixed; inset: 0; z-index: 0;
  background: transparent;
}

.hud {
  position: fixed; top: 0; left: 0; right: 0; z-index: 2;
  display: flex; align-items: center; gap: 1rem;
  padding: .7rem 1rem;
  background: linear-gradient(to bottom, rgba(0,0,0,.35), transparent);
  user-select: none;
}
.brand { font-weight: 800; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.brand .sep { opacity: .6; margin: 0 .4rem; }
.brand .sub { opacity: .75; font-weight: 600; letter-spacing: .02em; }

.stats { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }

.dock {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 3;
  max-width: 1200px; margin-inline: auto;
  background: var(--panel); border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px; box-shadow: var(--shadow); backdrop-filter: blur(10px);
}
.dock .row.top {
  display: flex; align-items: center; gap: .8rem; padding: .7rem .8rem .4rem;
}
.dock .label { font-weight: 700; letter-spacing: .02em; opacity: .9; }
.actions { margin-left: auto; display: flex; gap: .5rem; flex-wrap: wrap; }
.btn, .file-btn {
  background: var(--btn); color: var(--fg); border: 0; padding: .45rem .75rem; border-radius: 10px;
  cursor: pointer; box-shadow: var(--shadow); font-weight: 600;
}
.btn:hover, .file-btn:hover { background: var(--btnh); }
.btn.primary { background: linear-gradient(90deg, var(--honey), var(--gold)); color: #1b1405; }
.file-btn { display: inline-flex; align-items: center; gap: .4rem; }
.file-btn input { display: none; }

#prompt {
  width: 100%; height: 8.8rem; resize: vertical; min-height: 6rem; max-height: 40vh;
  border: 0; border-top: 1px solid rgba(255,255,255,0.07);
  border-bottom-left-radius: 16px; border-bottom-right-radius: 16px;
  background: linear-gradient(0deg, rgba(255,255,255,0.03), rgba(255,255,255,0.0));
  color: var(--fg); padding: .8rem; font-size: .98rem; line-height: 1.5;
}

.help { padding: .2rem .9rem .7rem; color: var(--muted); }
.helpgrid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; }
.help code { background: rgba(255,255,255,0.06); padding: .15rem .3rem; border-radius: 6px; }

.narrative {
  position: fixed; left: 1rem; top: 3.8rem; z-index: 2; max-width: 680px;
  background: var(--panel); border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px; padding: .6rem .75rem; color: var(--fg);
  box-shadow: var(--shadow); line-height: 1.45; font-size: 1rem;
}

@media (max-width: 800px) {
  .helpgrid { grid-template-columns: 1fr; }
  .narrative { max-width: 86vw; }
}
