/* GRAIN theme — from prototype */
/* GRAIN — Stage desktop + mobile feed variants M1–M4 */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.mfeed {
  --bg: #0e0e10;
  --fg: #f2f2f0;
  --muted: #929296;
  --line: rgba(255,255,255,.08);
  --accent: #ff8a3d;
  --chip-on-fg: #1a120c;
  --sidebar: #141416;
  --proto-h: 34px;
  margin: 0;
  min-height: 100vh;
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.proto-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
  align-items: center;
  padding: .3rem .55rem;
  background: rgba(10,10,12,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  font-size: .72rem;
}
.proto-bar a {
  padding: .28rem .5rem;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 600;
}
.proto-bar a.is-on {
  background: var(--accent);
  color: var(--chip-on-fg);
  font-weight: 700;
}

.brand {
  font-family: Syne, sans-serif;
  font-weight: 800;
  letter-spacing: -.04em;
  font-size: 1.15rem;
}
.kicker {
  margin: 0 0 .25rem;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .85rem;
}
.section-head h2 {
  margin: 0;
  font-family: Syne, sans-serif;
  font-size: 1.25rem;
  letter-spacing: -.03em;
}
.see { font-size: .85rem; font-weight: 600; color: var(--muted); }

.note {
  margin: 0 0 1rem;
  padding: .65rem .8rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  color: var(--muted);
  font-size: .82rem;
}
.note strong { color: var(--fg); }

/* —— shell: desktop Stage always; mobile varies —— */
.shell { display: grid; min-height: 100vh; }
@media (min-width: 960px) {
  .shell { grid-template-columns: 220px 1fr; }
}

.side {
  display: none;
  flex-direction: column;
  gap: .25rem;
  padding: 1.15rem 1rem;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  position: sticky;
  top: var(--proto-h);
  height: calc(100vh - var(--proto-h));
}
@media (min-width: 960px) { .side { display: flex; } }
.side .brand { margin: 0 .3rem 1rem; }
.side a {
  padding: .55rem .7rem;
  border-radius: 10px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--muted);
}
.side a.is-on {
  color: var(--fg);
  background: rgba(255,138,61,.12);
  box-shadow: inset 3px 0 0 var(--accent);
}

.main { min-width: 0; }
.top {
  position: sticky;
  top: var(--proto-h);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: .45rem;
  padding: .55rem .75rem;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.top__row { display: flex; align-items: center; gap: .55rem; }
.search {
  flex: 1;
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 0 .85rem;
  border-radius: 10px;
  background: #121214;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: .85rem;
}
.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .2rem;
  padding: .18rem;
  border-radius: 10px;
  background: #121214;
  border: 1px solid var(--line);
}
.tabs a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border-radius: 8px;
  font-size: .78rem;
  font-weight: 700;
  color: var(--muted);
}
.tabs a.is-on { background: var(--accent); color: var(--chip-on-fg); }
@media (min-width: 960px) {
  .top { flex-direction: row; align-items: center; padding: .8rem 1rem; }
  .top .brand { display: none; }
  .top__row { flex: 1; }
  .tabs { display: flex; width: auto; }
  .tabs a { padding: .35rem .7rem; min-height: 0; }
}

.body { padding: .75rem .75rem 2rem; }
@media (min-width: 960px) { .body { padding: 1.1rem 1.1rem 2.5rem; } }

/* Desktop Stage (shared) — show only from 960px */
.desk-stage { display: none; }
@media (min-width: 960px) {
  .desk-stage {
    display: grid;
    grid-template-columns: minmax(280px, 38%) 1fr;
    gap: 1.25rem;
    align-items: start;
  }
  .mob-only { display: none !important; }
}

.desk-hero {
  position: sticky;
  top: calc(var(--proto-h) + 72px);
  display: block;
  border-radius: 2px;
  overflow: hidden;
}
.desk-hero img {
  width: 100%;
  aspect-ratio: 3 / 4;
  max-height: calc(100vh - var(--proto-h) - 100px);
  object-fit: cover;
}
.desk-hero__copy {
  position: absolute;
  inset: auto 0 0;
  padding: 3rem 1rem 1rem;
  background: linear-gradient(transparent, rgba(0,0,0,.88) 55%);
}
.desk-hero__copy h1 {
  margin: 0 0 .2rem;
  font-family: Syne, sans-serif;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -.04em;
}
.desk-hero__copy p { margin: 0; color: rgba(255,255,255,.72); font-size: .9rem; }

