/* CustomFonts Kawaii website. The app's pink palette (pinkFill, pinkPale, pinkInk, accent and the keyboard's key colors, see
   DESIGN notes in the app), light and dark following the visitor's system: light pink buttons with dark pink ink, a very soft
   pink-tinted page, white (dark: plum) Settings-style cards, SF fonts and a translucent nav bar. No web fonts, no external files. */

:root {
  color-scheme: light dark;
  --bg: #fdf2f6;                    /* very soft pink-tinted neutral */
  --card: #ffffff;
  --label: #000000;
  --label2: rgba(60, 60, 67, 0.8);   /* secondaryLabel, a bit stronger than iOS so body text passes 4.5:1 */
  --sep: rgba(60, 60, 67, 0.18);
  --pink: #e0457f;                   /* the app accent: decoration and the focus ring */
  --btn: #ffc8dd;                    /* light pink button and the bubble behind a face */
  --btn-press: #ffadcb;              /* the same, pressed */
  --btn-pale: #ffe3ee;               /* secondary button fill */
  --btn-ink: #7a0f3d;                /* text on the pinks: 7.4:1 on --btn, 6.2:1 pressed */
  --btn-pale-ink: #7a0f3d;           /* text on the pale pink: 8.9:1 */
  --link: #a8164f;                   /* pink text on the page background is 6.6:1 */
  --blush: rgba(255, 127, 184, 0.34);
  --blush2: rgba(255, 190, 214, 0.45);
  --glass: rgba(253, 242, 246, 0.74);
  --bezel: #1c1c1e;
  --kbd-bg: #f2d3e0;                 /* keyboard background */
  --key: #ffdcea;                    /* face keys and the space bar */
  --fkey: #ffbad2;                   /* globe, delete */
  --chip: rgba(255, 208, 226, 0.75); /* unselected category chip */
  --act: #ff8fbc;                    /* selected chip and the return key (ink: --act-ink) */
  --act-ink: #3a0a22;
  --key-shadow: rgba(176, 62, 112, 0.28);
  --r: 22px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto,
    "Helvetica Neue", system-ui, sans-serif;
  /* Kaomoji use many symbols; these fonts carry them, then the system falls back per character. */
  --face: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Apple Symbols", -apple-system, BlinkMacSystemFont, "Segoe UI Symbol",
    "Noto Sans CJK JP", "Noto Sans Symbols 2", "Noto Sans Symbols", "Yu Gothic", Meiryo, system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #170f14;
    --card: #251a20;
    --label: #ffffff;
    --label2: rgba(255, 232, 242, 0.7);
    --sep: rgba(255, 200, 225, 0.16);
    --pink: #ff8fba;
    --btn: #ff9ec4;
    --btn-press: #f086af;
    --btn-pale: #4a2535;
    --btn-ink: #3a0a22;
    --btn-pale-ink: #ffd0e2;
    --link: #ff8fba;
    --blush: rgba(255, 143, 186, 0.16);
    --blush2: rgba(255, 127, 184, 0.12);
    --glass: rgba(23, 15, 20, 0.66);
    --bezel: #3a2c33;
    --kbd-bg: #2b1e25;
    --key: rgba(255, 158, 196, 0.3);
    --fkey: rgba(255, 158, 196, 0.18);
    --chip: rgba(255, 158, 196, 0.16);
    --act: #ff9ec4;
    --key-shadow: rgba(0, 0, 0, 0.45);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    radial-gradient(760px 380px at 85% -60px, var(--blush), transparent 70%),
    radial-gradient(620px 320px at 0% 40px, var(--blush2), transparent 70%);
  background-repeat: no-repeat;
  color: var(--label);
  font: 17px/1.47 var(--font);
  -webkit-font-smoothing: antialiased;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}
