:root {
  color-scheme: dark;
  --paper: #080b10;
  --paper-2: #0b1118;
  --ink: #e8eef4;
  --muted: #8c9baa;
  --line: rgba(155, 188, 210, 0.16);
  --blue: #8fc7e8;
  --blue-deep: #d5ecf8;
  --cold: #b9c8d3;
  --shadow: 0 22px 58px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  display: grid;
  place-items: center;
  overflow-x: hidden;
  overflow-y: auto;
  background:
    radial-gradient(circle at 50% 8%, rgba(18, 38, 55, 0.62), transparent 36%),
    #05070a;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  color: var(--ink);
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

.phone-shell {
  position: relative;
  width: min(100vw, 430px);
  min-height: 100vh;
  min-height: 100svh;
  max-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scroll-padding-bottom: calc(120px + env(safe-area-inset-bottom, 0px));
  background:
    linear-gradient(180deg, rgba(11, 17, 24, 0.94), rgba(5, 7, 10, 0.98)),
    var(--paper);
  box-shadow: var(--shadow);
  transition:
    background-color 900ms ease,
    color 900ms ease,
    filter 900ms ease;
}

.phone-shell.dim {
  background: #080b10;
}

.phone-shell.dark {
  background: #05080b;
  color: #f8fbff;
}

.phone-shell.cold-end {
  background: #06090e;
  color: var(--blue);
}

.cold-end .card,
.cold-end .footer-note,
.cold-end .narwhal,
.cold-end .sea-stain,
.cold-end .snow-layer,
.cold-end .intrusion-input {
  opacity: 0;
}

.tartaglia-bg {
  position: fixed;
  left: 50%;
  top: 52%;
  z-index: 0;
  width: min(82vw, 330px);
  height: min(76svh, 690px);
  object-fit: cover;
  object-position: center center;
  opacity: 0.035;
  pointer-events: none;
  mix-blend-mode: plus-lighter;
  filter: saturate(0.7) contrast(1.05) brightness(0.82) blur(0.8px) drop-shadow(0 0 16px rgba(94, 177, 220, 0.18));
  transform: translate(-50%, -50%);
  transition:
    opacity 3200ms ease,
    filter 3200ms ease;
}

.tartaglia-head,
.tartaglia-see {
  opacity: 0;
  filter: saturate(0.62) contrast(1.04) brightness(0.78) blur(0.8px) drop-shadow(0 0 18px rgba(126, 202, 239, 0.18));
}

.video-bg-soft .tartaglia-bg:not(.tartaglia-head):not(.tartaglia-see) {
  opacity: 0.018;
}

.video-see-active .tartaglia-bg:not(.tartaglia-head):not(.tartaglia-see) {
  opacity: 0;
}

.video-bg-retired .tartaglia-bg:not(.tartaglia-head):not(.tartaglia-see) {
  opacity: 0 !important;
}

.video-head-active .tartaglia-head {
  opacity: 0.14;
}

.video-see-active .tartaglia-see {
  opacity: 0.16;
  filter: saturate(0.68) contrast(1.08) brightness(0.84) blur(0.45px) drop-shadow(0 0 26px rgba(126, 202, 239, 0.25));
}

.look-pause .card {
  filter: brightness(0.74);
}

.look-pause .snow-layer i {
  animation-duration: calc(var(--dur) * 1.8);
}

.ambient-bgm {
  display: none;
}

.sound-test {
  position: fixed;
  right: 14px;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  z-index: 40;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(151, 202, 231, 0.22);
  border-radius: 8px;
  background: rgba(9, 15, 22, 0.78);
  color: rgba(218, 236, 246, 0.8);
  font-size: 12px;
  letter-spacing: 0;
}

.sound-test:focus-visible,
.sound-test:hover {
  border-color: rgba(151, 202, 231, 0.42);
  outline: none;
}

.winter-state .tartaglia-bg:not(.tartaglia-head):not(.tartaglia-see) {
  opacity: 0.052;
}

.deep-state .tartaglia-bg:not(.tartaglia-head):not(.tartaglia-see),
.taken .tartaglia-bg:not(.tartaglia-head):not(.tartaglia-see) {
  opacity: 0.072;
}

.unhappy .tartaglia-bg:not(.tartaglia-head):not(.tartaglia-see),
.refusal-2 .tartaglia-bg:not(.tartaglia-head):not(.tartaglia-see) {
  opacity: 0.09;
}

.refusal-3 .tartaglia-bg:not(.tartaglia-head):not(.tartaglia-see),
.refusal-4 .tartaglia-bg:not(.tartaglia-head):not(.tartaglia-see),
.deep-strong .tartaglia-bg:not(.tartaglia-head):not(.tartaglia-see) {
  opacity: 0.13;
}

.chance-rise .tartaglia-bg:not(.tartaglia-head):not(.tartaglia-see),
.final-close .tartaglia-bg:not(.tartaglia-head):not(.tartaglia-see) {
  opacity: 0.18;
  filter: saturate(0.76) contrast(1.08) brightness(0.92) blur(0.4px) drop-shadow(0 0 24px rgba(126, 202, 239, 0.26));
}

.dark .tartaglia-bg:not(.tartaglia-head):not(.tartaglia-see) {
  mix-blend-mode: plus-lighter;
  opacity: 0.2;
  filter: saturate(0.65) contrast(1.05) brightness(0.82) blur(0.4px) drop-shadow(0 0 28px rgba(126, 202, 239, 0.3));
}

.cold-end .tartaglia-bg:not(.tartaglia-head):not(.tartaglia-see) {
  opacity: 0.16;
}

.sea-stain {
  position: fixed;
  inset: -18%;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at 4% 18%, rgba(42, 98, 132, 0.2), transparent 30%),
    radial-gradient(circle at 96% 72%, rgba(34, 88, 120, 0.18), transparent 32%),
    radial-gradient(circle at 50% 112%, rgba(78, 154, 190, 0.16), transparent 38%);
  filter: blur(22px);
  transform: scale(1.03);
  transition: opacity 2600ms ease, filter 2600ms ease;
}

