:root {
  --paper: #eef5ef;
  --paper-deep: #d9e6de;
  --ink: #3f4544;
  --muted: #7b8580;
  --line: #606765;
  --soft: #f8fbf8;
  --accent: #d74735;
  --mint: #a9c8bb;
  --green: #6b8d77;
  --gold: #b8935a;
  --mood-a: #f8fbf8;
  --mood-b: #eef5ef;
  --mood-c: #d8e8e1;
  --phone-surface: rgba(250, 253, 251, 0.9);
  --phone-panel: rgba(255, 255, 255, 0.58);
  --shadow: 0 22px 60px rgba(53, 70, 62, 0.2);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Trebuchet MS", "Comic Sans MS", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 14% 20%, rgba(255, 255, 255, 0.7), transparent 28%),
    radial-gradient(circle at 82% 12%, rgba(199, 222, 213, 0.9), transparent 34%),
    linear-gradient(145deg, var(--mood-a) 0%, var(--mood-b) 45%, var(--mood-c) 100%);
  transition: background 0.35s ease;
}

body::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.55;
  background-image:
    linear-gradient(rgba(63, 69, 68, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(63, 69, 68, 0.025) 1px, transparent 1px);
  background-size: 19px 21px;
  mask-image: radial-gradient(circle at center, black, transparent 80%);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0;
}

.storyboard {
  display: grid;
  grid-template-columns: 1fr 56px 1fr 56px 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
}

.sketch-card {
  min-height: 86px;
  text-align: center;
}

.sketch-card p {
  margin: 8px 0 0;
  color: #333938;
  font-size: 14px;
  line-height: 1.15;
  letter-spacing: 0;
}

.sketch-frame {
  position: relative;
  height: 48px;
  border: 3px solid var(--line);
  background: rgba(255, 255, 255, 0.46);
  box-shadow: 2px 3px 0 rgba(63, 69, 68, 0.24);
}

.sketch-frame::before,
.phone::before,
.phone::after {
  position: absolute;
  content: "";
  border: 2px solid rgba(63, 69, 68, 0.45);
  pointer-events: none;
}

.sketch-frame::before {
  inset: 3px -4px -3px 3px;
}

.arrow {
  width: 100%;
  height: 2px;
  background: rgba(96, 103, 101, 0.35);
}

.arrow::after {
  display: block;
  width: 16px;
  height: 16px;
  margin-left: auto;
  margin-top: -7px;
  border-top: 2px solid rgba(96, 103, 101, 0.45);
  border-right: 2px solid rgba(96, 103, 101, 0.45);
  content: "";
  transform: rotate(45deg);
}

