:root {
  --bg: #081b36;
  --ink: #4b220e;
  --muted: #88512b;
  --cream: #fff1cf;
  --paper: #fff6dc;
  --gold: #ffc643;
  --gold-deep: #e68a13;
  --orange: #f26d21;
  --green: #25875c;
  --blue: #145f8c;
  --red: #cf4f36;
  --shadow: 0 18px 44px rgba(25, 8, 0, 0.34);
  --radius: 18px;
  --ui-font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
  --emoji-font: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  --bg-home: url("../assets/ui/bg-home.png");
  --bg-game: url("../assets/ui/bg-game.png");
  --bg-result: url("../assets/ui/bg-result.png");
  --panel-cream: url("../assets/ui/panel-cream.png");
  --panel-red: url("../assets/ui/panel-red.png");
  --panel-square: url("../assets/ui/panel-square.png");
  --btn-red: url("../assets/ui/button-red.png");
  --btn-green: url("../assets/ui/button-green.png");
  --btn-blue: url("../assets/ui/button-blue.png");
  --btn-cream: url("../assets/ui/button-cream.png");
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100vh;
  min-height: max(100vh, 100dvh);
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--ui-font);
  background:
    radial-gradient(circle at 50% 10%, rgba(255, 208, 87, 0.28), transparent 30%),
    linear-gradient(180deg, #06172e 0%, #123864 60%, #061a2d 100%);
}

button,
input {
  font: inherit;
}

button {
  position: relative;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.game-shell {
  position: relative;
  width: min(100vw, 430px);
  min-height: 100vh;
  min-height: max(100vh, 100dvh);
  margin: 0 auto;
  overflow: hidden;
  background: #081a35;
  box-shadow: 0 0 0 1px rgba(255, 221, 161, 0.22), 0 0 80px rgba(0, 0, 0, 0.42);
}

.game-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 52% 8%, rgba(255, 225, 124, 0.18), transparent 18%),
    linear-gradient(180deg, rgba(2, 9, 24, 0.06), rgba(2, 9, 24, 0.38));
  pointer-events: none;
}

.screen {
  position: relative;
  z-index: 1;
  display: none;
  min-height: 100vh;
  min-height: max(100vh, 100dvh);
  padding: max(18px, env(safe-area-inset-top)) 18px max(22px, env(safe-area-inset-bottom));
  overflow: hidden;
}

.screen::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 0;
  background-image: linear-gradient(180deg, rgba(4, 14, 32, 0.06), rgba(4, 14, 32, 0.24)), var(--bg-game);
  background-position: center;
  background-size: cover;
}

.screen::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(180deg, transparent, rgba(4, 13, 30, 0.42));
  pointer-events: none;
}

.screen-home::before {
  background-image: linear-gradient(180deg, rgba(4, 14, 32, 0.02), rgba(4, 14, 32, 0.16)), var(--bg-home);
  background-position: center top;
}

#screen-result::before {
  background-image: linear-gradient(180deg, rgba(4, 14, 32, 0.04), rgba(92, 34, 8, 0.18)), var(--bg-result);
  background-position: center top;
}

.screen.is-active {
  display: flex;
  flex-direction: column;
  animation: screenIn 280ms ease both;
}

@keyframes screenIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.top-actions,
.screen-header,
.quiz-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.top-actions {
  min-height: 42px;
  justify-content: flex-end;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.icon-btn,
.back-btn,
.tiny-link,
.tiny-badge {
  border: 1px solid rgba(255, 224, 156, 0.72);
  color: #fff4cf;
  background:
    linear-gradient(180deg, rgba(255, 239, 174, 0.14), transparent 48%),
    rgba(10, 33, 63, 0.72);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

.icon-btn,
.back-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-weight: 900;
  font-size: 22px;
}

.back-btn {
  color: var(--ink);
  background: linear-gradient(180deg, #fff0c5, #ffc35b);
  border-color: #9e5d16;
}

.tiny-link,
.tiny-badge {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 17px;
  font-size: 13px;
  font-weight: 800;
}

.screen-header h2 {
  margin: 0;
  min-width: 156px;
  padding: 12px 28px 14px;
  border: 0;
  border-radius: 0;
  color: #7e340f;
  font-size: 26px;
  line-height: 1;
  text-shadow: 0 2px 0 #fff4d2;
  text-align: center;
  background: var(--btn-cream) center / 100% 100% no-repeat;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.28));
}

