/* Measured against curations.supply, 1440px and 390px, 2026-10-18.
   Keep product content and the requested desktop planet on mobile. */
@font-face { font-family: PlanetPixelCJK; src: url('assets/pixel-font/fusion-pixel-12px-proportional-zh_hans.ttf.woff2') format('woff2'); font-display: swap; }
:root {
  --font-interface: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', sans-serif;
  --font-mono: GeistMono, 'PingFang SC', monospace;
  --font-pixel: Departure, PlanetPixelCJK, monospace;
  --mono: var(--font-pixel);
}
body, button, input, textarea, select { font-family: var(--font-interface); }
.header { height: 60px; padding: 0 24px; gap: 24px; }
.header .brand, .header .brand span, .catalog-heading h2, .footer-brand { font-family: var(--font-pixel); font-weight: 400; }
.header .brand, .header .brand span { font-size: 18px; }
.header .global-search { width: 256px; height: 36px; border-radius: 999px; font: 400 14px/20px var(--font-mono); letter-spacing: -.7px; }
.header-actions { gap: 8px; }
.header nav, .header nav a, .header nav #language-toggle, .header .create-button, .space-button, .header-favorites { font-family: var(--font-mono); font-size: 14px; font-weight: 500; }
.header nav { margin: 0; gap: 8px; }
.header .create-button, .space-button, .header-favorites, .header nav #language-toggle { height: 36px; border-radius: 8px; padding: 0 12px; box-shadow: inset 0 1px 1px #ffffff1a; }
.header .create-button, .space-button { text-transform: uppercase; }
.planet-hero { padding: 20px; }
.planet-content { padding: 64px 32px; gap: 40px; }
.planet-content h1 { font: 500 48px/1.1 var(--font-interface); letter-spacing: -1.2px; max-width: 495px; }
.hero-search-block { gap: 12px; }
.hero-search-block p { font: 400 16px/24px var(--font-interface); color: #ffffff99; }
.planet-search { max-width: 480px; padding: 4px; gap: 8px; min-height: 50px; border-radius: 14px; }
.planet-search input, .planet-search button { font: 400 14px/20px var(--font-interface); height: 40px; }
.planet-search button { font-weight: 500; padding: 0 24px; border-radius: 10px; }
.hero-people { font: 500 14px/17.5px var(--font-interface); letter-spacing: -.6px; }
.workspace-shell, body.sidebar-collapsed .workspace-shell { grid-template-columns: 200px minmax(0,1fr); }
.left-sidebar, body.sidebar-collapsed .left-sidebar { padding: 12px; }
.sidebar-row, body.sidebar-collapsed .sidebar-row { font: 500 12px/15px var(--font-mono); padding: 8px 12px; min-height: 34px; border-radius: 6px; }
.catalog-heading { min-height: 50px; height: auto; padding: 9px 24px; }
.catalog-heading h2 { font: 400 20px/30px var(--font-pixel); text-transform: uppercase; }
.small-control { font: 500 14px/20px var(--font-mono); min-height: 32px; padding: 6px 8px; border-radius: 8px; }
.catalog-heading > div { gap: 8px; }
.carousel-arrow { width: 32px; font-family: var(--font-interface); }
.featured-rail { grid-template-rows: repeat(2,auto); grid-auto-columns: calc((100% - 48px)/4); padding: 24px; gap: 16px; scroll-padding-inline: 24px; overscroll-behavior-x: contain; }
.work-card { border-radius: 16px; background: #111; }
.card-title-row { padding: 16px 16px 0; }
.work-card .title-button { font: 500 16px/20px var(--font-interface) !important; }
.card-description { font: 400 12px/16px var(--font-mono); margin: 12px 16px 16px; height: 16px; min-height: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.work-card .cover-button { aspect-ratio: 1.66; border-radius: 8px; margin: 0 12px; width: calc(100% - 24px); }
.card-footer, .card-footer .repo-owner { font: 500 12px/15px var(--font-mono); }
.card-footer { padding: 12px; min-height: 39px; }
.creator-supply p, .creator-supply-link, .sort-select, .filter, .search input, .closing-note, footer { font-family: var(--font-mono); }
/* The search container already indicates focus through :focus-within. */
.search input:focus-visible { outline: none; }
.creator-supply > div, .creator-supply .avatar { font-family: var(--font-interface); }
.sort-select {
  -webkit-appearance: none;
  appearance: none;
  max-width: none;
  flex-shrink: 0;
  padding: 7px 34px 7px 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='m3 4.5 3 3 3-3' stroke='%23b8b8ba' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: right 12px center;
  background-size: 12px 12px;
  background-repeat: no-repeat;
}
@media (forced-colors: active) {
  .sort-select { -webkit-appearance: auto; appearance: auto; background-image: none; padding-right: 12px; }
}
.latest-grid, .work-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
.carousel-dots { display: none; }
@media (min-width:741px) and (max-width:1023px) {
  .featured-rail { grid-auto-columns: calc((100% - 16px)/2); }
  .latest-grid, .work-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .header .global-search { width: 160px; }
}
@media (max-width:740px) {
  .header { padding: 0 12px; gap: 10px; }
  .header .brand, .header .brand span { font-size: 13px; white-space: nowrap; }
  .header-actions { margin-left: auto; gap: 8px; }
  .header nav a { display: none; }
  .header nav #language-toggle, .header .create-button { font-size: 12px; height: 36px; padding: 0 10px; }
  .sidebar-toggle { width: 20px; height: 36px; }
  .planet-content { padding: 64px 32px; gap: 32px; }
  .planet-content h1 { font-size: 30px; line-height: 33px; }
  .hero-search-block p { font-size: 11px; line-height: 16.5px; white-space: normal; overflow-wrap: break-word; max-width: 100%; }
  .planet-search { max-width: calc(100% - 32px); padding: 4px; gap: 8px; min-height: 98px; }
  .planet-search input, .planet-search button { height: 40px; font-size: 14px; }
  .hero-people .avatar { width: 16px; height: 16px; }
  .planet-video { object-position: 56% 50%; transform: scale(1.25); }
  .workspace-shell, body.sidebar-collapsed .workspace-shell { display: block; }
  .left-sidebar, body.sidebar-collapsed .left-sidebar { padding: 20px 16px; overflow-y: auto; overscroll-behavior-y: contain; }
  .catalog-heading { min-height: 50px; padding: 9px 24px; }
  .catalog-heading h2 { font-size: 14px; line-height: 21px; }
  .catalog-heading > div { gap: 8px; }
  .small-control { font-size: 12px; min-height: 32px; }
  .featured-rail { grid-template-rows: auto; grid-auto-columns: 100%; padding: 24px 24px 12px; scroll-snap-type: x mandatory; }
  .featured-rail .work-card { scroll-snap-align: start; }
  .work-card:hover { transform: none; }
  .card-title-row { padding: 12px 12px 0; }
  .work-card .title-button { font-size: 14px !important; line-height: 17.5px !important; }
  .card-description { margin: 12px; }
  .work-card .cover-button { aspect-ratio: 2/1; }
  .card-footer, .card-footer .repo-owner { font-size: 10px; line-height: 12.5px; }
  .card-footer { min-height: 36.5px; }
  .latest-grid, .work-grid { grid-template-columns: minmax(0,1fr); }
  .carousel-dots { display: flex; justify-content: center; gap: 4px; padding: 0 24px 20px; }
  .carousel-dots button { display: grid; place-items: center; padding: 0; width: 24px; height: 24px; border: 0; background: none; }
  .carousel-dots button::after { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #242424; }
  .carousel-dots button[aria-current="true"]::after { background: #eee; }
}
@media (max-width:360px) {
  .planet-content { padding-inline: 12px; }
  .planet-content h1 { font-size: 28px; line-height: 1.1; }
  .header { gap: 6px; }
  .header nav #language-toggle, .header .create-button { padding-inline: 8px; }
  .catalog-heading { padding-inline: 16px; gap: 4px; }
  .catalog-heading > div { gap: 4px; }
}
/* The local catalog has six entries: fill rows without reserving empty columns. */
@media (min-width:1024px) {
  .featured-rail { grid-template-columns: repeat(4,minmax(0,1fr)); grid-auto-flow: row; grid-auto-columns: auto; }
}
@media (min-width:741px) and (max-width:1023px) {
  .featured-rail { grid-template-columns: repeat(2,minmax(0,1fr)); grid-auto-flow: row; grid-auto-columns: auto; }
}
/* Keep authoring actions together and account utilities separate. */
.header { justify-content: flex-start; gap: 24px; }
.header svg { width: 16px; height: 16px; flex: none; }
.header .header-actions { margin-left: auto; gap: 16px; }
.header-authoring, .header-personal { display: flex; align-items: center; gap: 8px; }
.header-personal { padding-left: 16px; border-left: 1px solid #ffffff1a; }
.header-favorites { display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 64px; color: #fafafa; }
.header .header-favorites[hidden] { display: none; }
.header-publish, .header-account { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 8px 16px; border: 1px solid #ffffff24; border-radius: 8px; background: #252527; color: #fafafa; font: 500 14px/20px var(--font-mono); white-space: nowrap; }
.header .create-button { display: flex; gap: 8px; border: 0; background: #ff5100; font: 500 14px/20px var(--font-mono); }
.header .create-button > span { display: inline; font: inherit; }
.header .create-button > svg { display: none; }
.header-account { position: relative; cursor: pointer; list-style: none; }
.header-publish:hover, .header-account:hover, .header-favorites:hover { background: #303032; }
.header-actions > #language-toggle {
  height: 36px; padding: 0 12px; flex-shrink: 0;
  border: 0; border-radius: 8px; background: #252527; color: #fafafa;
  font: 500 14px/20px var(--font-mono);
  box-shadow: inset 0 1px 1px #ffffff1a; cursor: pointer;
}
.header-actions > #language-toggle:hover { background: #303032; }
.header .favorite-star { width: 16px; height: 16px; color: #fafafa; }
@media (max-width:740px) {
  .header { gap: 8px; padding: 0 12px; }
  .header .header-actions, .header-authoring, .header-personal { gap: 6px; }
  .header-personal { padding-left: 0; border: 0; }
  .header-publish, .header .header-favorites { display: none; }
  .header .create-button { width: 44px; flex-shrink: 0; padding: 0; justify-content: center; }
  .header .create-button > svg { display: block; }
  .header .create-button > span, .header-account > span { display: none; }
  .header-account { width: 44px; padding: 0; }
  .header-actions > #language-toggle { width: 44px; padding: 0; font-size: 12px; }
  #home-inbox .inbox-menu-trigger { width: 44px; height: 44px; }
}
@media (max-width:360px) {
  .header, .header .header-actions, .header-personal { gap: 4px; }
  .header .brand, .header .brand span { font-size: 12px; }
  .header .brand span { display: none; }
}
/* Future Planet navigation follows the original product, not the reference directory. */
.planet-nav-group { margin: 0; padding: 12px 0; }
.planet-nav-group + .planet-nav-group { border-top: 1px solid #ffffff12; }
.planet-nav-group h2 { margin: 0 12px 8px; font: 400 12px/20px var(--font-mono); color: #777; }
.planet-nav-group .sidebar-row { min-height: 38px; }
.planet-nav-group .sidebar-row.active { background: #1c1c1e; color: #fff; }
.planet-nav-create { border-top: 1px solid #ffffff12; padding-top: 16px; margin-top: 12px; }
.planet-nav-create .sidebar-row { white-space: normal; line-height: 20px; }
.planet-nav-create .sidebar-row:last-child { color: #ff6a24; }
@media (max-width:740px) { .planet-nav-group .sidebar-row, .planet-nav-create .sidebar-row { min-height: 44px; } }
/* Readable navigation labels at desktop and phone sizes. */
.planet-nav-group h2 { font-size: 13px; line-height: 22px; }
.planet-nav-group .sidebar-row,
.planet-nav-create .sidebar-row,
body.sidebar-collapsed .planet-nav-group .sidebar-row,
body.sidebar-collapsed .planet-nav-create .sidebar-row {
  font-size: 14px;
  line-height: 22px;
  min-height: 44px;
}
.planet-nav-group .sidebar-row .ui-icon,
.planet-nav-create .sidebar-row .ui-icon { width: 17px; height: 17px; flex-shrink: 0; }
/* Optical centering: full-width punctuation has little visual weight. */
html[lang="zh-CN"] .planet-content h1 {
  position: relative;
  left: .22em;
  top: 8px;
  line-height: 1.2;
  letter-spacing: -.025em;
}
html[lang="zh-CN"] .planet-content { gap: 35px; }
@media (max-width:740px) {
  html[lang="zh-CN"] .planet-content h1 { left: .16em; top: 4px; line-height: 1.2; }
  html[lang="zh-CN"] .planet-content { gap: 29px; }
}
/* Phone hero: one shared content width, readable fields and a two-line title. */
@media (max-width:740px) {
  .planet-hero { padding: 20px; }
  .planet-content, html[lang="zh-CN"] .planet-content { padding: 48px 0 44px; gap: 28px; }
  .planet-content h1, html[lang="zh-CN"] .planet-content h1 {
    width: 100%; max-width: 100%; font-size: clamp(26px, 7.5vw, 30px);
    line-height: 1.2; letter-spacing: -.025em;
  }
  html[lang="zh-CN"] .planet-content h1 { left: .12em; top: 4px; }
  .hero-search-block { width: 100%; gap: 16px; }
  .hero-search-block p { align-self: center; max-width: 100%; margin: 0; font-size: 13px; line-height: 1.65; text-align: center; }
  .planet-search { width: 100%; max-width: 360px; padding: 5px; gap: 6px; min-height: 0; }
  .planet-search input { height: 44px; font-size: 16px; line-height: 24px; padding: 10px 12px; }
  .planet-search button { height: 44px; font-size: 14px; }
  .header-actions > #language-toggle, .header .create-button, .header-account, .sidebar-toggle { height: 44px; }
}
/* Personal destinations share the same navigation and quiet dark surfaces. */
.personal-shell { min-height: calc(100dvh - 60px); }
.personal-content { min-width: 0; padding: 32px 24px; }
.personal-heading { margin-bottom: 28px; }
.personal-heading h1 { margin: 0 0 12px; font: 400 26px/1.4 var(--font-mono); }
.personal-heading p, .personal-empty p { color: #999; font: 400 14px/1.8 var(--font-mono); }
.personal-heading .primary-button { margin-top: 12px; }
.personal-heading .personal-local-note { font-size: 12px; }
.personal-empty { padding: 48px 24px; border: 1px solid #ffffff12; border-radius: 16px; text-align: center; background: #111; }
.personal-empty > svg { color: #888; margin-bottom: 16px; }
.personal-empty h2 { font: 400 18px/1.5 var(--font-mono); margin: 0 0 12px; }
.personal-empty p { max-width: 480px; margin: 0 auto 20px; }
@media (max-width:740px) {
 .personal-content { padding: 28px 16px; }
 .personal-heading h1 { font-size: 23px; }
 .personal-empty { padding: 36px 18px; }
 .left-sidebar, body.sidebar-collapsed .left-sidebar { padding-bottom: max(24px, env(safe-area-inset-bottom)); }
}
.catalog-status { min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 20px; }
.catalog-status h1 { font-size: 24px; }
.cover-placeholder { display: grid; place-items: center; width: 100%; height: 100%; min-height: 150px; background: #181818; color: #888; font: 14px/1.6 var(--font-mono); }
/* Reference sidebar: Geist Mono 12px/15px, weight 500; Chinese uses a clear native fallback. */
.left-sidebar .sidebar-row,
body.sidebar-collapsed .left-sidebar .sidebar-row {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  letter-spacing: 0;
  min-height: 34px;
  padding: 8px 12px;
  gap: 8px;
  color: #a6a6a6;
}
.left-sidebar .sidebar-row .sidebar-label { font: inherit; letter-spacing: inherit; }
.left-sidebar .planet-nav-group h2 { font: 400 12px/20px var(--font-mono); }
.left-sidebar .sidebar-row .ui-icon { width: 16px; height: 16px; }
.left-sidebar .sidebar-row.active { color: #fff; }
.left-sidebar .planet-nav-create .sidebar-row:last-child { color: #ff6a24; }
html[lang="zh-CN"] .left-sidebar .sidebar-row { font-size: 13px; font-weight: 400; line-height: 18px; }
@media (max-width:740px) {
 .left-sidebar .sidebar-row, body.sidebar-collapsed .left-sidebar .sidebar-row { min-height: 44px; }
}
/* Footer typography uses uppercase Latin text in both languages. */
footer { text-transform: uppercase; flex-wrap: wrap; }
footer .footer-message { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 16px; }
footer .footer-icp { white-space: nowrap; }
footer .footer-icp:hover { text-decoration: underline; }
/* Mobile keeps desktop typography and card proportions, with room between sections. */
@media (max-width:740px) {
  .planet-hero { height: auto; min-height: 460px; padding: 20px; }
  .planet-content, html[lang="zh-CN"] .planet-content { padding: 60px 0 56px; gap: 36px; }
  .hero-search-block { gap: 20px; }
  .hero-search-block p { line-height: 1.8; }
  .planet-search { display: flex; flex-direction: row; align-items: center; min-height: 56px; }
  .planet-search input { width: 0; min-width: 0; flex: 1; padding-inline: 10px; }
  .planet-search button { width: auto; flex: none; padding-inline: 16px; white-space: nowrap; }
  .catalog-heading { padding: 16px 20px; min-height: 64px; gap: 12px; flex-wrap: wrap; }
  .catalog-heading h2 { font-size: 16px; line-height: 24px; }
  .catalog-heading > div { margin-left: auto; }
  .featured-rail { padding: 24px 20px 16px; gap: 20px; scroll-padding-inline: 20px; }
  .card-title-row { padding: 20px 16px 0; }
  .work-card .title-button { font-size: 16px !important; line-height: 22px !important; }
  .card-description { margin: 14px 16px 18px; height: 40px; min-height: 40px; max-height: 40px; line-height: 20px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .work-card .cover-button { aspect-ratio: 1.66; margin-inline: 16px; width: calc(100% - 32px); }
  .card-footer, .card-footer .repo-owner { font-size: 12px; line-height: 18px; }
  .card-footer { padding: 16px; min-height: 50px; }
  .carousel-dots { padding-bottom: 28px; }
  .latest-grid, #works-grid { padding: 24px 20px 32px; gap: 24px; }
  .discover-bar { padding: 24px 20px 16px; gap: 16px; }
  .search input { font-size: 16px; }
  .filters { gap: 8px; }
  .filter { min-height: 40px; }
  #result-caption { padding-inline: 20px; line-height: 20px; }
  .personal-content { padding: 36px 20px; }
  .personal-heading { margin-bottom: 32px; }
  .personal-empty { padding: 44px 24px; }
  .left-sidebar .planet-nav-group { padding-block: 16px; }
  footer { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "brand tagline" "community icp" "visit visit"; padding: 36px 20px max(36px, env(safe-area-inset-bottom)); gap: 20px; line-height: 1.8; }
  footer .footer-message, footer > div { display: contents; }
  footer .footer-brand { grid-area: brand; }
  footer .footer-message > span { grid-area: tagline; }
  footer [data-community-status] { grid-area: community; }
  footer .footer-icp { grid-area: icp; justify-self: end; }
  footer > div > a { grid-area: visit; justify-self: end; }
}
@media (max-width:360px) {
  .catalog-heading h2 { font-size: 14px; }
  .planet-search button { padding-inline: 12px; font-size: 13px; }
}
@media (max-width:740px) {
  .discover-bar .filters { display: flex; flex-wrap: wrap; width: 100%; min-width: 0; }
}

/* Compact community recommendations, shared across desktop and phone. */
.creator-showcase { margin-bottom: 16px; }
.creator-showcase-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; padding: 16px 24px; }
.creator-supply { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 12px; border-radius: 10px; }
.creator-supply > div { min-width: 0; gap: 8px; font-size: 14px; line-height: 20px; }
.creator-supply > div > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.creator-supply .avatar { width: 24px; height: 24px; flex: none; }
.creator-supply p { margin: 0; }
.creator-supply p:empty { display: none; }
.creator-supply-link { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 18px; }
@media (min-width:1440px) {
  .creator-showcase-grid { grid-template-columns: repeat(6,minmax(0,1fr)); }
}
@media (max-width:740px) {
  .creator-showcase .catalog-heading { padding: 12px 16px; min-height: 52px; }
  .creator-showcase-grid { grid-template-columns: repeat(2,minmax(0,1fr)); padding: 12px 16px 16px; gap: 8px; }
  .creator-supply { padding: 10px; }
  .creator-supply > div { font-size: 13px; gap: 6px; }
}

/* Data placeholders share the real cards' layout without exposing preview content. */
.catalog-skeleton { pointer-events: none; }
.skeleton-line { display: block; width: 80%; height: 16px; margin-bottom: 12px; border-radius: 5px; background: #242424; }
.skeleton-line.short { width: 50%; height: 12px; }
.skeleton-cover { background: #1c1c1c; }
.work-card.catalog-skeleton .title-button { width: 100%; height: 1lh; }
.work-card.catalog-skeleton .avatar { background: #242424; }
.work-card.catalog-skeleton .skeleton-line { height: 12px; margin: 0; }
.work-card.catalog-skeleton .card-description { display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.work-card.catalog-skeleton .card-description .short { display: none; }
.work-card.catalog-skeleton .repo-owner { display: flex; align-items: center; width: 50%; height: 1lh; }
.creator-supply.catalog-skeleton { min-height: 96px; justify-content: center; }
@media (prefers-reduced-motion: no-preference) {
 .catalog-skeleton .skeleton-line, .catalog-skeleton .skeleton-cover { animation: catalog-pulse 1.6s ease-in-out infinite alternate; }
 @keyframes catalog-pulse { to { opacity: .45; } }
}
#featured .catalog-heading > div > a { font-size: 12px; }
#featured .catalog-heading > div > a::after { content: none; }
@media (max-width:740px) {
 .work-card.catalog-skeleton .card-description .short { display: block; }
}
