/* NavPage front-end - iOS-style UI (frosted glass, soft radii, spring taps) */

:root {
  --accent: #0a84ff;
  --radius: 18px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;

  --bg: #f2f2f7;
  --surface: rgba(255, 255, 255, .58);
  --glass: rgba(255, 255, 255, .42);
  --glass-hi: rgba(255, 255, 255, .75);
  --surface-solid: #ffffff;
  --surface-2: rgba(120, 120, 128, .08);
  --text: #1c1c1e;
  --text-2: #3c3c43;
  --text-3: rgba(60, 60, 67, .55);
  --border: rgba(60, 60, 67, .12);
  --separator: rgba(60, 60, 67, .10);

  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 6px 20px rgba(0, 0, 0, .05);
  --shadow-hover: 0 2px 6px rgba(0, 0, 0, .06), 0 14px 34px rgba(0, 0, 0, .10);

  /* iOS spring feel */
  --spring: cubic-bezier(.32, .72, 0, 1);
  --spring-soft: cubic-bezier(.34, 1.56, .64, 1);
  --tap-dur: .34s;
}

html[data-theme="dark"] {
  --bg: #000000;
  --surface: rgba(28, 28, 30, .58);
  --glass: rgba(44, 44, 46, .44);
  --glass-hi: rgba(255, 255, 255, .10);
  --surface-solid: #1c1c1e;
  --surface-2: rgba(120, 120, 128, .24);
  --text: #f2f2f7;
  --text-2: rgba(235, 235, 245, .72);
  --text-3: rgba(235, 235, 245, .42);
  --border: rgba(235, 235, 245, .14);
  --separator: rgba(235, 235, 245, .10);
  --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 8px 24px rgba(0, 0, 0, .45);
  --shadow-hover: 0 2px 8px rgba(0, 0, 0, .55), 0 18px 40px rgba(0, 0, 0, .6);
}

@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] {
    --bg: #000000;
    --surface: rgba(28, 28, 30, .58);
  --glass: rgba(44, 44, 46, .44);
  --glass-hi: rgba(255, 255, 255, .10);
    --surface-solid: #1c1c1e;
    --surface-2: rgba(120, 120, 128, .24);
    --text: #f2f2f7;
    --text-2: rgba(235, 235, 245, .72);
    --text-3: rgba(235, 235, 245, .42);
    --border: rgba(235, 235, 245, .14);
    --separator: rgba(235, 235, 245, .10);
    --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 8px 24px rgba(0, 0, 0, .45);
    --shadow-hover: 0 2px 8px rgba(0, 0, 0, .55), 0 18px 40px rgba(0, 0, 0, .6);
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg);
  background-image: var(--bg-image, none);
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.font-serif { --font: Georgia, "Songti SC", "SimSun", serif; }
body.font-mono { --font: ui-monospace, "SF Mono", "JetBrains Mono", Consolas, monospace; }

/* Ambient light wash (very soft, iOS wallpaper vibe) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(1000px 520px at 8% -14%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 62%),
    radial-gradient(860px 460px at 100% 6%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 58%);
  pointer-events: none;
  z-index: 0;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 44px 22px 190px; /* clearance for bottom dock */
}

.ico-img { display: block; }

/* ---------------- Header ---------------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  padding: 4px 6px 4px 4px;
  margin-left: -4px;
  border-radius: 20px;
  transition: background .25s var(--spring), transform var(--tap-dur) var(--spring-soft);
}
.brand:hover { background: color-mix(in srgb, var(--glass-hi) 55%, transparent); }
.brand:active { transform: scale(.97); }

/* One coherent badge: same liquid-glass language as hero / cat-hero */
.brand-mark {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 17px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(150deg, var(--glass-hi), var(--glass) 58%, color-mix(in srgb, var(--accent) 10%, var(--glass)));
  backdrop-filter: saturate(190%) blur(20px);
  -webkit-backdrop-filter: saturate(190%) blur(20px);
  border: .5px solid color-mix(in srgb, var(--glass-hi) 75%, var(--border));
  box-shadow: 0 8px 24px rgba(0, 0, 0, .08), inset 0 1px 0 rgba(255, 255, 255, .55);
  transition: transform var(--tap-dur) var(--spring-soft), box-shadow .3s var(--spring);
}
.brand:hover .brand-mark { transform: scale(1.05); box-shadow: 0 12px 30px rgba(0, 0, 0, .12), inset 0 1px 0 rgba(255, 255, 255, .6); }

