:root {
  --paper: #fbf7ee;
  --paper-2: #fffdf8;
  --ink: #20302b;
  --muted: #6d7a72;
  --faint: #9aa69e;
  --green: #2f4a3f;
  --green-2: #3e6152;
  --mint: #dfeae3;
  --brick: #b14d35;
  --brick-dark: #8f3824;
  --gold: #d8a94f;
  --gold-soft: #f3e2b8;
  --line: #ded7c8;
  --shadow: 0 18px 50px rgba(45, 52, 42, 0.12);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #e9e4d8;
}

body {
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
}

button {
  font: inherit;
  color: inherit;
}

button:active {
  transform: translateY(1px);
}

.phone {
  position: relative;
  width: min(100%, 500px);
  min-height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background:
    radial-gradient(520px 380px at 100% 0%, rgba(216, 169, 79, 0.16), transparent 62%),
    radial-gradient(560px 440px at -10% 18%, rgba(47, 74, 63, 0.1), transparent 60%),
    linear-gradient(180deg, #f5f0e4 0%, #f0eadc 55%, #e9e2d2 100%);
}

@media (min-width: 620px) {
  body {
    padding: 24px 0;
  }
  .phone {
    min-height: calc(100dvh - 48px);
    border-radius: 36px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.5);
  }
}

.is-hidden {
  display: none !important;
}

.screen {
  min-height: 100dvh;
  padding: 24px 22px calc(24px + var(--safe-bottom));
}

@media (min-width: 620px) {
  .screen {
    min-height: calc(100dvh - 48px);
  }
}

.kicker {
  margin: 0 0 5px;
  color: var(--brick);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

/* ---------------- start ---------------- */

.start-screen {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow: hidden;
}

.city-orbit {
  position: absolute;
  inset: 0 0 auto auto;
  width: 100%;
  height: 380px;
  pointer-events: none;
}

.sun {
  position: absolute;
  top: 52px;
  right: 30px;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f5d998, #d8a94f 62%, #c79135);
  box-shadow: 0 0 0 18px rgba(216, 169, 79, 0.09), 0 0 60px rgba(216, 169, 79, 0.35);
  opacity: 0.9;
}

.ridge {
  position: absolute;
  left: -15%;
  width: 130%;
  border-radius: 50% 50% 0 0;
  opacity: 0.9;
}

.ridge-a {
  top: 210px;
  height: 120px;
  background: linear-gradient(180deg, rgba(47, 74, 63, 0.16), rgba(47, 74, 63, 0.03));
  transform: rotate(-3deg);
}

.ridge-b {
  top: 250px;
  height: 100px;
  background: linear-gradient(180deg, rgba(177, 77, 53, 0.12), rgba(177, 77, 53, 0.02));
  transform: rotate(4deg);
}

.start-head {
  position: relative;
  z-index: 2;
  margin-top: 28px;
  animation: rise 0.5s ease both;
}

.start-head h1 {
  margin: 0;
  font-family: "Songti SC", "Noto Serif SC", "STSong", serif;
  font-size: 50px;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.lede {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.deck {
  position: relative;
  z-index: 2;
  height: 210px;
  margin: 20px 0 6px;
}

.deck-card {
  position: absolute;
  left: 50%;
  top: 22px;
  width: 250px;
  min-height: 158px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(47, 74, 63, 0.12);
  background: var(--paper-2);
  box-shadow: 0 16px 38px rgba(45, 52, 42, 0.12);
  transform-origin: 50% 90%;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.deck-card:nth-child(1) {
  transform: translateX(-58%) rotate(-8deg) translateY(12px);
  opacity: 0.72;
}

.deck-card:nth-child(2) {
  transform: translateX(-42%) rotate(6deg) translateY(4px);
  opacity: 0.86;
}

.deck-card:nth-child(3) {
  transform: translateX(-50%) rotate(0deg);
  opacity: 1;
}

.deck-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.deck-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gold-soft);
  font-size: 24px;
}

.deck-name {
  margin: 0;
  font-size: 16px;
  font-weight: 900;
}

.deck-job {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.deck-line {
  margin: 13px 0 0;
  color: var(--ink);
  font-size: 12.5px;
  line-height: 1.65;
}

.deck-seal {
  position: absolute;
  right: 13px;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1.5px solid rgba(177, 77, 53, 0.5);
  color: var(--brick);
  font-family: "Songti SC", serif;
  font-size: 11px;
  font-weight: 900;
  border-radius: 6px;
  transform: rotate(-5deg);
}

.start-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
}

.btn {
  border: 1.5px solid transparent;
  border-radius: 999px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 800;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn-primary {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
  box-shadow: 0 10px 24px rgba(47, 74, 63, 0.24);
}

.btn-ghost {
  background: rgba(255, 253, 248, 0.72);
  border-color: var(--line);
  color: var(--ink);
}

.btn-wide {
  width: 100%;
  margin-top: 18px;
  padding: 15px;
  font-size: 15px;
}

.start-note {
  margin: 12px 0 0;
  color: var(--faint);
  font-size: 10.5px;
  line-height: 1.6;
  text-align: center;
}

/* ---------------- game ---------------- */

.game-screen {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: calc(24px + var(--safe-bottom));
}

.game-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 253, 248, 0.7);
  font-size: 18px;
}

.game-head-copy {
  flex: 1;
  min-width: 0;
}

.game-head h2 {
  margin: 0;
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-size: 27px;
  letter-spacing: -0.03em;
}

.clock-wrap {
  text-align: right;
}

.clock {
  display: block;
  font-size: 23px;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
}

.weather {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.identity-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 20px;
  background: var(--green);
  color: #fff;
  box-shadow: 0 10px 24px rgba(47, 74, 63, 0.16);
}

.identity-avatar {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  font-size: 25px;
}

.identity-copy {
  min-width: 0;
  flex: 1;
}

.identity-name {
  margin: 0;
  font-size: 16px;
  font-weight: 900;
}

.identity-meta {
  margin: 3px 0 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 10.5px;
}

.identity-goal {
  margin: 0;
  max-width: 92px;
  color: var(--gold-soft);
  font-size: 10px;
  line-height: 1.45;
  text-align: right;
}

.scene-card {
  padding: 20px;
  border-radius: 24px;
  background: var(--paper-2);
  border: 1px solid rgba(47, 74, 63, 0.08);
  box-shadow: 0 8px 24px rgba(45, 52, 42, 0.05);
  animation: rise 0.4s ease both;
}

.scene-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--brick);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.scene-meta::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brick);
}

