/**
 * style.css — Studio viewer theme (Brief §6)
 * Dark restraint-first studio, frosted-glass floating UI.
 * Raw framework: functional first, refined later.
 */

:root {
  --bg: #14171c;
  --glass: rgba(22, 27, 34, 0.72);
  --glass-border: rgba(255, 255, 255, 0.12);
  --text: #e8eef6;
  --text-dim: #9aa7b8;
  --accent: #6db3f2;
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
}

#app { position: fixed; inset: 0; }
#app canvas { display: block; touch-action: none; }

.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

/* --- Top-left spec card --- */
#spec-card {
  position: fixed;
  top: 16px; left: 16px;
  max-width: 340px;
  padding: 16px 18px;
  z-index: 10;
}
#spec-card .kicker {
  margin: 0 0 4px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
#spec-card h1 { margin: 0 0 4px; font-size: 20px; line-height: 1.25; }
#spec-card .subtitle { margin: 0 0 12px; font-size: 13px; color: var(--text-dim); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill {
  font-size: 11.5px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

/* --- Top-right legend --- */
#legend {
  position: fixed;
  top: 16px; right: 16px;
  width: 230px;
  padding: 14px 16px;
  z-index: 10;
}
#legend h2 { margin: 0 0 10px; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); }
.legend-row { display: flex; align-items: center; gap: 10px; padding: 3px 0; font-size: 12.5px; color: var(--text-dim); }
.legend-row kbd { min-width: 34px; text-align: center; }

kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid var(--glass-border);
  border-bottom-width: 2px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

/* --- Bottom dock --- */
#dock {
  position: fixed;
  left: 50%; bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px;
  max-width: calc(100vw - 24px);
  overflow-x: auto;
  z-index: 10;
}
.dock-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 7px 11px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}
.dock-btn:hover { background: rgba(255, 255, 255, 0.08); }
.dock-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dock-btn.is-active {
  background: rgba(109, 179, 242, 0.18);
  border-color: rgba(109, 179, 242, 0.55);
  color: #cfe6ff;
}
.dock-btn kbd { font-size: 10px; opacity: 0.75; }
.dock-sep { width: 1px; align-self: stretch; margin: 4px 6px; background: var(--glass-border); }

/* --- Status pill --- */
#status {
  position: fixed;
  left: 16px; bottom: 18px;
  margin: 0;
  padding: 8px 13px;
  font-size: 12px;
  color: var(--text-dim);
  z-index: 10;
}

/* --- Loading / noscript --- */
#loading {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--bg);
  color: var(--text-dim);
  font-size: 14px;
  z-index: 20;
}
.noscript { position: fixed; inset: 0; display: grid; place-items: center; }

/* --- Responsive: stack cards on small screens --- */
@media (max-width: 760px) {
  #legend { display: none; }
  #spec-card { max-width: calc(100vw - 32px); }
  #status { display: none; }
  #dock { bottom: 10px; }
}
