/* Nunito and Zen Maru Gothic: SIL Open Font License 1.1 (https://openfontlicense.org). Subsets generated by build.mjs. */
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/assets/fonts/nunito-latin.20fc9b6fc6.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Zen Maru Gothic";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/zen-maru-gothic-700-core-1.3f8f8d9558.woff2") format("woff2");
  unicode-range: U+a9, U+b7, U+f1, U+f3, U+2014, U+2019, U+201c-201d, U+2026, U+3001-3002, U+300c-300d, U+3010-3011, U+3042, U+3044, U+3046, U+3048, U+304a-3053, U+3055, U+3057-305b, U+305d-3061, U+3063-306c, U+306e-3070, U+3072-3076, U+3078-3079, U+307b, U+307e-3084, U+3087-308d, U+308f, U+3092-3093, U+30a2-30a4, U+30a6-30a7, U+30aa-30ab, U+30ad, U+30af-30b0, U+30b3, U+30b5, U+30b7-30bb, U+30bd, U+30bf, U+30c3, U+30c6-30ca, U+30cd, U+30cf-30d1, U+30d3-30d7, U+30d9-30da, U+30dc-30de, U+30e1-30e3, U+30e7, U+30e9-30eb, U+30ed, U+30ef, U+30f3, U+30fb-30fc, U+4e00, U+4e0a, U+4e0d, U+4e16, U+4e21, U+4e26, U+4e2d, U+4e3b, U+4e86, U+4e8b, U+4eac, U+4eba, U+4ed6, U+4ee5, U+4ef6, U+4efb, U+4f1d, U+4f4f, U+4f53, U+4f55, U+4f5c, U+4f7f, U+4f9b, U+4fa1, U+4fb5, U+4fdd, U+4fe1, U+50cf, U+5143, U+5148, U+5165, U+5168, U+516c, U+5171, U+5177, U+5185, U+518a, U+518d, U+5199, U+51e6, U+51fa, U+5207, U+521d, U+5225, U+5229, U+524a, U+524d, U+529b, U+52a0, U+52b9, U+52d5, U+5316, U+53c2, U+53d6-53d7, U+53e3, U+53ef, U+5404, U+5408, U+540c-540d, U+544a, U+547c, U+54c1, U+5546, U+554f, U+55b6, U+56de, U+56fd, U+5728, U+5730, U+57df, U+57fa, U+5831, U+5834, U+5883, U+58f0, U+58f2, U+5909, U+5916, U+5922, U+5927, U+5951, U+597d, U+59d4, U+5b50, U+5b58, U+5b63, U+5b66, U+5b88-5b89, U+5b9a, U+5bb3, U+5bb6, U+5bb9, U+5bfe, U+5c11, U+5c4a, U+5c65, U+5dfb, U+5e74, U+5e83, U+5ea6, U+5f15, U+5f53, U+5f62, U+5f85, U+5f8c, U+5f97, U+5fa9, U+5fb4, U+5fc3, U+5fdc, U+6027, U+60c5, U+610f, U+614b, U+6163, U+6210, U+6240, U+624b, U+6255, U+6271, U+629e, U+62c5, U+62db, U+62e0, U+6301, U+633f, U+63a2, U+63cf-63d0, U+63f4, U+64a4, U+64ae, U+652f, U+6545, U+6559, U+6574, U+6587, U+6599, U+65ad, U+65b0, U+65b9, U+65cf, U+65e5, U+65e7, U+660e, U+6642, U+66ae, U+66f4, U+66f8, U+66ff-6700, U+6708-6709, U+671f, U+672b-672c, U+6761, U+6771, U+679c, U+67a0, U+67f1, U+6839, U+683c, U+68da, U+696d, U+6a29, U+6a5f, U+6b21, U+6b62, U+6b73-6b74, U+6b8b, U+6c17, U+6c7a, U+6cd5, U+6ce2, U+6d3b, U+6d3e, U+6e2c, U+6e96, U+70b9, U+7121, U+7136, U+7269, U+7279, U+72b6, U+7406, U+74b0, U+751f, U+7528, U+7531, U+753b, U+754c, U+767b, U+7684, U+76ee, U+76f4, U+771f, U+77e5, U+77ed, U+78ba, U+793a, U+793e, U+7981, U+79d1, U+79fb, U+7a93, U+7ae0, U+7aef, U+7b49, U+7ba1, U+7bc0, U+7c73, U+7d04, U+7d19, U+7d42, U+7d4c, U+7d61, U+7d75, U+7d9a, U+7dd2, U+7fd2, U+8005, U+80fd, U+81ea, U+82f1, U+884c, U+8868, U+8981, U+898b, U+898f, U+89e3, U+8a00, U+8a08, U+8a17-8a18, U+8a2d, U+8a31, U+8a3c, U+8a71, U+8a8d, U+8a9e, U+8aac-8aad, U+8ab2, U+8abf, U+8b77, U+8c61, U+8ca0, U+8ca9, U+8cac, U+8cbb, U+8cea, U+8cfc, U+8eab, U+8f44, U+8fd1, U+8fd4, U+9000-9001, U+901a, U+9023, U+904b, U+9078, U+90e8, U+914d, U+91d1, U+9332, U+9577, U+958b, U+9593, U+9650, U+9664, U+96e2, U+96fb, U+9762, U+97f3, U+9805, U+984d, U+98db, U+9a13, U+9cf4, U+9f62, U+ff08-ff09, U+ff0f, U+ff1a, U+ff1f;
}
@font-face {
  font-family: "Zen Maru Gothic";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/zen-maru-gothic-500-core-1.0bf867c14e.woff2") format("woff2");
  unicode-range: U+a9, U+b7, U+f1, U+f3, U+2014, U+2019, U+201c-201d, U+2026, U+3001-3002, U+300c-300d, U+3010-3011, U+3042, U+3044, U+3046, U+3048, U+304a-3053, U+3055, U+3057-305b, U+305d-3061, U+3063-306c, U+306e-3070, U+3072-3076, U+3078-3079, U+307b, U+307e-3084, U+3087-308d, U+308f, U+3092-3093, U+30a2-30a4, U+30a6-30a7, U+30aa-30ab, U+30ad, U+30af-30b0, U+30b3, U+30b5, U+30b7-30bb, U+30bd, U+30bf, U+30c3, U+30c6-30ca, U+30cd, U+30cf-30d1, U+30d3-30d7, U+30d9-30da, U+30dc-30de, U+30e1-30e3, U+30e7, U+30e9-30eb, U+30ed, U+30ef, U+30f3, U+30fb-30fc, U+4e00, U+4e0a, U+4e0d, U+4e16, U+4e21, U+4e26, U+4e2d, U+4e3b, U+4e86, U+4e8b, U+4eac, U+4eba, U+4ed6, U+4ee5, U+4ef6, U+4efb, U+4f1d, U+4f4f, U+4f53, U+4f55, U+4f5c, U+4f7f, U+4f9b, U+4fa1, U+4fb5, U+4fdd, U+4fe1, U+50cf, U+5143, U+5148, U+5165, U+5168, U+516c, U+5171, U+5177, U+5185, U+518a, U+518d, U+5199, U+51e6, U+51fa, U+5207, U+521d, U+5225, U+5229, U+524a, U+524d, U+529b, U+52a0, U+52b9, U+52d5, U+5316, U+53c2, U+53d6-53d7, U+53e3, U+53ef, U+5404, U+5408, U+540c-540d, U+544a, U+547c, U+54c1, U+5546, U+554f, U+55b6, U+56de, U+56fd, U+5728, U+5730, U+57df, U+57fa, U+5831, U+5834, U+5883, U+58f0, U+58f2, U+5909, U+5916, U+5922, U+5927, U+5951, U+597d, U+59d4, U+5b50, U+5b58, U+5b63, U+5b66, U+5b88-5b89, U+5b9a, U+5bb3, U+5bb6, U+5bb9, U+5bfe, U+5c11, U+5c4a, U+5c65, U+5dfb, U+5e74, U+5e83, U+5ea6, U+5f15, U+5f53, U+5f62, U+5f85, U+5f8c, U+5f97, U+5fa9, U+5fb4, U+5fc3, U+5fdc, U+6027, U+60c5, U+610f, U+614b, U+6163, U+6210, U+6240, U+624b, U+6255, U+6271, U+629e, U+62c5, U+62db, U+62e0, U+6301, U+633f, U+63a2, U+63cf-63d0, U+63f4, U+64a4, U+64ae, U+652f, U+6545, U+6559, U+6574, U+6587, U+6599, U+65ad, U+65b0, U+65b9, U+65cf, U+65e5, U+65e7, U+660e, U+6642, U+66ae, U+66f4, U+66f8, U+66ff-6700, U+6708-6709, U+671f, U+672b-672c, U+6761, U+6771, U+679c, U+67a0, U+67f1, U+6839, U+683c, U+68da, U+696d, U+6a29, U+6a5f, U+6b21, U+6b62, U+6b73-6b74, U+6b8b, U+6c17, U+6c7a, U+6cd5, U+6ce2, U+6d3b, U+6d3e, U+6e2c, U+6e96, U+70b9, U+7121, U+7136, U+7269, U+7279, U+72b6, U+7406, U+74b0, U+751f, U+7528, U+7531, U+753b, U+754c, U+767b, U+7684, U+76ee, U+76f4, U+771f, U+77e5, U+77ed, U+78ba, U+793a, U+793e, U+7981, U+79d1, U+79fb, U+7a93, U+7ae0, U+7aef, U+7b49, U+7ba1, U+7bc0, U+7c73, U+7d04, U+7d19, U+7d42, U+7d4c, U+7d61, U+7d75, U+7d9a, U+7dd2, U+7fd2, U+8005, U+80fd, U+81ea, U+82f1, U+884c, U+8868, U+8981, U+898b, U+898f, U+89e3, U+8a00, U+8a08, U+8a17-8a18, U+8a2d, U+8a31, U+8a3c, U+8a71, U+8a8d, U+8a9e, U+8aac-8aad, U+8ab2, U+8abf, U+8b77, U+8c61, U+8ca0, U+8ca9, U+8cac, U+8cbb, U+8cea, U+8cfc, U+8eab, U+8f44, U+8fd1, U+8fd4, U+9000-9001, U+901a, U+9023, U+904b, U+9078, U+90e8, U+914d, U+91d1, U+9332, U+9577, U+958b, U+9593, U+9650, U+9664, U+96e2, U+96fb, U+9762, U+97f3, U+9805, U+984d, U+98db, U+9a13, U+9cf4, U+9f62, U+ff08-ff09, U+ff0f, U+ff1a, U+ff1f;
}
@font-face {
  font-family: "Zen Maru Gothic";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/zen-maru-gothic-500-legal-1.6f99711f2d.woff2") format("woff2");
  unicode-range: U+2013, U+2192, U+3005, U+3012, U+301c, U+3053-3054, U+3099, U+30a1, U+30a8-30a9, U+30ab-30ac, U+30b1-30b2, U+30b5-30b6, U+30bb-30bc, U+30bf-30c0, U+30c4-30c5, U+30cb, U+30df-30e0, U+30e5-30e6, U+30ec, U+4e01, U+4e09, U+4e0b, U+4e45, U+4e89, U+4e92, U+4ecb, U+4ed5, U+4ed8, U+4ee3-4ee4, U+4ef2, U+4f1a, U+4f3c, U+4f4d, U+4f8b, U+4f9d, U+4fee, U+500b, U+5024, U+505c, U+5065, U+5074, U+507d, U+5099, U+511f, U+512a, U+514d, U+5186, U+5206, U+5224, U+5236, U+523b, U+5247, U+52a9, U+52d9, U+52e7, U+5305, U+533a-533b, U+533f, U+5341, U+5358, U+5360, U+5371, U+5374, U+539f, U+53bb, U+53c8, U+53ca, U+53cd-53ce, U+53e4, U+53f7, U+5426, U+542b, U+5468, U+5473, U+547d, U+54e1, U+552f, U+55aa, U+56f2, U+5742, U+578b, U+592a, U+5931, U+596a, U+59a8, U+59cb, U+5ac1, U+5b8c, U+5b97, U+5b9f, U+5bc6, U+5c02, U+5c0f, U+5c40, U+5c45, U+5c5e, U+5ddd-5dde, U+5dee, U+5df1, U+5e03, U+5e38, U+5ead, U+5eb7, U+5ef6, U+5f0f, U+5f37, U+5f71, U+5f8b, U+5f93, U+5fa1, U+5fae, U+5fc5, U+6025, U+616e, U+623b, U+627f-6280, U+628a, U+62d2, U+62e1, U+62ec, U+6307, U+6392, U+63a5, U+63aa, U+63b2, U+63db, U+63e1, U+640d, U+643e, U+64cd, U+6539, U+653e, U+6551, U+6557, U+6563, U+6570, U+65bd, U+65e2, U+65e8, U+6620, U+662f, U+666f, U+6697, U+670d, U+672a, U+672d, U+675f, U+6790, U+67fb, U+6821, U+682a, U+6848, U+68c4, U+691c, U+6982, U+6a19, U+6b63, U+6bb5, U+6c0f, U+6c11, U+6c38, U+6c42, U+6cc1, U+6d41, U+6d88, U+6dfb, U+6e08, U+6e0b, U+6e21, U+6e80, U+6f0f, U+6f54, U+70ba, U+7167, U+7248, U+72ec, U+7384, U+73fe, U+7533, U+756a, U+7570, U+7591, U+7642, U+767a, U+76ca, U+76e3, U+76f8, U+7763, U+77f3, U+7834, U+79c1, U+79d8, U+7a0b, U+7a0e, U+7a2e, U+7acb, U+7b2c, U+7b54, U+7b56, U+7b97, U+7bc4, U+7c21, U+7d1b, U+7d2f-7d30, U+7d44, U+7d50, U+7d99, U+7dca, U+7dcf, U+7de8, U+7e2e, U+7e70, U+7f6e, U+7fa9, U+7ffb, U+8003, U+808c, U+80b2, U+80cc, U+81f4, U+822c, U+8272, U+82e6, U+8457, U+8853, U+8861, U+88ab, U+88c1, U+88dc, U+88fd, U+8907, U+8996, U+89a7, U+89aa, U+8a02, U+8a0e, U+8a33, U+8a3a, U+8a66, U+8a72-8a73, U+8a98, U+8aa4, U+8ab0, U+8ac7, U+8acb, U+8afe, U+8b58, U+8b70, U+8b72, U+8c37, U+8ca8, U+8cc7, U+8ce0, U+8d85, U+8d8a, U+8ee2, U+8f09, U+8fbc, U+8ffd, U+9014, U+901f, U+9032, U+9045, U+904e, U+9053, U+9055, U+9060, U+9069, U+907f, U+9084, U+90a6, U+90f5, U+90fd, U+91cd-91cf, U+9580, U+9589, U+95a2, U+95b2, U+9632, U+964d, U+967a, U+967d, U+9694, U+969b-969c, U+96c6, U+975e, U+97ff, U+9806, U+9818, U+983c, U+984c, U+9854, U+9858, U+985e, U+9aea;
}
/*
 * StudyTale site styles.
 * @font-face rules for the self-hosted font subsets are prepended by build.mjs.
 * Fonts: Nunito and Zen Maru Gothic, SIL Open Font License 1.1.
 */

