@font-face{font-family:'Fredoka';font-style:normal;font-weight:300 700;font-display:swap;src:url(/names/_assets/fredoka-latin-wght-normal.99d6c78e04.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:'Fredoka';font-style:normal;font-weight:300 700;font-display:swap;src:url(/names/_assets/fredoka-latin-ext-wght-normal.18a1723c87.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Nunito';font-style:normal;font-weight:200 1000;font-display:swap;src:url(/names/_assets/nunito-latin-wght-normal.ba344451ea.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:'Nunito';font-style:normal;font-weight:200 1000;font-display:swap;src:url(/names/_assets/nunito-latin-ext-wght-normal.2c8d792869.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Nunito';font-style:normal;font-weight:200 1000;font-display:swap;src:url(/names/_assets/nunito-cyrillic-wght-normal.63b14e3ef0.woff2) format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:'Nunito';font-style:normal;font-weight:200 1000;font-display:swap;src:url(/names/_assets/nunito-cyrillic-ext-wght-normal.88985ca614.woff2) format('woff2');unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}
@font-face{font-family:'Nunito';font-style:normal;font-weight:200 1000;font-display:swap;src:url(/names/_assets/nunito-vietnamese-wght-normal.61e5958cf3.woff2) format('woff2');unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}
@font-face{font-family:'Open Sans KYO360';font-style:italic;font-weight:800;font-display:swap;src:url(/names/_assets/open-sans-extrabold-italic-latin.c01a3c1faf.woff2) format('woff2')}

:root {
  --paper: #fff4fa;
  --grid: #ffe0f0;
  --card: #fff;
  --ink: #3b1e6e;
  --soft: #6f5a96;
  --faint: #b9a9d6;
  --pink: #ffd6ec;
  --pink-s: #ff8fc8;
  --lilac: #e6d9ff;
  --lilac-s: #a98bff;
  --cyan: #cdf7fb;
  --cyan-s: #37cfe0;
  --mint: #d3f6e2;
  --mint-s: #45cc86;
  --butter: #fff3bd;
  --butter-s: #ffc53d;
  --coral: #ffd9cf;
  --coral-s: #ff7b61;
  --kyo: #9fe8bd;
  --display: 'Fredoka', 'Nunito', system-ui, sans-serif;
  --body: 'Nunito', system-ui, 'Segoe UI', sans-serif;
  --brand: 'Open Sans KYO360', 'Open Sans', system-ui, sans-serif;
  --r: 14px 6px 14px 6px;
  --r-lg: 22px 8px 22px 8px;
}

* {
  box-sizing: border-box;
}

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

/* Scrollbars as in the app (apps/web/src/styles/base.css): an ink-ringed pink pill over the paper grid. */
::-webkit-scrollbar {
  width: 16px;
  height: 16px;
}

::-webkit-scrollbar-track,
::-webkit-scrollbar-corner {
  background: var(--grid);
}

::-webkit-scrollbar-thumb {
  min-height: 40px;
  background-color: var(--pink-s);
  /* A transparent border clipped out of the fill: the gap shows whatever is behind the bar */
  border: 3px solid transparent;
  background-clip: padding-box;
  border-radius: 999px;
  box-shadow: inset 0 0 0 2px var(--ink);
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--lilac-s);
}

::-webkit-scrollbar-thumb:active {
  background-color: var(--ink);
}

@supports not selector(::-webkit-scrollbar) {
  * {
    scrollbar-color: var(--pink-s) var(--grid);
  }
}

body {
  margin: 0;
  color: var(--ink);
  font: 16px/1.55 var(--body);
  background-color: var(--paper);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 28px 28px;
}

a {
  color: var(--ink);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-color: var(--pink-s);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.15;
}

/* Display text with letters Fredoka lacks, marked by pages.js: one face for the whole text */
[data-glyphs='fallback'] {
  font-family: var(--body) !important;
  font-weight: var(--glyph-weight, 800) !important;
}

p {
  margin: 0;
}

.wrap {
  width: min(1100px, 100%);
  margin-inline: auto;
  padding-inline: 16px;
}

main.wrap {
  display: grid;
  gap: 22px;
  padding-block: 18px 56px;
}

.muted {
  color: var(--soft);
}

/* Top bar */

.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--card);
  border-bottom: 3px solid var(--ink);
}

.bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 700 20px var(--display);
  text-decoration: none;
}

