* { box-sizing: border-box; }
[hidden] { display: none !important; }
:root {
  color-scheme: dark;
  --bg: #121313;
  --sidebar: #161717;
  --topbar: #141515;
  --surface: #1a1b1b;
  --raised: #202121;
  --hover: #262727;
  --line: #2c2d2d;
  --line-strong: #3a3c3b;
  --text: #f3f3ef;
  --muted: #a3a5a1;
  --dim: #81847f;
  --accent: #d1e2b2;
  --accent-ink: #1b2417;
  --accent-faint: #262d23;
  --error: #ffaaa1;
  --sidebar-width: 218px;
  --header-height: 70px;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  font-size: 14px;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f1f0ec;
  --sidebar: #f9f8f4;
  --topbar: #f6f5f1;
  --surface: #fdfcf9;
  --raised: #edede7;
  --hover: #e6e7df;
  --line: #dbdcd3;
  --line-strong: #c1c4b8;
  --text: #20231e;
  --muted: #565d51;
  --dim: #62685d;
  --accent: #3e5930;
  --accent-ink: #f6f8f0;
  --accent-faint: #e2ebd8;
  --error: #a12424;
}
body { margin: 0; min-width: 300px; background: var(--bg); color: var(--text); }
button, input, summary { font: inherit; }
button, summary { cursor: pointer; }
button { color: inherit; }
button:disabled { cursor: wait; opacity: .58; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
svg { display: block; width: 1em; height: 1em; flex: none; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.skip-link { position: fixed; z-index: 50; top: 8px; left: 8px; padding: 10px 14px; transform: translateY(-160%); background: var(--accent); color: var(--accent-ink); border-radius: 8px; }
.skip-link:focus { transform: none; }
.shell { min-height: 100dvh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 12; width: var(--sidebar-width);
  display: flex; flex-direction: column; background: var(--sidebar); border-right: 1px solid var(--line); overflow-y: auto;
  padding: 0 14px;
}
.brand { min-height: var(--header-height); display: flex; align-items: center; gap: 11px; padding: 0 9px; font-size: 16px; font-weight: 750; letter-spacing: .035em; white-space: nowrap; }
.brand img { flex: none; }
.brand small { display: block; color: var(--dim); font-family: ui-monospace, monospace; font-size: 9px; font-weight: 500; letter-spacing: .1em; margin-top: 4px; }
.navigation { padding: 26px 0 18px; }
.nav-group + .nav-group { margin-top: 28px; }
.nav-label { color: var(--dim); font-size: 11px; letter-spacing: .08em; margin: 0 10px 9px; }
.nav-link {
  position: relative; display: flex; align-items: center; gap: 11px; min-height: 42px; padding: 8px 10px;
  margin: 3px 0; border: 1px solid transparent; border-radius: 8px; color: var(--muted); font-size: 13px; font-weight: 570;
}
.nav-icon { font-size: 18px; }
.nav-link:hover { background: var(--raised); color: var(--text); }
.nav-link[aria-current] { border-color: var(--line); background: var(--raised); color: var(--text); }
.nav-link[aria-current] .nav-icon { color: var(--accent); }
.nav-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--dim); margin-left: auto; opacity: .65; }
.side-bottom { margin-top: auto; padding: 12px 0 16px; }
.local-label { display: flex; align-items: center; gap: 8px; margin: 11px 1px 0; padding: 14px 9px 2px; border-top: 1px solid var(--line); color: var(--dim); font-size: 11px; letter-spacing: .025em; }
.local-label > span:first-child { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 9px #a9c68442; }
.topbar {
  position: sticky; z-index: 8; top: 0; margin-left: var(--sidebar-width); min-height: var(--header-height);
  display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 0 31px;
  background: var(--topbar); border-bottom: 1px solid var(--line);
}
.top-leading, .top-actions, .breadcrumb { display: flex; align-items: center; }
.breadcrumb { gap: 10px; white-space: nowrap; color: var(--muted); font-size: 13px; }
.breadcrumb [data-icon] { font-size: 17px; color: var(--dim); }
.breadcrumb .slash { color: var(--dim); opacity: .62; }
#breadcrumb-page { color: var(--text); }
.top-actions { gap: 11px; min-width: 0; }
.search {
  width: clamp(165px, 19.6vw, 300px); height: 37px; display: flex; align-items: center; gap: 8px; padding: 0 9px 0 11px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; color: var(--muted);
}
.search:focus-within { border-color: var(--dim); }
.search > span { font-size: 17px; }
.search input { min-width: 0; width: 100%; padding: 0; border: 0; background: transparent; color: var(--text); font-size: 13px; outline: none; }
.search input::placeholder { color: var(--dim); }
.search input::-webkit-search-cancel-button { appearance: none; }
.search kbd { display: grid; place-items: center; min-width: 19px; height: 20px; border: 1px solid var(--line-strong); border-radius: 4px; font: 11px ui-monospace, monospace; color: var(--dim); }
.icon-button { display: inline-grid; place-items: center; flex: none; width: 37px; height: 37px; padding: 0; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--muted); font-size: 18px; }
.icon-button:hover, .dropdown[open] > .icon-button { background: var(--hover); color: var(--text); }
.clear-search { width: 23px; height: 25px; font-size: 14px; }
.nav-toggle { display: none; }
.appearance-button { border-color: var(--line); background: var(--surface); }
.action-divider { height: 20px; width: 1px; background: var(--line); margin: 0 2px; }
.login-button, .account-trigger { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 37px; border: 1px solid var(--line-strong); border-radius: 8px; padding: 0 11px; background: var(--raised); font-size: 13px; font-weight: 650; white-space: nowrap; }
.login-button:hover, .account-trigger:hover { background: var(--hover); }
.login-button [data-icon] { color: var(--accent); font-size: 16px; }
.dropdown { position: relative; }
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
.dropdown-panel {
  position: absolute; right: 0; top: calc(100% + 9px); min-width: 155px; padding: 6px;
  border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); box-shadow: 0 14px 34px #0004;
}
.menu-label { padding: 7px 8px 5px; font-size: 11px; color: var(--dim); white-space: nowrap; }
.menu-option { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 35px; padding: 5px 8px; text-align: left; white-space: nowrap; border: 0; border-radius: 6px; background: transparent; font-size: 13px; }
.menu-option:hover { background: var(--hover); }
.menu-option svg { font-size: 16px; }
.theme-check { margin-left: auto; color: var(--accent); visibility: hidden; }
[aria-pressed="true"] > .theme-check { visibility: visible; }
.avatar { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; background: var(--accent-faint); color: var(--accent); font-size: 12px; }
#account-name { max-width: 115px; overflow: hidden; text-overflow: ellipsis; }
.account-trigger [data-icon] { color: var(--dim); }
.nav-scrim { display: none; }
main { margin-left: var(--sidebar-width); padding: 27px 31px 0; min-width: 0; }
main:focus { outline: none; }
main > section { max-width: 1600px; margin: 0 auto; }
.hero {
  position: relative; isolation: isolate; min-height: 228px; display: flex; align-items: center; overflow: hidden;
  border: 1px solid #343633; border-radius: 14px; background: #1a1b1b; color: #f5f5ee;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, #191b1b 0%, #1a1b1b 26%, #1a1b1b99 45%, #1a1b1b00 69%),
              url("/images/hero.svg") right 47% / auto 130% no-repeat;
}
.hero-content { padding: 28px 33px; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 9px;
  color: #d3e3ba; background: #2b3329; border: 1px solid #3b4936; border-radius: 5px; font-size: 11px; letter-spacing: .075em;
}
.hero-eyebrow > span, .availability > span { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.hero h1 { margin: 12px 0 8px; font-size: clamp(36px, 3.25vw, 54px); font-weight: 760; letter-spacing: .035em; line-height: 1.17; }
.hero p { color: #c0c2b9; font-size: 14px; line-height: 1.65; }
.hero-index { position: absolute; right: 18px; bottom: 17px; display: flex; align-items: center; gap: 8px; color: #b7b7a6; font: 10px ui-monospace, monospace; letter-spacing: .115em; }
.hero-index > span { width: 24px; height: 1px; background: #b7b7a66a; }
.hero-index b { font-weight: 500; color: #e0e1cb; }
.catalog-section { margin-top: 28px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.heading-line { display: flex; align-items: baseline; gap: 11px; }
.heading-line h2 { font-size: 23px; font-weight: 720; letter-spacing: .025em; }
#result-count { color: var(--dim); font-size: 12px; white-space: nowrap; }
.category-tabs { display: flex; align-items: center; gap: 3px; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 3px; }
.category-tab { padding: 6px 11px; border: 1px solid transparent; border-radius: 5px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.category-tab:hover { color: var(--text); }
.category-tab[aria-current] { background: var(--hover); border-color: var(--line-strong); color: var(--text); font-weight: 650; }
.card-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 15px; }
.tool-card {
  display: flex; flex-direction: column; align-items: stretch; overflow: hidden; min-width: 0; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 0;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.tool-card:hover { border-color: var(--line-strong); background: var(--raised); transform: translateY(-3px); }
.card-media { position: relative; display: block; overflow: hidden; aspect-ratio: 360 / 414; background: #252827; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.tool-card:hover img { transform: scale(1.035); }
.media-type {
  position: absolute; top: 9px; left: 9px; display: flex; align-items: center; gap: 4px;
  padding: 4px 6px; border: 1px solid #ffffff38; border-radius: 5px; background: #161817a8; color: #fafaf5; font-size: 10px;
  backdrop-filter: blur(8px);
}
.media-icon { font-size: 13px; }
.card-info { display: flex; align-items: center; justify-content: space-between; gap: 5px; min-height: 60px; padding: 10px 11px 11px; }
.card-copy { display: grid; min-width: 0; gap: 4px; }
.card-name { font-size: 14px; font-weight: 710; letter-spacing: .005em; line-height: 1.22; overflow-wrap: anywhere; }
.card-tag { color: var(--dim); font-size: 11px; line-height: 1.25; }
.card-arrow { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); font-size: 12px; }
.tool-card:hover .card-arrow { color: var(--accent); border-color: var(--line-strong); }
.page-footer { display: flex; justify-content: space-between; gap: 10px; color: var(--dim); border-top: 1px solid var(--line); margin-top: 28px; padding: 16px 0 22px; font-size: 11px; }
#other-view { padding-top: 14px; padding-bottom: 30px; }
.section-kicker { color: var(--dim); font-size: 12px; font-weight: 600; letter-spacing: .04em; }
.section-kicker span { padding: 0 6px; }
#other-title { margin: 11px 0 9px; font-size: clamp(29px, 4vw, 42px); font-weight: 740; }
.section-intro { color: var(--muted); line-height: 1.65; }
#other-content { margin-top: 25px; }
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 240px;
  padding: 25px; text-align: center; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: 12px;
}
.standalone-state { min-height: 340px; }
.empty-icon { display: grid; place-items: center; width: 50px; height: 50px; border: 1px solid var(--line-strong); border-radius: 13px; background: var(--raised); color: var(--accent); font-size: 24px; margin-bottom: 14px; }
.empty-state h2, .empty-state h3 { font-size: 19px; }
.empty-state p { color: var(--muted); line-height: 1.6; margin-top: 7px; }
.empty-state button { margin-top: 16px; }
.guide-list { list-style: none; display: grid; gap: 12px; max-width: 820px; margin: 0; padding: 0; }
.guide-step, .settings-panel { border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.guide-step { display: flex; align-items: flex-start; gap: 15px; padding: 21px; }
.step-number { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--accent-faint); color: var(--accent); font: 13px ui-monospace, monospace; }
.guide-step h2, .settings-panel h2 { font-size: 17px; }
.guide-step p, .settings-panel p { margin-top: 5px; color: var(--muted); line-height: 1.65; }
.settings-panel { max-width: 640px; padding: 22px; }
.settings-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 17px; }
.setting-option { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 7px; min-height: 56px; padding: 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--raised); text-align: left; }
.setting-option svg { font-size: 17px; }
.setting-option:hover { border-color: var(--line-strong); }
.setting-option[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-faint); }
.primary-button, .secondary-button { min-height: 40px; padding: 8px 14px; border-radius: 8px; font-weight: 700; }
.primary-button { border: 1px solid transparent; background: var(--accent); color: var(--accent-ink); }
.primary-button:hover { filter: brightness(1.08); }
.secondary-button { border: 1px solid var(--line-strong); background: var(--raised); }
.secondary-button:hover { background: var(--hover); }
.notice { position: fixed; z-index: 14; bottom: 20px; right: 20px; max-width: calc(100% - 40px); padding: 11px 15px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--raised); box-shadow: 0 8px 25px #0005; }
dialog {
  position: fixed; inset: 0; padding: 0; max-height: calc(100dvh - 24px); margin: auto; color: var(--text);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 15px; box-shadow: 0 22px 85px #0009;
}
dialog::backdrop { background: #090a0ac2; backdrop-filter: blur(5px); }
.dialog-close { position: absolute; z-index: 1; right: 11px; top: 11px; }
.tool-dialog { width: min(610px, calc(100% - 28px)); overflow: auto; }
.tool-dialog[open] { display: grid; grid-template-columns: 43% 1fr; }
.tool-art { width: 100%; height: 100%; object-fit: cover; min-height: 274px; background: var(--raised); }
.tool-detail { align-self: center; padding: 39px 24px 30px; }
.tool-detail h2 { font-size: 27px; margin: 8px 0; overflow-wrap: anywhere; }
#tool-description { color: var(--muted); line-height: 1.7; }
.availability { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line-strong); border-radius: 6px; padding: 6px 8px; margin: 16px 0 8px; color: var(--accent); background: var(--accent-faint); font-size: 12px; }
.detail-note { color: var(--dim); font-size: 12px; line-height: 1.6; }
.auth-dialog { width: min(406px, calc(100% - 28px)); padding: 25px 29px 22px; overflow-y: auto; }
.auth-mark { margin: 0 auto 11px; }
.auth-dialog h2 { text-align: center; font-size: 23px; line-height: 1.3; }
.auth-intro { text-align: center; color: var(--muted); margin: 6px 0 17px; font-size: 13px; line-height: 1.5; }
.auth-dialog fieldset { min-inline-size: 0; margin: 0; padding: 0; border: 0; }
.auth-dialog label { display: block; margin: 9px 0 5px; font-size: 12px; font-weight: 650; }
.auth-dialog input {
  display: block; width: 100%; height: 40px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 7px;
  background: var(--bg); color: var(--text); outline-offset: 1px; font-size: 14px;
}
.auth-dialog input::placeholder { color: var(--dim); }
.auth-dialog input[aria-invalid] { border-color: var(--error); }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 39px; }
.password-wrap .reveal { position: absolute; right: 2px; top: 2px; width: 36px; height: 36px; font-size: 17px; }
.recovery-row { margin-top: 8px; text-align: right; }
.text-button { border: 0; padding: 3px 0; background: transparent; color: var(--accent); font-size: 13px; }
.text-button:hover { text-decoration: underline; }
.form-error { margin-top: 10px; color: var(--error); font-size: 12px; line-height: 1.5; }
.auth-submit { width: 100%; margin-top: 14px; }
.auth-switch { margin-top: 12px; text-align: center; color: var(--muted); font-size: 13px; }
.recovery-content { text-align: center; }
.recovery-content p { color: var(--muted); margin-bottom: 17px; line-height: 1.65; }
.recovery-content button { width: 100%; }
@media (max-width: 1379px) { .card-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 1180px) {
  :root { --sidebar-width: 196px; }
  .topbar { padding-inline: 23px; }
  main { padding-inline: 23px; }
  .card-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 955px) {
  :root { --sidebar-width: 178px; }
  .sidebar { padding-inline: 10px; }
  .topbar { padding-inline: 18px; }
  main { padding-inline: 18px; }
  .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .hero-content { padding-inline: 22px; }
}
@media (max-width: 760px) {
  :root { --sidebar-width: 218px; --header-height: 59px; }
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; }
  .sidebar.is-open { transform: none; }
  .nav-scrim { display: block; position: fixed; inset: 0; z-index: 11; border: 0; background: #090a0aba; }
  .topbar, main { margin-left: 0; }
  .topbar { padding: 0 12px; gap: 8px; }
  .top-actions { flex: 1; justify-content: flex-end; gap: 7px; }
  .nav-toggle { display: inline-grid; }
  .breadcrumb, .action-divider { display: none; }
  .search { width: min(100%, 315px); }
  main { padding: 15px 14px 0; }
  .hero { min-height: 190px; }
  .hero::before { background-size: auto, auto 112%; background-position: center, calc(100% + 42px) center; }
  .hero-index { bottom: 12px; right: 12px; }
}
@media (max-width: 520px) {
  .hero h1 { font-size: 35px; }
  .hero-content { padding: 19px 14px 29px; max-width: 78%; }
  .hero::before { background-image: linear-gradient(90deg, #191b1b 4%, #191b1be5 29%, #191b1b66 65%, #191b1b14), url("/images/hero.svg"); background-position: center, calc(100% + 115px) center; }
  .hero p { font-size: 12px; }
  .hero-index { font-size: 8px; }
  .catalog-section { margin-top: 21px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 10px; margin-bottom: 12px; }
  .heading-line h2 { font-size: 20px; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card-info { min-height: 55px; padding: 8px; }
  .card-name { font-size: 13px; }
  .card-arrow { width: 21px; height: 21px; }
  #account-name { max-width: 62px; }
  .topbar .search input, .auth-dialog input { font-size: 16px; }
  .search kbd { display: none; }
  .settings-options { grid-template-columns: 1fr; }
  .tool-dialog[open] { grid-template-columns: 1fr; }
  .tool-art { min-height: 0; height: 170px; }
  .tool-detail { padding: 17px; }
  .tool-dialog .dialog-close { background: var(--surface); color: var(--text); }
}
@media (max-height: 660px) {
  .auth-dialog { padding-top: 17px; }
  .auth-mark { width: 34px; height: 34px; margin-bottom: 7px; }
  .auth-intro { margin-bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