.scene-card h2 {
  margin: 10px 0 7px;
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -0.03em;
}

.scene-text {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.8;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 15px;
}

.stat {
  padding: 9px 10px;
  border-radius: 12px;
  background: #f4efe4;
}

.stat-label {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 700;
}

.stat-bar {
  height: 4px;
  margin-top: 7px;
  border-radius: 99px;
  background: rgba(47, 74, 63, 0.12);
  overflow: hidden;
}

.stat-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green-2);
  transition: width 0.4s ease;
}

.stat.money .stat-bar i {
  background: var(--gold);
}

/* ---------------- report ---------------- */

.report-teaser {
  padding: 16px;
  border-radius: 20px;
  background: var(--mint);
  border: 1px solid rgba(47, 74, 63, 0.08);
}

.report-teaser-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.report-teaser h3 {
  margin: 0;
  font-size: 15px;
}

.link-btn {
  border: 0;
  background: transparent;
  color: var(--brick);
  font-size: 11px;
  font-weight: 800;
  padding: 2px 0;
  white-space: nowrap;
}

.report-mini {
  display: grid;
  gap: 6px;
  margin: 11px 0 0;
  padding: 0;
  list-style: none;
}

.report-mini li {
  display: flex;
  gap: 8px;
  color: #43594e;
  font-size: 11px;
  line-height: 1.55;
}

.report-mini time {
  flex: 0 0 36px;
  color: var(--green-2);
  font-weight: 800;
  font-size: 10px;
}

/* ---------------- decision ---------------- */

.decision-card {
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(145deg, #fff5d9, #f5e3b4);
  border: 1px solid rgba(177, 77, 53, 0.18);
  box-shadow: 0 10px 26px rgba(177, 120, 35, 0.1);
  animation: rise 0.35s ease both;
}

.decision-card h3 {
  margin: 7px 0 13px;
  font-size: 18px;
  line-height: 1.45;
}

.decision-options {
  display: grid;
  gap: 8px;
}

.decision-option {
  width: 100%;
  border: 1.5px solid rgba(143, 56, 36, 0.18);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.76);
  padding: 12px 13px;
  text-align: left;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--ink);
}

.decision-option:hover {
  border-color: var(--brick);
  background: #fffdf8;
}

.auto-btn {
  margin-top: 12px;
  color: var(--muted);
}

/* ---------------- timeline ---------------- */

.timeline-section {
  padding: 4px 2px 10px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.section-head h3 {
  margin: 0;
  font-size: 14px;
}

.section-head span {
  color: var(--faint);
  font-size: 10px;
  font-weight: 700;
}

.section-head .link-btn {
  margin-left: auto;
  color: var(--green-2);
  font-size: 10px;
}

.timeline {
  position: relative;
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0 0 0 18px;
  list-style: none;
  border-left: 1px solid rgba(47, 74, 63, 0.18);
}

.timeline li {
  position: relative;
  padding: 0 0 15px 12px;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -23px;
  top: 4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--paper-2);
  border: 2px solid var(--green-2);
}

.timeline li.is-choice::before {
  border-color: var(--brick);
  background: var(--brick);
}

.timeline time {
  display: block;
  color: var(--brick);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.timeline p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.6;
}

.timeline-empty {
  padding: 10px 0;
  color: var(--faint);
  font-size: 11.5px;
}

/* ---------------- controls ---------------- */

.game-controls {
  position: fixed;
  left: 50%;
  bottom: 10px;
  z-index: 30;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 8px;
  width: min(calc(100% - 32px), 468px);
  padding: 8px;
  border-radius: 22px;
  background: rgba(251, 247, 238, 0.92);
  border: 1px solid rgba(47, 74, 63, 0.1);
  box-shadow: 0 12px 30px rgba(45, 52, 42, 0.14);
  backdrop-filter: blur(14px);
}

.game-controls .btn {
  padding: 11px 12px;
  font-size: 12.5px;
}