:root {
  --paper: #fbf5ea;
  --paper-deep: #f4ead8;
  --card: #fffdf8;
  --ink: #3b2a20;
  --ink-soft: #6b5647;
  --line: #eadcc6;
  --line-strong: #d9c4a3;
  --orange: #ef8a2c;
  --orange-soft: #fde6cf;
  --orange-deep: #b3530d;
  --red: #c23a2e;
  --red-deep: #a52c22;
  --red-soft: #fbe3dc;
  --teal: #4f9a91;
  --teal-deep: #27605a;
  --teal-soft: #e2f0ec;
  --yellow: #ffd54a;
  --yellow-soft: #fff1bf;

  --shadow-sm: 0 1px 2px rgb(94 62 32 / 6%), 0 4px 10px -4px rgb(94 62 32 / 10%);
  --shadow-md: 0 2px 4px rgb(94 62 32 / 5%), 0 16px 32px -12px rgb(94 62 32 / 22%);
  --shadow-lg: 0 4px 10px rgb(94 62 32 / 6%), 0 34px 64px -20px rgb(94 62 32 / 34%);

  /* Slightly uneven radii read as hand-cut paper. */
  --radius-lg: 34px 30px 36px 31px / 31px 36px 30px 34px;
  --radius-md: 22px 20px 24px 21px / 21px 24px 20px 22px;

  --font-body: "Nunito", "Hiragino Maru Gothic ProN", "Zen Maru Gothic", "Hiragino Sans", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  --font-display: "Nunito", "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic UI", system-ui, sans-serif;

  --container: 1120px;
  --gutter: clamp(20px, 5vw, 40px);
  --section-y: clamp(48px, 7vw, 104px);
  --ease: cubic-bezier(.22, .8, .3, 1);

  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.05' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .32 0 0 0 0 .2 0 0 0 .15 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    var(--noise),
    radial-gradient(1100px 620px at 8% -8%, rgb(255 250 238 / 90%), transparent 62%),
    radial-gradient(900px 560px at 104% 18%, rgb(252 229 196 / 55%), transparent 60%);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1.0625rem;
  line-height: 1.9;
  letter-spacing: .02em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Japanese wraps only between phrases: build.mjs inserts <wbr> at BudouX phrase boundaries. */
body { word-break: keep-all; overflow-wrap: break-word; }
:lang(ja) { line-break: strict; }
html:lang(en) body { line-height: 1.7; letter-spacing: .005em; }
[lang="en"] { letter-spacing: normal; }

main { flex: 1 0 auto; }

img, svg { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink);
  text-wrap: balance;
}

