/* awesome-bears.cn layout. Loaded after the byte-for-byte copies of the .com style.css
   (tokens, aurora, grain) and scrollbars.css. Dark only, like awesome-bears.com.
   House rules: glass lit from the top-left, edges only on things you can click,
   motion 180 / 320 / 420 ms with no overshoot, Reduce Motion / Transparency / Contrast.
   The WordAI wordmark face is Caveat 700 (SIL OFL 1.1); its licence text ships next to it in the
   assets directory. Asset URLs below are logical names that build.mjs rewrites to fingerprints. */

@font-face {
  font-family: "WordAI Mark";
  src: url("/assets/caveat-wordai-700.8254a9fc.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: block;
}

:root {
  color-scheme: dark;
  --cn-text: rgba(245, 239, 224, .92);
  --cn-text-2: rgba(245, 239, 224, .78);
  --cn-text-3: rgba(245, 239, 224, .62);
  --cn-glass-fill: linear-gradient(160deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .04));
  --cn-glass-blur: blur(20px) saturate(1.5);
  --cn-glass-edge: rgba(255, 255, 255, .16);
  --cn-glass-light: inset 0 1px 0 rgba(255, 255, 255, .18);
  --cn-glass-shadow: 0 24px 56px rgba(0, 0, 0, .34);
  --cn-solid: #141c33;
  --cn-ease: cubic-bezier(.2, .8, .2, 1);
  --cn-ease-emph: cubic-bezier(.16, 1, .3, 1);
  --cn-ease-exit: cubic-bezier(.4, 0, 1, 1);
  --cn-quick: 180ms;
  --cn-standard: 320ms;
  --cn-emph: 420ms;
  --cn-gutter: 16px;
}
@media (min-width: 520px) { :root { --cn-gutter: 24px; } }
@media (min-width: 1024px) { :root { --cn-gutter: 32px; } }

/* ── Page frame ─────────────────────────────────────────────── */
.cn-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--cn-text);
}
.cn-main {
  flex: 1 0 auto;
  width: 100%;
  max-width: 1008px;
  margin: 0 auto;
  padding-left: max(var(--cn-gutter), env(safe-area-inset-left));
  padding-right: max(var(--cn-gutter), env(safe-area-inset-right));
}
.cn-skip {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--cn-solid);
  color: var(--cn-text);
  font-size: 14px;
  font-weight: 600;
}
.cn-skip:focus { top: 16px; }

/* Traditional Chinese: TC faces, so /zh-tw/ never falls back to mainland glyph forms. Declared on
   the elements that carry the language (body under html[lang=zh-Hant], the 404's zh-Hant group,
   the 繁 link) rather than through --font-sans, which body has already resolved. Elements with a
   font of their own (wordmarks, display titles) keep it. */
.cn-body:lang(zh-Hant),
.cn-body [lang="zh-Hant"] {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", system-ui, sans-serif;
}
.cn-hero__title:lang(zh-Hant),
.cn-doc__title:lang(zh-Hant) { font-family: "Songti TC", "PMingLiU", "Noto Serif TC", Georgia, serif; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
a:hover { opacity: 1; }

/* ── Wordmarks ─────────────────────────────────────────────── */
.wordai-mark {
  font-family: "WordAI Mark", "Bradley Hand", "Segoe Print", cursive;
  font-weight: 700;
  font-style: normal;
  font-size: 1.22em;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}
.cb-mark {
  font-family: "Noto Serif", Georgia, "Times New Roman", "Songti SC", serif;
  font-style: italic;
  font-weight: 700;
  letter-spacing: -.01em;
  white-space: nowrap;
}

/* ── Menu: a plain inline nav without JS, a floating glass menu with it ── */
.cn-menu {
  display: flex;
  justify-content: flex-end;
  padding: 8px max(var(--cn-gutter), env(safe-area-inset-right)) 0 max(var(--cn-gutter), env(safe-area-inset-left));
}
.cn-menu__toggle { display: none; }
.cn-menu__panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
}
.cn-menu__item {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--cn-text);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color var(--cn-quick) var(--cn-ease), transform var(--cn-quick) var(--cn-ease);
}
.cn-menu__item.is-active { background: rgba(255, 255, 255, .12); font-weight: 700; }
.cn-menu__divider { width: 1px; height: 20px; margin: 0 4px; background: rgba(255, 255, 255, .14); }
.cn-menu__langs { display: flex; align-items: center; }
.cn-menu__lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border-radius: 10px;
  color: var(--cn-text);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .04em;
  /* .62 keeps the inactive languages above 4.5:1 on the glass panel and the page; weight marks
     the current one. */
  opacity: .62;
  transition: opacity var(--cn-quick) var(--cn-ease), background-color var(--cn-quick) var(--cn-ease), transform var(--cn-quick) var(--cn-ease);
}
.cn-menu__lang.is-current { font-weight: 800; opacity: 1; }

