/* Forest — calm, minimalist focus app.
   Mobile-first. Soft, low-contrast palette. Two views: Focus + Forest. */

:root {
  --sky-1: #dff0e2;
  --sky-2: #eef6ea;
  --sky-3: #f6f4ea;
  --ink: #3a4a3c;
  --ink-soft: #6d7d6c;
  --ink-faint: #9aa899;
  --leaf: #6ba368;
  --leaf-deep: #4e8154;
  --card: rgba(255, 255, 255, 0.72);
  --card-solid: #ffffff;
  --line: rgba(78, 129, 84, 0.16);
  --shadow: 0 10px 30px rgba(60, 90, 60, 0.10);
  --radius: 22px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  font-size: 16px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

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

body {
  font-family: "Nunito", ui-rounded, "SF Pro Rounded", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, var(--sky-1) 0%, var(--sky-2) 46%, var(--sky-3) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

#app {
  max-width: 520px;
  margin: 0 auto;
  min-height: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: calc(var(--safe-t) + 8px) 20px calc(var(--safe-b) + 88px);
  position: relative;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ---------- top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 2px 10px;
}
.topbar .mark { display: flex; align-items: center; gap: 8px; font-weight: 800; letter-spacing: .2px; }
.topbar .mark svg { width: 26px; height: 26px; }
.topbar .mark span { font-size: 1.05rem; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--card); box-shadow: var(--shadow);
  font-size: 1.05rem; color: var(--ink-soft);
  transition: transform .15s ease;
}
.icon-btn:active { transform: scale(0.92); }
.icon-btn svg { width: 20px; height: 20px; display: block; }
#sound-btn.muted { color: var(--ink-faint); }

/* ---------- view plumbing ---------- */
.view { display: none; flex: 1; min-height: 0; flex-direction: column; animation: fade .35s ease; }
.view.active { display: flex; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- FOCUS: home / picker ---------- */
.stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
}
.tree-hero {
  width: min(62vw, 260px);
  height: min(62vw, 260px);
  display: grid;
  place-items: end center;
  filter: drop-shadow(0 12px 18px rgba(70, 110, 70, 0.14));
}
.tree-hero .tree-svg { width: 100%; height: 100%; }
.tree-hero.pulse { animation: sway 6s ease-in-out infinite; }
@keyframes sway { 0%,100% { transform: rotate(-1deg); } 50% { transform: rotate(1deg); } }

.pick-name { font-size: 1.5rem; font-weight: 800; margin: 10px 0 0; }
.pick-name .badge {
  font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .6px;
  color: #b57a3f; background: #fbeede; padding: 3px 8px; border-radius: 999px;
  vertical-align: middle; margin-left: 8px;
}
.pick-dur { color: var(--leaf-deep); font-weight: 800; font-size: 1.05rem; margin: 2px 0 0; }
.pick-blurb { color: var(--ink-soft); font-size: .92rem; max-width: 30ch; margin: 6px auto 0; line-height: 1.45; min-height: 2.6em; }

/* slider */
.picker { width: 100%; margin-top: 18px; }
.slider-wrap { position: relative; padding: 6px 4px; }
input[type="range"].seed-slider {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 34px; background: transparent; margin: 0;
}
.seed-slider::-webkit-slider-runnable-track {
  height: 8px; border-radius: 999px;
  background: linear-gradient(90deg, var(--leaf), #cfe3bf);
}
.seed-slider::-moz-range-track {
  height: 8px; border-radius: 999px;
  background: linear-gradient(90deg, var(--leaf), #cfe3bf);
}
.seed-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 26px; height: 26px; margin-top: -9px; border-radius: 50%;
  background: #fff; border: 3px solid var(--leaf-deep);
  box-shadow: 0 3px 8px rgba(60,110,60,.28);
}
.seed-slider::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%;
  background: #fff; border: 3px solid var(--leaf-deep);
  box-shadow: 0 3px 8px rgba(60,110,60,.28);
}
.slider-ends { display: flex; justify-content: space-between; color: var(--ink-faint); font-size: .74rem; font-weight: 700; margin-top: 2px; padding: 0 2px; }

.btn-plant {
  margin-top: 22px;
  width: 100%;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, #6fae6c, var(--leaf-deep));
  color: #fff; font-weight: 800; font-size: 1.05rem; letter-spacing: .3px;
  box-shadow: 0 10px 22px rgba(70, 130, 74, 0.32);
  transition: transform .15s ease, filter .15s ease;
}
.btn-plant:active { transform: translateY(2px) scale(0.99); filter: brightness(0.97); }

