/* ==========================================================================
   MillionTree · feel layer: iOS-style info sheet, switches, ripples, springy
   transitions and a CHOP button that heats up with your level.
   ========================================================================== */
.fx-ripple{position:absolute;border-radius:50%;pointer-events:none;background:radial-gradient(circle,rgba(255,255,255,.55) 0,rgba(255,255,255,.18) 40%,transparent 70%);transform:scale(.1);opacity:1;animation:ripple .5s cubic-bezier(.2,.7,.3,1) forwards;z-index:0}
@keyframes ripple{to{transform:scale(1);opacity:0}}
button,.info-row{-webkit-tap-highlight-color:transparent;touch-action:manipulation}

/* ---------- Info sheet ---------- */
dialog.sheet{width:min(440px,100vw);max-width:100vw;max-height:88dvh;padding:10px 16px calc(18px + env(safe-area-inset-bottom));overflow:auto;overscroll-behavior:contain;
  border-radius:18px;color:var(--brown,#5a2f12);scrollbar-width:none}
dialog.sheet::-webkit-scrollbar{display:none}
dialog.sheet[open]{animation:sheet-in .5s cubic-bezier(.2,1.25,.35,1)}
dialog.sheet[open]::backdrop{animation:fade-in .3s ease-out both}
@keyframes sheet-in{from{transform:translateY(60px) scale(.96);opacity:0}to{transform:none;opacity:1}}
@keyframes fade-in{from{opacity:0}to{opacity:1}}
.sheet-grabber{width:42px;height:5px;border-radius:3px;background:rgba(90,47,18,.25);margin:2px auto 12px}
.sheet-head{display:flex;align-items:center;gap:12px;margin-bottom:14px}
.sheet-head h2{margin:0;font-size:24px!important;line-height:1}
.sheet-head p{margin:3px 0 0;font-size:12px;color:#9a7a60;font-family:var(--font)}
.sheet-icon{width:52px;height:52px;flex-shrink:0;border-radius:9px;border:3px solid #fff;box-shadow:0 3px 0 var(--orange-edge,#c0560c),0 6px 12px rgba(0,0,0,.2);
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 76'%3E%3Cpath d='M32 71V28L12 9m20 40L54 23M32 28V5' stroke='white' stroke-width='8' stroke-linecap='round' fill='none'/%3E%3C/svg%3E") center/55% no-repeat,linear-gradient(180deg,var(--orange-1,#ffc65c),var(--orange-2,#ff8a22))}
.sheet-close{margin-left:auto;width:34px;height:34px;border-radius:50%;border:0;background:rgba(90,47,18,.1);color:#7a5a40;font-size:22px;line-height:1;font-family:var(--font)}
.sheet-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-bottom:14px}
.sheet-stats>div{border-radius:9.5px;padding:10px 4px 8px;text-align:center;background:var(--card,#eaf5ff);box-shadow:inset 0 0 0 2px var(--card-edge,#bcdcf3)}
.sheet-stats b{display:block;font-family:var(--display);font-weight:400;font-size:18px;color:var(--ink,#3d6fd6);white-space:nowrap}
.sheet-stats span{display:block;font-size:10px;font-weight:600;color:#7a8aa8;margin-top:2px;font-family:var(--font)}
.sheet-group{border-radius:11px;overflow:hidden;background:#fff;box-shadow:0 2px 0 rgba(90,47,18,.12),inset 0 0 0 1.5px rgba(90,47,18,.08);margin-bottom:12px;display:block!important}
.info-row{display:flex!important;align-items:center;gap:12px;width:100%;min-height:52px;padding:0 14px!important;border:0!important;border-radius:0!important;background:#fff!important;box-shadow:none!important;
  font-family:var(--font)!important;font-size:16px;font-weight:600;color:#3a2a1e!important;text-align:left;cursor:pointer;transition:background .15s}
.info-row+.info-row{box-shadow:inset 0 1px 0 rgba(90,47,18,.08)!important}
.info-row:hover{background:#fbf6ee!important}
.info-row span{flex:1}
.info-row em{font-style:normal;font-size:22px;color:#c4b2a2}
.info-row.danger{color:#d23a4c!important}
.row-ic{width:30px;height:30px;border-radius:5.5px;display:grid;place-items:center;font-style:normal;font-weight:800;color:#fff;font-size:15px;background:var(--c);box-shadow:inset 0 -2px 0 rgba(0,0,0,.15)}
.ios-switch{position:relative;width:51px;height:31px;border-radius:9.5px;background:#e5e5ea;transition:background .25s;flex-shrink:0}
.ios-switch:after{content:'';position:absolute;top:2px;left:2px;width:27px;height:27px;border-radius:50%;background:#fff;box-shadow:0 3px 8px rgba(0,0,0,.15),0 1px 1px rgba(0,0,0,.16);transition:transform .3s cubic-bezier(.3,1.4,.5,1)}
.toggle-row.on .ios-switch{background:#34c759}
.toggle-row.on .ios-switch:after{transform:translateX(20px)}
dialog.sheet .info-footnote{font-size:11.5px;line-height:1.5;margin:14px 4px 6px;color:#9a7a60!important}
dialog.sheet .asset-credit{font-size:11px;margin:0 4px;color:#b09a86!important}
@media(max-width:720px){dialog.sheet{width:100vw;margin:auto 0 0;border-radius:17px 17px 0 0;max-height:90dvh}}

/* ---------- other dialogs spring in too ---------- */
dialog:not(.sheet)[open]{animation:sheet-in .45s cubic-bezier(.2,1.25,.35,1)}

/* ---------- CHOP heats up with your level ---------- */
.play-button.collect{transition:box-shadow .4s,filter .4s}
body:has(#tier-progress.live[data-level="1"]) .play-button.collect{filter:saturate(1.1)}
body:has(#tier-progress.live[data-level="2"]) .play-button.collect{animation:chop-heat 1.3s ease-in-out infinite;--heat:rgba(255,160,60,.45)}
body:has(#tier-progress.live[data-level="3"]) .play-button.collect{animation:chop-heat 1s ease-in-out infinite;--heat:rgba(255,200,60,.6)}
body:has(#tier-progress.live[data-level="4"]) .play-button.collect{animation:chop-heat .8s ease-in-out infinite;--heat:rgba(255,220,90,.8)}
@keyframes chop-heat{0%,100%{filter:brightness(1)}50%{filter:brightness(1.12) drop-shadow(0 0 14px var(--heat))}}

/* ---------- balance counter bounce on change ---------- */
.wallet strong{display:inline-block;transition:transform .2s}

/* ---------- lite mode (Full effects off) ---------- */
.lite .fx-rays,.lite .fx-levelup,.lite .tier-progress:after{animation:none!important}
.lite .fx-canvas{opacity:.6}

@media(prefers-reduced-motion:reduce){.fx-ripple,dialog[open],.play-button.collect{animation:none!important}}
dialog.sheet,dialog.sheet[open]{background:linear-gradient(180deg,#fff8e8,#ffefd2)!important;color:#5a2f12!important;opacity:1!important}
dialog.sheet .sheet-head h2{color:#3d6fd6!important;-webkit-text-fill-color:#3d6fd6!important;background:none!important}
dialog.sheet .sheet-stats b{color:#3d6fd6!important;-webkit-text-fill-color:#3d6fd6!important;opacity:1!important}
dialog.sheet .info-row,dialog.sheet .info-row span{color:#3a2a1e!important;-webkit-text-fill-color:#3a2a1e!important;opacity:1!important;filter:none!important}
dialog.sheet .info-row.danger,dialog.sheet .info-row.danger span{color:#d23a4c!important;-webkit-text-fill-color:#d23a4c!important}
dialog.sheet .info-row:disabled{opacity:.45!important}
dialog.sheet .info-footnote,dialog.sheet .sheet-head p{color:#9a7a60!important}
.history-chip i.bolt{display:inline-grid;place-items:center;width:15px;height:15px;margin-right:2px;font-size:0}
.history-chip i.bolt svg{width:13px;height:13px;fill:#fff36a;stroke:#a02434;stroke-width:1.6;stroke-linejoin:round;filter:drop-shadow(0 1px 0 rgba(0,0,0,.3))}
#tree-canvas canvas{image-rendering:auto}
.fx-foliage{position:absolute;z-index:3;top:-30px;left:-40px;width:min(42vw,420px);height:auto;pointer-events:none;transform-origin:0 0;animation:foliage-sway 6s ease-in-out infinite;filter:drop-shadow(0 10px 18px rgba(0,30,10,.35))}
.fx-foliage.right{left:auto;right:-40px;transform:scaleX(-1);transform-origin:100% 0;animation:foliage-sway-r 7s ease-in-out infinite}
@keyframes foliage-sway{0%,100%{transform:rotate(0)}50%{transform:rotate(1.6deg)}}
@keyframes foliage-sway-r{0%,100%{transform:scaleX(-1) rotate(0)}50%{transform:scaleX(-1) rotate(1.4deg)}}
@media(max-width:720px){.fx-foliage{width:58vw;top:-20px;left:-34px}.fx-foliage.right{right:-34px}}
.lite .fx-foliage{animation:none}
@media(prefers-reduced-motion:reduce){.fx-foliage{animation:none}}