html.js .cn-menu {
  position: fixed;
  top: max(20px, env(safe-area-inset-top));
  right: max(20px, env(safe-area-inset-right));
  z-index: 100;
  display: block;
  padding: 0;
  /* No view-transition-name here: it would make the menu a backdrop root and the panel's
     blur would stop seeing the page behind it. */
}
html.js .cn-menu__toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: #f4f7ff;
  background: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .05));
  border: 1px solid rgba(255, 255, 255, .2);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  backdrop-filter: blur(18px) saturate(1.6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .32), 0 8px 24px rgba(0, 0, 0, .28);
  transition: transform var(--cn-quick) var(--cn-ease), background-color var(--cn-quick) var(--cn-ease), border-color var(--cn-quick) var(--cn-ease);
}
html.js .cn-menu__toggle svg {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 18px;
  height: 18px;
  transition: opacity .16s ease, transform .34s var(--cn-ease-emph);
}
html.js .cn-menu__icon-close { opacity: 0; transform: rotate(-70deg) scale(.72); }
html.js .cn-menu.is-open .cn-menu__icon-open { opacity: 0; transform: rotate(70deg) scale(.72); }
html.js .cn-menu.is-open .cn-menu__icon-close { opacity: 1; transform: none; }
html.js .cn-menu.is-open .cn-menu__toggle { border-color: rgba(255, 255, 255, .32); }
html.js .cn-menu__panel {
  position: absolute;
  top: 52px;
  right: 0;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 2px;
  width: max-content;
  min-width: 168px;
  max-width: calc(100vw - 40px);
  padding: 8px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .04)), rgba(12, 21, 48, .62);
  border: 1px solid var(--cn-glass-edge);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  backdrop-filter: blur(24px) saturate(1.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 18px 48px rgba(0, 0, 0, .35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(.92);
  transform-origin: top right;
  transition: opacity .16s ease, transform .34s var(--cn-ease-emph), visibility 0s linear .34s;
}
html.js .cn-menu.is-open .cn-menu__panel {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}
html.js .cn-menu__item { display: flex; width: 100%; padding: 0 16px; }
html.js .cn-menu__divider { width: auto; height: 1px; margin: 4px 12px; }
html.js .cn-menu__langs { justify-content: space-between; }
html.js .cn-menu__lang { flex: 1 1 0; }

@media (hover: hover) and (pointer: fine) {
  html.js .cn-menu__toggle:hover { transform: scale(1.06); background-color: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .32); }
  .cn-menu__item:hover { background: rgba(255, 255, 255, .08); transform: scale(1.02); }
  .cn-menu__item.is-active:hover { background: rgba(255, 255, 255, .12); }
  .cn-menu__lang:hover { opacity: .8; background: rgba(255, 255, 255, .08); transform: scale(1.06); }
  .cn-menu__lang.is-current:hover { opacity: 1; }
}
html.js .cn-menu__toggle:active { transform: scale(.97); transition-duration: 60ms; }

