* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--background); }
body { margin: 0; background: var(--background); color: var(--foreground); font: 14px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
h1, h2, p { margin: 0; }

.skip-link { position: fixed; top: -80px; left: 20px; z-index: 50; padding: 10px 14px; background: var(--popover); color: var(--popover-foreground); border: 1px solid var(--border); border-radius: var(--radius-md); }
.skip-link:focus { top: 12px; }

/* 顶栏：shadcn 站点壳样式（sticky + 细边 + 背景模糊） */
.site-header { position: sticky; top: 0; z-index: 40; height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 40px; border-bottom: 1px solid var(--border); background: color-mix(in oklab, var(--background) 85%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 600; letter-spacing: -.2px; }
.brand img { border-radius: var(--radius-sm); }
.brand-caption { margin-left: 12px; padding-left: 20px; border-left: 1px solid var(--border); font-size: 12px; font-weight: 400; color: var(--muted-foreground); }
.header-note { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted-foreground); }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }

.home { max-width: 1200px; padding: 0 40px; margin: 0 auto; }
.intro { padding: 72px 0 56px; }
.eyebrow { font: 11px/1.5 ui-monospace, SFMono-Regular, monospace; letter-spacing: 1.8px; color: var(--muted-foreground); }
.intro h1 { margin-top: 0; font-size: 40px; line-height: 1.3; letter-spacing: -.02em; font-weight: 600; }
.intro-copy { margin-top: 16px; color: var(--muted-foreground); font-size: 15px; line-height: 1.7; }

.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.section-heading h2 { font-size: 14px; font-weight: 600; letter-spacing: -.01em; }
.section-heading > span { color: var(--muted-foreground); font-size: 12px; }
.count { display: inline-flex; align-items: center; margin-left: 8px; padding: 1px 8px; border: 1px solid var(--border); border-radius: 999px; font: 11px ui-monospace, monospace; color: var(--muted-foreground); }

/* 工具卡片：三列网格，无框竖向卡片（封面圆角浮于底色，文字直接在下方） */
.tool-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 44px 20px; margin-top: 24px; }
.tool-card { display: flex; flex-direction: column; padding: 0; }
.tool-art { width: 100%; aspect-ratio: 4 / 3; background: var(--muted); border-radius: var(--radius-xl); display: grid; place-items: center; color: var(--primary); overflow: hidden; }
.tool-art pre { margin: 0; font: 11px/1.25 ui-monospace, SFMono-Regular, monospace; letter-spacing: 1px; color: var(--muted-foreground); }
.tool-art img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 200ms ease-out; }
.tool-card:hover .tool-art img { transform: scale(1.02); }
.tool-card > div { padding: 16px 2px 0; }
.tool-card h3 { margin: 0; font-size: 15px; font-weight: 500; letter-spacing: -.01em; }
.tool-card p { color: var(--muted-foreground); margin-top: 6px; line-height: 1.7; font-size: 13px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; color: var(--muted-foreground); font-size: 12px; }
.tool-card .tags { margin-top: 8px; }
.tag { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1px 8px; font-size: 12px; line-height: 1.6; }
.card-action { display: none; }

.site-footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 96px; padding: 24px 0 32px; color: var(--muted-foreground); font-size: 12px; }

/* 按钮：shadcn Button —— h-9 / radius-md / text-sm / font-medium */
.button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 36px; padding: 0 16px; border: 1px solid var(--input); border-radius: var(--radius-md); background: transparent; color: var(--foreground); font-size: 14px; font-weight: 500; white-space: nowrap; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: background 150ms ease, border-color 150ms ease; }
.button:hover { background: var(--hover); color: var(--hover-foreground); }
.button-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-foreground); }
.button-primary:hover { background: oklch(0.85 0 0); border-color: transparent; color: var(--primary-foreground); }

.notice { color: var(--muted-foreground); padding: 36px 0; }

/* 详情页 */
.detail { padding: 0 24px 20px; }
.detail-toolbar { min-height: 64px; display: flex; align-items: center; gap: 20px; }
.back-link { display: inline-flex; gap: 8px; align-items: center; min-height: 36px; padding: 0 12px; margin-left: -12px; border-radius: var(--radius-md); color: var(--muted-foreground); font-size: 14px; white-space: nowrap; transition: background 150ms ease, color 150ms ease; }
.back-link:hover { background: var(--hover); color: var(--hover-foreground); }
.detail-name { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; flex: 1; }
.detail-name h1 { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.version { font: 11px ui-monospace, monospace; color: var(--muted-foreground); border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px; }
.detail-summary { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; margin-bottom: 16px; color: var(--muted-foreground); font-size: 13px; }
.frame-region { position: relative; height: calc(100dvh - 200px); min-height: 480px; border: 1px solid var(--border); border-radius: var(--radius-xl); overflow: hidden; background: var(--card); box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.tool-frame { display: block; width: 100%; height: 100%; border: 0; }
.frame-status { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 18px; color: var(--muted-foreground); text-align: center; padding: 24px; }

.not-found { max-width: 720px; margin: 100px auto; padding: 24px; }
.not-found h1 { font-size: 28px; margin: 24px 0 16px; letter-spacing: -.02em; }
.not-found > p:not(.eyebrow) { color: var(--muted-foreground); margin-bottom: 32px; }

@media (min-width: 1500px) { .detail { max-width: 1800px; margin: auto; padding: 0 48px 24px; } }
@media (max-width: 1100px) {
  .tool-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .site-header { height: 56px; padding: 0 20px; }
  .brand-caption { display: none; }
  .home { padding: 0 20px; }
  .intro { padding: 48px 0 40px; }
  .intro h1 { font-size: 30px; }
  .tool-list { grid-template-columns: 1fr; gap: 16px; }
  .site-footer { margin-top: 64px; }
  .detail { padding: 0 12px 12px; }
  .detail-toolbar { gap: 8px; flex-wrap: wrap; padding: 12px 0; min-height: 0; }
  .back-link { font-size: 13px; }
  .detail-name { min-width: 120px; }
  .detail-name h1 { font-size: 16px; }
  .detail-name .version { display: none; }
  .detail-toolbar .button { font-size: 13px; min-height: 32px; padding: 0 12px; }
  .detail-summary { flex-direction: column; gap: 10px; }
  .detail-summary .tags { display: none; }
  .frame-region { height: calc(100dvh - 200px); min-height: 500px; }
}
@media (max-width: 430px) {
  .section-heading > span { font-size: 11px; }
  .site-footer { flex-direction: column; gap: 8px; }
  .eyebrow { letter-spacing: .8px; font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
