:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --surface-2: #efede6;
  --text: #1c1c22;
  --muted: #6f6f78;
  --text-muted: var(--muted);
  --accent: #7c5cff;
  --accent-soft: rgba(124, 92, 255, 0.12);
  --border: rgba(28, 28, 34, 0.1);
  --bot-bubble: #ffffff;
  --user-bubble: #7c5cff;
  --user-text: #ffffff;
  --shadow: 0 10px 30px rgba(20, 20, 26, 0.08);
}

[data-theme="dark"] {
  --bg: #141418;
  --surface: #1c1c24;
  --surface-2: #24242e;
  --text: #f0eff4;
  --muted: #9a9aa5;
  --border: rgba(240, 239, 244, 0.09);
  --bot-bubble: #1d1d25;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141418;
    --surface: #1c1c24;
    --surface-2: #24242e;
    --text: #f0eff4;
    --muted: #9a9aa5;
    --border: rgba(240, 239, 244, 0.09);
    --bot-bubble: #1d1d25;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  overflow: hidden;
  transition: background 0.3s ease;
}

/* Pastel mesh gradient — light mode */
[data-theme="light"] body {
  background:
    radial-gradient(ellipse 65% 55% at 12% 18%, rgba(255, 183, 213, 0.5), transparent 62%),
    radial-gradient(ellipse 60% 50% at 88% 12%, rgba(186, 156, 255, 0.45), transparent 62%),
    radial-gradient(ellipse 65% 55% at 82% 88%, rgba(147, 217, 255, 0.45), transparent 62%),
    radial-gradient(ellipse 55% 50% at 12% 88%, rgba(167, 243, 208, 0.42), transparent 62%),
    linear-gradient(160deg, #fff7f9 0%, #f4f0ff 45%, #edf7ff 100%);
  background-attachment: fixed;
}

/* Tinted pastel glows on dark base */
[data-theme="dark"] body {
  background:
    radial-gradient(ellipse 60% 50% at 15% 15%, rgba(255, 140, 190, 0.12), transparent 60%),
    radial-gradient(ellipse 55% 45% at 85% 15%, rgba(150, 120, 255, 0.14), transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 90%, rgba(100, 190, 255, 0.12), transparent 60%),
    radial-gradient(ellipse at 50% 0%, #1a1a22 0%, #141418 60%);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body {
    background:
      radial-gradient(ellipse 60% 50% at 15% 15%, rgba(255, 140, 190, 0.12), transparent 60%),
      radial-gradient(ellipse 55% 45% at 85% 15%, rgba(150, 120, 255, 0.14), transparent 60%),
      radial-gradient(ellipse 60% 50% at 80% 90%, rgba(100, 190, 255, 0.12), transparent 60%),
      radial-gradient(ellipse at 50% 0%, #1a1a22 0%, #141418 60%);
  }
}

#app {
  display: grid;
  grid-template-rows: auto 1fr;
  height: 100dvh;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.hidden { display: none !important; }

/* ── Effects Layer (fixed, full viewport, no overflow clip) ── */
.fx-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
  overflow: visible;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand-dot {
  width: 14px;
  height: 14px;
  border-radius: 50% 46% 52% 48%;
  background: linear-gradient(145deg, #33333f, #101016);
  box-shadow: inset -2px -2px 3px rgba(255, 255, 255, 0.08);
}

.actions { display: flex; gap: 6px; }

.btn {
  border: none;
  cursor: pointer;
  font: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 999px;
  transition: transform 0.15s ease, background 0.2s ease, opacity 0.2s ease;
}

.btn:active { transform: scale(0.94); }

.btn.ghost {
  background: transparent;
  color: var(--muted);
  width: 38px;
  height: 38px;
}

.btn.ghost:hover { background: var(--accent-soft); color: var(--accent); }

.btn.ghost.on { color: var(--accent); }

.btn.primary {
  background: var(--accent);
  color: #fff;
  padding: 10px 18px;
  font-weight: 600;
}

#btnInstall { width: auto; padding: 0 14px; color: var(--accent); font-weight: 600; }

.main-content {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.stage-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 42dvh;
  position: relative;
  overflow: hidden;
}

.stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  perspective: 600px;
  perspective-origin: 50% 50%;
}
#blobSvg {
  transform-style: preserve-3d;
  backface-visibility: visible;
}

[data-theme="dark"] .stage,
:root:not([data-theme="light"]) .stage {
  background: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .stage {
    background: none;
  }
}

[data-theme="light"] .stage {
  background: none;
}
[data-theme="light"] .stage::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 80px;
  background: linear-gradient(90deg,
    rgba(255, 100, 100, 0.08),
    rgba(255, 180, 50, 0.08),
    rgba(100, 255, 100, 0.08),
    rgba(100, 180, 255, 0.08),
    rgba(200, 100, 255, 0.08)
  );
  filter: blur(20px);
  pointer-events: none;
  animation: auroraShift 8s ease-in-out infinite alternate;
}
@keyframes auroraShift {
  0% { opacity: 0.5; transform: translateX(-10px); }
  50% { opacity: 0.8; }
  100% { opacity: 0.5; transform: translateX(10px); }
}
:root:not([data-theme="light"]) .stage::before,
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .stage::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 80px;
    background: linear-gradient(90deg,
      rgba(255, 120, 120, 0.06),
      rgba(255, 200, 80, 0.06),
      rgba(120, 255, 150, 0.06),
      rgba(120, 180, 255, 0.06),
      rgba(220, 120, 255, 0.06)
    );
    filter: blur(25px);
    pointer-events: none;
    animation: auroraShift 8s ease-in-out infinite alternate;
  }
}
.stage.power svg {
  filter: drop-shadow(0 0 18px var(--accent));
  transition: filter 0.15s;
}
@keyframes powerPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}
.stage.power svg { animation: powerPulse 0.5s ease-in-out 3; }

/* ── Comet Flying Animation ── */
.stage.comet-fly svg {
  animation: cometFly 2.8s cubic-bezier(0.22, 0.61, 0.36, 1) forwards !important;
  filter: drop-shadow(0 0 20px rgba(255,120,40,0.9)) drop-shadow(-12px 6px 10px rgba(255,60,10,0.7)) brightness(1.4) !important;
  z-index: 50;
  transition: none !important;
}
.stage.comet-fly svg::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 100%;
  width: 120px;
  height: 24px;
  background: linear-gradient(to left, rgba(255, 200, 60, 0.95), rgba(255, 100, 20, 0.7) 40%, rgba(255, 50, 0, 0.3) 70%, transparent);
  border-radius: 50%;
  transform: translateY(-50%);
  filter: blur(4px);
  animation: cometTail 2.8s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
  pointer-events: none;
}
@keyframes cometTail {
  0%   { width: 0; opacity: 0; }
  34%  { width: 0; opacity: 0; }
  36%  { width: 30px; opacity: 0.6; }
  40%  { width: 100px; opacity: 1; }
  60%  { width: 140px; opacity: 1; }
  80%  { width: 60px; opacity: 0.4; }
  81%  { width: 0; opacity: 0; }
  100% { width: 0; opacity: 0; }
}
@keyframes cometFly {
  0%   { transform: translate(0, 0) scale(1) rotate(0deg); opacity: 1; filter: drop-shadow(0 0 30px rgba(255,120,40,1)) drop-shadow(-20px 10px 15px rgba(255,60,10,0.9)) brightness(1.6); }
  5%   { transform: translate(0, 0) scale(0.75) rotate(15deg); }
  10%  { transform: translate(0, 0) scale(0.6) rotate(30deg); }
  35%  { transform: translate(calc(52vw), calc(-58vh)) scale(0.55) rotate(55deg); opacity: 1; filter: drop-shadow(0 0 25px rgba(255,100,30,1)) drop-shadow(25px -12px 18px rgba(255,40,0,0.8)) brightness(1.5); }
  40%  { transform: translate(calc(52vw), calc(-58vh)) scale(0.5) rotate(55deg); }
  80%  { transform: translate(calc(-38vw), calc(32vh)) scale(0.35) rotate(160deg); opacity: 0.3; filter: drop-shadow(0 0 15px rgba(255,80,20,0.6)) brightness(1.2); }
  81%  { transform: translate(0, 0) scale(0) rotate(0deg); opacity: 0; }
  90%  { transform: translate(0, 0) scale(0.9) rotate(0deg); opacity: 0; }
  100% { transform: translate(0, 0) scale(1) rotate(0deg); opacity: 1; filter: drop-shadow(0 0 0px transparent) brightness(1); }
}

/* ── Idle Animations ── */
.idle-anim {
  will-change: transform;
}
.stage-wrap:has(.idle-anim) { overflow: visible; }