.desk-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .65rem;
}
.desk-item img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 2px;
}
.desk-item b {
  display: block;
  margin-top: .4rem;
  font-family: Syne, sans-serif;
  font-size: .8rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.desk-item small {
  display: block;
  margin-top: .1rem;
  color: var(--muted);
  font-size: .68rem;
}

/* ========== M1 · REELS SNAP ========== */
.m1-feed {
  height: calc(100vh - var(--proto-h) - 1px);
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  overscroll-behavior-y: contain;
  margin: calc(-1 * .75rem);
  width: calc(100% + 1.5rem);
}
.m1-card {
  position: relative;
  height: calc(100vh - var(--proto-h));
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
  background: #000;
}
.m1-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.m1-card__ui {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 1rem 1.35rem;
  background: linear-gradient(transparent 55%, rgba(0,0,0,.82) 92%);
  pointer-events: none;
}
.m1-card__ui > * { pointer-events: auto; }
.m1-card__ui h2 {
  margin: 0 0 .25rem;
  font-family: Syne, sans-serif;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.05;
  max-width: 16ch;
}
.m1-card__ui p {
  margin: 0 0 .9rem;
  color: rgba(255,255,255,.75);
  font-size: .9rem;
}
.m1-card__cta {
  display: inline-flex;
  align-self: flex-start;
  padding: .65rem 1rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--chip-on-fg);
  font-weight: 800;
  font-size: .88rem;
}
.m1-count {
  position: absolute;
  top: .85rem;
  right: .85rem;
  z-index: 2;
  padding: .3rem .55rem;
  border-radius: 999px;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(8px);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: .7rem;
  font-weight: 600;
  color: rgba(255,255,255,.85);
}
.m1-hint {
  position: absolute;
  top: 50%;
  right: .55rem;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  font-size: .65rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.35);
  pointer-events: none;
}

body.m1-page .top { display: none; }
body.m1-page .body { padding: 0; }
@media (min-width: 960px) {
  body.m1-page .top { display: flex; }
  body.m1-page .body { padding: 1.1rem 1.1rem 2.5rem; }
  .m1-feed { display: none; }
}

/* ========== M2 · vertical feed (normal scroll) ========== */
.m2-wrap {
  margin: 0 -.75rem;
  padding: 0 0 2rem;
}
.m2-track {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: .15rem 1rem 0;
}
.m2-card {
  display: block;
  color: inherit;
}
.m2-card__shot {
  position: relative;
  display: block;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: #111;
}
.m2-card__shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s cubic-bezier(.22,1,.36,1);
}
.m2-card:hover .m2-card__shot img { transform: scale(1.03); }

.m2-card__cat {
  position: absolute;
  top: .7rem;
  left: .7rem;
  z-index: 2;
  padding: .32rem .6rem;
  border-radius: 999px;
  background: rgba(10,10,12,.55);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.12);
  color: #fff;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .02em;
}

.m2-card__stats {
  position: absolute;
  left: .7rem;
  right: .7rem;
  bottom: .7rem;
  z-index: 2;
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
}
.m2-stat {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .35rem .55rem;
  border-radius: 999px;
  background: rgba(10,10,12,.55);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.1);
  color: rgba(255,255,255,.92);
  font-size: .72rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.m2-stat svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  opacity: .9;
}

.m2-card__cap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .75rem;
  padding: .75rem .15rem 0;
}
.m2-card__cap b {
  display: block;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.25;
}
.m2-card__more {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: .88rem;
  font-weight: 500;
  transition: color .2s;
}
.m2-card:hover .m2-card__more { color: var(--accent); }

@media (min-width: 960px) {
  .m2-wrap { display: none; }
}

/* ========== M3 · HERO + PEEK RAIL ========== */
.m3 {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.m3-hero {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  max-height: 65vh;
  background: #111;
}
.m3-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.m3-hero__copy {
  position: absolute;
  inset: auto 0 0;
  padding: 2.75rem 1rem 1rem;
  background: linear-gradient(transparent, rgba(0,0,0,.88));
}
.m3-hero__copy h1 {
  margin: 0 0 .2rem;
  font-family: Syne, sans-serif;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -.04em;
}
.m3-hero__copy p { margin: 0; color: rgba(255,255,255,.72); font-size: .88rem; }

.m3-peek-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: .15rem;
}
.m3-peek-label span {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

.m3-peek {
  display: flex;
  gap: .45rem;
  overflow-x: auto;
  margin: 0 -.75rem;
  padding: .15rem .75rem .35rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}
.m3-peek::-webkit-scrollbar { display: none; }
.m3-peek a {
  flex: 0 0 18vw;
  max-width: 72px;
  scroll-snap-align: start;
  border-radius: 4px;
  overflow: hidden;
  opacity: .55;
  transition: opacity .2s, outline .2s;
  outline: 2px solid transparent;
  outline-offset: 2px;
}
.m3-peek a.is-on {
  opacity: 1;
  outline-color: var(--accent);
}
.m3-peek img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

@media (min-width: 960px) {
  .m3 { display: none; }
}

/* ========== M4 · FULL-BLEED PAGER ========== */
.m4-feed {
  height: calc(100vh - var(--proto-h));
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  overscroll-behavior-y: contain;
  margin: calc(-1 * .75rem);
  width: calc(100% + 1.5rem);
}
.m4-card {
  position: relative;
  height: calc(100vh - var(--proto-h));
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background: #000;
}
.m4-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.m4-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem .9rem;
  background: linear-gradient(rgba(0,0,0,.55), transparent);
}
.m4-top .brand { color: #fff; text-shadow: 0 1px 10px rgba(0,0,0,.5); }
.m4-dots {
  display: flex;
  gap: 4px;
  align-items: center;
}
.m4-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,.35);
}
.m4-dots i.on { background: var(--accent); width: 14px; border-radius: 4px; }

