/* =====================================================================
   軟體分享站 · 前台樣式
   無外部相依，字型使用系統內建繁體中文字族
   ===================================================================== */

/* ---------- 設計變數 ---------- */
:root {
  color-scheme: light;

  --bg:          #f5f7fa;
  --bg-soft:     #eef1f6;
  --surface:     #ffffff;
  --surface-2:   #f7f9fc;
  --surface-3:   #eef2f7;
  --border:      #e2e8f0;
  --border-2:    #cbd5e1;

  --text:        #0f172a;
  --text-2:      #64748b;
  --text-3:      #94a3b8;

  --brand:       #2563eb;
  --brand-2:     #4f46e5;
  --brand-ink:   #1e40af;
  --brand-soft:  #eff4ff;
  --accent:      #0ea5e9;

  --ok:          #059669;
  --ok-soft:     #ecfdf5;
  --warn:        #d97706;
  --danger:      #dc2626;

  --shadow-sm:   0 1px 2px rgba(15, 23, 42, .06);
  --shadow:      0 4px 16px -4px rgba(15, 23, 42, .10), 0 2px 6px -2px rgba(15, 23, 42, .06);
  --shadow-lg:   0 18px 40px -12px rgba(15, 23, 42, .18), 0 4px 12px -4px rgba(15, 23, 42, .08);

  --r-sm: 8px;
  --r:    12px;
  --r-lg: 18px;
  --r-xl: 24px;

  --w: 1200px;
  --ease: cubic-bezier(.22, .8, .3, 1);
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --bg:          #0a0e17;
  --bg-soft:     #0d121d;
  --surface:     #121a28;
  --surface-2:   #172033;
  --surface-3:   #1e293c;
  --border:      #24304a;
  --border-2:    #33415e;

  --text:        #e8eef8;
  --text-2:      #94a3b8;
  --text-3:      #64748b;

  --brand:       #60a5fa;
  --brand-2:     #818cf8;
  --brand-ink:   #93c5fd;
  --brand-soft:  #172554;
  --accent:      #38bdf8;

  --ok:          #34d399;
  --ok-soft:     #052e26;
  --warn:        #fbbf24;
  --danger:      #f87171;

  --shadow-sm:   0 1px 2px rgba(0, 0, 0, .4);
  --shadow:      0 4px 18px -4px rgba(0, 0, 0, .55);
  --shadow-lg:   0 20px 48px -14px rgba(0, 0, 0, .7);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC",
               "Noto Sans TC", "Microsoft JhengHei", "Hiragino Sans TC",
               "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { margin: 0; line-height: 1.35; font-weight: 700; letter-spacing: -.01em; }

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

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

.num { font-variant-numeric: tabular-nums; }

.wrap { width: 100%; max-width: var(--w); margin-inline: auto; padding-inline: 24px; }

/* ---------- 頁首 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 66px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -.02em;
  flex-shrink: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #fff;
  box-shadow: 0 4px 12px -3px color-mix(in srgb, var(--brand) 55%, transparent);
  flex-shrink: 0;
}
.brand-mark svg { width: 19px; height: 19px; }

.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-sub { font-size: 11px; font-weight: 500; color: var(--text-3); letter-spacing: .06em; }

.nav { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }

.nav a {
  padding: 8px 14px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  transition: background .18s var(--ease), color .18s var(--ease);
}
.nav a:hover { background: var(--surface-3); color: var(--text); }
.nav a.active { color: var(--brand); background: var(--brand-soft); }

.icon-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 10px;
  color: var(--text-2);
  cursor: pointer;
  transition: all .18s var(--ease);
}
.icon-btn:hover { color: var(--text); border-color: var(--border-2); transform: translateY(-1px); }
.icon-btn svg { width: 17px; height: 17px; }
:root[data-theme="dark"] .theme-icon-sun  { display: none; }
:root:not([data-theme="dark"]) .theme-icon-moon { display: none; }

/* ---------- 主視覺 ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 76px 0 64px;
  background:
    radial-gradient(1000px 420px at 15% -20%, color-mix(in srgb, var(--brand) 16%, transparent), transparent 62%),
    radial-gradient(760px 360px at 88% 0%, color-mix(in srgb, var(--brand-2) 13%, transparent), transparent 60%),
    var(--bg-soft);
  border-bottom: 1px solid var(--border);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(color-mix(in srgb, var(--text) 5%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--text) 5%, transparent) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(760px 380px at 50% 20%, #000 15%, transparent 78%);
  -webkit-mask-image: radial-gradient(760px 380px at 50% 20%, #000 15%, transparent 78%);
  pointer-events: none;
}

.hero-inner { position: relative; z-index: 1; max-width: 760px; }

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 8px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
  box-shadow: var(--shadow-sm);
  margin-bottom: 22px;
}
.hero-tag b {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
}

.hero h1 {
  font-size: clamp(30px, 4.6vw, 46px);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.25;
  margin-bottom: 18px;
}
.hero h1 .grad {
  background: linear-gradient(120deg, var(--brand) 10%, var(--brand-2) 55%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  margin: 0 0 32px;
  font-size: 16.5px;
  color: var(--text-2);
  max-width: 620px;
  line-height: 1.85;
}

.hero-stats { display: flex; flex-wrap: wrap; gap: 40px; }
.hero-stat b {
  display: block;
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.hero-stat span { font-size: 12.5px; color: var(--text-3); font-weight: 500; }

/* ---------- 搜尋與篩選 ---------- */
.toolbar {
  position: sticky;
  top: 66px;
  z-index: 40;
  padding: 18px 0;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s var(--ease);
}
.toolbar.stuck { border-bottom-color: var(--border); }

.toolbar-inner { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }

.search {
  position: relative;
  flex: 1 1 300px;
  min-width: 240px;
  max-width: 420px;
}
.search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  translate: 0 -50%;
  width: 17px;
  height: 17px;
  color: var(--text-3);
  pointer-events: none;
}
.search input {
  width: 100%;
  height: 44px;
  padding: 0 16px 0 42px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 14.5px;
  transition: all .18s var(--ease);
}
.search input::placeholder { color: var(--text-3); }
.search input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent);
}

.chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  white-space: nowrap;
  transition: all .18s var(--ease);
}
.chip:hover { border-color: var(--border-2); color: var(--text); }
.chip.active {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  border-color: transparent;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 12px -3px color-mix(in srgb, var(--brand) 50%, transparent);
}
.chip .n {
  font-size: 11.5px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.chip.active .n { background: rgba(255, 255, 255, .22); color: #fff; }

.sort-select {
  height: 36px;
  padding: 0 32px 0 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 13.5px;
  color: var(--text-2);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%2394a3b8' stroke-width='1.6'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 15px;
  margin-inline-start: auto;
}

/* ---------- 區塊標題 ---------- */
.section { padding: 40px 0 64px; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}
.section-head h2 { font-size: 21px; font-weight: 750; letter-spacing: -.02em; }
.section-head p { margin: 5px 0 0; font-size: 13.5px; color: var(--text-3); }

/* ---------- 軟體卡片 ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 18px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2), var(--accent));
  opacity: 0;
  transition: opacity .22s var(--ease);
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--brand) 34%, var(--border));
}
.card:hover::before { opacity: 1; }

.card-top { display: flex; gap: 15px; align-items: flex-start; margin-bottom: 15px; }

.card-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  flex-shrink: 0;
  object-fit: cover;
  background: var(--surface-3);
  border: 1px solid var(--border);
}
.card-icon.ph {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 14%, var(--surface-2)), var(--surface-2));
  color: var(--brand);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.02em;
  border-color: color-mix(in srgb, var(--brand) 18%, var(--border));
}

.card-title { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 5px; }
.card-title h3 {
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: -.015em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.card:hover .card-title h3 { color: var(--brand); }

.ver {
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--brand-soft);
  color: var(--brand-ink);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.card-cat { font-size: 12.5px; color: var(--text-3); }

.card-desc {
  font-size: 13.8px;
  color: var(--text-2);
  line-height: 1.75;
  margin: 0 0 18px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 48px;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding-top: 15px;
  border-top: 1px solid var(--border);
  margin-top: auto;
  font-size: 12.5px;
  color: var(--text-3);
}
.card-meta .m { display: inline-flex; align-items: center; gap: 5px; }
.card-meta svg { width: 14px; height: 14px; opacity: .8; }
.card-meta .dl { margin-inline-start: auto; font-weight: 650; color: var(--text-2); }

/* 平台徽章 */
.pf {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 7px;
  border: 1px solid transparent;
}
.pf-win     { background: #eff6ff; color: #1d4ed8; border-color: #dbeafe; }
.pf-mac     { background: #f8fafc; color: #475569; border-color: #e2e8f0; }
.pf-linux   { background: #fffbeb; color: #b45309; border-color: #fef3c7; }
.pf-android { background: #f0fdf4; color: #15803d; border-color: #dcfce7; }
.pf-ios     { background: #fdf4ff; color: #a21caf; border-color: #fae8ff; }
.pf-cross   { background: #f5f3ff; color: #6d28d9; border-color: #ede9fe; }

:root[data-theme="dark"] .pf-win     { background: #172554; color: #93c5fd; border-color: #1e3a8a; }
:root[data-theme="dark"] .pf-mac     { background: #1e293b; color: #cbd5e1; border-color: #334155; }
:root[data-theme="dark"] .pf-linux   { background: #422006; color: #fcd34d; border-color: #78350f; }
:root[data-theme="dark"] .pf-android { background: #052e16; color: #86efac; border-color: #14532d; }
:root[data-theme="dark"] .pf-ios     { background: #4a044e; color: #f0abfc; border-color: #701a75; }
:root[data-theme="dark"] .pf-cross   { background: #2e1065; color: #c4b5fd; border-color: #4c1d95; }

/* 精選標記 */
.featured-tag {
  position: absolute;
  top: 0;
  inset-inline-end: 0;
  padding: 4px 12px;
  border-end-start-radius: 12px;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
}

/* ---------- 按鈕 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 20px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all .18s var(--ease);
  white-space: nowrap;
}
.btn:hover { border-color: var(--border-2); background: var(--surface-2); }
.btn svg { width: 17px; height: 17px; }

.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 14px -4px color-mix(in srgb, var(--brand) 60%, transparent);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  filter: brightness(1.07);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -6px color-mix(in srgb, var(--brand) 65%, transparent);
}

.btn-lg { height: 50px; padding: 0 28px; font-size: 15.5px; border-radius: 12px; }
.btn-block { width: 100%; }

/* ---------- 詳細頁 ---------- */
.crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 22px 0;
  font-size: 13px;
  color: var(--text-3);
}
.crumb a:hover { color: var(--brand); }
.crumb svg { width: 13px; height: 13px; opacity: .6; }

.detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
  padding-bottom: 70px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
}

.detail-head { display: flex; gap: 22px; align-items: flex-start; margin-bottom: 26px; }

.detail-icon {
  width: 84px;
  height: 84px;
  border-radius: 20px;
  flex-shrink: 0;
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--surface-3);
}
.detail-icon.ph {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 15%, var(--surface-2)), var(--surface-2));
  color: var(--brand);
  font-size: 32px;
  font-weight: 800;
}

.detail-head h1 {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  letter-spacing: -.025em;
  margin-bottom: 10px;
}

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

.desc-body {
  font-size: 15px;
  line-height: 1.95;
  color: var(--text-2);
  white-space: pre-wrap;
  word-wrap: break-word;
}
.desc-body:empty::before { content: "此軟體尚未填寫詳細說明。"; color: var(--text-3); }

/* 側欄下載區 */
.dl-panel {
  position: sticky;
  top: 92px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: var(--shadow);
}

.dl-count {
  text-align: center;
  padding: 6px 0 20px;
}
.dl-count b {
  display: block;
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.15;
}
.dl-count span { font-size: 12.5px; color: var(--text-3); }

.spec-list { margin: 22px 0 0; border-top: 1px solid var(--border); padding-top: 6px; }
.spec {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 0;
  font-size: 13.5px;
  border-bottom: 1px solid var(--border);
}
.spec:last-child { border-bottom: 0; }
.spec dt { color: var(--text-3); flex-shrink: 0; }
.spec dd {
  margin: 0;
  font-weight: 600;
  text-align: end;
  word-break: break-all;
  font-variant-numeric: tabular-nums;
}

/* 固定網址顯示框 */
.permalink {
  margin-top: 18px;
  padding: 13px 14px;
  border-radius: var(--r);
  background: var(--surface-2);
  border: 1px dashed var(--border-2);
}
.permalink label {
  display: block;
  font-size: 11.5px;
  color: var(--text-3);
  font-weight: 600;
  letter-spacing: .04em;
  margin-bottom: 7px;
}
.permalink-row { display: flex; gap: 8px; align-items: center; }
.permalink code {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.copy-btn {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 8px;
  color: var(--text-2);
  cursor: pointer;
  transition: all .18s var(--ease);
}
.copy-btn:hover { color: var(--brand); border-color: var(--brand); }
.copy-btn svg { width: 14px; height: 14px; }
.copy-btn.done { color: var(--ok); border-color: var(--ok); }

/* 雜湊值 */
.hash-box {
  margin-top: 16px;
  font-size: 11.5px;
  color: var(--text-3);
  word-break: break-all;
  line-height: 1.7;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ---------- 空狀態 ---------- */
.empty {
  text-align: center;
  padding: 80px 24px;
  color: var(--text-3);
}
.empty svg { width: 52px; height: 52px; opacity: .35; margin: 0 auto 18px; }
.empty h3 { font-size: 17px; color: var(--text-2); margin-bottom: 7px; }
.empty p { margin: 0; font-size: 14px; }

/* ---------- 頁尾 ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 44px 0 34px;
  margin-top: auto;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 26px;
  flex-wrap: wrap;
  align-items: center;
}
.footer-brand { display: flex; align-items: center; gap: 11px; font-weight: 700; }
.footer-note { font-size: 12.5px; color: var(--text-3); line-height: 1.8; }
.footer-links { display: flex; gap: 22px; font-size: 13.5px; color: var(--text-2); }
.footer-links a:hover { color: var(--brand); }

body { display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1; }

/* ---------- 下載中轉頁 ---------- */
.dl-stage {
  min-height: 74vh;
  display: grid;
  place-items: center;
  padding: 50px 24px;
}
.dl-card {
  width: 100%;
  max-width: 520px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 44px 38px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.dl-anim {
  width: 66px;
  height: 66px;
  margin: 0 auto 24px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  box-shadow: 0 10px 26px -8px color-mix(in srgb, var(--brand) 65%, transparent);
  animation: bob 2.1s var(--ease) infinite;
}
.dl-anim svg { width: 30px; height: 30px; }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-7px); }
}
.dl-card h2 { font-size: 20px; margin-bottom: 10px; }
.dl-card p { color: var(--text-2); font-size: 14.5px; margin: 0 0 26px; }

/* ---------- 動畫 ---------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
.rise { animation: rise .5s var(--ease) both; }

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

/* ---------- 響應式 ---------- */
@media (max-width: 980px) {
  .detail { grid-template-columns: 1fr; }
  .dl-panel { position: static; }
}

@media (max-width: 760px) {
  .wrap { padding-inline: 18px; }
  .hero { padding: 52px 0 44px; }
  .hero-stats { gap: 28px; }
  .hero-stat b { font-size: 23px; }
  .nav a { padding: 8px 10px; font-size: 13.5px; }
  .brand-sub { display: none; }
  .grid { grid-template-columns: 1fr; }
  .toolbar { top: 66px; }
  .sort-select { margin-inline-start: 0; }
  .panel, .dl-card { padding: 22px; }
  .detail-head { gap: 16px; }
  .detail-icon { width: 64px; height: 64px; border-radius: 16px; font-size: 24px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 460px) {
  .header-inner { gap: 12px; }
  .nav a[data-hide-sm] { display: none; }
}
