/* =========================================================
   好AI — curated AI tool directory
   Warm editorial system: paper, jade, terracotta.
   ========================================================= */

@font-face {
  font-family: "Manrope";
  src: url("assets/fonts/manrope-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Fraunces";
  src: url("assets/fonts/fraunces-latin.woff2") format("woff2");
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #f5f2ea;
  --bg-soft: #eee9dd;
  --surface: #fffdf8;
  --surface-2: #faf7f0;
  --ink: #1b2a24;
  --ink-2: #43524b;
  --muted: #6e7b73;
  --faint: #9aa39d;
  --line: #e3ded1;
  --line-strong: #d5cebe;
  --brand: #236451;
  --brand-strong: #174839;
  --brand-soft: #e2eee7;
  --accent: #c06f3c;
  --accent-soft: #f4e4d5;
  --accent-strong: #a55729;
  --gold: #b18737;
  --logo-tile: #f7f4ec;
  --danger: #a84f45;
  --cta-bg: #183f33;
  --cta-ink: #f6f2e7;
  --cta-accent: #e9a36b;
  --shadow-sm: 0 1px 2px rgba(24, 40, 33, 0.04);
  --shadow-md: 0 18px 40px -18px rgba(24, 40, 33, 0.22);
  --shadow-lg: 0 34px 70px -28px rgba(24, 40, 33, 0.3);
  --font-sans: "Manrope", "PingFang SC", "HarmonyOS Sans SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-display: "Fraunces", "Songti SC", "STSong", serif;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --page: 1200px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html[data-theme="dark"] {
  --bg: #101713;
  --bg-soft: #151e19;
  --surface: #19231e;
  --surface-2: #141d18;
  --ink: #f0ede4;
  --ink-2: #c5cdc6;
  --muted: #8e9b92;
  --faint: #6c7a71;
  --line: #2a352f;
  --line-strong: #3a463f;
  --brand: #8fc9b2;
  --brand-strong: #a9dcc7;
  --brand-soft: #20372d;
  --accent: #e2a073;
  --accent-soft: #3a2a20;
  --accent-strong: #f0b38b;
  --gold: #d0ac69;
  --logo-tile: #f3efe5;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 18px 40px -18px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 34px 70px -28px rgba(0, 0, 0, 0.66);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  font-weight: 450;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.35s ease, color 0.35s ease;
}

body.modal-open {
  overflow: hidden;
}

::selection {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

svg {
  display: block;
}

.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none !important;
}

.menu-toggle .close-icon {
  display: none;
}

.menu-toggle[aria-expanded="true"] .menu-icon {
  display: none;
}

.menu-toggle[aria-expanded="true"] .close-icon {
  display: block;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--bg);
  transform: translateY(-150%);
  transition: transform 0.2s;
}

.skip-link:focus {
  transform: translateY(0);
}

:where(a, button, input, select, [tabindex]):focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.65'/%3E%3C/svg%3E");
}

html[data-theme="dark"] .grain {
  mix-blend-mode: soft-light;
  opacity: 0.06;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid transparent;
  background: color-mix(in srgb, var(--bg) 0%, transparent);
  transition: background-color 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
}

.site-header.scrolled,
.site-header.menu-open {
  border-bottom-color: var(--line);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  backdrop-filter: blur(16px) saturate(1.1);
}

.header-inner {
  width: min(var(--page), calc(100% - 48px));
  height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--brand-strong);
  color: var(--bg);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

html[data-theme="dark"] .brand-mark {
  color: #122019;
}

.brand-mark svg {
  width: 23px;
  height: 23px;
  fill: currentColor;
}

.brand-name {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.brand-ai {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: -0.02em;
  margin-left: 1px;
}

.brand-sub {
  margin-left: 2px;
  padding-left: 11px;
  border-left: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.2;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 12px;
}

.main-nav a {
  position: relative;
  padding: 8px 12px;
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 8px;
  transition: color 0.2s, background-color 0.2s;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 4px;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--ink);
}

.main-nav a:hover::after,
.main-nav a.active::after {
  transform: scaleX(1);
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 9px;
}

.search-trigger {
  height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  color: var(--muted);
  font-size: 12.5px;
  transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}

.search-trigger:hover {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

.search-trigger .icon {
  width: 16px;
  height: 16px;
}

kbd {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--surface);
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 10.5px;
  line-height: 1;
}

.icon-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}

.icon-btn:hover {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

.icon-btn .icon {
  width: 18px;
  height: 18px;
}

.theme-toggle .icon-moon,
.theme-toggle .icon-sun {
  grid-area: 1 / 1;
  transition: opacity 0.2s, transform 0.3s;
}

.theme-toggle .icon-moon {
  opacity: 0;
  transform: rotate(-30deg) scale(0.7);
}

html[data-theme="dark"] .theme-toggle .icon-sun {
  opacity: 0;
  transform: rotate(30deg) scale(0.7);
}

html[data-theme="dark"] .theme-toggle .icon-moon {
  opacity: 1;
  transform: rotate(0) scale(1);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform 0.2s var(--ease), background-color 0.2s, border-color 0.2s, color 0.2s;
}

.btn .icon {
  width: 16px;
  height: 16px;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--brand-strong);
  color: var(--bg);
}

html[data-theme="dark"] .btn-primary {
  background: var(--brand);
  color: #122019;
}

.btn-primary:hover {
  background: var(--brand);
}

html[data-theme="dark"] .btn-primary:hover {
  background: var(--brand-strong);
}

