.intention-ritual {
  margin: clamp(42px, 8vw, 86px) auto 0;
  max-width: 1060px;
  padding: clamp(18px, 4vw, 42px);
  border: 1px solid #a477a2;
  border-radius: 18px;
  background: radial-gradient(ellipse at top, #42264f, #1c122c 62%);
  box-shadow: 0 0 34px #8c4d9d20;
  scroll-margin-top: 20px;
}
.intention-heading { text-align: center; }
.intention-heading h2 { margin: 5px 0; }
.intention-heading p { max-width: 58ch; margin: 8px auto 24px; }
.intention-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  grid-template-areas: "fields scene" "actions scene";
  gap: 14px 24px;
}
.intention-fields { grid-area: fields; }
.intention-fields, .intention-sprinkles { min-width: 0; border: 0; padding: 0; margin: 0; }
.intention-note-row label, .intention-sprinkles legend { color: #ffd7c2; font-weight: bold; }
.intention-fields textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid #b18aab;
  border-radius: 6px;
  background: #160e24;
  color: #fff1e9;
  font: inherit;
  resize: vertical;
}
.intention-fields textarea::placeholder { color: #cdb8d4; }
.intention-private { font-size: 13px; margin: 5px 0 13px; color: #dfc9e4; }
.intention-sprinkles label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  margin-top: 5px;
  padding: 4px 9px;
  border: 1px solid #805e88;
  border-radius: 5px;
  background: #2b193d;
  cursor: pointer;
}
.intention-sprinkles label:has(:checked) { border-color: #e6b3d9; background: #492b59; }
.intention-sprinkles input { accent-color: #e2a9dd; }
.intention-sprinkles small { margin-left: 4px; color: #e5cbe8; }
.intention-ritual :is(input, textarea):focus-visible { outline: 2px solid #f4c6ef; outline-offset: 3px; }
.intention-actions { grid-area: actions; }
.intention-actions button[aria-disabled="true"], .intention-actions button:disabled { opacity: .65; cursor: wait; }
.intention-status { min-height: 3em; margin: 8px 0 0; color: #f5d9e9; }
.intention-sr-only { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }

.intention-scene {
  grid-area: scene;
  position: relative;
  isolation: isolate;
  container-type: inline-size;
  min-height: 372px;
  overflow: hidden;
  border: 1px solid #a477a2;
  border-radius: 13px;
  background: radial-gradient(ellipse at 50% 84%, #783a665c, transparent 53%),
              radial-gradient(ellipse at 74% 17%, #373670, #14122e 58%, #10091d);
  --herb: #d8a2ff;
}
.intention-scene[data-sprinkle="rosemary"] { --herb: #b9e6a4; }
.intention-scene[data-sprinkle="cinnamon"] { --herb: #ffb777; }
.intention-sky { position: absolute; inset: 0; color: #ffe0aa; }
.intention-sky span { position: absolute; text-shadow: 0 0 15px #e4bbff; }
.intention-sky span:nth-child(1) { top: 16%; left: 14%; }
.intention-sky span:nth-child(2) { top: 36%; left: 23%; font-size: 12px; }
.intention-sky span:nth-child(3) { top: 6%; right: 13%; font: 48px Georgia, serif; }
.intention-sky span:nth-child(4) { top: 33%; right: 12%; }
.intention-sky span:nth-child(5) { top: 15%; left: 55%; font-size: 11px; }
.intention-pot {
  position: absolute;
  z-index: 2;
  width: min(65%, 240px);
  height: auto;
  left: 50%;
  bottom: 5%;
  transform: translateX(-50%);
  filter: drop-shadow(0 0 18px #d6759e40);
}
.intention-paper-stack {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 24%;
  transform: translateX(-50%) rotate(-8deg);
}
.intention-paper {
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 4px;
  width: 86px;
  height: 71px;
  border: 1px solid #d59b76;
  border-radius: 4px 6px 11px 4px;
  background: linear-gradient(130deg, #ffe9c7, #d7a281);
  color: #613051;
  box-shadow: 0 0 21px #e2b59d54;
}
.intention-paper span { line-height: 1; }
.intention-paper i { width: 49px; height: 1px; background: #915f79a6; }
.intention-paper i:last-child { width: 32px; }
[data-stage="sprinkled"] .intention-paper { box-shadow: 0 0 16px var(--herb); }
[data-notes="multiple"] .intention-paper-stack::before,
[data-notes="multiple"] .intention-paper-stack::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  border: 1px solid #d8ab8c;
  border-radius: 5px;
  background: #d9a687;
  transform: translate(9px, 4px) rotate(14deg);
}
[data-notes="multiple"] .intention-paper-stack::after {
  transform: translate(-8px, 2px) rotate(-12deg);
}
[data-stage="burning"] .intention-paper-stack { animation: intention-drop 2.45s ease-in forwards; }
[data-stage="ashes"] .intention-paper-stack,
[data-stage="releasing"] .intention-paper-stack,
[data-stage="released"] .intention-paper-stack { visibility: hidden; }

.intention-flame {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: calc(5% + min(29cqw, 108px));
  width: 85px;
  height: 65px;
  opacity: 0;
  transform: translateX(-50%);
}
.intention-flame i {
  position: absolute;
  bottom: 0;
  left: 29px;
  width: 28px;
  height: 72px;
  border-radius: 70% 22% 65% 60%;
  background: linear-gradient(35deg, #fff7b4, #ffb84d 51%, #e6438d 86%);
  box-shadow: 0 0 20px #ff7a64;
  transform-origin: center bottom;
}
.intention-flame i:first-child { left: 10px; height: 48px; rotate: -22deg; }
.intention-flame i:last-child { left: 48px; height: 54px; rotate: 24deg; }
[data-stage="burning"] .intention-flame { animation: intention-fire 2.45s ease both; }
[data-stage="burning"] .intention-flame i { animation: intention-flicker .32s ease-in-out infinite alternate; }
.intention-embers {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: calc(5% + min(29.5cqw, 109px));
  width: 62px;
  height: 12px;
  border-radius: 50%;
  opacity: 0;
  transform: translateX(-50%);
  background: radial-gradient(circle at 27% 62%, #f3aa96 0 1px, transparent 2px),
              radial-gradient(circle at 69% 59%, #ffd499 0 1px, transparent 2px),
              radial-gradient(circle at 55% 36%, #ec8f8c 0 1px, transparent 2px),
              radial-gradient(ellipse, #a48b9a, #4c394d 57%, transparent 70%);
}
[data-stage="ashes"] .intention-embers { opacity: 1; }
[data-stage="releasing"] .intention-embers { animation: intention-embers-away .65s ease both; }
@keyframes intention-embers-away { from { opacity: 1; } to { opacity: 0; } }
[data-stage="burning"] .intention-pot { animation: intention-pot-glow 2.45s ease both; }
@keyframes intention-pot-glow {
  46%, 79% { filter: drop-shadow(0 -7px 22px #ff886eaa); }
}
[data-stage="ashes"] .intention-pot { filter: drop-shadow(0 -8px 18px #e67e7899); }

.intention-particles { position: absolute; z-index: 5; inset: 0; pointer-events: none; }
.intention-particles i {
  position: absolute;
  width: var(--size);
  height: var(--size);
  border-radius: 45%;
  opacity: 0;
}
[data-stage="sprinkling"] [data-kind="sprinkle"] i {
  left: calc(50% + var(--x) * .32);
  top: 5%;
  width: var(--ingredient-size, 12px);
  height: var(--ingredient-size, 12px);
  border-radius: 0;
  background: var(--ingredient) center / contain no-repeat;
  filter: drop-shadow(0 1px 1px #13091b70);
  rotate: var(--turn);
  animation: intention-sprinkle .95s var(--wait) ease-in both;
}
[data-stage="released"] .intention-sky span {
  color: #ffeac8;
  text-shadow: 0 0 14px #f9acff, 0 0 26px #bf80ff;
}
@keyframes intention-sprinkle {
  0% { opacity: 0; }
  20% { opacity: 1; }
  55% { opacity: 1; transform: translate(var(--sway, 7px), 53px) rotate(65deg); }
  84% { opacity: .95; }
  100% { opacity: 0; transform: translate(4px, 103px) rotate(140deg); }
}
@keyframes intention-drop {
  0% { opacity: 1; }
  32% { top: calc(95% - min(29.5cqw, 109px) - 35px); opacity: 1; transform: translateX(-50%) scale(.78) rotate(10deg); }
  60% { top: calc(95% - min(29.5cqw, 109px) - 23px); opacity: .9; filter: sepia(.7) saturate(2) brightness(.55); transform: translateX(-50%) scale(.56) rotate(15deg); }
  82%, 100% { top: calc(95% - min(29.5cqw, 109px) - 12px); opacity: 0; filter: brightness(.2); transform: translateX(-50%) scale(.14) rotate(22deg); }
}
@keyframes intention-fire { 0%, 24%, 100% { opacity: 0; } 46%, 76% { opacity: 1; } }
@keyframes intention-flicker { from { scale: .85 .7; } to { scale: 1 1.09; } }
@media (max-width: 700px) {
  .intention-workspace { grid-template-columns: 1fr; grid-template-areas: "fields" "scene" "actions"; }
  .intention-scene { min-height: 310px; }
}
@media (prefers-reduced-motion: reduce) {
  .intention-scene *, .intention-scene { animation: none !important; }
}

.intention-calendar {
  margin-bottom: 25px;
  padding: 14px 16px;
  border: 1px solid #88668f;
  border-radius: 10px;
  background: #190f2b80;
}
.intention-calendar h3 { margin: 0; color: #ffdac5; }
#intention-next-date { color: #f5c6e5; font-weight: bold; margin: 3px 0 9px; }
.intention-calendar ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.intention-calendar li {
  display: grid;
  align-content: start;
  padding: 8px 10px;
  border: 1px solid #765585;
  border-radius: 6px;
}
.intention-calendar li[data-next] {
  border-color: #e0a896;
  background: #61395767;
}
.intention-calendar time, .intention-calendar small { font-size: 12px; color: #edcfe4; }
.intention-calendar-source { margin: 8px 0 0; font-size: 12px; color: #e4c9de; }
.intention-calendar-source a { text-underline-offset: 2px; }
.intention-notes { max-height: 250px; overflow: auto; padding: 3px 5px 4px 3px; }
.intention-note-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0 5px;
  align-items: center;
}
.intention-note-row + .intention-note-row { margin-top: 10px; }
.intention-note-row textarea { grid-column: 1 / -1; }
.intention-remove {
  border: 0;
  padding: 3px;
  background: transparent;
  color: #f7d2ea;
  font: inherit;
  font-size: 12px;
  text-decoration: underline;
  cursor: pointer;
}
.intention-add { margin: 5px 0; padding: 5px 10px; }
.intention-add:disabled { opacity: .6; }
.intention-sprinkle-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
.intention-sprinkles label { margin: 0; padding: 4px 7px; line-height: 1.25; }
.intention-sprinkles small { display: block; margin: 0; }
.intention-sprinkles legend { margin-bottom: 5px; }
.intention-scene[data-sprinkle="salt"] { --herb: #f1a0a9; }
.intention-scene[data-sprinkle="sugar"] { --herb: #ffe4ad; }
.intention-scene[data-sprinkle="black-salt"] { --herb: #a497b6; }
.intention-scene[data-sprinkle="basil"] { --herb: #96e798; }
.intention-scene[data-sprinkle="mint"] { --herb: #9effe1; }
.intention-scene[data-sprinkle="rose"] { --herb: #ff98b4; }
.intention-scene[data-sprinkle="bay"] { --herb: #d2d884; }
[data-stage="burning"] [data-kind="ember"] i {
  left: 50%;
  bottom: calc(5% + min(29.5cqw, 109px));
  background: #ffd898;
  box-shadow: 0 0 8px #ff6f66;
  animation: intention-ember 1.25s calc(.64s + var(--wait)) ease-out both;
}
@keyframes intention-ember {
  0%, 100% { opacity: 0; }
  16% { opacity: 1; }
  100% { transform: translate(calc(var(--spread) * .48), calc(var(--rise) * .48)) scale(.25); }
}
@media (max-width: 560px) {
  .intention-calendar ul { grid-template-columns: 1fr; }
}

.intention-burning-canvas {
  position: absolute;
  z-index: 4;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.intention-pot-front {
  z-index: 5;
  clip-path: polygon(0 32%, 100% 32%, 100% 100%, 0 100%);
  pointer-events: none;
}
[data-stage="burning"] .intention-paper-stack {
  animation: intention-settle .72s ease-in forwards;
}
[data-stage="burning"] .intention-flame,
[data-stage="burning"] [data-kind="ember"] {
  display: none;
}
[data-stage="burning"] .intention-pot {
  animation: intention-warm-bowl 4.8s ease both;
}
@keyframes intention-settle {
  0% { opacity: 1; }
  85% {
    top: calc(95% - min(29.5cqw, 109px) - 38px);
    opacity: 1;
    transform: translateX(-50%) scale(.87) rotate(7deg);
  }
  100% {
    top: calc(95% - min(29.5cqw, 109px) - 36px);
    opacity: 0;
    transform: translateX(-50%) scale(.86) rotate(5deg);
  }
}
@keyframes intention-warm-bowl {
  25%, 75% { filter: drop-shadow(0 -3px 17px #ff8b5470); }
}

.intention-ingredient-preview {
  display: block;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px #120a1e80);
}
.intention-sprinkles input { flex-shrink: 0; }
.intention-sprinkles label > span { min-width: 0; }
.intention-scene[data-sprinkle="lavender"] { --ingredient: url("/assets/sprinkles/lavender.svg"); --ingredient-size: 14px; }
.intention-scene[data-sprinkle="rosemary"] { --ingredient: url("/assets/sprinkles/rosemary.svg"); --ingredient-size: 15px; }
.intention-scene[data-sprinkle="cinnamon"] { --ingredient: url("/assets/sprinkles/cinnamon.svg"); --ingredient-size: 11px; }
.intention-scene[data-sprinkle="salt"] { --ingredient: url("/assets/sprinkles/salt.svg?v=2"); --ingredient-size: 14px; }
.intention-scene[data-sprinkle="sugar"] { --ingredient: url("/assets/sprinkles/sugar.svg?v=2"); --ingredient-size: 13px; }
.intention-scene[data-sprinkle="black-salt"] { --ingredient: url("/assets/sprinkles/black-salt.svg"); --ingredient-size: 8px; }
.intention-scene[data-sprinkle="basil"] { --ingredient: url("/assets/sprinkles/basil.svg"); --ingredient-size: 12px; }
.intention-scene[data-sprinkle="mint"] { --ingredient: url("/assets/sprinkles/mint.svg"); --ingredient-size: 12px; }
.intention-scene[data-sprinkle="rose"] { --ingredient: url("/assets/sprinkles/rose.svg"); --ingredient-size: 14px; }
.intention-scene[data-sprinkle="bay"] { --ingredient: url("/assets/sprinkles/bay.svg"); --ingredient-size: 14px; }
.intention-dressing {
  display: none;
  position: absolute;
  inset: 0;
  pointer-events: none;
}
[data-stage="sprinkled"] .intention-dressing { display: block; }
.intention-dressing i {
  position: absolute;
  width: calc(var(--ingredient-size, 12px) * .7);
  height: calc(var(--ingredient-size, 12px) * .7);
  background: var(--ingredient) center / contain no-repeat;
  filter: drop-shadow(0 1px .5px #251b2930);
}

.intention-scene::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at 50% 15%, #f3c2f04a, transparent 37%),
    radial-gradient(circle at 29% 21%, #fff0c6 0 1px, transparent 2px),
    radial-gradient(circle at 73% 32%, #f6dafc 0 1px, transparent 2px),
    radial-gradient(circle at 40% 10%, #f8d1a6 0 1px, transparent 2px);
  transition: opacity 1.5s ease;
}
[data-stage="releasing"].intention-scene::after,
[data-stage="released"].intention-scene::after { opacity: 1; }
[data-stage="write"] .intention-paper-stack,
[data-stage="sprinkled"] .intention-paper-stack {
  animation: intention-hover 4s ease-in-out infinite;
}
[data-stage="ashes"] .intention-embers {
  animation: intention-ember-breath 2.5s ease-in-out infinite alternate;
}
[data-stage="releasing"] .intention-embers {
  animation: intention-embers-away 1.6s ease both;
}
@keyframes intention-hover {
  0%, 100% { transform: translate(-50%, 0) rotate(-8deg); }
  50% { transform: translate(-50%, -5px) rotate(-5deg); }
}
@keyframes intention-ember-breath {
  from { filter: brightness(.8); }
  to { filter: brightness(1.35); }
}
@media (prefers-reduced-motion: reduce) {
  .intention-scene::after { transition: none; }
}
