:root {
  --bg: #1a120e;
  --bg-2: #241812;
  --wood: #6b4226;
  --cream: #f6e7c8;
  --paper: #fff3c8;
  --ink: #2a160e;
  --muted: #8d6f55;
  --tomato: #c23b22;
  --tomato-dark: #8e2414;
  --basil: #3f6f4a;
  --gold: #e4b04a;
  --gold-dark: #c48922;
  --line: rgba(246, 231, 200, 0.12);
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  --radius: 16px;
  --font-display: "Fredoka", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Nunito", "Segoe UI", system-ui, sans-serif;
  --touch: 48px;
  --chip: 32px;
  --pantry-bg: #2a1810;
  --pantry-face: #3d2418;
}

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

html,
body {
  margin: 0;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  background:
    url("assets/scene/scene.png") center / cover no-repeat,
    url("assets/scene/background.png") center / cover no-repeat,
    radial-gradient(1200px 600px at 80% -10%, #3a2218, transparent),
    var(--bg);
  color: var(--cream);
  font-family: var(--font-body);
}

body {
  min-height: 100dvh;
}

button,
input {
  font: inherit;
}

#app {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  gap: 8px;
  padding: 8px;
  padding-bottom: max(8px, env(safe-area-inset-bottom));
}

.hud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  background: linear-gradient(180deg, #2c1c16, #221510);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 14px;
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo {
  font-size: 28px;
}

.brand h1 {
  font-family: var(--font-display);
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
}

.tag {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  flex: 1;
}

.stats > div {
  background: rgba(0, 0, 0, 0.22);
  border-radius: 12px;
  padding: 6px 10px;
  min-width: 72px;
}

.stats dt {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.stats dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.hud-actions {
  display: flex;
  gap: 8px;
}

/* Scrapping a pizza is destructive and used to sit right under Serve/Slice
   in the same button grid, where a stray tap while building could wipe the
   pie in progress. It lives up here in the HUD instead - away from the
   build actions - with a warm tomato border and extra right margin so it
   doesn't read as just another mode/sound toggle. */
.btn-scrap {
  border-color: var(--tomato);
  color: #f0b9a8;
  opacity: 0.75;
  margin-right: 6px;
}

.btn-scrap:hover:not(:disabled) {
  opacity: 1;
}

.kitchen {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 270px);
  gap: 10px;
  min-height: 0;
}

.rail {
  background: #201510;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  overflow: auto;
  box-shadow: var(--shadow);
}

.rail h2 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.muted {
  color: var(--muted);
  font-size: 0.9rem;
}

.tickets {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 4;
  width: min(240px, 34vw);
  max-height: min(72%, 520px);
  margin: 0;
}

.tickets.is-dragging,
.tickets.is-resizing {
  z-index: 6;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
}

.tickets.is-resized {
  max-height: none;
}

.win-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: grab;
  touch-action: none;
  user-select: none;
  margin: 0 0 8px;
}

.win-head h2 {
  margin: 0;
}

.tickets.is-dragging .win-head {
  cursor: grabbing;
}

.win-grip {
  flex: 0 0 auto;
  width: 18px;
  height: 12px;
  background-image: radial-gradient(circle, var(--gold) 1.2px, transparent 1.4px);
  background-size: 6px 6px;
  background-repeat: repeat;
  opacity: 0.9;
}

.win-resize {
  position: absolute;
  touch-action: none;
  user-select: none;
  z-index: 2;
}

.win-resize-e {
  top: 28px;
  right: 0;
  width: 18px;
  bottom: 28px;
  cursor: ew-resize;
}

.win-resize-s {
  left: 28px;
  right: 28px;
  bottom: 0;
  height: 18px;
  cursor: ns-resize;
}

