/* Ruen sales site — no build step, no external requests.
   Brand: blue lemonade (working palette, not final tokens), titles in Cafe24 Ssurround (Korean) + Lilita One (Latin).
   Fonts are self-hosted under the SIL OFL; see assets/fonts-license.txt. */
@font-face {
  font-family: "Lilita One";
  src: url("lilita-one.ttf") format("truetype");
  font-display: swap;
  unicode-range: U+0000-024F, U+2000-206F, U+20AC, U+2122;
}
@font-face {
  font-family: "Cafe24 Ssurround";
  src: url("cafe24-ssurround.woff2") format("woff2");
  font-display: swap;
}
:root {
  color-scheme: light;
  /* Blue lemonade working palette */
  --blue: #3161C7;          /* 5.6:1 on --ivory, 5.9:1 with white text */
  --blue-deep: #1F4596;
  --lemon: #F9EFB2;
  --lemon-strong: #F3DC5E;
  --sky: #ADCFF2;
  --sky-soft: #E4EFFB;
  --ivory: #FFFDF0;

  --bg: var(--ivory);
  --surface: #ffffff;
  --text: #1B2340;          /* deep navy ink */
  --muted: #545D7A;         /* 6.4:1 on --ivory */
  --line: #E4E0C8;
  --line-blue: #C9DBF3;
  --accent: var(--blue);
  --on-accent: #ffffff;
  --accent-soft: var(--sky-soft);
  --mint: var(--blue);
  --notice: #FFF6CF;
  --notice-line: #E8C651;

  --font-title: "Lilita One", "Cafe24 Ssurround", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --font-body: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", "Segoe UI", system-ui, sans-serif;

  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 1px 0 rgba(49, 97, 199, 0.06), 0 10px 30px -12px rgba(31, 69, 150, 0.22);
  --shadow-pop: 6px 6px 0 var(--blue);
  --max: 1120px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.75 var(--font-body);
  word-break: keep-all;
  overflow-wrap: anywhere;
}
/* Japanese and Chinese: native fonts, and line breaks between characters (keep-all is for Korean spacing). */
:lang(ja) { font-family: "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", Meiryo, "Segoe UI", system-ui, sans-serif; word-break: normal; line-break: strict; }
:lang(zh-Hant) { font-family: "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", "Segoe UI", system-ui, sans-serif; word-break: normal; line-break: strict; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
img { max-width: 100%; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }

/* Title type: display font for Korean/English/French pages; Japanese and Chinese keep their native fonts. */
h1, h2, .price, .band-title { font-family: var(--font-title); font-weight: 400; }
:lang(ja) :is(h1, h2, .price), :lang(zh-Hant) :is(h1, h2, .price) { font-family: inherit; font-weight: 800; }

/* Header */
.site-header { background: rgba(255, 253, 240, 0.92); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(10px); }
.site-header .wrap { display: flex; align-items: center; gap: 10px 20px; min-height: 68px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
/* The brand link keeps its text for screen readers and shows the user's wordmark. */
.brand {
  display: block; width: 96px; height: 26px; flex: none;
  background: url("ruen-wordmark.svg") left center / contain no-repeat;
  color: transparent; overflow: hidden; white-space: nowrap; text-indent: 110%;
}
.brand .dot { display: none; }
.nav { display: flex; gap: 2px 4px; flex-wrap: wrap; margin-left: auto; font-size: 15px; }
.nav a { color: var(--muted); text-decoration: none; padding: 6px 12px; border-radius: 999px; font-weight: 600; }
.nav a:hover { color: var(--blue); background: var(--sky-soft); }
.nav a[aria-current="page"] { color: var(--blue); background: var(--lemon); }
.langs { display: flex; flex-wrap: wrap; gap: 4px 6px; font-size: 12px; }
.langs a { border: 1px solid var(--line); border-radius: 999px; padding: 1px 9px; color: var(--muted); text-decoration: none; background: var(--surface); }
.langs a[aria-current="true"], .langs a:hover { color: var(--blue); border-color: var(--blue); }
@media (max-width: 820px) {
  .site-header { position: static; }
  .nav { margin-left: 0; width: 100%; order: 3; margin-bottom: 8px; }
  .nav a { padding: 4px 10px; }
  .langs { margin-left: auto; }
}

/* Layout */
main { padding: 48px 0 72px; }
h1 { font-size: clamp(32px, 5.4vw, 52px); line-height: 1.22; margin: 0 0 18px; letter-spacing: -0.01em; color: var(--blue); }
h2 { font-size: clamp(24px, 3vw, 30px); line-height: 1.3; margin: 56px 0 14px; color: var(--blue); }
h3 { font-size: 18px; margin: 28px 0 8px; }
p { margin: 0 0 12px; }
.lead { font-size: 18px; color: var(--muted); max-width: 640px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
/* Sub pages: the first title gets a lemon underline, like a marker stroke. */
main > .wrap > h1:first-child, main > .wrap > .draft-banner + h1, main > .wrap > h1 {
  display: inline; background: linear-gradient(transparent 62%, var(--lemon) 62%, var(--lemon) 92%, transparent 92%);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
main > .wrap > h1 + * { margin-top: 22px; }

/* Buttons */
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.btn {
  display: inline-block; padding: 13px 24px; border-radius: 999px; background: var(--blue); color: var(--on-accent);
  text-decoration: none; font-weight: 700; border: 2px solid var(--blue);
  box-shadow: 0 4px 0 var(--blue-deep); transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 5px 0 var(--blue-deep); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--blue-deep); }
.btn.secondary { background: var(--surface); color: var(--blue); box-shadow: 0 4px 0 var(--sky); }
.btn.secondary:hover { box-shadow: 0 5px 0 var(--sky); }
.ai-note { margin-top: 20px; font-size: 14px; color: var(--muted); border-left: 3px solid var(--sky); padding-left: 10px; }

/* Cards: a small desktop window with a title bar */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
@media (min-width: 900px) { .home .grid { grid-template-columns: repeat(3, 1fr); } }
.card {
  position: relative; background: var(--surface); border: 2px solid var(--line-blue); border-radius: var(--radius);
  padding: 46px 22px 22px; box-shadow: var(--shadow);
}
.card::before { /* title bar */
  content: ""; position: absolute; inset: 0 0 auto 0; height: 30px; border-radius: calc(var(--radius) - 2px) calc(var(--radius) - 2px) 0 0;
  background: var(--sky-soft); border-bottom: 2px solid var(--line-blue);
}
.card::after { /* minimize · maximize · close */
  content: "— □ ×"; position: absolute; top: 3px; right: 14px; font: 700 12px/24px var(--font-body); letter-spacing: 4px; color: var(--blue); opacity: .7;
}
.card h3 { margin-top: 0; color: var(--text); }
.card p:last-child { margin-bottom: 0; }
.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 9px; border-radius: 999px; background: var(--lemon); color: var(--blue-deep); margin-left: 8px; vertical-align: middle; }

/* Home hero */
.hero { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 32px; align-items: center; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; } }
.hero-img { width: 100%; height: auto; border-radius: var(--radius); display: block; }

/* Old placeholder (still used by pages that have not moved to the new home layout) */
.char-slot {
  aspect-ratio: 3 / 4; border: 2px dashed var(--line-blue); border-radius: var(--radius);
  display: grid; place-items: center; text-align: center; color: var(--muted);
  background: repeating-linear-gradient(45deg, transparent 0 12px, var(--sky-soft) 12px 24px);
  padding: 16px; font-size: 14px;
}

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-top: 8px; }
.plan .price { font-size: 32px; margin: 8px 0; color: var(--blue); line-height: 1.2; }
.plan .price .small { font-family: var(--font-body); }
.plan ul { padding-left: 18px; margin: 8px 0 18px; }
.plan:nth-child(2) { border-color: var(--blue); box-shadow: var(--shadow-pop); }
.plan:nth-child(2)::before { background: var(--lemon); border-bottom-color: var(--blue); }

