:root {
  --pink-50: #fff6f9;
  --pink-100: #ffe8f0;
  --pink-200: #f7c6d6;
  --rose: #dc6f95;
  --berry: #9f3e68;
  --lavender: #8e78c9;
  --mint: #9ad8c2;
  --sky: #91cae8;
  --gold: #d8a849;
  --ink: #4b3040;
  --muted: #75606c;
  --paper: rgba(255, 255, 255, 0.82);
  --line: rgba(159, 62, 104, 0.18);
  --shadow: 0 18px 50px rgba(159, 62, 104, 0.14);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255, 246, 249, 0.95), rgba(250, 252, 255, 0.98) 52%, #fff8ed),
    var(--pink-50);
  color: var(--ink);
  font-family:
    "Avenir Next", "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  min-height: 72px;
  padding: 12px clamp(18px, 4vw, 56px);
  background: rgba(255, 248, 251, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--berry);
  font-weight: 800;
  font-size: 1.05rem;
}

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffd7e4, #fff6c7 58%, #bdebdc);
  color: #8a365d;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8);
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: clamp(12px, 4vw, 34px);
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.nav-links a {
  position: relative;
  padding: 8px 0;
}

.nav-links a::after {
  position: absolute;
  right: 0;
  bottom: 2px;
  left: 0;
  height: 2px;
  background: var(--rose);
  content: "";
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 180ms ease;
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
  transform: scaleX(1);
}

.language-switch,
.filter-bar {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
}

.lang-button,
.filter-button {
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
}

.lang-button {
  min-width: 48px;
  padding: 5px 12px;
}

.filter-button {
  min-width: 78px;
  padding: 6px 14px;
}

.lang-button.is-active,
.filter-button.is-active {
  background: var(--berry);
  color: white;
  box-shadow: 0 8px 20px rgba(159, 62, 104, 0.16);
}

.hero {
  position: relative;
  display: grid;
  height: clamp(560px, 76svh, 680px);
  min-height: 0;
  overflow: hidden;
  isolation: isolate;
}

.hero-image,
.hero-shade,
.hero-content {
  grid-area: 1 / 1;
}

.hero-image {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: center right;
}

.hero-shade {
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(255, 246, 249, 0.95) 0%, rgba(255, 246, 249, 0.83) 29%, rgba(255, 246, 249, 0.2) 67%),
    linear-gradient(0deg, rgba(255, 246, 249, 0.58), rgba(255, 246, 249, 0) 34%);
}

.hero-content {
  z-index: 2;
  align-self: center;
  width: min(690px, calc(100% - 36px));
  margin-left: clamp(18px, 7vw, 92px);
  padding: 46px 0;
}

.kicker,
.section-kicker,
.card-tag,
.profile-label {
  margin: 0;
  color: var(--berry);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 10ch;
  margin: 12px 0 18px;
  font-size: clamp(3rem, 7vw, 6.1rem);
  line-height: 0.96;
  letter-spacing: 0;
  overflow-wrap: normal;
  word-break: keep-all;
}

