:root {
  color: #473c31;
  background: #f4ead4;
  font-family: Inter, ui-rounded, "Segoe UI", system-ui, -apple-system, sans-serif;
  font-synthesis: none;
  --paper: rgba(255, 250, 237, 0.96);
  --paper-solid: #fffaf0;
  --ink: #473c31;
  --muted: #786d60;
  --sage: #6f8052;
  --sage-dark: #52623a;
  --sage-soft: #e6ead3;
  --terracotta: #c76d47;
  --terracotta-dark: #9e4f35;
  --lilac: #9480ac;
  --lilac-soft: #eee7f2;
  --rose: #d98783;
  --gold: #d4a453;
  --line: rgba(104, 84, 58, 0.18);
  --shadow: 0 18px 48px rgba(72, 54, 30, 0.18);
  --safe-top: max(12px, env(safe-area-inset-top), var(--tg-content-safe-area-inset-top, 0px));
  --safe-right: max(12px, env(safe-area-inset-right), var(--tg-content-safe-area-inset-right, 0px));
  --safe-bottom: max(14px, env(safe-area-inset-bottom), var(--tg-content-safe-area-inset-bottom, 0px));
  --safe-left: max(12px, env(safe-area-inset-left), var(--tg-content-safe-area-inset-left, 0px));
}

* { box-sizing: border-box; }

html, body {
  min-width: 300px;
  min-height: 100%;
  margin: 0;
  overscroll-behavior: none;
}

body {
  min-height: 100vh;
  min-height: var(--tg-viewport-stable-height, 100svh);
  overflow: hidden;
}

button { font: inherit; }
button, [role="button"] { -webkit-tap-highlight-color: transparent; }
button:focus-visible { outline: 3px solid rgba(117, 95, 145, 0.45); outline-offset: 2px; }
.symbol-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.app-shell {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: var(--tg-viewport-stable-height, 100svh);
  overflow: hidden;
  background: #a9cfee;
}

.world {
  position: absolute;
  inset: 0;
  background-image: var(--world-image);
  background-position: center center;
  background-size: cover;
  transform: scale(1.01);
  transition: opacity 420ms ease, filter 300ms ease, transform 900ms cubic-bezier(.2,.75,.25,1);
}

.world::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.04) 30%, rgba(62,45,26,.04) 58%, rgba(48,35,22,.34) 100%);
}

.app-shell.is-sheet .world { filter: saturate(.86) brightness(.96); transform: scale(1.025); }
.app-shell.is-sheet .world::after { background: linear-gradient(180deg, rgba(247,239,219,.02) 2%, rgba(245,235,214,.28) 29%, rgba(61,45,27,.25) 52%, rgba(61,45,27,.34) 100%); }

.topbar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: var(--safe-top) var(--safe-right) 0 var(--safe-left);
}

.brand-chip, .progress-chip, .icon-button {
  border: 1px solid rgba(103, 83, 56, 0.2);
  background: rgba(255, 250, 237, 0.9);
  color: var(--ink);
  box-shadow: 0 7px 22px rgba(68, 51, 31, 0.13);
  backdrop-filter: blur(12px);
}

.brand-chip, .progress-chip {
  min-height: 38px;
  border-radius: 999px;
  padding: 8px 13px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 760;
  letter-spacing: .015em;
}

