* {
  box-sizing: border-box;
}

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

body {
  background: #f2f2f5;
  color: #1a1a1a;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  --keyboard-inset: 0px;
}

body[data-scene="pet"],
body[data-scene="hatch"],
body[data-scene="reveal"] {
  min-height: 100dvh;
  min-height: calc(var(--vh, 1vh) * 100);
  overflow: hidden;
  background: #050505;
}

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

.douyin-shell {
  position: relative;
  width: min(100vw, 430px);
  height: 100dvh;
  height: calc(var(--vh, 1vh) * 100);
  min-height: 520px;
  margin: 0 auto;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(7, 20, 27, 0.3), rgba(6, 10, 11, 0.64)),
    #0d181a;
  color: #ffffff;
}

.douyin-shell::before {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 34%, rgba(138, 212, 255, 0.16), transparent 32%),
    linear-gradient(180deg, rgba(96, 178, 230, 0.34), rgba(43, 111, 82, 0.28) 48%, rgba(0, 0, 0, 0.44));
  content: "";
}

.douyin-top {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 20;
  padding: 18px 18px 0;
  pointer-events: none;
}

.douyin-status,
.douyin-channel,
.douyin-channel nav,
.douyin-status-icons {
  display: flex;
  align-items: center;
}

.douyin-status {
  justify-content: space-between;
  font-size: 18px;
  font-weight: 850;
  letter-spacing: 0.01em;
}

.douyin-status-icons {
  gap: 7px;
}

.douyin-status-icons i {
  display: block;
  border: 2px solid currentColor;
}

.douyin-status-icons i:nth-child(1) {
  width: 22px;
  height: 15px;
  border-width: 0 0 3px;
  box-shadow:
    6px -4px 0 -3px currentColor,
    12px -8px 0 -3px currentColor,
    18px -12px 0 -3px currentColor;
}

.douyin-status-icons i:nth-child(2) {
  width: 21px;
  height: 15px;
  border-width: 4px 4px 0 0;
  border-radius: 50% 50% 0 0;
  transform: rotate(-45deg);
}

.douyin-status-icons i:nth-child(3) {
  width: 28px;
  height: 15px;
  border-radius: 4px;
  box-shadow: inset -4px 0 0 rgba(255, 255, 255, 0.75);
}

.douyin-channel {
  justify-content: space-between;
  gap: 14px;
  margin-top: 0;
}

.douyin-channel nav {
  min-width: 0;
  flex: 1;
  justify-content: space-between;
  gap: 12px;
  color: rgba(255, 255, 255, 0.54);
  font-size: 16px;
  font-weight: 850;
  white-space: nowrap;
}

.douyin-channel strong {
  position: relative;
  color: #ffffff;
  font-weight: 900;
}

.douyin-channel strong::after {
  position: absolute;
  right: 5px;
  bottom: -10px;
  left: 5px;
  height: 3px;
  border-radius: 99px;
  background: #ffffff;
  content: "";
}

.douyin-menu,
.douyin-search {
  position: relative;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
}

.douyin-menu::before,
.douyin-menu::after,
.douyin-menu {
  border-top: 4px solid #ffffff;
}

.douyin-menu::before,
.douyin-menu::after {
  position: absolute;
  right: 0;
  left: 0;
  content: "";
}

.douyin-menu::before {
  top: 8px;
}

.douyin-menu::after {
  top: 20px;
}

.douyin-search {
  border: 4px solid #ffffff;
  border-radius: 50%;
}

.douyin-search::after {
  position: absolute;
  right: -10px;
  bottom: -7px;
  width: 15px;
  height: 4px;
  border-radius: 99px;
  background: #ffffff;
  content: "";
  transform: rotate(45deg);
}

.douyin-card-stage {
  position: absolute;
  top: 76px;
  right: 12px;
  bottom: 78px;
  left: 12px;
  z-index: 5;
  display: grid;
}

.douyin-feature-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 22px 80px rgba(0, 0, 0, 0.22);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

@supports not (backdrop-filter: blur(10px)) {
  .douyin-feature-card {
    background: rgba(13, 24, 26, 0.88);
  }
}

.douyin-feature-card .world-page,
.douyin-feature-card .world-hero,
.douyin-feature-card .hatch-hero {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.douyin-feature-card .world-hero,
.douyin-feature-card .hatch-hero {
  border-radius: inherit;
}

.douyin-feature-card .world-video-bg,
.douyin-feature-card .world-canvas,
.douyin-feature-card .hatch-canvas {
  object-fit: cover;
}

.douyin-feature-card .world-nav {
  padding: 14px 16px 0;
}

.douyin-feature-card .world-copy {
  width: min(330px, 72%);
  padding: clamp(64px, 8vh, 88px) 0 0 16px;
}

.douyin-feature-card .title-logo {
  width: clamp(190px, 48vw, 280px);
}

.douyin-bottom {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  height: 74px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #000000;
  color: rgba(255, 255, 255, 0.48);
  font-size: 16px;
  font-weight: 850;
  text-align: center;
  pointer-events: none;
}

.douyin-bottom .is-active {
  color: #ffffff;
}

.douyin-bottom strong {
  display: grid;
  width: 44px;
  height: 32px;
  place-items: center;
  justify-self: center;
  border: 4px solid #ffffff;
  border-radius: 12px;
  color: #ffffff;
  font-size: 27px;
  line-height: 1;
}

/* Silky page-to-page transitions: fade in on load, fade out before leaving. */
body {
  animation: page-enter 560ms ease backwards;
}

body.page-leaving {
  opacity: 0;
  transition: opacity 440ms ease;
}

/* Hatch -> reveal is a hard cut, so the reveal page does not fade in. */
body[data-scene="reveal"] {
  animation: none;
}

@keyframes page-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  body {
    animation: none;
  }
  body.page-leaving {
    transition: none;
  }
}

.phone-frame {
  position: relative;
  width: 100%;
  max-width: 430px;
  min-height: 100dvh;
  min-height: calc(var(--vh, 1vh) * 100);
  margin: 0 auto;
  overflow-x: hidden;
  background: #ffffff;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.web-frame {
  width: 100%;
  min-height: 100dvh;
  min-height: calc(var(--vh, 1vh) * 100);
  overflow: hidden;
  background: #101512;
}

.hatch-page,
.jiro-landing {
  min-height: 100dvh;
  min-height: calc(var(--vh, 1vh) * 100);
  background: #fffdf8;
}