a { color: var(--link); }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; border-radius: 6px; }
.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---- Nav: translucent glass bar ---- */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid var(--sep);
  padding-top: env(safe-area-inset-top);
}
.nav .wrap { display: flex; align-items: center; gap: 16px; min-height: 52px; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 600; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.nav-links { margin-left: auto; display: flex; gap: 20px; }
.nav-links a { color: var(--label2); text-decoration: none; font-size: 15px; }
.nav-links a:hover { color: var(--label); }
@media (max-width: 560px) { .nav-links .hide-sm { display: none; } .nav-links { gap: 16px; } }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 10px 24px; border: 0; border-radius: 999px;
  font: 600 17px var(--font); text-decoration: none; cursor: pointer; text-align: center;
  transition: transform 0.12s ease, opacity 0.12s ease;
}
.btn:active { transform: scale(0.97); opacity: 0.9; }
.btn-primary {
  background: var(--btn); color: var(--btn-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 8px 20px rgba(224, 69, 127, 0.22);
}
.btn-primary:active { background: var(--btn-press); }
.btn-glass {
  background: var(--btn-pale); color: var(--btn-pale-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---- Type ---- */
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; }
h1 { font-size: clamp(38px, 7.2vw, 66px); line-height: 1.05; font-weight: 700; letter-spacing: -0.035em; }
h2 { font-size: clamp(28px, 4.4vw, 40px); line-height: 1.1; font-weight: 700; }
h3 { font-size: 17px; font-weight: 600; letter-spacing: 0; }
.lead { font-size: clamp(18px, 2.4vw, 21px); line-height: 1.45; color: var(--label2); margin: 20px 0 0; max-width: 36em; }
.eyebrow { color: var(--link); font-weight: 600; font-size: 15px; margin: 0 0 12px; }
.fine { color: var(--label2); font-size: 15px; margin: 18px 0 0; }
.pink { color: var(--link); }
.face { font-family: var(--face); white-space: nowrap; }

/* ---- Hero and sections ---- */
.hero { display: grid; gap: 40px; align-items: center; padding: 36px 0 28px; }
@media (min-width: 860px) { .hero { grid-template-columns: 1.1fr 0.9fr; gap: 56px; padding-top: 64px; } }
.hero-copy, .hero > div { min-width: 0; }
.hero-center { text-align: center; justify-items: center; }
@media (min-width: 860px) { .hero.hero-center { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-top: 56px; } }
.hero-center .hero-copy { max-width: 40em; }
.hero-center .hero-icon, .hero-center .lead { margin-inline: auto; }
.hero-center .hero-demo { justify-self: stretch; }
.hero-icon { width: 72px; height: 72px; border-radius: 18px; margin-bottom: 20px; box-shadow: 0 10px 24px rgba(224, 69, 127, 0.25); }
.section { padding: 48px 0; }
.section-head { margin-bottom: 24px; max-width: 40em; }
.section-head p { color: var(--label2); margin: 12px 0 0; }
.section-head p:first-child { margin-top: 0; }

/* ---- Phone mock-up: 5 states stacked on top of each other, the one with .is-on shows (site.js moves it; without
   JavaScript the first state, Happy, is the one with .is-on). Sizes use the phone's own width (cqw), so the 3 x 3 faces
   scale with the phone down to a 320px screen; the px values are the fallback for browsers without container units. ---- */
.hero-demo { min-width: 0; }
.phone-demo { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 10px; min-width: 0; }
.phone {
  width: min(300px, 100%); container-type: inline-size; padding: 9px; border-radius: 44px; background: var(--bezel); position: relative;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.12) inset, 0 30px 60px rgba(224, 69, 127, 0.22);
}
.screen {
  position: relative; border-radius: 35px; background: var(--bg); overflow: hidden; display: flex; flex-direction: column;
  -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none;
}
.screen.is-live { cursor: pointer; touch-action: manipulation; }
.screen:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; border-radius: 35px; }
.island { position: absolute; top: 10px; left: 50%; width: 86px; height: 25px; margin-left: -43px; border-radius: 14px; background: #000; z-index: 2; }
.stage, .keys { display: grid; }
.stage { position: relative; min-height: 240px; min-height: 90cqw; background: radial-gradient(120% 70% at 50% 0%, var(--blush), transparent 75%); }
.stage::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 9px; height: 34px; border-radius: 17px; background: var(--card); border: 1px solid var(--sep); }
.stage-item, .grid { grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity 0.25s ease, visibility 0s linear 0.25s; }
.stage-item.is-on, .grid.is-on { opacity: 1; visibility: visible; transition: opacity 0.25s ease, visibility 0s; }
.stage-item { display: grid; place-items: center; padding-top: 30px; }
.stage-face {
  padding: 0.25em 0.7em 0.3em; border-radius: 999px; background: var(--btn); color: var(--btn-ink);
  font-size: 28px; font-size: 9.6cqw; line-height: 1.3;
}
.kbd { background: var(--kbd-bg); padding: 8px 5px; }
.strip { display: flex; gap: 3px; }
.chip {
  flex: 1 1 auto; min-width: 0; height: 30px; padding: 0 3px; border-radius: 999px; background: var(--chip); color: var(--label);
  display: grid; place-items: center; overflow: hidden; white-space: nowrap; font-family: var(--face);
  font-size: 11px; font-size: 4cqw; transition: background-color 0.2s ease;
}
.chip.is-on { background: var(--act); color: var(--act-ink); }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 42px; gap: 5px; padding: 8px 0 0; }
.key {
  display: grid; place-items: center; min-width: 0; padding: 0 3px; border-radius: 9px; overflow: hidden;
  background: var(--key); color: var(--label); box-shadow: 0 1px 0 var(--key-shadow);
}
.key .f { white-space: nowrap; font-family: var(--face); }
.f.s1 { font-size: 15px; font-size: 5.4cqw; }
.f.s2 { font-size: 13px; font-size: 4.6cqw; }
.f.s3 { font-size: 11px; font-size: 4cqw; }
.f.s4 { font-size: 10px; font-size: 3.5cqw; }
.bar { display: flex; gap: 5px; padding-top: 8px; }
.fn {
  height: 36px; border-radius: 8px; background: var(--fkey); color: var(--label); font: 13px var(--font);
  display: grid; place-items: center; box-shadow: 0 1px 0 var(--key-shadow);
}
.fn svg { width: 18px; height: 18px; }
.fn-globe, .fn-delete { flex: 0 0 15%; }
.fn-space { flex: 1; background: var(--key); }
.fn-return { flex: 0 0 22%; background: var(--act); color: var(--act-ink); }
.dots { display: flex; gap: 2px; }
.dot { width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; background: none; display: grid; place-items: center; cursor: pointer; }
.dot::before { content: ""; width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--link); transition: background-color 0.2s ease, transform 0.2s ease; }
.dot[aria-current="true"]::before { background: var(--link); transform: scale(1.15); }
.phone-caption { margin: 0; text-align: center; color: var(--label2); font-size: 15px; }