.btn-secondary {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

.btn-secondary:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.btn-accent {
  background: var(--cta-accent);
  color: #2a1a10;
}

.btn-accent:hover {
  background: #f4b27c;
}

.btn-small {
  height: 38px;
  padding: 0 15px;
  border-radius: 999px;
  font-size: 12.5px;
}

.menu-toggle,
.mobile-menu {
  display: none;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 72px 0 70px;
  background:
    radial-gradient(ellipse 46% 44% at 78% 22%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 70%),
    radial-gradient(ellipse 38% 42% at 14% 18%, color-mix(in srgb, var(--brand) 5%, transparent), transparent 72%);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 30px;
  right: 4%;
  width: 520px;
  height: 520px;
  border: 1px solid var(--line);
  border-radius: 50%;
  opacity: 0.45;
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  top: 80px;
  right: 9%;
  width: 380px;
  height: 380px;
  border: 1px solid var(--line);
  border-radius: 50%;
  opacity: 0.35;
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  width: min(var(--page), calc(100% - 48px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.07fr) minmax(0, 0.93fr);
  align-items: center;
  gap: 54px;
}

.hero-copy {
  animation: riseIn 0.75s var(--ease) both;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.17em;
  line-height: 1.4;
  text-transform: uppercase;
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent);
}

.hero-eyebrow {
  margin-bottom: 26px;
}

.hero h1 {
  max-width: 680px;
  font-size: clamp(46px, 5.5vw, 76px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.055em;
}

.hero h1 em {
  position: relative;
  isolation: isolate;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: -0.03em;
  padding-right: 0.03em;
}

.hero h1 em::after {
  content: "";
  position: absolute;
  left: 2%;
  right: -1%;
  bottom: 3%;
  height: 0.18em;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 24%, transparent);
  transform: rotate(-1.5deg);
  z-index: -1;
}

.hero-lede {
  max-width: 515px;
  margin-top: 24px;
  color: var(--ink-2);
  font-size: 16.5px;
  line-height: 1.8;
  letter-spacing: 0.005em;
}

.hero-lede strong {
  color: var(--ink);
  font-weight: 800;
}

.hero-search {
  position: relative;
  max-width: 560px;
  height: 62px;
  margin-top: 32px;
  display: flex;
  align-items: center;
  padding: 0 9px 0 20px;
  border: 1px solid var(--line-strong);
  border-radius: 17px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, box-shadow 0.25s;
}

.hero-search:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft), var(--shadow-sm);
}

.hero-search .search-icon {
  width: 21px;
  height: 21px;
  color: var(--muted);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0 14px;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 15px;
}

.hero-search input::placeholder {
  color: var(--faint);
}

.hero-search input::-webkit-search-cancel-button {
  display: none;
}

.search-submit {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--brand-strong);
  color: var(--bg);
  transition: background-color 0.2s, transform 0.2s;
}

html[data-theme="dark"] .search-submit {
  background: var(--brand);
  color: #122019;
}

.search-submit:hover {
  background: var(--brand);
  transform: translateX(1px);
}

.search-submit .icon {
  width: 19px;
  height: 19px;
}

.search-suggestions {
  position: absolute;
  top: calc(100% + 9px);
  left: 0;
  right: 0;
  z-index: 30;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  animation: popIn 0.18s var(--ease);
}

.suggestion-head {
  display: flex;
  justify-content: space-between;
  padding: 7px 10px;
  color: var(--faint);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.suggestion-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  border-radius: 9px;
  text-align: left;
  transition: background-color 0.15s;
}

.suggestion-item:hover,
.suggestion-item.is-active {
  background: var(--bg-soft);
}

.suggestion-logo {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--logo-tile);
}

.suggestion-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.suggestion-main {
  min-width: 0;
  flex: 1;
}

.suggestion-main strong {
  display: block;
  font-size: 13px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.suggestion-main span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.suggestion-price {
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.suggestion-all {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  padding: 10px;
  border-top: 1px solid var(--line);
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  text-align: left;
}

.suggestion-all .icon {
  width: 14px;
  height: 14px;
}

.quick-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.quick-links > span {
  margin-right: 2px;
  color: var(--faint);
  font-size: 11.5px;
}

.quick-links button {
  padding: 4px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  font-size: 11.5px;
  transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}

.quick-links button:hover {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

.hero-stats {
  max-width: 580px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 42px;
  padding-top: 23px;
  border-top: 1px solid var(--line);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat strong {
  font-family: var(--font-display);
  font-size: 29px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.stat span {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.02em;
}

/* Hero stage */

.hero-stage {
  position: relative;
  min-height: 540px;
  animation: riseIn 0.85s 0.12s var(--ease) both;
}

.stage-back {
  position: absolute;
  pointer-events: none;
  top: 38px;
  right: 0;
  width: 82%;
  height: 444px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--brand) 8%, var(--surface-2)), var(--surface-2) 65%),
    var(--surface-2);
  transform: rotate(3.4deg);
  transform-origin: bottom right;
  box-shadow: var(--shadow-sm);
}

.stage-back-kicker {
  color: var(--faint);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.stage-back p {
  color: color-mix(in srgb, var(--brand) 65%, var(--muted));
  font-family: var(--font-display);
  font-size: 29px;
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: 0.01em;
}

.stage-back-foot {
  align-self: flex-end;
  color: var(--faint);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.spotlight {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  width: 88%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.spotlight-media {
  position: relative;
  height: 286px;
  overflow: hidden;
  background: var(--bg-soft);
}

.spotlight-media > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}

.spotlight:hover .spotlight-media > img {
  transform: scale(1.035);
}

.spotlight-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 18, 14, 0.35) 0%, transparent 28%, transparent 58%, rgba(10, 18, 14, 0.62) 100%);
}

.spotlight-topline {
  position: absolute;
  top: 15px;
  left: 15px;
  right: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
}

.spotlight-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(15, 26, 20, 0.32);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.spotlight-label .icon {
  width: 12px;
  height: 12px;
  fill: currentColor;
  stroke: none;
}

.spotlight-issue {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.12em;
  opacity: 0.85;
}

.spotlight-category {
  position: absolute;
  left: 18px;
  bottom: 15px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.spotlight-body {
  padding: 18px 20px 17px;
}

.spotlight-head {
  display: flex;
  align-items: center;
  gap: 13px;
}

.spotlight-logo {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--logo-tile);
}

.spotlight-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.spotlight-head h2 {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.spotlight-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.spotlight-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 15px;
  padding-top: 13px;
  padding-right: 178px;
  border-top: 1px solid var(--line);
}

.spotlight-issue {
  margin-right: 26px;
}

.price-badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1.2;
  white-space: nowrap;
}

