/* ===== 哄小孩神器 — light cute calm design system ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  color-scheme: light;
  /* Warm cream / soft peach / mint / soft sky / candy coral */
  --bg: #FFF7F0;
  --bg-soft: #FFF0E6;
  --card: #FFFFFF;
  --card-soft: #FFF9F5;
  --accent: #5EC4B0;          /* mint */
  --accent-deep: #3AA991;
  --sky: #7EB8E8;             /* soft sky */
  --sky-soft: #D6ECFF;
  --peach: #FFBEA8;           /* soft peach */
  --peach-soft: #FFE4D9;
  --coral: #FF8A7A;           /* candy coral */
  --coral-deep: #F06B5A;
  --ok: #5CBF8A;
  --warn: #E8A85A;
  --text: #2C2420;
  --text-soft: #4A3F3A;
  --muted: #8A7A74;
  --lock: #C9A06A;
  --shadow: 0 4px 16px rgba(80, 50, 40, 0.08);
  --shadow-lg: 0 8px 28px rgba(80, 50, 40, 0.12);
  --radius: 20px;
  --radius-sm: 14px;
  --tap: 52px;
  --space: 8px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  color-scheme: light;
}


/* dark scheme disabled — light cute UI is default */


html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC",
    "PingFang TC", "Microsoft JhengHei", "Hiragino Sans GB", sans-serif;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  user-select: none;
  overflow: hidden;
}

#app {
  height: 100%;
  height: 100dvh;
  position: relative;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, var(--peach-soft) 0%, transparent 55%),
    radial-gradient(ellipse 70% 45% at 95% 5%, var(--sky-soft) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(94, 196, 176, 0.12) 0%, transparent 55%),
    var(--bg);
}

.screen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  overflow: hidden;
  opacity: 0; pointer-events: none;
  transition: opacity 0.28s ease;
}
.screen.active { opacity: 1; pointer-events: auto; }
.screen[hidden] { display: none !important; }