/* ---------------- modal / toast ---------------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(32, 48, 43, 0.42);
  backdrop-filter: blur(4px);
  animation: fade 0.2s ease both;
}

.modal-sheet {
  width: min(100%, 500px);
  max-height: 90dvh;
  overflow-y: auto;
  padding: 18px 20px calc(24px + var(--safe-bottom));
  border-radius: 26px 26px 0 0;
  background: var(--paper);
  box-shadow: 0 -20px 50px rgba(32, 48, 43, 0.2);
  animation: slideUp 0.28s cubic-bezier(0.2, 0.85, 0.3, 1) both;
}

@media (min-width: 620px) {
  .modal-backdrop {
    align-items: center;
  }
  .modal-sheet {
    border-radius: 26px;
  }
}

.sheet-grip {
  width: 38px;
  height: 4px;
  margin: 0 auto 14px;
  border-radius: 99px;
  background: #d8cfbd;
}

.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.sheet-head h2 {
  margin: 0;
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.sheet-sub {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.65;
}

.close-btn {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: #ece4d4;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}

.identity-detail {
  display: grid;
  gap: 11px;
}

.detail-hero {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px;
  border-radius: 18px;
  background: var(--green);
  color: #fff;
}

.detail-avatar {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  font-size: 32px;
}

.detail-hero h3 {
  margin: 0;
  font-size: 20px;
}

.detail-hero p {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
}

.detail-block {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--paper-2);
  border: 1px solid var(--line);
}

.detail-block span {
  display: block;
  color: var(--faint);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.detail-block p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.65;
}

.detail-actions {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.report-list {
  display: grid;
  gap: 0;
  margin: 4px 0 12px;
  padding: 0;
  list-style: none;
}

.report-list li {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}

.report-list time {
  color: var(--brick);
  font-size: 10px;
  font-weight: 800;
}

.report-list p {
  margin: 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.6;
}

.postcard {
  padding: 20px;
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.6), transparent 55%),
    var(--gold-soft);
  border: 1px solid rgba(177, 77, 53, 0.2);
  position: relative;
  overflow: hidden;
}

.postcard::after {
  content: "CHENGDU";
  position: absolute;
  right: 12px;
  top: 12px;
  color: rgba(143, 56, 36, 0.28);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.postcard h3 {
  margin: 0 0 8px;
  font-family: "Songti SC", serif;
  font-size: 22px;
}

.postcard p {
  margin: 0;
  color: #5a4b33;
  font-size: 12.5px;
  line-height: 1.8;
}

.postcard-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.postcard-stats span {
  padding: 5px 9px;
  border-radius: 99px;
  background: rgba(255, 253, 248, 0.65);
  font-size: 10px;
  font-weight: 800;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(96px + var(--safe-bottom));
  z-index: 200;
  transform: translateX(-50%) translateY(10px);
  max-width: calc(100% - 40px);
  padding: 10px 16px;
  border-radius: 99px;
  background: rgba(32, 48, 43, 0.92);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0.5; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- v2: 真实时间 / 沉浸叙事 ---------- */

.start-head h1 {
  font-size: 46px;
  line-height: 1.12;
}

.start-head .lede {
  max-width: 360px;
}