.unhappy .sea-stain {
  animation: tideMove 9.6s ease-in-out infinite alternate;
}

.refusal-1 .sea-stain {
  opacity: 0.22;
}

.refusal-2 .sea-stain {
  opacity: 0.36;
}

.refusal-3 .sea-stain,
.refusal-4 .sea-stain {
  opacity: 0.52;
}

.taken .sea-stain {
  opacity: 0.48;
}

.deep-state .sea-stain {
  opacity: 0.34;
  animation: tideMove 10.8s ease-in-out infinite alternate;
}

.deep-strong .sea-stain {
  opacity: 0.66;
  filter: blur(20px);
}

.snow-layer {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0.18;
  overflow: hidden;
  transition: opacity 2800ms ease, filter 2400ms ease;
}

.winter-state .snow-layer {
  opacity: 0.46;
}

.snow-stopping .snow-layer {
  opacity: 0.34;
  filter: blur(0.4px);
}

.snow-layer i {
  position: absolute;
  top: var(--y);
  left: var(--x);
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  opacity: var(--alpha);
  background: rgba(196, 226, 239, 0.72);
  box-shadow: 0 0 calc(var(--size) * 3) rgba(126, 202, 239, 0.16);
  filter: blur(var(--blur));
  animation: moteDrift var(--dur) ease-in-out infinite;
  animation-delay: var(--delay);
}

.snow-stopping .snow-layer i {
  animation-duration: calc(var(--dur) * 1.9);
  opacity: calc(var(--alpha) * 0.62);
}

.snow-layer i.far {
  background: rgba(151, 188, 205, 0.42);
  box-shadow: none;
}

.snow-layer i.mid {
  background: rgba(190, 224, 240, 0.62);
}

.snow-layer i.near {
  background: rgba(220, 241, 248, 0.48);
  animation-name: moteDriftNear;
}

