* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text); font-family: var(--font-sans); font-size: 14px; -webkit-font-smoothing: antialiased; }
body.dialog-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; }
img { display: block; max-width: 100%; }
svg { width: 18px; height: 18px; flex: 0 0 auto; }
[hidden] { display: none !important; }
::selection { background: var(--accent-soft); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.skip-link { position: fixed; z-index: 100; top: 10px; left: 12px; padding: 10px 14px; border-radius: var(--radius); background: var(--text); color: #fff; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }

.site-header { position: sticky; z-index: 30; top: 0; border-bottom: 1px solid var(--border); background: rgba(243, 244, 245, .96); }
.header-inner { display: flex; align-items: center; gap: 24px; width: min(1240px, calc(100% - 48px)); min-height: 72px; margin: 0 auto; }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand img { width: 40px; height: 40px; border: 1px solid var(--border); border-radius: var(--radius); object-fit: cover; }
.brand > span { display: grid; gap: 3px; }
.brand strong { font-size: 15px; font-weight: 650; letter-spacing: .02em; }
.brand small { color: var(--muted); font: 9px/1 var(--font-mono); letter-spacing: .14em; }
.brand { flex: 0 0 auto; }
.community-link { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; min-height: 34px; margin-left: auto; padding: 0 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--sub); font-size: 11px; white-space: nowrap; transition: border-color 150ms, color 150ms; }
.community-link strong { color: var(--text); font: 500 11px var(--font-mono); }
.community-link:hover { border-color: var(--border-strong); color: var(--text); }
.site-header .search-box { flex: 0 1 330px; height: 42px; margin-left: 0; padding: 0 13px; box-shadow: none; }
.site-header .search-box > svg { width: 17px; height: 17px; }
.site-header .search-box input { font-size: 13px; }

.workspace { display: block; width: min(1240px, calc(100% - 48px)); min-height: calc(100svh - 145px); margin: 0 auto; padding: 40px 0 72px; }
.category-bar { display: flex; align-items: center; gap: 12px; padding: 7px 10px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.category-bar-label { display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; padding: 0 4px; color: var(--sub); font-size: 11px; white-space: nowrap; }
.category-bar-label > span { color: var(--muted); font: 11px var(--font-mono); }
.category-list { display: flex; flex: 1; gap: 6px; padding: 1px; overflow-x: auto; scrollbar-width: thin; }
.category-button { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; min-height: 34px; padding: 0 13px; border: 1px solid transparent; border-radius: 999px; background: transparent; color: var(--sub); font-size: 12px; white-space: nowrap; transition: background-color 150ms, color 150ms; }
.category-button > span:last-child { color: var(--muted); font: 10px var(--font-mono); }
.category-button:hover { background: var(--surface-subtle); color: var(--text); }
.category-button.is-active { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.category-button.is-active > span:last-child { color: var(--on-accent); }
.category-button.is-active:focus-visible { outline-color: var(--text); }

.catalog { min-width: 0; }
.catalog-heading { margin-bottom: 28px; animation: enter-up 360ms var(--ease) both; }
.eyebrow { margin: 0 0 12px; color: var(--muted); font: 10px/1.2 var(--font-mono); letter-spacing: .16em; }
.catalog-heading h1 { margin: 0; font-size: clamp(28px, 3.2vw, 40px); font-weight: 650; line-height: 1.3; letter-spacing: -.035em; }
.catalog-heading > p:last-child { margin: 13px 0 0; color: var(--sub); font-size: 14px; line-height: 1.7; }
.search-box { display: flex; align-items: center; gap: 13px; height: 58px; padding: 0 16px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); color: var(--muted); box-shadow: 0 2px 3px rgba(20, 24, 28, .02); transition: border-color 160ms, box-shadow 160ms; }
.search-box:focus-within { border-color: var(--text); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-box > svg { width: 21px; height: 21px; }
.search-box input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 15px; }
.search-box input::placeholder { color: var(--muted); }
.search-box input:focus-visible { outline: 0; }
.search-keys { display: flex; gap: 4px; }
kbd { display: inline-grid; place-items: center; min-width: 24px; height: 23px; padding: 0 5px; border: 1px solid var(--border); border-radius: 4px; background: var(--surface-subtle); color: var(--muted); font: 10px var(--font-mono); }
.result-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 22px 0 15px; }
.result-bar h2 { margin: 0; font-size: 13px; font-weight: 600; }
.result-bar p { margin: 0; color: var(--muted); font-size: 11px; }
.result-bar strong { color: var(--sub); font: 500 11px var(--font-mono); }

.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tool-card { min-width: 0; animation: enter-up 300ms var(--ease) both; }
.tool-open { display: flex; flex-direction: column; width: 100%; min-height: 260px; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); text-align: left; box-shadow: 0 2px 3px rgba(20, 24, 28, .015); transition: transform 180ms var(--ease), border-color 180ms, box-shadow 180ms; }
.tool-open:hover { border-color: var(--border-strong); box-shadow: 0 8px 24px rgba(20, 24, 28, .055); transform: translateY(-3px); }
.tool-open:active { transform: translateY(-1px); }
.tool-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; width: 100%; }
.tool-media { display: grid; place-items: center; flex: 0 0 auto; width: 52px; height: 52px; overflow: hidden; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-subtle); color: var(--sub); }
.tool-media img { width: 100%; height: 100%; object-fit: cover; }
.tool-media > svg { width: 24px; height: 24px; }
.tool-status { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.tool-status::before { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); content: ""; }
.tool-status.is-ready { color: var(--success); }
.tool-status.is-ready::before { background: var(--success); }
.tool-card-body { display: block; margin-top: 20px; }
.tool-category { display: block; margin-bottom: 7px; color: var(--muted); font-size: 10px; }
.tool-name { display: block; overflow: hidden; font-size: 19px; font-weight: 650; letter-spacing: -.02em; text-overflow: ellipsis; white-space: nowrap; }
.tool-summary { display: -webkit-box; min-height: 44px; margin-top: 9px; overflow: hidden; color: var(--sub); font-size: 12px; line-height: 1.8; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.tool-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; margin-top: auto; padding-top: 18px; border-top: 1px solid var(--border); color: var(--muted); font-size: 10px; }
.tool-version { overflow: hidden; font-family: var(--font-mono); text-overflow: ellipsis; white-space: nowrap; }
.tool-detail-label { display: inline-flex; align-items: center; gap: 5px; color: var(--sub); white-space: nowrap; }
.tool-detail-label svg { width: 15px; height: 15px; transition: transform 160ms var(--ease); }
.tool-open:hover .tool-detail-label { color: var(--text); }
.tool-open:hover .tool-detail-label svg { transform: translateX(3px); }

