/* 하루니키 랜딩 — 색은 앱 토큰(src/styles/tokens)의 종이·먹 팔레트를 그대로 옮겼다.
   상태 규칙: 기본 스타일이 각 장면의 마지막 모습이다. 스크립트가 켜지면(.js) 장면이 단계 클래스(s1, s2 …)를
   하나씩 얻으며 그 모습으로 다가간다. 스크립트가 없거나 동작 줄이기면 처음부터 마지막 모습을 본다. */

:root {
  color-scheme: light dark;
  --paper-0: #ffffff;
  --paper-50: #fcfbf8;
  --paper-100: #f7f4ee;
  --paper-200: #efeae2;
  --paper-300: #e1d9ce;
  --paper-400: #ccc1b4;
  --paper-500: #aca093;
  --paper-600: #857b71;
  --paper-700: #665f57;
  --paper-800: #49453f;
  --paper-850: #3b3833;
  --paper-900: #302e2a;
  --paper-950: #1a1917;
  --paper-975: #121110;
  --ink-200: #dbdce1;
  --ink-300: #bfc1c9;
  --ink-400: #9b9ea8;
  --ink-500: #797c86;
  --ink-700: #4a4c54;
  --ink-800: #3b3d44;
  --ink-900: #2e3036;

  --page: var(--paper-50);
  --canvas: var(--paper-0);
  --surface: var(--paper-100);
  --surface-2: var(--paper-50);
  --sunken: var(--paper-200);
  --line: var(--paper-300);
  --line-subtle: var(--paper-200);
  --fg: var(--paper-950);
  --fg-2: var(--paper-700);
  --fg-3: var(--paper-600);
  --fg-4: var(--paper-400);
  --accent: var(--ink-700);
  --on-accent: var(--paper-0);
  --ok: #3a5e49;
  --ok-bg: #e4f0e8;
  --ok-line: #a7ccb4;
  --warn: #795127;
  --warn-bg: #f6eddd;
  --mark-new: #634225;
  --mark-new-fg: var(--paper-0);
  --highlight: #ecdab9;
  --act-diary: var(--paper-400);
  --act-study: var(--ink-400);
  --act-both: var(--ink-700);
  --inverse: var(--ink-700);
  --on-inverse: var(--paper-0);
  --ok-on-inverse: #a7ccb4;
  --kb: #d3d5db;
  --kb-key: #ffffff;
  --frame: #1d1e22;
  --shadow: 0 30px 60px -24px rgba(48, 46, 42, 0.28), 0 12px 24px -12px rgba(48, 46, 42, 0.16);
  --dawn: #f6eddd;
  --rain-rgb: 112, 138, 176;

  --font-ko:
    "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  --font-jp: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Pretendard", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.36, 0.64, 1);
  --header-h: 64px;
  --gutter: clamp(16px, 5vw, 48px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: var(--paper-950);
    --canvas: var(--paper-950);
    --surface: var(--paper-900);
    --surface-2: var(--paper-850);
    --sunken: var(--paper-975);
    --line: var(--paper-800);
    --line-subtle: var(--paper-850);
    --fg: var(--paper-50);
    --fg-2: var(--paper-300);
    --fg-3: var(--paper-500);
    --fg-4: var(--paper-700);
    --accent: var(--ink-300);
    --on-accent: #1d1e22;
    --ok: #cbe1d2;
    --ok-bg: #283e33;
    --ok-line: #3a5e49;
    --warn: #ecdab9;
    --warn-bg: #523722;
    --mark-new: #dfc18f;
    --mark-new-fg: #2f1d10;
    --highlight: #634225;
    --act-diary: var(--paper-700);
    --act-study: var(--ink-500);
    --act-both: var(--ink-200);
    --inverse: var(--ink-300);
    --on-inverse: #1d1e22;
    --ok-on-inverse: #3a5e49;
    --kb: #2c2c2e;
    --kb-key: #5a5a5e;
    --frame: #0b0b0c;
    --shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.7), 0 12px 24px -12px rgba(0, 0, 0, 0.5);
    --dawn: #2a2520;
    --rain-rgb: 168, 186, 212;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* 고정 장면 안의 글자·높이가 바뀌어도 브라우저가 스크롤 위치를 옮기지 않게 한다(앵커링이 스스로 흘러내림을 만든다). */
  overflow-anchor: none;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--fg);
  font-family: var(--font-ko);
  font-size: 16px;
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

/* 종이 결 — 앱 캔버스와 같은 아주 옅은 결. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .45  0 0 0 0 .4  0 0 0 0 .33  0 0 0 .07 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

main,
.site-footer {
  position: relative;
  z-index: 1;
}

img,
svg {
  display: block;
}

a {
  color: inherit;
}

[lang="ja"] {
  font-family: var(--font-jp);
  /* 한국어의 keep-all을 이어받으면 일본어가 문장부호에서만 끊긴다. */
  word-break: normal;
  line-break: strict;
}

[lang="ko"] {
  font-family: var(--font-ko);
}

.sprite {
  display: none;
}

svg use {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

svg .fill {
  fill: currentColor;
  stroke: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 8px;
}

@media (min-width: 640px) {
  .br-m {
    display: none;
  }
}

/* ───────── 머리 ───────── */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: calc(var(--header-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) var(--gutter) 0;
  display: flex;
  align-items: center;
  gap: 24px;
  transition:
    background-color 0.3s,
    box-shadow 0.3s;
}

.site-header.scrolled {
  background: color-mix(in srgb, var(--page) 94%, transparent);
  box-shadow: 0 1px 0 var(--line-subtle);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  box-shadow: 0 0 0 1px var(--line-subtle);
}

.site-nav {
  display: none;
  margin-left: auto;
  gap: 4px;
}

.site-nav a {
  padding: 8px 12px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  color: var(--fg-3);
  transition:
    color 0.2s,
    background-color 0.2s;
}

.site-nav a:hover,
.site-nav a.on {
  color: var(--fg);
  background: var(--sunken);
}

.header-cta {
  margin-left: auto;
  height: 40px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--fg);
  color: var(--page);
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  transition: transform 0.2s var(--spring);
}

.header-cta:active {
  transform: scale(0.96);
}

@media (min-width: 960px) {
  .site-nav {
    display: flex;
  }
  .site-nav + .header-cta {
    margin-left: 8px;
  }
}

@media (max-width: 639px) {
  :root {
    --header-h: 56px;
  }
  .brand {
    font-size: 17px;
  }
  .header-cta {
    height: 36px;
    padding: 0 14px;
    font-size: 14px;
  }
}

/* ───────── 스토어 버튼 ───────── */

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 60px;
  padding: 0 24px 0 20px;
  border-radius: 18px;
  background: var(--fg);
  color: var(--page);
  text-decoration: none;
  transition:
    transform 0.25s var(--spring),
    background-color 0.2s;
}

.store-btn:hover {
  background: var(--paper-850);
}

@media (prefers-color-scheme: dark) {
  .store-btn:hover {
    background: var(--paper-200);
  }
}

.store-btn:active {
  transform: scale(0.97);
}

.store-btn svg {
  width: 26px;
  height: 26px;
  flex: none;
}

.store-btn span {
  display: flex;
  flex-direction: column;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-align: left;
}

.store-btn small {
  font-size: 12px;
  font-weight: 600;
  opacity: 0.72;
}

/* ───────── 첫 화면 ───────── */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: calc(var(--header-h) + 32px) var(--gutter) 120px;
  overflow: hidden;
  isolation: isolate;
}

.sky {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  transform: translateY(calc(var(--hy, 0) * -80px));
}

.sky .sun,
.sky .moon {
  position: absolute;
  top: calc(var(--header-h) + 2vh);
  right: 7vw;
  width: clamp(130px, 19vw, 280px);
  height: auto;
  animation: turn 90s linear infinite;
}