.m4-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  padding: 2.5rem 1rem 1.5rem;
  background: linear-gradient(transparent, rgba(0,0,0,.9));
}
.m4-bottom h2 {
  margin: 0 0 .2rem;
  font-family: Syne, sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -.04em;
}
.m4-bottom p {
  margin: 0 0 .85rem;
  color: rgba(255,255,255,.7);
  font-size: .9rem;
}
.m4-actions {
  display: flex;
  gap: .5rem;
}
.m4-actions span {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 .95rem;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 700;
}
.m4-actions .primary {
  background: var(--accent);
  color: var(--chip-on-fg);
}
.m4-actions .ghost {
  border: 1px solid rgba(255,255,255,.28);
  color: #fff;
}
.m4-swipe {
  position: absolute;
  left: 50%;
  bottom: 5.5rem;
  transform: translateX(-50%);
  z-index: 2;
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.4);
  animation: m4pulse 2.2s ease-in-out infinite;
}
@keyframes m4pulse {
  0%, 100% { opacity: .35; transform: translate(-50%, 0); }
  50% { opacity: .8; transform: translate(-50%, -4px); }
}

body.m4-page .top { display: none; }
body.m4-page .body { padding: 0; }
@media (min-width: 960px) {
  body.m4-page .top { display: flex; }
  body.m4-page .body { padding: 1.1rem 1.1rem 2.5rem; }
  .m4-feed { display: none; }
}