@keyframes idleWalk {
  0%   { transform: translateX(-42vw) scaleX(-1); }
  45%  { transform: translateX(42vw) scaleX(-1); }
  50%  { transform: translateX(42vw) scaleX(-1) translateY(-10px); }
  100% { transform: translateX(-42vw) scaleX(-1); }
}
@keyframes idleRun {
  0%   { transform: translateX(-48vw) scaleX(-1); }
  50%  { transform: translateX(48vw) translateY(-20px); }
  100% { transform: translateX(-48vw) scaleX(-1); }
}
@keyframes idleFloat {
  0%   { transform: translate(0, 0) scale(1); }
  25%  { transform: translate(15vw, -18vh) scale(1.03); }
  50%  { transform: translate(-12vw, -8vh) scale(1.02); }
  75%  { transform: translate(8vw, -22vh) scale(1.01); }
  100% { transform: translate(0, 0) scale(1); }
}
@keyframes idleBounce {
  0%, 100% { transform: translateY(0) scaleY(1); }
  15%  { transform: translateY(-18vh) scaleY(1.08); }
  30%  { transform: translateY(0) scaleY(0.92) scaleX(1.08); }
  45%  { transform: translateY(-10vh) scaleY(1.04); }
  60%  { transform: translateY(0) scaleY(0.96) scaleX(1.04); }
  75%  { transform: translateY(-4vh) scaleY(1.01); }
}
@keyframes idleGrow {
  0%, 100% { transform: scale(1); }
  50%  { transform: scale(1.45); }
}
@keyframes idleShrink {
  0%, 100% { transform: scale(1); }
  40%  { transform: scale(0.4); }
  60%  { transform: scale(0.35); }
}
@keyframes idleSpin {
  0%   { transform: rotate(0deg) scale(1.05); }
  100% { transform: rotate(360deg) scale(1.05); }
}
@keyframes idleDrift {
  0%   { transform: translateX(0) rotate(0deg); }
  25%  { transform: translate(20vw, -5vh) rotate(3deg); }
  50%  { transform: translate(0, 0) rotate(0deg); }
  75%  { transform: translate(-20vw, 3vh) rotate(-3deg); }
  100% { transform: translateX(0) rotate(0deg); }
}
@keyframes idleTilt {
  0%, 100% { transform: rotate(0deg); }
  25%  { transform: rotate(12deg); }
  75%  { transform: rotate(-12deg); }
}
@keyframes idleJump {
  0%, 100% { transform: translateY(0); }
  10%  { transform: translateY(10px) scaleY(0.85); }
  30%  { transform: translateY(-80px) scaleX(0.92); }
  50%  { transform: translateY(-70px) scaleY(1.05); }
  70%  { transform: translateY(0) scaleY(0.9) scaleX(1.1); }
  85%  { transform: translateY(-15px); }
}
@keyframes idleSneak {
  0%   { transform: translateX(-35vw) translateY(15vh) scaleY(0.7) scaleX(1.15); }
  50%  { transform: translateX(35vw) translateY(15vh) scaleY(0.7) scaleX(1.15); }
  100% { transform: translateX(-35vw) translateY(15vh) scaleY(0.7) scaleX(1.15); }
}
@keyframes idleWiggle {
  0%, 100% { transform: rotate(0deg); }
  10%  { transform: rotate(-8deg); }
  20%  { transform: rotate(8deg); }
  30%  { transform: rotate(-6deg); }
  40%  { transform: rotate(6deg); }
  50%  { transform: rotate(0deg); }
}
@keyframes idlePulse {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50%  { transform: scale(1.15); filter: brightness(1.3); }
}
@keyframes idleWobble {
  0%, 100% { transform: scaleX(1) scaleY(1); }
  25%  { transform: scaleX(1.15) scaleY(0.88); }
  50%  { transform: scaleX(0.9) scaleY(1.1); }
  75%  { transform: scaleX(1.08) scaleY(0.94); }
}
@keyframes idleNod {
  0%, 100% { transform: rotate(0deg) translateY(0); }
  20%  { transform: rotate(8deg) translateY(4px); }
  40%  { transform: rotate(0deg) translateY(0); }
  60%  { transform: rotate(-8deg) translateY(4px); }
  80%  { transform: rotate(0deg) translateY(0); }
}
/* In-plane somersault — never goes edge-on like rotateX would */
@keyframes idleFlip {
  0%   { transform: translateY(0) rotate(0deg) scale(1, 1); }
  20%  { transform: translateY(-10vh) rotate(-90deg) scale(1, 0.92); }
  50%  { transform: translateY(-14vh) rotate(-180deg) scale(1.04, 1); }
  80%  { transform: translateY(-10vh) rotate(-270deg) scale(1, 0.92); }
  100% { transform: translateY(0) rotate(-360deg) scale(1, 1); }
}
@keyframes idleSlideLeft {
  0%   { transform: translateX(0); }
  30%  { transform: translateX(-38vw) rotate(-5deg); }
  50%  { transform: translateX(-38vw) rotate(-5deg) translateY(-12vh); }
  80%  { transform: translateX(0) rotate(0deg); }
  100% { transform: translateX(0); }
}
@keyframes idleSlideRight {
  0%   { transform: translateX(0); }
  30%  { transform: translateX(38vw) rotate(5deg); }
  50%  { transform: translateX(38vw) rotate(5deg) translateY(-12vh); }
  80%  { transform: translateX(0) rotate(0deg); }
  100% { transform: translateX(0); }
}

.idle-walk      { animation: idleWalk 3s ease-in-out 1; }
.idle-run       { animation: idleRun 1.8s ease-in-out 1; }
.idle-float     { animation: idleFloat 4s ease-in-out 1; }
.idle-bounce    { animation: idleBounce 2.2s ease-in-out 1; }
.idle-grow      { animation: idleGrow 2s ease-in-out 1; }
.idle-shrink    { animation: idleShrink 2.2s ease-in-out 1; }
.idle-spin      { animation: idleSpin 1.5s ease-in-out 1; }
.idle-drift     { animation: idleDrift 5s ease-in-out 1; }
.idle-tilt      { animation: idleTilt 2s ease-in-out 1; }
.idle-jump      { animation: idleJump 1.4s ease-in-out 1; }
.idle-sneak     { animation: idleSneak 4s ease-in-out 1; }
.idle-wiggle    { animation: idleWiggle 1.2s ease-in-out 1; }
.idle-pulse     { animation: idlePulse 1.6s ease-in-out 1; }
.idle-wobble    { animation: idleWobble 1.8s ease-in-out 1; }
.idle-nod       { animation: idleNod 1.6s ease-in-out 1; }
.idle-flip      { animation: idleFlip 1s ease-in-out 1; }
.idle-slide-l   { animation: idleSlideLeft 3s ease-in-out 1; }
.idle-slide-r   { animation: idleSlideRight 3s ease-in-out 1; }
.idle-melt      { }
.stage-wrap:has(.idle-melt) { overflow: visible; }

/* ── Knock (blob approaches screen, fills bottom 2/3, knocks, screen shakes) ── */
.stage-wrap:has(.idle-knock) { overflow: visible; }
.idle-knock { animation: idleKnock 4s ease-in-out 1; }

@keyframes idleKnock {
  0%   { transform: scale(1) translateY(0); }
  15%  { transform: scale(1.4) translateY(6vh); }
  30%  { transform: scale(1.8) translateY(12vh); }
  40%  { transform: scale(2.2) translateY(16vh); filter: brightness(1.2); }
  /* First knock — blob fills bottom 2/3, top 1/3 empty */
  42%  { transform: scale(2.25) translateY(16vh) translateX(4px); }
  44%  { transform: scale(2.2) translateY(16vh) translateX(-4px); }
  46%  { transform: scale(2.25) translateY(16vh) translateX(3px); }
  48%  { transform: scale(2.2) translateY(16vh) translateX(0); }
  /* Second knock */
  55%  { transform: scale(2.25) translateY(16vh) translateX(4px); }
  57%  { transform: scale(2.2) translateY(16vh) translateX(-4px); }
  59%  { transform: scale(2.25) translateY(16vh) translateX(3px); }
  61%  { transform: scale(2.2) translateY(16vh) translateX(0); }
  /* Third knock */
  68%  { transform: scale(2.25) translateY(16vh) translateX(4px); }
  70%  { transform: scale(2.2) translateY(16vh) translateX(-4px); }
  72%  { transform: scale(2.25) translateY(16vh) translateX(3px); }
  74%  { transform: scale(2.2) translateY(16vh) translateX(0); }
  /* Pull back */
  85%  { transform: scale(1.5) translateY(6vh); filter: brightness(1); }
  100% { transform: scale(1) translateY(0); filter: brightness(1); }
}

/* Screen shake when blob knocks */
.stage.knocking { animation: screenShake 0.15s ease-in-out 3; }
@keyframes screenShake {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-4px, 2px); }
  50%  { transform: translate(3px, -3px); }
  75%  { transform: translate(-2px, 3px); }
  100% { transform: translate(0, 0); }
}

/* Glass crack flash overlay */
.knock-flash {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 80;
  background: radial-gradient(circle at 50% 45%, rgba(255,255,255,0.15), transparent 30%);
  animation: knockFlash 0.2s ease-out forwards;
}
@keyframes knockFlash {
  0%   { opacity: 0.8; }
  100% { opacity: 0; }
}

/* ── Peek-a-boo (only eyes visible from edge) ── */
.stage-wrap:has(.idle-peekaboo) { overflow: hidden; }
.idle-peekaboo { animation-duration: 4s; animation-timing-function: ease-in-out; animation-fill-mode: none; }

.idle-peekaboo-top    { animation-name: peekTop; }
.idle-peekaboo-bottom { animation-name: peekBottom; }
.idle-peekaboo-left   { animation-name: peekLeft; }
.idle-peekaboo-right  { animation-name: peekRight; }

@keyframes peekTop {
  0%   { transform: translate(0, 0) scale(1); }
  12%  { transform: translate(0, -78vh) scaleY(0.9); }
  18%  { transform: translate(5vw, -78vh) scaleY(0.9) rotate(3deg); }
  24%  { transform: translate(-4vw, -78vh) scaleY(0.9) rotate(-2deg); }
  30%  { transform: translate(3vw, -78vh) scaleY(0.9) rotate(1deg); }
  40%  { transform: translate(0, -78vh) scaleY(0.9); }
  65%  { transform: translate(0, -78vh) scaleY(0.9); }
  100% { transform: translate(0, 0) scale(1); }
}