.sky .moon {
  display: none;
  animation: none;
  width: clamp(110px, 15vw, 220px);
}

@media (prefers-color-scheme: dark) {
  .sky .sun {
    display: none;
  }
  .sky .moon {
    display: block;
  }
}

.cloud {
  position: absolute;
  display: block;
}

.cloud img {
  width: 100%;
  height: auto;
}

.cloud.c1 {
  width: clamp(200px, 30vw, 420px);
  left: -6vw;
  top: 14vh;
  transform: translateX(calc(var(--hy, 0) * -60px));
  animation: drift 26s ease-in-out infinite alternate;
}

.cloud.c2 {
  width: clamp(170px, 24vw, 340px);
  right: -4vw;
  bottom: 10vh;
  transform: translateX(calc(var(--hy, 0) * 70px));
  animation: drift 32s ease-in-out -8s infinite alternate-reverse;
}

.cloud.c3 {
  width: clamp(110px, 13vw, 190px);
  left: 18vw;
  bottom: 4vh;
  opacity: 0.85;
  animation: drift 22s ease-in-out -4s infinite alternate;
}

@keyframes turn {
  to {
    rotate: 360deg;
  }
}

@keyframes drift {
  from {
    translate: -14px 0;
  }
  to {
    translate: 18px -6px;
  }
}

.notes {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.note {
  position: absolute;
  white-space: nowrap;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 18px 10px;
  border-radius: 16px;
  background: var(--canvas);
  box-shadow:
    0 1px 0 var(--line-subtle),
    0 14px 28px -16px rgba(48, 46, 42, 0.3);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.3;
  rotate: var(--r, 0deg);
  translate: 0 calc(var(--hy, 0) * var(--dy, -60px));
  animation: bob 6s ease-in-out infinite alternate;
}

.note rt {
  font-size: 11px;
  font-weight: 500;
  color: var(--fg-3);
}

.note small {
  font-family: var(--font-ko);
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-3);
}

.note.n1 {
  left: 11vw;
  top: 26vh;
  --r: -6deg;
  --dy: -120px;
}

.note.n2 {
  right: 13vw;
  top: 46vh;
  --r: 5deg;
  --dy: -40px;
  animation-delay: -2s;
}

.note.n3 {
  left: 15vw;
  bottom: 22vh;
  --r: 4deg;
  --dy: -90px;
  animation-delay: -4s;
}

.note.n4 {
  right: 22vw;
  bottom: 13vh;
  --r: -4deg;
  --dy: -150px;
  animation-delay: -1s;
}

@keyframes bob {
  to {
    transform: translateY(-10px);
  }
}

.hero-copy {
  max-width: 760px;
  text-align: center;
  transform: translateY(calc(var(--hy, 0) * -40px));
  opacity: calc(1 - var(--hy, 0) * 1.2);
}

.hero-mark {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.24em;
  color: var(--fg-3);
}

.hero h1 {
  margin: 0;
  font-size: clamp(46px, 9.5vw, 116px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.hero-lead {
  margin: 24px auto 0;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.7;
  color: var(--fg-2);
}

.cta-row {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* 첫 화면의 두 스토어 버튼은 같은 너비로 나란히 — 더 긴 Google Play에 맞춘다 */
.cta-row .store-btn {
  width: 196px;
  justify-content: center;
}

.hero-note {
  margin: 18px 0 0;
  font-size: 14px;
  color: var(--fg-3);
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  translate: -50% 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-3);
  text-decoration: none;
  opacity: calc(1 - var(--hy, 0) * 3);
}

.scroll-cue svg {
  width: 20px;
  height: 20px;
  animation: nudge 1.8s ease-in-out infinite;
}

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

@media (max-width: 639px) {
  .hero {
    padding-bottom: 96px;
  }
  .note {
    font-size: 20px;
    padding: 10px 14px 8px;
  }
  .note.n1 {
    left: 5vw;
    top: 15vh;
  }
  .note.n2 {
    right: 5vw;
    top: auto;
    bottom: 16vh;
  }
  .note.n3,
  .note.n4 {
    display: none;
  }
  .sky .sun {
    right: -6vw;
  }
  .cloud.c1 {
    top: 9vh;
  }
  .cloud.c3 {
    display: none;
  }
  .store-btn {
    height: 56px;
  }
  /* 휴대폰에서는 지금 기기의 스토어 하나를 크게 */
  .is-ios .cta-row [data-store="android"],
  .is-android .cta-row [data-store="ios"] {
    display: none;
  }
  .is-ios .cta-row .store-btn,
  .is-android .cta-row .store-btn {
    width: min(100%, 320px);
    justify-content: center;
  }
}

/* 키가 작은 휴대폰(iPhone SE)은 아래 메모가 안내 문구와 겹친다 */
@media (max-width: 639px) and (max-height: 740px) {
  .note.n2 {
    display: none;
  }
}

/* ───────── 장면 공통 ───────── */

.scene {
  position: relative;
  height: calc(var(--len, 300) * 1vh);
  height: calc(var(--len, 300) * 1svh);
}

.stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

html:not(.js) .scene,
.reduce .scene {
  height: auto;
}

html:not(.js) .stage,
.reduce .stage {
  position: relative;
  height: auto;
  min-height: 100svh;
}

.kicker {
  margin: 0 0 12px;
  display: inline-flex;
  align-items: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--fg-2);
}

.copy h2 {
  margin: 0;
  font-size: clamp(30px, 4.4vw, 58px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.copy .lead {
  margin: 20px 0 0;
  max-width: 30em;
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.75;
  color: var(--fg-2);
}

.copy .lead.small {
  font-size: 15px;
  color: var(--fg-3);
}

.copy b {
  color: var(--fg);
}

.js .copy > * {
  opacity: 0;
  translate: 0 24px;
  transition:
    opacity 0.7s var(--ease),
    translate 0.7s var(--ease);
}

.js .scene.in .copy > * {
  opacity: 1;
  translate: 0 0;
}

.js .scene.in .copy > :nth-child(2) {
  transition-delay: 0.06s;
}

.js .scene.in .copy > :nth-child(3) {
  transition-delay: 0.12s;
}

.js .scene.in .copy > :nth-child(n + 4) {
  transition-delay: 0.18s;
}

/* 폰 장면 배치 — 넓은 화면은 두 칸, 휴대폰은 위 글·아래 폰 */
.scene-phone {
  --len: 300;
}

.scene-phone .stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 5vw, 96px);
  max-width: 1200px;
  margin: 0 auto;
  padding: calc(var(--header-h) + 24px) var(--gutter) 32px;
}

.scene-phone.flip .copy {
  order: 2;
}

.phone-slot {
  position: relative;
  height: 100%;
  min-height: 0;
  display: grid;
  place-items: center;
  /* 폰 크기(--s)를 이 칸 크기에서 바로 정한다 — 스크립트가 늦게 맞추며 폰이 커지는 일이 없다 */
  container-type: size;
}

@media (max-width: 959px) {
  .scene-phone .stage {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 28px;
  }
}

@media (max-width: 639px) {
  .scene-phone {
    --len: 270;
  }
  .scene-phone .stage {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    align-items: stretch;
    gap: 14px;
    /* 폰 아래쪽은 다운로드 막대 뒤로 들어가 장면 끝에서 흐려지며 잘린다 */
    padding: calc(var(--header-h) + 12px) var(--gutter) 0;
    text-align: center;
    -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 120px), transparent);
    mask-image: linear-gradient(to bottom, #000 calc(100% - 120px), transparent);
  }
  .scene-phone.flip .copy {
    order: 0;
  }
  .phone-slot {
    place-items: start center;
  }
  .kicker {
    margin-bottom: 8px;
    font-size: 13px;
  }
  .copy h2 {
    font-size: clamp(25px, 7.4vw, 30px);
  }
  .copy h2 br {
    display: none;
  }
  .copy .lead {
    margin: 10px auto 0;
    font-size: 14.5px;
    line-height: 1.65;
  }
}