#screen-board .screen-header {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
}

#screen-board .screen-header::after {
  content: "";
}

#screen-board .screen-header h2 {
  justify-self: center;
}

.hero-stack {
  display: grid;
  place-items: center;
  gap: 6px;
  margin-top: clamp(8px, 3dvh, 26px);
  text-align: center;
}

.home-title-art {
  display: block;
  width: min(96%, 356px);
  height: auto;
  filter: drop-shadow(0 12px 20px rgba(30, 8, 0, 0.38));
}

h1 {
  margin: 0;
  color: #fff8d9;
  font-size: clamp(54px, 17vw, 76px);
  line-height: 0.96;
  font-weight: 950;
  letter-spacing: 0;
  text-shadow:
    0 5px 0 #7e2d11,
    0 0 18px rgba(255, 196, 69, 0.52);
}

.stats-panel {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: auto;
  padding: 20px 18px 22px;
  border: 0;
  border-radius: 0;
  background: var(--panel-cream) center / 100% 100% no-repeat;
  filter: drop-shadow(0 16px 24px rgba(12, 5, 0, 0.34));
}

.stats-panel div {
  display: grid;
  place-items: center;
  min-width: 0;
  border-right: 1px solid rgba(130, 65, 20, 0.2);
}

.stats-panel div:last-child {
  border-right: 0;
}

.stats-panel strong {
  color: #9d3c13;
  font-size: 30px;
  line-height: 1;
}

.stats-panel span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.home-actions,
.result-actions {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.submit-btn {
  width: 100%;
  min-height: 62px;
  border: 0;
  border-radius: 0;
  color: #fff9d8;
  font-size: 23px;
  font-weight: 950;
  letter-spacing: 0;
  text-shadow: 0 2px 0 rgba(96, 37, 10, 0.55);
  background-color: transparent;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  filter: drop-shadow(0 10px 12px rgba(21, 7, 0, 0.32));
  transition: transform 160ms ease, filter 160ms ease;
}

.primary-btn:active,
.secondary-btn:active,
.ghost-btn:active,
.submit-btn:active,
.tool-btn:active,
.option-btn:active {
  transform: translateY(2px) scale(0.99);
}

.primary-btn,
.submit-btn {
  background-image: var(--btn-red);
}

.secondary-btn {
  background-image: var(--btn-green);
}

.ghost-btn {
  background-image: var(--btn-blue);
}

.compact {
  min-height: 52px;
  font-size: 18px;
}

.level-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 24px;
}

.level-card {
  position: relative;
  min-height: 178px;
  padding: 46px 18px 18px;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  color: var(--ink);
  text-align: left;
  background: var(--panel-square) center / 100% 100% no-repeat;
  filter: drop-shadow(0 12px 16px rgba(23, 8, 0, 0.28));
}

.level-card::after {
  content: "🌕";
  position: absolute;
  right: 12px;
  bottom: 38px;
  font-family: var(--emoji-font);
  font-size: 54px;
  opacity: 0.28;
}

.level-card.is-active-level {
  filter: drop-shadow(0 0 10px rgba(255, 208, 75, 0.55)) drop-shadow(0 14px 18px rgba(23, 8, 0, 0.3));
}

.level-card.is-locked {
  filter: grayscale(0.84) drop-shadow(0 9px 12px rgba(23, 8, 0, 0.22));
  opacity: 0.72;
}

.level-no,
.level-status {
  position: absolute;
  z-index: 2;
  top: 14px;
  display: inline-grid;
  place-items: center;
  min-height: 28px;
  border-radius: 999px;
  font-weight: 950;
}

.level-no {
  left: 18px;
  width: 34px;
  color: #fff;
  background: #d35b25;
  box-shadow: inset 0 2px 0 rgba(255, 235, 172, 0.36);
}

.level-status {
  right: 18px;
  padding: 0 9px;
  color: #fffaf0;
  font-size: 12px;
  background: #17714f;
  box-shadow: inset 0 2px 0 rgba(255, 235, 172, 0.25);
}

.level-card strong,
.level-card em,
.level-card .level-stars {
  position: relative;
  z-index: 1;
  display: block;
}

