   body {
        margin: 0;
        font-family:
          system-ui,
          -apple-system,
          BlinkMacSystemFont,
          "Segoe UI",
          sans-serif;
        background: #f6f7fb;
        color: #182033;
      }

      .page {
        max-width: 900px;
        margin: 0 auto;
        padding: 24px 16px 40px;
      }

      .card {
        background: #fff;
        border-radius: 22px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
        padding: 22px;
      }

      .brand {
        font-size: 20px;
        font-weight: 850;
        margin-bottom: 4px;
      }

      .brand span {
        color: #e53935;
      }

      .game-title {
        font-size: 32px;
        font-weight: 900;
        margin: 6px 0;
      }

      .subtitle {
        color: #667085;
        margin-bottom: 16px;
      }

      .filter-row {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin: 16px 0 20px;
      }

      .filter {
        border: 0;
        background: #eef2ff;
        color: #3046a0;
        padding: 8px 12px;
        border-radius: 999px;
        font-size: 13px;
        font-weight: 800;
        cursor: pointer;
      }

      .filter.active {
        background: #3046a0;
        color: #fff;
      }

      .prompt-card {
        margin-top: 18px;
        padding: 24px;
        border-radius: 20px;
        background: #101828;
        color: white;
        text-align: center;
        min-height: 260px;
      }

      .instruction {
        font-size: 16px;
        color: #d0d5dd;
        margin-bottom: 16px;
        line-height: 1.35;
        font-weight: 700;
      }

      .prompt {
        font-size: clamp(36px, 8vw, 68px);
        font-weight: 900;
        letter-spacing: -1px;
        line-height: 1.05;
      }

      .info-board {
        display: grid;
        gap: 8px;
        max-width: 420px;
        margin: 0 auto;
        text-align: left;
        font-size: 22px;
        font-weight: 800;
      }

      .info-row {
        display: flex;
        justify-content: space-between;
        gap: 18px;
        background: #344054;
        border-radius: 12px;
        padding: 12px 14px;
      }

      .info-label {
        color: #98a2b3;
        font-size: 15px;
      }

      .calendar {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        gap: 6px;
        margin: 0 auto;
        max-width: 360px;
      }

      .day-head,
      .day-cell {
        padding: 10px 0;
        border-radius: 10px;
        text-align: center;
        font-weight: 800;
      }

      .day-head {
        color: #98a2b3;
        font-size: 14px;
      }

      .day-cell {
        background: #344054;
        color: #d0d5dd;
      }

      .day-cell.marked {
        background: #e53935;
        color: #fff;
        transform: scale(1.06);
      }

      .direction-question {
        font-size: 20px;
        font-weight: 900;
        margin-bottom: 18px;
        color: #fff;
        line-height: 1.3;
      }

      .direction-image {
        width: 100%;
        max-width: 780px;
        border-radius: 18px;
        display: block;
        margin: 0 auto 18px;
        background: white;
        box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
      }

      .scramble-title {
        color: #d0d5dd;
        font-size: 14px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        margin: 12px 0 10px;
        text-align: left;
        max-width: 780px;
        margin-left: auto;
        margin-right: auto;
      }

      .scramble-zone {
        display: flex;
        flex-direction: column;
        gap: 8px;
        max-width: 780px;
        margin: 0 auto;
      }

      .scramble-step {
        border: 0;
        border-radius: 12px;
        padding: 12px 14px;
        font-weight: 800;
        cursor: pointer;
        background: #344054;
        color: white;
        text-align: left;
        font-size: 15px;
      }

      .scramble-step.selected {
        background: #12b76a;
      }

      .selected-zone {
        margin-top: 14px;
        padding-top: 12px;
        border-top: 1px solid #344054;
      }

      .controls {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 10px;
        margin-top: 18px;
      }

      button.action {
        border: 0;
        border-radius: 14px;
        padding: 13px 12px;
        font-weight: 850;
        cursor: pointer;
        font-size: 15px;
      }

      .btn-dark {
        background: #182033;
        color: white;
      }
      .btn-light {
        background: #eef2f6;
        color: #182033;
      }
      .mic-ready {
        background: #12b76a;
        color: white;
      }

      .answer-box {
        margin-top: 18px;
        background: #f2f4f7;
        border-radius: 16px;
        padding: 14px;
      }

      .label {
        font-size: 13px;
        color: #667085;
        font-weight: 850;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        margin-bottom: 6px;
      }

      .transcript {
        min-height: 28px;
        font-size: 18px;
        font-weight: 750;
      }

      .result {
        margin-top: 12px;
        font-weight: 850;
        font-size: 18px;
      }

      .ok {
        color: #039855;
      }
      .bad {
        color: #d92d20;
      }

      .score-row {
        display: flex;
        justify-content: space-between;
        gap: 12px;
        margin-top: 14px;
        color: #475467;
        font-weight: 750;
      }

      @media (max-width: 620px) {
        .controls {
          grid-template-columns: 1fr 1fr;
        }

        .card {
          padding: 18px;
        }

        .prompt-card {
          padding: 16px;
        }
      }
      .template-wrap {
        display: flex;
        justify-content: center;
        align-items: center;
      }

      .alarm-clock {
        width: min(520px, 100%);
        background: #202939;
        border-radius: 34px;
        padding: 22px;
        box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
        border: 6px solid #475467;
      }

      .alarm-top {
        display: flex;
        justify-content: space-between;
        padding: 0 40px 14px;
      }

      .alarm-top span {
        width: 72px;
        height: 18px;
        border-radius: 999px;
        background: #667085;
      }

      .alarm-screen {
        background: #020617;
        color: #39ff88;
        border-radius: 22px;
        padding: 28px 18px;
        font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
        font-size: clamp(46px, 10vw, 86px);
        font-weight: 900;
        letter-spacing: 0.04em;
        text-shadow: 0 0 14px rgba(57, 255, 136, 0.55);
      }

      .alarm-label {
        margin-top: 14px;
        color: #d0d5dd;
        font-size: 16px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.08em;
      }
      .receipt-card {
        width: min(520px, 100%);
        margin: 0 auto;
        background: #fffdf7;
        color: #182033;
        border-radius: 18px;
        padding: 22px;
        box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
        border: 2px dashed #d0d5dd;
        font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
        text-align: left;
      }

      .receipt-store {
        text-align: center;
        font-size: 24px;
        font-weight: 900;
        letter-spacing: 0.06em;
        margin-bottom: 6px;
      }

      .receipt-subtitle {
        text-align: center;
        color: #667085;
        font-size: 13px;
        font-weight: 800;
        margin-bottom: 18px;
      }

      .receipt-line {
        display: flex;
        justify-content: space-between;
        gap: 18px;
        border-bottom: 1px dotted #d0d5dd;
        padding: 10px 0;
        font-size: 18px;
        font-weight: 800;
      }

      .receipt-line.total {
        margin-top: 10px;
        border-top: 3px solid #182033;
        border-bottom: 0;
        padding-top: 16px;
        font-size: 22px;
        font-weight: 950;
      }

      .receipt-thanks {
        text-align: center;
        margin-top: 18px;
        color: #667085;
        font-size: 13px;
        font-weight: 800;
      }
      .boarding-pass {
        width: min(760px, 100%);
        margin: 0 auto;
        display: grid;
        grid-template-columns: 1fr 190px;
        background: #f8fbff;
        color: #182033;
        border-radius: 24px;
        overflow: hidden;
        box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
        text-align: left;
      }

      .bp-main {
        padding: 24px;
      }

      .bp-airline {
        font-size: 24px;
        font-weight: 950;
        letter-spacing: 0.06em;
        color: #3046a0;
        margin-bottom: 18px;
      }

      .bp-route {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        gap: 18px;
        margin-bottom: 24px;
      }

      .bp-label {
        font-size: 12px;
        color: #667085;
        font-weight: 900;
        letter-spacing: 0.08em;
        text-transform: uppercase;
      }

      .bp-city {
        font-size: clamp(28px, 5vw, 44px);
        font-weight: 950;
        line-height: 1;
      }

      .bp-arrow {
        font-size: 42px;
        font-weight: 900;
        color: #e53935;
      }

      .bp-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
      }

      .bp-grid div {
        background: #eef2ff;
        border-radius: 14px;
        padding: 12px;
      }

      .bp-grid span {
        display: block;
        font-size: 12px;
        color: #667085;
        font-weight: 900;
        text-transform: uppercase;
        margin-bottom: 4px;
      }

      .bp-grid strong {
        font-size: 22px;
        font-weight: 950;
      }

      .bp-side {
        background: #3046a0;
        color: white;
        padding: 24px 18px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        border-left: 3px dashed rgba(255, 255, 255, 0.5);
        text-align: center;
      }

      .bp-side-label {
        font-size: 12px;
        font-weight: 900;
        letter-spacing: 0.08em;
        margin-bottom: 20px;
      }

      .bp-code {
        font-size: 34px;
        font-weight: 950;
      }

      .bp-small {
        margin-top: 10px;
        font-weight: 800;
        color: #dbe4ff;
      }

      @media (max-width: 620px) {
        .boarding-pass {
          grid-template-columns: 1fr;
        }

        .bp-side {
          border-left: 0;
          border-top: 3px dashed rgba(255, 255, 255, 0.5);
        }

        .bp-grid {
          grid-template-columns: 1fr 1fr;
        }
      }
      .month-card {
        width: min(640px, 100%);
        margin: 0 auto;
        background: #ffffff;
        color: #182033;
        border-radius: 24px;
        padding: 22px;
        box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
        text-align: left;
      }

      .month-title {
        font-size: 30px;
        font-weight: 950;
        margin-bottom: 16px;
        color: #3046a0;
      }

      .month-grid {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        gap: 8px;
      }

      .month-head {
        text-align: center;
        font-size: 12px;
        font-weight: 900;
        color: #667085;
        text-transform: uppercase;
      }

      .month-day {
        min-height: 54px;
        border-radius: 12px;
        background: #f2f4f7;
        padding: 8px;
        font-weight: 900;
        position: relative;
      }

      .month-day.active {
        background: #e53935;
        color: white;
        transform: scale(1.04);
      }

      .month-day span {
        display: block;
        margin-top: 4px;
        font-size: 10px;
        font-weight: 850;
      }
      .population-sign {
        width: min(620px, 100%);
        margin: 0 auto;
        background: #fef7c3;
        color: #182033;
        border: 8px solid #7a4f1d;
        border-radius: 24px;
        padding: 28px;
        box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
        text-align: center;
      }

      .pop-welcome {
        font-size: 22px;
        font-weight: 950;
        letter-spacing: 0.08em;
        color: #7a4f1d;
      }

      .pop-town {
        font-size: clamp(40px, 8vw, 72px);
        font-weight: 950;
        margin: 10px 0 18px;
      }

      .pop-label {
        font-size: 18px;
        font-weight: 900;
        color: #667085;
        text-transform: uppercase;
      }

      .pop-number {
        font-size: clamp(42px, 9vw, 86px);
        font-weight: 950;
        color: #e53935;
        line-height: 1;
        margin-top: 8px;
      }
      .date-card {
        width: min(520px, 100%);
        margin: 0 auto;
        background: #fff;
        color: #182033;
        border-radius: 22px;
        overflow: hidden;
        box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
      }

      .date-header {
        background: #e53935;
        color: white;
        padding: 14px;
        text-align: center;
        font-size: 14px;
        font-weight: 900;
        letter-spacing: 0.12em;
        text-transform: uppercase;
      }

      .date-day {
        text-align: center;
        font-size: clamp(72px, 12vw, 120px);
        font-weight: 950;
        line-height: 1;
        padding-top: 28px;
      }

      .date-month {
        text-align: center;
        font-size: 34px;
        font-weight: 900;
        margin-top: 8px;
      }

      .date-year {
        text-align: center;
        font-size: 26px;
        font-weight: 800;
        color: #667085;
        margin-top: 8px;
        margin-bottom: 28px;
      }

      .date-footer {
        background: #f2f4f7;
        text-align: center;
        padding: 12px;
        color: #667085;
        font-size: 14px;
        font-weight: 800;
      }
      .train-ticket .bp-airline {
        color: #0f766e;
      }

      .train-ticket .bp-side {
        background: #0f766e;
      }
      .speak-panel {
  margin-top: 14px;
  background: #ecfdf3;
  border: 1px solid #abefc6;
  border-radius: 16px;
  padding: 12px 14px;
}