/* 짧은 가로 화면(가로로 든 휴대폰 등)은 고정 연출을 풀고 흐르게 둔다 */
@media (max-height: 520px) {
  .scene {
    height: auto;
  }
  .stage {
    position: relative;
    height: auto;
    min-height: 0;
  }
  .scene-phone .stage {
    min-height: 640px;
  }
}

/* ───────── 폰 ───────── */

.phone {
  --s: 0.7;
  position: relative;
  width: calc(414px * var(--s));
  height: calc(868px * var(--s));
  padding: calc(12px * var(--s));
  border-radius: calc(60px * var(--s));
  background: var(--frame);
  box-shadow:
    var(--shadow),
    inset 0 0 0 calc(1.5px * var(--s)) rgba(255, 255, 255, 0.12);
  flex: none;
}

/* 칸에 맞춰 폰을 줄인다(414x868 기준, 너비와 높이 중 먼저 닿는 쪽). tan(atan2(a, b))는 길이 비 a/b를 수로 바꾼다.
   이 계산을 못 하는 브라우저는 landing.js fitPhones가 같은 값을 넣는다. */
@supports (width: calc(1px * tan(atan2(1cqw, 1px)))) {
  .phone {
    --s: clamp(0.3, tan(atan2(min(100cqw, 100cqh * 414 / 868), 414px)), 1);
  }
}

/* 휴대폰 폭은 칸 높이를 보지 않고 고정 배율로 둔다. 칸 높이는 브라우저 툴바와 위 글 길이에 따라 달라
   폰이 0.33~0.63배로 흔들렸다(#1202). 모자란 높이는 위 .scene-phone .stage 가 잘라 흐린다.
   tan(atan2(100cqw, 414px))는 쓰지 않는다. iOS WebKit이 이 값을 0에 가깝게 계산해 폰이 뒤집히고
   틀 없이 그려졌다(#1204). 0.62배(257px)는 폭 289px 이상이면 칸에 들어가고, 그보다 좁으면 줄인다. */
@media (max-width: 639px) {
  .phone {
    --s: 0.62;
  }
}
@media (max-width: 288px) {
  .phone {
    --s: 0.56;
  }
}

.phone::after {
  content: "";
  position: absolute;
  top: calc(23px * var(--s));
  left: 50%;
  width: calc(118px * var(--s));
  height: calc(34px * var(--s));
  translate: -50% 0;
  border-radius: 999px;
  background: #000;
  z-index: 5;
}

.screen {
  position: relative;
  width: 390px;
  height: 844px;
  transform: scale(var(--s));
  transform-origin: 0 0;
  border-radius: 48px;
  overflow: hidden;
  background: var(--canvas);
  color: var(--fg);
  font-family: var(--font-ko);
  font-size: 16px;
  line-height: 1.5;
  text-align: left;
}

.status {
  height: 54px;
  padding: 18px 34px 0 42px;
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 700;
}

.status i {
  width: 26px;
  height: 12px;
  margin-top: 4px;
  border-radius: 4px;
  border: 1.5px solid currentColor;
  opacity: 0.8;
  box-shadow: inset 0 0 0 1.5px var(--canvas);
  background: currentColor;
}

.tabbar {
  position: absolute;
  inset: auto 0 0;
  height: 86px;
  padding: 8px 12px 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--canvas);
  box-shadow: 0 -1px 0 var(--line-subtle);
}

.tabbar span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--fg-4);
}

.tabbar span.on {
  color: var(--fg);
}

.tabbar svg {
  width: 24px;
  height: 24px;
}

/* 폰 화면은 앱 캡처(npm run capture:screens)를 따라 그렸다. 앱 화면이 바뀌면 함께 고친다. */

/* 일기 홈 — 날짜 머리, 제목, 탭, 본문 */

.home {
  position: absolute;
  inset: 54px 0 86px;
  display: flex;
  flex-direction: column;
  background: var(--canvas);
}

