:root {
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  --bg: #f6f3ee;
  --brand: #1f3a5f;
  --brand2: #c4784a;
  --text: #1f3a5f;
  --pointer: #1f3a5f;
  --muted: #5e584f;
  --light: #efe8dc;
  --card: #fffcf7;
  --result-color: #1f3a5f;
  --btn-bg: #1f3a5f;
  --btn-hover: #16304f;
  --on-brand: #fff;
  --seg1: #1f3a5f;
  --seg2: #fbf7f1;
  --seg3: #a35c32;
  --seg4: #f4e6d2;
  --seg5: #5d7a5a;
  --seg6: #ead9c4;
  --seg7: #16304f;
  --seg8: #e4d2b8;
  margin: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 10px 12px 32px;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", sans-serif;
  transition: background-color 0.5s, color 0.5s;
}

button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.5; }
.share[hidden] { display: none; }

body[data-theme="halloween"] {
  --bg: #1a1025;
  --brand: #ff6600;
  --brand2: #9b30ff;
  --text: #f0e0ff;
  --pointer: #ff6600;
  --muted: #c3a8de;
  --light: #2d1f3d;
  --card: #241533;
  --result-color: #ffb347;
  --btn-bg: #ff6600;
  --btn-hover: #cc5500;
  --seg1: #ff6600;
  --seg2: #2d1f3d;
  --seg3: #9b30ff;
  --seg4: #3a2550;
  --seg5: #ff8c00;
  --seg6: #1a1025;
  --seg7: #cc5500;
  --seg8: #4b2d7a;
  color-scheme: dark;
}

body[data-theme="herbst"] {
  --bg: #faf5ee;
  --brand: #c45e00;
  --brand2: #8b6914;
  --text: #3a2510;
  --pointer: #c45e00;
  --muted: #8a6a45;
  --light: #fae5c8;
  --card: #fffaf3;
  --result-color: #c45e00;
  --btn-bg: #c45e00;
  --btn-hover: #8b4513;
  --seg1: #c45e00;
  --seg2: #fae5c8;
  --seg3: #8b4513;
  --seg4: #f0d090;
  --seg5: #d4760a;
  --seg6: #fdf0dc;
  --seg7: #a0522d;
  --seg8: #e8c878;
}

body[data-theme="fruehjahr"] {
  --bg: #eef6ea;
  --brand: #3d8c4a;
  --brand2: #e07a9a;
  --text: #1e3324;
  --pointer: #3d8c4a;
  --muted: #5d6e5a;
  --light: #e4f0df;
  --card: #fffcf8;
  --result-color: #2f7a3c;
  --btn-bg: #2f7a3c;
  --btn-hover: #256532;
  --on-brand: #fff;
  --seg1: #3d8c4a;
  --seg2: #f7fbf4;
  --seg3: #c75a86;
  --seg4: #f8e3ea;
  --seg5: #2f6b3c;
  --seg6: #e7f2c9;
  --seg7: #4e9a5c;
  --seg8: #fff6ea;
}

body[data-theme="sommer"] {
  --bg: #e8f4fc;
  --brand: #f4a261;
  --brand2: #1d7ab8;
  --text: #1c3348;
  --pointer: #e08a3c;
  --muted: #4d6478;
  --light: #d7ebf7;
  --card: #ffffff;
  --result-color: #c46a1a;
  --btn-bg: #c65a12;
  --btn-hover: #a84b0c;
  --on-brand: #1c3348;
  --seg1: #f4a261;
  --seg2: #e8f4fc;
  --seg3: #1d7ab8;
  --seg4: #ffe0b8;
  --seg5: #d4652a;
  --seg6: #d4eefb;
  --seg7: #0f5f96;
  --seg8: #fff4e4;
}

body[data-theme="winter"] {
  --bg: #0e1c2f;
  --brand: #7ec8e3;
  --brand2: #e8eef2;
  --text: #f4f8fb;
  --pointer: #7ec8e3;
  --muted: #b7c9d8;
  --light: #163044;
  --card: #132536;
  --result-color: #b9e4f4;
  --btn-bg: #1a6a84;
  --btn-hover: #14566c;
  --on-brand: #0e1c2f;
  --seg1: #1a3a5c;
  --seg2: #e8eef2;
  --seg3: #7ec8e3;
  --seg4: #f7fbff;
  --seg5: #0e1c2f;
  --seg6: #b7d7e8;
  --seg7: #3d7f9a;
  --seg8: #d5e4ee;
  color-scheme: dark;
}