/* Documents (terms, privacy, refund) */
.doc { max-width: 820px; }
.wrap.doc { max-width: var(--max); }
.wrap.doc > * { max-width: 820px; }
.doc h2 { font-size: 21px; margin-top: 40px; padding-top: 14px; border-top: 2px dashed var(--line-blue); }
.doc ol, .doc ul { padding-left: 22px; }
.doc li { margin: 4px 0; }
.doc table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 14px; margin: 8px 0 16px; background: var(--surface); border: 1px solid var(--line-blue); border-radius: var(--radius-sm); overflow: hidden; }
.doc th, .doc td { border-bottom: 1px solid var(--line-blue); padding: 10px 12px; text-align: left; vertical-align: top; }
.doc tr:last-child th, .doc tr:last-child td { border-bottom: 0; }
.doc th { background: var(--sky-soft); color: var(--blue-deep); overflow-wrap: normal; min-width: 7em; border-right: 1px solid var(--line-blue); }
.table-scroll { overflow-x: auto; }
.review { display: inline-block; font-size: 12px; font-weight: 700; color: #7A4A00; background: var(--notice); border: 1px solid var(--notice-line); border-radius: 6px; padding: 0 6px; }
.draft-banner { background: var(--notice); border: 1px solid var(--notice-line); border-radius: var(--radius-sm); padding: 14px 16px; font-size: 14px; margin-bottom: 28px; }
.ph { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 0.92em; }

/* Footer: business information (전자상거래법 제10조 표시 사항) */
.site-footer { background: var(--surface); border-top: 2px solid var(--blue); font-size: 13px; color: var(--muted); padding: 32px 0 44px; }
.site-footer .wrap::before { content: ""; display: block; width: 84px; height: 23px; margin-bottom: 20px;
  background: url("ruen-wordmark.svg") left center / contain no-repeat; }
.site-footer .links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 16px; }
.site-footer .links a { color: var(--text); text-decoration: none; font-weight: 600; }
.site-footer .links a:hover { color: var(--blue); }
.site-footer dl { display: grid; grid-template-columns: max-content 1fr; gap: 2px 14px; margin: 0 0 12px; }
.site-footer dt { font-weight: 600; color: var(--text); }
.site-footer dd { margin: 0; }
@media (max-width: 520px) { .site-footer dl { grid-template-columns: 1fr; } .site-footer dd { margin-bottom: 6px; } }