.hero {
  position: relative;
  min-height: 100dvh;
  min-height: calc(var(--vh, 1vh) * 100);
  overflow: hidden;
  color: #1a1a1a;
}

.pet-hero {
  min-height: 86dvh;
  min-height: calc(var(--vh, 1vh) * 86);
  background: #f2efe8;
}

.world-video-bg,
.world-video-tint {
  position: absolute;
  inset: 0;
}

.world-video-bg {
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  filter: saturate(1.05) contrast(1.03);
}

.world-video-tint {
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 253, 248, 0.78) 0%, rgba(255, 253, 248, 0.34) 52%, rgba(255, 253, 248, 0.16) 100%),
    linear-gradient(180deg, rgba(255, 253, 248, 0.52) 0%, rgba(255, 253, 248, 0.08) 46%, rgba(232, 241, 237, 0.34) 100%);
}

.world-video-tint.is-soft {
  background:
    linear-gradient(90deg, rgba(12, 18, 14, 0.62) 0%, rgba(12, 18, 14, 0.12) 40%, rgba(12, 18, 14, 0) 62%),
    linear-gradient(180deg, rgba(12, 18, 14, 0.34) 0%, rgba(12, 18, 14, 0) 38%, rgba(12, 18, 14, 0.46) 100%);
}

.stage-canvas {
  position: absolute;
  top: 66px;
  right: 0;
  left: 0;
  width: 100%;
  height: min(520px, 70dvh);
  object-fit: contain;
  touch-action: manipulation;
}

body[data-scene="pet"] .stage-canvas {
  inset: 0;
  z-index: 2;
  height: 100%;
  object-fit: cover;
  touch-action: manipulation;
}

.hatch-hero {
  position: relative;
  width: 100%;
  min-height: 100dvh;
  min-height: calc(var(--vh, 1vh) * 100);
  overflow: hidden;
  background:
    radial-gradient(circle at 60% 44%, rgba(255, 233, 168, 0.55), transparent 48%),
    linear-gradient(180deg, #fffdf8 0%, #f8f4e8 56%, #eef4ec 100%);
}

.hatch-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  touch-action: manipulation;
}

.world-page,
.world-hero {
  min-height: 100dvh;
  min-height: calc(var(--vh, 1vh) * 100);
}

.world-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 253, 248, 0.08), transparent 62%),
    #101512;
  color: #ffffff;
}

.world-canvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  touch-action: manipulation;
}

.world-nav {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 44px 0;
  color: #18201b;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.world-nav div {
  display: flex;
  gap: 22px;
}

.world-copy {
  position: relative;
  z-index: 4;
  width: min(460px, 42vw);
  padding: clamp(82px, 10vh, 116px) 0 0 44px;
  color: #1a1a1a;
}

.world-copy-compact {
  width: min(420px, 38vw);
}

.world-copy h1 {
  margin: 10px 0 0;
  font-size: clamp(56px, 7vw, 104px);
  font-weight: 850;
  line-height: 0.9;
}

.world-copy-compact h1 {
  white-space: nowrap;
}

.title-logo {
  display: block;
  width: clamp(260px, 32vw, 440px);
  height: auto;
  margin: 12px 0 0;
}

.title-sub {
  margin: 16px 0 0;
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 800;
  letter-spacing: 0.06em;
}

body[data-scene="world"] .title-sub {
  color: #ffffff;
}

.world-copy p:not(.eyebrow) {
  max-width: 35ch;
  margin: 22px 0 0;
  color: rgba(26, 26, 26, 0.78);
  font-size: 16px;
  line-height: 1.85;
}

.world-copy .primary-action {
  margin-top: 26px;
}