/* ── Home ──────────────────────────────────────────────────── */
.cn-hero {
  padding: clamp(88px, 14vh, 144px) 0 clamp(32px, 6vh, 56px);
  text-align: center;
}
.cn-hero__title {
  color: var(--fg-strong);
  font-family: var(--font-display);
  font-size: clamp(32px, 6vw, 52px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.01em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.cn-hero__lede {
  max-width: 36em;
  margin: 16px auto 0;
  color: var(--cn-text-2);
  font-size: 17px;
  line-height: 1.7;
  text-wrap: balance;
  /* Centred Chinese lede: break at spaces and punctuation, not inside words. */
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.cn-apps {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}
@media (min-width: 760px) {
  .cn-apps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
}
/* Static showcase card: it holds links of its own, so it has no edge (only tap targets do). */
.cn-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  padding: 24px;
  border-radius: 24px;
  background: var(--cn-glass-fill);
  -webkit-backdrop-filter: var(--cn-glass-blur);
  backdrop-filter: var(--cn-glass-blur);
  box-shadow: var(--cn-glass-light), var(--cn-glass-shadow);
}
@media (min-width: 520px) { .cn-card { padding: 28px; } }
.cn-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(110% 80% at 100% 0%, var(--cn-card-glow, transparent), transparent 62%);
}
.cn-card--chefbear { --cn-card-glow: rgba(209, 164, 99, .16); }
.cn-card--wordai { --cn-card-glow: rgba(74, 158, 255, .18); }
.cn-card__head { display: flex; align-items: center; gap: 16px; min-width: 0; }
.cn-card__icon {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 13px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .25);
}
.cn-card__title {
  color: var(--fg-strong);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
}
.cn-card__body {
  flex: 1 0 auto;
  color: var(--cn-text-2);
  font-size: 16px;
  line-height: 1.75;
  text-wrap: pretty;
}
.cn-card__links { display: flex; flex-wrap: wrap; gap: 8px; }

/* Secondary glass pill: the only clickable surfaces, so the only ones with an edge. */
.cn-link {
  display: inline-flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 16px 0 20px;
  border-radius: 999px;
  color: var(--cn-text);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  /* One label line in the 44 px pill (content.mjs keeps the labels short enough at 320 px). */
  white-space: nowrap;
  background: linear-gradient(160deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .05));
  border: 1px solid var(--cn-glass-edge);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2);
  transition: transform var(--cn-quick) var(--cn-ease), background-color var(--cn-quick) var(--cn-ease), border-color var(--cn-quick) var(--cn-ease);
}
.cn-link svg { flex: none; width: 16px; height: 16px; opacity: .7; }
@media (min-width: 760px) { .cn-link { flex: 0 1 auto; } }
@media (hover: hover) and (pointer: fine) {
  .cn-link:hover { transform: scale(1.04); background-color: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .28); }
}
.cn-link:active { transform: scale(.97); transition-duration: 60ms; }

.cn-note {
  margin-top: 20px;
  color: var(--cn-text-3);
  font-size: 13px;
  text-align: center;
  text-wrap: balance;
}

/* ── Privacy ───────────────────────────────────────────────── */
.cn-doc {
  max-width: 680px;
  margin: 0 auto;
  padding-top: clamp(88px, 12vh, 128px);
}
.cn-doc__title {
  color: var(--fg-strong);
  font-family: var(--font-display);
  font-size: clamp(30px, 5vw, 40px);
  font-weight: 600;
  line-height: 1.2;
  text-wrap: balance;
}
.cn-doc__updated { margin-top: 8px; color: var(--cn-text-3); font-size: 13px; }
.cn-doc__intro {
  margin-top: 20px;
  color: var(--cn-text-2);
  font-size: 17px;
  line-height: 1.75;
  text-wrap: pretty;
}
.cn-doc__panel {
  margin-top: 28px;
  padding: 4px 24px;
  border-radius: 24px;
  background: var(--cn-glass-fill);
  -webkit-backdrop-filter: var(--cn-glass-blur);
  backdrop-filter: var(--cn-glass-blur);
  box-shadow: var(--cn-glass-light), var(--cn-glass-shadow);
}
.cn-doc__section { padding: 20px 0; }
.cn-doc__section + .cn-doc__section { border-top: 1px solid rgba(255, 255, 255, .08); }
.cn-doc__section h2 { color: var(--cn-text); font-size: 17px; font-weight: 600; line-height: 1.4; text-wrap: balance; }
.cn-doc__section p {
  margin-top: 6px;
  color: var(--cn-text-2);
  font-size: 16px;
  line-height: 1.75;
  text-wrap: pretty;
}
.cn-doc__contact { color: var(--cn-text); font-weight: 600; overflow-wrap: anywhere; }