body[data-theme="gta"] {
  --bg: #1a1028;
  --brand: #e23e8c;
  --brand2: #ff7a2f;
  --text: #fff6fb;
  --pointer: #ff8c42;
  --muted: #e4c6d8;
  --light: #2a1838;
  --card: #241430;
  --result-color: #ffb08a;
  --btn-bg: #c22574;
  --btn-hover: #a11b60;
  --on-brand: #fff;
  --seg1: #5c2d86;
  --seg2: #e23e8c;
  --seg3: #e25e14;
  --seg4: #ffc6a8;
  --seg5: #2a1438;
  --seg6: #ff9ec8;
  --seg7: #e85a4a;
  --seg8: #ead6f6;
  color-scheme: dark;
  background:
    radial-gradient(880px 420px at 100% -8%, rgba(255, 122, 47, 0.38), transparent 58%),
    radial-gradient(720px 460px at -8% 0%, rgba(226, 62, 140, 0.32), transparent 56%),
    var(--bg);
}

body[data-theme="musik"] {
  --bg: #161022;
  --brand: #e0b84a;
  --brand2: #d946a6;
  --text: #f8f1e4;
  --pointer: #e0b84a;
  --muted: #cbb8a6;
  --light: #2c223c;
  --card: #21182f;
  --result-color: #f0d78c;
  --btn-bg: #8d6a1c;
  --btn-hover: #745812;
  --on-brand: #1a1020;
  --seg1: #e0b84a;
  --seg2: #3a2158;
  --seg3: #d946a6;
  --seg4: #f3e2c4;
  --seg5: #6b1c36;
  --seg6: #f2d78a;
  --seg7: #73468f;
  --seg8: #f0c0a0;
  color-scheme: dark;
}

body[data-dark][data-theme="netz"] {
  --bg: #171410;
  --brand: #a35c32;
  --brand2: #e4b08a;
  --text: #f4efe8;
  --pointer: #c5d0e0;
  --muted: #cbbba8;
  --light: #322c26;
  --card: #241f1a;
  --result-color: #f0c7a4;
  --btn-bg: #a35c32;
  --btn-hover: #8a4c2a;
  --seg2: #3a342c;
  --seg4: #4d4338;
  --seg6: #3e362e;
  --seg8: #4a4036;
  color-scheme: dark;
}

body[data-dark][data-theme="halloween"] {
  --bg: #07040d;
  --brand: #ff8a33;
  --brand2: #c77bff;
  --text: #f6ecff;
  --pointer: #ff8a33;
  --muted: #d4c2ea;
  --light: #4a2868;
  --card: #643e80;
  --result-color: #ffc48a;
  --btn-bg: #ff7424;
  --btn-hover: #ff8a33;
  --on-brand: #2a1004;
  --seg1: #cc4e00;
  --seg2: #5c3a70;
  --seg3: #9b30ff;
  --seg4: #6e4880;
  --seg5: #c44700;
  --seg6: #4a305e;
  --seg7: #b84300;
  --seg8: #7a5288;
  color-scheme: dark;
}

body[data-dark][data-theme="herbst"] {
  --bg: #1a120c;
  --text: #f6e7d4;
  --muted: #c3aa90;
  --light: #3a2818;
  --card: #26180f;
  --result-color: #e0893a;
  --seg2: #3a2818;
  --seg4: #4a3420;
  --seg6: #24180f;
  --seg8: #3d3018;
  color-scheme: dark;
}

body[data-dark][data-theme="fruehjahr"] {
  --bg: #142018;
  --text: #e7f3e4;
  --muted: #b7cbb4;
  --light: #243428;
  --card: #1b2a20;
  --result-color: #8dcea0;
  --seg2: #243428;
  --seg4: #3a2a32;
  --seg6: #2a3424;
  --seg8: #2e3228;
  color-scheme: dark;
}

body[data-dark][data-theme="sommer"] {
  --bg: #10202c;
  --text: #e7f3fb;
  --muted: #b7c9d6;
  --light: #1c3344;
  --card: #173044;
  --result-color: #ffc48a;
  --seg2: #1a3344;
  --seg4: #3a3024;
  --seg6: #163044;
  --seg8: #2c3330;
  color-scheme: dark;
}

body[data-dark][data-theme="winter"] {
  --bg: #070d16;
  --brand: #9ad7ef;
  --brand2: #e7f6fc;
  --text: #f4f8fb;
  --pointer: #9ad7ef;
  --muted: #d5e8f4;
  --light: #1a4564;
  --card: #1e4d70;
  --result-color: #c8eefb;
  --btn-bg: #1f7ea0;
  --btn-hover: #2490b0;
  --on-brand: #07131f;
  --seg1: #1e5f82;
  --seg2: #d5e4ee;
  --seg3: #8fd4ec;
  --seg4: #f4f9fc;
  --seg5: #164e72;
  --seg6: #9fd4ea;
  --seg7: #247a98;
  --seg8: #c5e6f4;
  color-scheme: dark;
}