.price-free {
  background: var(--brand-soft);
  color: var(--brand);
}

.price-mixed {
  background: color-mix(in srgb, var(--gold) 14%, transparent);
  color: var(--gold);
}

.price-paid {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.price-trial {
  background: color-mix(in srgb, var(--muted) 12%, transparent);
  color: var(--muted);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
}

.text-link .icon {
  width: 14px;
  height: 14px;
  transition: transform 0.2s;
}

.text-link:hover .icon {
  transform: translate(2px, -2px);
}

.mini-board {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 3;
  width: 218px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.mini-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.mini-head > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-2);
  letter-spacing: 0.02em;
  font-size: 10.5px;
}

.live-dot {
  position: relative;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.live-dot::after {
  content: "";
  position: absolute;
  inset: -3px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  animation: livePulse 2.4s ease-out infinite;
}

.mini-list {
  display: flex;
  flex-direction: column;
}

.mini-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 2px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 65%, transparent);
  text-align: left;
}

.mini-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.mini-item:hover .mini-name {
  color: var(--brand);
}

.mini-logo {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--logo-tile);
}

.mini-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.mini-main {
  min-width: 0;
  flex: 1;
}

.mini-name {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.3;
  transition: color 0.2s;
}

.mini-cat {
  display: block;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.4;
}

.mini-arrow {
  color: var(--faint);
}

.mini-arrow .icon {
  width: 13px;
  height: 13px;
}

.stamp {
  position: absolute;
  top: -16px;
  right: -13px;
  z-index: 4;
  width: 104px;
  height: 104px;
  pointer-events: none;
  padding: 8px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-strong);
  box-shadow: var(--shadow-sm);
}

.stamp svg {
  width: 100%;
  height: 100%;
}

.stamp text {
  fill: currentColor;
  font-family: var(--font-sans);
  font-size: 8.4px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.stamp-spin {
  transform-origin: 60px 60px;
  animation: spin 32s linear infinite;
}

.stamp-star {
  fill: currentColor;
}

/* ---------- Sections ---------- */

.section {
  padding: 88px max(24px, calc((100vw - var(--page)) / 2));
  border-top: 1px solid var(--line);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 36px;
}

.section-head > div {
  min-width: 0;
}

.section-head h2 {
  margin-top: 13px;
  font-size: clamp(31px, 3.4vw, 44px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.045em;
}

.section-sub {
  max-width: 560px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding-bottom: 5px;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 700;
  border-bottom: 1px solid var(--line-strong);
  transition: color 0.2s, border-color 0.2s;
}

.section-link .icon {
  width: 14px;
  height: 14px;
  transition: transform 0.2s;
}

.section-link:hover {
  color: var(--brand);
  border-color: var(--brand);
}

.section-link:hover .icon {
  transform: translateX(3px);
}

.section-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding-bottom: 5px;
  color: var(--muted);
  font-size: 11.5px;
}

.section-note .icon {
  width: 14px;
  height: 14px;
}

.mobile-break {
  display: none;
}

/* ---------- Categories ---------- */

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
}

.category-card {
  position: relative;
  min-height: 145px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  text-align: left;
  overflow: hidden;
  transition: transform 0.28s var(--ease), border-color 0.2s, background-color 0.2s;
}

.category-card::after {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -46px;
  width: 120px;
  height: 120px;
  border: 1px solid color-mix(in srgb, var(--cat, var(--brand)) 18%, transparent);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s, transform 0.4s var(--ease);
}

.category-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--cat, var(--brand)) 45%, var(--line));
  background: var(--surface-2);
}

.category-card:hover::after {
  opacity: 1;
  transform: scale(1.08);
}

.cat-icon {
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: color-mix(in srgb, var(--cat, var(--brand)) 15%, transparent);
  color: color-mix(in srgb, var(--cat, var(--brand)) 88%, var(--ink));
}

.cat-icon .icon {
  width: 20px;
  height: 20px;
  stroke-width: 1.8;
}