/* hub */
body.mhub {
  margin: 0;
  min-height: 100vh;
  font-family: "DM Sans", system-ui, sans-serif;
  background:
    radial-gradient(700px 400px at 15% -10%, rgba(255,138,61,.12), transparent 55%),
    #0b0b0d;
  color: #f2f2f0;
  line-height: 1.45;
}
.hub { width: min(100% - 2rem, 720px); margin: 0 auto; padding: 2.5rem 0 4rem; }
.hub h1 {
  margin: 0 0 .6rem;
  font-family: Syne, sans-serif;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -.03em;
}
.hub .lead { margin: 0 0 1.5rem; color: #8a8a92; }
.hub-grid { display: grid; gap: .75rem; }
.hub-card {
  display: block;
  padding: 1.1rem 1.15rem;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  background: rgba(255,255,255,.03);
}
.hub-card:hover { border-color: rgba(255,138,61,.45); }
.hub-card .tag {
  display: inline-flex;
  padding: .22rem .5rem;
  border-radius: 999px;
  background: #ff8a3d;
  color: #1a120c;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .06em;
}
.hub-card h2 {
  margin: .5rem 0 .3rem;
  font-family: Syne, sans-serif;
  font-size: 1.15rem;
}
.hub-card p { margin: 0; color: #8a8a92; font-size: .9rem; }
.hub-card .go { display: inline-block; margin-top: .45rem; color: #ff8a3d; font-weight: 700; }

/* GRAIN home — premium RU */
body.home-ru, body.grain-theme {
  --bg: #0a0a0c;
  --fg: #f5f2ec;
  --muted: #8c8880;
  --line: rgba(245,242,236,.08);
  --accent: #e8a06a;
  --chip-on-fg: #1a120c;
  --panel: #111113;
  --proto-h: 34px;
  font-family: Manrope, system-ui, sans-serif;
  color: var(--fg);
  background: var(--bg);
}

/* Soft luxury flares — no grain */
body.home-ru::before, body.grain-theme::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    /* main warm flare — top right */
    radial-gradient(ellipse 55% 42% at 92% -6%, rgba(255,186,120,.22), transparent 70%),
    /* secondary bloom */
    radial-gradient(ellipse 38% 34% at 78% 12%, rgba(232,160,106,.12), transparent 72%),
    /* soft diagonal shaft */
    linear-gradient(
      118deg,
      transparent 42%,
      rgba(255,210,160,.045) 49%,
      rgba(232,160,106,.08) 52%,
      rgba(255,210,160,.035) 55%,
      transparent 62%
    ),
    /* left ambient fill */
    radial-gradient(ellipse 48% 40% at -5% 28%, rgba(232,160,106,.1), transparent 68%),
    /* low warm reflection */
    radial-gradient(ellipse 60% 36% at 30% 105%, rgba(232,160,106,.11), transparent 65%),
    /* gentle center lift */
    radial-gradient(ellipse 70% 50% at 50% 35%, rgba(255,255,255,.025), transparent 70%);
}

body.home-ru::after, body.grain-theme::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    /* specular highlight dots */
    radial-gradient(circle 2px at 72% 18%, rgba(255,236,210,.55), transparent 3px),
    radial-gradient(circle 1.5px at 84% 28%, rgba(255,220,180,.4), transparent 3px),
    radial-gradient(circle 1px at 18% 62%, rgba(255,220,180,.28), transparent 2.5px),
    /* soft vignette only */
    radial-gradient(120% 85% at 50% 45%, transparent 42%, rgba(0,0,0,.45) 100%);
  opacity: .85;
}

body.home-ru .shell, body.grain-theme .shell {
  position: relative;
  z-index: 1;
}

body.home-ru .brand, body.grain-theme .brand {
  font-family: Manrope, system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -.03em;
}

/* One sticky stack — no gap under proto-bar */
body.home-ru .home-head, body.grain-theme .home-head {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10,10,12,.78);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

body.home-ru .home-head .proto-bar, body.grain-theme .home-head .proto-bar {
  position: relative;
  top: auto;
  background: transparent;
  backdrop-filter: none;
  border-bottom: 1px solid var(--line);
}

body.home-ru .home-head .top, body.grain-theme .home-head .top {
  position: relative;
  top: auto;
  background: transparent;
  backdrop-filter: none;
  border-bottom: 0;
  padding: .7rem .85rem .55rem;
}
@media (min-width: 960px) {
body.home-ru .home-head .top, body.grain-theme .home-head .top {
    flex-direction: row;
    padding: .75rem 1.25rem .5rem;
  }
}

body.home-ru .side, body.grain-theme .side {
  top: 0;
  height: 100vh;
  background: rgba(10,10,12,.72);
  backdrop-filter: blur(16px);
  border-right-color: var(--line);
}
body.home-ru .side a.is-on, body.grain-theme .side a.is-on {
  background: rgba(232,160,106,.1);
  box-shadow: inset 2px 0 0 var(--accent);
}

body.home-ru .search, body.grain-theme .search {
  background: rgba(18,18,20,.85);
  border-color: var(--line);
}

/* Categories under header */
body.home-ru .top-cats, body.grain-theme .top-cats {
  display: flex;
  gap: .15rem .95rem;
  overflow-x: auto;
  padding: 0 .85rem .7rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
body.home-ru .top-cats::-webkit-scrollbar, body.grain-theme .top-cats::-webkit-scrollbar { display: none; }
@media (min-width: 960px) {
body.home-ru .top-cats, body.grain-theme .top-cats {
    padding: 0 1.25rem .8rem;
    gap: .2rem 1.2rem;
  }
}
body.home-ru .top-cats a, body.grain-theme .top-cats a {
  flex: 0 0 auto;
  padding: .35rem 0;
  font-size: .86rem;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
body.home-ru .top-cats a:hover, body.grain-theme .top-cats a:hover { color: var(--fg); }
body.home-ru .top-cats a.is-on, body.grain-theme .top-cats a.is-on {
  color: var(--fg);
  border-bottom-color: var(--accent);
}

body.home-ru .body, body.grain-theme .body {
  padding-top: 1.15rem;
}
@media (min-width: 960px) {
body.home-ru .body, body.grain-theme .body { padding: 1.5rem 1.5rem 3rem; }
}

body.home-ru .section-head, body.grain-theme .section-head {
  align-items: baseline;
  margin-bottom: 1.15rem;
}
body.home-ru .kicker, body.grain-theme .kicker {
  color: var(--accent);
  font-size: .65rem;
  letter-spacing: .18em;
  font-weight: 700;
  margin-bottom: .4rem;
}
body.home-ru .section-head h2, body.grain-theme .section-head h2 {
  font-family: Manrope, system-ui, sans-serif;
  font-size: clamp(1.45rem, 2.5vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.15;
}
body.home-ru .see, body.grain-theme .see {
  font-size: .8rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .04em;
  text-transform: uppercase;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: color .2s, border-color .2s;
}
body.home-ru .see:hover, body.grain-theme .see:hover {
  color: var(--fg);
  border-bottom-color: var(--accent);
}

body.home-ru .m2-wrap, body.grain-theme .m2-wrap {
  display: block;
  margin: 0;
  padding: 0;
}
body.home-ru .m2-track, body.grain-theme .m2-track {
  padding: 0;
  gap: 1.6rem;
}
@media (min-width: 960px) {
body.home-ru .m2-track, body.grain-theme .m2-track {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem 1.25rem;
  }
}

/* Premium card polish */
body.home-ru .m2-card__shot, body.grain-theme .m2-card__shot {
  border-radius: 6px;
  box-shadow: 0 20px 50px rgba(0,0,0,.35);
}
body.home-ru .m2-card__cat, body.grain-theme .m2-card__cat {
  background: rgba(10,10,12,.5);
  border-color: rgba(255,255,255,.14);
  font-weight: 500;
  letter-spacing: .04em;
}
body.home-ru .m2-stat, body.grain-theme .m2-stat {
  background: rgba(10,10,12,.5);
  border-color: rgba(255,255,255,.1);
  font-weight: 500;
}
body.home-ru .m2-card__cap, body.grain-theme .m2-card__cap {
  padding-top: .9rem;
}
body.home-ru .m2-card__cap b, body.grain-theme .m2-card__cap b {
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -.015em;
}
body.home-ru .m2-card__more, body.grain-theme .m2-card__more {
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--muted);
}
body.home-ru .m2-card:hover .m2-card__more, body.grain-theme .m2-card:hover .m2-card__more { color: var(--accent); }

.home-block {
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--line);
}
.home-block:last-of-type {
  border-bottom: 0;
  padding-bottom: 0;
}
@media (min-width: 960px) {
  .home-block {
    margin-bottom: 3.25rem;
    padding-bottom: 3.25rem;
  }
}

/* —— Top —— */
.top-split {
  display: grid;
  gap: 1rem;
}
@media (min-width: 860px) {
  .top-split {
    grid-template-columns: 1.25fr 1fr;
    gap: 1.5rem;
    align-items: stretch;
    min-height: 460px;
  }
}
.top-split__hero {
  position: relative;
  display: block;
  border-radius: 6px;
  overflow: hidden;
  background: #111;
  box-shadow: 0 24px 60px rgba(0,0,0,.4);
}
.top-split__hero img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 1.2s cubic-bezier(.22,1,.36,1);
}
.top-split__hero:hover img { transform: scale(1.03); }
@media (min-width: 860px) {
  .top-split__hero { min-height: 100%; }
  .top-split__hero img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
  }
}
.top-split__hero-copy {
  position: absolute;
  inset: auto 0 0;
  padding: 3.5rem 1.25rem 1.25rem;
  background: linear-gradient(transparent, rgba(8,8,10,.95) 70%);
}
.top-split__hero-copy .rank {
  display: inline-flex;
  margin-bottom: .5rem;
  padding: .28rem .65rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--chip-on-fg);
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.top-split__hero-copy h3 {
  margin: 0 0 .3rem;
  font-size: clamp(1.45rem, 2.2vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -.03em;
}
.top-split__hero-copy p {
  margin: 0;
  color: rgba(245,242,236,.65);
  font-size: .88rem;
  font-weight: 500;
}

.top-list {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
  padding: .25rem 0;
  border-radius: 6px;
}
.top-list a {
  display: grid;
  grid-template-columns: 1.75rem 56px 1fr auto;
  gap: .85rem;
  align-items: center;
  padding: .85rem .15rem;
  border-bottom: 1px solid var(--line);
  transition: opacity .2s, transform .2s;
}
.top-list a:last-child { border-bottom: 0; }
.top-list a:hover { opacity: 1; }
.top-list a:hover img { transform: scale(1.03); }
.top-list__n {
  font-size: .78rem;
  font-weight: 700;
  color: var(--accent);
  text-align: center;
  letter-spacing: .04em;
}
.top-list img {
  width: 56px;
  height: 74px;
  object-fit: cover;
  border-radius: 3px;
  transition: transform .35s cubic-bezier(.22,1,.36,1);
}
.top-list b {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -.015em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.top-list small {
  display: block;
  margin-top: .18rem;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 500;
}
.top-list__views {
  color: var(--muted);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .02em;
}

/* —— Fresh sheet —— */
.sheet {
  display: flex;
  gap: .55rem;
  overflow-x: auto;
  margin: 0 calc(-1 * var(--page-pad, .75rem));
  padding: 0 var(--page-pad, .75rem) .2rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  background: transparent;
  border: 0;
}
.sheet::-webkit-scrollbar { display: none; }
@media (min-width: 960px) {
  .sheet {
    margin: 0;
    padding: 0;
    gap: .75rem;
  }
}
.sheet__frame {
  position: relative;
  /* Compact rail on phones — was 42vw/3:4 and felt too tall */
  flex: 0 0 112px;
  max-width: 112px;
  scroll-snap-align: start;
  display: block;
  min-width: 0;
}
@media (min-width: 480px) {
  .sheet__frame {
    flex-basis: 128px;
    max-width: 128px;
  }
}
@media (min-width: 720px) {
  .sheet__frame {
    flex-basis: 148px;
    max-width: 168px;
  }
}
@media (min-width: 1100px) {
  .sheet__frame {
    flex: 1 1 0;
    max-width: none;
  }
}
.sheet__frame img {
  width: 100%;
  aspect-ratio: 3 / 4;
  height: auto;
  object-fit: cover;
  display: block;
  background: #0a0a0c;
  border-radius: 4px;
  box-shadow: 0 14px 36px rgba(0,0,0,.35);
  transition: transform .55s cubic-bezier(.22,1,.36,1), box-shadow .35s;
}
.sheet__frame:hover img {
  transform: translateY(-3px) scale(1.015);
  box-shadow: 0 22px 48px rgba(0,0,0,.45);
}
.sheet__badge {
  position: absolute;
  top: .5rem;
  left: .5rem;
  z-index: 2;
  padding: .22rem .45rem;
  border-radius: 999px;
  background: rgba(10,10,12,.55);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(232,160,106,.55);
  color: var(--accent);
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  line-height: 1;
}
.sheet__cap {
  display: block;
  padding: .65rem .05rem 0;
}
.sheet__cap b {
  display: block;
  font-size: .86rem;
  font-weight: 600;
  letter-spacing: -.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sheet__cap small {
  display: block;
  margin-top: .18rem;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 500;
}

/* Footer */
.site-foot {
  margin-top: 1rem;
  padding: 2rem 0 1.5rem;
  border-top: 1px solid var(--line);
}
.site-foot__inner {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
@media (min-width: 720px) {
  .site-foot__inner {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }
}
.site-foot__brand {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -.03em;
}
.site-foot__brand span {
  display: block;
  margin-top: .35rem;
  font-size: .8rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
}
.site-foot__nav {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.35rem;
}
.site-foot__nav a {
  font-size: .85rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: .02em;
}
.site-foot__nav a:hover { color: var(--accent); }
.site-foot__copy {
  margin: 1.35rem 0 0;
  font-size: .72rem;
  color: color-mix(in srgb, var(--muted) 80%, transparent);
  letter-spacing: .04em;
}

/* ========== CATEGORY PAGE ========== */
body.cat-page .body--cat {
  padding-top: 0 !important;
}
@media (min-width: 960px) {
  body.cat-page .body--cat {
    padding: 0 1.5rem 3rem !important;
  }
}

.cat-hero {
  position: relative;
  min-height: min(72vh, 620px);
  display: grid;
  align-items: end;
  margin: 0 calc(-1 * var(--page-pad, .75rem)) 2rem;
  overflow: hidden;
  isolation: isolate;
}
@media (min-width: 960px) {
  .cat-hero {
    margin: 0 0 2.75rem;
    border-radius: 10px;
    min-height: min(68vh, 560px);
  }
}

.cat-hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.cat-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  animation: catKen 18s ease-in-out infinite alternate;
}
@keyframes catKen {
  from { transform: scale(1.02) translate3d(0, 0, 0); }
  to { transform: scale(1.08) translate3d(-1.5%, -1%, 0); }
}

.cat-hero__veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(10,10,12,.25) 0%, rgba(10,10,12,.15) 35%, rgba(10,10,12,.78) 72%, rgba(10,10,12,.96) 100%),
    radial-gradient(70% 55% at 70% 30%, transparent, rgba(0,0,0,.35));
}

.cat-hero__content {
  position: relative;
  padding: 3.5rem 1.1rem 1.6rem;
  max-width: 38rem;
}
@media (min-width: 960px) {
  .cat-hero__content { padding: 4rem 2rem 2.25rem; }
}

.cat-hero__crumb {
  margin: 0 0 .75rem;
  font-size: .78rem;
  font-weight: 600;
  color: rgba(245,242,236,.55);
  letter-spacing: .04em;
}
.cat-hero__crumb a {
  color: rgba(245,242,236,.75);
  border-bottom: 1px solid transparent;
}
.cat-hero__crumb a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.cat-hero h1 {
  margin: 0 0 .65rem;
  font-size: clamp(2.6rem, 8vw, 4.4rem);
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: .95;
  text-shadow: 0 10px 40px rgba(0,0,0,.35);
}

.cat-hero__lead {
  margin: 0 0 1.25rem;
  max-width: 28rem;
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.45;
  color: rgba(245,242,236,.72);
}

.cat-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem .9rem;
  margin-bottom: 1.35rem;
}
.cat-hero__meta span {
  display: inline-flex;
  align-items: baseline;
  gap: .35rem;
  padding: .45rem .7rem;
  border-radius: 999px;
  background: rgba(10,10,12,.45);
  border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(10px);
  font-size: .78rem;
  color: rgba(245,242,236,.7);
  font-weight: 500;
}
.cat-hero__meta strong {
  color: var(--fg);
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: -.01em;
}