:lang(ja) :is(h1, h2, h3, h4) { font-feature-settings: "palt"; letter-spacing: .03em; }

p, li { text-wrap: pretty; }

.nobr { white-space: nowrap; }

a {
  color: var(--teal-deep);
  text-decoration-thickness: .08em;
  text-underline-offset: .22em;
  transition: color .2s var(--ease), background-color .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}

a:hover { color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}

::selection { background: var(--yellow-soft); color: var(--ink); }

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Keeps Japanese phrases together so headings wrap at natural breaks. */
.ph { display: inline-block; overflow-wrap: anywhere; }

.skip {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 10;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.skip:focus { top: 16px; color: #fff; }

/* Hand-drawn brush underline. */
.marker {
  padding-inline: .06em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 24' preserveAspectRatio='none'%3E%3Cpath d='M4 15c30-7 62-9 96-6s64 5 96-1' fill='none' stroke='%23ffd54a' stroke-width='13' stroke-linecap='round' opacity='.85'/%3E%3C/svg%3E") left bottom .02em / 100% .42em no-repeat;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* ---------- Header ---------- */

.site-header { padding-block: 18px 8px; }

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  font-family: "Nunito", var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: .01em;
}

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease);
}

.brand:hover { color: var(--ink); }
.brand:hover img { transform: rotate(-6deg) scale(1.04); }