.win-resize-se {
  right: 0;
  bottom: 0;
  width: 28px;
  height: 28px;
  cursor: nwse-resize;
  border-radius: 10px 0 12px 0;
  background-color: rgba(228, 176, 74, 0.22);
  background-image:
    linear-gradient(135deg, transparent 62%, var(--gold) 63%, var(--gold) 70%, transparent 71%),
    linear-gradient(135deg, transparent 62%, var(--gold) 63%, var(--gold) 70%, transparent 71%),
    linear-gradient(135deg, transparent 62%, var(--gold) 63%, var(--gold) 70%, transparent 71%);
  background-position: 100% 100%, 14px 14px, 8px 8px;
  background-size: 22px 22px, 16px 16px, 10px 10px;
  background-repeat: no-repeat;
}

.ticket {
  background: url("assets/scene/order.png") center / cover no-repeat, var(--paper);
  color: var(--ink);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 10px;
  box-shadow: 2px 3px 0 rgba(0, 0, 0, 0.25);
  transform: rotate(-0.4deg);
}

.ticket header {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-display);
  border-bottom: 1px dashed #c9a15a;
  padding-bottom: 4px;
  margin-bottom: 6px;
}

.ticket ul {
  margin: 0;
  padding-left: 16px;
  font-size: 0.82rem;
}

.patience {
  height: 8px;
  background: #e7d09a;
  border-radius: 99px;
  margin: 8px 0;
  overflow: hidden;
}

.patience-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--tomato), var(--gold));
}

.board-wrap {
  position: relative;
  min-height: 0;
  height: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

#pizza-canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  background: transparent;
}

.oven-meter {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 12px;
  background: rgba(20, 10, 6, 0.82);
  border-radius: 12px;
  padding: 8px 12px;
  display: grid;
  gap: 6px;
}

.oven-meter.hidden,
.hidden {
  display: none !important;
}

.meter {
  position: relative;
  height: 18px;
  border-radius: 99px;
  overflow: hidden;
  display: grid;
  /* Keep these in sync with cookHeatQuality()'s 8/38/78 thresholds. */
  grid-template-columns: 38% 40% 22%;
}

.zone.under {
  background: #4a6d9a;
}
.zone.perfect {
  background: #d4a017;
}
.zone.burn {
  background: #b22a1a;
}

.needle {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 4px;
  background: #fff;
  left: 0;
  border-radius: 4px;
  box-shadow: 0 0 8px #fff;
}

.toast {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  background: rgba(20, 10, 6, 0.9);
  color: var(--cream);
  padding: 8px 14px;
  border-radius: 999px;
  margin: 0;
  font-weight: 800;
  pointer-events: none;
}

.stations.rail {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: auto;
}

