:root {
  --bg: #fff6fa;
  --bg2: #f3fbf6;
  --ink: #3a2948;
  --muted: #84748f;
  --rose: #e9578c;
  --rose-d: #c93f73;
  --rose-soft: #ffe3ee;
  --mint: #63c99a;
  --mint-soft: #ddf6e9;
  --sun: #ffcf4d;
  --sky: #cdeeff;
  --lav: #a98ae8;
  --lav-soft: #efe8ff;
  --orange: #f29a3a;
  --red: #e2574c;
  --card: #ffffff;
  --line: #f0dde8;
  --r: 18px;
  --sh: 0 6px 22px rgba(170, 80, 130, .12);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--ink);
  font-family: ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: radial-gradient(1200px 600px at 10% -10%, #ffe9f2 0, transparent 60%), radial-gradient(900px 500px at 100% 0, #e4f7ff 0, transparent 60%), linear-gradient(180deg, var(--bg), var(--bg2));
  background-attachment: fixed;
  font-size: 17px; line-height: 1.45;
}
#app { max-width: 860px; margin: 0 auto; padding: 12px 16px 60px; }
h1, h2, h3, h4 { margin: .2em 0 .4em; line-height: 1.2; }
h1 { font-size: 1.6rem; }
i { font-family: "Times New Roman", Georgia, serif; font-size: 1.12em; }
sup { font-size: .68em; line-height: 0; }
.hidden { display: none !important; }
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--sh); padding: 18px 20px; margin: 12px 0; }

