:root {
  --cream: #f1d9a7;
  --paper: #f7e9c7;
  --paper-soft: rgba(247, 233, 199, 0.94);
  --wood: #c88943;
  --walnut: #4b2d1d;
  --outline: #3a251b;
  --copper: #b96732;
  --brass: #d3a23c;
  --moss: #6f8339;
  --leaf: #2f7a4d;
  --plum: #70465f;
  --magic: #37d6e6;
  --magic-soft: rgba(55, 214, 230, 0.34);
  --sun: #ffd98c;
  --shadow: rgba(43, 25, 15, 0.42);
  --text: #3a251b;
  --muted: #765b45;
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #2b1b13;
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

button {
  font: inherit;
}

button:focus-visible {
  outline: 3px solid var(--magic);
  outline-offset: 3px;
}

.hidden {
  display: none !important;
}

.splash {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: grid;
  align-items: center;
  padding: clamp(28px, 6vw, 100px);
  isolation: isolate;
  overflow: hidden;
}

.splash__art,
.scene__background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  pointer-events: none;
}

.splash__art {
  z-index: -3;
  animation: slow-breathe 14s ease-in-out infinite alternate;
}

.splash::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(39, 23, 15, 0.82) 0%, rgba(54, 30, 18, 0.55) 37%, rgba(54, 30, 18, 0.08) 75%),
    linear-gradient(0deg, rgba(35, 19, 12, 0.64), transparent 48%);
}

.splash::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(circle, rgba(55, 214, 230, 0.78) 0 2px, transparent 3px);
  background-size: 170px 135px;
  opacity: 0.32;
  animation: drift 14s linear infinite;
}

.splash__content {
  width: min(620px, 88vw);
  color: #fff5dc;
  text-shadow: 0 3px 16px rgba(31, 17, 10, 0.8);
}

.eyebrow,
.prototype-ribbon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 217, 140, 0.62);
  border-radius: 999px;
  background: rgba(75, 45, 29, 0.62);
  color: #ffe6aa;
  font-size: 13px;
  letter-spacing: 0.08em;
  backdrop-filter: blur(8px);
}

.splash h1 {
  margin: 18px 0 6px;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: clamp(56px, 7vw, 106px);
  line-height: 0.96;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #fff1c7;
}

.splash__subtitle {
  margin: 14px 0 0;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: clamp(24px, 2.2vw, 36px);
  color: var(--sun);
}

.splash__promise {
  max-width: 560px;
  margin: 20px 0 28px;
  font-size: clamp(16px, 1.25vw, 21px);
  line-height: 1.8;
  color: rgba(255, 247, 226, 0.92);
}

.primary-button,
.secondary-button,
.quiet-button,
.action-button {
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 150ms ease, filter 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
}

.primary-button,
.action-button {
  position: relative;
  min-height: 54px;
  padding: 13px 24px;
  color: #fff8e9;
  font-weight: 800;
  letter-spacing: 0.04em;
  border: 2px solid #e0b953;
  background: linear-gradient(#8d5b42, #68402f 54%, #553322);
  box-shadow: inset 0 0 0 2px rgba(255, 225, 145, 0.18), 0 8px 20px rgba(41, 22, 13, 0.4);
}

.primary-button:hover,
.action-button:hover:not(:disabled),
.secondary-button:hover,
.quiet-button:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.primary-button:active,
.action-button:active:not(:disabled),
.secondary-button:active,
.quiet-button:active {
  transform: translateY(1px);
}

.action-button:disabled {
  cursor: not-allowed;
  opacity: 0.47;
  filter: saturate(0.5);
}

.secondary-button {
  min-height: 46px;
  padding: 10px 18px;
  color: var(--walnut);
  font-weight: 700;
  border: 1px solid #c38e3f;
  background: linear-gradient(#fff2cf, #e9cc95);
  box-shadow: 0 5px 14px rgba(54, 31, 18, 0.22);
}

.quiet-button {
  min-height: 40px;
  padding: 8px 12px;
  color: #f9e8c3;
  border: 1px solid rgba(255, 217, 140, 0.36);
  background: rgba(64, 37, 24, 0.64);
}

.splash__footnote {
  margin-top: 18px;
  font-size: 13px;
  color: rgba(255, 244, 219, 0.7);
}

.game-shell {
  position: relative;
  width: 100vw;
  height: 100vh;
  min-height: 650px;
  isolation: isolate;
  overflow: hidden;
}

.scene,
.scene__wash {
  position: absolute;
  inset: 0;
}

.scene__background {
  z-index: -4;
  transition: opacity 320ms ease, transform 900ms ease;
  animation: scene-arrive 700ms ease both;
}

.scene__wash {
  z-index: -3;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(43, 26, 17, 0.36), transparent 20%, transparent 76%, rgba(43, 26, 17, 0.34)),
    radial-gradient(circle at 50% 46%, transparent 45%, rgba(37, 21, 13, 0.16) 100%);
}

.topbar {
  position: absolute;
  z-index: 30;
  left: 24px;
  right: 24px;
  top: 18px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 12px 8px 20px;
  color: #fff1cd;
  border: 1px solid rgba(220, 168, 78, 0.54);
  border-radius: 18px;
  background: linear-gradient(90deg, rgba(63, 36, 23, 0.92), rgba(83, 48, 30, 0.78));
  box-shadow: 0 8px 26px rgba(37, 20, 12, 0.33), inset 0 0 0 2px rgba(255, 221, 145, 0.06);
  backdrop-filter: blur(12px);
}

.brand {
  min-width: 190px;
}

.brand__title {
  display: block;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 24px;
  line-height: 1;
  letter-spacing: 0.08em;
}

.brand__scene {
  display: block;
  margin-top: 4px;
  color: #e5bd76;
  font-size: 12px;
}

.topbar__spacer {
  flex: 1;
}

.resource-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 44px;
  padding: 5px 12px 5px 7px;
  border: 1px solid rgba(232, 190, 102, 0.46);
  border-radius: 13px;
  background: rgba(38, 22, 14, 0.34);
  white-space: nowrap;
}

.resource-pill img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  object-fit: cover;
}

.resource-pill b {
  color: #fff5d9;
  font-size: 17px;
}

.resource-pill small {
  color: #d9bd91;
  font-size: 11px;
}

.icon-button {
  width: 44px;
  height: 44px;
  padding: 0;
  color: #ffe8b2;
  font-size: 20px;
  border: 1px solid rgba(225, 178, 87, 0.5);
  border-radius: 12px;
  background: rgba(46, 27, 18, 0.42);
  cursor: pointer;
}

.progress-card {
  position: absolute;
  z-index: 25;
  left: 50%;
  top: 94px;
  width: min(700px, calc(100vw - 380px));
  transform: translateX(-50%);
  padding: 12px 20px 10px;
  border: 2px solid rgba(211, 162, 60, 0.86);
  border-radius: 16px;
  background: var(--paper-soft);
  box-shadow: 0 8px 24px rgba(48, 27, 16, 0.28), inset 0 0 0 2px rgba(122, 73, 37, 0.16);
  backdrop-filter: blur(9px);
}

.scene--garden .progress-card {
  left: 120px;
  width: 620px;
  transform: none;
}

.objective-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 9px;
  font-size: 15px;
}

.objective-line strong {
  color: var(--plum);
}

.flow-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.flow-track::before {
  content: "";
  position: absolute;
  top: 11px;
  left: 9%;
  right: 9%;
  height: 2px;
  background: rgba(117, 83, 48, 0.28);
}

.flow-step {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 4px;
  color: #8a715b;
  font-size: 11px;
  z-index: 1;
}

.flow-step i {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 2px solid #a98957;
  border-radius: 50%;
  background: #ead4a5;
  font-style: normal;
  font-size: 11px;
}

.flow-step.done,
.flow-step.current {
  color: var(--walnut);
  font-weight: 700;
}

.flow-step.done i {
  color: #fff9e8;
  border-color: #7b9445;
  background: #6f8339;
}

.flow-step.current i {
  color: #164c53;
  border-color: var(--magic);
  background: #c7f7ef;
  box-shadow: 0 0 0 5px var(--magic-soft), 0 0 16px rgba(55, 214, 230, 0.7);
}

.nav-rail {
  position: absolute;
  z-index: 26;
  left: 24px;
  top: 102px;
  width: 82px;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(224, 177, 86, 0.58);
  border-radius: 20px;
  background: rgba(64, 37, 23, 0.79);
  box-shadow: 0 10px 26px rgba(34, 19, 12, 0.31);
  backdrop-filter: blur(10px);
}

.nav-button {
  position: relative;
  width: 62px;
  height: 62px;
  padding: 4px;
  border: 2px solid transparent;
  border-radius: 14px;
  background: rgba(247, 233, 199, 0.12);
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.nav-button img {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  object-fit: cover;
}

.nav-button:hover {
  transform: translateX(3px);
  border-color: #e7c165;
}

.nav-button.active {
  border-color: var(--magic);
  box-shadow: 0 0 0 3px rgba(255, 217, 140, 0.78), 0 0 18px rgba(55, 214, 230, 0.68);
}

.nav-button.recommended::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 6px;
  width: 12px;
  height: 12px;
  border: 2px solid #fff4d6;
  border-radius: 50%;
  background: var(--magic);
  box-shadow: 0 0 12px var(--magic);
  animation: pulse 1.25s ease-in-out infinite;
}

.scene-title {
  position: absolute;
  left: 126px;
  bottom: 30px;
  z-index: 8;
  padding: 12px 18px;
  color: #fff2d2;
  border-left: 3px solid var(--sun);
  text-shadow: 0 2px 8px rgba(34, 19, 12, 0.9);
  background: linear-gradient(90deg, rgba(56, 31, 19, 0.62), transparent);
}

.scene-title h2 {
  margin: 0;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 31px;
  letter-spacing: 0.08em;
}

.scene-title p {
  margin: 3px 0 0;
  color: #efd8ac;
  font-size: 12px;
}