.skeleton-card { min-height: 260px; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.skeleton { border-radius: 4px; background: #e9ebed; animation: pulse 1.2s ease-in-out infinite alternate; }
.skeleton-icon { width: 52px; height: 52px; border-radius: 10px; }
.skeleton-line { width: 72%; height: 12px; margin-top: 22px; }
.skeleton-line.short { width: 42%; height: 18px; margin-top: 12px; }
.skeleton-line + .skeleton-line:not(.short) { margin-top: 12px; }
.state-panel { padding: 58px 24px; border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); background: rgba(255, 255, 255, .4); text-align: center; }
.state-icon { display: grid; place-items: center; width: 44px; height: 44px; margin: 0 auto; border: 1px solid var(--border); border-radius: 50%; color: var(--muted); }
.state-icon svg { width: 22px; height: 22px; }
.state-panel h3 { margin: 17px 0 8px; font-size: 16px; font-weight: 600; }
.state-panel p { margin: 0; color: var(--sub); font-size: 12px; line-height: 1.7; }
.secondary-button { min-height: 38px; margin-top: 20px; padding: 0 15px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); font-size: 12px; }
.secondary-button:hover { background: var(--surface-subtle); }

.site-footer { display: flex; justify-content: space-between; gap: 20px; width: min(1240px, calc(100% - 48px)); margin: 0 auto; padding: 24px 0 30px; border-top: 1px solid var(--border); color: var(--muted); font-size: 11px; }
.site-footer span:first-child { color: var(--sub); font-weight: 600; }

