/* Meowloom's waiting-list site. Colours and shapes are taken from the game's own screens. */

@font-face {
  font-family: "Fredoka";
  src: url("assets/fonts/Fredoka.ttf") format("truetype");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --cream: #fcf7f0;
  --cream-deep: #f6ecdf;
  --card: #fffaf3;
  --line: #ecdcc8;
  --ink: #4a2f22;
  --ink-soft: #7a6052;
  --rose: #de4f80;
  --rose-deep: #c53b6b;
  --rose-soft: #fbdcdc;
  --orange: #f09a2e;
  --orange-deep: #d97f17;
  --green: #4fbf6b;
  --green-deep: #36a152;
  --teal: #19c7b3;
  --violet: #8d7bea;
  --gold: #f6c53b;
  --wood: #d9a066;
  --wood-deep: #a9683a;
  --linen: #f3e6c8;
  --radius: 28px;
  --shadow: 0 2px 0 rgba(255, 255, 255, .9) inset, 0 10px 30px rgba(122, 78, 44, .12), 0 2px 6px rgba(122, 78, 44, .08);
  --wrap: 1160px;
}

* { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Fredoka", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--cream);
  overflow-x: hidden;
}
body::before { /* the game's faint paw wallpaper */
  content: "";
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(1200px 700px at 85% -10%, #ffe9ec 0%, transparent 60%),
    radial-gradient(900px 600px at -10% 30%, #fff1d6 0%, transparent 60%),
    var(--cream);
}
body::after { /* paws and buttons, as on the game's home screen */
  content: "";
  position: fixed; inset: 0; z-index: -1;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240' fill='none' stroke='%23b98a5a' stroke-width='5'%3E%3Cg transform='translate(60 62) rotate(-14)' fill='%23b98a5a' stroke='none'%3E%3Cellipse cx='0' cy='12' rx='17' ry='14'/%3E%3Ccircle cx='-20' cy='-6' r='7'/%3E%3Ccircle cx='-7' cy='-17' r='7.5'/%3E%3Ccircle cx='8' cy='-17' r='7.5'/%3E%3Ccircle cx='21' cy='-6' r='7'/%3E%3C/g%3E%3Cg transform='translate(180 180)'%3E%3Ccircle r='27'/%3E%3Cg fill='%23b98a5a' stroke='none'%3E%3Ccircle cx='-8' cy='-8' r='4.5'/%3E%3Ccircle cx='8' cy='-8' r='4.5'/%3E%3Ccircle cx='-8' cy='8' r='4.5'/%3E%3Ccircle cx='8' cy='8' r='4.5'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") 0 0 / 240px 240px;
  opacity: .09;
  pointer-events: none;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--rose-deep); }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 600; line-height: 1.08; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 6.2vw, 4.6rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3.1rem); }
h3 { font-size: 1.4rem; line-height: 1.2; }
p { text-wrap: pretty; }
.muted { color: var(--ink-soft); font-size: .95rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; border-radius: 8px; }

/* Buttons: the game's glossy pills */
.btn {
  --b: var(--orange); --bd: var(--orange-deep);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: 1.08rem; color: #fff; text-decoration: none; white-space: nowrap;
  padding: 15px 28px; border: 0; border-radius: 999px; cursor: pointer;
  background: linear-gradient(180deg, color-mix(in srgb, var(--b) 82%, #fff) 0%, var(--b) 55%);
  box-shadow: 0 5px 0 var(--bd), 0 12px 22px color-mix(in srgb, var(--b) 35%, transparent), 0 1px 0 rgba(255, 255, 255, .55) inset;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .12);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.04); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--bd), 0 4px 10px color-mix(in srgb, var(--b) 30%, transparent); }
.btn[disabled] { opacity: .7; cursor: progress; }
.btn-small { padding: 10px 20px; font-size: .98rem; box-shadow: 0 4px 0 var(--bd), 0 8px 16px color-mix(in srgb, var(--b) 30%, transparent); }
.btn-green { --b: var(--green); --bd: var(--green-deep); }
.btn-ghost {
  color: var(--ink); text-shadow: none;
  background: linear-gradient(180deg, #fff, #f6ecdf);
  box-shadow: 0 4px 0 #dccbb5, 0 8px 16px rgba(122, 78, 44, .12);
}

/* Navigation */
.nav {
  position: sticky; top: 12px; z-index: 50;
  display: flex; align-items: center; gap: 20px;
  width: min(var(--wrap), calc(100% - 32px)); margin: 12px auto 0; padding: 10px 12px 10px 18px;
  background: rgba(255, 250, 243, .78); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border: 1px solid rgba(236, 220, 200, .9); border-radius: 999px;
  box-shadow: 0 8px 26px rgba(122, 78, 44, .1);
}
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); }
.wordmark { font-size: 1.45rem; font-weight: 500; letter-spacing: -.01em; }
.wordmark b { font-weight: 500; color: var(--rose); }
.nav-links { display: flex; gap: 6px; margin-left: auto; }
.nav-links a { color: var(--ink); text-decoration: none; font-weight: 500; padding: 8px 14px; border-radius: 999px; }
.nav-links a:hover { background: var(--cream-deep); }