.hero-lead {
  max-width: 660px;
  margin: 0;
  color: #5f4352;
  font-size: clamp(1.04rem, 1.8vw, 1.34rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.primary-link,
.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 999px;
  padding: 11px 18px;
  font-weight: 900;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.primary-link {
  background: var(--berry);
  color: white;
  box-shadow: 0 15px 32px rgba(159, 62, 104, 0.24);
}

.ghost-link {
  border: 1px solid rgba(159, 62, 104, 0.24);
  background: rgba(255, 255, 255, 0.6);
  color: var(--berry);
}

.primary-link:hover,
.ghost-link:hover,
.primary-link:focus-visible,
.ghost-link:focus-visible {
  transform: translateY(-2px);
}

.intro-panel,
.section {
  width: min(1160px, calc(100% - 36px));
  margin: 0 auto;
}

.intro-panel {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: clamp(28px, 5vw, 70px);
  padding: clamp(56px, 8vw, 96px) 0;
}

.section {
  padding: clamp(54px, 8vw, 92px) 0;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 26px;
}

.section-heading.compact {
  max-width: 410px;
}

.section-heading h2,
.profile-intro h2 {
  margin: 8px 0 12px;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.section-heading p:not(.section-kicker),
.profile-intro p,
.intro-copy p,
.integration-note p,
.card-body p {
  color: var(--muted);
}

.intro-copy {
  display: grid;
  gap: 18px;
  font-size: clamp(1.02rem, 1.7vw, 1.2rem);
}

.intro-copy p {
  margin: 0;
}

.filter-bar {
  margin-bottom: 22px;
}

.creation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.creation-card,
.integration-note,
.profile-card,
.profile-list {
  border: 1px solid rgba(159, 62, 104, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow);
}

.creation-card {
  display: grid;
  grid-template-rows: 190px 1fr;
  min-width: 0;
  overflow: hidden;
}

.creation-card.has-video {
  grid-template-rows: 230px 1fr;
}

.feature-card {
  grid-column: span 1;
}

.card-visual {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(159, 62, 104, 0.12);
}

.card-thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.voice-embed {
  background: linear-gradient(135deg, #ffe4ef, #dcefff 58%, #fff4c8);
}

.voice-embed iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(255, 255, 255, 0.72);
}

.maze-visual {
  background:
    linear-gradient(135deg, rgba(154, 216, 194, 0.7), rgba(255, 232, 240, 0.9)),
    repeating-linear-gradient(90deg, transparent 0 28px, rgba(255, 255, 255, 0.45) 28px 31px),
    repeating-linear-gradient(0deg, transparent 0 28px, rgba(255, 255, 255, 0.45) 28px 31px);
}

.maze-path {
  position: absolute;
  inset: 42px 34px 46px;
  border: 12px solid rgba(255, 255, 255, 0.86);
  border-right-color: transparent;
  border-bottom-color: transparent;
  border-radius: 8px 8px 0 8px;
}

.maze-path::before {
  position: absolute;
  right: -18px;
  bottom: -48px;
  width: 96px;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  content: "";
}

.maze-star {
  position: absolute;
  right: 36px;
  bottom: 34px;
  width: 34px;
  height: 34px;
  background: var(--gold);
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 92%, 50% 70%, 21% 92%, 32% 57%, 2% 35%, 39% 35%);
}

.voice-visual {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #ffe4ef, #dcefff 58%, #fff4c8);
}

.mic-shape {
  position: relative;
  width: 64px;
  height: 94px;
  border: 8px solid rgba(159, 62, 104, 0.34);
  border-radius: 32px;
  background: linear-gradient(180deg, #f7c6d6, #ffffff);
}

.mic-shape::before,
.mic-shape::after {
  position: absolute;
  left: 50%;
  background: rgba(159, 62, 104, 0.34);
  content: "";
  transform: translateX(-50%);
}

.mic-shape::before {
  bottom: -38px;
  width: 8px;
  height: 36px;
  border-radius: 999px;
}

.mic-shape::after {
  bottom: -48px;
  width: 70px;
  height: 8px;
  border-radius: 999px;
}

.sound-wave {
  position: absolute;
  top: 50%;
  width: 68px;
  height: 68px;
  border: 4px solid rgba(142, 120, 201, 0.38);
  border-bottom-color: transparent;
  border-left-color: transparent;
  border-radius: 50%;
}

.wave-one {
  left: calc(50% - 118px);
  transform: translateY(-50%) rotate(225deg);
}

.wave-two {
  right: calc(50% - 118px);
  transform: translateY(-50%) rotate(45deg);
}

.story-visual {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #fff7dc, #ffe8f0 56%, #dff5ed);
}

.open-book {
  position: relative;
  width: 138px;
  height: 82px;
  border-radius: 8px 8px 14px 14px;
  background:
    linear-gradient(90deg, #fff 0 49%, rgba(159, 62, 104, 0.18) 49% 51%, #fff 51% 100%);
  box-shadow: 0 14px 26px rgba(159, 62, 104, 0.16);
}

.open-book::before,
.open-book::after {
  position: absolute;
  top: 22px;
  width: 42px;
  height: 3px;
  border-radius: 999px;
  background: rgba(220, 111, 149, 0.32);
  box-shadow: 0 14px 0 rgba(154, 216, 194, 0.44);
  content: "";
}

.open-book::before {
  left: 18px;
}

.open-book::after {
  right: 18px;
}

.flower-one,
.flower-two {
  position: absolute;
  width: 30px;
  height: 30px;
  background: var(--rose);
  clip-path: polygon(50% 0, 62% 30%, 95% 18%, 76% 50%, 95% 82%, 62% 70%, 50% 100%, 38% 70%, 5% 82%, 24% 50%, 5% 18%, 38% 30%);
}

.flower-one {
  top: 36px;
  right: 48px;
}

.flower-two {
  bottom: 34px;
  left: 48px;
  background: var(--mint);
}

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

.card-body h3 {
  margin: 0;
  font-size: 1.42rem;
  line-height: 1.16;
  letter-spacing: 0;
}

.card-body p {
  margin: 0;
}

.meta-list {
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding-top: 6px;
}

.meta-list span {
  border-radius: 8px;
  padding: 9px 10px;
  background: rgba(255, 246, 249, 0.9);
  color: #765063;
  font-size: 0.9rem;
  font-weight: 750;
}

.card-action {
  align-self: flex-start;
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  background: var(--berry);
  color: white;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(159, 62, 104, 0.18);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.card-action:hover,
.card-action:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(159, 62, 104, 0.24);
}

.integration-note {
  display: grid;
  grid-template-columns: 0.38fr 1fr;
  gap: clamp(18px, 4vw, 42px);
  align-items: start;
  margin-top: 22px;
  padding: clamp(22px, 4vw, 34px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(255, 232, 240, 0.58)),
    rgba(255, 255, 255, 0.74);
}

.integration-note h3 {
  margin: 7px 0 0;
  font-size: clamp(1.35rem, 2.8vw, 2rem);
  line-height: 1.16;
}

.integration-note p {
  margin: 0;
  font-size: 1.02rem;
}

.game-section {
  display: grid;
  grid-template-columns: minmax(250px, 0.64fr) minmax(320px, 1fr);
  gap: clamp(24px, 5vw, 58px);
  align-items: start;
}

.game-copy {
  position: sticky;
  top: 104px;
}

.game-copy h2 {
  margin: 8px 0 14px;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.game-copy p:not(.section-kicker) {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.game-embed-shell {
  border: 1px solid rgba(159, 62, 104, 0.14);
  border-radius: 8px;
  padding: clamp(16px, 3vw, 24px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 232, 240, 0.68)),
    rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow);
}

.game-embed-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.game-embed-toolbar span {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  border-radius: 999px;
  padding: 7px 11px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.game-popout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid rgba(159, 62, 104, 0.18);
  border-radius: 999px;
  padding: 7px 13px;
  background: var(--berry);
  color: white;
  font-size: 0.9rem;
  font-weight: 900;
}

.game-frame {
  display: block;
  width: 100%;
  height: min(72vh, 700px);
  min-height: 560px;
  border: 0;
  border-radius: 8px;
  background: #fff8fc;
  box-shadow: inset 0 0 0 1px rgba(159, 62, 104, 0.1);
}

.maze-board {
  display: grid;
  grid-template-columns: repeat(var(--maze-size), minmax(0, 1fr));
  gap: 4px;
  width: min(100%, 560px);
  margin: 0 auto;
  border: 8px solid rgba(255, 255, 255, 0.86);
  border-radius: 8px;
  padding: 8px;
  background: linear-gradient(135deg, rgba(142, 120, 201, 0.18), rgba(154, 216, 194, 0.25));
  box-shadow: inset 0 0 0 1px rgba(159, 62, 104, 0.12);
}

.maze-cell {
  position: relative;
  aspect-ratio: 1;
  border-radius: 5px;
  overflow: hidden;
}

.maze-cell.is-wall {
  background:
    linear-gradient(135deg, rgba(220, 111, 149, 0.72), rgba(247, 198, 214, 0.92)),
    var(--pink-200);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.maze-cell.is-path {
  background: rgba(255, 255, 255, 0.86);
}

.maze-cell.has-gem::before,
.maze-cell.has-player::before {
  position: absolute;
  inset: 25%;
  background: var(--rose);
  content: "";
  clip-path: polygon(50% 84%, 13% 48%, 12% 25%, 30% 8%, 50% 26%, 70% 8%, 88% 25%, 87% 48%);
}

.maze-cell.has-gem::before {
  inset: 30%;
  background: #e99ab4;
}

.maze-cell.has-player::before {
  inset: 18%;
  background: var(--berry);
  filter: drop-shadow(0 5px 6px rgba(159, 62, 104, 0.22));
  z-index: 2;
}

.maze-cell.has-goal::after {
  position: absolute;
  inset: 19%;
  background: var(--gold);
  content: "";
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 92%, 50% 70%, 21% 92%, 32% 57%, 2% 35%, 39% 35%);
}

.game-message {
  min-height: 1.6em;
  margin: 14px 0 0;
  color: var(--muted);
  text-align: center;
  font-weight: 800;
}

.game-controls {
  display: grid;
  grid-template-columns: repeat(3, 54px);
  gap: 8px;
  justify-content: center;
  margin-top: 14px;
}

.game-controls button {
  display: grid;
  width: 54px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(159, 62, 104, 0.16);
  border-radius: 8px;
  background: white;
  color: var(--berry);
  font: inherit;
  font-size: 1.18rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(159, 62, 104, 0.08);
}

.game-controls button:hover,
.game-controls button:focus-visible {
  background: var(--pink-100);
}

.game-controls [data-move="up"] {
  grid-column: 2;
}

.game-controls [data-move="left"] {
  grid-column: 1;
}

.game-controls [data-move="down"] {
  grid-column: 2;
}

.game-controls [data-move="right"] {
  grid-column: 3;
}

.profile-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.68fr) minmax(0, 1fr);
  gap: clamp(26px, 5vw, 58px);
}

.profile-intro {
  align-self: start;
  position: sticky;
  top: 104px;
}

.profile-intro p {
  margin: 0;
  font-size: 1.05rem;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.profile-card {
  min-height: 142px;
  padding: 20px;
}

.profile-card strong {
  display: block;
  margin-top: 12px;
  font-size: clamp(1.1rem, 2vw, 1.34rem);
  line-height: 1.24;
}

.profile-columns {
  grid-column: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.profile-list {
  padding: 22px;
}

.profile-list h3 {
  margin: 0 0 12px;
  font-size: 1.18rem;
}

.profile-list ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.profile-list li {
  position: relative;
  padding-left: 18px;
  color: var(--muted);
}

.profile-list li::before {
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  content: "";
}

.site-footer {
  display: flex;
  justify-content: center;
  padding: 34px 18px 42px;
  color: var(--muted);
  text-align: center;
}

.site-footer p {
  margin: 0;
}

.dandan-pet {
  position: fixed;
  right: clamp(14px, 3vw, 34px);
  bottom: clamp(18px, 4vw, 36px);
  z-index: 70;
  display: grid;
  width: 204px;
  justify-items: center;
  gap: 8px;
  touch-action: none;
}

.dandan-body {
  position: relative;
  display: grid;
  width: 176px;
  height: 164px;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: grab;
  filter: drop-shadow(0 18px 22px rgba(159, 62, 104, 0.2));
}

.dandan-body:active {
  cursor: grabbing;
}

.dandan-body::after {
  position: absolute;
  right: 22px;
  bottom: 4px;
  left: 22px;
  height: 16px;
  border-radius: 50%;
  background: rgba(112, 66, 86, 0.14);
  content: "";
  filter: blur(4px);
}

.dandan-body img {
  position: relative;
  z-index: 1;
  width: 176px;
  height: 164px;
  object-fit: contain;
  object-position: center bottom;
  animation: dandan-float 3.2s ease-in-out infinite;
  user-select: none;
}

.dandan-sparkle {
  position: absolute;
  top: 10px;
  right: 17px;
  z-index: 2;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0 24%, #ffe47d 27% 45%, transparent 48%);
  box-shadow:
    -18px 24px 0 -6px rgba(255, 215, 125, 0.92),
    15px 39px 0 -7px rgba(255, 152, 190, 0.78);
  animation: dandan-twinkle 1.9s ease-in-out infinite;
}

.dandan-toy,
.dandan-bone-pop,
.dandan-sleep {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
}

.dandan-toy {
  right: 5px;
  bottom: 12px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 30%, #fff 0 10%, transparent 12%),
    linear-gradient(145deg, #ff8db6 0 48%, #fff6c7 50% 100%);
  box-shadow: inset 0 0 0 2px rgba(159, 62, 104, 0.18), 0 8px 14px rgba(159, 62, 104, 0.22);
}

.dandan-bone-pop {
  right: 7px;
  bottom: 62px;
  width: 34px;
  height: 18px;
  transform: rotate(-16deg) scale(0.7);
}

.dandan-bone-pop::before,
.dandan-bone-pop::after {
  position: absolute;
  content: "";
}

.dandan-bone-pop::before {
  top: 5px;
  right: 6px;
  left: 6px;
  height: 8px;
  border-radius: 999px;
  background: #fff4cd;
  box-shadow: inset 0 0 0 1px rgba(216, 168, 73, 0.32);
}

.dandan-bone-pop::after {
  inset: 0;
  background:
    radial-gradient(circle at 5px 5px, #fff4cd 0 5px, transparent 5.5px),
    radial-gradient(circle at 5px 13px, #fff4cd 0 5px, transparent 5.5px),
    radial-gradient(circle at 29px 5px, #fff4cd 0 5px, transparent 5.5px),
    radial-gradient(circle at 29px 13px, #fff4cd 0 5px, transparent 5.5px);
  filter: drop-shadow(0 3px 3px rgba(159, 62, 104, 0.18));
}

.dandan-sleep {
  top: -7px;
  right: 8px;
  color: var(--berry);
  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: 0;
  text-shadow: 0 2px 0 #fff;
}

.dandan-bubble,
.dandan-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  border: 1px solid rgba(159, 62, 104, 0.16);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 40px rgba(159, 62, 104, 0.18);
  backdrop-filter: blur(14px);
}

.dandan-bubble {
  width: min(280px, calc(100vw - 26px));
  padding: 13px 15px;
  border-radius: 18px 18px 6px 18px;
  color: var(--ink);
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  transform-origin: right bottom;
  pointer-events: none;
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.dandan-bubble.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.dandan-bubble p {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 750;
  line-height: 1.55;
}

.dandan-panel {
  display: grid;
  width: min(360px, calc(100vw - 28px));
  max-height: min(520px, calc(100vh - 170px));
  overflow: hidden;
  border-radius: 22px;
}

.dandan-pet.is-panel-below .dandan-bubble,
.dandan-pet.is-panel-below .dandan-panel {
  top: calc(100% + 12px);
  bottom: auto;
}

.dandan-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 16px;
  border-bottom: 1px solid rgba(159, 62, 104, 0.12);
  background: linear-gradient(135deg, #fff7fb, #fff7db);
  color: var(--berry);
}

.dandan-panel-head strong {
  font-size: 1rem;
}

.dandan-close {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(159, 62, 104, 0.1);
  color: var(--berry);
  font: inherit;
  font-size: 1.25rem;
  font-weight: 800;
  cursor: pointer;
}

.dandan-chat-log {
  display: grid;
  align-content: start;
  gap: 9px;
  min-height: 128px;
  max-height: 230px;
  overflow-y: auto;
  padding: 14px 16px;
  background: rgba(255, 248, 251, 0.62);
}

.dandan-message {
  max-width: 88%;
  padding: 9px 12px;
  border-radius: 16px;
  font-size: 0.88rem;
  line-height: 1.5;
}

.dandan-message.is-user {
  justify-self: end;
  border-bottom-right-radius: 5px;
  background: var(--berry);
  color: #fff;
}

.dandan-message.is-dandan {
  justify-self: start;
  border-bottom-left-radius: 5px;
  background: #fff;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(159, 62, 104, 0.11);
}

.dandan-chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 12px 14px 8px;
}

.dandan-input {
  min-width: 0;
  border: 1px solid rgba(159, 62, 104, 0.18);
  border-radius: 999px;
  padding: 10px 13px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  font: inherit;
  outline: none;
}

.dandan-input:focus {
  border-color: rgba(159, 62, 104, 0.52);
  box-shadow: 0 0 0 4px rgba(220, 111, 149, 0.12);
}

.dandan-chat-form button,
.dandan-voice,
.dandan-actions button {
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.dandan-chat-form button {
  padding: 0 14px;
  background: var(--berry);
  color: #fff;
}

.dandan-voice {
  margin: 0 14px 10px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #fff0f6, #fff8dc);
  color: var(--berry);
  box-shadow: inset 0 0 0 1px rgba(159, 62, 104, 0.14);
}

.dandan-voice.is-listening {
  animation: dandan-pulse 900ms ease-in-out infinite;
}

.dandan-note {
  margin: 0;
  padding: 0 16px 15px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

.dandan-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  width: 100%;
  padding: 5px;
  border: 1px solid rgba(159, 62, 104, 0.13);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 28px rgba(159, 62, 104, 0.1);
  backdrop-filter: blur(12px);
}

.dandan-treat-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(255, 246, 199, 0.78);
  color: #8a5d1d;
  font-size: 0.72rem;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(216, 168, 73, 0.2);
}

.dandan-actions button {
  min-height: 30px;
  padding: 0 9px;
  background: transparent;
  color: var(--berry);
  font-size: 0.74rem;
}

.dandan-actions button:hover,
.dandan-actions button:focus-visible {
  background: rgba(220, 111, 149, 0.13);
}

.dandan-pet.is-excited .dandan-body img,
.dandan-pet.is-listening .dandan-body img {
  animation: dandan-wiggle 520ms ease-in-out infinite;
}

.dandan-pet.is-walking .dandan-body img {
  animation: dandan-walk 420ms ease-in-out infinite;
}

.dandan-pet.is-back .dandan-sparkle {
  opacity: 0.32;
}

.dandan-pet.is-playing-ball .dandan-body img {
  animation: dandan-play 560ms ease-in-out infinite;
}

.dandan-pet.is-playing-ball .dandan-toy {
  opacity: 0;
  animation: none;
}

.dandan-pet.is-sleeping .dandan-body img {
  animation: dandan-sleep-breathe 2.2s ease-in-out infinite;
}

.dandan-pet.is-sleeping .dandan-sleep {
  opacity: 1;
  animation: dandan-zzz 2.3s ease-in-out infinite;
}

.dandan-pet.is-hungry .dandan-body img {
  animation: dandan-hungry 740ms ease-in-out infinite;
}

.dandan-pet.is-fed .dandan-bone-pop {
  animation: dandan-bone 900ms ease-out;
}

.dandan-pet[data-pose="eating"] .dandan-body img {
  animation: dandan-eat 620ms ease-in-out infinite;
}

.dandan-pet[data-pose="full"] .dandan-body img {
  animation: dandan-full 1.35s ease-in-out infinite;
}

@keyframes dandan-float {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }

  50% {
    transform: translateY(-8px) rotate(1.5deg);
  }
}

@keyframes dandan-twinkle {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(0.82);
  }

  50% {
    opacity: 1;
    transform: scale(1.08);
  }
}

@keyframes dandan-wiggle {
  0%,
  100% {
    transform: rotate(-2deg) translateY(-3px);
  }

  50% {
    transform: rotate(3deg) translateY(-7px);
  }
}

@keyframes dandan-walk {
  0%,
  100% {
    transform: translateY(0) rotate(-2deg) scaleX(1);
  }

  50% {
    transform: translateY(-6px) rotate(2deg) scaleX(1.02);
  }
}

@keyframes dandan-play {
  0%,
  100% {
    transform: translateY(0) rotate(-3deg);
  }

  50% {
    transform: translateY(-7px) rotate(4deg);
  }
}

@keyframes dandan-ball {
  0%,
  100% {
    transform: translate(-34px, 2px) scale(0.92);
  }

  50% {
    transform: translate(6px, -46px) scale(1.05);
  }
}

@keyframes dandan-sleep-breathe {
  0%,
  100% {
    transform: translateY(3px) rotate(-4deg) scale(0.98);
  }

  50% {
    transform: translateY(0) rotate(-3deg) scale(1);
  }
}

@keyframes dandan-zzz {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.82);
  }

  35%,
  75% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateY(-18px) scale(1.12);
  }
}

@keyframes dandan-hungry {
  0%,
  100% {
    transform: translateX(0) translateY(0);
  }

  25% {
    transform: translateX(-3px) translateY(-2px);
  }

  75% {
    transform: translateX(3px) translateY(-2px);
  }
}

@keyframes dandan-eat {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(3px) scale(1.015);
  }
}

@keyframes dandan-full {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }

  50% {
    transform: translateY(-4px) rotate(1deg);
  }
}

@keyframes dandan-bone {
  0% {
    opacity: 0;
    transform: translateY(12px) rotate(-16deg) scale(0.7);
  }

  30% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateY(-32px) rotate(12deg) scale(1.08);
  }
}