.header-nav { margin-left: auto; }

.header-nav ul {
  display: flex;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.header-nav a {
  display: block;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: .95rem;
  font-weight: 700;
  text-decoration: none;
}

.header-nav a:hover {
  color: var(--ink);
  background: rgb(255 255 255 / 70%);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 8px 16px 8px 12px;
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  background: rgb(255 253 248 / 60%);
  color: var(--ink);
  font-size: .92rem;
  font-weight: 700;
  text-decoration: none;
}

.lang-switch svg { width: 18px; height: 18px; color: var(--teal-deep); }

.lang-switch:hover {
  border-color: var(--ink-soft);
  background: var(--card);
  color: var(--ink);
}

@media (max-width: 879px) {
  .header-nav { display: none; }
  .lang-switch { margin-left: auto; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55em;
  min-height: 56px;
  padding: 14px 28px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: .04em;
  text-decoration: none;
  cursor: pointer;
}

.btn svg { width: 1.25em; height: 1.25em; flex: none; }

.btn-primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 3px 0 var(--red-deep), 0 14px 26px -12px rgb(165 44 34 / 70%);
}

.btn-primary:hover {
  color: #fff;
  background: #b93428;
  transform: translateY(-2px);
  box-shadow: 0 5px 0 var(--red-deep), 0 20px 30px -14px rgb(165 44 34 / 75%);
}

.btn-primary:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--red-deep), 0 8px 16px -10px rgb(165 44 34 / 60%);
}

.btn-ghost {
  background: rgb(255 253 248 / 55%);
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
}

.btn-ghost:hover {
  color: var(--ink);
  background: var(--card);
  box-shadow: inset 0 0 0 1.5px var(--ink-soft), var(--shadow-sm);
  transform: translateY(-1px);
}

/* ---------- Common section parts ---------- */

.section { position: relative; padding-block: var(--section-y); }

.section-head {
  max-width: 740px;
  margin: 0 auto clamp(40px, 6vw, 64px);
  text-align: center;
}

.section-head h2 {
  margin: 18px 0 0;
  font-size: clamp(1.6rem, 1.6vw + 1.2rem, 2.55rem);
  line-height: 1.45;
}

.section-head h2::after {
  content: "";
  display: block;
  width: 76px;
  height: 12px;
  margin: 18px auto 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 76 12'%3E%3Cpath d='M3 7c5-5 10-5 15 0s10 5 15 0 10-5 15 0 10 5 15 0 7-3 10-2' fill='none' stroke='%23ef8a2c' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.section-head p {
  margin: 18px auto 0;
  max-width: 36em;
  color: var(--ink-soft);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 5px 16px 5px 12px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal-deep);
  font-family: var(--font-display);
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .08em;
}

.eyebrow svg { width: 16px; height: 16px; color: var(--orange); }

.eyebrow--orange { background: var(--orange-soft); color: var(--orange-deep); }
.eyebrow--orange svg { color: var(--red); }
.eyebrow--red { background: var(--red-soft); color: var(--red-deep); }
.eyebrow--red svg { color: var(--orange); }

/* A band with a wavy top and bottom edge; the paper texture shows through. */
.band { background: rgb(236 219 190 / 34%); }

.band::before,
.band::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 26px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 26' preserveAspectRatio='none'%3E%3Cpath d='M0 26V15C120 5 240 3 360 10s240 14 360 7 240-15 360-10 240 12 360 6V26Z' fill='%23ecdbbe' fill-opacity='.34'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  pointer-events: none;
}

.band::before { bottom: 100%; }
.band::after { top: 100%; transform: scaleY(-1); }

.card {
  position: relative;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.blob-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  flex: none;
  border-radius: 44% 56% 52% 48% / 52% 45% 55% 48%;
  background: var(--orange-soft);
  color: var(--orange-deep);
}

.blob-icon svg { width: 28px; height: 28px; }

.tone-teal .blob-icon, .blob-icon.tone-teal { background: var(--teal-soft); color: var(--teal-deep); }
.tone-red .blob-icon, .blob-icon.tone-red { background: var(--red-soft); color: var(--red-deep); }
.tone-yellow .blob-icon, .blob-icon.tone-yellow { background: var(--yellow-soft); color: #8a5a00; }

/* ---------- Hero ---------- */

.hero { padding-block: clamp(16px, 4vw, 48px) clamp(32px, 5vw, 72px); }

.hero-inner {
  display: grid;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}

.hero-copy { text-align: center; }

.hero h1 { margin: 22px 0 0; line-height: 1.3; }

.h1-main {
  display: block;
  font-size: clamp(2.6rem, 3.4vw + 1.6rem, 4.6rem);
  letter-spacing: .05em;
}

html:lang(en) .h1-main { letter-spacing: -.01em; line-height: 1.12; }

.h1-sub {
  display: block;
  margin-top: .75em;
  font-size: clamp(1.2rem, .9vw + 1rem, 1.7rem);
  line-height: 1.65;
  letter-spacing: .03em;
}

html:lang(en) .h1-sub { letter-spacing: 0; line-height: 1.45; }

.lead {
  max-width: 33em;
  margin: 22px auto 0;
  color: var(--ink-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 34px;
}

.hero-note {
  margin: 20px 0 0;
  color: var(--ink-soft);
  font-size: .92rem;
}

.hero-note svg {
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-right: 6px;
  vertical-align: -.22em;
  color: var(--teal-deep);
}

.hero-art { order: -1; }

.art-stage {
  position: relative;
  width: min(100%, 300px);
  aspect-ratio: 1;
  margin-inline: auto;
}

.art-blob {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: #ffe7a0;
}

.art-ring {
  position: absolute;
  inset: 3%;
  width: 94%;
  height: 94%;
  color: var(--orange);
  opacity: .55;
}

.art-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 60%;
  aspect-ratio: 1;
  margin: -30% 0 0 -30%;
  border-radius: 23%;
  box-shadow: 0 2px 0 rgb(255 255 255 / 60%) inset, var(--shadow-lg);
  transform: rotate(-4deg);
}

.sticker {
  position: absolute;
  display: grid;
  place-items: center;
  width: 17%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--card);
  box-shadow: var(--shadow-md);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1rem, 2.2vw, 1.5rem);
  line-height: 1;
}

