:root:not([data-mode="dark"]) {
  --primary: #15803d;
  --accent: #ca8a04;
  --btn-text: #ffffff;
  --bg: #fefefc;
  --surface: #f5f5f4;
  --text: #14261b;
  --border: rgba(0, 0, 0, 0.08);
  --shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
  --img-bg: color-mix(in srgb, var(--surface) 45%, #ffffff);
  --radius: 14px;
  --btn-radius: calc(var(--radius) * 0.75);
  --page-pad: 48px;
  --card-min: 240px;
  --primary-ink: var(--primary);
  --badge-ok-bg: #e7f6ec;
  --badge-ok-fg: #157a3d;
  --badge-off-bg: #fdecec;
  --badge-off-fg: #b3261e;
}
:root[data-mode="dark"] {
  --primary: #15803d;
  --accent: #ca8a04;
  --btn-text: #ffffff;
  --bg: #0f1512;
  --surface: #1a231d;
  --text: #e8efe9;
  --border: rgba(255, 255, 255, 0.1);
  --shadow: 0 6px 20px rgba(0, 0, 0, 0.7);
  --img-bg: color-mix(in srgb, var(--surface) 70%, #ffffff 10%);
  --radius: 14px;
  --btn-radius: calc(var(--radius) * 0.75);
  --page-pad: 48px;
  --card-min: 240px;
  --primary-ink: color-mix(in srgb, var(--primary) 62%, #ffffff);
  --badge-ok-bg: rgba(21, 122, 61, 0.3);
  --badge-ok-fg: #8ce0ae;
  --badge-off-bg: rgba(190, 45, 38, 0.32);
  --badge-off-fg: #ffab9f;
}
html { font-size: 16px; }
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; background: var(--bg); color: var(--text); line-height: 1.55; font-size: 1rem; transition: background-color .25s ease, color .25s ease; }


.crumbs, .hero, .grid, .split { width: 100%; max-width: 1400px; margin-left: auto; margin-right: auto; }

.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px var(--page-pad); position: sticky; top: 0; z-index: 10;
  background: var(--bg); border-bottom: 1px solid var(--border); transition: background-color .25s ease, border-color .25s ease;
}
.brand { font-weight: 800; font-size: 1.25rem; color: var(--primary-ink); text-decoration: none; letter-spacing: -.02em; display: inline-flex; align-items: center; }
.site-logo { height: 30px; width: auto; max-width: min(320px, 60vw); object-fit: contain; display: block; }
html:not([data-mode="dark"]) .logo-dark { display: none; }
[data-mode="dark"] .logo-light { display: none; }
.site-header nav a { margin-left: 18px; text-decoration: none; color: var(--text); opacity: .8; }
.site-header nav a:hover { opacity: 1; color: var(--primary-ink); }
.theme-toggle { margin-left: 18px; width: 34px; height: 34px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; flex: none; }
.theme-toggle:hover { opacity: .85; }
.theme-toggle svg { width: 17px; height: 17px; display: block; }
.theme-toggle .ic-sun { display: none; }
[data-mode="dark"] .theme-toggle .ic-moon { display: none; }
[data-mode="dark"] .theme-toggle .ic-sun { display: block; }

.hero { padding: 3.5rem var(--page-pad) 1.5rem; max-width: min(46rem, 1400px); }
.hero h1 { font-size: 2.4rem; letter-spacing: -.03em; margin-bottom: .5rem; }
.hero p { opacity: .75; font-size: 1.05rem; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--card-min), 1fr)); gap: 22px; padding: 1.75rem var(--page-pad) 3rem; }
.card { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.card > a { display: block; }
.card img, .card-img-empty { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; background: var(--img-bg); }
.card-body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h3 { font-size: 1rem; line-height: 1.35; }
.card h3 a, .card-body a:not(.btn) { color: var(--text); text-decoration: none; }
.card-short { font-size: .85rem; opacity: .72; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.price { font-weight: 700; color: var(--primary-ink); }
.price s { color: inherit; opacity: .45; font-weight: 500; margin-left: 6px; }
.card-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 6px; }

.btn { display: inline-block; text-decoration: none; text-align: center; border-radius: var(--btn-radius); padding: 10px 16px; font-weight: 600; font-size: .95rem; cursor: pointer; }
.btn-primary { background: var(--primary); color: var(--btn-text); flex: 1; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { border: 1px solid var(--border); color: var(--text); }
.btn-large { padding: 14px 26px; font-size: 1.05rem; margin-top: 14px; }

.crumbs { padding: 22px var(--page-pad) 0; font-size: .9rem; opacity: .7; }
.split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 44px; padding: 22px var(--page-pad) 8px; align-items: start; }
.split-reverse .gallery { order: 2; }
.main-image { width: 100%; min-width: 0; max-width: 100%; border-radius: var(--radius); background: var(--img-bg); box-shadow: var(--shadow); }
.thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.thumbs img { width: 72px; height: 72px; object-fit: cover; border-radius: calc(var(--radius) * .5); cursor: pointer; background: var(--img-bg); }
.info h1 { font-size: 1.8rem; letter-spacing: -.02em; margin-bottom: 6px; line-height: 1.2; }
.muted { opacity: .55; font-size: .85rem; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; margin-bottom: 6px; }
.badge-ok { background: var(--badge-ok-bg); color: var(--badge-ok-fg); }
.badge-off { background: var(--badge-off-bg); color: var(--badge-off-fg); }
.price-large { font-size: 1.5rem; font-weight: 800; color: var(--primary-ink); margin-top: 4px; }

.pdesc { margin-top: 28px; max-width: 45ch; line-height: 1.65; }
.pdesc p, .pdesc ul, .pdesc ol, .pdesc blockquote, .pdesc img, .pdesc h2, .pdesc h3 { margin-top: 10px; }
.pdesc > :first-child { margin-top: 0; }
.pdesc img { border-radius: calc(var(--radius) * .75); max-width: 100%; }
.pdesc-box { background: var(--surface); border: 1px solid var(--border); border-radius: calc(var(--radius) * .75); padding: 18px 20px; box-shadow: var(--shadow); }

.site-footer { padding: 34px var(--page-pad); font-size: .88rem; opacity: .7; border-top: 1px solid var(--border); margin-top: 40px; }

@media (max-width: 760px) {
  .split, .split-reverse { grid-template-columns: 1fr; gap: 24px; }
  .hero h1 { font-size: 1.9rem; }
}