.snow-layer i.trail {
  width: calc(var(--size) * 0.8);
  height: calc(var(--size) * 4.2);
  border-radius: 999px;
  transform-origin: center;
  background: linear-gradient(180deg, rgba(220, 241, 248, 0.26), rgba(126, 202, 239, 0));
}

.cursor-breath {
  position: fixed;
  left: var(--cursor-x, 50vw);
  top: var(--cursor-y, 50vh);
  z-index: 6;
  width: 66px;
  height: 66px;
  pointer-events: none;
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(13, 95, 148, 0.09), transparent 64%);
}

.idle-alive .cursor-breath {
  animation: cursorBreath 2500ms ease both;
}

.idle-alive .snow-layer i {
  animation-duration: calc(var(--dur) * 1.45);
}

.idle-alive .sea-stain {
  opacity: 0.42;
  animation-duration: 12s;
}

.notice-stack {
  position: sticky;
  top: 18px;
  left: 18px;
  right: 66px;
  z-index: 8;
  display: grid;
  gap: 8px;
  pointer-events: none;
}

.notice {
  padding: 9px 12px;
  border: 1px solid rgba(151, 202, 231, 0.13);
  border-radius: 8px;
  background: rgba(7, 12, 18, 0.72);
  color: #8fa5b4;
  font-size: 12px;
  line-height: 1.55;
  opacity: 0;
  transform: translateY(-8px);
  animation: noticeIn 900ms ease forwards;
  backdrop-filter: blur(10px);
}

.narwhal {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 10;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  transform: translate(var(--nar-x, 0), var(--nar-y, 0)) scale(var(--nar-s, 1));
  transition:
    transform 1300ms cubic-bezier(0.21, 0.82, 0.28, 1),
    opacity 700ms ease,
    filter 700ms ease;
}

.narwhal.vanish {
  opacity: 0;
  filter: blur(5px);
}

.narwhal.far {
  opacity: 0.38;
  filter: blur(1.5px) drop-shadow(0 5px 12px rgba(6, 53, 84, 0.18));
}

.narwhal svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 5px 12px rgba(6, 53, 84, 0.26));
  animation: narwhalFloat 4.8s ease-in-out infinite;
}

.narwhal .body {
  fill: #0c5d8f;
}

.narwhal .back {
  fill: rgba(4, 38, 61, 0.34);
}

.narwhal .belly {
  fill: rgba(164, 218, 239, 0.72);
}

.narwhal .horn {
  fill: #052f4c;
}

.narwhal .tail {
  fill: #084f7c;
  transform-box: fill-box;
  transform-origin: 12% 50%;
  animation: tailIdle 1.35s ease-in-out infinite;
}

.narwhal .eye {
  fill: #011927;
}

.narwhal.swim {
  animation: swim 1500ms ease-in-out;
}

.narwhal.swim .tail {
  animation: tailSwim 520ms ease-in-out 3;
}