/* Release gate: text shown until the feature is verified in a release. fill.mjs --final refuses pages that still contain it. */
.gate { display: block; border-left: 3px solid var(--notice-line); background: var(--notice); padding: 6px 10px; border-radius: 6px; margin: 6px 0; }
.btn:focus-visible, a:focus-visible { outline: 3px solid var(--lemon-strong); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }

/* Home: desktop pieces (taskbar, windows, bubbles) drawn inside the scene pictures. Nia sits in the corner like the real app. */
.desk-bar { position: absolute; inset: auto 0 0 0; height: 9%; background: rgba(255, 255, 255, .85); border-top: 1px solid var(--line-blue);
  display: flex; align-items: center; gap: 2%; padding: 0 3%; z-index: 3; }
.night .desk-bar { background: rgba(27, 35, 64, .82); border-top-color: #4A5C9E; }
.desk-bar i { width: 3.2%; aspect-ratio: 1; border-radius: 4px; background: var(--sky); }
.desk-bar i:first-child { background: var(--blue); }
.desk-bar .clock { margin-left: auto; font: 700 clamp(9px, 1.1vw, 13px)/1 var(--font-body); color: var(--blue-deep); }
.night .desk-bar .clock { color: #fff; }
.desk-icons { position: absolute; left: 2.5%; top: 5%; display: grid; gap: 6px; width: 5%; }
.desk-icons i { aspect-ratio: 1; border-radius: 6px; background: rgba(255, 255, 255, .85); border: 1px solid var(--line-blue); }
.nia-c { position: absolute; right: 0; bottom: 9%; height: 56%; background: right bottom / contain no-repeat; z-index: 2; }
.nia-c.hello { aspect-ratio: 530 / 640; background-image: url("images/nia-hello-corner.webp"); }
.nia-c.work { aspect-ratio: 476 / 640; background-image: url("images/nia-work-corner.webp"); }
.nia-c.talk { aspect-ratio: 640 / 473; height: 44%; background-image: url("images/nia-talk-corner.webp"); }
.win { position: absolute; background: var(--surface); border: 2px solid var(--line-blue); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); }
.win::before { content: ""; display: block; height: clamp(10px, 1.6vw, 18px); background: var(--sky-soft); border-bottom: 2px solid var(--line-blue); }
.night .win { opacity: .55; }
.win .lines { padding: 5% 6%; display: grid; gap: clamp(5px, .8vw, 10px); }
.win .lines i { height: clamp(4px, .6vw, 7px); border-radius: 3px; background: var(--sky-soft); }
.win .lines i:nth-child(3n) { width: 70%; }
.win .lines i:nth-child(5n) { width: 45%; background: var(--lemon); }
.win .lines i.h { height: clamp(8px, 1.2vw, 14px); width: 40%; background: var(--sky); }
.clockcard { position: absolute; left: 10%; top: 9%; padding: 2.2% 3.5%; border-radius: 16px; background: rgba(255, 255, 255, .78); border: 2px solid #fff;
  color: var(--blue); box-shadow: var(--shadow); }
.clockcard b { display: block; font: 400 clamp(26px, 5vw, 60px)/1 var(--font-title); }
.clockcard span { display: block; margin-top: 6px; width: 70%; height: 6px; border-radius: 3px; background: var(--sky); }
.note-sticky { position: absolute; width: 14%; aspect-ratio: 1; background: var(--lemon); border-radius: 4px; transform: rotate(4deg); box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .35); }
.say, .me {
  position: absolute; max-width: 40%; margin: 0; padding: .5em .85em; border-radius: 14px; font: 600 clamp(10px, 1.25vw, 15px)/1.4 var(--font-body);
  box-shadow: 0 6px 18px -8px rgba(31, 69, 150, .45); z-index: 4;
}
.say { background: var(--surface); color: var(--text); border: 2px solid var(--blue); border-bottom-right-radius: 3px; }
.say::before { content: "니아"; display: block; font: 400 .8em/1.2 var(--font-title); color: var(--blue); margin-bottom: 1px; }
.say:lang(en)::before { content: "Nia"; }
.me { background: var(--lemon); color: var(--blue-deep); border: 2px solid var(--lemon-strong); border-bottom-left-radius: 3px; }
.chatbar { position: absolute; right: 26%; bottom: 13%; width: 38%; height: 8%; border-radius: 999px; background: var(--surface); border: 2px solid var(--blue);
  display: flex; align-items: center; padding: 0 3%; font: 600 clamp(9px, 1.05vw, 13px)/1 var(--font-body); color: var(--muted); z-index: 4; }
.chatbar::after { content: ""; margin-left: auto; height: 60%; aspect-ratio: 1; border-radius: 50%; background: var(--blue); }
.stamp { position: absolute; z-index: 3; padding: .3em .8em; border-radius: 8px; background: var(--lemon); color: var(--blue-deep); border: 2px solid var(--blue);
  font: 400 clamp(11px, 1.4vw, 17px)/1.2 var(--font-title); transform: rotate(-6deg); }