.cat-name {
  display: block;
  margin-top: 15px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.cat-desc {
  display: -webkit-box;
  margin-top: 5px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.cat-foot {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 12px;
}

.cat-count {
  color: var(--faint);
  font-family: var(--font-display);
  font-size: 11.5px;
  letter-spacing: 0.04em;
}

.cat-arrow {
  color: var(--faint);
  transition: transform 0.2s, color 0.2s;
}

.cat-arrow .icon {
  width: 14px;
  height: 14px;
}

.category-card:hover .cat-arrow {
  color: var(--cat, var(--brand));
  transform: translate(2px, -2px);
}

.category-card.cat-all {
  background: var(--brand-strong);
  border-color: var(--brand-strong);
  color: var(--bg);
}

html[data-theme="dark"] .category-card.cat-all {
  background: #244f3f;
  border-color: #2c5c49;
  color: #f4f1e7;
}

.category-card.cat-all .cat-icon {
  background: rgba(255, 255, 255, 0.12);
  color: #f4f1e7;
}

.category-card.cat-all .cat-desc,
.category-card.cat-all .cat-count {
  color: rgba(246, 242, 231, 0.62);
}

.category-card.cat-all .cat-arrow {
  color: rgba(246, 242, 231, 0.8);
}

.category-card.cat-all::after {
  border-color: rgba(255, 255, 255, 0.18);
}

.category-card.cat-all:hover {
  background: #1d5744;
  border-color: #1d5744;
}

html[data-theme="dark"] .category-card.cat-all:hover {
  background: #2b5f4c;
  border-color: #2b5f4c;
}

.category-card.cat-all:hover .cat-arrow {
  color: #fff;
}

.category-card.cat-all::before {
  content: "171";
  position: absolute;
  right: 18px;
  bottom: -8px;
  color: rgba(255, 255, 255, 0.075);
  font-family: var(--font-display);
  font-size: 72px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.07em;
  pointer-events: none;
}

.category-card.cat-all .cat-desc {
  max-width: 240px;
}

.category-card.cat-all .cat-foot {
  max-width: 100%;
}

@media (min-width: 1021px) {
  .category-grid .category-card.cat-all {
    grid-column: span 3;
  }

  .category-grid .category-card.cat-all::before {
    right: 24px;
    bottom: -13px;
    font-size: 106px;
  }

  .category-grid .category-card.cat-all .cat-foot {
    max-width: 260px;
  }
}

.collection-kicker {
  display: block;
}

html[data-theme="dark"] .category-card:not(.cat-all) .cat-icon {
  color: color-mix(in srgb, var(--cat, var(--brand)) 55%, #f4f1e7);
  background: color-mix(in srgb, var(--cat, var(--brand)) 19%, transparent);
}

/* ---------- Tools ---------- */

.tools-section {
  background: var(--surface-2);
}

.toolbar {
  margin-bottom: 24px;
}

.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chip {
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  transition: border-color 0.18s, background-color 0.18s, color 0.18s;
}

.chip:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.chip.active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bg);
}

html[data-theme="dark"] .chip.active {
  border-color: var(--brand);
  background: var(--brand);
  color: #122019;
}

.toolbar-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 17px;
}

.library-search {
  height: 43px;
  min-width: 250px;
  flex: 1 1 280px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.library-search:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.library-search .icon {
  width: 17px;
  height: 17px;
  color: var(--muted);
}

.library-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 12.5px;
}

.library-search input::placeholder {
  color: var(--faint);
}

.price-filter {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
}

.price-filter button {
  padding: 6px 11px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 0.18s, color 0.18s, box-shadow 0.18s;
}

.price-filter button:hover {
  color: var(--ink);
}

.price-filter button.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(24, 40, 33, 0.09);
}

.sort-select {
  position: relative;
  height: 43px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
}

.sort-select select {
  height: 100%;
  appearance: none;
  border: 0;
  outline: 0;
  padding: 0 32px 0 12px;
  background: transparent;
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}

.sort-select .icon {
  position: absolute;
  right: 10px;
  width: 13px;
  height: 13px;
  color: var(--muted);
  pointer-events: none;
}

.saved-filter {
  height: 43px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 600;
  transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}

.saved-filter .icon {
  width: 15px;
  height: 15px;
}

.saved-filter span {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.saved-filter:hover {
  border-color: var(--line-strong);
}

.saved-filter[aria-pressed="true"] {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand);
}

.saved-filter[aria-pressed="true"] .icon {
  fill: currentColor;
}

.results-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 11.5px;
}

.results-row p {
  margin: 0;
}

.reset-filters {
  padding: 0;
  color: var(--brand);
  font-size: 11.5px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.tool-card {
  position: relative;
  min-height: 226px;
  display: flex;
  flex-direction: column;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  animation: fadeIn 0.32s ease both;
  transition: transform 0.28s var(--ease), border-color 0.2s, box-shadow 0.28s var(--ease);
}

.tool-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--brand) 35%, var(--line));
  box-shadow: var(--shadow-md);
}

.tool-card:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

.tool-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.tool-logo {
  position: relative;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--logo-tile);
  overflow: hidden;
}

.tool-logo img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.logo-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
}

.mini-logo,
.suggestion-logo,
.collection-logo,
.dialog-logo {
  position: relative;
  overflow: hidden;
}

.mini-logo img,
.suggestion-logo img,
.collection-logo img,
.dialog-logo img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.mini-logo .logo-fallback {
  font-size: 10px;
}

.suggestion-logo .logo-fallback,
.collection-logo .logo-fallback {
  font-size: 11px;
}

.dialog-logo .logo-fallback {
  font-size: 16px;
}

.tool-title-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 15px;
}

.tool-title-row h3 {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.editor-pick {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.editor-pick .icon {
  width: 10px;
  height: 10px;
  fill: currentColor;
  stroke: none;
}

.tool-desc {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tool-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
}

.tool-cat {
  padding: 0;
  color: var(--faint);
  font-size: 10.5px;
  line-height: 1.4;
  text-align: left;
  transition: color 0.18s;
}

.tool-cat:hover {
  color: var(--brand);
}

.tool-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.card-icon-btn {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--faint);
  transition: border-color 0.18s, color 0.18s, background-color 0.18s;
}

.card-icon-btn .icon {
  width: 15px;
  height: 15px;
}

.card-icon-btn:hover {
  border-color: var(--line);
  background: var(--bg-soft);
  color: var(--ink);
}

.card-icon-btn.is-saved {
  color: var(--accent);
}

.card-icon-btn.is-saved .icon {
  fill: currentColor;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  text-align: center;
}

.empty-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--bg-soft);
  color: var(--muted);
}