.world-panel {
  position: absolute;
  right: 42px;
  bottom: 34px;
  z-index: 4;
  width: min(320px, 32vw);
  border: 1px solid rgba(255, 255, 255, 0.48);
  background: rgba(255, 253, 248, 0.54);
  color: #1a1a1a;
  padding: 18px 20px;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

@supports not (backdrop-filter: blur(14px)) {
  .world-panel {
    background: rgba(255, 253, 248, 0.92);
  }
}

.world-panel-wide {
  width: min(430px, 38vw);
}

.world-panel span {
  color: #58705e;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.18em;
}

.world-panel p {
  margin: 10px 0 0;
  color: rgba(26, 26, 26, 0.76);
  font-size: 14px;
  line-height: 1.7;
}

body[data-scene="world"] .world-nav,
body[data-scene="world"] .world-copy {
  color: #ffffff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.28);
}

body[data-scene="world"] .world-copy p:not(.eyebrow) {
  color: rgba(255, 255, 255, 0.82);
}

body[data-scene="world"] .green,
body[data-scene="world"] .world-panel span {
  color: #d7f0ce;
}

body[data-scene="world"] .world-panel {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(16, 21, 18, 0.48);
  color: #ffffff;
}

body[data-scene="world"] .world-panel p {
  color: rgba(255, 255, 255, 0.78);
}

.top-nav {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 22px 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.hero-copy {
  position: relative;
  z-index: 3;
  display: flex;
  max-width: 372px;
  flex-direction: column;
  pointer-events: none;
}

.bottom-copy {
  min-height: calc(100dvh - 72px);
  justify-content: flex-end;
  padding: 0 22px 34px;
}

.pet-copy {
  min-height: calc(86dvh - 82px);
  max-width: 360px;
  justify-content: flex-start;
  padding: 72px 22px 34px;
}

.eyebrow {
  max-width: 18ch;
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.gold {
  color: #9a7628;
}

.green {
  color: #6f8061;
}

.hero-copy h1 {
  margin: 8px 0 0;
  font-size: 46px;
  font-weight: 850;
  line-height: 1;
}

.pet-copy h1 {
  font-size: 48px;
  font-weight: 800;
  line-height: 0.95;
}

.hero-copy > p:not(.eyebrow) {
  max-width: 29ch;
  margin: 16px 0 0;
  color: #5b5140;
  font-size: 15px;
  line-height: 1.75;
}

.pet-copy > p:not(.eyebrow) {
  max-width: 31ch;
  margin-top: 18px;
  color: #4d4a45;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
  pointer-events: auto;
}

.primary-action {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #1a1a1a;
  color: #ffffff;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 700;
  transition:
    transform 160ms ease,
    background 160ms ease;
}

.primary-action:active {
  transform: scale(0.98);
}

.feature-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border-top: 1px solid rgba(26, 26, 26, 0.08);
  background: rgba(26, 26, 26, 0.08);
}

.feature-strip div {
  min-height: 104px;
  background: #ffffff;
  padding: 18px 16px;
}

.feature-strip span {
  color: #8fb9a8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
}

.feature-strip p {
  margin: 22px 0 0;
  font-size: 14px;
  font-weight: 700;
}

@media (min-width: 480px) {
  body {
    display: flex;
    align-items: flex-start;
    justify-content: center;
  }

  .phone-frame {
    min-height: calc(100dvh - 48px);
    margin: 24px auto;
    overflow: hidden;
    border-radius: 32px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.12);
  }

  body[data-scene="pet"],
  body[data-scene="world"],
  body[data-scene="hatch"],
  body[data-scene="reveal"] {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100dvh;
    min-height: calc(var(--vh, 1vh) * 100);
  }

  body[data-scene="pet"] .douyin-shell,
  body[data-scene="hatch"] .douyin-shell,
  body[data-scene="reveal"] .douyin-shell {
    margin: 0 auto;
    min-height: 100dvh;
    min-height: calc(var(--vh, 1vh) * 100);
  }
}

@media (max-width: 760px) {
  .world-nav {
    display: none;
  }

  .world-copy {
    width: auto;
    padding: 74px 20px 0;
  }

  .world-copy h1 {
    font-size: 48px;
  }

  body[data-scene="hatch"] .world-copy,
  body[data-scene="reveal"] .world-copy {
    position: absolute;
    top: max(28px, calc((100dvh - min(100vw, 100dvh)) / 2 + min(100vw, 100dvh) * 0.17 - 78px));
    right: 0;
    left: 0;
    z-index: 4;
    display: flex;
    justify-content: center;
    padding: 0 20px;
    pointer-events: none;
  }

  body[data-scene="hatch"] .world-copy .eyebrow,
  body[data-scene="hatch"] .world-copy .title-sub,
  body[data-scene="hatch"] .world-copy p:not(.eyebrow),
  body[data-scene="reveal"] .world-copy .eyebrow,
  body[data-scene="reveal"] .world-copy .title-sub,
  body[data-scene="reveal"] .world-copy p:not(.eyebrow),
  body[data-scene="reveal"] .world-copy .primary-action {
    display: none;
  }

  body[data-scene="hatch"] .title-logo,
  body[data-scene="reveal"] .title-logo {
    width: clamp(232px, 72vw, 300px);
    margin: 0 auto;
  }

  .world-panel {
    right: 20px;
    bottom: 22px;
    left: 20px;
    width: auto;
  }
}

body[data-scene="hatch"] .world-nav,
body[data-scene="reveal"] .world-nav,
body[data-scene="pet"] .world-nav,
body[data-scene="world"] .world-nav {
  display: none;
}

body[data-scene="pet"] .world-video-bg,
body[data-scene="pet"] .world-canvas,
body[data-scene="world"] .world-video-bg,
body[data-scene="world"] .world-canvas {
  object-fit: cover;
}

body[data-scene="pet"] .world-copy,
body[data-scene="world"] .world-copy {
  position: absolute;
  top: max(76px, calc(env(safe-area-inset-top) + 52px));
  right: 0;
  left: 0;
  z-index: 4;
  display: flex;
  justify-content: center;
  width: auto;
  padding: 0 20px;
  pointer-events: none;
}

body[data-scene="pet"] .world-copy .eyebrow,
body[data-scene="pet"] .world-copy p:not(.eyebrow),
body[data-scene="world"] .world-copy .eyebrow,
body[data-scene="world"] .world-copy p:not(.eyebrow) {
  display: none;
}

body[data-scene="pet"] .title-logo,
body[data-scene="world"] .title-logo {
  width: clamp(212px, 54vw, 276px);
  margin: 0 auto;
}

.cat-chat-hint {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 23%;
  max-width: min(250px, 72vw);
  border: 2px solid rgba(26, 26, 26, 0.86);
  border-radius: 18px 18px 18px 6px;
  background: rgba(255, 253, 248, 0.94);
  box-shadow: 0 10px 0 rgba(29, 58, 88, 0.13);
  color: #1a1a1a;
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
  transform: translate(-50%, calc(-100% - 18px));
  transition:
    opacity 220ms ease,
    transform 220ms ease;
}

.cat-chat-hint:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.88);
  outline-offset: 3px;
}

.cat-chat-hint::after {
  position: absolute;
  bottom: -9px;
  left: 18px;
  width: 14px;
  height: 14px;
  border-right: 2px solid rgba(26, 26, 26, 0.86);
  border-bottom: 2px solid rgba(26, 26, 26, 0.86);
  background: rgba(255, 253, 248, 0.94);
  content: "";
  transform: rotate(45deg);
}

.cat-chat-hint.is-hidden {
  opacity: 0;
  transform: translate(-50%, calc(-100% - 6px));
}

.cat-chat {
  position: fixed;
  top: calc((100dvh - var(--keyboard-inset)) / 2);
  top: calc((calc(var(--vh, 1vh) * 100) - var(--keyboard-inset)) / 2);
  left: 50%;
  z-index: 8;
  display: flex;
  width: min(420px, calc(100vw - 36px));
  max-height: min(480px, calc(100dvh - 176px - var(--keyboard-inset)));
  max-height: min(480px, calc(calc(var(--vh, 1vh) * 100) - 176px - var(--keyboard-inset)));
  flex-direction: column;
  overflow: hidden;
  border: 3px solid rgba(15, 20, 24, 0.94);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.98);
  box-shadow:
    6px 6px 0 rgba(15, 20, 24, 0.2),
    0 22px 54px rgba(18, 41, 55, 0.28);
  color: #1a1a1a;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, calc(-50% + 14px)) scale(0.96);
  transition:
    opacity 220ms ease,
    transform 220ms ease;
}

/* Android keyboard pushes viewport up — pin chat to visible area */
body.keyboard-open .cat-chat {
  max-height: min(480px, calc(calc(var(--vh, 1vh) * 100) - 80px));
}

.cat-chat.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%);
}

