/* Base layout */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  background: #a5d6a7;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, \"Apple Color Emoji\", \"Segoe UI Emoji\";
  color: #123;
}

#app {
  position: relative;
  height: 100%;
  width: 100%;
  overflow: hidden;
}

#scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Top bar */
#top-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
  pointer-events: none;
}

#top-bar .brand {
  font-weight: 800;
  letter-spacing: 0.3px;
  background: rgba(255,255,255,0.8);
  color: #2e7d32;
  padding: 6px 10px;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  pointer-events: auto;
}

#top-bar .actions { pointer-events: auto; display: flex; gap: 8px; }

button {
  -webkit-tap-highlight-color: transparent;
  border: none;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 700;
}

button.ghost {
  background: rgba(255,255,255,0.85);
  color: #2e7d32;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

button.cta {
  background: linear-gradient(135deg, #66bb6a, #43a047);
  color: white;
  box-shadow: 0 10px 24px rgba(67,160,71,0.4);
}

/* UI panels */
#ui {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  z-index: 10;
  pointer-events: none;
}

.panel { pointer-events: auto; }

.panel.categories {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.panel.items {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
}

.panel.hint {
  display: flex;
  justify-content: center;
}

.panel.hint span {
  background: rgba(255,255,255,0.9);
  padding: 8px 12px;
  border-radius: 12px;
  font-weight: 600;
  color: #2e7d32;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.tab {
  background: rgba(255,255,255,0.9);
  color: #2e7d32;
}

.tab.active { outline: 2px solid #2e7d32; }

.item-btn {
  background: rgba(255,255,255,0.9);
  color: #1b5e20;
  border-radius: 14px;
  padding: 10px 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  white-space: nowrap;
}

.swatch {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08);
}

/* Tutorial overlay */
.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.4), rgba(0,0,0,0.55));
  z-index: 20;
}

.overlay.hidden { display: none; }

.modal {
  width: min(92vw, 420px);
  background: white;
  color: #173b1a;
  border-radius: 16px;
  padding: 18px 18px 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
	.modal h2 { margin: 0 0 8px 0; }

.modal ol { margin: 0 0 12px 18px; }

.primary {
  width: 100%;
  background: linear-gradient(135deg, #66bb6a, #43a047);
  color: white;
}

/* Responsive */
@media (min-width: 720px) {
  #top-bar { padding: 12px 16px; }
  button { font-size: 15px; }
}