/* ---------- FOCUS: session (growing) ---------- */
.session {
  position: fixed; inset: 0; z-index: 40;
  display: none; flex-direction: column; align-items: center; justify-content: center;
  padding: calc(var(--safe-t) + 20px) 24px calc(var(--safe-b) + 28px);
  background:
    radial-gradient(150% 105% at 50% -12%, #eef8ea 0%, #e2f1dc 42%, #d5ebd2 78%, #cfe7d3 100%);
  text-align: center;
  isolation: isolate;
  overflow: hidden;
}
.session.active { display: flex; }
/* soft dappled light that drifts very slowly behind everything */
.session::before {
  content: ""; position: absolute; inset: -12%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(36% 30% at 30% 24%, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 70%),
    radial-gradient(30% 26% at 76% 62%, rgba(205, 233, 196, 0.5), rgba(205, 233, 196, 0) 70%);
  animation: bgDrift 22s ease-in-out infinite alternate;
}
/* the faintest vignette to settle attention on the tree */
.session::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(120% 92% at 50% 44%, rgba(0, 0, 0, 0) 56%, rgba(58, 88, 58, 0.10) 100%);
}
.session > * { position: relative; z-index: 1; }
@keyframes bgDrift {
  from { transform: translate3d(-1.5%, -1%, 0) scale(1); }
  to   { transform: translate3d(1.5%, 1.5%, 0) scale(1.06); }
}
.session-stage {
  position: relative;
  width: min(72vw, 300px); height: min(72vw, 300px);
  margin-bottom: 8px;
  display: grid; place-items: end center;
}
/* a warm halo that breathes gently behind the growing tree */
.session-stage::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 128%; height: 128%;
  transform: translate(-50%, -50%); z-index: 0; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.12) 42%, rgba(255, 255, 255, 0) 72%);
  animation: haloBreathe 7s ease-in-out infinite;
}
@keyframes haloBreathe {
  0%, 100% { opacity: .5;  transform: translate(-50%, -50%) scale(1); }
  50%      { opacity: .85; transform: translate(-50%, -50%) scale(1.08); }
}
.session .tree-hero {
  width: 100%; height: 100%; position: relative; z-index: 1;
  filter: drop-shadow(0 16px 26px rgba(48, 86, 54, 0.18));
}
.tree-fx { position: absolute; inset: 0; pointer-events: none; overflow: visible; z-index: 2; }
.session-tree-name { font-weight: 800; font-size: 1.15rem; }
.time-left { font-size: 3.1rem; font-weight: 800; letter-spacing: 1px; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.session-hint {
  color: var(--ink-soft); font-size: .9rem; max-width: 28ch; line-height: 1.5; margin: 8px auto 0;
  display: flex; align-items: center; gap: 7px; justify-content: center;
}
.session-hint svg { width: 16px; height: 16px; flex: none; }
.session-actions { margin-top: 26px; }
.btn-give {
  color: var(--ink-faint); font-size: .86rem; font-weight: 700;
  padding: 10px 18px; border-radius: 12px; text-decoration: underline; text-underline-offset: 3px;
}

/* progress ring behind the tree */
.ring { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); pointer-events: none; }

/* ---------- FOREST view ---------- */
.forest-head { text-align: center; margin: 4px 0 10px; }
.forest-head h2 { margin: 0; font-size: 1.4rem; font-weight: 800; }
.forest-stats { display: flex; justify-content: center; gap: 26px; margin-top: 10px; }
.forest-stats .s-num { font-size: 1.4rem; font-weight: 800; color: var(--leaf-deep); line-height: 1; }
.forest-stats .s-lab { font-size: .72rem; color: var(--ink-faint); font-weight: 700; text-transform: uppercase; letter-spacing: .5px; margin-top: 3px; }