.sticker svg { width: 46%; height: 46%; }
.sticker-a { left: 2%; top: 20%; color: var(--orange-deep); transform: rotate(-10deg); }
.sticker-b { right: 0; top: 8%; color: var(--teal-deep); transform: rotate(8deg); }
.sticker-c { right: 6%; bottom: 6%; color: var(--red); transform: rotate(-6deg); }

.spark {
  position: absolute;
  width: 7%;
  height: 7%;
}

.spark-1 { left: 16%; bottom: 8%; color: var(--teal); }
.spark-2 { left: 30%; top: 1%; color: var(--orange); width: 5%; height: 5%; }
.spark-3 { right: 4%; top: 46%; color: var(--yellow); width: 6%; height: 6%; }

@media (min-width: 960px) {
  .hero-inner { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); }
  .hero-copy { text-align: left; }
  .lead { margin-inline: 0; }
  .hero-actions { justify-content: flex-start; }
  .hero-art { order: 0; }
  .art-stage { width: min(100%, 460px); }
}

@media (prefers-reduced-motion: no-preference) {
  .art-icon { animation: float 7s ease-in-out infinite; }
  .sticker-a { animation: bob 6s ease-in-out -1s infinite; }
  .sticker-b { animation: bob 7s ease-in-out -3s infinite; }
  .sticker-c { animation: bob 6.5s ease-in-out -2s infinite; }
  .spark { animation: twinkle 3.2s ease-in-out infinite; }
  .spark-2 { animation-delay: -1.1s; }
  .spark-3 { animation-delay: -2.2s; }
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-10px) rotate(-2.5deg); }
}

@keyframes bob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -7px; }
}

@keyframes twinkle {
  0%, 100% { opacity: 1; scale: 1; }
  50% { opacity: .45; scale: .78; }
}

/* ---------- How it works ---------- */

.steps {
  display: grid;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step { padding: 30px 28px 32px; }

.step-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.step-num {
  position: relative;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  color: var(--orange-deep);
  font-family: "Nunito", var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1;
}

.step-num svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--orange);
}


.step h3 {
  margin: 20px 0 10px;
  font-size: 1.25rem;
  line-height: 1.5;
}

.step p { margin: 0; color: var(--ink-soft); font-size: 1rem; }

.step-arrow { display: none; }

@media (min-width: 880px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; }
  .step-arrow {
    display: block;
    position: absolute;
    top: 50px;
    right: -45px;
    width: 42px;
    height: 28px;
    color: var(--orange);
    z-index: 1;
  }
}

/* ---------- Features ---------- */

.features {
  display: grid;
  gap: 22px;
}

.feature { padding: clamp(26px, 3vw, 36px); }

.feature h3 {
  margin: 20px 0 10px;
  font-size: 1.22rem;
  line-height: 1.5;
}

.feature p { margin: 0; color: var(--ink-soft); font-size: 1rem; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.chips li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  color: var(--ink);
  font-size: .92rem;
  font-weight: 700;
  line-height: 1.5;
}

.chips svg { width: 16px; height: 16px; color: var(--teal-deep); }

.chips--color li { border-color: transparent; }
.chips--color li:nth-child(4n + 1) { background: var(--orange-soft); }
.chips--color li:nth-child(4n + 2) { background: var(--teal-soft); }
.chips--color li:nth-child(4n + 3) { background: var(--yellow-soft); }
.chips--color li:nth-child(4n + 4) { background: var(--red-soft); }

.feature-hero {
  display: grid;
  gap: 8px 36px;
  align-items: center;
  background:
    radial-gradient(420px 260px at 100% 0%, rgb(255 231 160 / 38%), transparent 70%),
    var(--card);
}

.feature-hero h3 { font-size: clamp(1.35rem, 1vw + 1rem, 1.6rem); }

@media (min-width: 720px) {
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span-all { grid-column: 1 / -1; }
}

@media (min-width: 1024px) {
  .features { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
  .span-2 { grid-column: span 2; }
}

/* Family card: a small picture of an invite link being shared. */

.invite-mock {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  margin-top: 24px;
}

.avatars { display: flex; }

.av {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-left: -10px;
  border: 3px solid var(--card);
  border-radius: 50%;
}

.av:first-child { margin-left: 0; }
.av svg { width: 24px; height: 24px; }
.av-1 { background: var(--orange-soft); color: var(--orange-deep); }
.av-2 { background: var(--teal-soft); color: var(--teal-deep); }
.av-3 { background: var(--yellow-soft); color: #8a5a00; }
.av-4 { background: var(--paper-deep); color: var(--ink-soft); }

.link-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 8px 12px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-soft);
  font-family: "Nunito", var(--font-body);
  font-size: .92rem;
  font-weight: 700;
  letter-spacing: .01em;
}

.link-pill { max-width: 100%; min-width: 0; }
.link-pill span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-pill svg { width: 18px; height: 18px; flex: none; color: var(--teal-deep); }

/* Reading-screen demo */

