/* The homepage owns its palette and layout. Shared site scripts still supply theme and data. */
body.home-page.home-page {
  --canvas: #f2f2f7;
  --surface: #fff;
  --surface-raised: #fff;
  --muted-surface: #ececf2;
  --ink: #12131a;
  --muted: #535767;
  --line: #171b2d1a;
  --blue: #005ac9;
  --blue-fill: #0064df;
  --blue-soft: #0067e014;
  --glass-solid: #f8f9fe;
  --glass-tint: #fafdffb8;
  --glass-transparency: 60%;
  --glass-material: var(--glass-solid);
  --glass-edge: #ffffffd9;
  --glass-shadow: 0 12px 32px #2734561c, inset 0 1px 1px #fff;
  --card-shadow: 0 5px 22px #242c5309;
  --hero-tint: #e9efff;
  --hero-line: #ffffffd9;
  --hero-light: #b9d3ff;
  --hero-bloom: #d5c1ff;
  --quick-tint: #f8faffb3;
  --tile-tint: #ffffff82;
  --motion: cubic-bezier(.22, .86, .32, 1);
  --bounce: cubic-bezier(.23, 1.24, .42, 1);
  --gutter: 32px;
  --max-width: 1160px;
  --theme-bg: var(--canvas);
  --theme-bg-muted: var(--muted-surface);
  --theme-bg-elevated: var(--surface);
  --theme-fg: var(--ink);
  --theme-fg-muted: var(--muted);
  --theme-border: var(--line);
  --theme-accent: var(--blue);
  --theme-accent-hover: var(--blue);
  --theme-accent-emphasis: var(--blue-fill);
  --theme-accent-muted: var(--blue-soft);
  margin: 0 !important;
  overflow: visible;
  min-height: 100vh;
  max-width: none;
  padding: 0 max(var(--gutter), env(safe-area-inset-right)) 40px max(var(--gutter), env(safe-area-inset-left)) !important;
  display: flow-root;
  background: var(--canvas) !important;
  color: var(--ink) !important;
  color-scheme: light;
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
html.theme-dark-boot body.home-page,
body.home-page.home-page.dark-theme {
  --canvas: #101116;
  --surface: #1c1e26;
  --surface-raised: #2a2d38;
  --muted-surface: #252732;
  --ink: #f5f6fd;
  --muted: #b2b7c9;
  --line: #e3e8ff20;
  --blue: #8cc5ff;
  --blue-fill: #0962d3;
  --blue-soft: #55aaff20;
  --glass-solid: #232632;
  --glass-tint: #242735cf;
  --glass-edge: #e0e9ff30;
  --glass-shadow: 0 12px 32px #0006, inset 0 1px 1px #ffffff19;
  --card-shadow: 0 5px 22px #0002;
  --hero-tint: #1a233b;
  --hero-line: #cddcff24;
  --hero-light: #243d76;
  --hero-bloom: #493768;
  --quick-tint: #212944ba;
  --tile-tint: #c3d3fc13;
  color-scheme: dark;
}

.home-page *, .home-page *::before, .home-page *::after { box-sizing: border-box; }
.home-page [hidden] { display: none !important; }
.home-page :is(h1, h2, h3, p) { margin: 0; padding: 0; }
.home-page :is(h1, h2, h3) { color: var(--ink); text-align: start; }
.home-page :is(a, button):focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.home-page[data-input-method="pointer"] :is(#colorful-font-btn, #font-popup-close):focus { outline: none; }
.home-page :is(.home-main, .home-footer, .home-topbar) { width: 100%; max-width: var(--max-width); margin-inline: auto; }
.home-page :is(#main-content, #directory, #services) { scroll-margin-top: 98px; }
.home-page a { text-decoration: none; }
.home-page button { font: inherit; cursor: pointer; }
.home-page .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.home-page .skip-link:focus {
  position: fixed;
  z-index: 20;
  top: 10px;
  left: 10px;
  padding: 12px 18px;
  border-radius: 30px;
  background: var(--surface);
  color: var(--blue);
}

.home-page .glass {
  border: 1px solid var(--glass-edge);
  background: var(--glass-material) !important;
  box-shadow: var(--glass-shadow);
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .home-page .glass {
    --glass-material: var(--glass-tint);
    -webkit-backdrop-filter: blur(24px) saturate(170%);
    backdrop-filter: blur(24px) saturate(170%);
  }
}

@supports (color: color-mix(in srgb, white, transparent)) {
  @supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
    .home-page .glass {
      --glass-material: color-mix(in srgb, var(--glass-solid) calc(100% - var(--glass-transparency)), transparent);
    }
  }
}

.home-page .home-topbar {
  position: sticky;
  z-index: 5;
  top: max(12px, env(safe-area-inset-top));
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 64px;
  gap: 12px;
  padding: 7px 9px 7px 13px;
  margin-top: max(18px, env(safe-area-inset-top));
  border-radius: 36px;
  transition: box-shadow .28s var(--motion);
}
.home-page .home-topbar.is-scrolled { box-shadow: var(--glass-shadow), 0 4px 12px #11172d18; }
.home-page :is(.home-brand, .footer-brand) {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-height: 44px;
  border-radius: 8px;
}
.home-page .brand-frame {
  position: relative;
  display: block;
  width: 120px;
  aspect-ratio: 403 / 137;
  overflow: hidden;
  border-radius: 8px;
}
/* The visible logo occupies x=58–461 and y=201–338 in the source image. */
.home-page .brand-frame img {
  position: absolute;
  top: -146.72%;
  left: -14.39%;
  width: 127.05%;
  max-width: none !important;
  height: auto;
}
.home-page .topbar-nav, .home-page .mobile-dock, .home-page .panel-tabs {
  --selection: 0;
  position: relative;
  display: grid;
  isolation: isolate;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 4px;
  border-radius: 999px;
}
.home-page .topbar-nav { background: var(--muted-surface); }
.home-page :is(.topbar-nav, .mobile-dock, .panel-tabs)::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 4px auto 4px 4px;
  width: calc((100% - 8px) / 3);
  border: 1px solid var(--glass-edge);
  border-radius: inherit;
  background: var(--surface-raised);
  box-shadow: 0 2px 7px #19264519, inset 0 1px 0 var(--glass-edge);
  transform: translateX(calc(var(--selection) * 100%));
  transition: transform .34s var(--bounce);
  pointer-events: none;
}
.home-page :is(.topbar-nav, .mobile-dock) a {
  display: grid;
  place-content: center;
  justify-items: center;
  min-height: 44px;
  padding-inline: 16px;
  border-radius: inherit;
  color: var(--muted) !important;
  font-size: 13px;
  font-weight: 680;
  white-space: nowrap;
}
.home-page :is(.topbar-nav, .mobile-dock) a[aria-current] { color: var(--blue) !important; }
.home-page .topbar-actions { display: flex; justify-content: flex-end; align-items: center; gap: 6px; }
.home-page #theme-control-slot { display: flex; }
.home-page .text-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 44px !important;
  padding: 0 14px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: var(--muted-surface) !important;
  color: var(--ink) !important;
  box-shadow: none !important;
  font-size: 13px !important;
  font-weight: 670;
  white-space: nowrap;
}
body.home-page.home-page #theme-toggle-button {
  position: relative !important;
  inset: auto !important;
  z-index: auto !important;
  background: var(--muted-surface) !important;
  color: var(--ink) !important;
  box-shadow: none !important;
  font-size: 0 !important;
}
.home-page #theme-toggle-button::before {
  content: "";
  position: absolute;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: currentColor;
  -webkit-mask-image: radial-gradient(circle at 72% 28%, transparent 6px, #000 6.5px);
  mask-image: radial-gradient(circle at 72% 28%, transparent 6px, #000 6.5px);
}
.home-page.dark-theme #theme-toggle-button::before {
  width: 9px;
  height: 9px;
  -webkit-mask-image: none;
  mask-image: none;
  box-shadow: 0 -9px 0 -3px, 0 9px 0 -3px, 9px 0 0 -3px, -9px 0 0 -3px,
    6px 6px 0 -3px, -6px 6px 0 -3px, 6px -6px 0 -3px, -6px -6px 0 -3px;
}
.home-page .mobile-dock { display: none; }