.h-head {
  height: 50px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.h-date {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.h-date b {
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.h-date span {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg-2);
}

.h-date svg {
  width: 16px;
  height: 16px;
  align-self: center;
  color: var(--fg-2);
}

.h-icons {
  display: flex;
  gap: 18px;
  color: var(--fg-2);
}

.h-icons svg {
  width: 22px;
  height: 22px;
}

.h-title {
  min-height: 62px;
  padding: 6px 20px 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.h-title > div {
  flex: 1;
  min-width: 0;
}

.h-title p {
  margin: 0;
}

.h-ja-title,
.h-ko-title {
  font-size: 22px;
  font-weight: 500;
}

.h-ko-title {
  font-weight: 600;
}

.h-sub {
  margin-top: 2px !important;
  font-size: 13px;
  color: var(--fg-3);
}

.h-share {
  width: 22px;
  height: 22px;
  color: var(--fg-2);
}

.pill {
  height: 40px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 14px;
  background: var(--sunken);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.pill svg {
  width: 18px;
  height: 18px;
}

.pill.learn {
  background: var(--inverse);
  color: var(--on-inverse);
  transition:
    opacity 0.3s,
    scale 0.3s var(--spring);
}

.tabs {
  position: relative;
  margin: 12px 20px 0;
  display: flex;
  gap: 24px;
  height: 44px;
  align-items: center;
  border-bottom: 1px solid var(--line-subtle);
  font-size: 15px;
  color: var(--fg-3);
  flex: none;
}

.tabs span {
  transition: color 0.3s;
}

.tabs .off {
  color: var(--fg-4);
}

[data-tab="ko"] .tabs [data-t="ko"],
[data-tab="ja"] .tabs [data-t="ja"],
[data-tab="words"] .tabs [data-t="words"],
[data-tab="grammar"] .tabs [data-t="grammar"] {
  color: var(--fg);
  font-weight: 700;
}

.tab-line {
  position: absolute;
  bottom: -1px;
  left: 0;
  height: 2.5px;
  width: 48px;
  background: var(--fg);
  transition:
    translate 0.45s var(--ease),
    width 0.45s var(--ease);
}

.h-body {
  position: relative;
  flex: 1;
  min-height: 0;
  padding: 20px 20px 0;
  overflow: hidden;
}

.h-body > * {
  transition: translate 0.7s var(--ease);
}

.ko-text p {
  margin: 0 0 16px;
  font-size: 17px;
  line-height: 1.8;
}

.sentence {
  margin-bottom: 20px;
}

.sentence .jp {
  margin: 0;
  font-size: 21px;
  font-weight: 500;
  line-height: 2.05;
}

.sentence rt,
.askback rt,
.q-sentence rt,
.thread rt {
  font-size: 10px;
  font-weight: 500;
  color: var(--fg-3);
}

.karaoke {
  background-image: linear-gradient(to right, var(--highlight) 0 calc(var(--k, 0) * 100%), transparent 0);
  border-radius: 4px;
}

.fold {
  display: grid;
  grid-template-rows: 1fr;
  transition:
    grid-template-rows 0.55s var(--ease),
    opacity 0.45s;
}

.fold > div {
  min-height: 0;
  overflow: hidden;
}

.mean {
  margin: 0;
  font-size: 14px;
  color: var(--fg-2);
}

.chips {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 12px;
  border-radius: 999px;
  background: var(--surface);
}

.chip b {
  font-size: 17px;
  font-weight: 700;
}

.chip small {
  font-size: 10px;
  line-height: 1.35;
  color: var(--fg-3);
}

.chip em,
.actions em {
  font-style: normal;
}

.actions {
  margin: 10px 0 0;
  display: flex;
  gap: 18px;
  font-size: 12.5px;
  color: var(--fg-3);
}

.actions span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.actions svg {
  width: 15px;
  height: 15px;
  transition: rotate 0.3s;
}

.actions .closed {
  display: none;
}

.s-3 .actions .closed {
  display: inline;
}

.wave {
  display: none;
  gap: 2px;
  align-items: center;
  height: 12px;
  margin-left: 2px;
}

.wave b {
  width: 3px;
  height: 100%;
  border-radius: 2px;
  background: var(--accent);
  animation: wave 0.9s ease-in-out infinite;
}

.wave b:nth-child(2) {
  animation-delay: -0.2s;
}

.wave b:nth-child(3) {
  animation-delay: -0.45s;
}

.wave b:nth-child(4) {
  animation-delay: -0.65s;
}

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

.askback {
  margin-top: 8px;
  padding: 14px 18px 18px;
  border-radius: 22px;
  background: var(--surface);
}

.askback .q {
  margin: 0;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.askback .q b {
  padding-top: 13px;
  font-size: 18px;
  color: var(--fg-3);
}

.askback .q span {
  flex: 1;
  font-size: 19px;
  font-weight: 500;
  line-height: 2.1;
}

.askback .q svg {
  width: 20px;
  height: 20px;
  margin-top: 14px;
  color: var(--fg-3);
}

.q-ko {
  margin: 0 0 14px 26px;
  font-size: 13px;
  color: var(--fg-3);
}

.q-btn {
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--inverse);
  color: var(--on-inverse);
  font-size: 15px;
  font-weight: 700;
}

.fab {
  position: absolute;
  right: 18px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--canvas);
  box-shadow:
    0 0 0 1px var(--line-subtle),
    0 8px 18px -10px rgba(0, 0, 0, 0.35);
  color: var(--fg-2);
}

.fab svg {
  width: 20px;
  height: 20px;
}

.fab.f1 {
  bottom: 66px;
}

.fab.f2 {
  bottom: 14px;
}

/* 쓰기 — 작성 화면이 내려가면 일기 홈에서 학습하기, 그 자리에서 일본어 문장이 흘러나온다 */

.editor {
  position: absolute;
  inset: 54px 0 0;
  z-index: 3;
  background: var(--canvas);
  transform: translateY(105%);
  transition: transform 0.6s var(--ease);
}

.js [data-scene="write"]:not(.s2) .editor {
  transform: none;
}

.e-top {
  height: 44px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 16px;
  color: var(--fg-2);
}

.e-top b {
  font-weight: 600;
  color: var(--fg-4);
  transition: color 0.3s;
}

.js [data-scene="write"].typing .e-top b {
  color: var(--accent);
}

.e-date {
  margin: 14px 24px 0;
  font-size: 14px;
  color: var(--fg-3);
}

.e-seg {
  margin: 14px 20px 0;
  padding: 4px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: 14px;
  background: var(--sunken);
}

.e-seg span {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 600;
  color: var(--fg-2);
}

.e-seg span.on {
  background: var(--inverse);
  color: var(--on-inverse);
}

.e-seg i {
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--canvas);
  font-size: 10px;
  font-style: normal;
  color: var(--fg-2);
}

.e-body {
  margin: 24px 24px 0;
  font-size: 17px;
  line-height: 1.85;
  white-space: pre-line;
}

.w-placeholder {
  display: none;
  color: var(--fg-4);
}

.js [data-scene="write"]:not(.typing) .w-placeholder {
  display: inline;
}

.caret {
  display: inline-block;
  width: 2px;
  height: 1.15em;
  margin-left: 1px;
  vertical-align: -0.2em;
  background: var(--accent);
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.keyboard {
  position: absolute;
  inset: auto 0 0;
  height: 292px;
  padding: 10px 4px 0;
  background: var(--kb);
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.kb-row {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.kb-row i {
  flex: 0 0 33px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--kb-key);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
  font-style: normal;
  font-size: 19px;
}

.kb-row i.wide {
  flex-basis: 48px;
  font-size: 15px;
}

.kb-row i.space {
  flex: 1;
  font-size: 15px;
}

.draft .pill.learn {
  opacity: 0;
  scale: 0.9;
}

.js [data-scene="write"]:not(.s3) .draft .pill.learn {
  opacity: 1;
  scale: 1;
}

.js [data-scene="write"].s2:not(.s3) .draft .pill.learn {
  animation: pulse 1.6s var(--ease) infinite;
}

@keyframes pulse {
  50% {
    transform: scale(0.95);
  }
}

.draft[data-tab="ja"] .ko-text,
.draft[data-tab="ko"] .stream {
  display: none;
}

.stream {
  animation: rise 0.7s var(--ease) both;
}

.stream .chips {
  animation: rise 0.7s var(--ease) 0.5s both;
}

@keyframes rise {
  from {
    opacity: 0;
    translate: 0 12px;
  }
}

/* 일본어 일기 — 문장 펼침, 듣기, 되묻기 카드까지 */

.js .s-1 .fold,
.js .s-2 .fold {
  grid-template-rows: 0fr;
  opacity: 0;
}

.js [data-scene="read"].s1 .s-1 .fold,
.js [data-scene="read"].s3 .s-2 .fold {
  grid-template-rows: 1fr;
  opacity: 1;
}

.js [data-scene="read"]:not(.s1) .s-1 .open,
.js [data-scene="read"]:not(.s3) .s-2 .open {
  display: none;
}

.js [data-scene="read"]:not(.s1) .s-1 .closed,
.js [data-scene="read"]:not(.s3) .s-2 .closed {
  display: inline;
}

.js [data-scene="read"]:not(.s1) .s-1 .toggle svg,
.js [data-scene="read"]:not(.s3) .s-2 .toggle svg {
  rotate: 180deg;
}

.js [data-scene="read"].s2:not(.s3) .listen {
  color: var(--accent);
  font-weight: 700;
}

.js [data-scene="read"].s2:not(.s3) .wave {
  display: inline-flex;
}

/* 마지막 모습은 되묻기 카드까지 올려 본 화면 */
[data-scene="read"] .h-body > * {
  translate: 0 -150px;
}

.js [data-scene="read"]:not(.s3) .h-body > * {
  translate: 0 0;
}

.js [data-scene="read"] .sentence {
  transition:
    opacity 0.5s,
    translate 0.7s var(--ease);
}

.js [data-scene="read"]:not(.in) .sentence {
  opacity: 0;
}

/* 단어·문법 탭 — 줄마다 몰라요·알아요 */

.lists .list {
  position: absolute;
  inset: 8px 20px auto;
}

.list .row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0;
  transition:
    opacity 0.45s,
    translate 0.55s var(--ease);
  transition-delay: calc(var(--i) * 0.06s);
}

.list .row > div {
  flex: 1;
  min-width: 0;
}

.list .w {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.list .w b {
  font-size: 23px;
  font-weight: 500;
}

.list .w small {
  font-size: 12px;
  color: var(--fg-3);
}

.list .m {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--fg-3);
}

.list .no {
  padding: 8px 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.list .yes {
  padding: 8px 14px;
  border-radius: 12px;
  background: var(--sunken);
  font-size: 13px;
  font-weight: 700;
}

/* 마지막 모습은 문법 목록 */
.list-words .row {
  opacity: 0;
  translate: -24px 0;
}

.js [data-scene="words"].s1:not(.s2) .list-words .row {
  opacity: 1;
  translate: 0 0;
}

.js [data-scene="words"]:not(.s2) .list-grammar .row {
  opacity: 0;
  translate: 24px 0;
}

.js [data-scene="words"]:not(.s1) .list-words .row {
  translate: 0 24px;
}

/* 학습 — 스와이프 카드, 단어 상세 */

.s-top {
  height: 52px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.s-top svg {
  width: 26px;
  height: 26px;
  color: var(--fg-2);
}

.s-top .progress {
  flex: 1;
  height: 4px;
  border-radius: 99px;
  background: var(--sunken);
  overflow: hidden;
}

.s-top .progress i {
  display: block;
  height: 100%;
  width: var(--prog, 0%);
  border-radius: inherit;
  background: var(--ink-500);
  transition: width 0.5s var(--ease);
}

.s-top .count {
  font-size: 14px;
  color: var(--fg-2);
}

.deck {
  position: absolute;
  top: 116px;
  left: 20px;
  right: 20px;
  height: 430px;
}

.deck::before,
.deck::after {
  content: "";
  position: absolute;
  height: 40px;
  border-radius: 0 0 26px 26px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-subtle);
}

.deck::before {
  left: 10px;
  right: 10px;
  bottom: -11px;
}

.deck::after {
  left: 20px;
  right: 20px;
  bottom: -21px;
  z-index: -1;
}

.card {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 26px;
  background: var(--surface-2);
  box-shadow:
    0 0 0 1px var(--line-subtle),
    0 16px 30px -24px rgba(48, 46, 42, 0.4);
  display: flex;
  flex-direction: column;
  transition:
    transform 0.6s var(--ease),
    opacity 0.4s;
}

.c-face {
  position: relative;
  flex: 0 0 58%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--surface);
}

.c-star {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 24px;
  height: 24px;
  color: var(--fg-3);
}

.c-word {
  margin: 0;
  font-size: 54px;
  font-weight: 500;
  line-height: 1.2;
}

.c-hint {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--fg-3);
}

.c-reveal {
  margin-top: 8px;
  text-align: center;
}

.c-reveal p {
  margin: 0;
}

.c-kana {
  font-size: 14px;
  color: var(--fg-3);
}

.c-mean {
  margin-top: 2px !important;
  font-size: 15px;
}

.c-spk {
  position: absolute;
  right: 18px;
  bottom: 16px;
  width: 22px;
  height: 22px;
  color: var(--fg-3);
}

.c-ex {
  position: relative;
  flex: 1;
  display: grid;
  place-items: center;
  font-size: 14px;
  color: var(--fg-2);
}

.c-ex p {
  margin: 0;
}

.tint {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.35s;
}

.tint.yes {
  background: var(--ok-bg);
}

.tint.no {
  background: var(--warn-bg);
}

.swipe-ind {
  position: absolute;
  top: 34px;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  opacity: 0;
  transition: opacity 0.3s;
}

.swipe-ind.yes {
  left: 24px;
  color: var(--ok);
}

.swipe-ind.no {
  right: 24px;
  color: var(--warn);
}

.ring {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 3px solid currentColor;
}

.ring svg {
  width: 20px;
  height: 20px;
}

.swipe-hint {
  position: absolute;
  top: 590px;
  left: 0;
  right: 0;
  margin: 0;
  text-align: center;
  font-size: 13px;
  color: var(--fg-3);
}

/* 마지막 모습: 두 카드가 넘어간 뒤 단어 상세를 내려 본 화면 */
.c-a {
  transform: translateX(140%) rotate(16deg);
}

.c-b {
  transform: translateX(-140%) rotate(-16deg);
}

.c-a .c-hint {
  display: none;
}

.js [data-scene="study"]:not(.s1) .c-a .c-hint {
  display: block;
}

.js [data-scene="study"]:not(.s1) .c-a .c-reveal {
  display: none;
}

.js [data-scene="study"]:not(.s2) .c-a,
.js [data-scene="study"]:not(.s4) .c-b {
  transform: none;
}

.js [data-scene="study"].s2:not(.s3) .c-a {
  transform: translateX(24%) rotate(5deg);
}

.js [data-scene="study"].s4:not(.s5) .c-b {
  transform: translateX(-24%) rotate(-5deg);
}

.js [data-scene="study"].s2 .c-a .tint,
.js [data-scene="study"].s4 .c-b .tint {
  opacity: 0.85;
}

.js [data-scene="study"].s2 .c-a .swipe-ind,
.js [data-scene="study"].s4 .c-b .swipe-ind {
  opacity: 1;
}

.detail {
  position: absolute;
  inset: 54px 0 0;
  z-index: 4;
  background: var(--canvas);
  transition: transform 0.6s var(--ease);
}

.js [data-scene="study"]:not(.s6) .detail {
  transform: translateX(100%);
}

.dt-top {
  height: 44px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 600;
  color: var(--fg-2);
}

.dt-top span {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.dt-top svg {
  width: 24px;
  height: 24px;
}

.dt-scroll {
  position: absolute;
  inset: 44px 0 64px;
  padding: 0 22px;
  overflow: hidden;
}

.dt-scroll > * {
  translate: 0 -300px;
  transition: translate 0.8s var(--ease);
}

.js [data-scene="study"]:not(.s7) .dt-scroll > * {
  translate: 0 0;
}

.dt-head {
  padding: 14px 0 4px;
  text-align: center;
}

.dt-head p {
  margin: 0;
}

.dt-word {
  font-size: 56px;
  font-weight: 500;
  line-height: 1.25;
}

.dt-kana {
  font-size: 16px;
  color: var(--fg-3);
}

.dt-mean {
  margin-top: 8px !important;
  font-size: 17px;
  font-weight: 700;
}

.dt-tags {
  margin-top: 10px !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--fg-2);
}

.dt-tags span {
  padding: 1px 9px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line);
}

.dt-tags svg {
  width: 18px;
  height: 18px;
}

.dt-label {
  margin: 22px 0 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 700;
}

.dt-label svg {
  width: 17px;
  height: 17px;
  color: var(--fg-2);
}

.dt-label em {
  font-style: normal;
  color: var(--fg-2);
}

.dt-kanji {
  display: flex;
  align-items: center;
  gap: 16px;
}

.dt-kanji .kc {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.dt-kanji b {
  font-size: 30px;
  font-weight: 500;
  line-height: 1.3;
}

.dt-kanji small {
  font-size: 10px;
  color: var(--fg-3);
}

.dt-kanji i {
  font-style: normal;
  color: var(--fg-3);
}

.dt-tabs {
  margin: 0;
  display: flex;
  justify-content: center;
}

.dt-tabs span {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--sunken);
  font-size: 15px;
}

.dt-stroke {
  margin: 6px 0 0;
  text-align: center;
  font-family: "KanjiStrokeOrders", var(--font-jp);
  font-size: 120px;
  line-height: 1.15;
  /* 상세가 내려가는 이동(.dt-scroll > *)과 드러남을 함께 건다 — 한쪽만 걸면 이동이 뚝 끊긴다. */
  transition:
    translate 0.8s var(--ease),
    clip-path 1.2s var(--ease);
}

.js [data-scene="study"]:not(.s6) .dt-stroke {
  clip-path: inset(0 100% 0 0);
}

.dt-diary {
  display: flex;
  align-items: center;
  gap: 16px;
}

.dt-diary p {
  margin: 0;
}

.dd-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 11px;
  color: var(--fg-3);
}