/* Hero */
.hero {
  width: min(var(--wrap), calc(100% - 32px)); margin: 0 auto;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center;
  padding: clamp(40px, 7vw, 90px) 0 clamp(50px, 7vw, 90px);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 500; font-size: .95rem; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 7px 16px 7px 12px;
  box-shadow: var(--shadow); margin-bottom: 22px;
}
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(79, 191, 107, .6); animation: pulse 2.2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(79, 191, 107, 0); } 100% { box-shadow: 0 0 0 0 rgba(79, 191, 107, 0); } }
.swash { color: var(--rose); position: relative; white-space: nowrap; }
.swash::after { /* a strand of yarn under the words */
  content: ""; position: absolute; left: -2%; right: -2%; bottom: -.16em; height: .22em;
  background: repeating-linear-gradient(115deg, var(--teal) 0 7px, #5fdccd 7px 12px);
  border-radius: 999px; transform: rotate(-1.2deg); opacity: .9;
}
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--ink-soft); margin: 26px 0 30px; max-width: 34em; }

/* Sign-up form */
.join { max-width: 520px; }
.join-row {
  display: flex; gap: 8px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 999px;
  box-shadow: var(--shadow);
}
.join-row:focus-within { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(240, 154, 46, .22), var(--shadow); }
.join input[type="email"] {
  flex: 1; min-width: 0; font: inherit; font-size: 1.08rem; color: var(--ink);
  border: 0; outline: 0; background: transparent; padding: 10px 6px 10px 18px;
}
.join input::placeholder { color: #b7a392; }
.join-note { font-size: .88rem; color: var(--ink-soft); margin-top: 12px; padding-left: 8px; }
.join-msg { font-weight: 500; margin-top: 10px; padding-left: 8px; min-height: 1.5em; }
.join-msg.bad { color: #b3261e; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.join.done .join-row, .join.done .join-note, .join.done .platforms { display: none; }
.joined {
  display: flex; align-items: center; gap: 16px; padding: 16px 22px 16px 16px;
  background: #fff; border: 1px solid var(--line); border-radius: 26px; box-shadow: var(--shadow);
  animation: pop .5s cubic-bezier(.2, 1.6, .4, 1);
}
.joined img { width: 78px; height: 78px; flex: none; }
.joined b { display: block; font-size: 1.3rem; font-weight: 600; }
.joined span { color: var(--ink-soft); font-size: .98rem; }
.joined-tip { display: block; margin-top: 6px; color: var(--ink-soft); font-size: .86rem; line-height: 1.45; }
.joined-tip:empty { display: none; }
.joined-again { display: inline-block; margin-top: 6px; padding: 4px 0; border: 0; background: none; font: inherit; font-size: .92rem;
  color: var(--rose-deep); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
@keyframes pop { from { transform: scale(.85); opacity: 0; } }

/* Hero art */
.hero-art { position: relative; height: clamp(460px, 52vw, 640px); }
.blob {
  position: absolute; inset: 6% 4% 4% 8%;
  background: radial-gradient(circle at 35% 30%, #ffe2a8, #ffc4cf 55%, #d9c9ff 100%);
  border-radius: 46% 54% 58% 42% / 48% 42% 58% 52%;
  filter: blur(2px); opacity: .85; animation: morph 16s ease-in-out infinite alternate;
}
@keyframes morph { to { border-radius: 58% 42% 44% 56% / 42% 56% 44% 58%; transform: rotate(6deg); } }
.phone {
  position: absolute; padding: 9px; border-radius: 40px;
  background: linear-gradient(160deg, #5a4034, #2f2019);
  box-shadow: 0 30px 60px rgba(74, 47, 34, .28), 0 8px 18px rgba(74, 47, 34, .2), 0 0 0 1px rgba(255, 255, 255, .15) inset;
}
.phone img { border-radius: 31px; width: 100%; }
.phone-front { width: 42%; right: 12%; top: 0; transform: rotate(4deg); z-index: 2; animation: bob 7s ease-in-out infinite; }
.phone-back { width: 40%; left: 6%; top: 10%; transform: rotate(-7deg); z-index: 1; animation: bob 8s ease-in-out -3s infinite; }
@keyframes bob { 50% { translate: 0 -10px; } }
.hero-cat {
  position: absolute; width: 34%; aspect-ratio: 1; left: 22%; bottom: 0; z-index: 3; overflow: hidden; border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #fff, #cdeee6 75%);
  border: 8px solid #fffaf3; box-shadow: 0 0 0 2px var(--line), 0 20px 36px rgba(74, 47, 34, .28);
  animation: bob 5s ease-in-out -1s infinite;
}
.hero-cat img { width: 94%; margin: 8% auto 0; }
.float { position: absolute; z-index: 4; filter: drop-shadow(0 8px 10px rgba(74, 47, 34, .2)); }
.float-star { width: 13%; right: 2%; top: 30%; animation: spin 9s ease-in-out infinite alternate; }
.float-bell { width: 11%; left: 0; top: 6%; animation: spin 7s ease-in-out -2s infinite alternate; }
@keyframes spin { from { transform: rotate(-12deg) translateY(0); } to { transform: rotate(12deg) translateY(-12px); } }

/* Chapter ribbon */
.ribbon {
  overflow: hidden; padding: 16px 0; transform: rotate(-1.2deg); margin: 0 -20px;
  background: var(--rose); color: #fff; font-weight: 500; font-size: 1.15rem;
  box-shadow: 0 10px 30px rgba(222, 79, 128, .25);
}
.ribbon-track { display: flex; align-items: center; gap: 26px; width: max-content; animation: slide 60s linear infinite; }
.ribbon span { white-space: nowrap; }
.ribbon i { width: 12px; height: 12px; border-radius: 50%; background: #ffd9a1; box-shadow: 0 0 0 3px rgba(255, 255, 255, .25); flex: none; }
@keyframes slide { to { transform: translateX(-50%); } }

/* Sections */
.section { width: min(var(--wrap), calc(100% - 32px)); margin: 0 auto; padding: clamp(70px, 10vw, 130px) 0 0; }
.section-head { max-width: 760px; margin-bottom: 40px; }
.kicker {
  display: inline-block; font-weight: 600; font-size: .9rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--rose-deep); background: var(--rose-soft); padding: 5px 14px; border-radius: 999px; margin-bottom: 16px;
}
.section p + p { margin-top: 14px; }

/* Screenshots */
.screens { padding: clamp(70px, 10vw, 130px) 0 0; }
.screens-head { width: min(var(--wrap), calc(100% - 32px)); max-width: none; margin: 0 auto 26px; display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.screens-nav { display: flex; gap: 10px; }
.round {
  width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer; font: inherit; font-size: 1.4rem; color: var(--ink);
  background: linear-gradient(180deg, #fff, #f6ecdf); box-shadow: 0 4px 0 #dccbb5, 0 8px 16px rgba(122, 78, 44, .12);
  transition: transform .12s ease, box-shadow .12s ease;
}
.round:hover { transform: translateY(-2px); }
.round:active { transform: translateY(3px); box-shadow: 0 1px 0 #dccbb5; }
.strip {
  --edge: max(16px, calc((100vw - var(--wrap)) / 2));
  display: flex; gap: clamp(18px, 3vw, 34px); overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: var(--edge);
  padding: 20px var(--edge) 46px; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.strip::-webkit-scrollbar { display: none; }
.shot { flex: none; width: clamp(220px, 24vw, 290px); margin: 0; scroll-snap-align: start; text-align: center; }
.shot .phone { position: relative; transition: transform .3s ease; }
.shot:nth-child(odd) .phone { transform: rotate(-1.5deg); }
.shot:nth-child(even) .phone { transform: rotate(1.5deg) translateY(14px); }
.shot:hover .phone { transform: translateY(-8px) scale(1.02); }
.shot figcaption { margin-top: 28px; font-weight: 500; font-size: 1.05rem; }

/* Feature cards */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.card {
  position: relative; overflow: hidden; padding: 30px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 2px 0 rgba(255, 255, 255, .9) inset, 0 22px 44px rgba(122, 78, 44, .16); }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--ink-soft); }
.card-levels { grid-column: span 2; background: linear-gradient(160deg, #fff3d6, #ffe1b0); border-color: #f3cf90; }
.big-number { font-size: clamp(3.4rem, 6vw, 4.8rem); font-weight: 700; line-height: 1; color: var(--orange-deep) !important; letter-spacing: -.03em; margin-bottom: 6px; }
.card-map { grid-column: span 4; background: linear-gradient(160deg, #eaf9f5, #d5f3ec); border-color: #b4e6da; }
.card-pieces { grid-column: span 3; }
.card-daily { grid-column: span 3; background: linear-gradient(160deg, #f1edff, #e2dbff); border-color: #cfc5fa; }
.card-daily img, .card-circle img { margin-bottom: 14px; }
.card-circle { grid-column: span 3; background: linear-gradient(160deg, #fff0f1, #fddbe2); border-color: #f6c1cd; }
.card-calm { grid-column: span 3; display: flex; flex-direction: column; justify-content: center; }
.card-calm h3 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
.chips { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font-size: .9rem; font-weight: 500; padding: 5px 13px; border-radius: 999px; background: var(--cream-deep); border: 1px solid var(--line); }
.chips li:nth-child(4n+1) { background: #ffe9c7; } .chips li:nth-child(4n+2) { background: #d9f4ee; } .chips li:nth-child(4n+3) { background: #fde0e6; } .chips li:nth-child(4n) { background: #e7e1ff; }

/* Cat picker */
.cats { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 6vw, 80px); align-items: center; }
.cats-stage { display: grid; place-items: center; }
.cats-disc {
  --disc: #cdeee6;
  width: min(100%, 440px); aspect-ratio: 1; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 35%, #fff, var(--disc) 75%);
  border: 10px solid #fffaf3; box-shadow: 0 0 0 2px var(--line), 0 30px 60px rgba(122, 78, 44, .2);
  transition: background .4s ease;
}
.cats-disc img { width: 92%; margin-top: 8%; }
.cats-disc img.swap { animation: swap .35s cubic-bezier(.2, 1.5, .4, 1); }
@keyframes swap { from { transform: scale(.9) rotate(-4deg); opacity: .4; } }
.cats-copy h2 { margin-bottom: 18px; }
.cats-copy > p { color: var(--ink-soft); }
.picker { margin-top: 26px; }
.picker-label { font-size: .8rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); margin: 18px 0 10px !important; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch {
  width: 46px; height: 46px; border-radius: 50%; border: 3px solid #fff; padding: 0; cursor: pointer;
  background: var(--c); box-shadow: 0 0 0 1px var(--line), 0 4px 10px rgba(122, 78, 44, .16);
  transition: transform .15s ease, box-shadow .15s ease;
}
.swatch:hover { transform: translateY(-2px) scale(1.06); }
.swatch[aria-checked="true"] { box-shadow: 0 0 0 3px var(--orange), 0 6px 14px rgba(240, 154, 46, .35); transform: scale(1.1); }
.swatch.two { background: linear-gradient(135deg, var(--c) 0 50%, var(--c2) 50% 100%); }

/* Final call */
.final { padding-bottom: clamp(60px, 9vw, 110px); }
.final-card {
  position: relative; display: grid; grid-template-columns: minmax(200px, .8fr) 1.2fr; gap: 30px; align-items: center;
  padding: clamp(26px, 5vw, 60px); border-radius: 44px; overflow: hidden;
  background: linear-gradient(140deg, #ffe7b5 0%, #ffd0d8 55%, #dccfff 110%);
  box-shadow: 0 2px 0 rgba(255, 255, 255, .8) inset, 0 40px 80px rgba(122, 78, 44, .2);
}
.final-cat { border-radius: 36px; box-shadow: 0 20px 40px rgba(122, 78, 44, .2); border: 8px solid #fffaf3; background: var(--cream); }
.final-copy h2 { margin-bottom: 12px; }
.final-copy > p { font-size: 1.15rem; margin-bottom: 22px; }
.platforms { border: 0; padding: 0; margin: 0 0 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.platforms legend { float: left; font-weight: 500; margin-right: 6px; padding: 0; }
.platforms label { cursor: pointer; }
.platforms input { position: absolute; opacity: 0; }
.platforms span { display: inline-block; padding: 7px 16px; border-radius: 999px; background: rgba(255, 255, 255, .7); border: 1px solid rgba(122, 78, 44, .15); font-weight: 500; font-size: .95rem; transition: background .15s, color .15s; }
.platforms input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.platforms input:focus-visible + span { outline: 3px solid var(--violet); outline-offset: 2px; }

/* Footer */
.footer {
  width: min(var(--wrap), calc(100% - 32px)); margin: 0 auto; padding: 26px 0 40px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; border-top: 1px solid var(--line);
  color: var(--ink-soft); font-size: .95rem;
}
.footer p { margin-right: auto; }
.footer .wordmark { font-size: 1.2rem; }

/* Scroll reveal (only when scripts run, so the page reads without them) */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1); }
.js .reveal.in { opacity: 1; transform: none; }

/* Plain text pages */
.doc { width: min(720px, calc(100% - 32px)); margin: 0 auto; padding: 50px 0 80px; }
.doc h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 10px; }
.doc h2 { font-size: 1.4rem; margin: 34px 0 10px; }
.doc p, .doc li { color: var(--ink-soft); }
.doc p + p { margin-top: 12px; }
.doc ul { padding-left: 22px; }

/* Smaller screens */
@media (max-width: 900px) {
  .hero, .cats, .final-card { grid-template-columns: 1fr; }
  .hero { text-align: center; padding-top: 36px; }
  .hero .join, .lede { margin-left: auto; margin-right: auto; }
  .hero-art { height: clamp(420px, 105vw, 620px); max-width: 560px; width: 100%; margin: 0 auto; }
  .nav-links { display: none; }
  .nav .btn { margin-left: auto; }
  .bento { grid-template-columns: 1fr 1fr; }
  .card-levels, .card-map, .card-pieces, .card-daily, .card-circle, .card-calm { grid-column: span 1; }
  .cats-stage { order: 2; }
  .final-cat { max-width: 260px; margin: 0 auto; }
  .final-card { text-align: center; }
  .final .join { margin: 0 auto; }
  .platforms { justify-content: center; }
  .platforms legend { float: none; width: 100%; margin: 0 0 6px; }
}
@media (max-width: 600px) {
  body { font-size: 17px; }
  .bento { grid-template-columns: 1fr; }
  .card-levels, .card-pieces, .card-daily, .card-map, .card-circle, .card-calm { grid-column: auto; }
  .join-row { flex-direction: column; border-radius: 30px; padding: 10px; }
  .join input[type="email"] { padding: 12px 14px; text-align: center; }
  .join-note, .join-msg { padding-left: 0; }
  .footer { justify-content: center; text-align: center; }
  .footer p { margin: 0; width: 100%; order: 3; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* Language: the picker in the top bar, and the card of languages among the features */
.lang { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: var(--cream-deep); color: var(--ink); border: 1px solid var(--line); }
.lang:focus-within { outline: 3px solid color-mix(in srgb, var(--orange) 55%, transparent); outline-offset: 2px; }
.lang select { appearance: none; -webkit-appearance: none; border: 0; background: transparent; font: inherit; font-weight: 500; font-size: .95rem; color: inherit; cursor: pointer; max-width: 9.5em; outline: none; }
.card-lang { grid-column: span 6; display: flex; align-items: center; justify-content: space-between; gap: 18px 36px; flex-wrap: wrap; background: linear-gradient(160deg, #eef6ff, #dcebfb); border-color: #bfd8f3; }
.card-lang > div { flex: 1 1 280px; }
.card-lang .chips { flex: 1 1 380px; margin-top: 0; }
.chips button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
.chips li.on { box-shadow: 0 0 0 2px var(--orange); }
/* Words in other languages run longer: nothing may push the page wider than the screen. */
h1, h2, h3, .lede, .card p { overflow-wrap: anywhere; }
:lang(ja) h1, :lang(zh-Hans) h1, :lang(zh-Hant) h1, :lang(ko) h1 { word-break: keep-all; line-break: strict; }
@media (max-width: 900px) {
  .nav .lang { margin-left: auto; }
  .nav .lang + .btn { margin-left: 0; }
  .card-lang { grid-column: span 2; }
}
@media (max-width: 600px) {
  .card-lang { grid-column: auto; }
  .lang { padding: 7px 9px; }
  .lang select { max-width: 5.6em; font-size: .88rem; }
  .nav { gap: 10px; }
}
@media (max-width: 480px) {
  /* A narrow phone has no room for the language's name beside the name of the game and the button: the globe alone
     opens the same list. */
  .lang { position: relative; padding: 9px; }
  .lang select { position: absolute; inset: 0; width: 100%; max-width: none; opacity: 0; }
  .nav .btn-small { padding: 9px 14px; font-size: .9rem; }
  .brand { min-width: 0; }
}