.home-page .home-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 5vw, 72px);
  min-height: 418px;
  margin-top: 21px;
  padding: clamp(28px, 5vw, 66px);
  border: 1px solid var(--hero-line);
  border-radius: 40px;
  background: radial-gradient(ellipse at 90% 9%, var(--hero-bloom), transparent 57%),
    radial-gradient(ellipse at 83% 95%, var(--hero-light), transparent 74%), var(--hero-tint);
  box-shadow: var(--card-shadow), inset 0 1px 0 var(--hero-line);
}
.home-page .home-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(137deg, transparent 53%, var(--glass-edge) 70%, transparent 93%);
  opacity: .48;
  pointer-events: none;
}
.home-page .hero-eyebrow {
  margin-bottom: 12px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
}
.home-page #home-title {
  font-size: clamp(41px, 5.85vw, 83px);
  font-weight: 790;
  line-height: 1.1;
  letter-spacing: -.035em;
}
.home-page .title-accent { color: var(--blue); }
.home-page .hero-description {
  margin-top: 16px;
  color: var(--muted);
  font-size: clamp(15px, 1.6vw, 18px);
  line-height: 1.65;
}
.home-page .hero-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 25px; }
.home-page :is(.primary-button, .secondary-button) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 45px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
}
.home-page .primary-button {
  background: var(--blue-fill);
  color: #fff !important;
  box-shadow: inset 0 1px 1px #ffffff40, 0 4px 12px #134ead29;
}
.home-page .secondary-button {
  border-color: var(--hero-line);
  background: var(--quick-tint);
  color: var(--blue) !important;
}
.home-page .hero-stats { display: flex; flex-wrap: wrap; gap: 12px 18px; margin-top: 28px; }
.home-page .hero-stat { border-inline-end: 1px solid var(--line); padding-inline-end: 18px; }
.home-page .hero-stat:last-child { border: 0; padding: 0; }
.home-page .hero-stat strong { display: block; font-size: 22px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.home-page .hero-stat span { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; }
.home-page .quick-start {
  padding: 19px;
  border: 1px solid var(--hero-line);
  border-radius: 31px;
  background: var(--quick-tint);
  box-shadow: 0 18px 42px #32447621, inset 0 1px 1px var(--hero-line);
}
.home-page .quick-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 3px 13px; }
.home-page #quick-title { font-size: 19px; font-weight: 750; }
.home-page .quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.home-page .quick-link {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 3px;
  min-width: 0;
  min-height: 80px;
  padding: 13px 14px;
  border: 1px solid var(--hero-line);
  border-radius: 20px;
  background: var(--tile-tint);
  color: var(--ink) !important;
}
.home-page .quick-link strong { font-size: 15px; }
.home-page .quick-link > span:last-child { color: var(--muted); font-size: 12px; }
.home-page .status-strip {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 10px;
  margin-top: 12px;
}
.home-page #info,
.home-page .site-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  min-height: 66px;
  margin: 0 !important;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 21px;
  background: var(--surface);
  color: var(--ink) !important;
}
.home-page .version-summary { min-width: 0; }
.home-page .info-label, .home-page .site-current { color: var(--muted); font-size: 11px; font-weight: 650; }
.home-page #versionInfo { margin: 0 !important; color: var(--ink); font-size: 13px; text-align: start !important; }
.home-page #versionInfo :is(span, a, strong) { font-size: inherit !important; }
.home-page #versionInfo #copyright-tooltip-version { color: var(--blue) !important; }
.home-page #info .feedback-container { flex: none; width: auto !important; margin: 0 !important; padding: 0; }
.home-page #info .feedback-row { gap: 4px !important; margin: 0 !important; padding: 0; }
.home-page #info .feedback-label { margin: 0 3px 0 0; color: var(--muted) !important; font-size: 11px; white-space: nowrap; }
.home-page #info .social-link {
  display: inline-grid !important;
  place-items: center;
  width: 32px !important;
  min-height: 44px;
  margin: 0 !important;
}
.home-page #info .social-icon {
  width: 26px !important;
  height: 26px !important;
  object-fit: contain;
}
.home-page .site-connectivity { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.home-page .site-card { flex-direction: column; align-items: start; justify-content: center; gap: 1px; }
.home-page .site-name { font-size: 13px; font-weight: 680; }
.home-page .site-current { margin-inline-start: 6px; }
.home-page .site-probe-result { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; color: var(--muted); font-size: 11px; }
.home-page .site-status { display: inline-flex; align-items: center; gap: 5px; }
.home-page .site-status[data-state="online"] { color: #007250; }
.home-page .site-status[data-state="offline"] { color: #b82c41; }
.home-page .site-status[data-state="timeout"] { color: #865800; }
.home-page.dark-theme .site-status[data-state="online"] { color: #70dfad; }
.home-page.dark-theme .site-status[data-state="offline"] { color: #ff9aaa; }
.home-page.dark-theme .site-status[data-state="timeout"] { color: #f4c570; }
.home-page .site-latency { font-variant-numeric: tabular-nums; }

.home-page :is(.navigation-section, .tools-section) { margin-top: clamp(34px, 5vw, 64px); }
.home-page .section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
  padding-inline: 3px;
}
.home-page .section-heading h2 {
  font-size: clamp(27px, 3.5vw, 42px);
  font-weight: 780;
  line-height: 1.18;
  letter-spacing: -.04em;
}
.home-page .section-description { margin-top: 6px; color: var(--muted); font-size: 14px; }
.home-page .directory-total {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 5px;
  min-height: 35px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.home-page .directory-total strong { color: var(--blue); font-variant-numeric: tabular-nums; }
.home-page .directory-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  align-items: start;
  gap: 13px;
}
.home-page .directory-group-wide { grid-row: span 2; }
.home-page .directory-group {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 25px;
  background: var(--surface);
  box-shadow: var(--card-shadow);
}
.home-page .directory-group-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 14px 15px;
  border-bottom: 1px solid var(--line);
}
.home-page .directory-group h3 { font-size: 16px; font-weight: 740; }
.home-page :is(.directory-group p, .group-count) { color: var(--muted); font-size: 12px; }
.home-page .group-count { white-space: nowrap; }
.home-page .directory-links { display: grid; gap: 1px; padding: 4px 7px; }
.home-page .directory-group-wide .directory-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
body.home-page.home-page .directory-link {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 7px 9px;
  border: 0;
  border-radius: 13px;
  background: transparent !important;
  color: var(--ink) !important;
  font-size: 14px;
  font-weight: 610;
  text-align: start;
}
.home-page .panel-tabs {
  width: min(100%, 430px);
  margin-bottom: 15px;
  border: 1px solid var(--line);
  background: var(--muted-surface);
}
body.home-page.home-page .panel-tab {
  min-width: 0;
  min-height: 44px;
  padding: 4px 6px;
  border: 0;
  border-radius: inherit;
  background: transparent !important;
  color: var(--muted) !important;
  font-size: 14px;
  font-weight: 690;
  box-shadow: none !important;
}
body.home-page.home-page .panel-tab[aria-selected="true"] { color: var(--blue) !important; }
body.home-page.home-page .panel-tab:hover { background: transparent !important; color: var(--blue) !important; }
body.home-page.home-page .panel-pane { background: transparent !important; }
.home-page .panel-pane:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; border-radius: 20px; }
.home-page .panel-pane.is-entering { animation: panel-in .25s var(--motion) both; }
@keyframes panel-in { from { opacity: .3; transform: translateY(6px); } }
.home-page :is(.shop-grid, .tools-grid, .exchange-btn-row) {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.home-page :is(.shop-card, .tool-card, .exchange-guide, .exchange-btn-col) {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--card-shadow);
}
.home-page :is(.shop-card, .tool-card) { display: flex; flex-direction: column; align-items: start; gap: 5px; }
.home-page :is(.shop-name, .tool-name) { color: var(--ink); font-size: 15px; font-weight: 720; }
.home-page :is(.shop-desc, .tool-desc) { flex: 1; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
body.home-page.home-page :is(.shop-detail-btn, .tool-tutorial-btn, .exchange-act-btn, .copy-code-btn) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 5px;
  padding: 5px 13px;
  border: 0;
  border-radius: 999px;
  background: var(--blue-soft) !important;
  color: var(--blue) !important;
  font-size: 13px;
  font-weight: 710;
  text-align: center;
}
.home-page .exchange-guide { margin-bottom: 12px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.home-page .exchange-guide strong { color: var(--ink); }
.home-page .exchange-btn-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.home-page .exchange-btn-col { display: flex; flex-direction: column; gap: 5px; }
body.home-page.home-page .exchange-bookmark-btn {
  margin: 0;
  background: #b42545 !important;
  color: #fff !important;
  cursor: grab;
}
body.home-page.home-page .exchange-bookmark-btn:active { cursor: grabbing; }

.home-page .home-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 36px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.home-page .footer-brand .brand-frame { width: 95px; border-radius: 6px; }
.home-page .home-footer > a:last-child { display: grid; align-items: center; min-height: 44px; color: var(--blue); white-space: nowrap; }

html:has(.home-dialog[open]) { overflow: hidden !important; scrollbar-gutter: stable; }
.home-page .home-dialog {
  --drag-offset: 0px;
  position: fixed;
  inset: 0;
  width: min(620px, calc(100% - 36px));
  max-width: none;
  max-height: min(85vh, 760px);
  max-height: min(85dvh, 760px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border-radius: 30px;
  color: var(--ink);
  transform: translateY(var(--drag-offset));
  transition: transform .22s var(--bounce);
}
body.home-page.home-page .home-dialog:is(#font-popup, #shop-popup, #tutorial-popup) {
  background: var(--glass-material) !important;
  border-color: var(--glass-edge) !important;
}
body.home-page.home-page .home-dialog .dialog-close { background: var(--muted-surface) !important; color: var(--ink) !important; }
.home-page .home-dialog[open] { display: flex; flex-direction: column; animation: dialog-in .27s var(--bounce) backwards; }
.home-page .home-dialog.is-closing { animation: dialog-out .2s ease-in both; }
.home-page .home-dialog.is-dragging { transition: none; }
.home-page .home-dialog::backdrop {
  background: #12172c66;
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  animation: scrim-in .24s ease both;
}
.home-page .home-dialog.is-closing::backdrop { animation: scrim-out .2s ease both; }
.home-page.dark-theme .home-dialog::backdrop { background: #0009; }
.home-page .dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: none;
  gap: 12px;
  min-height: 64px;
  padding: 10px 14px 10px 20px;
  border-bottom: 1px solid var(--line);
}
.home-page .dialog-head h2 { font-size: clamp(18px, 3vw, 23px); font-weight: 760; overflow-wrap: anywhere; }
.home-page .dialog-body {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 18px 20px 20px;
  overflow-wrap: anywhere;
}
.home-page .dialog-body img {
  display: block;
  max-width: 100%;
  max-height: 66vh;
  width: auto;
  height: auto;
  margin-inline: auto;
  object-fit: contain;
  border-radius: 14px;
}
.home-page #font-popup .dialog-body img { max-height: none; }
body.home-page.home-page #shop-popup-content { background: transparent !important; white-space: pre-wrap; margin-bottom: 8px; }
body.home-page.home-page #tutorial-readonly { background: transparent !important; color: var(--ink); font-size: 14px; line-height: 1.7; }
.home-page #tutorial-readonly a { color: var(--blue); text-decoration: underline; }
.home-page .tutorial-code-block { padding: 12px; border-radius: 12px; background: var(--muted-surface); font: 12px/1.6 ui-monospace, monospace; }
.home-page .copy-code-btn { display: flex; margin-inline-start: 8px; }
.home-page .sheet-grabber { display: none; }

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(16px) scale(.975); }
}
@keyframes dialog-out {
  to { opacity: 0; transform: translateY(calc(var(--drag-offset) + 16px)) scale(.975); }
}
@keyframes scrim-in { from { opacity: 0; } }
@keyframes scrim-out { to { opacity: 0; } }

.home-page :is(.text-button, #theme-toggle-button, .primary-button, .secondary-button, .quick-link,
  .directory-link, .site-card, .panel-tab, .shop-detail-btn, .tool-tutorial-btn, .exchange-act-btn, .mobile-dock a) {
  transition: scale .22s var(--bounce), filter .22s var(--motion), box-shadow .22s var(--motion);
}
.home-page :is(.text-button, #theme-toggle-button, .primary-button, .secondary-button, .quick-link,
  .directory-link, .site-card, .panel-tab, .shop-detail-btn, .tool-tutorial-btn, .exchange-act-btn, .mobile-dock a):active { scale: .97; }
@media (hover: hover) and (pointer: fine) {
  .home-page :is(.text-button, #theme-toggle-button, .primary-button, .secondary-button,
    .quick-link, .site-card, .shop-detail-btn, .tool-tutorial-btn, .exchange-act-btn):hover { filter: brightness(.96); }
  .home-page.dark-theme :is(.text-button, #theme-toggle-button, .primary-button, .secondary-button,
    .quick-link, .site-card, .shop-detail-btn, .tool-tutorial-btn, .exchange-act-btn):hover { filter: brightness(1.16); }
  body.home-page.home-page .directory-link:hover { background: var(--muted-surface) !important; }
}
@media (max-width: 925px) {
  .home-page .home-hero { min-height: 0; }
  .home-page .status-strip { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  body.home-page.home-page {
    --gutter: 15px;
    padding-bottom: calc(96px + env(safe-area-inset-bottom)) !important;
  }
  .home-page .home-topbar { grid-template-columns: minmax(0, 1fr) auto; min-height: 58px; margin-top: max(10px, env(safe-area-inset-top)); }
  .home-page .topbar-nav { display: none; }
  .home-page .mobile-dock {
    display: grid;
    position: fixed;
    z-index: 5;
    inset-inline: max(15px, env(safe-area-inset-left)) max(15px, env(safe-area-inset-right));
    bottom: max(10px, env(safe-area-inset-bottom));
    width: auto;
    max-width: 390px;
    margin-inline: auto;
    transition: max-width .32s var(--bounce);
  }
  .home-page .mobile-dock.is-compact { max-width: 304px; }
  .home-page .mobile-dock a { min-height: 44px; padding: 3px 7px; font-size: 13px; }
  .home-page .home-hero { grid-template-columns: minmax(0, 1fr); gap: 19px; margin-top: 12px; padding: 21px; border-radius: 30px; }
  .home-page #home-title { font-size: clamp(36px, 9.8vw, 60px); }
  .home-page .hero-description { margin-top: 9px; }
  .home-page .hero-actions { margin-top: 17px; }
  .home-page .hero-stats { margin-top: 19px; }
  .home-page .quick-start { padding: 12px; border-radius: 23px; }
  .home-page .quick-heading { margin-bottom: 8px; }
  .home-page .quick-link { min-height: 68px; padding: 10px; border-radius: 15px; }
  .home-page .directory-grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; }
  .home-page .directory-group-wide { grid-row: auto; }
  .home-page :is(.shop-grid, .tools-grid, .exchange-btn-row) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .home-page :is(.shop-card, .tool-card, .exchange-btn-col) { padding: 12px; }
  .home-page .home-dialog {
    inset: auto 0 0;
    width: 100%;
    max-height: 87vh;
    max-height: 87dvh;
    margin: 0;
    border-radius: 28px 28px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .home-page .home-dialog[open] { animation-name: sheet-in; }
  .home-page .home-dialog.is-closing { animation-name: sheet-out; }
  .home-page .sheet-grabber {
    position: relative;
    display: block;
    height: 20px;
    flex: none;
    cursor: grab;
    touch-action: none;
  }
  .home-page .sheet-grabber::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 50%;
    width: 35px;
    height: 4px;
    border-radius: 999px;
    background: var(--muted);
    opacity: .55;
    translate: -50% 0;
  }
  .home-page .dialog-head { min-height: 54px; padding-top: 0; }
  .home-page .home-brand .brand-frame { width: 106px; }
  @keyframes sheet-in { from { transform: translateY(100%); } }
  @keyframes sheet-out { to { transform: translateY(100%); } }
}
@media (max-width: 390px) {
  .home-page .home-hero { padding: 16px; }
  .home-page .hero-actions :is(.primary-button, .secondary-button) { padding-inline: 11px; font-size: 13px; }
  .home-page .directory-group-wide .directory-links { grid-template-columns: minmax(0, 1fr); }
  .home-page #info { flex-wrap: wrap; }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .home-page .glass { --glass-material: var(--glass-solid); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .home-page .home-dialog::backdrop { backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media (prefers-reduced-motion: no-preference) {
  html:has(body.home-page) { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
  html body.home-page *, html body.home-page *::before, html body.home-page *::after, .home-page .home-dialog::backdrop {
    animation: none !important;
    transition: none !important;
  }
  .home-page :active { scale: 1 !important; }
}