.brand-chip svg, .progress-chip svg { width: 17px; height: 17px; fill: none; stroke: var(--sage-dark); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.progress-chip strong { color: var(--sage-dark); }

.icon-button {
  width: 40px;
  height: 40px;
  padding: 9px;
  border-radius: 50%;
  cursor: pointer;
}
.icon-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.home-content {
  position: absolute;
  z-index: 2;
  inset: auto 0 0;
  padding: 110px var(--safe-right) var(--safe-bottom) var(--safe-left);
  background: linear-gradient(180deg, transparent 0, rgba(57, 42, 27, .10) 24%, rgba(57, 42, 27, .42) 100%);
}

.paper {
  position: relative;
  border: 1px solid rgba(111, 88, 57, 0.17);
  border-radius: 26px;
  background:
    radial-gradient(circle at 12% 8%, rgba(216, 177, 102, .12), transparent 24%),
    linear-gradient(145deg, rgba(255, 253, 246, .98), rgba(248, 239, 217, .97));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.paper::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(131, 103, 64, .12);
  border-radius: 20px;
  pointer-events: none;
}

.home-card { padding: 21px 20px 18px; text-align: center; }
.home-card.is-complete { padding: 15px 18px 10px; }
.home-card.is-complete h1 { margin-bottom: 6px; font-size: clamp(23px, 6.6vw, 29px); }
.home-card.is-complete p { margin-bottom: 10px; font-size: 12px; line-height: 1.35; }
.home-card.is-complete .primary-button { min-height: 47px; }
.home-card.is-complete .text-button { min-height: 34px; }
.eyebrow { margin: 0 0 6px; color: var(--sage-dark); font-size: 11px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; color: #49382b; font-weight: 650; }
.home-card h1 { margin-bottom: 8px; font-size: clamp(25px, 7vw, 32px); line-height: 1.04; }
.home-card p { max-width: 32rem; margin: 0 auto 14px; color: var(--muted); font-size: 14px; line-height: 1.45; }

.step-track { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 13px 0 17px; }
.step-leaf {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(83, 102, 58, .25);
  border-radius: 50% 50% 50% 12%;
  background: #f6f1df;
  color: #849064;
  transform: rotate(-8deg);
}
.step-leaf svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transform: rotate(8deg); }
.step-leaf.is-filled { background: var(--sage); border-color: var(--sage); color: #fff9e8; box-shadow: 0 4px 10px rgba(72, 95, 47, .2); }

.primary-button, .secondary-button, .text-button {
  width: 100%;
  min-height: 52px;
  border-radius: 17px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}
.primary-button {
  border: 1px solid rgba(99, 56, 35, .15);
  color: #fffaf0;
  background: linear-gradient(180deg, #d98558, #bd613e);
  box-shadow: 0 8px 0 #9f4f33, 0 12px 22px rgba(113, 61, 39, .23);
  text-shadow: 0 1px 1px rgba(85, 44, 28, .22);
}
.primary-button:active { transform: translateY(4px); box-shadow: 0 4px 0 #9f4f33, 0 7px 15px rgba(113, 61, 39, .2); }
.primary-button:disabled { cursor: not-allowed; opacity: .48; box-shadow: 0 4px 0 rgba(118, 91, 73, .35); }
.secondary-button { border: 1px solid rgba(88, 101, 61, .28); color: var(--sage-dark); background: rgba(235, 237, 215, .78); }
.text-button { min-height: 43px; border: 0; color: var(--muted); background: transparent; text-decoration: underline; text-decoration-color: rgba(120,109,96,.35); text-underline-offset: 4px; }

.sheet {
  position: absolute;
  z-index: 3;
  inset: min(24vh, 215px) 0 0;
  display: flex;
  flex-direction: column;
  border-radius: 30px 30px 0 0;
  border-top: 1px solid rgba(113, 87, 54, .18);
  background:
    radial-gradient(circle at 15% 0, rgba(224, 191, 120, .12), transparent 28%),
    linear-gradient(180deg, rgba(255,251,240,.985), rgba(246,237,216,.99));
  box-shadow: 0 -18px 55px rgba(59, 43, 27, .2);
  overflow: hidden;
}

.sheet-handle { width: 44px; height: 4px; border-radius: 99px; margin: 9px auto 4px; background: rgba(99, 82, 62, .17); }
.sheet-header { padding: 10px 18px 8px; }
.sheet-header-row { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; gap: 8px; }
.sheet-header .icon-button { box-shadow: none; background: rgba(255,255,255,.44); }
.sheet-header h1 { margin: 0; text-align: center; font-size: clamp(24px, 6.4vw, 30px); line-height: 1.08; }
.sheet-header > p { margin: 7px auto 0; max-width: 34rem; color: var(--muted); text-align: center; font-size: 13px; line-height: 1.42; }
.sheet-scroll { flex: 1; min-height: 0; overflow: auto; padding: 8px 16px 116px; overscroll-behavior: contain; scrollbar-width: none; }
.sheet-scroll::-webkit-scrollbar { display: none; }
.sheet-footer {
  position: absolute;
  z-index: 2;
  inset: auto 0 0;
  padding: 9px var(--safe-right) var(--safe-bottom) var(--safe-left);
  border-top: 1px solid rgba(111, 88, 57, .13);
  background: linear-gradient(180deg, rgba(255,249,235,.88), rgba(255,249,235,.99) 24%);
  backdrop-filter: blur(14px);
}
.footer-status { display: flex; justify-content: space-between; gap: 12px; margin: 0 4px 8px; color: var(--muted); font-size: 12px; }
.footer-status strong { color: var(--sage-dark); }

.project-card {
  position: relative;
  min-height: 178px;
  border: 1px solid rgba(100, 80, 54, .17);
  border-radius: 24px;
  overflow: hidden;
  background: #d9d7bd center 54% / cover no-repeat;
  box-shadow: 0 9px 24px rgba(76, 56, 33, .12);
}
.project-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(48,37,27,.02) 25%, rgba(48,37,27,.7) 100%); }
.project-card-content { position: absolute; z-index: 1; inset: auto 16px 15px; color: #fffaf0; text-shadow: 0 2px 9px rgba(45,33,23,.6); }
.project-card-content h2 { margin: 0 0 3px; color: inherit; font-size: 24px; }
.project-card-content p { margin: 0; font-size: 13px; }
.project-preview-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0 16px; }
.locked-project { min-height: 92px; padding: 13px; border: 1px dashed rgba(93, 86, 66, .25); border-radius: 18px; background: rgba(230,234,211,.45); color: var(--muted); }
.locked-project svg { width: 18px; height: 18px; fill: none; stroke: var(--sage); stroke-width: 1.7; }
.locked-project strong { display: block; margin: 5px 0 2px; color: #5e594d; font-family: Georgia, serif; font-size: 15px; }
.locked-project span { font-size: 11px; line-height: 1.25; }

.capacity-question { margin: 2px 2px 10px; color: #514336; font-family: Georgia, serif; font-size: 17px; line-height: 1.25; }
.capacity-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.capacity-option { min-height: 58px; padding: 8px 5px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.48); color: var(--muted); cursor: pointer; }
.capacity-option strong { display: block; color: var(--ink); font-size: 15px; }
.capacity-option span { display: block; margin-top: 2px; font-size: 10px; }
.capacity-option.is-selected { border-color: rgba(83, 105, 54, .48); background: var(--sage-soft); box-shadow: inset 0 0 0 1px rgba(83,105,54,.12); }
.capacity-note { margin: 8px 4px 16px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.section-label { margin: 14px 3px 8px; color: var(--sage-dark); font-size: 11px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }

.task-list { display: grid; gap: 9px; }
.task-card {
  position: relative;
  width: 100%;
  min-height: 82px;
  display: grid;
  grid-template-columns: 57px 1fr auto;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border: 1px solid rgba(105, 84, 57, .16);
  border-radius: 19px;
  background: rgba(255, 253, 246, .78);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(74, 55, 33, .06);
}
.task-card.is-selected { border-color: rgba(190, 101, 64, .5); background: #fff8e8; box-shadow: inset 0 0 0 1px rgba(190,101,64,.15), 0 7px 18px rgba(84,57,34,.08); }
.task-card.is-over { animation: nudge 240ms ease; }
.task-art { width: 55px; height: 55px; display: grid; place-items: center; border-radius: 17px; color: var(--sage-dark); background: linear-gradient(145deg, #edf0dc, #dce4c4); }
.task-art.is-rose { color: #a3554b; background: linear-gradient(145deg, #f8e6df, #efcbc1); }
.task-art.is-lilac { color: #715f8a; background: linear-gradient(145deg, #f1ebf4, #ddd2e7); }
.task-art svg { width: 38px; height: 38px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.task-copy strong { display: block; margin-bottom: 4px; font-family: Georgia, serif; font-size: 17px; line-height: 1.15; }
.task-copy span { display: block; color: var(--muted); font-size: 11px; line-height: 1.35; }
.leaf-value { min-width: 31px; display: inline-flex; align-items: center; justify-content: center; gap: 3px; color: var(--sage-dark); font-weight: 850; }
.leaf-value svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.task-check { position: absolute; top: 7px; right: 7px; width: 19px; height: 19px; display: none; place-items: center; border-radius: 50%; background: var(--terracotta); color: white; }
.task-check svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.4; }
.task-card.is-selected .task-check { display: grid; }

.contract-summary { padding: 18px; }
.contract-summary h2 { margin-bottom: 8px; font-size: 25px; }
.contract-summary > p { color: var(--muted); font-size: 13px; line-height: 1.45; }
.summary-task { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.summary-task:last-child { border-bottom: 0; }
.summary-task strong { font-family: Georgia, serif; font-size: 16px; }
.commitment-note { display: flex; gap: 10px; margin: 14px 0 4px; padding: 12px; border-radius: 16px; background: rgba(232, 234, 211, .7); color: #596147; font-size: 12px; line-height: 1.4; }
.commitment-note::before { content: "❧"; color: var(--sage); font-size: 22px; line-height: 1; }
.button-stack { display: grid; gap: 8px; }

.day-project { margin-bottom: 12px; padding: 14px; border: 1px solid rgba(93, 105, 69, .18); border-radius: 19px; background: rgba(232,235,214,.56); }
.day-project-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.day-project strong { font-family: Georgia, serif; font-size: 17px; }
.mini-progress { height: 8px; margin-top: 9px; border-radius: 99px; overflow: hidden; background: rgba(93,105,69,.14); }
.mini-progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #7f915d, #a7ad76); transition: width 500ms ease; }
.day-task { cursor: default; }
.day-task .task-action { min-width: 91px; min-height: 39px; padding: 8px 11px; border: 1px solid rgba(83,105,54,.32); border-radius: 13px; background: var(--sage-soft); color: var(--sage-dark); font-size: 12px; font-weight: 800; cursor: pointer; }
.day-task.is-terminal { opacity: .68; background: rgba(235,233,218,.65); }
.status-label { min-width: 74px; color: var(--sage-dark); font-size: 11px; font-weight: 800; text-align: right; }

.modal-backdrop { position: fixed; z-index: 20; inset: 0; display: flex; align-items: flex-end; padding: 18px var(--safe-right) var(--safe-bottom) var(--safe-left); background: rgba(49,39,29,.36); backdrop-filter: blur(4px); }
.outcome-modal { width: min(100%, 520px); margin: 0 auto; padding: 20px; animation: rise 240ms ease-out; }
.outcome-modal h2 { margin-bottom: 7px; font-size: 25px; }
.outcome-modal > p { margin-bottom: 14px; color: var(--muted); font-size: 13px; line-height: 1.4; }
.outcome-grid { display: grid; gap: 8px; }
.outcome-button { min-height: 49px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.6); color: var(--ink); cursor: pointer; text-align: left; }
.outcome-button strong { font-size: 14px; }
.outcome-button span { color: var(--muted); font-size: 11px; text-align: right; }
.outcome-button.is-primary { border-color: rgba(87,106,57,.34); background: var(--sage-soft); }

.variant-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.variant-card { min-height: 248px; position: relative; padding: 0; overflow: hidden; border: 2px solid transparent; border-radius: 21px; background: #d8d8be center / cover no-repeat; cursor: pointer; box-shadow: 0 8px 20px rgba(67,49,30,.12); }
.variant-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 42%, rgba(46,35,25,.78) 100%); }
.variant-card-copy { position: absolute; z-index: 1; inset: auto 12px 13px; color: #fffaf0; text-align: left; text-shadow: 0 2px 8px rgba(42,31,23,.72); }
.variant-card-copy strong { display: block; margin-bottom: 3px; font-family: Georgia, serif; font-size: 16px; line-height: 1.1; }
.variant-card-copy span { font-size: 10px; line-height: 1.25; }
.variant-card:hover, .variant-card:focus-visible { border-color: rgba(255,250,240,.9); }
.reward-note { margin: 12px 4px 0; color: var(--muted); font-size: 12px; line-height: 1.4; text-align: center; }

.celebration { position: absolute; z-index: 4; inset: 0; pointer-events: none; overflow: hidden; }
.celebration i { position: absolute; left: var(--x); top: 58%; width: 11px; height: 18px; border-radius: 80% 0 80% 0; background: var(--c); opacity: 0; animation: leaf-float 1.4s var(--d) ease-out forwards; }

.summary-hero { display: grid; place-items: center; padding: 4px 0 13px; }
.summary-medallion { width: 78px; height: 78px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(145deg, #f4e1b4, #d8b36e); box-shadow: 0 10px 25px rgba(124,84,35,.18); color: #fff9e6; }
.summary-medallion svg { width: 41px; height: 41px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.summary-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 12px 0 16px; }
.summary-stat { padding: 12px; border-radius: 17px; background: rgba(232,235,214,.6); text-align: center; }
.summary-stat strong { display: block; color: var(--sage-dark); font-family: Georgia, serif; font-size: 24px; }
.summary-stat span { color: var(--muted); font-size: 11px; }
.dev-reset { margin-top: 5px; font-size: 11px; }

.compact-stack { gap: 0; }

.estate-shell {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: var(--tg-viewport-stable-height, 100svh);
  overflow: hidden;
  background: #8ea668;
}

.estate-viewport {
  position: absolute;
  inset: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  touch-action: pan-x pan-y;
  background: #8fa66c;
}
.estate-viewport::-webkit-scrollbar { display: none; }

.estate-map-canvas {
  position: relative;
  width: 155%;
  aspect-ratio: 887 / 1774;
  min-height: 100%;
  background: #91a66d var(--estate-image) center top / 100% 100% no-repeat;
  transform-origin: 27% 23%;
}
.estate-shell.is-focused .estate-map-canvas {
  width: 420%;
  animation: map-focus-in 520ms cubic-bezier(.2,.76,.22,1) both;
}
.estate-shell.is-focused .estate-map-canvas.is-overgrown-focus {
  width: 310%;
  aspect-ratio: 2 / 3;
  background-position: center center;
}

.estate-map-canvas::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.05), transparent 55%, rgba(52,49,31,.12));
}

.estate-topbar {
  position: absolute;
  z-index: 6;
  inset: var(--safe-top) var(--safe-right) auto var(--safe-left);
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 7px;
  pointer-events: none;
}
.estate-topbar > * { pointer-events: auto; }
.estate-topbar .brand-chip { justify-self: center; white-space: nowrap; }
.map-actions { display: flex; align-items: center; gap: 6px; }
.map-progress-chip {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 1px solid rgba(103,83,56,.2);
  border-radius: 50%;
  background: rgba(255,250,237,.91);
  color: var(--sage-dark);
  box-shadow: 0 7px 22px rgba(68,51,31,.13);
  font-size: 11px;
  font-weight: 850;
  backdrop-filter: blur(12px);
}
.map-progress-chip svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.estate-panel {
  position: absolute;
  z-index: 7;
  inset: auto var(--safe-right) var(--safe-bottom) var(--safe-left);
  padding: 17px 17px 12px;
  text-align: center;
  backdrop-filter: blur(12px);
}
.estate-panel h1 { margin-bottom: 5px; font-size: clamp(23px, 6.7vw, 29px); }
.estate-panel > p:not(.eyebrow) { margin: 0 auto 11px; max-width: 31rem; color: var(--muted); font-size: 12px; line-height: 1.38; }
.estate-panel .primary-button, .estate-panel .secondary-button { min-height: 46px; }
.estate-panel .text-button { min-height: 35px; font-size: 11px; }
.map-project-progress { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 10px; margin: -2px 2px 10px; color: var(--sage-dark); font-size: 10px; font-weight: 800; text-align: left; }
.map-project-progress .mini-progress { grid-column: 1 / -1; width: 100%; margin-top: 0; }

.map-hotspot {
  position: absolute;
  z-index: 3;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  border: 0;
  color: var(--ink);
  cursor: pointer;
}

.zone-hotspot {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 2px solid rgba(255,250,237,.92);
  border-radius: 50%;
  background: rgba(112,128,82,.8);
  box-shadow: 0 4px 0 rgba(67,77,48,.44), 0 7px 17px rgba(48,42,26,.28);
  animation: map-pulse 2.5s ease-in-out infinite;
}
.zone-hotspot::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: #fff9e9; }
.zone-hotspot > span {
  position: absolute;
  top: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 8px;
  border: 1px solid rgba(92,75,50,.16);
  border-radius: 999px;
  background: rgba(255,250,237,.9);
  box-shadow: 0 5px 14px rgba(50,42,27,.15);
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}
.zone-hotspot:not(.is-available) { width: 29px; height: 29px; opacity: .8; background: rgba(147,136,104,.75); }
.zone-hotspot:not(.is-available)::before { inset: 8px; opacity: .78; }

.live-hotspot {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 2px solid rgba(255,250,237,.84);
  border-radius: 50%;
  background: rgba(255,250,237,.2);
  box-shadow: 0 0 0 6px rgba(255,250,237,.13), 0 5px 14px rgba(50,42,27,.22);
}
.live-hotspot > span {
  position: absolute;
  left: 50%;
  top: calc(100% + 5px);
  transform: translateX(-50%);
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(255,250,237,.88);
  color: #514536;
  font-size: 8px;
  font-weight: 800;
  white-space: nowrap;
}
.live-hotspot.is-reacting { animation: map-react 760ms ease; }
.estate-map-canvas.is-overgrown-focus .live-hotspot {
  width: 58px;
  height: 58px;
  border-color: rgba(255,250,237,.72);
  background: rgba(255,250,237,.09);
  box-shadow: 0 0 0 7px rgba(255,250,237,.1), 0 6px 16px rgba(50,42,27,.2);
}
.estate-map-canvas.is-overgrown-focus .live-hotspot > span { font-size: 9px; }

.lantern-glow {
  position: absolute;
  z-index: 2;
  left: 23%;
  top: 25%;
  width: 90px;
  height: 90px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle, rgba(255,217,119,.76), rgba(255,193,75,.22) 42%, transparent 71%);
  mix-blend-mode: screen;
  transition: opacity 260ms ease;
}
.estate-map-canvas.is-lantern-on .lantern-glow { opacity: 1; animation: lantern-breathe 2.6s ease-in-out infinite; }

.cat-choice-backdrop { z-index: 24; }
.cat-choice .outcome-button span { display: inline-flex; align-items: center; justify-content: flex-end; gap: 3px; }
.cat-choice .outcome-button span svg { width: 15px; height: 15px; fill: none; stroke: var(--sage-dark); stroke-width: 1.8; }
.cat-choice .outcome-button:disabled { opacity: .45; cursor: not-allowed; }

.cat-short-pet {
  position: fixed;
  z-index: 32;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 30px;
  pointer-events: none;
  background: rgba(46,38,27,.18);
  animation: short-pet-enter 160ms ease-out both;
}
.cat-short-pet-card {
  position: relative;
  width: min(76vw, 310px);
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border: 3px solid rgba(255,250,237,.92);
  border-radius: 26px;
  background: #d8c8a5;
  box-shadow: 0 18px 42px rgba(43,33,22,.32);
}
.cat-short-pet-art {
  position: absolute;
  inset: 0;
  background-image: var(--cat-storyboard);
  background-repeat: no-repeat;
  background-size: 400% 100%;
  background-position: 0% center;
  animation: cat-short-storyboard 1.55s steps(1, end) both;
}
.cat-short-pet-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 32%;
  background: linear-gradient(transparent, rgba(48,37,27,.56));
}
.cat-short-pet p {
  position: absolute;
  z-index: 2;
  inset: auto 16px 15px;
  margin: 0;
  color: #fff9e8;
  font-family: Georgia, serif;
  font-size: 16px;
  text-align: center;
  text-shadow: 0 2px 5px rgba(35,27,18,.55);
}

.cat-cinematic {
  position: fixed;
  z-index: 40;
  inset: 0;
  overflow: hidden;
  background: #8a9b63;
  animation: cinematic-enter 380ms ease-out both;
}
.cat-cinematic-art {
  position: absolute;
  inset: 0;
  background-image: var(--cat-storyboard);
  background-repeat: no-repeat;
  background-size: 400% 100%;
  background-position: 0% center;
  animation: cat-storyboard 6.8s steps(1, end) forwards;
}
.cat-cinematic::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(39,32,21,.2), transparent 25%, transparent 66%, rgba(45,34,22,.34)); }
.cat-cinematic-title {
  position: absolute;
  z-index: 3;
  top: var(--safe-top);
  left: 50%;
  transform: translateX(-50%);
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border: 1px solid rgba(255,250,237,.4);
  border-radius: 999px;
  background: rgba(72,58,39,.5);
  color: #fff9e8;
  box-shadow: 0 7px 22px rgba(37,28,17,.2);
  font-size: 12px;
  backdrop-filter: blur(10px);
}
.cat-cinematic-title svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.cat-petals { position: absolute; z-index: 2; inset: 0; pointer-events: none; opacity: 0; animation: petals-reveal 6.8s ease forwards; }
.cat-petals i { position: absolute; left: var(--x); top: 54%; width: 10px; height: 15px; border-radius: 80% 0 80% 0; background: #b596c3; opacity: 0; animation: cinematic-petal 1.9s var(--d) ease-out infinite; animation-delay: calc(4.6s + var(--d)); }
.cat-finale {
  position: absolute;
  z-index: 4;
  inset: auto var(--safe-right) var(--safe-bottom) var(--safe-left);
  padding: 16px;
  text-align: center;
  transform: translateY(28px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 350ms ease, transform 350ms ease;
}
.cat-finale p { margin-bottom: 12px; color: var(--muted); font-family: Georgia, serif; font-size: 15px; line-height: 1.35; }
.cat-finale .primary-button { min-height: 47px; }
.cat-cinematic.is-finished .cat-finale { transform: translateY(0); opacity: 1; pointer-events: auto; }
.icon-button.is-sound-on { color: #b55e45; background: rgba(255,248,226,.9); }

.toast { position: fixed; z-index: 50; left: 50%; bottom: calc(var(--safe-bottom) + 14px); max-width: calc(100% - 32px); transform: translate(-50%, 18px); padding: 10px 14px; border-radius: 999px; background: rgba(67,55,42,.92); color: #fff9e8; font-size: 12px; box-shadow: 0 8px 24px rgba(34,27,20,.26); opacity: 0; pointer-events: none; transition: opacity 180ms ease, transform 180ms ease; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@keyframes rise { from { transform: translateY(24px); opacity: 0; } }
@keyframes nudge { 0%,100% { transform: translateX(0); } 35% { transform: translateX(-5px); } 70% { transform: translateX(4px); } }
@keyframes leaf-float { 0% { opacity: 0; transform: translate(0,15px) rotate(0); } 20% { opacity: .95; } 100% { opacity: 0; transform: translate(var(--dx), -45vh) rotate(240deg); } }
@keyframes map-pulse { 0%,100% { box-shadow: 0 4px 0 rgba(67,77,48,.44), 0 7px 17px rgba(48,42,26,.28), 0 0 0 0 rgba(255,250,237,.28); } 50% { box-shadow: 0 4px 0 rgba(67,77,48,.44), 0 7px 17px rgba(48,42,26,.28), 0 0 0 9px rgba(255,250,237,0); } }
@keyframes map-react { 0%,100% { transform: translate(-50%,-50%) scale(1); } 35% { transform: translate(-50%,-60%) scale(1.18) rotate(-4deg); } 65% { transform: translate(-50%,-48%) scale(.96) rotate(3deg); } }
@keyframes lantern-breathe { 0%,100% { transform: translate(-50%,-50%) scale(.92); opacity: .76; } 50% { transform: translate(-50%,-50%) scale(1.08); opacity: 1; } }
@keyframes map-focus-in { from { opacity: .72; filter: saturate(.85); } to { opacity: 1; filter: saturate(1); } }
@keyframes cinematic-enter { from { opacity: 0; transform: scale(1.035); } to { opacity: 1; transform: scale(1); } }
@keyframes short-pet-enter { from { opacity: 0; } to { opacity: 1; } }
@keyframes cat-storyboard { 0%,22% { background-position: 0% center; } 25%,47% { background-position: 33.333% center; } 50%,72% { background-position: 66.666% center; } 75%,100% { background-position: 100% center; } }
@keyframes cat-short-storyboard { 0%,26% { background-position: 0% center; } 30%,59% { background-position: 33.333% center; } 63%,100% { background-position: 66.666% center; } }
@keyframes petals-reveal { 0%,68% { opacity: 0; } 75%,100% { opacity: 1; } }
@keyframes cinematic-petal { 0% { opacity: 0; transform: translate(0,18px) rotate(0); } 28% { opacity: .9; } 100% { opacity: 0; transform: translate(var(--dx), -145px) rotate(260deg); } }

@media (min-width: 600px) {
  body { background: #d6c9ae; }
  .app-shell { width: min(100%, 520px); margin: 0 auto; box-shadow: 0 0 50px rgba(55,42,29,.22); }
  .estate-shell { width: min(100%, 520px); margin: 0 auto; box-shadow: 0 0 50px rgba(55,42,29,.22); }
  .sheet-scroll { padding-left: 22px; padding-right: 22px; }
}

@media (max-height: 650px) {
  .sheet { inset: 18vh 0 0; }
  .sheet-header { padding-top: 6px; }
  .sheet-header h1 { font-size: 23px; }
  .home-card { padding-top: 17px; }
  .home-card h1 { font-size: 25px; }
  .home-content { padding-top: 70px; }
  .estate-panel { padding-top: 13px; }
  .estate-panel h1 { font-size: 23px; }
  .estate-panel > p:not(.eyebrow) { margin-bottom: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
