@import url("./ui/conversation.css");
@import url("./ui/lesson-guide.css");
@import url("./ui/tutorial.css");
@import url("./ui/guide.css");
@font-face {
  font-family: Sarabun;
  src: url("/fonts/sarabun-thai-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0E00-0E7F;
}
@font-face {
  font-family: Sarabun;
  src: url("/fonts/sarabun-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0000-00FF;
}
@font-face {
  font-family: Sarabun;
  src: url("/fonts/sarabun-thai-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
  unicode-range: U+0E00-0E7F;
}
@font-face {
  font-family: Sarabun;
  src: url("/fonts/sarabun-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
  unicode-range: U+0000-00FF;
}
@font-face {
  font-family: Kanit;
  src: url("/fonts/kanit-thai-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
  unicode-range: U+0E00-0E7F;
}
@font-face {
  font-family: Kanit;
  src: url("/fonts/kanit-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
  unicode-range: U+0000-00FF;
}
:root {
  --ink: #243c36;
  --muted: #6f7a70;
  --green: #21584d;
  --paper: #f5f1e7;
  --white: #fffdf8;
  --line: #dedfd2;
  --coral: #dc7657;
  --gold: #d9ae52;
  --shadow: 0 8px 30px #294a3a0a;
  font-family:
    Sarabun, "PingFang TC", "Noto Sans CJK TC", "Microsoft JhengHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  line-height: 1.65;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select,
summary {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  transition:
    background 0.16s,
    transform 0.16s;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 10px;
  padding: 10px 15px;
  color: var(--ink);
  min-height: 44px;
  font-size: 0.875rem;
  font-weight: 700;
}
button:hover {
  background: #eeeee2;
  transform: translateY(-1px);
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid #ce9a33;
  outline-offset: 3px;
}
a {
  color: var(--green);
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1,
h2,
h3 {
  line-height: 1.45;
}
h2 {
  font-size: 1.375rem;
}
h3 {
  font-size: 1.125rem;
}
p {
  margin-bottom: 15px;
}
small,
.small {
  font-size: 0.75rem;
}
strong {
  font-weight: 700;
}
.muted {
  color: var(--muted);
}
.thai {
  font-family: Sarabun, "Leelawadee UI", sans-serif;
  line-height: 1.8;
}
.roman {
  font-size: 0.875rem;
  color: var(--muted);
}
.eyebrow {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 2.1px;
  color: #6d7f6e;
}
.dot {
  width: 7px;
  height: 7px;
  display: inline-block;
  background: var(--coral);
  border-radius: 50%;
  margin-right: 7px;
}
.primary {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
  box-shadow: 0 4px 0 #163f36;
}
.primary:hover {
  background: #163f36;
}
.secondary {
  background: #fffdf7;
  color: var(--green);
  border-color: #cad4c7;
}
.text-button,
.nav-link {
  background: transparent;
  border: 0;
  color: var(--green);
}
.text-button:hover,
.nav-link:hover {
  background: #e6ebde;
}
.large {
  padding: 15px 22px;
  font-size: 1rem;
  min-height: 56px;
}
.full {
  display: block;
  width: 100%;
  margin-top: 12px;
}
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  background: #eaf0e3;
  color: var(--green);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  white-space: normal;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.skip {
  position: fixed;
  top: 4px;
  left: 4px;
  z-index: 100;
  transform: translateY(-150%);
  padding: 10px;
  background: #fff;
}
.skip:focus {
  transform: none;
}
.site-header {
  max-width: 1480px;
  padding: 22px 40px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #dedfd2aa;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-size: 1.25rem;
  letter-spacing: 1px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
}
.brand small {
  display: block;
  font-size: 0.5625rem;
  letter-spacing: 2.5px;
  font-family: Kanit, sans-serif;
  color: #647365;
}
.site-header nav {
  display: flex;
  align-items: center;
  gap: 13px;
}
.nav-link {
  font-size: 0.8125rem;
  padding: 8px;
}
.icon-button {
  font-size: 0.875rem;
  border-radius: 50%;
  min-width: 40px;
  padding: 5px;
  background: transparent;
}
.home-main {
  max-width: 1480px;
  margin: auto;
  padding: 0 40px;
}
.hero {
  min-height: 640px;
  display: grid;
  grid-template-columns: minmax(310px, 0.82fr) minmax(0, 1.4fr);
  align-items: center;
  gap: 20px;
  padding: 45px 0 25px;
}
.hero-copy {
  position: relative;
  z-index: 1;
  padding: 0 0 20px 26px;
}
.hero-thai {
  font-size: 1.4375rem;
  color: #aa7950;
  margin: 20px 0 10px;
}
.hero h1 {
  font-size: clamp(2rem, 3.4vw, 3.375rem);
  font-weight: 700;
  letter-spacing: -1.6px;
  line-height: 1.5;
  margin: 0 0 22px;
}
.hero h1 span {
  display: block;
  color: var(--green);
}
.hero-description {
  font-size: 0.9375rem;
  line-height: 1.95;
  color: #687567;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
}
.hero-actions .primary span {
  margin-left: 18px;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 13px;
  font-size: 0.625rem;
  color: #7d857a;
  margin-top: 26px;
}
.hero-world {
  position: relative;
  min-width: 0;
  transform: rotate(-1deg);
  padding: 30px 0 0;
}
.hero-world .bangkok-board-viewport {
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}
.hero-world .bangkok-board {
  min-width: 0 !important;
}
.postmark {
  position: absolute;
  right: 16px;
  top: -8px;
  z-index: 2;
  border: 1px solid #a9b4a6;
  border-radius: 50%;
  height: 112px;
  width: 112px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  transform: rotate(13deg);
  font-size: 0.625rem;
  color: #6f8374;
  outline: 1px dashed #a9b4a6;
  outline-offset: 5px;
  line-height: 1.8;
  background: #f5f1e7bd;
}
.postmark strong {
  font-size: 0.9375rem;
}
.postmark span {
  font-size: 0.4375rem;
}
.world-caption {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  margin: 12px auto 0;
  transform: rotate(1deg);
  color: #687567;
  font-size: 0.75rem;
}
.world-caption small {
  font-size: 0.625rem;
}
.journey-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  gap: 40px;
  padding: 30px 24px;
  background: #fffdf739;
}
.journey-strip article {
  display: flex;
  gap: 17px;
  align-items: flex-start;
}
.journey-strip b {
  font-family: Kanit, sans-serif;
  font-size: 1.875rem;
  color: #bcbea5;
  line-height: 1.1;
}
.journey-strip h2 {
  font-size: 1rem;
  margin-bottom: 6px;
}
.journey-strip p {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0;
  max-width: 260px;
}
.footer {
  font-size: 0.625rem;
  color: #7a8477;
  padding: 22px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer button {
  font-size: 0.6875rem;
}
.game-main {
  max-width: 1450px;
  margin: auto;
  padding: 25px 35px 50px;
}
.game-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 25px;
  margin-bottom: 20px;
}
.game-topline h1 {
  font-size: 1.5rem;
  margin: 6px 0 0;
  letter-spacing: 1px;
}
.round-meter {
  min-width: 180px;
  font-size: 0.75rem;
  color: var(--muted);
}
.round-meter strong {
  font-size: 1.5rem;
  color: var(--ink);
  padding: 0 4px;
}
progress {
  width: 100%;
  height: 5px;
  appearance: none;
  display: block;
  border: 0;
  border-radius: 4px;
  margin-top: 6px;
  background: #dedfce;
}
progress::-webkit-progress-bar {
  background: #dedfce;
  border-radius: 4px;
}
progress::-webkit-progress-value {
  background: var(--gold);
  border-radius: 4px;
}
.players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}
.player-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #fffdf78c;
  border: 1px solid var(--line);
  border-radius: 13px;
  position: relative;
  min-width: 0;
}
.player-card.active {
  background: var(--white);
  border-color: var(--player);
  box-shadow:
    inset 3px 0 var(--player),
    var(--shadow);
}
.player-title {
  min-width: 0;
}
.player-title strong {
  font-size: 0.875rem;
}
.player-title small {
  display: block;
  font-size: 0.625rem;
  color: var(--muted);
}
.player-cash {
  margin-left: auto;
  white-space: nowrap;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--green);
}
.player-cash small {
  display: block;
  text-align: right;
  font-size: 0.625rem;
  color: var(--muted);
  font-weight: 400;
}
.play-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 22px;
  align-items: start;
}
.board-panel {
  background: #fffcf5;
  border: 1px solid #e1dfd0;
  border-radius: 17px;
  overflow: hidden;
  box-shadow: var(--shadow);
  min-width: 0;
}
.board-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid #e3e3d6;
  gap: 5px;
}
.tabs {
  display: flex;
  gap: 5px;
}
.tabs button {
  border: 0;
  background: transparent;
  border-radius: 7px;
  font-size: 0.75rem;
  padding: 8px 13px;
  min-height: 36px;
  color: var(--muted);
}
.tabs button.active {
  background: #e7eddf;
  color: var(--green);
}
.board-toolbar > .text-button {
  font-size: 0.6875rem;
  padding: 8px;
}
.destination-banner {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 16px 18px 0;
  padding: 11px 15px;
  border: 1px solid #eddeb8;
  background: #fcf5e1;
  border-radius: 9px;
}
.destination-pin {
  font-size: 1.6875rem;
  color: #a67a2a;
}
.destination-banner small {
  display: block;
  font-size: 0.5625rem;
  color: #977c42;
}
.destination-banner strong {
  font-size: 0.875rem;
}
.destination-reward {
  margin-left: auto;
  color: #967b40;
  font-size: 0.625rem;
}
.board-viewport {
  padding: 5px 8px 0;
}
.board-viewport .bangkok-board-viewport {
  box-shadow: none;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.board-viewport .bangkok-board {
  font-family: Sarabun, "Microsoft JhengHei", sans-serif;
}
.board-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
  padding: 12px 20px 17px;
  font-size: 0.5625rem;
  color: var(--muted);
}
.board-legend small {
  font-size: 0.5625rem;
  flex-basis: 100%;
}
.board-legend i {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 5px;
}
.game-sidebar {
  display: grid;
  gap: 15px;
}
.turn-panel {
  background: var(--white);
  border: 1px solid #dfdfd0;
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px 0;
}
.panel-heading .eyebrow {
  font-size: 0.5625rem;
}
.turn-person {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 13px 18px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}
.turn-person h2 {
  font-size: 1.0625rem;
  margin: 0;
}
.turn-person small {
  font-size: 0.625rem;
  color: var(--muted);
}
.token-total {
  margin-left: auto;
  color: #b28e39;
  font-size: 1rem;
}
.turn-body {
  padding: 0 20px 21px;
}
.turn-body > p:first-child {
  font-size: 0.8125rem;
}
.turn-body h3 {
  font-size: 1.125rem;
}
.route-switch {
  display: flex;
  gap: 5px;
  margin: 14px 0;
}
.route-switch button {
  flex: 1;
  padding: 8px 4px;
  font-size: 0.625rem;
  min-height: 38px;
  color: #73816e;
  background: #f1f3e9;
  border: 1px solid transparent;
  border-radius: 6px;
}
.route-switch button.selected {
  border-color: #7a9982;
  background: #e3ecde;
  color: var(--green);
}
.dice-tray {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 23px 0 28px;
  background: radial-gradient(ellipse, #e9eddc 0, transparent 67%);
  margin-bottom: 10px;
}
.die {
  font-size: 4.375rem;
  line-height: 1.05;
  color: #f9faf4;
  background: var(--green);
  border-radius: 12px;
  width: 67px;
  height: 69px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow:
    0 5px 0 #163e36,
    5px 9px 15px #2f4b3824;
  font-family: Arial, sans-serif;
}
.die:nth-child(2) {
  transform: rotate(9deg);
  background: #d4815e;
  box-shadow:
    0 5px 0 #ae6247,
    5px 9px 15px #2f4b3824;
}
.rolling .die {
  animation: roll 0.5s ease-out;
}
.move-options {
  display: grid;
  gap: 10px;
}
.move-option {
  text-align: left;
  padding: 12px 14px;
  position: relative;
  background: #fffdf8;
}
.move-option:after {
  content: "→";
  position: absolute;
  right: 13px;
  top: 16px;
  color: var(--green);
}
.move-option strong {
  display: block;
  font-size: 0.875rem;
}
.move-option span {
  display: block;
  font-size: 0.75rem;
  color: #a47c42;
  margin: 3px 0;
}
.move-option small {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.625rem;
}
.question-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}
.question-label small {
  font-size: 0.625rem;
  color: var(--muted);
}
.prompt-thai {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 12px 0;
  line-height: 1.8;
  color: var(--green);
  overflow-wrap: anywhere;
}
.prompt-zh {
  font-size: 1.3125rem;
  font-weight: 700;
  line-height: 1.7;
}
.audio-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 15px;
}
.audio-button {
  border: 1px solid #c6d9cd;
  background: #edf4e9;
  font-size: 0.75rem;
  color: var(--green);
  min-height: 38px;
  padding: 8px 12px;
}
.roman-hint {
  font-size: 0.6875rem;
  color: var(--muted);
  flex-basis: 100%;
  padding: 7px 0;
}
.answer-options {
  display: grid;
  gap: 9px;
  margin: 16px 0;
}
.answer {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  background: #fffdf8;
  line-height: 1.6;
  font-size: 0.8125rem;
  font-weight: 400;
  padding: 12px;
}
.answer > span {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eceee2;
  border-radius: 5px;
  width: 23px;
  min-width: 23px;
  height: 23px;
  font-size: 0.6875rem;
  color: #7a866d;
}
.answer:hover {
  background: #edf2e5;
  border-color: #9dad93;
}
.answer.thai {
  font-size: 1.0625rem;
}
.feedback-icon {
  font-size: 2.1875rem;
  color: var(--gold);
  line-height: 1.5;
}
.feedback-icon.correct {
  color: var(--green);
}
.reward-line {
  padding: 12px 0;
  color: #8b7837;
  font-size: 0.75rem;
}
.journey-icon {
  font-size: 2.875rem;
  color: var(--gold);
}
.management-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 16px 0;
}
.management-actions button {
  font-size: 0.6875rem;
  padding: 9px 6px;
}
.price {
  font-family: Kanit, sans-serif;
  font-size: 2.3125rem;
  color: var(--green);
  margin: 10px 0;
}
.property-offer {
  display: flex;
  gap: 25px;
  padding: 15px 0;
  margin: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.property-offer span {
  font-size: 0.6875rem;
  color: var(--muted);
}
.property-offer strong {
  display: block;
  font-size: 1.3125rem;
  color: var(--green);
  margin-top: 5px;
}
.pocket-panel {
  background: #e9eddf;
  border: 1px solid #dde2d1;
  border-radius: 13px;
  padding: 14px 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.pocket-panel > div > span {
  display: block;
  font-size: 0.625rem;
  color: #6e7f68;
}
.pocket-panel > div > strong {
  font-size: 1.1875rem;
  color: var(--green);
}
.pocket-panel .pocket-actions {
  grid-column: 1/-1;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid #d5decb;
  padding-top: 8px;
}
.pocket-actions button {
  font-size: 0.625rem;
  padding: 6px;
  min-height: 32px;
}
.travel-log {
  padding: 24px 4px;
}
.travel-log h2 {
  font-size: 0.875rem;
  margin-bottom: 15px;
}
.travel-log h2 span {
  font-size: 0.5rem;
  letter-spacing: 2px;
  margin-left: 12px;
  color: #8a917f;
}
.travel-log > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 25px;
}
.travel-log p {
  font-size: 0.6875rem;
  color: #6a7869;
  margin: 4px 0;
}
.travel-log p > span {
  color: var(--coral);
  margin-right: 8px;
}
.travel-log > .text-button {
  font-size: 0.6875rem;
  padding: 5px 0;
}
.board-panel > .guide-shell {
  padding: 20px;
  max-height: 720px;
  overflow: auto;
}
dialog {
  border: 1px solid #d7dbcc;
  border-radius: 20px;
  padding: 0;
  max-width: 850px;
  width: calc(100% - 40px);
  max-height: 90dvh;
  background: #fffdf8;
  color: var(--ink);
  box-shadow: 0 35px 120px #183d3950;
  overscroll-behavior: contain;
}
dialog::backdrop {
  background: #1b3d376b;
  backdrop-filter: blur(5px);
}
.modal-top {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 28px 19px;
  background: #fffdf8ed;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.modal-top h2 {
  font-size: 1.375rem;
  margin: 5px 0 0;
}
.close-button {
  font-size: 1.6875rem;
  line-height: 1;
  padding: 4px 10px;
  width: 40px;
  flex: none;
  border: 0;
  background: #eff0e5;
  border-radius: 50%;
  margin-left: 10px;
}
.modal-content {
  padding: 25px 28px 30px;
}
label {
  font-size: 0.8125rem;
  display: block;
  color: #526c5c;
}
input:not([type="checkbox"]),
select {
  display: block;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #d3dbcd;
  border-radius: 8px;
  background: #fffefa;
  color: var(--ink);
  margin: 6px 0 13px;
  font-size: 0.875rem;
  min-height: 44px;
}
input[type="checkbox"] {
  accent-color: var(--green);
  width: 18px;
  height: 18px;
}
.setup-seats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.seat-option {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 0;
  background: #f7f7ec;
}
.seat-option > svg {
  flex-shrink: 0;
}
.seat-option > div {
  min-width: 0;
  flex: 1;
}
.seat-option input,
.seat-option select {
  margin-bottom: 7px;
  font-size: 0.75rem;
  padding: 7px;
  min-height: 36px;
}
.seat-option small {
  font-size: 0.625rem;
  color: var(--muted);
}
.setup-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
}
.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 5px 0 20px;
}
.help-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.help-steps article {
  background: #f2f4e8;
  padding: 18px;
  border-radius: 11px;
}
.help-steps b {
  font-family: Kanit, sans-serif;
  color: #a4b394;
  font-size: 2.0625rem;
}
.help-steps h3 {
  font-size: 1rem;
  margin: 10px 0;
}
.help-steps p {
  font-size: 0.75rem;
  color: var(--muted);
}
details {
  margin: 10px 0;
}
summary {
  cursor: pointer;
}
.rule-details {
  font-size: 0.8125rem;
  padding: 15px 0;
}
.rule-details p {
  margin-top: 13px;
}
.notebook-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px;
  background: #edf2e5;
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 0.75rem;
}
.notebook-summary strong {
  font-size: 1.5625rem;
  margin-right: 3px;
}
.notebook-filters {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 12px;
}
.lesson-list {
  display: grid;
  gap: 10px;
}
.lesson-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
}
.lesson-card > div {
  min-width: 0;
}
.lesson-card h3 {
  font-size: 1.3125rem;
  margin: 7px 0 3px;
  overflow-wrap: anywhere;
}
.lesson-card p {
  font-size: 0.8125rem;
  margin-bottom: 7px;
}
.lesson-card small {
  font-size: 0.6875rem;
}
.lesson-card > .audio-button {
  flex-shrink: 0;
}
.review-feedback {
  background: #eaf2e3;
  padding: 18px;
  border-radius: 10px;
}
.estate-list {
  display: grid;
  gap: 12px;
}
.estate-card {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 15px;
}
.estate-card h3 {
  margin: 4px 0 6px;
}
.estate-card p {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0;
}
.estate-card button {
  display: block;
  margin: 6px 0;
  font-size: 0.75rem;
}
.district-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 20px;
  font-size: 0.75rem;
}
.district-summary span {
  background: #edf2e5;
  padding: 12px;
  border-radius: 8px;
}
.district-summary b {
  float: right;
}
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
  background: #f2f4e8;
  border-radius: 12px;
}
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 13px;
}
.strategy-card {
  border: 1px solid #dbdbc7;
  border-radius: 12px;
  padding: 18px;
  background: linear-gradient(145deg, #f8f1dc, #fffcf3);
  text-align: center;
  display: flex;
  flex-direction: column;
}
.strategy-card h3 {
  font-size: 1rem;
  margin: 10px 0;
}
.strategy-card p {
  font-size: 0.75rem;
  color: #6d7a66;
  flex: 1;
}
.card-symbol {
  font-size: 2.1875rem;
  color: #bc8a39;
}
.strategy-card button {
  font-size: 0.75rem;
}
.finance-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px;
  background: #eff3e8;
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 0.875rem;
}
.stock-list {
  display: grid;
  gap: 10px;
}
.stock-list article {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.stock-list h3 {
  font-size: 1rem;
  margin: 0;
}
.stock-list p {
  font-size: 0.75rem;
  margin: 5px 0 0;
  color: var(--muted);
}
.button-row {
  display: flex;
  gap: 10px;
}
.settings-list label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.save-tools {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 25px 0 15px;
}
.file-button {
  padding: 10px 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  min-height: 44px;
  font-size: 0.875rem;
}
.full-log li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.8125rem;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.8125rem;
  text-align: center;
  margin: 15px 0;
}
td,
th {
  padding: 10px 5px;
  border: 1px solid var(--line);
}
th {
  background: #ecf0e3;
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  background: #203f36;
  color: #fff9e8;
  padding: 13px 24px;
  border-radius: 12px;
  box-shadow: 0 10px 40px #173d3926;
  z-index: 1000;
  font-size: 0.8125rem;
  max-width: min(90vw, 650px);
  transition: 0.2s;
}
#toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.results {
  max-width: 1150px;
  margin: 40px auto 80px;
  padding: 25px;
  text-align: center;
}
.result-medal {
  font-size: 5rem;
  color: var(--gold);
  line-height: 1.6;
}
.results h1 {
  font-size: 2.1875rem;
}
.results > p:not(.eyebrow) {
  font-size: 0.875rem;
  color: var(--muted);
}
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 20px;
  margin: 35px 0;
}
.result-card {
  padding: 25px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.result-card > svg {
  display: block;
  margin: 20px auto 10px;
}
.result-card h2 {
  font-size: 1.25rem;
}
.result-score {
  font-size: 2.5rem;
  font-family: Kanit, sans-serif;
  color: var(--green);
}
.result-card p {
  font-size: 0.75rem;
  margin-top: 15px;
  color: var(--muted);
}
.result-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
html.large-text {
  font-size: 112.5%;
}
.reduced-motion * {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
@keyframes roll {
  0% {
    transform: rotate(-30deg) translateY(-12px);
  }
  30% {
    transform: rotate(20deg) translateY(4px);
  }
  70% {
    transform: rotate(-10deg);
  }
  100% {
    transform: rotate(0);
  }
}
@keyframes arrival {
  from {
    filter: brightness(1.12);
  }
  to {
    filter: brightness(1);
  }
}
.arriving {
  animation: arrival 0.6s;
}
@media (min-width: 1600px) {
  .hero {
    min-height: 700px;
  }
  .hero-copy {
    padding-left: 40px;
  }
}
@media (max-width: 1100px) {
  .site-header {
    padding: 18px 25px;
  }
  .home-main {
    padding: 0 25px;
  }
  .hero {
    grid-template-columns: 0.85fr 1fr;
    gap: 0;
    min-height: 560px;
  }
  .hero-copy {
    padding-left: 5px;
  }
  .hero h1 {
    font-size: 2.3125rem;
  }
  .hero-world {
    margin-right: -15px;
  }
  .postmark {
    width: 90px;
    height: 90px;
    right: 15px;
    top: 0;
  }
  .world-caption {
    flex-direction: column;
    gap: 2px;
    font-size: 0.625rem;
  }
  .hero-meta {
    font-size: 0.5625rem;
  }
  .journey-strip {
    gap: 20px;
    padding: 25px 10px;
  }
  .play-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 15px;
  }
  .game-main {
    padding: 22px 20px;
  }
  .turn-body {
    padding: 0 16px 18px;
  }
  .player-card {
    padding: 10px;
  }
  .players-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .game-topline h1 {
    font-size: 1.375rem;
  }
  .destination-reward {
    font-size: 0.5625rem;
  }
  .board-viewport {
    padding: 0;
  }
  .board-legend {
    gap: 8px;
  }
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 800px) {
  .site-header {
    padding: 15px 18px;
  }
  .brand {
    font-size: 1.0625rem;
  }
  .site-header nav {
    gap: 4px;
  }
  .nav-link {
    font-size: 0.6875rem;
    padding: 6px;
  }
  .icon-button {
    min-width: 34px;
    min-height: 36px;
  }
  .hero {
    grid-template-columns: 1fr;
    padding-top: 35px;
  }
  .hero-copy {
    padding-left: 12px;
  }
  .hero h1 {
    font-size: 2.6875rem;
  }
  .hero h1 span {
    display: inline;
  }
  .hero-description br {
    display: none;
  }
  .hero-description {
    max-width: 500px;
    font-size: 0.875rem;
  }
  .hero-world {
    margin: 0 auto;
    width: 100%;
    max-width: 650px;
    padding-top: 0;
  }
  .postmark {
    top: -35px;
    right: 25px;
  }
  .hero-meta {
    font-size: 0.625rem;
    margin-top: 20px;
  }
  .world-caption {
    flex-direction: row;
    margin-top: 0;
  }
  .journey-strip {
    gap: 20px;
    grid-template-columns: 1fr;
    padding: 25px 10px;
  }
  .journey-strip article {
    gap: 20px;
  }
  .journey-strip p {
    max-width: none;
  }
  .journey-strip b {
    font-size: 1.6875rem;
  }
  .journey-strip h2 {
    font-size: 0.9375rem;
  }
  .footer {
    padding: 18px 5px;
    gap: 10px;
    flex-wrap: wrap;
  }
  .play-layout {
    grid-template-columns: 1fr;
  }
  .game-sidebar {
    grid-template-columns: minmax(0, 1fr) 220px;
    align-items: start;
  }
  .board-viewport .bangkok-board {
    min-width: 650px;
  }
  .board-panel {
    min-width: 0;
  }
  .turn-person h2 {
    font-size: 1.1875rem;
  }
  .game-topline h1 {
    font-size: 1.4375rem;
  }
  .round-meter {
    min-width: 140px;
  }
  .game-topline .eyebrow {
    font-size: 0.5rem;
  }
  .dice-tray {
    padding: 15px;
  }
  .pocket-panel {
    grid-template-columns: 1fr;
  }
  .pocket-panel .pocket-actions {
    flex-wrap: wrap;
  }
  .travel-log > div {
    grid-template-columns: 1fr;
  }
  .help-steps {
    grid-template-columns: 1fr;
  }
  .help-steps article {
    padding: 15px;
    display: grid;
    grid-template-columns: 45px 1fr;
    gap: 0 10px;
  }
  .help-steps b {
    grid-row: 1/3;
  }
  .help-steps h3 {
    margin: 5px 0;
  }
  .help-steps p {
    margin: 0;
  }
  .modal-top h2 {
    font-size: 1.25rem;
  }
  .results h1 {
    font-size: 1.6875rem;
  }
}
@media (max-width: 520px) {
  .site-header {
    padding: 13px 14px;
    gap: 4px;
  }
  .site-header nav .nav-link {
    display: none;
  }
  .site-header nav .nav-link:first-child {
    display: block;
  }
  .brand {
    font-size: 1rem;
  }
  .brand img {
    width: 33px;
    height: 33px;
  }
  .brand small {
    font-size: 0.4375rem;
    letter-spacing: 2px;
  }
  .home-main {
    padding: 0 17px;
  }
  .hero-copy {
    padding: 0 3px;
  }
  .hero h1 {
    font-size: 2.1875rem;
    letter-spacing: -1px;
    line-height: 1.45;
    margin-bottom: 17px;
  }
  .hero h1 span {
    display: block;
  }
  .hero-thai {
    font-size: 1.25rem;
    margin-top: 19px;
  }
  .hero-description {
    font-size: 0.8125rem;
    line-height: 1.9;
  }
  .hero-actions {
    gap: 6px;
    margin-top: 22px;
  }
  .hero-actions .large {
    font-size: 0.875rem;
    padding: 13px 17px;
  }
  .hero-meta {
    gap: 8px;
    font-size: 0.5625rem;
  }
  .hero-world {
    padding-top: 15px;
  }
  .postmark {
    top: 5px;
    right: 10px;
    height: 70px;
    width: 70px;
    font-size: 0.4375rem;
  }
  .postmark strong {
    font-size: 0.6875rem;
  }
  .postmark span {
    font-size: 0.3125rem;
  }
  .world-caption {
    font-size: 0.5625rem;
    gap: 8px;
  }
  .world-caption small {
    font-size: 0.5rem;
  }
  .hero {
    padding-bottom: 22px;
  }
  .game-main {
    padding: 19px 12px;
  }
  .game-topline {
    gap: 8px;
    margin-bottom: 15px;
  }
  .game-topline h1 {
    font-size: 1.0625rem;
    letter-spacing: 0;
  }
  .round-meter {
    min-width: 105px;
    font-size: 0.5625rem;
  }
  .round-meter strong {
    font-size: 1.1875rem;
  }
  .game-topline .eyebrow {
    font-size: 0.375rem;
    letter-spacing: 1.3px;
  }
  .players-grid {
    gap: 8px;
  }
  .player-card {
    display: grid;
    grid-template-columns: 33px 1fr;
    gap: 4px;
    padding: 9px;
  }
  .player-card > svg {
    width: 33px;
    height: 33px;
  }
  .player-title strong {
    font-size: 0.75rem;
  }
  .player-title small {
    font-size: 0.5rem;
  }
  .player-cash {
    grid-column: 1/-1;
    font-size: 0.9375rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: 3px;
  }
  .player-cash small {
    font-size: 0.5rem;
  }
  .board-toolbar {
    padding: 10px;
  }
  .destination-banner {
    margin: 10px 10px 0;
    padding: 8px 10px;
  }
  .destination-banner strong {
    font-size: 0.75rem;
  }
  .destination-reward {
    font-size: 0.5rem;
    max-width: 80px;
  }
  .board-viewport .bangkok-board {
    min-width: 650px;
  }
  .board-legend {
    padding: 9px 11px;
    font-size: 0.5rem;
    gap: 6px 10px;
  }
  .board-legend small {
    font-size: 0.5rem;
  }
  .game-sidebar {
    grid-template-columns: 1fr;
  }
  .pocket-panel {
    grid-template-columns: 1fr 1fr;
  }
  .pocket-panel .pocket-actions {
    flex-wrap: nowrap;
  }
  .turn-body {
    padding: 0 20px 20px;
  }
  .turn-panel .primary {
    min-height: 49px;
  }
  .turn-body h3 {
    font-size: 1.25rem;
  }
  .route-switch button {
    font-size: 0.75rem;
  }
  .question-label small {
    font-size: 0.6875rem;
  }
  .answer {
    font-size: 0.875rem;
    min-height: 50px;
  }
  .turn-body .small {
    font-size: 0.6875rem;
  }
  .game-topline .eyebrow {
    display: none;
  }
  dialog {
    width: calc(100% - 16px);
    max-height: 94dvh;
    border-radius: 15px;
  }
  .modal-top {
    padding: 16px;
  }
  .modal-top h2 {
    font-size: 1.125rem;
  }
  .modal-top .eyebrow {
    font-size: 0.5rem;
  }
  .modal-content {
    padding: 20px 16px;
  }
  .setup-seats {
    grid-template-columns: 1fr;
  }
  .seat-option {
    padding: 12px;
  }
  .seat-option input,
  .seat-option select {
    font-size: 0.875rem;
    min-height: 40px;
  }
  .setup-options {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .notebook-summary {
    flex-wrap: wrap;
    font-size: 0.625rem;
    padding: 12px;
  }
  .notebook-summary strong {
    font-size: 1.3125rem;
  }
  .notebook-summary button {
    width: 100%;
  }
  .notebook-filters {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .lesson-card {
    padding: 13px;
    gap: 8px;
  }
  .lesson-card h3 {
    font-size: 1.25rem;
  }
  .lesson-card .audio-button {
    padding: 8px;
  }
  .cards-grid {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }
  .strategy-card {
    padding: 13px 10px;
  }
  .strategy-card h3 {
    font-size: 0.875rem;
  }
  .strategy-card p {
    font-size: 0.6875rem;
  }
  .strategy-card button {
    padding: 8px;
    font-size: 0.6875rem;
  }
  .district-summary {
    grid-template-columns: 1fr 1fr;
  }
  .estate-card {
    align-items: flex-start;
    padding: 12px;
  }
  .estate-card h3 {
    font-size: 0.9375rem;
  }
  .estate-card button {
    font-size: 0.625rem;
    padding: 8px;
    white-space: nowrap;
  }
  .stock-list article {
    padding: 12px;
    gap: 8px;
  }
  .stock-list button {
    padding: 8px;
    font-size: 0.6875rem;
  }
  .results {
    margin-top: 15px;
  }
  .results h1 {
    font-size: 1.5rem;
  }
  .results-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .result-card {
    padding: 18px 10px;
  }
  .result-card h2 {
    font-size: 1rem;
  }
  .result-card p {
    font-size: 0.625rem;
  }
  .result-score {
    font-size: 2rem;
  }
  .result-actions {
    flex-direction: column;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.discovery-card {
  border: 1px solid #e8dab4;
  background: #fbf4e0;
  border-radius: 10px;
  padding: 13px;
  margin: 0 0 18px;
}
.discovery-card > small {
  display: block;
  font-size: 0.5625rem;
  color: #9a7c38;
}
.discovery-card > strong {
  display: block;
  font-size: 1rem;
  margin: 4px 0;
}
.discovery-card p {
  font-size: 0.75rem;
  margin: 6px 0;
}
.discovery-card .thai {
  font-size: 1.0625rem;
  color: #5a6750;
}
.discovery-card button {
  font-size: 0.625rem;
  padding: 4px 0;
  min-height: 30px;
}
.asset-breakdown {
  font-size: 0.75rem;
  margin: 15px 0;
  text-align: left;
}
.asset-breakdown > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid #e5e6d8;
  padding: 8px 0;
}
.asset-breakdown dd {
  margin: 0;
  font-weight: 700;
}
.notebook-filters > label[for="notebook-learner"] {
  align-self: center;
}
.result-card .asset-breakdown {
  font-size: 0.625rem;
}
.learning-summary {
  text-align: left;
  background: #f0f4e7;
  padding: 10px;
  border-radius: 8px;
}
.skip {
  top: 4px;
  left: 4px;
  max-width: calc(100vw - 8px);
}

.learning-scene {
  background: #eff3e5;
  border-left: 3px solid #d1a64b;
  border-radius: 8px;
  padding: 13px;
  margin: 12px 0;
}
.learning-scene strong {
  font-size: 0.875rem;
}
.learning-scene p {
  font-size: 0.8125rem;
  margin: 7px 0 0;
  line-height: 1.8;
}
.move-choice {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.move-choice .move-option {
  width: 100%;
  border: 0;
  border-radius: 0;
}
.move-choice .preview-button {
  display: block;
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  font-size: 0.6875rem;
  min-height: 34px;
  padding: 6px 12px;
  background: #edf2e4;
  color: var(--green);
}
.preview-note {
  font-size: 0.625rem;
  margin: 8px 18px;
  color: var(--muted);
}
.lesson-card .lesson-guide {
  margin-top: 12px;
}
.tutorial-focus {
  scroll-margin-top: 18px;
}

.dialogue-learner {
  padding: 12px 15px;
  border-radius: 9px;
  background: #edf2e5;
  font-size: 0.75rem;
  color: #496653;
}
.pocket-panel .pocket-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}
.notebook-summary {
  flex-wrap: wrap;
}
#modal[data-kind="dialogue"] {
  max-width: 850px;
}
.conversation__fold-content .lesson-guide {
  margin-top: 8px;
}