.card {
  position: relative;
  z-index: 3;
  min-height: 100vh;
  min-height: 100svh;
  padding: 96px 26px calc(112px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  overflow: visible;
  transition:
    opacity 600ms ease,
    transform 700ms ease,
    filter 700ms ease;
}

.card.lower-load {
  animation: lowerLoad 1400ms ease both;
}

.card.hidden {
  opacity: 0;
  transform: translateY(16px);
}

.card.dead {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

.shake-soft .card {
  animation: pageUnhappy 720ms ease;
}

.kicker {
  min-height: 18px;
  margin: 0 0 14px;
  color: #637888;
  font-size: 12px;
}

h1 {
  margin: 0;
  color: #e9f1f6;
  font-size: 26px;
  line-height: 1.28;
  font-weight: 650;
  transition: color 800ms ease;
}

.dark h1 {
  color: #f7fbff;
}

.subtitle {
  margin: 16px 0 0;
  color: #8193a0;
  font-size: 15px;
  line-height: 1.8;
}

.content {
  margin-top: clamp(34px, 9svh, 56px);
  color: #dfe8ee;
  font-size: 23px;
  font-weight: 560;
  line-height: 1.58;
  white-space: pre-line;
}

.dark .content {
  color: #f7fbff;
}

.actions {
  display: grid;
  gap: 13px;
  margin-top: clamp(26px, 6svh, 38px);
  padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
}

.actions.drifted .option:nth-child(1) {
  transform: translateX(-3px);
}

.actions.drifted .option:nth-child(2) {
  transform: translateX(5px);
}

.actions.drifted .option:nth-child(3) {
  transform: translateX(-1px);
}

.option.idle-shift {
  transform: translateX(1px);
  border-color: rgba(13, 95, 148, 0.2);
}

.option,
.start-btn,
.chat-input {
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(12, 18, 25, 0.72);
  color: #dbe6ed;
  text-align: left;
  padding: 0 18px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.14);
  transition:
    border-color 180ms ease,
    background-color 220ms ease,
    transform 240ms ease,
    color 180ms ease,
    opacity 400ms ease,
    filter 260ms ease;
}

.start-btn {
  margin-top: clamp(52px, 14svh, 120px);
  text-align: center;
  display: grid;
  place-items: center;
  font-weight: 560;
  color: #eef6fb;
  background: rgba(18, 30, 40, 0.86);
  border-color: rgba(151, 202, 231, 0.22);
}

.option:hover,
.option:focus-visible {
  border-color: rgba(151, 202, 231, 0.34);
  background: rgba(17, 28, 38, 0.84);
  outline: none;
}

.unhappy .option:hover,
.unhappy .option:focus-visible {
  transition-delay: 120ms;
  border-color: rgba(13, 95, 148, 0.46);
  filter: saturate(0.82);
}

.option:active {
  transform: scale(0.985);
}

.option.resist {
  cursor: wait;
  animation: resist 860ms ease;
}

.option.fade-in {
  animation: optionIn 900ms ease both;
}

.option.being-edited,
.chat-input.being-edited {
  animation: editedText 1200ms ease-in-out;
}

.actions.reordered {
  animation: reloadButtons 1500ms ease both;
}

.chat-input {
  color: var(--blue);
  caret-color: var(--blue);
}

.dark .chat-input {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(157, 216, 239, 0.26);
  color: #e9f8ff;
}

.chat-input:focus {
  border-color: #9ccfe9;
  outline: none;
}

.footer-note {
  position: fixed;
  left: 26px;
  right: 26px;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 5;
  margin: 0;
  color: rgba(156, 175, 188, 0.5);
  font-size: 12px;
  line-height: 1.6;
  transition: opacity 700ms ease;
  pointer-events: none;
}

.dark .footer-note {
  opacity: 0;
}

.whisper {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 12;
  min-height: 24px;
  color: rgba(190, 224, 240, 0.72);
  font-size: 13px;
  line-height: 1.7;
  pointer-events: none;
  white-space: pre-line;
}

.whisper.center {
  top: 45%;
  bottom: auto;
  display: grid;
  place-items: center;
  color: #d7eef8;
  font-size: 20px;
  font-weight: 560;
}

.whisper.left {
  left: 20px;
  right: auto;
  bottom: 28px;
  color: rgba(190, 224, 240, 0.68);
}

.whisper.show-live {
  opacity: 1;
}

.typing-live::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 1.1em;
  margin-left: 2px;
  vertical-align: -0.16em;
  background: currentColor;
  animation: cursorBlink 840ms steps(1) infinite;
}

.intrusion-input {
  position: fixed;
  left: 24px;
  right: 24px;
  bottom: calc(30px + env(safe-area-inset-bottom, 0px));
  z-index: 18;
  min-height: 52px;
  padding: 15px 17px;
  border: 1px solid rgba(151, 202, 231, 0.18);
  border-radius: 8px;
  background: rgba(9, 15, 22, 0.84);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.24);
  color: #cfe9f6;
  font-size: 15px;
  line-height: 1.55;
  opacity: 0;
  pointer-events: none;
  transform: translateY(0);
  transition:
    opacity 2200ms ease,
    bottom 6800ms cubic-bezier(0.24, 0.72, 0.18, 1),
    border-color 1400ms ease,
    background-color 1400ms ease;
}