.level-card strong {
  color: #81320e;
  font-size: 21px;
  line-height: 1.1;
}

.level-card em {
  min-height: 36px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
}

.level-stars {
  margin-top: 18px;
}

.star-strip {
  display: block;
  width: 94px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 2px rgba(80, 32, 4, 0.28));
}

.quiz-hud {
  align-items: stretch;
}

.score-chip,
.life-chip,
.progress-wrap {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 7px 10px;
  border: 2px solid #b76b24;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 246, 219, 0.98), rgba(255, 211, 126, 0.96));
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
}

.score-chip,
.life-chip {
  gap: 5px;
  font-weight: 950;
}

.progress-wrap {
  flex: 1;
  display: grid;
  min-width: 0;
  gap: 5px;
  border: 0;
  border-radius: 0;
  color: #fff0c8;
  text-align: center;
  background: var(--btn-blue) center / 100% 100% no-repeat;
  box-shadow: none;
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.24));
}

.progress-wrap span {
  font-size: 14px;
  font-weight: 900;
}

.progress-bar {
  height: 9px;
  overflow: hidden;
  border: 1px solid #f2c26c;
  border-radius: 999px;
  background: #163253;
}

.progress-bar i {
  display: block;
  width: 25%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffd84c, #ff852f);
  transition: width 240ms ease;
}

.question-card {
  position: relative;
  margin-top: 18px;
  padding: 18px;
  border: 3px solid #c98230;
  border-radius: var(--radius);
  text-align: center;
  background: linear-gradient(180deg, rgba(255, 248, 229, 0.98), rgba(255, 229, 173, 0.98));
  box-shadow: var(--shadow);
}

.question-card.is-correct {
  animation: correctPop 420ms ease both;
}

.question-card.is-wrong,
.question-card.is-skip {
  animation: wrongShake 340ms ease both;
}

@keyframes correctPop {
  50% {
    transform: scale(1.025);
    box-shadow: 0 0 0 8px rgba(255, 218, 71, 0.22), var(--shadow);
  }
}

@keyframes wrongShake {
  20%,
  60% {
    transform: translateX(-5px);
  }
  40%,
  80% {
    transform: translateX(5px);
  }
}

.level-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 14px;
  color: #fff8dc;
  font-size: 13px;
  font-weight: 900;
  background: #176d50;
  box-shadow: inset 0 2px 0 rgba(255, 239, 184, 0.25);
}

.question-card h2 {
  margin: 12px 0 8px;
  color: #8a3411;
  font-size: 20px;
}

.emoji-prompt {
  display: grid;
  place-items: center;
  min-height: 112px;
  margin: 10px 0 12px;
  padding: 12px;
  border-radius: 16px;
  color: #2d1c12;
  font-family: var(--emoji-font);
  font-size: clamp(42px, 13vw, 62px);
  line-height: 1.2;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(174, 104, 35, 0.36);
  box-shadow: inset 0 0 0 2px rgba(255, 228, 157, 0.46);
}

.hint-line {
  min-height: 40px;
  margin: 0 0 12px;
  color: #8a4e25;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.answer-box {
  display: grid;
  gap: 7px;
  text-align: left;
}

.answer-box span {
  color: #8a3411;
  font-size: 13px;
  font-weight: 900;
}

.answer-box input {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid rgba(150, 78, 23, 0.34);
  border-radius: 12px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.88);
  outline: none;
}

.answer-box input:focus {
  border-color: #f2852b;
  box-shadow: 0 0 0 4px rgba(255, 197, 67, 0.24);
}

.question-card.has-options .answer-box,
.question-card.has-options .submit-btn {
  display: none;
}

.submit-btn {
  min-height: 54px;
  margin-top: 12px;
  font-size: 19px;
}

.option-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: auto;
  padding-top: 18px;
}

.option-btn {
  position: relative;
  min-height: 58px;
  padding: 8px 10px;
  border: 0;
  border-radius: 0;
  color: #743110;
  font-size: 15px;
  font-weight: 950;
  background: var(--btn-cream) center / 100% 100% no-repeat;
  filter: drop-shadow(0 7px 10px rgba(0, 0, 0, 0.2));
}

.option-btn span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-right: 6px;
  border-radius: 50%;
  color: #955113;
  background: #f9d9a0;
}

