:root {
  color-scheme: light;
  --ink: #17201d;
  --muted: #66716d;
  --paper: #f7f4ee;
  --panel: #ffffff;
  --line: #ded8ce;
  --green: #2f6f5e;
  --green-dark: #214e44;
  --gold: #d99a2b;
  --red: #c65a44;
  --blue: #386d95;
  --shadow: 0 24px 70px rgba(37, 31, 23, 0.13);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(47, 111, 94, 0.12), transparent 38%),
    linear-gradient(315deg, rgba(217, 154, 43, 0.16), transparent 34%),
    var(--paper);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Microsoft YaHei", sans-serif;
}

button,
select {
  font: inherit;
}

.app-shell {
  width: min(1120px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 0;
  display: grid;
  place-items: center;
}

.panel {
  width: 100%;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(222, 216, 206, 0.9);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: clamp(18px, 3vw, 30px);
}

.hidden {
  display: none;
}

.brand-row,
.game-header,
.result-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand-row {
  justify-content: flex-start;
  margin-bottom: 18px;
}

.mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--green);
  border-radius: 8px;
  font-size: 21px;
  font-weight: 800;
  box-shadow: inset 0 -8px 0 rgba(0, 0, 0, 0.12);
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(24px, 3.2vw, 38px);
  line-height: 1.12;
  letter-spacing: 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.72fr);
  gap: clamp(18px, 3vw, 34px);
  align-items: center;
}

.hero-copy p,
.result-subtitle {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
  max-width: 650px;
}

.briefcase-visual {
  position: relative;
  min-height: 220px;
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(160deg, rgba(56, 109, 149, 0.18), rgba(47, 111, 94, 0.08)),
    #f2eadf;
  border: 1px solid var(--line);
}

.briefcase-visual::before {
  content: "";
  position: absolute;
  left: 14%;
  right: 14%;
  bottom: 24px;
  height: 66px;
  border-radius: 6px 6px 18px 18px;
  background: #775f49;
  box-shadow:
    inset 0 18px #9b7a5f,
    0 22px 45px rgba(39, 31, 24, 0.22);
}

.briefcase-visual::after {
  content: "";
  position: absolute;
  left: 41%;
  bottom: 84px;
  width: 18%;
  height: 30px;
  border: 7px solid #775f49;
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
}

.desk-card {
  position: absolute;
  top: 28px;
  left: 28px;
  width: 160px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 8px;
  transform: rotate(-4deg);
}

.desk-line {
  width: 100%;
  height: 8px;
  margin-bottom: 9px;
  background: #d8d0c4;
  border-radius: 999px;
}

.desk-line.short {
  width: 58%;
}

.stamp {
  width: 68px;
  padding: 6px 0;
  color: var(--red);
  border: 3px solid var(--red);
  border-radius: 4px;
  text-align: center;
  font-weight: 900;
  transform: rotate(10deg);
}

.chat-bubble {
  position: absolute;
  max-width: 188px;
  padding: 10px 12px;
  color: #fff;
  border-radius: 8px;
  font-weight: 700;
  line-height: 1.45;
}

.chat-bubble.left {
  right: 24px;
  top: 42px;
  background: var(--green);
}

.chat-bubble.right {
  right: 38px;
  bottom: 82px;
  background: var(--blue);
}

.setup {
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.setup-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.setup-head span {
  color: var(--ink);
  font-size: 17px;
  font-weight: 900;
}

.setup-head small {
  color: var(--muted);
  font-weight: 700;
}

.scenario-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.scenario-card {
  min-height: 108px;
  padding: 14px;
  color: var(--ink);
  background: #f8f6f1;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
}

.scenario-card[aria-checked="true"] {
  background: #eaf1ed;
  border-color: var(--green);
  box-shadow: inset 0 0 0 2px rgba(47, 111, 94, 0.16);
}

.scenario-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 16px;
}

