:root {
  font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #233a35;
  background: #f1eee4;
  font-synthesis: none;
  --green: #315c4b;
  --cream: #faf7ef;
  --muted: #7e8a7c;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
a,
input,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.5;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid #d2a646;
  outline-offset: 4px;
}
button {
  border: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
.topbar {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4vw;
  border-bottom: 1px solid #d9ddcf;
}
.brand {
  font-family: Georgia, serif;
  font-size: 30px;
  letter-spacing: -2px;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand span {
  font-family: inherit;
  font-weight: normal;
  font-size: 17px;
  letter-spacing: 0;
}
.chapter {
  font-size: 10px;
  letter-spacing: 3px;
  color: #798377;
}
.top-actions {
  display: flex;
  gap: 10px;
}
.icon-button {
  background: transparent;
  color: #687468;
  font-size: 12px;
  padding: 9px;
}
.game-shell {
  display: grid;
  grid-template-columns: minmax(400px, 1.16fr) minmax(420px, 1fr);
  max-width: 1390px;
  margin: 30px auto;
  min-height: 760px;
  max-height: 960px;
  width: 92%;
  border: 1px solid #d7d9cb;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 14px 40px #3447380a;
}
.world {
  background: #24393e;
  color: #f4eacf;
  position: relative;
  overflow: hidden;
  min-height: 760px;
  display: flex;
  flex-direction: column;
}
.episode {
  position: relative;
  z-index: 1;
  padding: 40px 38px 10px;
  pointer-events: none;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2.4px;
  font-weight: 600;
}
.episode .eyebrow {
  color: #b9c5ae;
}
.episode h1 {
  font-size: 27px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 3px;
  margin: 22px 0 14px;
}
.episode h1 span {
  display: block;
  font-family: Georgia, serif;
  font-size: clamp(40px, 4vw, 66px);
  font-weight: normal;
  letter-spacing: -2px;
}
.episode p {
  font-size: 13px;
  line-height: 1.9;
  color: #bdc9bc;
}
.scene-status {
  position: absolute;
  left: 38px;
  top: 315px;
  font-size: 9px;
  letter-spacing: 1.7px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
}
.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d0b561;
  box-shadow: 0 0 10px #d0b56155;
}
.station {
  position: absolute;
  width: 115%;
  height: auto;
  bottom: 65px;
  left: -7%;
}
.world-footer {
  position: relative;
  margin-top: auto;
  padding: 25px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #ffffff17;
  background: #203638;
  z-index: 2;
  font-size: 11px;
  line-height: 1.8;
  color: #adbdaf;
}
.world-footer strong {
  font-weight: 400;
  color: #e8d8a8;
}
.scene-stamp {
  font-family: Georgia, serif;
  text-align: center;
  border: 1px solid #a5b19766;
  border-radius: 50%;
  padding: 14px;
  font-size: 9px;
  letter-spacing: 1px;
  transform: rotate(-10deg);
}
.play-panel {
  background: var(--cream);
  overflow-y: auto;
  padding: 34px 32px 14px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 760px;
  max-height: 960px;
}
.mission-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mission-head .eyebrow {
  color: #8e9279;
}
.mission-head h2 {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 1px;
  margin: 11px 0 0;
}
.chances {
  white-space: nowrap;
  letter-spacing: 6px;
  color: #bd8d64;
  font-size: 19px;
}
.chances .empty {
  color: #ded8c8;
}
.mission-copy {
  font-size: 12px;
  line-height: 1.9;
  color: #7b8272;
  margin: 13px 0 18px;
}
.notebook {
  background: #eee9d9;
  border: 1px solid #e4ddc8;
  border-radius: 7px;
  padding: 11px 14px;
  font-size: 12px;
  margin-bottom: 22px;
}
.notebook summary {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  list-style: none;
}
.notebook summary::-webkit-details-marker {
  display: none;
}
.notebook summary span {
  color: #93937b;
  font-size: 10px;
}
.notes {
  display: flex;
  flex-direction: column;
  gap: 8px;
  line-height: 1.6;
  padding-top: 12px;
}
.notes small {
  color: #898874;
}
.character-bar {
  border-top: 1px solid #dedfce;
  border-bottom: 1px solid #dedfce;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 14px 0;
}
.avatar {
  display: grid;
  place-items: center;
  background: #d9e1cf;
  color: #48624b;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-family: Georgia, serif;
  font-size: 19px;
}
.character-bar strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
}
.character-bar div > span {
  font-size: 9px;
  color: #8b9180;
  display: block;
  margin-top: 4px;
}
.connection {
  margin-left: auto;
  font-size: 9px;
  color: #a58e63;
}
.connection.ready {
  color: #568066;
}
.conversation {
  flex: 1;
  min-height: 200px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #d3d9c9 transparent;
  padding: 18px 0 8px;
  overscroll-behavior: contain;
}
.welcome {
  text-align: center;
  min-height: 210px;
  padding: 22px 4px;
}
.welcome-spark {
  display: block;
  color: #c3a65e;
  font-size: 30px;
}
.welcome h3 {
  font-size: 18px;
  font-weight: 400;
  margin: 14px 0;
}
.welcome p {
  font-size: 12px;
  line-height: 2;
  color: #8a907f;
}
.start-button {
  background: var(--green);
  color: #f4eedc;
  padding: 13px 22px;
  border-radius: 6px;
  font-size: 13px;
  margin: 6px 0 15px;
  min-width: 185px;
  display: inline-flex;
  justify-content: space-between;
  gap: 25px;
}
.welcome small {
  display: block;
  font-size: 9px;
  color: #9a9c8a;
}
.message {
  max-width: 94%;
  margin-bottom: 17px;
  animation: arrive 0.25s ease;
}
.message.user {
  margin-left: auto;
  max-width: 90%;
}
.message-label {
  display: flex;
  justify-content: space-between;
  color: #969c89;
  font-size: 9px;
  letter-spacing: 1px;
  padding-bottom: 6px;
}
.message.user .message-label {
  text-align: right;
  justify-content: flex-end;
}
.bubble {
  font-size: 14px;
  line-height: 1.7;
  padding: 13px 16px;
  border-radius: 0 12px 12px 12px;
  border: 1px solid #e3e6d8;
  background: #fffef9;
  color: #3d4c41;
  overflow-wrap: anywhere;
}
.user .bubble {
  border-radius: 12px 0 12px 12px;
  background: #e6ecdf;
  border-color: #dce5d4;
}
.event {
  padding: 8px 10px;
  border-left: 2px solid #c6ab60;
  color: #7c8066;
  font-size: 10px;
  line-height: 1.7;
  margin: 0 0 15px;
}
.composer {
  border-top: 1px solid #e4e5d8;
  padding-top: 15px;
}
.voice-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.record-button {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--green);
  color: #f4f2df;
  border-radius: 30px;
  padding: 11px 20px;
  font-size: 12px;
  min-height: 43px;
}
.record-button svg {
  width: 16px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}