body[data-dark][data-theme="gta"] {
  --bg: #0a0612;
  --brand: #ff6eb0;
  --brand2: #ff9a4a;
  --text: #fff7fb;
  --pointer: #ff9a4a;
  --muted: #f3d0e4;
  --light: #4a1848;
  --card: #6e2868;
  --result-color: #ffc9a4;
  --btn-bg: #d42a78;
  --btn-hover: #e23e8c;
  --on-brand: #2a0616;
  --seg1: #7a2eb8;
  --seg2: #d02070;
  --seg3: #c44700;
  --seg4: #ffc2a4;
  --seg5: #5c1868;
  --seg6: #ffa3d6;
  --seg7: #c43220;
  --seg8: #edd4ff;
  color-scheme: dark;
  background:
    radial-gradient(880px 420px at 100% -8%, rgba(255, 154, 74, 0.22), transparent 55%),
    radial-gradient(720px 460px at -8% 0%, rgba(255, 110, 176, 0.18), transparent 54%),
    var(--bg);
}

body[data-dark][data-theme="musik"] {
  --bg: #07060d;
  --brand: #f0c85a;
  --brand2: #ee74c4;
  --text: #fbf6ea;
  --pointer: #f0c85a;
  --muted: #ead8c4;
  --light: #3a3044;
  --card: #524060;
  --result-color: #ffe6ad;
  --btn-bg: #9a7420;
  --btn-hover: #b08828;
  --on-brand: #1a1208;
  --seg1: #f0c85a;
  --seg2: #4c2870;
  --seg3: #c42e90;
  --seg4: #3a3144;
  --seg5: #6e3a32;
  --seg6: #4a3d52;
  --seg7: #7a5a22;
  --seg8: #332a3c;
  color-scheme: dark;
}

#appRoot { position: relative; width: min(1100px, 100%); }
#fx {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
#fitBox {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: row;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
}

#appRoot:fullscreen,
#appRoot:-webkit-full-screen,
#appRoot:-ms-fullscreen {
  width: 100%;
  height: 100%;
  background: var(--bg);
}
#appRoot:fullscreen #fitBox,
#appRoot:-webkit-full-screen #fitBox,
#appRoot:-ms-fullscreen #fitBox {
  position: absolute;
  left: 50%;
  top: 50%;
  flex-wrap: nowrap;
  transform: translate(-50%, -50%) scale(var(--fit, 1));
}
#appRoot.measuring #fitBox {
  position: static !important;
  transform: none !important;
}

.float-btn {
  position: fixed;
  left: 16px;
  z-index: 5;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--brand);
  background: var(--card);
  color: var(--text);
  transition: background-color 0.5s, color 0.5s, border-color 0.5s;
}
#full { top: 16px; }
#dark { top: 68px; }
.float-btn:hover,
.float-btn.is-on {
  background: var(--brand);
  color: var(--on-brand);
}

#toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 8;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--brand);
  color: var(--on-brand);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
#toast.show { opacity: 1; }

#confetti {
  position: fixed;
  inset: 0;
  z-index: 7;
  overflow: hidden;
  pointer-events: none;
}

#landing {
  max-width: 560px;
  padding: 48px 8px;
}
#landing h1 {
  margin: 0 0 12px;
  font-size: 40px;
  font-weight: 800;
}
.eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
}
.lead, .tip, .subhead, #remaining, .drawn-label { color: var(--muted); }
.error { color: #c0392b; min-height: 1.2em; }
#createBtn, #saveNames {
  border: 0;
  border-radius: 999px;
  padding: 12px 28px;
  background: var(--btn-bg);
  color: #fff;
  font-weight: 700;
}
#createBtn:hover, #saveNames:hover { background: var(--btn-hover); }

body.is-home #column,
body.is-home #panel { display: none; }
body:not(.is-home) #landing { display: none; }

#column {
  width: min(100%, 500px);
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}
.brand, .outcome, .actions, .vol, .info { width: 100%; }
.brand, .outcome, .actions, .vol { display: flex; flex-direction: column; align-items: center; }