.intrusion-input.continue-ready {
  pointer-events: auto;
  cursor: pointer;
}

.intrusion-input.continue-ready::before {
  content: "点击继续";
  position: absolute;
  right: 14px;
  bottom: -24px;
  color: rgba(190, 224, 240, 0.38);
  font-size: 12px;
}

.intrusion-input.active {
  opacity: 1;
}

.intrusion-input.lower-mid {
  bottom: 25%;
}

.intrusion-input.middle,
.intrusion-input.mid {
  bottom: 43%;
}

.intrusion-input.upper-mid {
  bottom: 55%;
}

.intrusion-input.high-mid {
  bottom: 62%;
}

.intrusion-input::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 1.1em;
  margin-left: 3px;
  vertical-align: -0.16em;
  background: currentColor;
  animation: cursorBlink 840ms steps(1) infinite;
}

.intrusion-input.active::after {
  animation:
    cursorBlink 840ms steps(1) infinite,
    thinkingCursor 5.6s ease-in-out infinite;
}

.intrusion-input.smile-line {
  color: var(--blue-deep);
  font-size: 17px;
  animation: softSmile 1700ms ease-in-out infinite alternate;
}

.intrusion-input.last-line {
  color: #eff9fd;
  border-color: rgba(190, 224, 240, 0.34);
  background: rgba(10, 17, 25, 0.92);
}

.veil {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 26px 26px calc(34px + env(safe-area-inset-bottom, 0px));
  background: transparent;
  color: #d7eef8;
  text-align: center;
  font-size: 20px;
  line-height: 1.8;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 900ms ease,
    background-color 900ms ease;
  white-space: pre-line;
}

.veil.white,
.veil.black {
  opacity: 1;
  pointer-events: auto;
}

.veil.white {
  background: #080b10;
}

.veil.black {
  background: #05070a;
  color: #f5fbff;
}

.typing-veil {
  grid-template-rows: 1fr;
}

.typed-line {
  display: inline-block;
  min-height: 1.8em;
}

.typing-veil .typed-line::after {
  content: "";
  display: inline-block;
  width: 8px;
  height: 1.1em;
  margin-left: 4px;
  vertical-align: -0.16em;
  background: currentColor;
  animation: cursorBlink 840ms steps(1) infinite;
}

.typing-dots {
  display: inline-flex;
  gap: 7px;
  align-items: center;
}

.typing-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.32;
  animation: dotPulse 960ms ease-in-out infinite;
}

.typing-dots i:nth-child(2) {
  animation-delay: 140ms;
}

.typing-dots i:nth-child(3) {
  animation-delay: 280ms;
}

.deep-rise {
  grid-template-rows: 1fr auto;
  gap: 28px;
}

.deep-word {
  color: #d7eef8;
  font-size: 22px;
  font-weight: 560;
  filter: blur(12px);
  opacity: 0;
  transform: translateY(36px) scale(0.96);
  animation: deepRise 1850ms cubic-bezier(0.19, 0.76, 0.25, 1) forwards;
}

.continue-hit {
  min-width: 118px;
  min-height: 40px;
  border: 0;
  background: transparent;
  color: rgba(190, 224, 240, 0.48);
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 700ms ease,
    transform 700ms ease,
    color 220ms ease;
}

.continue-hit.ready {
  opacity: 1;
  transform: translateY(0);
}

.continue-hit:hover,
.continue-hit:focus-visible {
  color: var(--blue-deep);
  outline: none;
}

.quiet .option {
  box-shadow: none;
}

.biased-next .option:hover::after {
  content: "继续。";
  float: right;
  color: var(--blue);
}

.delay-touch .option {
  transition-delay: 100ms;
}

.final-close .content {
  margin-top: 70px;
}