.speak-panel.hidden {
  display: none;
}

.speak-status {
  color: #067647;
  font-weight: 850;
  margin-bottom: 8px;
}

.speak-meter {
  height: 8px;
  background: #d1fadf;
  border-radius: 999px;
  overflow: hidden;
}

.speak-meter-bar {
  width: 0%;
  height: 100%;
  background: #12b76a;
  transition: width 0.15s ease;
}

.mic-recording {
  background: #d92d20 !important;
  color: #fff !important;
}
.controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}
.mic-btn {
  min-width: 165px;
}
#hearBtn.hearing {
  background: #22c55e;
  color: white;
  border-color: #22c55e;
}
#hearBtn.hearing {
  background: #22c55e;
  color: white;
  border-color: #22c55e;
  animation: hearPulse 1s infinite;
}

@keyframes hearPulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.03); }
  100% { transform: scale(1); }
}
.studio-tool-tile h3 {
  margin-bottom: 10px;
}

.studio-tool-tile p {
  min-height: 72px;
}
@media (max-width: 620px) {
  .prompt-card {
    overflow: hidden;
  }

  /* Population sign: prevent ugly number wrap */
  .population-sign {
    padding: 20px 14px;
    border-width: 5px;
  }

  .pop-town {
    font-size: clamp(30px, 10vw, 44px);
    line-height: 1.05;
  }

  .pop-number {
    font-size: clamp(30px, 11vw, 46px);
    line-height: 1.05;
    white-space: nowrap;
    letter-spacing: -0.04em;
  }

  /* Travel tickets: fit inside mobile card */
  .boarding-pass {
    width: 100%;
    max-width: 100%;
    grid-template-columns: 1fr;
  }

  .bp-main {
    padding: 16px;
  }

  .bp-route {
    grid-template-columns: 1fr;
    gap: 8px;
    text-align: center;
  }

  .bp-arrow {
    font-size: 28px;
    transform: rotate(90deg);
  }

  .bp-city {
    font-size: clamp(26px, 9vw, 38px);
    word-break: break-word;
  }

  .bp-grid {
    grid-template-columns: 1fr 1fr;
  }

  .bp-grid strong {
    font-size: 18px;
    word-break: break-word;
  }

  .bp-side {
    padding: 16px;
    border-left: 0;
    border-top: 3px dashed rgba(255, 255, 255, 0.5);
  }

  .bp-code {
    font-size: 26px;
    word-break: break-word;
  }
}
#workspaceBody .prompt-card,
#workspaceBody .template-wrap {
  max-width: 100%;
  overflow: hidden;
}
.mic-processing {
  opacity: 0.65;
  cursor: wait;
}