/* Baiyu Curated — quiet charcoal, warm metal, generous reading space. */
:root {
  color-scheme: dark;
  --by-bg: #101719;
  --by-bg-deep: #0b1113;
  --by-surface: #172024;
  --by-surface-raised: #1d272c;
  --by-gold: #d5aa6a;
  --by-gold-light: #efc788;
  --by-text: #f0f1ec;
  --by-muted: #bdc4c7;
  --by-subtle: #8e9a9f;
  --by-border: rgba(192, 204, 209, .13);
  --by-border-strong: rgba(192, 204, 209, .24);
  --by-radius: 12px;
  --by-shadow: 0 18px 50px rgba(0, 0, 0, .22);
  --by-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 94px; }
body.by-site {
  margin: 0;
  min-width: 320px;
  background: radial-gradient(ellipse at 92% 6%, rgba(213, 170, 106, .055), transparent 35%), var(--by-bg);
  color: var(--by-text);
  font-family: var(--by-font);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body.by-preview-open { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button, input, select, textarea { color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; text-underline-offset: .2em; }
img { display: block; max-width: 100%; height: auto; }
svg { flex-shrink: 0; vertical-align: middle; }
.by-icon { width: 20px; height: 20px; }
button svg, a svg { pointer-events: none; }
button:disabled, input:disabled { cursor: not-allowed; opacity: .55; }
::selection { color: #121719; background: var(--by-gold-light); }
:focus-visible { outline: 3px solid var(--by-gold-light); outline-offset: 4px; }
[hidden] { display: none !important; }
.screen-reader-text, .by-sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.by-skip-link { position: fixed; top: -100px; left: 12px; }
.screen-reader-text:focus, .by-skip-link:focus {
  position: fixed !important;
  z-index: 10000;
  inset: 12px auto auto 12px;
  width: auto;
  height: auto;
  padding: 12px 20px;
  margin: 0;
  clip: auto;
  overflow: visible;
  color: #121719;
  background: var(--by-gold-light);
  border-radius: 6px;
}
.by-wrap { width: min(100% - 72px, 1480px); margin-inline: auto; }

/* Header */
.by-header {
  position: relative;
  z-index: 30;
  min-height: 72px;
  border-bottom: 1px solid var(--by-border);
  background: rgba(11, 17, 19, .95);
}
.by-header-inner { min-height: 72px; display: flex; align-items: center; gap: 42px; }
.by-brand { display: inline-flex; flex-shrink: 0; align-items: center; gap: 12px; color: #fff9ec; font-size: 28px; font-weight: 700; letter-spacing: .12em; line-height: 1; }
.by-brand img { width: auto; max-width: 160px; max-height: 42px; object-fit: contain; }
.by-brand, .by-hero-title, .by-section-title { font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", serif; }
.by-brand small { color: var(--by-subtle); font-size: 10px; letter-spacing: .15em; font-weight: 400; }
.by-brand > span { max-width: 65px; color: var(--by-subtle); font: 500 8px/1.55 var(--by-font); letter-spacing: .18em; }
.by-nav { display: flex; align-self: stretch; align-items: stretch; gap: 32px; }
.by-nav ul { list-style: none; display: flex; align-items: stretch; gap: 32px; padding: 0; margin: 0; }
.by-nav li { display: flex; }
.by-nav a { position: relative; display: inline-flex; align-items: center; min-height: 72px; font-size: 14px; font-weight: 600; white-space: nowrap; color: var(--by-muted); transition: color 180ms ease; }
.by-nav a:hover, .by-nav .current-menu-item > a, .by-nav .current-menu-ancestor > a, .by-nav a[aria-current="page"] { color: var(--by-gold-light); }
.by-nav .current-menu-item > a::after, .by-nav a[aria-current="page"]::after { content: ""; position: absolute; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; left: 10%; right: 10%; background: var(--by-gold); }
.by-nav-toggle { display: none; width: 42px; height: 42px; border: 1px solid var(--by-border-strong); border-radius: 8px; background: transparent; align-items: center; justify-content: center; }
.by-header-search { margin-left: auto; width: 230px; max-width: 230px; }
.by-header-search form { display: flex; align-items: center; }
.by-header-search input { width: 100%; min-width: 0; height: 36px; padding: 6px 36px 6px 13px; font-size: 12px; border: 1px solid var(--by-border); border-radius: 7px; background: rgba(255, 255, 255, .035); }
.by-header-search button { width: 34px; height: 34px; margin-left: -35px; padding: 7px; background: transparent; border: 0; color: var(--by-subtle); }

/* Hero */
.by-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: 240px;
  overflow: hidden;
  background-color: #121c20;
  background-image: linear-gradient(90deg, #0d1518 0%, rgba(13, 21, 24, .97) 21%, rgba(13, 21, 24, .74) 44%, rgba(13, 21, 24, .12) 73%), var(--by-hero-image, url("../images/hero.png"));
  background-position: center, right center;
  background-size: cover;
}
.by-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(0deg, var(--by-bg), transparent 32%); }
.by-hero-content { position: relative; padding-top: 25px; padding-bottom: 28px; }
.by-kicker { display: block; margin: 0 0 9px; color: var(--by-gold); font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.by-hero-title { max-width: 810px; margin: 0 0 10px; font-size: clamp(26px, 3.15vw, 44px); line-height: 1.3; letter-spacing: .065em; font-weight: 650; text-shadow: 0 2px 18px rgba(0, 0, 0, .2); }
.by-hero p:not(.by-kicker) { max-width: 680px; margin: 0 0 18px; color: var(--by-muted); font-size: 13px; }
.by-search { display: flex; align-items: center; width: min(680px, 100%); min-height: 52px; border: 1px solid rgba(218, 225, 226, .3); border-radius: 9px; background: rgba(18, 26, 30, .78); box-shadow: 0 5px 20px rgba(0, 0, 0, .1); }
.by-search:focus-within { border-color: var(--by-gold); box-shadow: 0 0 0 3px rgba(213, 170, 106, .13); }
.by-search > svg, .by-search > label > svg { margin-left: 18px; color: var(--by-muted); width: 21px; height: 21px; }
.by-search label { display: flex; flex: 1; min-width: 0; align-items: center; }
.by-search input { width: 100%; min-width: 0; flex: 1; height: 50px; padding: 11px 18px; border: 0; outline: 0; color: var(--by-text); background: transparent; }
.by-search input::placeholder { color: #99a3a7; }
.by-search button { display: inline-flex; align-items: center; justify-content: center; align-self: stretch; min-width: 106px; padding: 10px 22px; border: 0; border-radius: 7px; margin: 3px; background: linear-gradient(135deg, #edc17d, #c99754); color: #241b0f; font-size: 14px; font-weight: 700; letter-spacing: .06em; }

/* Four clear entry points */
.by-section-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: 12px; margin-bottom: 38px; }
.by-section-tile { display: flex; align-items: center; gap: 19px; position: relative; min-width: 0; min-height: 100px; overflow: hidden; padding: 17px 20px; border: 1px solid var(--by-border); border-radius: 10px; background: linear-gradient(120deg, rgba(37, 48, 51, .62), rgba(18, 27, 30, .9)); transition: border-color 180ms ease, background 180ms ease, transform 180ms ease; }
.by-section-tile::after { content: "›"; display: grid; place-items: center; flex-shrink: 0; width: 27px; height: 27px; margin-left: auto; border-radius: 50%; background: rgba(213, 170, 106, .1); color: var(--by-gold-light); font-size: 25px; line-height: 1; }
.by-section-tile:has(> .by-icon)::after { display: none; }
.by-section-tile > .by-icon { width: 26px; height: 26px; margin-left: auto; padding: 5px; border-radius: 50%; background: rgba(213, 170, 106, .1); color: var(--by-gold-light); }
.by-section-tile > span:not(.by-tile-icon), .by-section-tile h2, .by-section-tile h3, .by-section-tile strong { min-width: 0; margin: 0; font-size: 18px; font-weight: 600; letter-spacing: .03em; }
.by-section-tile small { display: block; margin-top: 3px; color: var(--by-subtle); font-size: 11px; font-weight: 400; letter-spacing: .02em; }
.by-tile-icon { display: grid; place-items: center; flex-shrink: 0; width: 62px; height: 62px; color: var(--by-gold); filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .22)); }
.by-tile-icon img { width: 100%; height: 100%; object-fit: contain; }
.by-tile-icon svg { width: 48px; height: 48px; stroke-width: 1.35; }
.by-tile-icon:empty::before { content: "◇"; font-size: 45px; font-weight: 200; }
.by-tile-icon.by-tile-art { width: 80px; height: 72px; margin-block: -5px; background-image: url("../images/category-icons.png"); background-size: 400% 100%; background-repeat: no-repeat; }
.by-tile-art:empty::before { display: none; }

/* Resource catalogue */
.by-section-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 21px; }
.by-section-title { display: flex; align-items: center; gap: 13px; margin: 0; font-size: 24px; font-weight: 650; line-height: 1.4; letter-spacing: .04em; }
.by-section-title::before { content: ""; flex-shrink: 0; display: block; width: 5px; height: 23px; border-radius: 3px; background: linear-gradient(180deg, var(--by-gold-light), #b4803e); box-shadow: 0 0 13px rgba(213, 170, 106, .13); }
.by-section-head > a { color: var(--by-gold); font-size: 13px; }
.by-section-head > div > p { margin: 7px 0 0 18px; color: var(--by-subtle); font-size: 12px; }
.by-browse-all { display: flex; justify-content: center; padding: 32px 0 0; }
.by-browse-all .by-btn { padding-inline: 25px; }
.by-tools { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.by-tools select, .by-filter-form select, .by-filter-form input { max-width: 100%; min-height: 38px; padding: 7px 33px 7px 13px; border: 1px solid var(--by-border); border-radius: 7px; background-color: #192226; color: var(--by-muted); font-size: 13px; }
.by-tools select:hover, .by-filter-form select:hover { border-color: var(--by-border-strong); }
.by-view-toggle { display: flex; gap: 4px; padding: 3px; border: 1px solid var(--by-border); border-radius: 8px; background: var(--by-bg-deep); }
.by-view-toggle button { display: grid; place-items: center; width: 34px; height: 31px; min-height: 31px; padding: 7px; border: 0; border-radius: 5px; color: var(--by-subtle); background: transparent; }
.by-view-toggle button[aria-pressed="true"] { color: var(--by-gold-light); background: rgba(213, 170, 106, .12); }
.by-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.by-card { position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--by-border); border-radius: var(--by-radius); background: linear-gradient(145deg, #192328, #141d21); transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease; }
.by-card:focus-within { border-color: var(--by-gold); }
.by-card-cover { display: block; position: relative; overflow: hidden; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #243139, #121b20); }
.by-card-cover::before { content: "白屿 · 精选"; display: grid; position: absolute; inset: 0; place-items: center; color: #9d896a; letter-spacing: .2em; font-size: 13px; }
.by-card-cover img { position: relative; width: 100%; height: 100%; object-fit: cover; transition: transform 280ms ease; }
.by-card-cover img.by-image-error { visibility: hidden; }
.by-card-cover > span { position: absolute; z-index: 1; top: 11px; left: 11px; padding: 3px 8px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 4px; font-size: 10px; color: #f0e4d4; background: rgba(12, 18, 20, .8); backdrop-filter: blur(5px); }
.by-card-content { display: flex; flex: 1; flex-direction: column; min-width: 0; padding: 16px 17px 17px; }
.by-card-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin: 0 0 9px; font-size: 16px; font-weight: 600; line-height: 1.55; overflow-wrap: anywhere; }
.by-card-title a:hover { color: var(--by-gold-light); }
.by-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; color: var(--by-subtle); font-size: 11px; line-height: 1.7; }
.by-card-meta > span[aria-hidden="true"] { color: #6e7b80; }
.by-card-meta a:hover { color: var(--by-gold); }
.by-card-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 17px; margin-top: auto; }
.by-card-link { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: var(--by-gold); }
.by-card-link svg { width: 15px; height: 15px; }
.by-preview-trigger { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 30px; padding: 4px 9px; border: 1px solid var(--by-border); border-radius: 5px; background: rgba(255, 255, 255, .025); color: var(--by-muted); font-size: 11px; white-space: nowrap; }
.by-preview-trigger:hover { border-color: rgba(213, 170, 106, .5); color: var(--by-gold-light); }
.by-preview-trigger svg { width: 14px; height: 14px; }
.by-grid.by-poster-grid, .by-poster-grid.by-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.by-poster-grid .by-card-cover { aspect-ratio: 2 / 3; background: #0c1216; }
.by-poster-grid .by-card-cover img { object-fit: contain; }
.by-grid.is-list { grid-template-columns: 1fr; gap: 13px; }
.by-grid.is-list .by-card { display: grid; grid-template-columns: 220px minmax(0, 1fr); }
.by-grid.is-list .by-card-cover { height: 100%; min-height: 134px; aspect-ratio: auto; }
.by-grid.is-list .by-card-content { padding: 18px 22px; }
.by-grid.is-list .by-card-title { font-size: 18px; margin-bottom: 6px; }
.by-grid.is-list .by-card-actions { justify-content: flex-end; gap: 22px; padding-top: 10px; }
.by-poster-grid.is-list .by-card { grid-template-columns: 98px minmax(0, 1fr); }
.by-poster-grid.is-list .by-card-cover { min-height: 144px; }
.by-grid.by-poster-grid.is-list { grid-template-columns: 1fr; }

/* Controls, empty states, paging */
.by-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; max-width: 100%; padding: 9px 17px; border: 1px solid transparent; border-radius: 7px; font-size: 13px; font-weight: 600; line-height: 1.4; text-align: center; transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease; }
.by-btn-primary { color: #271b0d; border-color: #deb77c; background: linear-gradient(135deg, #ebc17f, #c99a59); box-shadow: 0 3px 12px rgba(197, 150, 81, .08); }
.by-btn-primary:hover { background: linear-gradient(135deg, #f3cf94, #d7ab6b); }
.by-btn-secondary { color: var(--by-text); border-color: var(--by-border-strong); background: rgba(255, 255, 255, .035); }
.by-btn-secondary:hover { border-color: var(--by-gold); color: var(--by-gold-light); background: rgba(213, 170, 106, .045); }
.by-btn-ghost { color: var(--by-gold); background: transparent; }
.by-btn-ghost:hover { background: rgba(213, 170, 106, .07); }
.by-btn-icon { width: 36px; min-height: 36px; padding: 8px; border-color: var(--by-border); background: transparent; color: var(--by-muted); }
.by-btn-icon svg { width: 18px; height: 18px; }
.by-card-actions .by-preview-trigger { min-height: 30px; padding: 4px 9px; border-color: var(--by-border); font-size: 11px; font-weight: 400; color: var(--by-muted); background: rgba(255, 255, 255, .025); }
.by-card-actions .by-preview-trigger:hover { color: var(--by-gold-light); border-color: rgba(213, 170, 106, .5); }
.by-header .by-nav-toggle { display: none; }
button:active, .by-btn:active { transform: scale(.98); }
.by-empty { padding: 58px 24px; border: 1px dashed var(--by-border-strong); border-radius: var(--by-radius); text-align: center; background: rgba(255, 255, 255, .015); color: var(--by-muted); }
.by-empty h2, .by-empty h3 { margin: 0 0 10px; font-size: 21px; color: var(--by-text); }
.by-empty p { max-width: 540px; margin: 0 auto 20px; }
.by-empty .by-search { margin-inline: auto; text-align: left; }
.by-pagination { margin: 38px 0 50px; }
.by-pagination .nav-links, .by-pagination ul { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.by-pagination a.page-numbers, .by-pagination span.page-numbers { display: inline-flex; justify-content: center; align-items: center; min-width: 38px; min-height: 38px; padding: 6px 12px; color: var(--by-muted); border: 1px solid var(--by-border); border-radius: 7px; background: #172024; font-size: 13px; }
.by-pagination .page-numbers.current { background: var(--by-gold); border-color: var(--by-gold); color: #20180d; font-weight: 700; }
.by-pagination a.page-numbers:hover { border-color: var(--by-gold); color: var(--by-gold); }
.by-pagination .dots { border-color: transparent; background: transparent; }
.by-footer { margin-top: 56px; border-top: 1px solid var(--by-border); background: #0d1417; }
.by-footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 100px; padding-block: 24px; color: var(--by-subtle); font-size: 12px; }
.by-footer p { margin: 0; }
.by-footer .by-brand { margin-bottom: 10px; font-size: 22px; }
.by-footer a { color: var(--by-muted); }
.by-footer a:hover { color: var(--by-gold); }
.by-footer nav { display: flex; flex-wrap: wrap; gap: 20px; }

/* Archive and article */
.by-breadcrumb { display: flex; flex-wrap: wrap; gap: 9px; padding: 23px 0; color: var(--by-subtle); font-size: 12px; }
.by-breadcrumb a:hover { color: var(--by-gold); }
.by-breadcrumb > span:last-child { color: var(--by-muted); }
.by-archive-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; padding: 14px 0 27px; margin-bottom: 25px; border-bottom: 1px solid var(--by-border); }
.by-archive-head h1 { margin: 0; font-size: 32px; line-height: 1.3; letter-spacing: .025em; }
.by-archive-head p { max-width: 700px; margin: 10px 0 0; color: var(--by-muted); font-size: 14px; }
.by-archive-head > .by-search { width: min(44%, 540px); flex-shrink: 0; }
.by-filter-form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.by-filter-form label { color: var(--by-subtle); font-size: 12px; }
.by-filter-form input { flex: 1; min-width: 140px; padding-right: 13px; }
.by-article-hero { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 40px; align-items: center; padding: 27px; margin: 0 0 32px; border: 1px solid var(--by-border); border-radius: 16px; background: linear-gradient(125deg, #1a252a, #131c20); }
.by-article-cover { position: relative; overflow: hidden; min-width: 0; border-radius: 10px; background: #0d1519; aspect-ratio: 16 / 10; }
.by-article-cover img { width: 100%; height: 100%; object-fit: contain; }
.by-article-cover img.by-image-error { visibility: hidden; }
.by-article-cover:has(img.by-image-error)::before { content: "白屿 · 精选资源"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--by-gold); font-size: 18px; letter-spacing: .2em; }
.by-article-cover:empty::before { content: "白屿 · 精选资源"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--by-gold); font-size: 18px; letter-spacing: .2em; }
.by-article-intro { min-width: 0; padding: 8px 17px 8px 0; }
.by-article-intro h1 { margin: 8px 0 16px; font-size: clamp(26px, 2.65vw, 39px); line-height: 1.4; letter-spacing: .02em; overflow-wrap: anywhere; }
.by-article-intro > p { margin: 17px 0 23px; color: var(--by-muted); font-size: 14px; line-height: 1.9; }
.by-article-intro .by-card-meta { font-size: 12px; }
.by-article-intro .by-card-actions { justify-content: flex-start; margin-top: 20px; padding-top: 0; gap: 12px; }
.by-article-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 30px; align-items: start; }
.by-article-body { min-width: 0; padding: 31px 34px 35px; border: 1px solid var(--by-border); border-radius: var(--by-radius); background: #151f23; }
.by-article-body > .by-section-title { margin-bottom: 25px; }
.by-content { color: #d2d8da; font-size: 15px; line-height: 1.95; overflow-wrap: anywhere; }
.by-content > :first-child { margin-top: 0; }
.by-content > :last-child { margin-bottom: 0; }
.by-content h1, .by-content h2, .by-content h3, .by-content h4 { margin-top: 1.8em; margin-bottom: .75em; color: var(--by-text); line-height: 1.45; }
.by-content h2 { padding-bottom: 12px; border-bottom: 1px solid var(--by-border); font-size: 23px; }
.by-content h3 { font-size: 19px; }
.by-content p { margin: 0 0 1.35em; }
.by-content a { color: var(--by-gold-light); text-decoration: underline; }
.by-content img { max-width: 100%; border-radius: 8px; margin-block: 24px; }
.by-content figure { max-width: 100%; margin-inline: 0; }
.by-content figcaption { color: var(--by-subtle); font-size: 12px; text-align: center; }
.by-content blockquote { margin: 24px 0; padding: 16px 22px; border-left: 3px solid var(--by-gold); border-radius: 0 8px 8px 0; background: rgba(213, 170, 106, .045); color: var(--by-muted); }
.by-content blockquote p:last-child { margin-bottom: 0; }
.by-content ul, .by-content ol { padding-left: 1.5em; }
.by-content li { margin-bottom: .45em; }
.by-content table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 13px; }
.by-content td, .by-content th { padding: 10px 14px; border: 1px solid var(--by-border-strong); text-align: left; }
.by-content th { background: #202b30; color: var(--by-text); }
.by-content pre { overflow-x: auto; padding: 20px; border: 1px solid var(--by-border); border-radius: 8px; background: #0e171b; font-size: 13px; line-height: 1.7; }
.by-content code { padding: 2px 5px; border-radius: 3px; background: rgba(255, 255, 255, .055); font-size: .88em; }
.by-content pre code { padding: 0; background: transparent; }
.by-content iframe, .by-content video { max-width: 100%; }
.by-content .wp-block-embed__wrapper { max-width: 100%; overflow: hidden; }
.by-content hr { border: 0; border-top: 1px solid var(--by-border); margin: 30px 0; }
.by-download-panel { position: sticky; top: 24px; padding: 23px; border: 1px solid rgba(213, 170, 106, .2); border-radius: var(--by-radius); background: linear-gradient(155deg, #1e282c, #141e22); box-shadow: var(--by-shadow); }
.by-download-panel > h2, .by-download-panel > h3 { margin: 0 0 19px; font-size: 19px; }
.by-download-panel > p, .by-download-note, .by-download-hint { margin: 16px 0 0; color: var(--by-subtle); font-size: 12px; line-height: 1.8; }
.by-download-panel > .by-empty { padding: 23px 15px; }
.by-download-list { display: grid; gap: 12px; }
.by-download-row { min-width: 0; padding: 14px; border: 1px solid var(--by-border); border-radius: 8px; background: rgba(8, 15, 19, .27); }
.by-download-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.by-download-head > .by-btn { flex-shrink: 0; min-height: 34px; padding: 7px 12px; font-size: 12px; }
.by-download-head > .by-btn svg { width: 13px; height: 13px; }
.by-provider { display: flex; align-items: center; gap: 9px; min-width: 0; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.by-provider-icon { display: grid; place-items: center; flex-shrink: 0; width: 30px; height: 30px; border-radius: 8px; background: rgba(213, 170, 106, .12); border: 1px solid rgba(213, 170, 106, .15); color: var(--by-gold-light); font-size: 14px; }
.by-provider > svg { width: 29px; height: 29px; padding: 5px; color: var(--by-gold); border-radius: 7px; background: rgba(213, 170, 106, .08); }
.by-download-name { margin: 0 0 9px; color: var(--by-muted); font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
.by-download-size { margin: 5px 0 0; color: var(--by-subtle); font-size: 11px; }
.by-code { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; color: var(--by-subtle); font-size: 12px; }
.by-code code { padding: 0 3px; color: var(--by-muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
.by-copy { flex-shrink: 0; min-width: 47px; min-height: 29px; padding: 3px 9px; border: 1px solid var(--by-border-strong); border-radius: 5px; color: var(--by-muted); background: rgba(255, 255, 255, .025); font-size: 11px; transition: color 160ms, border-color 160ms, background 160ms; }
.by-copy:hover, .by-copy.is-copied { color: var(--by-gold-light); border-color: rgba(213, 170, 106, .6); background: rgba(213, 170, 106, .07); }
.by-copy.is-copy-error { color: #f1b4a7; border-color: #ab7066; }
.by-copy svg { width: 12px; height: 12px; }
.by-download-unavailable { margin: 0; color: var(--by-subtle); font-size: 12px; }
.by-related { margin-top: 45px; }
.by-related > .by-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.by-page, .by-protected { margin-block: 30px 50px; padding: 32px; border: 1px solid var(--by-border); border-radius: var(--by-radius); background: #151f23; }
.by-page > h1, .by-protected h1 { margin-top: 0; font-size: 32px; }
.by-protected input[type="password"] { width: min(100%, 260px); min-height: 42px; margin: 6px 10px; padding: 8px 12px; border: 1px solid var(--by-border-strong); border-radius: 6px; background: #10191d; }
.by-protected input[type="submit"] { min-height: 42px; padding: 8px 22px; border: 0; border-radius: 6px; color: #271b0d; background: var(--by-gold); }
.by-header-search .by-search { width: 100%; min-height: 36px; border-radius: 7px; }
.by-header-search .by-search > svg { width: 15px; height: 15px; margin-left: 10px; }
.by-header-search .by-search input { height: 34px; padding: 5px 10px; font-size: 11px; }
.by-header-search .by-search button { min-width: 42px; width: auto; height: auto; margin: 3px; padding: 4px 7px; font-size: 11px; }

/* Native dialog: a compact resource inspector on desktop, a sheet on mobile. */
.by-preview {
  position: fixed;
  inset: 18px 18px 18px auto;
  width: min(420px, calc(100vw - 36px));
  max-width: none;
  height: calc(100dvh - 36px);
  max-height: calc(100dvh - 36px);
  padding: 0;
  margin: 0;
  overflow: hidden;
  color: var(--by-text);
  border: 1px solid rgba(213, 170, 106, .21);
  border-radius: 14px;
  background: #172125;
  box-shadow: -18px 0 80px rgba(0, 0, 0, .35);
}
.by-preview[open] { animation: by-preview-in 210ms ease-out both; }
.by-preview::backdrop { background: rgba(4, 9, 12, .55); backdrop-filter: blur(3px); animation: by-backdrop-in 180ms ease-out both; }
.by-preview-shell { position: relative; height: 100%; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #4f4f44 #172125; padding: 21px; }
.by-preview-header { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 19px; }
.by-preview-header h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 19px; letter-spacing: .02em; }
.by-preview-header h2::before { content: ""; width: 4px; height: 18px; border-radius: 2px; background: var(--by-gold); }
.by-preview-header [data-preview-close] { width: 32px; min-height: 32px; padding: 6px; border: 0; color: var(--by-muted); background: rgba(255, 255, 255, .04); }
.by-preview-header [data-preview-close]:hover { background: rgba(255, 255, 255, .09); color: var(--by-text); }
.by-preview-shell > [data-preview-close] { position: absolute; z-index: 2; top: 18px; right: 18px; display: grid; place-items: center; width: 32px; height: 32px; padding: 6px; border: 0; border-radius: 6px; color: var(--by-muted); background: rgba(255, 255, 255, .04); }
.by-preview-shell > [data-preview-close]:hover { color: var(--by-text); background: rgba(255, 255, 255, .09); }
.by-preview-shell > h2 { padding-right: 38px; margin: 0 0 20px; font-size: 19px; letter-spacing: .02em; }
.by-preview-shell > h2::before { content: ""; display: inline-block; width: 4px; height: 18px; margin-right: 10px; border-radius: 2px; background: var(--by-gold); vertical-align: -2px; }
.by-preview-image { width: 100%; max-height: 245px; aspect-ratio: 16 / 10; border: 1px solid var(--by-border); border-radius: 8px; object-fit: contain; background: #0b1418; }
.by-preview-image.by-image-error { display: none; }
.by-preview-title { margin: 17px 0 9px; padding: 0; font-size: 22px; font-weight: 650; line-height: 1.55; overflow-wrap: anywhere; }
.by-preview-meta { display: flex; flex-wrap: wrap; gap: 7px; color: var(--by-subtle); font-size: 12px; }
.by-preview-meta > span + span::before { content: "·"; margin-right: 7px; color: var(--by-gold); }
.by-preview-excerpt { margin: 17px 0 21px; color: var(--by-muted); font-size: 14px; line-height: 1.9; overflow-wrap: anywhere; }
.by-preview-downloads { padding-top: 21px; margin-top: 21px; border-top: 1px solid var(--by-border-strong); }
.by-preview-downloads h3 { margin: 0 0 14px; font-size: 15px; }
.by-preview-more { display: flex; justify-content: center; width: 100%; margin-top: 21px; padding-top: 18px; border-top: 1px solid var(--by-border); border-radius: 0; color: var(--by-gold); font-size: 13px; font-weight: 600; }
.by-preview-state { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 30px 4px; }
.by-preview-state h3 { margin: 0; font-size: 18px; }
.by-preview-state p { margin: 0; color: var(--by-muted); font-size: 14px; line-height: 1.85; }
.by-preview-state .by-preview-state-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.by-preview-loading::before { content: ""; width: 25px; height: 25px; border: 2px solid rgba(213, 170, 106, .16); border-top-color: var(--by-gold); border-radius: 50%; animation: by-spin .8s linear infinite; }
.by-status { position: fixed; z-index: 150; bottom: 25px; left: 50%; transform: translateX(-50%); max-width: calc(100vw - 32px); padding: 10px 18px; border: 1px solid rgba(213, 170, 106, .35); border-radius: 8px; background: #263035; color: #f0e4d2; box-shadow: var(--by-shadow); font-size: 13px; text-align: center; pointer-events: none; }
.by-status:empty { display: none; }
@keyframes by-preview-in { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes by-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes by-spin { to { transform: rotate(360deg); } }

@media (hover: hover) and (pointer: fine) {
  .by-card:hover { transform: translateY(-3px); border-color: rgba(213, 170, 106, .55); box-shadow: 0 12px 25px rgba(0, 0, 0, .2); }
  .by-card:hover .by-card-cover img { transform: scale(1.025); }
  .by-section-tile:hover { transform: translateY(-2px); border-color: rgba(213, 170, 106, .4); background: linear-gradient(120deg, rgba(49, 57, 56, .75), rgba(24, 33, 35, .95)); }
}
@media (min-width: 1580px) { .by-hero { min-height: 270px; } }
@media (max-width: 1200px) {
  .by-header-inner { gap: 30px; }
  .by-nav, .by-nav ul { gap: 24px; }
  .by-header-search { max-width: 180px; }
  .by-section-tile { gap: 12px; padding-inline: 16px; }
  .by-tile-icon { width: 48px; height: 52px; }
  .by-section-tile > span:not(.by-tile-icon), .by-section-tile h2, .by-section-tile h3, .by-section-tile strong { font-size: 16px; }
  .by-card-content { padding-inline: 14px; }
  .by-download-panel { padding: 19px; }
}
@media (max-width: 1100px) {
  .by-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
  .by-grid.by-poster-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .by-header-search { display: none; }
  .by-nav { margin-left: auto; }
  .by-article-hero { gap: 27px; padding: 23px; }
  .by-article-intro { padding-right: 0; }
  .by-article-layout { grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 22px; }
  .by-article-body { padding: 26px; }
}
@media (max-width: 820px) {
  .by-wrap { width: calc(100% - 40px); }
  .by-header-inner { gap: 20px; min-height: 66px; }
  .by-header { min-height: 66px; }
  .by-brand { font-size: 25px; }
  .by-nav, .by-nav ul { gap: 20px; }
  .by-nav a { font-size: 12px; min-height: 66px; }
  .by-hero { min-height: 234px; background-position: center, 70% center; }
  .by-hero-title { font-size: 32px; letter-spacing: .04em; }
  .by-hero-content { padding-block: 31px; }
  .by-search { width: min(580px, 100%); }
  .by-section-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; margin-bottom: 29px; }
  .by-section-tile { min-height: 84px; padding: 13px 17px; gap: 17px; }
  .by-tile-icon { width: 51px; height: 51px; }
  .by-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
  .by-grid.by-poster-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .by-related > .by-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .by-section-title { font-size: 22px; }
  .by-article-hero { gap: 22px; }
  .by-article-intro h1 { font-size: 26px; }
  .by-article-layout { grid-template-columns: 1fr; }
  .by-download-panel { position: static; grid-row: 1; }
  .by-download-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .by-preview .by-download-list { grid-template-columns: 1fr; }
  .by-footer-inner { align-items: flex-start; }
  .by-archive-head { align-items: flex-start; flex-direction: column; gap: 19px; }
  .by-archive-head > .by-search { width: 100%; }
}
@media (max-width: 640px) {
  html { scroll-padding-top: 24px; }
  .by-wrap { width: calc(100% - 32px); }
  .by-header-inner { min-height: 62px; justify-content: space-between; }
  .by-header { min-height: 62px; }
  .by-brand { font-size: 25px; }
  .by-brand img { max-height: 34px; }
  .by-header .by-nav-toggle { display: inline-flex; }
  .by-nav { display: none; position: absolute; z-index: 40; inset: 62px 0 auto; margin: 0; padding: 10px 16px 16px; border-bottom: 1px solid var(--by-border-strong); background: #111b1f; box-shadow: 0 14px 24px rgba(0, 0, 0, .2); }
  .by-nav.is-open { display: block; }
  .by-nav ul { display: grid; grid-template-columns: repeat(2, 1fr); gap: 5px; }
  .by-nav > a { display: inline-flex; width: calc(50% - 5px); }
  .by-nav a { width: 100%; min-height: 43px; padding: 9px 14px; border-radius: 6px; font-size: 13px; }
  .by-nav a[aria-current="page"], .by-nav .current-menu-item > a { background: rgba(213, 170, 106, .07); }
  .by-nav .current-menu-item > a::after, .by-nav a[aria-current="page"]::after { display: none; }
  .by-hero { min-height: 239px; background-image: linear-gradient(90deg, rgba(13, 21, 24, .94), rgba(13, 21, 24, .7) 60%, rgba(13, 21, 24, .34)), var(--by-hero-image, url("../images/hero.png")); }
  .by-hero-title { max-width: 420px; font-size: 28px; line-height: 1.45; margin-bottom: 20px; }
  .by-kicker { font-size: 10px; letter-spacing: .14em; }
  .by-search { min-height: 47px; }
  .by-search input { height: 45px; padding-inline: 12px; font-size: 14px; }
  .by-search > svg, .by-search > label > svg { width: 18px; height: 18px; margin-left: 13px; }
  .by-search button { min-width: 76px; padding-inline: 13px; font-size: 13px; }
  .by-section-tile { display: grid; grid-template-columns: 38px minmax(0, 1fr) 18px; gap: 8px; min-height: 79px; padding: 11px 10px; }
  .by-tile-icon { width: 38px; height: 44px; }
  .by-tile-icon svg { width: 36px; height: 36px; }
  .by-tile-icon.by-tile-art { width: 38px; height: 46px; }
  .by-section-tile > .by-icon { width: 18px; height: 18px; padding: 3px; margin-left: 0; }
  .by-section-tile > span:not(.by-tile-icon), .by-section-tile h2, .by-section-tile h3, .by-section-tile strong { font-size: 14px; letter-spacing: .01em; white-space: nowrap; }
  .by-section-tile::after { width: 18px; height: 18px; font-size: 21px; }
  .by-section-tile small { font-size: 9px; }
  .by-section-head { gap: 12px; margin-bottom: 17px; }
  .by-section-title { font-size: 20px; gap: 10px; }
  .by-section-title::before { height: 19px; width: 4px; }
  .by-tools { gap: 7px; }
  .by-tools select { min-height: 35px; padding: 5px 22px 5px 9px; font-size: 11px; max-width: 113px; }
  .by-view-toggle { gap: 1px; padding: 2px; }
  .by-view-toggle button { width: 28px; height: 28px; min-height: 28px; padding: 6px; }
  .by-card-content { padding: 12px; }
  .by-card-title { font-size: 14px; }
  .by-card-meta { font-size: 10px; gap: 4px 7px; }
  .by-card-meta > * + *::before { margin-right: 7px; }
  .by-card-actions { padding-top: 12px; }
  .by-preview-trigger { padding-inline: 7px; font-size: 10px; }
  .by-card-link { font-size: 11px; gap: 4px; }
  .by-card-link svg { width: 13px; }
  .by-grid.by-poster-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .by-grid.is-list .by-card { grid-template-columns: 128px minmax(0, 1fr); }
  .by-grid.is-list .by-card-cover { min-height: 129px; }
  .by-grid.is-list .by-card-content { padding: 12px; }
  .by-grid.is-list .by-card-title { font-size: 14px; }
  .by-grid.is-list .by-card-actions { justify-content: space-between; gap: 8px; }
  .by-poster-grid.is-list .by-card { grid-template-columns: 86px minmax(0, 1fr); }
  .by-archive-head { padding-top: 5px; }
  .by-archive-head h1 { font-size: 28px; }
  .by-archive-head p { font-size: 13px; }
  .by-article-hero { grid-template-columns: 1fr; gap: 19px; padding: 16px; border-radius: 12px; margin-bottom: 20px; }
  .by-article-cover { aspect-ratio: 16 / 10; max-height: 360px; }
  .by-article-intro { padding: 0 2px 4px; }
  .by-article-intro h1 { margin-top: 5px; font-size: 26px; }
  .by-article-intro > p { margin-bottom: 16px; font-size: 13px; }
  .by-article-layout { gap: 20px; }
  .by-article-body { padding: 22px 18px; }
  .by-content { font-size: 14px; }
  .by-content h2 { font-size: 21px; }
  .by-download-panel { padding: 19px 16px; }
  .by-download-list { grid-template-columns: 1fr; }
  .by-footer { margin-top: 38px; }
  .by-footer-inner { flex-direction: column; gap: 13px; font-size: 11px; }
  .by-footer nav { gap: 17px; }
  .by-page, .by-protected { padding: 22px 18px; }
  .by-preview { inset: auto 0 0; width: 100%; height: auto; max-height: 88dvh; border-radius: 18px 18px 0 0; border-bottom: 0; box-shadow: 0 -15px 70px rgba(0, 0, 0, .4); }
  .by-preview[open] { animation-name: by-sheet-in; }
  .by-preview-shell { max-height: 88dvh; padding: 25px 20px max(25px, env(safe-area-inset-bottom)); }
  .by-preview-shell::before { content: ""; position: absolute; top: 9px; left: calc(50% - 18px); width: 36px; height: 3px; border-radius: 3px; background: #4b5558; }
  .by-preview-shell > [data-preview-close] { top: 22px; }
  .by-preview-image { max-height: 260px; }
  .by-preview-title { font-size: 21px; }
  .by-status { bottom: max(20px, env(safe-area-inset-bottom)); }
}
@media (max-width: 480px) {
  .by-grid { grid-template-columns: 1fr; gap: 18px; }
  .by-card-title { font-size: 16px; }
  .by-card-content { padding: 15px 16px 16px; }
  .by-card-meta { font-size: 11px; }
  .by-card-actions { padding-top: 15px; }
  .by-preview-trigger { font-size: 11px; padding-inline: 10px; }
  .by-card-link { font-size: 12px; }
  .by-poster-grid .by-card-content { padding: 12px; }
  .by-poster-grid .by-card-title { font-size: 14px; }
  .by-poster-grid .by-card-actions { gap: 6px; flex-wrap: wrap; }
  .by-poster-grid .by-card-link { font-size: 11px; }
  .by-related > .by-grid { grid-template-columns: 1fr; }
  .by-section-head { flex-wrap: wrap; }
  .by-tools { margin-left: auto; }
  .by-section-title { font-size: 19px; }
  .by-tools select { max-width: 100px; }
  .by-grid.is-list .by-card { grid-template-columns: 108px minmax(0, 1fr); }
  .by-grid.is-list .by-card-actions { flex-wrap: wrap; }
  .by-poster-grid.is-list .by-card { grid-template-columns: 83px minmax(0, 1fr); }
}
@media (hover: none), (pointer: coarse) {
  .by-card:hover, .by-section-tile:hover, .by-card:hover .by-card-cover img { transform: none; }
  .by-copy { min-height: 34px; }
  .by-card-actions .by-preview-trigger { min-height: 34px; }
}
@media (max-width: 380px) {
  .by-section-tile { grid-template-columns: 34px minmax(0, 1fr); }
  .by-tile-icon.by-tile-art { width: 34px; height: 40px; }
  .by-section-tile > .by-icon { display: none; }
  .by-section-tile::after { display: none; }
  .by-brand > span { display: none; }
}
@keyframes by-sheet-in { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .by-card:hover, .by-section-tile:hover, .by-card:hover .by-card-cover img, button:active, .by-btn:active { transform: none; }
}
@media print {
  body.by-site { color: #222; background: #fff; }
  .by-header, .by-footer, .by-preview, .by-preview-trigger, .by-nav-toggle, .by-tools, .by-copy, .by-related { display: none !important; }
  .by-wrap { width: 100%; }
  .by-article-hero, .by-article-body, .by-download-panel { color: #222; background: #fff; border-color: #ccc; box-shadow: none; }
  .by-article-layout { display: block; }
  .by-download-panel { position: static; margin-top: 24px; }
  .by-content, .by-content h2, .by-content h3, .by-article-intro h1 { color: #222; }
}