.cat-chat-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(26, 26, 26, 0.1);
  background:
    linear-gradient(90deg, rgba(255, 238, 178, 0.96), rgba(234, 250, 205, 0.96));
  padding: 14px 16px 12px;
}

.cat-chat-kicker {
  display: block;
  color: #7b8f5e;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.cat-chat h1 {
  margin: 4px 0 0;
  font-size: 21px;
  line-height: 1.15;
}

.cat-chat-close {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 9px;
  background: #1a1a1a;
  color: #ffffff;
  font-size: 24px;
  line-height: 1;
}

.cat-chat-messages {
  display: flex;
  min-height: 158px;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 16px;
}

.cat-message {
  max-width: 82%;
  border: 2px solid rgba(26, 26, 26, 0.82);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.55;
}

.cat-message-refs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  border-top: 1px dashed rgba(26, 26, 26, 0.16);
  padding-top: 8px;
}

.cat-message-refs span {
  flex-basis: 100%;
  color: rgba(26, 26, 26, 0.55);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.cat-message-refs a {
  border: 1px solid rgba(26, 26, 26, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #3f5d72;
  padding: 3px 7px;
  font-size: 11px;
  font-weight: 800;
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cat-video-shelf {
  margin-top: 10px;
  border-top: 1px dashed rgba(26, 26, 26, 0.16);
  padding-top: 8px;
}

.cat-video-shelf > span {
  display: block;
  margin-bottom: 7px;
  color: rgba(26, 26, 26, 0.55);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.cat-video-list {
  display: grid;
  grid-auto-columns: minmax(132px, 0.78fr);
  grid-auto-flow: column;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  padding-bottom: 2px;
  scroll-snap-type: x mandatory;
}

.cat-video-card {
  display: flex;
  min-width: 132px;
  max-width: 168px;
  flex-direction: column;
  overflow: hidden;
  border: 2px solid rgba(26, 26, 26, 0.78);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.96);
  color: #1a1a1a;
  scroll-snap-align: start;
}

.cat-video-thumb {
  position: relative;
  display: flex;
  min-height: 82px;
  align-items: flex-end;
  background:
    linear-gradient(145deg, rgba(14, 18, 24, 0.18), rgba(14, 18, 24, 0.58)),
    repeating-linear-gradient(135deg, #8ee3ff 0 8px, #ff78b8 8px 16px, #f7e779 16px 24px);
  padding: 8px;
}

.cat-video-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cat-video-thumb.has-cover::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.62));
  content: "";
}

.cat-video-thumb strong {
  position: relative;
  z-index: 2;
  color: #ffffff;
  font-size: 12px;
  line-height: 1.25;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.42);
}

.cat-video-play {
  position: absolute;
  z-index: 3;
  top: 9px;
  right: 9px;
  width: 28px;
  height: 28px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  background: rgba(26, 26, 26, 0.44);
}

.cat-video-play::after {
  position: absolute;
  top: 7px;
  left: 10px;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 9px solid #ffffff;
  content: "";
}

.cat-video-card p {
  display: -webkit-box;
  min-height: 48px;
  margin: 7px 8px 0;
  overflow: hidden;
  color: rgba(26, 26, 26, 0.76);
  font-size: 11px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.cat-video-card small {
  margin: auto 8px 8px;
  color: #617949;
  font-size: 10px;
  font-weight: 900;
}

.cat-message.assistant {
  align-self: flex-start;
  border-bottom-left-radius: 6px;
  background: #eef8dd;
  box-shadow: 3px 3px 0 rgba(26, 26, 26, 0.1);
}

.cat-message.is-streaming > div:first-child::after {
  display: inline-block;
  width: 0.65em;
  content: "▌";
  animation: typing-caret 0.8s steps(1) infinite;
}

.cat-message.user {
  align-self: flex-end;
  border-bottom-right-radius: 6px;
  background: #dff1ff;
  box-shadow: 3px 3px 0 rgba(26, 26, 26, 0.1);
}

.cat-chat-quick {
  border-top: 1px solid rgba(26, 26, 26, 0.08);
  background: rgba(255, 253, 248, 0.96);
  padding: 10px 12px 4px;
  transition: opacity 200ms ease;
}

.cat-chat-quick.is-hidden {
  display: none;
}

.cat-chat-quick-label {
  display: block;
  color: rgba(26, 26, 26, 0.55);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.cat-chat-quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
}

.cat-chat-quick-chips button {
  border: 2px solid rgba(26, 26, 26, 0.78);
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 2px 2px 0 rgba(26, 26, 26, 0.1);
  color: #1a1a1a;
  padding: 6px 11px;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.cat-chat-quick-chips button:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 rgba(26, 26, 26, 0.14);
}

.cat-chat-quick-chips button:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 rgba(26, 26, 26, 0.1);
}

.cat-chat-form {
  display: flex;
  gap: 8px;
  border-top: 1px solid rgba(26, 26, 26, 0.1);
  background: rgba(255, 253, 248, 0.98);
  padding: 12px;
}

.cat-chat-form input {
  min-width: 0;
  flex: 1;
  border: 1px solid rgba(26, 26, 26, 0.16);
  border: 2px solid rgba(26, 26, 26, 0.82);
  border-radius: 10px;
  background: #ffffff;
  color: #1a1a1a;
  padding: 0 14px;
  font: inherit;
  font-size: 14px;
}

.cat-chat-form button {
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  background: #1a1a1a;
  color: #ffffff;
  padding: 0 15px;
  font-size: 14px;
  font-weight: 800;
}

@keyframes typing-caret {
  50% {
    opacity: 0;
  }
}

.tree-mail-hint {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 35%;
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: min(250px, 72vw);
  border: 2px solid rgba(71, 81, 38, 0.86);
  border-radius: 16px 16px 6px 16px;
  background: rgba(250, 255, 232, 0.94);
  box-shadow: 0 9px 0 rgba(61, 91, 52, 0.14);
  color: #384627;
  padding: 10px 14px 10px 11px;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.35;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.tree-mail-hint::before {
  display: block;
  width: 31px;
  height: 25px;
  flex: 0 0 auto;
  border: 3px solid rgba(71, 81, 38, 0.86);
  border-radius: 4px;
  background:
    linear-gradient(145deg, transparent 47%, rgba(71, 81, 38, 0.34) 48% 52%, transparent 53%),
    linear-gradient(35deg, transparent 47%, rgba(71, 81, 38, 0.34) 48% 52%, transparent 53%),
    rgba(255, 253, 248, 0.96);
  content: "";
}

.tree-mail-hint.is-hidden {
  opacity: 0;
  transform: translate(-50%, calc(-50% + 8px));
}

.tree-actions {
  position: absolute;
  z-index: 6;
  display: grid;
  width: min(236px, 68vw);
  gap: 7px;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -8px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.tree-actions.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -20px);
}