@keyframes peekBottom {
  0%   { transform: translate(0, 0) scale(1); }
  12%  { transform: translate(0, 75vh) scaleY(0.9); }
  18%  { transform: translate(-5vw, 75vh) scaleY(0.9) rotate(-3deg); }
  24%  { transform: translate(4vw, 75vh) scaleY(0.9) rotate(2deg); }
  30%  { transform: translate(-3vw, 75vh) scaleY(0.9) rotate(-1deg); }
  40%  { transform: translate(0, 75vh) scaleY(0.9); }
  65%  { transform: translate(0, 75vh) scaleY(0.9); }
  100% { transform: translate(0, 0) scale(1); }
}

@keyframes peekLeft {
  0%   { transform: translate(0, 0) scale(1); }
  12%  { transform: translate(-68vw, 0) scaleX(0.9); }
  18%  { transform: translate(-68vw, -5vh) scaleX(0.9) rotate(-2deg); }
  24%  { transform: translate(-68vw, 4vh) scaleX(0.9) rotate(2deg); }
  30%  { transform: translate(-68vw, -2vh) scaleX(0.9) rotate(-1deg); }
  40%  { transform: translate(-68vw, 0) scaleX(0.9); }
  65%  { transform: translate(-68vw, 0) scaleX(0.9); }
  100% { transform: translate(0, 0) scale(1); }
}

@keyframes peekRight {
  0%   { transform: translate(0, 0) scale(1); }
  12%  { transform: translate(65vw, 0) scaleX(0.9); }
  18%  { transform: translate(65vw, 4vh) scaleX(0.9) rotate(2deg); }
  24%  { transform: translate(65vw, -5vh) scaleX(0.9) rotate(-2deg); }
  30%  { transform: translate(65vw, 2vh) scaleX(0.9) rotate(1deg); }
  40%  { transform: translate(65vw, 0) scaleX(0.9); }
  65%  { transform: translate(65vw, 0) scaleX(0.9); }
  100% { transform: translate(0, 0) scale(1); }
}

/* ── Power Flash Overlay ── */
.power-flash {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  animation: flashBang 0.6s ease-out forwards;
}
@keyframes flashBang {
  0%   { opacity: 0.7; }
  100% { opacity: 0; }
}
.power-flash.burst  { background: radial-gradient(circle at center, rgba(255,80,20,0.5), transparent 70%); animation: flashBang 0.5s ease-out forwards; }
.power-flash.comet  { background: radial-gradient(ellipse at center, rgba(255,100,20,0.55), rgba(255,50,0,0.3) 50%, transparent 75%); animation: flashBang 0.8s ease-out forwards; }
.power-flash.orbit  { background: radial-gradient(circle at center, rgba(255,200,50,0.35), transparent 60%); }
.power-flash.swirl  { background: radial-gradient(circle at center, rgba(120,80,255,0.4), transparent 65%); }
.power-flash.exclaim{ background: radial-gradient(circle at center, rgba(255,255,100,0.5), transparent 50%); }
.power-flash.notify { background: radial-gradient(circle at center, rgba(100,255,180,0.4), transparent 60%); }
.power-flash.glow  { background: radial-gradient(circle at center, rgba(255,255,255,0.85), rgba(255,255,200,0.4) 35%, transparent 70%); animation: flashBang 1.2s ease-out forwards; }

/* ── Burst Shockwave Ring ── */
.burst-shockwave {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 4px solid rgba(255, 140, 40, 0.8);
  transform: translate(-50%, -50%) scale(0);
  pointer-events: none;
  z-index: 15;
  animation: shockwaveExpand 0.6s ease-out forwards;
}
@keyframes shockwaveExpand {
  0%   { transform: translate(-50%, -50%) scale(0); opacity: 1; border-width: 6px; }
  50%  { opacity: 0.6; border-width: 3px; }
  100% { transform: translate(-50%, -50%) scale(12); opacity: 0; border-width: 1px; }
}

/* ── Color Change Flash ── */
.stage.color-flash svg {
  animation: colorBurst 0.8s ease-out;
}
@keyframes colorBurst {
  0%   { transform: scale(1.3); filter: brightness(2) drop-shadow(0 0 30px var(--accent)); }
  50%  { transform: scale(1.1); filter: brightness(1.5) drop-shadow(0 0 20px var(--accent)); }
  100% { transform: scale(1); filter: brightness(1); }
}

#blobSvg {
  width: min(72vw, 340px);
  height: auto;
  cursor: pointer;
  touch-action: none;
  z-index: 2;
  position: relative;
  filter: drop-shadow(0 14px 28px rgba(100, 80, 160, 0.16));
}

/* ── Painted mode ("Lukis"): animated-WebP flipbook over the (hidden) SVG blob ── */
/* ukuran, posisi & transform di-set painted.js tiap frame supaya mengikuti #blobSvg */
.painted-view {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  display: none;
}
.painted-view canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.stage.painted .painted-view { display: block; }
#blobSvg { transition: opacity 0.25s ease; }
.stage.painted #blobSvg { opacity: 0 !important; filter: none; }
.stage.painted .zzz, .stage.painted .snore { display: none !important; }

/* ── Ground shadow (flat ellipse below blob) ── */
.blob-ground {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(44vw, 200px);
  height: min(8vw, 34px);
  border-radius: 50%;
  background: rgba(10, 10, 14, 0.28);
  filter: blur(10px);
  transform: translate(-50%, calc(-50% + 115px)) scaleX(1) scaleY(1);
  transition: opacity 0.2s ease;
  pointer-events: none;
  z-index: 1;
  will-change: transform, filter;
}
[data-theme="light"] .blob-ground {
  background: rgba(40, 38, 50, 0.22);
}
[data-theme="dark"] .blob-ground,
:root:not([data-theme="light"]) .blob-ground {
  background: rgba(0, 0, 0, 0.35);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .blob-ground {
    background: rgba(0, 0, 0, 0.35);
  }
}

[data-theme="dark"] #blobSvg,
:root:not([data-theme="light"]) #blobSvg {
  filter: drop-shadow(0 14px 30px rgba(124, 92, 255, 0.22));
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) #blobSvg {
    filter: drop-shadow(0 14px 30px rgba(124, 92, 255, 0.22));
  }
}

/* ── Idle badge (shows current running idle animation) ── */
.idle-badge {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  right: 14px;
  background: #0a0a0c;
  color: #f0eff4;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  z-index: 15;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 6px;
  animation: idleBadgeIn 0.3s ease-out;
}
.idle-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3ecf8e;
  animation: idleBadgePulse 1s ease-in-out infinite;
}
.idle-badge.hidden { display: none; }

/* ── Pet HUD (collapsed = lingkaran mood; tap → expand jadi quick-action bar) ── */
.pet-hud {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  left: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  height: 34px;
  max-width: 34px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: var(--shadow);
  z-index: 15;
  overflow: hidden;
  white-space: nowrap;
  transition: max-width 0.32s cubic-bezier(0.34, 1.3, 0.64, 1), padding 0.3s ease,
              border-color 0.3s ease;
}
.pet-hud.open { max-width: 220px; padding: 0 8px 0 0; }
/* Ada kebutuhan kritis → lingkaran berdenyut merah walau collapsed */
.pet-hud.need { border-color: #e8483f; }
.pet-hud.need .pet-hud-mood { animation: idleBadgePulse 1.2s ease-in-out infinite; }
.pet-hud button {
  border: none;
  background: none;
  padding: 2px;
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.pet-hud-mood {
  width: 32px;
  height: 32px;
  font-size: 16px;
  line-height: 1;
  border-radius: 50%;
  transition: transform 0.12s ease;
}
.pet-hud-mood:active { transform: scale(0.85); }
.pet-hud-act {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 30px;
  border-radius: 10px;
  opacity: 0;
  transform: scale(0.5);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.22s ease, background 0.15s ease;
}
.pet-hud.open .pet-hud-act { opacity: 1; transform: scale(1); pointer-events: auto; }
.pet-hud.open .pet-hud-act:nth-of-type(3) { transition-delay: 0.04s; }
.pet-hud.open .pet-hud-act:nth-of-type(4) { transition-delay: 0.08s; }
.pet-hud.open .pet-hud-act:nth-of-type(5) { transition-delay: 0.12s; }
.pet-hud-act:hover { background: var(--border); }
.pet-hud-act:active { transform: scale(0.82); }
.pet-hud-act em { font-style: normal; font-size: 13px; line-height: 1; }
.pet-hud-act b {
  display: block;
  height: 3px;
  width: 100%;
  border-radius: 999px;
  background: var(--border);
  transition: width 0.5s ease, background 0.4s ease;
}
.pet-hud-act.alert em { animation: idleBadgePulse 1.2s ease-in-out infinite; }

/* ── Pet panel ── */
.pet-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 16px 4px;
}
.pet-hero-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.pet-mood { font-weight: 700; font-size: 1.05rem; color: var(--text); }
.pet-sub { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }
.pet-stats {
  padding: 12px 16px 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pet-stat { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; }
.pet-ico { width: 20px; text-align: center; flex-shrink: 0; }
.pet-name { width: 52px; color: var(--text-muted); font-weight: 600; flex-shrink: 0; }
.pet-bar {
  flex: 1;
  height: 10px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  overflow: hidden;
}
.pet-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  transition: width 0.5s ease, background 0.4s ease;
}
.pet-fill.bond { background: #e152b0; }
.pet-val {
  width: 26px;
  text-align: right;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.pet-actions { padding-top: 6px; flex: none; }
.pet-hint { padding: 0 16px 14px; text-align: center; font-size: 0.8rem; }

/* Emoji terbang ke blob saat aksi perawatan — level body (fixed, z-45) supaya
   selalu terlihat di atas backdrop & panel bottom-sheet; geraknya via WAAPI */
.pet-fly {
  position: fixed;
  left: 0;
  top: 0;
  font-size: 1.7rem;
  z-index: 45;
  pointer-events: none;
  will-change: transform, opacity;
}

@keyframes idleBadgeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes idleBadgePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(0.7); }
}

.bubble {
  position: absolute;
  /* Mengambang tepat di atas kepala Mochi — radius visual blob = 100/316 lebar
     SVG (bukan setengah viewBox 158), jadi jaraknya nempel, bukan melayang jauh */
  bottom: calc(50% + min(22.8vw, 108px) + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--text) 12%, transparent);
  color: var(--text);
  padding: 7px 12px;
  border-radius: 14px 14px 14px 4px;
  box-shadow: 0 6px 18px rgba(20, 20, 26, 0.14), 0 2px 5px rgba(20, 20, 26, 0.08);
  font-size: 0.78rem;
  line-height: 1.35;
  white-space: pre-line;
  max-width: min(80%, 340px);
  text-align: center;
  z-index: 5;
}