/* default: accent glyph tile */
.brand-mark:not(.brand-mark-img)::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #5e5ce6));
  opacity: .92;
}
.brand-mark:not(.brand-mark-img) img {
  position: relative;
  filter: brightness(0) invert(1);
}

/* uploaded logo: contained, no double-frame, soft inner wash */
.brand-mark-img .brand-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: none;
  padding: 9px;
  background: color-mix(in srgb, var(--surface-solid) 55%, transparent);
}

.brand-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.brand-text h1 {
  margin: 0;
  font-size: 23px;
  font-weight: 750;
  letter-spacing: -.5px;
  line-height: 1.2;
  white-space: nowrap;
}

.brand-text p {
  margin: 0;
  font-size: 13px;
  color: var(--text-3);
  font-weight: 450;
  letter-spacing: .1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------------- Search (frosted capsule) ---------------- */
.search-box {
  position: relative;
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 9px;
  background: linear-gradient(160deg, var(--glass-hi), var(--glass) 55%, var(--glass));
  backdrop-filter: saturate(200%) blur(28px);
  -webkit-backdrop-filter: saturate(200%) blur(28px);
  border: .5px solid color-mix(in srgb, var(--glass-hi) 70%, var(--border));
  border-radius: 999px;
  padding: 10px 15px;
  min-width: min(420px, 100%);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .08), inset 0 1px 0 rgba(255, 255, 255, .5);
  transition: box-shadow .3s var(--spring), border-color .3s var(--spring), transform .3s var(--spring);
}

.search-box:focus-within {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent), var(--shadow);
  transform: scale(1.012);
}

.search-icon {
  width: 18px; height: 18px;
  display: grid; place-items: center;
  opacity: .55;
  transition: opacity .25s, transform .35s var(--spring);
}
.search-box:focus-within .search-icon { opacity: 1; transform: scale(1.1); }

.search-box input[type="text"] {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 15.5px;
  font-family: inherit;
  min-width: 120px;
}
.search-box input::placeholder { color: var(--text-3); }

.search-box kbd {
  font-size: 10.5px;
  color: var(--text-3);
  background: var(--surface-2);
  border: .5px solid var(--border);
  border-radius: 7px;
  padding: 3px 7px;
  white-space: nowrap;
  font-family: inherit;
}

/* ---------------- Bottom dock (iOS tab bar) ---------------- */
.dock-wrap {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  padding: 0 14px calc(8px + env(safe-area-inset-bottom, 0px));
  pointer-events: none;
}

.dock {
  pointer-events: auto;
  max-width: 760px;
  margin: 0 auto 8px;
  background: linear-gradient(160deg, var(--glass-hi), var(--glass) 42%, var(--glass));
  backdrop-filter: saturate(200%) blur(30px);
  -webkit-backdrop-filter: saturate(200%) blur(30px);
  border: .5px solid color-mix(in srgb, var(--glass-hi) 70%, var(--border));
  border-radius: 26px;
  box-shadow: 0 10px 36px rgba(0, 0, 0, .16), inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -1px 0 rgba(255, 255, 255, .12);
  padding: 7px;
  animation: dock-in .55s var(--spring-soft) both;
}

@keyframes dock-in {
  from { opacity: 0; transform: translateY(24px) scale(.96); }
  to { opacity: 1; transform: none; }
}

.dock-scroll {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  padding: 2px;
}
.dock-scroll::-webkit-scrollbar { display: none; }

.dock-tab {
  position: relative;
  text-decoration: none;
  flex: 1 0 auto;
  min-width: 74px;
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 12px 7px;
  border: 0;
  border-radius: 20px;
  background: transparent;
  color: var(--text-3);
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .1px;
  cursor: pointer;
  transition: transform var(--tap-dur) var(--spring-soft),
              background .26s var(--spring),
              color .2s,
              box-shadow .3s var(--spring);
  -webkit-tap-highlight-color: transparent;
}

