:root {
  --primary-soft: var(--primary);
  --bg-main: var(--bg-page);
  --bg: var(--bg-page);
  --text: var(--text-primary);
  --radius: 8px;
}
body.yp-site {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: var(--bg-main);
  color: var(--text-primary);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.55;
}
.yp-site :where(button, input, select, textarea) { font-family: inherit; }
.yp-site :focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.site-container { width: 100%; max-width: 1600px; padding-inline: 32px; margin-inline: auto; }
.yp-main { flex: 1 0 auto; min-width: 0; width: 100%; }
.yp-site .lucide { display: inline-block; width: 18px; height: 18px; flex-shrink: 0; stroke-width: 1.8; vertical-align: middle; }
.yp-header { position: sticky; top: 0; z-index: 70; background: var(--bg-header); border-bottom: 1px solid var(--border); backdrop-filter: blur(16px); }
.yp-header-inner { display: flex; align-items: center; gap: 36px; min-height: 68px; }
.yp-brand, .yp-footer-brand { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; color: var(--text-primary); text-decoration: none; }
.yp-brand span { font-size: 23px; line-height: 1; font-weight: 850; }
.yp-brand b { color: var(--primary); font-weight: inherit; }
.yp-brand img, .yp-footer-brand img { display: block; }
.yp-nav { display: flex; align-items: stretch; gap: 24px; align-self: stretch; white-space: nowrap; }
.yp-nav a { display: inline-flex; align-items: center; position: relative; color: var(--text-secondary); font-size: 14px; font-weight: 550; }
.yp-nav a:hover, .yp-nav a[aria-current], .yp-footer a:hover { color: var(--primary); }
.yp-nav a[aria-current]::after { position: absolute; bottom: 11px; right: 0; left: 0; height: 2px; border-radius: 2px; background: currentColor; content: ""; }
.yp-header-actions { display: flex; align-items: center; gap: 10px; min-width: 0; margin-left: auto; }
.yp-site-search { display: flex; align-items: center; width: clamp(160px,17vw,250px); height: 38px; padding: 0 4px 0 13px; border: 1px solid transparent; border-radius: 7px; background: var(--bg-card); }
.yp-site-search:focus-within { background: var(--bg-card); border-color: var(--primary); }
.yp-site-search input { width: 100%; min-width: 0; background: transparent; border: 0; outline: none; color: var(--text); font-size: 14px; }
.yp-site-search input:focus-visible { outline: none; }
.yp-site-search button, .yp-search-shortcut { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 5px; background: transparent; color: var(--text-secondary); cursor: pointer; }
.yp-search-shortcut { display: none; }
.yp-login, .yp-register { display: inline-flex; align-items: center; justify-content: center; height: 34px; padding: 0 15px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg-card); color: var(--text-primary); font-size: 13px; font-weight: 650; white-space: nowrap; }
.yp-login:hover { color: var(--primary); border-color: var(--primary-soft); }
.yp-register { background: var(--primary); border-color: var(--primary); color: var(--on-action); }
.yp-register:hover { background: var(--primary-hover); color: var(--on-action); }
.yp-user-menu { position: relative; }
.yp-user-menu summary { display: flex; align-items: center; gap: 7px; min-height: 38px; cursor: pointer; list-style: none; border-radius: 6px; }
.yp-user-menu summary::-webkit-details-marker { display: none; }
.yp-avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: var(--on-action); font-size: 15px; font-weight: 650; }
.yp-user-name { max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.yp-user-menu summary .lucide { width: 14px; }
.yp-count { padding: 0 5px; background: var(--primary); color: var(--on-action); border-radius: 10px; font-size: 11px; }
.yp-menu-panel { position: absolute; inset: calc(100% + 9px) 0 auto auto; width: min(214px, calc(100vw - 32px)); max-height: 72vh; overflow: auto; padding: 6px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-elevated); box-shadow:  0 8px 24px rgb(32 35 43 / 8%); }
.yp-menu-panel a, .yp-menu-panel button { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; border: 0; border-radius: 5px; background: none; color: var(--text-secondary); text-align: left; cursor: pointer; font-size: 14px; }
.yp-menu-panel :is(a,button):hover { color: var(--primary); background: var(--primary-light); }
.yp-divider { border-top: 1px solid var(--border); margin: 4px 6px; }
.yp-footer {
  flex-shrink: 0; margin-top: 24px; padding-block: 30px 18px;
  border-top: 1px solid var(--border); background: var(--footer-bg); color: var(--text-secondary); font-size: 13px;
}
.yp-footer-inner { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 16px 36px; }
.yp-footer-identity { display: flex; align-items: center; gap: clamp(8px, 2vw, 20px); }
.yp-footer-brand { gap: 5px; }
.yp-tagline { margin: 0; white-space: nowrap; color: var(--text-primary); font-size: clamp(24px, 2.4vw, 36px); font-weight: 750; line-height: 1.35; }
.yp-tagline strong { color: var(--primary-hover); font-weight: inherit; }
.yp-footer-nav, .yp-footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0 16px; }
.yp-footer-nav a, .yp-footer-links a { padding-block: 6px; overflow-wrap: anywhere; }
.yp-footer-resources { margin-top: 20px; }
.yp-footer-link-row, .yp-footer-group { border-top: 1px solid var(--brand-border); }
.yp-footer-link-row { display: flex; gap: 0 18px; align-items: baseline; flex-wrap: wrap; padding-block: 6px; }
.yp-footer-link-row > span, .yp-footer-group summary { font-weight: 600; color: var(--text-primary); }
.yp-footer-group summary { cursor: pointer; padding-block: 10px; list-style: none; display: flex; align-items: center; justify-content: space-between; }
.yp-footer-group summary::-webkit-details-marker { display: none; }
.yp-footer-group summary::after { content: ""; width: 7px; height: 7px; border: solid var(--text-secondary); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); margin-inline-end: 4px; }
.yp-footer-group[open] summary::after { transform: rotate(225deg); }
.yp-footer-group .yp-footer-links { padding-bottom: 8px; }
.yp-mobile-tabs { display: none; }
.yp-skip { position: fixed; z-index: 200; top: -100px; left: 16px; padding: 9px 15px; border-radius: 6px; background: var(--bg-card); color: var(--primary); }
.yp-skip:focus { top: 10px; }
@media(max-width: 1100px) {
  .site-container { padding-inline: 20px; }
  .yp-header-inner { gap: 22px; }
  .yp-nav { gap: 16px; }
}
@media(max-width: 820px) {
  .yp-nav { gap: 12px; }
  .yp-site-search { display: none; }
  .yp-search-shortcut { display: grid; }
}
@media(max-width: 767px) {
  .site-container { padding-inline: 16px; }
  body.yp-site { padding-bottom: calc(58px + env(safe-area-inset-bottom)); }
  .yp-header-inner { min-height: 56px; }
  .yp-nav, .yp-user-name { display: none; }
  .yp-brand img { width: 31px; height: 31px; }
  .yp-brand span { font-size: 21px; }
  .yp-login, .yp-register { height: 32px; padding-inline: 11px; }
  .yp-header-actions { gap: 7px; }
  .yp-footer { padding-block: 22px 10px; }
  .yp-tagline { font-size: clamp(18px, 5.6vw, 24px); }
  .yp-footer-inner { display: grid; gap: 12px; }
  .yp-footer-nav { gap: 0 14px; }
  .yp-footer-resources { margin-top: 12px; }
  .yp-footer-link-row { gap: 0 12px; }
  .yp-footer-group summary { min-height: 44px; }
  .yp-mobile-tabs { display: grid; position: fixed; inset: auto 0 0; z-index: 65; grid-template-columns: repeat(5,minmax(0,1fr)); min-height: 54px; padding: 3px 0 calc(3px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); background: var(--bg-card); backdrop-filter: blur(12px); }
  .yp-mobile-tabs a { display: grid; justify-items: center; align-content: center; gap: 2px; min-height: 45px; color: var(--text-secondary); font-size: 12px; }
  .yp-mobile-tabs a[aria-current] { color: var(--primary); font-weight: 650; }
  .yp-mobile-tabs .lucide { width: 20px; height: 20px; }
}
@media(prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.yp-mobile-more { display: none; }
@media(max-width: 767px) {
  .yp-mobile-more { display: block; }
  .yp-mobile-more summary { display: grid; place-items: center; width: 32px; color: var(--text-secondary); }
  .yp-mobile-more summary .lucide { width: 19px; height: 19px; }
}

.yp-brand .yp-wordmark { width: 67px; height: 39px; object-fit: contain; }
.yp-mobile-tabs { background: var(--bg-header); }
.yp-site-search { background: var(--bg-input); }
.yp-site-search:focus-within { background: var(--bg-input); border-color: var(--primary); }
.yp-site :disabled { opacity: .55; cursor: not-allowed; }
@media (max-width: 767px) {
  .yp-brand .yp-wordmark { width: 56px; height: 33px; }
}