.dd-date b {
  font-size: 24px;
  font-weight: 800;
  color: var(--fg);
}

.dt-diary > div {
  flex: 1;
}

.dd-title {
  font-size: 12px;
  color: var(--fg-3);
}

.dd-ja {
  margin: 2px 0 !important;
  font-size: 16px;
}

.dd-ja mark {
  padding: 0 2px;
  border-radius: 4px;
  background: var(--sunken);
  color: inherit;
}

.dd-ko {
  font-size: 12.5px;
  color: var(--fg-3);
}

.dt-diary > svg {
  width: 18px;
  height: 18px;
  color: var(--fg-4);
}

.dt-bar {
  position: absolute;
  inset: auto 0 0;
  height: 64px;
  padding: 0 22px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 -1px 0 var(--line-subtle);
  font-size: 14px;
  font-weight: 700;
}

.dt-bar span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dt-bar span:last-child {
  font-weight: 600;
  color: var(--fg-3);
}

.dt-bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--fg-2);
}

/* 단어장 — 학습 탭 단어 홈에서 입문 단어 페이지로, 단어 격자가 스크롤을 따라 흐른다 */

.big-count {
  margin: 18px 0 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.big-count b {
  font-size: clamp(44px, 6vw, 84px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.big-count span {
  font-size: clamp(15px, 1.5vw, 19px);
  font-weight: 700;
  color: var(--fg-2);
}

[data-scene="library"] {
  --g: clamp(0, (var(--p, 1) - 0.5) / 0.5, 1);
}

.lib-home,
.lib-page {
  position: absolute;
  inset: 54px 0 86px;
  background: var(--canvas);
}

.lib-home {
  padding: 0 20px;
}

.lib-title {
  margin: 14px 0 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.lib-title b {
  font-size: 26px;
  font-weight: 800;
}

.lib-title small {
  font-size: 12px;
  color: var(--fg-3);
}

.lib-tabs {
  margin-top: 14px;
  height: 40px;
  display: flex;
  gap: 28px;
  border-bottom: 1px solid var(--line-subtle);
  font-size: 15px;
  color: var(--fg-3);
}

.lib-tabs span {
  display: flex;
  align-items: center;
}

.lib-tabs .on {
  color: var(--fg);
  font-weight: 700;
  box-shadow: inset 0 -2.5px 0 var(--fg);
}

.lib-cta {
  margin-top: 18px;
  height: 78px;
  padding: 0 12px 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 18px;
  background: var(--inverse);
  color: var(--on-inverse);
}

.lib-cta > div {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lib-cta b {
  font-size: 17px;
  font-weight: 700;
}

.lib-cta small {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 12px;
  opacity: 0.75;
}

.lib-cta small svg {
  width: 12px;
  height: 12px;
}

.lib-count {
  height: 34px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--on-inverse) 12%, transparent);
  font-size: 12px;
  font-weight: 600;
}

.lib-count svg {
  width: 14px;
  height: 14px;
}

.lib-go {
  width: 18px;
  height: 18px;
}

.lib-levels {
  margin-top: 12px;
}

.lv {
  height: 56px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.lv > b {
  width: 30px;
  font-size: 18px;
  font-weight: 800;
}

.lv.locked > b {
  color: var(--fg-3);
}

.lv > div {
  flex: 1;
}

.lv p {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}

.lv em {
  font-style: normal;
  font-weight: 500;
  color: var(--fg-3);
}

.lv p > i {
  margin-left: auto;
  font-size: 12px;
  font-style: normal;
  color: var(--fg-3);
}

.lv .crown {
  width: 14px;
  height: 14px;
  color: var(--fg-3);
}

.screen-library .bar {
  display: block;
  height: 2px;
  margin-top: 8px;
  background: var(--line-subtle);
}

.screen-library .bar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--fg);
}

.lv:first-child .bar i,
.lib-inner > .bar i {
  width: 2%;
}

.lib-note {
  margin: 10px 0 0 44px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--fg-3);
}

.lib-page {
  z-index: 2;
  transition: transform 0.6s var(--ease);
}

.js [data-scene="library"]:not(.s1) .lib-page {
  transform: translateX(100%);
}

.lib-scroll {
  position: absolute;
  inset: 44px 0 0;
  overflow: hidden;
}

.lib-inner {
  padding: 0 20px;
  translate: 0 calc(var(--g) * -400px);
}

.lib-page-title {
  margin: 6px 0 0;
  font-size: 24px;
  font-weight: 800;
}

.lib-progress {
  margin: 12px 0 0;
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-size: 13px;
  color: var(--fg-3);
}

.lib-progress b {
  font-size: 30px;
  font-weight: 800;
  color: var(--fg);
}

.lib-progress span {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
}

.lib-progress .dot,
.lib-progress .ring {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.lib-progress .dot {
  background: var(--fg);
}

.lib-progress .ring {
  margin-left: 6px;
  box-shadow: inset 0 0 0 1.5px var(--fg-3);
}

.lib-actions {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 76px;
  gap: 8px;
}

.lib-actions span {
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 14px;
  background: var(--sunken);
  font-size: 14px;
  font-weight: 700;
}

.lib-actions .go {
  background: var(--inverse);
  color: var(--on-inverse);
}

.lib-actions svg,
.lib-search svg {
  width: 16px;
  height: 16px;
}

.lib-search {
  margin: 16px 0 0;
  padding-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--line-subtle);
  font-size: 14px;
  color: var(--fg-4);
}

.lib-kana {
  margin: 16px 0 4px;
  font-size: 18px;
  font-weight: 700;
}

.lib-kana small {
  font-size: 11px;
  font-weight: 500;
  color: var(--fg-3);
}

.lib-grid {
  padding-top: 10px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  row-gap: 18px;
}

.lib-grid span {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lib-grid b {
  font-size: 18px;
  font-weight: 500;
  white-space: nowrap;
}

.lib-grid small {
  font-size: 9px;
  color: var(--fg-3);
}

@media (max-width: 639px) {
  .big-count {
    margin-top: 8px;
    justify-content: center;
  }
}

/* 복습 퀴즈 — 내 일기 문장 빈칸 */

.q-chip {
  margin: 20px 22px 0;
  display: flex;
}

.q-chip span {
  height: 26px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
}

.q-chip svg {
  width: 14px;
  height: 14px;
}

.q-chip .before {
  display: none;
  background: var(--sunken);
  color: var(--fg-2);
}

.q-chip .after {
  background: var(--ok-bg);
  color: var(--ok);
}

.js [data-scene="review"]:not(.s1) .q-chip .before {
  display: inline-flex;
}

.js [data-scene="review"]:not(.s1) .q-chip .after {
  display: none;
}

.q-line {
  margin: 12px 22px 0;
  display: flex;
  gap: 8px;
}

.q-line > svg {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 14px;
  color: var(--fg-3);
}

.q-sentence {
  flex: 1;
  margin: 0;
  font-size: 22px;
  font-weight: 500;
  line-height: 2.15;
}

/* 빈칸 안 글자는 앞뒤 문장과 같은 기준선에 앉는다(가운데 정렬하면 한자가 위아래로 어긋난다). */
.blank {
  position: relative;
  display: inline-block;
  min-width: 64px;
  margin: 0 4px;
  padding: 0 10px;
  line-height: 1.75;
  text-align: center;
  vertical-align: baseline;
  border-radius: 10px;
  background: var(--ok-bg);
  box-shadow: inset 0 0 0 1px var(--line-subtle);
  transition: background-color 0.35s;
}

.blank > span {
  transition:
    opacity 0.35s,
    scale 0.4s var(--spring);
}

.blank .q {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  color: var(--fg-3);
}

.blank .a {
  display: inline-block;
  font-weight: 600;
  color: var(--ok);
}

.js [data-scene="review"]:not(.s1) .blank {
  background: var(--surface-2);
}

.js [data-scene="review"]:not(.s1) .blank .q {
  opacity: 1;
}

.js [data-scene="review"]:not(.s1) .blank .a {
  opacity: 0;
  scale: 0.6;
}

.q-mean {
  margin: 10px 22px 0;
  font-size: 15px;
  color: var(--fg-2);
}

.q-src {
  margin: 8px 22px 0;
  text-align: right;
  font-size: 12px;
  color: var(--fg-4);
}

.choices {
  position: absolute;
  top: 438px;
  left: 22px;
  right: 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.choice {
  position: relative;
  height: 122px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-subtle);
  transition:
    opacity 0.35s,
    background-color 0.35s,
    box-shadow 0.35s,
    scale 0.35s var(--spring);
}

.choice b {
  font-size: 30px;
  font-weight: 500;
  line-height: 1.3;
}

.choice small {
  font-size: 13px;
  color: var(--fg-3);
}

.choice em {
  margin-top: 2px;
  font-size: 12px;
  font-style: normal;
  color: var(--fg-3);
}

.choice .ok {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 18px;
  height: 18px;
  color: var(--ok);
}

.choice:not(.right) {
  opacity: 0.5;
}

.choice.right {
  background: var(--ok-bg);
  box-shadow: inset 0 0 0 1.5px var(--ok-line);
}

.js [data-scene="review"]:not(.s1) .choice {
  opacity: 1;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-subtle);
}

.js [data-scene="review"]:not(.s1) .choice em,
.js [data-scene="review"]:not(.s1) .choice .ok {
  display: none;
}

.js [data-scene="review"].tap:not(.s1) .choice.right {
  scale: 0.96;
}

.q-next {
  position: absolute;
  top: 714px;
  left: 22px;
  right: 22px;
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 10px;
  transition: opacity 0.35s;
}

.q-next span {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
}

.q-next svg {
  width: 18px;
  height: 18px;
}

.q-next .again {
  background: var(--sunken);
}

.q-next .go {
  background: var(--inverse);
  color: var(--on-inverse);
}

.js [data-scene="review"]:not(.s1) .q-next {
  opacity: 0;
}

/* 되묻기 대화 — 고친 표현은 다음 하루니키 풍선 머리에 */

.t-top {
  height: 48px;
  padding: 0 16px 0 12px;
  display: grid;
  grid-template-columns: 60px 1fr 60px;
  align-items: center;
  color: var(--fg-2);
}

.t-top svg {
  width: 26px;
  height: 26px;
}

.t-top b {
  text-align: center;
  font-size: 17px;
  color: var(--fg);
}

.t-top span {
  justify-self: end;
  font-size: 15px;
  font-weight: 600;
}

.thread {
  list-style: none;
  margin: 0;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bubble {
  position: relative;
  max-width: 85%;
  padding: 10px 16px 12px;
  border-radius: 20px;
  font-size: 16px;
  line-height: 1.6;
  transition:
    opacity 0.4s,
    translate 0.5s var(--spring);
}

.bubble.ai {
  align-self: flex-start;
  padding-right: 42px;
  background: var(--surface);
  border-bottom-left-radius: 6px;
}

.bubble.ai.cont {
  margin-top: -6px;
}

.bubble.me {
  align-self: flex-end;
  padding: 12px 16px;
  background: var(--inverse);
  color: var(--on-inverse);
  border-bottom-right-radius: 6px;
}

.bubble p {
  margin: 0;
}

.t-ja {
  font-size: 17px;
  line-height: 2.05;
}

.t-ko {
  font-size: 13px;
  color: var(--fg-3);
}

.t-spk {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 18px;
  height: 18px;
  color: var(--fg-3);
}

.t-fix {
  margin-bottom: 6px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-subtle);
}

.t-fix-label {
  margin-bottom: 4px !important;
  font-size: 12px;
  color: var(--fg-3);
}

.t-orig {
  font-size: 13px;
  color: var(--fg-3);
}

.t-orig s {
  text-decoration-color: var(--fg-3);
}

.t-corr {
  font-size: 16px;
  line-height: 2.05;
}

.t-corr u {
  text-decoration: underline 2px var(--accent);
  text-underline-offset: 4px;
}

.t-why {
  font-size: 13px;
  color: var(--fg-2);
}

.t-input {
  position: absolute;
  inset: auto 16px 40px;
  height: 52px;
  padding: 0 6px 0 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 26px;
  background: var(--surface);
  font-size: 15px;
  color: var(--fg-4);
}

.t-input span {
  flex: 1;
}

.t-input > svg {
  width: 22px;
  height: 22px;
  color: var(--fg-3);
}

.t-input i {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
}

.t-input i svg {
  width: 20px;
  height: 20px;
}

.js [data-scene="talk"]:not(.in) .b1,
.js [data-scene="talk"]:not(.s1) .b2,
.js [data-scene="talk"]:not(.s2) .b3,
.js [data-scene="talk"]:not(.s3) .b4 {
  opacity: 0;
  translate: 0 14px;
}

.ladder {
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.ladder li {
  flex: 1;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--canvas);
  box-shadow: inset 0 0 0 1px var(--line-subtle);
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 15px;
}

.ladder b {
  color: var(--fg);
}

.ladder small {
  font-size: 13px;
  color: var(--fg-3);
}

@media (max-width: 639px) {
  .ladder,
  .copy .lead.small {
    display: none;
  }
}

/* ───────── 한국어 한 줄 → 일본어 ───────── */

.scene-convert {
  --len: 240;
  --q1: clamp(0, (var(--p, 1) - 0.12) / 0.26, 1);
  --q2: clamp(0, (var(--p, 1) - 0.26) / 0.4, 1);
  --q3: clamp(0, (var(--p, 1) - 0.62) / 0.14, 1);
  --q4: clamp(0, (var(--p, 1) - 0.74) / 0.14, 1);
}

.scene-convert .stage {
  display: grid;
  place-items: center;
  padding: var(--header-h) var(--gutter) 40px;
}

/* 비는 캔버스 파티클(landing.js startRain) — 빗줄기마다 길이·속도·깊이가 달라 반복 이음매가 없다. */
.rain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, transparent, #000 14%, #000 82%, transparent);
}

