/* Corner ritual: never turn the transparent area into a page-sized hit target. */
.incense-ritual, .incense-ambient-smoke, .incense-shrine,
.incense-shrine-panel, .incense-stage, .incense-planted-sticks, .incense-censer-back { pointer-events: none; }
.incense-ambient-smoke { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 32; }
.incense-shrine { position: fixed; left: max(16px, env(safe-area-inset-left)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 45; width: 224px; color: #d3bf96; font-family: var(--font-tc-sans); }
.incense-shrine button { pointer-events: auto; -webkit-tap-highlight-color: transparent; }
.incense-shrine button:focus-visible { outline: 1px solid #e2c18a; outline-offset: 4px; border-radius: 4px; }
.incense-shrine-panel { position: relative; padding: 8px 4px; }
.incense-shrine-panel::before { content: ''; position: absolute; inset: 30px -14px -12px; z-index: -1; background: radial-gradient(ellipse at 40% 76%, rgba(16,12,8,.94), rgba(16,12,8,.6) 45%, transparent 73%); }
.incense-shrine-heading { display: flex; align-items: center; justify-content: space-between; padding-left: 15px; font-family: var(--font-tc-serif); font-size: 13px; letter-spacing: .28em; text-shadow: 0 1px 6px #17110b; }
.incense-collapse { width: 32px; height: 32px; font: 20px/1 sans-serif; color: #ad9b7d; background: none; border: 0; cursor: pointer; }
.incense-collapse:hover { color: #f2d49b; }
.incense-stage { height: 170px; position: relative; }
.incense-censer-back { position: absolute; width: 148px; height: 98px; bottom: 0; left: 0; z-index: 1; object-fit: contain; user-select: none; }
.incense-planted-sticks { position: absolute; inset: 0; z-index: 2; }
.incense-censer { position: absolute; width: 148px; height: 98px; bottom: 0; left: 0; z-index: 3; border: 0; padding: 0; background: none; cursor: pointer; transition: filter .25s ease; }
.incense-censer img { width: 100%; height: 100%; object-fit: contain; user-select: none; pointer-events: none; }
.incense-censer.is-target { filter: drop-shadow(0 0 5px rgba(223,181,99,.32)); }
.is-over .incense-censer { filter: drop-shadow(0 0 10px rgba(236,184,82,.65)); }
.incense-stock { position: absolute; display: flex; left: 145px; top: 12px; height: 136px; }
.incense-pick { position: relative; width: 24px; height: 136px; padding: 0; border: 0; background: none; cursor: grab; touch-action: none; user-select: none; transition: opacity .25s, transform .25s; }
.incense-pick.is-picked { transform: translateY(-8px); }
.incense-pick.is-dragging { z-index: 10; transition: none; cursor: grabbing; }
.incense-pick.is-used { opacity: .10; pointer-events: none; }
.incense-stock-stick { position: absolute; left: 10px; bottom: 25px; width: 3px; height: 102px; border-radius: 1px; background: linear-gradient(90deg, rgba(255,238,196,.2), transparent), linear-gradient(#a0895c 0 74%, #80392a 74% 100%); box-shadow: 1px 0 2px rgba(8,6,4,.7); }
.incense-pick.is-picked .incense-stock-stick { box-shadow: 0 0 8px rgba(222,176,91,.42); }
.incense-stock-number { position: absolute; bottom: 0; left: 0; width: 100%; color: #b89b65; font: 10px var(--font-tc-serif); }
.incense-planted { position: absolute; width: 4px; height: 108px; bottom: 54px; left: calc(72px + var(--placement) * 7px); transform-origin: bottom; transform: rotate(calc(var(--placement) * 4deg)); }
.incense-stem { position: absolute; bottom: 0; width: 3px; height: 22px; background: linear-gradient(90deg,#a95838,#67281d); }
.incense-coating { position: absolute; bottom: 21px; width: 3px; height: var(--remaining); background: linear-gradient(90deg,#be9e62,#79603c); }
.incense-ash { position: absolute; bottom: calc(21px + var(--remaining)); width: 3px; height: var(--ash); background: repeating-linear-gradient(173deg,#c2bbaa 0 1px,#706b61 1px 2px,#aaa18f 2px 3px); border-radius: 1px 2px 0 0; transform: rotate(-4deg); transform-origin: bottom; }
.incense-ember { position: absolute; left: -.5px; bottom: calc(20px + var(--remaining)); width: 4px; height: 3px; border-radius: 50%; background: #ffcc76; box-shadow: 0 0 4px #ff853c, 0 0 10px rgba(218,75,23,.8), 0 0 18px rgba(226,89,22,.25); display: none; }
.incense-planted.is-burning .incense-ember { display: block; animation: incense-breathe 3.8s ease-in-out infinite alternate; animation-delay: calc(var(--stick-index) * -1.3s); }
.incense-flare { position: absolute; display: none; width: 10px; height: 25px; bottom: 0; left: -3px; border-radius: 68% 32% 47% 53% / 70% 66% 34% 30%; background: radial-gradient(ellipse at 50% 78%,#fff0b2 0 13%,#ffce69 28%,#e17824 60%,transparent 75%); transform-origin: center bottom; }
.is-lighting .incense-flare { display: block; animation: incense-ignite 1.5s ease-out both; }
.incense-ash-fall { position: absolute; bottom: calc(23px + var(--remaining)); width: 4px; height: 1px; }
.incense-ash-fall i { position: absolute; width: 2px; height: 3px; background: #b6ad98; opacity: 0; animation: incense-ash-fall 32s linear infinite; animation-delay: calc(var(--stick-index) * -7s); }
.incense-ash-fall i + i { width: 1px; height: 2px; animation-delay: calc(var(--stick-index) * -7s - 17s); }
.incense-help { margin: 5px 0 6px; text-align: center; font: 11px/1.6 var(--font-tc-serif); letter-spacing: .1em; color: #d0b98b; text-shadow: 0 1px 5px #160f08; }
.incense-shrine-meta { display: flex; align-items: center; justify-content: center; gap: 12px; font-size: 10px; color: #baa786; font-variant-numeric: tabular-nums; }
.incense-smoke-toggle { background: #1b150e; border: 1px solid #675335; border-radius: 3px; padding: 5px 7px; color: #cdb686; font: inherit; cursor: pointer; }
.incense-smoke-toggle[aria-pressed=false] { color: #9e9585; border-color: #514838; }
.incense-reset { display: block; min-height: 28px; margin: 5px auto 0; padding: 4px 10px; border: 0; background: none; color: #b8a17a; font: 11px var(--font-tc-serif); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.incense-reset:hover { color: #e2c18a; }
.incense-reset:disabled { color: #8e806b; opacity: .5; cursor: default; text-decoration: none; }
.incense-disclaimer { margin: 7px 0 0; color: #a39782; text-align: center; font-size: 9px; letter-spacing: .08em; }
.incense-reopen { display: flex; align-items: center; gap: 9px; background: rgba(25,19,12,.96); border: 1px solid #786039; padding: 10px 13px; border-radius: 6px; color: #d4ba83; font: 12px var(--font-tc-serif); cursor: pointer; box-shadow: 0 3px 18px rgba(12,8,5,.35); }
.incense-reopen small { display: block; margin-top: 3px; color: #b3a185; font: 10px var(--font-tc-sans); font-variant-numeric: tabular-nums; }
.incense-fallback-sticks { position: absolute; top: 11px; left: 54px; width: 3px; height: 101px; background: #9c8053; box-shadow: 17px -5px #9c8053, 34px 0 #9c8053; }
.incense-fallback { opacity: .65; }
@keyframes incense-breathe { from { opacity: .66; } to { opacity: 1; } }
@keyframes incense-ignite { 0% { opacity: 0; transform: scale(.3,.6) rotate(-8deg); } 15% { opacity: .9; transform: scale(.9,1.1) rotate(5deg); } 55% { opacity: .65; transform: scale(.65,.85) rotate(-6deg); } 100% { opacity: 0; transform: scale(.15,.2); } }
@keyframes incense-ash-fall { 0%,93% { opacity: 0; transform: translate(0,0) rotate(0); } 94% { opacity: .6; } 100% { opacity: 0; transform: translate(17px,48px) rotate(160deg); } }
.incense-ritual.is-paused .incense-shrine * { animation-play-state: paused !important; }
@media (max-width: 639px) {
  .incense-shrine { left: max(8px, env(safe-area-inset-left)); bottom: max(8px, env(safe-area-inset-bottom)); width: 190px; }
  .incense-shrine-panel { width: 224px; transform: scale(.82); transform-origin: left bottom; }
  .incense-shrine-heading { font-size: 14px; }
  .incense-stock { left: 134px; }
  .incense-pick { width: 30px; }
  .incense-stock-stick { left: calc(50% - 1.5px); }
  .incense-help { font-size: 13px; }
  .incense-shrine-meta { font-size: 12px; }
  .incense-smoke-toggle { min-height: 32px; }
  .incense-reset { min-height: 36px; font-size: 13px; }
  .incense-disclaimer { font-size: 11px; }
  .line-mode .incense-shrine { bottom: calc(76px + env(safe-area-inset-bottom)); }
}

/* A continuous lamp wall behind frosted glass, not a spotlight. Two broad,
   overlapping light zones breathe independently; no individual bulbs or flames. */
.lamp-blessing-page { position: relative; isolation: isolate; }
.candle-glass { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.candle-glass *, .candle-glass::before, .candle-glass::after { pointer-events: none; }
.candle-glass-lightbank { position: absolute; inset: 12% -8% -16%; background: linear-gradient(180deg,rgba(123,57,24,0),rgba(176,90,37,.20) 20%,rgba(205,120,54,.27) 46%,rgba(170,81,31,.22) 72%,rgba(109,47,23,0)); mask-image: linear-gradient(180deg,transparent,rgba(23,15,9,1) 18%,rgba(23,15,9,1) 80%,transparent); opacity: .90; }
.candle-glass-zone { position: absolute; inset: -6%; pointer-events: none; opacity: .93; }
.candle-glass-zone-left { background: radial-gradient(ellipse 52% 65% at 22% 47%,rgba(242,179,92,.34),rgba(222,135,58,.20) 39%,rgba(174,83,32,.05) 67%,transparent 87%); transform-origin: 25% 50%; animation: candle-wall-sway 9.4s ease-in-out infinite alternate; }
.candle-glass-zone-right { background: radial-gradient(ellipse 57% 63% at 78% 53%,rgba(245,183,96,.36),rgba(220,134,57,.21) 43%,rgba(177,86,32,.06) 69%,transparent 90%); transform-origin: 75% 50%; animation: candle-wall-sway 11.7s ease-in-out -4s infinite alternate-reverse; }
.candle-glass-pane { position: absolute; inset: 0; background: linear-gradient(116deg,rgba(191,169,131,.025),transparent 34%,rgba(181,160,126,.018) 63%,transparent); box-shadow: inset 0 0 160px 30px rgba(12,8,5,.30); }
@keyframes candle-wall-sway { from { transform: translate(-.6%,.4%) scale(1,1.01); } to { transform: translate(.7%,-.4%) scale(1.02,1); } }
.candle-glass.is-paused * { animation-play-state: paused !important; }
@media (max-width: 639px) { .candle-glass-pane { box-shadow: inset 0 0 75px 12px rgba(12,8,5,.3); } }
@media (prefers-reduced-motion: reduce) {
  .incense-ambient-smoke { display: none; }
  .incense-shrine *, .candle-glass * { animation: none !important; transition: none !important; }
  .incense-ash-fall, .incense-flare { display: none !important; }
}
