/* Gemensamt utseende för landskapet och verkstaden. */
:root {
  --panel: rgba(18, 22, 28, 0.78);
  --line: rgba(255, 255, 255, 0.09);
  --text: #e6e8eb;
  --dim: #9aa3ad;
  --accent: #e8a84c;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #000; color: var(--text);
  font: 13px/1.35 system-ui, -apple-system, "Segoe UI", sans-serif; }
#c { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; cursor: grab; touch-action: none; }
#c:active { cursor: grabbing; }

#panel { position: fixed; top: 12px; right: 12px; bottom: 12px; width: 290px; display: flex; flex-direction: column;
  background: var(--panel); backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden; transition: transform 0.25s ease, opacity 0.25s; }
body.hidepanel #panel { transform: translateX(320px); opacity: 0; pointer-events: none; }
#params { flex: 1; overflow-y: auto; padding: 4px 14px 10px; }
#params::-webkit-scrollbar { width: 8px; }
#params::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 4px; }
h1 { margin: 0; padding: 14px 14px 6px; font-size: 15px; font-weight: 600; letter-spacing: 0.02em; }
h2 { margin: 14px 0 6px; font-size: 11px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: 0.08em; }

.row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 8px; margin: 7px 0; }
.row .name { color: var(--dim); }
.row .val { font-variant-numeric: tabular-nums; }
.row.range input { grid-column: 1 / -1; width: 100%; margin: 0; accent-color: var(--accent); }
.row.seed { grid-template-columns: 1fr 80px auto; }
input[type=number], select, button { font: inherit; color: var(--text); background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; }
select option { background: #222; }
button { cursor: pointer; }
button:hover { background: rgba(255, 255, 255, 0.13); }
input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; }
.swatch { width: 44px; height: 22px; padding: 0; border-radius: 5px; border: 1px solid rgba(255, 255, 255, 0.35); }
.picker { margin: 2px 0 10px; display: grid; gap: 8px; }
.picker[hidden] { display: none; }
.picker canvas { width: 100%; display: block; border-radius: 5px; cursor: crosshair; touch-action: none; }
.picker .sv { height: 110px; }
.picker .hue { height: 12px; }
.picker .presets { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; }
.picker .presets button { height: 18px; padding: 0; border-radius: 4px; border: 1px solid rgba(255, 255, 255, 0.25); }

#render { border-top: 1px solid var(--line); padding: 12px 14px 14px; }
#render .btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
#renderBtn { background: var(--accent); color: #1a1206; border: none; font-weight: 600; }
#renderBtn.active { background: rgba(232, 168, 76, 0.25); color: var(--text); }
#renderBtn:disabled { opacity: 0.5; cursor: wait; }
#renderBar { height: 3px; width: 0; background: var(--accent); border-radius: 2px; transition: width 0.2s; }
.track { height: 3px; background: rgba(255, 255, 255, 0.08); border-radius: 2px; margin-top: 8px; }
#renderInfo { color: var(--dim); font-variant-numeric: tabular-nums; }

#help { position: fixed; left: 12px; bottom: 12px; padding: 7px 11px; color: var(--dim); background: var(--panel);
  backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: 8px; font-size: 12px; }
#help b { color: var(--text); font-weight: 500; }

#progress { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 300px; padding: 16px 18px;
  background: var(--panel); backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: 10px; text-align: center; }
#progress .track { margin-top: 10px; }
#progressBar { height: 3px; width: 0; background: var(--accent); border-radius: 2px; }

#error { position: fixed; left: 12px; top: 12px; max-width: min(640px, calc(100vw - 340px)); padding: 12px 14px; white-space: pre-wrap;
  font: 12px/1.4 ui-monospace, Consolas, monospace; background: #3a1414; border: 1px solid #a33; border-radius: 8px; }

@media (max-width: 700px) {
  #panel { top: auto; left: 8px; right: 8px; width: auto; height: 45vh; }
  body.hidepanel #panel { transform: translateY(50vh); }
  #help { display: none; }
}
a.button { display: block; margin-top: 10px; padding: 6px 8px; text-align: center; color: var(--text); text-decoration: none;
  background: rgba(255, 255, 255, 0.07); border: 1px solid var(--line); border-radius: 6px; }
a.button:hover { background: rgba(255, 255, 255, 0.13); }
#gpuInfo { margin-top: 4px; color: var(--dim); font-size: 11px; font-variant-numeric: tabular-nums; }
#gpuInfo.warn { color: #f0b27a; }
