/* 信使生涯: the two title entries, the route book, brief, results, pause and the mission strip.
   Shares the paper-and-ink look of the journal, with the same fonts and inks. */

/* ---------- title: two ways in ---------- */
#modes { margin-top: 30px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.mode-btn {
  width: min(330px, 72vw); padding: 14px 26px; border-radius: 16px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: var(--ink); background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.34);
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.mode-btn:hover { transform: translateY(-2px); background: rgba(255, 255, 255, 0.13); }
.mode-btn:focus { outline: none; }
.mode-btn:focus-visible { outline: 2px solid rgba(255, 255, 255, 0.55); outline-offset: 3px; }
.mode-btn .mode-name { font: 600 16px "Karla", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif; letter-spacing: 0.18em; }
.mode-btn small { font-size: 11px; letter-spacing: 0.1em; opacity: 0.68; }
.mode-btn.primary {
  color: #2a1730; border: 0;
  background: linear-gradient(180deg, #fff3e2, #ffd9e6);
  box-shadow: 0 10px 40px rgba(255, 150, 200, 0.35), inset 0 -2px 0 rgba(120, 40, 80, 0.18);
}
.mode-btn.primary small { opacity: 0.62; }

/* The flight HUD steps back while the route book / brief / pause owns the screen. */
#hud { transition: opacity 0.3s ease; }
#hud.campaign-menu { opacity: 0.12; }

/* ---------- shared overlay ---------- */
.campaign-overlay {
  position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 3vh 4vw;
  background: rgba(5, 12, 24, 0.66); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: var(--ink);
}
.rb-shell, .brief-card, .result-card, .pause-card {
  background: linear-gradient(180deg, rgba(10, 22, 40, 0.88), rgba(10, 22, 40, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 22px;
  box-shadow: 0 28px 90px rgba(0, 8, 24, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.rb-kicker, .brief-kicker, .res-kicker {
  margin: 0 0 6px; font-size: 11px; letter-spacing: 0.36em; text-transform: uppercase; opacity: 0.7;
}

/* ---------- route book ---------- */
.rb-shell { width: min(1120px, 100%); max-height: 92vh; padding: 28px 34px 22px; display: flex; flex-direction: column; gap: 16px; }
.rb-head { text-align: center; }
.rb-title { margin: 0; font: italic 340 clamp(30px, 4.2vw, 58px)/1 "Fraunces", "Noto Serif SC", "Songti SC", "SimSun", Georgia, serif; letter-spacing: -0.01em; }
.rb-sub { margin: 8px 0 0; font-size: 12px; letter-spacing: 0.12em; opacity: 0.64; }
.rb-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; }
.rb-tab {
  padding: 7px 13px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.06); color: var(--ink); cursor: pointer;
  font: 500 11px "Karla", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif; letter-spacing: 0.06em;
  transition: background 0.16s ease, border-color 0.16s ease;
}
.rb-tab:hover:not(:disabled) { background: rgba(255, 255, 255, 0.12); }
.rb-tab.on { background: rgba(255, 211, 107, 0.16); border-color: rgba(255, 211, 107, 0.6); color: var(--gold); }
.rb-tab.locked { opacity: 0.42; cursor: default; }
.rb-list {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px;
  overflow-y: auto; padding: 4px 4px 8px; min-height: 120px;
}
.rb-empty { grid-column: 1 / -1; margin: 12vh 0; text-align: center; font-size: 14px; line-height: 1.7; opacity: 0.6; }
.rb-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 5px; text-align: left;
  padding: 15px 18px; border-radius: 16px; cursor: pointer; color: var(--ink);
  background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.18);
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}
.rb-card:hover:not(:disabled) { transform: translateY(-2px); background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.3); }
.rb-card.challenge { border-color: rgba(255, 211, 107, 0.32); background: rgba(255, 211, 107, 0.06); }
.rb-card.locked { opacity: 0.45; cursor: default; }
.rb-card-kicker { font-size: 9px; letter-spacing: 0.3em; text-transform: uppercase; opacity: 0.6; }
.rb-card-title { font: italic 400 24px/1.1 "Fraunces", "Noto Serif SC", "Songti SC", "SimSun", Georgia, serif; }
.rb-card-route { font-size: 12px; line-height: 1.45; opacity: 0.75; }
.rb-card-meta { margin-top: 4px; display: flex; justify-content: space-between; align-items: baseline; width: 100%; gap: 12px; }
.rb-stars { color: var(--gold); font-size: 13px; letter-spacing: 0.08em; }
.rb-best { font-size: 10px; letter-spacing: 0.1em; opacity: 0.55; }
.rb-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-top: 4px; }
.rb-hint { font-size: 11px; letter-spacing: 0.14em; opacity: 0.5; }
.rb-actions { display: flex; gap: 8px; }
.rb-btn, .brief-btn, .res-btn, .pause-btn {
  padding: 10px 20px; border-radius: 999px; cursor: pointer; color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.32); background: rgba(255, 255, 255, 0.07);
  font: 600 12px "Karla", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif; letter-spacing: 0.1em;
  transition: background 0.16s ease, transform 0.16s ease;
}
.rb-btn:hover, .brief-btn:hover, .res-btn:hover, .pause-btn:hover { background: rgba(255, 255, 255, 0.14); transform: translateY(-1px); }
.primary { color: #2a1730; border: 0; background: linear-gradient(180deg, #fff3e2, #ffd9e6); box-shadow: 0 8px 28px rgba(255, 150, 200, 0.28); }
.primary:hover { background: linear-gradient(180deg, #fff8ee, #ffe4ee); }

/* ---------- brief ---------- */
.brief-card { width: min(560px, 92vw); padding: 30px 36px 26px; text-align: center; }
.brief-title { margin: 0; font: italic 340 clamp(30px, 4vw, 50px)/1.05 "Fraunces", "Noto Serif SC", "Songti SC", "SimSun", Georgia, serif; }
.brief-text { margin: 14px auto 0; max-width: 44ch; font-size: 14px; line-height: 1.65; opacity: 0.88; }
.brief-route { margin: 16px 0 0; font-size: 11px; letter-spacing: 0.16em; line-height: 1.6; color: var(--gold); opacity: 0.85; }
.brief-goals { margin: 18px auto 0; display: flex; flex-direction: column; gap: 6px; max-width: 360px; text-align: left; }
.brief-goal { display: flex; align-items: center; gap: 10px; font-size: 12px; opacity: 0.85; }
.bg-star { color: var(--gold); font-size: 10px; letter-spacing: 0.06em; min-width: 42px; }
.brief-time { margin: 16px 0 0; font-size: 11px; letter-spacing: 0.2em; opacity: 0.6; }
.brief-actions { margin-top: 22px; display: flex; justify-content: center; gap: 10px; }

/* ---------- results ---------- */
.result-card { width: min(640px, 92vw); padding: 28px 36px 24px; text-align: center; }
.res-title { margin: 0; font: italic 340 clamp(28px, 3.6vw, 46px)/1.05 "Fraunces", "Noto Serif SC", "Songti SC", "SimSun", Georgia, serif; }
.res-stars { margin-top: 10px; font-size: 34px; letter-spacing: 0.12em; color: rgba(255, 255, 255, 0.22); }
.res-stars .on { color: var(--gold); text-shadow: 0 0 22px rgba(255, 211, 107, 0.45); }
.res-grid { margin: 20px auto 0; display: grid; grid-template-columns: repeat(3, minmax(90px, 1fr)); gap: 10px 16px; max-width: 480px; }
.res-item { display: flex; flex-direction: column; gap: 4px; }
.res-label { font-size: 9px; letter-spacing: 0.24em; text-transform: uppercase; opacity: 0.5; }
.res-value { font: italic 400 22px/1 "Fraunces", "Noto Serif SC", "Songti SC", "SimSun", Georgia, serif; }
.res-actions { margin-top: 24px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }

/* ---------- pause ---------- */
.pause-card { width: min(380px, 90vw); padding: 28px 30px 24px; text-align: center; }
.pause-title { margin: 0 0 18px; font: italic 340 42px/1 "Fraunces", "Noto Serif SC", "Songti SC", "SimSun", Georgia, serif; }
.pause-actions { display: flex; flex-direction: column; gap: 8px; }
.pause-actions .pause-btn { width: 100%; }

/* ---------- in-flight mission strip ---------- */
.mission-strip {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 4; pointer-events: none;
  min-width: 250px; max-width: min(520px, 86vw); padding: 8px 18px 9px; text-align: center;
  background: rgba(6, 14, 28, 0.32); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 14px;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.ms-top { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; }
.ms-title { font: italic 400 19px/1.1 "Fraunces", "Noto Serif SC", "Songti SC", "SimSun", Georgia, serif; }
.ms-time { font: 500 11px "Karla", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif; letter-spacing: 0.14em; opacity: 0.66; }
.ms-objective { margin-top: 2px; font-size: 10px; letter-spacing: 0.1em; opacity: 0.72; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-stars { margin-top: 3px; font-size: 10px; letter-spacing: 0.22em; }
.ms-stars span { opacity: 0.22; }
.ms-stars span.on { color: var(--gold); opacity: 1; text-shadow: 0 0 12px rgba(255, 211, 107, 0.45); }

.lowfly {
  position: fixed; left: 32px; bottom: 58px; z-index: 4; pointer-events: none;
  font: 500 10px "Karla", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0.18em; color: var(--gold); opacity: 0.72; text-shadow: 0 1px 10px rgba(0, 10, 30, 0.6);
}

@media (max-width: 760px) {
  .rb-shell { padding: 20px 18px 16px; }
  .rb-list { grid-template-columns: 1fr; }
  .rb-foot { flex-direction: column; align-items: stretch; }
  .rb-actions { justify-content: flex-end; }
  .res-grid { grid-template-columns: repeat(2, minmax(90px, 1fr)); }
  .mission-strip { top: 10px; min-width: 200px; }
}