.demo { padding: clamp(22px, 3.4vw, 44px); background: linear-gradient(160deg, var(--card), #fdf6e8); }

.demo-grid {
  display: grid;
  gap: clamp(28px, 4vw, 52px);
  align-items: center;
}

@media (min-width: 900px) {
  .demo-grid { grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); }
}

.demo-figure { margin: 0; }

.book {
  overflow: hidden;
  border: 1.5px solid var(--line);
  border-radius: 24px;
  background: #fffaf1;
  box-shadow: var(--shadow-md);
}

.book-art {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #fde3b8;
}

.book-art > svg { width: 100%; height: 100%; }

.book-text {
  min-height: 7.6em;
  padding: 16px 22px 18px;
  font-size: clamp(1.02rem, .5vw + .9rem, 1.22rem);
  line-height: 1.75;
  border-top: 1.5px solid #f1e4cc;
}

.book-text p { margin: 0; }

.line-learn { color: var(--teal-deep); }

.demo-figure:has(#demo-read:checked) .line-learn,
.demo-figure:has(#demo-learn:checked) .line-read { display: none; }

.demo-figure:has(#demo-both:checked) .line-learn { margin-top: 6px; font-size: .88em; }
.demo-figure:has(#demo-both:checked) .line-learn .w { animation: none; background-color: transparent; }

.w {
  border-radius: .3em;
  padding: .04em .1em;
  margin: 0 -.1em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.w:first-child { background-color: rgb(255 213 74 / 60%); }

@media (prefers-reduced-motion: no-preference) {
  .w:first-child { background-color: transparent; }
  .w { animation: readalong 6s linear infinite both; }
  .w:nth-child(2) { animation-delay: 1.2s; }
  .w:nth-child(3) { animation-delay: 2.4s; }
  .w:nth-child(4) { animation-delay: 3.6s; }
  .w:nth-child(5) { animation-delay: 4.8s; }
}

@keyframes readalong {
  0% { background-color: rgb(255 213 74 / 0%); }
  3%, 17% { background-color: rgb(255 213 74 / 62%); }
  21%, 100% { background-color: rgb(255 213 74 / 0%); }
}

.tap-spot {
  position: absolute;
  left: 78.1%;
  top: 25%;
  width: 0;
  height: 0;
}

.tap-ring {
  position: absolute;
  left: -22px;
  top: -22px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2.5px solid rgb(255 255 255 / 90%);
}

.tap-bubble {
  position: absolute;
  left: -64px;
  top: -19px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50% 50% 8px 50%;
  background: var(--card);
  color: var(--red);
  box-shadow: var(--shadow-md);
}

.tap-bubble svg { width: 20px; height: 20px; }

@media (prefers-reduced-motion: no-preference) {
  .tap-ring { animation: ripple 2.4s ease-out infinite; }
  .tap-bubble { animation: pop 2.4s var(--ease) infinite; }
}

@keyframes ripple {
  0% { transform: scale(.55); opacity: .95; }
  70%, 100% { transform: scale(1.7); opacity: 0; }
}

@keyframes pop {
  0%, 8% { transform: scale(.4) translateY(8px); opacity: 0; }
  22%, 78% { transform: none; opacity: 1; }
  100% { transform: translateY(-6px); opacity: 0; }
}

.seg-wrap {
  display: flex;
  justify-content: center;
  margin: 18px 0 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.seg {
  display: inline-flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 4px;
  padding: 5px;
  border-radius: 999px;
  background: var(--paper-deep);
  box-shadow: inset 0 1px 2px rgb(94 62 32 / 10%);
}

.seg input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}

.seg label {
  padding: 8px 18px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: .92rem;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease);
}

@media (max-width: 420px) {
  .seg label { padding: 7px 13px; font-size: .86rem; }
}

.seg label:hover { color: var(--ink); background: rgb(255 253 248 / 55%); }

.seg input:checked + label {
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.seg input:focus-visible + label { outline: 3px solid var(--teal); outline-offset: 2px; }

.demo-caption {
  margin-top: 12px;
  color: var(--ink-soft);
  font-size: .85rem;
  text-align: center;
}

.demo-list {
  display: grid;
  gap: 26px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.demo-list li { display: flex; gap: 18px; align-items: flex-start; }

.demo-list h3 { margin: 4px 0 6px; font-size: 1.18rem; line-height: 1.5; }

.demo-list p { margin: 0; color: var(--ink-soft); font-size: 1rem; }

/* ---------- Safety ---------- */

.safety-panel {
  position: relative;
  padding: clamp(40px, 6vw, 76px) clamp(22px, 5vw, 72px);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(560px 320px at 0% 0%, rgb(255 255 255 / 55%), transparent 70%),
    var(--teal-soft);
  border: 1.5px solid #cfe4de;
}

.safety-panel .eyebrow { background: var(--card); }

.safety-grid {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 760px) {
  .safety-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
}

.safety-item {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 26px 26px 28px;
  border-radius: var(--radius-md);
  background: rgb(255 253 248 / 82%);
  border: 1.5px solid rgb(255 255 255 / 90%);
}

.safety-item .blob-icon { background: var(--teal-soft); color: var(--teal-deep); }

.safety-item h3 { margin: 4px 0 6px; font-size: 1.15rem; line-height: 1.5; }

.safety-item p { margin: 0; color: var(--ink-soft); font-size: 1rem; }

.safety-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 34px 0 0;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--teal-deep);
  font-weight: 700;
  text-decoration: none;
  background: rgb(255 253 248 / 70%);
}

.text-link svg { width: 18px; height: 18px; transition: transform .2s var(--ease); }

.text-link:hover { background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm); }
.text-link:hover svg { transform: translateX(3px); }

@media (max-width: 480px) {
  .safety-panel { padding-inline: 14px; }
  .safety-item { flex-direction: column; gap: 12px; padding: 22px 20px 24px; }
  .demo-list li { flex-direction: column; gap: 12px; }
  .safety-item .blob-icon, .demo-list .blob-icon { width: 48px; height: 48px; }
  .safety-item .blob-icon svg, .demo-list .blob-icon svg { width: 24px; height: 24px; }
}

/* ---------- Pricing ---------- */

.plans {
  display: grid;
  gap: 22px;
  max-width: 900px;
  margin-inline: auto;
}

@media (min-width: 760px) {
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; align-items: stretch; }
}

.plan {
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 4vw, 40px);
}

.plan .checks { margin-bottom: 26px; }

.plan-foot {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: auto 0 0;
  padding-top: 18px;
  border-top: 1.5px dashed var(--line);
  color: var(--ink-soft);
  font-size: .92rem;
  line-height: 1.6;
}

.plan-foot svg { width: 20px; height: 20px; flex: none; color: var(--teal-deep); }
.plan--featured .plan-foot svg { color: var(--orange-deep); }

.plan-label {
  margin: 0;
  color: var(--ink-soft);
  font-size: .92rem;
  font-weight: 700;
  letter-spacing: .08em;
}

.plan h3 { margin: 6px 0 20px; font-size: 1.45rem; line-height: 1.45; }

.plan--featured {
  border: 2px solid var(--orange);
  background:
    radial-gradient(380px 220px at 100% 0%, rgb(253 230 207 / 70%), transparent 70%),
    var(--card);
  box-shadow: var(--shadow-md);
}

.plan-badge {
  position: absolute;
  top: -18px;
  right: 22px;
  margin: 0;
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--ink);
  font-size: .88rem;
  font-weight: 700;
  line-height: 1.4;
  box-shadow: var(--shadow-sm);
  transform: rotate(3deg);
}

.checks {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.checks li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 1rem;
  line-height: 1.7;
}

.checks svg {
  width: 22px;
  height: 22px;
  flex: none;
  margin-top: .15em;
  padding: 3px;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal-deep);
}

