:root {
  --bg: #020805;
  --stage: #07140f;
  --ink: #e8f0e6;
  --mute: #7a8a7e;
  --gold: #ffe680;
  --green: #7dffb1;
  --line: rgba(255, 230, 128, 0.16);
  --card: rgba(7, 20, 15, 0.82);
  --font: "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

#app {
  height: 100%;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background:
    radial-gradient(ellipse 80% 55% at 50% 42%, #0c2418 0%, var(--bg) 70%);
}

.chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: max(14px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left));
  z-index: 2;
}

.chrome a, .wordmark, .model-name {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
}

.chrome a {
  color: var(--green);
  text-shadow: 0 0 12px rgba(125, 255, 177, 0.35);
}

.wordmark {
  color: var(--mute);
}

.model-name {
  color: var(--gold);
  text-shadow: 0 0 14px rgba(255, 200, 80, 0.45);
}

#stage {
  position: relative;
  min-height: 0;
  touch-action: none;
  cursor: grab;
}

#stage:active { cursor: grabbing; }

#view {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

#status {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--mute);
  pointer-events: none;
  text-align: center;
}

#status.hide { display: none; }

.dock {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px max(16px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: linear-gradient(180deg, transparent, rgba(2, 8, 5, 0.88) 28%);
  z-index: 2;
}

.row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.row::-webkit-scrollbar { display: none; }

.chip, .clip {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 9px 14px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

.chip.on, .clip.on {
  background: var(--gold);
  color: #14110a;
  border-color: var(--gold);
}

@media (min-width: 720px) {
  #app {
    max-width: 920px;
    margin: 0 auto;
  }
}