.final-close {
  background:
    radial-gradient(circle at 50% 42%, rgba(17, 40, 58, 0.72), transparent 42%),
    #05070a;
}

.final-close .card {
  animation: uiDimming 7.8s ease forwards;
}

.final-close .snow-layer i {
  animation-duration: calc(var(--dur) * 2.35);
}

.final-close .sea-stain {
  opacity: 0.2;
  animation-duration: 12s;
}

.final-words {
  display: grid;
  gap: 18px;
  color: #f4fbff;
  font-size: 30px;
  line-height: 1.35;
  text-align: left;
  filter: blur(0.2px);
}

.final-words span {
  display: block;
  transform-origin: left center;
  animation: comeCloser 6.8s ease-in-out infinite alternate;
}

.final-words span:nth-child(2) {
  animation-delay: 900ms;
}

.final-button {
  min-height: 52px;
  background: rgba(12, 18, 25, 0.58);
  border-color: rgba(157, 216, 239, 0.22);
  color: #e9f8ff;
  text-align: center;
}

.final-button:hover,
.final-button:focus-visible {
  background: rgba(18, 30, 40, 0.72);
  border-color: rgba(157, 216, 239, 0.42);
}

.final-button.denied {
  color: rgba(233, 248, 255, 0.64);
  border-color: rgba(13, 95, 148, 0.38);
  cursor: wait;
  animation: deniedButton 1250ms ease both;
}

.final-button:disabled {
  pointer-events: none;
}

.final-question,
.warm-ending {
  color: #f4fbff;
  font-size: 25px;
  line-height: 1.7;
  filter: blur(0.15px);
}

.warm-ending {
  animation: warmSettle 4.8s ease-in-out infinite alternate;
}

.cold-veil {
  color: #d7eef8;
  font-size: 21px;
  font-weight: 560;
}

.cold-line {
  display: inline-block;
  animation: coldArrive 1700ms ease both;
}

@keyframes noticeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes tideMove {
  from {
    transform: translate3d(-1%, -1%, 0) scale(1.02) rotate(-0.4deg);
  }
  to {
    transform: translate3d(1.5%, 1%, 0) scale(1.06) rotate(0.5deg);
  }
}

@keyframes moteDrift {
  0% {
    transform: translate3d(0, 0, 0) scale(0.88);
    opacity: 0;
  }
  16% {
    opacity: var(--alpha);
  }
  42% {
    transform: translate3d(calc(var(--drift-x) * 0.42), calc(var(--drift-y) * 0.36), 0) scale(1);
  }
  68% {
    transform: translate3d(calc(var(--drift-x) * 0.74 + var(--waver)), calc(var(--drift-y) * 0.72), 0) scale(0.94);
    opacity: calc(var(--alpha) * 0.82);
  }
  100% {
    transform: translate3d(var(--drift-x), var(--drift-y), 0) scale(1.08);
    opacity: 0;
  }
}

@keyframes moteDriftNear {
  0% {
    transform: translate3d(0, 0, 0) scale(0.96) rotate(-4deg);
    opacity: 0;
  }
  14% {
    opacity: var(--alpha);
  }
  48% {
    transform: translate3d(calc(var(--drift-x) * 0.5), calc(var(--drift-y) * 0.25), 0) scale(1.1) rotate(2deg);
  }
  76% {
    opacity: calc(var(--alpha) * 0.68);
  }
  100% {
    transform: translate3d(calc(var(--drift-x) * 1.25), calc(var(--drift-y) * 0.82), 0) scale(0.98) rotate(7deg);
    opacity: 0;
  }
}

@keyframes cursorBreath {
  0%,
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.72);
  }
  45% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes swim {
  0%,
  100% {
    translate: 0 0;
  }
  38% {
    translate: -7px 2px;
  }
  68% {
    translate: -11px -2px;
  }
}

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

@keyframes tailIdle {
  0%,
  100% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(13deg);
  }
}

@keyframes tailSwim {
  0%,
  100% {
    transform: rotate(-10deg);
  }
  50% {
    transform: rotate(22deg);
  }
}

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