.option-btn.is-answer {
  color: #fff8d9;
  background-image: var(--btn-green);
  filter: drop-shadow(0 7px 10px rgba(0, 0, 0, 0.24));
}

.option-btn.is-picked-wrong {
  color: #fff8d9;
  background-image: var(--btn-red);
  filter: drop-shadow(0 7px 10px rgba(0, 0, 0, 0.24));
}

.option-btn.is-answer span,
.option-btn.is-picked-wrong span {
  color: #8a3a11;
  background: rgba(255, 236, 174, 0.92);
}

.tool-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.tool-btn {
  min-height: 48px;
  padding: 6px;
  border: 0;
  border-radius: 0;
  color: #fff8d9;
  font-size: 14px;
  font-weight: 950;
  background: var(--btn-green) center / 100% 100% no-repeat;
  filter: drop-shadow(0 7px 10px rgba(0, 0, 0, 0.24));
}

.tool-btn small {
  display: block;
  font-size: 11px;
  opacity: 0.86;
}

.tool-btn.warning {
  background-image: var(--btn-red);
}

.feedback-panel {
  position: fixed;
  z-index: 25;
  top: 50%;
  left: 50%;
  width: min(360px, calc(100vw - 44px));
  margin: 0;
  padding: 18px 20px;
  border: 0;
  border-radius: 0;
  background: var(--panel-red) center / 100% 100% no-repeat;
  color: #fff2ca;
  text-align: center;
  filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.28));
  transform: translate(-50%, -50%);
}

.feedback-title {
  font-size: 22px;
  font-weight: 950;
}

.feedback-panel p {
  margin: 8px 0 12px;
  color: #ffe7a9;
  font-size: 14px;
  line-height: 1.5;
}

.feedback-panel .compact {
  width: 100%;
}

.result-hero {
  display: grid;
  place-items: center;
  min-height: 236px;
  margin-top: 18px;
  text-align: center;
}

.result-ribbon {
  width: min(104%, 390px);
  aspect-ratio: 1898 / 557;
  transform: rotate(-2deg);
  background: url("../assets/ui/ribbon-pass.png") center / contain no-repeat;
  filter: drop-shadow(0 16px 18px rgba(56, 17, 0, 0.34));
}

.result-stars {
  display: grid;
  place-items: center;
  min-height: 76px;
  animation: starGlow 880ms ease both;
}

.result-stars .star-strip {
  width: min(76vw, 260px);
}

@keyframes starGlow {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.result-card {
  padding: 18px;
  border: 3px solid #c98230;
  border-radius: var(--radius);
  text-align: center;
  background: linear-gradient(180deg, rgba(255, 248, 229, 0.98), rgba(255, 226, 169, 0.98));
  box-shadow: var(--shadow);
}

.result-card h2 {
  margin: 0;
  color: #8b3611;
}

.result-card > strong {
  display: block;
  margin: 8px 0;
  color: #e45c18;
  font-size: 50px;
  line-height: 1;
  text-shadow: 0 2px 0 #fff0c5;
}

.result-card p {
  margin: 0 0 10px;
  color: var(--muted);
  font-weight: 800;
}

.answer-review {
  display: grid;
  gap: 6px;
}

.review-row {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 8px;
  align-items: center;
  min-height: 34px;
  padding: 6px 8px;
  border-radius: 11px;
  color: #8a3411;
  background: rgba(255, 255, 255, 0.48);
}

.review-row.is-ok {
  color: #146444;
  background: rgba(206, 246, 197, 0.72);
}

.review-row strong {
  font-family: var(--emoji-font);
  font-size: 20px;
  text-align: left;
}

.review-row em {
  font-style: normal;
  font-weight: 900;
}

.leaderboard {
  display: grid;
  gap: 10px;
  margin: 26px 0 18px;
  padding: 0;
  list-style: none;
}

.leaderboard li {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  min-height: 62px;
  padding: 10px 22px;
  border: 0;
  border-radius: 0;
  color: #7b3512;
  background: var(--btn-cream) center / 100% 100% no-repeat;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.22));
}

.leaderboard li.is-player {
  background-image: var(--btn-green);
}

.leaderboard li.is-loading {
  grid-template-columns: 1fr;
  justify-items: center;
}

.leaderboard span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #fff;
  font-weight: 950;
  background: #e7831f;
}