.day-note { margin-top: 48px; }

/* Home (ko/en): laid out after the Kindroid reference (big type, few words, soft drifting background, motion).
   Motion is CSS only (the site allows no page scripts). Scroll reveals use scroll-driven animations where the browser
   has them; elsewhere everything is simply shown. prefers-reduced-motion turns all of it off. */
.k { padding: 0; overflow-x: clip; }

/* Soft colour blobs drifting behind the page */
.k-bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.k-bg i { position: absolute; width: 56vmax; aspect-ratio: 1; border-radius: 50%; filter: blur(70px); opacity: .55; animation: k-drift 26s ease-in-out infinite alternate; }
.k-bg i:nth-child(1) { left: -18vmax; top: -12vmax; background: var(--sky); }
.k-bg i:nth-child(2) { right: -22vmax; top: 20vh; background: var(--lemon); animation-duration: 32s; animation-delay: -8s; }
.k-bg i:nth-child(3) { left: 20vw; bottom: -30vmax; background: var(--sky-soft); animation-duration: 38s; animation-delay: -16s; }
@keyframes k-drift { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(6vw, 4vh) scale(1.08); } 100% { transform: translate(-4vw, 8vh) scale(.94); } }

.k-eyebrow { display: block; font: 700 12px/1 ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); text-align: center; margin-bottom: 18px; }
.k h2 { margin: 0; text-align: center; font-size: clamp(32px, 5vw, 58px); line-height: 1.14; letter-spacing: -0.01em; }
.k-sec { padding: clamp(80px, 12vw, 150px) 0 0; }

/* Hero: title | stage | words */
.k-hero { display: grid; grid-template-columns: 1fr minmax(300px, 420px) 1fr; gap: 44px; align-items: center; min-height: min(calc(100vh - 68px), 820px); padding-top: 40px; padding-bottom: 20px; }
main.k > .k-hero > h1 { display: block; background: none; margin: 0; text-align: right; font-size: clamp(44px, 6.2vw, 84px); line-height: 1.04; }
.k-hero h1 span { display: block; animation: k-rise .9s cubic-bezier(.2, .8, .2, 1) both; }
.k-hero h1 span:nth-child(2) { animation-delay: .12s; }
main.k > .k-hero > h1 + * { margin-top: 0; }
.k-hero .k-words { max-width: 300px; animation: k-rise .9s .3s cubic-bezier(.2, .8, .2, 1) both; }
.k-hero .k-words p { font-size: 17px; color: var(--muted); }
.k-hero .cta { margin-top: 18px; }
.k-hero .ai-note { font-size: 13px; }
@keyframes k-rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }

.k-stage { position: relative; aspect-ratio: 4 / 5; border-radius: 32px; overflow: hidden; border: 3px solid var(--blue); box-shadow: 0 30px 60px -28px rgba(31, 69, 150, .55);
  background: radial-gradient(circle at 78% 14%, rgba(249, 239, 178, .95) 0 11%, transparent 11.5%), linear-gradient(170deg, #CFE2F8 0%, #EAF2FC 55%, #FBF6DA 100%);
  animation: k-pop 1s .1s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes k-pop { from { opacity: 0; transform: translateY(40px) scale(.96); } to { opacity: 1; transform: none; } }
.k-stage .desk-bar { height: 7%; }
.k-stage .desk-bar i { width: 6%; }
.k-stage .k-nia { position: absolute; right: -4%; bottom: 7%; height: 66%; aspect-ratio: 530 / 640; background: url("images/nia-hello-corner.webp") right bottom / contain no-repeat;
  transform-origin: 70% 100%; animation: k-bob 4.8s ease-in-out infinite; }
@keyframes k-bob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-5px) rotate(-.6deg); } }
.k-stage .win { left: 7%; top: 7%; width: 52%; height: 30%; }
.k-stage .say, .k-stage .me { max-width: 66%; font-size: clamp(12px, 1.2vw, 15px); }

/* A short chat that plays on a loop: me → Nia typing → Nia → pause */
.k-chat .me { left: 8%; top: 41%; animation: k-c1 10s infinite; }
.k-chat .k-dots { left: 10%; top: 52%; animation: k-c2 10s infinite; }
.k-chat .say { left: 10%; top: 52%; animation: k-c3 10s infinite; }
@keyframes k-c1 { 0%, 4% { opacity: 0; transform: translateY(10px) scale(.92); } 9%, 88% { opacity: 1; transform: none; } 95%, 100% { opacity: 0; transform: translateY(-6px); } }
@keyframes k-c2 { 0%, 16% { opacity: 0; transform: scale(.8); } 20%, 36% { opacity: 1; transform: none; } 39%, 100% { opacity: 0; transform: scale(.8); } }
@keyframes k-c3 { 0%, 38% { opacity: 0; transform: translateY(10px) scale(.92); } 43%, 88% { opacity: 1; transform: none; } 95%, 100% { opacity: 0; transform: translateY(-6px); } }
.k-dots { position: absolute; z-index: 4; display: flex; gap: 5px; padding: 12px 14px; background: var(--surface); border: 2px solid var(--blue); border-radius: 14px; border-bottom-right-radius: 3px; }
.k-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); animation: k-dot 1s ease-in-out infinite; }
.k-dots i:nth-child(2) { animation-delay: .15s; }
.k-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes k-dot { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-5px); opacity: 1; } }