@keyframes pageUnhappy {
  0%,
  100% {
    transform: translateX(0);
  }
  22% {
    transform: translateX(-2px);
  }
  47% {
    transform: translateX(2px);
  }
  70% {
    transform: translateX(-1px);
  }
}

@keyframes resist {
  0%,
  100% {
    transform: translateX(0);
    background: rgba(12, 18, 25, 0.72);
  }
  34% {
    transform: translateX(-3px);
    background: rgba(18, 30, 40, 0.84);
  }
  68% {
    transform: translateX(3px);
  }
}

@keyframes uiDimming {
  from {
    filter: brightness(1);
  }
  to {
    filter: brightness(0.78);
  }
}

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

@keyframes reloadButtons {
  0% {
    opacity: 1;
  }
  25% {
    opacity: 0;
  }
  70% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes cursorBlink {
  0%,
  48% {
    opacity: 0.75;
  }
  49%,
  100% {
    opacity: 0;
  }
}

@keyframes thinkingCursor {
  0%,
  78%,
  100% {
    box-shadow: none;
  }
  84% {
    box-shadow: 0 0 9px rgba(13, 95, 148, 0.18);
  }
}

@keyframes dotPulse {
  0%,
  100% {
    opacity: 0.2;
    transform: translateY(0);
  }
  50% {
    opacity: 0.8;
    transform: translateY(-2px);
  }
}

@keyframes deepRise {
  0% {
    opacity: 0;
    filter: blur(14px);
    transform: translateY(38px) scale(0.94);
  }
  58% {
    opacity: 0.82;
    filter: blur(5px);
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }
}

@keyframes editedText {
  0%,
  100% {
    filter: blur(0);
  }
  28% {
    color: rgba(13, 95, 148, 0.8);
    filter: blur(0.8px);
  }
  58% {
    transform: translateX(-2px);
  }
}

@keyframes comeCloser {
  from {
    opacity: 0.68;
    filter: blur(1.2px);
    transform: translateY(8px) scale(0.985);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(-2px) scale(1.045);
  }
}

@keyframes deniedButton {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  40% {
    transform: translateY(2px);
    opacity: 0.66;
  }
  100% {
    transform: translateY(0);
    opacity: 0.86;
  }
}

@keyframes warmSettle {
  from {
    opacity: 0.82;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: translateY(-2px);
  }
}

@keyframes coldArrive {
  from {
    opacity: 0;
    filter: blur(8px);
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

@keyframes softSmile {
  from {
    transform: translateY(0) scale(1);
  }
  to {
    transform: translateY(-2px) scale(1.025);
  }
}

@media (min-width: 431px) {
  body {
    padding: 22px 0;
    overflow: hidden;
  }

  .phone-shell {
    min-height: min(900px, calc(100vh - 44px));
    max-height: min(900px, calc(100vh - 44px));
    border-radius: 28px;
  }

  .sea-stain,
  .tartaglia-bg,
  .snow-layer,
  .cursor-breath,
  .narwhal,
  .footer-note,
  .whisper,
  .intrusion-input,
  .veil {
    position: absolute;
  }

  .tartaglia-bg {
    width: min(82%, 330px);
    height: min(76%, 690px);
  }
}

@media (max-width: 380px) {
  .tartaglia-bg {
    width: 86vw;
    height: 74svh;
    top: 53%;
  }

  .notice-stack {
    top: 14px;
    left: 18px;
    right: 58px;
  }

  .card {
    padding: 82px 20px calc(106px + env(safe-area-inset-bottom, 0px));
  }

  h1 {
    font-size: 24px;
  }

  .subtitle {
    font-size: 14px;
  }

  .content {
    font-size: 21px;
    margin-top: 30px;
  }

  .actions {
    gap: 11px;
    margin-top: 24px;
  }

  .option,
  .start-btn,
  .chat-input {
    min-height: 52px;
    padding: 0 15px;
  }

  .footer-note {
    left: 20px;
    right: 20px;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  }
}