/* Buttons */
.btn {
  font: inherit; border: 2px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 14px; padding: 10px 16px; cursor: pointer; font-weight: 600;
  transition: transform .08s, box-shadow .15s, background .15s; touch-action: manipulation;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: linear-gradient(180deg, #f2689a, var(--rose)); border-color: var(--rose-d); color: #fff; box-shadow: 0 4px 0 var(--rose-d); }
.btn.primary:active:not(:disabled) { box-shadow: 0 1px 0 var(--rose-d); transform: translateY(3px); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: rgba(255,255,255,.7); }
.btn.big { width: 100%; padding: 16px; font-size: 1.25rem; display: flex; flex-direction: column; align-items: center; }
.btn.big small { font-weight: 500; font-size: .85rem; opacity: .9; }
.btn.small { padding: 6px 12px; font-size: .9rem; }
.btn.pulse { animation: pulse 1.2s infinite; border-color: var(--lav); }
.row-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }

/* Topbar */
.top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 0 6px; }
.brand { font-weight: 800; font-size: 1.3rem; color: var(--rose-d); }
.stats { display: flex; gap: 6px; align-items: center; }
.pill { background: #fff; border-radius: 999px; padding: 5px 11px; box-shadow: 0 2px 8px rgba(0,0,0,.06); font-weight: 700; font-size: .95rem; border: 0; font-family: inherit; color: inherit; white-space: nowrap; }
.pill.sound { cursor: pointer; }
.pill.bump { animation: bump .5s; }
.pill.combo { opacity: .45; }
.pill.combo.on { opacity: 1; background: #fff1dc; }

/* Intro */
.intro { text-align: center; padding: 28px 22px; margin-top: 30px; }
.intro-hero { font-size: 3rem; letter-spacing: 6px; animation: float 3s ease-in-out infinite; }
.intro .lead { font-size: 1.1rem; }
.how { text-align: left; max-width: 560px; margin: 16px auto; padding: 0; list-style: none; }
.how li { background: var(--rose-soft); border-radius: 12px; padding: 10px 14px; margin: 8px 0; }
.field { display: block; margin: 16px auto; max-width: 420px; font-weight: 700; text-align: left; }
.field input { display: block; width: 100%; font: inherit; font-size: 1.2rem; padding: 12px 14px; border-radius: 12px; border: 2px solid var(--line); margin-top: 6px; }
.flowers { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.fl { font-size: 1.8rem; background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: 4px 8px; cursor: pointer; }
.fl.sel { border-color: var(--rose); background: var(--rose-soft); transform: scale(1.1); }

/* Home */
.hello { display: flex; align-items: center; gap: 16px; justify-content: space-between; }
.hello-txt { font-size: 1.2rem; font-weight: 800; flex: 1; }
.hello-txt span { display: block; font-weight: 500; font-size: 1rem; color: var(--muted); }
.hello-txt small { font-weight: 600; color: var(--lav); font-size: .85rem; }
.xpbar { height: 8px; background: var(--lav-soft); border-radius: 9px; margin: 8px 0 2px; overflow: hidden; max-width: 320px; }
.xpbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--lav), #d58cf0); border-radius: 9px; }
.ring { --p: 0; width: 84px; height: 84px; flex: none; border-radius: 50%; background: conic-gradient(var(--mint) calc(var(--p) * 1%), #edf3ef 0); display: grid; place-items: center; }
.ring span { width: 66px; height: 66px; border-radius: 50%; background: #fff; display: grid; place-items: center; text-align: center; line-height: 1; font-size: .9rem; }
.ring b { font-size: 1.3rem; display: block; }
.ring small { font-size: .7rem; color: var(--muted); display: block; }

.garden { border-radius: 24px; overflow: hidden; box-shadow: var(--sh); margin: 12px 0; background: linear-gradient(180deg, #a5dcb4, #7fc79a); }
.sky { position: relative; height: 130px; background: linear-gradient(180deg, #bfe8ff 0, #e8f7ff 80%, #a6e3b6 80%, #8fd8a8 100%); }
.sun { position: absolute; right: 22px; top: 10px; font-size: 2.6rem; animation: spin 40s linear infinite; }
.cloud { position: absolute; font-size: 2.2rem; opacity: .9; animation: drift 30s linear infinite; }
.cloud.c1 { top: 12px; left: -10%; }
.cloud.c2 { top: 42px; left: -20%; animation-delay: -14s; font-size: 1.7rem; }
.deco { position: absolute; transform: translate(-50%, 0); line-height: 1; filter: drop-shadow(0 2px 2px rgba(0,0,0,.15)); animation: bob 4s ease-in-out infinite; }
.deco:nth-child(odd) { animation-delay: -2s; }
.beds { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; padding: 14px; }
.bed { font: inherit; color: var(--ink); text-align: left; cursor: pointer; border: 0; border-radius: 16px; padding: 10px 12px 12px; background: #fff9f1; box-shadow: 0 4px 0 rgba(0,0,0,.1); border-top: 6px solid var(--wc); transition: transform .12s; }
.bed:hover { transform: translateY(-3px) rotate(-.4deg); }
.bed-title { font-weight: 800; }
.bed-sub { font-size: .85rem; color: var(--muted); }
.soil { border-radius: 12px; padding: 6px 8px 4px; margin: 8px 0 6px; display: flex; gap: 4px; justify-content: space-around; min-height: 52px; align-items: flex-end; }
.soil { position: relative; overflow: hidden; }
.hdeco { position: absolute; top: 3px; right: 8px; font-size: .8rem; opacity: .4; letter-spacing: 6px; pointer-events: none; z-index: 0; }
.pet { position: relative; display: inline-block; font-size: 2rem; line-height: 1; transform-origin: bottom center; z-index: 1; }
.pet.st0 { font-size: 1.2rem; opacity: .55; padding-bottom: 6px; transform: rotate(-15deg); }
.pet.st1 { filter: brightness(0); opacity: .3; font-size: 1.8rem; }
.pet .qm { position: absolute; top: -6px; right: -6px; font-size: .9rem; font-weight: 900; color: #fff; filter: none; opacity: 1; }
.pet.st1 .qm { color: #000; }
.pet.st2 { font-size: 1.7rem; animation: peek 3s ease-in-out infinite; }
.pet.st3, .pet.st4 { animation: hop 2.4s ease-in-out infinite; }
.pet.st4 { filter: drop-shadow(0 0 7px #ff8fc4); }
.pet .spark { position: absolute; top: -10px; right: -10px; font-size: .85rem; animation: twinkle 1.5s infinite; }
.pet.xl { font-size: 3.2rem; }
.pet.xl.st0 { font-size: 2rem; }
.pname { font-size: .74rem; overflow-wrap: anywhere; font-weight: 700; color: var(--muted); margin-top: 2px; }
@keyframes hop { 0%, 70%, 100% { transform: translateY(0); } 80% { transform: translateY(-7px); } 90% { transform: translateY(0); } }
@keyframes peek { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-6deg) translateX(-2px); } }
.toast .pet { font-size: 1.6rem; vertical-align: middle; }
.small { font-size: .9rem; color: var(--muted); }
.bar { height: 9px; background: #f2e6ee; border-radius: 9px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--mint), #a7e07a); border-radius: 9px; transition: width .6s; }

.actions { margin-top: 14px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-top: 12px; }
.btn.tile { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 10px; font-size: 1.6rem; border-radius: 18px; background: #fff; box-shadow: var(--sh); border-color: transparent; }
.btn.tile b { font-size: 1rem; }
.btn.tile small { font-size: .78rem; color: var(--muted); font-weight: 500; }

/* Welt */
.world-head { border-top: 8px solid var(--wc); text-align: center; }
.skill { display: flex; align-items: center; gap: 16px; }
.skill-plant { width: 92px; text-align: center; flex: none; }
.skill-info { flex: 1; min-width: 0; }
.skill-info h3 { margin: 0; }
.skill .ex { color: var(--muted); font-size: .95rem; }
.skill .meta { font-size: .85rem; margin: 4px 0; color: var(--muted); }
.skill small { color: var(--muted); font-size: .8rem; }
.lvlpill { display: inline-block; border-radius: 999px; padding: 1px 9px; font-size: .78rem; font-weight: 700; color: #fff; }
.lvlpill.l1 { background: var(--mint); }
.lvlpill.l2 { background: var(--orange); }
.lvlpill.l3 { background: var(--lav); }
.reppill { font-size: .78rem; background: #fff1dc; border-radius: 999px; padding: 1px 8px; }

/* Aufgabe */
.task-top .dots { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.dot { width: 14px; height: 14px; border-radius: 50%; background: #eadde5; }
.dot.cur { background: #fff; box-shadow: 0 0 0 3px var(--rose); }
.dot.ok { background: var(--mint); }
.dot.bad { background: var(--red); }
.dot.half { background: var(--sun); }
.task { padding: 18px 20px 16px; }
.task-meta { display: flex; gap: 10px; align-items: center; font-size: .9rem; color: var(--muted); font-weight: 600; flex-wrap: wrap; border-left: 5px solid var(--wc); padding-left: 10px; }
.task-title { font-size: 1.15rem; margin-top: 10px; }
.q { font-size: 1.7rem; text-align: center; padding: 16px 8px; margin: 6px 0 12px; background: #fffaf3; border-radius: 14px; border: 2px dashed #f3dfc7; overflow-x: auto; }
.q.small { font-size: 1.15rem; padding: 8px; }
.ansrow { display: flex; align-items: center; gap: 8px; margin: 8px 0 2px; }
.ansrow .lab { font-size: 1.15rem; font-weight: 700; white-space: nowrap; }
input.ans { font: inherit; font-size: 1.35rem; padding: 10px 14px; border-radius: 12px; border: 2px solid var(--line); flex: 1; min-width: 0; width: 100%; background: #fff; color: var(--ink); }
input.ans:focus { outline: none; border-color: var(--lav); box-shadow: 0 0 0 4px var(--lav-soft); }
input.ans.ok { border-color: var(--mint); background: var(--mint-soft); }
input.ans.bad { border-color: var(--red); background: #fff0ee; }
input.ans:disabled { color: var(--ink); -webkit-text-fill-color: var(--ink); opacity: 1; }
.preview { min-height: 1.6em; font-size: 1.15rem; padding: 2px 4px 4px; color: var(--ink); }
.preview .pl { font-size: .8rem; color: var(--muted); }
.preview .perr { font-size: .85rem; color: var(--orange); }
.keypad { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; }
.k { font: inherit; font-size: 1.15rem; min-width: 46px; padding: 8px 10px; border-radius: 10px; border: 0; background: var(--lav-soft); color: var(--ink); cursor: pointer; box-shadow: 0 2px 0 #d8ccf5; touch-action: manipulation; }
.k.var { background: #fff1dc; box-shadow: 0 2px 0 #f0d6ad; font-family: "Times New Roman", Georgia, serif; font-style: italic; font-size: 1.3rem; }
.k:active { transform: translateY(2px); box-shadow: none; }
.task-actions { display: flex; gap: 8px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.spacer { flex: 1; }
.feedback { display: none; border-radius: 14px; padding: 12px 14px; margin-top: 12px; }
.feedback.show { display: block; }
.feedback.ok { background: var(--mint-soft); border: 2px solid var(--mint); }
.feedback.bad { background: #fff0ee; border: 2px solid #f4b4ad; }
.feedback.info { background: #eef6ff; border: 2px solid #b8d8f8; }
.feedback.warn { background: #fff6e0; border: 2px solid #f6d48a; }
.feedback.neutral { background: #f6f2f8; border: 2px solid var(--line); }
.feedback .again, .feedback .encour { margin-top: 6px; color: var(--muted); font-size: .95rem; }
.feedback .plus { font-weight: 800; color: #b88400; margin-left: 6px; }
.combo-txt { font-weight: 800; color: var(--orange); }
.hint { background: #fffbe6; border: 2px solid #f8e39a; border-radius: 14px; padding: 10px 14px; margin-top: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; font-size: 1.2rem; }
.tchip { padding: 2px 8px; border-radius: 8px; }
.tchip.ok { background: #c9f0d9; }
.tchip.sign { background: #ffd9b3; }
.tchip.coef { background: #fff0a6; }
.tchip.bad { background: #ffc8c2; }
.sol { margin-top: 10px; background: #fff; border-radius: 12px; padding: 8px 12px; }
.sol summary { cursor: pointer; font-weight: 700; color: var(--rose-d); }
.steps { display: grid; grid-template-columns: auto auto 1fr; gap: 4px 8px; font-size: 1.2rem; margin: 10px 0; overflow-x: auto; align-items: center; }
.st { display: contents; }
.st .lhs { text-align: right; white-space: nowrap; }
.st .rhs { white-space: nowrap; }
.formula { background: var(--lav-soft); border-radius: 10px; padding: 6px 10px; display: inline-block; margin: 6px 0; font-weight: 600; }
.final { font-size: 1.15rem; }
.probe { color: var(--muted); }
.fixq { font-size: 1.1rem; margin: 12px 0 0; }
.choice { font-size: 1.3rem; padding: 14px 18px; }
.choice.ok { background: var(--mint-soft); border-color: var(--mint); }
.choice.bad { background: #fff0ee; border-color: var(--red); }
.tfbtns { display: flex; gap: 12px; justify-content: center; }
.tfbtns .btn { flex: 1; max-width: 220px; }
.mc { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.chipline { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px; }
.chip { font: inherit; font-size: 1.6rem; border: 2px dashed #e2c9d6; background: #fff; border-radius: 12px; padding: 2px 10px; cursor: pointer; color: var(--ink); }
.chip.sel { border: 2px solid var(--lav); background: var(--lav-soft); }
.chip.bad { border: 2px solid var(--red); background: #fff0ee; text-decoration: line-through; }
.chip.okchip { border: 2px solid var(--mint); background: var(--mint-soft); }
.gapline { font-size: 1.6rem; text-align: center; padding: 16px 6px; background: #fffaf3; border-radius: 14px; border: 2px dashed #f3dfc7; line-height: 2.4; }
input.ans.gap { display: inline-block; width: 4.4em; flex: none; font-size: 1.3rem; padding: 4px 6px; text-align: center; vertical-align: middle; margin: 0 4px; }

/* Flächen / Rechteck */
.boxwrap { margin: 4px 0 8px; }
.boxhelp { background: #f9f6ff; border-radius: 14px; padding: 10px 12px; }
.boxnote { margin: 0 0 8px; font-size: .95rem; }
.boxfb { margin-top: 6px; font-size: .95rem; }
.area { display: grid; grid-template-columns: auto repeat(var(--cols), minmax(70px, 1fr)); gap: 3px; max-width: 520px; margin: 6px auto 8px; }
.area .corner { min-width: 30px; }
.area .side { font-size: 1.25rem; text-align: center; padding: 2px 6px; display: flex; align-items: center; justify-content: center; font-weight: 600; }
.area .cell { border-radius: 8px; min-height: 52px; display: flex; align-items: center; justify-content: center; padding: 4px; font-size: 1.2rem; border: 2px solid rgba(0,0,0,.12); }
.area .cell input.ans { font-size: 1.1rem; padding: 6px; text-align: center; background: rgba(255,255,255,.8); }
.area.fig { max-width: 460px; }
.area.mini { max-width: 260px; margin: 6px 0; }
.area.mini .cell { min-height: 40px; font-size: 1rem; }
.area.mini .side { font-size: 1rem; }
.pop { animation: pop .4s; }

/* Modal & Spickzettel */
.modal { position: fixed; inset: 0; background: rgba(60, 30, 70, .35); display: grid; place-items: center; z-index: 50; padding: 16px; animation: fade .2s; }
.modal-box { background: #fff; border-radius: 22px; padding: 22px; max-width: 680px; width: 100%; max-height: 88vh; overflow: auto; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal-box .x { position: absolute; right: 12px; top: 10px; border: 0; background: #f6eef3; border-radius: 50%; width: 36px; height: 36px; font-size: 1rem; cursor: pointer; }
.cheat h3 { color: var(--rose-d); font-size: 1.5rem; }
.cheat h4 { margin: 18px 0 4px; color: var(--lav); }
.cheat .rule { background: var(--rose-soft); border-radius: 12px; padding: 10px 12px; }
.cheat .big { font-size: 1.3rem; text-align: center; margin: 8px 0; }
.cheat .row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.cheat .row p { flex: 1; min-width: 200px; }
.formulas { display: grid; gap: 6px; font-size: 1.25rem; }
.formulas div { background: var(--lav-soft); border-radius: 10px; padding: 8px 12px; }
.signs td { padding: 4px 14px; font-size: 1.15rem; background: #f7f3fa; border-radius: 8px; }

/* Zusammenfassung */
.summary { text-align: center; }
.stars { font-size: 3rem; color: #eadde5; letter-spacing: 6px; }
.stars .on { color: #ffc93c; display: inline-block; animation: pop .5s backwards; text-shadow: 0 2px 0 #e0a800; }
.stars .on:nth-child(2) { animation-delay: .2s; }
.stars .on:nth-child(3) { animation-delay: .4s; }
.summary .big { font-size: 1.25rem; font-weight: 700; }
.summary .coins { font-size: 1.2rem; font-weight: 800; color: #b88400; }
.growth { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 16px 0; }
.gr { background: #fbf7fa; border-radius: 14px; padding: 10px; }
.gr small { color: var(--muted); }
.grp { animation: grow .8s; }
.tip { background: #fffbe6; border-radius: 12px; padding: 10px; }
.grade { font-size: 4rem; font-weight: 900; width: 110px; height: 110px; border-radius: 50%; margin: 8px auto; display: grid; place-items: center; color: #fff; background: var(--mint); }
.grade.g3 { background: var(--sun); }
.grade.g4 { background: var(--orange); }
.grade.g5, .grade.g6 { background: var(--red); }
.review { text-align: left; }
.rv { border-radius: 12px; padding: 8px 12px; margin: 6px 0; background: #fbf7fa; border-left: 6px solid var(--mint); }
.rv.bad { border-left-color: var(--red); }
.rv.half { border-left-color: var(--sun); }
.rv summary { cursor: pointer; font-weight: 700; }
.wrap { flex-wrap: wrap; }

/* Shop, Abzeichen */
.shop, .badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.item, .badge { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 0; padding: 14px 10px; }
.item .ico, .badge .ico { font-size: 2.6rem; }
.item.own { background: var(--mint-soft); }
.owned { color: #2f8f62; font-weight: 700; font-size: .9rem; }
.badge { opacity: .55; }
.badge.has { opacity: 1; background: linear-gradient(180deg, #fff, #fff6d8); }
.badge small { color: var(--muted); font-size: .8rem; }
.settings p { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Memory */
.memgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.mcard { position: relative; height: 96px; border: 0; padding: 0; cursor: pointer; perspective: 600px; background: transparent; font: inherit; color: var(--ink); }
.mcard span { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 14px; backface-visibility: hidden; -webkit-backface-visibility: hidden; transition: transform .4s; padding: 4px; }
.mcard .back { background: linear-gradient(135deg, #f7a6c4, #c7a6f2); font-size: 2rem; box-shadow: var(--sh); }
.mcard .front { background: #fff; transform: rotateY(180deg); font-size: 1.05rem; box-shadow: var(--sh); border: 3px solid var(--line); }
.mcard.S .front { background: #f6fbff; }
.mcard.open .back, .mcard.matched .back { transform: rotateY(180deg); }
.mcard.open .front, .mcard.matched .front { transform: rotateY(360deg); }
.mcard.matched .front { border-color: var(--mint); background: var(--mint-soft); }

/* Toasts */
#toasts { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; width: min(92vw, 520px); pointer-events: none; }
.toast { background: #fff; border-radius: 16px; padding: 10px 16px; box-shadow: 0 10px 30px rgba(0,0,0,.18); animation: up .35s; transition: opacity .5s, transform .5s; text-align: center; }
.toast.gold { background: linear-gradient(180deg, #fffbe9, #fff1c2); border: 2px solid #f5d36b; }
.toast.out { opacity: 0; transform: translateY(10px); }
.big-ico { font-size: 1.6rem; vertical-align: middle; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 70; }

/* Brüche */
.fr { display: inline-flex; flex-direction: column; vertical-align: middle; text-align: center; font-size: .78em; line-height: 1.05; margin: 0 2px; }
.fr .nu { border-bottom: 1.5px solid currentColor; padding: 0 2px; }
.fr .de { padding: 0 2px; }

/* Animationen */
.shake { animation: shake .4s; }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@keyframes pop { 0% { transform: scale(.3); opacity: 0; } 70% { transform: scale(1.15); } 100% { transform: scale(1); opacity: 1; } }
@keyframes bump { 50% { transform: scale(1.25); } }
@keyframes float { 50% { transform: translateY(-8px); } }
@keyframes sway { 0%,100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
@keyframes bob { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -4px); } }
@keyframes twinkle { 50% { opacity: .3; transform: scale(.7); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(130vw); } }
@keyframes grow { from { transform: scale(.4); opacity: .2; } to { transform: scale(1); opacity: 1; } }
@keyframes up { from { transform: translateY(20px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px var(--lav-soft); } }

@media (max-width: 560px) {
  body { font-size: 16px; }
  #app { padding: 8px 12px 50px; }
  .q { font-size: 1.35rem; }
  .gapline { font-size: 1.25rem; }
  .chip { font-size: 1.25rem; }
  .hello { gap: 10px; }
  .hello-txt { font-size: 1.05rem; }
  .ring { width: 70px; height: 70px; }
  .ring span { width: 54px; height: 54px; }
  .ring b { font-size: 1.05rem; }
  .memgrid { grid-template-columns: repeat(3, 1fr); }
  .mcard { height: 88px; }
  .mcard .front { font-size: .92rem; }
  .steps { font-size: 1.05rem; }
  .pill { padding: 4px 8px; font-size: .85rem; }
  .brand { font-size: 1.05rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.mcard .fi { display: inline; text-align: center; line-height: 1.3; }
.k[data-k="²"], .k[data-k="³"] { font-size: 1.35rem; font-weight: 700; }