@keyframes dandan-pulse {
  0%,
  100% {
    box-shadow: inset 0 0 0 1px rgba(159, 62, 104, 0.14), 0 0 0 0 rgba(220, 111, 149, 0.22);
  }

  50% {
    box-shadow: inset 0 0 0 1px rgba(159, 62, 104, 0.28), 0 0 0 8px rgba(220, 111, 149, 0.08);
  }
}

[hidden] {
  display: none !important;
}

@media (max-width: 940px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .nav-links {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero {
    height: auto;
    min-height: clamp(600px, 80svh, 720px);
  }

  .hero-shade {
    background:
      linear-gradient(180deg, rgba(255, 246, 249, 0.94), rgba(255, 246, 249, 0.72) 48%, rgba(255, 246, 249, 0.18)),
      linear-gradient(90deg, rgba(255, 246, 249, 0.86), rgba(255, 246, 249, 0.22));
  }

  .hero-image {
    object-position: 68% center;
  }

  .hero-content {
    align-self: start;
    width: min(620px, calc(100% - 36px));
    margin: 0 auto;
    padding-top: clamp(44px, 10vh, 88px);
  }

  .hero h1 {
    max-width: 9ch;
  }

  .intro-panel,
  .profile-section,
  .integration-note,
  .game-section {
    grid-template-columns: 1fr;
  }

  .section-heading.compact {
    max-width: 720px;
  }

  .creation-grid {
    grid-template-columns: 1fr;
  }

  .creation-card {
    grid-template-columns: minmax(200px, 0.46fr) 1fr;
    grid-template-rows: auto;
  }

  .creation-card.has-video {
    grid-template-columns: minmax(260px, 0.52fr) 1fr;
    grid-template-rows: auto;
  }

  .card-visual {
    min-height: 100%;
    border-right: 1px solid rgba(159, 62, 104, 0.12);
    border-bottom: 0;
  }

  .profile-intro {
    position: static;
  }

  .game-copy {
    position: static;
  }

  .profile-columns {
    grid-column: auto;
  }
}

@media (max-width: 680px) {
  .site-header {
    min-height: 66px;
    gap: 12px;
    padding: 10px 14px;
  }

  .brand {
    font-size: 1rem;
  }

  .brand-mark {
    width: 31px;
    height: 31px;
  }

  .language-switch {
    justify-self: end;
  }

  .nav-links {
    gap: 20px;
    font-size: 0.9rem;
  }

  .lang-button {
    min-width: 42px;
    padding: 5px 9px;
  }

  .hero {
    min-height: 76svh;
  }

  .hero-content {
    padding-top: 34px;
  }

  .hero h1 {
    max-width: 100%;
    font-size: clamp(2.35rem, 11vw, 3.45rem);
    line-height: 1.04;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .hero-lead {
    font-size: 1rem;
  }

  .primary-link,
  .ghost-link {
    width: 100%;
  }

  .intro-panel,
  .section {
    width: min(100% - 28px, 1160px);
  }

  .filter-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    border-radius: 8px;
  }

  .filter-button {
    min-width: 0;
    border-radius: 7px;
  }

  .creation-card {
    grid-template-columns: 1fr;
    grid-template-rows: 170px auto;
  }

  .creation-card.has-video {
    grid-template-columns: 1fr;
    grid-template-rows: 210px auto;
  }

  .card-visual {
    border-right: 0;
    border-bottom: 1px solid rgba(159, 62, 104, 0.12);
  }

  .profile-grid,
  .profile-columns {
    grid-template-columns: 1fr;
  }

  .profile-card {
    min-height: 116px;
  }

  .dandan-pet {
    width: 154px;
    right: 10px;
    bottom: 13px;
  }

  .dandan-body,
  .dandan-body img {
    width: 126px;
    height: 118px;
  }

  .dandan-actions {
    gap: 3px;
  }

  .dandan-treat-count {
    min-height: 28px;
    padding: 0 7px;
    font-size: 0.66rem;
  }

  .dandan-actions button {
    min-height: 28px;
    padding: 0 7px;
    font-size: 0.66rem;
  }

  .dandan-bubble {
    padding: 11px 13px;
  }

  .dandan-panel {
    width: min(334px, calc(100vw - 20px));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
