/* Supplemental styles for the clone — theme tokens come from theme.css */
:root { --font-sans: "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif; }
html { scrollbar-gutter: stable; }
body { font-family: var(--font-sans); }

/* hidden must win over utility display classes */
[hidden] { display: none !important; }

/* logo follows theme tokens (scoped CSS from the reference needs the data-v attr on paths) */
.logo-svg .logo-ink { fill: rgb(var(--content)); stroke: rgb(var(--content)); }
.logo-svg .logo-paper { fill: rgb(var(--surface-1)); stroke: rgb(var(--surface-1)); }

/* avatars */
.avatar-fallback { background: var(--av, #64748b); }
.avatar-fallback img { position: absolute; inset: 0; }

/* header menus */
.menu-pop {
  position: absolute; top: calc(100% + 6px); z-index: 60; min-width: 11rem; padding: .3rem;
  border-radius: var(--radius-md); border: 1px solid rgb(var(--line));
  background: rgb(var(--surface-1)); box-shadow: 0 12px 32px rgba(13, 20, 36, .16);
}
.menu-item {
  display: flex; width: 100%; align-items: center; justify-content: space-between; gap: .5rem;
  padding: .5rem .65rem; border-radius: .4rem; font-size: .8125rem; color: rgb(var(--content-2));
  text-align: left; transition: background .15s, color .15s;
}
.menu-item:hover:not(:disabled) { background: rgb(var(--surface-3)); color: rgb(var(--content)); }
.menu-item-active { color: rgb(var(--brand)); font-weight: 600; }
.menu-item:disabled { opacity: .5; cursor: not-allowed; }
.menu-soon { font-size: 10px; color: rgb(var(--content-3)); border: 1px solid rgb(var(--line)); padding: 0 4px; border-radius: 4px; }

.mobile-menu { display: none; }
.mobile-menu.is-open { display: block; }
.mobile-nav-link { padding: .55rem .5rem; border-radius: .4rem; font-size: .875rem; color: rgb(var(--content-2)); }
.mobile-nav-link-active { color: rgb(var(--brand)); background: rgb(var(--brand-soft)); font-weight: 600; }

/* chips */
.chip-active { background: rgb(var(--brand)); color: rgb(var(--brand-fg)) !important; border-color: transparent !important; }

/* asset rows */
.asset-row {
  display: flex; align-items: center; gap: .75rem;
  border: 1px solid rgb(var(--line-soft)); border-radius: var(--radius-md);
  background: rgb(var(--surface-2)); padding: .65rem .8rem;
  transition: border-color .18s, background .18s;
}
.asset-row:hover { border-color: rgb(var(--line-strong)); }
.asset-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 1.9rem; height: 1.9rem;
  flex: 0 0 auto; border-radius: .45rem; background: rgb(var(--brand-soft)); color: rgb(var(--brand));
}
.asset-name { font-family: var(--font-mono); font-size: .78rem; line-height: 1.25; color: rgb(var(--content)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asset-meta { margin-top: .2rem; display: flex; align-items: center; flex-wrap: wrap; gap: .3rem; font-size: .68rem; color: rgb(var(--content-3)); }
.asset-meta .dot { opacity: .5; }
.copy-btn { display: inline-flex; align-items: center; padding: 1px; border-radius: 3px; color: rgb(var(--content-3)); }
.copy-btn:hover { color: rgb(var(--brand)); }
.asset-dl { flex: 0 0 auto; }

/* history */
.hist-item { }
.hist-summary { display: flex; align-items: center; gap: .55rem; padding: .8rem 1rem; cursor: pointer; list-style: none; font-size: .8125rem; }
.hist-summary::-webkit-details-marker { display: none; }
.hist-summary:hover { background: rgb(var(--surface-3) / .55); }
.hist-chevron { color: rgb(var(--content-3)); transition: transform .2s var(--ease-smooth); }
.hist-item[open] .hist-chevron { transform: rotate(90deg); }
.hist-body { padding: 0 1rem .9rem 2.35rem; display: flex; flex-direction: column; gap: .35rem; }
.hist-asset { display: flex; align-items: center; gap: .5rem; padding: .3rem .45rem; border-radius: .35rem; background: rgb(var(--surface-3) / .5); }
.hist-asset .asset-icon { width: 1.4rem; height: 1.4rem; }

/* pager */
.pager { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .35rem; }
.pager-btn {
  display: inline-flex; min-width: 2.25rem; height: 2.25rem; align-items: center; justify-content: center;
  padding: 0 .65rem; border-radius: var(--radius-md); border: 1px solid rgb(var(--line));
  background: rgb(var(--surface-1)); font-size: .8125rem; color: rgb(var(--content-2));
}
.pager-btn:hover { border-color: rgb(var(--brand) / .5); color: rgb(var(--brand)); }
.pager-active { background: rgb(var(--brand)); border-color: rgb(var(--brand)); color: rgb(var(--brand-fg)); font-weight: 600; }
.pager-active:hover { color: rgb(var(--brand-fg)); }
.pager-off { opacity: .4; pointer-events: none; }
.pager-dots { color: rgb(var(--content-3)); padding: 0 .2rem; }

/* tags */
.tag-pill {
  display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .7rem;
  border: 1px solid rgb(var(--line)); border-radius: 999px; background: rgb(var(--surface-1));
  font-family: var(--font-mono); font-size: .75rem; color: rgb(var(--content-2));
  transition: all .18s var(--ease-smooth);
}
.tag-pill:hover { border-color: rgb(var(--brand) / .5); color: rgb(var(--brand)); transform: translateY(-1px); }
.tag-count { font-size: .65rem; color: rgb(var(--content-3)); background: rgb(var(--surface-3)); border-radius: 999px; padding: 0 .35rem; }

/* language badge */
.lang-badge {
  display: inline-flex; min-width: 2.25rem; padding: 0 .3rem; height: 2.25rem; flex: 0 0 auto; align-items: center; justify-content: center;
  border-radius: .5rem; background: rgb(var(--brand-soft)); color: rgb(var(--brand));
  font-family: var(--font-mono); font-size: .78rem; font-weight: 700;
}

/* settings */
.theme-choice {
  display: flex; flex-direction: column; align-items: center; gap: .45rem; padding: .85rem .5rem;
  border: 1px solid rgb(var(--line)); border-radius: var(--radius-md); background: rgb(var(--surface-1));
  font-size: .78rem; color: rgb(var(--content-2)); transition: all .18s;
}
.theme-choice:hover { border-color: rgb(var(--brand) / .45); }
.theme-choice.is-active { border-color: rgb(var(--brand)); color: rgb(var(--brand)); background: rgb(var(--brand-soft)); }
.mirror-choice {
  display: flex; align-items: center; gap: .75rem; padding: .7rem .85rem; cursor: pointer;
  border: 1px solid rgb(var(--line-soft)); border-radius: var(--radius-md); background: rgb(var(--surface-1));
  transition: border-color .18s;
}
.mirror-choice:hover { border-color: rgb(var(--line-strong)); }
.mirror-choice input { position: absolute; opacity: 0; pointer-events: none; }
.mirror-dot { width: 1rem; height: 1rem; border-radius: 999px; border: 2px solid rgb(var(--line-strong)); flex: 0 0 auto; }
.mirror-choice input:checked ~ .mirror-dot { border-color: rgb(var(--brand)); background: radial-gradient(circle, rgb(var(--brand)) 45%, transparent 47%); }
.mirror-choice:has(input:checked) { border-color: rgb(var(--brand) / .5); }

/* notices / forms */
.notice { display: flex; align-items: flex-start; gap: .5rem; margin-top: 1rem; padding: .7rem .9rem; border-radius: var(--radius-md); font-size: .8125rem; }
.notice-ok { background: rgb(var(--success-soft)); color: rgb(var(--success)); }
.notice-err { background: rgb(var(--danger-soft)); color: rgb(var(--danger)); }
.field-label { display: block; font-size: .8125rem; font-weight: 600; color: rgb(var(--content)); }
.field-hint { margin-top: .3rem; font-size: .7rem; color: rgb(var(--content-3)); }
.input-area { height: auto; padding: .6rem .75rem; resize: vertical; }
.inline-code { font-family: var(--font-mono); font-size: .78em; background: rgb(var(--surface-3)); padding: .1rem .3rem; border-radius: 4px; }
.qr-box { display: flex; align-items: center; justify-content: center; height: 8rem; border: 1px dashed rgb(var(--line-strong)); border-radius: var(--radius-md); color: rgb(var(--content-3)); font-size: .75rem; }

/* documentation */
.doc { font-size: .9rem; line-height: 1.85; color: rgb(var(--content-2)); }
.doc h2 { margin: 1.8rem 0 .6rem; font-size: 1.05rem; font-weight: 700; color: rgb(var(--content)); }
.doc h2:first-child { margin-top: 0; }
.doc p { margin: .5rem 0; }
.doc ul { margin: .5rem 0; padding-left: 1.1rem; list-style: disc; }
.doc li { margin: .3rem 0; }
.doc strong { color: rgb(var(--content)); font-weight: 600; }
.doc pre { margin: .7rem 0; padding: .75rem .9rem; overflow-x: auto; border-radius: var(--radius-md); background: rgb(var(--surface-inv)); color: rgb(var(--content-inv)); font-size: .78rem; }
.doc code { font-family: var(--font-mono); }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 2rem; transform: translateX(-50%) translateY(8px);
  z-index: 90; padding: .55rem .95rem; border-radius: 999px;
  background: rgb(var(--surface-inv)); color: rgb(var(--content-inv)); font-size: .78rem;
  box-shadow: 0 12px 30px rgba(13, 20, 36, .25); opacity: 0; transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* markdown */
.markdown-body { font-size: .875rem; line-height: 1.8; color: rgb(var(--content-2)); overflow-wrap: anywhere; }
.markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4 { margin: 1.4em 0 .55em; font-weight: 700; color: rgb(var(--content)); line-height: 1.35; }
.markdown-body h1 { font-size: 1.35rem; }
.markdown-body h2 { font-size: 1.18rem; border-bottom: 1px solid rgb(var(--line-soft)); padding-bottom: .3rem; }
.markdown-body h3 { font-size: 1rem; }
.markdown-body p { margin: .6em 0; }
.markdown-body a { color: rgb(var(--brand)); text-decoration: underline; text-underline-offset: 2px; }
.markdown-body ul { list-style: disc; padding-left: 1.3rem; margin: .6em 0; }
.markdown-body ol { list-style: decimal; padding-left: 1.3rem; margin: .6em 0; }
.markdown-body pre { margin: .8em 0; padding: .8rem 1rem; overflow-x: auto; border-radius: var(--radius-md); background: rgb(var(--surface-inv)); color: rgb(var(--content-inv)); font-size: .78rem; }
.markdown-body code { font-family: var(--font-mono); font-size: .85em; background: rgb(var(--surface-3)); padding: .1em .35em; border-radius: 4px; }
.markdown-body pre code { background: transparent; padding: 0; }
.markdown-body img { max-width: 100%; height: auto; border-radius: 6px; display: inline-block; }
.markdown-body table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; margin: .8em 0; font-size: .8rem; }
.markdown-body th, .markdown-body td { border: 1px solid rgb(var(--line)); padding: .4rem .6rem; text-align: left; }
.markdown-body blockquote { margin: .7em 0; padding: .35rem .9rem; border-left: 3px solid rgb(var(--brand) / .4); color: rgb(var(--content-3)); }
.markdown-body hr { border: 0; border-top: 1px solid rgb(var(--line)); margin: 1.2em 0; }

@media (max-width: 1023px) {
  .filter-aside { display: none !important; }
}

/* FAQ */
.faq { margin: .1rem .75rem 1rem; border: 1px solid rgb(var(--line)); border-radius: var(--radius-md); background: rgb(var(--surface-1)); overflow: hidden; }
.faq-summary { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .8rem 1rem; cursor: pointer; list-style: none; }
.faq-summary::-webkit-details-marker { display: none; }
.faq-chevron { color: rgb(var(--content-3)); transition: transform .2s var(--ease-smooth); }
.faq[open] .faq-chevron { transform: rotate(180deg); }
.faq-body { padding: 0 1rem 1rem; }
.faq-body dl { display: grid; gap: .55rem; font-size: .78rem; }
.faq-body dt { font-weight: 600; color: rgb(var(--content)); }
.faq-body dd { margin: .15rem 0 0; color: rgb(var(--content-2)); line-height: 1.7; }
.faq-body code { font-family: var(--font-mono); background: rgb(var(--surface-3)); padding: .08rem .3rem; border-radius: 4px; font-size: .72rem; }