.convert {
  width: min(100%, 980px);
  display: grid;
  justify-items: center;
  text-align: center;
}

.diary-date {
  margin: 0 0 44px;
  display: inline-flex;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--surface);
  font-size: 15px;
  font-weight: 600;
  color: var(--fg-2);
}

.diary-date .weather::before {
  content: "· ";
}

.ko-line,
.ja-line {
  grid-area: 2 / 1;
  margin: 0;
}

.ko-line {
  align-self: center;
  font-size: clamp(26px, 4.6vw, 54px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.35;
  opacity: calc(1 - var(--q1));
  translate: 0 calc(var(--q1) * -36px);
  filter: blur(calc(var(--q1) * 8px));
}

.ja-line {
  font-size: clamp(30px, 5.6vw, 72px);
  font-weight: 700;
  line-height: 1.9;
  letter-spacing: 0.01em;
}

.ja-line > * {
  display: inline-block;
  opacity: clamp(0, var(--q2) * var(--n, 1) - var(--i, 0), 1);
  translate: 0 calc((1 - clamp(0, var(--q2) * var(--n, 1) - var(--i, 0), 1)) * 18px);
}

.ja-line rt {
  font-size: 0.32em;
  font-weight: 500;
  color: var(--fg-3);
  opacity: var(--q3);
}

.convert-caption {
  grid-area: 3 / 1;
  margin: 36px 0 0;
  font-size: clamp(17px, 2vw, 22px);
  color: var(--fg-2);
  opacity: var(--q4);
  translate: 0 calc((1 - var(--q4)) * 14px);
}

.convert-caption strong {
  color: var(--fg);
}

.reduce .ko-line,
html:not(.js) .ko-line {
  display: none;
}

/* ───────── 기록 ───────── */

.scene-record {
  --len: 220;
}

.scene-record .stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 5vw, 96px);
  max-width: 1200px;
  margin: 0 auto;
  padding: calc(var(--header-h) + 24px) var(--gutter) 40px;
}