.scene-now {
  margin: 12px 0 0;
  color: var(--faint);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.scene-card h2 {
  margin: 4px 0 10px;
}

.atmosphere {
  margin: 12px 0 0;
  padding: 10px 0 0 12px;
  border-top: 1px dashed var(--line);
  border-left: 2px solid var(--gold);
  color: #6d614d;
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-size: 12px;
  line-height: 1.8;
}

.report-summary {
  margin: 10px 0 0;
  color: #43594e;
  font-size: 12.5px;
  line-height: 1.85;
}

.report-summary.is-empty {
  color: var(--faint);
}

.time-note {
  margin: 2px 0 0;
  color: var(--faint);
  font-size: 9.5px;
  text-align: center;
  letter-spacing: 0.04em;
}

.game-controls {
  grid-template-columns: 1fr;
}

.game-controls .btn {
  padding: 13px 12px;
  font-size: 13.5px;
}

.identity-strip {
  align-items: flex-start;
}

.identity-job {
  margin: 0;
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.identity-district {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 10.5px;
}

.identity-now {
  margin: 0;
  max-width: 100px;
  color: var(--gold-soft);
  font-size: 10px;
  line-height: 1.5;
  text-align: right;
}

.identity-jobs-label {
  display: block;
  margin-bottom: 3px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.report-teaser .link-btn {
  margin-top: 1px;
}

@media (max-width: 380px) {
  .start-head h1 {
    font-size: 40px;
  }
  .deck-card {
    width: 230px;
  }
}

/* ---------- v3: static footer / clean identity strip ---------- */

.game-screen {
  padding-bottom: calc(24px + var(--safe-bottom));
}

.game-controls {
  position: static;
  left: auto;
  bottom: auto;
  transform: none;
  width: 100%;
  margin-top: 6px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.identity-strip {
  align-items: center;
}

.identity-now {
  max-width: 112px;
  line-height: 1.55;
}

/* ---------- v4: AI 场景 ---------- */

.scene-loading {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 160px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.scene-loading::before {
  content: "";
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid rgba(47, 74, 63, 0.16);
  border-top-color: var(--green-2);
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.decision-option small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
  line-height: 1.5;
}

.identity-now span {
  display: block;
  margin-bottom: 2px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

/* ---------- v5: 国家选择 / 设置 / 登录 ---------- */

.top-actions {
  position: absolute;
  top: 18px;
  right: 20px;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 8px;
}

.game-actions {
  position: static;
  justify-content: flex-end;
  margin-bottom: 2px;
}

.top-actions .icon-btn {
  width: 36px;
  height: 36px;
  background: rgba(255, 253, 248, 0.72);
  backdrop-filter: blur(8px);
}

.login-pill {
  padding: 8px 14px;
  background: rgba(255, 253, 248, 0.8);
  border-color: var(--line);
  font-size: 11px;
  color: var(--ink);
}

.country-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin: 14px 0 12px;
  animation: rise 0.45s 0.05s ease both;
}

.country-card {
  text-align: left;
  padding: 13px 12px;
  border: 1.5px solid rgba(47, 74, 63, 0.1);
  border-radius: 17px;
  background: rgba(255, 253, 248, 0.72);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.country-card:hover {
  border-color: var(--green-2);
}

.country-card.is-selected {
  border-color: var(--green);
  background: #fff5d6;
  box-shadow: 0 5px 0 rgba(47, 74, 63, 0.08);
}

.country-card .flag {
  font-size: 24px;
  line-height: 1;
}

.country-card h3 {
  margin: 8px 0 2px;
  font-size: 15px;
  font-weight: 900;
}

.country-card p {
  margin: 0;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.5;
}

.country-panel {
  margin: 4px 0 12px;
  animation: rise 0.35s ease both;
}

.country-banner {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px;
  border-radius: 20px;
  background: var(--green);
  color: #fff;
  box-shadow: 0 10px 24px rgba(47, 74, 63, 0.16);
}

.country-banner .country-flag {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.13);
  font-size: 28px;
}

.country-banner h2 {
  margin: 0;
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-size: 21px;
  letter-spacing: -0.02em;
}

.country-banner p {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 10.5px;
}

.occupation-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.occupation-chip {
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.78);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 700;
}

.country-loading {
  padding: 16px;
  border-radius: 16px;
  border: 1px dashed var(--line);
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.7;
  text-align: center;
}

.settings-list {
  display: grid;
  gap: 9px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 13px;
  border-radius: 14px;
  background: var(--paper-2);
  border: 1px solid var(--line);
}

.settings-row span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.settings-row b {
  font-size: 11px;
  font-weight: 800;
  text-align: right;
}

.settings-row button {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fffaf4;
  padding: 7px 10px;
  font-size: 10.5px;
  font-weight: 700;
}

@media (max-width: 380px) {
  .start-head h1 {
    font-size: 35px;
  }
  .country-grid {
    gap: 7px;
  }
}

/* ---------- v6: header polish ---------- */

.start-head h1 {
  font-size: 40px;
  line-height: 1.12;
}

.login-pill {
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(255, 253, 248, 0.84);
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 3px 10px rgba(45, 52, 42, 0.06);
}

@media (max-width: 380px) {
  .start-head h1 {
    font-size: 35px;
  }
}

.choice-question {
  margin: 4px 0 14px;
  font-size: 19px;
  line-height: 1.5;
  letter-spacing: -0.02em;
}

.memory-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.memory-list li {
  position: relative;
  padding-left: 15px;
  color: #43594e;
  font-size: 12.3px;
  line-height: 1.65;
}

.memory-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.58em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brick);
}

.report-summary.is-empty {
  color: var(--faint);
  font-size: 12px;
}

.clock {
  font-size: 20px;
}

/* ---------- v7: hourly memories / chibi avatar ---------- */

.avatar-character {
  position: relative;
  overflow: visible !important;
  background: transparent !important;
  width: 52px !important;
  height: 52px !important;
  flex-basis: 52px !important;
}

.avatar-character .chibi {
  width: 100%;
  height: 100%;
  display: block;
}

.avatar-flag {
  position: absolute;
  right: -3px;
  bottom: -3px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fffdf8;
  border: 1px solid var(--line);
  font-size: 11px;
  line-height: 1;
}

.detail-avatar.avatar-character {
  width: 64px !important;
  height: 64px !important;
  flex-basis: 64px !important;
}

.hourly-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  max-height: 260px;
  overflow-y: auto;
}

.hourly-list li {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(47, 74, 63, 0.12);
  color: #43594e;
  font-size: 11.3px;
  line-height: 1.55;
}

.hourly-list li:last-child {
  border-bottom: 0;
}

.hourly-list time {
  color: var(--brick);
  font-size: 9.2px;
  font-weight: 800;
  white-space: nowrap;
}

.modal-sheet .hourly-list {
  max-height: 55vh;
}

/* ---------- v8: energy / income / expense ---------- */

.economy-card {
  padding: 12px 13px;
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.75);
  border: 1px solid rgba(47, 74, 63, 0.09);
  box-shadow: 0 5px 16px rgba(45, 52, 42, 0.04);
}

.econ-energy {
  display: grid;
  gap: 5px;
  margin-bottom: 9px;
}

.econ-energy-head {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 800;
}

.econ-energy-head b {
  color: var(--ink);
  font-size: 11px;
}

.econ-bar {
  height: 5px;
  border-radius: 99px;
  background: rgba(47, 74, 63, 0.12);
  overflow: hidden;
}

.econ-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green-2);
  transition: width 0.4s ease;
}

.econ-money {
  display: grid;
  grid-template-columns: 1fr 1fr 1.15fr;
  gap: 7px;
}

.econ-money div {
  min-width: 0;
  padding: 7px 8px;
  border-radius: 10px;
  background: #f4efe4;
}

.econ-money span {
  display: block;
  color: var(--faint);
  font-size: 8.5px;
  font-weight: 800;
  margin-bottom: 3px;
}