.grove {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  margin-top: 14px; padding-bottom: 8px;
}
.grove-cell {
  background: var(--card); border-radius: 18px; box-shadow: var(--shadow);
  aspect-ratio: 1 / 1; display: flex; align-items: flex-end; justify-content: center;
  position: relative; overflow: hidden; padding: 6px;
}
.grove-cell .tree-svg { width: 92%; height: 92%; }
.grove-cell.special { background: linear-gradient(180deg, #fff8e8, #fdf1d6); }
.grove-cell .cell-name {
  position: absolute; bottom: 5px; left: 0; right: 0; text-align: center;
  font-size: .62rem; font-weight: 800; color: var(--ink-soft);
}
.empty-grove {
  text-align: center; color: var(--ink-faint); margin: 40px auto; max-width: 26ch;
  font-size: .95rem; line-height: 1.6;
}
.empty-grove svg { width: 64px; height: 64px; opacity: .55; margin-bottom: 8px; }

/* ---------- bottom nav ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; justify-content: center; gap: 8px;
  padding: 8px 12px calc(8px + var(--safe-b));
  background: linear-gradient(180deg, rgba(246,244,234,0), rgba(244,246,238,0.9) 40%);
  pointer-events: none;
}
.tabbar-inner {
  pointer-events: auto;
  display: flex; gap: 6px; background: var(--card-solid);
  padding: 6px; border-radius: 999px; box-shadow: var(--shadow);
}
.tab {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 20px; border-radius: 999px;
  color: var(--ink-faint); font-weight: 800; font-size: .9rem;
  transition: color .2s, background .2s;
}
.tab svg { width: 19px; height: 19px; }
.tab.active { color: #fff; background: var(--leaf-deep); }

/* ---------- overlays (tutorial / result) ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 60;
  display: none; align-items: center; justify-content: center;
  padding: 24px; background: rgba(40, 60, 45, 0.32); backdrop-filter: blur(4px);
}
.overlay.active { display: flex; animation: fade .25s ease; }
.sheet {
  background: var(--card-solid); border-radius: 26px; box-shadow: 0 24px 60px rgba(40,70,45,.28);
  width: 100%; max-width: 380px; padding: 28px 24px; text-align: center;
  animation: pop .3s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes pop { from { transform: scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet .sheet-art { width: 118px; height: 118px; margin: 0 auto 6px; display: grid; place-items: end center; }
.sheet h3 { margin: 8px 0 6px; font-size: 1.3rem; font-weight: 800; }
.sheet p { color: var(--ink-soft); line-height: 1.55; font-size: .96rem; margin: 0 auto; max-width: 30ch; }
.sheet .btn-plant { margin-top: 20px; }
.sheet .btn-text { margin-top: 12px; color: var(--ink-faint); font-weight: 700; font-size: .88rem; padding: 8px; }

.dots { display: flex; gap: 7px; justify-content: center; margin-top: 18px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); transition: background .2s, width .2s; }
.dots i.on { background: var(--leaf-deep); width: 18px; border-radius: 999px; }

.result-emoji { font-size: 2.2rem; }

/* ============================================================
   FOREST — grove picture, share/visit
   ============================================================ */

.forest-top {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 2px 0 6px;
}
.forest-name {
  font-size: 1.15rem; font-weight: 800; color: var(--ink);
  display: flex; align-items: center; gap: 6px; padding: 4px 2px;
}
.forest-name .pencil { color: var(--ink-faint); font-size: .9rem; }
.forest-actions { display: flex; gap: 8px; }
.chip {
  padding: 8px 16px; border-radius: 999px; font-weight: 800; font-size: .85rem;
  background: var(--card-solid); color: var(--ink-soft); box-shadow: var(--shadow);
}
.chip:active { transform: scale(.95); }
.chip-primary { background: var(--leaf-deep); color: #fff; }

.forest-scroll {
  flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 4px 2px 8px;
}

/* visiting banner */
.visit-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 45;
  display: none; padding: calc(var(--safe-t) + 8px) 16px 10px;
  background: linear-gradient(180deg, #2f6b3f, #2f6b3fee);
  color: #fff; box-shadow: 0 6px 20px rgba(40, 70, 45, .3);
}
.visit-banner.show { display: block; }
.vb-inner { max-width: 520px; margin: 0 auto; display: flex; align-items: center; gap: 12px; justify-content: space-between; }
.vb-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.vb-text strong { font-size: .98rem; }
.vb-text span { font-size: .8rem; opacity: .9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.visit-banner .chip { flex: none; background: #fff; color: var(--leaf-deep); }

/* share / edit dialogs */
.share-link {
  width: 100%; margin: 6px 0 14px; padding: 12px 14px; border-radius: 12px;
  border: 1.5px solid var(--line); background: #f6f8f3; color: var(--ink-soft);
  font-size: .82rem; font-family: inherit;
}
.fld { display: block; text-align: left; font-weight: 800; font-size: .82rem; color: var(--ink-soft); margin: 10px 0 4px; }
.fld input, .fld textarea {
  width: 100%; margin-top: 6px; padding: 12px 14px; border-radius: 12px;
  border: 1.5px solid var(--line); background: #f8faf5; color: var(--ink);
  font-size: .95rem; font-family: inherit; font-weight: 700; resize: none;
}
.fld input:focus, .fld textarea:focus { outline: none; border-color: var(--leaf); }

/* ---------- special trees ---------- */
.link-special {
  margin-top: 14px; align-self: center;
  color: var(--ink-faint); font-weight: 800; font-size: .82rem;
  padding: 6px 10px; border-radius: 10px;
}
.link-special:active { color: var(--leaf-deep); }
.pick-name .badge.sun { color: #b5762a; background: #fdeecb; }
.pick-name .badge.moon { color: #4a4f86; background: #e6e8fb; }
.pick-name .badge.candy { color: #c14d80; background: #fde3ee; }
.pick-name .badge.study { color: #3f7d8a; background: #e2f0f3; }
.pick-name .badge.lunch { color: #a34b2f; background: #fbeed6; }
.pick-name .badge.money { color: #8a6d1a; background: #faf0c8; }
.extra-earned {
  margin: 14px auto 0; padding: 10px 14px; border-radius: 14px;
  background: linear-gradient(180deg, #fff6df, #fdeec9); color: #8a6a2a;
  font-weight: 800; font-size: .9rem; max-width: 30ch; line-height: 1.4;
}
.spec-intro { margin-bottom: 6px; }
.spec-row {
  display: flex; align-items: center; gap: 12px; text-align: left;
  padding: 10px 4px; border-top: 1px solid var(--line);
}
.spec-row:first-of-type { border-top: none; }
.spec-row .tree-svg { width: 46px; height: 46px; flex: none; }
.spec-row b { display: block; font-size: .98rem; color: var(--ink); }
.spec-row span { display: block; font-size: .82rem; color: var(--ink-soft); line-height: 1.4; margin-top: 2px; }

/* ============================================================
   TREE ANIMATION — living, per-tree ambience
   ------------------------------------------------------------
   Only "alive" trees (the focus session, the picker preview, the
   result art) animate — never the little grove thumbnails.
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {

  /* whole-tree life: the session tree sways slowly from its base, with a
     barely-there breathe — an unhurried, organic drift rather than a metronome */
  .session .tree-svg.alive {
    animation: treeSway 8s ease-in-out infinite;
    transform-origin: 50% 92%;
  }
  @keyframes treeSway {
    0%   { transform: rotate(-1deg)   scale(1); }
    30%  { transform: rotate(0.6deg)  scale(1.006); }
    50%  { transform: rotate(1deg)    scale(1.004); }
    70%  { transform: rotate(0.3deg)  scale(1.008); }
    100% { transform: rotate(-1deg)   scale(1); }
  }

  /* every fx element rotates/scales about its own centre by default */
  .tree-svg.alive [class^="fx-"],
  .tree-svg.alive [class*=" fx-"] { transform-box: fill-box; transform-origin: center; }

  /* haloes breathe (world tree, phoenix, sunrise, cactus) */
  .tree-svg.alive .fx-glow { animation: fxGlow 4.2s ease-in-out infinite; }
  @keyframes fxGlow {
    0%, 100% { opacity: .45; transform: scale(1); }
    50%      { opacity: .85; transform: scale(1.09); }
  }

  /* phoenix flames flicker and lean */
  .tree-svg.alive .fx-flame {
    transform-origin: 50% 100%;
    animation: fxFlame 1.05s ease-in-out infinite;
  }
  @keyframes fxFlame {
    0%, 100% { transform: scaleY(1)    scaleX(1)    skewX(0deg); }
    25%      { transform: scaleY(1.2)  scaleX(.92)  skewX(4deg); }
    50%      { transform: scaleY(.88)  scaleX(1.06) skewX(-3deg); }
    75%      { transform: scaleY(1.1)  scaleX(.96)  skewX(2deg); }
  }

  /* twinkles — stars, embers, blossoms, gumdrop glints, moonlight */
  .tree-svg.alive .fx-star,
  .tree-svg.alive .fx-bloom,
  .tree-svg.alive .fx-glint { animation: fxTwinkle 2.1s ease-in-out infinite; }
  @keyframes fxTwinkle {
    0%, 100% { opacity: .35; }
    50%      { opacity: 1; }
  }

  /* four-point sparkles pulse in and spin a touch (world tree) */
  .tree-svg.alive .fx-spark { animation: fxSpark 2.4s ease-in-out infinite; }
  @keyframes fxSpark {
    0%, 100% { opacity: .3;  transform: scale(.7)  rotate(0deg); }
    50%      { opacity: 1;   transform: scale(1.15) rotate(35deg); }
  }

  /* sun disc pulses; its rays wheel slowly (sunrise, cactus) */
  .tree-svg.alive .fx-sun { animation: fxSun 3.6s ease-in-out infinite; }
  @keyframes fxSun {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.13); }
  }
  .tree-svg.alive .fx-rays {
    transform-box: view-box; transform-origin: 94px 22px;
    animation: fxSpin 26s linear infinite;
  }
  @keyframes fxSpin { to { transform: rotate(360deg); } }

  /* candy lollipop swirls */
  .tree-svg.alive .fx-spin { animation: fxSpin 7s linear infinite; }

  /* money coins bob and tilt, each on its own beat */
  .tree-svg.alive .fx-coin { animation: fxCoin 2.6s ease-in-out infinite; }
  @keyframes fxCoin {
    0%, 100% { transform: translateY(0)    rotate(-5deg); }
    50%      { transform: translateY(-2px) rotate(5deg); }
  }

  /* the moon drifts; banyan roots sway from where they hang */
  .tree-svg.alive .fx-moon { animation: fxMoon 6s ease-in-out infinite; }
  @keyframes fxMoon {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-2.5px); }
  }
  .tree-svg.alive .fx-root {
    transform-origin: 50% 0;
    animation: fxRoot 5s ease-in-out infinite;
  }
  @keyframes fxRoot {
    0%, 100% { transform: rotate(-1.6deg); }
    50%      { transform: rotate(1.6deg); }
  }
}

/* ---------- particle layer (session only) ---------- */
.particle { position: absolute; top: 0; left: 0; will-change: transform, opacity; border-radius: 50%; }
.p-petal  { border-radius: 60% 0 60% 0; filter: blur(0.3px); }
.p-leaf   { border-radius: 0 65% 0 65%; filter: blur(0.3px); }
.p-fly    { filter: blur(0.4px); }
.p-spark  { border-radius: 0; clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%); }

.p-fall    { animation: pFall  var(--dur) ease-in-out forwards; }
.p-rise    { animation: pRise  var(--dur) ease-out    forwards; }
.p-float   { animation: pFloat var(--dur) ease-in-out forwards; }
.p-twinkle { animation: pTwinkle var(--dur) ease-in-out forwards; }
.p-burst   { animation: pBurst var(--dur) cubic-bezier(.16,.68,.36,1) forwards; }

/* a fluttering descent — drifts sideways at the midpoint before settling */
@keyframes pFall {
  0%   { transform: translate(0, 0) rotate(0); opacity: 0; }
  14%  { opacity: var(--op, .82); }
  50%  { transform: translate(var(--mx), calc(var(--dy) * 0.52)) rotate(calc(var(--rot) * 0.5)); }
  86%  { opacity: var(--op, .82); }
  100% { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); opacity: 0; }
}
@keyframes pRise {
  0%   { transform: translate(0, 0) scale(1); opacity: 0; }
  18%  { opacity: var(--op, .95); }
  100% { transform: translate(var(--dx), var(--dy)) scale(.3); opacity: 0; }
}
@keyframes pFloat {
  0%   { transform: translate(0, 0); opacity: 0; }
  22%  { opacity: var(--op, .9); }
  50%  { opacity: .28; }
  78%  { opacity: var(--op, .9); }
  100% { transform: translate(var(--dx), var(--dy)); opacity: 0; }
}
@keyframes pTwinkle {
  0%   { transform: scale(0)   rotate(0);    opacity: 0; }
  50%  { transform: scale(1)   rotate(45deg); opacity: var(--op, 1); }
  100% { transform: scale(0)   rotate(90deg); opacity: 0; }
}
@keyframes pBurst {
  0%   { transform: translate(0, 0) scale(1); opacity: .95; }
  100% { transform: translate(var(--dx), var(--dy)) scale(.25); opacity: 0; }
}

/* completion flash ring — a soft light bloom expanding outward */
.fx-ring {
  position: absolute; left: 50%; top: 44%; width: 26px; height: 26px; margin: -13px 0 0 -13px;
  border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.9); opacity: .8;
  animation: fxRing 1.1s cubic-bezier(.16,.68,.36,1) forwards;
}
@keyframes fxRing {
  from { transform: scale(.35); opacity: .8; }
  to   { transform: scale(6.5); opacity: 0; }
}