.tree-actions button {
  min-height: 39px;
  border: 3px solid rgba(15, 20, 24, 0.94);
  border-radius: 10px;
  background: rgba(255, 253, 248, 0.96);
  box-shadow: 4px 4px 0 rgba(15, 20, 24, 0.18);
  color: #1a1a1a;
  font-size: 14px;
  font-weight: 900;
}

.tree-actions [data-offer-open] {
  background:
    linear-gradient(135deg, rgba(26, 26, 26, 0.96) 0 74%, rgba(47, 58, 31, 0.98) 74%),
    #1a1a1a;
  color: #fff8dc;
}

.tree-mail {
  position: fixed;
  right: 34px;
  bottom: calc(232px + var(--keyboard-inset));
  left: 34px;
  z-index: 9;
  display: flex;
  max-height: min(372px, calc(100dvh - 220px - var(--keyboard-inset)));
  flex-direction: column;
  overflow: hidden;
  border: 4px solid rgba(31, 37, 30, 0.96);
  border-radius: 4px;
  background:
    linear-gradient(145deg, transparent 0 50%, rgba(191, 214, 146, 0.35) 50% 52%, transparent 52%),
    linear-gradient(35deg, transparent 0 49%, rgba(244, 202, 95, 0.32) 49% 51%, transparent 51%),
    #fff8dc;
  box-shadow:
    5px 5px 0 rgba(31, 37, 30, 0.24),
    0 18px 36px rgba(31, 54, 42, 0.28);
  color: #1a1a1a;
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px) scale(0.98);
  transition:
    opacity 220ms ease,
    transform 220ms ease;
}

.tree-mail::before,
.tree-mail::after {
  position: absolute;
  right: 10px;
  left: 10px;
  z-index: 0;
  height: 50%;
  pointer-events: none;
  content: "";
}

.tree-mail::before {
  top: 58px;
  background:
    linear-gradient(155deg, transparent 49%, rgba(31, 37, 30, 0.14) 50%, transparent 51%),
    linear-gradient(25deg, transparent 49%, rgba(31, 37, 30, 0.12) 50%, transparent 51%);
}

.tree-mail::after {
  bottom: 0;
  background:
    linear-gradient(25deg, transparent 48%, rgba(31, 37, 30, 0.14) 49%, transparent 51%),
    linear-gradient(155deg, transparent 48%, rgba(31, 37, 30, 0.12) 49%, transparent 51%);
}

.tree-mail.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.tree-mail-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 3px solid rgba(31, 37, 30, 0.18);
  background:
    repeating-linear-gradient(90deg, rgba(31, 37, 30, 0.06) 0 5px, transparent 5px 11px),
    #f8efb8;
  padding: 10px 12px 9px;
}

.tree-mail-stamp {
  margin-left: auto;
  border: 2px dashed rgba(31, 37, 30, 0.42);
  border-radius: 50%;
  color: rgba(31, 37, 30, 0.48);
  padding: 8px 6px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.1em;
  transform: rotate(-9deg);
}

.tree-mail-kicker {
  display: block;
  color: #6b7f42;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.tree-mail h1 {
  margin: 3px 0 0;
  font-size: 20px;
  line-height: 1.15;
}

.tree-mail-close {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 4px;
  background: #1a1a1a;
  color: #ffffff;
  font-size: 24px;
  line-height: 1;
}

.tree-mail-tabs {
  position: relative;
  z-index: 1;
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px 12px 0;
}

.tree-mail-tabs button,
.tree-reply-actions button,
.tree-letter-form button {
  min-height: 40px;
  border: 0;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 900;
}

.tree-mail-tabs button {
  background: rgba(26, 26, 26, 0.08);
  color: rgba(26, 26, 26, 0.62);
}

.tree-mail-tabs button.is-active,
.tree-letter-form button,
.tree-reply-actions button[type="submit"] {
  background:
    linear-gradient(135deg, #1a1a1a 0 74%, #2f3a1f 74%);
  color: #ffffff;
  box-shadow: 3px 3px 0 rgba(47, 58, 31, 0.2);
}

.tree-mail-panel {
  position: relative;
  z-index: 1;
  display: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 12px 14px 13px;
}

.tree-mail-panel.is-active {
  display: block;
}

.tree-mail-intro {
  margin: 0 0 10px;
  color: rgba(26, 26, 26, 0.72);
  font-size: 14px;
  line-height: 1.55;
}

.tree-letter-form,
.tree-reply-form {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.tree-letter-form button,
.tree-reply-actions {
  position: sticky;
  bottom: -2px;
  z-index: 2;
}

.tree-reply-actions {
  background: linear-gradient(180deg, rgba(255, 248, 220, 0), rgba(255, 248, 220, 0.98) 34%);
  padding-top: 6px;
}

.tree-reply-form input,
.tree-letter-form textarea,
.tree-reply-form textarea {
  width: 100%;
  border: 3px solid rgba(31, 37, 30, 0.74);
  border-radius: 4px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.88)),
    repeating-linear-gradient(180deg, transparent 0 29px, rgba(31, 37, 30, 0.08) 29px 30px);
  color: #1a1a1a;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  line-height: 1.55;
}

.tree-reply-form input {
  min-height: 40px;
  padding: 8px 12px;
}

.tree-letter-form textarea,
.tree-reply-form textarea {
  resize: none;
}

.tree-letter-form textarea {
  min-height: 88px;
}

.tree-reply-form textarea {
  min-height: 108px;
}

.tree-mail-status,
.tree-reply-status {
  min-height: 20px;
  margin-top: 8px;
  color: #6f8061;
  font-size: 13px;
  font-weight: 800;
}

.tree-letter-card {
  position: relative;
  margin-bottom: 10px;
  border: 3px solid rgba(31, 37, 30, 0.72);
  border-radius: 4px;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.95), rgba(255, 246, 216, 0.92));
  padding: 13px;
  box-shadow: 3px 3px 0 rgba(31, 37, 30, 0.14);
}