.econ-money b {
  display: block;
  font-size: 11.5px;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.econ-money .income b {
  color: #2f6e4f;
}

.econ-money .expense b {
  color: var(--brick);
}

.econ-last {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.econ-bars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 9px;
}

.econ-bars .econ-energy {
  margin-bottom: 0;
  padding: 7px 9px;
  border-radius: 10px;
  background: #f4efe4;
  align-content: center;
}

.econ-bar.mood i {
  background: var(--gold);
}

.date-line {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.identity-name {
  margin: 0 0 2px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 10px;
  font-weight: 700;
}

.econ-bars {
  grid-template-columns: 1fr 1fr 1.15fr;
  align-items: stretch;
}

.econ-mood {
  padding: 7px 9px;
  border-radius: 10px;
  background: #f4efe4;
}

.econ-mood span {
  display: block;
  color: var(--faint);
  font-size: 8.5px;
  font-weight: 800;
  margin-bottom: 3px;
}

.econ-mood b {
  font-size: 13px;
  letter-spacing: -0.02em;
}

.scene-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.refresh-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  color: var(--faint);
  font-size: 8.5px;
  font-weight: 800;
  white-space: nowrap;
}

.refresh-badge i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green-2);
  animation: breathe 2s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { opacity: .35; transform: scale(.8); }
  50% { opacity: 1; transform: scale(1); }
}

.summary-one {
  margin: 4px 0 16px;
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-size: 17px;
  line-height: 1.9;
  color: var(--ink);
}

.postcard-image {
  display: block;
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(45, 52, 42, 0.16);
  background: #FBF3E2;
}

.modal-note {
  margin: 0 0 4px;
  color: var(--faint);
  font-size: 10px;
  line-height: 1.6;
}

.econ-money [data-econ],
.econ-bars [data-econ] {
  cursor: pointer;
  transition: background .15s ease;
}

.econ-money [data-econ]:active,
.econ-bars [data-econ]:active {
  background: #efe7d6;
}

.econ-finance {
  width: 100%;
  border: 0;
  font: inherit;
  text-align: left;
  -webkit-appearance: none;
}

.econ-finance b {
  color: var(--green);
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.econ-finance b.is-negative {
  color: var(--brick);
}

.econ-finance.is-watch {
  background: #fbf2d8;
}

.econ-finance.is-pressure {
  background: #f8e4d8;
}

.econ-finance.is-crisis {
  background: #f5d8d0;
}

.econ-finance.is-crisis b {
  color: var(--brick);
}

[data-open-personality] {
  cursor: pointer;
}

.scene-error {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 150px;
  padding: 20px;
  text-align: center;
}

.scene-error p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.personality-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.personality-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #EAF0E9;
}

.personality-avatar .chibi {
  width: 48px;
  height: 48px;
}

.personality-head h3 {
  margin: 0;
  font-size: 18px;
}

.personality-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.personality-desc {
  margin: 0 0 14px;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.6;
}

.personality-list {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 15px;
  background: #F4EFE4;
}

.personality-row {
  display: grid;
  grid-template-columns: 62px 1fr 30px;
  align-items: center;
  gap: 9px;
}

.personality-row > span {
  color: var(--ink-2);
  font-size: 10.5px;
  font-weight: 700;
}

.personality-row > b {
  color: var(--ink);
  font-size: 11px;
  text-align: right;
}

.personality-bar {
  height: 7px;
  border-radius: 99px;
  background: #DDE6DA;
  overflow: hidden;
}

.personality-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green-2);
  transition: width .35s ease;
}

.finance-hero {
  padding: 16px;
  border-radius: 16px;
  background: var(--green);
  color: #fff;
}

.finance-hero span,
.finance-hero small {
  display: block;
  color: rgba(255, 255, 255, 0.68);
  font-size: 10px;
  font-weight: 800;
}

.finance-hero b {
  display: block;
  margin: 5px 0;
  font-size: 25px;
  letter-spacing: -0.03em;
}

.finance-hero b.is-negative {
  color: #FFD2C4;
}

.finance-alert {
  margin-top: 12px;
  padding: 11px 13px;
  border-radius: 13px;
  background: #f4efe4;
}

.finance-alert b {
  display: block;
  margin-bottom: 3px;
  font-size: 12px;
}

.finance-alert p {
  margin: 0;
  color: var(--ink-2);
  font-size: 10.5px;
  line-height: 1.55;
}

.finance-alert small {
  display: block;
  margin-top: 5px;
  color: var(--faint);
  font-size: 9px;
}

.finance-alert.is-watch {
  background: #fbf2d8;
}

.finance-alert.is-pressure {
  background: #f8e4d8;
}

.finance-alert.is-crisis {
  background: #f5d8d0;
}

.finance-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.finance-grid div {
  padding: 10px 11px;
  border-radius: 12px;
  background: #f4efe4;
}

.finance-grid span {
  display: block;
  color: var(--faint);
  font-size: 9px;
  font-weight: 800;
  margin-bottom: 4px;
}

.finance-grid b {
  display: block;
  font-size: 13px;
  letter-spacing: -0.02em;
}

.finance-section {
  margin-top: 16px;
}

.finance-section h3 {
  margin: 0 0 7px;
  font-size: 12px;
}

.finance-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 7px;
}

.finance-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  background: #FFFDF8;
  border: 1px solid rgba(47, 74, 63, 0.08);
}

.finance-list li span {
  min-width: 0;
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 700;
}

.finance-list li small {
  display: block;
  margin-top: 2px;
  color: var(--faint);
  font-size: 9px;
  font-weight: 500;
}

.finance-list li b {
  flex: 0 0 auto;
  font-size: 11px;
}

.tx-list {
  list-style: none;
  margin: 2px 0 14px;
  padding: 0;
}

.tx-list li {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 8px;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(47, 74, 63, 0.14);
}