.leaderboard strong {
  font-size: 17px;
}

.leaderboard em {
  font-style: normal;
  font-weight: 950;
}

.modal-layer {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: transparent;
}

.modal-card {
  position: relative;
  width: min(390px, 100%);
  padding: 22px;
  border: 3px solid #c98230;
  border-radius: var(--radius);
  color: var(--ink);
  background: linear-gradient(180deg, #fff8e4, #ffdfa6);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
}

.modal-card h2 {
  margin: 0 0 12px;
  color: #8a3411;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  background: #d7582c;
}

.rule-list {
  margin: 0;
  padding-left: 18px;
  color: #71411e;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.65;
}

.analysis-block {
  color: #71411e;
  font-size: 15px;
  line-height: 1.6;
}

.analysis-emoji {
  margin-bottom: 12px;
  font-family: var(--emoji-font);
  font-size: 44px;
  text-align: center;
}

.nickname-form {
  display: grid;
  gap: 16px;
}

.nickname-form label {
  display: grid;
  gap: 8px;
  color: #8a3411;
  font-size: 14px;
  font-weight: 900;
}

.nickname-form input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 2px solid rgba(150, 78, 23, 0.34);
  border-radius: 14px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.9);
  outline: none;
}

.nickname-form input:focus {
  border-color: #f2852b;
  box-shadow: 0 0 0 4px rgba(255, 197, 67, 0.24);
}

.toast {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: 22px;
  max-width: min(360px, calc(100vw - 36px));
  padding: 11px 16px;
  border-radius: 999px;
  color: #fff8d9;
  font-size: 14px;
  font-weight: 900;
  background: rgba(7, 25, 46, 0.9);
  border: 1px solid rgba(255, 225, 160, 0.45);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.design-page {
  min-height: 100vh;
  color: var(--ink);
  background: #081b36;
}

.design-wrap {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 36px 0 56px;
}

.design-hero {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px;
  align-items: center;
  color: #fff3cf;
}

.design-hero h1 {
  font-size: clamp(44px, 8vw, 80px);
}

.design-hero p {
  max-width: 560px;
  color: #ffe3a3;
  font-size: 18px;
  line-height: 1.6;
}

.concept-image {
  width: 100%;
  border-radius: 18px;
  border: 2px solid rgba(255, 220, 151, 0.42);
  box-shadow: var(--shadow);
}

.design-section {
  margin-top: 32px;
  padding: 24px;
  border-radius: 18px;
  background: #fff3d3;
}

.design-section h2 {
  margin: 0 0 16px;
  color: #81320e;
}

.token-grid,
.component-grid,
.flow-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.token,
.component-demo,
.flow-card {
  min-height: 92px;
  padding: 14px;
  border: 1px solid rgba(124, 70, 23, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.56);
}

.swatch {
  height: 36px;
  margin-bottom: 10px;
  border-radius: 8px;
}

.prototype-shell {
  max-width: 980px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 34px 18px;
}

.prototype-shell h1 {
  font-size: clamp(40px, 8vw, 72px);
  text-align: center;
}

.proto-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 28px;
}

.proto-phone {
  min-height: 520px;
  padding: 18px;
  border: 3px solid #d69b4a;
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(8, 27, 54, 0.08), rgba(8, 27, 54, 0.24)),
    var(--bg-game) center / cover no-repeat;
  box-shadow: var(--shadow);
}

.proto-phone h2 {
  color: #fff8d9;
  text-shadow: 0 3px 0 #7e2d11;
}

.proto-panel {
  margin-top: 16px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 243, 211, 0.94);
}

.proto-button {
  display: grid;
  place-items: center;
  min-height: 44px;
  margin-top: 10px;
  border-radius: 0;
  color: #fff8d9;
  font-weight: 950;
  background: var(--btn-red) center / 100% 100% no-repeat;
}

@media (max-width: 780px) {
  .design-hero,
  .token-grid,
  .component-grid,
  .flow-grid,
  .proto-grid {
    grid-template-columns: 1fr;
  }

  .proto-phone {
    min-height: 440px;
  }
}

@media (max-width: 380px) {
  .screen {
    padding-left: 12px;
    padding-right: 12px;
  }

  .emoji-prompt {
    font-size: 42px;
  }

  .option-btn {
    font-size: 14px;
  }

  .tool-btn {
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