.stations h2 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.pipeline {
  list-style: none;
  padding: 0;
  margin: 0 0 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.pipeline li {
  padding: 0;
  border-radius: 6px;
  background: #2a1a14;
  color: var(--muted);
  overflow: hidden;
}

.pipeline .pipe {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 6px 7px;
  min-height: 36px;
  min-width: 36px;
  cursor: pointer;
}

.pipeline li.active {
  background: var(--gold);
  color: var(--ink);
}

.pipeline li.done {
  background: var(--basil);
  color: #e8f5e0;
}

.station-hint {
  min-height: 0;
  margin: 0 0 8px;
  color: #ddc7a6;
  font-size: 0.8rem;
}

.station-actions {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 6px;
  min-height: 0;
  position: relative;
  z-index: 1;
}

.station-actions .btn,
.station-actions .slice-control {
  flex: 1 1 calc(50% - 6px);
  min-height: 36px;
  min-width: 0;
}

.station-actions .btn {
  padding: 6px 10px;
  font-size: 0.8rem;
  border-radius: 10px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.slice-control {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 4px;
  position: relative;
  z-index: 2;
}

.slice-control > .btn {
  flex: 1 1 auto;
}

.slice-control.is-open > [data-act="slice-menu"] {
  background: var(--gold);
  color: var(--ink);
}

.slice-options {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  flex: 1 1 100%;
}

.slice-options .btn {
  flex: 1 1 calc(50% - 4px);
  min-height: var(--touch);
  background: #5a3424;
}

.btn {
  min-height: var(--touch);
  min-width: var(--touch);
  border: 0;
  border-radius: 12px;
  padding: 8px 14px;
  background: #3a261c;
  color: var(--cream);
  cursor: pointer;
  font-weight: 800;
}

.btn:hover:not(:disabled) {
  filter: brightness(1.08);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary,
.btn-serve {
  background: linear-gradient(180deg, var(--tomato), var(--tomato-dark));
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
}

.pantry {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
  background:
    linear-gradient(180deg, #4a2a18 0 32px, #24140e 32px),
    #201510;
  border: 3px solid var(--gold);
  border-radius: 14px;
  padding: 8px 10px 10px;
  box-shadow: var(--shadow);
}

.pantry-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.pantry-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  color: var(--gold);
  flex: 0 0 auto;
}

.pantry-inventory {
  margin: 0;
  color: var(--cream);
  font-size: 0.78rem;
  font-weight: 800;
  text-align: right;
  line-height: 1.3;
}

.pantry-cats {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 0;
}

.pantry-cat {
  flex: 0 0 auto;
  min-height: var(--touch);
  min-width: var(--touch);
  border: 2px solid #5a3824;
  border-radius: 999px;
  padding: 6px 10px;
  background: var(--pantry-face);
  color: var(--cream);
  cursor: pointer;
  font-weight: 800;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  touch-action: manipulation;
}

.pantry-cat-name {
  font-size: 0.82rem;
  line-height: 1.1;
}

.pantry-cat-count {
  font-size: 0.78rem;
  color: var(--gold);
  font-weight: 800;
}

.pantry-caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.75;
}

.pantry-cat.on {
  background: var(--gold);
  border-color: #f6e7c8;
  color: var(--ink);
}

.pantry-cat.on .pantry-cat-count {
  color: var(--tomato-dark);
}

.pantry-cat[aria-expanded="true"] .pantry-caret {
  transform: rotate(180deg);
}

.chips-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  flex: 0 0 auto;
  white-space: nowrap;
  align-self: center;
}

.pantry-flyout {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: calc(100% + 6px);
  z-index: 8;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  align-items: center;
  gap: 6px;
  max-height: min(36vh, 260px);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 10px;
  background: #2a1810;
  border: 2px solid var(--gold);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.pantry-item {
  min-height: var(--touch);
  min-width: var(--touch);
  width: auto;
  border: 0;
  border-radius: 999px;
  padding: 6px 10px;
  background: #4a2c1c;
  color: var(--cream);
  cursor: pointer;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  touch-action: manipulation;
}

.pantry-item.on {
  background: var(--gold);
  color: var(--ink);
}

.pantry-art,
.pantry-swatch {
  width: var(--chip);
  height: var(--chip);
  object-fit: contain;
  pointer-events: none;
  flex: 0 0 var(--chip);
  background: var(--cream);
  border-radius: 8px;
}

.pantry-swatch {
  display: inline-block;
  border: 2px solid rgba(42, 22, 14, 0.35);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.pantry-item-name {
  white-space: nowrap;
  text-align: left;
}

.pantry-empty {
  margin: 8px 0;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 6, 4, 0.72);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 20;
}

.panel {
  max-width: 520px;
  background: #2a1b14;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.panel h2 {
  font-family: var(--font-display);
  margin: 0 0 8px;
  font-size: 2rem;
}

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gold);
  margin: 0 0 6px;
  font-size: 0.78rem;
}

.btn-ghost[aria-pressed="true"] {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold);
}

.overlay-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.fine {
  color: var(--muted);
  font-size: 0.82rem;
}

