:root {
  --ink: #25312e;
  --muted: #65746f;
  --paper: #fff9ee;
  --cream: #fffdf7;
  --green: #5b9c73;
  --sage: #dfeee2;
  --orange: #ec9254;
  --gold: #f3ce79;
  --blue: #9ed4e5;
  --gray: #7e8a8f;
  --shadow: 0 24px 60px rgba(69, 52, 27, 0.14);
  font-family: "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 8%, rgba(244, 206, 126, 0.42), transparent 30%),
    radial-gradient(circle at 88% 12%, rgba(158, 212, 229, 0.34), transparent 28%),
    linear-gradient(135deg, #fff3df 0%, #edf7ef 48%, #fff6ea 100%);
}

button {
  font: inherit;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
}

.notebook {
  position: relative;
  width: min(1180px, 100%);
  min-height: min(840px, calc(100vh - 36px));
  overflow: hidden;
  border: 1px solid rgba(88, 69, 40, 0.18);
  border-radius: 20px;
  background:
    linear-gradient(90deg, rgba(190, 171, 126, 0.16) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, rgba(190, 171, 126, 0.13) 0 1px, transparent 1px 100%),
    var(--paper);
  background-size: 34px 34px;
  box-shadow: var(--shadow);
}

.paper-texture,
.doodle {
  display: none;
}

#app {
  min-height: inherit;
}

.start-screen,
.habit-screen,
.play-screen,
.result-screen {
  min-height: inherit;
  padding: clamp(24px, 4vw, 48px);
  animation: pageIn 360ms ease both;
}

.kicker,
.mini-label {
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(91, 156, 115, 0.13);
  color: #416a50;
  font-size: 0.9rem;
  font-weight: 900;
}

.game-primary {
  width: fit-content;
  min-height: 48px;
  padding: 12px 20px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, #2f7752, #68aa6a);
  box-shadow: 0 14px 30px rgba(47, 119, 82, 0.24);
  font-weight: 900;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.game-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(47, 119, 82, 0.28);
}

.start-screen {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(360px, 520px);
  align-items: center;
  gap: 34px;
}

.start-copy {
  display: grid;
  gap: 16px;
  max-width: 610px;
}

.start-copy h1,
.habit-copy h1,
.result-screen h1 {
  font-size: clamp(2.4rem, 5vw, 4.7rem);
  line-height: 1.04;
  letter-spacing: 0;
}

.start-copy h2 {
  font-size: clamp(1.45rem, 3vw, 2.35rem);
}

.start-copy p:not(.kicker),
.habit-copy p,
.result-screen p {
  color: #4e5f59;
  font-size: clamp(1rem, 2vw, 1.16rem);
  line-height: 1.75;
}

.hero-life {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  border-radius: 24px;
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.74) 0 36px, transparent 37px),
    radial-gradient(circle at 82% 20%, rgba(255, 255, 255, 0.58) 0 28px, transparent 29px),
    linear-gradient(180deg, rgba(158, 212, 229, 0.55) 0 48%, rgba(234, 215, 177, 0.7) 49% 100%);
  box-shadow: inset 0 -28px 0 rgba(123, 97, 54, 0.08), 0 18px 40px rgba(36, 48, 47, 0.1);
}

.player-art {
  position: absolute;
  right: 52px;
  bottom: 0;
  width: auto;
  height: min(88%, 500px);
  filter: drop-shadow(0 18px 24px rgba(36, 48, 47, 0.16));
}

.ledger-book {
  position: absolute;
  left: 28px;
  top: 34px;
  width: 190px;
  min-height: 145px;
  display: grid;
  gap: 10px;
  padding: 20px;
  border: 3px solid #2f433d;
  border-radius: 18px;
  background: #fffdf7;
  box-shadow: 12px 12px 0 rgba(36, 48, 47, 0.08);
  transform: rotate(-4deg);
}

.ledger-book span {
  font-weight: 900;
  font-size: 1.2rem;
}

.ledger-book i {
  display: block;
  height: 10px;
  border-radius: 999px;
  background: rgba(91, 156, 115, 0.2);
}