.spark {
  color: var(--butter-s);
}

.by {
  padding: 3px 8px 4px;
  background: var(--ink);
  border-radius: 8px 3px 8px 3px;
  color: #fff;
  font: 800 11px var(--body);
  rotate: -4deg;
}

.by b {
  color: var(--kyo);
  font: italic 800 13px var(--brand);
  letter-spacing: 0.03em;
}

.bar-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  font-weight: 800;
}

.btn {
  display: inline-block;
  padding: 7px 18px;
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: 12px 3px 12px 3px;
  box-shadow: 3px 3px 0 var(--ink);
  color: var(--ink);
  font: 600 16px var(--display);
  text-decoration: none;
  transition:
    translate 140ms ease,
    box-shadow 140ms ease;
}

.btn:hover {
  translate: -2px -2px;
  box-shadow: 5px 5px 0 var(--ink);
}

.btn.primary {
  background: var(--pink-s);
}

/* Breadcrumbs */

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--soft);
  font-size: 14px;
  font-weight: 700;
}

.crumbs li + li::before {
  content: '›';
  margin-right: 8px;
}

/* Cards */

.card,
.hero,
.cta {
  padding: 22px 24px;
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: var(--r-lg);
  box-shadow: 6px 6px 0 var(--ink);
}

.card {
  display: grid;
  gap: 14px;
  align-content: start;
}

.card h2 {
  font-size: 26px;
}

.card h3 {
  font-size: 18px;
}

/* Name page */

.hero {
  display: grid;
  gap: 10px;
  background: linear-gradient(135deg, var(--pink), var(--card) 55%, var(--lilac));
}

.hero[data-gender='boy'] {
  background: linear-gradient(135deg, var(--cyan), var(--card) 55%, var(--lilac));
}

.hero[data-gender='unisex'] {
  background: linear-gradient(135deg, var(--butter), var(--card) 55%, var(--mint));
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge {
  padding: 2px 12px;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.badge.girl {
  background: var(--pink);
}

.badge.boy {
  background: var(--cyan);
}

.badge.unisex {
  background: var(--butter);
}

.hero h1 {
  color: #fff;
  font-size: clamp(52px, 11vw, 96px);
  font-weight: 700;
  line-height: 1;
  overflow-wrap: anywhere;
  -webkit-text-stroke: 3px var(--ink);
  paint-order: stroke fill;
  text-shadow: 5px 5px 0 var(--ink);
}

.native {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 28px;
  font-weight: 800;
}

.meaning {
  max-width: 60ch;
  font-size: 20px;
  font-weight: 700;
}

.also {
  color: var(--soft);
  font-weight: 700;
}

.cta {
  display: grid;
  gap: 10px;
  background: var(--butter);
}

.cta h2 {
  font-size: 24px;
}

.cta p {
  font-weight: 700;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
}

.cta-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
}

.columns {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

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

.say {
  width: 100%;
  border-collapse: collapse;
}

.say th,
.say td {
  padding: 8px 6px;
  border-bottom: 2px dashed var(--faint);
  text-align: left;
  vertical-align: top;
}

.say tr:last-child th,
.say tr:last-child td {
  border-bottom: 0;
}

.say th {
  color: var(--soft);
  font-size: 14px;
  white-space: nowrap;
}

.respell {
  font: 600 19px var(--display);
}

.ipa {
  color: var(--soft);
  font-size: 14px;
}

.say .note {
  display: block;
  color: var(--soft);
  font-size: 14px;
}

.listen {
  width: 34px;
  height: 34px;
  background: var(--pink);
  border: 2px solid var(--ink);
  border-radius: 50%;
  color: var(--ink);
  font-size: 12px;
  cursor: pointer;
}

.listen:hover {
  background: var(--pink-s);
}

.unsure {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-left: 4px;
  background: var(--butter);
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  vertical-align: middle;
  cursor: help;
}

.scripts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.script {
  margin: 0;
  padding: 10px 12px;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--r);
}

.script figcaption {
  color: var(--soft);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.glyph {
  margin-top: 4px;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
}

.glyph.small {
  font-size: 18px;
}

.script small {
  display: block;
  color: var(--soft);
  font-size: 13px;
  font-weight: 700;
}

.chars {
  border-collapse: collapse;
  font-size: 15px;
}

.chars th,
.chars td {
  padding: 4px 12px;
  border: 2px solid var(--ink);
  text-align: left;
}

.chars td:first-child {
  font-size: 24px;
}

.facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px 16px;
  margin: 0;
}

.facts dt {
  color: var(--soft);
  font-size: 14px;
  font-weight: 900;
}

.facts dd {
  margin: 0;
  font-weight: 700;
}

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

.view {
  display: grid;
  gap: 2px;
  padding: 10px 14px;
  background: var(--card);
  border: 2px solid var(--ink);
  border-left-width: 8px;
  border-radius: var(--r);
}

.view.positive {
  border-left-color: var(--mint-s);
}

.view.neutral {
  border-left-color: var(--lilac-s);
}

.view.mixed {
  border-left-color: var(--butter-s);
}

.view.caution {
  border-left-color: var(--coral-s);
}

.view-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
}