/* ── 404 ───────────────────────────────────────────────────── */
.cn-404 {
  max-width: 560px;
  margin: 0 auto;
  padding-top: clamp(96px, 16vh, 160px);
  text-align: center;
}
.cn-404__code {
  color: var(--cn-text-3);
  font-size: clamp(48px, 10vw, 72px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
}
.cn-404__group { margin-top: 28px; }
.cn-404__group h1,
.cn-404__group h2 { color: var(--cn-text); font-size: 20px; font-weight: 600; line-height: 1.3; text-wrap: balance; }
.cn-404__group p { margin-top: 4px; color: var(--cn-text-2); font-size: 16px; line-height: 1.6; text-wrap: balance; }
.cn-404__group .cn-link { flex: 0 1 auto; margin-top: 12px; }

/* ── Footer ────────────────────────────────────────────────── */
.cn-footer {
  flex: none;
  margin-top: clamp(48px, 10vh, 96px);
  padding: 12px max(var(--cn-gutter), env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(var(--cn-gutter), env(safe-area-inset-left));
  color: var(--cn-text-3);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}
.cn-footer__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  column-gap: 16px;
}
.cn-footer a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 4px;
  color: inherit;
  transition: color var(--cn-quick) var(--cn-ease), transform var(--cn-quick) var(--cn-ease);
}
.cn-footer__gongan img { flex: none; width: 16px; height: 16px; }
.cn-footer__meta { margin-top: 2px; }
.cn-version { font-variant-numeric: tabular-nums; }
@media (hover: hover) and (pointer: fine) {
  .cn-footer a:hover { color: var(--cn-text); transform: scale(1.04); }
}

/* ── Entrance (only for an on-screen load with JS, never under Reduce Motion) ── */
@media screen and (prefers-reduced-motion: no-preference) {
  html.cn-enter .cn-rise { animation: cn-rise var(--cn-emph) var(--cn-ease-emph) both; }
  html.cn-enter .cn-rise--2 { animation-delay: 30ms; }
  html.cn-enter .cn-rise--3 { animation-delay: 60ms; }
  html.cn-enter .cn-rise--4 { animation-delay: 90ms; }
  html.cn-enter .cn-rise--5 { animation-delay: 120ms; }
  @view-transition { navigation: auto; }
  ::view-transition-group(root) { animation-duration: 180ms; }
}
@keyframes cn-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

/* ── Accessibility fallbacks ───────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .cn-menu__panel { transform: none; transition: opacity 150ms ease, visibility 0s linear 150ms; }
  html.js .cn-menu.is-open .cn-menu__panel { transition-delay: 0s; }
  html.js .cn-menu__toggle svg { transform: none; transition: opacity 150ms ease; }
  html.js .cn-menu.is-open .cn-menu__icon-open,
  html.js .cn-menu.is-open .cn-menu__icon-close { transform: none; }
  html.js .cn-menu__icon-close { transform: none; }
  .cn-link,
  .cn-footer a,
  .cn-menu__item,
  .cn-menu__lang,
  html.js .cn-menu__toggle { transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, opacity 150ms ease; }
  .cn-link:hover,
  .cn-link:active,
  .cn-footer a:hover,
  .cn-menu__item:hover,
  .cn-menu__lang:hover,
  html.js .cn-menu__toggle:hover,
  html.js .cn-menu__toggle:active { transform: none; }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .cn-card,
  .cn-doc__panel,
  .cn-link,
  html.js .cn-menu__panel,
  html.js .cn-menu__toggle {
    background: var(--cn-solid);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
@media (prefers-contrast: more) {
  :root { --cn-text-2: rgba(245, 239, 224, .94); --cn-text-3: rgba(245, 239, 224, .84); }
  .cn-menu__lang { opacity: .9; }
  .cn-link,
  html.js .cn-menu__panel,
  html.js .cn-menu__toggle { border-color: rgba(255, 255, 255, .6); }
  .cn-footer a { text-decoration: underline; text-underline-offset: 4px; }
}
@media (forced-colors: active) {
  .cn-link,
  html.js .cn-menu__panel,
  html.js .cn-menu__toggle { border: 1px solid CanvasText; }
}
@media print {
  .cn-menu { display: none; }
  .cn-card, .cn-doc__panel { box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