.player-piece {
  position: absolute;
  width: 132px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 14px 18px rgba(36, 48, 47, 0.14));
}

.habit-screen {
  display: grid;
  align-content: center;
  gap: 28px;
}

.habit-copy {
  display: grid;
  gap: 14px;
  max-width: 760px;
}

.habit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.habit-card {
  display: grid;
  align-content: start;
  gap: 12px;
  border: 1px solid rgba(36, 48, 47, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 28px rgba(36, 48, 47, 0.08);
  color: var(--ink);
  text-align: left;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.habit-card {
  cursor: pointer;
}

.habit-card {
  min-height: 188px;
  padding: 20px;
  border-top: 6px solid rgba(91, 156, 115, 0.72);
}

.habit-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 34px rgba(36, 48, 47, 0.12);
}

.habit-card strong {
  font-size: 1.32rem;
}

.habit-card span {
  color: #51615d;
  line-height: 1.65;
}

.game-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.game-header h1 {
  font-size: clamp(1.9rem, 4vw, 3.25rem);
  line-height: 1.08;
}

.month-track {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.month-track span {
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.64);
  color: #66746f;
  font-weight: 900;
}

.month-track .active {
  color: white;
  background: var(--green);
}

.month-track .done {
  color: #35513d;
  background: rgba(91, 156, 115, 0.16);
}

.play-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 18px;
  align-items: start;
}

.play-main {
  display: grid;
  gap: 14px;
}

.life-stage {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  border: 1px solid rgba(36, 48, 47, 0.16);
  border-radius: 24px;
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.68) 0 34px, transparent 35px),
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.55) 0 25px, transparent 26px),
    linear-gradient(180deg, rgba(158, 212, 229, 0.55) 0 46%, rgba(234, 215, 177, 0.68) 47% 100%);
  box-shadow: inset 0 -22px 0 rgba(123, 97, 54, 0.08), 0 14px 30px rgba(36, 48, 47, 0.08);
}

.life-stage.has-bg {
  background: #f7edda;
}

.life-stage.has-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(255, 249, 238, 0.1), rgba(255, 249, 238, 0.22)),
    radial-gradient(circle at 50% 18%, rgba(255, 253, 247, 0.34), transparent 42%);
  pointer-events: none;
}

.scene-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.scene-supply .scene-bg {
  object-position: center;
}

.scene-shelf .scene-bg {
  object-position: center;
}

.scene-friend .scene-bg {
  object-position: center;
}

.scene-community .scene-bg {
  object-position: center;
}

.scene-later .scene-bg {
  object-position: center;
}

.room-label {
  position: absolute;
  left: 18px;
  top: 18px;
  z-index: 4;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  font-weight: 900;
}

.phone-alert {
  position: absolute;
  left: 50%;
  top: auto;
  bottom: 18px;
  z-index: 5;
  width: min(560px, calc(100% - 36px));
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 26px rgba(36, 48, 47, 0.12);
  transform: translateX(-50%);
}

.life-stage.has-bg .phone-alert,
.life-stage.has-bg .room-label {
  background: rgba(255, 253, 247, 0.88);
  backdrop-filter: blur(6px);
}

.life-stage.has-bg .phone-alert {
  left: auto;
  right: 18px;
  bottom: 16px;
  width: min(500px, calc(100% - 36px));
  transform: none;
}

.phone-alert span {
  display: block;
  color: var(--orange);
  font-size: 0.82rem;
  font-weight: 900;
}

.phone-alert strong {
  display: block;
  line-height: 1.45;
}

.scene-prop {
  position: absolute;
  left: 50%;
  bottom: 70px;
  z-index: 2;
  width: 120px;
  height: 110px;
  transform: translateX(-50%);
  pointer-events: none;
  transition: transform 520ms ease, filter 520ms ease;
}

.life-stage.has-bg .scene-prop {
  opacity: 0;
}

.scene-prop span,
.scene-prop i {
  position: absolute;
  display: block;
}

.scene-prop.toothpaste span {
  left: 20px;
  bottom: 10px;
  width: 80px;
  height: 34px;
  border: 3px solid var(--ink);
  border-radius: 16px 10px 10px 16px;
  background: #f7fbff;
  transform: rotate(-8deg);
}

