:root {
  --navy: #0F2135;
  --navy-2: #17304A;
  --navy-3: #21415F;
  --orange: #F26B1D;
  --orange-2: #FF8A3D;
  --text: #F4F1EA;
  --muted: #9FB2C4;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--navy);
  color: var(--text);
  font-family: Poppins, system-ui, sans-serif;
}

.studio {
  display: flex;
  gap: 28px;
  justify-content: center;
  align-items: flex-start;
  padding: 16px;
  min-height: 100vh;
}

.stage {
  flex: none;
  height: calc(100vh - 32px);
  aspect-ratio: 9 / 16;
  border-radius: 18px;
  overflow: hidden;
  background: #155F82;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.stage canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
  touch-action: manipulation;
}

.panel {
  width: 340px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 4px 4px 16px;
}

.panel header h1 {
  margin: 4px 0 4px;
  font-size: 28px;
  font-weight: 800;
  color: var(--orange-2);
}

.panel header p,
.panel footer {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.panel footer { margin-top: 8px; font-size: 13px; }
.panel code { color: var(--text); }

section {
  background: var(--navy-2);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 14px;
}

h2 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

button {
  font: 600 15px Poppins, system-ui, sans-serif;
  color: var(--text);
  background: var(--navy-3);
  border: 0;
  border-radius: 999px;
  padding: 11px 12px;
  cursor: pointer;
  transition: background 0.15s, transform 0.08s;
}

button:hover { background: #2B5478; }
button:active { transform: scale(0.96); }

button.big {
  width: 100%;
  font-size: 20px;
  font-weight: 800;
  padding: 16px;
  background: var(--orange);
  color: #fff;
}

button.big:hover { background: var(--orange-2); }
button.big:disabled { background: var(--navy-3); color: var(--muted); cursor: default; transform: none; }

select {
  width: 100%;
  font: 600 15px Poppins, system-ui, sans-serif;
  color: var(--text);
  background: var(--navy-3);
  border: 0;
  border-radius: 12px;
  padding: 11px 12px;
}

button.ghost {
  width: 100%;
  background: transparent;
  color: var(--muted);
  font-weight: 400;
  font-size: 13px;
  padding: 6px;
}

.meter {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 2px 4px;
  font-size: 13px;
  color: var(--muted);
}

.bar {
  flex: 1;
  height: 10px;
  border-radius: 999px;
  background: var(--navy);
  overflow: hidden;
}

#meter-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #F2CF5B, var(--orange));
}

@media (max-width: 760px) {
  .studio { flex-direction: column; align-items: center; }
  .stage { height: auto; width: 100%; max-width: 480px; }
  .panel { width: 100%; max-width: 480px; max-height: none; }
}

/* Skärmläge: bara akvariet, för skyltfönstret */
body.screen { background: #000; overflow: hidden; }
body.screen .panel { display: none; }
body.screen .studio { padding: 0; align-items: center; height: 100vh; min-height: 0; }
body.screen .stage { height: 100vh; max-width: 100vw; border-radius: 0; box-shadow: none; }