.tx-list time {
  color: var(--faint);
  font-size: 9px;
  font-weight: 800;
}

.tx-list span {
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.5;
}

.tx-list b {
  font-size: 12px;
  white-space: nowrap;
}

.tx-list b.income {
  color: var(--green-2);
}

.tx-list b.expense {
  color: var(--brick);
}

.start-head h1 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.earth-globe {
  display: inline-flex;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  filter: drop-shadow(0 4px 8px rgba(45, 127, 193, 0.25));
}

.earth-globe svg {
  width: 100%;
  height: 100%;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 14px;
  color: var(--ink);
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-size: 17px;
  font-weight: 800;
}

.login-brand .earth-globe {
  width: 28px;
  height: 28px;
}

.rules-list {
  margin: 2px 0 16px;
  padding: 0 0 0 18px;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.9;
}

.rules-list li {
  margin-bottom: 4px;
}

.check-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 14px;
  color: var(--faint);
  font-size: 11px;
  cursor: pointer;
}

.check-line input {
  width: 15px;
  height: 15px;
  accent-color: var(--green-2);
}

.sun.earth-orb {
  background: none;
  overflow: hidden;
  box-shadow: 0 0 0 18px rgba(45, 127, 193, 0.10), 0 0 60px rgba(45, 127, 193, 0.35);
  opacity: 1;
}

.sun.earth-orb svg {
  display: block;
  width: 100%;
  height: 100%;
}


.refresh-badge b {
  color: var(--green-2);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.journal-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin: 4px 0 14px;
}

.journal-stats div {
  padding: 9px 6px;
  border-radius: 10px;
  background: #F4EFE4;
  text-align: center;
}

.journal-stats b {
  display: block;
  font-size: 16px;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.journal-stats span {
  display: block;
  margin-top: 2px;
  color: var(--faint);
  font-size: 8.5px;
  font-weight: 800;
}

.journal-map-wrap {
  margin-bottom: 16px;
  border-radius: 18px;
  overflow: hidden;
}

.journal-map {
  display: block;
  width: 100%;
  height: auto;
}

.journal-section {
  margin: 16px 0 0;
}

.journal-section h3 {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: -0.01em;
}

.journal-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.journal-chips button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border: 1px solid rgba(47, 74, 63, 0.08);
  border-radius: 999px;
  background: #EAF0E9;
  color: var(--ink-2);
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.journal-chips button:active {
  background: #DEE9DF;
  transform: scale(0.97);
}

.journal-chips img.flag {
  width: 14px;
  height: 10px;
  border-radius: 2px;
  box-shadow: none;
}

.journal-cards {
  display: grid;
  gap: 8px;
}

.journal-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid rgba(47, 74, 63, 0.12);
  border-radius: 12px;
  background: #FFFDF8;
  text-align: left;
  color: var(--ink);
}

.journal-card-top {
  color: var(--faint);
  font-size: 9px;
  font-weight: 800;
}

.journal-card b {
  font-size: 13px;
}

.journal-card small {
  color: var(--muted);
  font-size: 10px;
}

.journal-card em {
  margin-top: 2px;
  color: var(--ink-2);
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-size: 11px;
  font-style: normal;
  line-height: 1.6;
}

.journal-invite {
  margin: 18px 0 8px;
  padding-top: 14px;
  border-top: 1px dashed rgba(47, 74, 63, 0.15);
}

.journal-invite p {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 11px;
}

.duration-picker {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: -2px 0 12px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.7);
  border: 1px solid rgba(47, 74, 63, 0.10);
  width: fit-content;
}

.duration-picker > span {
  padding-left: 8px;
  color: var(--faint);
  font-size: 9px;
  font-weight: 800;
}