.dock-tab:active { transform: scale(.9); transition-duration: .1s; }

.dock-tab:hover { color: var(--text-2); background: color-mix(in srgb, var(--accent) 8%, transparent); }

.dock-tab.active {
  color: var(--accent);
  font-weight: 600;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}

.dock-ico {
  width: 26px;
  height: 26px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  transition: transform .38s var(--spring-soft);
}
.dock-tab.active .dock-ico { transform: translateY(-2px) scale(1.1); }
.dock-tab:hover .dock-ico { transform: scale(1.06); }

.dock-ico img { filter: none; opacity: .65; transition: opacity .2s; }
.dock-tab.active .dock-ico img { opacity: 1; }

.dock-swatch {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--dot, var(--accent));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--dot, var(--accent)) 26%, transparent);
  transition: transform .35s var(--spring-soft);
}
.dock-tab:hover .dock-swatch { transform: scale(1.15); }

.dock-emoji { font-size: 15px; line-height: 1; }

.dock-label {
  max-width: 86px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pill-dot { display: none; }

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

.cat-section { margin-bottom: 34px; }

.cat-head { margin-bottom: 13px; }

.cat-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.2px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cat-head h2 small {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-3);
}

.cat-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 13.5px;
  color: #fff;
  box-shadow: 0 3px 10px color-mix(in srgb, var(--accent) 22%, transparent);
  transition: transform .35s var(--spring-soft);
}
.cat-section:hover .cat-icon { transform: scale(1.08); }

.cat-dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .95); display: block; }

.cat-desc {
  margin: 5px 0 0 36px;
  font-size: 13px;
  color: var(--text-3);
}

/* ---------------- Link cards ---------------- */
.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(218px, 1fr));
  gap: 13px;
}

body[data-columns="3"] .link-grid { grid-template-columns: repeat(3, 1fr); }
body[data-columns="4"] .link-grid { grid-template-columns: repeat(4, 1fr); }
body[data-columns="5"] .link-grid { grid-template-columns: repeat(5, 1fr); }
body[data-columns="6"] .link-grid { grid-template-columns: repeat(6, 1fr); }

@media (max-width: 900px) {
  body[data-columns="5"] .link-grid,
  body[data-columns="6"] .link-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
  .page { padding: 26px 16px 176px; }
  .dock { border-radius: 24px; }
  .dock-tab { min-width: 66px; padding: 7px 9px 6px; }
  .site-header { flex-direction: column; align-items: stretch; gap: 16px; }
  .brand-mark { width: 48px; height: 48px; border-radius: 15px; }
  .brand-text h1 { font-size: 21px; }
  .search-box { min-width: 0; }
  .link-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }
}

.link-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  background: linear-gradient(155deg, color-mix(in srgb, var(--glass-hi) 85%, transparent), var(--glass) 60%);
  backdrop-filter: saturate(190%) blur(24px);
  -webkit-backdrop-filter: saturate(190%) blur(24px);
  border: .5px solid color-mix(in srgb, var(--glass-hi) 60%, var(--border));
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  box-shadow: 0 6px 22px rgba(0, 0, 0, .07), inset 0 1px 0 rgba(255, 255, 255, .45);
  transform: translateZ(0);
  transition:
    transform var(--tap-dur) var(--spring-soft),
    box-shadow .3s var(--spring),
    border-color .25s,
    background .25s;
  overflow: hidden;
}

.link-card:hover {
  transform: translateY(-4px) scale(1.015);
  box-shadow: var(--shadow-hover);
  border-color: color-mix(in srgb, var(--accent) 32%, transparent);
}

/* iOS press: quick squash then spring back */
.link-card:active {
  transform: scale(.955);
  transition-duration: .1s;
  box-shadow: var(--shadow);
}

body.card-flat .link-card { box-shadow: none; background: var(--surface-2); backdrop-filter: blur(10px); }
body.card-flat .link-card:hover { background: var(--surface); box-shadow: var(--shadow); }