@media (max-width: 980px) {
  #app {
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 4px;
    padding: 6px;
    padding-bottom: max(6px, env(safe-area-inset-bottom));
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
  }

  #app > * {
    min-width: 0;
    max-width: 100%;
  }

  /* Title and mode buttons share row 1. Stats stay a single short chip row.
     PR #22 kept Grab dough on screen by shrinking the board. This keeps those
     buttons, then gives the leftover height back to the pizza. */
  .hud {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding: 4px 8px;
    gap: 4px 8px;
  }

  .tag {
    display: none;
  }

  .logo {
    font-size: 22px;
  }

  .brand {
    flex: unset;
    min-width: 0;
  }

  .brand h1 {
    font-size: 1rem;
  }

  .stats {
    grid-column: 1 / -1;
    flex: unset;
    flex-wrap: nowrap;
    gap: 4px;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .stats > div {
    min-width: 48px;
    padding: 2px 6px;
    flex: 0 0 auto;
  }

  .stats dt {
    font-size: 0.6rem;
  }

  .stats dd {
    font-size: 0.88rem;
  }

  .hud-actions {
    grid-column: 2;
    grid-row: 1;
    flex: 0 0 auto;
  }

  .hud-actions .btn {
    min-height: 36px;
    min-width: 36px;
    padding: 6px 10px;
    font-size: 0.78rem;
  }

  /* Tickets stay over the board. Stations stay a reserved strip under the
     pizza so Grab dough cannot be crushed by a board minimum. */
  .kitchen {
    position: relative;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
    min-width: 0;
    overflow: hidden;
  }

  .board-wrap {
    grid-area: 1 / 1;
    min-height: 0;
    height: auto;
  }

  .tickets {
    top: 6px;
    left: 6px;
    z-index: 4;
    width: min(168px, 40vw);
    max-height: 28%;
    padding: 6px;
  }

  /* Sandbox pass card covered the whole phone board. Hide it on narrow UI. */
  .tickets.is-sandbox {
    display: none;
  }

  .tickets h2 {
    margin: 0;
    font-size: 0.8rem;
  }

  .win-head {
    margin: 0 0 4px;
  }

  .win-resize-e {
    top: 36px;
    width: 22px;
    bottom: 36px;
  }

  .win-resize-s {
    left: 36px;
    right: 36px;
    height: 22px;
  }

  .win-resize-se {
    width: 44px;
    height: 44px;
    background-color: rgba(228, 176, 74, 0.28);
    background-image:
      linear-gradient(135deg, transparent 62%, var(--gold) 63%, var(--gold) 70%, transparent 71%),
      linear-gradient(135deg, transparent 62%, var(--gold) 63%, var(--gold) 70%, transparent 71%),
      linear-gradient(135deg, transparent 62%, var(--gold) 63%, var(--gold) 70%, transparent 71%);
    background-position: 100% 100%, 22px 22px, 12px 12px;
    background-size: 34px 34px, 24px 24px, 16px 16px;
    background-repeat: no-repeat;
  }

  .ticket {
    padding: 6px 8px;
    margin-bottom: 6px;
  }

  .ticket ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0 8px;
    padding-left: 0;
    list-style: none;
    font-size: 0.72rem;
  }

  .stations,
  .stations.rail {
    grid-area: 2 / 1;
    position: relative;
    z-index: 5;
    flex: 0 0 auto;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    min-height: 48px;
    max-height: none;
    overflow: visible;
    padding: 4px 6px;
  }

  .station-hint {
    display: none;
  }

  .stations h2 {
    display: none;
  }

  .pipeline {
    margin: 0 0 4px;
  }

  .station-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    min-width: 0;
    width: 100%;
    overflow: visible;
  }

  .station-actions .btn,
  .station-actions .slice-control {
    flex: 1 1 calc(33.333% - 4px);
    max-width: none;
    min-height: 44px;
    min-width: 0;
  }

  .station-actions .btn {
    padding: 6px 8px;
    font-size: 0.75rem;
    touch-action: manipulation;
  }

  .slice-options .btn {
    min-height: 44px;
    flex: 1 1 calc(50% - 4px);
  }

  .pantry {
    gap: 4px;
    padding: 4px 8px 6px;
    max-height: none;
    min-width: 0;
    max-width: 100%;
    min-height: 0;
    overflow: visible;
  }

  .pantry-cats {
    flex-wrap: nowrap;
    min-width: 0;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .pantry-head h2 {
    font-size: 0.95rem;
  }

  .pantry-inventory {
    font-size: 0.68rem;
    text-align: right;
  }

  .pantry-cat {
    min-height: 36px;
    padding: 4px 8px;
  }

  .pantry-cat-name {
    font-size: 0.78rem;
  }

  .pantry-flyout {
    left: 6px;
    right: 6px;
    max-height: min(32vh, 200px);
    padding: 6px 8px;
  }

  .pantry-item {
    min-height: 36px;
    padding: 4px 8px;
    font-size: 0.78rem;
  }

  .toast {
    bottom: 8px;
    padding: 6px 10px;
    font-size: 0.78rem;
    max-width: 90%;
    text-align: center;
  }
}