.zzz {
  position: absolute;
  top: 18%;
  right: 18%;
  color: var(--muted);
  font-weight: 700;
  z-index: 4;
}

.zzz span { display: inline-block; animation: floatUp 2.4s infinite ease-in-out; opacity: 0; }
.zzz span:nth-child(2) { animation-delay: 0.6s; font-size: 1.2em; }
.zzz span:nth-child(3) { animation-delay: 1.2s; font-size: 1.5em; }

/* Snore bubble — appears from blob's nose area when sleeping */
.snore {
  position: absolute;
  top: 45%;
  left: 52%;
  width: 0;
  height: 0;
  z-index: 5;
  pointer-events: none;
}
.snore::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 14px;
  height: 18px;
  background: rgba(240, 239, 244, 0.85);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  transform-origin: bottom left;
  animation: snoreBubble 3s infinite ease-in-out;
}
@keyframes snoreBubble {
  0%   { transform: scale(0.3) translate(0, 0); opacity: 0; }
  20%  { transform: scale(0.6) translate(2px, -2px); opacity: 0.7; }
  50%  { transform: scale(1) translate(6px, -8px); opacity: 0.9; }
  80%  { transform: scale(1.3) translate(10px, -16px); opacity: 0.5; }
  100% { transform: scale(1.6) translate(14px, -24px); opacity: 0; }
}

.stage.listening::before {
  content: "";
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  opacity: 0.6;
  animation: ring 1.4s infinite ease-out;
  pointer-events: none;
}

