:root {
  --bg: #F6F1E9;
  --paper: #FFFDF8;
  --ink: #16141D;
  --ink-2: #57525F;
  --ink-3: #8E8896;
  --line: rgba(22, 20, 29, .08);
  --coral: #FF6B5B;
  --coral-soft: #FFE1DC;
  --lilac: #B8A9FF;
  --lilac-soft: #ECE8FF;
  --mint: #BDE5D2;
  --mint-soft: #E5F4EC;
  --butter: #FFD86B;
  --butter-soft: #FFF3CF;
  --sky: #A9D4F5;
  --hit: #34C08A;
  --app-pink: #E5739B;
  --miss: #FF6B5B;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --display: 'Unbounded', system-ui, sans-serif;
  --font: 'Onest', system-ui, -apple-system, sans-serif;
  --hand: 'Caveat', cursive;
  --shadow-1: 0 1px 2px rgba(22, 20, 29, .05), 0 10px 30px -14px rgba(22, 20, 29, .18);
  --shadow-2: 0 2px 6px rgba(22, 20, 29, .06), 0 30px 60px -24px rgba(22, 20, 29, .35);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 17px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p { margin: 0; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

.title {
  font-family: var(--display); font-weight: 600; letter-spacing: -0.04em; line-height: 1;
  font-size: clamp(36px, 6vw, 76px); text-wrap: balance;
}
.title--light { color: #fff; }
.split .line { overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }

/* ---------- App Store badge ---------- */
.appstore {
  display: inline-flex; align-items: center; gap: 10px;
  height: 58px; padding: 0 22px 0 18px; border-radius: 14px;
  background: #000; color: #fff; box-shadow: inset 0 0 0 1px #A6A6A6, 0 14px 30px -14px rgba(0, 0, 0, .55);
  transition: transform 160ms var(--ease-out), box-shadow 200ms ease;
}
.appstore svg { width: 30px; height: 30px; margin-top: -3px; }
.appstore span { display: flex; flex-direction: column; line-height: 1.05; }
.appstore small { font-size: 12px; font-weight: 500; letter-spacing: .01em; }
.appstore b { font-size: 23px; font-weight: 600; letter-spacing: -0.02em; font-family: -apple-system, 'SF Pro Display', var(--font); }
.appstore:active { transform: scale(0.97); }
.appstore--soon { cursor: default; }
.appstore--soon:active { transform: none; }
.appstore--light { background: #fff; color: #000; box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .4); }
@media (hover: hover) and (pointer: fine) {
  .appstore:hover { box-shadow: inset 0 0 0 1px #A6A6A6, 0 20px 36px -14px rgba(0, 0, 0, .6); }
}

/* =========================================================
   HERO
   ========================================================= */
.hero { position: relative; overflow: hidden; padding: clamp(56px, 9vh, 96px) 0 0; isolation: isolate; }
.hero__grid {
  position: absolute; inset: 0; z-index: -2;
  background-image:
    linear-gradient(rgba(126, 170, 150, .22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(126, 170, 150, .22) 1px, transparent 1px);
  background-size: 64px 64px; background-position: center top;
  -webkit-mask-image: radial-gradient(60% 70% at 50% 45%, #000 20%, transparent 75%);
  mask-image: radial-gradient(60% 70% at 50% 45%, #000 20%, transparent 75%);
}
.hero__glow {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(28% 32% at 22% 62%, rgba(184, 169, 255, .35), transparent 70%),
    radial-gradient(26% 30% at 80% 58%, rgba(255, 107, 91, .22), transparent 70%),
    radial-gradient(40% 30% at 50% 76%, rgba(189, 229, 210, .9), transparent 72%);
}
/* Низ херо растворяется в фоне страницы: сетка и подсветки уходят в размытие,
   а не обрываются ровной линией. Телефон и предметы выше этого слоя и остаются чёткими. */
.hero::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; pointer-events: none;
  height: min(340px, 36%);
  background: linear-gradient(to bottom, rgba(246, 241, 233, 0) 0%, rgba(246, 241, 233, .7) 55%, var(--bg) 100%);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 55%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 55%);
}
.hero__copy { position: relative; z-index: 3; text-align: center; padding: 0 16px; }
.wordmark {
  font-family: var(--display); font-weight: 700; letter-spacing: -0.06em; line-height: .9;
  font-size: clamp(60px, 12vw, 172px); white-space: nowrap;
  color: var(--ink);
}
/* на узких телефонах слово не влезало в 60px и последняя буква уезжала на вторую строку */
@media (max-width: 420px) { .wordmark { font-size: 15vw; } }
.hero__phrase { margin-top: 18px; font-size: clamp(18px, 2vw, 24px); font-weight: 500; color: var(--ink-2); letter-spacing: -0.01em; }
.hero .appstore { margin-top: 30px; }

.stage {
  position: relative; z-index: 2; margin: 36px auto 0; width: min(1120px, 100%);
  display: flex; justify-content: center; padding-bottom: 96px;
}

/* iPhone */
.iphone {
  --w: clamp(250px, 26vw, 330px);
  position: relative; width: var(--w); aspect-ratio: 390 / 844;
  border-radius: calc(var(--w) * .165); padding: calc(var(--w) * .03);
  background: linear-gradient(135deg, #D9D5CF 0%, #8F8B86 18%, #E9E6E1 40%, #7E7A75 70%, #CFCBC5 100%);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, .25),
    0 60px 90px -40px rgba(22, 20, 29, .55),
    0 30px 50px -30px rgba(22, 20, 29, .4);
}
.iphone::before {
  content: ''; position: absolute; inset: calc(var(--w) * .012); border-radius: calc(var(--w) * .15);
  background: #0B0A0F;
}
.iphone__btn { position: absolute; width: 4px; border-radius: 2px; background: linear-gradient(90deg, #A9A5A0, #E2DFDA); }
.iphone__btn--action { left: -3px; top: 17%; height: 4.5%; }
.iphone__btn--up { left: -3px; top: 25%; height: 8%; }
.iphone__btn--down { left: -3px; top: 35%; height: 8%; }
.iphone__btn--power { right: -3px; top: 28%; height: 12%; background: linear-gradient(270deg, #A9A5A0, #E2DFDA); }
.iphone__screen {
  position: relative; width: 100%; height: 100%; overflow: hidden; z-index: 1;
  border-radius: calc(var(--w) * .13); background: #E8EEE8;
}
.iphone__screen::after {
  content: ''; position: absolute; top: 2.2%; left: 50%; width: 31%; height: 3.6%; transform: translateX(-50%);
  border-radius: 999px; background: #000; z-index: 5;
}
.shot { position: absolute; inset: 0; background: var(--sb, #E8EEE8); container-type: inline-size; }
.shot img { position: absolute; left: 0; top: 5.8%; width: 100%; height: 94.2%; object-fit: cover; object-position: 50% 0; }
.shot::before {
  content: '9:41'; position: absolute; top: 2.15%; left: 11%; z-index: 2;
  font-size: 4.4cqw; font-weight: 600; color: #16141D; font-family: -apple-system, var(--font);
}
.shot::after {
  content: ''; position: absolute; top: 2.5%; right: 9%; width: 17%; height: 2.4%; z-index: 2;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 66 14'%3E%3Cg fill='%2316141D'%3E%3Crect x='0' y='9' width='3' height='4' rx='1'/%3E%3Crect x='5' y='6.5' width='3' height='6.5' rx='1'/%3E%3Crect x='10' y='4' width='3' height='9' rx='1'/%3E%3Crect x='15' y='1.5' width='3' height='11.5' rx='1'/%3E%3Cpath d='M30 4.6a9 9 0 0 1 11.4 0l-1.5 1.6a6.8 6.8 0 0 0-8.4 0zM32.6 7.6a5.2 5.2 0 0 1 6.2 0l-1.5 1.6a3 3 0 0 0-3.2 0zM35.7 10.4l1.2 1.3-1.2 1.3-1.2-1.3z'/%3E%3Crect x='46' y='1.5' width='17' height='11' rx='3.2' fill='none' stroke='%2316141D' stroke-opacity='.4'/%3E%3Crect x='47.8' y='3.3' width='12' height='7.4' rx='1.8'/%3E%3C/g%3E%3C/svg%3E") right center / contain no-repeat;
}
.pet-hit {
  position: absolute; left: 12%; top: 55%; width: 38%; height: 16%; z-index: 4;
  border: 0; background: transparent; cursor: pointer; border-radius: 40%;
}
.heart-p { position: absolute; z-index: 6; pointer-events: none; font-size: 22px; will-change: transform, opacity; }

/* floating bits */
.bit { position: absolute; z-index: 3; will-change: translate; }
.bit--photo1 { left: 7%; top: 3%; }
.bit--photo2 { right: 8%; top: 0%; }
.bit--appicon { left: 27%; top: 9%; }
.bit--moodcard { left: 2%; top: 31%; }
.bit--letter { left: 14%; top: 54%; }
.bit--digits { left: 22%; top: 76%; }
.bit--coin { right: 27%; top: 8%; }
.bit--stat { right: 3%; top: 29%; }
.bit--heart { right: 24%; top: 44%; }
.bit--ball { right: 13%; top: 58%; }
.bit--level { right: 2%; top: 73%; }

.polaroid {
  width: 150px; padding: 9px 9px 30px; background: #fff; border-radius: 6px;
  transform: rotate(var(--r, 0deg)); box-shadow: var(--shadow-2);
}
.polaroid canvas { width: 100%; aspect-ratio: 4 / 3; border-radius: 2px; }
.polaroid::before {
  content: ''; position: absolute; top: -7px; left: 50%; width: 14px; height: 14px; margin-left: -7px;
  border-radius: 50%; background: radial-gradient(circle at 35% 35%, #FF9B8F, var(--coral)); box-shadow: 0 2px 3px rgba(0, 0, 0, .25);
}
.polaroid { position: relative; }
.polaroid--sm { width: 110px; padding: 7px 7px 22px; }
.envelope { width: 150px; transform: rotate(var(--r, 0deg)); filter: drop-shadow(0 18px 24px rgba(22, 20, 29, .18)); }
.envelope svg { width: 100%; display: block; }
.ball {
  width: 64px; height: 64px; border-radius: 50%;
  background:
    radial-gradient(circle at 32% 30%, rgba(255, 255, 255, .55), transparent 35%),
    radial-gradient(circle at 50% 50%, #E4F05A, #B9CF2E 70%);
  box-shadow: inset -6px -8px 14px rgba(0, 0, 0, .15), 0 18px 24px -10px rgba(22, 20, 29, .35);
  position: relative; overflow: hidden;
}
.ball::before, .ball::after {
  content: ''; position: absolute; width: 100%; height: 100%; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .9);
}
.ball::before { left: -62%; top: 0; }
.ball::after { right: -62%; top: 0; }
.ball--sm { width: 46px; height: 46px; }
.glass {
  background: rgba(255, 255, 255, .72); -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: var(--shadow-2), inset 0 0 0 1px rgba(255, 255, 255, .6);
}
.stat { display: flex; align-items: center; gap: 12px; padding: 10px 18px 10px 10px; border-radius: 999px; }
.stat__ico { width: 40px; height: 40px; object-fit: contain; }
.stat__txt { display: flex; flex-direction: column; line-height: 1.15; }
.stat small { font-size: 12px; color: var(--ink-3); }
.stat b { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
.digits { display: flex; gap: 6px; transform: rotate(var(--r, 0deg)); }
.digits i {
  font-style: normal; width: 44px; height: 54px; border-radius: 12px; display: grid; place-items: center;
  font-family: var(--display); font-weight: 600; font-size: 22px; color: #fff; background: var(--miss);
  box-shadow: 0 14px 20px -12px rgba(22, 20, 29, .45);
}
.digits i.hit { background: var(--hit); }

/* =========================================================
   FEATURES
   ========================================================= */
.features { position: relative; padding: 120px 0 140px; }
.features .title { text-align: center; margin: 0 auto 64px; max-width: 900px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: var(--paper); border-radius: 32px; box-shadow: var(--shadow-1); overflow: hidden;
  display: flex; flex-direction: column;
}
.card__visual { position: relative; height: 380px; overflow: hidden; }
.card__text { padding: 28px 30px 32px; }
.card__num { font-family: var(--display); font-size: 13px; font-weight: 600; color: var(--coral); }
.card h3 { margin-top: 8px; font-family: var(--display); font-weight: 600; font-size: 22px; letter-spacing: -0.03em; line-height: 1.15; }
.card p { margin-top: 12px; color: var(--ink-2); font-size: 16px; }

/* pet card */
.pet { background: #E8EEE8; }
.pet__view {
  position: absolute; inset: 0;
  background: url(../img/room-day.jpg) no-repeat; background-size: 165%; background-position: 4% 64%;
}
.pet-hit--card { left: 18%; top: 18%; width: 52%; height: 46%; }
.pet__panel {
  position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 5;
  padding: 12px; border-radius: 22px;
  background: rgba(255, 255, 255, .78); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: var(--shadow-1);
}
.pet__bars { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 2px 4px 10px; }
.bar span { font-size: 12px; color: var(--ink-3); }
.bar i { display: block; margin-top: 4px; height: 6px; border-radius: 999px; background: rgba(22, 20, 29, .08); overflow: hidden; }
.bar b { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--butter), var(--coral)); transform-origin: left; transform: scaleX(var(--v)); transition: transform 600ms var(--ease-out); }
#barMood { background: linear-gradient(90deg, var(--lilac), var(--coral)); }
.pet__actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.act {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px;
  border: 0; border-radius: 14px; background: #fff; cursor: pointer; font-size: 12px; font-weight: 600;
  box-shadow: 0 1px 2px rgba(22, 20, 29, .06);
  transition: transform 160ms var(--ease-out), background-color 200ms ease;
}
.act em { font-style: normal; font-size: 20px; line-height: 1.2; }
.act:active { transform: scale(0.95); }
.act.is-done { background: var(--mint-soft); }
.pet__bonus {
  position: absolute; top: 14px; left: 50%; z-index: 5; padding: 8px 14px; border-radius: 999px;
  background: var(--ink); color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap;
  transform: translate(-50%, -12px); opacity: 0; transition: opacity 250ms ease, transform 400ms var(--ease-out);
}
.pet__bonus.is-on { opacity: 1; transform: translate(-50%, 0); }
@media (hover: hover) and (pointer: fine) { .act:hover { background: var(--butter-soft); } .act.is-done:hover { background: var(--mint-soft); } }

/* letter card */
.letter {
  background: #5E5753;
  background-image: radial-gradient(120% 80% at 30% 20%, #7A726C, #4E4844);
  display: grid; place-items: center;
}
.paper {
  position: relative; width: 74%; height: 62%; margin-top: -40px; padding: 22px 22px;
  background: repeating-linear-gradient(#FFFDF8 0 33px, #E9E2D6 33px 34px);
  background-position: 0 18px;
  border-radius: 4px; transform: rotate(-3deg); transform-origin: 50% 100%;
  box-shadow: 0 30px 40px -20px rgba(0, 0, 0, .55);
}
.paper__ink { font-family: var(--hand); font-weight: 600; font-size: 24px; line-height: 34px; color: #2B3061; }
.paper__ink .caret { display: inline-block; width: 2px; height: 22px; margin-left: 1px; vertical-align: -3px; background: #2B3061; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.envelope--fly { position: absolute; left: 50%; top: 46%; width: 150px; margin: -50px 0 0 -75px; opacity: 0; pointer-events: none; }
.btn-send {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
  height: 48px; padding: 0 28px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--coral); color: #fff; font-weight: 600; font-size: 15px;
  box-shadow: 0 14px 24px -12px rgba(255, 107, 91, .9);
  transition: transform 160ms var(--ease-out), opacity 200ms ease;
}
.btn-send:active { transform: translateX(-50%) scale(0.97); }
.btn-send:disabled { opacity: .5; cursor: default; }
.sent {
  position: absolute; left: 50%; top: 42%; padding: 12px 18px; border-radius: 999px; white-space: nowrap;
  background: #fff; font-size: 14px; font-weight: 600; box-shadow: var(--shadow-2);
  transform: translate(-50%, 8px); opacity: 0; pointer-events: none;
}

/* board card */
.board { background: #DCE6DF; background-image: linear-gradient(rgba(126, 170, 150, .25) 1px, transparent 1px), linear-gradient(90deg, rgba(126, 170, 150, .25) 1px, transparent 1px); background-size: 38px 38px; display: grid; place-items: center; }
.board__noren { position: absolute; top: 34px; left: 50%; transform: translateX(-50%); width: 78%; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; z-index: 2; }
.board__noren::before { content: ''; position: absolute; top: -8px; left: -8px; right: -8px; height: 8px; border-radius: 4px; background: #C8A983; }
.board__noren i { height: 70px; border-radius: 0 0 4px 4px; background: #2A2F5C; position: relative; }
.board__noren i:nth-child(2)::after, .board__noren i:nth-child(4)::after {
  content: ''; position: absolute; left: 6px; right: 6px; bottom: 6px; height: 14px;
  background: radial-gradient(circle at 50% 100%, transparent 4px, rgba(255, 255, 255, .25) 4.5px 5.5px, transparent 6px) 0 0 / 12px 7px;
}
.board__frame {
  position: relative; width: 78%; margin-top: 70px; padding: 12px; border-radius: 6px;
  background: #F1E8D6; box-shadow: inset 0 0 0 7px #C8A983, 0 24px 34px -20px rgba(22, 20, 29, .5);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.slot {
  position: relative; aspect-ratio: 4 / 3; border-radius: 3px; background: #fff; padding: 3px;
  box-shadow: 0 4px 8px -4px rgba(22, 20, 29, .35); border: 0;
}
.slot canvas { width: 100%; height: 100%; border-radius: 2px; }
.slot::before {
  content: ''; position: absolute; top: -3px; left: 50%; width: 7px; height: 7px; margin-left: -3.5px; border-radius: 50%;
  background: var(--coral); z-index: 1; box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
}
.slot--empty { background: transparent; box-shadow: none; border: 1.5px dashed #B9A88C; cursor: pointer; display: grid; place-items: center; color: #9B8A6E; font-size: 22px; font-weight: 300; }
.slot--empty::before { display: none; }
.slot--empty span { transition: transform 300ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .slot--empty:hover span { transform: scale(1.2); } }
.slot--empty:active { transform: scale(0.95); }
.board__note {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); white-space: nowrap;
  padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, .85); font-size: 13px; font-weight: 600; color: var(--ink-2);
  transition: opacity 200ms ease, filter 200ms ease;
}
.board__note.is-swap { opacity: 0; filter: blur(3px); }

/* =========================================================
   GAMES — заголовок по центру, слева плашка с играми,
   посередине телефон, справа реплики партнёра
   ========================================================= */
.games { position: relative; padding: 150px 0 40px; overflow-x: clip; }
.games__head { text-align: center; }
.games__lead { margin: 22px auto 0; max-width: 560px; font-size: 18px; color: var(--ink-2); }

.games__stage {
  position: relative; isolation: isolate;
  margin-top: 64px; display: grid; align-items: center; gap: 48px;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}
/* подсветка: розовое пятно за телефоном, сиреневое за играми, мятное за партнёром,
   и мягкий свет «на полу» под телефоном */
.games__stage::before {
  content: ''; position: absolute; z-index: -1; inset: -12% -8%; pointer-events: none;
  background:
    radial-gradient(26% 46% at 50% 48%, rgba(245, 110, 158, .48), transparent 70%),
    radial-gradient(22% 40% at 31% 56%, rgba(184, 169, 255, .55), transparent 70%),
    radial-gradient(22% 40% at 69% 44%, rgba(23, 150, 127, .3), transparent 70%),
    radial-gradient(20% 9% at 50% 93%, rgba(245, 110, 158, .22), transparent 72%);
  filter: blur(24px);
}

/* ---------- слева: плашка с играми ---------- */
.gpanel, .gfeed {
  width: 100%; max-width: 320px; min-height: 430px; padding: 18px; border-radius: 28px;
  background: rgba(255, 255, 255, .86); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: var(--shadow-2);
}
.gpanel { justify-self: end; }
.gpanel__head { display: flex; flex-direction: column; gap: 4px; padding: 4px 8px 14px; }
.gpanel__tag { align-self: flex-start; padding: 5px 10px; border-radius: 9px; background: #FCE3EC; color: #C73A70; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.gpanel__note { font-size: 14px; color: var(--ink-3); }
.gtabs { display: flex; flex-direction: column; gap: 2px; }
.gtab {
  position: relative; display: grid; grid-template-columns: 38px 1fr; gap: 12px; align-items: center;
  padding: 11px 10px; border: 0; border-radius: 16px; background: transparent; text-align: left; cursor: pointer;
  overflow: hidden; transition: background-color 250ms ease;
}
.gtab i {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-style: normal;
  font-family: var(--display); font-weight: 600; font-size: 14px; background: rgba(22, 20, 29, .05); color: var(--ink-3);
  transition: background-color 250ms ease, color 250ms ease;
}
.gtab b { display: block; font-family: var(--display); font-weight: 600; font-size: 15px; letter-spacing: -0.02em; color: var(--ink-2); transition: color 250ms ease; }
.gtab small { display: block; margin-top: 1px; font-size: 13px; color: var(--ink-3); }
.gtab.is-on { background: #FDF0F4; }
.gtab.is-on i { background: var(--app-pink); color: #fff; }
.gtab.is-on b { color: var(--ink); }
.gtab__bar { position: absolute; left: 60px; right: 12px; bottom: 6px; height: 3px; border-radius: 3px; overflow: hidden; }
.gtab.is-on .gtab__bar { background: rgba(229, 115, 155, .18); }
.gtab.is-on .gtab__bar::after {
  content: ''; position: absolute; inset: 0; background: var(--app-pink); transform-origin: left;
  animation: gprog var(--dur, 9s) linear forwards;
}
.gtabs.is-paused .gtab__bar::after { animation-play-state: paused; }
@keyframes gprog { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (hover: hover) and (pointer: fine) { .gtab:not(.is-on):hover { background: rgba(22, 20, 29, .03); } }

/* ---------- посередине: телефон ---------- */
.gphone { position: relative; isolation: isolate; padding: 16px 0; }
.gphone::before {
  content: ''; position: absolute; inset: -6% -40%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40% 44% at 50% 46%, rgba(245, 110, 158, .3), transparent 70%);
  filter: blur(8px);
}
.iphone--games {
  --w: clamp(280px, 24vw, 320px);
  /* тень под телефоном: мягкая и в тон розовой подсветке, а не тёмное пятно */
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, .18),
    0 34px 60px -34px rgba(150, 50, 95, .32),
    0 14px 26px -18px rgba(22, 20, 29, .14);
}

/* ---------- справа: реплики партнёра ---------- */
.gfeed { justify-self: start; display: flex; flex-direction: column; gap: 14px; min-height: var(--side-h, 430px); }
.gfeed__who { display: flex; align-items: center; gap: 10px; padding: 4px 4px 14px; border-bottom: 1px solid rgba(22, 20, 29, .06); }
.gfeed__who img { width: 44px; height: 44px; padding: 6px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-1); }
.gfeed__who b { display: block; font-size: 15px; font-weight: 600; }
.gfeed__who small { display: block; font-size: 13px; color: var(--ink-3); }
.gfeed__list { flex: 1; display: flex; flex-direction: column; justify-content: flex-start; align-items: flex-start; gap: 8px; }
.gmsg {
  max-width: 100%; padding: 11px 15px; border-radius: 6px 20px 20px 20px; background: #fff; box-shadow: var(--shadow-1);
  font-size: 15px; line-height: 1.4; animation: gmsg 450ms var(--ease-out);
}
.gmsg--voice { background: #FDF0F4; }
.gmsg--voice::before { content: '🎙 '; }
.gmsg.is-old { opacity: .45; transition: opacity 300ms ease; }
@keyframes gmsg { from { opacity: 0; transform: translateY(8px) scale(.97); } }

/* =========================================================
   экран игры — копия экрана игры из приложения (прототип, светлая тема).
   Вёрстка в «точках» телефона шириной 390, в мокап вписывается масштабом.
   ========================================================= */
.gs {
  --accent: #C73A70; --accent-btn: #F56E9E; --text: #2B1D27;
  --t74: rgba(43, 29, 39, .74); --t56: rgba(43, 29, 39, .56); --t38: rgba(43, 29, 39, .38);
  --line: rgba(92, 40, 66, .08); --tint: rgba(92, 40, 66, .06); --ok: #17967F; --bad: #DC4A62;
  --card-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 1px 2px rgba(92, 40, 66, .06), 0 12px 26px -16px rgba(92, 40, 66, .28);
  position: absolute; left: 0; top: 0; width: 390px; height: 873px; overflow: hidden; isolation: isolate;
  transform-origin: 0 0; transform: scale(var(--k, .77));
  background:
    radial-gradient(120% 48% at 12% -8%, rgba(245, 110, 158, .16), transparent 62%),
    radial-gradient(90% 40% at 110% 105%, rgba(23, 150, 127, .07), transparent 60%),
    #F6F1EC;
  color: var(--text); font-family: 'Nunito', -apple-system, system-ui, sans-serif; font-size: 16px; line-height: normal;
  -webkit-font-smoothing: antialiased;
}
.gs-status {
  height: 56px; display: flex; align-items: center; justify-content: space-between; padding: 4px 34px 0 42px;
  font-family: -apple-system, 'SF Pro Text', var(--font); font-weight: 600; font-size: 17px;
}
.gs-status i { position: relative; width: 26px; height: 12px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(43, 29, 39, .45); }
.gs-status i::after { content: ''; position: absolute; inset: 2px 6px 2px 2px; border-radius: 2px; background: var(--text); }
.gs-party { height: calc(100% - 56px); display: flex; flex-direction: column; padding: 10px 18px 34px; }
.gs-home { position: absolute; left: 50%; bottom: 8px; width: 134px; height: 5px; margin-left: -67px; border-radius: 9px; background: var(--text); }

.party__bar { display: flex; align-items: center; gap: 12px; height: 34px; }
.party__close { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--tint); color: var(--text); }
.party__close svg { width: 14px; height: 14px; }
.party__step { flex: 1; font-size: 13px; font-weight: 700; color: var(--t56); }
.party__score { font-size: 13px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.party__meter { height: 4px; margin-top: 12px; border-radius: 100px; background: var(--line); overflow: hidden; }
.party__meter b { display: block; height: 100%; border-radius: inherit; background: var(--accent-btn); transition: width 700ms var(--ease-out); }
.party__screen { flex: 1; display: flex; flex-direction: column; gap: 12px; margin-top: 20px; min-height: 0; }
.party__label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--t38); }
.party__title { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.party__text { font-size: 14px; line-height: 1.5; color: var(--t74); }
.party__text b { color: var(--text); }
.party__phrase { font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 30px; }
.party__gain { font-size: 44px; font-weight: 800; letter-spacing: -.03em; color: var(--accent); animation: gpop 500ms cubic-bezier(.34, 1.56, .64, 1); }
.party__big { font-size: 56px; font-weight: 800; letter-spacing: -.03em; color: var(--accent); text-align: center; line-height: 1.1; }
.party__feedback { min-height: 21px; font-size: 14px; font-weight: 700; line-height: 21px; color: var(--accent); }
@keyframes gpop { from { opacity: 0; transform: scale(.7); } }

.gs-field {
  height: 52px; display: flex; align-items: center; padding: 0 16px; border-radius: 14px;
  background: #fff; border: 1px solid var(--line); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .22);
  font-size: 15px; color: var(--text);
}
.gs-field [data-txt]:empty::before { content: attr(data-ph); color: rgba(43, 29, 39, .35); }
.gs-caret { width: 1.5px; height: 20px; margin-left: 1px; background: var(--accent-btn); animation: gcaret 1s steps(1) infinite; }
@keyframes gcaret { 50% { opacity: 0; } }
.gs-btn {
  height: 52px; display: grid; place-items: center; border-radius: 14px; padding: 0 18px;
  background: var(--accent-btn); color: #3A0E24; font-size: 15px; font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -1px 0 rgba(120, 20, 60, .12), 0 2px 4px rgba(200, 50, 110, .18), 0 10px 22px -10px rgba(232, 84, 138, .6);
  transition: transform 120ms ease, filter 120ms ease;
}
.gs-btn--secondary { background: var(--tint); color: var(--text); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9); }
.gs-form { display: flex; flex-direction: column; gap: 8px; }
.is-press { transform: translateY(1px) scale(.97); filter: brightness(.95); }

.party__answers { display: flex; flex-direction: column; gap: 8px; }
.answer {
  display: flex; align-items: center; gap: 0; padding: 14px 14px 14px 16px; border-radius: 14px;
  background: #fff; border: 1px solid var(--line); box-shadow: var(--card-shadow);
  animation: grow 400ms var(--ease-out) both;
}
.answer__pts { width: 42px; flex: none; font-size: 15px; font-weight: 800; color: var(--accent); }
.answer__word { flex: 1; font-size: 16px; font-weight: 700; }
.answer--taken { background: rgba(232, 84, 138, .14); border-color: rgba(232, 84, 138, .4); }
@keyframes grow { from { opacity: 0; transform: translateY(8px); } }

.pad { display: flex; flex-direction: column; align-items: center; gap: 18px; margin-top: 4px; }
.pad__cells { display: flex; gap: 10px; }
.pad__cell {
  width: 58px; height: 70px; display: grid; place-items: center; border-radius: 16px;
  background: #fff; border: 1px solid rgba(92, 40, 66, .12); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .22);
  font-size: 30px; font-weight: 800; color: var(--t38);
}
.pad__cell--wide { width: 150px; }
.pad__cell--on { color: var(--text); background: rgba(232, 84, 138, .12); border-color: rgba(232, 84, 138, .5); }
.pad__keys { display: grid; grid-template-columns: repeat(3, 74px); gap: 14px; justify-content: center; }
.pad__key {
  width: 74px; height: 74px; display: grid; place-items: center; border-radius: 50%;
  background: var(--tint); border: 1px solid var(--line); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
  font-size: 28px; font-weight: 700; transition: transform 120ms ease, background-color 120ms ease;
}
.pad__key.is-press { transform: scale(.92); background: rgba(92, 40, 66, .14); filter: none; }
.pad__key--ghost { visibility: hidden; }
.pad__key--del { font-size: 22px; color: var(--t74); }
.pad .gs-btn { width: 100%; }

.num-log, .duel-log { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.num-log { gap: 8px; }
.num-log__row { display: flex; align-items: center; gap: 8px; animation: grow 400ms var(--ease-out) both; }
.num-log__no { width: 26px; font-size: 12px; font-weight: 700; color: var(--t38); }
.digit { width: 52px; height: 56px; display: grid; place-items: center; border-radius: 14px; font-size: 24px; font-weight: 800; }
.digit--hit { color: var(--ok); background: rgba(23, 150, 127, .14); border: 1px solid rgba(23, 150, 127, .45); }
.digit--miss { color: var(--bad); background: rgba(220, 74, 98, .12); border: 1px solid rgba(220, 74, 98, .4); }
.duel-log__row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; border-radius: 10px;
  background: #fff; border-left: 3px solid rgba(232, 84, 138, var(--heat, .55)); animation: grow 400ms var(--ease-out) both;
}
.duel-log__word { font-size: 15px; font-weight: 700; }
.duel-log__rank { font-size: 13px; font-weight: 800; color: var(--t56); }
.num-log__hint { border-left-color: rgba(232, 84, 138, .55); }
.num-log__hint .duel-log__rank { color: var(--accent); }
.num-log__hint--win { border-left-color: var(--ok); }
.num-log__hint--win .duel-log__rank { color: var(--ok); }

.gs-result { align-items: stretch; }
.gs-result .party__title { margin-top: auto; text-align: center; }
.gs-result .party__text { text-align: center; }
.next-game {
  margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 16px; border-radius: 20px;
  background: #fff; border: 1px solid var(--line); box-shadow: var(--card-shadow);
}
.next-game__timer { font-size: 30px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.next-game__name { font-size: 13px; color: var(--t56); }
.gs-result .gs-btn { margin-top: 0; }

/* =========================================================
   FINAL
   ========================================================= */
.final { padding: 140px 12px 0; }
.final__card {
  position: relative; overflow: hidden; isolation: isolate; text-align: center;
  border-radius: 48px; padding: 140px 24px; background: var(--coral); color: #fff;
}
.final__card::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, .14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .14) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(60% 70% at 50% 50%, #000, transparent 80%);
  mask-image: radial-gradient(60% 70% at 50% 50%, #000, transparent 80%);
}
.final__title { font-family: var(--display); font-weight: 700; font-size: clamp(42px, 7.5vw, 104px); letter-spacing: -0.05em; line-height: .95; text-wrap: balance; }
.final__text { margin: 24px auto 0; max-width: 480px; font-size: 19px; color: rgba(255, 255, 255, .85); }
.final .appstore { margin-top: 36px; }
.final__bits { position: absolute; inset: 0; pointer-events: none; z-index: -1; }
.final__bits > * { position: absolute; }
.f1 { left: 7%; top: 16%; }
.f2 { right: 8%; bottom: 14%; }
.f3 { right: 14%; top: 14%; }
.f4 { left: 12%; bottom: 18%; width: 64px; filter: drop-shadow(0 14px 16px rgba(0, 0, 0, .18)); }
.foot { max-width: 1200px; margin: 0 auto; padding: 32px 24px 40px; display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; font-size: 14px; color: var(--ink-3); }
.foot__links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot__links a { transition: color .2s var(--ease-out); }
.foot__links a:hover { color: var(--ink); }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1080px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .card--board { grid-column: span 2; }
  .card--board .card__visual { height: 420px; }
  .card--board .board__frame, .card--board .board__noren { width: min(78%, 420px); }
  /* телефон остаётся посередине, по бокам — компактные карточки */
  .games__stage { gap: 24px; }
  .gpanel, .gfeed { max-width: 270px; padding: 14px; }
  .gpanel { min-height: 0; }
  .gtab { grid-template-columns: 32px 1fr; gap: 10px; padding: 9px 8px; }
  .gtab i { width: 32px; height: 32px; border-radius: 10px; font-size: 13px; }
  .gtab b { font-size: 14px; }
  .gtab small { display: none; }
  .gtab__bar { left: 50px; bottom: 4px; }
  .iphone--games { --w: 250px; }
}
@media (max-width: 820px) {
  .games { padding: 104px 0 16px; }
  .games__stage { margin-top: 32px; grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .gpanel { grid-row: 1; justify-self: stretch; max-width: none; min-height: 0; padding: 0; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .gpanel__head { display: none; }
  .gtabs { flex-direction: row; overflow-x: auto; scrollbar-width: none; gap: 6px; margin: 0 -24px; padding: 4px 24px 10px; scroll-snap-type: x mandatory; }
  .gtabs::-webkit-scrollbar { display: none; }
  .gtab { flex: none; grid-template-columns: 30px auto; gap: 10px; padding: 9px 16px 11px 9px; background: #fff; box-shadow: var(--shadow-1); scroll-snap-align: start; }
  .gtab i { width: 30px; height: 30px; border-radius: 10px; font-size: 13px; }
  .gtab small { display: none; }
  .gtab b { font-size: 14px; white-space: nowrap; }
  .gtab__bar { left: 9px; right: 9px; bottom: 3px; }
  .gphone { grid-row: 2; grid-column: 1; justify-self: center; }
  .iphone--games { --w: min(280px, 72vw); }
  .gfeed { grid-row: 3; grid-column: 1; justify-self: center; max-width: 360px; min-height: 0; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .gtabs { margin: 0 -16px; padding: 4px 16px 10px; }
  .polaroid { width: 110px; padding: 7px 7px 22px; }
  .envelope { width: 110px; }
  .stat { padding: 8px 14px 8px 8px; }
  .stat__ico { width: 32px; height: 32px; }
  .iphone:not(.iphone--games) { --w: min(270px, 70vw); }
  .features { padding-bottom: 96px; }
  .cards { grid-template-columns: 1fr; }
  .card--board { grid-column: auto; }
  .card--board .card__visual { height: 380px; }
  .card__visual { height: 360px; }
  .final { padding: 96px 8px 0; }
  .final__card { border-radius: 32px; padding: 100px 20px; }
  .f1 { left: -9%; top: 1%; scale: .8; }
  .final__card { padding-top: 150px; padding-bottom: 170px; }
  .f2 { right: -4%; bottom: 4%; }
  .f3 { right: 6%; top: 8%; }
  .f4 { left: 8%; bottom: 7%; }
  .g-row { flex-wrap: wrap; }
  .g-row .g-input { flex-basis: 100%; }
  .g-row .g-btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .paper__ink .caret { animation: none; }
  .gs-caret, .gmsg, .answer, .num-log__row, .duel-log__row, .party__gain { animation: none; }
  .gtab.is-on .gtab__bar::after { animation: none; transform: none; }
}

/* NumberFlow + coins */
number-flow { font-variant-numeric: tabular-nums; }
.pet__coins {
  position: absolute; top: 14px; right: 14px; z-index: 5; display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px 7px 8px; border-radius: 999px; background: rgba(255, 255, 255, .85);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  font-weight: 700; font-size: 15px; box-shadow: var(--shadow-1);
}
.coin-dot { width: 20px; height: 20px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #FFF0B8, #FFD050 55%, #E8AE22); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .4); }
.pet__bonus { top: 64px; }
.wordmark .ch { display: inline-block; }
.wm-line { display: inline-block; overflow: hidden; padding: 0 .04em .06em; vertical-align: top; }

.stage { perspective: 1400px; }
.iphone-tilt { transform-style: preserve-3d; will-change: transform; }
.js-anim #phrase, .js-anim #heroCta, .js-anim #heroPhone, .js-anim .bit { opacity: 0; }
.js-anim .wordmark { visibility: hidden; }
.js-anim .wordmark:has(.ch) { visibility: visible; }
.js-anim .wordmark .ch { transform: translateY(105%); }

/* app icons in the hero (from the iOS app's pastel set) */
.appicon {
  width: 84px; height: 84px; border-radius: 22.5%; transform: rotate(-8deg);
  box-shadow: 0 0 0 1px rgba(22, 20, 29, .06), 0 22px 32px -16px rgba(22, 20, 29, .45);
}
.moodcard { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: 22px; }
.moodcard__q { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.moodcard__row { display: flex; gap: 8px; }
.moodcard__row img { width: 44px; height: 44px; padding: 4px; border-radius: 14px; }
.moodcard__row img.is-picked { background: var(--coral-soft); box-shadow: inset 0 0 0 1.5px rgba(255, 107, 91, .45); }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px 8px 8px; border-radius: 999px; }
.chip img { width: 34px; height: 34px; object-fit: contain; }
.chip b { font-size: 16px; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }
.flower { width: 72px; height: 72px; filter: drop-shadow(0 16px 18px rgba(22, 20, 29, .22)); }
@media (max-width: 760px) {
  .bit--photo1 { left: -6%; top: 6%; }
  .bit--photo2 { right: -8%; top: 2%; }
  .bit--appicon { left: 4%; top: 31%; }
  .bit--letter { left: -10%; top: 54%; }
  .bit--stat { right: -4%; top: 30%; }
  .bit--heart { right: 2%; top: 46%; }
  .bit--ball { right: 4%; top: 64%; }
  .bit--coin { left: 6%; right: auto; top: 76%; }
  .bit--moodcard, .bit--digits, .bit--level { display: none; }
  .appicon { width: 60px; height: 60px; }
  .flower { width: 52px; height: 52px; }
}

/* =========================================================
   LOCALIZATION
   ========================================================= */
/* Japanese / Korean: Latin glyphs stay in the brand fonts, CJK falls back to matching families */
html[lang="ja"] {
  --display: 'Unbounded', 'Zen Maru Gothic', system-ui, sans-serif;
  --font: 'Onest', 'Zen Maru Gothic', system-ui, -apple-system, sans-serif;
  --hand: 'Yomogi', 'Zen Maru Gothic', cursive;
}
html[lang="ko"] {
  --display: 'Unbounded', 'Gothic A1', system-ui, sans-serif;
  --font: 'Onest', 'Gothic A1', system-ui, -apple-system, sans-serif;
  --hand: 'Nanum Pen Script', 'Gothic A1', cursive;
}
html[lang="ko"] .paper__ink { font-size: 28px; }
/* tight display tracking is tuned for Latin; CJK glyphs need their own spacing */
html:is([lang="ja"], [lang="ko"]) :is(.title, .final__title, .card h3, .gtab b, .legal h1, .legal h2) { letter-spacing: 0; }
html:is([lang="ja"], [lang="ko"]) :is(.title, .final__title) { line-height: 1.2; }
html[lang="ja"] .gs { font-family: 'Nunito', 'Zen Maru Gothic', -apple-system, system-ui, sans-serif; }
html[lang="ko"] .gs { font-family: 'Nunito', 'Gothic A1', -apple-system, system-ui, sans-serif; }

/* footer language menu */
.lang-switch { position: relative; display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); cursor: pointer; transition: color .2s var(--ease-out); }
.lang-switch:hover, .lang-switch:focus-within { color: var(--ink); }
.lang-switch svg { width: 16px; height: 16px; flex: none; }
.lang-switch select {
  appearance: none; -webkit-appearance: none; border: 0; background: transparent; padding: 0 14px 0 0;
  font: inherit; color: inherit; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: right 5px center, right 1px center; background-size: 4px 4px; background-repeat: no-repeat;
}
.lang-switch select:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; border-radius: 4px; }
