@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader-regular.woff2") format("woff2");
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #FAF6EE;
  --card: #FFFFFF;
  --fg: #1C1915;
  --muted: #524B42;
  --rule: #DED4C3;
  --copper: #A84A24;
  --gold: #C88A1E;
  --spotlight: #C88A1E;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--fg);
  font-family: "Instrument Sans", -apple-system, sans-serif;
  font-size: 20px;
  line-height: 1.55;
}

body {
  margin: 0;
  padding-bottom: 5.5rem;
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 1rem;
}

.top {
  padding-top: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
}

.top-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

h1 {
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  font-weight: 500;
  margin: 0;
  line-height: 1.1;
}

h2 {
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.45rem;
  font-weight: 500;
  margin: 0 0 0.65rem;
  line-height: 1.25;
}

h3 {
  font-size: 1.15rem;
  margin: 0 0 0.45rem;
}

.top-sub, .big-copy {
  color: var(--muted);
  margin: 0.5rem 0 1rem;
}

.help-pill {
  min-height: 52px;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  border: 2px solid var(--gold);
  background: #FFF6DF;
  color: #3B2805;
  font-family: "Instrument Sans", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

.big-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.big-tab {
  min-height: 56px;
  padding: 0.6rem 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--rule);
  background: var(--card);
  color: var(--muted);
  font-family: "Instrument Sans", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.big-tab.is-active {
  background: var(--fg);
  color: #FFFDF8;
  border-color: var(--fg);
}

.walkme-card {
  margin-top: 1.25rem;
  padding: 1.25rem;
  background: #FFF8E6;
  border: 2px solid var(--gold);
  border-radius: 10px;
}

.walkme-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.walkme-controls, .btn-row, .story-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
}

.panel {
  padding-top: 1.25rem;
}

.prompt-box, .words-box, .step-card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.prompt-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--copper);
  margin: 0 0 0.35rem;
}

.talk-zone {
  text-align: center;
  margin: 1.4rem 0;
}

.giant-mic {
  width: 100%;
  min-height: 112px;
  padding: 1.25rem;
  border-radius: 14px;
  border: 0;
  background: var(--copper);
  color: #FFFFFF;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  box-shadow: 0 8px 24px rgba(168, 74, 36, 0.24);
  transition: transform 150ms ease;
}

.giant-mic:active {
  transform: scale(0.99);
}

.giant-mic.is-listening {
  background: #1E6B47;
}

.mic-main {
  font-size: 1.55rem;
  font-weight: 700;
}

.mic-sub {
  font-size: 0.92rem;
  opacity: 0.92;
}

.words-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.word-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  min-height: 92px;
}

.word-tile {
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.45rem;
  line-height: 1.3;
  padding: 0.35rem 0.65rem;
  min-height: 52px;
  border-radius: 8px;
  border: 1px solid var(--rule);
  background: #FCF9F2;
  color: var(--fg);
  cursor: pointer;
}

.word-tile:hover {
  border-color: var(--copper);
  background: #FFF3E5;
}

.word-tile.is-fixed {
  border-color: #1E6B47;
  background: #EBF7F0;
}

.placeholder-big {
  color: var(--muted);
  margin: 0;
  font-size: 1.05rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0.7rem 1.25rem;
  border-radius: 8px;
  border: 2px solid transparent;
  font-family: "Instrument Sans", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--copper);
  color: #FFFFFF;
}

.btn-gold {
  background: var(--gold);
  color: #1C1504;
}

.btn-outline {
  background: var(--card);
  border-color: var(--rule);
  color: var(--fg);
}

.mini-btn {
  min-height: 44px;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--rule);
  background: var(--card);
  color: var(--fg);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.is-spotlight {
  box-shadow: 0 0 0 5px var(--spotlight), 0 12px 28px rgba(200, 138, 30, 0.32) !important;
  transition: box-shadow 250ms ease;
}

.storybook {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: var(--card);
  border: 2px solid var(--copper);
  border-radius: 12px;
}

.scene-frame {
  overflow: hidden;
  border-radius: 8px;
  background: #1C1915;
}

.scene-art {
  display: block;
  width: 100%;
  height: auto;
  animation: slowPan 12s ease-in-out infinite alternate;
}

@keyframes slowPan {
  from { transform: scale(1); }
  to { transform: scale(1.06); }
}

.scene-caption {
  padding: 1rem 1.1rem;
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.3rem;
  color: #FAF6EE;
  line-height: 1.45;
}

.step-cards {
  list-style: none;
  padding: 0;
  margin: 0;
}

.kit-list {
  padding-left: 1.25rem;
  margin: 0;
}

.kit-list li {
  margin-bottom: 0.75rem;
}

[hidden] {
  display: none !important;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 16, 12, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 60;
}

.modal-card {
  width: 100%;
  max-width: 520px;
  background: var(--card);
  border-radius: 12px;
  padding: 1.5rem;
}

.giant-input {
  width: 100%;
  min-height: 60px;
  padding: 0.65rem 0.9rem;
  font-size: 1.45rem;
  border: 2px solid var(--copper);
  border-radius: 8px;
  margin-bottom: 0.85rem;
}

.quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip-btn {
  min-height: 48px;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--rule);
  background: #FAF6EE;
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
}

.float-help {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  min-height: 58px;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  border: 2px solid #3B2805;
  background: var(--gold);
  color: #1C1504;
  font-family: "Instrument Sans", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  z-index: 50;
}

.save-msg {
  font-weight: 700;
  color: #1E6B47;
}

@media (max-width: 520px) {
  html { font-size: 18px; }
  .big-tabs { grid-template-columns: 1fr; }
}
