/* The Voice — prototype styles. Layout stability is law on this surface:
   the grid is a fixed 5×4 constitution; furniture (strip, SPEAK, tabs,
   footer) never moves between pages, languages, or updates. Buttons are
   >= 64px targets; nothing in the communication path wears play styling. */
:root {
  --green: #14532d;
  --green-soft: #e7f4ec;
  --ink: #1c2420;
  --paper: #ffffff;
  --tab-idle: #eef1ee;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

/* ---- furniture: the strip + SPEAK (fixed, top, always) ---- */
#chrome-top { padding: 0.6rem 0.6rem 0.3rem; }
#strip-wrap { display: flex; gap: 0.5rem; align-items: stretch; }
#strip {
  flex: 1 1 auto; min-height: 3.4rem;
  border: 2px solid var(--green); border-radius: 0.6rem;
  padding: 0.35rem 0.5rem;
  display: flex; flex-wrap: wrap; gap: 0.35rem; align-content: flex-start;
  background: var(--green-soft);
}
.chip {
  background: #fff; border: 1.5px solid var(--green); border-radius: 2rem;
  padding: 0.3rem 0.7rem; font-size: 1.15rem; font-weight: 600;
}
#strip-actions { display: flex; flex-direction: column; gap: 0.35rem; }
.furniture-btn {
  font: inherit; font-weight: 700; cursor: pointer;
  border: 2px solid var(--green); border-radius: 0.6rem;
  background: #fff; color: var(--green);
  min-width: 4.2rem; min-height: 2.6rem; padding: 0.3rem 0.6rem;
}
.furniture-btn.speak { background: var(--green); color: #fff; flex: 1 1 auto; font-size: 1.2rem; }
#novoice {
  margin-top: 0.5rem; padding: 0.55rem 0.7rem;
  border: 2px solid #9a6a00; background: #fff7dd; border-radius: 0.6rem;
  font-size: 1rem;
}

/* ---- furniture: page tabs (fixed row under the strip) ---- */
#page-tabs {
  display: flex; gap: 0.4rem; padding: 0.3rem 0.6rem;
  overflow-x: auto;
}
.tab {
  font: inherit; font-weight: 700; cursor: pointer;
  border: 2px solid transparent; border-radius: 2rem;
  background: var(--tab-idle); color: var(--ink);
  padding: 0.45rem 1rem; min-height: 2.8rem; white-space: nowrap;
}
.tab[aria-current="page"] { background: var(--green); color: #fff; }
.tab.home-tab { border-color: var(--green); }

/* ---- the board grid: 5 columns × 4 rows, always ---- */
#board { flex: 1 1 auto; display: flex; flex-direction: column; padding: 0.3rem 0.6rem 0.6rem; }
#grid {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 0.45rem;
}
.cell {
  font: inherit; cursor: pointer;
  border: 2px solid #b9c6bc; border-radius: 0.8rem;
  background: #fff; color: var(--ink);
  font-size: clamp(1rem, 3.2vw, 1.45rem); font-weight: 600;
  padding: 0.35rem; min-height: 4rem;
  display: flex; align-items: center; justify-content: center; text-align: center;
  overflow-wrap: anywhere;
}
.cell:active { background: var(--green-soft); }
.cell.phrase { font-size: clamp(0.95rem, 2.7vw, 1.25rem); }
.cell.empty { border-style: dashed; background: transparent; cursor: default; }

/* ---- the play corner (phrase pages only; quiet, below the grid) ---- */
#remix { margin-top: 0.6rem; border-top: 2px dashed #b9c6bc; padding-top: 0.5rem; }
.remix-label { font-size: 0.95rem; color: #44524a; margin-bottom: 0.35rem; }
#remix-line { min-height: 2.2rem; font-size: 1.2rem; font-weight: 600; }
.remix-row { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.3rem 0; }
.remix-chip {
  font: inherit; cursor: pointer; font-weight: 600;
  border: 1.5px solid #7d8f83; border-radius: 2rem; background: #f6f8f6;
  padding: 0.4rem 0.8rem; min-height: 2.8rem;
}
.remix-actions { display: flex; gap: 0.4rem; margin-top: 0.35rem; }

/* ---- furniture: the quiet footer zone + the one adult door ---- */
#chrome-bottom {
  border-top: 1px solid #dde3dd; padding: 0.45rem 0.6rem;
  font-size: 0.85rem; color: #55645a;
  display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center;
}
#version-tag { font-variant-numeric: tabular-nums; }
#net-note { color: #9a6a00; }
#import-door {
  font: inherit; font-size: 0.85rem; cursor: pointer;
  background: none; border: none; color: #55645a; text-decoration: underline;
  margin-left: auto; padding: 0.3rem;
}
#door-panel { flex-basis: 100%; }
#door-status { color: #33413a; }
