/* Source: yms-white-child/{layout-gallery,skin-niji}.css and pixiv-parts-catalog.md.
 * Gallery dimensions and niji visual rules mapped to the existing yme renderer.
 * Product bodies, provider identities and purchase links keep their existing owners. */
:root { --yme-paper:#fff; --yme-canvas:#fff; --yme-ink:#171717; --yme-muted:#686868; --yme-line:#e5e5e5; --yme-plum:#222; --yme-plum-dark:#111; --yme-shadow:none; --yme-prism:#222; --yme-prism-surface:#222; }
body.yme-design-v1 { background:#fff!important; color:var(--yme-ink); }
.yme-brandbar { background:#fff!important; border-bottom:1px solid var(--yme-line); box-shadow:none!important; }
.yme-brandbar::before,.yme-brandbar::after { content:none!important; }
.yme-brandbar__inner { display:flex; width:100%; max-width:1280px; min-height:60px; padding:14px 24px; gap:22px; }
.yme-brand { flex:0 1 auto; width:auto; color:var(--yme-ink)!important; font-size:22px; font-weight:800; letter-spacing:0; text-decoration:none; }
.yme-brand img { width:auto!important; max-width:260px; max-height:48px; object-fit:contain; }
.yme-search { order:3; flex:1; max-width:360px; margin-left:auto; min-height:40px; border:1px solid var(--yme-line); border-radius:4px; box-shadow:none!important; }
.yme-search input { border:0; border-radius:0; background:#fff; font-size:13px; }
.yme-search button { background:var(--yme-ink)!important; color:#fff; border-radius:0; }
.yme-nav { order:2; gap:2px; }
.yme-nav a { padding:0 10px; color:var(--yme-ink)!important; font-size:14px; font-weight:700; }
.yme-nav a::after { background:var(--yme-prism); }
.yme-shell { width:100%; max-width:1280px; background:#fff!important; padding:20px 24px 48px; }
.yme-gallery-shell { display:grid; grid-template-columns:280px minmax(0,1fr) 280px; gap:18px; align-items:start; }
.yme-feed { min-width:0; padding:0!important; border:0!important; box-shadow:none!important; background:#fff!important; }
.yme-section-head { border:0!important; margin:0 0 14px!important; padding:0 0 0 15px!important; background:#fff!important; position:relative; }
.yme-section-head::before { content:''; position:absolute; inset:1px auto 0 0; width:3px; border-radius:3px; background:var(--yme-prism); }
.yme-section-head h2 { color:var(--yme-ink)!important; font-size:20px; font-weight:800; }
.yme-section-head h2::before { content:none; }
.yme-grid { display:grid!important; grid-template-columns:repeat(2,minmax(0,1fr))!important; gap:16px 12px!important; }
.yme-card { display:flex; flex-direction:column; margin:0; border:0!important; border-radius:0!important; background:#fff!important; box-shadow:none!important; overflow:hidden; }
.yme-card__link { display:block; height:auto; color:var(--yme-ink)!important; }
.yme-card__cover { display:block; width:100%; height:auto!important; aspect-ratio:1/1!important; border-radius:2px; background:#f3f4f6!important; overflow:hidden; }
.yme-card__cover img { width:100%; height:100%!important; object-fit:contain!important; }
.yme-card__body,.yme-feed .yme-card__body { display:block; min-height:0!important; padding:6px 0 0!important; }
.yme-card__title { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; min-height:3em; margin:0 0 4px; font-size:14px!important; line-height:1.5!important; font-weight:700; color:var(--yme-ink)!important; }
.yme-card__meta { margin:0 0 3px; font-size:11px!important; color:var(--yme-muted)!important; }
.yme-card__identity { font-size:10px!important; color:var(--yme-muted)!important; }
.yme-card__provider { border-radius:4px!important; background:var(--yme-prism-surface)!important; }
.yme-card__term { color:var(--yme-ink)!important; background:transparent!important; padding:0!important; }
.yme-discover { border:0; border-radius:0; padding:0; }
.yme-discover h2 { margin:0 0 14px; padding-left:15px; position:relative; font-size:18px; font-weight:800; color:var(--yme-ink); }
.yme-discover h2::before { content:''; position:absolute; inset:1px auto 0 0; width:3px; border-radius:3px; background:var(--yme-prism); }
.yme-discover>a { display:block; padding:10px 0; border-bottom:1px solid #eef0f3; color:var(--yme-ink); font-size:13px; text-decoration:none; }
.yme-discover p { font-size:12px; line-height:1.8; color:var(--yme-muted); }
.yme-side-recent { margin-top:28px; }
.yme-side-recent .yme-card { margin-bottom:12px; }
.yme-side-recent .yme-card__link { display:grid; grid-template-columns:76px minmax(0,1fr); gap:10px; align-items:center; }
.yme-side-recent .yme-card__body { padding:0!important; }
.yme-side-recent .yme-card__cover { grid-column:1; grid-row:1; }
.yme-side-recent .yme-card__body { grid-column:2; grid-row:1; }
.yme-side-recent .yme-card__provider,.yme-side-recent .yme-card__identity,.yme-side-recent .yme-card__meta { display:none!important; }
.yme-side-recent .yme-card__title { font-size:12px!important; }
.yme-single-shell { max-width:808px; }
.yme-single { background:#fff!important; border:0!important; border-radius:0!important; padding:0!important; }
.yme-single__head h1 { color:var(--yme-ink)!important; font-size:27px!important; line-height:1.6; }
.yme-single .entry-content { color:var(--yme-ink); line-height:1.9; }
.yme-single .entry-content img { max-width:100%; height:auto; }
.yme-footer { background:#0a0a0a!important; color:#bdbdbd!important; border-top:1px solid #222; box-shadow:none!important; }
.yme-footer a { color:#fff!important; }
.yme-footer__notice { color:#bdbdbd!important; }
body.yme-design-v1 :focus-visible { outline:3px solid #222; outline-offset:3px; }
@media(max-width:1099px) { .yme-gallery-shell { display:flex; flex-direction:column; gap:28px; } .yme-gallery-shell>.yme-feed { order:1; width:100%; } .yme-gallery-shell>.yme-discover { order:3; width:100%; } .yme-gallery-shell>.yme-discover:last-child { order:2; } }
@media(max-width:767px) { .yme-brandbar__inner { padding:14px 16px; gap:12px; flex-wrap:wrap; } .yme-brand { flex:0 0 100%; width:100%; font-size:20px; } .yme-brand img { max-width:200px; } .yme-search { display:flex!important; order:3; flex:0 0 100%; width:100%; max-width:none; min-width:0; } .yme-nav { flex-wrap:wrap; } .yme-nav a { font-size:13px; padding-left:0; padding-right:14px; } .yme-shell { padding:16px 16px 48px; } .yme-grid { gap:12px 8px!important; } .yme-card__title { font-size:13px!important; } .yme-card__meta,.yme-card__identity { display:none!important; } .yme-single__head h1 { font-size:23px!important; } }

/* Full-width archives use native 4:3 covers. Keep the 560px originals below
 * their native display width on desktop instead of enlarging square tiles. */
body.archive .yme-shell > .yme-feed .yme-card__cover { aspect-ratio:4/3!important; }
body.archive .yme-shell > .yme-feed .yme-card__cover img { object-fit:cover!important; }
@media(min-width:900px) {
  body.archive .yme-shell > .yme-feed .yme-grid { grid-template-columns:repeat(3,minmax(0,1fr))!important; }
}
