/* Shared quest screen. Colors come from the host site's variables. */
.quest-page {
  --quest-accent: var(--sky-deep, #2b86f0);
  --quest-ink: var(--ink, #16356b);
  --quest-line: var(--line, #1d4e96);
  --quest-card: #ffffff;
  --quest-yes: #1f8a4c;
  --quest-soft: #e7f6ff;
}

.quest-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 0;
}

.quest-app {
  position: relative;
  z-index: 1;
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 12px 16px 28px;
}

.mascot {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--quest-card);
  border: 4px solid var(--quest-line);
  border-radius: 24px;
  padding: 12px 16px;
  box-shadow: 0 6px 0 var(--quest-line);
  margin-bottom: 14px;
}

.mascot-face {
  font-size: 42px;
  line-height: 1;
}

.mascot p {
  margin: 0;
  color: var(--quest-ink);
  font-size: 22px;
}

.map-grid,
.q-choices {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.island,
.q-choice,
.q-next,
.quest-side {
  min-height: 56px;
  border-radius: 18px;
  border: 3px solid var(--quest-line);
  background: var(--quest-card);
  color: var(--quest-ink);
  box-shadow: 0 5px 0 var(--quest-line);
  font-size: 22px;
  font-weight: 700;
  padding: 12px 16px;
  text-align: left;
}

.island {
  display: flex;
  align-items: center;
  gap: 12px;
}

.island .badge {
  margin-left: auto;
  background: var(--quest-soft);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 16px;
}

.q-card {
  background: var(--quest-card);
  border: 4px solid var(--quest-line);
  border-radius: 28px;
  padding: 16px;
  box-shadow: 0 8px 0 var(--quest-line);
}

.q-kicker,
.q-note,
.q-explain {
  margin: 0 0 8px;
  font-size: 18px;
}

.q-prompt {
  margin: 0 0 14px;
  font-size: 28px;
  line-height: 1.35;
  color: var(--quest-ink);
}

.q-choice.right {
  background: #d9f5d0;
}

.q-choice.wrong {
  background: #ffd5d0;
}

.q-next {
  width: 100%;
  text-align: center;
  background: var(--quest-accent);
  color: #fff;
  margin-top: 12px;
}

.q-he {
  font-family: "New Peninim MT", "Arial Hebrew", "David", "Times New Roman", "Ezra SIL", serif;
  font-size: 34px;
  line-height: 1.5;
}

.q-ru {
  font-family: "Trebuchet MS", "Segoe UI", "Arial", sans-serif;
}

.q-speak {
  min-height: 56px;
  margin: 0 0 12px;
  border-radius: 999px;
  border: 3px solid var(--quest-line);
  background: var(--sun, #ffe14a);
  font-weight: 700;
  padding: 8px 16px;
}

.trail {
  display: flex;
  gap: 6px;
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
}

.trail li {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  border: 2px solid #fff;
}

.trail li.on {
  background: var(--sun, #ffe14a);
}

.result-list {
  display: grid;
  gap: 10px;
}

.result-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  background: #fff;
  border-radius: 16px;
  padding: 12px 14px;
  border: 3px solid var(--quest-line);
  font-size: 20px;
}

.seed-note {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  padding: 12px 14px;
  color: var(--quest-ink);
  font-size: 18px;
}

.starbar[hidden],
.star-ask[hidden],
.star-game[hidden] {
  display: none !important;
}

.starbar {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: 0;
  padding: 6px 14px;
  border-radius: 999px;
  background: #fff;
  color: var(--ink, #16356b);
  font-weight: 800;
  border: 3px solid var(--line, #1d4e96);
}

.home .starbar {
  margin: 0 auto 8px;
}

.star-ask {
  margin: 8px 0 0;
  color: #fff;
  font-size: 18px;
  text-shadow: 0 2px 0 rgba(29, 78, 150, 0.35);
}

.star-game {
  /* inline-block, not flex: flex throws away the spaces beside the name span. */
  display: inline-block;
  text-align: center;
  min-height: 56px;
  margin: 10px 0 0;
  padding: 10px 18px;
  border: 3px solid #1d4e96;
  border-radius: 999px;
  background: #fff;
  color: var(--ink, #16356b);
  font: inherit;
  font-size: 20px;
  font-weight: 800;
  box-shadow: 0 4px 0 #1d4e96;
}

.star-cap {
  margin: 10px 16px 0;
  text-align: center;
  color: var(--ink, #16356b);
  background: #fff8d6;
  border: 3px solid var(--line, #1d4e96);
  border-radius: 16px;
  padding: 10px 14px;
  font-size: 18px;
  font-weight: 700;
}

.star-cap[hidden] {
  display: none;
}

.home .star-cap {
  margin: 0 auto 8px;
  max-width: 560px;
}

@media (min-width: 720px), (orientation: landscape) {
  .map-grid,
  .q-choices {
    grid-template-columns: 1fr 1fr;
  }
}

@media (orientation: landscape) and (min-width: 900px) {
  .map-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

/* Thai text: a little bigger so tone marks are easy to see. */
.q-th { font-family: "Thonburi", "Sukhumvit Set", "Noto Sans Thai", "Leelawadee UI", sans-serif; font-size: 1.15em; line-height: 1.6; }
/* Gentle retry: a tried answer fades instead of turning red. */
.q-choice.tried { opacity: 0.45; background: #f1eef8; border-style: dashed; }
.q-speak-big { font-size: 1.15em; padding: 10px 18px; min-height: 52px; }
.q-ja { font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", sans-serif; }