.facts {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.facts li {
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--canvas);
  box-shadow: inset 0 0 0 1px var(--line-subtle);
  font-size: 14px;
  line-height: 1.5;
  color: var(--fg-3);
}

.facts b {
  display: block;
  margin-bottom: 2px;
  font-size: 16px;
}

.heat {
  justify-self: center;
  width: min(100%, 480px);
  padding: 24px 22px 20px;
  border-radius: 28px;
  background: var(--canvas);
  box-shadow: var(--shadow);
}

.heat-head {
  margin: 0 0 14px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.heat-head b {
  font-size: 18px;
  font-weight: 800;
}

.heat-head span {
  font-size: 12.5px;
  color: var(--fg-3);
}

.heat-head em {
  font-style: normal;
  font-weight: 700;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}

.heat-months,
.heat-grid {
  display: grid;
  grid-template-columns: 20px repeat(20, 1fr);
  gap: 3px;
}

.heat-months {
  margin-bottom: 4px;
  font-size: 10px;
  color: var(--fg-3);
}

.heat-months span {
  white-space: nowrap;
}

/* 달 이름이 채워지기 전에도 줄 높이를 잡아 둔다 */
.heat-months span::before {
  content: "\200b";
}

.heat-grid {
  grid-template-rows: repeat(7, auto);
  grid-auto-flow: column;
}

.heat-grid i {
  font-style: normal;
  font-size: 10px;
  line-height: 1;
  align-self: center;
  color: var(--fg-3);
}

.heat-grid span {
  aspect-ratio: 1;
  border-radius: 4px;
  background: var(--sunken);
  transition:
    background-color 0.4s,
    scale 0.4s var(--spring);
}

.heat-grid span.d {
  background: var(--act-diary);
}

.heat-grid span.s {
  background: var(--act-study);
}

.heat-grid span.b {
  background: var(--act-both);
}

.heat-grid span.today {
  box-shadow:
    0 0 0 1.5px var(--canvas),
    0 0 0 3px var(--fg);
}

.heat-grid span.future {
  visibility: hidden;
}

.heat-grid span.pop {
  scale: 1.25;
}

.cal-legend {
  margin: 18px 0 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--fg-3);
}