.vibe {
  color: var(--soft);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.plain {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
}

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

.chips a {
  display: inline-block;
  padding: 3px 12px;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
}

.chips a:hover {
  background: var(--pink);
}

.more {
  font-weight: 800;
}

/* Hubs */

.hub {
  display: grid;
  gap: 10px;
}

.hub h1 {
  font-size: clamp(36px, 6vw, 58px);
  font-weight: 700;
}

.hub h1 small {
  color: var(--soft);
  font-size: 0.4em;
}

.lead {
  max-width: 62ch;
  color: var(--soft);
  font-size: 18px;
  font-weight: 700;
}

.letters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.letters a,
.letters span {
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  padding: 0 8px;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 10px 3px 10px 3px;
  font: 600 18px var(--display);
  text-decoration: none;
}

.letters span {
  opacity: 0.35;
}

.letters a:hover,
.letters a[aria-current] {
  background: var(--pink-s);
}

.list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 0 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
  padding: 8px 0;
  border-bottom: 2px dashed var(--faint);
}

.list a {
  font: 600 19px var(--display);
  text-decoration: none;
}

.list a:hover {
  text-decoration: underline;
}

.list .m {
  flex-basis: 100%;
  color: var(--soft);
  font-size: 14px;
}

.g {
  padding: 0 7px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.g-girl {
  background: var(--pink);
}

.g-boy {
  background: var(--cyan);
}

.g-unisex {
  background: var(--butter);
}

.pages {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}

.pages a,
.pages span[aria-current] {
  padding: 3px 10px;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 8px 3px 8px 3px;
  text-decoration: none;
}

.pages span[aria-current] {
  background: var(--pink-s);
}

.genders,
.traditions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.genders a,
.traditions a {
  display: grid;
  gap: 2px;
  padding: 12px 16px;
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: var(--r);
  box-shadow: 3px 3px 0 var(--ink);
  text-decoration: none;
}

.genders a:hover,
.traditions a:hover {
  translate: -2px -2px;
  box-shadow: 5px 5px 0 var(--ink);
}

.genders b,
.traditions b {
  font: 600 20px var(--display);
}

.genders span,
.traditions span {
  color: var(--soft);
  font-size: 14px;
  font-weight: 700;
}

.genders li:nth-child(1) a {
  background: var(--pink);
}

.genders li:nth-child(2) a {
  background: var(--cyan);
}

.genders li:nth-child(3) a {
  background: var(--butter);
}

/* Footer */

.foot {
  background: var(--butter);
  border-top: 3px solid var(--ink);
}

.foot-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding-block: 22px;
  font-weight: 700;
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.kyo a {
  text-decoration: none;
}

.kyo b {
  color: var(--kyo);
  font: italic 800 22px var(--brand);
  -webkit-text-stroke: 1px var(--ink);
  paint-order: stroke fill;
  text-shadow: 2px 2px 0 var(--ink);
}

:lang(zh),
:lang(zh-Hans),
:lang(zh-Hant) {
  font-family: 'Microsoft YaHei', 'PingFang SC', 'Noto Sans SC', sans-serif;
}

:lang(ja) {
  font-family: 'Yu Gothic UI', 'Hiragino Sans', 'Noto Sans JP', sans-serif;
}

:lang(ko) {
  font-family: 'Malgun Gothic', 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
}

@media (max-width: 860px) {
  .columns {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .bar-nav a:not(.btn),
  .by {
    display: none;
  }
  .card,
  .hero,
  .cta {
    padding: 16px;
  }
  .facts {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
  .facts dd {
    margin-bottom: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn {
    transition: none;
  }
}