.cat-hero__go {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 1.2rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--chip-on-fg);
  font-size: .92rem;
  font-weight: 700;
  letter-spacing: .01em;
  transition: transform .2s, box-shadow .2s;
  box-shadow: 0 10px 30px rgba(232,160,106,.25);
}
.cat-hero__go:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 36px rgba(232,160,106,.35);
}

.cat-albums {
  padding-bottom: .5rem;
}

.cat-toolbar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.35rem;
}
@media (min-width: 720px) {
  .cat-toolbar {
    flex-direction: row;
    align-items: end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.6rem;
  }
}
.cat-toolbar h1,
.cat-toolbar h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -.03em;
}

.cat-sort {
  display: flex;
  gap: .15rem;
  padding: .2rem;
  border-radius: 999px;
  background: rgba(18,18,20,.75);
  border: 1px solid var(--line);
  align-self: flex-start;
}
.cat-sort button,
.cat-sort a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .45rem .85rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: .8rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.cat-sort button.is-on,
.cat-sort a.is-on {
  background: var(--accent);
  color: var(--chip-on-fg);
}
.cat-sort button:hover:not(.is-on),
.cat-sort a:hover:not(.is-on) { color: var(--fg); }

/* Pagination */
.cat-pages {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .85rem 1.25rem;
  margin-top: 2.25rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}
