:root {
  color-scheme: dark;
  --ink: #dcebf5;
  --muted: #8daaba;
  --line: rgba(145, 190, 211, 0.23);
  --ocean: #03101a;
  --cyan: #8ad3e9;
}

* { box-sizing: border-box; }

html, body { margin: 0; width: 100%; min-height: 100%; background: var(--ocean); }

body { color: var(--ink); font-family: ui-sans-serif, sans-serif; }

.panel {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 3;
  width: 340px;
  overflow-y: auto;
  padding: 26px 28px 40px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(3, 17, 28, 0.98), rgba(2, 9, 15, 0.96));
  backdrop-filter: blur(18px);
}

.back, .eyebrow, .section-title, button, .source-map a {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.back { color: var(--muted); font-size: 11px; text-decoration: none; }

.eyebrow { margin-top: 52px; color: var(--cyan); font-size: 10px; letter-spacing: .19em; text-transform: uppercase; }

h1 { margin: 12px 0 20px; font-family: Georgia, serif; font-size: 43px; font-weight: 400; line-height: .94; letter-spacing: -.03em; }

.intro, .hint { color: var(--muted); font-size: 12px; line-height: 1.65; }

code { color: #b8d5e2; }

section { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--line); }

.section-title { display: flex; justify-content: space-between; margin-bottom: 12px; color: var(--muted); font-size: 9px; letter-spacing: .15em; text-transform: uppercase; }

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

button {
  min-height: 38px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  color: #a9c0cd;
  background: rgba(13, 44, 61, .26);
  font-size: 10px;
  letter-spacing: .04em;
  cursor: pointer;
}

button:hover, button.active { border-color: rgba(138, 211, 233, .72); color: #e8f8ff; background: rgba(29, 91, 116, .34); }

.actions { display: grid; gap: 7px; }

.hint { margin: 12px 0 0; font-size: 10px; }

.source-map { display: grid; }

.source-map .section-title { grid-column: 1 / -1; }

.source-map a { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(145, 190, 211, .1); color: #aec4cf; font-size: 9px; text-decoration: none; }

.source-map b { color: #6794aa; font-weight: 400; }

.stage { position: fixed; inset: 0 0 0 340px; background: #02060d; }

iframe { width: 100%; height: 100%; border: 0; }

.load-line { position: absolute; inset: 0 auto auto 0; width: 0; height: 2px; background: var(--cyan); box-shadow: 0 0 16px var(--cyan); transition: width .65s ease, opacity .4s ease .65s; }

body.loading .load-line { width: 82%; opacity: 1; }

body.ready .load-line { width: 100%; opacity: 0; }

@media (max-width: 760px) {
  .panel { inset: auto 0 0; width: auto; height: 238px; padding: 18px 20px 24px; border: 1px solid var(--line); border-width: 1px 0 0; }
  .panel .back, .panel .eyebrow, .panel h1, .panel .intro, .source-map { display: none; }
  .panel section { margin-top: 0; padding-top: 0; border: 0; }
  .panel section + section { margin-top: 15px; }
  .hint { display: none; }
  .actions { grid-template-columns: 1fr 1fr; }
  .stage { inset: 0 0 238px; }
}