.tree-letter-card::before {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 26px;
  height: 18px;
  border: 2px solid rgba(31, 37, 30, 0.26);
  background:
    linear-gradient(145deg, transparent 48%, rgba(31, 37, 30, 0.18) 49% 51%, transparent 52%),
    linear-gradient(35deg, transparent 48%, rgba(31, 37, 30, 0.18) 49% 51%, transparent 52%);
  content: "";
}

.tree-letter-card span {
  color: #78904d;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.tree-letter-card h2 {
  margin: 8px 36px 0 0;
  font-size: 18px;
  line-height: 1.3;
}

.tree-letter-card p {
  margin: 12px 0 0;
  color: rgba(26, 26, 26, 0.76);
  font-size: 14px;
  line-height: 1.7;
}

.tree-letter-replies {
  margin-top: 12px;
  border-top: 1px dashed rgba(47, 58, 31, 0.16);
  padding-top: 10px;
}

.tree-letter-replies > strong {
  display: block;
  margin-bottom: 6px;
  color: #6f8061;
  font-size: 12px;
}

.tree-reply-item {
  margin-top: 8px;
  border: 2px solid rgba(47, 58, 31, 0.18);
  border-radius: 4px;
  background: rgba(255, 253, 248, 0.52);
  padding: 8px 9px;
}

.tree-reply-item div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #6f8061;
  font-size: 12px;
  font-weight: 900;
}

.tree-reply-item time {
  flex: none;
  color: rgba(26, 26, 26, 0.48);
  font-size: 11px;
  font-weight: 800;
}

.tree-letter-card .tree-reply-item p {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.6;
}

.tree-sent-replies {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.tree-sent-replies:empty {
  display: none;
}

.tree-sent-replies > strong {
  color: #6f8061;
  font-size: 12px;
}

.tree-sent-replies article {
  border: 2px solid rgba(47, 58, 31, 0.24);
  border-radius: 4px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(246, 238, 196, 0.78));
  padding: 8px 10px;
  box-shadow: 2px 2px 0 rgba(31, 37, 30, 0.08);
  animation: reply-log-in 300ms ease both;
}

.tree-sent-replies span {
  display: block;
  color: #78904d;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.tree-sent-replies small {
  display: block;
  margin-top: 3px;
  color: rgba(26, 26, 26, 0.48);
  font-size: 11px;
  font-weight: 800;
}

.tree-sent-replies p {
  margin: 5px 0 0;
  color: rgba(26, 26, 26, 0.78);
  font-size: 13px;
  line-height: 1.55;
}

.tree-reply-fly {
  position: absolute;
  right: 18px;
  bottom: 46px;
  z-index: 4;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  max-width: min(260px, 82%);
  border: 2px solid rgba(47, 58, 31, 0.42);
  border-radius: 4px;
  background: rgba(255, 253, 248, 0.96);
  padding: 7px 9px;
  box-shadow: 3px 3px 0 rgba(47, 58, 31, 0.18);
  pointer-events: none;
  animation: reply-fly 820ms ease forwards;
}

.tree-reply-fly span {
  width: 26px;
  height: 18px;
  border: 2px solid rgba(47, 58, 31, 0.46);
  background:
    linear-gradient(145deg, transparent 48%, rgba(47, 58, 31, 0.28) 49% 51%, transparent 52%),
    linear-gradient(35deg, transparent 48%, rgba(47, 58, 31, 0.28) 49% 51%, transparent 52%),
    #fff8dc;
}

.tree-reply-fly p {
  overflow: hidden;
  margin: 0;
  color: rgba(26, 26, 26, 0.72);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@keyframes reply-fly {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.92);
  }
  20% {
    opacity: 1;
  }
  72% {
    opacity: 1;
    transform: translate(-26px, -58px) rotate(-5deg) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-38px, -82px) rotate(-9deg) scale(0.84);
  }
}

@keyframes reply-log-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.tree-reply-actions {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 8px;
}

.tree-reply-actions button[type="button"] {
  background: rgba(26, 26, 26, 0.08);
  color: #1a1a1a;
}

@media (prefers-reduced-motion: reduce) {
  .tree-reply-fly,
  .tree-sent-replies article {
    animation: none;
  }
}

.offer-rescue {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 24%, rgba(255, 248, 220, 0.18), transparent 36%),
    rgba(10, 16, 14, 0.42);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 220ms ease,
    backdrop-filter 220ms ease;
  backdrop-filter: blur(0);
}

.offer-rescue.is-open {
  opacity: 1;
  pointer-events: auto;
  backdrop-filter: blur(7px);
}

.offer-rescue-shell {
  display: flex;
  width: min(920px, calc(100vw - 40px));
  max-height: min(720px, calc(100dvh - 38px));
  flex-direction: column;
  overflow: hidden;
  border: 3px solid rgba(255, 248, 220, 0.72);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 253, 248, 0.96), rgba(242, 238, 218, 0.92)),
    #fffdf8;
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.34),
    5px 5px 0 rgba(31, 37, 30, 0.24);
  color: #1a1a1a;
  transform: translateY(14px) scale(0.98);
  transition: transform 220ms ease;
}

.offer-rescue.is-open .offer-rescue-shell {
  transform: none;
}

.offer-rescue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(47, 58, 31, 0.16);
  background:
    repeating-linear-gradient(90deg, rgba(47, 58, 31, 0.05) 0 7px, transparent 7px 14px),
    rgba(255, 248, 220, 0.9);
  padding: 16px 18px;
}

.offer-rescue-header span,
.offer-question > span,
.offer-result span {
  color: #78904d;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.offer-rescue-header h1,
.offer-question h2,
.offer-result h2 {
  margin: 4px 0 0;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.05;
}

.offer-rescue-close {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 0;
  border-radius: 5px;
  background: #1a1a1a;
  color: #ffffff;
  font-size: 26px;
  line-height: 1;
}

.offer-rescue-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.offer-role-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 14px 18px 0;
}

.offer-role-tabs button {
  min-height: 34px;
  border: 1px solid rgba(47, 58, 31, 0.16);
  border-radius: 5px;
  background: rgba(26, 26, 26, 0.05);
  color: rgba(26, 26, 26, 0.62);
  font-weight: 900;
}

.offer-role-tabs button.is-active {
  background: #1a1a1a;
  color: #fffdf8;
}