/* ---- Settings-style grouped list ---- */
.group { background: var(--card); border-radius: var(--r); overflow: hidden; }
.row { display: flex; gap: 14px; padding: 14px 16px; align-items: flex-start; }
.row + .row { border-top: 0.5px solid var(--sep); }
.row > div { min-width: 0; }
.row p { margin: 2px 0 0; color: var(--label2); font-size: 15px; line-height: 1.4; }
.row h3 .face { font-weight: 400; color: var(--label2); margin-left: 6px; }
.tile { flex: none; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: #fff; font-size: 19px; line-height: 1; }
.tile svg { width: 20px; height: 20px; }
.t-green { background: #248a3d; } .t-blue { background: #007aff; } .t-orange { background: #c93400; } .t-indigo { background: #5856d6; }
.t-pink { background: var(--btn); color: var(--btn-ink); } .t-rose { background: #c2185b; } .t-violet { background: #8944ab; }
.num { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--btn); color: var(--btn-ink); font: 600 15px/28px var(--font); text-align: center; }

/* ---- Moods ---- */
.moods { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 560px) { .moods { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 860px) { .moods { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .moods { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.mood { background: var(--card); border-radius: 18px; padding: 12px 14px 14px; min-width: 0; }
.mood-face { margin: 6px 0 0; font-size: 22px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; }
.mood-n { margin: 4px 0 0; color: var(--label2); font-size: 14px; }

/* ---- FAQ ---- */
details { padding: 14px 16px; }
details + details { border-top: 0.5px solid var(--sep); }
summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--label2); font-weight: 400; font-size: 22px; line-height: 1; }
details[open] summary::after { content: "\2212"; }
details p { margin: 10px 0 0; color: var(--label2); }

/* ---- Text pages (privacy) ---- */
.prose { max-width: 680px; padding: 48px 0 24px; }
.prose .updated { color: var(--label2); font-size: 15px; margin-top: 8px; }
.prose h1 { font-size: clamp(34px, 6vw, 48px); }
.prose h2 { font-size: 24px; margin-top: 36px; }
.prose p, .prose li { color: var(--label2); }
.prose p strong, .prose li strong { color: var(--label); }
.prose ul { padding-left: 22px; }

/* ---- Footer ---- */
.foot { padding: 32px 0 calc(40px + env(safe-area-inset-bottom)); color: var(--label2); font-size: 14px; border-top: 0.5px solid var(--sep); margin-top: 32px; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
.foot nav { display: flex; gap: 20px; }
.foot a { color: inherit; }
.foot p { margin: 0; }
.foot-other { flex-basis: 100%; }

/* ---- Utilities ---- */
[hidden] { display: none !important; }
.center { text-align: center; }
.actions.center { justify-content: center; }
.made-by img { display: inline-block; vertical-align: -4px; margin-right: 6px; border-radius: 4px; }
.section-head.center { margin-inline: auto; text-align: center; }