.record-button.recording {
  background: #b36250;
  animation: pulse 1.5s infinite;
}
.voice-row > span {
  margin-left: auto;
  color: #959982;
  font-size: 9px;
  letter-spacing: 1.3px;
}
.privacy-note {
  font-size: 9px;
  color: #9a9d89;
  line-height: 1.6;
  margin: 9px 0 10px;
}
.input-wrap {
  display: flex;
  align-items: center;
  border: 1px solid #d4dbc9;
  background: #fffef8;
  border-radius: 8px;
  padding: 8px 9px 8px 13px;
  gap: 8px;
}
.input-wrap:focus-within {
  border-color: #6a896d;
}
.input-wrap textarea {
  width: 100%;
  border: 0;
  outline: 0;
  resize: vertical;
  min-height: 44px;
  max-height: 100px;
  background: transparent;
  line-height: 1.6;
  font: inherit;
  font-size: 12px;
  color: #314c40;
}
.input-wrap textarea::placeholder {
  color: #a3a796;
}
.input-wrap button {
  background: #e3e8da;
  color: #3e634f;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  font-size: 20px;
}
.composer-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 9px;
}
.text-button {
  background: transparent;
  color: #879078;
  font-size: 10px;
  padding: 5px 0;
}
.hints {
  background: #eeeede;
  padding: 10px;
  border-radius: 6px;
  margin-top: 5px;
}
.hints p {
  font-size: 10px;
  color: #7c836d;
  margin: 0 0 8px;
}
.hints button {
  display: block;
  text-align: left;
  background: transparent;
  color: #47715b;
  font-size: 11px;
  padding: 5px 0;
}
.notice {
  padding: 10px 12px;
  font-size: 11px;
  line-height: 1.6;
  background: #f4e8d8;
  color: #906342;
  border-radius: 5px;
  margin-bottom: 10px;
}
.outcome {
  padding: 20px;
  background: #e3ead9;
  border: 1px solid #ccd8bf;
  border-radius: 8px;
  margin-bottom: 12px;
}
.outcome h3 {
  font:
    25px Georgia,
    serif;
  margin: 0 0 7px;
}
.outcome p {
  font-size: 12px;
  line-height: 1.8;
  margin: 0 0 10px;
}
.outcome button {
  padding: 8px 13px;
  border-radius: 5px;
  background: var(--green);
  color: white;
  font-size: 11px;
}
.outcome.lost {
  background: #f3e5d9;
  border-color: #e4cbb6;
}
.panel-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  border-top: 1px solid #e2e5d6;
  padding: 13px 0 0;
}
.panel-footer > span {
  font-size: 8px;
  letter-spacing: 1.5px;
  color: #a2a58e;
}
.hidden {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@keyframes arrive {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes pulse {
  50% {
    box-shadow: 0 0 0 6px #b3625017;
  }
}
@media (min-width: 1100px) and (max-height: 850px) {
  .game-shell {
    min-height: calc(100vh - 120px);
    height: calc(100vh - 120px);
    margin: 20px auto;
  }
  .world,
  .play-panel {
    min-height: 0;
    max-height: none;
  }
  .episode {
    padding: 25px 30px 0;
  }
  .episode h1 {
    margin: 12px 0 8px;
  }
  .episode h1 span {
    font-size: 48px;
  }
  .episode p {
    font-size: 11px;
    margin: 0;
  }
  .scene-status {
    top: 225px;
    left: 30px;
  }
  .station {
    bottom: 40px;
  }
  .world-footer {
    padding: 15px 25px;
  }
  .play-panel {
    padding: 23px 25px 10px;
  }
  .mission-copy {
    margin: 10px 0;
  }
  .notebook {
    margin-bottom: 12px;
  }
  .character-bar {
    padding: 10px 0;
  }
  .welcome {
    padding: 8px 0;
    min-height: 170px;
  }
  .conversation {
    min-height: 120px;
  }
  .welcome h3 {
    margin: 8px 0;
  }
  .welcome p {
    margin: 8px 0;
  }
  .privacy-note {
    font-size: 8px;
  }
  .panel-footer {
    margin-top: 8px;
    padding-top: 8px;
  }
}
@media (max-width: 900px) {
  .topbar {
    height: 62px;
    padding: 0 20px;
  }
  .chapter {
    display: none;
  }
  .brand {
    font-size: 26px;
  }
  .brand span {
    font-size: 14px;
  }
  .icon-button {
    font-size: 10px;
    padding: 7px;
  }
  .game-shell {
    grid-template-columns: 1fr;
    width: calc(100% - 24px);
    margin: 14px auto;
    max-height: none;
    min-height: 0;
    border-radius: 12px;
  }
  .world {
    min-height: 390px;
  }
  .episode {
    padding: 25px;
  }
  .episode h1 {
    font-size: 20px;
    margin: 12px 0;
  }
  .episode h1 span {
    font-size: 42px;
  }
  .episode p {
    font-size: 11px;
    margin: 0;
  }
  .station {
    width: 80%;
    left: 28%;
    bottom: 0;
  }
  .scene-status {
    top: auto;
    bottom: 22px;
    left: 25px;
    max-width: 200px;
    line-height: 1.5;
  }
  .world-footer {
    display: none;
  }
  .play-panel {
    min-height: 640px;
    max-height: none;
    padding: 25px 22px 15px;
  }
  .conversation {
    max-height: 420px;
    min-height: 210px;
  }
  .mission-head h2 {
    font-size: 22px;
  }
  .chances {
    font-size: 17px;
  }
  .character-bar div > span {
    font-size: 8px;
  }
  .voice-row > span {
    font-size: 8px;
  }
  .record-button {
    padding: 11px 15px;
  }
  .connection {
    font-size: 8px;
  }
  .privacy-note {
    font-size: 9px;
  }
  .panel-footer {
    margin-top: 12px;
  }
}
@media (max-width: 430px) {
  .world {
    min-height: 320px;
  }
  .episode h1 span {
    font-size: 35px;
  }
  .episode p {
    max-width: 170px;
  }
  .station {
    width: 99%;
    left: 21%;
    bottom: -13px;
  }
  .scene-status {
    bottom: 17px;
    max-width: 170px;
    font-size: 8px;
  }
  .episode .eyebrow {
    font-size: 8px;
  }
  .play-panel {
    padding: 22px 18px 12px;
  }
  .top-actions {
    gap: 2px;
  }
  .topbar {
    padding: 0 15px;
  }
}