.duration-picker button {
  padding: 6px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.duration-picker button.is-active {
  background: var(--green);
  color: #FFFDF8;
}

.thought-form textarea {
  width: 100%;
  min-height: 86px;
  margin: 2px 0 8px;
  padding: 12px;
  border: 1px solid rgba(47, 74, 63, 0.18);
  border-radius: 12px;
  background: #FFFDF8;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  outline: none;
}

.thought-form textarea:focus {
  border-color: var(--green-2);
}

.thought-decision {
  display: inline-flex;
  margin: 0 0 8px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #EAF0E9;
  color: var(--green);
  font-size: 10px;
  font-weight: 800;
}

.thought-reaction {
  margin: 0 0 8px;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.7;
}

.scene-thought {
  margin: 12px 0 10px;
  padding: 10px 12px;
  border-left: 3px solid #D8A94F;
  border-radius: 0 10px 10px 0;
  background: #F8F2E5;
}

.scene-thought span {
  color: var(--faint);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.scene-thought p {
  margin: 4px 0;
  color: var(--ink);
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-size: 13px;
  line-height: 1.7;
}

.scene-thought em {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  line-height: 1.6;
}

button.is-disabled,
button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.paywall-card {
  margin: 2px 0 14px;
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(145deg, #F8F0DD, #EEF3EA);
}

.paywall-card b {
  display: block;
  margin-bottom: 5px;
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-size: 18px;
}

.paywall-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.map-country path {
  fill: #F7F4EB;
  stroke: #A9BFBB;
  stroke-width: 0.7;
  vector-effect: non-scaling-stroke;
}

.map-country.is-visited path {
  fill: #2F6E5A;
  stroke: #214D3F;
  cursor: pointer;
}

.map-country.is-visited:hover path {
  fill: #3B8269;
}

.journal-country-list {
  display: grid;
  gap: 8px;
  margin: 2px 0 14px;
}

.journal-country-entry {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid rgba(47, 74, 63, 0.12);
  border-radius: 12px;
  background: #FFFDF8;
  color: var(--ink);
  text-align: left;
}

.journal-country-entry span {
  color: var(--faint);
  font-size: 9px;
  font-weight: 800;
}

.journal-country-entry b {
  font-size: 13px;
}

.journal-country-entry small {
  color: var(--muted);
  font-size: 10px;
}


.start-head {
  position: relative;
  z-index: 2;
}

.start-head h1 {
  position: relative;
  z-index: 3;
  padding-right: 102px;
  white-space: nowrap;
  font-size: clamp(27px, 8.4vw, 40px);
}

.city-orbit .sun.earth-orb {
  width: 94px;
  height: 94px;
  top: 66px;
  right: 16px;
  opacity: 0.9;
}

.paywall-free {
  margin-top: 6px !important;
  color: var(--brick) !important;
  font-weight: 800;
}

.map-extra-shapes path {
  fill: #F1F5F1;
  stroke: #C6D7D2;
  stroke-width: 0.55;
  vector-effect: non-scaling-stroke;
}

.life-event-card {
  margin: 0 0 12px;
  padding: 14px 15px;
  border-radius: 16px;
  background: linear-gradient(145deg, #FFF4DB, #F7E9D0);
  border: 1px solid rgba(177, 77, 53, 0.18);
}

.life-event-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
}

.life-event-head span {
  color: var(--brick);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
}

.life-event-head em {
  color: var(--faint);
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}

.life-event-card h3 {
  margin: 0 0 5px;
  font-size: 16px;
}

.life-event-card p {
  margin: 0 0 7px;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.7;
}

.life-event-card small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.scene-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 116px;
  gap: 10px;
  align-items: start;
}

.scene-copy {
  min-width: 0;
}

.scene-visual {
  width: 116px;
  flex: 0 0 auto;
  border-radius: 13px;
  overflow: hidden;
  background: #DDEEF0;
  box-shadow: 0 6px 16px rgba(45, 74, 63, 0.10);
}

.scene-animation {
  display: block;
  width: 100%;
  height: auto;
}

.visual-float {
  animation: visual-bob 3.4s ease-in-out infinite;
}

.visual-wave {
  animation: visual-wave 5s ease-in-out infinite alternate;
}

.visual-wave.slow {
  animation-duration: 7s;
  animation-delay: -2s;
}

.visual-rain {
  animation: visual-rain 1.2s linear infinite;
}

@keyframes visual-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

@keyframes visual-wave {
  0% { transform: translateX(-4px); }
  100% { transform: translateX(4px); }
}

@keyframes visual-rain {
  0% { transform: translateY(-8px); opacity: .2; }
  50% { opacity: .85; }
  100% { transform: translateY(12px); opacity: .2; }
}

@media (max-width: 360px) {
  .scene-main { grid-template-columns: minmax(0, 1fr) 98px; }
  .scene-visual { width: 98px; }
}

.scene-visual {
  height: 132px;
}

.scene-animation {
  width: 100%;
  height: 100%;
}

@media (max-width: 360px) {
  .scene-visual { height: 118px; }
}

.postcard-choice {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  margin-bottom: 10px;
  padding: 15px;
  border: 1px solid rgba(47, 74, 63, 0.14);
  border-radius: 14px;
  background: #FFFDF8;
  color: var(--ink);
  text-align: left;
}

.postcard-choice.premium {
  background: linear-gradient(145deg, #20302B, #2F5548);
  color: #FFFDF8;
  border-color: #20302B;
}

.postcard-choice b {
  font-size: 15px;
}

.postcard-choice span {
  color: var(--muted);
  font-size: 11px;
}

.postcard-choice.premium span {
  color: rgba(255, 253, 248, 0.72);
}

.premium-postcard-image {
  display: block;
  width: 100%;
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(30, 45, 38, 0.18);
}

.share-postcard-image {
  display: block;
  width: 100%;
  margin-bottom: 12px;
  border-radius: 12px;
  -webkit-touch-callout: default;
  user-select: auto;
}

img.flag {
  display: block;
  width: 30px;
  height: 21px;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(30, 45, 38, 0.16);
}

.country-flag-img {
  display: block;
  width: 44px;
  height: 31px;
  object-fit: cover;
  border-radius: 5px;
}

.avatar-flag-img {
  display: block;
  width: 18px;
  height: 13px;
  object-fit: cover;
  border-radius: 2px;
}

.mini-flag {
  display: inline-block;
  width: 15px;
  height: 11px;
  object-fit: cover;
  border-radius: 1px;
  vertical-align: -1px;
  margin-right: 3px;
}

.weather-now {
  display: block;
  margin-top: 2px;
  color: var(--faint);
  font-size: 8.5px;
  font-weight: 800;
  white-space: nowrap;
}

.econ-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
}

.econ-footer .econ-last {
  flex: 1 1 auto;
  margin: 0;
}

.fx-note {
  flex: 0 0 auto;
  color: var(--faint);
  font-size: 8px;
  line-height: 1.5;
  text-align: right;
  max-width: 48%;
}

.draw-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 14px 0 0;
}

.draw-actions.is-random-only {
  grid-template-columns: 1fr;
}

.draw-actions .btn {
  width: 100%;
  padding-left: 8px;
  padding-right: 8px;
}

.job-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  max-height: 60vh;
  overflow-y: auto;
  margin: 2px 0 8px;
}

