/* MacWallpaperPro website
   Direction: a dark, cinematic "desktop at night". The landing hero is itself a live wallpaper;
   the rest of the page stays quiet so community work is the colour on the page. One bright pastel
   band (Cute & Pastel) is the deliberate exception. */

/* ---------- Fonts (self-hosted, no third-party requests) ---------- */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/assets/fonts/inter-latin-wght-normal.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: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/assets/fonts/inter-latin-ext-wght-normal.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: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/assets/fonts/inter-cyrillic-wght-normal.woff2) format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/assets/fonts/inter-cyrillic-ext-wght-normal.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: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/assets/fonts/inter-vietnamese-wght-normal.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: "Noto Sans Thai"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/assets/fonts/noto-sans-thai-thai-wght-normal.woff2) format("woff2");
  unicode-range: U+02D7,U+0303,U+0331,U+0E01-0E5B,U+200C-200D,U+25CC; }
@font-face { font-family: "Noto Sans Arabic"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/assets/fonts/noto-sans-arabic-arabic-wght-normal.woff2) format("woff2");
  unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC; }
@font-face { font-family: "Noto Sans Devanagari"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/assets/fonts/noto-sans-devanagari-devanagari-wght-normal.woff2) format("woff2");
  unicode-range: U+0900-097F,U+1CD0-1CF9,U+200C-200D,U+20A8,U+20B9,U+20F0,U+25CC,U+A830-A839,U+A8E0-A8FF; }

/* ---------- Tokens ---------- */
:root {
  --ink: #070814;
  --ink-2: #0d1024;
  --ink-3: #151936;
  --ink-4: #1e2347;
  --line: rgba(190, 196, 255, 0.12);
  --line-2: rgba(190, 196, 255, 0.22);
  --text: #f2f3ff;
  --text-2: #c3c7e4;
  --text-3: #979cc2;
  --iris: #a597ff;
  --aqua: #6ce8da;
  --candy: #ff9fcf;
  --peach: #ffbf9e;
  --butter: #ffe7a8;
  --good: #82e8ad;
  --warn: #ffd486;
  --bad: #ff98a4;
  --focus: #7cf1e4;

  --r-s: 10px;
  --r: 16px;
  --r-l: 24px;
  --r-xl: 36px;
  --bar-h: 64px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --sans-tail: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --font: "Inter", var(--sans-tail);
  --track-display: -0.045em;
  --track-head: -0.03em;
  --lh-display: 0.95;
  --lh-head: 1.08;
  color-scheme: dark;
}
[data-script="thai"] { --font: "Inter", "Noto Sans Thai", "Sukhumvit Set", Thonburi, "Leelawadee UI", var(--sans-tail); }
[data-script="arabic"] { --font: "Inter", "Noto Sans Arabic", "Geeza Pro", "Segoe UI", Tahoma, var(--sans-tail); }
[data-script="devanagari"] { --font: "Inter", "Noto Sans Devanagari", "Kohinoor Devanagari", "Nirmala UI", var(--sans-tail); }
[data-script="ja"] { --font: "Inter", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", Meiryo, "Noto Sans JP", var(--sans-tail); }
[data-script="ko"] { --font: "Inter", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", var(--sans-tail); }
[data-script="zh-hans"] { --font: "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", var(--sans-tail); }
[data-script="zh-hant"] { --font: "Inter", "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", var(--sans-tail); }
/* Scripts with tall marks or joined letters: never tighten tracking, give lines more air. */
[data-script="thai"], [data-script="arabic"], [data-script="devanagari"] { --track-display: 0; --track-head: 0; --lh-display: 1.2; --lh-head: 1.3; }
[data-script="ja"], [data-script="ko"], [data-script="zh-hans"], [data-script="zh-hant"] { --track-display: -0.02em; --track-head: -0.01em; --lh-display: 1.1; --lh-head: 1.2; }
[data-script="ko"] body { word-break: keep-all; }
[data-script="ja"] body, [data-script="zh-hans"] body, [data-script="zh-hant"] body { line-break: strict; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--bar-h) + 16px); }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
[data-script="thai"] body { line-height: 1.75; }
img, svg, iframe, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
p a, .prose a, .detail__noapp a { color: var(--aqua); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(165, 151, 255, 0.45); color: #fff; }
main { display: block; outline: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: var(--track-head); line-height: var(--lh-head); text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
.h1 { font-size: clamp(2.25rem, 1.4rem + 3vw, 3.75rem); }
.h2 { font-size: clamp(1.75rem, 1.2rem + 1.9vw, 2.75rem); }
.h3 { font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem); }
.h4 { font-size: 1.0625rem; }
.lede { color: var(--text-2); font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem); max-width: 40rem; }
.muted { color: var(--text-3); }
.small { font-size: 0.875rem; }
.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { width: 100%; max-width: 1320px; margin-inline: auto; padding-inline: clamp(16px, 4vw, 40px); }
.narrow { max-width: 760px; }
.pad { padding-block: calc(var(--bar-h) + 56px) 80px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; }
.icon { width: 20px; height: 20px; flex: none; }
.icon--xs { width: 14px; height: 14px; }
.icon--sm { width: 16px; height: 16px; }
.icon--lg { width: 32px; height: 32px; }
.icon--xl { width: 48px; height: 48px; }
[dir="rtl"] .back .icon { transform: scaleX(-1); }
.skip { position: fixed; inset-inline-start: 12px; top: -100px; z-index: 100; background: var(--text); color: var(--ink); padding: 12px 16px; border-radius: 12px; font-weight: 600; }
.skip:focus { top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  min-height: 44px; padding: 0 1.15rem; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 0.95rem; line-height: 1.2; text-decoration: none; white-space: nowrap;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.25s var(--ease), transform 0.15s var(--ease), border-color 0.2s;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn--lg { min-height: 54px; padding: 0 1.6rem; font-size: 1.05rem; }
.btn--sm { padding: 0 0.95rem; font-size: 0.875rem; }
.btn--block { width: 100%; white-space: normal; text-align: center; }
.btn--light { background: #f4f3ff; color: #0b0c1c; }
.btn--light:hover { background: #fff; box-shadow: 0 0 0 6px rgba(165, 151, 255, 0.22), 0 10px 40px -10px rgba(165, 151, 255, 0.7); }
.btn--glass { background: rgba(255, 255, 255, 0.07); border-color: var(--line-2); color: var(--text); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.btn--glass:hover { background: rgba(255, 255, 255, 0.13); border-color: rgba(190, 196, 255, 0.36); }
.btn--ghost { background: transparent; border-color: var(--line-2); color: var(--text); }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.06); }
.btn--install { position: relative; z-index: 2; background: rgba(165, 151, 255, 0.14); border-color: rgba(165, 151, 255, 0.38); color: #ebe8ff; padding: 0 1rem; font-size: 0.875rem; }
.btn--install:hover { background: var(--iris); border-color: var(--iris); color: #0b0c1c; }
.btn--candy { background: #3a1d4f; color: #fff; }
.btn--candy:hover { background: #4d2668; box-shadow: 0 0 0 6px rgba(255, 159, 207, 0.35); }
.btn--provider { width: 100%; min-height: 54px; border-radius: 14px; background: #fff; color: #1b1c2b; font-size: 1rem; }
.btn--provider:hover { box-shadow: 0 0 0 5px rgba(165, 151, 255, 0.3); }
.btn--provider .icon { width: 22px; height: 22px; }
.iconbtn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--text); list-style: none; cursor: pointer; }
.iconbtn::-webkit-details-marker { display: none; }
.iconbtn:hover { background: rgba(255, 255, 255, 0.08); }
.iconbtn--glass { background: rgba(10, 11, 28, 0.45); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.linkbtn { background: none; border: 0; padding: 0; color: var(--aqua); text-decoration: underline; text-underline-offset: 3px; min-height: 44px; }

/* ---------- Top bar ---------- */
.bar {
  position: fixed; inset: 0 0 auto; z-index: 40; height: var(--bar-h);
  background: rgba(7, 8, 20, 0.72); -webkit-backdrop-filter: blur(22px) saturate(1.5); backdrop-filter: blur(22px) saturate(1.5);
  border-bottom: 1px solid var(--line);
  transition: background-color 0.3s, border-color 0.3s;
}
.is-landing .bar:not(.is-scrolled) { background: linear-gradient(rgba(7, 8, 20, 0.55), rgba(7, 8, 20, 0)) border-box no-repeat; border-bottom-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.bar__inner { height: 100%; max-width: 1320px; margin-inline: auto; padding-inline: clamp(12px, 3vw, 32px); display: flex; align-items: center; gap: clamp(12px, 2vw, 28px); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; letter-spacing: -0.02em; min-height: 44px; }
.brand .logo { width: 30px; height: 30px; }
.brand__name { font-size: 1rem; }
.bar__nav { display: flex; gap: 4px; }
.bar__nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 999px; text-decoration: none; color: var(--text-2); font-weight: 500; font-size: 0.95rem; }
.bar__nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.bar__nav a[aria-current="page"] { color: var(--text); }
.bar__nav a[aria-current="page"]::after { content: ""; display: block; width: 5px; height: 5px; border-radius: 9px; background: var(--aqua); margin-inline-start: 7px; }
.bar__end { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }

/* Language switcher */
.lang, .mnav, .acct { position: relative; }
.lang__btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line-2); list-style: none; cursor: pointer; font-size: 0.9rem; font-weight: 500; color: var(--text-2);
}
.lang__btn::-webkit-details-marker { display: none; }
.lang__btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.lang__flag { font-size: 1.15rem; line-height: 1; }
.lang[open] .lang__btn .icon { transform: rotate(180deg); }
.lang__panel, .mnav__panel, .acct__panel {
  position: absolute; top: calc(100% + 10px); inset-inline-end: 0; z-index: 45;
  background: rgba(16, 19, 42, 0.97); border: 1px solid var(--line-2); border-radius: 20px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8); padding: 8px;
  animation: pop 0.18s var(--ease);
}
.lang__panel { width: min(300px, calc(100vw - 24px)); max-height: min(70vh, 560px); overflow: auto; }
.lang__title { padding: 8px 12px 6px; font-size: 0.8rem; color: var(--text-3); }
.lang__list { list-style: none; margin: 0; padding: 0; }
.lang__opt { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 12px; text-decoration: none; font-size: 0.95rem; }
.lang__opt:hover { background: rgba(255, 255, 255, 0.07); }
.lang__opt[aria-current="true"] { background: rgba(165, 151, 255, 0.16); }
.lang__tick { margin-inline-start: auto; color: var(--aqua); }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(0.98); } to { opacity: 1; transform: none; } }

.mnav { display: none; }
.mnav__panel { width: min(320px, calc(100vw - 24px)); display: flex; flex-direction: column; gap: 4px; padding: 10px; }
.mnav__panel a:not(.btn) { display: flex; align-items: center; min-height: 48px; padding: 0 14px; border-radius: 12px; text-decoration: none; font-weight: 500; }
.mnav__panel a:not(.btn):hover, .mnav__panel a[aria-current="page"] { background: rgba(255, 255, 255, 0.07); }
.mnav__panel .btn { margin-top: 6px; }

.account[hidden] { display: none; }
.acct__btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--ink-4); list-style: none; cursor: pointer; overflow: hidden; font-weight: 700; }
.acct__btn::-webkit-details-marker { display: none; }
.acct__btn img { width: 100%; height: 100%; object-fit: cover; }
.acct__panel { width: 260px; }
.acct__who { padding: 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.acct__who strong { display: block; }
.acct__who span { color: var(--text-3); font-size: 0.85rem; overflow-wrap: anywhere; }
.acct__panel a, .acct__panel button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 12px; border-radius: 12px; background: none; border: 0; text-decoration: none; text-align: start; font-size: 0.95rem; }
.acct__panel a:hover, .acct__panel button:hover { background: rgba(255, 255, 255, 0.07); }