.scene-prop.toothpaste i {
  right: 10px;
  bottom: 16px;
  width: 26px;
  height: 22px;
  border-radius: 6px;
  background: var(--green);
  transform: rotate(-8deg);
}

.scene-prop.shelf span {
  left: 6px;
  bottom: 8px;
  width: 108px;
  height: 86px;
  border: 3px solid var(--ink);
  border-radius: 12px;
  background:
    linear-gradient(90deg, transparent 0 31%, rgba(36,48,47,0.16) 32% 34%, transparent 35% 64%, rgba(36,48,47,0.16) 65% 67%, transparent 68%),
    linear-gradient(180deg, transparent 0 45%, rgba(36,48,47,0.16) 46% 49%, transparent 50%),
    #fffdf7;
}

.scene-prop.shelf i {
  left: 26px;
  top: 28px;
  width: 18px;
  height: 28px;
  border-radius: 6px;
  background: var(--gold);
  box-shadow: 36px 0 0 var(--green), 18px 42px 0 var(--orange), 58px 42px 0 var(--blue);
}

.scene-prop.chat span {
  left: 22px;
  bottom: 8px;
  width: 76px;
  height: 96px;
  border: 4px solid var(--ink);
  border-radius: 18px;
  background: #fffdf7;
}

.scene-prop.chat i {
  left: 38px;
  top: 34px;
  width: 46px;
  height: 14px;
  border-radius: 999px;
  background: var(--sage);
  box-shadow: 0 24px 0 #ffe9bd, 0 48px 0 var(--sage);
}

.scene-prop.ledger span {
  left: 8px;
  bottom: 0;
  width: 104px;
  height: 82px;
  border: 3px solid var(--ink);
  border-radius: 14px;
  background: #fffdf7;
  transform: rotate(-3deg);
}

.scene-prop.ledger i {
  left: 30px;
  top: 50px;
  width: 56px;
  height: 10px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 22px 0 rgba(91, 156, 115, 0.24);
  transform: rotate(-3deg);
}

.player-piece {
  left: 13%;
  bottom: -4px;
  z-index: 4;
  animation: idleBreath 2.8s ease-in-out infinite;
  transition: transform 1180ms cubic-bezier(0.2, 0.88, 0.24, 1), left 1180ms cubic-bezier(0.2, 0.88, 0.24, 1);
}

.life-stage.has-bg .player-piece {
  width: 142px;
  bottom: 24px;
  filter: drop-shadow(0 12px 10px rgba(36, 48, 47, 0.22));
}

.life-stage.has-bg::before {
  content: "";
  position: absolute;
  left: 13%;
  bottom: 20px;
  z-index: 3;
  width: 112px;
  height: 18px;
  border-radius: 50%;
  background: rgba(36, 48, 47, 0.16);
  filter: blur(3px);
  transition: left 1180ms cubic-bezier(0.2, 0.88, 0.24, 1), transform 1180ms cubic-bezier(0.2, 0.88, 0.24, 1);
}

.scene-supply .player-piece {
  left: 24%;
  width: 245px;
  bottom: -12px;
}

.scene-supply::before {
  left: 24%;
  bottom: -4px;
  width: 188px;
  height: 28px;
}

.scene-shelf .player-piece {
  left: 34%;
  width: 190px;
  bottom: -2px;
}

.scene-shelf::before {
  left: 34%;
  bottom: -6px;
  width: 152px;
  height: 24px;
}

.scene-friend .player-piece {
  left: 20%;
  width: 195px;
  bottom: -4px;
}

.scene-friend::before {
  left: 20%;
  bottom: -8px;
  width: 156px;
  height: 24px;
}

.scene-community .player-piece {
  display: none;
}

.scene-community::before {
  display: none;
}

.scene-later .player-piece,
.scene-review .player-piece {
  display: none;
}

.scene-later::before,
.scene-review::before {
  display: none;
}

.player-piece.move {
  animation: none;
  left: 43%;
  transform: translateY(-12px) scale(1.06);
}