/* Feature ticker (the feature names only, no figures) */
.k-ticker { margin-top: 30px; padding: 22px 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.k-ticker .k-track { display: flex; width: max-content; animation: k-roll 34s linear infinite; }
.k-ticker ul { display: flex; gap: 14px; margin: 0; padding: 0 7px; list-style: none; }
.k-ticker li { font: 400 clamp(18px, 2vw, 24px)/1 var(--font-title); color: var(--blue); white-space: nowrap; padding: 12px 22px; border-radius: 999px; background: rgba(255, 255, 255, .7); border: 2px solid var(--line-blue); }
.k-ticker li:nth-child(even) { background: var(--lemon); border-color: var(--lemon-strong); }
@keyframes k-roll { to { transform: translateX(-50%); } }

/* A day: four scene cards on a sideways rail. Swipe, trackpad, shift+wheel or the arrow buttons (Chrome/Edge) move it;
   cards snap into place and the ones coming in grow from slightly smaller. */
.k-rail { display: grid; grid-auto-flow: column; align-items: start; grid-auto-columns: min(540px, 84vw); gap: 22px; margin-top: clamp(44px, 6vw, 70px);
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding: 10px max(16px, calc((100vw - var(--max)) / 2 + 28px)) 28px; scroll-padding-inline: max(16px, calc((100vw - var(--max)) / 2 + 28px));
  scrollbar-width: thin; scrollbar-color: var(--blue) transparent; }
.k-slide { scroll-snap-align: start; display: flex; flex-direction: column; background: rgba(255, 255, 255, .86); border: 2px solid var(--line-blue);
  border-radius: 30px; padding: 12px 12px 26px; box-shadow: var(--shadow); }
.k-slide .k-vis { position: relative; aspect-ratio: 16 / 11; border-radius: 22px; overflow: hidden; margin-bottom: 22px;
  background: radial-gradient(circle at 80% 16%, rgba(249, 239, 178, .95) 0 10%, transparent 10.5%), linear-gradient(165deg, #D8E8FA 0%, #EAF2FC 55%, #FBF6DA 100%); }
.k-slide .k-vis.night { background: radial-gradient(circle at 82% 14%, #F9EFB2 0 4.5%, transparent 5%), linear-gradient(170deg, #22336B 0%, #3A4F95 60%, #5868A8 100%); }
.k-slide .k-vis .say, .k-slide .k-vis .me { max-width: 58%; font-size: clamp(11.5px, 1.2vw, 14.5px); }
.k-slide .k-vis .nia-c { bottom: 0; height: 64%; }
.k-slide .k-vis .nia-c.talk { height: 50%; }
.k-slide .k-txt { padding: 0 14px; }
.k-slide .time { display: inline-flex; align-items: center; gap: 10px; font: 400 15px/1 var(--font-title); color: var(--blue); background: var(--lemon); border-radius: 999px; padding: 7px 14px; margin-bottom: 14px; }
.k-slide .time small { font: 700 12px/1 ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .08em; color: var(--blue-deep); opacity: .7; }
.k-slide h3 { margin: 0 0 10px; font: 400 clamp(26px, 2.8vw, 34px)/1.2 var(--font-title); color: var(--text); }
.k-slide h3 .badge { font-family: var(--font-body); font-size: 13px; }
.k-slide p, .k-slide dl { margin: 0; font-size: 15.5px; color: var(--muted); line-height: 1.7; }
.k-slide dt { font-weight: 700; color: var(--blue-deep); margin-top: 8px; }
.k-slide dd { margin: 0; }
.k-hint { text-align: center; margin: 0; font: 700 12px/1 ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .18em; color: var(--muted); }
.k-hint i { display: inline-block; font-style: normal; animation: k-nudge 1.8s ease-in-out infinite; }
@keyframes k-nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(6px); } }

/* Arrow buttons and dots drawn by the browser itself (CSS carousel, Chrome/Edge 135+). Others keep the scrollbar. */
@supports selector(::scroll-button(*)) {
  .k-rail { scrollbar-width: none; scroll-marker-group: after; }
  .k-sec:has(> .k-rail) { position: relative; }
  .k-rail::scroll-button(*) { position: absolute; bottom: -16px; width: 46px; height: 46px; border-radius: 50%;
    border: 2px solid var(--blue); background: var(--surface); color: var(--blue); font: 700 22px/1 var(--font-body); cursor: pointer; box-shadow: 0 4px 0 var(--sky); }
  .k-rail::scroll-button(*):disabled { opacity: .3; cursor: default; box-shadow: none; }
  .k-rail::scroll-button(*):not(:disabled):hover { background: var(--lemon); }
  .k-rail::scroll-button(left) { content: "←" / "이전 장면"; left: calc(50% - 130px); }
  .k-rail::scroll-button(right) { content: "→" / "다음 장면"; right: calc(50% - 130px); }
  .k-rail:lang(en)::scroll-button(left) { content: "←" / "Previous scene"; }
  .k-rail:lang(en)::scroll-button(right) { content: "→" / "Next scene"; }
  .k-rail::scroll-marker-group { display: flex; justify-content: center; gap: 10px; margin-top: 4px; }
  .k-slide::scroll-marker { content: ""; width: 10px; height: 10px; border-radius: 999px; background: var(--line-blue); transition: width .3s, background .3s; }
  .k-slide::scroll-marker:target-current { width: 30px; background: var(--blue); }
  .k-hint { display: none; }
}
.k-slide .nia-c { animation: k-bob 5s ease-in-out infinite; transform-origin: 80% 100%; }
.k-slide:nth-child(2) .nia-c { animation-delay: -1.2s; }
.k-slide:nth-child(3) .nia-c { animation-delay: -2.4s; }
.k-slide:nth-child(4) .nia-c { animation-delay: -3.6s; }


/* Morning: Nia's bubble pops in after a moment, again and again */
.k-slide .pop { animation: k-popin 6s infinite; }
@keyframes k-popin { 0%, 12% { opacity: 0; transform: translateY(10px) scale(.85); } 18%, 86% { opacity: 1; transform: none; } 94%, 100% { opacity: 0; } }
/* Afternoon: lines being written in the window */
.k-slide .win .lines i { transform-origin: left; animation: k-write 7s ease-out infinite; }
.k-slide .win .lines i:nth-child(2) { animation-delay: .5s; }
.k-slide .win .lines i:nth-child(3) { animation-delay: 1s; }
.k-slide .win .lines i:nth-child(4) { animation-delay: 1.5s; }
.k-slide .win .lines i:nth-child(5) { animation-delay: 2s; }
.k-slide .win .lines i:nth-child(6) { animation-delay: 2.5s; }
.k-slide .win .lines i:nth-child(7) { animation-delay: 3s; }
.k-slide .win .lines i:nth-child(8) { animation-delay: 3.5s; }
@keyframes k-write { 0% { transform: scaleX(0); } 14%, 88% { transform: scaleX(1); } 100% { transform: scaleX(1); opacity: 0; } }
/* Evening: the little game scene scrolls */
.k-slide .game { animation: k-pan 9s linear infinite; }
@keyframes k-pan { 0%, 100% { background-position: 12% 16%, 16% 11%, 64% 12%, 70% 7%, 22% 56%, 22% 44%, 78% 60%, 78% 50%, bottom, 0 0; }
  50% { background-position: 4% 16%, 8% 11%, 52% 12%, 58% 7%, 14% 56%, 14% 44%, 66% 60%, 66% 50%, bottom, 0 0; } }
/* Night: two messages in turn */
.k-slide .me.seq { animation: k-c1 9s infinite; }
.k-slide .say.seq { animation: k-c3 9s infinite; }

/* Meet Nia */
.k-meet { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; margin-top: 56px; }
.k-portrait { position: relative; border-radius: 32px; overflow: hidden; border: 3px solid var(--blue); background: linear-gradient(170deg, #CFE2F8, #FBF6DA); aspect-ratio: 1100 / 820; box-shadow: var(--shadow-pop); }
.k-portrait .art { position: absolute; inset: 0; background: url("images/nia-talk.webp") center bottom / contain no-repeat; }
.k-portrait .tag { position: absolute; left: 16px; bottom: 16px; background: var(--surface); border: 2px solid var(--blue); border-radius: 999px; padding: 6px 16px; font: 400 16px/1.2 var(--font-title); color: var(--blue); }
.k-meet p { font-size: 17px; }

/* Memory band */
.k-band { margin-top: clamp(90px, 12vw, 150px); background: var(--blue); color: #fff; padding: clamp(80px, 11vw, 140px) 0; text-align: center; position: relative; overflow: hidden; }
.k-band::before { content: ""; position: absolute; inset: -40%; background: radial-gradient(circle at 30% 40%, rgba(173, 207, 242, .45), transparent 40%), radial-gradient(circle at 70% 60%, rgba(249, 239, 178, .25), transparent 38%);
  animation: k-drift 22s ease-in-out infinite alternate; }
.k-band > .wrap { position: relative; }
.k-band .k-eyebrow { color: var(--lemon); }
.k-band h2 { color: #fff; font-size: clamp(48px, 8vw, 104px); line-height: 1.02; }
.k-band p { max-width: 560px; margin: 26px auto 0; color: #E4EFFB; font-size: 16px; }
.k-band .k-lock { max-width: 620px; margin-top: 22px; padding: 12px 20px; border-radius: 18px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .3); color: #fff; font-size: 15px; font-weight: 600; }

/* Closing + giant wordmark */
.k-end { text-align: center; padding-top: clamp(70px, 9vw, 110px); }
.k-end .cta { justify-content: center; }
.k-end ul { list-style: none; padding: 0; margin: 26px auto 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; font-size: 14px; color: var(--muted); }
.k-end li { background: rgba(255, 255, 255, .7); border: 1px solid var(--line-blue); border-radius: 999px; padding: 6px 14px; }
.k-giant { margin: clamp(60px, 8vw, 100px) auto 0; width: calc(100% - 24px); max-width: 1500px; aspect-ratio: 2290 / 575; background: url("ruen-wordmark.svg") center bottom / contain no-repeat; }
.k + .site-footer { border-top: 0; position: relative; z-index: 1; }
.k + .site-footer .wrap::before { display: none; }

/* Scroll reveals (only where scroll-driven animations exist) */
@supports (animation-timeline: view()) {
  .k-rv { animation: k-reveal linear both; animation-timeline: view(); animation-range: entry 0% cover 28%; }
  .k-slide { animation: k-slidein linear both; animation-timeline: view(inline); animation-range: entry 0% entry 90%; }
  .k-portrait .art { animation: k-zoom linear both; animation-timeline: view(); animation-range: entry 0% cover 60%; }
  .k-band h2 { animation: k-grow linear both; animation-timeline: view(); animation-range: entry 0% cover 45%; }
  .k-giant { animation: k-giant linear both; animation-timeline: view(); animation-range: entry 0% cover 50%; }
}
@keyframes k-reveal { from { opacity: 0; transform: translateY(60px); } to { opacity: 1; transform: none; } }
@keyframes k-slidein { from { opacity: .35; transform: scale(.9) translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes k-zoom { from { transform: scale(1.14) translateY(4%); } to { transform: none; } }
@keyframes k-grow { from { opacity: .2; transform: scale(.86); letter-spacing: .04em; } to { opacity: 1; transform: none; letter-spacing: -0.01em; } }
@keyframes k-giant { from { opacity: 0; transform: translateY(40%) scale(.9); } to { opacity: 1; transform: none; } }

@media (max-width: 1000px) {
  .k-hero { grid-template-columns: 1fr; gap: 26px; min-height: 0; padding-top: 34px; justify-items: center; text-align: center; }
  main.k > .k-hero > h1 { text-align: center; }
  .k-hero h1 span { display: inline; }
  .k-center { width: 100%; display: flex; justify-content: center; }
  .k-stage { width: min(100%, 380px); }
  .k-hero .k-words { max-width: 460px; }
  .k-hero .cta { justify-content: center; }
  .k-hero .ai-note { text-align: left; }
  .k-meet { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 600px) {
  .k-slide .k-vis .say, .k-slide .k-vis .me { max-width: 66%; font-size: 12px; }
  .k-ticker { margin-top: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .k *, .k *::before, .k::before { animation: none !important; transition: none !important; }
  .k-chat .k-dots { display: none; }
}

/* Evening: a real-looking block game in the window, Nia in front of it */
.game-shot { height: 100%; background: url("images/game-blocks.webp") 0% 50% / cover no-repeat; animation: k-cam 16s ease-in-out infinite alternate; }
@keyframes k-cam { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }
.nia-f { position: absolute; right: -12%; bottom: 0; height: 74%; aspect-ratio: 919 / 640; z-index: 4;
  background: url("images/nia-watch-front.webp") right bottom / contain no-repeat; transform-origin: 60% 100%; animation: k-bob 4.6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .game-shot { background-position: 30% 50%; } }

/* Assistant: today's schedule, weather and a habit stamp on the desktop; Nia offers a reminder with a chip */
.cal { position: absolute; left: 5%; top: 7%; width: 46%; padding: 3% 3.5%; border-radius: 14px; background: rgba(255, 255, 255, .9); border: 2px solid var(--line-blue); box-shadow: var(--shadow); font-size: clamp(10px, 1.05vw, 13px); }
.cal b { display: block; font: 400 1.15em/1.2 var(--font-title); color: var(--blue); margin-bottom: 6%; }
.cal ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.cal li { display: flex; gap: 8px; align-items: center; padding: 3px 6px; border-radius: 7px; color: var(--text); font-weight: 600; }
.cal li span { font: 700 .9em/1 ui-monospace, "Cascadia Mono", Consolas, monospace; color: var(--muted); }
.cal li.now { background: var(--lemon); animation: k-glow 2.6s ease-in-out infinite; }
@keyframes k-glow { 50% { box-shadow: 0 0 0 3px rgba(49, 97, 199, .25); } }
.wx { position: absolute; right: 5%; top: 8%; display: flex; align-items: center; gap: 6px; padding: 5px 12px 5px 6px; border-radius: 999px; background: rgba(255, 255, 255, .9); border: 2px solid var(--line-blue);
  font: 700 clamp(10px, 1.05vw, 13px)/1 var(--font-body); color: var(--blue-deep); }
.wx i { width: 1.5em; height: 1.5em; border-radius: 50%; background: var(--lemon-strong); box-shadow: 0 0 0 3px rgba(243, 220, 94, .35); animation: k-spin 9s linear infinite; }
@keyframes k-spin { 50% { box-shadow: 0 0 0 6px rgba(243, 220, 94, .2); } }
.habit { position: absolute; left: 5%; bottom: 9%; display: flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 999px; background: rgba(255, 255, 255, .9); border: 2px solid var(--line-blue); }
.habit span { width: .8em; height: .8em; border-radius: 50%; border: 2px solid var(--sky); font-size: clamp(10px, 1.05vw, 13px); }
.habit span.on { background: var(--blue); border-color: var(--blue); }
.habit span.on:nth-child(3) { animation: k-stamp 6s ease-out infinite; }
@keyframes k-stamp { 0%, 30% { transform: scale(0); } 38% { transform: scale(1.35); } 46%, 100% { transform: scale(1); } }
.habit em { font: 700 clamp(10px, 1.05vw, 13px)/1 var(--font-body); font-style: normal; color: var(--blue-deep); margin-left: 4px; }
.say.ask { display: flex; align-items: center; gap: 8px; animation: k-popin 6s infinite; }
.say.ask::before { display: none; }
.say.ask i { font-style: normal; display: grid; place-items: center; width: 1.9em; height: 1.9em; border-radius: 50%; background: var(--lemon); flex: none; }

/* Desktop character: Nia cycles through four poses in the corner, each with its own little reaction */
.k-poses { position: absolute; inset: 0; z-index: 2; }
.k-poses i { position: absolute; right: 0; bottom: 0; background: right bottom / contain no-repeat; opacity: 0; transform-origin: 70% 100%; animation: k-pose 12s infinite; }
.k-poses .p1 { height: 70%; aspect-ratio: 530 / 640; background-image: url("images/nia-hello-corner.webp"); opacity: 1; }
.k-poses .p2 { height: 70%; aspect-ratio: 476 / 640; background-image: url("images/nia-work-corner.webp"); animation-delay: 3s; }
.k-poses .p3 { height: 54%; aspect-ratio: 640 / 473; background-image: url("images/nia-talk-corner.webp"); animation-delay: 6s; }
.k-poses .p4 { height: 70%; right: -14%; aspect-ratio: 919 / 640; background-image: url("images/nia-watch-front.webp"); animation-delay: 9s; }
@keyframes k-pose { 0% { opacity: 0; transform: translateY(14px) scale(.96); } 4%, 22% { opacity: 1; transform: none; } 27%, 100% { opacity: 0; transform: translateY(6px); } }
.k-poses .p1 { animation-name: k-pose-first; }
@keyframes k-pose-first { 0%, 22% { opacity: 1; transform: none; } 27%, 96% { opacity: 0; transform: translateY(6px); } 100% { opacity: 1; transform: none; } }
.k-reacts span { position: absolute; right: 30%; top: 12%; z-index: 4; padding: .45em .9em; border-radius: 14px; border-bottom-right-radius: 3px; background: var(--surface); border: 2px solid var(--blue);
  font: 400 clamp(13px, 1.5vw, 18px)/1.2 var(--font-title); color: var(--blue); box-shadow: 0 6px 18px -8px rgba(31, 69, 150, .45); opacity: 0; animation: k-react 12s infinite; }
:lang(ja) .k-reacts span, :lang(zh-Hant) .k-reacts span { font-family: inherit; font-weight: 800; }
.k-reacts .r1 { animation-delay: .4s; }
.k-reacts .r2 { animation-delay: 3.4s; }
.k-reacts .r3 { animation-delay: 6.4s; }
.k-reacts .r4 { animation-delay: 9.4s; background: var(--lemon); }
@keyframes k-react { 0% { opacity: 0; transform: translateY(10px) scale(.8) rotate(-4deg); } 4% { opacity: 1; transform: scale(1.08) rotate(2deg); } 7%, 19% { opacity: 1; transform: none; } 23%, 100% { opacity: 0; transform: translateY(-8px); } }
.k-pose-dots { position: absolute; left: 5%; bottom: 7%; display: flex; gap: 6px; z-index: 3; }
.k-pose-dots i { width: 9px; height: 9px; border-radius: 999px; background: rgba(49, 97, 199, .25); animation: k-pdot 12s infinite; }
.k-pose-dots i:nth-child(2) { animation-delay: 3s; }
.k-pose-dots i:nth-child(3) { animation-delay: 6s; }
.k-pose-dots i:nth-child(4) { animation-delay: 9s; }
@keyframes k-pdot { 0%, 24% { width: 26px; background: var(--blue); } 26%, 100% { width: 9px; background: rgba(49, 97, 199, .25); } }
@media (prefers-reduced-motion: reduce) { .k-poses .p1, .k-reacts .r1 { opacity: 1; } }

/* Closed beta: sale-prep notice and the two-plan grid on the pricing page */
.notice { background: var(--notice); border: 1px solid var(--notice-line); border-radius: var(--radius-sm); padding: 14px 16px; font-size: 15px; margin: 0 0 24px; }
.plans-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); max-width: 820px; }
/* Phones: wide policy tables scroll inside their box instead of squeezing into thin columns. */
@media (max-width: 640px) { .table-scroll > table { min-width: 620px; } }