.plan--featured .checks svg { background: var(--orange-soft); color: var(--orange-deep); }

.fine {
  max-width: 44em;
  margin: 30px auto 0;
  color: var(--ink-soft);
  font-size: .9rem;
  line-height: 1.85;
  text-align: center;
}

/* ---------- Final call to action ---------- */

.cta-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(44px, 7vw, 80px) clamp(22px, 5vw, 64px);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(520px 300px at 10% 110%, rgb(255 213 74 / 38%), transparent 70%),
    radial-gradient(460px 280px at 95% -10%, rgb(239 138 44 / 16%), transparent 70%),
    var(--yellow-soft);
  border: 1.5px solid #f3dc8c;
  text-align: center;
}

.cta-panel img {
  width: 96px;
  height: 96px;
  margin: 0 auto;
  border-radius: 22px;
  box-shadow: var(--shadow-md);
  transform: rotate(-4deg);
}

.cta-panel h2 {
  margin: 26px 0 0;
  font-size: clamp(1.7rem, 1.6vw + 1.2rem, 2.4rem);
  line-height: 1.45;
}

.cta-panel p { max-width: 32em; margin: 14px auto 0; color: var(--ink-soft); }

.cta-panel .btn { margin-top: 30px; }
.cta-panel > :not(.cta-spark) { position: relative; z-index: 1; }
.btn span { text-wrap: balance; }

@media (max-width: 600px) {
  .cta-spark-3 { top: 10%; right: 9%; bottom: auto; }
}

@media (max-width: 480px) {
  .btn { padding-inline: 22px; font-size: 1rem; letter-spacing: .02em; }
}

.cta-spark { position: absolute; width: 26px; height: 26px; }
.cta-spark-1 { left: 9%; top: 22%; color: var(--orange); }
.cta-spark-2 { right: 11%; top: 30%; color: var(--teal); width: 20px; height: 20px; }
.cta-spark-3 { right: 20%; bottom: 16%; color: var(--red); width: 16px; height: 16px; }

@media (prefers-reduced-motion: no-preference) {
  .cta-spark { animation: twinkle 3.4s ease-in-out infinite; }
  .cta-spark-2 { animation-delay: -1.2s; }
  .cta-spark-3 { animation-delay: -2.3s; }
}

/* ---------- Footer (same structure as tempi.co.jp) ---------- */

.site-footer {
  position: relative;
  margin-top: 40px;
  padding-block: 44px 40px;
  text-align: center;
}

.site-footer.band::after { display: none; }

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 32px;
}

.footer-nav a {
  color: var(--ink-soft);
  font-size: .95rem;
  font-weight: 700;
  text-decoration: none;
}

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

.footer-rule {
  width: 100%;
  max-width: 768px;
  height: 0;
  margin: 32px auto;
  border: 0;
  border-top: 1.5px dashed var(--line-strong);
}

.copyright {
  margin: 0;
  color: var(--ink-soft);
  font-size: .85rem;
  letter-spacing: .02em;
}

/* ---------- Legal pages ---------- */

.legal { padding-block: clamp(16px, 3vw, 40px) var(--section-y); }

.legal-layout {
  display: grid;
  gap: 40px;
  justify-content: center;
}

.legal-doc {
  width: 100%;
  max-width: 50rem;
  padding: clamp(26px, 5.5vw, 68px);
}

html:lang(en) .legal-doc { max-width: 48rem; }

.legal-doc h1 {
  margin: 0 0 18px;
  font-size: clamp(1.6rem, 1.4vw + 1.15rem, 2.2rem);
  line-height: 1.45;
}

.legal-doc h2 {
  margin: 2.6em 0 .9em;
  padding-top: 1.6em;
  border-top: 1.5px dashed var(--line);
  font-size: 1.32rem;
  line-height: 1.5;
  scroll-margin-top: 24px;
}

.legal-doc h3 {
  margin: 2em 0 .7em;
  font-size: 1.12rem;
  line-height: 1.5;
  scroll-margin-top: 24px;
}

.legal-doc :is(p, li, td, th, blockquote) { word-break: normal; }

.legal-doc p,
.legal-doc li {
  font-size: 1rem;
  line-height: 1.95;
  overflow-wrap: anywhere;
}

html:lang(en) .legal-doc :is(p, li) { line-height: 1.75; overflow-wrap: break-word; }

.legal-doc p { margin: 0 0 1em; }

.legal-doc ul { padding-left: 1.4em; margin: 0 0 1em; }
.legal-doc li { margin-bottom: .35em; }
.legal-doc li::marker { color: var(--orange); }

.legal-doc code {
  padding: .1em .4em;
  border-radius: 6px;
  background: var(--paper-deep);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: .88em;
}

.legal-doc blockquote.note {
  margin: 1.4em 0;
  padding: 16px 20px;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  color: var(--ink-soft);
}

.legal-doc blockquote.note p { margin: 0; font-size: .95rem; }
.legal-doc blockquote.note p + p { margin-top: .8em; }

.legal-doc blockquote.note--review {
  border-color: #ecd184;
  border-left: 5px solid #e5b43c;
  background: #fff7dd;
  color: var(--ink);
}

mark.review-tag {
  padding: .05em .2em;
  border-radius: 4px;
  background: #ffe08a;
  color: var(--ink);
  font-weight: 700;
}

.table-wrap {
  margin: 1.4em 0 1.8em;
  overflow-x: auto;
  border: 1.5px solid var(--line);
  border-radius: 16px;
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: .95rem;
}

.table-wrap :is(th, td) {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  line-height: 1.8;
  text-align: left;
  vertical-align: top;
}

.table-wrap thead th { background: var(--paper); font-size: .88rem; color: var(--ink-soft); }
.table-wrap tbody th { width: 30%; font-weight: 700; }
.table-wrap tbody tr:last-child > * { border-bottom: 0; }

@media (max-width: 640px) {
  .table-wrap { overflow: visible; border: 0; }
  .table-wrap :is(table, tbody, tr, th, td) { display: block; width: auto; }
  .table-wrap thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  .table-wrap tbody tr {
    margin-bottom: 12px;
    overflow: hidden;
    border: 1.5px solid var(--line);
    border-radius: 14px;
  }
  .table-wrap tbody th { width: auto; background: var(--paper); }
  .table-wrap td::before {
    content: attr(data-label);
    display: block;
    color: var(--ink-soft);
    font-size: .8rem;
    font-weight: 700;
  }
  .table-wrap tbody tr > :last-child { border-bottom: 0; }
}