.life-stage.picked-wait_bonus .player-piece,
.life-stage.picked-try_new .player-piece,
.life-stage.picked-one_time .player-piece,
.life-stage.picked-quiet_use .player-piece,
.life-stage.picked-review .player-piece {
  left: 31%;
}

.scene-supply.picked-wait_bonus .player-piece {
  left: 28%;
}

.scene-shelf.picked-try_new .player-piece {
  left: 30%;
}

.life-stage.picked-wait_bonus::before,
.life-stage.picked-try_new::before,
.life-stage.picked-one_time::before,
.life-stage.picked-quiet_use::before,
.life-stage.picked-review::before {
  left: 31%;
  transform: translateY(-2px) scale(1.04);
}

.scene-supply.picked-wait_bonus::before {
  left: 28%;
}

.scene-shelf.picked-try_new::before {
  left: 30%;
}

.life-stage.picked-buy_today .player-piece,
.life-stage.picked-stable_pick .player-piece,
.life-stage.picked-relation .player-piece,
.life-stage.picked-share_experience .player-piece {
  left: 55%;
}

.scene-supply.picked-buy_today .player-piece {
  left: 45%;
}

.scene-shelf.picked-stable_pick .player-piece {
  left: 58%;
}

.life-stage.picked-buy_today::before,
.life-stage.picked-stable_pick::before,
.life-stage.picked-relation::before,
.life-stage.picked-share_experience::before {
  left: 55%;
  transform: translateY(-2px) scale(1.04);
}

.scene-supply.picked-buy_today::before {
  left: 45%;
}

.scene-shelf.picked-stable_pick::before {
  left: 58%;
}

.life-stage[class*="picked-"] .scene-prop {
  transform: translateX(-50%) translateY(-8px) scale(1.08);
  filter: drop-shadow(0 12px 18px rgba(91, 156, 115, 0.22));
}

.spark-line {
  position: absolute;
  z-index: 3;
  left: 44%;
  right: 23%;
  bottom: 118px;
  height: 4px;
  border-radius: 999px;
  background: repeating-linear-gradient(90deg, rgba(36,48,47,0.18) 0 8px, transparent 8px 16px);
  opacity: 0.45;
}

.spark-line.is-on {
  background: linear-gradient(90deg, var(--gold), var(--green));
  box-shadow: 0 0 18px rgba(243, 206, 121, 0.75);
  opacity: 1;
}

.stage-actions {
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
}

.stage-hotspot {
  position: absolute;
  --hotspot-x: 0;
  min-width: 132px;
  min-height: 46px;
  display: grid;
  place-items: center;
  padding: 8px 12px;
  border: 2px solid rgba(37, 49, 46, 0.16);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.96);
  box-shadow: 0 12px 24px rgba(36, 48, 47, 0.12);
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
  pointer-events: auto;
  transform: translateX(var(--hotspot-x));
  animation: hotspotPulse 1.6s ease-in-out infinite;
  transition: transform 160ms ease, opacity 160ms ease, background 160ms ease;
}

.stage-hotspot > span {
  position: relative;
  z-index: 2;
}

.stage-hotspot > small {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 14px);
  z-index: 4;
  width: min(260px, 70vw);
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 253, 247, 0.97);
  box-shadow: 0 14px 30px rgba(36, 48, 47, 0.18);
  color: #42514d;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.55;
  text-align: left;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.stage-hotspot > small::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 14px;
  height: 14px;
  background: rgba(255, 253, 247, 0.97);
  transform: translateX(-50%) rotate(45deg);
}

.stage-hotspot:hover > small,
.stage-hotspot:focus-visible > small {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.life-stage.has-bg .stage-hotspot {
  border-color: rgba(37, 49, 46, 0.12);
  box-shadow: 0 14px 26px rgba(36, 48, 47, 0.16);
  backdrop-filter: blur(6px);
}

.stage-hotspot::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -11px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 7px rgba(243, 206, 121, 0.24);
  transform: translateX(-50%);
}

.stage-hotspot:hover:not(:disabled) {
  transform: translateX(var(--hotspot-x)) translateY(-3px) scale(1.03);
}