.cat-pages__nums {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .35rem;
}
.cat-pages__nums a,
.cat-pages__nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  padding: 0 .7rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: .88rem;
  font-weight: 600;
  color: var(--muted);
  transition: color .2s, background .2s, border-color .2s;
}
.cat-pages__nums a:hover,
.cat-pages__nav:hover {
  color: var(--fg);
  border-color: var(--line);
  background: rgba(255,255,255,.03);
}
.cat-pages__nums a.is-on {
  color: var(--chip-on-fg);
  background: var(--accent);
  border-color: var(--accent);
}
.cat-pages__gap {
  color: var(--muted);
  font-size: .88rem;
  padding: 0 .15rem;
}
.cat-pages__nav.is-disabled {
  opacity: .35;
  pointer-events: none;
}

/* SEO block */
.cat-seo {
  margin: 2.75rem 0 0;
  padding: 0;
}
.cat-seo__inner {
  position: relative;
  padding: 1.6rem 1.25rem 1.7rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(232,160,106,.08), transparent 42%),
    rgba(255,255,255,.025);
  overflow: hidden;
}
.cat-seo__inner::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.25rem;
  bottom: 1.25rem;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), transparent);
}
@media (min-width: 720px) {
  .cat-seo__inner {
    padding: 2rem 2.25rem 2.1rem 2.35rem;
  }
}
.cat-seo .kicker { margin-bottom: .45rem; }
.cat-seo h2 {
  margin: 0 0 1rem;
  max-width: 22ch;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.2;
}
.cat-seo__text {
  display: grid;
  gap: .85rem;
  max-width: 62ch;
}
.cat-seo__text p {
  margin: 0;
  font-size: .95rem;
  font-weight: 500;
  line-height: 1.65;
  color: var(--muted);
}
.cat-seo__text p:first-child {
  color: color-mix(in srgb, var(--fg) 82%, var(--muted));
}