@media (max-width: 960px) {
  .bar__nav { display: none; }
  .mnav { display: block; }
}
@media (max-width: 640px) {
  .bar__cta { display: none; }
  .lang__name { display: none; }
  .lang__btn { padding: 0 10px; }
  .brand__name { font-size: 0.95rem; }
  .lang__panel, .mnav__panel, .acct__panel { position: fixed; top: calc(var(--bar-h) + 6px); inset-inline: 12px; width: auto; }
}
@media (max-width: 380px) { .brand__name { display: none; } }

/* ---------- Hero (landing) ---------- */
.hero { position: relative; min-height: 100svh; display: grid; grid-template-rows: 1fr auto; overflow: hidden; isolation: isolate; background: var(--ink); }
.hero__poster, .hero__canvas, .hero__veil { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__poster {
  z-index: -3;
  background:
    radial-gradient(60% 55% at 72% 28%, rgba(165, 151, 255, 0.55), transparent 70%),
    radial-gradient(45% 45% at 88% 62%, rgba(255, 159, 207, 0.35), transparent 70%),
    radial-gradient(55% 50% at 40% 18%, rgba(108, 232, 218, 0.32), transparent 70%),
    radial-gradient(80% 60% at 50% 100%, rgba(30, 35, 90, 0.9), transparent 70%),
    var(--ink);
}
.hero__canvas { z-index: -2; opacity: 0; transition: opacity 1.4s var(--ease); transform: scale(calc(1 + var(--scroll, 0) * 0.08)); transform-origin: 60% 40%; }
.hero.is-live .hero__canvas { opacity: 1; }
.hero__veil {
  z-index: -1; pointer-events: none;
  background:
    linear-gradient(to top, var(--ink) 0%, rgba(7, 8, 20, 0.6) 22%, rgba(7, 8, 20, 0) 50%),
    linear-gradient(to right, rgba(7, 8, 20, 0.66) 0%, rgba(7, 8, 20, 0.2) 48%, rgba(7, 8, 20, 0) 70%);
}
[dir="rtl"] .hero__veil {
  background:
    linear-gradient(to top, var(--ink) 0%, rgba(7, 8, 20, 0.6) 22%, rgba(7, 8, 20, 0) 50%),
    linear-gradient(to left, rgba(7, 8, 20, 0.66) 0%, rgba(7, 8, 20, 0.2) 48%, rgba(7, 8, 20, 0) 70%);
}
.hero__content {
  align-self: end; padding-top: calc(var(--bar-h) + 48px); padding-bottom: clamp(40px, 7vh, 80px);
  transform: translate3d(calc(var(--px, 0) * -10px), calc(var(--py, 0) * -6px), 0);
}
.hero__title {
  font-size: clamp(3.1rem, 1.2rem + 7.4vw, 8.4rem); font-weight: 700; letter-spacing: var(--track-display); line-height: var(--lh-display);
  max-width: 12ch; text-shadow: 0 4px 60px rgba(7, 8, 20, 0.55); hyphens: auto;
}
[data-script="thai"] .hero__title, [data-script="arabic"] .hero__title, [data-script="devanagari"] .hero__title,
[data-script="ja"] .hero__title, [data-script="ko"] .hero__title, [data-script="zh-hans"] .hero__title, [data-script="zh-hant"] .hero__title {
  font-size: clamp(2.6rem, 1.1rem + 5.8vw, 6.6rem); max-width: 14ch;
}
.hero__lede { margin-top: clamp(18px, 2.5vw, 28px); max-width: 34rem; font-size: clamp(1.0625rem, 0.98rem + 0.45vw, 1.3rem); color: rgba(242, 243, 255, 0.88); text-shadow: 0 2px 24px rgba(7, 8, 20, 0.8); }
.hero__actions { margin-top: clamp(24px, 3vw, 36px); display: flex; flex-wrap: wrap; gap: 12px; }
.hero__note { margin-top: 14px; font-size: 0.875rem; color: rgba(242, 243, 255, 0.72); }
.hero__widget { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 24px; }
.hero__hint { display: inline-flex; align-items: center; gap: 8px; font-size: 0.85rem; color: rgba(242, 243, 255, 0.72); }
.i-play { display: none; }
[data-hero-toggle][aria-pressed="true"] .i-pause { display: none; }
[data-hero-toggle][aria-pressed="true"] .i-play { display: block; }
@media (hover: none) { .hero__hint { visibility: hidden; } }
@media (max-width: 640px) {
  .hero { min-height: 92svh; }
  .hero__actions .btn { flex: 1 1 100%; }
  .hero__veil { background: linear-gradient(to top, var(--ink) 0%, rgba(7, 8, 20, 0.72) 40%, rgba(7, 8, 20, 0.15) 75%); }
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(64px, 9vw, 128px); }
.section__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 24px; margin-bottom: clamp(24px, 3vw, 40px); }
.section__head .lede { margin-top: 10px; }