.empty-state h3 {
  margin-top: 16px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.empty-state p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
}

.empty-state .btn {
  margin-top: 19px;
}

.load-more-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
}

.load-more {
  min-width: 170px;
}

.load-more .icon {
  transition: transform 0.2s;
}

.load-more:hover .icon {
  transform: translateY(2px);
}

.load-more-wrap p {
  color: var(--muted);
  font-size: 11.5px;
}

.load-more-wrap p a {
  color: var(--brand);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Collections ---------- */

.collection-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.collection-video {
  --collection-bg: #f1e1d3;
  --collection-color: #b26134;
}

.collection-code {
  --collection-bg: #e3ebe6;
  --collection-color: #3f6c56;
}

.collection-writing {
  --collection-bg: #ece5d6;
  --collection-color: #8a693b;
}

html[data-theme="dark"] .collection-video {
  --collection-bg: #2a201a;
  --collection-color: #e6a377;
}

html[data-theme="dark"] .collection-code {
  --collection-bg: #1a2620;
  --collection-color: #8fc9b2;
}

html[data-theme="dark"] .collection-writing {
  --collection-bg: #27231a;
  --collection-color: #d7b071;
}

.collection-card {
  position: relative;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  padding: 25px;
  border: 1px solid color-mix(in srgb, var(--collection-color, var(--brand)) 15%, var(--line));
  border-radius: var(--radius-lg);
  background: var(--collection-bg, var(--surface));
  text-align: left;
  overflow: hidden;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.collection-card::before {
  content: "";
  position: absolute;
  right: -75px;
  top: -75px;
  width: 210px;
  height: 210px;
  border: 1px solid color-mix(in srgb, var(--collection-color, var(--brand)) 22%, transparent);
  border-radius: 50%;
  transition: transform 0.5s var(--ease);
}

.collection-card::after {
  content: "";
  position: absolute;
  right: 26px;
  top: 32px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--collection-color, var(--brand)) 18%, transparent);
  transition: transform 0.5s var(--ease);
}

.collection-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.collection-card:hover::before {
  transform: scale(1.06);
}

.collection-card:hover::after {
  transform: scale(1.12) translate(-3px, 3px);
}

.collection-kicker {
  position: relative;
  z-index: 1;
  color: color-mix(in srgb, var(--collection-color, var(--brand)) 80%, var(--ink));
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.collection-card h3 {
  position: relative;
  z-index: 1;
  max-width: 280px;
  margin-top: 34px;
  color: var(--ink);
  font-size: clamp(22px, 2.2vw, 28px);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.035em;
}

.collection-card p {
  position: relative;
  z-index: 1;
  max-width: 290px;
  margin-top: 9px;
  color: color-mix(in srgb, var(--ink) 68%, var(--muted));
  font-size: 12.5px;
  line-height: 1.65;
}

.collection-foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-top: auto;
  padding-top: 24px;
}

.collection-logos {
  display: flex;
  align-items: center;
  padding-left: 7px;
}

.collection-logo {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  margin-left: -7px;
  padding: 6px;
  border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  border-radius: 50%;
  background: var(--logo-tile);
  box-shadow: 0 0 0 2px var(--collection-bg, var(--surface));
}

.collection-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.collection-more {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: color-mix(in srgb, var(--ink) 72%, var(--muted));
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}

.collection-arrow {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--ink) 16%, transparent);
  border-radius: 50%;
  color: var(--ink);
  transition: background-color 0.25s, color 0.25s, transform 0.25s;
}

.collection-arrow .icon {
  width: 14px;
  height: 14px;
}

.collection-card:hover .collection-arrow {
  background: var(--ink);
  color: var(--collection-bg, var(--surface));
  transform: translate(2px, -2px);
}

/* ---------- News ---------- */

.news-panel {
  padding: 8px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.news-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 34px;
}

.news-item {
  display: block;
  padding: 19px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
}

.news-item:nth-last-child(-n + 3) {
  border-bottom: 0;
}

.news-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 6px;
  color: var(--faint);
  font-size: 9.5px;
}

.news-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--brand);
  font-weight: 700;
}

.news-tag::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.news-title {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.18s;
}

.news-item:hover .news-title {
  color: var(--brand);
}

.news-count {
  margin-bottom: 4px;
}

/* ---------- Logo fallback ---------- */

.fallback-initial {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-soft);
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
}

/* ---------- Submit ---------- */

.submit-section {
  padding: 84px max(24px, calc((100vw - var(--page)) / 2)) 92px;
  border-top: 1px solid var(--line);
}

.submit-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
  gap: 50px;
  padding: 48px;
  border-radius: 27px;
  background: var(--cta-bg);
  color: var(--cta-ink);
  overflow: hidden;
}