.toc-title {
  margin: 0 0 10px;
  color: var(--ink-soft);
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .1em;
}

.toc ol {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc a {
  display: block;
  padding: 6px 12px 6px calc(12px + 1.7em);
  text-indent: -1.7em;
  border-radius: 10px;
  color: var(--ink-soft);
  font-size: .9rem;
  line-height: 1.5;
  text-decoration: none;
}

.toc a:hover { background: var(--card); color: var(--ink); }

.toc--side { display: none; }

.toc--inline {
  margin: 26px 0 8px;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
}

.toc--inline summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.toc--inline summary::-webkit-details-marker { display: none; }
.toc--inline summary svg { width: 20px; height: 20px; color: var(--ink-soft); transition: transform .2s var(--ease); }
.toc--inline[open] summary svg { transform: rotate(180deg); }
.toc--inline nav { padding: 0 8px 12px; }

@media (min-width: 1140px) {
  .legal-layout { grid-template-columns: 240px minmax(0, 50rem); gap: 48px; }
  html:lang(en) .legal-layout { grid-template-columns: 240px minmax(0, 48rem); }
  .toc--side {
    display: block;
    position: sticky;
    top: 24px;
    align-self: start;
    max-height: calc(100vh - 48px);
    overflow: auto;
    padding: 8px 4px 8px 0;
  }
  .toc--inline { display: none; }
}

/* ---------- Invite page ---------- */

.invite { padding-block: clamp(16px, 4vw, 48px) clamp(56px, 8vw, 96px); }

.invite-wrap {
  display: grid;
  gap: 22px;
  max-width: 600px;
}

.invite-wrap > * { min-width: 0; }

.invite-card {
  padding: clamp(30px, 6vw, 52px) clamp(18px, 6vw, 52px);
  text-align: center;
}

.invite-icon {
  width: 96px;
  height: 96px;
  margin: 0 auto 24px;
  border-radius: 22px;
  box-shadow: var(--shadow-md);
  transform: rotate(-4deg);
}

.invite h1 {
  margin: 0;
  font-size: clamp(1.4rem, 1.2vw + 1.1rem, 1.85rem);
  line-height: 1.5;
}

.invite-lead { margin: 12px auto 0; max-width: 28em; color: var(--ink-soft); }

.group-card {
  margin: 26px 0 0;
  padding: 18px clamp(14px, 4vw, 22px) 20px;
  overflow-wrap: anywhere;
  border-radius: var(--radius-md);
  background: var(--teal-soft);
}

.group-card p { margin: 0; }

.group-label { color: var(--teal-deep); font-size: .85rem; font-weight: 700; letter-spacing: .06em; }

.group-name {
  margin-top: 4px !important;
  font-family: var(--font-body);
  font-size: 1.35rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.group-meta { color: var(--ink-soft); font-size: .92rem; line-height: 1.7; }
.group-name + .group-meta { margin-top: 2px !important; }

.code-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 14px;
  margin: 24px 0 0;
}

.code-label { color: var(--ink-soft); font-size: .9rem; font-weight: 700; }

.code {
  padding: 4px 14px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 12px;
  background: var(--paper);
  font-family: "Nunito", var(--font-body);
  font-size: 1.25rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: .14em;
}

.invite-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

.invite-actions .btn[hidden] { display: none; }

.invite-steps {
  display: grid;
  gap: 10px;
  margin: 30px 0 0;
  padding: 22px 22px 22px 24px;
  border-radius: var(--radius-md);
  background: var(--paper);
  text-align: left;
  counter-reset: invite;
  list-style: none;
}

.invite-steps li {
  display: flex;
  gap: 12px;
  font-size: .98rem;
  line-height: 1.7;
  counter-increment: invite;
}

.invite-steps li::before {
  content: counter(invite);
  display: grid;
  place-items: center;
  flex: none;
  width: 26px;
  height: 26px;
  margin-top: .1em;
  border-radius: 50%;
  background: var(--orange-soft);
  color: var(--orange-deep);
  font-family: "Nunito", sans-serif;
  font-size: .85rem;
  font-weight: 800;
}

.invite-alt {
  padding: 26px clamp(22px, 5vw, 40px);
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-md);
  text-align: center;
}

.invite-alt h2 { margin: 0; font-size: 1.15rem; line-height: 1.5; }
.invite-alt p { margin: 8px 0 0; color: var(--ink-soft); font-size: .98rem; }
.invite-alt .invite-steps { margin-top: 18px; background: rgb(244 234 216 / 45%); }

.invite-home { margin: 6px 0 0; text-align: center; font-size: .92rem; }

/* ---------- 404 ---------- */

.notfound {
  display: grid;
  place-items: center;
  padding-block: clamp(40px, 8vw, 96px);
  text-align: center;
}

.notfound img {
  width: 120px;
  height: 120px;
  margin: 0 auto 28px;
  border-radius: 27px;
  box-shadow: var(--shadow-md);
  transform: rotate(-6deg);
}

.notfound h1 { margin: 0; font-size: clamp(1.5rem, 1.4vw + 1.1rem, 2.1rem); line-height: 1.5; }
.notfound p { margin: 10px auto 0; max-width: 30em; color: var(--ink-soft); }
.notfound .notfound-en { margin-top: 30px; padding-top: 26px; border-top: 1.5px dashed var(--line-strong); }
.notfound .notfound-en h2 { margin: 0; font-size: 1.2rem; }
.notfound .btn { margin-top: 26px; }

/* ---------- Scroll reveal (progressive enhancement, no JS) ---------- */

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal {
      animation: reveal linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 45%;
    }
  }
}

@keyframes reveal {
  from { opacity: 0; translate: 0 22px; }
  to { opacity: 1; translate: 0 0; }
}

/* ---------- Reduced motion: no hover lifts or transitions either ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
  .btn:hover, .btn:active, .brand:hover img, .text-link:hover svg { transform: none !important; }
}

/* ---------- Print ---------- */

@media print {
  body { background: #fff; }
  .site-header nav, .lang-switch, .toc, .skip, .hero-art { display: none !important; }
  .card, .legal-doc { box-shadow: none; border: 0; }
  .band { background: none; }
  .band::before, .band::after { display: none; }
}