.job-pick-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 9px 10px;
  border: 1px solid rgba(47, 74, 63, 0.12);
  border-radius: 10px;
  background: #FFFDF8;
  text-align: left;
  color: var(--ink);
}

.job-pick-item b {
  font-size: 12px;
}

.job-pick-item small {
  color: var(--faint);
  font-size: 9px;
}

.job-pick-item:active {
  background: #EEF3EA;
}

.clock-line {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 7px;
}

.clock-line .clock {
  display: inline-block;
}

.clock-line .weather-now {
  display: inline;
  margin: 0;
}

.draw-actions .btn {
  background: var(--green);
  color: #FFFDF8;
  border-color: var(--green);
}

.weather-line {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 2px;
}

.weather-line .weather {
  display: inline;
  margin: 0;
}

.weather-line .weather-now {
  display: inline;
  margin: 0;
}

/* ---------- onboarding / compact home / timeline ---------- */

.onboarding-card {
  position: relative;
  text-align: center;
}

.onboarding-close {
  position: absolute;
  top: 1px;
  right: 1px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: #F1EBDD;
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.onboarding-kicker {
  margin: 2px 0 2px;
  color: var(--brick);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.22em;
}

.onboarding-art {
  display: block;
  width: 70%;
  max-width: 300px;
  max-height: none;
  margin: 0 auto 2px;
  border-radius: 18px;
  box-shadow: 0 8px 22px rgba(77, 63, 40, 0.08);
}

.onboarding-card h2 {
  margin: 2px 0 4px;
  color: var(--green);
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-size: 34px;
  letter-spacing: 0.04em;
}

.onboarding-tagline {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
}

.onboarding-sub {
  margin: 9px 0 14px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.8;
}

.onboarding-steps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 12px 0;
  text-align: left;
}

.onboarding-steps div {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 12px;
  background: #F5F0E4;
  color: var(--ink-2);
  font-size: 11px;
}

.onboarding-steps span {
  font-size: 18px;
  filter: saturate(.65);
}

.onboarding-values {
  padding: 10px 0 8px;
  border-top: 1px solid rgba(47, 74, 63, 0.12);
  color: var(--ink-2);
  font-size: 11.5px;
  line-height: 1.8;
}

.onboarding-values p {
  margin: 0;
}

.onboarding-quote {
  margin: 4px 0 13px;
  padding: 11px 14px;
  border-radius: 12px;
  background: #F8EED8;
  color: #8F6038;
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-size: 12px;
  line-height: 1.7;
}

.onboarding-guide {
  display: block;
  margin: 10px auto 4px;
  border: 0;
  background: transparent;
  color: var(--green);
  font: inherit;
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.onboarding-test {
  margin: 8px 0 0;
  color: var(--faint);
  font-size: 9px;
}

.onboarding-never {
  justify-content: center;
  margin-top: 10px;
}

.thread-card {
  margin: 0 0 12px;
  padding: 11px 14px;
  border-left: 3px solid var(--gold);
  border-radius: 0 12px 12px 0;
  background: #FBF4E3;
}

.thread-card span {
  color: #A87943;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
}

.thread-card p {
  margin: 3px 0 0;
  color: var(--ink-2);
  font-family: "Songti SC", "Noto Serif SC", serif;
  font-size: 13px;
  line-height: 1.65;
}

.econ-compact {
  display: grid;
  grid-template-columns: 1fr .8fr 1.3fr;
  gap: 7px;
  align-items: stretch;
}

.econ-energy-compact,
.econ-mood-compact,
.econ-networth {
  min-width: 0;
  padding: 8px 9px;
  border-radius: 11px;
  background: #f4efe4;
}

.econ-energy-compact > span {
  display: flex;
  justify-content: space-between;
  color: var(--faint);
  font-size: 9px;
  font-weight: 800;
}

.econ-energy-compact > span b {
  color: var(--ink);
}

.econ-energy-compact .econ-bar {
  margin-top: 6px;
}

.econ-mood-compact span,
.econ-networth span {
  display: block;
  color: var(--faint);
  font-size: 8.5px;
  font-weight: 800;
  margin-bottom: 3px;
}

.econ-mood-compact b {
  display: block;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.econ-networth {
  width: 100%;
  border: 0;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.econ-networth b {
  display: block;
  color: var(--green);
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.econ-networth small {
  display: block;
  margin-top: 2px;
  color: var(--faint);
  font-size: 8px;
}

.econ-networth.is-pressure small { color: #A87943; }
.econ-networth.is-crisis small { color: var(--brick); }

.timeline-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 7px;
}

.timeline-list li {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 3px 8px;
  padding: 9px 10px;
  border-radius: 10px;
  background: #F7F2E7;
}

.timeline-list time {
  color: var(--brick);
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.timeline-list span {
  color: var(--ink-2);
  font-size: 11px;
  line-height: 1.5;
}

.timeline-list small {
  grid-column: 2;
  color: var(--faint);
  font-size: 9px;
  line-height: 1.5;
}

.timeline-highlights,
.timeline-section {
  margin-bottom: 14px;
}

.timeline-highlights h3,
.timeline-section h3 {
  margin: 0 0 7px;
  color: var(--ink);
  font-size: 12px;
}

.timeline-highlights ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.timeline-highlights li {
  display: flex;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 9px;
  background: #FBF4E3;
  color: var(--ink-2);
  font-size: 10.5px;
}

.timeline-highlights time {
  flex: 0 0 auto;
  color: #A87943;
  font-size: 9px;
  font-weight: 800;
}