.submit-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.14) 1px, transparent 0);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(110deg, transparent 5%, #000 55%, #000 100%);
  mask-image: linear-gradient(110deg, transparent 5%, #000 55%, #000 100%);
  opacity: 0.55;
  pointer-events: none;
}

.submit-copy,
.submit-form {
  position: relative;
  z-index: 1;
}

.eyebrow-light {
  color: rgba(246, 242, 231, 0.52);
}

.submit-copy h2 {
  margin-top: 18px;
  color: var(--cta-ink);
  font-size: clamp(30px, 3.5vw, 46px);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.045em;
}

.submit-copy > p {
  max-width: 420px;
  margin-top: 17px;
  color: rgba(246, 242, 231, 0.68);
  font-size: 13.5px;
  line-height: 1.8;
}

.submit-promise {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 17px;
  margin-top: 26px;
  color: rgba(246, 242, 231, 0.75);
  font-size: 10.5px;
  font-weight: 600;
}

.submit-promise span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.submit-promise .icon {
  width: 12px;
  height: 12px;
  color: var(--cta-accent);
  stroke-width: 2.2;
}

.submit-form {
  align-self: center;
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  color: rgba(246, 242, 231, 0.62);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.field label span {
  color: rgba(246, 242, 231, 0.35);
  font-weight: 500;
}

.field input {
  height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 9px;
  outline: 0;
  background: rgba(255, 255, 255, 0.055);
  color: var(--cta-ink);
  font-size: 12.5px;
  transition: border-color 0.2s, background-color 0.2s;
}

.field input::placeholder {
  color: rgba(246, 242, 231, 0.32);
}

.field input:focus {
  border-color: var(--cta-accent);
  background: rgba(255, 255, 255, 0.08);
}

.field input:user-invalid {
  border-color: #d98173;
}

.submit-btn {
  width: 100%;
  margin-top: 3px;
}

.form-note {
  color: rgba(246, 242, 231, 0.38);
  font-size: 10px;
  text-align: center;
}

.submit-spark {
  position: absolute;
  right: -40px;
  bottom: -65px;
  z-index: 0;
  width: 340px;
  height: 340px;
  fill: rgba(255, 255, 255, 0.035);
  pointer-events: none;
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 62px max(24px, calc((100vw - var(--page)) / 2)) 28px;
  border-top: 1px solid var(--line);
  background: var(--bg);
}

.footer-main {
  display: grid;
  grid-template-columns: 2.1fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-brand p {
  max-width: 280px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.8;
}

.footer-stamp {
  margin-top: 25px;
  color: var(--faint);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.footer-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.footer-col h3 {
  margin-bottom: 7px;
  color: var(--faint);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.footer-col a {
  color: var(--ink-2);
  font-size: 12px;
  transition: color 0.18s;
}

.footer-col a:hover {
  color: var(--brand);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 46px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 10px;
}

.footer-bottom > div {
  display: flex;
  align-items: center;
  gap: 20px;
}

.footer-bottom a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-weight: 600;
}

.footer-bottom a:hover {
  color: var(--brand);
}

.footer-bottom .icon {
  width: 11px;
  height: 11px;
}

/* ---------- Dialogs ---------- */

dialog {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
}

dialog::backdrop {
  background: rgba(12, 20, 16, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.tool-dialog {
  width: min(760px, calc(100vw - 32px));
  max-width: none;
  max-height: none;
  margin: auto;
}

.dialog-panel {
  position: relative;
  max-height: 88vh;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  animation: dialogIn 0.25s var(--ease);
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.dialog-hero {
  position: relative;
  height: 245px;
  overflow: hidden;
  background:
    radial-gradient(circle at 70% 20%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 55%),
    var(--bg-soft);
}

.dialog-hero > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dialog-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(12, 20, 16, 0.48) 100%);
  pointer-events: none;
}

.dialog-hero.is-fallback {
  display: grid;
  place-items: center;
}

.dialog-hero.is-fallback::after {
  display: none;
}

.dialog-fallback-mark {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0.95;
}

.dialog-fallback-mark img {
  width: 94px;
  height: 94px;
  object-fit: contain;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--logo-tile);
  box-shadow: var(--shadow-md);
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 4;
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-color: color-mix(in srgb, var(--line) 65%, transparent);
}

.dialog-body {
  padding: 24px 26px 26px;
}

.dialog-identity {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.dialog-logo {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--logo-tile);
}

.dialog-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.dialog-title-wrap {
  flex: 1;
  min-width: 0;
}

.dialog-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}

.dialog-title-row h2 {
  font-size: clamp(24px, 3.2vw, 31px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.dialog-cats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.dialog-cats span {
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 600;
}

.dialog-desc {
  margin-top: 22px;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.85;
}

.dialog-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--line);
  overflow: hidden;
}

.dialog-meta > div {
  min-width: 0;
  padding: 12px 14px;
  background: var(--surface);
}

.dialog-meta dt {
  color: var(--faint);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.09em;
}

.dialog-meta dd {
  margin: 4px 0 0;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.dialog-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 24px;
}

.dialog-actions .btn-primary {
  flex: 1;
}

.dialog-save {
  height: 46px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 700;
  transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}

.dialog-save .icon {
  width: 15px;
  height: 15px;
}

.dialog-save:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.dialog-save.is-saved {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.dialog-save.is-saved .icon {
  fill: currentColor;
}

.dialog-source {
  margin-top: 16px;
  color: var(--faint);
  font-size: 9.5px;
  line-height: 1.6;
}

.dialog-source a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Search dialog */

.search-dialog {
  width: min(720px, calc(100vw - 32px));
  max-width: none;
  margin: 8vh auto auto;
}

.search-panel {
  border: 1px solid var(--line);
  border-radius: 19px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: dialogIn 0.22s var(--ease);
}

.search-panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 17px 18px;
  border-bottom: 1px solid var(--line);
}

.search-panel-head > .icon {
  width: 20px;
  height: 20px;
  color: var(--muted);
}

.search-panel-head input {
  flex: 1;
  min-width: 0;
  height: 30px;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 17px;
  font-weight: 500;
}

.search-panel-head input::placeholder {
  color: var(--faint);
}

.search-panel-head .dialog-close {
  position: static;
  width: 32px;
  height: 32px;
  border-color: transparent;
  background: transparent;
}

.search-panel-body {
  max-height: min(55vh, 440px);
  overflow-y: auto;
  padding: 8px;
}

.search-help {
  padding: 12px 12px 8px;
  color: var(--faint);
  font-size: 11.5px;
}

.search-result-list {
  display: flex;
  flex-direction: column;
}

.search-result {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  border-radius: 9px;
  text-align: left;
  transition: background-color 0.15s;
}

.search-result:hover,
.search-result.is-active {
  background: var(--bg-soft);
}

.search-result .suggestion-logo {
  width: 34px;
  height: 34px;
}

.search-result-main {
  flex: 1;
  min-width: 0;
}

.search-result-main strong {
  display: block;
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.search-result-main span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-price {
  color: var(--faint);
  font-size: 9.5px;
  white-space: nowrap;
}

.search-empty {
  padding: 40px 20px;
  color: var(--muted);
  font-size: 12.5px;
  text-align: center;
}

.search-panel-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 9.5px;
}

.search-panel-foot kbd {
  margin-right: 3px;
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 120;
  max-width: calc(100vw - 40px);
  padding: 11px 17px;
  border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 0.25s, transform 0.25s var(--ease);
  box-shadow: var(--shadow-lg);
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Reveal & motion ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes popIn {
  from { opacity: 0; transform: translateY(-4px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes dialogIn {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes livePulse {
  0% { opacity: 0.8; transform: scale(0.5); }
  65%, 100% { opacity: 0; transform: scale(1.45); }
}

/* ---------- Responsive ---------- */

@media (max-width: 1180px) {
  .header-inner { gap: 18px; }
  .main-nav { margin-left: 0; }
  .main-nav a { padding-inline: 9px; }
  .main-nav a::after { left: 9px; right: 9px; }
  .search-trigger span:not(.icon) { display: none; }
  .search-trigger { padding: 0 9px; }
  .search-trigger kbd { display: none; }
  .brand-sub { display: none; }
  .hero-grid { gap: 34px; }
  .spotlight { width: 91%; }
  .stage-back { width: 78%; }
  .mini-board { width: 198px; }
}

@media (min-width: 1021px) and (max-width: 1180px) {
  .spotlight-issue { margin-right: 62px; }
}

@media (min-width: 721px) and (max-width: 820px) {
  .library-search { flex-basis: 100%; }
  .saved-filter { margin-left: auto; }
}

@media (max-width: 1020px) {
  .main-nav { display: none; }
  .menu-toggle { display: grid; }
  .mobile-menu {
    display: block;
    padding: 6px 24px 22px;
  }
  .mobile-menu[hidden] { display: none; }
  .mobile-menu nav {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--line);
  }
  .mobile-menu nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 2px;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
    font-weight: 700;
  }
  .mobile-menu nav a span {
    color: var(--faint);
    font-size: 10px;
    font-weight: 500;
  }
  .mobile-theme {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
  }
  .mobile-theme .icon { width: 16px; height: 16px; }

  .hero { padding-top: 54px; }
  .hero-grid { grid-template-columns: 1fr; gap: 50px; }
  .hero-copy { max-width: 720px; }
  .hero h1 { max-width: 700px; }
  .hero-lede { max-width: 600px; }
  .hero-stage { width: min(500px, 100%); min-height: 540px; margin: 0 auto; }
  .spotlight { width: 88%; }
  .stage-back { width: 80%; }
  .hero::before { right: -140px; }
  .hero::after { right: -80px; }

  .category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .collection-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .collection-card:last-child { grid-column: 1 / -1; min-height: 250px; }
  .news-panel { padding: 6px 22px; }
  .news-list { grid-template-columns: 1fr 1fr; column-gap: 22px; }
  .news-item { padding: 16px 0; }
  .news-item:nth-last-child(-n + 3) {
    border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  }
  .news-item:nth-last-child(-n + 2) { border-bottom: 0; }

  .submit-card { grid-template-columns: 1fr; gap: 32px; padding: 38px; }
  .submit-copy > p { max-width: 560px; }
  .submit-form { max-width: 560px; }
  .footer-main { grid-template-columns: 1.6fr 1fr 1fr; }
  .footer-col:last-child { grid-column: 1 / -1; flex-flow: row wrap; gap: 8px 18px; }
  .footer-col:last-child h3 { width: 100%; }
}

@media (max-width: 720px) {
  html { scroll-padding-top: 80px; }
  .header-inner { width: calc(100% - 32px); height: 68px; gap: 10px; }
  .brand-mark { width: 31px; height: 31px; border-radius: 9px; }
  .brand-mark svg { width: 21px; height: 21px; }
  .brand-name { font-size: 19px; }
  .header-submit { display: none; }
  .theme-toggle { display: none; }
  .menu-toggle { display: grid; }
  .search-trigger { width: 38px; justify-content: center; padding: 0; }
  .header-actions { gap: 7px; }
  .mobile-menu { padding-inline: 16px; }

  .hero { padding: 42px 0 54px; }
  .hero-grid { width: calc(100% - 32px); gap: 42px; }
  .hero-eyebrow { margin-bottom: 20px; }
  .hero h1 { font-size: clamp(42px, 12.2vw, 62px); letter-spacing: -0.06em; }
  .hero-lede { margin-top: 20px; font-size: 14.5px; line-height: 1.8; }
  .hero-search { height: 56px; margin-top: 26px; padding-left: 16px; border-radius: 14px; }
  .hero-search input { font-size: 13.5px; padding-inline: 11px; }
  .search-submit { width: 40px; height: 40px; border-radius: 10px; }
  .quick-links { gap: 4px; }
  .quick-links button { padding: 4px 7px; font-size: 10.5px; }
  .hero-stats { margin-top: 32px; padding-top: 19px; gap: 12px 8px; }
  .stat strong { font-size: 24px; }
  .stat span { font-size: 9.5px; }

  .hero-stage { min-height: 455px; }
  .stage-back { top: 27px; width: 84%; height: 365px; padding: 20px; }
  .stage-back p { font-size: 22px; }
  .spotlight { width: 93%; }
  .spotlight-media { height: 215px; }
  .spotlight-body { padding: 14px 16px; }
  .spotlight-head { gap: 10px; }
  .spotlight-logo { width: 39px; height: 39px; border-radius: 10px; padding: 6px; }
  .spotlight-head h2 { font-size: 18px; }
  .spotlight-head p { font-size: 11px; }
  .spotlight-foot { margin-top: 12px; padding-top: 11px; padding-right: 152px; }
  .spotlight-issue { margin-right: 48px; }
  .mini-board { width: 180px; padding: 12px; }
  .mini-item { padding: 7px 2px; }
  .mini-logo { width: 24px; height: 24px; }
  .mini-name { font-size: 10.5px; }
  .stamp { width: 82px; height: 82px; top: -11px; right: -6px; }
  .stamp text { font-size: 9.6px; }

  .section { padding: 62px 16px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 18px; margin-bottom: 26px; }
  .section-head h2 { font-size: 32px; }
  .section-sub { font-size: 13px; }
  .section-link { padding-bottom: 3px; }
  .section-note { padding: 0; }
  .mobile-break { display: block; }

  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .category-card { min-height: 118px; padding: 14px; border-radius: 13px; }
  .cat-icon { width: 33px; height: 33px; border-radius: 9px; }
  .cat-name { margin-top: 12px; font-size: 13.5px; }
  .cat-desc { display: none; }
  .cat-foot { padding-top: 8px; }

  .toolbar-row { gap: 7px; }
  .library-search { flex-basis: 100%; }
  .price-filter { order: 2; max-width: 100%; overflow-x: auto; }
  .price-filter button { padding-inline: 9px; font-size: 10.5px; }
  .sort-select { order: 3; flex: 1; }
  .saved-filter { order: 4; flex: 1; justify-content: center; }
  .category-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; margin-inline: -16px; padding-inline: 16px; scrollbar-width: none; }
  .category-chips::-webkit-scrollbar { display: none; }
  .chip { flex: 0 0 auto; }
  .results-row { font-size: 10.5px; }
  .tool-grid { grid-template-columns: 1fr; gap: 9px; }
  .tool-card { min-height: 205px; padding: 17px; }
  .tool-desc { font-size: 12px; }
  .load-more { width: 100%; }

  .collection-grid { grid-template-columns: 1fr; gap: 10px; }
  .collection-card, .collection-card:last-child { grid-column: auto; min-height: 244px; padding: 22px; }
  .collection-card h3 { margin-top: 28px; font-size: 25px; }
  .collection-card p { max-width: 270px; }

  .news-panel { padding: 4px 16px; }
  .news-list { grid-template-columns: 1fr; }
  .news-item:nth-last-child(-n + 2) {
    border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  }
  .news-item:last-child { border-bottom: 0; }
  .news-title { font-size: 12.5px; }
  .news-count { margin-bottom: 0; }

  .submit-section { padding: 58px 16px 64px; }
  .submit-card { padding: 26px 20px; border-radius: 20px; gap: 26px; }
  .submit-copy h2 { font-size: 31px; }
  .submit-copy > p { font-size: 12.5px; }
  .submit-form { padding: 18px; }
  .submit-spark { width: 220px; height: 220px; right: -55px; bottom: -50px; }

  .site-footer { padding: 46px 16px 24px; }
  .footer-main { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-col:last-child { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 12px; margin-top: 32px; }
  .footer-bottom > div { flex-wrap: wrap; gap: 12px; }

  .tool-dialog { width: calc(100vw - 20px); }
  .dialog-panel { max-height: 91vh; border-radius: 18px; }
  .dialog-hero { height: 180px; }
  .dialog-body { padding: 19px 17px 21px; }
  .dialog-logo { width: 48px; height: 48px; border-radius: 12px; padding: 8px; }
  .dialog-title-row h2 { font-size: 23px; }
  .dialog-desc { font-size: 13px; margin-top: 18px; }
  .dialog-meta { grid-template-columns: 1fr; }
  .dialog-actions { flex-wrap: wrap; }
  .dialog-actions .btn-primary { flex-basis: 100%; }
  .dialog-save { flex: 1; justify-content: center; }
  .search-dialog { width: calc(100vw - 20px); margin-top: 6vh; }
  .search-panel-head { padding: 13px 14px; }
  .search-panel-head input { font-size: 15px; }
  .search-panel-body { max-height: 56vh; }
}

@media (max-width: 420px) {
  .hero-stats { grid-template-columns: 1fr 1fr; row-gap: 16px; }
  .mini-board { display: none; }
  .stamp { display: none; }
  .spotlight-foot { padding-right: 0; }
  .hero-stage { min-height: 405px; }
  .stage-back { height: 325px; }
  .spotlight-media { height: 195px; }
  .spotlight-category { font-size: 9px; }
  .category-grid { grid-template-columns: 1fr 1fr; }
  .cat-name { font-size: 12.5px; }
  .price-filter { width: 100%; }
  .price-filter button { flex: 1; }
  .sort-select { flex-basis: 45%; }
  .saved-filter { flex-basis: 45%; }
  .footer-main { grid-template-columns: 1fr; }
  .footer-brand, .footer-col:last-child { grid-column: auto; }
}

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