.link-icon {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface-solid));
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--accent);
  overflow: hidden;
  font-size: 15px;
  transition: transform .35s var(--spring-soft);
}
.link-card:hover .link-icon { transform: scale(1.07); }

.link-icon img { width: 22px; height: 22px; object-fit: contain; display: block; }

.link-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }

.link-title {
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-desc {
  font-size: 12px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-arrow {
  margin-left: auto;
  width: 15px; height: 15px;
  opacity: 0;
  transform: translate(-5px, 5px) scale(.7);
  transition: all .32s var(--spring-soft);
}

.link-card:hover .link-arrow { opacity: 1; transform: none; }
.link-arrow img { filter: none; opacity: .6; }

.link-card.dim { opacity: .3; filter: grayscale(.5); }

/* ---------------- Search suggestions ---------------- */
.suggest {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--surface);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border: .5px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-hover);
  overflow: hidden;
  z-index: 50;
  max-height: 340px;
  overflow-y: auto;
  transform-origin: top center;
  animation: pop-in .26s var(--spring-soft);
}

@keyframes pop-in {
  from { opacity: 0; transform: translateY(-6px) scale(.97); }
  to { opacity: 1; transform: none; }
}

.suggest-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
  border-bottom: .5px solid var(--separator);
  transition: background .18s;
}

.suggest-item:last-child { border-bottom: 0; }
.suggest-item:hover, .suggest-item.active { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.suggest-item img.fav { width: 18px; height: 18px; }
.suggest-item .meta { margin-left: auto; font-size: 12px; color: var(--text-3); }
.suggest-item mark { background: color-mix(in srgb, var(--accent) 24%, transparent); color: inherit; border-radius: 4px; padding: 0 2px; }

/* ---------------- Empty / no-result ---------------- */
.no-result, .empty {
  text-align: center;
  color: var(--text-3);
  padding: 54px 0;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.no-result img, .empty img { opacity: .5; animation: floaty 3.2s ease-in-out infinite; }

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.empty .btn { margin-top: 4px; }

/* ---------------- Buttons (iOS pill) ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 999px;
  border: .5px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--tap-dur) var(--spring-soft),
              background .22s,
              color .2s,
              border-color .2s,
              box-shadow .25s;
  will-change: transform;
}

.btn:hover {
  background: color-mix(in srgb, var(--accent) 10%, var(--surface-2));
  border-color: color-mix(in srgb, var(--accent) 34%, transparent);
}

.btn:active { transform: scale(.94); transition-duration: .09s; }

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 34%, transparent);
}
.btn.primary:hover { filter: brightness(1.06); color: #fff; }
.btn img { filter: none; }
.btn.primary img { filter: brightness(0) invert(1); }

/* ---------------- Notice bar (liquid glass) ---------------- */
.notice-bar {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  border-radius: 20px;
  background: linear-gradient(150deg, var(--glass-hi), var(--glass) 58%);
  backdrop-filter: saturate(200%) blur(28px);
  -webkit-backdrop-filter: saturate(200%) blur(28px);
  border: .5px solid color-mix(in srgb, var(--glass-hi) 70%, var(--border));
  box-shadow: 0 8px 26px rgba(0, 0, 0, .07), inset 0 1px 0 rgba(255, 255, 255, .5);
  overflow: hidden;
  animation: rise .5s var(--spring) both;
}

.notice-bar::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--n-color, var(--accent));
  border-radius: 4px 0 0 4px;
}

.notice-bar.notice-info    { --n-color: var(--accent); }
.notice-bar.notice-success { --n-color: #30d158; }
.notice-bar.notice-warning { --n-color: #ff9f0a; }
html[data-theme="dark"] .notice-bar.notice-success { --n-color: #32d74b; }

.notice-ico {
  flex: 0 0 auto;
  width: 32px; height: 32px;
  border-radius: 11px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--n-color, var(--accent)) 18%, transparent);
  margin-top: 1px;
}

.notice-body { flex: 1; min-width: 0; }
.notice-body strong {
  display: block;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -.2px;
  color: var(--text);
  margin-bottom: 3px;
}
.notice-body p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-2);
}

