* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: #070b1a;
  font-family: 'Baloo 2', 'Trebuchet MS', 'Segoe UI', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: grab;
}
#scene:active { cursor: grabbing; }

.ui {
  position: fixed;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  z-index: 5;
}
.ui > * { pointer-events: auto; }

.card {
  background: #fff8e7;
  border: 3px solid #1f2233;
  border-radius: 16px;
  box-shadow: 5px 6px 0 #1f2233;
}

.title-card {
  max-width: 380px;
  padding: 12px 16px 12px;
  align-self: flex-start;
}
.title-card h1 {
  margin: 0 0 4px;
  font-size: 26px;
  font-weight: 800;
  color: #1f2233;
  letter-spacing: 0.2px;
  line-height: 1.1;
}
.title-card p {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #4a4f68;
  line-height: 1.35;
}

.controls-card {
  align-self: flex-end;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 420px;
  padding: 10px;
}

.chip {
  pointer-events: auto;
  font-family: inherit;
  font-weight: 700;
  font-size: 13px;
  color: #1f2233;
  background: #ffffff;
  border: 2.5px solid #1f2233;
  border-radius: 999px;
  padding: 7px 13px;
  cursor: pointer;
  box-shadow: 3px 3px 0 #1f2233;
  transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.15s ease;
  user-select: none;
}
.chip:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 #1f2233; }
.chip:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #1f2233; }
.chip.active { background: #ffd54a; }
.chip.ghost { background: #e8f4ff; }
.chip:focus-visible { outline: 3px solid #6c9bff; outline-offset: 2px; }

.hint-pill {
  align-self: center;
  pointer-events: none;
  background: rgba(31, 34, 51, 0.72);
  color: #fff8e7;
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: 0.3px;
  padding: 7px 16px;
  border-radius: 999px;
  border: 2px solid rgba(255, 248, 231, 0.35);
  backdrop-filter: blur(3px);
  white-space: nowrap;
}

@media (max-width: 720px) {
  .title-card { max-width: calc(100vw - 36px); }
  .title-card p { display: none; }
  .title-card h1 { font-size: 22px; }
  .controls-card { max-width: calc(100vw - 36px); gap: 6px; padding: 8px; }
  .chip { font-size: 12px; padding: 6px 10px; }
  .hint-pill { font-size: 11px; padding: 6px 12px; }
}