.cal-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-left: 8px;
}

.cal-legend i:first-child {
  margin-left: 0;
}

.l-diary {
  background: var(--act-diary);
}

.l-study {
  background: var(--act-study);
}

.l-both {
  background: var(--act-both);
}

@media (max-width: 959px) {
  .scene-record .stage {
    gap: 28px;
  }
  .facts {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 639px) {
  .scene-record {
    height: auto;
  }
  .scene-record .stage {
    position: relative;
    height: auto;
    grid-template-columns: 1fr;
    padding: 72px var(--gutter) 56px;
    text-align: center;
  }
  .scene-record .copy h2 br {
    display: inline;
  }
  .facts {
    grid-template-columns: 1fr 1fr;
    text-align: left;
  }
  .facts li {
    padding: 12px 14px;
    font-size: 13px;
  }
  .facts b {
    font-size: 15px;
  }
  .heat {
    padding: 20px 16px 16px;
    border-radius: 24px;
  }
}

/* ───────── 다운로드 ───────── */

.download {
  position: relative;
  padding: clamp(96px, 14vw, 180px) var(--gutter) clamp(72px, 9vw, 120px);
  text-align: center;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(to bottom, transparent, var(--dawn) 55%, var(--dawn));
}

.dawn {
  position: absolute;
  left: 50%;
  top: clamp(24px, 4vw, 64px);
  z-index: -1;
  width: clamp(140px, 18vw, 240px);
  translate: -50% calc((1 - var(--dp, 1)) * 160px);
  opacity: calc(0.25 + var(--dp, 1) * 0.75);
}

.dawn img {
  width: 100%;
  height: auto;
  animation: turn 90s linear infinite;
}

.dl-jp {
  margin: clamp(80px, 10vw, 150px) 0 10px;
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 700;
  color: var(--fg-2);
}

.dl-jp rt {
  font-size: 0.42em;
  font-weight: 500;
  color: var(--fg-3);
}

.download h2 {
  margin: 0;
  font-size: clamp(30px, 5vw, 60px);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.035em;
}

.dl-lead {
  margin: 16px 0 0;
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--fg-2);
}

.stores {
  margin: 48px auto 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
}

.store-card {
  width: 280px;
  padding: 22px 22px 22px;
  border-radius: 30px;
  background: var(--canvas);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.qr {
  width: 216px;
  height: 216px;
  padding: 12px;
  border-radius: 18px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--paper-200);
}

.qr svg {
  width: 100%;
  height: 100%;
}

.store-card .store-btn {
  width: 100%;
  justify-content: center;
  height: 56px;
}

/* 휴대폰은 QR 대신 지금 기기의 스토어 버튼을 크게 */
.is-mobile .qr {
  display: none;
}

.is-mobile .stores {
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.is-mobile .store-card {
  width: min(100%, 360px);
  padding: 0;
  background: none;
  box-shadow: none;
}

.is-ios .stores .store-card:has([data-store="android"]),
.is-android .stores .store-card:has([data-store="ios"]) {
  order: 2;
}

/* 다른 기기의 스토어는 같은 꼴(두 줄, 같은 높이)에 테두리만 */
.is-ios .stores [data-store="android"],
.is-android .stores [data-store="ios"] {
  background: transparent;
  color: var(--fg-2);
  box-shadow: inset 0 0 0 1px var(--line);
}

/* ───────── 바닥 ───────── */

.site-footer {
  padding: 40px var(--gutter) calc(40px + env(safe-area-inset-bottom));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  border-top: 1px solid var(--line-subtle);
  background: var(--page);
  font-size: 14px;
  color: var(--fg-3);
}

.f-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--fg);
}

.f-brand img {
  border-radius: 8px;
}

.f-brand small {
  font-weight: 500;
  color: var(--fg-3);
}

.site-footer nav {
  display: flex;
  gap: 18px;
}

.site-footer a {
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--fg);
  text-decoration: underline;
}

.f-mail,
.f-copy,
.f-biz {
  margin: 0;
}

/* 사업자 정보는 고지만 하고 눈에 띄지 않게 접어 둔다 */
.f-biz {
  flex-basis: 100%;
  order: 9;
  font-size: 11px;
  line-height: 1.7;
  color: var(--fg-3);
  opacity: 0.6;
}

.f-biz summary {
  width: max-content;
  cursor: pointer;
  list-style: none;
}

.f-biz summary::-webkit-details-marker {
  display: none;
}

.f-biz p {
  margin: 4px 0 0;
}

.f-copy {
  margin-left: auto;
}

@media (max-width: 639px) {
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: calc(110px + env(safe-area-inset-bottom));
  }
  .f-copy {
    margin-left: 0;
  }
}

/* ───────── 휴대폰 하단 받기 띠 ───────── */

.get-bar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 60;
  display: none;
  align-items: center;
  gap: 12px;
  padding: 10px 10px 10px 12px;
  border-radius: 22px;
  background: var(--inverse);
  color: var(--on-inverse);
  box-shadow: 0 16px 34px -14px rgba(0, 0, 0, 0.45);
  translate: 0 calc(100% + 24px);
  transition: translate 0.45s var(--ease);
}

.get-bar img {
  border-radius: 11px;
}

.get-bar p {
  flex: 1;
  margin: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.3;
  min-width: 0;
}

.get-bar b {
  font-size: 15px;
}

.get-bar span {
  font-size: 12px;
  opacity: 0.75;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.get-bar-btn {
  height: 44px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  border-radius: 14px;
  background: var(--on-inverse);
  color: var(--inverse);
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

@media (max-width: 959px) {
  .js .get-bar {
    display: flex;
  }
}

.get-bar.show {
  translate: 0 0;
}

/* ───────── 동작 줄이기 ───────── */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
  .rain {
    display: none;
  }
}