.notice-close {
  flex: 0 0 auto;
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-3);
  cursor: pointer;
  transition: transform var(--tap-dur) var(--spring-soft), background .2s, opacity .2s;
}
.notice-close:hover { background: color-mix(in srgb, var(--accent) 14%, var(--surface-2)); }
.notice-close:active { transform: scale(.86); }
.notice-close img { opacity: .7; }

.notice-bar.closing {
  opacity: 0;
  transform: translateY(-8px) scale(.98);
  transition: opacity .3s var(--spring), transform .3s var(--spring);
}

/* ---------------- Hero (dynamic intro, no buttons) ---------------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 30px 30px;
  margin-bottom: 26px;
  border-radius: 26px;
  background: linear-gradient(150deg, var(--glass-hi), var(--glass) 55%, color-mix(in srgb, var(--accent) 7%, var(--glass)));
  backdrop-filter: saturate(200%) blur(30px);
  -webkit-backdrop-filter: saturate(200%) blur(30px);
  border: .5px solid color-mix(in srgb, var(--glass-hi) 70%, var(--border));
  box-shadow: 0 12px 40px rgba(0, 0, 0, .08), inset 0 1px 0 rgba(255, 255, 255, .55);
  overflow: hidden;
  animation: rise .55s var(--spring) both;
}

.hero-copy { position: relative; z-index: 2; max-width: 640px; }

.hero-title {
  margin: 0 0 10px;
  font-size: clamp(22px, 3.4vw, 30px);
  font-weight: 750;
  letter-spacing: -.6px;
  line-height: 1.25;
  background: linear-gradient(120deg, var(--text), color-mix(in srgb, var(--accent) 72%, var(--text)));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero-text {
  margin: 0 0 16px;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--text-2);
}

.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 550;
  color: var(--text-2);
  background: color-mix(in srgb, var(--surface-solid) 55%, transparent);
  border: .5px solid var(--border);
  transition: transform var(--tap-dur) var(--spring-soft), background .22s;
}
.chip:hover { transform: translateY(-2px); background: color-mix(in srgb, var(--surface-solid) 80%, transparent); }
.chip img { opacity: .7; }
.chip-accent {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 13%, transparent);
  border-color: color-mix(in srgb, var(--accent) 32%, transparent);
}
.chip-accent img { opacity: 1; }

/* floating orbs (dynamic, decorative) */
.hero-art { position: absolute; right: -40px; top: -50px; width: 320px; height: 320px; z-index: 1; pointer-events: none; }

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  opacity: .8;
  animation: orb-float 7s ease-in-out infinite;
}
.orb-a {
  width: 150px; height: 150px;
  right: 30px; top: 40px;
  background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--accent) 70%, #fff), color-mix(in srgb, var(--accent) 25%, transparent) 70%);
}
.orb-b {
  width: 96px; height: 96px;
  right: 140px; top: 130px;
  background: radial-gradient(circle at 35% 35%, #64d2ff, color-mix(in srgb, #64d2ff 25%, transparent) 72%);
  animation-delay: -2.2s;
}
.orb-c {
  width: 64px; height: 64px;
  right: 10px; top: 180px;
  background: radial-gradient(circle at 40% 40%, #bf5af2, color-mix(in srgb, #bf5af2 25%, transparent) 75%);
  animation-delay: -4.1s;
}

@keyframes orb-float {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-14px, 18px, 0) scale(1.06); }
}

@media (max-width: 720px) {
  .hero { padding: 24px 20px; }
  .hero-art { opacity: .5; right: -90px; }
  .notice-body p { font-size: 13px; }
}

/* ---------------- Home page (notice + intro only) ---------------- */
.hero-page {
  display: block;
  padding: 38px 34px 32px;
  margin-top: 8px;
}

.hero-page .hero-copy { max-width: 780px; }

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .3px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 13%, transparent);
  border: .5px solid color-mix(in srgb, var(--accent) 30%, transparent);
  margin-bottom: 14px;
}

.hero-page .hero-title { font-size: clamp(26px, 4vw, 36px); margin-bottom: 12px; }
.hero-page .hero-text { font-size: 15px; max-width: 640px; margin-bottom: 24px; }