.brand-bar {
  width: 320px;
  max-width: 100%;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--brand2), var(--brand));
}
.brand-name {
  width: 100%;
  margin-top: 8px;
  border: 0;
  background: transparent;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--brand);
  padding: 2px 8px;
}
.brand-name:focus {
  outline: 2px solid var(--brand);
  border-radius: 8px;
}
.wheel-title {
  margin: 4px 0 0;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 1px;
  text-align: center;
}
.tree { display: flex; flex-direction: column; align-items: center; }
.main-pill {
  font-size: 18px;
  font-weight: 800;
  border: 2px solid var(--brand);
  border-radius: 999px;
  padding: 10px 28px;
  background: transparent;
  color: var(--brand);
}
.main-pill.is-active {
  background: var(--brand);
  color: var(--on-brand);
}
.tree-stem {
  width: 2px;
  height: 14px;
  background: var(--brand);
  opacity: 0.5;
}
.tree-stem[hidden], .segment[hidden] { display: none; }
.segment {
  display: inline-flex;
  max-width: 100%;
  border-radius: 999px;
  overflow: hidden;
  border-top: 2px solid var(--brand);
  background: var(--light);
}
.segment button {
  border: 0;
  border-radius: 0;
  padding: 8px 14px;
  background: transparent;
}
.segment button + button { box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.08); }
.segment button.is-active {
  background: var(--brand);
  color: var(--on-brand);
}

.themes { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.themes button {
  font-size: 12px;
  border-radius: 999px;
  border: 1px solid var(--brand);
  background: transparent;
  padding: 6px 12px;
  transition: background-color 0.5s, color 0.5s, border-color 0.5s;
}
.themes button:hover,
.themes button[aria-pressed="true"] {
  background: var(--brand);
  color: var(--on-brand);
}

.wheel-wrap {
  position: relative;
  width: min(420px, 100%);
}
canvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 50%;
  cursor: grab;
  touch-action: none;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}
.pointer {
  position: absolute;
  left: 50%;
  top: -18px;
  z-index: 2;
  width: 0;
  height: 0;
  border-left: 18px solid transparent;
  border-right: 18px solid transparent;
  border-top: 40px solid var(--pointer);
  transform: translateX(-50%);
  filter: drop-shadow(0 3px 2px rgba(0, 0, 0, 0.35));
}

.result { min-height: 1.2em; text-align: center; }
.result-name {
  margin: 0;
  font-size: 30px;
  font-weight: 700;
  color: var(--result-color);
  animation: arrive 0.7s ease, pulse-name 0.72s ease 4;
}
.again { margin: 0 0 4px; font-weight: 700; }
.mod-line { margin: 6px 0 0; text-align: center; }
.share { display: flex; flex-direction: row; flex-wrap: wrap; gap: 8px; margin-top: 8px; justify-content: center; }
.actions { flex-direction: row; flex-wrap: wrap; justify-content: center; }
.share button, .plan-actions button, #reset, .field input {
  border: 1px solid var(--brand);
  border-radius: 999px;
  background: transparent;
  padding: 8px 14px;
}
.actions { gap: 12px; }
#spin {
  border: 0;
  border-radius: 999px;
  padding: 14px 50px;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  background: var(--btn-bg);
}
#spin:hover:not(:disabled) {
  transform: scale(1.05);
  background: var(--btn-hover);
}
#reset { padding: 10px 18px; }