.stage-hotspot:disabled {
  cursor: default;
  opacity: 0.42;
  animation: none;
}

.stage-hotspot:disabled > small {
  display: none;
}

.stage-hotspot.selected {
  opacity: 1;
  color: white;
  background: linear-gradient(135deg, #2f7752, #68aa6a);
  border-color: transparent;
  animation: chosenPop 520ms ease both;
}

.hotspot-1 {
  left: calc(50% - 190px);
  top: 132px;
}

.hotspot-2 {
  left: calc(50% + 52px);
  top: 132px;
}

.hotspot-2 > small {
  left: auto;
  right: 0;
  transform: translateY(8px);
}

.hotspot-2 > small::after {
  left: auto;
  right: 26px;
  transform: rotate(45deg);
}

.hotspot-2:hover > small,
.hotspot-2:focus-visible > small {
  transform: translateY(0);
}

.stage-hotspot.single {
  left: 50%;
  right: auto;
  --hotspot-x: -50%;
}

.stamp-toast {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 28px rgba(36, 48, 47, 0.08);
}

.mission-hint {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  color: #51615d;
  text-align: center;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(36, 48, 47, 0.07);
}

.life-stage.has-bg + .mission-hint {
  background: rgba(255, 253, 247, 0.84);
  backdrop-filter: blur(6px);
}

.scene-footnote {
  padding: 0 4px;
  color: #65746f;
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.5;
}

.action-progress {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  color: #51615d;
  text-align: center;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(36, 48, 47, 0.07);
  animation: progressBlink 1100ms ease-in-out infinite alternate;
}

.stamp-toast span {
  padding: 10px 12px;
  border: 2px dashed rgba(236, 146, 84, 0.6);
  border-radius: 12px;
  color: #c66b35;
  font-weight: 900;
  transform: rotate(-2deg);
}

.stamp-toast p {
  color: #42514d;
  line-height: 1.65;
  font-weight: 800;
}

.stamp-toast small {
  display: block;
  margin-top: 6px;
  color: #65746f;
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.5;
}

.passbook {
  position: sticky;
  top: 20px;
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 12px 28px rgba(36, 48, 47, 0.08);
}

.passbook h3 {
  margin-top: 8px;
}

.habit-chip {
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--sage);
  font-weight: 900;
}

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

.stamp {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 14px;
  background: #fff4cc;
}

.stamp.relation {
  background: #e4f3e6;
}

.stamp span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 900;
}

.stamp strong {
  font-weight: 900;
}

.meter {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.meter span,
.meter strong {
  font-weight: 900;
}

.meter i {
  grid-column: 1 / -1;
  display: block;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green), #9bd37f);
}

.passbook p {
  color: #51615d;
  line-height: 1.6;
}

.result-screen {
  display: grid;
  gap: 22px;
}

.result-ledger {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.7fr);
  gap: 16px;
  align-items: stretch;
}

.ledger-page,
.ledger-summary,
.reveal-note {
  padding: 20px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 28px rgba(36, 48, 47, 0.08);
}

.ledger-page {
  min-height: 300px;
  border: 2px solid rgba(36, 48, 47, 0.12);
  background:
    linear-gradient(90deg, rgba(190, 171, 126, 0.12) 0 1px, transparent 1px 100%),
    #fffdf7;
  background-size: 28px 28px;
}

.final-stamps {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.final-stamps span {
  padding: 12px 14px;
  border: 2px dashed rgba(236, 146, 84, 0.7);
  border-radius: 14px;
  color: #b95e2b;
  background: #fff7dc;
  font-weight: 900;
  transform: rotate(-2deg);
}

.final-stamps .relation {
  color: #376743;
  background: #e5f3e5;
  border-color: rgba(91, 156, 115, 0.7);
}

.ledger-summary {
  display: grid;
  align-content: center;
  gap: 12px;
}

.reveal-note {
  display: grid;
  gap: 10px;
}

.disclaimer {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

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

@keyframes hotspotPulse {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -5px;
  }
}

@keyframes idleBreath {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateY(-5px) rotate(1deg);
  }
}