/* category entry cards on home */
.home-cats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.home-cat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 15px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface-solid) 62%, transparent);
  border: .5px solid color-mix(in srgb, var(--glass-hi) 60%, var(--border));
  box-shadow: 0 6px 20px rgba(0, 0, 0, .06), inset 0 1px 0 rgba(255, 255, 255, .5);
  text-decoration: none;
  color: inherit;
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  transition: transform var(--tap-dur) var(--spring-soft),
              box-shadow .3s var(--spring),
              border-color .22s;
}
.home-cat:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .10), inset 0 1px 0 rgba(255, 255, 255, .55);
  border-color: color-mix(in srgb, var(--accent) 36%, transparent);
}
.home-cat:active { transform: scale(.96); transition-duration: .1s; }

.home-cat-ico {
  width: 36px; height: 36px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--dot, var(--accent)) 16%, transparent);
  flex: 0 0 auto;
  transition: transform .35s var(--spring-soft);
}
.home-cat:hover .home-cat-ico { transform: scale(1.1) rotate(-4deg); }

.home-cat-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.home-cat-body strong { font-size: 14.5px; font-weight: 650; letter-spacing: -.2px; }
.home-cat-body small {
  font-size: 12px; color: var(--text-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.home-cat-arrow {
  opacity: .35;
  transform: rotate(-90deg);
  transition: transform .32s var(--spring-soft), opacity .2s;
}
.home-cat:hover .home-cat-arrow { opacity: .9; transform: rotate(-90deg) translateX(3px); }

/* ---------------- Category page hero ---------------- */
.cat-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 24px;
  margin-bottom: 22px;
  border-radius: 24px;
  background: linear-gradient(150deg, var(--glass-hi), var(--glass) 55%, color-mix(in srgb, var(--cat, var(--accent)) 9%, var(--glass)));
  backdrop-filter: saturate(200%) blur(30px);
  -webkit-backdrop-filter: saturate(200%) blur(30px);
  border: .5px solid color-mix(in srgb, var(--glass-hi) 70%, var(--border));
  box-shadow: 0 10px 34px rgba(0, 0, 0, .08), inset 0 1px 0 rgba(255, 255, 255, .55);
  animation: rise .5s var(--spring) both;
}

.cat-hero-ico {
  width: 48px; height: 48px;
  border-radius: 15px;
  display: grid; place-items: center;
  color: #fff;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--cat, var(--accent)) 42%, transparent);
  flex: 0 0 auto;
}

.cat-hero-copy { flex: 1; min-width: 0; }
.cat-hero-copy h2 {
  margin: 0;
  font-size: 21px;
  font-weight: 750;
  letter-spacing: -.4px;
}
.cat-hero-copy p { margin: 4px 0 0; font-size: 13px; color: var(--text-3); }

.cat-hero-count {
  flex: 0 0 auto;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
  padding: 6px 14px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-solid) 60%, transparent);
  border: .5px solid var(--border);
}

@media (max-width: 560px) {
  .hero-page { padding: 28px 20px 24px; }
  .home-cats { grid-template-columns: 1fr; }
  .cat-hero { padding: 18px 18px; }
  .cat-hero-count { display: none; }
}

/* ---------------- Footer (pure transparent, never blocks) ---------------- */
.site-footer {
  pointer-events: none; /* never intercept clicks meant for the dock */
  max-width: 760px;
  margin: 8px auto 0;
  padding: 4px 12px;
  text-align: center;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.site-footer p {
  margin: 0;
  font-size: 11.5px;
  color: var(--text-3);
  text-shadow: 0 1px 8px color-mix(in srgb, var(--bg) 70%, transparent);
}

.site-footer a {
  pointer-events: auto;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: opacity .2s;
}
.site-footer a:hover { opacity: .72; }

/* Reveal-on-load: soft staggered entrance */
.cat-section { animation: rise .5s var(--spring) both; }
.cat-section:nth-child(1) { animation-delay: .03s; }
.cat-section:nth-child(2) { animation-delay: .1s; }
.cat-section:nth-child(3) { animation-delay: .17s; }
.cat-section:nth-child(4) { animation-delay: .24s; }
.cat-section:nth-child(5) { animation-delay: .31s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