.vol { flex-direction: row; gap: 10px; justify-content: center; }
#volume { width: 180px; accent-color: var(--brand); }
.info { font-size: 14px; }
.tip, #remaining, .drawn-label { margin: 0 0 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip, .skip {
  border: 0;
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--light);
  font-size: 13px;
}
.chip.hot { background: #ffe0e0; color: #c00; }
.chip.drawn { text-decoration: line-through; }
.skip.is-out { text-decoration: line-through; opacity: 0.6; }

.panel {
  width: min(330px, 100%);
  max-height: 92vh;
  overflow: auto;
  padding: 16px;
  border-radius: 12px;
  background: var(--card);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
.panel h2 { margin: 0 0 4px; font-size: 18px; }
.subhead { margin: 0 0 10px; font-size: 13px; }
textarea.plan-note {
  width: 100%;
  min-height: 2.6em;
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  resize: none;
  overflow: hidden;
  box-shadow: none;
}
textarea.plan-note:focus {
  outline: 2px solid var(--brand);
  border-radius: 8px;
  padding: 6px 8px;
  background: var(--bg);
}
textarea.plan-note[hidden] { display: none; }
.plan-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 4px;
  padding: 6px 8px;
  border-radius: 8px;
}
.plan-row strong { min-width: 8.2em; }
.plan-row button {
  margin-left: auto;
  border: 0;
  background: transparent;
  font-size: 12px;
  text-decoration: underline;
}
.plan-row.next { background: var(--brand); color: var(--on-brand); }
.plan-row.past { opacity: 0.45; }
.plan-row.past strong, .plan-row.past span { text-decoration: line-through; }
.plan-empty { margin: 0; font-style: italic; color: var(--muted); }
.plan-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
details summary { cursor: pointer; font-weight: 700; margin: 8px 0; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.field input, textarea {
  width: 100%;
  border: 1px solid var(--light);
  border-radius: 8px;
  background: var(--bg);
  padding: 8px;
}
textarea { min-height: 140px; resize: vertical; border-radius: 8px; }

.fx-item {
  position: absolute;
  animation-duration: var(--dur, 14s);
  animation-delay: var(--delay, 0s);
  animation-iteration-count: infinite;
  animation-timing-function: linear;
  will-change: transform;
}
#fx[data-kind="netz"] .fx-item { opacity: 0.14; }
#fx[data-kind="halloween"] .fx-item { opacity: 0.24; font-size: 28px; }
#fx[data-kind="herbst"] .fx-item { opacity: 0.3; }
#fx[data-kind="fruehjahr"] .fx-item { opacity: 0.28; font-size: 22px; }
#fx[data-kind="sommer"] .spark { opacity: 0.55; }
#fx[data-kind="winter"] .fx-item { opacity: 0.5; }
#fx[data-kind="gta"] .fx-item { opacity: 0.2; }
#fx[data-kind="musik"] .fx-item { opacity: 0.28; font-size: 30px; }
.mote {
  border-radius: 50%;
  background: #1f3a5f;
  filter: blur(1px);
  animation-name: rise;
}
.mote.copper { background: #c4784a; }
.sunset {
  border-radius: 50%;
  animation-name: glide;
}
.note {
  animation-name: note-drift;
  animation-direction: alternate;
  animation-timing-function: ease-in-out;
}
.sunset-orb { filter: blur(8px); }
.sun {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff4c8 0%, #ffe08a 28%, #f4a261 58%, rgba(244, 162, 97, 0) 72%);
  animation-name: glide;
  opacity: 0.85;
}
.spark {
  border-radius: 50%;
  animation-name: rise;
  box-shadow: 0 0 8px #f4a261;
}
.petal { display: inline-block; animation: sway 2.4s ease-in-out infinite; }
.flyer { animation-name: fly; }
.faller { animation-name: fall; }
.leaf {
  display: block;
  width: 16px;
  height: 22px;
  background: var(--brand);
  border-radius: 0 80% 0 80%;
  animation: sway 2.4s ease-in-out infinite;
}
.flake { font-size: 18px; }
.dot {
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 8px #fff;
}
.flap { display: inline-block; animation: flap 0.28s ease-in-out infinite; }
.bob { display: inline-block; animation: bob 1.6s ease-in-out infinite; }

.confetti-bit {
  position: absolute;
  top: 0;
  animation-name: confetti-fall;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

@keyframes rise {
  from { transform: translate3d(0, 105vh, 0) rotate(0deg); }
  to { transform: translate3d(var(--drift, 0px), -20vh, 0) rotate(var(--spin, 180deg)); }
}
@keyframes glide {
  from { transform: translate3d(-30vw, 0, 0); }
  to { transform: translate3d(120vw, var(--drift, 0px), 0); }
}
@keyframes note-drift {
  from { transform: translate3d(0, 0, 0) rotate(0deg); }
  to { transform: translate3d(var(--drift, 48px), 0, 0) rotate(var(--spin, 24deg)); }
}
@keyframes fly {
  from { transform: translate3d(-15vw, 0, 0) rotate(0deg); }
  to { transform: translate3d(115vw, var(--drift, 0px), 0) rotate(var(--spin, 20deg)); }
}
@keyframes fall {
  from { transform: translate3d(0, -12vh, 0) rotate(0deg); }
  to { transform: translate3d(var(--drift, 0px), 110vh, 0) rotate(var(--spin, 180deg)); }
}
@keyframes pulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.45); }
}
@keyframes sway {
  0%, 100% { transform: translateX(-14px) rotate(-24deg); }
  50% { transform: translateX(14px) rotate(24deg); }
}
@keyframes flap {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(0.45) scaleX(1.08); }
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@keyframes arrive {
  from { opacity: 0; transform: scale(0.86); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes pulse-name {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}
@keyframes confetti-fall {
  to { transform: translate3d(var(--drift, 0px), 800px, 0) rotate(720deg); }
}

@media (prefers-reduced-motion: reduce) {
  #fx { display: none; }
  .result-name, .leaf, .flap, .bob, .petal, .sun { animation: none; }
}