/* ========== ALBUM / FULL POST ========== */
body.album-page .body--album {
  max-width: 820px;
  margin-inline: auto;
}

.album-head {
  padding: .35rem 0 1.75rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.75rem;
}
@media (min-width: 960px) {
  .album-head {
    padding: .5rem 0 2.25rem;
    margin-bottom: 2.25rem;
  }
}

.album-head__crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
  margin: 0 0 .85rem;
  font-size: .78rem;
  font-weight: 600;
  color: var(--muted);
}
.album-head__crumb a:hover { color: var(--accent); }

.album-head h1 {
  margin: 0 0 1.15rem;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.05;
}

.album-cover {
  position: relative;
  margin: 0 0 1.25rem;
  border-radius: 8px;
  overflow: hidden;
  background: #101012;
  box-shadow: 0 24px 60px rgba(0,0,0,.4);
}
.album-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
}
@media (min-width: 720px) {
  .album-cover img {
    aspect-ratio: 4 / 5;
    max-height: 720px;
  }
}
.album-cover figcaption {
  position: absolute;
  left: .75rem;
  bottom: .75rem;
  padding: .35rem .65rem;
  border-radius: 999px;
  background: rgba(10,10,12,.55);
  border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(8px);
  color: rgba(245,242,236,.8);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .04em;
}

.album-head__stats {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem .65rem;
  margin-bottom: 1.25rem;
}
.album-stat {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .45rem .75rem;
  border-radius: 999px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--line);
  font-size: .82rem;
  font-weight: 500;
  color: var(--muted);
}
.album-stat svg {
  width: 15px;
  height: 15px;
  color: var(--accent);
}
.album-stat strong {
  color: var(--fg);
  font-weight: 700;
}
.album-stat--muted {
  background: transparent;
}

.album-head__desc {
  display: grid;
  gap: .75rem;
  max-width: 54ch;
  margin-bottom: 1.35rem;
}
.album-head__desc p {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 500;
  line-height: 1.65;
  color: color-mix(in srgb, var(--fg) 78%, var(--muted));
}

.album-head__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  align-items: center;
}
.album-like {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 44px;
  padding: 0 1.1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--accent);
  color: var(--chip-on-fg);
  font: inherit;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s, background .2s, color .2s, border-color .2s;
  box-shadow: 0 10px 28px rgba(232,160,106,.22);
}
.album-like svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}
.album-like__text { color: inherit; }
.album-like__count {
  color: inherit;
  opacity: .85;
  font-variant-numeric: tabular-nums;
}
.album-like:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(232,160,106,.32);
}
.album-to-gallery {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 .9rem;
  font-size: .9rem;
  font-weight: 600;
  color: var(--muted);
}
.album-to-gallery:hover { color: var(--accent); }