.upload-icon span {
  position: absolute;
  left: 25%;
  right: 25%;
  bottom: 10px;
  height: 16px;
  background:
    linear-gradient(135deg, transparent 50%, var(--mint) 51%) 0 0 / 50% 100% no-repeat,
    linear-gradient(225deg, transparent 50%, #7f958a 51%) 100% 0 / 58% 100% no-repeat;
  border-bottom: 2px solid var(--line);
}

.upload-icon span::before {
  position: absolute;
  top: -18px;
  left: 36%;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 12px solid var(--green);
  content: "";
}

.device-icon span {
  position: absolute;
  inset: 11px 25%;
  border: 3px solid var(--line);
  border-radius: 48% 54% 43% 58%;
  background: linear-gradient(145deg, white, #cbd9d2);
  transform: rotate(-13deg);
}

.reaction-icon span {
  position: absolute;
  inset: 10px 25%;
  border: 3px solid var(--line);
  border-radius: 55% 44% 46% 58%;
  background: linear-gradient(150deg, #f4f6f3, #c9ddd4);
  transform: rotate(-14deg);
}

.reaction-icon span::before {
  position: absolute;
  top: 7px;
  left: 28%;
  width: 14px;
  height: 16px;
  background: var(--green);
  content: "";
  box-shadow: 0 24px 0 -6px var(--line);
}

.phone-stage {
  display: grid;
  grid-template-columns: minmax(300px, 440px) minmax(300px, 1fr);
  gap: 54px;
  align-items: center;
}

.phone-stage-single {
  grid-template-columns: minmax(300px, 440px) minmax(180px, 260px);
  justify-content: center;
  align-items: start;
}

.phone {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(100%, 414px);
  height: 780px;
  margin: 0 auto;
  padding: 30px 26px 18px;
  border: 5px solid #424746;
  border-radius: 42px;
  background: var(--phone-surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.phone::selection {
  background: rgba(215, 71, 53, 0.18);
}

.phone::before {
  top: 9px;
  left: 50%;
  width: 104px;
  height: 25px;
  border-radius: 0 0 18px 18px;
  background: var(--phone-panel);
  transform: translateX(-50%);
}

.phone::after {
  inset: 9px 7px 9px 9px;
  border-radius: 35px;
}

.phone-top,
.bottom-actions,
.upload-screen,
.space-screen {
  position: relative;
  z-index: 1;
}

.upload-screen,
.space-screen {
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
}

.phone-top {
  display: grid;
  grid-template-columns: 38px 1fr 38px;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  margin-bottom: 12px;
}

.icon-button {
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
}

.icon-button::before {
  display: block;
  width: 15px;
  height: 15px;
  margin: 9px 0 0 10px;
  border-left: 5px solid #78807d;
  border-bottom: 5px solid #78807d;
  content: "";
  transform: rotate(45deg);
}

.title-input {
  width: 100%;
  border: 0;
  background: transparent;
  color: #7a8280;
  font-size: 30px;
  text-align: center;
  letter-spacing: 0;
  outline: 0;
}

.status-dots {
  width: 34px;
  height: 8px;
  border-radius: 999px;
  background: repeating-linear-gradient(90deg, #7d8582 0 6px, transparent 6px 12px);
}

.preview-grid {
  display: grid;
  grid-template-columns: 1fr 150px;
  gap: 18px;
  align-items: center;
}

.wave-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 172px;
}

.wave-panel span {
  display: block;
  width: 4px;
  border-radius: 999px;
  background: #7d8783;
  animation: wave 1.2s ease-in-out infinite;
}

.wave-panel span:nth-child(1) { height: 28px; animation-delay: 0s; }
.wave-panel span:nth-child(2) { height: 58px; animation-delay: 0.08s; }
.wave-panel span:nth-child(3) { height: 82px; animation-delay: 0.16s; }
.wave-panel span:nth-child(4) { height: 118px; animation-delay: 0.24s; }
.wave-panel span:nth-child(5) { height: 74px; animation-delay: 0.32s; }
.wave-panel span:nth-child(6) { height: 40px; animation-delay: 0.4s; }

.drop-zone {
  display: grid;
  align-content: center;
  min-height: 160px;
  padding: 16px;
  border: 3px solid #666e6b;
  background:
    linear-gradient(45deg, rgba(191, 198, 190, 0.22) 25%, transparent 25% 50%, rgba(191, 198, 190, 0.22) 50% 75%, transparent 75%) 0 0 / 18px 18px,
    var(--phone-panel);
  text-align: center;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.drop-zone:hover,
.drop-zone.is-dragging {
  background-color: rgba(169, 200, 187, 0.35);
  transform: translateY(-2px);
}

.drop-zone input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.drop-zone strong {
  margin-top: 9px;
  font-size: 16px;
  line-height: 1.35;
}

.drop-zone small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.drop-art {
  display: block;
  width: 58px;
  height: 42px;
  margin: 0 auto;
  border: 3px solid #69716f;
  border-radius: 8px 8px 18px 18px;
  background: rgba(255, 255, 255, 0.78);
}

.drop-art::before {
  display: block;
  width: 26px;
  height: 22px;
  margin: -13px auto 0;
  border: 3px solid #69716f;
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  content: "";
}

.control-block {
  margin-top: 26px;
}

.control-label,
.space-title,
.analysis-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.control-label {
  margin-bottom: 8px;
  color: #626b68;
  font-size: 20px;
  line-height: 1.15;
}

.control-label small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.range-caption {
  margin: 10px 0 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

input[type="range"] {
  width: 100%;
  height: 34px;
  accent-color: #74827c;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  border: 1px solid rgba(96, 103, 101, 0.3);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 230, 150, 0.78), rgba(169, 200, 187, 0.82), rgba(201, 221, 244, 0.82));
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 38px;
  height: 32px;
  margin-top: -11px;
  border: 3px solid #39413f;
  border-radius: 48% 48% 38% 38%;
  background:
    radial-gradient(circle at 12px 18px, #222 0 2px, transparent 3px),
    radial-gradient(circle at 25px 18px, #222 0 2px, transparent 3px),
    radial-gradient(circle at 18px 24px, #e9a2a0 0 2px, transparent 3px),
    linear-gradient(90deg, transparent 0 9px, rgba(232, 141, 66, 0.8) 9px 14px, transparent 14px 23px, rgba(232, 141, 66, 0.75) 23px 28px, transparent 28px),
    #fff3dd;
  box-shadow:
    -10px -8px 0 -5px #39413f,
    10px -8px 0 -5px #39413f,
    2px 3px 0 rgba(63, 69, 68, 0.16);
}

input[type="range"]::-moz-range-track {
  height: 8px;
  border: 1px solid rgba(96, 103, 101, 0.3);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 230, 150, 0.78), rgba(169, 200, 187, 0.82), rgba(201, 221, 244, 0.82));
}

input[type="range"]::-moz-range-thumb {
  width: 38px;
  height: 32px;
  border: 3px solid #39413f;
  border-radius: 48% 48% 38% 38%;
  background:
    radial-gradient(circle at 10px 16px, #222 0 2px, transparent 3px),
    radial-gradient(circle at 20px 16px, #222 0 2px, transparent 3px),
    radial-gradient(circle at 15px 22px, #e9a2a0 0 2px, transparent 3px),
    #fff3dd;
}

input[type="range"].mood-cat-slider::-webkit-slider-thumb {
  width: 46px;
  height: 46px;
  margin-top: -19px;
  border-radius: 50%;
  background: #fff9e8 url("assets/cat-avatars/yellow-white.png") center / cover no-repeat;
  box-shadow:
    0 0 0 4px rgba(255, 245, 210, 0.95),
    2px 4px 0 rgba(63, 69, 68, 0.16);
}

input[type="range"].magic-cat-slider::-webkit-slider-thumb {
  width: 46px;
  height: 46px;
  margin-top: -19px;
  border-radius: 50%;
  background: #eef3f2 url("assets/cat-avatars/silver-gray.png") center / cover no-repeat;
  box-shadow:
    0 0 0 4px rgba(232, 242, 250, 0.95),
    2px 4px 0 rgba(63, 69, 68, 0.16);
}

input[type="range"].miss-cat-slider::-webkit-slider-thumb {
  width: 46px;
  height: 46px;
  margin-top: -19px;
  border-radius: 50%;
  background: #fff7e8 url("assets/cat-avatars/black-white.png") center / cover no-repeat;
  box-shadow:
    0 0 0 4px rgba(241, 231, 255, 0.95),
    2px 4px 0 rgba(63, 69, 68, 0.16);
}

input[type="range"].volume-cat-slider::-webkit-slider-thumb {
  width: 54px;
  height: 30px;
  border-radius: 999px 48% 48% 999px;
  background:
    radial-gradient(circle at 34px 16px, #222 0 2px, transparent 3px),
    radial-gradient(circle at 44px 16px, #222 0 2px, transparent 3px),
    radial-gradient(circle at 39px 22px, #e99a9d 0 2px, transparent 3px),
    radial-gradient(circle at 13px 15px, transparent 0 7px, #e8a060 8px 12px, transparent 13px),
    radial-gradient(circle at 39px 7px, #e8a060 0 7px, transparent 8px),
    linear-gradient(90deg, #e8a060 0 9px, transparent 10px 20px, #f2b66e 20px 24px, transparent 24px),
    #fff4df;
  box-shadow:
    13px -9px 0 -5px #e8a060,
    2px 3px 0 rgba(63, 69, 68, 0.16);
}

input[type="range"].mood-cat-slider::-moz-range-thumb {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #fff9e8 url("assets/cat-avatars/yellow-white.png") center / cover no-repeat;
}

input[type="range"].magic-cat-slider::-moz-range-thumb {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #eef3f2 url("assets/cat-avatars/silver-gray.png") center / cover no-repeat;
}

input[type="range"].miss-cat-slider::-moz-range-thumb {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #fff7e8 url("assets/cat-avatars/black-white.png") center / cover no-repeat;
}

input[type="range"].volume-cat-slider::-moz-range-thumb {
  width: 46px;
  height: 28px;
  border-radius: 999px 48% 48% 999px;
  background: #fff4df;
}

.switch input {
  position: absolute;
  opacity: 0;
}

.switch span {
  display: block;
  width: 62px;
  height: 32px;
  padding: 4px;
  border: 3px solid #69716f;
  border-radius: 999px;
  background: #f6f8f6;
}

.switch span::before {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #69716f;
  content: "";
  transition: transform 0.2s ease;
}

.switch input:checked + span::before {
  transform: translateX(28px);
}

.space-screen.is-hidden {
  display: none;
}

.is-hidden {
  display: none;
}

.space-title {
  margin-bottom: 10px;
  color: #87908d;
  font-size: 34px;
}

.mini-button {
  border: 2px solid #77817d;
  border-radius: 999px;
  padding: 6px 12px;
  color: #59625f;
  background: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.media-window {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 270px);
  aspect-ratio: 3 / 4;
  margin: 0 auto;
  border: 4px solid #636b68;
  background:
    linear-gradient(45deg, rgba(164, 152, 134, 0.18) 25%, transparent 25% 50%, rgba(164, 152, 134, 0.18) 50% 75%, transparent 75%) 0 0 / 16px 16px,
    #f3f2ec;
  overflow: hidden;
}

.speech-bubble {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  padding: 10px 12px;
  border: 3px solid rgba(63, 69, 68, 0.48);
  border-radius: 8px;
  background: rgba(255, 249, 225, 0.94);
  color: #3f4544;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
  box-shadow: 3px 4px 0 rgba(63, 69, 68, 0.13);
  transform-origin: bottom center;
  animation: pop 0.28s ease;
}

.speech-bubble::after {
  position: absolute;
  right: 28px;
  bottom: -14px;
  width: 18px;
  height: 18px;
  border-right: 3px solid rgba(63, 69, 68, 0.48);
  border-bottom: 3px solid rgba(63, 69, 68, 0.48);
  background: rgba(255, 249, 225, 0.94);
  content: "";
  transform: rotate(45deg);
}

.petting-hand {
  position: absolute;
  top: -90px;
  left: 50%;
  width: 86px;
  height: 108px;
  border: 4px solid #5d6562;
  border-radius: 42px 42px 30px 30px;
  background: #ffd8b8;
  opacity: 0;
  transform: translateX(-50%) rotate(12deg);
  z-index: 3;
}

.petting-hand::before,
.petting-hand::after {
  position: absolute;
  content: "";
  background: #ffd8b8;
  border: 3px solid #5d6562;
}

.petting-hand::before {
  left: -22px;
  top: 54px;
  width: 40px;
  height: 25px;
  border-radius: 16px;
  transform: rotate(-20deg);
}

.petting-hand::after {
  left: 15px;
  bottom: -36px;
  width: 50px;
  height: 40px;
  border-top: 0;
  border-radius: 0 0 18px 18px;
}

.media-window.is-petting .petting-hand {
  animation: pet 1.3s ease-in-out;
}

.media-window.is-long-petting .petting-hand {
  animation: pet 3.2s ease-in-out;
}

.media-window img,
.media-window video {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-window.has-image img,
.media-window.has-video video {
  display: block;
}

.empty-preview {
  color: var(--accent);
  font-size: 128px;
  font-weight: 800;
  line-height: 1;
}

.media-window.has-image .empty-preview,
.media-window.has-video .empty-preview {
  display: none;
}

.media-window.is-reacting {
  animation: react 0.42s ease-in-out 2;
}

.analysis-strip {
  margin-top: 14px;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(96, 103, 101, 0.22);
}

.analysis-strip div {
  flex: 1;
}

.analysis-strip small {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.analysis-strip strong {
  display: block;
  margin-top: 3px;
  font-size: 18px;
  font-weight: 700;
}

.bottom-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 2px solid rgba(96, 103, 101, 0.14);
  background: var(--phone-surface);
}

.nav-button {
  display: grid;
  place-items: center;
  min-height: 70px;
  border: 0;
  background: transparent;
  color: #65706c;
  font-size: 12px;
  line-height: 1.2;
}

.sound-mark,
.motion-mark,
.touch-mark {
  position: relative;
  display: block;
  width: 40px;
  height: 34px;
}

.sound-mark::before {
  position: absolute;
  left: 5px;
  top: 9px;
  width: 11px;
  height: 16px;
  border-left: 4px solid #65706c;
  border-top: 4px solid #65706c;
  border-bottom: 4px solid #65706c;
  content: "";
}

.sound-mark::after {
  position: absolute;
  right: 5px;
  top: 6px;
  width: 17px;
  height: 22px;
  border-right: 4px solid #65706c;
  border-radius: 50%;
  content: "";
}

.motion-mark::before,
.motion-mark::after {
  position: absolute;
  top: 9px;
  width: 13px;
  height: 13px;
  border-right: 4px solid #65706c;
  border-bottom: 4px solid #65706c;
  content: "";
  transform: rotate(-45deg);
}

.motion-mark::before {
  left: 5px;
}

.motion-mark::after {
  left: 18px;
  opacity: 0.65;
}

.touch-mark::before {
  position: absolute;
  left: 12px;
  top: 4px;
  width: 18px;
  height: 25px;
  border: 4px solid #65706c;
  border-radius: 16px 16px 11px 11px;
  content: "";
}

.touch-mark::after {
  position: absolute;
  left: 5px;
  top: 15px;
  width: 15px;
  height: 13px;
  border-left: 4px solid #65706c;
  border-bottom: 4px solid #65706c;
  border-radius: 0 0 0 11px;
  content: "";
}

.nav-button.is-active {
  color: var(--accent);
}

.nav-button.is-active .sound-mark::before,
.nav-button.is-active .sound-mark::after,
.nav-button.is-active .motion-mark::before,
.nav-button.is-active .motion-mark::after,
.nav-button.is-active .touch-mark::before,
.nav-button.is-active .touch-mark::after {
  border-color: var(--accent);
}

.details-panel {
  max-width: 530px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 18px;
  font-weight: 800;
  text-transform: uppercase;
}

.details-panel h1 {
  margin: 0;
  color: #303635;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.03;
  letter-spacing: 0;
}

.details-panel p:not(.eyebrow) {
  margin: 20px 0 0;
  color: #5f6b66;
  font-size: 18px;
  line-height: 1.75;
}

.steps-list {
  display: grid;
  gap: 10px;
  margin-top: 28px;
}

.steps-list span {
  width: fit-content;
  padding: 10px 14px;
  border: 2px solid rgba(96, 103, 101, 0.38);
  background: rgba(255, 255, 255, 0.48);
  color: #4d5653;
}

.cat-friends {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 18px;
}

.cat-friends-stage {
  position: sticky;
  top: 24px;
  display: grid;
  grid-template-columns: repeat(2, 58px);
  align-content: start;
  width: 150px;
  margin-top: 90px;
  padding: 18px;
  border: 3px solid rgba(96, 103, 101, 0.36);
  background: rgba(255, 255, 255, 0.42);
  box-shadow: 4px 5px 0 rgba(63, 69, 68, 0.12);
}

.cat-avatar {
  position: relative;
  display: block;
  width: 48px;
  height: 42px;
  border: 3px solid #39413f;
  border-radius: 48% 48% 38% 38%;
  background: #fff7e7;
  box-shadow: 2px 3px 0 rgba(63, 69, 68, 0.13);
  animation: bob 2.6s ease-in-out infinite;
}

.cat-avatar::before,
.cat-avatar::after {
  position: absolute;
  top: -13px;
  width: 18px;
  height: 18px;
  border-top: 3px solid #39413f;
  border-left: 3px solid #39413f;
  background: inherit;
  content: "";
}

.cat-avatar::before {
  left: 4px;
  transform: rotate(35deg);
}

.cat-avatar::after {
  right: 4px;
  transform: rotate(55deg);
}

.cat-orange {
  background:
    radial-gradient(circle at 17px 24px, #333 0 3px, transparent 4px),
    radial-gradient(circle at 31px 24px, #333 0 3px, transparent 4px),
    linear-gradient(90deg, transparent 0 12px, rgba(232, 141, 66, 0.9) 12px 17px, transparent 17px 25px, rgba(232, 141, 66, 0.8) 25px 30px, transparent 30px),
    #fff3dd;
}

.cat-gray {
  background:
    radial-gradient(circle at 17px 24px, #333 0 3px, transparent 4px),
    radial-gradient(circle at 31px 24px, #333 0 3px, transparent 4px),
    linear-gradient(135deg, #c8d1d0 0 48%, #f7f4ec 49%),
    #d6dfdd;
  animation-delay: 0.25s;
}

.cat-tux {
  background:
    radial-gradient(circle at 17px 24px, #333 0 3px, transparent 4px),
    radial-gradient(circle at 31px 24px, #333 0 3px, transparent 4px),
    linear-gradient(90deg, #303838 0 30%, #fff7e8 31% 69%, #303838 70%),
    #fff7e8;
  animation-delay: 0.5s;
}

.cat-calico {
  background:
    radial-gradient(circle at 17px 24px, #333 0 3px, transparent 4px),
    radial-gradient(circle at 31px 24px, #333 0 3px, transparent 4px),
    radial-gradient(circle at 15px 12px, #e9a460 0 10px, transparent 11px),
    radial-gradient(circle at 34px 15px, #777f7b 0 10px, transparent 11px),
    #fff5df;
  animation-delay: 0.75s;
}

.cat-avatar:hover {
  transform: translateY(-4px) rotate(-2deg);
}

.healing-panel {
  display: grid;
  gap: 12px;
  padding-bottom: 12px;
}

.compact-control {
  margin-top: 14px;
  padding: 10px;
  border: 2px solid rgba(96, 103, 101, 0.22);
  background: var(--phone-panel);
}

.feature-card {
  padding: 12px;
  border: 2px solid rgba(96, 103, 101, 0.28);
  background: var(--phone-panel);
  box-shadow: 2px 3px 0 rgba(63, 69, 68, 0.08);
}

.feature-card h2 {
  margin: 0 0 8px;
  color: #46504c;
  font-size: 18px;
  line-height: 1.18;
}

.feature-card h2 small {
  color: var(--muted);
  font-size: 12px;
}

.feature-card p {
  margin: 8px 0 0;
  color: #58625e;
  font-size: 13px;
  line-height: 1.45;
}

.feature-card textarea {
  width: 100%;
  min-height: 58px;
  resize: vertical;
  border: 2px solid rgba(96, 103, 101, 0.32);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  padding: 9px;
  outline: 0;
}

.feature-button,
.sound-pad button,
.dream-room button {
  border: 2px solid rgba(96, 103, 101, 0.4);
  background: rgba(255, 246, 216, 0.78);
  color: #46504c;
  font-weight: 800;
  box-shadow: 2px 3px 0 rgba(63, 69, 68, 0.12);
}

.feature-button {
  width: 100%;
  margin-top: 8px;
  padding: 9px 10px;
}

.sound-pad,
.dream-room {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.sound-pad button,
.dream-room button {
  min-height: 58px;
  padding: 8px 6px;
  font-size: 12px;
  line-height: 1.25;
  touch-action: manipulation;
  border-radius: 8px;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.78), transparent 18%),
    rgba(255, 246, 216, 0.84);
}

.sound-pad button::first-line {
  font-size: 14px;
}

.sound-pad button.is-playing {
  background: rgba(255, 218, 137, 0.95);
  transform: translateY(2px);
  box-shadow: 1px 1px 0 rgba(63, 69, 68, 0.16);
}

.timeline-list {
  display: grid;
  gap: 7px;
  padding: 0;
  margin: 8px 0 0;
  list-style: none;
}

.timeline-list li {
  padding: 8px 9px;
  border-left: 4px solid var(--accent);
  background: rgba(255, 255, 255, 0.62);
  color: #59635f;
  font-size: 12px;
  line-height: 1.35;
}

.blessing-card {
  background:
    radial-gradient(circle at 85% 20%, rgba(255, 214, 107, 0.45), transparent 25%),
    var(--phone-panel);
}

.companion-room {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.7), transparent 28%),
    linear-gradient(145deg, rgba(216, 232, 225, 0.94), rgba(125, 135, 154, 0.82));
}

.companion-room.is-hidden {
  display: none;
}

.companion-card {
  position: relative;
  width: min(92vw, 420px);
  min-height: 520px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  padding: 28px;
  border: 4px solid rgba(63, 69, 68, 0.5);
  background: rgba(255, 255, 255, 0.66);
  text-align: center;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.companion-card .mini-button {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
}

.companion-card h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
}

.companion-card p {
  max-width: 280px;
  margin: 0;
  font-size: 18px;
  line-height: 1.7;
}

.companion-cat {
  width: 84px;
  height: 72px;
}

.soft-ripples span {
  position: absolute;
  left: 50%;
  top: 58%;
  width: 120px;
  height: 120px;
  border: 2px solid rgba(107, 141, 119, 0.35);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: ripple 3s ease-out infinite;
}

.soft-ripples span:nth-child(2) {
  animation-delay: 0.8s;
}

.soft-ripples span:nth-child(3) {
  animation-delay: 1.6s;
}

@keyframes wave {
  50% {
    transform: scaleY(0.45);
  }
}

@keyframes react {
  0%, 100% {
    transform: rotate(0) scale(1);
  }
  35% {
    transform: rotate(-2deg) scale(1.025);
  }
  70% {
    transform: rotate(2deg) scale(0.985);
  }
}

@keyframes pet {
  0% {
    opacity: 0;
    top: -90px;
    transform: translateX(-50%) rotate(12deg);
  }
  22%, 72% {
    opacity: 1;
    top: 24%;
  }
  40% {
    transform: translateX(-58%) rotate(-8deg);
  }
  58% {
    transform: translateX(-42%) rotate(11deg);
  }
  100% {
    opacity: 0;
    top: -90px;
    transform: translateX(-50%) rotate(12deg);
  }
}

@keyframes pop {
  0% {
    transform: scale(0.82);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes bob {
  50% {
    transform: translateY(-5px);
  }
}

@keyframes ripple {
  0% {
    opacity: 0.8;
    transform: translate(-50%, -50%) scale(0.5);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(2.6);
  }
}

@media (max-width: 900px) {
  .storyboard {
    grid-template-columns: 1fr 28px 1fr 28px 1fr;
    gap: 6px;
  }

  .arrow {
    width: 100%;
    height: 2px;
    margin: 0;
  }

  .arrow::after {
    margin-top: -7px;
    margin-left: auto;
    transform: rotate(45deg);
  }

  .phone-stage {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .cat-friends-stage {
    position: static;
    display: flex;
    width: auto;
    margin: -10px auto 0;
  }

  .details-panel {
    order: -1;
    max-width: none;
  }
}

@media (max-width: 520px) {
  .app-shell {
    width: min(100% - 18px, 1180px);
    padding: 18px 0;
  }

  .sketch-card {
    min-height: 74px;
  }

  .sketch-frame {
    height: 42px;
  }

  .sketch-card p {
    font-size: 11px;
  }

  .phone {
    height: 720px;
    padding: 27px 18px 14px;
    border-radius: 34px;
  }

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

  .wave-panel {
    min-height: 82px;
  }

  .drop-zone {
    min-height: 140px;
  }

  .title-input {
    font-size: 25px;
  }

  .details-panel h1 {
    font-size: 36px;
  }
}