/* ===== Material Symbols Rounded — gradient text (never solid black) ===== */
.material-symbols-rounded {
  font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 24;
  font-size: 1.35rem;
  line-height: 1;
  vertical-align: middle;
  user-select: none;
  font-family: 'Material Symbols Rounded', sans-serif;
  font-weight: normal;
  font-style: normal;
  display: inline-block;
  white-space: nowrap;
  letter-spacing: normal;
  text-transform: none;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  /* Default pretty gradient — not black */
  background: linear-gradient(135deg, #FF8A7A 0%, #5EC4B0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Per-context gradient variants */
.icon-grad-peach {
  background: linear-gradient(135deg, #FFBEA8 0%, #FF8A7A 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.icon-grad-mint {
  background: linear-gradient(135deg, #A8E6D8 0%, #3AA991 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.icon-grad-sky {
  background: linear-gradient(135deg, #B8D9F5 0%, #5EC4B0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.icon-grad-sunset {
  background: linear-gradient(135deg, #FFBEA8 0%, #FFD54F 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.icon-grad-lavender {
  background: linear-gradient(135deg, #9B7ED9 0%, #FFBEA8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.icon-grad-rainbow {
  background: linear-gradient(135deg, #FF8A7A 0%, #FFD54F 45%, #5EC4B0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* White / soft cream icons on saturated tiles & primary buttons */
.icon-badge .material-symbols-rounded,
.primary-btn .material-symbols-rounded,
.call-btn .material-symbols-rounded {
  background: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  -webkit-text-fill-color: #FFF8F2 !important;
  color: #FFF8F2 !important;
  filter: drop-shadow(0 1px 3px rgba(80, 50, 40, 0.28));
}

.btn-icon { font-size: 1.25rem; margin-right: 2px; }
.icon-badge .material-symbols-rounded {
  font-size: 1.75rem;
  position: relative;
  z-index: 1;
}
.tool-card.hero .icon-badge .material-symbols-rounded { font-size: 2.1rem; }
.tiny-gear .material-symbols-rounded {
  font-size: 1.35rem;
  /* keep gradient on chrome gear */
}
.secondary-btn, .primary-btn, .ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.subtitle-icon {
  font-size: 1.05rem;
  vertical-align: -2px;
}
.phase-badge .material-symbols-rounded,
.lock-badge .material-symbols-rounded {
  font-size: 1rem;
}
.choice-btn .c-icon .material-symbols-rounded {
  font-size: 1.55rem;
}
.tool-title-press .material-symbols-rounded {
  font-size: 1.2rem;
  margin-right: 4px;
  vertical-align: -3px;
}
.call-btn .material-symbols-rounded {
  font-size: 1.75rem;
}
.parent-strip .material-symbols-rounded {
  font-size: 1rem;
  vertical-align: -2px;
}
.home-footer .material-symbols-rounded {
  font-size: 1rem;
  vertical-align: -2px;
}

/* ===== Home (compact — prioritize tool grid) ===== */
.home-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  padding: calc(10px + var(--safe-t)) 14px 8px;
  flex-shrink: 0;
}
.home-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  cursor: default;
}
.logo {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 2px 10px rgba(255, 138, 122, 0.28);
  filter: none;
}
.home-header h1 {
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}
.home-gear-inline {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(80, 50, 40, 0.08);
}
.subtitle, .disclaimer, .logo-wrap { display: none; }

.tool-sections {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 2px 14px calc(14px + var(--safe-b));
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.home-mode-switch {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(80, 50, 40, 0.06);
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(80, 50, 40, 0.06);
  position: sticky;
  top: 0;
  z-index: 4;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.home-mode-btn {
  flex: 1;
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 6px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.12s ease, color 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.home-mode-btn .material-symbols-rounded { font-size: 1.15rem; }
.home-mode-btn.active {
  background: linear-gradient(135deg, #FFE8DE 0%, #D8F5EE 100%);
  border-color: rgba(94, 196, 176, 0.22);
  color: var(--text);
  box-shadow: 0 2px 10px rgba(94, 196, 176, 0.16);
}
.home-mode-btn:active { transform: scale(0.97); }
.home-guide {
  margin: 2px 2px 0;
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--text-soft);
  line-height: 1.35;
}
.situation-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-content: start;
}
.situation-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  text-align: left;
  width: 100%;
  min-height: 76px;
  padding: 14px 14px 14px 12px;
  border: 1px solid rgba(80, 50, 40, 0.05);
  border-radius: 16px;
  background: var(--card);
  box-shadow: 0 2px 12px rgba(80, 50, 40, 0.06);
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  position: relative;
  overflow: hidden;
}
.situation-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 4px 0 0 4px;
  background: linear-gradient(180deg, #FFBEA8, #FF8A7A);
}
.situation-card:active { transform: scale(0.985); }
.situation-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #FFBEA8 0%, #FF8A7A 100%);
  box-shadow: 0 3px 10px rgba(255, 138, 122, 0.24);
}
.situation-icon .material-symbols-rounded {
  font-size: 1.65rem;
  font-variation-settings: 'FILL' 1, 'wght' 600, 'GRAD' 0, 'opsz' 24;
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  -webkit-text-fill-color: #fff;
  color: #fff;
}
.situation-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  flex: 1;
}
.situation-title {
  font-size: 0.98rem;
  font-weight: 800;
  color: #E06B55;
  line-height: 1.25;
}
.situation-why,
.situation-detail-why {
  font-size: 0.78rem;
  color: #8A9E98;
  line-height: 1.4;
  font-weight: 500;
}
.why-label {
  display: inline-block;
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  padding: 2px 7px;
  border-radius: 999px;
  margin-right: 4px;
  vertical-align: 1px;
  background: rgba(94, 196, 176, 0.18);
  color: #3AA991;
}
.situation-back {
  align-self: flex-start;
  border: none;
  background: rgba(255, 255, 255, 0.85);
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  cursor: pointer;
  margin-bottom: 2px;
}
.situation-back:active { transform: scale(0.97); }
.situation-detail { padding: 4px 2px 2px; }
.situation-detail-title {
  margin: 0 0 6px;
  font-size: 1.15rem;
  font-weight: 800;
  color: #E06B55;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.3;
}
.situation-detail-title .material-symbols-rounded { font-size: 1.4rem; }
.situation-detail-why { margin: 0 0 4px; }

/* Tone variants — soft brand colors, never heavy black */
.sit-tone-sunset {
  background: linear-gradient(135deg, #FFF8F4 0%, #FFEDE6 100%);
}
.sit-tone-sunset::before {
  background: linear-gradient(180deg, #FFBEA8, #E06B55);
}
.sit-tone-sunset .situation-icon {
  background: linear-gradient(145deg, #FFBEA8 0%, #E06B55 100%);
  box-shadow: 0 4px 12px rgba(224, 107, 85, 0.3);
}
.sit-tone-sunset .situation-title,
.sit-tone-sunset.situation-detail-title,
.sit-tone-sunset .situation-detail-title { color: #E06B55; }
.sit-tone-sunset .situation-why,
.sit-tone-sunset .situation-detail-why { color: #C4887A; }
.sit-tone-sunset .why-label {
  background: rgba(224, 107, 85, 0.14);
  color: #D45A45;
}

.sit-tone-mint {
  background: linear-gradient(135deg, #F4FBF8 0%, #E4F6F0 100%);
}
.sit-tone-mint::before {
  background: linear-gradient(180deg, #A8E6D8, #3AA991);
}
.sit-tone-mint .situation-icon {
  background: linear-gradient(145deg, #A8E6D8 0%, #3AA991 100%);
  box-shadow: 0 4px 12px rgba(58, 169, 145, 0.28);
}
.sit-tone-mint .situation-title,
.sit-tone-mint.situation-detail-title,
.sit-tone-mint .situation-detail-title { color: #2F9A84; }
.sit-tone-mint .situation-why,
.sit-tone-mint .situation-detail-why { color: #6A9E93; }
.sit-tone-mint .why-label {
  background: rgba(58, 169, 145, 0.16);
  color: #2F9A84;
}

.sit-tone-sky {
  background: linear-gradient(135deg, #F5FAFE 0%, #E6F2FB 100%);
}
.sit-tone-sky::before {
  background: linear-gradient(180deg, #B8D9F5, #5B9FD4);
}
.sit-tone-sky .situation-icon {
  background: linear-gradient(145deg, #B8D9F5 0%, #5B9FD4 100%);
  box-shadow: 0 4px 12px rgba(91, 159, 212, 0.28);
}
.sit-tone-sky .situation-title,
.sit-tone-sky.situation-detail-title,
.sit-tone-sky .situation-detail-title { color: #4A8FC4; }
.sit-tone-sky .situation-why,
.sit-tone-sky .situation-detail-why { color: #7A9BB0; }
.sit-tone-sky .why-label {
  background: rgba(91, 159, 212, 0.16);
  color: #4A8FC4;
}

.sit-tone-lavender {
  background: linear-gradient(135deg, #FAF7FD 0%, #F0E8F8 100%);
}
.sit-tone-lavender::before {
  background: linear-gradient(180deg, #D4C2F0, #9B7ED9);
}
.sit-tone-lavender .situation-icon {
  background: linear-gradient(145deg, #D4C2F0 0%, #9B7ED9 100%);
  box-shadow: 0 4px 12px rgba(155, 126, 217, 0.28);
}
.sit-tone-lavender .situation-title,
.sit-tone-lavender.situation-detail-title,
.sit-tone-lavender .situation-detail-title { color: #8B6BC9; }
.sit-tone-lavender .situation-why,
.sit-tone-lavender .situation-detail-why { color: #9A8BB0; }
.sit-tone-lavender .why-label {
  background: rgba(155, 126, 217, 0.16);
  color: #8B6BC9;
}
.tool-grid.situation-tools { grid-template-columns: 1fr; }
@media (min-width: 420px) {
  .tool-grid.situation-tools { grid-template-columns: 1fr 1fr; }
}
.tool-grid.situation-tools .tool-card {
  flex-direction: row;
  text-align: left;
  min-height: 64px;
  padding: 10px 12px;
  gap: 10px;
  justify-content: flex-start;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(80, 50, 40, 0.06);
}
.tool-grid.situation-tools .tool-card .card-text,
.tool-grid.situation-tools .tool-card .name,
.tool-grid.situation-tools .tool-card .hint {
  display: block;
  text-align: left;
}
.tool-grid.situation-tools .tool-card .name {
  font-size: 0.95rem;
  font-weight: 800;
}
.tool-grid.situation-tools .tool-card .hint {
  font-size: 0.74rem;
  line-height: 1.25;
  margin-top: 2px;
  font-weight: 600;
}
.home-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(80, 50, 40, 0.06);
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(80, 50, 40, 0.06);
}
.home-tab {
  flex: 1;
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 750;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 4px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.12s ease, color 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.home-tab .material-symbols-rounded {
  font-size: 1.1rem;
}
.home-tab-label {
  line-height: 1.1;
  text-align: center;
}
.home-tab.active {
  background: linear-gradient(135deg, #FFE8DE 0%, #D8F5EE 100%);
  color: var(--text);
  box-shadow: 0 2px 10px rgba(94, 196, 176, 0.14);
}
.home-tab:active { transform: scale(0.97); }
.section-hint,
.tab-hint {
  margin: 0;
  font-size: 0.68rem;
  color: var(--muted);
  line-height: 1.3;
  padding-left: 2px;
}
.tool-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-content: start;
}
/* Fun performance overlays */
.fun-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  opacity: 0;
}
.fun-overlay.running { opacity: 1; }
.stamp-press.running {
  animation: stampPress 0.7s ease-in-out;
}
@keyframes stampPress {
  0% { transform: scale(1.4) rotate(-12deg); opacity: 0; }
  40% { transform: scale(1) rotate(0deg); opacity: 1; }
  100% { transform: scale(1); opacity: 0.2; }
}
.mirror-shimmer.running {
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.65) 50%, transparent 70%);
  background-size: 200% 100%;
  animation: mirrorSweep 1.2s ease-in-out infinite;
}
@keyframes mirrorSweep {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
.fortune-shake.running .scan-illus,
.fortune-shake.running {
  animation: fortuneShake 0.45s ease-in-out infinite;
}
@keyframes fortuneShake {
  0%, 100% { transform: rotate(0deg) translateY(0); }
  25% { transform: rotate(-6deg) translateY(2px); }
  75% { transform: rotate(6deg) translateY(-2px); }
}
.wand-spark.running {
  animation: wandBurst 0.9s ease-out;
}
@keyframes wandBurst {
  0% { box-shadow: inset 0 0 0 rgba(255,224,138,0); }
  50% { box-shadow: inset 0 0 60px rgba(255,224,138,0.55); }
  100% { box-shadow: inset 0 0 0 rgba(255,224,138,0); }
}
.dice-roll.running {
  animation: diceSpin 0.55s linear infinite;
}
@keyframes diceSpin {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.08); }
  100% { transform: rotate(360deg) scale(1); }
}
.map-reveal.running {
  animation: mapOpen 1s ease-out;
}
@keyframes mapOpen {
  0% { clip-path: inset(0 50% 0 50%); opacity: 0.4; }
  100% { clip-path: inset(0 0 0 0); opacity: 1; }
}

.tool-card {
  background: var(--card);
  border: 1px solid rgba(80, 50, 40, 0.06);
  border-radius: var(--radius);
  padding: 16px 12px 14px;
  text-align: center;
  cursor: pointer;
  min-height: 112px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 0.15s, box-shadow 0.15s;
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow);
  font: inherit;
}
.tool-card:active { transform: scale(0.96); }
.tool-card.hero {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #FFE4D9 0%, #FFD0C4 40%, #C8F0E8 100%);
  border: none;
  min-height: 84px;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 138, 122, 0.15);
  flex-direction: row;
  gap: 16px;
  padding: 18px 22px;
  text-align: left;
}
.tool-card.hero .card-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}
.tool-card .icon-badge {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(80, 50, 40, 0.12);
}
.tool-card .icon-badge::before {
  content: "";
  position: absolute;
  top: 10%;
  left: 14%;
  right: 14%;
  height: 32%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  pointer-events: none;
}
.tool-card.hero .icon-badge {
  width: 72px;
  height: 72px;
  border-radius: 20px;
}
.tool-card .name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}
.tool-card .hint {
  font-size: 0.7rem;
  color: var(--muted);
  line-height: 1.35;
  max-width: 100%;
}
.tool-card.hero .name { font-size: 1.1rem; }
.tool-card.hero .hint { color: var(--text-soft); font-size: 0.78rem; }

/* Function home — all categories 2 per row, compact cards */
.tool-grid.function-tools {
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.tool-grid.function-tools.function-tools-call,
.tool-grid.function-tools.function-tools-fun {
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.tool-card.fn-list {
  position: relative;
  overflow: hidden;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 74px;
  height: auto;
  padding: 12px 12px 12px 12px;
  text-align: left;
  border: 1px solid rgba(80, 50, 40, 0.05);
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(80, 50, 40, 0.06);
}
.tool-card.fn-list::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 3px 0 0 3px;
  background: linear-gradient(180deg, #A8E6D8, #3AA991);
}
.tool-card.fn-list .icon-badge,
.tool-card.fn-list.hero .icon-badge {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  margin: 0;
  box-shadow: 0 2px 8px rgba(80, 50, 40, 0.12);
}
.tool-card.fn-list .icon-badge .material-symbols-rounded {
  font-size: 1.45rem;
  font-variation-settings: 'FILL' 1, 'wght' 650, 'GRAD' 0, 'opsz' 24;
  background: none !important;
  -webkit-background-clip: unset;
  background-clip: unset;
  -webkit-text-fill-color: #fff !important;
  color: #fff !important;
}
.tool-card.fn-list .card-text {
  display: flex;
  flex: 1;
  min-width: 0;
  width: auto;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  text-align: left;
}
.tool-card.fn-list .name {
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.tool-card.fn-list .hint {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  max-width: 100%;
  font-size: 0.74rem;
  line-height: 1.25;
  font-weight: 600;
  color: #6A9E93;
  text-align: left;
}
.tool-card.fn-list.hero {
  grid-column: auto;
  min-height: 74px;
  padding: 12px 12px;
  gap: 10px;
  border: 1px solid rgba(80, 50, 40, 0.05);
  box-shadow: 0 2px 10px rgba(80, 50, 40, 0.06);
  text-align: left;
}
/* Unified padding/icon across scan / call / fun — no per-tab font overrides */
.function-tools-call .tool-card.fn-list,
.function-tools-fun .tool-card.fn-list,
.function-tools-scan .tool-card.fn-list {
  min-height: 74px;
  padding: 12px 12px;
  gap: 10px;
}
.function-tools-call .tool-card.fn-list .icon-badge,
.function-tools-fun .tool-card.fn-list .icon-badge,
.function-tools-scan .tool-card.fn-list .icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 14px;
}
.function-tools-call .tool-card.fn-list .icon-badge .material-symbols-rounded,
.function-tools-fun .tool-card.fn-list .icon-badge .material-symbols-rounded,
.function-tools-scan .tool-card.fn-list .icon-badge .material-symbols-rounded {
  font-size: 1.45rem;
}

/* Category pill dropped on function cards (kept for legacy/safety) */
.fn-hint-pill {
  display: none;
}

/* Per-tool card tones — soft pastels, distinct hues */
.tool-card.fn-list.fn-tone-peach {
  background: linear-gradient(135deg, #FFF6F0 0%, #FFE4D9 100%);
}
.tool-card.fn-list.fn-tone-peach::before {
  background: linear-gradient(180deg, #FFBEA8, #E08A70);
}
.tool-card.fn-list.fn-tone-peach .icon-badge {
  background: linear-gradient(145deg, #FFBEA8 0%, #E08A70 100%) !important;
  box-shadow: 0 4px 12px #E08A7044;
}
.tool-card.fn-list.fn-tone-peach .name { color: #C46B52; }
.tool-card.fn-list.fn-tone-peach .hint { color: #B88878; }
.tool-card.fn-list.fn-tone-peach .fn-hint-pill {
  background: #E08A7028;
  color: #C46B52;
}

.tool-card.fn-list.fn-tone-coral {
  background: linear-gradient(135deg, #FFF5F3 0%, #FFD8D0 100%);
}
.tool-card.fn-list.fn-tone-coral::before {
  background: linear-gradient(180deg, #FF8A7A, #E06B5C);
}
.tool-card.fn-list.fn-tone-coral .icon-badge {
  background: linear-gradient(145deg, #FF8A7A 0%, #E06B5C 100%) !important;
  box-shadow: 0 4px 12px #E06B5C44;
}
.tool-card.fn-list.fn-tone-coral .name { color: #C45548; }
.tool-card.fn-list.fn-tone-coral .hint { color: #B88078; }
.tool-card.fn-list.fn-tone-coral .fn-hint-pill {
  background: #E06B5C28;
  color: #C45548;
}

.tool-card.fn-list.fn-tone-lime {
  background: linear-gradient(135deg, #F7FBEA 0%, #E8F2C4 100%);
}
.tool-card.fn-list.fn-tone-lime::before {
  background: linear-gradient(180deg, #C6E86A, #7A9A3A);
}
.tool-card.fn-list.fn-tone-lime .icon-badge {
  background: linear-gradient(145deg, #C6E86A 0%, #7A9A3A 100%) !important;
  box-shadow: 0 4px 12px #7A9A3A44;
}
.tool-card.fn-list.fn-tone-lime .name { color: #5E7A2E; }
.tool-card.fn-list.fn-tone-lime .hint { color: #7A8A5A; }
.tool-card.fn-list.fn-tone-lime .fn-hint-pill {
  background: #7A9A3A28;
  color: #5E7A2E;
}

.tool-card.fn-list.fn-tone-sky {
  background: linear-gradient(135deg, #F3F8FD 0%, #D6ECFF 100%);
}
.tool-card.fn-list.fn-tone-sky::before {
  background: linear-gradient(180deg, #7EB8E8, #4A8FC4);
}
.tool-card.fn-list.fn-tone-sky .icon-badge {
  background: linear-gradient(145deg, #7EB8E8 0%, #4A8FC4 100%) !important;
  box-shadow: 0 4px 12px #4A8FC444;
}
.tool-card.fn-list.fn-tone-sky .name { color: #3A7AB0; }
.tool-card.fn-list.fn-tone-sky .hint { color: #6A8AA0; }
.tool-card.fn-list.fn-tone-sky .fn-hint-pill {
  background: #4A8FC428;
  color: #3A7AB0;
}

.tool-card.fn-list.fn-tone-indigo {
  background: linear-gradient(135deg, #F4F3FB 0%, #D8D4F0 100%);
}
.tool-card.fn-list.fn-tone-indigo::before {
  background: linear-gradient(180deg, #9B8FD4, #6B5FB0);
}
.tool-card.fn-list.fn-tone-indigo .icon-badge {
  background: linear-gradient(145deg, #9B8FD4 0%, #6B5FB0 100%) !important;
  box-shadow: 0 4px 12px #6B5FB044;
}
.tool-card.fn-list.fn-tone-indigo .name { color: #5A4E9A; }
.tool-card.fn-list.fn-tone-indigo .hint { color: #7A7498; }
.tool-card.fn-list.fn-tone-indigo .fn-hint-pill {
  background: #6B5FB028;
  color: #5A4E9A;
}

.tool-card.fn-list.fn-tone-rose {
  background: linear-gradient(135deg, #FFF5F7 0%, #FFD6E0 100%);
}
.tool-card.fn-list.fn-tone-rose::before {
  background: linear-gradient(180deg, #FF9BB0, #E06B85);
}
.tool-card.fn-list.fn-tone-rose .icon-badge {
  background: linear-gradient(145deg, #FF9BB0 0%, #E06B85 100%) !important;
  box-shadow: 0 4px 12px #E06B8544;
}
.tool-card.fn-list.fn-tone-rose .name { color: #C4556E; }
.tool-card.fn-list.fn-tone-rose .hint { color: #B88090; }
.tool-card.fn-list.fn-tone-rose .fn-hint-pill {
  background: #E06B8528;
  color: #C4556E;
}

.tool-card.fn-list.fn-tone-gold {
  background: linear-gradient(135deg, #FFFBF0 0%, #FFE8B8 100%);
}
.tool-card.fn-list.fn-tone-gold::before {
  background: linear-gradient(180deg, #FFD54F, #E0A820);
}
.tool-card.fn-list.fn-tone-gold .icon-badge {
  background: linear-gradient(145deg, #FFD54F 0%, #E0A820 100%) !important;
  box-shadow: 0 4px 12px #E0A82044;
}
.tool-card.fn-list.fn-tone-gold .name { color: #B88810; }
.tool-card.fn-list.fn-tone-gold .hint { color: #A89860; }
.tool-card.fn-list.fn-tone-gold .fn-hint-pill {
  background: #E0A82028;
  color: #B88810;
}

.tool-card.fn-list.fn-tone-lilac {
  background: linear-gradient(135deg, #F9F5FC 0%, #E8DCF5 100%);
}
.tool-card.fn-list.fn-tone-lilac::before {
  background: linear-gradient(180deg, #C4B0F0, #9B7ED9);
}
.tool-card.fn-list.fn-tone-lilac .icon-badge {
  background: linear-gradient(145deg, #C4B0F0 0%, #9B7ED9 100%) !important;
  box-shadow: 0 4px 12px #9B7ED944;
}
.tool-card.fn-list.fn-tone-lilac .name { color: #7A5FC0; }
.tool-card.fn-list.fn-tone-lilac .hint { color: #9080A8; }
.tool-card.fn-list.fn-tone-lilac .fn-hint-pill {
  background: #9B7ED928;
  color: #7A5FC0;
}

.tool-card.fn-list.fn-tone-teal {
  background: linear-gradient(135deg, #F0FAF8 0%, #C8EDE6 100%);
}
.tool-card.fn-list.fn-tone-teal::before {
  background: linear-gradient(180deg, #5EC4B0, #3AA991);
}
.tool-card.fn-list.fn-tone-teal .icon-badge {
  background: linear-gradient(145deg, #5EC4B0 0%, #3AA991 100%) !important;
  box-shadow: 0 4px 12px #3AA99144;
}
.tool-card.fn-list.fn-tone-teal .name { color: #2F8A78; }
.tool-card.fn-list.fn-tone-teal .hint { color: #5A9A8E; }
.tool-card.fn-list.fn-tone-teal .fn-hint-pill {
  background: #3AA99128;
  color: #2F8A78;
}

.tool-card.fn-list.fn-tone-aqua {
  background: linear-gradient(135deg, #F0F9FC 0%, #C8E8F5 100%);
}
.tool-card.fn-list.fn-tone-aqua::before {
  background: linear-gradient(180deg, #7EC8E0, #4A9AB8);
}
.tool-card.fn-list.fn-tone-aqua .icon-badge {
  background: linear-gradient(145deg, #7EC8E0 0%, #4A9AB8 100%) !important;
  box-shadow: 0 4px 12px #4A9AB844;
}
.tool-card.fn-list.fn-tone-aqua .name { color: #3A7A98; }
.tool-card.fn-list.fn-tone-aqua .hint { color: #5A8A9A; }
.tool-card.fn-list.fn-tone-aqua .fn-hint-pill {
  background: #4A9AB828;
  color: #3A7A98;
}

.tool-card.fn-list.fn-tone-ice {
  background: linear-gradient(135deg, #F2F8FC 0%, #D6ECFF 100%);
}
.tool-card.fn-list.fn-tone-ice::before {
  background: linear-gradient(180deg, #A8D4F0, #6BA8D4);
}
.tool-card.fn-list.fn-tone-ice .icon-badge {
  background: linear-gradient(145deg, #A8D4F0 0%, #6BA8D4 100%) !important;
  box-shadow: 0 4px 12px #6BA8D444;
}
.tool-card.fn-list.fn-tone-ice .name { color: #4A8FC4; }
.tool-card.fn-list.fn-tone-ice .hint { color: #7A9BB0; }
.tool-card.fn-list.fn-tone-ice .fn-hint-pill {
  background: #6BA8D428;
  color: #4A8FC4;
}

.tool-card.fn-list.fn-tone-amber {
  background: linear-gradient(135deg, #FFFBF0 0%, #FFE9B0 100%);
}
.tool-card.fn-list.fn-tone-amber::before {
  background: linear-gradient(180deg, #FFD54F, #E8B020);
}
.tool-card.fn-list.fn-tone-amber .icon-badge {
  background: linear-gradient(145deg, #FFD54F 0%, #E8B020 100%) !important;
  box-shadow: 0 4px 12px #E8B02044;
}
.tool-card.fn-list.fn-tone-amber .name { color: #C49010; }
.tool-card.fn-list.fn-tone-amber .hint { color: #A89850; }
.tool-card.fn-list.fn-tone-amber .fn-hint-pill {
  background: #E8B02028;
  color: #C49010;
}

.tool-card.fn-list.fn-tone-mint {
  background: linear-gradient(135deg, #F4FBF8 0%, #D4F0E8 100%);
}
.tool-card.fn-list.fn-tone-mint::before {
  background: linear-gradient(180deg, #A8E6D8, #3AA991);
}
.tool-card.fn-list.fn-tone-mint .icon-badge {
  background: linear-gradient(145deg, #A8E6D8 0%, #3AA991 100%) !important;
  box-shadow: 0 4px 12px #3AA99144;
}
.tool-card.fn-list.fn-tone-mint .name { color: #2F9A84; }
.tool-card.fn-list.fn-tone-mint .hint { color: #6A9E93; }
.tool-card.fn-list.fn-tone-mint .fn-hint-pill {
  background: #3AA99128;
  color: #2F9A84;
}

.tool-card.fn-list.fn-tone-apricot {
  background: linear-gradient(135deg, #FFF8F2 0%, #FFE0C8 100%);
}
.tool-card.fn-list.fn-tone-apricot::before {
  background: linear-gradient(180deg, #FFBE90, #E08A50);
}
.tool-card.fn-list.fn-tone-apricot .icon-badge {
  background: linear-gradient(145deg, #FFBE90 0%, #E08A50 100%) !important;
  box-shadow: 0 4px 12px #E08A5044;
}
.tool-card.fn-list.fn-tone-apricot .name { color: #C07040; }
.tool-card.fn-list.fn-tone-apricot .hint { color: #B08870; }
.tool-card.fn-list.fn-tone-apricot .fn-hint-pill {
  background: #E08A5028;
  color: #C07040;
}

.tool-card.fn-list.fn-tone-seafoam {
  background: linear-gradient(135deg, #F2FAF7 0%, #C8EDE0 100%);
}
.tool-card.fn-list.fn-tone-seafoam::before {
  background: linear-gradient(180deg, #7EC4B0, #3AA991);
}
.tool-card.fn-list.fn-tone-seafoam .icon-badge {
  background: linear-gradient(145deg, #7EC4B0 0%, #3AA991 100%) !important;
  box-shadow: 0 4px 12px #3AA99144;
}
.tool-card.fn-list.fn-tone-seafoam .name { color: #2F8A78; }
.tool-card.fn-list.fn-tone-seafoam .hint { color: #6A9E93; }
.tool-card.fn-list.fn-tone-seafoam .fn-hint-pill {
  background: #3AA99128;
  color: #2F8A78;
}

.tool-card.fn-list.fn-tone-scarlet {
  background: linear-gradient(135deg, #FFF5F3 0%, #FFD0C4 100%);
}
.tool-card.fn-list.fn-tone-scarlet::before {
  background: linear-gradient(180deg, #FF8A7A, #E05545);
}
.tool-card.fn-list.fn-tone-scarlet .icon-badge {
  background: linear-gradient(145deg, #FF8A7A 0%, #E05545 100%) !important;
  box-shadow: 0 4px 12px #E0554544;
}
.tool-card.fn-list.fn-tone-scarlet .name { color: #C04035; }
.tool-card.fn-list.fn-tone-scarlet .hint { color: #B07870; }
.tool-card.fn-list.fn-tone-scarlet .fn-hint-pill {
  background: #E0554528;
  color: #C04035;
}

.tool-card.fn-list.fn-tone-blush {
  background: linear-gradient(135deg, #FFF7F4 0%, #FFE4D9 100%);
}
.tool-card.fn-list.fn-tone-blush::before {
  background: linear-gradient(180deg, #FFBEA8, #E8A07A);
}
.tool-card.fn-list.fn-tone-blush .icon-badge {
  background: linear-gradient(145deg, #FFBEA8 0%, #E8A07A 100%) !important;
  box-shadow: 0 4px 12px #E8A07A44;
}
.tool-card.fn-list.fn-tone-blush .name { color: #C88860; }
.tool-card.fn-list.fn-tone-blush .hint { color: #B09080; }
.tool-card.fn-list.fn-tone-blush .fn-hint-pill {
  background: #E8A07A28;
  color: #C88860;
}

.tool-card.fn-list.fn-tone-tangerine {
  background: linear-gradient(135deg, #FFF8F0 0%, #FFE0C0 100%);
}
.tool-card.fn-list.fn-tone-tangerine::before {
  background: linear-gradient(180deg, #FFB070, #E08840);
}
.tool-card.fn-list.fn-tone-tangerine .icon-badge {
  background: linear-gradient(145deg, #FFB070 0%, #E08840 100%) !important;
  box-shadow: 0 4px 12px #E0884044;
}
.tool-card.fn-list.fn-tone-tangerine .name { color: #C07030; }
.tool-card.fn-list.fn-tone-tangerine .hint { color: #B08860; }
.tool-card.fn-list.fn-tone-tangerine .fn-hint-pill {
  background: #E0884028;
  color: #C07030;
}

.tool-card.fn-list.fn-tone-violet {
  background: linear-gradient(135deg, #F7F4FC 0%, #E4D8F5 100%);
}
.tool-card.fn-list.fn-tone-violet::before {
  background: linear-gradient(180deg, #C4B0F0, #9B7ED9);
}
.tool-card.fn-list.fn-tone-violet .icon-badge {
  background: linear-gradient(145deg, #C4B0F0 0%, #9B7ED9 100%) !important;
  box-shadow: 0 4px 12px #9B7ED944;
}
.tool-card.fn-list.fn-tone-violet .name { color: #7A5FC0; }
.tool-card.fn-list.fn-tone-violet .hint { color: #9080A8; }
.tool-card.fn-list.fn-tone-violet .fn-hint-pill {
  background: #9B7ED928;
  color: #7A5FC0;
}

.tool-card.fn-list.fn-tone-honey {
  background: linear-gradient(135deg, #FFFBF2 0%, #FFE8B0 100%);
}
.tool-card.fn-list.fn-tone-honey::before {
  background: linear-gradient(180deg, #FFE08A, #E0B040);
}
.tool-card.fn-list.fn-tone-honey .icon-badge {
  background: linear-gradient(145deg, #FFE08A 0%, #E0B040 100%) !important;
  box-shadow: 0 4px 12px #E0B04044;
}
.tool-card.fn-list.fn-tone-honey .name { color: #C09020; }
.tool-card.fn-list.fn-tone-honey .hint { color: #A89860; }
.tool-card.fn-list.fn-tone-honey .fn-hint-pill {
  background: #E0B04028;
  color: #C09020;
}

.tool-card.fn-list.fn-tone-emerald {
  background: linear-gradient(135deg, #F2FAF6 0%, #C8EBD8 100%);
}
.tool-card.fn-list.fn-tone-emerald::before {
  background: linear-gradient(180deg, #6BC49A, #3AA978);
}
.tool-card.fn-list.fn-tone-emerald .icon-badge {
  background: linear-gradient(145deg, #6BC49A 0%, #3AA978 100%) !important;
  box-shadow: 0 4px 12px #3AA97844;
}
.tool-card.fn-list.fn-tone-emerald .name { color: #2F8A62; }
.tool-card.fn-list.fn-tone-emerald .hint { color: #5A9A7A; }
.tool-card.fn-list.fn-tone-emerald .fn-hint-pill {
  background: #3AA97828;
  color: #2F8A62;
}

.tool-card.fn-list.fn-tone-orchid {
  background: linear-gradient(135deg, #FAF5FB 0%, #EED8F5 100%);
}
.tool-card.fn-list.fn-tone-orchid::before {
  background: linear-gradient(180deg, #D4A0E8, #B06DD0);
}
.tool-card.fn-list.fn-tone-orchid .icon-badge {
  background: linear-gradient(145deg, #D4A0E8 0%, #B06DD0 100%) !important;
  box-shadow: 0 4px 12px #B06DD044;
}
.tool-card.fn-list.fn-tone-orchid .name { color: #9050B0; }
.tool-card.fn-list.fn-tone-orchid .hint { color: #9A80A8; }
.tool-card.fn-list.fn-tone-orchid .fn-hint-pill {
  background: #B06DD028;
  color: #9050B0;
}

.tool-card.fn-list.fn-tone-berry {
  background: linear-gradient(135deg, #FBF4F8 0%, #F0D4E4 100%);
}
.tool-card.fn-list.fn-tone-berry::before {
  background: linear-gradient(180deg, #E090B8, #C06090);
}
.tool-card.fn-list.fn-tone-berry .icon-badge {
  background: linear-gradient(145deg, #E090B8 0%, #C06090 100%) !important;
  box-shadow: 0 4px 12px #C0609044;
}
.tool-card.fn-list.fn-tone-berry .name { color: #A04878; }
.tool-card.fn-list.fn-tone-berry .hint { color: #A08098; }
.tool-card.fn-list.fn-tone-berry .fn-hint-pill {
  background: #C0609028;
  color: #A04878;
}


/* Function tabs — soft pastel active states */
.home-tabs {
  gap: 4px;
  padding: 4px;
  border-radius: 16px;
  border-color: rgba(80, 50, 40, 0.06);
  background: rgba(255, 255, 255, 0.82);
}
.home-tab {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 0.74rem;
  transition: background 0.15s ease, transform 0.12s ease, color 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.home-tab.home-tab-scan.active {
  background: #E8F7F2;
  border-color: rgba(58, 169, 145, 0.2);
  color: #2F9A84;
  box-shadow: 0 2px 8px rgba(58, 169, 145, 0.14);
}
.home-tab.home-tab-call.active {
  background: #EAF3FB;
  border-color: rgba(91, 159, 212, 0.2);
  color: #4A8FC4;
  box-shadow: 0 2px 8px rgba(91, 159, 212, 0.14);
}
.home-tab.home-tab-fun.active {
  background: #F3ECF9;
  border-color: rgba(155, 126, 217, 0.2);
  color: #8B6BC9;
  box-shadow: 0 2px 8px rgba(155, 126, 217, 0.14);
}
.function-guide {
  margin: 0 2px 2px;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-soft);
}
/* Duplicate section hint removed from JS; hide if leftover markup */
.function-section-hint {
  display: none;
}

.home-footer { display: none; }

/* ===== Tool chrome ===== */
.tool-header {
  display: flex; align-items: center; gap: 8px;
  padding: calc(10px + var(--safe-t)) max(12px, var(--safe-r)) 10px max(12px, var(--safe-l));
  flex-shrink: 0;
  background: rgba(255, 247, 240, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(80, 50, 40, 0.05);
  z-index: 10;
}

/* dark scheme disabled — light cute UI is default */


.header-spacer {
  width: var(--tap); height: var(--tap);
  flex-shrink: 0;
  visibility: hidden;
  pointer-events: none;
}
.tiny-gear {
  width: var(--tap); height: var(--tap);
  border: none; border-radius: 16px;
  background: var(--card);
  color: var(--text);
  font-size: 1.05rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow);
  border: 1px solid rgba(80, 50, 40, 0.06);
  opacity: 0.65;
}
.tiny-gear:active {
  background: var(--peach-soft);
  transform: scale(0.95);
}
.tool-title-press {
  flex: 1; text-align: center;
  font-size: 1.02rem; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--text);
}

.tool-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 16px calc(16px + var(--safe-b));
  display: flex;
  flex-direction: column;
}

/* ===== Phase panels ===== */
.phase {
  display: none;
  flex-direction: column;
  flex: 1;
  gap: 12px;
  animation: fadeIn 0.3s ease;
  min-height: 0;
}
.phase.active { display: flex; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.phase-badge {
  align-self: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 6px 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.phase-badge.secret {
  color: var(--lock);
  background: rgba(201, 160, 106, 0.14);
  border: 1px solid rgba(201, 160, 106, 0.28);
}
.phase-badge.scan {
  color: var(--sky);
  background: rgba(126, 184, 232, 0.16);
  border: 1px solid rgba(126, 184, 232, 0.32);
}
.phase-badge.result {
  color: var(--accent-deep);
  background: rgba(94, 196, 176, 0.16);
  border: 1px solid rgba(94, 196, 176, 0.32);
}

.lock-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: rgba(201, 160, 106, 0.2);
  font-size: 0.65rem;
}
.lock-badge .material-symbols-rounded {
  font-size: 0.9rem;
}

.phase-title {
  text-align: center;
  font-size: 1.22rem;
  font-weight: 800;
  color: var(--text);
}
.phase-desc {
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Choice buttons — large friendly cards ===== */
.choice-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}
.choice-btn {
  min-height: 68px;
  padding: 14px 16px;
  border: 2px solid rgba(80, 50, 40, 0.08);
  border-radius: 18px;
  background: var(--card);
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: border-color 0.15s, background 0.15s, transform 0.12s, box-shadow 0.15s;
  box-shadow: var(--shadow);
  font-family: inherit;
}
.choice-btn:active { transform: scale(0.98); }
.choice-btn.selected {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(94, 196, 176, 0.12), rgba(126, 184, 232, 0.1));
  box-shadow: 0 0 0 3px rgba(94, 196, 176, 0.2), var(--shadow);
}
.choice-btn .c-icon {
  font-size: 1.7rem;
  flex-shrink: 0;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-soft);
  border-radius: 14px;
}
.choice-btn .c-label { flex: 1; line-height: 1.25; }
.choice-btn .c-sub {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  margin-top: 3px;
}

/* Princess same-page tabs + message list */
.princess-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 4px 0 12px;
}
.princess-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 10px 14px;
  border: 2px solid rgba(80, 50, 40, 0.08);
  border-radius: 20px;
  background: var(--card);
  color: var(--text);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: border-color 0.15s, background 0.15s, transform 0.12s, box-shadow 0.15s;
}
.princess-tab:active { transform: scale(0.98); }
.princess-tab-thumb {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 3px 10px rgba(80,50,40,0.14);
}
.princess-tab-name {
  line-height: 1.2;
  text-align: center;
}
.princess-tab.ice.active {
  border-color: #7EB8E8;
  background: linear-gradient(160deg, rgba(214, 236, 255, 0.85), rgba(126, 184, 232, 0.22));
  box-shadow: 0 0 0 3px rgba(126, 184, 232, 0.28), var(--shadow);
}
.princess-tab.mermaid.active {
  border-color: #5EC4B0;
  background: linear-gradient(160deg, rgba(168, 230, 216, 0.75), rgba(94, 196, 176, 0.22));
  box-shadow: 0 0 0 3px rgba(94, 196, 176, 0.28), var(--shadow);
}
.princess-tab.active .princess-tab-thumb {
  box-shadow: 0 0 0 3px rgba(255,255,255,0.9), 0 4px 14px rgba(80,50,40,0.16);
}

/* legacy role helpers (unused for princess tabs, kept harmless) */
.role-thumb {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(80,50,40,0.12);
  background: #fff;
}

.sub-options {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 12px;
  background: var(--card-soft);
  border-radius: 16px;
  border: 1px dashed rgba(201, 160, 106, 0.35);
}
.sub-options.show { display: flex; }
.sub-options .sub-label {
  width: 100%;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
}
.chip {
  min-width: 64px;
  min-height: 48px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 2px solid rgba(80, 50, 40, 0.1);
  background: var(--card);
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  box-shadow: var(--shadow);
}
.chip.selected {
  border-color: var(--coral);
  background: rgba(255, 138, 122, 0.15);
  color: var(--coral-deep);
}

/* ===== Buttons ===== */
.primary-btn, .ghost-btn {
  min-height: var(--tap);
  border: none;
  border-radius: 18px;
  font-size: 1.12rem;
  font-weight: 800;
  cursor: pointer;
  padding: 0 24px;
  margin-top: auto;
  font-family: inherit;
  flex-shrink: 0;
}
.primary-btn {
  background: linear-gradient(135deg, var(--coral) 0%, #FF9E8E 45%, var(--accent) 100%);
  color: #fff;
  box-shadow: 0 8px 22px rgba(255, 138, 122, 0.35);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
  /* pad above home indicator when sticky at bottom of phase */
  margin-bottom: 4px;
}
.primary-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}
.primary-btn:not(:disabled):active { transform: scale(0.97); }
.ghost-btn {
  background: var(--card);
  color: var(--text-soft);
  margin-top: 8px;
  border: 1px solid rgba(80, 50, 40, 0.08);
  box-shadow: var(--shadow);
}
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  width: 100%;
  align-items: stretch;
}
.btn-row > .primary-btn,
.btn-row > .secondary-btn,
.btn-row > .ghost-btn {
  margin-top: 0;
  margin-bottom: 0;
  min-height: 48px;
  flex: 1 1 auto;
}
.btn-row.btn-row-stack {
  flex-direction: column;
}
.btn-row.btn-row-stack > .primary-btn {
  flex: 1 1 100%;
  width: 100%;
}
.btn-row.btn-row-pair {
  flex-direction: row;
}
.btn-row.btn-row-pair > .secondary-btn,
.btn-row.btn-row-pair > .ghost-btn,
.btn-row.btn-row-pair > .primary-btn {
  flex: 1 1 0;
  min-width: 0;
}
.btn-row.btn-row-pair > .primary-btn.flex-grow {
  flex: 1.5 1 0;
}
.btn-row.btn-row-pair > .secondary-btn.flex-shrink {
  flex: 1 1 0;
}
.btn-row .btn-row {
  margin-top: 0;
  width: 100%;
}
.phase > .btn-row {
  margin-top: auto;
}
.primary-btn {
  width: 100%;
}
.btn-row-pair > .primary-btn {
  width: auto;
}

/* ===== Scan stage — theatrical but cute ===== */
.scan-stage {
  position: relative;
  flex: 1;
  min-height: min(52vh, 420px);
  border-radius: 24px;
  background:
    radial-gradient(ellipse at 50% 40%, #E8F8F4 0%, #D6ECFF 45%, #FFE8DE 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(94, 196, 176, 0.25);
  box-shadow: inset 0 0 40px rgba(126, 184, 232, 0.15), var(--shadow);
}

/* dark scheme disabled — light cute UI is default */

.scan-illus,
.result-art,
.belly-svg {
  width: min(92%, 360px);
  max-width: 360px;
  opacity: 0.98;
  z-index: 1;
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.scan-illus {
  min-height: 220px;
}
/* Neon medical HUD (xray + water) — dark scanner like the reference video */
.scan-stage.hud-stage {
  background:
    radial-gradient(ellipse at 50% 45%, #0a2e24 0%, #03140f 55%, #010a08 100%);
  border: 2px solid rgba(57, 255, 136, 0.35);
  box-shadow:
    inset 0 0 48px rgba(57, 255, 136, 0.08),
    0 0 24px rgba(57, 255, 136, 0.12);
}
.scan-stage.hud-stage .scan-status {
  /* status left empty for HUD tools — keep chrome hidden when blank */
  color: #7dffb8;
  text-shadow: 0 0 8px rgba(57, 255, 136, 0.55);
  font-family: ui-monospace, monospace;
  letter-spacing: 0.04em;
  min-height: 0;
}
.hud-illus {
  width: min(100%, 440px);
  max-width: 440px;
  min-height: 0;
}
.scan-stage.hud-scanning .hud-ekg {
  animation: hudEkgPulse 0.9s ease-in-out infinite;
}
@keyframes hudEkgPulse {
  0%, 100% { opacity: 0.75; }
  50% { opacity: 1; }
}
.scan-beam.hud-neon {
  height: 44px;
  background: linear-gradient(180deg,
    transparent,
    rgba(57, 255, 136, 0.15) 25%,
    rgba(57, 255, 136, 0.75) 48%,
    rgba(180, 255, 220, 0.95) 50%,
    rgba(57, 255, 136, 0.75) 52%,
    rgba(57, 255, 136, 0.15) 75%,
    transparent);
  box-shadow: 0 0 28px 10px rgba(57, 255, 136, 0.45);
}

/* Belly scans need more visual weight than the other ready illustrations. */
.belly-scan-illus {
  width: min(96%, 400px);
  max-width: 400px;
  min-height: 0;
}
.result-art {
  min-height: 180px;
  animation: popIn 0.5s cubic-bezier(0.2, 1.4, 0.4, 1);
  filter: drop-shadow(0 8px 18px rgba(80, 50, 40, 0.12));
}
.scan-beam {
  position: absolute; left: 0; right: 0; height: 52px;
  background: linear-gradient(180deg,
    transparent,
    rgba(94, 196, 176, 0.45) 35%,
    rgba(255, 255, 255, 0.85) 50%,
    rgba(126, 184, 232, 0.5) 65%,
    transparent);
  box-shadow: 0 0 36px 12px rgba(94, 196, 176, 0.35);
  z-index: 2;
  top: -60px;
  pointer-events: none;
  opacity: 0;
}
.scan-beam.running {
  opacity: 1;
  animation: beamSweep 2.8s ease-in-out forwards;
}
@keyframes beamSweep {
  0%   { top: -10%; }
  50%  { top: 55%; }
  100% { top: 105%; }
}
.scan-radar {
  position: absolute; inset: 12%;
  border-radius: 50%;
  border: 2px solid rgba(126, 184, 232, 0.4);
  z-index: 2;
  opacity: 0;
}
.scan-radar::before {
  content: "";
  position: absolute; inset: 15%;
  border-radius: 50%;
  border: 1px solid rgba(94, 196, 176, 0.3);
}
.scan-radar::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 50%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--coral));
  transform-origin: left center;
  animation: radarSpin 1.2s linear infinite;
}
.scan-radar.running { opacity: 1; }
@keyframes radarSpin { to { transform: rotate(360deg); } }

.scan-status {
  position: absolute; bottom: 16px; left: 0; right: 0;
  text-align: center; z-index: 3;
  font-size: 1rem; font-weight: 800;
  color: var(--accent-deep);
  letter-spacing: 0.02em;
}
.scan-pulse {
  position: absolute; width: 120px; height: 120px;
  border-radius: 50%;
  border: 3px solid var(--coral);
  z-index: 2;
  opacity: 0;
}
.scan-pulse.running {
  animation: pulseOut 1.4s ease-out infinite;
}
@keyframes pulseOut {
  0% { transform: scale(0.4); opacity: 0.75; }
  100% { transform: scale(2.2); opacity: 0; }
}

.suck-particles {
  position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0;
}
.suck-particles.running { opacity: 1; }
.suck-dot {
  position: absolute;
  width: 14px; height: 14px;
  border-radius: 6px;
  background: var(--coral);
  animation: suckIn 1.6s ease-in forwards;
}
@keyframes suckIn {
  0% { transform: translate(0,0) scale(1); opacity: 1; }
  100% { transform: translate(var(--tx), var(--ty)) scale(0.2); opacity: 0; }
}

.flash-overlay {
  position: absolute; inset: 0; z-index: 2;
  background: radial-gradient(circle at 50% 40%, rgba(255, 255, 220, 0.5), transparent 55%);
  opacity: 0; pointer-events: none;
}
.flash-overlay.running { opacity: 1; animation: flashPulse 0.8s ease-in-out 3; }
@keyframes flashPulse {
  0%,100% { opacity: 0.3; }
  50% { opacity: 0.75; }
}

/* ===== Result stage — celebratory ===== */
.result-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  padding: 16px;
  min-height: 260px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(94, 196, 176, 0.1), rgba(255, 190, 168, 0.08));
  border: 1px solid rgba(94, 196, 176, 0.15);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.result-emoji {
  font-size: 4rem;
  line-height: 1;
  animation: popIn 0.5s cubic-bezier(0.2, 1.4, 0.4, 1);
}
@keyframes popIn {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.result-msg {
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.35;
  color: var(--text);
}
.result-sub {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.5;
  max-width: 280px;
}

/* X-ray + water RESULT — cavity fills frame (no peach tummy rim) */
.belly-wrap {
  position: relative;
  width: min(96%, 400px);
  max-width: 400px;
  aspect-ratio: 1;
  margin: 0 auto;
  filter: drop-shadow(0 10px 22px rgba(15, 118, 110, 0.28));
}
.belly-wrap .belly-svg { width: 100%; max-width: none; height: 100%; min-height: 0; }
.belly-glow.clean {
  filter: drop-shadow(0 0 28px rgba(67, 160, 71, 0.95))
          drop-shadow(0 0 14px rgba(129, 199, 132, 0.85));
  outline: 3px solid rgba(102, 187, 106, 0.65);
  outline-offset: 4px;
  border-radius: 50%;
}
.clean-stamp {
  position: absolute;
  right: 4%;
  top: 6%;
  z-index: 3;
  padding: 6px 12px;
  border: 3px solid #43a047;
  border-radius: 10px;
  color: #2e7d32;
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  background: rgba(232, 245, 233, 0.92);
  transform: rotate(12deg);
  box-shadow: 0 4px 12px rgba(67, 160, 71, 0.35);
  pointer-events: none;
}
.clean-zero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 6px auto 2px;
  padding: 8px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  border: 2px solid #66bb6a;
  color: #1b5e20;
  font-weight: 800;
  font-size: 1.05rem;
  box-shadow: 0 4px 14px rgba(102, 187, 106, 0.35);
}
.clean-zero-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: #43a047;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 900;
}
.result-msg.result-msg-success {
  color: #1b5e20;
  background: linear-gradient(135deg, rgba(232, 245, 233, 0.95), rgba(200, 230, 201, 0.55));
  border: 2px solid rgba(102, 187, 106, 0.55);
  border-radius: 14px;
  padding: 10px 14px;
  margin-top: 4px;
}
.result-sub.result-sub-success {
  color: #2e7d32;
  font-weight: 700;
}
/* Outer .bug: SVG transform="translate(...)" only — never animate transform on it.
   Inner .bug-crawl owns all CSS transform animation so position isn't overwritten. */
.bug-crawl {
  transform-box: fill-box;
  transform-origin: center;
  animation: bugCrawl 1.8s ease-in-out infinite;
}
.bug:nth-of-type(1) .bug-crawl { animation-delay: 0s; animation-duration: 1.6s; }
.bug:nth-of-type(2) .bug-crawl { animation-delay: 0.25s; animation-duration: 2s; }
.bug:nth-of-type(3) .bug-crawl { animation-delay: 0.45s; animation-duration: 1.7s; }
@keyframes bugCrawl {
  0%   { transform: translate(0,0) rotate(-14deg) scaleX(1); }
  20%  { transform: translate(12px,-10px) rotate(16deg) scaleX(1.05); }
  40%  { transform: translate(-6px,-16px) rotate(-10deg) scaleX(0.95); }
  60%  { transform: translate(14px,6px) rotate(18deg) scaleX(1.08); }
  80%  { transform: translate(-10px,4px) rotate(-12deg) scaleX(0.97); }
  100% { transform: translate(0,0) rotate(-14deg) scaleX(1); }
}
.clean-sparkles {
  animation: sparklePulse 1.6s ease-in-out infinite;
  filter: drop-shadow(0 0 6px rgba(129, 199, 132, 0.85));
}
@keyframes sparklePulse {
  0%, 100% { opacity: 0.9; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.04); }
}

/* Monster */
.monster-svg { width: min(92%, 360px); max-width: 360px; }
.monster-bounce { animation: monsterBounce 0.7s ease-in-out infinite alternate; }
@keyframes monsterBounce {
  from { transform: translateY(0) rotate(-3deg); }
  to   { transform: translateY(-10px) rotate(3deg); }
}

/* Power meter */
.meter {
  width: 100%; max-width: 260px;
  height: 36px;
  background: rgba(80, 50, 40, 0.08);
  border-radius: 999px;
  overflow: hidden;
  border: 2px solid rgba(80, 50, 40, 0.1);
  position: relative;
}
.meter-fill {
  height: 100%;
  border-radius: 999px;
  width: 0%;
  transition: width 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  background: linear-gradient(90deg, #FF8A7A, #FFBEA8, #5EC4B0, #7EB8E8);
}
.meter-label {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.9rem;
  color: var(--text);
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
}

/* Germs */
.germs-wrap { position: relative; width: 180px; height: 140px; }
.germ {
  position: absolute;
  font-size: 2rem;
  animation: germWiggle 0.5s ease-in-out infinite alternate;
}
.germ:nth-child(1) { left: 20%; top: 30%; animation-delay: 0s; }
.germ:nth-child(2) { left: 55%; top: 15%; animation-delay: 0.2s; }
.germ:nth-child(3) { left: 40%; top: 55%; animation-delay: 0.1s; }
.germ:nth-child(4) { left: 70%; top: 50%; animation-delay: 0.3s; }
@keyframes germWiggle {
  from { transform: rotate(-15deg) scale(1); }
  to   { transform: rotate(15deg) scale(1.15); }
}
.shine-burst {
  font-size: 5rem;
  animation: shineSpin 2s ease-in-out infinite;
}
@keyframes shineSpin {
  0%,100% { filter: drop-shadow(0 0 8px #FFE08A); transform: scale(1); }
  50% { filter: drop-shadow(0 0 24px #FFE08A); transform: scale(1.08); }
}

/* Stars */
.stars-row {
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
  min-height: 60px;
}
.star-icon {
  font-size: 2.6rem;
  opacity: 0;
  transform: scale(0);
  animation: starPop 0.5s cubic-bezier(0.2, 1.5, 0.4, 1) forwards;
}
.star-icon.empty { opacity: 0.25; animation: none; transform: scale(1); filter: grayscale(1); }
@keyframes starPop {
  to { opacity: 1; transform: scale(1); }
}

/* Transform ritual */
.transform-ring {
  width: 160px; height: 160px;
  border-radius: 50%;
  border: 4px solid var(--peach);
  display: flex; align-items: center; justify-content: center;
  font-size: 4rem;
  position: relative;
  background: var(--card);
  animation: ringPulse 1.5s ease-in-out infinite;
}
@keyframes ringPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(255, 138, 122, 0.45); }
  50% { box-shadow: 0 0 0 20px rgba(255, 138, 122, 0); }
}
.hero-glow {
  font-size: 5rem;
  animation: heroRise 0.8s ease-out;
  filter: drop-shadow(0 0 20px #FFD54F);
}
@keyframes heroRise {
  from { transform: translateY(30px) scale(0.5); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

/* Emotion */
.cloud-group { position: relative; width: 180px; height: 120px; }
.cloud {
  position: absolute; font-size: 3.5rem;
  animation: cloudDrift 3s ease-in-out infinite;
  filter: grayscale(0.15);
}
.cloud:nth-child(2) { left: 40%; top: 20%; animation-delay: 0.5s; font-size: 2.8rem; }
@keyframes cloudDrift {
  0%,100% { transform: translateX(0); }
  50% { transform: translateX(12px); }
}
.sun-big {
  font-size: 5rem;
  animation: sunGlow 2s ease-in-out infinite;
}
@keyframes sunGlow {
  0%,100% { filter: drop-shadow(0 0 10px #FFD54F); transform: scale(1); }
  50% { filter: drop-shadow(0 0 28px #FFD54F); transform: scale(1.1); }
}

/* Phone call UI */
.call-ui {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  width: 100%;
}
.caller-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: #fff;
}
.call-avatar {
  width: 148px; height: 148px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sky), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
  box-shadow: 0 0 0 0 rgba(126, 184, 232, 0.5);
  animation: callRing 1.2s ease-out infinite;
  overflow: hidden;
  padding: 0;
}
.doctor-avatar-svg {
  width: 100%;
  height: 100%;
  display: block;
}
@keyframes callRing {
  0% { box-shadow: 0 0 0 0 rgba(126, 184, 232, 0.5); }
  70% { box-shadow: 0 0 0 24px rgba(126, 184, 232, 0); }
  100% { box-shadow: 0 0 0 0 rgba(126, 184, 232, 0); }
}
.call-name { font-size: 1.3rem; font-weight: 800; color: var(--text); }
.call-status { color: var(--ok); font-weight: 600; }
.call-script {
  background: var(--card);
  border-radius: 16px;
  padding: 16px;
  font-size: 1.05rem;
  line-height: 1.6;
  min-height: 80px;
  width: 100%;
  text-align: left;
  white-space: pre-wrap;
  box-shadow: var(--shadow);
  border: 1px solid rgba(80, 50, 40, 0.06);
  color: var(--text);
}
.call-actions { display: flex; gap: 24px; margin-top: 8px; }
.call-btn {
  width: 64px; height: 64px; border-radius: 50%; border: none;
  font-size: 1.6rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg);
}
.call-btn.accept { background: var(--ok); color: #fff; }
.call-btn.hang { background: var(--coral-deep); color: #fff; }

/* Sparkles */
.sparkles {
  position: absolute; inset: 0; pointer-events: none; overflow: hidden;
}
.sparkle {
  position: absolute;
  width: 8px; height: 8px;
  background: #FFE08A;
  border-radius: 50%;
  animation: sparkleFall 2s ease-out forwards;
}
@keyframes sparkleFall {
  0% { transform: translateY(0) scale(1); opacity: 1; }
  100% { transform: translateY(80px) scale(0); opacity: 0; }
}

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + var(--safe-b));
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  padding: 12px 18px;
  border-radius: 14px;
  font-size: 0.85rem;
  max-width: 90vw;
  z-index: 100;
  box-shadow: var(--shadow-lg);
  line-height: 1.45;
  text-align: center;
}
.toast[hidden] { display: none; }

/* Parent lock hint strip — quiet, not scary */
.parent-strip {
  font-size: 0.72rem;
  color: var(--lock);
  text-align: center;
  opacity: 0.9;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* Room clutter */
.room-view {
  position: relative;
  width: 200px; height: 160px;
}
.toy-scatter {
  position: absolute;
  font-size: 1.8rem;
  animation: toyShake 0.4s ease-in-out infinite alternate;
}
@keyframes toyShake {
  from { transform: rotate(-8deg); }
  to { transform: rotate(8deg); }
}
.room-clean {
  font-size: 4rem;
  animation: popIn 0.5s cubic-bezier(0.2, 1.4, 0.4, 1);
}

/* Utility */
.mt-auto { margin-top: auto; }
.hidden { display: none !important; }
.xray-disclaimer {
  font-size: 0.7rem;
  color: var(--muted);
  text-align: center;
  margin-top: 4px;
}


/* Result / phase action rows */
.result-actions {
  width: 100%;
  margin-top: 4px;
  gap: 10px;
}
.secondary-btn {
  min-height: var(--tap);
  border: 2px solid rgba(80, 50, 40, 0.12);
  border-radius: 18px;
  background: #fff;
  color: var(--text);
  font-size: 1.12rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  padding: 0 20px;
  box-shadow: var(--shadow);
  margin-bottom: 4px;
}
.secondary-btn:active {
  transform: scale(0.97);
  background: #FFF3EB;
}
.bottom-back {
  /* legacy */
}
.home-icon-btn {
  flex: 0 0 52px !important;
  width: 52px;
  height: 52px;
  min-width: 52px;
  min-height: 52px;
  padding: 0;
  border: 2px solid rgba(80, 50, 40, 0.1);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.home-icon-btn .material-symbols-rounded {
  font-size: 1.55rem;
}
.home-icon-btn:active {
  transform: scale(0.95);
  background: #FFF3EB;
}
.btn-row.btn-row-bar {
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 8px;
}
.btn-row.btn-row-bar > .result-main-btn {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  margin-top: 0;
  margin-bottom: 0;
  height: var(--tap);
  min-height: var(--tap);
  border-radius: 18px;
  font-size: 0.95rem;
  padding: 0 10px;
  white-space: nowrap;
}
/* Reselect stays fixed icon size — never stretch like a side text button */
.btn-row.btn-row-bar > .reselect-icon-btn,
.btn-row.btn-row-bar > #change-choice.home-icon-btn,
.btn-row.btn-row-pair > .reselect-icon-btn,
.btn-row.btn-row-pair > #change-choice.home-icon-btn {
  flex: 0 0 52px !important;
  width: 52px;
  min-width: 52px;
  max-width: 52px;
}
.btn-row.btn-row-pair > .home-icon-btn {
  flex: 0 0 52px;
}


/* ===== Premium SVG art extras ===== */
.germ-svg {
  transform-box: fill-box;
  transform-origin: center;
  animation: germWiggle 0.55s ease-in-out infinite alternate;
}
.germ-svg:nth-of-type(2n) { animation-delay: 0.15s; animation-duration: 0.7s; }
.germ-svg:nth-of-type(3n) { animation-delay: 0.28s; }

.star-svg {
  transform-box: fill-box;
  transform-origin: center;
  animation: starPop 0.55s cubic-bezier(0.2, 1.5, 0.4, 1) forwards;
}

.cloud-drift {
  animation: cloudDrift 3s ease-in-out infinite;
}

/* Legacy emoji result classes unused — kept for safety if old cache flashes */

/* ===== Camera capture (germs / med) ===== */
.scan-stage.camera-stage {
  background: #0f172a;
  border-color: rgba(94, 196, 176, 0.45);
  padding: 0;
}
.camera-video,
.camera-freeze {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.camera-video.mirror {
  transform: scaleX(-1);
}
.camera-canvas { display: none; }
.camera-viewfinder {
  position: absolute;
  inset: 10%;
  border: 2px dashed rgba(168, 230, 216, 0.55);
  border-radius: 18px;
  z-index: 2;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
/* Face tools: head / avatar size guide oval
   Sized/placed to match hero/princess transform PNG face holes (~23–52% Y). */
.camera-head-guide {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-bottom: 16%;
  box-sizing: border-box;
}
.camera-head-frame {
  position: relative;
  width: min(60%, 220px);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.camera-head-oval {
  width: 100%;
  height: auto;
  aspect-ratio: 100 / 140;
  filter: drop-shadow(0 0 8px rgba(94, 196, 176, 0.55));
}
.camera-head-marker {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #D4F5EC;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(168, 230, 216, 0.45);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.camera-head-marker-top {
  top: 2%;
}
.camera-head-marker-chin {
  bottom: 4%;
  color: #FFF8F0;
  background: rgba(30, 50, 70, 0.78);
  border-color: rgba(168, 230, 216, 0.65);
  font-size: 0.76rem;
}
.camera-head-guide-label {
  margin-top: 10px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.55);
  color: #E8F8F4;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
.camera-error {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 48px;
  z-index: 4;
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 247, 240, 0.95);
  color: #8A4A3A;
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.4;
}
.camera-fallback-illus {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.scan-stage.camera-stage .scan-status {
  color: #E8F8F4;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
}

/* Photo result with sticker overlays */
.photo-result {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.photo-frame {
  position: relative;
  width: min(92%, 360px);
  aspect-ratio: 3 / 4;
  border-radius: 20px;
  overflow: hidden;
  border: 3px solid rgba(94, 196, 176, 0.45);
  box-shadow: var(--shadow);
  background: #1e293b;
}
.photo-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Med hero/princess: shift+scale photo so face sits higher/tighter in cutout
   (chin on oval bottom, eyes under crown; avoids forehead-cut + neck gap). */
.photo-frame-med-transform .photo-bg {
  object-position: center 58%;
  transform: scale(1.18);
  transform-origin: 50% 36%;
}
.photo-overlays {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}
.photo-sticker {
  position: absolute;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.25));
}
.sticker-bounce {
  animation: stickerBounce 1.4s ease-in-out infinite;
}
.sticker-sparkle {
  animation: stickerSparkle 1.6s ease-in-out infinite;
}
@keyframes stickerBounce {
  0%, 100% { transform: translateY(0) rotate(-4deg) scale(1); }
  50% { transform: translateY(-8px) rotate(4deg) scale(1.06); }
}
@keyframes stickerSparkle {
  0%, 100% { transform: scale(0.85) rotate(0deg); opacity: 0.75; }
  50% { transform: scale(1.15) rotate(12deg); opacity: 1; }
}

/* Belly water surface shimmer */
.water-belly .water-surface {
  animation: waterBob 2.2s ease-in-out infinite;
}
.water-belly .water-level-fill {
  animation: waterShimmer 3s ease-in-out infinite;
}
@keyframes waterBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(2px); }
}
@keyframes waterShimmer {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.92; }
}


/* Subtle UV-green tint on dirty germ scan photos */
.photo-tint-germ {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 40%, rgba(120, 180, 60, 0.22), rgba(60, 100, 40, 0.08) 70%, transparent 100%);
  mix-blend-mode: multiply;
  border-radius: inherit;
}

/* Soft grey-blue tint for cloudy mood photos */
.photo-tint-cloud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 30%, rgba(144, 164, 174, 0.28), rgba(96, 125, 139, 0.1) 70%, transparent 100%);
  mix-blend-mode: multiply;
  border-radius: inherit;
}

/* Soft red tint for tired-eyes photo result */
.photo-tint-eyes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 40%, rgba(255, 100, 90, 0.16), rgba(200, 60, 50, 0.06) 60%, transparent 100%);
  mix-blend-mode: multiply;
  border-radius: inherit;
}

/* Launch countdown — keep the number in a dedicated area above the rocket */
.launch-stage {
  position: relative;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 2vh, 16px);
  padding: clamp(12px, 3vh, 24px) 12px 32px;
  box-sizing: border-box;
}
.launch-stage .launch-rocket-illus {
  order: 2;
  width: min(78%, 280px);
  max-width: 280px;
  max-height: min(34vh, 230px);
  min-height: 0;
  flex: 0 1 auto;
}
.launch-countdown {
  position: relative;
  inset: auto;
  order: 1;
  flex: 0 0 auto;
  width: min(78%, 250px);
  min-height: clamp(82px, 14vh, 112px);
  padding: 6px 16px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 3;
  border: 3px solid rgba(255, 255, 255, 0.98);
  border-radius: 22px;
  background: linear-gradient(145deg, #fff7f0 0%, #ffe8de 100%);
  box-shadow: 0 8px 18px rgba(80, 50, 40, 0.2), 0 0 0 2px rgba(122, 46, 73, 0.14);
}
.launch-num {
  font-size: clamp(4.5rem, 20vw, 6.4rem);
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  /* Deep berry/coral gradient with a strong white stroke for contrast. */
  background-image: linear-gradient(165deg, #6f2f8f 0%, #8f2857 48%, #a52d50 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 3px rgba(255, 255, 255, 0.98);
  color: #7a2e49;
  paint-order: stroke fill;
  filter:
    drop-shadow(0 1px 0 rgba(255, 255, 255, 0.98))
    drop-shadow(0 3px 0 rgba(80, 26, 54, 0.42))
    drop-shadow(0 7px 12px rgba(80, 26, 54, 0.28));
}
.launch-num.tick {
  animation: launch-tick 0.45s ease-out;
}
@keyframes launch-tick {
  0% { transform: scale(1.38); opacity: 0.85; filter:
    drop-shadow(0 0 2px #fff)
    drop-shadow(0 3px 0 rgba(80, 26, 54, 0.42))
    drop-shadow(0 8px 16px rgba(80, 26, 54, 0.32)); }
  100% { transform: scale(1); opacity: 1; }
}
.launch-smoke-cloud {
  position: absolute;
  left: 50%;
  bottom: 12%;
  width: 70%;
  height: 28%;
  transform: translateX(-50%);
  background:
    radial-gradient(circle at 30% 60%, rgba(176, 190, 197, 0.55), transparent 55%),
    radial-gradient(circle at 70% 50%, rgba(207, 216, 220, 0.5), transparent 50%),
    radial-gradient(circle at 50% 80%, rgba(144, 164, 174, 0.4), transparent 55%);
  animation: launch-smoke 1.2s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 1;
}
@keyframes launch-smoke {
  from { opacity: 0.55; transform: translateX(-50%) scale(0.95); }
  to { opacity: 0.95; transform: translateX(-50%) scale(1.08); }
}
.launch-stage.launch-ticking .launch-rocket-illus {
  animation: launch-shake 0.35s ease-in-out infinite alternate;
}
@keyframes launch-shake {
  from { transform: translateY(0); }
  to { transform: translateY(-4px); }
}
.eye-sticker {
  border-radius: 50%;
}
/* Soft large-range red glow for tired-eyes result (covers whole eye region) */
.eye-glow {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  z-index: 3;
}
.eye-glow-tired {
  background:
    radial-gradient(ellipse at 50% 45%,
      rgba(255, 70, 60, 0.72) 0%,
      rgba(220, 40, 40, 0.48) 38%,
      rgba(180, 20, 30, 0.22) 68%,
      transparent 100%);
  filter: blur(7px);
  mix-blend-mode: screen;
  opacity: 0.95;
  animation: eyeGlowPulse 1.8s ease-in-out infinite;
  transform-origin: center;
}
@keyframes eyeGlowPulse {
  0%, 100% { opacity: 0.82; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.06); }
}
/* Med success: full face-in-hole transform overlay (face shows through cutout) */
.sticker-med-transform {
  animation: medTransformSettle 0.7s cubic-bezier(0.2, 1.25, 0.4, 1) both;
  transform-origin: 50% 38%;
  z-index: 3;
  pointer-events: none;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.28));
}
@keyframes medTransformSettle {
  0% { transform: scale(0.94) translateY(-1%); opacity: 0; }
  /* Slight up-nudge so crown clears forehead when photo is object-positioned */
  100% { transform: scale(1.02) translateY(-2.5%); opacity: 1; }
}

/* Med secret: three equal-language cards — fail first, then transform roles. */
.med-fail-choice {
  margin-bottom: 10px;
}
.med-role-choice-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.med-role-choice-list .choice-btn {
  min-width: 0;
  padding: 12px;
  gap: 10px;
}
.med-role-choice-list .choice-btn .c-icon {
  width: 40px;
  height: 40px;
  font-size: 1.45rem;
}

/* Never show face camera guide / dashed oval on the result photo shell */
.photo-result .camera-head-guide,
.photo-frame .camera-head-guide,
.photo-overlays .camera-head-guide,
.scan-stage:has(.camera-freeze) .camera-head-guide,
.scan-stage:has(.photo-result) .camera-head-guide {
  display: none !important;
}



/* ===== Parent help popup ===== */
.help-popup {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px calc(20px + var(--safe-b));
  box-sizing: border-box;
}
.help-popup[hidden] { display: none !important; }
.help-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(40, 28, 24, 0.45);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.help-card {
  position: relative;
  z-index: 1;
  width: min(100%, 400px);
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(40, 28, 24, 0.22);
  padding: 18px 18px 16px;
  outline: none;
  box-sizing: border-box;
}
@media (max-width: 420px) {
  .help-popup {
    padding-left: 8px;
    padding-right: 8px;
  }
  .help-card {
    width: 100%;
  }
}
.help-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.help-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}
.help-title .material-symbols-rounded {
  font-size: 1.35rem;
  color: #3AA991;
}
.help-close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 12px;
  background: #F3EFEC;
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
}
.help-close:active { transform: scale(0.95); background: #E8E2DE; }
.help-body {
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text);
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.help-card-top,
.help-dismiss-hint,
.help-actions {
  flex-shrink: 0;
}
.help-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.help-wish {
  width: 100%;
  margin: 0;
}
.help-dismiss-hint {
  margin: 14px 0 10px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
}
.help-ok {
  width: 100%;
  margin: 0;
}
.home-help-btn .material-symbols-rounded {
  font-variation-settings: 'FILL' 1, 'wght' 600, 'GRAD' 0, 'opsz' 24;
}


/* ===== v92: designed help / app-intro sheet ===== */
.help-card { padding: 0; background: var(--card-soft); }
.help-card-top {
  position: sticky; top: 0; z-index: 2;
  margin: 0;
  padding: 12px 12px 10px 16px;
  background: rgba(255, 249, 245, 0.96);
  border-bottom: 1px solid #F3E6DD;
}
.help-title { font-size: 0.98rem; line-height: 1.3; min-width: 0; flex-wrap: nowrap; }
.help-title > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.help-title .material-symbols-rounded { color: var(--coral-deep); flex-shrink: 0; }
.help-close {
  width: 40px; height: 40px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 8px rgba(80, 50, 40, 0.14);
  font-size: 1.5rem; font-weight: 700; color: var(--text-soft);
}
.help-body { padding: 14px 14px 6px; font-size: 0.9rem; line-height: 1.6; overscroll-behavior: contain; }
.help-dismiss-hint { margin: 0; padding: 8px 16px 6px; border-top: 1px solid #F3E6DD; background: var(--card-soft); }
.help-actions { flex-direction: row; gap: 8px; padding: 0 14px 14px; background: var(--card-soft); }
.help-actions > button { flex: 1 1 0; min-width: 0; min-height: 46px; white-space: normal; line-height: 1.2; }

.help-intro .material-symbols-rounded,
.help-title .material-symbols-rounded {
  background: none;
  -webkit-text-fill-color: currentColor;
}
.hi-slogan-icon { color: #fff; }
.hi-card-title > span:last-child, .hi-tagline, .hi-slogan-main { text-wrap: pretty; }
.help-intro { display: flex; flex-direction: column; gap: 14px; color: var(--text-soft); }
.help-intro p { margin: 0; }
.hi-p + .hi-p { margin-top: 8px; }

.hi-hero {
  position: relative; text-align: center;
  padding: 18px 14px 16px; border-radius: 22px;
  background:
    radial-gradient(circle at 12% 18%, rgba(255,255,255,0.7) 0 18px, transparent 19px),
    radial-gradient(circle at 88% 78%, rgba(255,255,255,0.5) 0 26px, transparent 27px),
    linear-gradient(160deg, var(--peach-soft) 0%, #FFF3E0 55%, var(--sky-soft) 100%);
  box-shadow: var(--shadow);
}
.hi-logo {
  display: block; width: 68px; height: 68px; margin: 0 auto 8px;
  border-radius: 20px; background: #fff; box-shadow: 0 6px 16px rgba(240, 107, 90, 0.22);
}
.hi-doc-label {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.04em;
  color: var(--accent-deep); background: rgba(255,255,255,0.8);
}
.hi-name { margin: 6px 0 4px; font-size: 1.45rem; font-weight: 900; color: var(--text); letter-spacing: 0.02em; }
.hi-tagline { font-size: 0.95rem; font-weight: 700; line-height: 1.5; color: var(--coral-deep); }

.hi-bubbles { display: flex; flex-direction: column; gap: 8px; padding: 2px 4px; }
.hi-bubble {
  position: relative; max-width: 86%;
  padding: 8px 13px; border-radius: 18px;
  font-size: 0.88rem; font-weight: 700; line-height: 1.45; color: var(--text);
  background: #fff; box-shadow: 0 2px 8px rgba(80, 50, 40, 0.08);
}
.hi-bubble-l { align-self: flex-start; border-bottom-left-radius: 6px; background: #FFFFFF; }
.hi-bubble-r { align-self: flex-end; border-bottom-right-radius: 6px; background: var(--peach-soft); }
.hi-intro { padding: 0 4px; }

.hi-card {
  padding: 14px 14px 15px; border-radius: 20px;
  background: #fff; box-shadow: var(--shadow);
  border-top: 5px solid var(--hi-tone, var(--accent));
}
.hi-tone-peach { --hi-tone: var(--peach); --hi-tone-soft: var(--peach-soft); }
.hi-tone-sun { --hi-tone: #FFD36E; --hi-tone-soft: #FFF4D6; }
.hi-tone-rose { --hi-tone: var(--coral); --hi-tone-soft: #FFE8E4; }
.hi-tone-mint { --hi-tone: var(--accent); --hi-tone-soft: #DDF5EF; }
.hi-card-title {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 0 0 10px; font-size: 1.02rem; font-weight: 900; line-height: 1.4; color: var(--text);
}
.hi-card-title > span:last-child { padding-top: 5px; min-width: 0; }
.hi-emoji {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 14px;
  display: grid; place-items: center; font-size: 1.3rem;
  background: var(--hi-tone-soft, #FFF0E6);
}

.hi-chips { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.hi-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 11px 5px 8px; border-radius: 999px;
  font-size: 0.82rem; font-weight: 800; line-height: 1.3; color: #B4543F;
  background: var(--peach-soft);
}
.hi-chip .material-symbols-rounded { font-size: 1.05rem; color: var(--coral-deep); }
.hi-chip-more { padding: 5px 9px; background: #F6EEE9; }
.hi-chip-more .material-symbols-rounded { color: var(--muted); }

.hi-highlight {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 10px 0 12px; padding: 12px 14px; border-radius: 16px;
  font-size: 1.12rem; font-weight: 900; line-height: 1.4; color: #9A6A00; text-align: center;
  background: linear-gradient(135deg, #FFF4D6, #FFE9B3);
  border: 2px dashed #F5C95C;
}
.hi-hl-icon { color: #F2B530; font-variation-settings: 'FILL' 1, 'wght' 600, 'GRAD' 0, 'opsz' 24; }

.hi-vs { display: flex; flex-direction: column; align-items: stretch; gap: 4px; margin: 12px 0; }
.hi-vs-col { padding: 10px 12px; border-radius: 16px; }
.hi-vs-no { background: #F4EFEC; color: #7E6F69; }
.hi-vs-yes { background: #DDF5EF; color: #1F7A67; }
.hi-vs-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.hi-vs-list li { display: flex; align-items: flex-start; gap: 8px; font-weight: 800; line-height: 1.45; }
.hi-vs-list .material-symbols-rounded { flex-shrink: 0; font-size: 1.15rem; margin-top: 1px; }
.hi-vs-no .material-symbols-rounded { color: #C4A9A0; }
.hi-vs-yes .material-symbols-rounded { color: var(--coral); font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24; }
.hi-vs-arrow { display: flex; justify-content: center; color: var(--accent-deep); line-height: 1; }
.hi-vs-arrow .material-symbols-rounded { font-size: 1.4rem; color: var(--accent-deep); font-variation-settings: 'FILL' 0, 'wght' 700, 'GRAD' 0, 'opsz' 24; }

.hi-tip {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 11px 12px; border-radius: 16px;
  background: #FFF9EC; border-left: 4px solid #F5C95C;
  font-size: 0.87rem;
}
.hi-tip-icon { flex-shrink: 0; color: #E8A85A; font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24; }

.hi-divider { display: flex; align-items: center; gap: 10px; padding: 0 18px; }
.hi-divider > span:not(.material-symbols-rounded) { flex: 1; height: 0; border-top: 2px dashed #F1D6C9; }
.hi-divider-icon { font-size: 1rem; color: var(--peach); font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24; }

.hi-kid-steps { list-style: none; margin: 10px 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.hi-kid-step {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px 8px 8px; border-radius: 16px;
  background: #EEF9F6; font-size: 1rem; font-weight: 900; color: #1F7A67; line-height: 1.4;
}
.hi-kid-step:nth-child(2) { margin-left: 12px; }
.hi-kid-step:nth-child(3) { margin-left: 24px; background: #D8F3EC; }
.hi-badge {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 0.92rem; font-weight: 900; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  box-shadow: 0 2px 6px rgba(58, 169, 145, 0.35);
}
.hi-quote {
  position: relative; display: flex; gap: 8px; align-items: flex-start;
  margin: 10px 0 0; padding: 12px 14px; border-radius: 16px;
  background: var(--sky-soft); color: #2F5F86; font-weight: 700; line-height: 1.55;
}
.hi-quote-icon { flex-shrink: 0; color: var(--sky); font-size: 1.5rem; }

.hi-slogan {
  text-align: center; padding: 18px 16px; border-radius: 22px; color: #fff;
  background: linear-gradient(135deg, var(--coral) 0%, #FF9E7F 50%, #FFB37A 100%);
  box-shadow: 0 8px 20px rgba(240, 107, 90, 0.28);
}
.hi-slogan-icon { font-size: 1.9rem; font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24; }
.hi-slogan-main { margin: 4px 0 8px !important; font-size: 1.05rem; font-weight: 900; line-height: 1.45; }
.hi-slogan-sub { font-size: 0.88rem; font-weight: 700; opacity: 0.95; line-height: 1.5; }

@media (max-width: 380px), (max-height: 700px) {
  .help-body { padding: 12px 11px 6px; font-size: 0.87rem; }
  .hi-name { font-size: 1.3rem; }
  .hi-logo { width: 58px; height: 58px; }
  .help-dismiss-hint { padding: 6px 12px 4px; }
  .help-actions { padding: 0 11px 11px; }
  .help-actions > button { min-height: 44px; }
}

/* —— Language toggle + help chips —— */
.home-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.home-header-actions .tiny-gear,
.home-header-actions .home-lang-btn,
.home-header-actions .home-help-btn {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 50%;
  opacity: 1;
  padding: 0;
  box-shadow: 0 2px 10px rgba(80, 50, 40, 0.08);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(80, 50, 40, 0.08);
}
.home-lang-btn {
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: var(--text);
}
.home-header-actions .tiny-gear:active,
.home-header-actions .home-lang-btn:active,
.home-header-actions .home-help-btn:active {
  transform: scale(0.94);
  background: var(--peach-soft);
}
.home-header .home-brand {
  flex: 1;
  min-width: 0;
}

/* —— Wish pool (許願池) — match light choice/secret cards —— */
.wish-card {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(80, 50, 40, 0.06);
  padding: 14px 14px 16px;
}
.wish-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.wish-type-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-soft);
  margin: 0 0 2px;
}
.wish-type {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 6px;
}
.wish-type-btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 64px;
  padding: 12px 12px;
  border-radius: 18px;
  border: 2px solid rgba(80, 50, 40, 0.08);
  background: var(--card-soft);
  color: var(--text);
  font-weight: 700;
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  color-scheme: light;
}
.wish-type-icon {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.wish-type-icon .material-symbols-rounded {
  font-size: 1.35rem;
}
.wish-type-text {
  flex: 1;
  text-align: left;
  line-height: 1.25;
}
.wish-type-name {
  display: block;
}
.wish-type-btn.active {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(94, 196, 176, 0.12), rgba(196, 176, 240, 0.14));
  box-shadow: 0 0 0 3px rgba(94, 196, 176, 0.18), var(--shadow);
}
.wish-type-btn:active {
  transform: scale(0.98);
}
.wish-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-soft);
  margin-top: 6px;
}
.wish-textarea,
.wish-input {
  width: 100%;
  box-sizing: border-box;
  border-radius: 16px;
  border: 2px solid rgba(80, 50, 40, 0.1);
  background: #FFFFFF;
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  padding: 12px 14px;
  outline: none;
  box-shadow: inset 0 1px 2px rgba(80, 50, 40, 0.04);
  color-scheme: light;
  -webkit-text-fill-color: var(--text);
}
.wish-textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.45;
}
.wish-textarea::placeholder,
.wish-input::placeholder {
  color: var(--muted);
  opacity: 1;
  -webkit-text-fill-color: var(--muted);
}
.wish-textarea:focus,
.wish-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(94, 196, 176, 0.18);
}
.wish-actions {
  margin-top: 10px;
  gap: 10px;
}
.wish-actions .primary-btn,
.wish-actions .ghost-btn {
  margin-top: 0;
  width: 100%;
}
.wish-actions .ghost-btn {
  margin-bottom: 0;
}




/* ========== 小動物排隊尿尿 / Animal Potty Line ========== */
.pee-stage {
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 8px;
  padding: 10px 10px 12px;
  box-sizing: border-box;
  background: radial-gradient(ellipse at 50% 20%, #FFFDF7 0%, #E8F8F4 55%, #D6ECFF 100%);
}
.pee-bubble {
  position: relative;
  z-index: 4;
  min-height: 3.1em;
  padding: 8px 14px;
  border-radius: 18px;
  background: #fff;
  border: 2.5px solid #FFD0C4;
  box-shadow: 0 4px 12px rgba(80, 50, 40, 0.1);
  font-size: clamp(0.98rem, 4.2vw, 1.12rem);
  font-weight: 800;
  line-height: 1.35;
  color: #503228;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.pee-bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -10px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-right: 2.5px solid #FFD0C4;
  border-bottom: 2.5px solid #FFD0C4;
  transform: translateX(-50%) rotate(45deg);
}
.pee-bubble.pop { animation: pee-pop 0.35s ease-out; }
@keyframes pee-pop {
  0% { transform: scale(0.9); opacity: 0.4; }
  70% { transform: scale(1.03); opacity: 1; }
  100% { transform: scale(1); }
}
.pee-bubble-name {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: #FFE4D9;
  color: #C4553F;
  font-size: 0.85em;
}
.pee-bubble[data-speaker="dog"] .pee-bubble-name { background: #FCE7CF; color: #9A6331; }
.pee-bubble[data-speaker="cat"] .pee-bubble-name { background: #FFE6CC; color: #C0702E; }
.pee-bubble[data-speaker="bear"] .pee-bubble-name { background: #F1E1D2; color: #8A5A36; }
.pee-bubble[data-speaker="rabbit"] .pee-bubble-name { background: #FFE3EA; color: #C4506A; }

.pee-scene {
  position: relative;
  width: 100%;
  aspect-ratio: 36 / 31;
  max-height: 50vh;
  margin: 0 auto;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(180deg, #FFF6EC 0%, #FFEEDD 70%, #E3F6EF 70%, #CDEFE3 100%);
  border: 2px solid rgba(94, 196, 176, 0.3);
  flex: 0 0 auto;
}
.pee-wall-dots {
  position: absolute;
  inset: 0 0 30% 0;
  background-image: radial-gradient(circle, rgba(255, 190, 168, 0.35) 2.2px, transparent 2.6px);
  background-size: 22px 22px;
  pointer-events: none;
}
.pee-floor {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 30%;
  background-image: linear-gradient(90deg, rgba(255,255,255,0.45) 1.5px, transparent 1.5px);
  background-size: 26px 100%;
  pointer-events: none;
}
.pee-bench {
  position: absolute;
  left: 18%;
  width: 60%;
  bottom: 53.5%;
  height: 4.5%;
  border-radius: 999px;
  background: linear-gradient(90deg, #FFBEA8, #FFE08A, #A8E6D8, #B8D9F5);
  box-shadow: 0 3px 0 rgba(80, 50, 40, 0.08);
  opacity: 0.85;
}
.pee-door {
  position: absolute;
  left: 78%;
  bottom: 7%;
  width: 21.5%;
  aspect-ratio: 80 / 150;
  z-index: 1;
  perspective: 320px;
}
.pee-booth { width: 100%; height: 100%; display: block; }
.pee-light { fill: #6FD39A; transition: fill 0.3s; }
.pee-door.occupied .pee-light { fill: #FF7A7A; }
.pee-door-panel {
  position: absolute;
  left: 17.5%;
  top: 22.67%;
  width: 65%;
  height: 73.3%;
  transform-origin: 100% 50%;
  transition: transform 0.32s ease;
  z-index: 3;
}
.pee-door-panel svg { width: 100%; height: 100%; display: block; }
.pee-door.open .pee-door-panel { transform: rotateY(-72deg); }

.pee-char {
  --s: 1;
  --k: 1;
  position: absolute;
  bottom: 9%;
  left: 0;
  width: 16.5%;
  z-index: 2;
  transform: scale(calc(var(--s) * var(--k)));
  transform-origin: 50% 100%;
  transition: left 0.6s ease-in-out, bottom 0.6s ease-in-out, transform 0.5s ease, opacity 0.35s ease;
}
.pee-char.at-door { z-index: 2; }
.pee-char.inside { --k: 0.7; opacity: 0; }
.pee-char-body { position: relative; }
.pee-animal-svg { width: 100%; height: auto; display: block; overflow: visible; }
.pee-face-happy { display: none; }
.pee-char.happy .pee-face-happy { display: inline; }
.pee-char.happy .pee-face-normal { display: none; }
.pee-tag {
  position: absolute;
  left: 50%;
  bottom: -2px;
  transform: translate(-50%, 100%);
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #6A5048;
  font-size: clamp(0.62rem, 2.7vw, 0.74rem);
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(80, 50, 40, 0.12);
}
.pee-char.on-bench .pee-tag,
.pee-char.at-door .pee-tag { opacity: 0; }
.pee-you .pee-tag {
  background: linear-gradient(135deg, #FF8A7A, #FFB36B);
  color: #fff;
  font-size: clamp(0.72rem, 3.1vw, 0.86rem);
}
.pee-char.hopping .pee-char-body { animation: pee-hop 0.33s ease-in-out 2; }
@keyframes pee-hop {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14%); }
}
.pee-char.jump .pee-char-body { animation: pee-jump 0.45s ease-out 2; }
@keyframes pee-jump {
  0%, 100% { transform: translateY(0) scale(1, 1); }
  15% { transform: translateY(0) scale(1.08, 0.92); }
  55% { transform: translateY(-28%) scale(0.96, 1.05); }
}
.pee-char.cheer .pee-char-body { animation: pee-cheer 0.6s ease-in-out infinite; }
.pee-char.cheer:nth-of-type(odd) .pee-char-body { animation-delay: 0.15s; }
@keyframes pee-cheer {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-14%) rotate(-6deg); }
  75% { transform: translateY(-14%) rotate(6deg); }
}
.pee-you .pee-you-star { transform-origin: 50px 56px; }
.pee-char.my-turn { --k: 1.18; z-index: 3; }
.pee-char.my-turn .pee-char-body::before {
  content: "";
  position: absolute;
  inset: -12% -18%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 224, 138, 0.85) 0%, rgba(255, 224, 138, 0) 70%);
  animation: pee-glow 1s ease-in-out infinite alternate;
  z-index: -1;
}
.pee-char.my-turn .pee-you-star { animation: pee-spin 3s linear infinite; }
@keyframes pee-glow {
  from { transform: scale(0.9); opacity: 0.7; }
  to { transform: scale(1.12); opacity: 1; }
}
@keyframes pee-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.pee-star {
  position: absolute;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  z-index: 5;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  animation: pee-burst 1s ease-out forwards;
  pointer-events: none;
}
@keyframes pee-burst {
  0% { transform: translate(0, 0) scale(0.3) rotate(0deg); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(1.1) rotate(180deg); opacity: 0; }
}
.pee-panel {
  min-height: 3em;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 4;
}
.pee-status {
  font-size: clamp(0.95rem, 4vw, 1.08rem);
  font-weight: 800;
  color: #4A8FC4;
  text-align: center;
}
.pee-turn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  animation: pee-pop 0.4s ease-out;
}
.pee-turn[hidden] { display: none; }
.pee-turn-title {
  font-size: clamp(1.7rem, 8vw, 2.2rem);
  font-weight: 900;
  line-height: 1.1;
  color: #F06B5A;
  text-shadow: 0 2px 0 #fff, 0 4px 10px rgba(240, 107, 90, 0.25);
  animation: pee-pulse 0.9s ease-in-out infinite alternate;
}
@keyframes pee-pulse {
  from { transform: scale(1); }
  to { transform: scale(1.06); }
}
.pee-done-btn {
  width: min(100%, 320px);
  min-height: 64px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #5EC4B0 0%, #3AA991 100%);
  color: #fff;
  font-size: clamp(1.25rem, 6vw, 1.5rem);
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 6px 0 #2E8A76, 0 10px 20px rgba(58, 169, 145, 0.35);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.pee-done-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #2E8A76, 0 4px 10px rgba(58, 169, 145, 0.3); }
.pee-done-btn .material-symbols-rounded { font-size: 1.5em; }
.pee-stage.pee-celebrate .pee-status {
  font-size: clamp(1.25rem, 6vw, 1.55rem);
  color: #F06B5A;
}
.pee-confetti-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 6;
}
.pee-confetti {
  position: absolute;
  top: -16px;
  width: 9px;
  height: 14px;
  border-radius: 3px;
  animation: pee-fall 2.8s linear forwards;
}
.pee-confetti.star {
  width: 15px;
  height: 15px;
  border-radius: 0;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
@keyframes pee-fall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  85% { opacity: 1; }
  100% { transform: translateY(105vh) rotate(var(--rot)); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .pee-char.cheer .pee-char-body,
  .pee-char.my-turn .pee-you-star,
  .pee-turn-title { animation: none; }
}

/* ----- 「你」 head-photo avatar (v88) ----- */
.pee-you { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.pee-you:focus-visible { outline: 3px solid #7EB8E8; outline-offset: 2px; border-radius: 12px; }
.pee-you-photo {
  position: absolute;
  left: 25%;
  top: 25.5%;
  width: 50%;
  aspect-ratio: 1;
  height: auto;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2.5px #FFB36B, 0 3px 8px rgba(80, 50, 40, 0.25);
  background: #FFE4D9;
  display: none;
  z-index: 1;
}
.pee-you.has-photo .pee-you-photo { display: block; }
.pee-you.has-photo .pee-you-head { display: none; }
.pee-cam-badge {
  position: absolute;
  right: 2%;
  top: 22%;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FF8A7A, #FFB36B);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(240, 107, 90, 0.35);
  border: 2px solid #fff;
  z-index: 2;
}
.pee-cam-badge .material-symbols-rounded { font-size: 13px; }
.pee-cam-hint {
  position: absolute;
  left: 4%;
  top: -14%;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fff;
  color: #F06B5A;
  border: 2px solid #FFD0C4;
  font-size: clamp(0.6rem, 2.6vw, 0.72rem);
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(80, 50, 40, 0.12);
  animation: pee-hint-bob 1.4s ease-in-out infinite;
  z-index: 2;
}
@keyframes pee-hint-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
.pee-you.has-photo .pee-cam-hint { display: none; }
.pee-you.has-photo .pee-cam-badge { width: 18px; height: 18px; opacity: 0.85; }
.pee-you.has-photo .pee-cam-badge .material-symbols-rounded { font-size: 11px; }
.pee-stage.pee-celebrate .pee-cam-badge,
.pee-stage.pee-yourturn .pee-cam-badge { opacity: 0.6; }
.pee-stage.pee-paused .pee-char-body { animation-play-state: paused; }

.pee-cam-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(12px + var(--safe-t)) 12px calc(12px + var(--safe-b));
  background: rgba(44, 36, 32, 0.55);
  box-sizing: border-box;
}
.pee-cam-modal[hidden] { display: none; }
.pee-cam-card {
  width: min(100%, 440px);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: 24px;
  background: var(--bg);
  box-shadow: var(--shadow-lg);
  box-sizing: border-box;
  animation: pee-pop 0.3s ease-out;
}
.pee-cam-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 1.05rem;
  font-weight: 900;
  color: #503228;
}
.pee-cam-stage {
  flex: 1 1 auto;
  min-height: min(62vh, 520px);
}
.pee-cam-actions { margin: 0; }
.pee-cam-actions .primary-btn[hidden] { display: none; }

/* ----- v89: bigger scene that fills the card, nothing clipped (390x844 / 375x667 / 360x740) ----- */
#tool-body:has(.pee-phase) {
  padding: 4px 10px calc(10px + var(--safe-b));
  overflow: hidden;
}
.pee-phase { gap: 8px; min-height: 0; }
.pee-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 0 0 auto;
  min-width: 0;
}
.pee-head .phase-badge { padding: 4px 10px; flex: 0 0 auto; }
.pee-head .phase-title {
  margin: 0;
  font-size: 1.12rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}
.scan-stage.pee-stage {
  flex: 1 1 auto;
  min-height: 0;
  gap: 6px;
  padding: 6px 6px 8px;
  border-radius: 22px;
}
.pee-stage .pee-bubble {
  flex: 0 0 auto;
  min-height: 2.5em;
  padding: 6px 12px;
  margin-bottom: 4px;
  font-size: clamp(1rem, 4.6vw, 1.2rem);
}
.pee-stage .pee-scene {
  flex: 1 1 auto;
  min-height: 180px;
  aspect-ratio: auto;
  max-height: none;
  height: auto;
  border-radius: 18px;
  container-type: size;
  --u: 1%;
  --floor: 56%;
  background: linear-gradient(180deg, #FFF6EC 0%, #FFEEDD var(--floor), #E3F6EF var(--floor), #CDEFE3 100%);
}
@supports (width: 1cqw) {
  .pee-stage .pee-scene { --u: min(1cqw, 0.8cqh); }
}
.pee-stage .pee-wall-dots { inset: 0 0 calc(100% - var(--floor)) 0; }
.pee-stage.pee-yourturn .pee-cam-hint,
.pee-stage.pee-celebrate .pee-cam-hint { display: none; }
.pee-stage .pee-floor { height: 44%; }
.pee-stage .pee-bench { left: 20%; width: 62%; bottom: 72%; height: 3.2%; }
.pee-stage .pee-door {
  left: auto;
  right: 1%;
  bottom: 34%;
  width: calc(23 * var(--u));
}
.pee-stage .pee-char {
  width: calc(21 * var(--u));
  bottom: 34%;
  transform: translateX(-50%) scale(calc(var(--s) * var(--k)));
  transform-origin: 50% 100%;
}
.pee-stage .pee-char.pee-you {
  width: 36%;
  bottom: 3%;
  z-index: 3;
}
@supports (width: 1cqw) {
  /* 「你」 is always the biggest: grows with the free height */
  .pee-stage .pee-scene .pee-char.pee-you { width: min(46cqw, 30cqh); }
}
.pee-stage .pee-char.pee-you.my-turn { --k: 1.1; z-index: 4; }
.pee-stage .pee-char.on-bench { z-index: 1; }
.pee-stage .pee-char.at-door { z-index: 2; }
.pee-scene.no-anim .pee-char { transition: none !important; }
.pee-stage .pee-tag {
  bottom: 0;
  transform: translate(-50%, 40%);
  font-size: clamp(0.66rem, 2.9vw, 0.8rem);
  z-index: 2;
}
.pee-stage .pee-you .pee-tag {
  font-size: clamp(0.8rem, 3.6vw, 1rem);
  padding: 1px 12px;
  transform: translate(-50%, 30%);
}
/* 「你」: big round face photo */
.pee-stage .pee-you-photo {
  left: 19%;
  top: 20%;
  width: 62%;
  border-width: 4px;
  box-shadow: 0 0 0 3px #FFB36B, 0 4px 12px rgba(80, 50, 40, 0.28);
}
.pee-stage .pee-cam-badge { width: 28px; height: 28px; right: 4%; top: 18%; }
.pee-stage .pee-cam-badge .material-symbols-rounded { font-size: 16px; }
.pee-stage .pee-you.has-photo .pee-cam-badge { width: 24px; height: 24px; }
.pee-stage .pee-you.has-photo .pee-cam-badge .material-symbols-rounded { font-size: 14px; }
.pee-stage .pee-cam-hint {
  left: 50%;
  top: -6%;
  transform: translateX(-50%);
  font-size: clamp(0.7rem, 3vw, 0.82rem);
  animation: none;
}
/* bottom panel: fixed height so the layout never jumps; big done button fully visible */
.pee-stage .pee-panel {
  flex: 0 0 auto;
  min-height: 62px;
  padding: 0 4px 6px;
  box-sizing: border-box;
}
.pee-stage .pee-turn { gap: 0; }
.pee-stage .pee-done-btn {
  width: min(92%, 340px);
  min-height: 56px;
  padding: 0 18px;
  font-size: clamp(1.3rem, 6.2vw, 1.6rem);
  box-shadow: 0 5px 0 #2E8A76, 0 8px 16px rgba(58, 169, 145, 0.3);
  white-space: nowrap;
  animation: pee-btn-pulse 0.9s ease-in-out infinite alternate;
}
@keyframes pee-btn-pulse {
  from { transform: scale(1); }
  to { transform: scale(1.035); }
}
.pee-stage .pee-status {
  font-size: clamp(1rem, 4.4vw, 1.15rem);
  white-space: nowrap;
  overflow: hidden;
  max-width: 100%;
}
.pee-phase > .btn-row { flex: 0 0 auto; margin-top: 0; }
.pee-phase > .btn-row > .primary-btn { white-space: nowrap; padding: 0 12px; }
@media (prefers-reduced-motion: reduce) {
  .pee-stage .pee-done-btn { animation: none; }
}

/* ----- v90: home cards never truncate (full text, wrap if needed) ----- */
.tool-card.fn-list .name,
.tool-card.fn-list .hint {
  display: block;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  -webkit-line-clamp: unset;
  line-clamp: none;
  overflow-wrap: break-word;
}

/* ----- v90: pee game — one row on one ground line (booth, 小狗, 小貓, 小熊, 你) ----- */
.scan-stage.pee-stage {
  flex: 0 1 auto;
  margin-block: auto;
  container-type: inline-size;
}
.pee-stage .pee-scene {
  flex: 0 1 auto;
  height: 70cqw;
  min-height: 160px;
}
@supports not (width: 1cqw) {
  .pee-stage .pee-scene { height: 62vw; }
}
@supports (width: 1cqw) {
  .pee-stage .pee-scene { --u: min(1cqw, 1.55cqh); }
  .pee-stage .pee-scene .pee-char.pee-you { width: calc(36 * var(--u)); }
}
.pee-stage .pee-door { width: calc(20 * var(--u)); right: 1.2%; }
.pee-stage .pee-char { width: calc(23 * var(--u)); }
.pee-stage .pee-char.pee-you { z-index: 3; }
.pee-stage .pee-char.pee-you.my-turn { --k: 1.08; }
.pee-stage .pee-tag { font-size: clamp(0.72rem, 3.2vw, 0.9rem); }
.pee-stage .pee-you .pee-tag { font-size: clamp(0.85rem, 3.9vw, 1.05rem); }
.pee-stage .pee-cam-hint { top: -4%; }
.pee-stage .pee-bubble { font-size: clamp(1.05rem, 5vw, 1.3rem); }
/* v90b: taller scene with a high cheering bench; a bit more width for the row */
#tool-body:has(.pee-phase) { padding-left: 6px; padding-right: 6px; }
.scan-stage.pee-stage { padding: 5px 4px 8px; }
.pee-stage .pee-scene { height: 84cqw; }
@supports (width: 1cqw) {
  .pee-stage .pee-scene { --u: min(1cqw, 1.28cqh); }
}
.tool-card.fn-list .name,
.tool-card.fn-list .hint { text-wrap: balance; }
.function-tools-call .tool-card.fn-list,
.function-tools-fun .tool-card.fn-list,
.function-tools-scan .tool-card.fn-list { padding: 10px 8px 10px 10px; gap: 8px; }
@media (max-width: 380px) {
  .function-tools-call .tool-card.fn-list .icon-badge,
  .function-tools-fun .tool-card.fn-list .icon-badge,
  .function-tools-scan .tool-card.fn-list .icon-badge { width: 40px; height: 40px; border-radius: 13px; }
}

/* ===== v91: compact play header + taller kid-friendly bottom bar (all play/scan/call/game screens) ===== */
/* Tool chrome: slimmer top header, title wraps instead of ellipsis */
#tool-screen .tool-header {
  padding-top: calc(4px + var(--safe-t));
  padding-bottom: 4px;
}
#tool-screen .tool-header .header-spacer { height: 32px; width: 32px; }
#tool-screen .tool-title-press {
  font-size: 0.98rem;
  line-height: 1.25;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
#tool-body:has(.play-phase) {
  padding-top: 6px;
  padding-bottom: calc(8px + var(--safe-b));
}
.play-phase { gap: 8px; }
/* One line: pill + short title (no duplicate subtitle) */
.play-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 0 0 auto;
  min-width: 0;
  min-height: 26px;
}
.play-head .phase-badge {
  align-self: center;
  flex: 0 0 auto;
  padding: 3px 10px;
  font-size: 0.7rem;
  gap: 4px;
  white-space: nowrap;
}
.play-head .phase-badge .material-symbols-rounded { font-size: 0.95rem; }
.play-head .phase-title,
.pee-head.play-head .phase-title {
  margin: 0;
  min-width: 0;
  font-size: 1.08rem;
  line-height: 1.25;
  text-align: left;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
/* Bottom bar: big targets — main button ≥ 76px, side buttons match height */
#tool-body .play-phase > .btn-row {
  flex: 0 0 auto;
  margin-top: auto;
  gap: 10px;
  flex-wrap: nowrap;
  align-items: stretch;
}
#tool-body .play-phase > .btn-row > .primary-btn {
  height: auto;
  min-height: 78px;
  margin: 0;
  padding: 6px 12px;
  border-radius: 22px;
  font-size: 1.36rem;
  line-height: 1.15;
  white-space: normal;
  text-wrap: balance;
  gap: 8px;
}
#tool-body .play-phase > .btn-row > .primary-btn .btn-icon {
  font-size: 2rem;
  margin-right: 0;
  flex: 0 0 auto;
}
#tool-body .play-phase > .btn-row > .home-icon-btn,
#tool-body .play-phase > .btn-row > #change-choice.home-icon-btn {
  flex: 0 0 72px !important;
  width: 72px;
  min-width: 72px;
  max-width: 72px;
  height: auto;
  min-height: 78px;
  border-radius: 22px;
}
#tool-body .play-phase > .btn-row > .home-icon-btn .material-symbols-rounded { font-size: 2.2rem; }
/* Call screen: no inline margin now; keep the call UI centered above the bar */
.call-phase .call-ui { min-height: 0; }
@media (max-width: 380px) {
  #tool-body .play-phase > .btn-row > .primary-btn { font-size: 1.24rem; padding: 6px 8px; gap: 6px; }
  #tool-body .play-phase > .btn-row > .primary-btn .btn-icon { font-size: 1.8rem; }
}
@media (max-width: 350px) {
  #tool-body .play-phase > .btn-row > .home-icon-btn,
  #tool-body .play-phase > .btn-row > #change-choice.home-icon-btn { flex-basis: 64px !important; width: 64px; min-width: 64px; max-width: 64px; }
}

/* ===== v93: toy vacuum result — hopping toys + speech bubble ===== */
.toys-art {
  position: relative;
  width: min(92%, 360px);
  margin: 0 auto;
}
.toys-art .result-art { width: 100%; }
.toy-anim {
  transform-box: fill-box;
  transform-origin: 50% 100%;
}
.toy-hop { animation: toyHop 1.15s cubic-bezier(0.35, 0, 0.4, 1) infinite; }
.toy-hop.toy-1 { animation-duration: 0.95s; animation-delay: -0.3s; }
.toy-hop.toy-2 { animation-duration: 1.3s; animation-delay: -0.65s; }
.toy-hop.toy-3 { animation-duration: 1.05s; animation-delay: -0.15s; }
.toy-hop.talking { animation-name: toyHopBig; }
@keyframes toyHop {
  0%, 100% { transform: translateY(0) scale(1.12, 0.86); }
  12% { transform: translateY(0) scale(0.92, 1.1); }
  45% { transform: translateY(-16%) scale(0.96, 1.06); }
  55% { transform: translateY(-17%) scale(1, 1); }
  85% { transform: translateY(0) scale(1.04, 0.96); }
  92% { transform: translateY(0) scale(1.14, 0.84); }
}
@keyframes toyHopBig {
  0%, 100% { transform: translateY(0) scale(1.14, 0.84); }
  12% { transform: translateY(0) scale(0.9, 1.14); }
  45% { transform: translateY(-30%) rotate(-6deg) scale(0.95, 1.08); }
  55% { transform: translateY(-31%) rotate(6deg) scale(1, 1); }
  85% { transform: translateY(0) scale(1.05, 0.95); }
  92% { transform: translateY(0) scale(1.16, 0.82); }
}
.toy-shadow {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: toyShadow 1.15s cubic-bezier(0.35, 0, 0.4, 1) infinite;
}
.toy-shadow.toy-1 { animation-duration: 0.95s; animation-delay: -0.3s; }
.toy-shadow.toy-2 { animation-duration: 1.3s; animation-delay: -0.65s; }
.toy-shadow.toy-3 { animation-duration: 1.05s; animation-delay: -0.15s; }
@keyframes toyShadow {
  0%, 12%, 85%, 100% { transform: scaleX(1); opacity: 0.9; }
  50% { transform: scaleX(0.6); opacity: 0.45; }
}
.toy-wiggle { animation: toyWiggle 1.6s ease-in-out infinite; }
.toy-wiggle.toy-1 { animation-delay: -0.4s; animation-duration: 1.8s; }
.toy-wiggle.toy-2 { animation-delay: -0.8s; animation-duration: 1.5s; }
.toy-wiggle.toy-3 { animation-delay: -1.1s; animation-duration: 1.7s; }
@keyframes toyWiggle {
  0%, 100% { transform: rotate(-5deg) translateY(0); }
  25% { transform: rotate(0deg) translateY(-6%) scale(1.03, 0.98); }
  50% { transform: rotate(5deg) translateY(0); }
  75% { transform: rotate(0deg) translateY(-4%); }
}
.toys-bubble {
  position: absolute;
  left: 50%;
  top: 30%;
  z-index: 3;
  width: max-content;
  max-width: 62%;
  padding: 6px 12px;
  border-radius: 16px;
  background: #fff;
  color: #D0584A;
  font-weight: 900;
  font-size: 0.95rem;
  line-height: 1.3;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  box-shadow: 0 4px 12px rgba(80, 50, 40, 0.16);
  border: 2px solid #FFD0C4;
  transform: translate(-50%, -100%) scale(0.4);
  transform-origin: 50% 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.25s cubic-bezier(0.2, 1.5, 0.4, 1);
}
.toys-bubble::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 50%;
  margin-left: -7px;
  border: 7px solid transparent;
  border-top-color: #fff;
  border-bottom: 0;
}
.toys-bubble[data-tail="l"] { transform: translate(-22%, -100%) scale(0.4); transform-origin: 22% 100%; }
.toys-bubble[data-tail="l"]::after { left: 22%; }
.toys-bubble[data-tail="r"] { transform: translate(-78%, -100%) scale(0.4); transform-origin: 78% 100%; }
.toys-bubble[data-tail="r"]::after { left: 78%; }
.toys-bubble.show { opacity: 1; transform: translate(-50%, -100%) scale(1); }
.toys-bubble[data-tail="l"].show { transform: translate(-22%, -100%) scale(1); }
.toys-bubble[data-tail="r"].show { transform: translate(-78%, -100%) scale(1); }
.toys-bubble-wide {
  left: 50%;
  top: 25%;
  max-width: 92%;
  width: max-content;
  font-size: 0.92rem;
  color: #2F9A84;
  border-color: #BDEBDF;
}
@media (prefers-reduced-motion: reduce) {
  .toy-hop, .toy-wiggle, .toy-shadow, .tired-deco { animation: none !important; }
}

/* ===== v93: tired-eyes photo — floating sleepy decorations ===== */
.tired-decos {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}
.tired-deco {
  position: absolute;
  aspect-ratio: 1;
  filter: drop-shadow(0 2px 3px rgba(40, 20, 60, 0.28));
  animation: tiredBob 3s ease-in-out infinite;
}
.tired-deco svg { display: block; width: 100%; height: 100%; overflow: visible; }
.tired-bob { animation-name: tiredBob; }
.tired-rise { animation-name: tiredRise; }
.tired-drift { animation-name: tiredDrift; }
.tired-sway { animation-name: tiredSway; }
.tired-spin { animation-name: tiredSpin; animation-timing-function: linear; }
.tired-blink { animation-name: tiredBlink; }
@keyframes tiredBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9%); }
}
@keyframes tiredRise {
  0% { transform: translate(0, 8%) scale(0.92); opacity: 0.55; }
  50% { transform: translate(6%, -6%) scale(1.04); opacity: 1; }
  100% { transform: translate(0, 8%) scale(0.92); opacity: 0.55; }
}
@keyframes tiredDrift {
  0%, 100% { transform: translateX(-6%); }
  50% { transform: translateX(8%) translateY(-4%); }
}
@keyframes tiredSway {
  0%, 100% { transform: rotate(-9deg) translateY(0); }
  50% { transform: rotate(9deg) translateY(-6%); }
}
@keyframes tiredSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes tiredBlink {
  0%, 100% { transform: translateY(0) scale(1); opacity: 1; }
  45% { opacity: 1; }
  50% { transform: translateY(-5%) scale(1.05); opacity: 0.55; }
  55% { opacity: 1; }
}

/* ===== v94: 客製化來電 / Custom Call ===== */
.anycall-setup { gap: 12px; }
.anycall-card {
  background: #fff;
  border-radius: 20px;
  padding: 14px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(80, 50, 40, 0.06);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.anycall-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--text);
  line-height: 1.3;
}
.anycall-step {
  flex: 0 0 28px;
  width: 28px; height: 28px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 0.9rem; font-weight: 900; color: #fff;
  background: linear-gradient(135deg, var(--coral), var(--accent));
}
.anycall-photo-row { display: flex; align-items: center; gap: 14px; }
.anycall-avatar {
  flex: 0 0 96px;
  width: 96px; height: 96px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--peach-soft);
  border: 4px solid #fff;
  box-shadow: 0 0 0 3px var(--peach), var(--shadow);
}
.anycall-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.anycall-btns-col { flex: 1 1 auto; flex-direction: column; min-width: 0; }
.anycall-btns > .anycall-btn { flex: 1 1 0; min-width: 120px; }
.anycall-btns-col > .anycall-btn { flex: 0 0 auto; width: 100%; min-width: 0; }
.anycall-btn {
  min-height: 56px;
  border-radius: 18px;
  font-size: 1.1rem;
  font-weight: 800;
  padding: 0 14px;
  white-space: normal;
  line-height: 1.2;
  margin: 0;
}
.anycall-btn .btn-icon { font-size: 1.5rem; flex: 0 0 auto; }
.anycall-btn.primary-btn { width: auto; }
.anycall-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.anycall-rec-btn { background: linear-gradient(135deg, #F06B5A, #FF8A7A); animation: anycallRecPulse 1.2s ease-in-out infinite; }
@keyframes anycallRecPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(240, 107, 90, 0.45); }
  50% { box-shadow: 0 0 0 10px rgba(240, 107, 90, 0); }
}
.anycall-btn.playing { background: #EEF9F6; border-color: var(--accent); color: #1F7A67; }
.anycall-name {
  width: 100%;
  box-sizing: border-box;
  min-height: 54px;
  border-radius: 16px;
  border: 2px solid #F1D6C9;
  background: var(--card-soft);
  padding: 0 14px;
  font-size: 1.15rem;
  font-weight: 800;
  font-family: inherit;
  color: var(--text);
}
.anycall-name:focus { outline: none; border-color: var(--accent); background: #fff; }
.anycall-voice-status {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-radius: 14px;
  background: #F6EEE9; color: var(--text-soft);
  font-weight: 800; font-size: 1rem; line-height: 1.3;
}
.anycall-voice-status.ok { background: #E3F6F0; color: #1F7A67; }
.anycall-voice-status.rec { background: #FFE8E4; color: #C9483A; }
.anycall-status-icon { flex: 0 0 auto; font-size: 1.35rem; background: none; -webkit-text-fill-color: currentColor; color: currentColor; }
.anycall-voice-status.rec .anycall-status-icon { animation: anycallBlink 1s steps(2, start) infinite; }
@keyframes anycallBlink { to { visibility: hidden; } }
.anycall-upload { margin: 0; min-height: 48px; border-radius: 16px; font-weight: 800; font-size: 1rem; white-space: normal; }
.anycall-upload:disabled { opacity: 0.45; }
.anycall-hint {
  margin: 0;
  padding: 10px 12px;
  border-radius: 14px;
  background: #FFF6E3;
  border-left: 4px solid #F5C95C;
  color: #7A5A14;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.45;
}
.anycall-setup > .btn-row { margin-top: 4px; }
.anycall-setup > .btn-row > .primary-btn { min-height: 60px; font-size: 1.2rem; }
/* 表演中 wait */
.anycall-wait {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; text-align: center; padding: 18px;
}
.anycall-wait-avatar { width: 168px; height: 168px; border: 5px solid #fff; box-shadow: var(--shadow-lg); }
.anycall-wait-avatar img, .call-avatar .caller-avatar-img { object-fit: cover; }
.anycall-wait-hint { margin: 0; font-size: 1.02rem; font-weight: 800; color: var(--muted); display: flex; align-items: center; gap: 6px; }
#tool-body .play-phase > .btn-row > .anycall-edit-btn { flex-direction: column; gap: 2px; }
.anycall-edit-label { font-size: 0.82rem; font-weight: 900; color: var(--accent-deep); line-height: 1; }
/* in-call sound wave while the recorded voice plays */
.call-script.anycall-wave {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 48px;
}
.call-script.anycall-wave span {
  width: 8px; height: 14px; border-radius: 4px;
  background: linear-gradient(180deg, var(--coral), var(--accent));
  opacity: 0.45;
}
.call-script.anycall-wave.talking span { opacity: 1; animation: anycallWave 0.9s ease-in-out infinite; }
.call-script.anycall-wave.talking span:nth-child(2) { animation-delay: -0.15s; }
.call-script.anycall-wave.talking span:nth-child(3) { animation-delay: -0.3s; }
.call-script.anycall-wave.talking span:nth-child(4) { animation-delay: -0.45s; }
.call-script.anycall-wave.talking span:nth-child(5) { animation-delay: -0.6s; }
@keyframes anycallWave { 0%, 100% { height: 12px; } 50% { height: 40px; } }

/* ===== v96: 小小軍師：我來想辦法！ / Little Advisor ===== */
.adv-phase { gap: 10px; }
.adv-start { min-height: 0; }
.adv-start > .phase-badge { align-self: center; }
.adv-start .phase-title { margin: 0; text-align: center; font-size: 1.3rem; line-height: 1.3; white-space: normal; }
.adv-start .phase-desc { margin: 0; text-align: center; }
.adv-owl-row { display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; }
.adv-owl { flex: 0 0 104px; width: 104px; height: 104px; }
.adv-owl-row.small .adv-owl { flex-basis: 76px; width: 76px; height: 76px; }
.adv-owl-svg { width: 100%; height: 100%; display: block; overflow: visible; }
.adv-owl-bob { transform-box: fill-box; transform-origin: 50% 100%; animation: advBob 2.8s ease-in-out infinite; }
.adv-owl-lids rect { transform-box: fill-box; transform-origin: 50% 0; transform: scaleY(0); animation: advBlink 4.2s infinite; }
.adv-owl-fan { transform-box: fill-box; transform-origin: 30% 100%; animation: advFan 3.2s ease-in-out infinite; }
.adv-owl-beak { transform-box: fill-box; transform-origin: 50% 0; }
.adv-owl.talking .adv-owl-beak { animation: advBeak 0.28s ease-in-out infinite alternate; }
.adv-owl.talking .adv-owl-bob { animation-duration: 0.9s; }
@keyframes advBob { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-4px) rotate(-2deg); } }
@keyframes advBlink { 0%, 92%, 100% { transform: scaleY(0); } 95% { transform: scaleY(1); } }
@keyframes advFan { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(-10deg); } }
@keyframes advBeak { from { transform: scaleY(1); } to { transform: scaleY(0.7); } }
.adv-bubble {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  background: #fff;
  border-radius: 20px;
  padding: 12px 14px;
  font-size: 1.18rem;
  font-weight: 900;
  line-height: 1.4;
  color: var(--text);
  box-shadow: var(--shadow);
  border: 2px solid #F3E2D3;
  overflow-wrap: anywhere;
  white-space: normal;
}
.adv-bubble:empty { display: none; }
.adv-bubble::before {
  content: "";
  position: absolute;
  left: -10px; top: 50%;
  width: 16px; height: 16px;
  background: #fff;
  border-left: 2px solid #F3E2D3;
  border-bottom: 2px solid #F3E2D3;
  transform: translateY(-50%) rotate(45deg);
}
.adv-bubble.pop { animation: advPop 0.35s ease; }
@keyframes advPop { 0% { transform: scale(0.92); } 60% { transform: scale(1.03); } 100% { transform: scale(1); } }
.adv-owl-row.small .adv-bubble { font-size: 1.05rem; padding: 10px 12px; }
.adv-sits { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.adv-sit {
  min-height: 64px;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  border-radius: 18px;
  border: 2px solid rgba(80, 50, 40, 0.1);
  background: #fff;
  box-shadow: var(--shadow);
  font-family: inherit;
  font-size: 1.02rem; font-weight: 800; line-height: 1.25;
  color: var(--text);
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.adv-sit .adv-sit-icon { flex: 0 0 auto; font-size: 1.6rem; color: #C98A3A; }
.adv-sit.on { border-color: var(--accent); background: #EEF9F6; box-shadow: 0 0 0 3px rgba(94, 196, 176, 0.25), var(--shadow); }
.adv-custom.on { border-color: var(--accent); background: #EEF9F6; }
.adv-view-saved, .adv-next, .adv-add-photo, .adv-hear {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 60px; width: 100%; margin: 0;
  font-size: 1.12rem; font-weight: 900; line-height: 1.2; white-space: normal;
  border-radius: 18px;
}
.adv-view-saved .btn-icon, .adv-next .btn-icon, .adv-add-photo .btn-icon, .adv-hear .btn-icon { font-size: 1.6rem; flex: 0 0 auto; }
.adv-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 12px;
  padding: 12px;
  border-radius: 24px;
  background: radial-gradient(ellipse at 50% 20%, #FFF6E3 0%, #F3ECFF 55%, #E8F8F4 100%);
  border: 2px solid rgba(196, 176, 240, 0.3);
  box-shadow: var(--shadow);
}
.adv-ideas { display: flex; flex-wrap: wrap; gap: 8px; }
.adv-idea {
  position: relative;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 60px;
  padding: 8px 14px 8px 8px;
  border-radius: 30px;
  border: 2px solid #F1D6C9;
  background: #fff;
  box-shadow: var(--shadow);
  font-family: inherit; font-size: 1.1rem; font-weight: 900; color: var(--text);
  white-space: normal; line-height: 1.2;
  cursor: pointer;
}
.adv-idea-num {
  flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%;
  display: inline-grid; place-items: center;
  font-size: 1.15rem; font-weight: 900; color: #fff;
  background: linear-gradient(135deg, #FFB347, var(--coral));
}
.adv-idea-voice { font-size: 1.45rem; color: var(--accent-deep); background: none; -webkit-text-fill-color: currentColor; }
.adv-idea.adv-playing { border-color: var(--accent); background: #EEF9F6; }
.adv-idea.adv-playing .adv-idea-voice { animation: advBeak 0.4s ease-in-out infinite alternate; }
.adv-idea.adv-new { animation: advPop 0.45s ease; }
.adv-idea.st-ok { border-color: #8FD9C6; }
.adv-idea.st-hard { opacity: 0.55; }
.adv-idea.st-hard .adv-idea-num { background: #C9BDB5; }
.adv-tag { display: inline-flex; align-items: center; gap: 2px; padding: 2px 8px; border-radius: 12px; font-size: 0.85rem; font-weight: 900; line-height: 1.2; }
.adv-tag .material-symbols-rounded { font-size: 1rem; }
.adv-tag.ok { background: #E3F6F0; color: #1F7A67; }
.adv-tag.hard { background: #F2ECE8; color: #8A7468; }
.adv-focus { justify-content: center; flex: 1 1 auto; align-items: center; }
.adv-idea.big { min-height: 96px; padding: 12px 26px 12px 12px; font-size: 1.5rem; border-width: 3px; }
.adv-idea.big .adv-idea-num { flex-basis: 64px; width: 64px; height: 64px; font-size: 1.7rem; }
.adv-idea.big .adv-idea-voice { font-size: 2rem; }
.adv-choices { justify-content: center; }
.adv-choices .adv-idea { min-height: 72px; font-size: 1.25rem; }
.adv-idea.chosen { border-color: var(--accent); background: #EEF9F6; box-shadow: 0 0 0 4px rgba(94, 196, 176, 0.3), var(--shadow-lg); transform: scale(1.04); }
.adv-pick-hint, .adv-empty { margin: 0; text-align: center; font-size: 1rem; font-weight: 800; color: var(--muted); line-height: 1.4; }
.adv-rec-status { margin: 0; display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 900; color: #C9483A; font-size: 1.05rem; }
.adv-rec-status .material-symbols-rounded { animation: anycallBlink 1s steps(2, start) infinite; }
#tool-body .play-phase > .btn-row > .adv-rec-btn.rec { background: #FFE8E4; animation: anycallRecPulse 1.2s ease-in-out infinite; }
#tool-body .play-phase > .btn-row > .adv-hard {
  flex: 1 1 0; min-height: 78px; margin: 0; border-radius: 22px;
  font-size: 1.3rem; font-weight: 900; line-height: 1.15; white-space: normal;
  display: flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 8px;
}
#tool-body .play-phase > .btn-row > .adv-hard .btn-icon { font-size: 1.8rem; }
#tool-body .play-phase > .btn-row > .adv-can { flex: 1 1 0; background: linear-gradient(135deg, #5EC4B0, #7ED6A8); }
/* certificate */
.adv-cert-stage { align-items: stretch; }
.adv-fx { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 5; }
.adv-burst { position: absolute; width: 0; height: 0; }
.adv-burst span {
  position: absolute; left: -4px; top: -4px; width: 8px; height: 8px; border-radius: 50%;
  animation: advBurst 1.3s ease-out forwards;
}
@keyframes advBurst {
  0% { transform: translate(0, 0) scale(1.2); opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translate(var(--dx), calc(var(--dy) + 18px)) scale(0.4); opacity: 0; }
}
.adv-cert {
  position: relative;
  background: #FFFDF8;
  border-radius: 22px;
  border: 3px solid #F5C95C;
  box-shadow: 0 0 0 5px #FFF3D6, var(--shadow-lg);
  padding: 14px;
  display: flex; flex-direction: column; gap: 12px;
}
.adv-cert-title { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 1.5rem; font-weight: 900; color: #B5751E; line-height: 1.2; }
.adv-cert-title .material-symbols-rounded { font-size: 2rem; }
.adv-cert-top { display: flex; align-items: center; gap: 12px; }
.adv-cert-avatar {
  flex: 0 0 88px; width: 88px; height: 88px; border-radius: 50%; overflow: hidden;
  border: 4px solid #fff; box-shadow: 0 0 0 3px #F5C95C, var(--shadow);
  background: var(--peach-soft); display: grid; place-items: center;
}
.adv-cert-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.adv-cert-noavatar .material-symbols-rounded { font-size: 3.2rem; color: #E0A98E; }
.adv-cert-fields { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.adv-cert-row { display: flex; flex-direction: column; gap: 2px; }
.adv-cert-k { font-size: 0.85rem; font-weight: 900; color: var(--muted); line-height: 1.2; }
.adv-cert-v { font-size: 1.12rem; font-weight: 900; color: var(--text); line-height: 1.3; overflow-wrap: anywhere; }
.adv-cert-idea { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 16px; background: #FFF6E3; }
.adv-cert-idea-v { display: flex; align-items: center; gap: 8px; font-size: 1.3rem; font-weight: 900; color: var(--text); }
.adv-hear { min-height: 56px; }
.adv-hear.adv-playing { border-color: var(--accent); background: #EEF9F6; }
.adv-stamp-zone {
  min-height: 92px; width: 100%;
  border-radius: 18px; border: 3px dashed #F0A898; background: rgba(255, 232, 228, 0.5);
  display: grid; place-items: center; padding: 8px;
  font-family: inherit; cursor: pointer;
}
.adv-stamp-zone.stamped { border-style: solid; border-color: transparent; background: transparent; cursor: default; }
.adv-stamp-hint { display: flex; align-items: center; gap: 8px; font-size: 1.2rem; font-weight: 900; color: #D85A48; line-height: 1.25; animation: advBob 1.6s ease-in-out infinite; }
.adv-stamp-hint .material-symbols-rounded { font-size: 2rem; }
.adv-stamp {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 18px;
  border: 4px solid #E0483A; border-radius: 16px;
  color: #E0483A; font-size: 1.3rem; font-weight: 900; line-height: 1.2; text-align: center;
  transform: rotate(-6deg);
  background: rgba(255, 255, 255, 0.6);
  box-shadow: inset 0 0 0 2px rgba(224, 72, 58, 0.25);
}
.adv-stamp .material-symbols-rounded { font-size: 1.8rem; }
.adv-stamp-zone.just .adv-stamp { animation: advStampIn 0.45s cubic-bezier(0.3, 1.6, 0.5, 1); }
@keyframes advStampIn { 0% { transform: scale(2.2) rotate(-14deg); opacity: 0; } 100% { transform: scale(1) rotate(-6deg); opacity: 1; } }
@media (max-width: 350px) {
  .adv-owl { flex-basis: 84px; width: 84px; height: 84px; }
  .adv-bubble { font-size: 1.08rem; }
  .adv-sit { font-size: 0.96rem; }
  #tool-body .play-phase > .btn-row > .adv-hard { font-size: 1.15rem; }
}
@media (prefers-reduced-motion: reduce) {
  .adv-owl-bob, .adv-owl-fan, .adv-owl-lids rect, .adv-stamp-hint { animation: none; }
}
/* v96: 任務抽籤 how-it-works card */
.howto-card {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  background: linear-gradient(135deg, #FFF6E3, #FFEDE6);
  border: 1.5px solid #F5D9A8;
  box-shadow: var(--shadow);
}
.howto-card p { margin: 0; font-size: 0.95rem; font-weight: 700; line-height: 1.5; color: var(--text-soft); overflow-wrap: anywhere; white-space: normal; }
.howto-card strong { color: #B5751E; font-weight: 900; }
.howto-icon { flex: 0 0 auto; font-size: 1.6rem; color: #F0A830; background: none; -webkit-text-fill-color: currentColor; margin-top: 1px; }
.adv-start { overflow: visible; }
.adv-start-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 2px 2px 6px; }
.adv-start .adv-bubble .phase-title { text-align: left; font-size: 1.2rem; margin: 0; }
.adv-start .adv-bubble .phase-desc { text-align: left; margin: 4px 0 0; font-size: 0.92rem; font-weight: 700; }
.adv-stamp .material-symbols-rounded, .adv-stamp-hint .material-symbols-rounded { background: none; -webkit-text-fill-color: currentColor; color: currentColor; }
@media (max-width: 350px) {
  .adv-sit { font-size: 0.92rem; gap: 6px; padding: 8px; min-height: 58px; }
  .adv-sit .adv-sit-icon { font-size: 1.35rem; }
}

/* ===== v97: 小小軍師 wizard redesign ===== */
.adv-start-body > .phase-badge { align-self: center; }
.adv-guide {
  display: flex; flex-direction: column; gap: 8px;
  padding: 12px; border-radius: 18px;
  background: linear-gradient(135deg, #FFF6E3, #F3ECFF);
  border: 1.5px solid #EBD9B8; box-shadow: var(--shadow);
}
.adv-guide-row { display: flex; flex-direction: column; gap: 2px; }
.adv-guide-k { display: inline-flex; align-items: center; gap: 4px; font-size: 0.95rem; font-weight: 900; color: #B5751E; line-height: 1.2; }
.adv-guide-icon { font-size: 1.15rem; background: none; -webkit-text-fill-color: currentColor; color: currentColor; }
.adv-guide p { margin: 0; font-size: 0.95rem; font-weight: 700; line-height: 1.5; color: var(--text-soft); overflow-wrap: anywhere; }
.adv-start .adv-pick-title { display: flex; align-items: center; justify-content: flex-start; gap: 6px; text-align: left; font-size: 1.15rem; margin: 4px 0 0; }
.adv-pick-icon { font-size: 1.5rem; color: var(--coral); background: none; -webkit-text-fill-color: currentColor; }
/* step header */
.adv-step-head { display: flex; flex-direction: column; align-items: stretch; gap: 4px; flex: 0 0 auto; }
.adv-steps { display: flex; align-items: center; justify-content: center; }
.adv-dot {
  flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; font-size: 0.9rem; font-weight: 900;
  background: #EFE6DF; color: #A8968B;
}
.adv-dot .material-symbols-rounded { font-size: 1.05rem; background: none; -webkit-text-fill-color: currentColor; color: currentColor; }
.adv-dot.done { background: #BFE8DD; color: #1F7A67; }
.adv-dot.on { background: linear-gradient(135deg, var(--coral), var(--accent)); color: #fff; box-shadow: 0 0 0 4px rgba(255, 138, 122, 0.22); }
.adv-dot-line { flex: 0 1 34px; height: 3px; border-radius: 2px; background: #EFE6DF; margin: 0 4px; }
.adv-step-label { text-align: center; font-size: 1rem; font-weight: 900; color: var(--text); line-height: 1.3; }
.adv-step-n { color: var(--accent-deep); margin-right: 6px; }
.adv-do {
  margin: 0; display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 12px; border-radius: 14px;
  background: #FFF1D6; color: #7A5A14;
  font-size: 1.12rem; font-weight: 900; line-height: 1.35; text-align: center; overflow-wrap: anywhere;
}
.adv-do-icon { flex: 0 0 auto; font-size: 1.4rem; background: none; -webkit-text-fill-color: currentColor; color: #E8913A; }
.adv-sit-now { display: inline-flex; align-self: center; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 14px; background: rgba(255, 255, 255, 0.75); font-size: 0.95rem; font-weight: 800; color: var(--text-soft); line-height: 1.3; max-width: 100%; overflow-wrap: anywhere; }
.adv-sit-now-icon { font-size: 1.1rem; background: none; -webkit-text-fill-color: currentColor; color: #B89AE0; }
/* optional inline mic */
.adv-mic {
  align-self: center; display: inline-flex; align-items: center; gap: 8px;
  min-height: 52px; padding: 6px 16px 6px 8px; border-radius: 26px;
  border: 2px dashed #F0C4B8; background: rgba(255, 255, 255, 0.85);
  font-family: inherit; font-size: 1rem; font-weight: 800; color: var(--text-soft); line-height: 1.25; white-space: normal; cursor: pointer;
}
.adv-mic-icon { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 1.5rem; background: #FFE8E4; color: #E0483A; -webkit-text-fill-color: currentColor; }
.adv-mic.rec { border-style: solid; border-color: #F06B5A; color: #C9483A; background: #FFF3F0; animation: anycallRecPulse 1.2s ease-in-out infinite; }
.adv-mic.rec .adv-mic-icon { background: #F06B5A; color: #fff; }
.adv-mini-ideas { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; }
.adv-mini-k { font-size: 0.9rem; font-weight: 900; color: var(--muted); margin-right: 2px; }
.adv-mini {
  min-width: 44px; height: 44px; padding: 0 10px; border-radius: 22px;
  display: inline-flex; align-items: center; justify-content: center; gap: 2px;
  border: none; font-family: inherit; font-size: 1.1rem; font-weight: 900; color: #fff;
  background: linear-gradient(135deg, #FFB347, var(--coral)); box-shadow: var(--shadow); cursor: pointer;
}
.adv-mini-v { font-size: 1rem; background: none; -webkit-text-fill-color: currentColor; color: #fff; }
.adv-mini.st-ok { background: linear-gradient(135deg, #5EC4B0, #7ED6A8); }
.adv-mini.st-hard { background: #C9BDB5; }
.adv-mini.adv-playing { outline: 3px solid var(--accent); }
/* secondary text-style button (max one per screen) */
.adv-text-btn {
  align-self: center; display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  min-height: 48px; padding: 6px 14px; margin: 0;
  background: none; border: none; font-family: inherit;
  font-size: 1.1rem; font-weight: 900; color: var(--accent-deep); line-height: 1.25; text-align: center; white-space: normal;
  text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; cursor: pointer;
}
.adv-text-icon { font-size: 1.3rem; background: none; -webkit-text-fill-color: currentColor; color: currentColor; }
.adv-text-btn .adv-text-icon { order: 2; }
#adv-view-saved .adv-text-icon, #adv-add-photo .adv-text-icon { order: 0; }
/* check screen */
.adv-idea-text { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; }
.adv-idea-sub { display: inline-flex; align-items: center; gap: 3px; font-size: 0.9rem; font-weight: 800; color: var(--muted); }
.adv-idea-sub .material-symbols-rounded { font-size: 1.1rem; background: none; -webkit-text-fill-color: currentColor; color: var(--accent-deep); }
.adv-focus { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; }
#tool-body .play-phase > .btn-row > .adv-can,
#tool-body .play-phase > .btn-row > .adv-hard { flex: 1 1 0; min-width: 0; font-size: 1.4rem; }
#tool-body .play-phase > .btn-row > .adv-can { background: linear-gradient(135deg, #3FB59C, #7ED6A8); box-shadow: 0 8px 22px rgba(63, 181, 156, 0.35); }
#tool-body .play-phase > .btn-row > .adv-hard {
  background: linear-gradient(135deg, #F7A278, #F07A6A); color: #fff; border: none;
  box-shadow: 0 8px 22px rgba(240, 122, 106, 0.3); min-height: 78px; border-radius: 22px;
}
/* choose screen: big full-width cards */
.adv-choices { display: flex; flex-direction: column; gap: 10px; }
.adv-card { width: 100%; min-height: 80px; border-radius: 22px; padding: 10px 14px 10px 10px; font-size: 1.35rem; justify-content: flex-start; }
.adv-card .adv-idea-num { flex-basis: 52px; width: 52px; height: 52px; font-size: 1.4rem; }
.adv-card .adv-idea-text { flex: 1 1 auto; }
.adv-card-radio { flex: 0 0 auto; font-size: 2rem; color: #D9C8BE; background: none; -webkit-text-fill-color: currentColor; }
.adv-card.chosen .adv-card-radio { color: var(--accent-deep); }
.adv-card.chosen { transform: none; }
.adv-cert-idea.has-voice { cursor: pointer; }
.adv-cert-idea.adv-playing { outline: 3px solid var(--accent); }
@media (max-width: 350px) {
  .adv-do { font-size: 1.02rem; }
  .adv-dot-line { flex-basis: 22px; }
  #tool-body .play-phase > .btn-row > .adv-can,
  #tool-body .play-phase > .btn-row > .adv-hard { font-size: 1.2rem; }
}
.adv-text-btn { text-decoration: none; }
.adv-text-btn > span:not(.adv-text-icon) { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }

/* ===== v98: one shared bottom bar for 秘密設定 + 表演中 =====
   The Home button is the same component (bottomHomeBtn) everywhere; these rules make every
   secret-settings bar use the exact v91 play-bar sizing and placement (72×78, 8px + safe-area). */
#tool-body:has(#phase-secret),
#tool-body:has(#phase-wish) {
  padding-bottom: calc(8px + var(--safe-b));
}
#tool-body #phase-secret > .btn-row,
#tool-body #phase-wish > .btn-row {
  position: sticky;
  bottom: 0;
  z-index: 5;
  flex: 0 0 auto;
  margin-top: auto !important;
  margin-bottom: 0;
  padding-top: 8px;
  gap: 10px;
  flex-wrap: nowrap;
  align-items: stretch;
  background: linear-gradient(to bottom, rgba(255, 247, 240, 0), var(--bg) 10px);
}
#tool-body .phase > .btn-row > #bottom-home.home-icon-btn {
  flex: 0 0 72px !important;
  width: 72px;
  min-width: 72px;
  max-width: 72px;
  height: 78px;
  min-height: 78px;
  border-radius: 22px;
}
#tool-body .phase > .btn-row > #bottom-home.home-icon-btn .material-symbols-rounded { font-size: 2.2rem; }
#tool-body #phase-secret > .btn-row > .primary-btn {
  min-height: 78px;
  margin: 0;
  padding: 6px 12px;
  border-radius: 22px;
  font-size: 1.36rem;
  line-height: 1.15;
  white-space: normal;
  gap: 8px;
}
#tool-body #phase-secret > .btn-row > .primary-btn .btn-icon { font-size: 2rem; margin-right: 0; }
#tool-body #phase-secret > .btn-row > .primary-btn[hidden] { display: none; }
@media (max-width: 350px) {
  #tool-body .phase > .btn-row > #bottom-home.home-icon-btn { flex-basis: 64px !important; width: 64px; min-width: 64px; max-width: 64px; }
}

/* fortune 「自己輸入」 inline card */
.choice-btn.choice-custom { cursor: text; }
.choice-custom .c-label { display: flex; flex-direction: column; gap: 6px; flex: 1 1 auto; min-width: 0; }
.choice-custom .c-custom-k { font-weight: 800; cursor: text; }
.choice-custom-input {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 8px 12px;
  border: 2px solid rgba(232, 168, 90, 0.45);
  border-radius: 14px;
  background: #fff;
  font: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  outline: none;
}
.choice-custom-input:focus,
.choice-custom.selected .choice-custom-input { border-color: #E8913A; box-shadow: 0 0 0 3px rgba(255, 179, 71, 0.25); }
.fortune-slip-text {
  width: 82px; height: 92px;
  display: flex; align-items: center; justify-content: center; text-align: center;
  font: 800 16px/1.2 system-ui, sans-serif; color: #503228;
  overflow-wrap: anywhere; word-break: break-word;
}
.fortune-slip-text.long { font-size: 13px; }
.fortune-slip-text.xlong { font-size: 11px; }
#tool-body .result-msg { overflow-wrap: anywhere; }

/* 小小軍師: replay the owl's line (icon only, 48px hit area) */
.adv-bubble-wrap { display: flex; align-items: center; gap: 4px; flex: 1 1 auto; min-width: 0; }
.adv-bubble-wrap > .adv-bubble { flex: 1 1 auto; min-width: 0; }
.adv-replay-btn {
  flex: 0 0 48px;
  width: 48px; height: 48px;
  padding: 0; margin: 0;
  border: 0; background: transparent;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.adv-replay-btn .adv-replay-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff;
  box-shadow: 0 3px 10px rgba(80, 50, 40, 0.14);
  border: 2px solid #FFE08A;
  color: #E8913A;
  -webkit-text-fill-color: #E8913A;
  font-size: 1.6rem;
}
.adv-replay-btn:active .adv-replay-icon { transform: scale(0.92); background: #FFF3EB; }
.anycall-name-card { cursor: text; }

/* v98: 小小軍師 step 1 — one record button */
#tool-body .play-phase > .btn-row > .adv-rec-main.rec {
  background: linear-gradient(135deg, #F06B5A, #FF8A7A);
  box-shadow: 0 8px 22px rgba(240, 107, 90, 0.4);
  animation: advRecBtnPulse 1.1s ease-in-out infinite;
}
@keyframes advRecBtnPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.03); box-shadow: 0 10px 28px rgba(240, 107, 90, 0.6); } }
.adv-rec-live {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: 12px 14px;
  border-radius: 22px;
  background: #FFF3F0;
  border: 2px solid #F06B5A;
  color: #C9483A;
  font-weight: 900; font-size: 1.2rem;
}
.adv-rec-live-mic {
  flex: 0 0 64px; width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center;
  background: #F06B5A;
  animation: advRecMic 1.1s ease-in-out infinite;
}
.adv-rec-live-mic .material-symbols-rounded { font-size: 2.4rem; color: #fff; -webkit-text-fill-color: #fff; }
@keyframes advRecMic { 0%, 100% { box-shadow: 0 0 0 0 rgba(240, 107, 90, 0.55); } 50% { box-shadow: 0 0 0 14px rgba(240, 107, 90, 0); } }
.adv-rec-live-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.adv-rec-live-t { font-size: 1rem; font-weight: 800; opacity: 0.8; font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) {
  #tool-body .play-phase > .btn-row > .adv-rec-main.rec, .adv-rec-live-mic { animation: none; }
}

/* ===== v98: 備份與還原 popup (same shell as the help sheet) ===== */
/* backup button = exactly the ? button (same classes, no overrides) */
.bk-body { padding-bottom: 12px; }
.bk-sheet { display: flex; flex-direction: column; gap: 14px; color: var(--text-soft); }
.bk-intro {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px; border-radius: 20px; background: #fff; box-shadow: var(--shadow);
  border-top: 5px solid var(--sky, #7EB8E8);
}
.bk-intro p { margin: 0; font-weight: 700; line-height: 1.55; color: var(--text); }
.bk-intro-icon {
  flex: 0 0 40px; width: 40px; height: 40px; border-radius: 14px;
  display: grid; place-items: center; background: var(--sky-soft, #D6ECFF);
}
.bk-intro-icon .material-symbols-rounded { color: #3A8FD0; -webkit-text-fill-color: #3A8FD0; }
.bk-actions { display: flex; flex-direction: column; gap: 10px; }
.bk-big {
  width: 100%; margin: 0;
  min-height: 72px; padding: 8px 14px;
  border-radius: 22px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 1.25rem; font-weight: 900; line-height: 1.2; white-space: normal; text-align: center;
}
.bk-big .btn-icon { font-size: 2rem; flex: 0 0 auto; }
.bk-up { background: #fff; border: 2px solid #7EB8E8; color: #2F5F86; }
.bk-up .material-symbols-rounded { color: #3A8FD0; -webkit-text-fill-color: #3A8FD0; }
.bk-danger { background: linear-gradient(135deg, #F06B5A, #FF9E7F); }
.bk-text-btn {
  min-height: 48px; border: 0; background: transparent; cursor: pointer;
  font: inherit; font-size: 1.05rem; font-weight: 800; color: var(--text-soft);
  text-decoration: underline; text-underline-offset: 3px;
}
.bk-tip {
  padding: 12px 14px; border-radius: 16px;
  background: #FFF9EC; border-left: 4px solid #F5C95C;
  font-size: 0.88rem; line-height: 1.55;
}
.bk-tip-head { display: flex; align-items: center; gap: 6px; font-weight: 900; color: #9A6A00; margin-bottom: 6px; }
.bk-tip-icon { color: #E8A85A; -webkit-text-fill-color: #E8A85A; font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24; }
.bk-tip-list { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 4px; font-weight: 700; color: var(--text); }
.bk-confirm {
  padding: 14px; border-radius: 20px; background: #FFF3F0; border: 2px solid #F06B5A;
  display: flex; flex-direction: column; gap: 8px;
}
.bk-confirm-head { display: flex; align-items: center; gap: 8px; font-size: 1.15rem; font-weight: 900; color: #C9483A; line-height: 1.35; }
.bk-warn-icon { color: #F06B5A; -webkit-text-fill-color: #F06B5A; font-size: 1.8rem; flex: 0 0 auto; }
.bk-confirm-file { margin: 0; display: flex; gap: 6px; align-items: flex-start; font-weight: 800; color: var(--text); overflow-wrap: anywhere; }
.bk-confirm-meta { margin: 0; font-weight: 700; color: var(--text-soft); overflow-wrap: anywhere; }
.help-title > span:last-child { white-space: normal; }

/* ===== v100: Google Drive auto backup card ===== */
.gd-card {
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px; border-radius: 20px; background: #fff; box-shadow: var(--shadow);
  border-top: 5px solid var(--accent, #5EC4B0);
}
.gd-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 1.05rem; font-weight: 900; color: var(--text); line-height: 1.35; }
.gd-icon { color: var(--accent-deep, #3AA991); -webkit-text-fill-color: var(--accent-deep, #3AA991); font-size: 1.6rem; }
.gd-badge { padding: 2px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 800; background: #F3EFEC; color: var(--muted); white-space: nowrap; }
.gd-badge.on { background: #DDF5EF; color: #1F7A67; }
.gd-desc { margin: 0; font-weight: 700; line-height: 1.5; color: var(--text-soft); }
.gd-desc.small { font-size: 0.85rem; }
.gd-status { margin: 0; font-size: 1rem; font-weight: 900; color: #1F7A67; }
.gd-warn { margin: 0; display: flex; gap: 6px; align-items: flex-start; font-weight: 800; color: #C9483A; }
.gd-soon .bk-big[disabled] { opacity: 0.5; filter: grayscale(0.6); cursor: not-allowed; }
.bk-manual-head { display: flex; align-items: center; gap: 6px; margin-top: 2px; font-weight: 900; color: var(--text-soft); }
.bk-manual { flex-direction: row; }
.bk-mid {
  flex: 1 1 0; min-width: 0; margin: 0;
  min-height: 60px; padding: 6px 10px; border-radius: 18px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 1rem; font-weight: 800; line-height: 1.2; white-space: normal; text-align: center;
}
.bk-mid .btn-icon { font-size: 1.5rem; flex: 0 0 auto; }
.gd-hint {
  align-self: center;
  margin: -2px auto 4px;
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 32px; padding: 4px 12px;
  border: 1px solid #F5C95C; border-radius: 999px;
  background: #FFF9EC; color: #9A6A00;
  font: inherit; font-size: 0.8rem; font-weight: 800; cursor: pointer;
}
.gd-hint[hidden] { display: none; }
.gd-hint .material-symbols-rounded { font-size: 1.05rem; color: #E8A85A; -webkit-text-fill-color: #E8A85A; }

/* ===== v100: 小小軍師 saved ideas — one per row ===== */
.adv-ideas-phase .adv-stage { min-height: 0; }
.adv-idea-list-wrap { display: flex; flex-direction: column; gap: 6px; width: 100%; min-height: 0; flex: 1 1 auto; }
.adv-idea-list-wrap > .adv-mini-k { align-self: flex-start; }
.adv-idea-list {
  display: flex; flex-direction: column; gap: 8px; width: 100%;
  min-height: 0; max-height: 40vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 2px; overscroll-behavior: contain;
}
.adv-row {
  width: 100%; min-height: 60px; height: auto; margin: 0;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 18px;
  border: 2px solid rgba(80, 50, 40, 0.1); background: #fff; box-shadow: 0 2px 8px rgba(80, 50, 40, 0.08);
  font: inherit; font-size: 1.15rem; font-weight: 900; color: var(--text); text-align: left; cursor: pointer;
  flex: 0 0 auto;
}
.adv-row.st-ok { border-color: #7ED6A8; background: #F0FBF6; }
.adv-row.st-hard { background: #F6F2EF; color: var(--text-soft); }
.adv-row .adv-idea-num {
  flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.1rem; font-weight: 900; color: #fff;
  background: linear-gradient(135deg, #FFB347, #FF8A7A);
}
.adv-row.st-ok .adv-idea-num { background: linear-gradient(135deg, #3FB59C, #7ED6A8); }
.adv-row.st-hard .adv-idea-num { background: #C9BDB5; }
.adv-row-text { flex: 1 1 auto; min-width: 0; line-height: 1.3; overflow-wrap: anywhere; white-space: normal; }
.adv-row .adv-tag { flex: 0 0 auto; }
.adv-row-play {
  flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent, #5EC4B0);
  box-shadow: 0 3px 10px rgba(58, 169, 145, 0.35);
}
.adv-row-play .material-symbols-rounded { font-size: 2rem; color: #fff; -webkit-text-fill-color: #fff; background: none; }
.adv-row.adv-playing { outline: 3px solid var(--accent); outline-offset: 1px; }
.adv-row.adv-playing .adv-row-play { animation: advRecMic 1.1s ease-in-out infinite; }
.adv-decide-phase .adv-stage { min-height: 0; }
.adv-choices { min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 2px; }
.adv-choices .adv-idea-text { white-space: normal; overflow-wrap: anywhere; }

/* ===== v101: secret pages — one short section label, compact how-to ===== */
#phase-secret .secret-label {
  display: flex; align-items: center; gap: 6px;
  margin: 2px 0 -2px; min-height: 0;
  font-size: 0.95rem; font-weight: 900; line-height: 1.3; color: var(--text-soft);
  white-space: normal; overflow-wrap: anywhere;
}
#phase-secret .secret-label-icon { font-size: 1.15rem; color: var(--coral-deep, #E0584A); -webkit-text-fill-color: currentColor; background: none; flex: 0 0 auto; }
#phase-secret .howto-card { padding: 8px 12px; }
#phase-secret .howto-card p, .pee-phase .howto-card p { font-size: 0.9rem; line-height: 1.45; }
.pee-phase .howto-card { flex: 0 0 auto; padding: 6px 10px; box-shadow: none; }
.pee-phase .howto-card[hidden] { display: none; }
.pee-phase .howto-card .howto-icon { font-size: 1.3rem; }
#phase-secret > .secret-label,
#phase-secret > .howto-card,
#phase-secret > .phase-badge,
#phase-secret > .choice-list,
#phase-secret > .anycall-card { flex-shrink: 0; }

/* ===== v103: larger home tab rows (match card title size, normal weight) ===== */
.home-mode-btn,
.home-tab {
  font-size: 0.95rem;
  font-weight: 400;
  min-height: 46px;
  line-height: 1.15;
}
.home-mode-btn { gap: 6px; padding: 6px 6px; }
.home-tab { gap: 4px; padding: 5px 4px; }
.home-mode-btn .material-symbols-rounded,
.home-tab .material-symbols-rounded { font-size: 1.4rem; flex: 0 0 auto; }
.home-mode-btn > span:not(.material-symbols-rounded),
.home-tab-label { min-width: 0; text-align: center; overflow-wrap: anywhere; line-height: 1.15; }
@media (max-width: 359px) {
  .home-tab { flex-direction: column; gap: 1px; padding: 5px 2px; }
  .home-tab .material-symbols-rounded { font-size: 1.3rem; }
  .home-mode-btn { gap: 4px; padding: 6px 4px; }
}

/* ===== v103: simplified backup popup ===== */
.bk-simple { gap: 14px; }
.bk-line { margin: 0; font-size: 1rem; font-weight: 700; line-height: 1.55; color: var(--text); }
.bk-simple .bk-big { min-height: 78px; }
.gd-on-box { display: flex; flex-direction: column; gap: 12px; }
.bk-simple .gd-status { display: flex; align-items: center; gap: 8px; font-size: 1.02rem; font-weight: 800; color: #1F7A67; line-height: 1.4; padding: 12px 14px; border-radius: 14px; background: #E8F7F2; }
.gd-ok-icon { color: #2F9A84; -webkit-text-fill-color: #2F9A84; font-size: 1.5rem; flex: 0 0 auto; font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24; }
.gd-btns { display: flex; gap: 10px; }
.gd-btns .bk-mid { flex: 1 1 0; min-width: 0; min-height: 60px; }
.gd-btns .bk-mid span:not(.material-symbols-rounded) { overflow-wrap: anywhere; }
.bk-manual-row { margin: 2px 0 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2px 4px; font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.bk-link { border: 0; background: none; padding: 8px 4px; font: inherit; font-weight: 700; color: var(--text-soft); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 36px; }
.bk-sep { color: var(--muted); opacity: 0.6; }

/* ===== v104: backup ring · support popup · advisor auto-advance ===== */
.home-header-actions .home-backup-btn.gd-ring-ok { box-shadow: 0 0 0 2px #8FDCC0, 0 2px 10px rgba(80, 50, 40, 0.08); }
.home-header-actions .home-backup-btn.gd-ring-bad { box-shadow: 0 0 0 2px #F29A8E, 0 2px 10px rgba(80, 50, 40, 0.08); }
.support-popup { z-index: 90; }
.sup-card { max-width: 420px; }
.sup-body { display: flex; flex-direction: column; gap: 14px; padding-bottom: 16px; }
.sup-line { margin: 0; font-size: 1.02rem; font-weight: 700; line-height: 1.6; color: var(--text); text-align: center; }
.sup-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sup-opt {
  min-height: 78px; border-radius: 20px; border: 2px solid #FFD9CC; background: linear-gradient(160deg, #FFF8F3 0%, #FFEDE4 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 8px 6px;
  font: inherit; color: var(--text); cursor: pointer; box-shadow: 0 3px 10px rgba(240, 120, 90, 0.10);
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}
.sup-opt:active { transform: scale(0.96); }
.sup-opt[disabled] { opacity: 0.55; }
.sup-emoji { font-size: 1.7rem; line-height: 1.1; }
.sup-price { font-size: 1.12rem; font-weight: 800; line-height: 1.25; text-align: center; overflow-wrap: anywhere; }
.sup-more { background: #fff; border-style: dashed; border-color: #F3C9B8; }
.sup-more .sup-price { font-size: 1rem; font-weight: 700; color: var(--text-soft); }
.sup-caret { display: inline-block; transition: transform 0.2s ease; }
.sup-caret.open { transform: rotate(180deg); }
.sup-msg { margin: 0; padding: 12px 14px; border-radius: 14px; font-weight: 800; line-height: 1.5; text-align: center; }
.sup-msg[hidden] { display: none; }
.sup-msg.ok { background: #E8F7F2; color: #1F7A67; }
.sup-msg.soft { background: #FFF3E6; color: #A0602A; }
.sup-msg.err { background: #FDECEA; color: #B4473A; }
.adv-picked { transform: scale(0.97); filter: saturate(1.25) brightness(1.03); box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.9), 0 0 0 7px rgba(94, 196, 176, 0.45) !important; }
.adv-focus .adv-idea .adv-tag { margin-left: auto; align-self: center; }
.adv-allhard .adv-idea-list { margin-top: 4px; }
.help-legal { margin: 0; padding: 4px 16px 12px; display: flex; justify-content: center; gap: 8px; font-size: 0.78rem; color: var(--muted); }
.help-legal a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; padding: 4px 2px; }

/* ===== v105: install helper · MUI icons in support ===== */
.help-ok { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.help-ok .btn-icon { font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24; }
.inst-btn { width: 100%; min-height: 78px; display: flex; align-items: center; justify-content: center; gap: 12px; margin: 0 0 14px; padding: 10px 16px; border-radius: 22px; text-align: left; }
.inst-btn .btn-icon { font-size: 2.1rem; flex: 0 0 auto; }
.inst-btn-text { display: flex; flex-direction: column; min-width: 0; }
.inst-btn-main { font-size: 1.12rem; font-weight: 900; line-height: 1.3; }
.inst-btn-sub { font-size: 0.82rem; font-weight: 700; opacity: 0.9; line-height: 1.3; }
.inst-popup { z-index: 95; }
.inst-card { max-width: 420px; }
.inst-body { display: flex; flex-direction: column; gap: 12px; padding-bottom: 16px; }
.inst-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.inst-step { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: linear-gradient(160deg, #FFF8F3, #FFEDE4); border: 2px solid #FFE0D3; }
.inst-n { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; background: #F08A6E; color: #fff; font-weight: 900; display: flex; align-items: center; justify-content: center; }
.inst-step-icon { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 12px; background: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(80, 50, 40, 0.08); }
.inst-step-icon .material-symbols-rounded { font-size: 1.8rem; color: #2F7FD0; -webkit-text-fill-color: #2F7FD0; }
.inst-step-text { display: flex; flex-direction: column; gap: 2px; font-size: 1.05rem; font-weight: 800; color: var(--text); line-height: 1.4; min-width: 0; }
.inst-step-sub { font-size: 0.85rem; font-weight: 700; color: var(--text-soft); }
.inst-line { margin: 0; display: flex; gap: 10px; align-items: flex-start; font-size: 1.05rem; font-weight: 800; line-height: 1.5; color: var(--text); }
.inst-line-icon { font-size: 1.8rem; color: #2F7FD0; -webkit-text-fill-color: #2F7FD0; flex: 0 0 auto; }
.inst-big { min-height: 78px; width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 1.1rem; }
.inst-big .btn-icon { font-size: 1.9rem; }
.inst-note { margin: 0; font-size: 0.88rem; font-weight: 700; color: var(--text-soft); text-align: center; }
.inst-arrow { position: fixed; z-index: 96; pointer-events: none; display: flex; }
.inst-arrow .material-symbols-rounded { font-size: 64px; color: #F06B5A; -webkit-text-fill-color: #F06B5A; filter: drop-shadow(0 3px 6px rgba(0,0,0,0.25)); font-variation-settings: 'FILL' 1, 'wght' 700, 'GRAD' 0, 'opsz' 48; }
.inst-arrow-bottom { left: 50%; bottom: calc(6px + var(--safe-b, 0px)); transform: translateX(-50%); animation: instBounceDown 0.9s ease-in-out infinite; }
.inst-arrow-top-right { right: 10px; top: calc(4px + env(safe-area-inset-top, 0px)); animation: instBounceUp 0.9s ease-in-out infinite; }
@keyframes instBounceDown { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 14px); } }
@keyframes instBounceUp { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(6px, -10px); } }
@media (prefers-reduced-motion: reduce) { .inst-arrow { animation: none !important; } }
.sup-icon { font-size: 2rem; font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24; }
.sup-icon-local_cafe { color: #B07A4F; -webkit-text-fill-color: #B07A4F; }
.sup-icon-favorite { color: #F0607A; -webkit-text-fill-color: #F0607A; }
.sup-icon-rocket_launch { color: #6C8FE0; -webkit-text-fill-color: #6C8FE0; }
.sup-more .sup-caret { font-size: 1.6rem; color: var(--text-soft); -webkit-text-fill-color: var(--text-soft); }
.sup-title-icon, .sup-inline-heart, .sup-msg-icon { color: #F0607A; -webkit-text-fill-color: #F0607A; font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24; }
.sup-inline-heart { font-size: 1.15em; vertical-align: -0.2em; }
.sup-msg { display: flex; align-items: center; justify-content: center; gap: 6px; }
.sup-msg-icon { font-size: 1.3rem; }
.hi-emoji.hi-mui { font-size: 1.5rem; font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24; }
.hi-tone-peach .hi-mui { color: #F08A6E; -webkit-text-fill-color: #F08A6E; }
.hi-tone-sun .hi-mui { color: #E8A93A; -webkit-text-fill-color: #E8A93A; }
.hi-tone-rose .hi-mui { color: #F0607A; -webkit-text-fill-color: #F0607A; }
.hi-tone-mint .hi-mui { color: #3AA991; -webkit-text-fill-color: #3AA991; }
.inst-inline { font-size: 1.2em; vertical-align: -0.25em; }
.adv-can .btn-icon, .adv-hard .btn-icon { font-size: 1.4em; vertical-align: -0.25em; }
.help-close { display: inline-flex; align-items: center; justify-content: center; }
.help-close .material-symbols-rounded { font-size: 1.5rem; color: var(--text-soft); -webkit-text-fill-color: var(--text-soft); background: none; }

/* ===== v105: custom option row (input + own 開始 on one row) ===== */
.choice-btn.custom-row { display: flex; align-items: center; gap: 10px; }
.custom-row .c-label { flex: 1 1 auto; min-width: 0; }
.custom-row .choice-custom-input { width: 100%; min-width: 0; box-sizing: border-box; }
.custom-row .custom-go {
  flex: 0 0 auto; align-self: flex-end; min-height: 52px; min-width: 0; padding: 0 14px; border-radius: 16px;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; font-size: 1rem; white-space: nowrap;
}
.custom-row .custom-go .btn-icon { font-size: 1.5rem; }
.custom-row .custom-go[disabled] { opacity: 0.45; filter: grayscale(0.4); }
.custom-num-wrap { display: flex; align-items: center; gap: 6px; min-width: 0; }
.custom-num-wrap .custom-num { flex: 1 1 auto; font-size: 1.15rem; font-weight: 800; -moz-appearance: textfield; }
.custom-num::-webkit-outer-spin-button, .custom-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.custom-unit { flex: 0 0 auto; font-weight: 800; color: var(--text-soft); }
.adv-start .custom-row { margin-top: 10px; }
@media (max-width: 359px) {
  .custom-row { gap: 8px; }
  .custom-row .c-icon { display: none; }
  .custom-row .custom-go { padding: 0 10px; }
}
.custom-row .custom-go { width: auto !important; flex: 0 0 auto !important; max-width: 45%; }
.custom-row .c-label { flex: 1 1 0 !important; }
/* v105: hero pills (add to home · language) top-right inside the hero */
.hi-hero { position: relative; }
.hi-pills { position: absolute; top: 10px; right: 10px; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; max-width: calc(50% - 44px); z-index: 1; }
.hi-pill {
  display: inline-flex; align-items: center; gap: 4px; max-width: 100%;
  min-height: 32px; padding: 4px 10px 4px 7px; border-radius: 999px;
  border: 1.5px solid rgba(240, 138, 110, 0.35); background: rgba(255, 255, 255, 0.92);
  font: inherit; font-size: 0.74rem; font-weight: 800; line-height: 1.15; color: var(--text); text-align: left;
  box-shadow: 0 2px 8px rgba(240, 107, 90, 0.14); cursor: pointer;
}
.hi-pill > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.hi-pill:active { transform: scale(0.96); }
.help-intro .hi-pill .hi-pill-icon { font-size: 1.15rem; flex: 0 0 auto; color: #F08A6E; -webkit-text-fill-color: #F08A6E; }
.help-intro .hi-lang-pill .hi-pill-icon { color: #3A8FD0; -webkit-text-fill-color: #3A8FD0; }

/* ===== v105: simple 客製化來電 setup ===== */
.ac-simple .ac-body { display: flex; flex-direction: column; align-items: center; gap: 14px; padding-top: 8px; flex: 0 0 auto; }
.ac-avatar-btn { position: relative; border: 0; padding: 0; background: none; border-radius: 50%; cursor: pointer; }
.ac-avatar-btn:active { transform: scale(0.97); }
.ac-simple .ac-avatar { width: 140px; height: 140px; border-radius: 50%; object-fit: cover; display: block; background: #fff; border: 4px solid #fff; box-shadow: 0 6px 18px rgba(80, 50, 40, 0.16); }
.ac-cam-badge { position: absolute; right: 4px; bottom: 4px; width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, #FF9E7F, #F06B5A); display: flex; align-items: center; justify-content: center; border: 3px solid #fff; box-shadow: 0 3px 8px rgba(240, 107, 90, 0.3); }
.ac-cam-badge .material-symbols-rounded { font-size: 1.3rem; color: #fff; -webkit-text-fill-color: #fff; background: none; }
.ac-sheet { display: flex; gap: 10px; width: 100%; max-width: 360px; }
.ac-sheet[hidden] { display: none; }
.ac-sheet .ac-sheet-btn { flex: 1 1 0; min-height: 60px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.ac-simple .ac-name { width: 100%; max-width: 360px; box-sizing: border-box; min-height: 56px; text-align: center; font-size: 1.1rem; }
.ac-rec-row { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 360px; }
.ac-rec { flex: 1 1 auto; min-width: 0; min-height: 78px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 1.15rem; border-radius: 22px; }
.ac-rec .btn-icon { font-size: 2rem; }
.ac-rec.rec { background: linear-gradient(135deg, #F06B5A, #FF8A7A); animation: acPulse 1.2s ease-in-out infinite; }
.ac-rec.again { background: #fff; color: var(--text); border: 2px solid #FFC9B8; box-shadow: none; }
.ac-rec.again .btn-icon { color: #F06B5A; -webkit-text-fill-color: #F06B5A; }
.ac-rec-t { font-variant-numeric: tabular-nums; opacity: 0.9; }
@keyframes acPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(240, 107, 90, 0.45); } 50% { box-shadow: 0 0 0 10px rgba(240, 107, 90, 0); } }
.ac-play { flex: 0 0 auto; width: 78px; height: 78px; border-radius: 50%; border: 0; background: linear-gradient(135deg, #5EC4B0, #3AA991); display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(58, 169, 145, 0.3); cursor: pointer; }
.ac-play .material-symbols-rounded { font-size: 2.4rem; color: #fff; -webkit-text-fill-color: #fff; background: none; }
.ac-play:active { transform: scale(0.95); }
.ac-link { border: 0; background: none; padding: 6px 8px; display: inline-flex; align-items: center; gap: 4px; font: inherit; font-size: 0.9rem; font-weight: 700; color: var(--text-soft); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.ac-link-icon { font-size: 1.1rem; }
.ac-link[disabled] { opacity: 0.4; }

/* ===== v105: saved decisions list ===== */
.adv-log-stage { justify-content: flex-start; overflow-y: auto; }
.adv-log-list { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.adv-log-row { display: flex; align-items: center; gap: 10px; padding: 12px; background: #fff; border-radius: 18px; box-shadow: 0 2px 8px rgba(80, 50, 40, 0.08); text-align: left; }
.adv-log-icon { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; background: #FFF1EA; display: flex; align-items: center; justify-content: center; }
.adv-log-icon .material-symbols-rounded { font-size: 1.6rem; color: #F06B5A; }
.adv-log-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.adv-log-sit { font-weight: 800; font-size: 1.02rem; color: var(--text); }
.adv-log-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; font-size: 0.8rem; color: var(--text-soft); }
.adv-log-meta-icon { font-size: 0.95rem; }
.adv-log-dot { margin: 0 3px; }
.adv-log-hear { flex: 0 0 auto; min-height: 48px; padding: 0 12px; border: 0; border-radius: 24px; background: linear-gradient(135deg, #5EC4B0, #3AA991); color: #fff; font: inherit; font-weight: 800; font-size: 0.9rem; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.adv-log-hear .material-symbols-rounded { color: #fff; font-size: 1.2rem; }
.adv-log-del { flex: 0 0 auto; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #F6EFEC; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.adv-log-del .material-symbols-rounded { color: #B98D80; font-size: 1.35rem; }
.adv-log-confirm { justify-content: space-between; flex-wrap: wrap; background: #FFF4F1; }
.adv-log-q { display: flex; align-items: center; gap: 6px; font-weight: 800; flex: 1 1 100%; }
.adv-log-yes, .adv-log-no { flex: 1 1 0; min-height: 48px; border-radius: 24px; font: inherit; font-weight: 800; cursor: pointer; }
.adv-log-yes { border: 0; background: #F06B5A; color: #fff; }
.adv-log-no { border: 2px solid #E8D8D2; background: #fff; color: var(--text); }
.adv-log-empty { color: var(--text-soft); text-align: center; margin: auto; }
.ac-rec.again .btn-icon { background: none; opacity: 1; }
.ac-link { text-decoration: none; }
.ac-link span:last-child { text-decoration: underline; text-underline-offset: 3px; }

/* ===== v106: hero pills — equal width (widest wins), 46px tall ===== */
.hi-pills { display: grid; grid-template-columns: max-content; align-items: stretch; justify-items: stretch; gap: 6px; max-width: none; top: 10px; right: 10px; }
.hi-pill { width: 100%; box-sizing: border-box; justify-content: flex-start; min-height: 46px; padding: 6px 14px 6px 11px; gap: 6px; font-size: 0.86rem; }
.hi-pill > span:last-child { white-space: nowrap; overflow-wrap: normal; }
.help-intro .hi-pill .hi-pill-icon { font-size: 1.4rem; }
.hi-pills { grid-template-columns: fit-content(148px); right: 8px; top: 8px; }
.hi-pill > span:last-child { white-space: normal; overflow-wrap: normal; word-break: keep-all; line-height: 1.12; }
.hi-logo, .hi-doc-label { transition: none; }

/* ===== v106: help popup footer — solid, padded, divider; scroll ends above it ===== */
.help-body { padding-bottom: 18px !important; }
.help-actions { padding: 14px 14px 8px !important; background: var(--card-soft); border-top: 1px solid rgba(120, 80, 60, 0.10); box-shadow: 0 -6px 14px -8px rgba(80, 50, 40, 0.18); position: relative; z-index: 1; }
.help-legal { flex-shrink: 0; background: var(--card-soft); padding: 6px 14px 14px; position: relative; z-index: 1; }
.help-actions > button { height: auto; padding: 8px 10px; gap: 6px; font-size: 1rem; }
.help-actions > button .btn-icon { font-size: 1.3rem; margin: 0; }
@media (max-width: 340px) { html[lang="en"] .help-actions > button { font-size: 0.9rem; padding: 8px 8px; } }

/* ===== v106: compact one-line custom rows (icon · input · 開始), ~64px ===== */
.choice-btn.custom-row { min-height: 64px !important; height: auto; padding: 8px 8px 8px 12px !important; gap: 8px; align-items: center !important; box-sizing: border-box; }
.custom-row .c-label { display: flex !important; flex-direction: row !important; align-items: center; gap: 0 !important; align-self: center; }
.custom-row .c-icon { flex: 0 0 auto; align-self: center; margin: 0 !important; }
.custom-row .choice-custom-input { height: 46px; min-height: 0; margin: 0 !important; padding: 0 12px; font-size: 1rem; }
.custom-num-wrap { flex: 1 1 auto; width: 100%; }
.custom-row .custom-go { align-self: center !important; min-height: 46px !important; height: 46px; padding: 0 12px; }
.custom-row .c-custom-k { display: none; }
@media (max-width: 359px) { .custom-row .c-icon { display: inline-flex !important; } .choice-btn.custom-row { padding-left: 10px !important; gap: 6px; } .custom-row .choice-custom-input { padding: 0 8px; } }
.custom-row .custom-go { margin: 0 !important; }
/* v106: saved decision row play button (play_arrow ⇄ stop) */
.adv-log-play { flex: 0 0 auto; width: 48px; height: 48px; border: 0; border-radius: 50%; background: linear-gradient(135deg, #5EC4B0, #3AA991); display: flex; align-items: center; justify-content: center; box-shadow: 0 3px 10px rgba(58, 169, 145, 0.3); cursor: pointer; }
.adv-log-play .material-symbols-rounded { color: #fff; -webkit-text-fill-color: #fff; background: none; font-size: 1.9rem; }
.adv-log-play.adv-playing { background: linear-gradient(135deg, #F06B5A, #FF8A7A); }
.adv-log-play:active { transform: scale(0.94); }
/* v106: backup popup — 立即備份 */
.gd-now-btn { width: 100%; }
.gd-now-off[disabled] { opacity: 0.5; filter: grayscale(0.6); }
.gd-spin { animation: gdSpin 1s linear infinite; }
@keyframes gdSpin { to { transform: rotate(-360deg); } }
.bk-simple > .bk-big + .bk-big { margin-top: 10px; }
/* v106: mic hint — smaller */
.anycall-hint { padding: 6px 10px; font-size: 0.8rem; line-height: 1.4; border-radius: 10px; border-left-width: 3px; }

/* ===== v107: decluttered App Introduction ===== */
.help-intro { gap: 16px; }
.hi-hero.hi-hero-calm { background: linear-gradient(165deg, var(--peach-soft) 0%, #FFF6EC 100%); padding: 24px 18px 22px; box-shadow: 0 2px 10px rgba(80, 50, 40, 0.07); }
.hi-hero-calm .hi-logo { width: 64px; height: 64px; margin: 0 auto 12px; transform: none !important; }
.hi-hero-calm .hi-name { margin: 0 0 6px !important; font-size: 1.4rem; line-height: 1.25; }
.hi-hero-calm .hi-tagline { margin: 0 auto; max-width: 30em; font-size: 0.9rem; line-height: 1.55; text-wrap: balance; }
.hi-pills.hi-pills-row { position: static !important; display: flex !important; flex-direction: row; gap: 10px; width: 100%; max-width: none; margin: -4px 0 0; top: auto; right: auto; }
.hi-pills-row .hi-pill { flex: 1 1 0; width: auto; min-width: 0; min-height: 48px; justify-content: center; padding: 6px 10px; gap: 6px; border-radius: 16px;
  background: #fff; border: 1.5px solid rgba(120, 80, 60, 0.12); box-shadow: none; font-size: 0.88rem; font-weight: 700; color: var(--text-soft); text-align: center; }
.hi-pills-row .hi-pill > span:last-child { white-space: normal; word-break: keep-all; overflow-wrap: normal; line-height: 1.2; }
.help-intro .hi-pills-row .hi-pill .hi-pill-icon { font-size: 1.35rem; }
.hi-bubbles { gap: 6px; padding: 12px; border-radius: 18px; background: rgba(255, 241, 234, 0.55); border: 1px solid rgba(240, 138, 110, 0.12); align-items: flex-start; }
.hi-bubbles .hi-bubble { align-self: flex-start; max-width: 100%; padding: 6px 12px; font-size: 0.84rem; line-height: 1.4; border-radius: 14px; border-bottom-left-radius: 4px; background: #fff; box-shadow: 0 1px 3px rgba(80, 50, 40, 0.07); }
.hi-intro { padding: 0 2px; }
.help-intro .hi-p { line-height: 1.75; }
.help-intro .hi-p + .hi-p { margin-top: 10px; }
.help-legal-sep { color: var(--muted); opacity: 0.6; }
/* v107: 支持作者 — one heart (title only); every amount icon + the 其他金額 chevron in the header ? icon's colour
   (same 135deg #FF8A7A → #5EC4B0 gradient, clipped to the glyph, FILL 1 / wght 600) */
.sup-opt .sup-icon, .sup-more .sup-caret, .sup-icon[class*="sup-icon-"] {
  color: transparent !important; -webkit-text-fill-color: transparent !important;
  background: linear-gradient(135deg, #FF8A7A 0%, #5EC4B0 100%) !important; -webkit-background-clip: text !important; background-clip: text !important;
  font-variation-settings: 'FILL' 1, 'wght' 600, 'GRAD' 0, 'opsz' 24;
}
.sup-msg-icon { color: #3AA991 !important; -webkit-text-fill-color: #3AA991 !important; }
/* v107: 許願池 second-layer popup (same pattern as 支持作者); icons in the header ? gradient */
.wish-pop-card { max-width: 420px; }
.wish-pop-body { padding: 14px 16px 18px !important; }
.wish-pop-desc { margin: 0 0 12px; font-size: 0.9rem; line-height: 1.6; color: var(--text-soft); }
.wish-pop-body .wish-card { margin: 0; }
.wish-pop-body .wish-textarea { min-height: 110px; }
.wish-pop-icon, .wish-pop-body .wish-type-icon .material-symbols-rounded {
  color: transparent !important; -webkit-text-fill-color: transparent !important;
  background: linear-gradient(135deg, #FF8A7A 0%, #5EC4B0 100%) !important; -webkit-background-clip: text !important; background-clip: text !important;
  font-variation-settings: 'FILL' 1, 'wght' 600, 'GRAD' 0, 'opsz' 24;
}
.hi-camtip { display: flex; align-items: flex-start; gap: 6px; margin: -6px 2px 0 !important; font-size: 0.78rem; line-height: 1.5; color: var(--muted); }
.help-intro .hi-camtip-icon { font-size: 1.05rem; flex: 0 0 auto; margin-top: 1px; color: #F08A6E; -webkit-text-fill-color: #F08A6E; }

/* ===== v107: bigger face guide (fits a face at arm's length) ===== */
.camera-head-guide { padding-bottom: 6%; justify-content: center; }
.camera-head-frame { width: min(80%, 340px); }
.camera-head-oval { filter: drop-shadow(0 0 6px rgba(94, 196, 176, 0.45)); }
.camera-head-marker-top { top: 0; transform: translate(-50%, -30%); }
.camera-head-marker-chin { bottom: 0; transform: translate(-50%, 30%); }
.camera-head-guide-label { margin-top: 14px; }


/* ===== v107: one button-spacing token everywhere ===== */
:root { --btn-gap: 10px; }
.choice-list, .med-role-choice-list, .sub-options, .adv-sits, .sup-opts, .wish-type, .gd-btns,
.tool-grid, .help-actions, .hi-pills-row { gap: var(--btn-gap) !important; }
.choice-stack { display: flex; flex-direction: column; gap: var(--btn-gap); margin-top: 4px; }
.choice-stack > .choice-list, .choice-stack > .med-role-choice-list, .choice-stack > * { margin-top: 0 !important; margin-bottom: 0 !important; }
.choice-stack .med-fail-choice { margin-bottom: 0 !important; }
.choice-list + .custom-row, .sub-options + .custom-row { margin-top: var(--btn-gap) !important; }
.adv-start-body { gap: var(--btn-gap); }
.adv-start-body > .custom-row, .adv-start .custom-row { margin-top: 0 !important; }
.choice-list + .sub-options.show, .choice-stack + .sub-options.show { margin-top: var(--btn-gap); }

/* ===== v107: calmer backup popup — title, line, status, one big button, one quiet link row ===== */
.bk-simple { gap: var(--btn-gap, 10px) !important; }
.bk-simple .gd-on-box { gap: var(--btn-gap, 10px); }
.bk-simple > .bk-big + .bk-big { margin-top: 0; }
.bk-links { margin: 2px 0 0 !important; gap: 0 6px !important; }
.bk-links .bk-link { min-height: 44px; padding: 8px 6px; text-decoration: none; color: var(--text-soft); }
.bk-links .bk-link:not(.bk-link-muted) { text-decoration: underline; text-underline-offset: 3px; }
.bk-links .bk-link-muted { font-weight: 600; color: var(--muted); opacity: 0.85; }
.bk-links .bk-sep { color: var(--muted); opacity: 0.5; }
.camera-head-marker-top { top: calc(11 / 140 * 100%); transform: translate(-50%, -50%); }
.camera-head-marker-chin { top: auto; bottom: calc(11 / 140 * 100%); transform: translate(-50%, 50%); }
.bk-links { margin-top: 0 !important; gap: 0 2px !important; }
.bk-links .bk-link { padding: 8px 4px; }
.bk-links { font-size: 0.82rem; } .bk-links .bk-link { white-space: nowrap; padding: 8px 3px; }

/* ===== v108: full-bleed face results (3:4 crop around the big oval) ===== */
.photo-frame-med-tf .photo-bg { will-change: transform; }
.photo-frame .sticker-med-transform { animation-name: medTransformSettle108; object-fit: fill; }
@keyframes medTransformSettle108 {
  0% { transform: scale(0.96); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* ===== v108: 「還原」 second layer (從雲端 / 從檔案) ===== */
#bk-card { position: relative; }
.bk-pick { position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center; padding: 18px; border-radius: inherit; }
.bk-pick-backdrop { position: absolute; inset: 0; border-radius: inherit; background: rgba(30, 41, 59, 0.28); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.bk-pick-card { position: relative; width: min(100%, 300px); display: flex; flex-direction: column; gap: var(--btn-gap, 10px); padding: 14px; border-radius: 20px; background: #fff; box-shadow: 0 12px 32px rgba(30, 41, 59, 0.22); animation: bkPickIn 0.18s ease-out both; }
.bk-pick-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bk-pick-title { margin: 0; font-weight: 800; font-size: 1rem; color: var(--text); }
.bk-pick-x { position: static !important; }
.bk-pick-btn { width: 100%; min-height: 56px; justify-content: center; gap: 8px; }
@keyframes bkPickIn { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }

/* ===== v108: rocket custom seconds shows its range in the placeholder ===== */
#launch-custom::placeholder { font-size: 13px; font-weight: 700; letter-spacing: -0.1px; }
@media (max-width: 360px) {
  #launch-custom-card .custom-unit { display: none; } /* the placeholder already says 秒 / sec */
  #launch-custom { padding-left: 5px; padding-right: 4px; }
  #launch-custom::placeholder { font-size: 12px; letter-spacing: -0.25px; }
}