.offer-stage {
  display: grid;
  grid-template-columns: minmax(260px, 1.1fr) minmax(230px, 0.9fr);
  gap: 18px;
  padding: 16px 18px 0;
}

.offer-scene {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  border: 1px solid rgba(47, 58, 31, 0.16);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(222, 236, 226, 0.9) 0 35%, rgba(255, 248, 220, 0.96) 35% 68%, rgba(213, 194, 158, 0.95) 68%),
    #fff8dc;
}

.offer-scene span,
.offer-scene em {
  position: absolute;
  top: 12px;
  z-index: 2;
  border: 1px solid rgba(31, 37, 30, 0.48);
  border-radius: 4px;
  background: rgba(255, 253, 248, 0.92);
  padding: 4px 8px;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.offer-scene span {
  left: 12px;
}

.offer-scene em {
  right: 12px;
}

.offer-scene i,
.offer-scene b,
.offer-scene strong {
  position: absolute;
  display: block;
  content: "";
}

.offer-scene i {
  left: 58px;
  bottom: 42px;
  width: 68px;
  height: 84px;
  border-radius: 34px 34px 12px 12px;
  background: #242632;
  transform: translateY(calc(var(--pressure) * 0.12px));
  transition: transform 360ms ease;
}

.offer-scene i::before,
.offer-scene i::after {
  position: absolute;
  top: 27px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff8dc;
  content: "";
}

.offer-scene i::before {
  left: 18px;
}

.offer-scene i::after {
  right: 18px;
}

.offer-scene b {
  right: 52px;
  bottom: 42px;
  width: 100px;
  height: 110px;
  border: 2px solid #242632;
  border-radius: 9px;
  background:
    linear-gradient(#242632 0 20px, transparent 20px),
    repeating-linear-gradient(180deg, transparent 0 28px, rgba(47, 58, 31, 0.13) 28px 30px),
    #fffdf8;
  box-shadow: 10px 12px 0 rgba(47, 58, 31, 0.12);
}

.offer-scene strong {
  right: 86px;
  bottom: 74px;
  width: 42px;
  height: 34px;
  border: 2px solid rgba(47, 58, 31, 0.48);
  background:
    linear-gradient(145deg, transparent 47%, rgba(47, 58, 31, 0.28) 48% 52%, transparent 53%),
    linear-gradient(35deg, transparent 47%, rgba(47, 58, 31, 0.28) 48% 52%, transparent 53%),
    #fff8dc;
}

.offer-meters {
  display: grid;
  align-content: center;
  gap: 13px;
}

.offer-meter div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #3b3833;
  font-size: 12px;
  font-weight: 900;
}

.offer-meter i {
  display: block;
  height: 8px;
  margin-top: 6px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(26, 26, 26, 0.08);
}

.offer-meter b {
  display: block;
  height: 100%;
  border-radius: inherit;
  transition: width 380ms ease;
}

.offer-question {
  padding: 22px 18px;
}

.offer-question p {
  max-width: 64ch;
  margin: 10px 0 0;
  color: rgba(26, 26, 26, 0.68);
  font-size: 14px;
  line-height: 1.7;
}

.offer-question h3 {
  margin: 18px 0 0;
  font-size: 16px;
}

.offer-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.offer-options button {
  display: flex;
  min-height: 126px;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(47, 58, 31, 0.18);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.74);
  color: #242632;
  padding: 12px;
  text-align: left;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.offer-options button:not(:disabled):hover {
  border-color: rgba(31, 37, 30, 0.64);
  box-shadow: 3px 3px 0 rgba(31, 37, 30, 0.12);
  transform: translateY(-1px);
}

.offer-options button.is-locked:not(.is-selected) {
  opacity: 0.45;
}

.offer-options button.is-selected {
  border-color: #1a1a1a;
  background: #fff8dc;
  box-shadow: 3px 3px 0 rgba(31, 37, 30, 0.2);
}

.offer-options span {
  font-size: 13px;
  font-weight: 850;
  line-height: 1.5;
}

.offer-options small {
  align-self: flex-start;
  margin-top: 10px;
  border-radius: 4px;
  padding: 4px 7px;
  font-size: 11px;
  font-weight: 900;
}

.offer-options .is-good small {
  background: #e4f3ed;
  color: #276653;
}

.offer-options .is-mid small {
  background: #fff1c9;
  color: #7a5711;
}

.offer-options .is-risk small {
  background: #ffe3dc;
  color: #963a2e;
}

.offer-feedback,
.offer-plan {
  border-top: 1px solid rgba(47, 58, 31, 0.14);
  background: rgba(255, 248, 220, 0.56);
  padding: 18px;
}

.offer-feedback strong,
.offer-plan h3 {
  font-size: 15px;
}

.offer-feedback p {
  margin: 8px 0 0;
  color: rgba(26, 26, 26, 0.68);
  font-size: 14px;
  line-height: 1.65;
}

.offer-feedback div {
  margin-top: 12px;
  border: 1px solid rgba(47, 58, 31, 0.14);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
  padding: 12px;
  color: #242632;
  font-size: 14px;
  line-height: 1.65;
}

.offer-feedback div span {
  display: block;
  margin-bottom: 4px;
  color: #b05c4d;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.offer-feedback button,
.offer-plan button {
  width: 100%;
  min-height: 44px;
  margin-top: 14px;
  border: 0;
  border-radius: 6px;
  background:
    linear-gradient(135deg, #1a1a1a 0 74%, #2f3a1f 74%);
  color: #ffffff;
  font-weight: 900;
}

.offer-result {
  display: grid;
  grid-template-columns: 1fr 118px;
  gap: 16px;
  padding: 22px 18px 16px;
}

.offer-result > div {
  border: 1px solid rgba(47, 58, 31, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  padding: 18px;
}

.offer-result > strong {
  display: grid;
  place-items: center;
  border: 2px solid rgba(31, 37, 30, 0.82);
  border-radius: 8px;
  background: #fff1b8;
  font-size: 42px;
}

.offer-result p {
  margin: 10px 0 0;
  color: rgba(26, 26, 26, 0.62);
  font-size: 14px;
}

.offer-result + .offer-meters {
  padding: 0 18px 18px;
}

.offer-plan p {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: start;
  margin: 9px 0 0;
  border: 1px solid rgba(47, 58, 31, 0.14);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
  padding: 10px;
  color: rgba(26, 26, 26, 0.72);
  font-size: 14px;
  line-height: 1.6;
}

.offer-plan p b {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 4px;
  background: #1a1a1a;
  color: #ffffff;
  font-size: 12px;
}

@media (max-width: 760px) {
  .offer-rescue {
    align-items: end;
    padding: 14px;
  }

  .offer-rescue-shell {
    width: 100%;
    max-height: calc(100dvh - 28px);
  }

  .offer-stage,
  .offer-options,
  .offer-result {
    grid-template-columns: 1fr;
  }

  .offer-scene {
    min-height: 154px;
  }
}

.douyin-feature-card .cat-chat {
  position: absolute;
  top: 50%;
  width: min(420px, calc(100% - 28px));
  max-height: min(480px, calc(100% - 80px - var(--keyboard-inset)));
}

.douyin-feature-card .tree-mail {
  position: absolute;
  right: 12px;
  bottom: calc(12px + var(--keyboard-inset));
  left: 12px;
  max-height: min(352px, calc(100% - 94px - var(--keyboard-inset)));
}

.douyin-feature-card .tree-actions {
  width: min(210px, 72%);
}

.douyin-feature-card .tree-actions.is-open {
  transform: translate(-50%, -178px);
}

.douyin-feature-card .tree-mail-hint {
  max-width: min(270px, 76%);
}

@media (max-width: 560px) {
  .douyin-shell {
    width: 100vw;
    min-height: 100dvh;
    min-height: calc(var(--vh, 1vh) * 100);
  }

  .douyin-top {
    padding: 16px 16px 0;
  }

  .douyin-channel {
    gap: 12px;
    margin-top: 0;
  }

  .douyin-channel nav {
    gap: 10px;
    font-size: 15px;
  }

  .douyin-channel nav span:nth-child(1),
  .douyin-channel nav span:nth-child(3) {
    display: none;
  }

  .douyin-card-stage {
    top: 66px;
    right: 8px;
    bottom: 66px;
    left: 8px;
  }

  .douyin-feature-card {
    border-radius: 18px;
  }

  .douyin-bottom {
    height: 64px;
    font-size: 14px;
  }

  .douyin-bottom strong {
    width: 40px;
    height: 28px;
  }
}

/* Tablet and iPad: full-width shell centered, larger touch targets */
@media (min-width: 561px) and (max-width: 1024px) {
  .douyin-shell {
    width: min(100vw, 540px);
    min-height: 100dvh;
    min-height: calc(var(--vh, 1vh) * 100);
    margin: 0 auto;
  }

  .douyin-top {
    padding: 18px 20px 0;
  }

  .douyin-channel nav {
    font-size: 16px;
  }

  .douyin-card-stage {
    top: 78px;
    right: 14px;
    bottom: 78px;
    left: 14px;
  }

  .douyin-bottom {
    height: 72px;
    font-size: 15px;
  }

  .cat-chat {
    width: min(440px, calc(100vw - 48px));
    max-height: min(560px, calc(calc(var(--vh, 1vh) * 100) - 160px - var(--keyboard-inset)));
  }

  .tree-mail {
    right: calc(50% - min(270px, calc(50vw - 24px)));
    left: calc(50% - min(270px, calc(50vw - 24px)));
    max-height: min(440px, calc(calc(var(--vh, 1vh) * 100) - 200px - var(--keyboard-inset)));
  }

  .offer-rescue-shell {
    max-height: min(680px, calc(calc(var(--vh, 1vh) * 100) - 48px));
  }
}

/* Large tablet / iPad Pro / desktop: expand layout */
@media (min-width: 1025px) {
  .douyin-shell {
    width: min(100vw, 640px);
    min-height: 100dvh;
    min-height: calc(var(--vh, 1vh) * 100);
    margin: 0 auto;
  }

  .douyin-top {
    padding: 22px 24px 0;
  }

  .douyin-status {
    font-size: 20px;
  }

  .douyin-channel nav {
    font-size: 17px;
    gap: 16px;
  }

  .douyin-card-stage {
    top: 86px;
    right: 18px;
    bottom: 82px;
    left: 18px;
  }

  .douyin-feature-card {
    border-radius: 28px;
  }

  .douyin-bottom {
    height: 80px;
    font-size: 17px;
  }

  .douyin-bottom strong {
    width: 48px;
    height: 34px;
    border-radius: 14px;
    font-size: 30px;
  }

  .cat-chat {
    width: min(480px, calc(100vw - 64px));
    max-height: min(620px, calc(calc(var(--vh, 1vh) * 100) - 140px - var(--keyboard-inset)));
  }

  .tree-mail {
    right: calc(50% - min(300px, calc(50vw - 32px)));
    left: calc(50% - min(300px, calc(50vw - 32px)));
    max-height: min(480px, calc(calc(var(--vh, 1vh) * 100) - 180px - var(--keyboard-inset)));
  }
}

body[data-scene="hatch"] .world-copy,
body[data-scene="reveal"] .world-copy {
  position: absolute;
  top: max(28px, calc((100dvh - min(100vw, 100dvh)) / 2 + min(100vw, 100dvh) * 0.17 - 78px));
  right: 0;
  left: 0;
  z-index: 4;
  display: flex;
  width: auto;
  justify-content: center;
  padding: 0 20px;
  pointer-events: none;
}

body[data-scene="hatch"] .douyin-feature-card .world-copy,
body[data-scene="reveal"] .douyin-feature-card .world-copy {
  top: 22px;
  width: 100%;
  padding: 0 18px;
}

body[data-scene="hatch"] .world-copy .eyebrow,
body[data-scene="hatch"] .world-copy .title-sub,
body[data-scene="hatch"] .world-copy p:not(.eyebrow),
body[data-scene="reveal"] .world-copy .eyebrow,
body[data-scene="reveal"] .world-copy .title-sub,
body[data-scene="reveal"] .world-copy p:not(.eyebrow),
body[data-scene="reveal"] .world-copy .primary-action {
  display: none;
}

body[data-scene="hatch"] .title-logo,
body[data-scene="reveal"] .title-logo {
  width: clamp(232px, 72vw, 300px);
  margin: 0 auto;
}

body[data-scene="hatch"] .douyin-feature-card .title-logo,
body[data-scene="reveal"] .douyin-feature-card .title-logo {
  width: clamp(180px, 56vw, 252px);
}