.chips {
  display: flex;
  gap: 8px;
  padding: 12px 14px 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.chips::-webkit-scrollbar { display: none; }

.chip {
  flex-shrink: 0;
  font: inherit;
  font-size: 0.82rem;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.chip:hover { border-color: var(--accent); color: var(--accent); }

.log {
  flex: 1;
  overflow-y: auto;
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overscroll-behavior: contain;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  scroll-behavior: smooth;
}

.msg {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 0.95rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  animation: rise 0.25s ease;
}

.msg.bot {
  align-self: flex-start;
  position: relative;
  margin-left: 36px;
  max-width: calc(82% - 36px);
  background: var(--bot-bubble);
  border: 1px solid var(--border);
  border-bottom-left-radius: 6px;
  box-shadow: 0 2px 10px rgba(20, 20, 30, 0.05);
}

/* Avatar blob di tiap bubble bot */
.msg.bot::before {
  content: '';
  position: absolute;
  left: -34px;
  bottom: 0;
  width: 26px;
  height: 26px;
  background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 8C62 8 72 14 80 24C88 34 92 46 90 58C88 70 82 80 72 86C62 92 50 94 38 90C26 86 16 78 12 66C8 54 8 42 14 30C20 18 38 8 50 8Z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 8C62 8 72 14 80 24C88 34 92 46 90 58C88 70 82 80 72 86C62 92 50 94 38 90C26 86 16 78 12 66C8 54 8 42 14 30C20 18 38 8 50 8Z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.msg.user {
  align-self: flex-end;
  background: linear-gradient(135deg, #8f7bff 0%, #7c5cff 55%, #6a4ae0 100%);
  color: var(--user-text);
  border-bottom-right-radius: 6px;
  box-shadow: 0 3px 12px rgba(124, 92, 255, 0.3);
}

/* Tabel markdown di bubble bot — kartu rounded gaya Mochi:
   header gradient aksen, zebra row lembut, tanpa garis grid kaku */
.msg .md-table {
  border-collapse: separate;
  border-spacing: 0;
  margin: 8px 0;
  font-size: 0.82rem;
  max-width: 100%;
  display: block;
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid rgba(124, 92, 255, 0.22);
  box-shadow: 0 4px 14px rgba(124, 92, 255, 0.1);
}
.msg .md-table th,
.msg .md-table td {
  padding: 7px 12px;
  text-align: left;
  vertical-align: top;
  overflow-wrap: break-word;
  border: none;
}
/* Bubble berisi tabel boleh selebar penuh chat — kolom tidak kehimpit */
.msg.bot:has(.md-table) { max-width: calc(100% - 36px); }
/* Kolom punya lebar minimum supaya kata tidak terpotong aneh di layar sempit;
   kalau tetap tidak muat, tabel scroll horizontal (bukan memecah kata) */
.msg .md-table td { min-width: 80px; }
/* Tombol maps di dalam tabel dibuat lebih kecil agar tidak menghimpit kolom */
.msg .md-table a.md-btn {
  font-size: 0.72rem;
  padding: 3px 9px;
}
/* Sel terakhir (kolom tombol) tidak perlu min-width lebar */
.msg .md-table td:last-child { min-width: 0; }
.msg .md-table th {
  background: linear-gradient(135deg, #8f7bff 0%, #6a4ae0 100%);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.msg .md-table td { border-top: 1px solid var(--border); }
.msg .md-table tr:nth-child(even) td { background: var(--accent-soft); }
/* Mobile: tabel berubah jadi tumpukan kartu — tiap baris = 1 kartu rounded,
   tiap sel tampil "LABEL: nilai" (label dari header kolom via data-label) */
@media (max-width: 719px) {
  .msg .md-table { border: none; box-shadow: none; overflow: visible; }
  .msg .md-table tr:first-child { display: none; }
  .msg .md-table tr {
    display: block;
    background: var(--surface);
    border: 1px solid rgba(124, 92, 255, 0.22);
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(124, 92, 255, 0.1);
    margin: 8px 0;
    padding: 4px 0;
  }
  .msg .md-table td,
  .msg .md-table tr:nth-child(even) td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 5px 12px;
    border-top: none;
    background: none;
  }
  .msg .md-table td + td { border-top: 1px dashed var(--border); }
  .msg .md-table td::before {
    content: attr(data-label);
    flex-shrink: 0;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--accent);
    opacity: 0.75;
  }
}

.msg code {
  background: var(--surface-2);
  padding: 1px 5px;
  border-radius: 6px;
  font-size: 0.88em;
}
.msg a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-all;
}
/* Link maps → tombol pill, URL disembunyikan */
.msg a.md-btn {
  display: inline-block;
  background: var(--accent-soft);
  border: 1px solid rgba(124, 92, 255, 0.3);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 4px 12px;
  border-radius: 999px;
  text-decoration: none;
  margin: 2px 0;
  white-space: nowrap;
  transition: transform 0.12s ease, background 0.15s;
}
.msg a.md-btn:active { transform: scale(0.94); }

.typing {
  align-self: flex-start;
  display: inline-flex;
  gap: 4px;
  padding: 14px 16px;
  background: var(--bot-bubble);
  border: 1px solid var(--border);
  border-radius: 18px;
  border-bottom-left-radius: 6px;
}

.typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  animation: blinkDot 1.2s infinite;
}

.typing i:nth-child(2) { animation-delay: 0.2s; }
.typing i:nth-child(3) { animation-delay: 0.4s; }

.composer {
  display: flex;
  gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.composer input {
  flex: 1;
  font: inherit;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease;
}

.composer input:focus { border-color: var(--accent); }

.btn.send {
  width: 46px;
  height: 46px;
  background: var(--accent);
  color: #fff;
  flex-shrink: 0;
}

.chat-sidebar {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  border-top: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  animation: chatSlideUp 0.3s ease;
}
@keyframes chatSlideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px 6px;
  border-bottom: 1px solid var(--border);
}
.chat-header-title {
  font-weight: 700;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
/* Siluet blob mini — dipakai di header chat & avatar bubble bot */
.chat-avatar {
  width: 22px;
  height: 22px;
  background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 8C62 8 72 14 80 24C88 34 92 46 90 58C88 70 82 80 72 86C62 92 50 94 38 90C26 86 16 78 12 66C8 54 8 42 14 30C20 18 38 8 50 8Z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 8C62 8 72 14 80 24C88 34 92 46 90 58C88 70 82 80 72 86C62 92 50 94 38 90C26 86 16 78 12 66C8 54 8 42 14 30C20 18 38 8 50 8Z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.chat-mini { margin-left: auto; }
.chat-close, .chat-mini, .chat-max {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--surface-2);
  color: var(--text);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.chat-close:hover, .chat-close:active,
.chat-mini:hover, .chat-mini:active,
.chat-max:hover, .chat-max:active { background: var(--border); }
.chat-sidebar .chips {
  padding: 8px 12px 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.chat-sidebar .chips::-webkit-scrollbar { display: none; }
.chat-sidebar .log {
  flex: 1;
  overflow-y: auto;
  padding: 6px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  scroll-behavior: smooth;
}
.chat-sidebar .composer {
  border-top: none;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  box-shadow: 0 -2px 12px rgba(20, 20, 30, 0.05);
}
.chat-sidebar .composer .btn.send {
  background: linear-gradient(135deg, #8f7bff 0%, #6a4ae0 100%);
  box-shadow: 0 3px 10px rgba(124, 92, 255, 0.4);
}
.chat-sidebar .composer .btn.send:active { transform: scale(0.9); }
.chat-sidebar .composer input {
  padding: 10px 14px;
  font-size: 0.92rem;
}

/* Drag handle di atas panel — resize tinggi chat (layout kolom) */
.chat-handle {
  height: 14px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}
.chat-handle:active { cursor: grabbing; }
.chat-handle i {
  display: block;
  width: 36px;
  height: 4px;
  border-radius: 999px;
  background: var(--border);
  pointer-events: none;
}
/* Saat drag: log tidak ikut smooth-scroll, teks tidak ke-select */
.chat-sidebar.dragging .log { scroll-behavior: auto; }
body.chat-dragging { user-select: none; }

/* Minimized: hanya handle + header yang tampak */
.chat-sidebar.mini .log,
.chat-sidebar.mini .composer { display: none; }

/* Layar penuh: sembunyikan panggung, chat mengisi seluruh area.
   :has menjaga stage tetap tampil saat chat sedang ditutup. */
.main-content.chat-full:has(.chat-sidebar:not(.hidden):not(.mini)) .stage-wrap { display: none; }
.main-content.chat-full .chat-sidebar:not(.mini) {
  flex: 1 1 auto;
  height: auto !important;
  min-height: 0;
}

.dlg {
  border: none;
  border-radius: 20px;
  background: var(--surface);
  color: var(--text);
  width: min(92vw, 440px);
  padding: 0;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}

.dlg::backdrop { background: rgba(10, 10, 14, 0.45); backdrop-filter: blur(3px); }

.dlg-body { padding: 22px; display: flex; flex-direction: column; gap: 12px; }

.dlg h2 { margin: 0 0 4px; font-size: 1.15rem; }

.dlg .hint { margin: 0; font-size: 0.85rem; color: var(--muted); line-height: 1.5; }

.dlg label { font-size: 0.82rem; font-weight: 600; color: var(--muted); display: flex; flex-direction: column; gap: 5px; }

.dlg input, .dlg textarea, .dlg select {
  font: inherit;
  font-size: 0.9rem;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  outline: none;
}

.dlg input:focus, .dlg textarea:focus, .dlg select:focus { border-color: var(--accent); }

.dlg-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 8px;
  flex-wrap: wrap;
}

.dlg-actions .btn.ghost {
  width: auto;
  padding: 9px 14px;
  border: 1px solid var(--border);
  color: var(--text);
}

#btnShape { margin-right: auto; }

.ob { z-index: 50; }

.ob-step { display: flex; flex-direction: column; gap: 10px; animation: rise 0.3s ease; }
.ob-step[hidden] { display: none; }

.ob-hero {
  text-align: center;
  animation: heroBob 2s infinite ease-in-out;
  position: relative;
}
.ob-blob {
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 0 16px rgba(180, 170, 200, 0.35));
}
.ob-shine {
  animation: shineMove 2.5s ease-in-out infinite;
}
@keyframes shineMove {
  0%, 100% { transform: translate(0, 0); opacity: 0.6; }
  25% { transform: translate(8px, 4px); opacity: 1; }
  50% { transform: translate(16px, 8px); opacity: 0.3; }
  75% { transform: translate(8px, 4px); opacity: 0.8; }
}
@keyframes heroBob {
  0%, 100% { transform: translateY(0) scale(1, 1); }
  50% { transform: translateY(-6px) scale(0.96, 1.06); }
}

.persona-picker {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 4px;
}

.chip.sel {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.ob-label { text-align: center; margin-top: 6px; font-weight: 600; }

.dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  padding-bottom: 4px;
}

.dots i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--border);
  transition: all 0.25s ease;
}

.dots i.on { background: var(--accent); width: 18px; }

.shape-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 10px;
}

.shape-card {
  position: relative;
  border: 2px solid var(--border);
  border-radius: 16px;
  background: var(--surface-2);
  cursor: pointer;
  padding: 8px 4px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font: inherit;
  font-size: 0.78rem;
  color: var(--muted);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.shape-card svg { width: 56px; height: 56px; }
.shape-card svg path { fill: #0a0a0c; }

.shape-card:hover { transform: translateY(-3px) rotate(-2deg); }

.shape-card.sel {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 6px 18px rgba(124, 92, 255, 0.25);
}

.shape-card.sel::after {
  content: "✓";
  position: absolute;
  top: -8px;
  right: -6px;
  background: var(--accent);
  color: #fff;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
}

.install-step {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 8px 0;
  font-size: 0.92rem;
  line-height: 1.5;
}

.install-step b { color: var(--accent); }

.gift-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(92vw, 420px);
  padding: 10px 12px;
  border-radius: 16px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
  z-index: 55;
  animation: giftBannerIn 0.3s ease;
}

.gift-banner .gift-emoji { font-size: 1.4rem; }

.gift-banner .gift-text {
  flex: 1;
  font-size: 0.86rem;
  line-height: 1.35;
}

.gift-banner .gift-close {
  border: none;
  background: none;
  color: var(--muted);
  font-size: 0.95rem;
  cursor: pointer;
  padding: 4px 6px;
}

@keyframes giftBannerIn {
  from { transform: translate(-50%, 12px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

.gift-qr {
  display: block;
  margin: 4px auto 0;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
}

.toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.88rem;
  z-index: 60;
  animation: pop 0.25s ease;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

@keyframes pop {
  from { transform: translateX(-50%) scale(0.85); opacity: 0; }
  to { transform: translateX(-50%) scale(1); opacity: 1; }
}

/* ── Comet Effect (from Powers menu) ── */
.main-comet {
  position: absolute;
  top: 10vh;
  right: 10vw;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffeeaa;
  box-shadow: 0 0 20px 6px rgba(255, 220, 100, 0.9);
  pointer-events: none;
  transform: rotate(-25deg);
  animation: cometMain 1.3s ease-in forwards;
}
.main-comet::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 100%;
  width: 80px;
  height: 3px;
  background: linear-gradient(to right, rgba(255, 220, 100, 0.9), transparent);
  border-radius: 3px;
  transform: translateY(-50%);
}
@keyframes cometMain {
  0%   { transform: translate(0, 0) rotate(-25deg) scale(0.5); opacity: 0; }
  10%  { opacity: 1; }
  80%  { opacity: 0.8; }
  100% { transform: translate(-70vw, 60vh) rotate(-25deg) scale(0.2); opacity: 0; }
}

.main-comet-trail {
  position: absolute;
  top: 10vh;
  right: 10vw;
  border-radius: 50%;
  background: #ffdd66;
  box-shadow: 0 0 10px 3px rgba(255, 200, 80, 0.8);
  pointer-events: none;
  transform: rotate(-25deg);
  animation: cometMain 1.2s ease-in forwards;
}
.main-comet-trail::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 100%;
  width: 40px;
  height: 2px;
  background: linear-gradient(to right, rgba(255, 200, 80, 0.8), transparent);
  border-radius: 2px;
  transform: translateY(-50%);
}

/* ── Meteor Shower ── */
.meteor-shower {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ffdd66;
  box-shadow: 0 0 10px 3px rgba(255, 200, 80, 0.9);
  pointer-events: none;
  transform: rotate(-25deg);
  animation: meteorFall 1.2s ease-in forwards;
}
.meteor-shower::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 100%;
  width: 30px;
  height: 2px;
  background: linear-gradient(to right, rgba(255, 200, 80, 0.9), transparent);
  border-radius: 2px;
  transform: translateY(-50%);
}
@keyframes meteorFall {
  0%   { transform: translate(0, 0) rotate(-25deg) scale(0.3); opacity: 0; }
  8%   { opacity: 1; }
  70%  { opacity: 0.6; }
  100% { transform: translate(-400px, 350px) rotate(-25deg) scale(0.1); opacity: 0; }
}

@keyframes rise {
  from { transform: translateY(6px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes blinkDot {
  0%, 80%, 100% { opacity: 0.25; }
  40% { opacity: 1; }
}

@keyframes ring {
  from { transform: scale(0.7); opacity: 0.55; }
  to { transform: scale(1.35); opacity: 0; }
}

@keyframes floatUp {
  0% { transform: translateY(8px) rotate(8deg); opacity: 0; }
  30% { opacity: 0.9; }
  100% { transform: translateY(-26px) rotate(-6deg); opacity: 0; }
}

@media (min-width: 720px) {
  #app { grid-template-rows: auto 1fr; height: 100vh; }
  .main-content {
    flex-direction: row;
    min-height: 0;
  }
  .stage-wrap {
    flex: 1;
    min-height: 0;
    min-width: 0;
  }
  #blobSvg { width: min(52vh, 560px); }
  .blob-ground { width: min(22vw, 250px); height: min(4vw, 40px); }
  .bubble { bottom: calc(50% + min(11.4vw, 127px) + 8px); }
  /* Timer mode: enlarge blob on desktop so dot-matrix timer is bigger */
  .stage.timer-mode #blobSvg { width: min(60vw, 600px); }
  .stage.timer-mode .blob-ground { width: min(60vw, 600px); }
  .stage.timer-mode .bubble { bottom: calc(50% + min(19vw, 190px) + 8px); }
  .chat-sidebar {
    flex: 0 0 380px;
    width: 380px;
    flex-shrink: 0;
    border-top: none;
    border-left: 1px solid var(--border);
    max-height: 100%;
    animation: none;
  }
  /* Handle resize hanya untuk layout kolom (<720px) */
  .chat-handle { display: none; }
  /* Mini di desktop: strip header saja di atas kolom samping */
  .chat-sidebar.mini { align-self: flex-start; height: auto; }
  /* Layar penuh di desktop: chat melebar menggantikan panggung */
  .main-content.chat-full .chat-sidebar:not(.mini) { flex: 1 1 auto; width: auto; }
}

/* ── Radial Menu ── */
/* ── Blob Launcher (bottom center icon) ── */
.blob-launcher {
  position: fixed;
  bottom: max(16px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: 52px;
  height: 52px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100;
  transition: transform 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
/* Launcher selalu fixed di tengah bawah — sembunyikan selama chat terbuka
   (termasuk strip mini) supaya tidak menimpa header/composer */
body:has(.chat-sidebar:not(.hidden)) .blob-launcher { display: none; }
.blob-launcher:hover { transform: translateX(-50%) scale(1.1); }
.blob-launcher:active { transform: translateX(-50%) scale(0.95); }
.blob-launcher svg { display: block; }
.blob-launcher .launcher-blob { width: 40px; height: 40px; }
.blob-launcher .launcher-mic { width: 28px; height: 28px; }
.blob-launcher.holding { transform: translateX(-50%) scale(1.15); filter: drop-shadow(0 0 12px rgba(124,92,255,0.7)); }
.blob-launcher.voice-active { filter: drop-shadow(0 0 10px rgba(255,68,68,0.6)); animation: micPulse 1s ease-in-out infinite; }
@keyframes micPulse {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(255,68,68,0.4)); }
  50%      { filter: drop-shadow(0 0 16px rgba(255,68,68,0.8)); }
}

/* ── Blob Timer Overlay (floating buttons, no card) ── */
.blob-timer-overlay {
  position: fixed;
  bottom: max(76px, calc(env(safe-area-inset-bottom) + 76px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: rise 0.3s ease;
}
.blob-timer-label {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.03em;
}
.blob-timer-controls {
  display: flex;
  gap: 8px;
}
.blob-timer-btn {
  padding: 8px 18px;
  border-radius: 999px;
  border: none;
  background: #0a0a0c;
  color: #f0eff4;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}
.blob-timer-btn:hover {
  background: #1a1a1e;
  transform: translateY(-1px);
}
.blob-timer-btn:active {
  transform: scale(0.94);
}
.blob-timer-close {
  background: rgba(124, 92, 255, 0.85);
  color: #fff;
}
.blob-timer-close:hover {
  background: rgba(124, 92, 255, 1);
}
.blob-timer-sessions {
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 500;
  opacity: 0.6;
}

.radial-menu {
  position: fixed;
  inset: 0;
  z-index: 26;
  pointer-events: none;
  --rot: 0deg;
  --cx: 50%;
  --cy: calc(100% - 42px);
  touch-action: none;
}

/* ── Meditation Overlay ── */
.meditasi-overlay {
  position: fixed;
  bottom: max(24px, calc(env(safe-area-inset-bottom) + 24px));
  left: 50%;
  transform: translate(-50%, 0);
  z-index: 50;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: min(92vw, 380px);
  padding: 20px 18px;
  background: rgba(10, 10, 14, 0.82);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  animation: meditasiRise 0.3s ease;
}
.meditasi-label {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.03em;
}
.meditasi-timer {
  font-size: 1.4rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #f0eff4;
  letter-spacing: 0.05em;
}
.meditasi-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.meditasi-preset {
  padding: 6px 14px;
  border-radius: 999px;
  border: none;
  background: #0a0a0c;
  color: #f0eff4;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
  opacity: 0.6;
}
.meditasi-preset.active {
  opacity: 1;
  background: rgba(124, 92, 255, 0.85);
}
.meditasi-bowl-pick {
  padding: 6px 12px;
  border-radius: 999px;
  border: none;
  background: #0a0a0c;
  color: #f0eff4;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
  opacity: 0.6;
}
.meditasi-bowl-pick.active {
  opacity: 1;
  background: rgba(180, 140, 60, 0.85);
}
.meditasi-guide-pick {
  padding: 6px 12px;
  border-radius: 999px;
  border: none;
  background: #0a0a0c;
  color: #f0eff4;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
  opacity: 0.6;
}
.meditasi-guide-pick.active {
  opacity: 1;
  background: rgba(124, 92, 255, 0.85);
}
.meditasi-btn {
  padding: 8px 18px;
  border-radius: 999px;
  border: none;
  background: #0a0a0c;
  color: #f0eff4;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}
.meditasi-btn:hover { background: #1a1a1e; transform: translateY(-1px); }
.meditasi-btn:active { transform: scale(0.94); }
.meditasi-close {
  background: rgba(124, 92, 255, 0.85);
  color: #fff;
}
.meditasi-close:hover { background: rgba(124, 92, 255, 1); }

/* Gear button for bowl/guide options */
.meditasi-gear {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: none;
  background: #0a0a0c;
  color: #f0eff4;
  font-size: 1rem;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.meditasi-gear:hover { opacity: 1; }
.meditasi-opts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: rise 0.2s ease;
}
.meditasi-opts.hidden { display: none; }

/* Active phase: breathing circle */
.meditasi-active {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}
.meditasi-active.hidden { display: none; }
.meditasi-setup {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
}
.meditasi-setup.hidden { display: none; }

.meditasi-breath {
  position: relative;
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.meditasi-breath-circle {
  position: absolute;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,92,255,0.3), rgba(124,92,255,0.05));
  border: 2px solid rgba(124,92,255,0.4);
  transform: scale(1);
  transition: none;
}
.meditasi-breath-text {
  position: relative;
  z-index: 1;
  font-size: 0.85rem;
  font-weight: 600;
  color: #f0eff4;
  letter-spacing: 0.05em;
  text-shadow: 0 1px 8px rgba(0,0,0,0.5);
  display: none;
}
.radial-menu:not(.hidden) { pointer-events: auto; }

/* Invisible drag layer to capture swipe-to-rotate */
.rm-drag {
  position: absolute;
  inset: 0;
  pointer-events: auto;
  touch-action: none;
  cursor: grab;
  z-index: 0;
}
.rm-drag:active { cursor: grabbing; }
/* Buttons stay above drag layer */
.rm-btn { z-index: 2; }

.rm-btn {
  position: absolute;
  left: var(--cx);
  top: var(--cy);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #0a0a0c;
  color: #f0eff4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  transform: translate(-50%, -50%) rotate(var(--rot)) translate(0, 0) scale(0);
  opacity: 0;
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity 0.22s ease;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}
.rm-btn:hover { background: #1a1a1e; }
.rm-icon { width: 24px; height: 24px; display: block; }
.rm-btn span {
  font-size: 8px;
  font-weight: 600;
  margin-top: 1px;
  line-height: 1;
  white-space: nowrap;
  color: #f0eff4;
}

/* radial positions: 9 items in a TOP semicircle, r=120px — rotated by --rot */
.radial-menu:not(.hidden) .rm-btn {
  transform: translate(-50%, -50%) rotate(var(--rot)) var(--pos) scale(1);
  opacity: 1;
  pointer-events: auto;
}

/* User mode: 7 tombol, r=120px (jarak 30°) */
.rm-btn[data-feature="chat"]       { --pos: translate(-120px, 0px);    transition-delay: 0.02s; }
.rm-btn[data-feature="tasks"]      { --pos: translate(-104px, -60px);  transition-delay: 0.05s; }
.rm-btn[data-feature="pomodoro"]   { --pos: translate(-60px, -104px);  transition-delay: 0.08s; }
.rm-btn[data-feature="meditasi"]   { --pos: translate(0px, -120px);    transition-delay: 0.11s; }
.rm-btn[data-feature="fun"]        { --pos: translate(60px, -104px);   transition-delay: 0.14s; }
.rm-btn[data-feature="pet"]        { --pos: translate(104px, -60px);   transition-delay: 0.17s; }
.rm-btn[data-feature="studio"]     { --pos: translate(120px, 0px);     transition-delay: 0.2s; }

/* Dev-only buttons hidden by default */
.rm-btn[data-dev] { display: none; }

/* Dev mode: 8 tombol — respacing (jarak ~25.7°) */
.radial-menu.dev-on .rm-btn[data-feature="chat"]     { --pos: translate(-120px, 0px); }
.radial-menu.dev-on .rm-btn[data-feature="tasks"]    { --pos: translate(-108px, -52px); }
.radial-menu.dev-on .rm-btn[data-feature="pomodoro"] { --pos: translate(-75px, -94px); }
.radial-menu.dev-on .rm-btn[data-feature="meditasi"] { --pos: translate(-27px, -117px); }
.radial-menu.dev-on .rm-btn[data-feature="fun"]      { --pos: translate(27px, -117px); }
.radial-menu.dev-on .rm-btn[data-feature="pet"]      { --pos: translate(75px, -94px); }
.radial-menu.dev-on .rm-btn[data-feature="studio"]   { --pos: translate(108px, -52px); }
.radial-menu.dev-on .rm-btn[data-dev]                { display: flex; --pos: translate(120px, 0px); transition-delay: 0.23s; }

.radial-menu:not(.hidden) .rm-btn:hover {
  transform: translate(-50%, -50%) rotate(var(--rot)) var(--pos) scale(1.08);
}
.radial-menu:not(.hidden) .rm-btn:active {
  transform: translate(-50%, -50%) rotate(var(--rot)) var(--pos) scale(0.88) !important;
}

/* Swipe hint arc */
.rm-swipe-hint {
  position: absolute;
  left: var(--cx);
  top: var(--cy);
  width: 280px;
  height: 280px;
  margin-left: -140px;
  margin-top: -140px;
  border-radius: 50%;
  border: 1px dashed rgba(240, 239, 244, 0.08);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.radial-menu:not(.hidden) .rm-swipe-hint { opacity: 1; }

/* ── Sub Radial Menus (shared) ── */
.sub-radial {
  position: fixed;
  inset: 0;
  z-index: 27;
  pointer-events: none;
  --cx: 50%;
  --cy: calc(100% - 42px);
}
.sub-radial:not(.hidden) { pointer-events: auto; }

.sub-radial .srm-btn {
  position: absolute;
  left: var(--cx);
  top: var(--cy);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: #0a0a0c;
  color: #f0eff4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  transform: translate(-50%, -50%) translate(0, 0) scale(0);
  opacity: 0;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity 0.2s ease;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}
.sub-radial .srm-btn:hover { background: #1a1a1e; }
.sub-radial .srm-icon { width: 20px; height: 20px; display: block; }
.sub-radial .srm-btn span {
  font-size: 7px;
  font-weight: 600;
  margin-top: 1px;
  line-height: 1;
  white-space: nowrap;
  color: #f0eff4;
}
.sub-radial .srm-btn:active {
  transform: translate(-50%, -50%) var(--pos) scale(0.85) !important;
}

.sub-radial:not(.hidden) .srm-btn {
  transform: translate(-50%, -50%) var(--pos) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.sub-radial .srm-back {
  position: absolute;
  left: var(--cx);
  top: var(--cy);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: #0a0a0c;
  color: #f0eff4;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  transition: transform 0.2s ease, opacity 0.15s ease;
  pointer-events: none;
  z-index: 5;
}
.sub-radial:not(.hidden) .srm-back {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  pointer-events: auto;
}

/* ── Idle Radial: 20 items, top semicircle r=150px ── */
#idleRadial .srm-btn:nth-child(2)  { --pos: translate(-150px, 0px); transition-delay: 0.01s; }
#idleRadial .srm-btn:nth-child(3)  { --pos: translate(-148px, -25px); transition-delay: 0.02s; }
#idleRadial .srm-btn:nth-child(4)  { --pos: translate(-142px, -49px); transition-delay: 0.03s; }
#idleRadial .srm-btn:nth-child(5)  { --pos: translate(-132px, -71px); transition-delay: 0.04s; }
#idleRadial .srm-btn:nth-child(6)  { --pos: translate(-118px, -92px); transition-delay: 0.05s; }
#idleRadial .srm-btn:nth-child(7)  { --pos: translate(-102px, -110px); transition-delay: 0.06s; }
#idleRadial .srm-btn:nth-child(8)  { --pos: translate(-82px, -125px); transition-delay: 0.07s; }
#idleRadial .srm-btn:nth-child(9)  { --pos: translate(-60px, -137px); transition-delay: 0.08s; }
#idleRadial .srm-btn:nth-child(10) { --pos: translate(-37px, -145px); transition-delay: 0.09s; }
#idleRadial .srm-btn:nth-child(11) { --pos: translate(-12px, -149px); transition-delay: 0.10s; }
#idleRadial .srm-btn:nth-child(12) { --pos: translate(12px, -149px); transition-delay: 0.11s; }
#idleRadial .srm-btn:nth-child(13) { --pos: translate(37px, -145px); transition-delay: 0.12s; }
#idleRadial .srm-btn:nth-child(14) { --pos: translate(60px, -137px); transition-delay: 0.13s; }
#idleRadial .srm-btn:nth-child(15) { --pos: translate(82px, -125px); transition-delay: 0.14s; }
#idleRadial .srm-btn:nth-child(16) { --pos: translate(102px, -110px); transition-delay: 0.15s; }
#idleRadial .srm-btn:nth-child(17) { --pos: translate(118px, -92px); transition-delay: 0.16s; }
#idleRadial .srm-btn:nth-child(18) { --pos: translate(132px, -71px); transition-delay: 0.17s; }
#idleRadial .srm-btn:nth-child(19) { --pos: translate(142px, -49px); transition-delay: 0.18s; }
#idleRadial .srm-btn:nth-child(20) { --pos: translate(148px, -25px); transition-delay: 0.19s; }
#idleRadial .srm-btn:nth-child(21) { --pos: translate(150px, 0px); transition-delay: 0.20s; }

/* ── Feature Panels ── */
.feature-panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 62vh;
  z-index: 31;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -8px 40px rgba(0,0,0,0.18);
  animation: panelSlideIn 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  padding-bottom: env(safe-area-inset-bottom);
}
.feature-panel[hidden] { display: none; }

/* Backdrop behind bottom sheet — dims blob area */
.panel-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(0, 0, 0, 0);
  transition: background 0.25s ease;
  pointer-events: auto;
}
.panel-backdrop.hidden { display: none; }
.panel-backdrop.visible { background: rgba(0, 0, 0, 0.35); }

@keyframes panelSlideIn {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* Drag handle at top of bottom sheet */
.panel-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
  border-radius: 24px 24px 0 0;
  position: relative;
}
/* Visual grab handle */
.panel-header::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 4px;
  border-radius: 999px;
  background: var(--border);
}
.btn-back {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  flex-shrink: 0;
}
.btn-back:active { background: var(--border); }
.panel-title {
  font-weight: 700;
  font-size: 1.05rem;
  margin-top: 12px;
}

.panel-body {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  -webkit-overflow-scrolling: touch;
}

/* ── Pomodoro UI ── */
.pomo-center {
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
}
.pomo-timer {
  font-size: clamp(40px, 12vw, 64px);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  letter-spacing: 2px;
  line-height: 1;
}
.pomo-label {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 500;
}
.pomo-controls { display: flex; gap: 12px; }
.btn-pomo {
  padding: 10px 28px;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s, opacity 0.12s;
}
.btn-pomo:active { transform: scale(0.94); }
.pomo-sessions { font-size: 0.85rem; color: var(--text-muted); }

/* ── Play / Entertain Grid ── */
.play-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
  width: 100%;
  padding: 16px;
  flex: 1;
  align-content: start;
}
.play-card {
  padding: 14px 10px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 0.88rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: transform 0.12s, background 0.15s, border-color 0.15s;
}
.play-card:hover { border-color: var(--accent); }
.play-card:active { transform: scale(0.94); background: var(--border); }

/* ── Tasks panel ── */
.task-stats {
  display: flex;
  gap: 18px;
  padding: 14px 16px 4px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.task-stats b { color: var(--text); }
.task-notif {
  margin-left: auto;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}
.task-form {
  display: flex;
  gap: 8px;
  padding: 10px 16px 12px;
}
.task-form input {
  flex: 1;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.9rem;
}
.task-form input:focus { outline: none; border-color: var(--accent); }
.task-form button {
  width: 44px;
  border-radius: 12px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 1.15rem;
  cursor: pointer;
  transition: transform 0.12s;
}
.task-form button:active { transform: scale(0.92); }
.task-section-title {
  padding: 6px 16px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}
.task-list {
  list-style: none;
  margin: 0;
  padding: 0 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.task-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  animation: taskItemIn 0.18s ease;
}
@keyframes taskItemIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.task-item.done .task-text { text-decoration: line-through; opacity: 0.5; }
.task-item.overdue { border-color: #e0a53f; }
.task-check {
  background: none;
  border: none;
  font-size: 1.05rem;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
  color: var(--text);
}
.task-text { flex: 1; font-size: 0.9rem; word-break: break-word; cursor: text; }
.task-edit {
  flex: 1;
  font: inherit;
  font-size: 0.9rem;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid var(--accent);
  background: var(--surface);
  color: var(--text);
  outline: none;
}
.task-del {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 4px;
  flex-shrink: 0;
}
.task-del:active { color: var(--text); }
.task-empty {
  padding: 8px 12px;
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
}
.task-empty-big {
  padding: 28px 16px;
  text-align: center;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
}
.task-empty-big .big { font-size: 2rem; margin-bottom: 6px; }
.task-empty-big .small { margin-top: 6px; font-size: 0.8rem; font-weight: 400; color: var(--muted); }

/* Tabs (Pengingat / Tugas) */
.task-tabs {
  display: flex;
  gap: 6px;
  padding: 8px 16px 4px;
}
.task-tab {
  flex: 1;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.task-tab.on {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: transparent;
}
.task-tab-count {
  display: inline-block;
  min-width: 18px;
  padding: 0 5px;
  margin-left: 2px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  line-height: 16px;
}
.task-tab:not(.on) .task-tab-count { background: var(--border); color: var(--muted); }
.task-tab-count:empty { display: none; }

.task-view { display: flex; flex-direction: column; }
.task-view[hidden] { display: none; }
.task-section-inline { padding: 10px 4px 4px; }

/* FAB di bawah panel (sticky, bukan fixed) */
.task-fab {
  position: sticky;
  bottom: 0;
  margin: auto 16px calc(8px + env(safe-area-inset-bottom));
  padding: 12px;
  border: none;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(124, 92, 255, 0.35);
  transition: transform 0.12s;
  flex-shrink: 0;
}
.task-fab:active { transform: scale(0.97); }

/* Kartu pengingat terkelompok */
.rem-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  cursor: pointer;
  animation: taskItemIn 0.18s ease;
}
.rem-card.soon { border-color: var(--accent); }
.rem-card.overdue { border-color: #e0a53f; }
.rem-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.rem-ico { flex-shrink: 0; }
.rem-text { flex: 1; font-size: 0.92rem; font-weight: 600; word-break: break-word; }
.rem-recur {
  flex-shrink: 0;
  font-size: 0.7rem;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}
.rem-when { font-size: 0.8rem; color: var(--muted); }
.rem-card.overdue .rem-when { color: #d98a1f; font-weight: 600; }
.rem-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.rem-chip {
  font-size: 0.7rem;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
}
.rem-chip.past { opacity: 0.45; }
.rem-chip.next { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.rem-actions { display: flex; gap: 6px; }
.rem-actions button {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}
.rem-actions button:active { transform: scale(0.95); }

/* Menu ⋯ pakai <details> (tanpa JS popover) */
.rem-menu { position: relative; flex-shrink: 0; }
.rem-menu summary {
  list-style: none;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  color: var(--muted);
  cursor: pointer;
}
.rem-menu summary::-webkit-details-marker { display: none; }
.rem-menu summary:hover { background: var(--border); }
.rem-menu-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  min-width: 190px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  z-index: 5;
  padding: 4px;
  display: flex;
  flex-direction: column;
}
.rem-menu-pop button {
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  border: none;
  border-radius: 8px;
  background: none;
  color: var(--text);
  font-size: 0.85rem;
  cursor: pointer;
}
.rem-menu-pop button:hover { background: var(--surface-2); }

/* Dialog pengingat */
.rem-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.rem-quick button {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.78rem;
  cursor: pointer;
}
.rem-quick button:active { transform: scale(0.95); border-color: var(--accent); }
.rem-dt {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.rem-toggle {
  flex-direction: row !important;
  align-items: center;
  gap: 8px;
  font-weight: 400 !important;
  font-size: 0.85rem !important;
  color: var(--text) !important;
}
.rem-toggle input { width: auto; }
.rem-toggle .hint { font-size: 0.75rem; }
.rem-preview {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  min-height: 1.2em;
}
.rem-preview.bad { color: #d9534f; font-weight: 600; }

.task-clear-done {
  align-self: flex-start;
  margin: 0 16px 12px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: none;
  color: var(--muted);
  font-size: 0.78rem;
  cursor: pointer;
}
.task-clear-done:hover { color: var(--accent); border-color: var(--accent); }

/* Fun panel: grids don't stretch, sections stack */
#panelFun .play-grid { flex: none; padding-top: 8px; padding-bottom: 8px; }

/* Onboarding: notifikasi step */
.ob-notif { width: 100%; margin-top: 10px; }
.ob-notif:disabled { opacity: 0.7; }
.ob-notif-hint { text-align: center; margin-top: 6px; }

/* ── Stage with active panel ── */
.stage-wrap:has(.feature-panel:not([hidden])) .stage { pointer-events: none; }
.stage-wrap:has(.sub-radial:not(.hidden)) { overflow: visible; }

/* ── Tear drop animation (crying blob) ── */
@keyframes tearFall {
  0% {
    transform: translate(-50%, -50%) scale(0.5);
    opacity: 0;
  }
  15% {
    transform: translate(-50%, 0%) scale(1);
    opacity: 0.9;
  }
  100% {
    transform: translate(calc(-50% + var(--drift, 0px)), 120px) scale(0.7);
    opacity: 0;
  }
}
.tear-drop {
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
}

/* Settings: checkbox row */
.chip-row { cursor: pointer; user-select: none; }
.chip-row input[type="checkbox"] { accent-color: var(--accent); }
.key-test-row { display: flex; align-items: center; gap: 10px; margin-top: 6px; }

@keyframes meditasiRise {
  from { transform: translate(-50%, 12px); opacity: 0; }
  to   { transform: translate(-50%, 0); opacity: 1; }
}

/* ── Mochi Studio ── */
.feature-panel.studio-panel { max-height: 90vh; }
.studio-panel .panel-body { padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); gap: 12px; }
.studio-hero { text-align: center; padding: 18px 8px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.studio-hero h3 { margin: 0; font-size: 1.15rem; }
.studio-hero p { margin: 0; color: var(--text-muted); font-size: 0.92rem; max-width: 340px; }
.studio-hero-icon { font-size: 44px; line-height: 1; }
.studio-google { min-height: 44px; margin: 10px 0 4px; }
.studio-admin { display: flex; flex-direction: column; gap: 8px; width: min(300px, 86%); margin-top: 4px; }
.studio-admin input { padding: 11px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; font-size: 0.92rem; }
.studio-admin input:focus { outline: none; border-color: var(--accent); }
.studio-fine { font-size: 0.75rem; color: var(--text-muted); text-align: center; margin: 0; }
.studio-top { display: flex; align-items: center; gap: 10px; }
.studio-top img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.studio-who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.studio-who b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.studio-link { background: none; border: none; padding: 0; color: var(--accent); font-size: 0.8rem; cursor: pointer; text-align: left; }
.studio-credits { font-weight: 800; padding: 6px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.studio-btn { border: none; border-radius: 14px; padding: 12px 16px; font-size: 0.95rem; font-weight: 700; cursor: pointer; transition: transform 0.12s, opacity 0.12s; }
.studio-btn:active { transform: scale(0.96); }
.studio-btn:disabled { opacity: 0.5; pointer-events: none; }
.studio-btn.primary { background: var(--accent); color: #fff; width: 100%; }
.studio-btn.ghost { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); padding: 8px 12px; }
.studio-create { display: flex; flex-direction: column; gap: 10px; }
.studio-create textarea { width: 100%; resize: vertical; min-height: 84px; padding: 12px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; font-size: 0.95rem; }
.studio-create textarea:focus { outline: none; border-color: var(--accent); }
.studio-ideas { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.studio-chip-btn { flex-shrink: 0; border: 1px dashed var(--border); background: transparent; color: var(--text-muted); border-radius: 999px; padding: 6px 10px; font-size: 0.78rem; cursor: pointer; }
.studio-pkgs, .studio-topups { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.studio-pkg { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 12px; border-radius: 14px; border: 1.5px solid var(--border); background: var(--surface-2); color: var(--text); cursor: pointer; }
.studio-pkg span { font-size: 0.78rem; color: var(--text-muted); }
.studio-pkg em { font-style: normal; font-weight: 800; color: var(--accent); margin-top: 4px; }
.studio-pkg.on { border-color: var(--accent); background: var(--accent-soft); }
.studio-section { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted); margin-top: 6px; }
.studio-empty { color: var(--text-muted); font-size: 0.9rem; text-align: center; margin: 8px 0; }
.studio-job { border: 1px solid var(--border); border-radius: 16px; padding: 12px; background: var(--surface-2); display: flex; flex-direction: column; gap: 8px; }
.studio-job-head { display: flex; align-items: flex-start; gap: 8px; }
.studio-job-head b { flex: 1; font-size: 0.95rem; }
.studio-chip { font-size: 0.72rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--surface); white-space: nowrap; }
.studio-bar { height: 8px; border-radius: 999px; background: var(--border); overflow: hidden; }
.studio-bar i { display: block; height: 100%; background: var(--accent); border-radius: inherit; transition: width 0.6s ease; }
.studio-step { font-size: 0.8rem; color: var(--text-muted); }
.studio-err { font-size: 0.85rem; color: #d64545; margin: 0; }
.studio-char { width: 96px; border-radius: 12px; }
.studio-shots { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; }
.studio-shot { flex: 0 0 62%; max-width: 240px; margin: 0; scroll-snap-align: start; }
.studio-shot video { width: 100%; aspect-ratio: 9 / 16; border-radius: 12px; background: #000; object-fit: cover; display: block; }
.studio-shot figcaption { font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; display: flex; justify-content: space-between; gap: 6px; }
.studio-shot figcaption a { color: var(--accent); text-decoration: none; font-weight: 700; }
.studio-pay { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.studio-pay h3 { margin: 0; }
.studio-pay p { margin: 0; color: var(--text-muted); font-size: 0.9rem; }
.studio-qr { width: min(260px, 70vw); background: #fff; padding: 10px; border-radius: 16px; }
.studio-qr svg { width: 100%; height: auto; display: block; }
.studio-merchant { font-weight: 700; font-size: 0.85rem; letter-spacing: 0.03em; }
.studio-amount { font-size: 1.05rem; }
.studio-amount b { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.studio-steps { text-align: left; font-size: 0.85rem; color: var(--text-muted); margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.studio-row { display: flex; gap: 8px; width: 100%; }
.studio-row .studio-btn { flex: 1; }
.studio-orders { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.studio-orders li { display: flex; justify-content: space-between; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 0.85rem; cursor: pointer; }
.studio-orders em { font-style: normal; color: var(--text-muted); }
.studio-final { margin: 0; }
.studio-final video { width: 100%; max-height: 52vh; border-radius: 12px; background: #000; display: block; }
.studio-final figcaption { display: flex; justify-content: space-between; align-items: center; font-size: 0.82rem; color: var(--text-muted); margin-top: 4px; }
.studio-final figcaption a { color: var(--accent); text-decoration: none; font-weight: 700; }
.studio-share { border: none; background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 3px 10px; font-size: 0.8rem; font-weight: 700; cursor: pointer; }
.studio-klip summary { font-size: 0.82rem; color: var(--text-muted); cursor: pointer; padding: 2px 0; }