.scenario-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.scenario-card em {
  display: inline-block;
  margin-top: 9px;
  color: var(--green-dark);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.primary-action,
.ghost-action,
.choice-button {
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.primary-action {
  min-height: 48px;
  padding: 0 20px;
  color: #fff;
  background: var(--green);
  font-weight: 900;
  box-shadow: 0 14px 28px rgba(47, 111, 94, 0.24);
}

.primary-action:hover,
.choice-button:hover,
.ghost-action:hover {
  transform: translateY(-1px);
}

.primary-action:active,
.choice-button:active,
.ghost-action:active {
  transform: translateY(0);
}

.game-panel {
  max-width: 960px;
}

.game-header h2 {
  margin-bottom: 0;
  font-size: clamp(26px, 4vw, 42px);
}

.ghost-action {
  min-width: 78px;
  min-height: 40px;
  color: var(--green-dark);
  background: #eaf1ed;
  font-weight: 900;
}

.scoreboard {
  margin: 26px 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.meter-card {
  min-height: 78px;
  padding: 14px;
  background: #f8f6f1;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.meter-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.meter-card strong {
  display: block;
  margin-top: 7px;
  font-size: 29px;
  line-height: 1;
}

.conversation {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.avatar {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--red);
  border-radius: 8px;
  font-size: 17px;
  font-weight: 900;
}

.dialogue-card {
  min-height: 148px;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.dialogue-card p {
  margin-bottom: 0;
  font-size: 20px;
  line-height: 1.75;
}

.choices {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.choice-button {
  width: 100%;
  padding: 16px 18px;
  color: var(--ink);
  background: #f8f6f1;
  border: 1px solid var(--line);
  text-align: left;
  font-weight: 800;
  line-height: 1.55;
}

.choice-button:hover {
  background: #eef4f0;
  border-color: #b7c8bf;
}

.feedback {
  min-height: 52px;
  margin-top: 16px;
  color: var(--green-dark);
  font-weight: 800;
  line-height: 1.6;
}

.result-panel {
  max-width: 820px;
}

.result-panel h2 {
  margin-bottom: 12px;
}

.result-score {
  margin: 26px 0 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.score-line,
.advice-item {
  padding: 14px 16px;
  background: #f8f6f1;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.score-line {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-weight: 800;
}

.result-advice {
  display: grid;
  gap: 10px;
  margin-bottom: 24px;
}

.advice-item {
  color: var(--muted);
  line-height: 1.65;
}

@media (max-width: 780px) {
  .app-shell {
    width: min(100% - 20px, 1120px);
    padding: 10px 0;
    align-items: start;
  }

  .panel {
    padding: 20px;
  }

  .brand-row,
  .game-header {
    align-items: flex-start;
  }

  .hero-grid,
  .setup,
  .conversation {
    grid-template-columns: 1fr;
  }

  .scenario-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .briefcase-visual {
    min-height: 210px;
  }

  .setup {
    gap: 10px;
  }

  .scoreboard,
  .result-score {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .scoreboard {
    margin: 14px 0;
    gap: 8px;
  }

  .meter-card {
    min-height: 46px;
    padding: 9px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .meter-card span {
    font-size: 12px;
  }

  .meter-card strong {
    margin-top: 0;
    font-size: 22px;
  }

  .avatar {
    width: 48px;
    height: 48px;
  }

  .dialogue-card p {
    font-size: 17px;
  }
}

@media (max-width: 430px) {
  .result-score {
    grid-template-columns: 1fr;
  }

  .brand-row,
  .result-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .game-header {
    align-items: flex-start;
  }

  .ghost-action {
    min-width: 58px;
    min-height: 34px;
    padding: 0 12px;
  }

  .mark {
    width: 38px;
    height: 38px;
  }
}

@media (max-width: 560px) {
  .app-shell {
    width: min(100% - 16px, 1120px);
    padding: 8px 0;
  }

  .intro-panel {
    padding: 16px;
  }

  .brand-row {
    gap: 12px;
    margin-bottom: 14px;
  }

  h1 {
    font-size: 34px;
  }

  h2 {
    font-size: 23px;
  }

  .hero-copy p {
    font-size: 14px;
    line-height: 1.55;
  }

  .briefcase-visual {
    display: none;
  }

  select,
  .primary-action {
    min-height: 44px;
  }

  .setup-head {
    display: block;
  }

  .setup-head small {
    display: block;
    margin-top: 3px;
  }

  .scenario-options {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .scenario-card {
    min-height: auto;
    padding: 12px;
  }
}