/* Showcase: one featured wallpaper and four companions, all live on hover */
.showcase { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 22px; }
.showcase .card--featured { grid-column: span 2; grid-row: span 2; }
@media (max-width: 1100px) { .showcase { grid-template-columns: repeat(2, minmax(0, 1fr)); } .showcase .card--featured { grid-row: auto; } }
@media (max-width: 600px) { .showcase { grid-template-columns: 1fr; } .showcase .card--featured { grid-column: auto; } }

/* ---------- Card ---------- */
.card { position: relative; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.card__media {
  position: relative; aspect-ratio: 16 / 10; border-radius: var(--r); overflow: hidden; background: var(--ink-3);
  box-shadow: 0 0 0 1px var(--line), 0 24px 48px -28px rgba(0, 0, 0, 0.9);
  transition: box-shadow 0.35s var(--ease), transform 0.35s var(--ease);
}
.card--featured .card__media { flex: 1; aspect-ratio: auto; min-height: 260px; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease), opacity 0.4s; }
.card__frame { position: absolute; inset: 0; border: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 0.45s var(--ease); pointer-events: none; background: transparent; }
.card.is-live .card__frame.is-ready { opacity: 1; }
.card__video { object-fit: cover; }
.card__badge {
  position: absolute; top: 12px; inset-inline-end: 12px; z-index: 1; display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px; border-radius: 999px; background: rgba(7, 8, 20, 0.66); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.01em; color: #fff; pointer-events: none;
}
.card__badge .icon { width: 10px; height: 10px; fill: currentColor; }
.card__live {
  position: absolute; top: 12px; inset-inline-start: 12px; z-index: 1; display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 10px; border-radius: 999px; background: rgba(7, 8, 20, 0.66); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font-size: 0.75rem; font-weight: 600; color: #fff; opacity: 0; transform: translateY(-4px); transition: opacity 0.25s, transform 0.25s var(--ease);
}
.card__live .dot { width: 7px; height: 7px; border-radius: 9px; background: #ff5f6d; box-shadow: 0 0 0 0 rgba(255, 95, 109, 0.6); animation: live 1.6s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 7px rgba(255, 95, 109, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 95, 109, 0); } }
.card.is-live .card__live { opacity: 1; transform: none; }
@media (hover: hover) {
  .card:hover .card__media { box-shadow: 0 0 0 1px var(--line-2), 0 30px 60px -24px rgba(0, 0, 0, 0.95), 0 0 80px -30px rgba(165, 151, 255, 0.55); transform: translateY(-3px); }
  .card:hover .card__media img { transform: scale(1.035); }
}
.card:has(.card__link:focus-visible) .card__media { outline: 2px solid var(--focus); outline-offset: 3px; }
.card__body { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-inline: 2px; }
.card__text { min-width: 0; }
.card__title { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card--featured .card__title { font-size: clamp(1.2rem, 1rem + 0.6vw, 1.5rem); }
.card__link { text-decoration: none; }
.card__link:focus-visible { outline: none; }
.card__link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: var(--r); }
.card__meta { display: flex; align-items: center; gap: 12px; margin-top: 3px; font-size: 0.875rem; color: var(--text-3); min-width: 0; }
.card__author { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card__dl { display: inline-flex; align-items: center; gap: 4px; flex: none; font-variant-numeric: tabular-nums; }

/* ---------- Cute & Pastel band ---------- */
.cute {
  position: relative; isolation: isolate; overflow: hidden;
  margin-inline: clamp(8px, 1.6vw, 24px); border-radius: clamp(28px, 4vw, 56px);
  padding-block: clamp(64px, 9vw, 120px);
  background:
    radial-gradient(60% 80% at 12% 0%, #ffd6ea 0%, transparent 60%),
    radial-gradient(50% 70% at 100% 20%, #e5dcff 0%, transparent 60%),
    radial-gradient(60% 70% at 70% 110%, #d5f1ff 0%, transparent 60%),
    linear-gradient(170deg, #fff0f7 0%, #f6efff 55%, #eef8ff 100%);
  color: #2a1838;
}
.cute__sky { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.cloud { position: absolute; background: #fff; border-radius: 999px; filter: blur(2px); opacity: 0.9; }
.cloud::before, .cloud::after { content: ""; position: absolute; background: #fff; border-radius: 999px; }
.cloud.c1 { width: 220px; height: 60px; top: 9%; inset-inline-end: 8%; animation: drift 26s ease-in-out infinite alternate; }
.cloud.c1::before { width: 110px; height: 90px; top: -45px; left: 40px; }
.cloud.c1::after { width: 80px; height: 70px; top: -30px; left: 120px; }
.cloud.c2 { width: 160px; height: 44px; top: 70%; inset-inline-start: -30px; opacity: 0.75; animation: drift 32s ease-in-out infinite alternate-reverse; }
.cloud.c2::before { width: 80px; height: 66px; top: -34px; left: 30px; }
.cloud.c2::after { width: 60px; height: 50px; top: -22px; left: 86px; }
.cloud.c3 { width: 120px; height: 34px; top: 34%; inset-inline-end: 34%; opacity: 0.6; animation: drift 22s ease-in-out infinite alternate; }
.cloud.c3::before { width: 60px; height: 50px; top: -26px; left: 22px; }
.cloud.c3::after { width: 44px; height: 38px; top: -16px; left: 62px; }
@keyframes drift { to { transform: translateX(40px); } }
.spark { position: absolute; width: 14px; height: 14px; background: #ff9fcf; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: twinkle 3.2s ease-in-out infinite; }
.spark.s1 { top: 16%; inset-inline-start: 46%; }
.spark.s2 { top: 58%; inset-inline-end: 6%; width: 10px; height: 10px; background: #a597ff; animation-delay: 1.1s; }
.spark.s3 { top: 26%; inset-inline-start: 6%; width: 18px; height: 18px; background: #ffc36b; animation-delay: 2s; }
@keyframes twinkle { 50% { transform: scale(0.55) rotate(20deg); opacity: 0.55; } }
.cute__inner { display: grid; gap: clamp(28px, 4vw, 48px); }
.cute__head { display: grid; gap: 16px; justify-items: start; max-width: 44rem; }
.cute__title {
  font-size: clamp(2.6rem, 1.4rem + 4.6vw, 5.4rem); font-weight: 800; letter-spacing: var(--track-display); line-height: var(--lh-display);
  color: #3a1d4f; text-shadow: 0 3px 0 #fff, 0 7px 0 #ffc6e1;
}
.cute__lede { font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem); color: #5a4468; max-width: 36rem; }
.cute__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 20px; }
@media (max-width: 1100px) { .cute__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .cute__grid { grid-template-columns: 1fr; } }
.cute .card__media { border-radius: 22px; box-shadow: 0 0 0 5px #fff, 0 22px 44px -18px rgba(146, 72, 160, 0.45); background: #f6e8ff; }
.cute .card__link::after { border-radius: 22px; }
.cute .card__title { color: #2a1838; }
.cute .card__meta { color: #6a5679; }
.cute .btn--install { background: #fff; border-color: #f0c7e4; color: #6b2e7d; }
.cute .btn--install:hover { background: #ff9fcf; border-color: #ff9fcf; color: #2a1838; }
.cute .card__live { background: rgba(58, 29, 79, 0.75); }
.cute :focus-visible { outline-color: #7b2fb0; }
.cute .card:has(.card__link:focus-visible) .card__media { outline-color: #7b2fb0; }
@media (hover: hover) { .cute .card:hover .card__media { box-shadow: 0 0 0 5px #fff, 0 30px 60px -20px rgba(146, 72, 160, 0.55); } }

/* ---------- Mood tiles ---------- */
.moods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 900px) { .moods { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .moods { grid-template-columns: 1fr; } }
.mood {
  position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: flex-end; aspect-ratio: 16 / 9; padding: 20px;
  border-radius: var(--r-l); text-decoration: none; box-shadow: 0 0 0 1px var(--line);
  background: var(--mood-bg, var(--ink-3));
}
.mood img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 0.9s var(--ease); }
.mood__shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(7, 8, 20, 0.88) 0%, rgba(7, 8, 20, 0.3) 55%, rgba(7, 8, 20, 0.05) 100%); }
.mood__text { display: grid; gap: 2px; }
.mood__name { font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.6rem); font-weight: 650; letter-spacing: var(--track-head); }
.mood__desc { font-size: 0.9rem; color: rgba(242, 243, 255, 0.82); }
.mood__count { position: absolute; top: 16px; inset-inline-end: 16px; min-width: 36px; padding: 4px 10px; border-radius: 999px; background: rgba(7, 8, 20, 0.55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font-size: 0.8rem; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }
.mood:hover img { transform: scale(1.05); }
.mood:focus-visible { outline-offset: 4px; border-radius: var(--r-l); }
.mood--cute { --mood-bg: linear-gradient(135deg, #ffb3d6, #c9b6ff); box-shadow: 0 0 0 2px rgba(255, 159, 207, 0.7); }
.mood--nature { --mood-bg: linear-gradient(135deg, #1f6b52, #9ad6a2); }
.mood--cartoon { --mood-bg: linear-gradient(135deg, #ff8a5b, #ffd36e); }
.mood--space { --mood-bg: linear-gradient(135deg, #1b1752, #6a4bd8); }
.mood--scifi { --mood-bg: linear-gradient(135deg, #062b3a, #19c3d6); }
.mood--abstract { --mood-bg: linear-gradient(135deg, #5a1a6b, #ff6fb1); }

/* ---------- Features ---------- */
.features { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.features__title { position: sticky; top: calc(var(--bar-h) + 32px); max-width: 12ch; }
.features__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(24px, 4vw, 56px); }
.feat { display: grid; grid-template-columns: 48px 1fr; gap: 18px; padding-block: 28px; border-top: 1px solid var(--line); }
.feat h3 { font-size: 1.125rem; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 6px; }
.feat p { color: var(--text-2); font-size: 0.975rem; }
.feat__icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; color: var(--aqua);
  background: linear-gradient(var(--ink-2), var(--ink-2)) padding-box, linear-gradient(135deg, rgba(108, 232, 218, 0.7), rgba(165, 151, 255, 0.5), rgba(255, 159, 207, 0.6)) border-box; border: 1px solid transparent; }
@media (max-width: 900px) { .features { grid-template-columns: 1fr; } .features__title { position: static; max-width: none; } }
@media (max-width: 600px) { .features__list { grid-template-columns: 1fr; } }

/* ---------- Steps (a real sequence, so numbered) ---------- */
.steps { list-style: none; margin: clamp(28px, 4vw, 48px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); position: relative; }
.step { position: relative; padding-top: 4px; }
.step__n {
  display: block; font-size: clamp(4rem, 3rem + 3vw, 6.5rem); font-weight: 750; line-height: 1; letter-spacing: -0.05em;
  color: transparent; -webkit-text-stroke: 1.5px rgba(165, 151, 255, 0.85); margin-bottom: 18px;
  background: linear-gradient(135deg, rgba(108, 232, 218, 0.25), rgba(165, 151, 255, 0.05)); -webkit-background-clip: text; background-clip: text;
}
.step h3 { font-size: 1.25rem; font-weight: 600; margin-bottom: 8px; }
.step p { color: var(--text-2); }
.step:not(:last-child)::after { content: ""; position: absolute; top: clamp(2rem, 1.5rem + 1.5vw, 3.25rem); inset-inline-start: clamp(4.5rem, 3.5rem + 3vw, 7rem); inset-inline-end: -8px; height: 1px; background: linear-gradient(90deg, rgba(165, 151, 255, 0.5), transparent); }
[dir="rtl"] .step:not(:last-child)::after { background: linear-gradient(270deg, rgba(165, 151, 255, 0.5), transparent); }
.steps__cta { margin-top: clamp(32px, 5vw, 56px); display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.steps__cta .muted { font-size: 0.9rem; }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } .step:not(:last-child)::after { display: none; } .step__n { font-size: 3.5rem; margin-bottom: 8px; } }

/* ---------- Open source + creators ---------- */
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; padding-top: 0; }
.duo__item { position: relative; overflow: hidden; display: grid; gap: 14px; align-content: start; justify-items: start; padding: clamp(28px, 4vw, 48px); border-radius: var(--r-xl); background: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.duo__item p { color: var(--text-2); max-width: 32rem; }
.duo__item .btn { margin-top: 8px; }
.duo__mark { width: 40px; height: 40px; color: var(--text); }
.duo__item--oss::before, .duo__item--make::before { content: ""; position: absolute; width: 360px; height: 360px; inset-inline-end: -140px; top: -160px; border-radius: 50%; filter: blur(40px); opacity: 0.5; pointer-events: none; }
.duo__item--oss::before { background: radial-gradient(circle, rgba(108, 232, 218, 0.55), transparent 65%); }
.duo__item--make::before { background: radial-gradient(circle, rgba(255, 159, 207, 0.5), transparent 65%); }
@media (max-width: 800px) { .duo { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr); gap: clamp(28px, 6vw, 96px); align-items: start; }
.faq__list { border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; padding-block: 14px; cursor: pointer; list-style: none; font-size: 1.0625rem; font-weight: 600; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__chev { transition: transform 0.25s var(--ease); color: var(--text-3); }
.faq__item[open] .faq__chev { transform: rotate(180deg); }
.faq__item p { padding-bottom: 22px; color: var(--text-2); max-width: 60ch; }
@media (max-width: 900px) { .faq { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--line); margin-top: 40px; padding-block: 48px 40px; background: linear-gradient(to bottom, transparent, rgba(13, 16, 36, 0.8)); }
.foot__inner { max-width: 1320px; margin-inline: auto; padding-inline: clamp(16px, 4vw, 40px); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; }
.foot__brand p { color: var(--text-3); margin-top: 6px; font-size: 0.95rem; }
.foot__links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; justify-content: flex-end; }
.foot__links a, .foot__links .linkbtn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 10px; color: var(--text-2); text-decoration: none; font-size: 0.95rem; }
.foot__links a:hover, .foot__links .linkbtn:hover { color: var(--text); }
.foot__fine { grid-column: 1 / -1; color: var(--text-3); font-size: 0.8125rem; padding-top: 20px; border-top: 1px solid var(--line); }
@media (max-width: 760px) { .foot__inner { grid-template-columns: 1fr; } .foot__links { justify-content: flex-start; margin-inline-start: -10px; } }

/* ---------- Ads (rendered only when AdSense is configured) ---------- */
.ad-wrap { padding-block: 8px 24px; }
.gallery > .ad { margin-block: 20px; }
.ad { display: block; margin-block: 8px; padding: 10px 12px 12px; border-radius: var(--r); background: rgba(255, 255, 255, 0.025); box-shadow: inset 0 0 0 1px var(--line); min-height: 140px; }
.ad.is-unfilled { display: none; }
.ad__label { display: block; font-size: 0.75rem; color: var(--text-3); margin-bottom: 6px; }
.ad__unit { display: block; width: 100%; min-height: 100px; }
.detail .ad { margin-top: clamp(40px, 6vw, 72px); }

/* ---------- Page head + filters (community) ---------- */
.pagehead { position: relative; padding-top: calc(var(--bar-h) + clamp(40px, 6vw, 72px)); padding-bottom: 28px; display: grid; gap: 14px; justify-items: start; }
.pagehead__glow { position: absolute; inset: 0 0 auto; height: 420px; z-index: -1; pointer-events: none;
  background: radial-gradient(40% 70% at 20% 0%, rgba(165, 151, 255, 0.22), transparent 70%), radial-gradient(35% 60% at 70% 0%, rgba(108, 232, 218, 0.14), transparent 70%); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; width: 100%; }
.search { position: relative; flex: 1 1 320px; max-width: 560px; }
.search .icon { position: absolute; top: 50%; inset-inline-start: 16px; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.search input { width: 100%; min-height: 50px; padding-inline: 46px 16px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.05); outline: none; transition: border-color 0.2s, box-shadow 0.2s; }
.search input::placeholder { color: var(--text-3); }
.search input:focus { border-color: var(--focus); box-shadow: 0 0 0 4px rgba(124, 241, 228, 0.18); }
.select { position: relative; display: inline-flex; }
.select select { appearance: none; min-height: 50px; padding-inline: 18px 42px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.05); cursor: pointer; }
.select select:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.select option { background: var(--ink-3); color: var(--text); }
.select .icon { position: absolute; top: 50%; inset-inline-end: 16px; transform: translateY(-50%); pointer-events: none; color: var(--text-3); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; text-decoration: none; font-size: 0.925rem; font-weight: 500;
  background: rgba(255, 255, 255, 0.045); box-shadow: inset 0 0 0 1px var(--line); color: var(--text-2); transition: background-color 0.2s, color 0.2s; }
.chip:hover { background: rgba(255, 255, 255, 0.09); color: var(--text); }
.chip[aria-current="true"] { background: var(--text); color: var(--ink); box-shadow: none; }
.chip__dot { width: 8px; height: 8px; border-radius: 9px; background: var(--chip, var(--text-3)); }
.chip--all .chip__dot { background: conic-gradient(var(--candy), var(--iris), var(--aqua), var(--butter), var(--candy)); }
.chip--cute { --chip: #ff9fcf; }
.chip--nature { --chip: #82e8ad; }
.chip--cartoon { --chip: #ffb36b; }
.chip--space { --chip: #a597ff; }
.chip--scifi { --chip: #6ce8da; }
.chip--abstract { --chip: #ff7ab8; }
.chip--video .icon { width: 11px; height: 11px; fill: currentColor; }
.chips .chip--cute:not([aria-current="true"]) { background: rgba(255, 159, 207, 0.12); box-shadow: inset 0 0 0 1px rgba(255, 159, 207, 0.35); color: #ffd3e8; }

/* ---------- Gallery ---------- */
.gallery { display: flex; flex-direction: column; gap: 28px; padding-bottom: 64px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 30px 22px; }
.grid:empty { display: none; }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid--4 { grid-template-columns: 1fr; } }
.gallery[aria-busy="true"] .grid { opacity: 0.55; transition: opacity 0.2s; }
.gallery__foot { display: grid; justify-items: center; gap: 12px; min-height: 44px; }
.sentinel { height: 1px; }
.emptybox { display: grid; justify-items: center; text-align: center; gap: 12px; padding: 56px 24px; border-radius: var(--r-l); background: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.emptybox[hidden] { display: none; }
.emptybox p { color: var(--text-2); max-width: 32rem; }
.emptybox .icon--lg { color: var(--text-3); }
.error { color: var(--bad); }
.skeleton { aspect-ratio: 16 / 10; border-radius: var(--r); background: linear-gradient(100deg, var(--ink-2) 40%, var(--ink-3) 50%, var(--ink-2) 60%) 0 0 / 300% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -150% 0; } }

/* ---------- Detail ---------- */
.detail { padding-top: calc(var(--bar-h) + 24px); padding-bottom: 40px; }
.back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--text-2); text-decoration: none; font-weight: 500; margin-bottom: 12px; }
.back:hover { color: var(--text); }
.detail__grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(300px, 1fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
@media (max-width: 1020px) { .detail__grid { grid-template-columns: 1fr; } }
.display { border-radius: 24px; padding: 10px; background: linear-gradient(160deg, #262a55, #11132a 60%); box-shadow: 0 0 0 1px var(--line-2), 0 50px 100px -40px rgba(0, 0, 0, 0.9), 0 0 140px -50px rgba(165, 151, 255, 0.55); }
.display__screen { position: relative; aspect-ratio: 16 / 10; border-radius: 15px; overflow: hidden; background: #000; }
.display__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.display__frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; opacity: 0; transition: opacity 0.6s var(--ease); background: transparent; }
.display__frame.is-ready { opacity: 1; }
video.display__frame { object-fit: cover; background: #000; }
.display__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 10px 6px 2px; }
.display__note { display: inline-flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 0.875rem; }
.display__screen:fullscreen { border-radius: 0; aspect-ratio: auto; }
.display__empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; text-align: center; padding: 24px; color: var(--text-3);
  background: radial-gradient(60% 60% at 50% 40%, rgba(165, 151, 255, 0.16), transparent 70%), var(--ink-2); }
.detail__side { display: grid; gap: 18px; align-content: start; position: sticky; top: calc(var(--bar-h) + 24px); }
@media (max-width: 1020px) { .detail__side { position: static; } }
.detail__title { font-size: clamp(2rem, 1.4rem + 2vw, 3rem); font-weight: 700; letter-spacing: var(--track-head); overflow-wrap: anywhere; }
.detail__author { color: var(--text-2); margin-top: -8px; }
.detail__cat .chip { min-height: 36px; font-size: 0.85rem; }
.detail__cta { display: grid; gap: 12px; padding: 18px; border-radius: var(--r-l); background: rgba(255, 255, 255, 0.035); box-shadow: inset 0 0 0 1px var(--line); }
.detail__noapp { color: var(--text-2); font-size: 0.95rem; text-align: center; }
.detail__safe { display: flex; gap: 10px; align-items: flex-start; color: var(--text-2); font-size: 0.9rem; }
.detail__safe .icon { color: var(--good); margin-top: 3px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 0; border-radius: var(--r); overflow: hidden; background: var(--line); }
.facts div { background: var(--ink); padding: 12px 14px; }
.facts dt { font-size: 0.8rem; color: var(--text-3); }
.facts dd { margin: 2px 0 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.facts--credit { margin-top: 12px; }
.facts dd { overflow-wrap: anywhere; }
.facts__wide { grid-column: 1 / -1; }
.facts dd a { color: inherit; }
.kindpick { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0; }
.kindpick legend { width: 100%; margin-bottom: 8px; }
.kindpick__opt { position: relative; }
.kindpick__opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.kindpick__opt span { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; cursor: pointer;
  background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px var(--line); font-weight: 500; }
.kindpick__opt input:checked + span { background: var(--text); color: var(--ink); box-shadow: none; }
.kindpick__opt input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 3px; }
.videometa { display: grid; gap: inherit; }
.check { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; align-items: start; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--aqua); }
.check .fielderr { grid-column: 2; }
[data-only][hidden] { display: none !important; }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.05); color: var(--text-2); text-decoration: none; font-size: 0.875rem; }
.tags a:hover { color: var(--text); background: rgba(255, 255, 255, 0.1); }
.about { margin-top: clamp(40px, 6vw, 72px); max-width: 70ch; display: grid; gap: 12px; }
.about__text { color: var(--text-2); white-space: pre-line; }
.more { padding-bottom: 0; }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; font-size: 0.95rem; }
.notice .icon { margin-top: 3px; }
.notice--warn { background: rgba(255, 212, 134, 0.1); color: var(--warn); box-shadow: inset 0 0 0 1px rgba(255, 212, 134, 0.3); }
.notice--bad { background: rgba(255, 152, 164, 0.1); color: var(--bad); box-shadow: inset 0 0 0 1px rgba(255, 152, 164, 0.3); }

/* ---------- Install modal ---------- */
.modal { width: min(480px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; border: 0; padding: clamp(24px, 4vw, 36px); border-radius: 28px; color: var(--text);
  background: linear-gradient(180deg, #181c3d, #0e1126); box-shadow: 0 0 0 1px var(--line-2), 0 40px 120px -20px rgba(0, 0, 0, 0.9), 0 0 120px -40px rgba(165, 151, 255, 0.6); }
.modal[open] { animation: modal-in 0.24s var(--ease); }
.modal::backdrop { background: rgba(4, 5, 14, 0.72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(0.97); } to { opacity: 1; transform: none; } }
.modal h2 { font-size: 1.5rem; margin-top: 20px; text-align: center; }
.modal > p { text-align: center; }
.modal p { color: var(--text-2); margin-top: 10px; }
.modal__art { display: grid; place-items: center; }
.modal__screen { position: relative; width: 132px; aspect-ratio: 16 / 10; border-radius: 12px; padding: 5px; background: linear-gradient(160deg, #2b2f60, #14162f); box-shadow: 0 0 0 1px var(--line-2), 0 20px 40px -16px rgba(0, 0, 0, 0.9); }
.modal__screen span { display: block; height: 100%; border-radius: 8px; background: linear-gradient(120deg, #6ce8da, #a597ff 50%, #ff9fcf); background-size: 200% 200%; animation: sheen 6s ease-in-out infinite alternate; }
.modal__screen::after { content: ""; position: absolute; left: 50%; bottom: -14px; width: 34px; height: 6px; margin-left: -17px; border-radius: 0 0 6px 6px; background: #20244a; }
@keyframes sheen { to { background-position: 100% 100%; } }
.modal__actions { display: grid; gap: 10px; margin-top: 24px; }
.modal__fine { font-size: 0.85rem; text-align: center; }
.modal__manual { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.modal__manual label { font-size: 0.875rem; color: var(--text-3); }
.modal__close { position: absolute; top: 14px; inset-inline-end: 14px; border-color: transparent; }
.copyfield { display: flex; gap: 8px; }
.copyfield input { flex: 1; min-width: 0; min-height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(0, 0, 0, 0.25); font-size: 0.85rem; color: var(--text-2); direction: ltr; }
.toast { position: fixed; bottom: 24px; left: 50%; z-index: 70; transform: translateX(-50%); padding: 12px 18px; border-radius: 999px; background: var(--text); color: var(--ink); font-weight: 600; font-size: 0.95rem; box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.8); animation: pop 0.2s var(--ease); }
.toast[hidden] { display: none; }
.opening { position: fixed; bottom: 24px; left: 50%; z-index: 69; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 999px; background: rgba(21, 25, 54, 0.96); box-shadow: 0 0 0 1px var(--line-2), 0 20px 50px -10px rgba(0, 0, 0, 0.8); font-weight: 500; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.25); border-top-color: var(--aqua); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Consent ---------- */
.consent { position: fixed; z-index: 60; inset-inline: 16px; bottom: 16px; margin-inline: auto; max-width: 760px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; padding: 18px 20px;
  border-radius: 22px; background: rgba(21, 25, 54, 0.97); box-shadow: 0 0 0 1px var(--line-2), 0 30px 80px -20px rgba(0, 0, 0, 0.9); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.consent[hidden] { display: none; }
.consent__text { flex: 1 1 320px; font-size: 0.925rem; color: var(--text-2); }
.consent__title { font-weight: 650; color: var(--text); margin-bottom: 4px; }
.consent__actions { display: flex; gap: 10px; flex: 1 1 auto; justify-content: flex-end; }
.consent__actions .btn { flex: 1 1 0; }

/* ---------- Forms (upload, sign-in) ---------- */
.field { display: grid; gap: 8px; }
.field > span { font-weight: 600; font-size: 0.95rem; }
.field b { color: var(--candy); font-weight: 600; }
.field input, .field textarea, .select--field select { width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.04); outline: none; transition: border-color 0.2s, box-shadow 0.2s; }
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field textarea:focus, .select--field select:focus { border-color: var(--focus); box-shadow: 0 0 0 4px rgba(124, 241, 228, 0.16); }
.field [aria-invalid="true"] { border-color: var(--bad); }
.select--field { display: block; }
.select--field select { padding-inline-end: 42px; border-radius: 14px; }
.hint { color: var(--text-3); font-size: 0.875rem; }
.fielderr { color: var(--bad); font-size: 0.875rem; font-style: normal; }
.fielderr:empty { display: none; }
.formerr { padding: 12px 14px; border-radius: 14px; background: rgba(255, 152, 164, 0.1); color: var(--bad); box-shadow: inset 0 0 0 1px rgba(255, 152, 164, 0.3); }
.formerr[hidden] { display: none; }

.upload { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(28px, 4vw, 56px); align-items: start; padding-bottom: 80px; }
.upload__form { display: grid; gap: 22px; }
.upload__preview { position: sticky; top: calc(var(--bar-h) + 24px); }
.upload__done { grid-column: 1 / -1; display: grid; justify-items: center; text-align: center; gap: 14px; padding: 64px 24px; border-radius: var(--r-xl); background: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); outline: none; }
.upload__done[hidden] { display: none; }
.upload__done .icon--xl { color: var(--good); }
.upload.is-done .upload__form, .upload.is-done .upload__preview { display: none; }
@media (max-width: 960px) { .upload { grid-template-columns: 1fr; } .upload__preview { position: static; order: -1; } }
.drop { display: grid; gap: 8px; }
.drop__input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop__zone { position: relative; overflow: hidden; display: grid; justify-items: center; align-content: center; gap: 6px; min-height: 150px; padding: 24px; text-align: center; cursor: pointer;
  border-radius: 20px; border: 1.5px dashed rgba(165, 151, 255, 0.45); background: rgba(165, 151, 255, 0.05); transition: border-color 0.2s, background-color 0.2s; }
.drop__zone:hover, .drop.is-drag .drop__zone { border-color: var(--aqua); background: rgba(108, 232, 218, 0.07); }
.drop__input:focus-visible + .drop__zone { outline: 2px solid var(--focus); outline-offset: 3px; }
.drop__zone .icon--lg { color: var(--iris); }
.drop__label { font-weight: 600; }
.drop__cta { color: var(--text-3); font-size: 0.9rem; overflow-wrap: anywhere; }
.drop.has-file .drop__zone { border-style: solid; border-color: rgba(130, 232, 173, 0.55); background: rgba(130, 232, 173, 0.06); }
.drop.has-file .drop__cta { color: var(--good); }
.drop.is-invalid .drop__zone { border-color: var(--bad); background: rgba(255, 152, 164, 0.06); }
.drop--thumb .drop__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.35; }
.drop--thumb .drop__img + .icon, .drop--thumb .drop__img ~ * { position: relative; }
.rules { padding: 18px 20px; border-radius: var(--r); background: rgba(255, 255, 255, 0.03); box-shadow: inset 0 0 0 1px var(--line); }
.rules ul { margin: 8px 0 0; padding-inline-start: 20px; color: var(--text-2); font-size: 0.95rem; }
.rules li + li { margin-top: 4px; }
.display--small .display__screen { aspect-ratio: 16 / 10; }

.signin { position: relative; display: grid; gap: 18px; padding: clamp(28px, 5vw, 48px); border-radius: var(--r-xl); background: linear-gradient(180deg, rgba(24, 28, 61, 0.85), rgba(13, 16, 36, 0.85)); box-shadow: inset 0 0 0 1px var(--line-2); overflow: hidden; isolation: isolate; }
.signin__orb { position: absolute; z-index: -1; width: 420px; height: 420px; top: -220px; inset-inline-end: -160px; border-radius: 50%; background: radial-gradient(circle, rgba(165, 151, 255, 0.4), transparent 65%); filter: blur(20px); }
.signin__buttons { display: grid; gap: 12px; }
.signin__buttons:empty { display: none; }
.devlogin { display: grid; gap: 14px; padding: 18px; border-radius: var(--r); border: 1px dashed rgba(255, 212, 134, 0.45); background: rgba(255, 212, 134, 0.04); }
.devlogin__title { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; color: var(--warn); }

/* ---------- Mine + admin ---------- */
.rows { list-style: none; margin: 0 0 80px; padding: 0; display: grid; gap: 14px; }
.rows__loading { color: var(--text-3); }
.urow { display: grid; grid-template-columns: 160px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 12px; border-radius: var(--r-l); background: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.urow img { width: 160px; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 12px; background: var(--ink-3); }
.urow h2 { font-size: 1.0625rem; font-weight: 600; }
.urow p { color: var(--text-3); font-size: 0.9rem; margin-top: 4px; }
@media (max-width: 640px) { .urow { grid-template-columns: 96px minmax(0, 1fr); } .urow img { width: 96px; } .urow .btn { grid-column: 1 / -1; } }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 600; margin-top: 8px; }
.badge--pending { background: rgba(255, 212, 134, 0.12); color: var(--warn); }
.badge--approved { background: rgba(130, 232, 173, 0.12); color: var(--good); }
.badge--rejected { background: rgba(255, 152, 164, 0.12); color: var(--bad); }
.queue { display: grid; gap: 24px; padding-bottom: 80px; }
.qitem { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; padding: 18px; border-radius: var(--r-l); background: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
@media (max-width: 900px) { .qitem { grid-template-columns: 1fr; } }
.qitem .display__screen { border-radius: 12px; }
.qitem__meta { display: grid; gap: 10px; align-content: start; }
.qitem__meta h2 { font-size: 1.25rem; }
.scan { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 0.875rem; }
.scan li { padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.03); }
.scan code { display: block; margin-top: 4px; font-size: 0.8rem; color: var(--text-3); overflow-wrap: anywhere; white-space: pre-wrap; }
.sev-high { box-shadow: inset 3px 0 0 var(--bad); }
.sev-medium { box-shadow: inset 3px 0 0 var(--warn); }
.sev-low { box-shadow: inset 3px 0 0 var(--text-3); }
[dir="rtl"] .sev-high { box-shadow: inset -3px 0 0 var(--bad); }
[dir="rtl"] .sev-medium { box-shadow: inset -3px 0 0 var(--warn); }
[dir="rtl"] .sev-low { box-shadow: inset -3px 0 0 var(--text-3); }
.qitem__actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.qitem__actions .field { flex: 1 1 220px; }

/* ---------- Prose + empty states ---------- */
.prose { display: grid; gap: 18px; }
.prose section { display: grid; gap: 10px; padding-top: 18px; }
.prose p, .prose li { color: var(--text-2); }
.prose ul { margin: 0; padding-inline-start: 20px; }
.empty-hero { position: relative; isolation: isolate; min-height: 80svh; display: grid; place-content: center; justify-items: center; text-align: center; gap: 16px; padding: calc(var(--bar-h) + 40px) 20px 60px; }
.empty-hero h1 { font-size: clamp(2rem, 1.4rem + 2.5vw, 3.25rem); max-width: 20ch; }
.empty-hero .lede { max-width: 34rem; }
.empty-hero .icon--xl { color: var(--iris); }
.empty-hero__glow { position: absolute; z-index: -1; inset: 10% 20%; background: radial-gradient(closest-side, rgba(165, 151, 255, 0.28), transparent), radial-gradient(40% 40% at 70% 70%, rgba(255, 159, 207, 0.18), transparent); filter: blur(10px); }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .hero__content, .hero__canvas { transform: none !important; }
}
.detail__side > [data-share] { justify-self: start; }
@media (max-width: 600px) {
  .filters { flex-wrap: nowrap; }
  .search { flex: 1 1 auto; min-width: 0; }
  .select select { padding-inline: 14px 36px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(-1 * clamp(16px, 4vw, 40px)); padding-inline: clamp(16px, 4vw, 40px); padding-bottom: 4px; scrollbar-width: none; scroll-snap-type: x proximity; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; scroll-snap-align: start; }
}
/* CJK headlines: size by characters (1em each), and break at phrase boundaries where supported. */
[data-script="ja"] .hero__title, [data-script="ko"] .hero__title, [data-script="zh-hans"] .hero__title, [data-script="zh-hant"] .hero__title { max-width: 12em; }
[data-script="ja"] h1, [data-script="ja"] h2, [data-script="ja"] .hero__title { word-break: auto-phrase; }
.pagehead > .chips { justify-self: stretch; min-width: 0; }
.pagehead > .filters { min-width: 0; }
.urow img { height: auto; }

/* Scanner disclaimer in the moderation queue */
.scan-note { margin: 0; padding: 10px 12px; border-radius: var(--r-s); background: rgba(255, 212, 134, 0.08); box-shadow: inset 0 0 0 1px rgba(255, 212, 134, 0.28); color: var(--warn); font-size: 0.9rem; }

/* ---------- Admin statistics ---------- */
.stats { display: grid; gap: 40px; padding-bottom: 80px; }
.stats section { display: grid; gap: 14px; min-width: 0; }
.stats__totals { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.stats__totals dd { font-size: 1.6rem; }
.stats__two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 40px; }
.stats__scroll { overflow-x: auto; border-radius: var(--r); box-shadow: inset 0 0 0 1px var(--line); }
.stats__table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.stats__table th, .stats__table td { padding: 10px 14px; text-align: start; border-bottom: 1px solid var(--line); white-space: nowrap; }
.stats__table thead th { font-size: 0.8rem; font-weight: 600; color: var(--text-3); background: var(--ink-2); }
.stats__table tbody th { font-weight: 500; }
.stats__table tbody tr:last-child > * { border-bottom: 0; }
.stats .num { text-align: end; font-variant-numeric: tabular-nums; }
.stats__flag { display: inline-block; width: 1.6em; }
.stats__list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; counter-reset: top; }
.stats__list li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 14px; border-radius: var(--r-s); background: var(--ink-2); counter-increment: top; }
.stats__list li::before { content: counter(top) "."; color: var(--text-3); min-width: 2ch; }
.stats__list a { flex: 1; color: var(--text); overflow-wrap: anywhere; }
.stats__raw summary { cursor: pointer; color: var(--text-2); min-height: 44px; display: flex; align-items: center; }
.chart { margin: 0; padding: 16px; border-radius: var(--r-l); background: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart__grid { stroke: var(--line); stroke-dasharray: 4 4; }
.chart__axis { stroke: var(--line-2); }
.chart__tick { fill: var(--text-3); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart__line { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.chart__line--app { stroke: var(--iris); }
.chart__line--inst { stroke: var(--aqua); }
.chart__line--view { stroke: var(--candy); stroke-dasharray: 6 4; }
.chart__legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 12px; color: var(--text-2); font-size: 0.9rem; }
.chart__legend span { display: inline-flex; align-items: center; gap: 8px; }
.chart__key { width: 18px; height: 3px; border-radius: 2px; }
.chart__key--app { background: var(--iris); }
.chart__key--inst { background: var(--aqua); }
.chart__key--view { background: var(--candy); }
.danger { display: grid; gap: 12px; margin-block: 48px 80px; padding: 24px; border-radius: var(--r-l); background: rgba(255, 152, 164, 0.05); box-shadow: inset 0 0 0 1px rgba(255, 152, 164, 0.3); }
.danger h2 { font-size: 1.25rem; }
.danger p { color: var(--text-2); }
.btn--danger { background: var(--bad); color: #2a0a10; border-color: var(--bad); }
.btn--danger:hover { background: #ffb3bc; }

/* ---------- Support the project (landing) ---------- */
.support { padding-top: 0; scroll-margin-top: calc(var(--bar-h) + 16px); }
.support__box { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; padding: clamp(24px, 3.5vw, 36px); border-radius: var(--r-xl); background: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.support__box > div:first-child { flex: 1 1 320px; display: grid; gap: 8px; }
.support__box p { color: var(--text-2); max-width: 40rem; }
.support__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.support__actions .icon { color: var(--candy); }