.parchment-panel {
  color: var(--text);
  border: 2px solid #b97f35;
  border-radius: var(--radius);
  background:
    linear-gradient(rgba(247, 233, 199, 0.96), rgba(237, 211, 161, 0.96)),
    radial-gradient(circle at top left, #fff8e7, transparent 60%);
  box-shadow: 0 12px 32px var(--shadow), inset 0 0 0 3px rgba(93, 52, 26, 0.12);
  backdrop-filter: blur(8px);
}

.panel-kicker {
  margin: 0 0 6px;
  color: var(--plum);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.panel-title {
  margin: 0;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: clamp(23px, 2vw, 31px);
  color: var(--walnut);
}

.panel-copy {
  margin: 10px 0 16px;
  color: #6e513d;
  font-size: 14px;
  line-height: 1.7;
}

.cottage-card {
  position: absolute;
  z-index: 10;
  right: clamp(34px, 6vw, 112px);
  top: 24%;
  width: min(410px, 30vw);
  padding: 24px;
}

.loop-mini {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin: 14px 0 20px;
}

.loop-mini span {
  display: grid;
  place-items: center;
  min-width: 48px;
  min-height: 34px;
  padding: 6px 8px;
  border-radius: 11px;
  color: #61422d;
  font-size: 12px;
  font-weight: 700;
  background: rgba(211, 162, 60, 0.17);
}

.loop-mini b {
  color: #b27d35;
  font-size: 13px;
}

.prototype-note {
  margin-top: 14px;
  padding-top: 12px;
  color: #8d6f55;
  border-top: 1px dashed rgba(118, 79, 44, 0.34);
  font-size: 11px;
  line-height: 1.55;
}

.garden-plot-map {
  position: absolute;
  z-index: 7;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.plot-hit-target {
  outline: none;
}

.plot-hit-shape {
  fill: rgba(255, 255, 255, 0.001);
  stroke: transparent;
  stroke-width: 2;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  transition: fill 130ms ease, stroke 130ms ease, filter 130ms ease;
  pointer-events: none;
}

.plot-hit-target.available .plot-hit-shape {
  pointer-events: all;
  cursor: pointer;
}

.plot-hit-target.available:hover .plot-hit-shape,
.plot-hit-target.available:focus-visible .plot-hit-shape {
  fill: rgba(255, 218, 139, 0.2);
  stroke: rgba(255, 225, 155, 0.95);
  stroke-width: 2.4;
  filter: url(#plot-hover-glow);
}

.garden-plant {
  pointer-events: none;
  transform-box: fill-box;
  transform-origin: center bottom;
  animation: plant-arrive 560ms cubic-bezier(.18, .89, .32, 1.28) both;
}

.garden-plant__contact {
  fill: rgba(31, 19, 8, 0.42);
  filter: blur(2px);
}

.garden-plant__glow {
  fill: rgba(55, 214, 230, 0.13);
  filter: blur(5px);
}

.garden-plant__image {
  filter: drop-shadow(0 3px 2px rgba(30, 20, 9, 0.34));
}

.garden-panel {
  position: absolute;
  z-index: 11;
  left: 100px;
  right: auto;
  top: auto;
  bottom: 4px;
  width: 350px;
  min-height: 62px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 116px;
  gap: 6px;
  align-items: stretch;
  padding: 6px 7px;
}

.scene--garden .garden-panel__summary {
  min-width: 0;
}

.scene--garden .garden-panel .panel-kicker {
  margin: 0 0 3px;
  font-size: 10px;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scene--garden .garden-panel .status-row {
  gap: 6px;
  margin: 0;
  padding: 0;
  background: transparent;
}

.scene--garden .garden-panel .status-row img {
  width: 30px;
  height: 30px;
}

.scene--garden .garden-panel .status-row strong {
  font-size: 12px;
  line-height: 1.1;
}

.scene--garden .garden-panel .status-row small {
  margin-top: 2px;
  font-size: 9px;
  line-height: 1.15;
}

.scene--garden .garden-panel .action-button {
  min-height: 48px;
  padding: 5px 8px;
  font-size: 12px;
  line-height: 1.25;
}

.scene--garden .scene-title {
  display: none;
}

.status-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 13px 0;
  padding: 9px;
  border-radius: 12px;
  background: rgba(114, 77, 43, 0.09);
}

.status-row img {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.status-row strong,
.status-row small {
  display: block;
}

.status-row small {
  margin-top: 3px;
  color: var(--muted);
}

.garden-panel .action-button {
  width: 100%;
}

.tool-tray {
  position: absolute;
  z-index: 11;
  left: 50%;
  bottom: 24px;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
  padding: 9px;
  border: 1px solid rgba(229, 187, 101, 0.6);
  border-radius: 17px;
  background: rgba(64, 37, 23, 0.82);
  box-shadow: 0 8px 24px rgba(37, 21, 13, 0.34);
  backdrop-filter: blur(10px);
}

.scene--garden .tool-tray {
  bottom: 4px;
  padding: 6px;
}

.scene--garden .tool-chip {
  min-width: 124px;
  padding: 4px 9px 4px 4px;
}

.scene--garden .tool-chip img {
  width: 38px;
  height: 38px;
}

.tool-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 130px;
  padding: 6px 11px 6px 6px;
  color: #fff0cf;
  border: 1px solid rgba(225, 184, 96, 0.46);
  border-radius: 12px;
  background: rgba(247, 233, 199, 0.09);
}

.tool-chip img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.tool-chip small {
  display: block;
  color: #d7ba8c;
  font-size: 10px;
}

.workbench-layout {
  position: absolute;
  z-index: 9;
  left: 128px;
  right: 30px;
  top: 170px;
  bottom: 96px;
  display: grid;
  grid-template-columns: minmax(250px, 0.8fr) minmax(420px, 1.35fr) minmax(270px, 0.85fr);
  gap: 20px;
  align-items: stretch;
}

.work-card {
  position: relative;
  padding: 20px;
  overflow: hidden;
}

.work-card--dark {
  color: #fff1cf;
  border: 2px solid rgba(214, 165, 72, 0.78);
  border-radius: var(--radius);
  background: rgba(65, 38, 24, 0.84);
  box-shadow: 0 13px 34px rgba(39, 22, 13, 0.4), inset 0 0 0 2px rgba(255, 229, 163, 0.07);
  backdrop-filter: blur(11px);
}

.work-card--dark .panel-title,
.work-card--dark .panel-copy {
  color: #fff0cb;
}

.inventory-stack {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.inventory-item {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border: 1px solid rgba(126, 83, 43, 0.28);
  border-radius: 13px;
  background: rgba(255, 249, 230, 0.46);
}

.inventory-item img {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.inventory-item small {
  display: block;
  color: var(--muted);
}

.inventory-item b {
  font-size: 20px;
}

.merge-board {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 10px;
  box-sizing: border-box;
  width: min(100%, 480px);
  height: auto;
  aspect-ratio: 1;
  max-height: 480px;
  margin: 2px auto;
  padding: 18px;
  border: 8px solid #725039;
  border-radius: 27px;
  background:
    linear-gradient(rgba(88, 56, 35, 0.76), rgba(59, 37, 24, 0.82)),
    repeating-linear-gradient(45deg, rgba(255,255,255,.04) 0 5px, transparent 5px 10px);
  box-shadow: inset 0 0 0 3px #d3a23c, 0 12px 26px rgba(34, 20, 12, 0.36);
}

.merge-cell {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  padding: 2px;
  color: #f7e8c3;
  border: 2px solid rgba(225, 188, 112, 0.24);
  border-radius: 17px;
  background: rgba(39, 24, 16, 0.34);
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
}

button.merge-cell {
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-drag: none;
}

button.merge-cell:active {
  cursor: grabbing;
}

.merge-cell.selectable:hover,
.merge-cell.selected {
  border-color: var(--magic);
  background: rgba(55, 214, 230, 0.12);
  box-shadow: 0 0 0 4px rgba(255, 217, 140, 0.34), inset 0 0 18px rgba(55, 214, 230, 0.23), 0 0 18px rgba(55, 214, 230, 0.5);
}

.merge-board.drag-active .merge-cell.compatible {
  border-color: rgba(55, 214, 230, 0.9);
  background: rgba(55, 214, 230, 0.16);
  box-shadow: inset 0 0 22px rgba(55, 214, 230, 0.28), 0 0 16px rgba(55, 214, 230, 0.38);
  animation: merge-compatible-pulse 760ms ease-in-out infinite alternate;
}

.merge-board.drag-active .merge-cell.move-target {
  border-color: rgba(255, 221, 145, 0.56);
  background: rgba(255, 221, 145, 0.08);
  box-shadow: inset 0 0 18px rgba(255, 221, 145, 0.1);
}

.merge-cell--empty {
  cursor: default;
}

.merge-cell--empty::after {
  content: "";
  width: 26%;
  aspect-ratio: 1;
  border: 1px solid rgba(225, 188, 112, 0.12);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 120ms ease, box-shadow 120ms ease;
}

.merge-board.drag-active .merge-cell--empty.move-target::after {
  opacity: 1;
}

.merge-board.drag-active .merge-cell--empty.drop-target::after {
  box-shadow: 0 0 16px 8px rgba(255, 221, 145, 0.32);
}

.merge-cell.dragging {
  border-style: dashed;
  border-color: rgba(255, 221, 145, 0.48);
  background: rgba(26, 16, 11, 0.28);
  box-shadow: inset 0 0 24px rgba(12, 8, 6, 0.38);
  transform: none;
}

.merge-cell.dragging > * {
  opacity: 0;
}

.merge-cell.drop-target,
.merge-board.drag-active .merge-cell.drop-target {
  z-index: 4;
  border-color: #ffe3a0;
  background: rgba(55, 214, 230, 0.24);
  box-shadow: 0 0 0 5px rgba(255, 221, 145, 0.48), inset 0 0 28px rgba(55, 214, 230, 0.38), 0 0 28px rgba(55, 214, 230, 0.68);
  transform: none;
}

.merge-board.drag-active .merge-cell.merge-overlap {
  z-index: 12;
  border-color: #fff8d6;
  background: radial-gradient(circle, rgba(255, 255, 224, 0.68), rgba(55, 214, 230, 0.34) 42%, rgba(104, 59, 145, 0.3) 76%);
  box-shadow: 0 0 0 5px rgba(255, 244, 190, 0.78), inset 0 0 36px rgba(255, 255, 230, 0.9), 0 0 28px 12px rgba(55, 214, 230, 0.92), 0 0 62px 22px rgba(255, 221, 122, 0.76);
  animation: merge-overlap-dazzle 420ms ease-in-out infinite alternate;
}

.merge-drag-avatar {
  position: fixed;
  z-index: 1000;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  min-width: 0;
  min-height: 0;
  padding: 2px;
  overflow: hidden;
  color: #f7e8c3;
  border: 2px solid rgba(255, 221, 145, 0.84);
  border-radius: 17px;
  background: linear-gradient(rgba(77, 50, 32, 0.97), rgba(43, 27, 18, 0.98));
  box-shadow: inset 0 0 20px rgba(55, 214, 230, 0.18), 0 15px 18px rgba(31, 18, 10, 0.48);
  pointer-events: none;
  transform: scale(1.02) rotate(-1deg);
  transform-origin: center;
  opacity: 0.96;
  transition: transform 100ms ease, border-color 100ms ease, background 100ms ease, box-shadow 100ms ease;
}

.merge-drag-avatar.is-snapped {
  border-color: #fff0bd;
  background: linear-gradient(rgba(55, 111, 103, 0.96), rgba(43, 44, 29, 0.98));
  box-shadow: inset 0 0 28px rgba(55, 214, 230, 0.34), 0 0 0 5px rgba(255, 221, 145, 0.38), 0 0 28px rgba(55, 214, 230, 0.64);
  transform: scale(1) rotate(0);
}

.merge-drag-avatar.merge-overlap {
  border-color: #fff9dc;
  background: radial-gradient(circle, rgba(255, 255, 225, 0.58), rgba(55, 214, 230, 0.22) 52%, rgba(62, 37, 86, 0.96));
  box-shadow: inset 0 0 38px rgba(255, 255, 230, 0.92), 0 0 0 5px rgba(255, 241, 178, 0.64), 0 0 34px 15px rgba(55, 214, 230, 0.94), 0 0 72px 26px rgba(255, 220, 118, 0.72);
  animation: merge-avatar-dazzle 420ms ease-in-out infinite alternate;
}

.merge-pending-source > img,
.merge-pending-source > span {
  opacity: 0.18;
  filter: grayscale(0.4) brightness(0.7);
}

.merge-cell.merge-pending-target {
  z-index: 10;
  border-color: #fff4b4;
  background: radial-gradient(circle, rgba(255, 255, 224, 0.48), rgba(55, 214, 230, 0.24) 46%, rgba(78, 43, 107, 0.28) 76%);
  box-shadow: inset 0 0 34px rgba(255, 255, 228, 0.76), 0 0 0 5px rgba(255, 233, 151, 0.62), 0 0 38px 14px rgba(55, 214, 230, 0.78), 0 0 72px 24px rgba(255, 215, 112, 0.56);
  animation: merge-pending-dazzle 560ms ease-in-out infinite alternate;
}

.merge-pending-copy {
  position: absolute;
  inset: 2px;
  z-index: 5;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0.82;
  filter: brightness(1.42) drop-shadow(0 0 10px #fffbd5) drop-shadow(0 0 20px #39e9ff);
  animation: merge-pending-copy 720ms ease-in-out infinite alternate;
}

.merge-pending-copy img {
  width: 100%;
  height: 84%;
  object-fit: contain;
}

.merge-overlap-flare {
  position: absolute;
  z-index: 7;
  inset: 10%;
  border: 3px solid rgba(255, 250, 202, 0.92);
  border-radius: 50%;
  pointer-events: none;
  animation: merge-overlap-flare 820ms ease-out infinite;
}

.merge-drag-avatar img {
  width: 100%;
  height: 84%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  filter: drop-shadow(0 6px 5px rgba(27, 16, 10, 0.45));
}

.merge-drag-avatar span {
  position: absolute;
  right: 7px;
  bottom: 6px;
  padding: 2px 7px;
  color: #553721;
  border-radius: 999px;
  background: #ffe5a7;
  font-size: 10px;
  font-weight: 800;
}

.merge-cell img {
  width: 100%;
  height: 84%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  filter: drop-shadow(0 6px 5px rgba(27, 16, 10, 0.45));
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.merge-cell span {
  position: absolute;
  right: 7px;
  bottom: 6px;
  padding: 2px 7px;
  color: #553721;
  border-radius: 999px;
  background: #ffe5a7;
  font-size: 10px;
  font-weight: 800;
  pointer-events: none;
  user-select: none;
}

.merge-cell__burst {
  position: absolute;
  z-index: 8;
  left: 50%;
  top: 50%;
  width: 58%;
  aspect-ratio: 1;
  border: 2px solid rgba(55, 214, 230, 0.7);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  pointer-events: none;
}

.merge-board.merging .merge-cell__burst {
  animation: merge-burst 760ms ease-out both;
}

.merge-board.merging .merge-source {
  z-index: 6;
  animation: merge-overlay 720ms cubic-bezier(.4, 0, .25, 1) both;
}

.merge-board.merging .merge-source.merge-source-dropped {
  animation: merge-source-vacated 240ms ease-out both;
}

.merge-board.merging .merge-target {
  z-index: 5;
  animation: merge-target-receive 720ms ease-out both;
}

.merge-cell.merge-result {
  border-color: rgba(255, 221, 145, 0.88);
  background: rgba(55, 214, 230, 0.17);
  box-shadow: inset 0 0 24px rgba(55, 214, 230, 0.28), 0 0 22px rgba(255, 216, 129, 0.46);
  animation: merge-result-arrive 520ms cubic-bezier(.18, .89, .32, 1.28) both;
}

.merge-actions {
  display: grid;
  gap: 10px;
  align-content: center;
}

.merge-actions .action-button {
  width: 100%;
}

.drag-guide {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 10px 12px;
  color: #5a3c28;
  border: 1px dashed rgba(100, 71, 47, 0.42);
  border-radius: 12px;
  background: rgba(255, 248, 226, 0.48);
  font-weight: 700;
}

.drag-guide i {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: #274f4c;
  border-radius: 50%;
  background: rgba(55, 214, 230, 0.24);
  font-style: normal;
  font-size: 22px;
}

.drag-guide.active {
  border-color: rgba(55, 214, 230, 0.74);
  background: rgba(55, 214, 230, 0.13);
}

.rule-chip {
  padding: 10px 12px;
  color: #64472f;
  border-left: 3px solid var(--magic);
  border-radius: 9px;
  background: rgba(55, 214, 230, 0.1);
  font-size: 12px;
  line-height: 1.6;
}

.brew-layout {
  position: absolute;
  z-index: 9;
  left: 128px;
  right: 32px;
  top: 170px;
  bottom: 96px;
  display: grid;
  grid-template-columns: minmax(300px, 0.85fr) minmax(450px, 1.4fr) minmax(280px, 0.8fr);
  gap: 20px;
}

.recipe-book {
  padding: 24px;
}

.recipe-illustration {
  display: block;
  width: 122px;
  height: 122px;
  margin: 10px auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 8px rgba(77, 45, 27, 0.25));
}

.requirement {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 14px 0;
  padding: 10px 12px;
  border: 1px solid rgba(106, 72, 41, 0.26);
  border-radius: 12px;
  background: rgba(255, 250, 235, 0.52);
}

.requirement.ok {
  border-color: rgba(89, 130, 65, 0.48);
  background: rgba(111, 131, 57, 0.12);
}

.cauldron-stage {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #fff0cd;
  border: 2px solid rgba(214, 165, 72, 0.78);
  border-radius: 24px;
  background: rgba(51, 31, 21, 0.76);
  box-shadow: 0 14px 34px rgba(39, 22, 13, 0.42), inset 0 0 0 3px rgba(245, 212, 136, 0.07);
  backdrop-filter: blur(9px);
}

.cauldron-stage::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -35%;
  width: 70%;
  aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(55, 214, 230, 0.48), rgba(55, 214, 230, 0.08) 50%, transparent 70%);
  filter: blur(7px);
  z-index: 0;
}

.cauldron-visual {
  position: relative;
  z-index: 1;
  width: min(76%, 400px);
  aspect-ratio: 1.2;
  display: grid;
  place-items: center;
}

.cauldron-art {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 2%;
  width: 84%;
  height: 62%;
  object-fit: contain;
  z-index: 2;
  filter: drop-shadow(0 12px 12px rgba(26, 16, 10, 0.5)) drop-shadow(0 0 24px rgba(55, 214, 230, 0.5));
}

.brew-bubble {
  position: absolute;
  z-index: 5;
  border-radius: 50%;
  background: rgba(226, 255, 249, 0.75);
  opacity: 0;
}

.cauldron-stage.brewing .cauldron-art {
  animation: cauldron-glow 760ms ease-in-out infinite alternate;
}

.cauldron-stage.brewing .bubble-one {
  left: 38%;
  top: 48%;
  width: 18px;
  height: 18px;
  animation: bubble-up 820ms ease-out infinite;
}

.cauldron-stage.brewing .bubble-two {
  right: 36%;
  top: 52%;
  width: 11px;
  height: 11px;
  animation: bubble-up 620ms 170ms ease-out infinite;
}

.ingredient-drop {
  position: absolute;
  z-index: 3;
  top: 7%;
  width: 110px;
  height: 110px;
  object-fit: contain;
  opacity: 0;
}

.cauldron-stage.loaded .ingredient-drop {
  opacity: 1;
  animation: ingredient-hover 2s ease-in-out infinite;
}

.cauldron-stage.brewing .ingredient-drop {
  animation: ingredient-fall 720ms ease-in both;
}

.cauldron-label {
  position: absolute;
  bottom: 7%;
  z-index: 5;
  font-size: 13px;
  color: #f8e8c3;
}

.brew-actions {
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 20px;
}

.shop-layout {
  position: absolute;
  z-index: 9;
  left: 128px;
  right: 34px;
  top: 170px;
  bottom: 92px;
  display: grid;
  grid-template-columns: minmax(320px, .95fr) minmax(380px, 1.2fr) minmax(270px, .82fr);
  gap: 20px;
}

.customer-card,
.display-card,
.shop-actions {
  padding: 20px;
}

.customer-card {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
}

.customer-portrait {
  width: 100%;
  height: 100%;
  min-height: 210px;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 10px 10px rgba(58, 33, 20, 0.3));
}

.speech {
  position: relative;
  margin-top: -26px;
  padding: 14px 16px;
  border: 1px solid rgba(116, 76, 42, 0.32);
  border-radius: 14px;
  background: rgba(255, 250, 235, 0.92);
  box-shadow: 0 8px 16px rgba(54, 31, 18, 0.18);
  line-height: 1.65;
  font-size: 13px;
}

.display-card {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  color: #fff1cf;
  border: 2px solid rgba(216, 168, 75, 0.82);
  border-radius: 24px;
  background: rgba(54, 33, 22, 0.8);
  box-shadow: 0 14px 34px rgba(39, 22, 13, 0.42), inset 0 0 0 3px rgba(245, 212, 136, 0.06);
  backdrop-filter: blur(9px);
}

.display-card .panel-kicker {
  color: #f2cc83;
}

.display-pedestal {
  position: relative;
  display: grid;
  place-items: center;
  width: min(76%, 340px);
  aspect-ratio: 1.2;
  border-bottom: 18px solid #9a6739;
}

.display-pedestal::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: -27px;
  height: 20px;
  border-radius: 50%;
  background: rgba(24, 14, 9, 0.42);
  filter: blur(6px);
}

.display-pedestal img {
  z-index: 2;
  width: 60%;
  height: 80%;
  object-fit: contain;
  opacity: 0.22;
  filter: grayscale(1);
}

.display-pedestal.listed img {
  opacity: 1;
  filter: drop-shadow(0 0 18px rgba(55, 214, 230, 0.75));
  animation: potion-arrive 520ms cubic-bezier(.18, .89, .32, 1.28) both;
}

.empty-label {
  position: absolute;
  bottom: 8px;
  color: #d8bc8d;
  font-size: 12px;
}

.shop-actions {
  display: grid;
  align-content: center;
  gap: 12px;
}

.price-tag {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(211, 162, 60, 0.16);
}

.price-tag strong {
  color: #8b5e24;
  font-size: 22px;
}

.completion {
  position: absolute;
  z-index: 18;
  inset: 50% auto auto 50%;
  width: min(620px, calc(100vw - 220px));
  padding: 30px;
  text-align: center;
  transform: translate(-50%, -50%);
}

.completion__sigil {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  margin: 0 auto 12px;
  color: #51341f;
  border: 5px solid #8b622a;
  border-radius: 50%;
  background: radial-gradient(circle, #fff4bd, #d3a23c);
  box-shadow: 0 0 0 9px rgba(255, 240, 169, 0.32), 0 0 35px rgba(55, 214, 230, 0.6);
  font-size: 40px;
}

.completion h2 {
  margin: 8px 0;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 39px;
}

.completion__stats {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 18px 0 22px;
}

.completion__stats span {
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(111, 131, 57, 0.12);
  font-size: 13px;
}

.modal-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(35, 20, 13, 0.62);
  backdrop-filter: blur(6px);
  animation: fade-in 180ms ease both;
}

.modal {
  width: min(520px, 92vw);
  padding: 26px;
  text-align: center;
  animation: modal-in 280ms cubic-bezier(.18, .89, .32, 1.16) both;
}

.modal__art {
  width: 150px;
  height: 150px;
  object-fit: contain;
  filter: drop-shadow(0 10px 10px rgba(56, 32, 19, 0.26));
}

.modal h2 {
  margin: 6px 0 8px;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 32px;
}

.modal p {
  color: #6b4e39;
  line-height: 1.7;
}

.modal__actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.toast {
  position: fixed;
  z-index: 130;
  left: 50%;
  bottom: 26px;
  max-width: min(520px, 88vw);
  padding: 11px 18px;
  color: #fff5db;
  border: 1px solid rgba(255, 218, 137, 0.58);
  border-radius: 999px;
  background: rgba(57, 33, 21, 0.91);
  box-shadow: 0 8px 24px rgba(32, 18, 11, 0.34);
  transform: translate(-50%, 30px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
}

@keyframes slow-breathe {
  from { transform: scale(1.005); }
  to { transform: scale(1.045); }
}

@keyframes drift {
  from { background-position: 0 0; }
  to { background-position: 170px -135px; }
}

@keyframes scene-arrive {
  from { opacity: 0.6; transform: scale(1.025); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes plant-arrive {
  from { opacity: 0; transform: translateY(18px) scale(0.72); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes pulse {
  0%, 100% { transform: scale(0.82); opacity: .66; }
  50% { transform: scale(1.12); opacity: 1; }
}

@keyframes merge-burst {
  0% { transform: translate(-50%, -50%) scale(0.2); opacity: 0; box-shadow: 0 0 0 0 rgba(55,214,230,.8); }
  44% { transform: translate(-50%, -50%) scale(1); opacity: 1; box-shadow: 0 0 20px 18px rgba(55,214,230,.5); }
  100% { transform: translate(-50%, -50%) scale(2.4); opacity: 0; box-shadow: 0 0 42px 8px rgba(255,217,140,.2); }
}

@keyframes merge-compatible-pulse {
  from { transform: scale(1); }
  to { transform: scale(1.035); }
}

@keyframes merge-overlap-dazzle {
  from { filter: brightness(1.1); }
  to { filter: brightness(1.55); }
}

@keyframes merge-avatar-dazzle {
  from { filter: brightness(1.08); }
  to { filter: brightness(1.6); }
}

@keyframes merge-pending-dazzle {
  from { filter: brightness(1.05); transform: scale(1); }
  to { filter: brightness(1.42); transform: scale(1.025); }
}

@keyframes merge-pending-copy {
  from { transform: rotate(-2deg) scale(0.96); opacity: 0.66; }
  to { transform: rotate(2deg) scale(1.04); opacity: 0.94; }
}

@keyframes merge-overlap-flare {
  0% { transform: scale(0.45); opacity: 0.95; box-shadow: 0 0 12px 5px rgba(255,255,210,.82); }
  100% { transform: scale(1.55); opacity: 0; box-shadow: 0 0 32px 18px rgba(55,214,230,.52); }
}

@keyframes merge-overlay {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  72% { transform: translate(var(--merge-x), var(--merge-y)) scale(0.68); opacity: .95; }
  100% { transform: translate(var(--merge-x), var(--merge-y)) scale(0.25); opacity: 0; filter: blur(3px); }
}

@keyframes merge-source-vacated {
  from { opacity: .32; }
  to { opacity: 0; }
}

@keyframes merge-target-receive {
  0%, 58% { transform: scale(1); }
  78% { transform: scale(0.86); }
  100% { transform: scale(1.08); opacity: 0; }
}

@keyframes merge-result-arrive {
  from { transform: scale(0.55); opacity: 0; filter: brightness(1.8); }
  to { transform: scale(1); opacity: 1; filter: brightness(1); }
}

@keyframes cauldron-glow {
  to { filter: brightness(1.22) drop-shadow(0 12px 12px rgba(26,16,10,.5)) drop-shadow(0 0 42px rgba(55,214,230,.9)); }
}

@keyframes bubble-up {
  0% { transform: translateY(20px) scale(.45); opacity: 0; }
  25% { opacity: 1; }
  100% { transform: translateY(-90px) scale(1.15); opacity: 0; }
}

@keyframes ingredient-hover {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-8px) rotate(2deg); }
}

@keyframes ingredient-fall {
  to { transform: translateY(180px) scale(.25) rotate(18deg); opacity: 0; }
}

@keyframes potion-arrive {
  from { transform: translateY(-16px) scale(.72); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes modal-in {
  from { transform: translateY(18px) scale(.94); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

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

@media (max-width: 1180px) {
  .topbar { left: 14px; right: 14px; }
  .brand { min-width: 150px; }
  .brand__title { font-size: 20px; }
  .resource-pill small { display: none; }
  .progress-card { width: min(620px, calc(100vw - 270px)); }
  .nav-rail { left: 14px; width: 72px; }
  .nav-button { width: 52px; height: 52px; }
  .scene-title { left: 100px; }
  .cottage-card { right: 30px; width: 340px; }
  .garden-panel { width: 240px; }
  .workbench-layout,
  .brew-layout,
  .shop-layout { left: 98px; gap: 12px; }
  .workbench-layout { grid-template-columns: 230px minmax(350px, 1fr) 240px; }
  .brew-layout { grid-template-columns: 255px minmax(350px, 1fr) 235px; }
  .shop-layout { grid-template-columns: 280px minmax(340px, 1fr) 235px; }
}

@media (max-width: 900px) {
  html, body { overflow: auto; }
  .game-shell { min-width: 820px; }
  .topbar { min-width: 780px; }
  .progress-card { width: 570px; }
  .cottage-card { width: 310px; }
  .garden-panel { width: 220px; }
  .workbench-layout { grid-template-columns: 205px 350px 205px; }
  .brew-layout { grid-template-columns: 230px 350px 200px; }
  .shop-layout { grid-template-columns: 255px 340px 205px; }
}

@media (max-height: 760px) {
  .topbar { top: 10px; height: 56px; }
  .progress-card { top: 76px; padding-top: 8px; }
  .nav-rail { top: 80px; gap: 5px; }
  .nav-button { width: 50px; height: 50px; }
  .workbench-layout,
  .brew-layout,
  .shop-layout { top: 145px; bottom: 78px; }
  .garden-panel { top: 78px; }
  .scene--garden .garden-panel { top: auto; bottom: 4px; }
  .scene-title { bottom: 16px; }
  .tool-tray { bottom: 14px; }
  .scene--garden .tool-tray { bottom: 4px; }
}

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

/* 0.2 presentation layer -------------------------------------------------- */

.splash__content {
  width: min(700px, 86vw);
  padding-left: clamp(8px, 3vw, 48px);
}

.splash__english {
  margin: 18px 0 -2px;
  color: #ffe7a8;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(18px, 2vw, 30px);
  font-weight: 700;
  letter-spacing: .28em;
}

.splash__english i {
  color: var(--magic);
  font-weight: 400;
}

.splash h1 {
  margin-top: 8px;
  text-shadow: 0 4px 0 rgba(73, 38, 21, .52), 0 8px 34px rgba(25, 13, 7, .85), 0 0 28px rgba(255, 216, 124, .18);
}

.primary-button--story {
  min-width: 238px;
  min-height: 68px;
  display: inline-grid;
  place-items: center;
  gap: 1px;
  border-radius: 4px 16px 4px 16px;
  box-shadow: inset 0 0 0 2px rgba(255, 231, 165, .15), 0 0 0 3px rgba(65, 35, 20, .52), 0 12px 32px rgba(31, 16, 9, .54);
}

.primary-button--story::before,
.primary-button--story::after {
  content: "✦";
  position: absolute;
  top: 50%;
  color: #f2ca74;
  transform: translateY(-50%);
}

.primary-button--story::before { left: 16px; }
.primary-button--story::after { right: 16px; }
.primary-button--story span { font-size: 17px; }
.primary-button--story small { color: #e6cfa4; font-size: 10px; font-weight: 500; letter-spacing: .18em; }

.scene__magic-dust {
  position: absolute;
  z-index: -2;
  inset: 0;
  opacity: .28;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(103, 234, 242, .9) 0 1.5px, transparent 2.2px),
    radial-gradient(circle, rgba(255, 223, 139, .82) 0 1px, transparent 1.8px);
  background-position: 12% 20%, 62% 74%;
  background-size: 230px 190px, 310px 270px;
  mask-image: linear-gradient(to bottom, #000 0 68%, transparent 96%);
  animation: dust-wander 24s linear infinite;
}

.world-hud {
  position: absolute;
  z-index: 31;
  inset: 18px 22px auto 22px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
}

.day-crest,
.resource-cluster,
.resource-pill,
.icon-button { pointer-events: auto; }

.day-crest {
  position: relative;
  width: 84px;
  height: 58px;
  display: grid;
  place-items: center;
  align-content: center;
  color: #fff1ca;
  border: 1px solid #d7a94f;
  border-radius: 6px 6px 18px 18px;
  background: linear-gradient(145deg, rgba(84, 48, 29, .96), rgba(49, 28, 18, .93));
  box-shadow: inset 0 0 0 3px rgba(255, 222, 143, .07), 0 8px 22px rgba(36, 19, 11, .36);
}

.day-crest::after {
  content: "✦";
  position: absolute;
  left: 50%;
  bottom: -10px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: #59351f;
  border: 2px solid #72471f;
  border-radius: 50%;
  background: #e8bc5b;
  transform: translateX(-50%);
  box-shadow: 0 3px 8px rgba(42, 22, 11, .35);
  font-size: 10px;
}

.day-crest span { color: #e8c578; font: 700 9px/1 Georgia, serif; letter-spacing: .2em; }
.day-crest strong { margin-top: 4px; font: 700 17px/1 Georgia, serif; }

.resource-cluster {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 6px;
  border: 1px solid rgba(218, 171, 81, .62);
  border-radius: 8px 18px 8px 18px;
  background: linear-gradient(180deg, rgba(64, 37, 23, .9), rgba(45, 26, 17, .87));
  box-shadow: inset 0 0 0 2px rgba(255, 229, 164, .055), 0 10px 26px rgba(37, 20, 12, .32);
}

.resource-pill {
  height: 38px;
  min-width: 74px;
  padding: 3px 10px 3px 4px;
  border: 0;
  border-right: 1px solid rgba(231, 190, 102, .23);
  border-radius: 8px;
  background: transparent;
}

.resource-pill img { width: 31px; height: 31px; }
.resource-pill span { display: flex; align-items: baseline; gap: 5px; }
.resource-pill b { font-family: Georgia, serif; font-size: 17px; }
.resource-pill small { font-size: 9px; }
.icon-button { width: 38px; height: 38px; border-radius: 50%; }

.quest-whisper {
  position: absolute;
  z-index: 25;
  left: 22px;
  top: 104px;
  width: min(276px, 23vw);
  min-height: 64px;
  padding: 11px 16px 11px 49px;
  color: #f9e8c5;
  border: 1px solid rgba(225, 180, 91, .52);
  border-radius: 4px 14px 14px 4px;
  background: linear-gradient(100deg, rgba(60, 34, 22, .94), rgba(63, 37, 24, .72));
  box-shadow: 0 9px 24px rgba(34, 18, 10, .3);
  text-shadow: 0 2px 6px rgba(25, 13, 8, .7);
}

.quest-whisper::before {
  content: "✉";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  color: #5d3a22;
  border-radius: 50%;
  background: #e2b554;
  transform: translateY(-50%);
}

.quest-whisper span,
.quest-whisper strong { display: block; }
.quest-whisper span { color: #d7ad61; font-size: 9px; font-weight: 800; letter-spacing: .18em; }
.quest-whisper strong { margin-top: 4px; font-family: "STKaiti", "KaiTi", serif; font-size: 14px; line-height: 1.35; }

.nav-rail {
  left: 22px;
  top: 50%;
  width: 58px;
  gap: 7px;
  padding: 7px;
  border-radius: 8px 18px 8px 18px;
  transform: translateY(-43%);
  background: linear-gradient(rgba(65, 37, 23, .92), rgba(45, 26, 17, .86));
}

.nav-button { width: 42px; height: 42px; padding: 2px; border-radius: 50%; }
.nav-button img { border-radius: 50%; filter: saturate(.88) brightness(.92); }
.nav-button:hover { transform: translateX(4px) scale(1.06); }
.nav-button.active { box-shadow: 0 0 0 3px rgba(255, 217, 140, .72), 0 0 20px rgba(55, 214, 230, .78); }

.scene-plaque {
  position: absolute;
  z-index: 24;
  top: 17px;
  left: 50%;
  min-width: 310px;
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  padding: 7px 24px 9px 14px;
  color: #fff0c9;
  border: 1px solid #d3a34c;
  border-radius: 5px 5px 20px 20px;
  background: linear-gradient(180deg, rgba(81, 47, 29, .96), rgba(48, 28, 18, .93));
  box-shadow: inset 0 0 0 3px rgba(255, 224, 153, .06), 0 9px 26px rgba(35, 18, 10, .34);
  transform: translateX(-50%);
  text-align: left;
}

.scene-plaque > span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: #4f301d;
  border-radius: 50%;
  background: linear-gradient(#f0cb74, #ba782d);
  font: 700 10px Georgia, serif;
}

.scene-plaque h2 { margin: 0; font-family: "STKaiti", "KaiTi", serif; font-size: 23px; line-height: 1; letter-spacing: .1em; }
.scene-plaque p { margin: 5px 0 0; color: #d8bc8b; font-size: 9px; letter-spacing: .08em; }

.parchment-panel {
  position: relative;
  border-width: 1px;
  border-radius: 5px 18px 5px 18px;
  background:
    linear-gradient(135deg, rgba(255, 246, 216, .97), rgba(229, 199, 145, .96)),
    repeating-linear-gradient(0deg, transparent 0 8px, rgba(92, 57, 30, .025) 9px 10px);
  box-shadow: 0 14px 38px rgba(40, 21, 12, .38), inset 0 0 0 3px rgba(103, 61, 29, .09);
}

.parchment-panel::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(111, 69, 35, .13);
  border-radius: 2px 12px 2px 12px;
  pointer-events: none;
}

.panel-kicker { color: #744a62; font-size: 10px; }
.panel-title { line-height: 1.18; }

.cottage-card {
  position: absolute;
  right: clamp(42px, 7vw, 130px);
  top: 27%;
  width: min(430px, 34vw);
  padding: 30px 34px 26px;
  transform: rotate(-.35deg);
}

.cottage-card::before {
  content: "";
  position: absolute;
  right: 24px;
  top: 22px;
  width: 46px;
  height: 46px;
  border: 4px double rgba(107, 53, 47, .65);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(143, 62, 54, .25), transparent 66%);
}

.request-handwriting {
  margin: 18px 0 16px;
  padding: 14px 8px 14px 18px;
  color: #4d382b;
  border-left: 2px solid rgba(116, 70, 47, .35);
  font-family: "STKaiti", "KaiTi", serif;
  font-size: clamp(16px, 1.4vw, 21px);
  line-height: 1.75;
}

.letter-signature { margin: 14px 4px 0; color: #7a5740; font-family: "STKaiti", "KaiTi", serif; text-align: right; }
.field-note { margin-top: 14px; color: #735a42; font-size: 12px; font-family: "STKaiti", "KaiTi", serif; line-height: 1.65; }

.scene--garden .quest-whisper { width: 252px; }
.scene--garden .garden-panel { position: absolute; left: 18px; top: auto; bottom: 22px; width: 310px; min-height: 72px; }
.scene--garden .tool-tray { left: auto; right: 18px; bottom: 22px; transform: none; }

.workbench-layout,
.brew-layout,
.shop-layout {
  left: 104px;
  right: 28px;
  top: 112px;
  bottom: 84px;
  gap: 16px;
}

.workbench-layout { grid-template-columns: minmax(210px, .65fr) minmax(410px, 1.35fr) minmax(250px, .72fr); }
.workbench-layout .work-card { align-self: center; max-height: 76%; }
.work-card--dark {
  display: grid;
  place-items: center;
  align-self: center;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: radial-gradient(circle, rgba(55, 214, 230, .11), transparent 58%);
  box-shadow: none;
  backdrop-filter: none;
}

.merge-board { padding: clamp(13px, 2vh, 24px); }
.merge-board {
  background:
    linear-gradient(rgba(72, 45, 29, .94), rgba(46, 29, 20, .96)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .035) 0 5px, transparent 5px 10px);
  box-shadow: inset 0 0 0 3px #d3a23c, inset 0 0 36px rgba(20, 11, 7, .46), 0 16px 34px rgba(34, 18, 10, .36);
}
.merge-cell { border-radius: 9px 17px 9px 17px; }
.merge-actions { align-self: center; }

.brew-layout { grid-template-columns: minmax(260px, .72fr) minmax(430px, 1.32fr) minmax(250px, .72fr); }
.recipe-book { align-self: center; transform: rotate(-.5deg); }
.brew-actions { align-self: center; }
.cauldron-stage {
  align-self: center;
  height: min(68vh, 570px);
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: radial-gradient(circle at 50% 62%, rgba(55, 214, 230, .29), rgba(55, 214, 230, .08) 30%, transparent 64%);
  box-shadow: none;
  backdrop-filter: none;
}

.cauldron-stage::after {
  content: "✦  ·  ✦  ·  ✦";
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(54vh, 440px);
  aspect-ratio: 1;
  display: grid;
  place-items: end center;
  padding-bottom: 22px;
  color: rgba(128, 238, 245, .48);
  border: 1px solid rgba(84, 223, 233, .25);
  border-radius: 50%;
  box-shadow: inset 0 0 45px rgba(55, 214, 230, .08), 0 0 32px rgba(55, 214, 230, .08);
  transform: translate(-50%, -48%);
  letter-spacing: 1.8em;
  pointer-events: none;
}

.cauldron-visual { width: min(88%, 480px); }
.cauldron-art { left: 2%; right: 2%; width: 96%; height: 72%; }

.shop-layout { grid-template-columns: minmax(280px, 330px) minmax(420px, 1fr) minmax(300px, 380px); }
.customer-card { align-self: center; height: min(72vh, 650px); border-radius: 18px 5px 18px 5px; }
.display-card {
  align-self: center;
  height: min(67vh, 555px);
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: radial-gradient(circle at 50% 48%, rgba(255, 221, 137, .23), rgba(55, 214, 230, .08) 29%, transparent 62%);
  box-shadow: none;
  backdrop-filter: none;
  text-shadow: 0 2px 8px rgba(32, 17, 10, .86);
}
.display-pedestal { width: min(70%, 300px); }
.display-pedestal.listed img { width: 76%; }
.customer-portrait { mix-blend-mode: multiply; }
.shop-actions { align-self: center; }

.completion {
  position: absolute;
  width: min(700px, calc(100vw - 210px));
  padding: 38px 44px;
  border-radius: 8px 30px 8px 30px;
}

.completion::before {
  content: "";
  position: fixed;
  inset: -60vh -60vw;
  z-index: -1;
  background: radial-gradient(circle, rgba(255, 226, 143, .16), rgba(37, 19, 11, .55) 42%);
  pointer-events: none;
}

.completion__sigil { animation: completion-glow 2s ease-in-out infinite alternate; }
.completion__epilogue { color: #684b38; font-family: "STKaiti", "KaiTi", serif; font-size: 16px; line-height: 1.7; }

.modal-backdrop { background: radial-gradient(circle, rgba(50, 91, 84, .2), rgba(30, 16, 10, .72)); }
.modal { padding: 30px 34px; border-radius: 8px 26px 8px 26px; }
.modal__art { filter: drop-shadow(0 10px 10px rgba(56,32,19,.26)) drop-shadow(0 0 18px rgba(55,214,230,.32)); }

.toast {
  bottom: 20px;
  min-width: 310px;
  border-radius: 5px 14px 5px 14px;
  text-align: center;
}

@keyframes dust-wander {
  from { background-position: 12% 20%, 62% 74%; }
  to { background-position: 28% 2%, 48% 48%; }
}

@keyframes completion-glow {
  from { transform: scale(.98) rotate(-2deg); box-shadow: 0 0 0 9px rgba(255,240,169,.24), 0 0 24px rgba(55,214,230,.42); }
  to { transform: scale(1.04) rotate(2deg); box-shadow: 0 0 0 12px rgba(255,240,169,.38), 0 0 52px rgba(55,214,230,.76); }
}

@media (max-width: 1180px) {
  .scene-plaque { min-width: 270px; }
  .resource-pill { min-width: 60px; }
  .resource-pill small { display: none; }
  .quest-whisper { width: 230px; }
  .workbench-layout,
  .brew-layout,
  .shop-layout { left: 88px; right: 18px; top: 104px; gap: 10px; }
  .workbench-layout { grid-template-columns: 205px minmax(360px, 1fr) 225px; }
  .brew-layout { grid-template-columns: 230px minmax(370px, 1fr) 220px; }
  .shop-layout { grid-template-columns: 260px minmax(350px, 1fr) 220px; }
}

@media (max-height: 760px) {
  .world-hud { top: 10px; }
  .scene-plaque { top: 9px; min-height: 54px; }
  .scene-plaque h2 { font-size: 20px; }
  .quest-whisper { top: 78px; }
  .nav-rail { top: 52%; gap: 4px; }
  .nav-button { width: 38px; height: 38px; }
  .workbench-layout,
  .brew-layout,
  .shop-layout { top: 84px; bottom: 68px; }
  .scene--garden .garden-panel,
  .scene--garden .tool-tray { bottom: 8px; }
}

/* --------------------------------------------------------------------------
   0.3A IMPACT PASS
   Presentation direction layered over the frozen Art Bible V1 assets.
   -------------------------------------------------------------------------- */

.scene__background {
  filter: saturate(1.08) contrast(1.025) brightness(1.015);
  transition: filter 900ms ease, transform 1400ms cubic-bezier(.2,.78,.18,1);
}

.scene__wash {
  background:
    linear-gradient(180deg, rgba(34, 20, 13, .22), transparent 17%, transparent 82%, rgba(35, 19, 11, .22)),
    radial-gradient(circle at 50% 48%, transparent 56%, rgba(31, 17, 11, .1) 100%);
}

.scene--cottage .scene__wash {
  background: linear-gradient(90deg, rgba(46, 27, 16, .08), transparent 42%, rgba(66, 38, 20, .12));
}

.scene--garden .scene__wash {
  background:
    linear-gradient(180deg, rgba(43, 31, 13, .13), transparent 24%, transparent 82%, rgba(41, 24, 11, .18)),
    radial-gradient(circle at 50% 57%, transparent 62%, rgba(30, 52, 29, .08));
}

.scene--merge .scene__wash {
  background:
    radial-gradient(circle at 52% 50%, rgba(46, 213, 222, .07), transparent 31%),
    linear-gradient(90deg, rgba(34, 20, 15, .22), transparent 33% 70%, rgba(34, 20, 15, .21));
}

.scene--brew .scene__wash {
  background:
    radial-gradient(circle at 51% 55%, rgba(49, 221, 231, .12), transparent 35%),
    linear-gradient(90deg, rgba(38, 22, 14, .16), transparent 35% 70%, rgba(38, 22, 14, .16));
}

.scene--shop .scene__wash {
  background:
    radial-gradient(circle at 53% 43%, rgba(255, 222, 139, .1), transparent 34%),
    linear-gradient(180deg, rgba(40, 22, 12, .12), transparent 24%, transparent 76%, rgba(40, 22, 12, .18));
}

.world-hud,
.quest-whisper,
.nav-rail,
.scene-plaque,
.workbench-layout > aside,
.brew-layout > aside,
.shop-layout > aside,
.garden-panel,
.tool-tray {
  transition: opacity 420ms ease, transform 520ms cubic-bezier(.2,.78,.18,1), filter 420ms ease;
}

.world-hud {
  background: linear-gradient(90deg, rgba(51, 31, 20, .9), rgba(51, 31, 20, .66) 66%, rgba(51, 31, 20, .86));
  box-shadow: 0 7px 22px rgba(39, 20, 11, .24), inset 0 -1px rgba(255, 223, 151, .13);
}

.quest-whisper {
  background: linear-gradient(135deg, rgba(55, 34, 23, .92), rgba(45, 28, 19, .82));
  box-shadow: 0 8px 24px rgba(31, 16, 9, .24);
}

.scene-plaque {
  background: linear-gradient(180deg, rgba(73, 43, 27, .91), rgba(47, 28, 18, .86));
  box-shadow: inset 0 0 0 2px rgba(255, 224, 153, .045), 0 7px 20px rgba(35, 18, 10, .23);
}

/* The merge inventory now reads as a magical work surface, not a web puzzle. */
.work-card--dark {
  position: relative;
  isolation: isolate;
  overflow: visible;
}

.work-card--dark::before,
.work-card--dark::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: -1;
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
}

.work-card--dark::before {
  width: min(49vw, 560px);
  border: 1px solid rgba(97, 227, 233, .25);
  background:
    repeating-conic-gradient(from 4deg, rgba(104, 226, 232, .15) 0 1deg, transparent 1deg 29deg),
    radial-gradient(circle, rgba(46, 203, 213, .1), transparent 64%);
  box-shadow: inset 0 0 46px rgba(55, 214, 230, .08), 0 0 32px rgba(55, 214, 230, .08);
  transform: translate(-50%, -50%) rotate(8deg);
}

.work-card--dark::after {
  width: min(43vw, 488px);
  border: 1px dashed rgba(245, 202, 112, .25);
  transform: translate(-50%, -50%) rotate(-9deg);
}

.merge-board {
  width: min(42vw, 438px);
  height: min(42vw, 438px);
  padding: clamp(12px, 1.7vh, 19px);
  gap: clamp(8px, 1vw, 12px);
  border: 1px solid rgba(219, 173, 81, .72);
  border-radius: 32px 8px 32px 8px;
  background:
    linear-gradient(145deg, rgba(66, 41, 28, .82), rgba(40, 26, 20, .88)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .025) 0 5px, transparent 5px 11px);
  box-shadow:
    inset 0 0 0 4px rgba(240, 199, 105, .08),
    inset 0 0 42px rgba(15, 9, 7, .34),
    0 18px 50px rgba(30, 16, 10, .3),
    0 0 38px rgba(55, 214, 230, .08);
  backdrop-filter: blur(3px);
}

.merge-cell {
  border: 1px solid rgba(213, 166, 79, .3);
  border-radius: 14px 5px 14px 5px;
  background:
    radial-gradient(circle at 50% 38%, rgba(66, 204, 211, .08), transparent 48%),
    linear-gradient(145deg, rgba(77, 48, 32, .72), rgba(47, 30, 22, .82));
  box-shadow: inset 0 0 18px rgba(19, 11, 8, .24), 0 4px 12px rgba(27, 14, 9, .17);
}

.merge-cell:hover,
.merge-cell.compatible,
.merge-cell.move-target,
.merge-cell.merge-keyboard-source {
  border-color: rgba(106, 237, 242, .8);
  background:
    radial-gradient(circle, rgba(70, 222, 230, .19), transparent 62%),
    linear-gradient(145deg, rgba(78, 51, 33, .76), rgba(42, 31, 24, .84));
}

.merge-cell.merge-keyboard-source {
  box-shadow: inset 0 0 20px rgba(74, 230, 237, .2), 0 0 0 3px rgba(111, 239, 243, .34), 0 0 28px rgba(74, 230, 237, .54);
}

/* Full-scene presentation director. */
.presentation-active .world-hud,
.presentation-active .quest-whisper,
.presentation-active .nav-rail,
.presentation-active .scene-plaque,
.presentation-active .workbench-layout > aside,
.presentation-active .brew-layout > aside,
.presentation-active .shop-layout > aside,
.presentation-active .garden-panel,
.presentation-active .tool-tray {
  opacity: 0;
  pointer-events: none;
  filter: blur(7px);
}

.presentation-active .world-hud,
.presentation-active .scene-plaque { transform: translateY(-32px); }
.presentation-active .quest-whisper { transform: translateX(34px); }
.presentation-active .nav-rail { transform: translate(-22px, -50%); }
.presentation-active .workbench-layout > aside:first-child,
.presentation-active .brew-layout > aside:first-child,
.presentation-active .shop-layout > aside:first-child { transform: translateX(-42px); }
.presentation-active .workbench-layout > aside:last-child,
.presentation-active .brew-layout > aside:last-child,
.presentation-active .shop-layout > aside:last-child { transform: translateX(42px); }

.presentation-active .scene__background {
  filter: saturate(1.18) contrast(1.055) brightness(.8);
  transform: scale(1.045);
}

.presentation--brew .scene__background,
.presentation--brew-result .scene__background {
  filter: saturate(1.24) contrast(1.05) brightness(.76) hue-rotate(-3deg);
  transform: scale(1.055);
}

.presentation--handoff .scene__background,
.presentation--shop-result .scene__background {
  filter: saturate(1.14) contrast(1.04) brightness(.84);
  transform: scale(1.045) translateX(-.7%);
}

.presentation-active .work-card--dark,
.presentation-active .cauldron-stage,
.presentation-active .display-card {
  filter: brightness(.58) saturate(.78) blur(1px);
  transform: scale(.96);
  transition: filter 520ms ease, transform 800ms ease;
}

.setpiece {
  position: absolute;
  inset: 0;
  z-index: 70;
  overflow: hidden;
  pointer-events: none;
  isolation: isolate;
  animation: setpiece-enter 360ms ease both;
}

.setpiece__veil {
  position: absolute;
  inset: 0;
  z-index: -4;
  background:
    radial-gradient(circle at 50% 47%, rgba(26, 99, 99, .08), rgba(23, 14, 12, .7) 69%),
    linear-gradient(180deg, rgba(20, 12, 10, .26), rgba(20, 12, 10, .52));
  animation: setpiece-veil 520ms ease both;
}

.setpiece__rays {
  position: absolute;
  left: 50%;
  top: 45%;
  z-index: -2;
  width: min(84vw, 980px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: repeating-conic-gradient(from 4deg, rgba(95, 234, 239, .09) 0 3deg, transparent 3deg 15deg);
  mix-blend-mode: screen;
  transform: translate(-50%, -50%);
  animation: ritual-rays 8s linear infinite;
}

.setpiece__ring {
  position: absolute;
  left: 50%;
  top: 45%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  mix-blend-mode: screen;
}

.setpiece__ring--outer {
  width: min(54vw, 610px);
  aspect-ratio: 1;
  border: 1px solid rgba(103, 234, 240, .64);
  box-shadow: inset 0 0 42px rgba(56, 224, 231, .13), 0 0 42px rgba(56, 224, 231, .2);
  animation: ritual-ring-outer 6s linear infinite, ritual-ring-arrive 660ms cubic-bezier(.2,.8,.2,1) both;
}

.setpiece__ring--outer::before,
.setpiece__ring--outer::after {
  content: "✦  ·  ✦  ·  ✦  ·  ✦";
  position: absolute;
  inset: 8%;
  display: grid;
  place-items: start center;
  color: rgba(116, 239, 244, .76);
  border: 1px dashed rgba(235, 198, 112, .38);
  border-radius: 50%;
  font-size: 16px;
  letter-spacing: 1.25em;
}

.setpiece__ring--outer::after {
  place-items: end center;
  transform: rotate(180deg);
}

.setpiece__ring--inner {
  width: min(34vw, 380px);
  aspect-ratio: 1;
  border: 1px solid rgba(253, 215, 130, .72);
  box-shadow: 0 0 32px rgba(255, 215, 118, .18);
  animation: ritual-ring-inner 4s linear infinite reverse, ritual-ring-arrive 520ms 120ms cubic-bezier(.2,.8,.2,1) both;
}

.setpiece__visual {
  position: absolute;
  left: 50%;
  top: 44%;
  width: min(38vw, 470px);
  height: min(38vw, 470px);
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
}

.setpiece__hero {
  position: relative;
  z-index: 3;
  width: 58%;
  height: 58%;
  object-fit: contain;
  filter: drop-shadow(0 24px 18px rgba(20, 12, 9, .44)) drop-shadow(0 0 34px rgba(74, 232, 237, .8));
  animation: setpiece-hero-arrive 820ms cubic-bezier(.12,.82,.17,1.2) both, setpiece-hero-float 2.4s 820ms ease-in-out infinite alternate;
}

.setpiece__hero--potion { width: 50%; height: 72%; }
.setpiece__hero--ingredient { width: 42%; height: 42%; animation: ingredient-ritual 1.45s cubic-bezier(.25,.75,.2,1) both; }
.setpiece__hero--handoff { width: 36%; height: 62%; animation: potion-handoff 1.55s cubic-bezier(.25,.7,.22,1) both; }

.setpiece__herbs {
  position: relative;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 30px rgba(80, 234, 239, .7));
}

.setpiece__herbs img {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 43%;
  height: 43%;
  object-fit: contain;
  transform: translate(-50%, -50%);
}

.setpiece__herbs img:first-child { animation: herb-converge-left 1.2s cubic-bezier(.2,.8,.2,1) both; }
.setpiece__herbs img:last-child { animation: herb-converge-right 1.2s cubic-bezier(.2,.8,.2,1) both; }

.setpiece__reward {
  display: flex;
  align-items: center;
  gap: 16px;
  color: #fff3c4;
  font: 800 clamp(46px, 6vw, 82px) Georgia, serif;
  text-shadow: 0 5px 18px rgba(37, 20, 10, .72), 0 0 28px rgba(255, 213, 101, .8);
  animation: reward-arrive 780ms cubic-bezier(.12,.82,.17,1.2) both;
}

.setpiece__reward img {
  width: clamp(76px, 9vw, 126px);
  filter: drop-shadow(0 0 24px rgba(255, 210, 83, .76));
}

.setpiece__caption {
  position: absolute;
  left: 50%;
  bottom: clamp(38px, 7vh, 78px);
  width: min(760px, calc(100vw - 210px));
  color: #fff2cb;
  text-align: center;
  text-shadow: 0 3px 16px rgba(25, 13, 9, .92);
  transform: translateX(-50%);
  animation: setpiece-caption 620ms 220ms cubic-bezier(.2,.78,.18,1) both;
}

.setpiece__caption::before,
.setpiece__caption::after {
  content: "";
  display: inline-block;
  width: min(13vw, 150px);
  height: 1px;
  margin: 0 16px 4px;
  background: linear-gradient(90deg, transparent, rgba(255, 222, 142, .8));
}

.setpiece__caption::after { background: linear-gradient(90deg, rgba(255, 222, 142, .8), transparent); }
.setpiece__caption span { color: #7eebef; font: 800 10px/1.2 Georgia, serif; letter-spacing: .28em; }
.setpiece__caption strong { display: block; margin-top: 8px; font-family: "STKaiti", "KaiTi", serif; font-size: clamp(30px, 4vw, 58px); font-weight: 700; letter-spacing: .14em; }
.setpiece__caption p { margin: 8px auto 0; color: #ead5ad; font-size: clamp(12px, 1.2vw, 16px); letter-spacing: .08em; }

.setpiece--merge-result .setpiece__veil,
.setpiece--brew-result .setpiece__veil {
  background:
    radial-gradient(circle at 50% 43%, rgba(59, 223, 230, .2), rgba(24, 15, 12, .72) 65%),
    linear-gradient(180deg, rgba(19, 12, 10, .3), rgba(19, 12, 10, .56));
}

.setpiece--brew .setpiece__rays,
.setpiece--brew-result .setpiece__rays {
  background: repeating-conic-gradient(from 2deg, rgba(67, 230, 237, .13) 0 4deg, transparent 4deg 18deg);
}

.setpiece--handoff .setpiece__ring,
.setpiece--shop-result .setpiece__ring { border-color: rgba(255, 218, 125, .7); }
.setpiece--handoff .setpiece__rays,
.setpiece--shop-result .setpiece__rays { background: repeating-conic-gradient(from 2deg, rgba(255, 215, 116, .1) 0 3deg, transparent 3deg 18deg); }
.setpiece--handoff .setpiece__caption span,
.setpiece--shop-result .setpiece__caption span { color: #ffe19b; }

/* The ending stays inside the scene instead of becoming a full-screen result dialog. */
.completion-scene {
  position: absolute;
  inset: 0;
  z-index: 12;
  pointer-events: none;
}

.completion-scene .completion {
  left: 50%;
  right: auto;
  top: auto;
  bottom: clamp(18px, 3.5vh, 38px);
  width: min(760px, calc(100vw - 250px));
  padding: 23px 30px 20px;
  border-radius: 7px 24px 7px 24px;
  transform: translateX(-50%);
  pointer-events: auto;
  animation: completion-note-arrive 760ms cubic-bezier(.2,.78,.18,1) both;
}

.completion-scene .completion::before { display: none; }
.completion-scene .completion h2 { margin: 4px 0 8px; font-size: clamp(25px, 2.3vw, 36px); }
.completion-scene .completion .panel-copy { margin: 5px 0 10px; font-size: 14px; }
.completion-scene .completion__sigil {
  position: absolute;
  left: -26px;
  top: -28px;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  color: #fff0b8;
  border: 2px solid rgba(255, 227, 151, .82);
  border-radius: 50%;
  background: linear-gradient(145deg, #4a8e79, #23666a);
}

.completion-scene .completion__stats { display: flex; gap: 8px; margin: 10px 0; }
.completion-scene .completion__stats span { flex: 1; padding: 7px 9px; font-size: 11px; }
.completion-scene .completion__epilogue { margin: 8px 0 12px; font-size: 13px; line-height: 1.5; }
.completion__actions { display: flex; gap: 10px; }
.completion__actions .action-button { flex: 1; margin: 0; }
.completion__actions .secondary-button { width: auto; min-width: 116px; margin: 0; }

@keyframes setpiece-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes setpiece-veil {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes ritual-rays {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes ritual-ring-arrive {
  from { opacity: 0; scale: .62; }
  to { opacity: 1; scale: 1; }
}

@keyframes ritual-ring-outer {
  from { rotate: 0deg; }
  to { rotate: 360deg; }
}

@keyframes ritual-ring-inner {
  from { rotate: 0deg; }
  to { rotate: 360deg; }
}

@keyframes setpiece-hero-arrive {
  0% { opacity: 0; transform: translateY(24px) scale(.52) rotate(-8deg); filter: blur(7px) drop-shadow(0 0 0 transparent); }
  68% { opacity: 1; transform: translateY(-4px) scale(1.08) rotate(2deg); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}

@keyframes setpiece-hero-float {
  from { transform: translateY(-3px) rotate(-1deg); }
  to { transform: translateY(8px) rotate(1deg); }
}

@keyframes ingredient-ritual {
  0% { opacity: 0; transform: translateY(-190px) scale(.65) rotate(-16deg); filter: blur(5px) drop-shadow(0 0 8px rgba(63,225,232,.25)); }
  58% { opacity: 1; transform: translateY(-12px) scale(1.05) rotate(5deg); filter: blur(0) drop-shadow(0 0 28px rgba(63,225,232,.8)); }
  100% { opacity: 0; transform: translateY(145px) scale(.2) rotate(24deg); filter: blur(3px) drop-shadow(0 0 42px rgba(63,225,232,1)); }
}

@keyframes potion-handoff {
  0% { opacity: 0; transform: translate(-190px, 95px) scale(.72) rotate(-12deg); }
  20% { opacity: 1; }
  72% { opacity: 1; transform: translate(90px, -18px) scale(1.06) rotate(4deg); }
  100% { opacity: 0; transform: translate(165px, -42px) scale(.82) rotate(8deg); }
}

@keyframes herb-converge-left {
  0% { opacity: 0; transform: translate(-230%, -50%) rotate(-16deg) scale(.72); }
  18% { opacity: 1; }
  82% { opacity: 1; transform: translate(-58%, -50%) rotate(-2deg) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) rotate(0) scale(.38); filter: brightness(2.5) blur(2px); }
}

@keyframes herb-converge-right {
  0% { opacity: 0; transform: translate(130%, -50%) rotate(16deg) scale(.72); }
  18% { opacity: 1; }
  82% { opacity: 1; transform: translate(-42%, -50%) rotate(2deg) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) rotate(0) scale(.38); filter: brightness(2.5) blur(2px); }
}

@keyframes reward-arrive {
  0% { opacity: 0; transform: translateY(22px) scale(.55) rotate(-5deg); }
  70% { opacity: 1; transform: translateY(-5px) scale(1.09) rotate(2deg); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes setpiece-caption {
  from { opacity: 0; transform: translate(-50%, 24px); letter-spacing: .08em; }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes completion-note-arrive {
  from { opacity: 0; transform: translate(-50%, 35px) rotate(.7deg); }
  to { opacity: 1; transform: translate(-50%, 0) rotate(0); }
}

@media (max-width: 1180px), (max-height: 760px) {
  .merge-board { width: min(38vw, 390px); height: min(38vw, 390px); }
  .work-card--dark::before { width: min(44vw, 470px); }
  .work-card--dark::after { width: min(40vw, 420px); }
  .setpiece__visual { top: 42%; width: min(36vw, 390px); height: min(36vw, 390px); }
  .setpiece__ring { top: 43%; }
  .setpiece__ring--outer { width: min(48vw, 480px); }
  .setpiece__ring--inner { width: min(31vw, 320px); }
  .setpiece__caption { bottom: 28px; }
  .setpiece__caption strong { font-size: clamp(28px, 3.7vw, 46px); }
  .completion-scene .completion { bottom: 14px; padding: 18px 26px 17px; }
  .completion-scene .completion__epilogue { display: none; }
}

@media (max-width: 920px) {
  .setpiece__caption { width: calc(100vw - 70px); }
  .completion-scene .completion { width: calc(100vw - 150px); }
}

@media (prefers-reduced-motion: reduce) {
  .setpiece *,
  .completion-scene .completion { animation-duration: 1ms !important; animation-iteration-count: 1 !important; }
}

/* --------------------------------------------------------------------------
   0.3B CINEMATIC PASS
   Three verbs, three stage grammars:
   merge = two sources collapse and regrow
   brew  = vertical distillation from cauldron to bottle
   sale  = horizontal handoff, human reaction, return of value
   -------------------------------------------------------------------------- */

.cinematic {
  position: absolute;
  inset: 0;
  z-index: 72;
  overflow: hidden;
  pointer-events: none;
  isolation: isolate;
}

/* Shared UI retreat remains, but the scene response is now authored per verb. */
.presentation--merge .scene__background,
.presentation--merge-result .scene__background {
  filter: saturate(1.14) contrast(1.06) brightness(.77);
  transform: scale(1.025);
}

.presentation--merge .work-card--dark,
.presentation--merge-result .work-card--dark {
  filter: brightness(.82) saturate(1.12);
  transform: scale(1.035);
}

.presentation--merge .merge-board,
.presentation--merge-result .merge-board {
  box-shadow:
    inset 0 0 0 4px rgba(240, 199, 105, .08),
    inset 0 0 48px rgba(15, 9, 7, .4),
    0 22px 62px rgba(22, 12, 8, .44),
    0 0 54px rgba(55, 214, 230, .24);
}

.presentation--brew .scene__background,
.presentation--brew-result .scene__background {
  filter: saturate(1.2) contrast(1.035) brightness(.89);
  transform: scale(1.035) translateY(-.4%);
}

.presentation--brew .cauldron-stage,
.presentation--brew-result .cauldron-stage {
  filter: brightness(1.02) saturate(1.22);
  transform: scale(1.075) translateY(-1.2%);
}

.presentation--handoff .scene__background,
.presentation--shop-result .scene__background {
  filter: saturate(1.15) contrast(1.025) brightness(1.02);
  transform: scale(1.035) translateX(-.45%);
}

.presentation--handoff .display-card,
.presentation--shop-result .display-card {
  opacity: 0;
  filter: none;
  transform: scale(.96);
}

.presentation--shop-result .completion-scene {
  opacity: 0;
  pointer-events: none;
  transform: translateY(34px) scale(.98);
}

/* 1) HERB ASCENSION: local, botanical, rooted in the destination cell. */
.merge-cinema__vignette {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle 185px at var(--focus-x) var(--focus-y), rgba(88, 239, 240, .12), rgba(18, 15, 12, .08) 48%, rgba(20, 13, 9, .58) 100%);
  animation: merge-vignette-in 480ms ease both;
}

.merge-cinema__focus {
  position: absolute;
  left: var(--focus-x);
  top: var(--focus-y);
  width: 430px;
  height: 330px;
  transform: translate(-50%, -50%);
}

.merge-cinema__source {
  position: absolute;
  left: 50%;
  top: 47%;
  width: 150px;
  height: 150px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.merge-cinema__source i {
  position: absolute;
  inset: 3px;
  border: 2px solid rgba(94, 239, 242, .75);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(43, 222, 229, .13), transparent 58%),
    conic-gradient(from 25deg, transparent 0 12%, rgba(105, 241, 243, .66) 12% 13%, transparent 13% 37%, rgba(105, 241, 243, .66) 37% 38%, transparent 38% 62%, rgba(105, 241, 243, .66) 62% 63%, transparent 63% 87%, rgba(105, 241, 243, .66) 87% 88%, transparent 88%);
  box-shadow: inset 0 0 28px rgba(64, 229, 235, .17), 0 0 28px rgba(64, 229, 235, .34);
  animation: merge-source-ring 1.2s linear infinite;
}

.merge-cinema__source i::before,
.merge-cinema__source i::after {
  content: "◆";
  position: absolute;
  left: 50%;
  top: -8px;
  color: #8bf5f4;
  font-size: 12px;
  text-shadow: 0 0 12px #5ce6ec;
  transform: translateX(-50%) rotate(45deg);
}

.merge-cinema__source i::after { top: auto; bottom: -8px; }

.merge-cinema__source img {
  width: 116px;
  height: 116px;
  object-fit: contain;
  filter: drop-shadow(0 8px 10px rgba(20, 12, 8, .45)) drop-shadow(0 0 17px rgba(63, 228, 233, .52));
}

.merge-cinema__source--left { animation: merge-source-left 1.58s cubic-bezier(.18,.72,.16,1) both; }
.merge-cinema__source--right { animation: merge-source-right 1.58s cubic-bezier(.18,.72,.16,1) both; }

.merge-cinema__bridge {
  position: absolute;
  left: 50%;
  top: 47%;
  width: 285px;
  height: 76px;
  transform: translate(-50%, -50%);
}

.merge-cinema__bridge::before,
.merge-cinema__bridge::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  top: 50%;
  height: 2px;
  border-radius: 50%;
  background: linear-gradient(90deg, transparent, #76f2f1 23%, #fff7bf 50%, #76f2f1 77%, transparent);
  box-shadow: 0 0 12px rgba(94, 238, 241, .9), 0 0 30px rgba(94, 238, 241, .5);
  transform: scaleX(0);
  animation: merge-bridge-grow 680ms 520ms ease forwards;
}

.merge-cinema__bridge::after {
  transform: scaleX(0) rotate(7deg);
  opacity: .56;
}

.merge-cinema__bridge i {
  position: absolute;
  left: calc(8% + var(--i) * 10.4%);
  top: 50%;
  width: 10px;
  height: 17px;
  border: 1px solid #90f6f3;
  border-radius: 90% 10% 90% 10%;
  background: rgba(90, 235, 236, .32);
  box-shadow: 0 0 10px rgba(86, 236, 239, .82);
  opacity: 0;
  transform: rotate(calc(-42deg + var(--i) * 11deg)) scale(.3);
  animation: merge-leaf-flow 650ms calc(430ms + var(--i) * 48ms) ease-out both;
}

.merge-cinema__bridge i:nth-child(1),
.merge-cinema__bridge i:nth-child(6) { top: 64%; }
.merge-cinema__bridge i:nth-child(2),
.merge-cinema__bridge i:nth-child(8) { top: 38%; }
.merge-cinema__bridge i:nth-child(3),
.merge-cinema__bridge i:nth-child(7) { top: 56%; }
.merge-cinema__bridge i:nth-child(4),
.merge-cinema__bridge i:nth-child(9) { top: 43%; }

.merge-cinema__seed {
  position: absolute;
  left: 50%;
  top: 47%;
  width: 128px;
  height: 128px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(.16) rotate(-22deg);
  animation: merge-seed-form 500ms 1.08s cubic-bezier(.16,.8,.2,1.2) forwards;
}

.merge-cinema__seed i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 28px;
  height: 62px;
  border: 2px solid #c5fbff;
  border-radius: 90% 10% 90% 10%;
  background: linear-gradient(#f7ffff, #62e8ef 64%, #2bbec9);
  box-shadow: 0 0 14px #6ef2f3, 0 0 28px rgba(84, 230, 237, .75);
  transform-origin: 50% 100%;
}

.merge-cinema__seed i:nth-child(1) { transform: translate(-50%, -100%) rotate(0deg); }
.merge-cinema__seed i:nth-child(2) { transform: translate(-50%, -100%) rotate(90deg); }
.merge-cinema__seed i:nth-child(3) { transform: translate(-50%, -100%) rotate(180deg); }
.merge-cinema__seed i:nth-child(4) { transform: translate(-50%, -100%) rotate(270deg); }
.merge-cinema__seed b { position: absolute; inset: 41%; border-radius: 50%; background: #fff8b5; box-shadow: 0 0 24px #fff5a2, 0 0 58px #5debf0; }

.merge-cinema__result {
  position: absolute;
  left: 50%;
  top: 48%;
  width: 190px;
  height: 190px;
  object-fit: contain;
  opacity: 0;
  filter: drop-shadow(0 13px 14px rgba(18, 10, 7, .5)) drop-shadow(0 0 28px rgba(80, 235, 237, .85));
  transform: translate(-50%, -50%) scale(.28);
}

.cinematic--merge-result .merge-cinema__source,
.cinematic--merge-result .merge-cinema__bridge { display: none; }
.cinematic--merge-result .merge-cinema__seed { opacity: 1; animation: merge-crystal-release 760ms ease both; }
.cinematic--merge-result .merge-cinema__result { animation: merge-result-grow 1.18s 260ms cubic-bezier(.12,.82,.17,1.15) forwards; }

.merge-cinema__label {
  position: absolute;
  left: 50%;
  bottom: clamp(26px, 5.2vh, 58px);
  min-width: 330px;
  padding: 11px 34px 13px;
  color: #fff2c9;
  border-top: 1px solid rgba(119, 238, 239, .5);
  border-bottom: 1px solid rgba(221, 181, 97, .46);
  background: linear-gradient(90deg, transparent, rgba(37, 27, 20, .76) 18% 82%, transparent);
  text-align: center;
  text-shadow: 0 2px 10px rgba(20, 11, 8, .8);
  transform: translateX(-50%);
  animation: cinema-label-in 520ms 250ms ease both;
}
.merge-cinema__label span,
.brew-cinema__label span { display: block; color: #86eef0; font: 800 9px Georgia, serif; letter-spacing: .27em; }
.merge-cinema__label strong,
.brew-cinema__label strong { display: block; margin-top: 5px; font-family: "STKaiti", "KaiTi", serif; font-size: clamp(25px, 2.6vw, 38px); letter-spacing: .12em; }
.merge-cinema__label small,
.brew-cinema__label small { color: #dbcaa8; font-size: 11px; letter-spacing: .08em; }

/* 2) ALCHEMY: apparatus-led, vertical, hot, liquid and sequential. */
.brew-cinema__heat {
  position: absolute;
  left: 50%;
  top: 65%;
  width: min(52vw, 650px);
  height: 210px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 177, 68, .35), rgba(72, 220, 226, .2) 36%, transparent 70%);
  filter: blur(8px);
  transform: translate(-50%, -50%) scale(.4);
  animation: brew-heat-bloom 1.15s ease forwards, brew-heat-pulse 680ms 1.15s ease-in-out infinite alternate;
}

.brew-cinema__ingredients {
  position: absolute;
  left: 50%;
  top: 10%;
  width: 420px;
  height: 410px;
  transform: translateX(-50%);
}

.brew-cinema__ingredients img {
  position: absolute;
  left: calc(10% + var(--i) * 13%);
  top: -90px;
  width: 62px;
  height: 62px;
  object-fit: contain;
  clip-path: circle(34% at 50% 46%);
  filter: saturate(1.25) brightness(1.16) drop-shadow(0 0 12px rgba(86, 234, 237, .7));
  opacity: 0;
  animation: brew-ingredient-fall 1.55s calc(var(--i) * 105ms) cubic-bezier(.3,.64,.32,1) forwards;
}

.brew-cinema__vortex {
  position: absolute;
  left: 50%;
  top: 57%;
  width: 330px;
  height: 92px;
  border: 3px solid rgba(126, 244, 245, .72);
  border-radius: 50%;
  background: conic-gradient(from 90deg, rgba(47, 198, 211, .05), rgba(108, 245, 244, .62), rgba(44, 122, 198, .22), rgba(255, 218, 117, .56), rgba(47, 198, 211, .05));
  box-shadow: inset 0 0 28px rgba(72, 230, 234, .35), 0 0 32px rgba(61, 220, 227, .45);
  opacity: 0;
  transform: translate(-50%, -50%) scale(.5) rotate(0deg);
  animation: brew-vortex-in 520ms 380ms ease forwards, brew-vortex-spin 1.7s 900ms linear infinite;
}
.brew-cinema__vortex i { position: absolute; inset: 18%; border: 2px dashed rgba(234, 251, 225, .64); border-radius: 50%; }
.brew-cinema__vortex i:nth-child(2) { inset: 34%; border-color: rgba(255, 209, 105, .72); }
.brew-cinema__vortex i:nth-child(3) { inset: 46%; border: 0; background: #d9ffff; box-shadow: 0 0 28px #67f0f2; }

.brew-cinema__steam {
  position: absolute;
  left: 50%;
  top: 56%;
  width: 340px;
  height: 260px;
  transform: translate(-50%, -100%);
}
.brew-cinema__steam i {
  position: absolute;
  left: calc(18% + var(--steam-x, 0) * 1%);
  bottom: 0;
  width: 42px;
  height: 180px;
  border: 8px solid transparent;
  border-left-color: rgba(156, 247, 246, .34);
  border-radius: 50%;
  filter: blur(3px);
  opacity: 0;
  animation: brew-steam-rise 1.45s ease-in-out infinite;
}
.brew-cinema__steam i:nth-child(1) { left: 16%; animation-delay: .2s; }
.brew-cinema__steam i:nth-child(2) { left: 37%; height: 220px; animation-delay: -.35s; }
.brew-cinema__steam i:nth-child(3) { left: 58%; height: 195px; animation-delay: -.7s; }
.brew-cinema__steam i:nth-child(4) { left: 75%; height: 165px; animation-delay: -.15s; }

.brew-cinema__bottle {
  position: absolute;
  left: 50%;
  top: 42%;
  width: 178px;
  height: 230px;
  opacity: 0;
  transform: translate(-50%, 118px) scale(.58);
}
.brew-cinema__bottle img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 20px 15px rgba(28,15,10,.42)) drop-shadow(0 0 32px rgba(72,230,236,.7)); }
.brew-cinema__liquid-column {
  position: absolute;
  left: 50%;
  top: 78%;
  width: 15px;
  height: 250px;
  border-radius: 50%;
  background: linear-gradient(#fcf3ad, #75f2f1 28%, #39c6df 72%, transparent);
  box-shadow: 0 0 18px #67eff1, 0 0 52px rgba(78,230,236,.65);
  transform: translate(-50%, 0) scaleY(0);
  transform-origin: 50% 100%;
}
.brew-cinema__cork-flash { position: absolute; left: 50%; top: 12%; width: 18px; height: 18px; border-radius: 50%; background: #fff5b4; box-shadow: 0 0 0 0 rgba(255,241,158,.9); opacity: 0; transform: translate(-50%,-50%); }

.cinematic--brew-result .brew-cinema__ingredients { display: none; }
.cinematic--brew-result .brew-cinema__vortex { opacity: .88; animation: brew-vortex-spin 1.2s linear infinite; }
.cinematic--brew-result .brew-cinema__bottle { animation: brew-bottle-rise 1.36s cubic-bezier(.14,.8,.18,1.12) forwards; }
.cinematic--brew-result .brew-cinema__liquid-column { animation: brew-liquid-lift 900ms 170ms cubic-bezier(.2,.7,.18,1) forwards; }
.cinematic--brew-result .brew-cinema__cork-flash { animation: brew-cork-seal 620ms 1.04s ease-out forwards; }

.brew-cinema__steps {
  position: absolute;
  left: clamp(100px, 11vw, 180px);
  top: 31%;
  margin: 0;
  padding: 0;
  color: #e4d2ae;
  list-style: none;
}
.brew-cinema__steps::before { content: ""; position: absolute; left: 15px; top: 10px; bottom: 10px; width: 1px; background: linear-gradient(#6edfe5, #dfad59); }
.brew-cinema__steps li { position: relative; display: flex; align-items: center; gap: 12px; margin: 0 0 25px; opacity: .34; font-size: 12px; letter-spacing: .12em; animation: brew-step-light 420ms calc(380ms + var(--step, 0) * 620ms) ease forwards; }
.brew-cinema__steps li:nth-child(1) { --step: 0; }
.brew-cinema__steps li:nth-child(2) { --step: 1; }
.brew-cinema__steps li:nth-child(3) { --step: 2; }
.brew-cinema__steps span { position: relative; z-index: 1; width: 31px; height: 31px; display: grid; place-items: center; color: #ffe9aa; border: 1px solid #6edfe5; border-radius: 50%; background: #3e2a20; font: 700 9px Georgia,serif; box-shadow: 0 0 14px rgba(77,221,228,.3); }

.brew-cinema__label {
  position: absolute;
  left: 50%;
  bottom: clamp(24px, 4.5vh, 48px);
  min-width: 400px;
  color: #fff1ca;
  text-align: center;
  text-shadow: 0 2px 13px rgba(20, 11, 8, .88);
  transform: translateX(-50%);
  animation: cinema-label-in 520ms 280ms ease both;
}

/* 3) SALE: bright, horizontal and human; no ritual ring, no dark full-screen card. */
.sale-cinema__sunbeam {
  position: absolute;
  right: -8%;
  top: -18%;
  width: 62%;
  height: 116%;
  background: linear-gradient(112deg, transparent 24%, rgba(255, 233, 171, .07) 25% 34%, transparent 35% 43%, rgba(255, 229, 156, .11) 44% 55%, transparent 56%);
  mix-blend-mode: screen;
  transform: translateX(16%) skewX(-6deg);
  animation: sale-sunbeam-open 1.3s ease forwards;
}

.sale-cinema__handoff {
  position: absolute;
  left: 48%;
  top: 45%;
  width: 112px;
  height: 112px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(.55);
  animation: sale-handoff-aura 1.72s cubic-bezier(.22,.72,.2,1) forwards;
}
.sale-cinema__handoff::before,
.sale-cinema__handoff::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 2px solid rgba(116, 239, 239, .86);
  border-radius: 50%;
  box-shadow: inset 0 0 26px rgba(80, 231, 233, .3), 0 0 22px rgba(75, 229, 232, .72);
  animation: sale-contact-ring 1.24s ease-out forwards;
}
.sale-cinema__handoff::after {
  inset: 27px;
  border-color: rgba(255, 233, 159, .92);
  box-shadow: 0 0 18px #fff0a0, 0 0 48px rgba(91, 233, 234, .78);
  animation-delay: 120ms;
}
.sale-cinema__handoff i {
  position: absolute;
  left: 50%;
  top: 52%;
  width: 102px;
  height: 2px;
  border-radius: 50%;
  background: linear-gradient(90deg, #fff4a8, #76e8eb 62%, transparent);
  box-shadow: 0 0 12px #82ecee, 0 0 26px rgba(118, 232, 235, .62);
  transform: rotate(15deg) scaleX(0);
  transform-origin: 0 50%;
  animation: sale-contact-line 720ms 530ms ease-out forwards;
}
.sale-cinema__handoff b {
  position: absolute;
  left: calc(50% + 96px);
  top: calc(52% + 26px);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fff6b2;
  box-shadow: 0 0 0 0 rgba(255, 242, 164, .82), 0 0 24px #fff0a0;
  opacity: 0;
  animation: sale-contact-arrive 760ms 960ms ease-out forwards;
}

.sale-cinema__reaction {
  position: absolute;
  left: 63%;
  top: 18%;
  width: min(310px, 26vw);
  padding: 18px 24px 16px 35px;
  color: #523a2d;
  border: 1px solid rgba(151, 101, 53, .35);
  border-radius: 18px 5px 18px 5px;
  background: linear-gradient(145deg, rgba(255,247,218,.95), rgba(232,204,153,.92));
  box-shadow: 0 15px 32px rgba(45,24,12,.28), inset 0 0 0 3px rgba(116,72,37,.08);
  opacity: 0;
  transform: translate(24px, 12px) rotate(1deg);
  animation: sale-reaction-in 650ms 900ms cubic-bezier(.18,.78,.16,1.12) forwards;
}
.sale-cinema__reaction::after { content: ""; position: absolute; left: 38%; bottom: -18px; border: 10px solid transparent; border-top-color: rgba(232,204,153,.94); transform: rotate(-8deg); }
.sale-cinema__reaction > span { position: absolute; left: 13px; top: 2px; color: rgba(95,61,42,.35); font: 54px Georgia,serif; }
.sale-cinema__reaction strong { display: block; font-family: "STKaiti","KaiTi",serif; font-size: clamp(16px, 1.5vw, 22px); line-height: 1.55; }
.sale-cinema__reaction small { display: block; margin-top: 6px; color: #805f46; text-align: right; }

.sale-cinema__receipt {
  position: absolute;
  left: clamp(105px, 12vw, 190px);
  top: 24%;
  width: 280px;
  padding: 21px 24px 20px;
  color: #51392a;
  border: 1px solid rgba(134,83,42,.36);
  border-radius: 3px 14px 3px 14px;
  background:
    repeating-linear-gradient(0deg, rgba(106,70,40,.035) 0 1px, transparent 1px 7px),
    linear-gradient(135deg, #fff4cf, #e5c28a);
  box-shadow: 0 17px 34px rgba(42,22,11,.3);
  opacity: 0;
  transform: translateY(-22px) rotate(-2deg) scale(.9);
}
.sale-cinema__receipt span { color: #855a3e; font: 700 9px Georgia,serif; letter-spacing: .18em; }
.sale-cinema__receipt strong { display: block; margin: 9px 0 14px; color: #74475b; font: 800 28px Georgia,serif; letter-spacing: .08em; }
.sale-cinema__receipt p { margin: 0; padding: 9px 0; border-top: 1px dashed rgba(109,68,37,.32); border-bottom: 1px dashed rgba(109,68,37,.32); }
.sale-cinema__receipt b { display: block; margin-top: 12px; color: #8b5929; font-size: 22px; }
.sale-cinema__receipt i { position: absolute; right: 20px; bottom: 16px; width: 64px; height: 64px; display: grid; place-items: center; color: rgba(142,62,53,.8); border: 3px double rgba(142,62,53,.64); border-radius: 50%; font: 700 17px "STKaiti","KaiTi",serif; transform: rotate(-13deg); }

.sale-cinema__coins { position: absolute; left: 58%; top: 45%; width: 40px; height: 40px; }
.sale-cinema__coins img { position: absolute; width: 38px; height: 38px; object-fit: contain; opacity: 0; filter: drop-shadow(0 0 8px rgba(255,210,91,.72)); }

.cinematic--shop-result .sale-cinema__handoff { display: none; }
.cinematic--shop-result .sale-cinema__reaction { animation-delay: 160ms; }
.cinematic--shop-result .sale-cinema__receipt { animation: sale-receipt-drop 720ms 260ms cubic-bezier(.15,.78,.16,1.12) forwards; }
.cinematic--shop-result .sale-cinema__coins img { animation: sale-coin-return 920ms calc(100ms + var(--i) * 72ms) cubic-bezier(.2,.72,.22,1) forwards; }

@keyframes merge-vignette-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes merge-source-ring { to { transform: rotate(360deg); } }
@keyframes merge-source-left {
  0% { opacity: 0; transform: translate(-250%, -82%) scale(.72) rotate(-10deg); }
  18% { opacity: 1; }
  54% { transform: translate(-145%, -58%) scale(1) rotate(-3deg); }
  82% { opacity: 1; transform: translate(-74%, -50%) scale(.92); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(.2); filter: brightness(3) blur(2px); }
}
@keyframes merge-source-right {
  0% { opacity: 0; transform: translate(150%, -18%) scale(.72) rotate(10deg); }
  18% { opacity: 1; }
  54% { transform: translate(45%, -42%) scale(1) rotate(3deg); }
  82% { opacity: 1; transform: translate(-26%, -50%) scale(.92); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(.2); filter: brightness(3) blur(2px); }
}
@keyframes merge-bridge-grow { to { transform: scaleX(1); } }
@keyframes merge-leaf-flow {
  0% { opacity: 0; translate: -14px 13px; scale: .25; }
  40% { opacity: 1; }
  100% { opacity: 0; translate: 18px -12px; scale: 1.05; }
}
@keyframes merge-seed-form {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.16) rotate(-22deg); }
  62% { opacity: 1; transform: translate(-50%, -50%) scale(1.12) rotate(5deg); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0); }
}
@keyframes merge-crystal-release {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(.65) rotate(-12deg); filter: brightness(1.8); }
  64% { opacity: 1; transform: translate(-50%, -50%) scale(1.24) rotate(8deg); filter: brightness(2.6); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.72) rotate(18deg); filter: brightness(3.2) blur(3px); }
}
@keyframes merge-result-grow {
  0% { opacity: 0; transform: translate(-50%, -32%) scale(.28); }
  55% { opacity: 1; transform: translate(-50%, -54%) scale(1.13); }
  76% { transform: translate(-50%, -50%) scale(.96); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@keyframes cinema-label-in { from { opacity: 0; translate: 0 14px; } to { opacity: 1; translate: 0 0; } }

@keyframes brew-heat-bloom { to { transform: translate(-50%, -50%) scale(1); } }
@keyframes brew-heat-pulse { from { opacity: .68; scale: .96; } to { opacity: 1; scale: 1.08; } }
@keyframes brew-ingredient-fall {
  0% { opacity: 0; transform: translateY(-40px) rotate(calc(-22deg + var(--i) * 7deg)) scale(.62); }
  16% { opacity: 1; }
  72% { opacity: 1; transform: translateY(245px) rotate(calc(12deg + var(--i) * 19deg)) scale(1); }
  100% { opacity: 0; transform: translateY(360px) rotate(calc(40deg + var(--i) * 24deg)) scale(.22); filter: brightness(2.2) blur(2px); }
}
@keyframes brew-vortex-in { to { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(60deg); } }
@keyframes brew-vortex-spin { to { transform: translate(-50%, -50%) scale(1) rotate(420deg); } }
@keyframes brew-steam-rise {
  0% { opacity: 0; transform: translateY(28px) scale(.72) rotate(-8deg); }
  36% { opacity: .7; }
  100% { opacity: 0; transform: translateY(-74px) scale(1.2) rotate(10deg); }
}
@keyframes brew-bottle-rise {
  0% { opacity: 0; transform: translate(-50%, 118px) scale(.58); }
  54% { opacity: 1; transform: translate(-50%, -14px) scale(1.08); }
  74% { transform: translate(-50%, 0) scale(.97); }
  100% { opacity: 1; transform: translate(-50%, 0) scale(1); }
}
@keyframes brew-liquid-lift {
  0% { opacity: 0; transform: translate(-50%, 0) scaleY(0); }
  30% { opacity: 1; transform: translate(-50%, 0) scaleY(1); }
  75% { opacity: 1; transform: translate(-50%, -120px) scaleY(.78); }
  100% { opacity: 0; transform: translate(-50%, -190px) scaleY(.18); }
}
@keyframes brew-cork-seal {
  0% { opacity: 0; box-shadow: 0 0 0 0 rgba(255,241,158,.9); }
  32% { opacity: 1; box-shadow: 0 0 0 8px rgba(255,241,158,.74), 0 0 28px #fff0a0; }
  100% { opacity: 0; box-shadow: 0 0 0 70px rgba(255,241,158,0), 0 0 54px rgba(255,240,160,0); }
}
@keyframes brew-step-light { to { opacity: 1; color: #fff1c9; text-shadow: 0 0 9px rgba(95,230,234,.6); } }

@keyframes sale-sunbeam-open { to { transform: translateX(0) skewX(-6deg); } }
@keyframes sale-handoff-aura {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.55); }
  18% { opacity: 1; }
  58% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.22); }
}
@keyframes sale-contact-ring {
  0% { opacity: 0; transform: scale(.34) rotate(-24deg); }
  38% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.36) rotate(20deg); }
}
@keyframes sale-contact-line { 0% { opacity: 0; transform: rotate(15deg) scaleX(0); } 28% { opacity: 1; } 100% { opacity: 0; transform: rotate(15deg) scaleX(1); } }
@keyframes sale-contact-arrive { 0% { opacity: 0; box-shadow: 0 0 0 0 rgba(255,242,164,.82), 0 0 22px #fff0a0; } 38% { opacity: 1; } 100% { opacity: 0; box-shadow: 0 0 0 52px rgba(255,242,164,0), 0 0 48px rgba(255,240,160,0); } }
@keyframes sale-reaction-in { to { opacity: 1; transform: translate(0,0) rotate(-.4deg); } }
@keyframes sale-receipt-drop {
  0% { opacity: 0; transform: translateY(-22px) rotate(-2deg) scale(.9); }
  62% { opacity: 1; transform: translateY(6px) rotate(.6deg) scale(1.03); }
  100% { opacity: 1; transform: translateY(0) rotate(-.5deg) scale(1); }
}
@keyframes sale-coin-return {
  0% { opacity: 0; transform: translate(110px, -50px) rotate(0) scale(.5); }
  22% { opacity: 1; }
  70% { opacity: 1; transform: translate(-170px, 40px) rotate(420deg) scale(1); }
  100% { opacity: 0; transform: translate(-255px, 98px) rotate(680deg) scale(.72); }
}

@media (max-width: 1180px), (max-height: 760px) {
  .merge-cinema__focus { width: 360px; height: 280px; }
  .merge-cinema__source { width: 124px; height: 124px; }
  .merge-cinema__source img { width: 96px; height: 96px; }
  .merge-cinema__result { width: 162px; height: 162px; }
  .merge-cinema__seed { width: 106px; height: 106px; }
  .merge-cinema__seed i { width: 23px; height: 52px; }
  .brew-cinema__ingredients { width: 350px; }
  .brew-cinema__vortex { top: 58%; width: 280px; height: 76px; }
  .brew-cinema__bottle { top: 39%; width: 150px; height: 205px; }
  .brew-cinema__steps { left: 88px; top: 29%; }
  .brew-cinema__steps li { margin-bottom: 16px; }
  .sale-cinema__reaction { left: 61%; top: 16%; }
  .sale-cinema__receipt { left: 105px; top: 22%; width: 250px; }
}

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