/*!*************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./app/globals.css ***!
  \*************************************************************************************************************************************************************************************************************************************************************/
:root {
  --ink: #2f2418;
  --paper: #fdf6ea;
  --cream: #f4ead8;
  --accent: #b34a3a;
  --green: #5a6b4a;
  --gold: #c9963e;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: #1a1512;
  overflow: hidden;
  height: 100%;
}

.loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--cream);
  font-size: 18px;
  letter-spacing: 0.4px;
}

/* ---------- cards & panels ---------- */
.hud-card {
  background: rgba(253, 246, 234, 0.94);
  border: 1px solid #e0d4bc;
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: 0 2px 10px rgba(30, 20, 10, 0.18);
  pointer-events: none;
}

.panel {
  background: var(--paper);
  border: 1px solid #e0d4bc;
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 8px 30px rgba(30, 20, 10, 0.35);
  max-height: 62vh;
  overflow: auto;
}

/* ---------- dialogue ---------- */
.dialogue-panel {
  background: rgba(253, 246, 234, 0.97);
  border: 1px solid #e0d4bc;
  border-radius: 16px;
  padding: 14px 18px;
  box-shadow: 0 8px 26px rgba(30, 20, 10, 0.32);
}

.token.phrase { color: var(--accent); }
.token.phrase:hover { background: #f7e3c9; border-radius: 4px; }

.choices { display: flex; flex-direction: column; gap: 8px; }
.choice {
  text-align: left;
  background: var(--paper);
  border: 1.5px solid #d8c9a8;
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 15px;
  transition: transform 0.08s ease, border-color 0.12s ease;
}
.choice:hover { border-color: var(--accent); transform: translateY(-1px); }

/* ---------- buttons ---------- */
.btn {
  background: var(--cream);
  border: 1px solid #d8c9a8;
  border-radius: 9px;
  padding: 7px 12px;
  font-size: 13px;
  cursor: pointer;
}
.btn:hover { background: #efe3cb; }
.btn.primary { background: var(--accent); color: #fff; border-color: #93392c; }
.btn.primary:hover { background: #a03e2f; }
.btn-link {
  background: none; border: none; color: var(--accent);
  cursor: pointer; font-size: 12px; padding: 0 4px; text-decoration: underline;
}
.btn-mode {
  background: rgba(253, 246, 234, 0.9);
  border: 1px solid #d8c9a8;
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 12px;
  cursor: pointer;
}
.btn-mode.active { background: var(--accent); color: #fff; border-color: #93392c; }
.btn-interact {
  background: rgba(253, 246, 234, 0.92);
  border: 2px solid #d8c9a8;
  font-weight: 700;
  cursor: pointer;
}
.chip {
  background: #f7eeda;
  border: 1px solid #dcc9a5;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}
.chip:hover { border-color: var(--accent); }

.prompt {
  background: rgba(47, 36, 24, 0.82);
  color: #fdf6ea;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 14px;
  animation: bob 1.6s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translate(-50%, -3px); } }

.toast {
  background: rgba(90, 107, 74, 0.95);
  color: #fff;
  border-radius: 10px;
  padding: 9px 16px;
  font-size: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  animation: fadein 0.2s ease;
}
@keyframes fadein { from { opacity: 0; } }

/* ---------- settings ---------- */
.settings-panel { z-index: 30; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; margin-bottom: 7px; }
.row input[type='range'] { width: 120px; }

/* ---------- webgl fallback ---------- */
.webgl-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #bfe0e6 0%, #d8c9a8 100%);
}
.webgl-fallback-card {
  background: var(--paper);
  border: 1px solid #e0d4bc;
  border-radius: 14px;
  padding: 22px 26px;
  max-width: 420px;
  text-align: center;
  box-shadow: 0 8px 30px rgba(30, 20, 10, 0.25);
}
.webgl-fallback-card h2 { margin: 0 0 8px; font-size: 18px; }
.webgl-fallback-card p { margin: 0; font-size: 14px; color: #5a6b4a; }

/* ---------- studio ---------- */
.studio-root { padding: 24px; max-width: 1100px; margin: 0 auto; overflow: auto; height: 100vh; }
.studio-root h1 { font-size: 22px; margin: 0 0 4px; }
.studio-card {
  background: var(--paper);
  border: 1px solid #e0d4bc;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.studio-card.error { border-color: var(--accent); background: #fdf0ec; }
.mono { font-family: ui-monospace, 'Cascadia Code', Menlo, monospace; font-size: 12px; white-space: pre-wrap; }
textarea, input, select {
  font: inherit;
  border: 1px solid #d8c9a8;
  border-radius: 8px;
  padding: 6px 8px;
  background: #fff;
  width: 100%;
}
label.studio-label { display: block; font-size: 12px; color: #8a7a64; margin: 8px 0 3px; }

@media (max-width: 640px) {
  .hud-card { max-width: 210px; padding: 8px 9px; }
  .panel { padding: 12px; }
  .dialogue-panel { bottom: 120px !important; }
}