@media (max-width: 980px) and (max-height: 740px) {
  .logo {
    display: none;
  }

  .pantry-head,
  .pantry-inventory {
    display: none;
  }

  .chips-label {
    display: none;
  }
}

/* Snack Quests title / opening overlay. Same shell as Spelling and the other
   storefront games: art first, then a how-to card and Play. */
#sq-open {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
#sq-open.is-off { display: none !important; }
#sq-open .sq-stage {
  position: relative;
  width: min(100%, 1400px);
  max-height: 100%;
  max-height: 100dvh;
}
#sq-open .sq-art {
  display: block;
  width: 100%;
  height: auto;
  max-height: 100dvh;
  object-fit: contain;
}
/* .sq-play and .sq-continue also carry the shared .btn class in the HTML
   (dark brown background, tan text - same as every in-game button), so
   these rules are just positioning/sizing on top of that shared look,
   kept uniform with the rest of the game instead of a one-off style. */
#sq-open .sq-play {
  position: absolute;
  left: 50%;
  bottom: 8%;
  transform: translateX(-50%);
  padding: 12px 30px;
  font-size: clamp(17px, 4vw, 22px);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

#sq-open .sq-continue {
  position: absolute;
  left: 50%;
  bottom: 8%;
  transform: translateX(-50%);
  padding: 12px 26px;
  font-size: clamp(16px, 4vw, 20px);
  letter-spacing: 0.03em;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
#sq-open .sq-howto {
  display: none;
  width: min(100%, 560px);
  max-height: 92dvh;
  overflow: auto;
  box-sizing: border-box;
  padding: 8px;
}
#sq-open.is-howto .sq-stage { display: none; }
#sq-open.is-howto .sq-howto { display: block; }
/* Same card look as the mode-select panel (#overlay .panel) - dark brown
   background, tan text, gold kicker accents - so the whole pre-game flow
   reads as one piece with the kitchen itself, not a different app. */
#sq-open .sq-howto-card {
  background: #2a1b14;
  color: var(--cream);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 22px 20px 16px;
  text-align: center;
  box-sizing: border-box;
}
#sq-open .sq-howto-card h2 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: clamp(22px, 5vw, 30px);
  line-height: 1.2;
}
#sq-open .sq-howto-card p {
  margin: 0 0 10px;
  font-size: clamp(15px, 3.6vw, 18px);
  line-height: 1.45;
  text-align: left;
}
#sq-open.is-howto .sq-play {
  position: static;
  transform: none;
  margin: 10px auto 0;
  display: inline-block;
}

#sq-open .sq-studio {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: #fff6eb;
  background: rgba(26, 18, 12, 0.78);
  border: 2px solid #e8a838;
  padding: 4px 8px 4px 4px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}
#sq-open .sq-studio svg {
  display: block;
  width: 22px;
  height: 22px;
  flex: none;
}