/* Vertical photo gallery */
.album-gallery {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
@media (min-width: 720px) {
  .album-gallery { gap: 1.5rem; }
}

.album-shot {
  margin: 0;
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  background: #101012;
  box-shadow: 0 18px 48px rgba(0,0,0,.35);
}
.album-shot img {
  width: 100%;
  height: auto;
  display: block;
}
.album-shot figcaption {
  position: absolute;
  right: .7rem;
  bottom: .7rem;
  padding: .3rem .55rem;
  border-radius: 999px;
  background: rgba(10,10,12,.55);
  border: 1px solid rgba(255,255,255,.1);
  backdrop-filter: blur(8px);
  color: rgba(245,242,236,.75);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .04em;
}
.album-shot figcaption span {
  color: var(--fg);
}

.album-end {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
@media (min-width: 720px) {
  .album-end {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
.album-end__stats {
  display: flex;
  gap: 1rem;
  color: var(--muted);
  font-size: .88rem;
  font-weight: 500;
}
.album-end__stats strong {
  color: var(--fg);
  font-weight: 700;
}
.album-end__nav {
  display: flex;
  flex-wrap: wrap;
  gap: .85rem 1.25rem;
}
.album-end__nav a {
  font-size: .9rem;
  font-weight: 600;
  color: var(--muted);
}
.album-end__nav a:hover { color: var(--accent); }

.album-related {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

/* Related: 2-col on mobile, 3 on desktop */
.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .85rem .65rem;
}
@media (min-width: 720px) {
  .related-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.15rem .9rem;
  }
}
.related-card {
  display: block;
  min-width: 0;
}
.related-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 6px;
  background: #101012;
  box-shadow: 0 12px 32px rgba(0,0,0,.3);
  transition: transform .4s cubic-bezier(.22,1,.36,1);
}
.related-card:hover img { transform: translateY(-2px) scale(1.015); }
.related-card span {
  display: block;
  padding: .55rem .05rem 0;
}
.related-card b {
  display: block;
  font-size: .88rem;
  font-weight: 600;
  letter-spacing: -.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.related-card small {
  display: block;
  margin-top: .15rem;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 500;
}

.album-block {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.album-toplist {
  padding: 0;
}
.album-toplist a {
  padding-left: 0;
  padding-right: 0;
}

.album-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.album-tags a {
  display: inline-flex;
  padding: .45rem .8rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  font-size: .82rem;
  font-weight: 600;
  color: var(--muted);
  transition: color .2s, border-color .2s, background .2s;
}
.album-tags a:hover {
  color: var(--fg);
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
  background: rgba(232,160,106,.08);
}

.album-seo {
  margin-top: 2.5rem;
}


/* —— WP theme overrides —— */
.proto-bar { display: none !important; }

/* Kill horizontal page overflow on mobile */
html {
  overflow-x: hidden;
  overflow-x: clip;
  max-width: 100%;
}
body.grain-theme,
body.mfeed {
  overflow-x: hidden;
  overflow-x: clip;
  max-width: 100%;
}
body.grain-theme .shell,
body.grain-theme .main,
body.grain-theme .body,
body.grain-theme .home-head {
  max-width: 100%;
  min-width: 0;
}
.body {
  --page-pad: .75rem;
  padding-left: var(--page-pad);
  padding-right: var(--page-pad);
}
@media (min-width: 960px) {
  .body { --page-pad: 1.5rem; }
}
body.grain-theme .top__row {
  min-width: 0;
}
body.grain-theme .search {
  min-width: 0;
  max-width: 100%;
}
body.grain-theme .top-cats {
  max-width: 100%;
  overscroll-behavior-x: contain;
}
body.grain-theme .sheet {
  overscroll-behavior-x: contain;
}
/* Don't let long titles blow the layout */
body.grain-theme .section-head > div {
  min-width: 0;
}
body.grain-theme .section-head h2 {
  overflow-wrap: anywhere;
}

.cat-pages .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  padding: 0 .7rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: .88rem;
  font-weight: 600;
  color: var(--muted, #8c8880);
  text-decoration: none;
}
.cat-pages .page-numbers:hover {
  color: var(--fg, #f5f2ec);
  border-color: var(--line, rgba(245,242,236,.08));
  background: rgba(255,255,255,.03);
}
.cat-pages .page-numbers.current,
.cat-pages .page-numbers.is-on {
  color: var(--chip-on-fg, #1a120c);
  background: var(--accent, #e8a06a);
  border-color: var(--accent, #e8a06a);
}
.cat-pages .prev,
.cat-pages .next { min-width: auto; }

.album-like-engine {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  opacity: 0 !important;
  pointer-events: auto !important;
}
.album-like-wrap { position: relative; display: inline-flex; }
.album-like-wrap.has-plugin .album-like { cursor: pointer; }
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
.grain-page-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.5rem 0 2rem;
  font-size: 1.02rem;
  line-height: 1.65;
  color: color-mix(in srgb, var(--fg) 82%, var(--muted));
}
.grain-page-content > *:first-child { margin-top: 0; }
.grain-page-content img { max-width: 100%; height: auto; border-radius: 6px; }
.aside-search { margin: 0 .4rem 1rem; }
.aside-search input {
  width: 100%;
  min-height: 40px;
  padding: 0 .85rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(18,18,20,.85);
  color: var(--fg);
  font: inherit;
}
.search form { margin: 0; }
.search input[type="search"] {
  width: 100%;
  min-height: 40px;
  padding: 0 .9rem;
  border: 0;
  background: transparent;
  color: var(--fg);
  font: inherit;
  outline: none;
}
.search input::placeholder { color: var(--muted); }

/* Sticky header flush to top (no proto-bar gap); admin bar only */
body.grain-theme {
  --proto-h: 0px;
}
body.grain-theme .home-head {
  top: 0 !important;
  margin-top: 0;
}
body.grain-theme .home-head .top {
  position: relative !important;
  top: auto !important;
  margin-top: 0;
}
body.admin-bar.grain-theme .home-head {
  top: 32px !important;
}
@media screen and (max-width: 782px) {
  body.admin-bar.grain-theme .home-head {
    top: 46px !important;
  }
}

/* Liked = outline on dark, keep text readable (was accent-on-accent) */
.album-like.is-on,
.album-like-wrap.is-liked .album-like {
  background: rgba(232, 160, 106, .12);
  border-color: var(--accent, #e8a06a);
  color: var(--accent, #e8a06a);
  box-shadow: none;
}
.album-like.is-on .album-like__text,
.album-like-wrap.is-liked .album-like__text,
.album-like.is-on .album-like__count,
.album-like-wrap.is-liked .album-like__count {
  color: inherit;
  opacity: 1;
}