.tool-dialog { width: min(660px, calc(100% - 32px)); max-width: none; max-height: calc(100svh - 40px); margin: auto; padding: 0; overflow: visible; border: 0; background: transparent; color: var(--text); }
.tool-dialog::backdrop { background: rgba(20, 24, 28, .52); animation: fade-in 180ms ease both; }
.dialog-shell { position: relative; max-height: calc(100svh - 40px); padding: 32px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-dialog); animation: dialog-in 220ms var(--ease) both; }
.dialog-close { position: absolute; z-index: 2; top: 18px; right: 18px; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--sub); }
.dialog-close:hover { border-color: var(--border-strong); color: var(--text); }
.dialog-tool-head { display: flex; align-items: center; gap: 16px; padding-right: 36px; }
.dialog-tool-head .tool-media { width: 60px; height: 60px; }
.dialog-heading { min-width: 0; }
.dialog-heading > span { color: var(--muted); font-size: 11px; }
.dialog-heading h2 { margin: 6px 0 0; font-size: 27px; font-weight: 650; line-height: 1.25; letter-spacing: -.025em; }
.dialog-summary { margin: 25px 0 0; color: var(--sub); font-size: 14px; line-height: 1.85; }
.tool-facts { display: grid; grid-template-columns: 1fr 1.5fr; margin: 24px 0 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.tool-facts > div { padding: 13px 15px; }
.tool-facts > div + div { border-left: 1px solid var(--border); }
.tool-facts dt { color: var(--muted); font-size: 10px; }
.tool-facts dd { margin: 6px 0 0; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.dialog-section { margin-top: 26px; }
.dialog-section h3 { margin: 0 0 10px; font-size: 12px; font-weight: 650; }
.dialog-description { margin: 0; color: var(--sub); font-size: 13px; line-height: 1.9; white-space: pre-line; overflow-wrap: anywhere; }
.feature-list { display: grid; grid-template-columns: 1fr 1fr; gap: 11px 18px; margin: 0; padding: 0; list-style: none; }
.feature-list li { display: flex; align-items: flex-start; gap: 7px; color: var(--sub); font-size: 12px; line-height: 1.6; }
.feature-list svg { width: 15px; height: 15px; margin-top: 2px; color: var(--success); }
.changelog-list { margin: 0; padding: 0; list-style: none; border-left: 1px solid var(--border); }
.changelog-item { position: relative; padding: 0 0 16px 16px; }
.changelog-item:last-child { padding-bottom: 0; }
.changelog-item::before { content: ""; position: absolute; top: 6px; left: -4px; width: 7px; height: 7px; border-radius: 50%; background: var(--border-strong); box-shadow: 0 0 0 3px var(--surface); }
.changelog-item:first-child::before { background: var(--accent); }
.changelog-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 5px; }
.changelog-version { padding: 1px 8px; border: 1px solid var(--border); border-radius: 999px; color: var(--text); font: 500 10px var(--font-mono); }
.changelog-meta time { color: var(--muted); font: 10px var(--font-mono); }
.changelog-item p { margin: 0; color: var(--sub); font-size: 12px; line-height: 1.8; white-space: pre-line; overflow-wrap: anywhere; }
.dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 30px; }
.dialog-primary, .dialog-secondary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: var(--radius-sm); font-size: 12px; font-weight: 600; }
.dialog-primary { border: 1px solid var(--accent); background: var(--accent); color: var(--on-accent); }
.dialog-primary:hover { border-color: var(--accent-hover); background: var(--accent-hover); }
.dialog-primary:disabled { border-color: var(--border); background: var(--surface-subtle); color: var(--muted); }
.dialog-secondary { border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); }
.dialog-secondary:hover { background: var(--surface-subtle); }
.dialog-note { margin: 14px 0 0; color: var(--muted); font-size: 10px; line-height: 1.7; text-align: center; }
.dialog-loading { min-height: 300px; padding-top: 20px; }
.dialog-error { padding: 56px 16px 32px; text-align: center; }
.dialog-error h2 { margin: 0 0 10px; font-size: 18px; }
.dialog-error p { margin: 0; color: var(--sub); font-size: 12px; }
.dialog-error button { margin-top: 20px; }
.toast { position: fixed; z-index: 120; left: 50%; bottom: 26px; max-width: calc(100% - 32px); padding: 11px 16px; border-radius: var(--radius-sm); background: var(--text); color: #fff; box-shadow: 0 8px 30px rgba(20, 24, 28, .18); font-size: 12px; opacity: 0; pointer-events: none; transform: translate(-50%, 8px); transition: opacity 180ms, transform 180ms var(--ease); }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@keyframes enter-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(10px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse { from { opacity: .55; } to { opacity: 1; } }

@media (max-width: 1000px) {
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tool-open { min-height: 240px; }
}
@media (max-width: 760px) {
  .header-inner, .workspace, .site-footer { width: calc(100% - 32px); }
  .header-inner { flex-wrap: wrap; gap: 12px; min-height: 64px; padding: 12px 0; }
  .site-header .search-box { flex: 1 1 100%; order: 2; height: 44px; margin-left: 0; }
  .workspace { min-height: calc(100svh - 137px); padding: 26px 0 52px; }
  .category-bar { padding: 6px; }
  .category-bar-label { display: none; }
  .catalog-heading { margin-bottom: 20px; }
  .catalog-heading h1 { font-size: 30px; }
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tool-open { min-height: 250px; padding: 17px; }
  .tool-card-body { margin-top: 17px; }
  .tool-name { font-size: 17px; }
  .tool-summary { font-size: 11px; }
  .tool-detail-label span { display: none; }
}
@media (max-width: 520px) {
  .brand img { width: 36px; height: 36px; }
  .brand strong { font-size: 14px; }
  .brand small { font-size: 8px; }
  .community-link { min-height: 32px; padding: 0 9px; font-size: 10px; }
  .community-link strong { font-size: 10px; }
  .tool-grid { grid-template-columns: 1fr; }
  .tool-open { min-height: 238px; }
  .search-box { height: 52px; padding: 0 13px; }
  .search-box input { font-size: 14px; }
  .search-keys { display: none; }
  .catalog-heading h1 { font-size: 28px; }
  .catalog-heading > p:last-child { font-size: 13px; }
  .result-bar { margin-top: 26px; }
  .dialog-shell { padding: 24px 20px; }
  .dialog-close { top: 14px; right: 14px; }
  .dialog-tool-head { gap: 12px; padding-right: 30px; }
  .dialog-tool-head .tool-media { width: 52px; height: 52px; }
  .dialog-heading h2 { font-size: 23px; }
  .tool-facts { grid-template-columns: 1fr; }
  .tool-facts > div + div { border-top: 1px solid var(--border); border-left: 0; }
  .feature-list, .dialog-actions { grid-template-columns: 1fr; }
  .site-footer { align-items: flex-start; flex-direction: column; gap: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
}