@keyframes chosenPop {
  from {
    scale: 0.92;
  }
  to {
    scale: 1.08;
  }
}

@keyframes progressBlink {
  from {
    opacity: 0.78;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 900px) {
  .app-shell {
    padding: 10px;
  }

  .notebook,
  .start-screen,
  .habit-screen,
  .play-screen,
  .result-screen {
    min-height: calc(100vh - 20px);
  }

  .start-screen,
  .habit-grid,
  .play-layout,
  .result-ledger {
    grid-template-columns: 1fr;
  }

  .hero-life {
    min-height: 430px;
    order: -1;
  }

  .player-art {
    right: 20px;
    left: auto;
    width: auto;
    height: min(84%, 360px);
  }

  .ledger-book {
    width: 155px;
  }

  .game-header {
    display: grid;
  }

  .month-track {
    justify-content: flex-start;
  }

  .passbook {
    position: static;
  }

  .life-stage {
    min-height: 430px;
  }

  .phone-alert {
    width: calc(100% - 28px);
  }

  .life-stage.has-bg .phone-alert {
    left: 14px;
    right: 14px;
    bottom: 14px;
    width: auto;
  }

  .player-piece {
    left: 8%;
    width: 118px;
  }

  .life-stage.has-bg .player-piece {
    width: 92px;
    bottom: 30px;
  }

  .life-stage.has-bg::before {
    width: 76px;
    height: 13px;
    bottom: 26px;
  }

  .scene-supply .player-piece {
    left: 21%;
    width: 174px;
    bottom: -4px;
  }

  .scene-supply::before {
    left: 21%;
    bottom: -8px;
    width: 136px;
    height: 22px;
  }

  .scene-shelf .player-piece {
    left: 29%;
    width: 148px;
    bottom: 4px;
  }

  .scene-shelf::before {
    left: 29%;
    bottom: 0;
    width: 118px;
    height: 19px;
  }

  .scene-friend .player-piece {
    left: 18%;
    width: 150px;
    bottom: 2px;
  }

  .player-piece.move {
    left: 45%;
  }

  .life-stage.picked-wait_bonus .player-piece,
  .life-stage.picked-try_new .player-piece,
  .life-stage.picked-one_time .player-piece,
  .life-stage.picked-quiet_use .player-piece,
  .life-stage.picked-review .player-piece {
    left: 22%;
  }

  .scene-supply.picked-wait_bonus .player-piece {
    left: 25%;
  }

  .scene-shelf.picked-try_new .player-piece {
    left: 24%;
  }

  .life-stage.picked-wait_bonus::before,
  .life-stage.picked-try_new::before,
  .life-stage.picked-one_time::before,
  .life-stage.picked-quiet_use::before,
  .life-stage.picked-review::before {
    left: 22%;
  }

  .scene-supply.picked-wait_bonus::before {
    left: 25%;
  }

  .scene-shelf.picked-try_new::before {
    left: 24%;
  }

  .life-stage.picked-buy_today .player-piece,
  .life-stage.picked-stable_pick .player-piece,
  .life-stage.picked-relation .player-piece,
  .life-stage.picked-share_experience .player-piece {
    left: 50%;
  }

  .scene-supply.picked-buy_today .player-piece {
    left: 42%;
  }

  .scene-shelf.picked-stable_pick .player-piece {
    left: 52%;
  }

  .life-stage.picked-buy_today::before,
  .life-stage.picked-stable_pick::before,
  .life-stage.picked-relation::before,
  .life-stage.picked-share_experience::before {
    left: 50%;
  }

  .scene-supply.picked-buy_today::before {
    left: 42%;
  }

  .scene-shelf.picked-stable_pick::before {
    left: 52%;
  }

  .hotspot-1 {
    left: 12px;
    top: 116px;
  }

  .hotspot-2 {
    right: 12px;
    left: auto;
    top: 116px;
  }

  .stage-hotspot {
    min-width: 118px;
    font-size: 0.9rem;
  }

  .stage-hotspot > small {
    display: none;
  }

  .stamp-toast {
    grid-template-columns: 1fr;
  }

  .game-primary {
    width: 100%;
  }
}
