@import url('https://fonts.googleapis.com/css2?family=Dela+Gothic+One&family=Noto+Sans+JP:wght@300;400;700;900&family=JetBrains+Mono:wght@400;700&display=swap');

/* ═══════════════════════════════════════════
   MANGA INK — TOKYO GHOUL AESTHETIC
   Palette: бумажный белый + тушь + красный
   Philosophy: всё нарисовано от руки
═══════════════════════════════════════════ */
:root {
  --ink:    #0d0d0d;   /* тушь */
  --ink2:   #1a1a1a;
  --paper:  #f5f0e8;   /* старая бумага */
  --paper2: #ede8dc;
  --paper3: #e0d9cc;
  --red:    #c0392b;   /* кровь/акцент */
  --red2:   #e74c3c;
  --grey:   #8a8070;
  --grey2:  #5a5248;
  --acc:    var(--red);  /* переопределяется из Ghost Admin */

  --bar-w:  52px;
  --nav-w:  320px;

  /* ease для "рисовки" — резкий старт, плавный конец */
  --ink-ease: cubic-bezier(.86,0,.07,1);
  --draw-ease: cubic-bezier(.25,1.5,.5,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0 }
html { scroll-behavior: smooth; font-size: 16px }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 400;
  overflow-x: hidden;
  cursor: none;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none }
img { max-width: 100%; height: auto; display:block }
button { font: inherit; background: none; border: none; cursor: none }

/* ═══════════════════════════════════════════
   PAPER TEXTURE + INK SPOTS
═══════════════════════════════════════════ */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px;
}

/* ═══════════════════════════════════════════
   READING PROGRESS — как нарисованная линия
═══════════════════════════════════════════ */
#rpb {
  position: fixed; top: 0; left: 0; z-index: 700;
  height: 3px; width: 0%;
  background: var(--acc);
  /* неровный край как мазок кисти */
  clip-path: polygon(0 0, 100% 20%, 100% 80%, 0 100%);
  transition: width .08s linear; pointer-events: none;
}

/* PAGE TRANSITION */
#pto {
  position: fixed; inset: 0; z-index: 800;
  background: var(--ink);
  opacity: 0; pointer-events: none;
  transition: opacity .35s var(--ink-ease);
}
#pto.out { opacity: 1; pointer-events: all }

/* ═══════════════════════════════════════════
   CURSOR — перо/тушь
═══════════════════════════════════════════ */
.cd {
  position: fixed; pointer-events: none; z-index: 9999;
  width: 8px; height: 8px;
  background: var(--ink); border-radius: 50%;
  transform: translate(-50%,-50%);
  transition: width .15s, height .15s, background .15s, border-radius .2s;
  box-shadow: 0 0 0 1px var(--paper);
}
.cr {
  position: fixed; pointer-events: none; z-index: 9998;
  width: 32px; height: 32px;
  border: 2px solid var(--ink); border-radius: 50%;
  transform: translate(-50%,-50%); opacity: .3;
  transition: width .25s var(--draw-ease), height .25s var(--draw-ease),
              border-color .2s, opacity .2s, border-radius .2s;
}
body.hov .cd { width: 14px; height: 14px; background: var(--acc); border-radius: 2px }
body.hov .cr { width: 50px; height: 50px; border-color: var(--acc); opacity: .5; border-radius: 4px }
body.click .cd { transform: translate(-50%,-50%) scale(.5); border-radius: 0 }
/* ink splatter on click */
body.click .cr { transform: translate(-50%,-50%) scale(1.4); opacity: .2 }

/* CURSOR TRAIL — чернильные капли */
.tr {
  position: fixed; border-radius: 50%; pointer-events: none; z-index: 9990;
  transform: translate(-50%,-50%); background: var(--ink);
}

/* ═══════════════════════════════════════════
   LEFT BAR — как корешок манги
═══════════════════════════════════════════ */
.bar {
  position: fixed; left: 0; top: 0; z-index: 300;
  width: var(--bar-w); height: 100vh;
  background: var(--ink);
  display: flex; flex-direction: column;
  align-items: center; justify-content: space-between;
  padding: 20px 0;
  /* неровный правый край — как разрыв бумаги */
  clip-path: polygon(0 0, 88% 0, 100% 2%, 92% 8%, 100% 15%, 90% 25%, 100% 40%, 93% 55%, 100% 70%, 91% 85%, 100% 95%, 88% 100%, 0 100%);
}
.bar-logo {
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-family: 'Dela Gothic One', cursive;
  font-size: 10px; letter-spacing: .3em; text-transform: uppercase;
  color: var(--paper); opacity: .7;
  transition: opacity .2s, letter-spacing .4s var(--ink-ease);
}
.bar-logo:hover { opacity: 1; letter-spacing: .45em }
.bar-logo em { color: var(--acc); font-style: normal }
.bar-pip {
  width: 2px; height: 40px;
  background: linear-gradient(to bottom, var(--acc), transparent);
  animation: pip 3s ease-in-out infinite;
  clip-path: polygon(20% 0, 80% 5%, 100% 50%, 80% 95%, 20% 100%, 0 50%);
}
@keyframes pip { 0%,100%{opacity:.15;transform:scaleY(.6)} 55%{opacity:1;transform:scaleY(1)} }

/* ═══════════════════════════════════════════
   NAV BUTTON — как иероглиф "меню"
═══════════════════════════════════════════ */
.top-controls {
  position: fixed; top: 20px; right: 20px; z-index: 500;
  display: flex; gap: 8px;
}
.ctrl {
  width: 44px; height: 44px;
  border: 2.5px solid var(--ink);
  background: var(--paper);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--ink);
  /* неровный угол */
  clip-path: polygon(4% 0, 100% 0, 100% 92%, 96% 100%, 0 100%, 0 8%);
  transition: background .2s, transform .15s var(--draw-ease);
}
.ctrl:hover { background: var(--ink); color: var(--paper); transform: scale(1.06) rotate(-1deg) }
.ctrl:active { transform: scale(.93) }
.hlines { display: flex; flex-direction: column; gap: 5px; align-items: center }
.hlines span {
  display: block;
  background: currentColor;
  transition: all .3s var(--ink-ease); transform-origin: center;
}
/* линии разной длины — как настоящие штрихи */
.hlines span:nth-child(1) { width: 18px; height: 2px }
.hlines span:nth-child(2) { width: 14px; height: 2px; margin-left: -4px }
.hlines span:nth-child(3) { width: 16px; height: 2px }
.ctrl.X .hlines span:nth-child(1) { width: 16px; transform: translateY(7px) rotate(45deg) }
.ctrl.X .hlines span:nth-child(2) { opacity: 0; transform: scaleX(0) }
.ctrl.X .hlines span:nth-child(3) { width: 16px; transform: translateY(-7px) rotate(-45deg) }
.ctrl.X { background: var(--ink); color: var(--paper) }

/* ═══════════════════════════════════════════
   SIDE NAV — вылезает как панель манги
   Анимация: рисуется сверху вниз как штрих
═══════════════════════════════════════════ */
.sidenav {
  position: fixed; right: 0; top: 0; z-index: 450;
  width: var(--nav-w); height: 100vh;
  background: var(--ink);
  transform: translateX(100%);
  transition: transform .6s var(--ink-ease);
  display: flex; flex-direction: column; overflow: hidden;
  /* рваный левый край */
  clip-path: polygon(8% 0, 100% 0, 100% 100%, 8% 100%, 0 95%, 5% 85%, 0 72%, 6% 60%, 0 48%, 5% 35%, 0 22%, 6% 10%);
}
.sidenav.on { transform: translateX(0) }

/* Paint-stroke reveal: каждый элемент "рисуется" */
.sidenav .nav-srch,
.sidenav .nav-links,
.sidenav .nav-soc,
.sidenav .nav-foot {
  opacity: 0;
  clip-path: inset(0 100% 0 0);
  transition: opacity .4s, clip-path .5s var(--ink-ease);
}
.sidenav.on .nav-srch { opacity: 1; clip-path: inset(0 0% 0 0); transition-delay: .15s }
.sidenav.on .nav-links { opacity: 1; clip-path: inset(0 0% 0 0); transition-delay: .22s }
.sidenav.on .nav-soc   { opacity: 1; clip-path: inset(0 0% 0 0); transition-delay: .30s }
.sidenav.on .nav-foot  { opacity: 1; clip-path: inset(0 0% 0 0); transition-delay: .36s }

/* search */
.nav-srch {
  padding: 28px 32px 18px;
  border-bottom: 1px solid rgba(245,240,232,.1); flex-shrink: 0;
}
.srch-box {
  display: flex;
  border-bottom: 2px solid rgba(245,240,232,.3);
  background: transparent;
  transition: border-color .2s;
}
.srch-box:focus-within { border-color: var(--acc) }
.srch-in {
  flex: 1; background: none; border: none; outline: none;
  padding: 10px 4px;
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  color: var(--paper); letter-spacing: .05em;
}
.srch-in::placeholder { color: rgba(245,240,232,.3) }
.srch-go {
  padding: 0 8px; color: var(--acc); font-size: 15px;
  transition: transform .2s var(--draw-ease);
}
.srch-go:hover { transform: scale(1.2) rotate(15deg) }
.srch-res {
  margin-top: 12px; max-height: 140px; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: rgba(192,57,43,.4) transparent;
}
.sr-item {
  display: block; padding: 8px 4px;
  border-bottom: 1px solid rgba(245,240,232,.06);
  font-size: 13px; color: rgba(245,240,232,.7);
  transition: color .2s, padding-left .2s;
}
.sr-item:hover { color: var(--acc); padding-left: 6px }
.sr-tag {
  font-family: 'JetBrains Mono', monospace; font-size: 8px;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--acc); opacity: .6; display: block; margin-top: 2px;
}
.sr-empty {
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  color: rgba(245,240,232,.3); text-align: center; padding: 12px 0;
}

/* nav links */
.nav-links { flex: 1; overflow-y: auto; padding: 20px 32px }
.nlink {
  display: flex; align-items: center; gap: 14px; padding: 16px 0;
  border-bottom: 1px solid rgba(245,240,232,.07);
  font-family: 'Dela Gothic One', cursive;
  font-size: 11px; letter-spacing: .15em; text-transform: uppercase;
  color: rgba(245,240,232,.45);
  opacity: 0; transform: translateX(20px);
  transition: color .2s, padding-left .2s,
              opacity .35s var(--ink-ease), transform .35s var(--ink-ease);
}
.sidenav.on .nlink { opacity: 1; transform: none }
.sidenav.on .nlink:nth-child(1){transition-delay:.28s}
.sidenav.on .nlink:nth-child(2){transition-delay:.34s}
.sidenav.on .nlink:nth-child(3){transition-delay:.40s}
.sidenav.on .nlink:nth-child(4){transition-delay:.46s}
.sidenav.on .nlink:nth-child(5){transition-delay:.52s}
.sidenav.on .nlink:nth-child(6){transition-delay:.58s}
.nlink:hover { color: var(--paper); padding-left: 8px }
/* красная полоса слева как закладка манги */
.nlink::before {
  content: ''; width: 0; height: 2px; background: var(--acc);
  flex-shrink: 0;
  transition: width .25s var(--ink-ease);
}
.nlink:hover::before { width: 16px }
.nlink-n { font-size: 9px; opacity: .3; flex-shrink: 0; font-family: 'JetBrains Mono', monospace }
.nlink-arr { margin-left: auto; opacity: 0; color: var(--acc); font-size: 14px; transition: opacity .2s, transform .2s }
.nlink:hover .nlink-arr { opacity: 1; transform: translateX(4px) }

/* socials */
.nav-soc {
  padding: 16px 32px; border-top: 1px solid rgba(245,240,232,.07);
  display: flex; gap: 8px; flex-shrink: 0;
}
.nsoc {
  width: 34px; height: 34px;
  border: 2px solid rgba(245,240,232,.15);
  display: flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', monospace; font-size: 9px; font-weight: 700;
  color: rgba(245,240,232,.4);
  clip-path: polygon(4% 0, 100% 0, 100% 96%, 96% 100%, 0 100%, 0 4%);
  transition: all .2s var(--draw-ease);
}
.nsoc:hover { border-color: var(--acc); color: var(--acc); background: rgba(192,57,43,.1); transform: scale(1.1) rotate(-3deg) }

.nav-foot {
  padding: 14px 32px;
  font-family: 'JetBrains Mono', monospace; font-size: 8px;
  letter-spacing: .18em; text-transform: uppercase;
  color: rgba(245,240,232,.2); flex-shrink: 0;
}

/* OVERLAY */
.overlay {
  position: fixed; inset: 0;
  background: rgba(13,13,13,.7);
  z-index: 400; opacity: 0; pointer-events: none; transition: opacity .4s;
}
.overlay.on { opacity: 1; pointer-events: all }

/* BACK TO TOP — как штамп манги */
.top-btn {
  position: fixed; right: 20px; bottom: 24px; z-index: 300;
  width: 40px; height: 40px;
  border: 2.5px solid var(--ink); background: var(--paper);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink); font-size: 14px; font-weight: 900;
  clip-path: polygon(4% 0, 100% 0, 100% 92%, 96% 100%, 0 100%, 0 8%);
  opacity: 0; pointer-events: none; transform: translateY(8px);
  transition: opacity .3s, transform .3s var(--draw-ease), background .2s;
}
.top-btn.show { opacity: 1; pointer-events: all; transform: none }
.top-btn:hover { background: var(--ink); color: var(--paper); transform: scale(1.08) rotate(3deg)!important }

/* ═══════════════════════════════════════════
   LAYOUT
═══════════════════════════════════════════ */
.site { margin-left: var(--bar-w); position: relative; z-index: 2 }

/* ═══════════════════════════════════════════
   HERO — как обложка манги
═══════════════════════════════════════════ */
.hero {
  min-height: 100vh;
  display: grid; grid-template-columns: 1fr auto;
  align-items: center;
  padding: 0 7vw; gap: 4vw;
  position: relative; overflow: hidden;
  background: var(--paper);
}

/* фоновые линии скорости — как экшн в манге */
.hero-speed-lines {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  overflow: hidden;
}
.hero-speed-lines::before {
  content: '';
  position: absolute;
  top: 50%; left: 30%;
  width: 200%; height: 200%;
  transform: translate(-50%,-50%);
  background: repeating-conic-gradient(
    from 0deg at 50% 50%,
    rgba(13,13,13,.03) 0deg,
    rgba(13,13,13,.03) .4deg,
    transparent .4deg,
    transparent 3deg
  );
}

/* чернильные пятна декоративные */
.ink-splash {
  position: absolute; pointer-events: none; z-index: 0;
  border-radius: 50%;
  background: var(--ink);
  filter: blur(1px);
  opacity: .04;
}
.ink-splash:nth-child(1) { width: 300px; height: 300px; top: -80px; right: 10%; clip-path: polygon(30% 0%, 70% 10%, 100% 40%, 85% 80%, 50% 100%, 15% 85%, 0 50%, 20% 20%) }
.ink-splash:nth-child(2) { width: 180px; height: 180px; bottom: 10%; left: 20%; clip-path: ellipse(60% 40% at 50% 50%) }

.hero-left { position: relative; z-index: 1 }

/* ГЛАВА / номер манги */
.h-chapter {
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  letter-spacing: .45em; text-transform: uppercase; color: var(--acc);
  display: flex; align-items: center; gap: 10px; margin-bottom: 20px;
  opacity: 0; animation: inkDraw .7s var(--ink-ease) forwards .05s;
}
.h-chapter::before { content: ''; width: 30px; height: 2px; background: var(--acc) }

/* ОГРОМНЫЙ ЗАГОЛОВОК — как название манги */
.h-title {
  font-family: 'Dela Gothic One', cursive;
  font-size: clamp(5rem,11vw,11rem);
  line-height: .85; letter-spacing: -.02em;
  color: var(--ink);
  margin-bottom: 16px;
  opacity: 0; animation: inkDraw .7s var(--ink-ease) forwards .15s;
  position: relative;
}
/* красная подчёркивающая линия */
.h-title .underline-acc {
  position: relative; display: inline-block;
}
.h-title .underline-acc::after {
  content: '';
  position: absolute; bottom: -4px; left: 0; right: 0; height: 4px;
  background: var(--acc);
  clip-path: polygon(0 0, 100% 20%, 100% 100%, 0 80%);
  animation: lineGrow .6s var(--ink-ease) forwards .5s;
  transform-origin: left; transform: scaleX(0);
}
@keyframes lineGrow { to { transform: scaleX(1) } }

.h-title .rf {
  display: block; font-size: .42em;
  color: var(--grey); letter-spacing: .05em;
}

.h-sub {
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  line-height: 2; color: var(--grey); max-width: 360px;
  margin-bottom: 44px;
  opacity: 0; animation: inkDraw .7s var(--ink-ease) forwards .3s;
  border-left: 3px solid var(--acc); padding-left: 16px;
}

.h-acts {
  display: flex; gap: 14px; flex-wrap: wrap;
  opacity: 0; animation: inkDraw .7s var(--ink-ease) forwards .44s;
}

@keyframes inkDraw {
  from { opacity: 0; transform: translateY(14px) }
  to   { opacity: 1; transform: none }
}

/* SCROLL HINT */
.scroll-hint {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-family: 'JetBrains Mono', monospace; font-size: 8px;
  letter-spacing: .32em; text-transform: uppercase; color: var(--grey);
  opacity: 0; animation: inkDraw 1s ease forwards 1.1s; z-index: 1;
}
.scroll-hint::after {
  content: ''; width: 2px; height: 32px;
  background: linear-gradient(to bottom, var(--acc), transparent);
  animation: sp 2.2s ease-in-out infinite;
}
@keyframes sp { 0%,100%{transform:scaleY(.3);opacity:.2} 55%{transform:scaleY(1);opacity:1} }

/* ═══════════════════════════════════════════
   MASCOT AREA — справа в hero
═══════════════════════════════════════════ */
.mascot-area {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
  gap: 0;
  opacity: 0; animation: mascotAppear .8s var(--draw-ease) forwards .35s;
}
@keyframes mascotAppear {
  from { opacity: 0; transform: translateX(30px) rotate(3deg) }
  to   { opacity: 1; transform: none }
}

.mascot-img {
  width: clamp(200px, 28vw, 380px);
  height: auto;
  filter: contrast(1.05);
  animation: mascotFloat 4s ease-in-out infinite;
  position: relative; z-index: 2;
}
@keyframes mascotFloat {
  0%,100% { transform: translateY(0) rotate(-.5deg) }
  50%      { transform: translateY(-12px) rotate(.5deg) }
}

/* РЕЧЕВОЙ ПУЗЫРЬ — манга стиль */
.speech-bubble {
  position: relative;
  background: var(--paper);
  border: 2.5px solid var(--ink);
  padding: 10px 16px;
  font-family: 'Dela Gothic One', cursive;
  font-size: 13px; letter-spacing: .05em;
  color: var(--ink);
  max-width: 200px; text-align: center;
  margin-top: -10px; z-index: 3;
  /* неровные края */
  clip-path: polygon(2% 0, 98% 0, 100% 3%, 100% 94%, 98% 100%, 2% 100%, 0 97%, 0 3%);
  animation: bubblePop .4s var(--draw-ease) forwards .8s;
  transform: scale(0); transform-origin: bottom center;
}
@keyframes bubblePop {
  from { transform: scale(0) }
  to   { transform: scale(1) }
}
/* хвостик пузыря */
.speech-bubble::before {
  content: '';
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  border: 7px solid transparent;
  border-bottom-color: var(--ink);
}
.speech-bubble::after {
  content: '';
  position: absolute; top: -9px; left: 50%; transform: translateX(-50%);
  border: 6px solid transparent;
  border-bottom-color: var(--paper);
}

/* ═══════════════════════════════════════════
   BUTTONS — как кнопки в манге
═══════════════════════════════════════════ */
.btn {
  font-family: 'Dela Gothic One', cursive;
  font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
  padding: 14px 28px;
  border: 2.5px solid var(--ink);
  cursor: none; position: relative; overflow: hidden;
  clip-path: polygon(3% 0, 100% 0, 100% 85%, 97% 100%, 0 100%, 0 15%);
  transition: transform .15s var(--draw-ease), color .2s;
  background: var(--paper);
  color: var(--ink);
}
.btn::before {
  content: '';
  position: absolute; inset: 0; background: var(--ink);
  transform: translateY(101%); transition: transform .3s var(--ink-ease);
}
.btn:hover { transform: translate(-2px, -2px); color: var(--paper) }
.btn:hover::before { transform: translateY(0) }
.btn:active { transform: translate(1px, 1px) }
/* тень как у комикс-кнопки */
.btn::after {
  content: '';
  position: absolute; bottom: -4px; right: -4px;
  left: 4px; top: 4px;
  background: var(--ink); z-index: -1;
  clip-path: polygon(3% 0, 100% 0, 100% 85%, 97% 100%, 0 100%, 0 15%);
  transition: transform .15s var(--draw-ease);
}
.btn:hover::after { transform: translate(2px, 2px) }

.btn-acc {
  background: var(--acc); color: var(--paper);
  border-color: var(--acc);
}
.btn-acc::before { background: var(--ink) }
.btn-acc::after { background: rgba(192,57,43,.5) }

/* ═══════════════════════════════════════════
   SECTION DIVIDER — как панель манги
═══════════════════════════════════════════ */
.sec-divider {
  height: 3px; margin: 0 7vw;
  background: var(--ink);
  clip-path: polygon(0 0, 100% 30%, 100% 70%, 0 100%);
  opacity: .12;
}

/* ═══════════════════════════════════════════
   POSTS
═══════════════════════════════════════════ */
.posts { padding: 64px 7vw 96px }
.sec-row { display: flex; align-items: center; gap: 16px; margin-bottom: 28px }
.sec-lbl {
  font-family: 'Dela Gothic One', cursive; font-size: 10px;
  letter-spacing: .2em; text-transform: uppercase; color: var(--ink); white-space: nowrap;
}
.sec-line { flex: 1; height: 2px; background: var(--ink); opacity: .1 }
.sec-cnt { font-family: 'JetBrains Mono', monospace; font-size: 8px; color: var(--grey) }

/* FILTERS — как закладки */
.filters { display: flex; gap: 3px; margin-bottom: 24px; flex-wrap: wrap }
.f-btn {
  font-family: 'Dela Gothic One', cursive; font-size: 9px;
  letter-spacing: .12em; text-transform: uppercase;
  padding: 6px 14px; border: 2px solid var(--ink); color: var(--ink);
  background: var(--paper);
  clip-path: polygon(3% 0, 100% 0, 100% 80%, 97% 100%, 0 100%, 0 20%);
  transition: all .2s var(--draw-ease);
  position: relative;
}
.f-btn.on, .f-btn:hover {
  background: var(--ink); color: var(--paper); transform: translateY(-2px);
}
.f-btn.on { color: var(--acc) }
.f-btn:active { transform: translateY(0) }

/* BENTO */
.bento { display: grid; grid-template-columns: repeat(12,1fr); gap: 3px; background: var(--ink); }
.bento.geq { grid-template-columns: repeat(3,1fr) }
.bento.geq .card { grid-column: span 1!important }
.bento.lst { display: flex; flex-direction: column; gap: 3px; background: var(--ink) }

.card {
  background: var(--paper); padding: 28px 22px;
  display: flex; flex-direction: column;
  position: relative; overflow: hidden; cursor: none;
  opacity: 0; transform: translateY(10px);
  transition: opacity .5s, transform .5s, background .2s;
}
.card.V { opacity: 1; transform: none }

/* bento spans */
.bento .card:nth-child(1)  { grid-column: span 8 }
.bento .card:nth-child(2)  { grid-column: span 4 }
.bento .card:nth-child(3),
.bento .card:nth-child(4),
.bento .card:nth-child(5)  { grid-column: span 4 }
.bento .card:nth-child(6)  { grid-column: span 7 }
.bento .card:nth-child(7)  { grid-column: span 5 }
.bento .card:nth-child(n+8){ grid-column: span 6 }
.card.hidden { display: none }

/* угловая метка как в манге */
.card::before {
  content: '';
  position: absolute; top: 0; left: 0;
  width: 0; height: 0;
  border-style: solid;
  border-width: 0 0 0 0;
  border-color: transparent transparent transparent var(--acc);
  transition: border-width .35s var(--ink-ease);
}
.card:hover { background: var(--paper2) }
.card:hover::before { border-width: 40px 0 0 40px }

/* красная линия сверху */
.card::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--acc);
  transform: scaleX(0); transform-origin: left;
  transition: transform .4s var(--ink-ease);
  clip-path: polygon(0 0, 100% 20%, 100% 100%, 0 80%);
}
.card:hover::after { transform: scaleX(1) }

/* GAME card */
.card.gm { border-bottom: 3px solid var(--acc) }
.c-badge {
  position: absolute; top: 12px; right: 12px;
  font-family: 'Dela Gothic One', cursive; font-size: 8px; letter-spacing: .2em;
  color: var(--paper); background: var(--acc);
  padding: 2px 8px;
  clip-path: polygon(4% 0, 100% 0, 100% 80%, 96% 100%, 0 100%, 0 20%);
}

.c-top { display: flex; align-items: center; gap: 8px; margin-bottom: 12px }
.c-tag {
  font-family: 'JetBrains Mono', monospace; font-size: 8px;
  letter-spacing: .22em; text-transform: uppercase; color: var(--acc);
}
.c-num { margin-left: auto; font-family: 'JetBrains Mono', monospace; font-size: 9px; color: var(--grey); opacity: .5 }
.c-title {
  font-family: 'Dela Gothic One', cursive;
  font-size: 1.15rem; line-height: 1.2; color: var(--ink);
  margin-bottom: 8px; transition: color .2s;
}
.card:hover .c-title { color: var(--acc) }
.c-exc {
  font-family: 'Noto Sans JP', sans-serif; font-size: 11px;
  font-weight: 300; line-height: 1.75; color: var(--grey2);
  overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 3; -webkit-box-orient: vertical;
}
.c-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto; padding-top: 14px;
  font-family: 'JetBrains Mono', monospace; font-size: 8px;
  letter-spacing: .1em; color: var(--grey);
}
.c-read { color: var(--grey) }
.c-arr { color: var(--acc); opacity: 0; transition: opacity .2s, transform .2s; font-size: 16px }
.card:hover .c-arr { opacity: 1; transform: translateX(4px) }

/* list mode */
.bento.lst .card { flex-direction: row; align-items: center; gap: 20px; padding: 16px 22px }
.bento.lst .c-top { flex-shrink: 0; width: 70px; flex-direction: column; align-items: flex-start; margin-bottom: 0 }
.bento.lst .c-exc { display: none }
.bento.lst .c-title { font-size: 1rem; margin-bottom: 0 }
.bento.lst .c-foot { padding-top: 0; flex-shrink: 0 }

/* SCROLL REVEAL */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ink-ease), transform .6s var(--ink-ease) }
.reveal.R { opacity: 1; transform: none }

/* ═══════════════════════════════════════════
   SINGLE POST
═══════════════════════════════════════════ */
.post-hero {
  padding: 106px 7vw 52px;
  border-bottom: 3px solid var(--ink);
  position: relative; overflow: hidden;
  background: var(--paper);
}
.post-hero::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--acc); z-index: 1;
  clip-path: polygon(0 0, 100% 40%, 100% 100%, 0 60%);
}
.p-tag {
  font-family: 'JetBrains Mono', monospace; font-size: 9px;
  letter-spacing: .38em; text-transform: uppercase; color: var(--acc);
  margin-bottom: 16px; position: relative; z-index: 1;
}
.p-h1 {
  font-family: 'Dela Gothic One', cursive;
  font-size: clamp(1.8rem,4.5vw,3.8rem); line-height: 1.0;
  letter-spacing: -.01em; color: var(--ink); max-width: 820px;
  position: relative; z-index: 1;
}
.p-meta {
  display: flex; gap: 24px; flex-wrap: wrap; margin-top: 20px;
  font-family: 'JetBrains Mono', monospace; font-size: 9px;
  letter-spacing: .12em; color: var(--grey);
  position: relative; z-index: 1;
}

/* GAME EMBED */
.game-box { margin: 0 7vw; border: 3px solid var(--ink); background: var(--paper2) }
.game-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px; border-bottom: 2px solid var(--ink);
  font-family: 'Dela Gothic One', cursive; font-size: 9px;
  letter-spacing: .18em; color: var(--acc);
}
.game-top::before { content: '▶  ' }
.game-frame { position: relative; padding-bottom: 56.25%; background: var(--ink) }
.game-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0 }
.game-fs {
  position: absolute; bottom: 9px; right: 9px; cursor: pointer;
  font-family: 'Dela Gothic One', cursive; font-size: 8px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--paper); border: 2px solid rgba(245,240,232,.4); padding: 5px 10px;
  background: rgba(13,13,13,.9); transition: all .2s;
  clip-path: polygon(4% 0, 100% 0, 100% 80%, 96% 100%, 0 100%, 0 20%);
}
.game-fs:hover { background: var(--acc); border-color: var(--acc) }
.game-dl { padding: 8px 14px; display: flex; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--paper3) }
.game-dl a {
  font-family: 'Dela Gothic One', cursive; font-size: 8px; letter-spacing: .13em; text-transform: uppercase;
  padding: 5px 11px; border: 2px solid var(--ink); color: var(--ink); transition: all .2s;
  clip-path: polygon(4% 0, 100% 0, 100% 80%, 96% 100%, 0 100%, 0 20%);
}
.game-dl a:hover { background: var(--ink); color: var(--paper) }

/* POST BODY */
.post-body { padding: 52px 7vw 80px; max-width: calc(680px + 14vw) }
.post-body p { margin-bottom: 1.55em; line-height: 1.9; font-size: 1.05rem; color: var(--ink2) }
.post-body h2 {
  font-family: 'Dela Gothic One', cursive;
  font-size: 1.5rem; color: var(--ink);
  margin: 2.5em 0 .8em;
  border-left: 4px solid var(--acc); padding-left: 16px;
}
.post-body h3 { font-family: 'Dela Gothic One', cursive; font-size: 1.1rem; color: var(--ink); margin: 2em 0 .65em; }
.post-body blockquote {
  border-left: 4px solid var(--acc); padding: 12px 26px; margin: 2em 0;
  color: var(--grey2); font-style: italic; font-size: 1.1rem;
  background: var(--paper2);
  clip-path: polygon(0 0, 100% 0, 100% 90%, 98% 100%, 0 100%);
}
.post-body a { color: var(--acc); border-bottom: 2px solid rgba(192,57,43,.3); transition: border-color .2s }
.post-body a:hover { border-color: var(--acc) }
.post-body code {
  font-family: 'JetBrains Mono', monospace; font-size: .84em;
  color: var(--acc); background: var(--paper2); padding: 2px 6px;
  border: 1px solid var(--paper3);
}
.post-body pre {
  background: var(--ink); border: 2px solid var(--ink2);
  padding: 22px; overflow-x: auto; margin: 1.5em 0; position: relative;
  clip-path: polygon(0 0, 100% 0, 100% 96%, 98% 100%, 0 100%);
}
.post-body pre code { background: none; padding: 0; color: var(--paper); border: none }
.copy-btn {
  position: absolute; top: 9px; right: 9px;
  font-family: 'Dela Gothic One', cursive; font-size: 8px; letter-spacing: .14em; text-transform: uppercase;
  padding: 4px 9px; border: 1px solid rgba(245,240,232,.2); color: rgba(245,240,232,.5);
  background: var(--ink); cursor: pointer; transition: all .2s;
  clip-path: polygon(4% 0, 100% 0, 100% 80%, 96% 100%, 0 100%, 0 20%);
}
.copy-btn:hover { background: var(--acc); border-color: var(--acc); color: var(--paper) }

.kg-width-wide { width: 85vw; min-width: 100%; margin: auto calc(50% - 50vw); transform: translate(calc(50vw - 50%),0) }
.kg-width-full { width: 100vw; left: 50%; right: 50%; margin-left: -50vw; margin-right: -50vw; position: relative }
.kg-image { max-width: 100%; height: auto }

/* RELATED */
.post-related { padding: 44px 7vw 70px; border-top: 3px solid var(--ink) }
.post-related h3 {
  font-family: 'Dela Gothic One', cursive; font-size: 10px;
  letter-spacing: .2em; text-transform: uppercase; color: var(--ink); margin-bottom: 22px;
  border-left: 4px solid var(--acc); padding-left: 12px;
}
.rel-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(220px,1fr)); gap: 3px; background: var(--ink) }
.rel-card {
  background: var(--paper); padding: 20px 16px; position: relative; overflow: hidden; display: block;
  transition: background .2s;
}
.rel-card:hover { background: var(--paper2) }
.rel-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--acc); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ink-ease) }
.rel-card:hover::before { transform: scaleX(1) }
.rel-card h4 { font-family: 'Dela Gothic One', cursive; font-size: 1rem; color: var(--ink); margin-bottom: 5px; transition: color .2s }
.rel-card:hover h4 { color: var(--acc) }
.rel-card span { font-family: 'JetBrains Mono', monospace; font-size: 8px; color: var(--grey) }

/* PAGE */
.page-body { padding: 106px 7vw 96px }
.page-body h1 {
  font-family: 'Dela Gothic One', cursive;
  font-size: clamp(2rem,5vw,3.8rem); color: var(--ink);
  margin-bottom: 38px; padding-bottom: 18px;
  border-bottom: 3px solid var(--ink);
}
.page-cnt { max-width: 680px; line-height: 1.9 }
.page-cnt p { margin-bottom: 1.5em }

/* TAG */
.tag-body { padding: 106px 7vw 48px }
.tag-body h1 { font-family: 'Dela Gothic One', cursive; font-size: clamp(2.5rem,6vw,5rem); color: var(--ink); margin-bottom: 6px }
.tag-desc { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--grey); margin-bottom: 48px }

/* ERROR */
.err-wrap { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 0 7vw; position: relative }
.err-bg { position: absolute; font-family: 'Dela Gothic One', cursive; font-size: clamp(8rem,22vw,18rem); color: var(--acc); opacity: .07; line-height: 1; pointer-events: none; top: 50%; transform: translateY(-50%) }
.err-c { position: relative; z-index: 1 }
.err-c h1 { font-family: 'Dela Gothic One', cursive; font-size: 2.5rem; color: var(--ink); margin-bottom: 12px }
.err-c p { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--grey); margin-bottom: 26px }

/* FOOTER */
.site-footer {
  padding: 28px 7vw; border-top: 3px solid var(--ink);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px;
  font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: .16em; color: var(--grey);
  background: var(--paper);
}
.ftr-soc { display: flex; gap: 8px }
.ftr-s {
  width: 32px; height: 32px; border: 2px solid var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', monospace; font-size: 9px; font-weight: 700;
  color: var(--ink);
  clip-path: polygon(4% 0, 100% 0, 100% 96%, 96% 100%, 0 100%, 0 4%);
  transition: all .2s var(--draw-ease);
}
.ftr-s:hover { background: var(--ink); color: var(--paper); transform: scale(1.1) rotate(-4deg) }

/* ═══════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════ */
@media(max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 100px }
  .mascot-area { display: none }
  .bento .card { grid-column: span 12!important }
  .bento.geq { grid-template-columns: repeat(2,1fr) }
}
@media(max-width: 640px) {
  :root { --bar-w: 36px; --nav-w: 100vw }
  body { cursor: auto }
  .cd, .cr, .tr { display: none }
  .bar-logo { font-size: 8px; letter-spacing: .2em }
  .hero, .posts, .post-hero, .post-body, .page-body, .tag-body, .err-wrap, .game-box { padding-left: 5vw; padding-right: 5vw }
  .h-title { font-size: clamp(3.5rem,14vw,6rem) }
  .top-controls { right: 10px; top: 12px }
  .ctrl { width: 38px; height: 38px }
  .top-btn { right: 12px; bottom: 16px }
  .bento.geq { grid-template-columns: 1fr }
  .site-footer { flex-direction: column; align-items: flex-start }
  .sec-divider { margin: 0 5vw }
}
@media(prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms!important; transition-duration: .01ms!important }
}
/* ── КАСТОМНЫЕ РАЗДЕЛЫ МЕНЮ ── */
.nlink-shop { color: var(--red) !important; }
.nlink-shop:hover { color: var(--paper) !important; }

/* ── ФУТЕР ССЫЛКИ ── */
.ftr-links {
  display: flex; gap: 12px; flex-wrap: wrap; align-items: center;
  font-family: 'Dela Gothic One', cursive; font-size: 9px;
  letter-spacing: .12em; text-transform: uppercase;
}
.ftr-link {
  color: var(--grey); transition: color .2s;
  padding-bottom: 1px; border-bottom: 1.5px solid transparent;
}
.ftr-link:hover { color: var(--ink); border-color: var(--red); }
.ftr-shop { color: var(--red) !important; }
.ftr-shop:hover { color: var(--ink) !important; border-color: var(--ink) !important; }

/* ═══════════════════════════════════════════
   v1.0.1 FIXES & NEW BLOCKS
═══════════════════════════════════════════ */

/* ── МАСКОТ БЕЗ БЕЛОГО ФОНА ──
   mix-blend-mode:multiply на светлом фоне убирает белый */
.mascot-img {
  mix-blend-mode: multiply;
  background: transparent;
}
/* Убираем белый фон у области маскота */
.mascot-area {
  background: transparent;
}

/* ── ФИКС КНОПОК — текст ВСЕГДА виден ──
   Проблема: ::before перекрывал текст
   Решение: z-index на span внутри */
.btn {
  position: relative;
  z-index: 0;
}
.btn::before {
  z-index: -1;
}
/* Текст кнопки поверх фона */
.btn > *,
.btn span,
.btn svg {
  position: relative;
  z-index: 1;
}
/* Явно задаём цвет текста при наведении для всех вариантов */
.btn:hover {
  color: var(--paper) !important;
}
.btn-acc:hover {
  color: var(--paper) !important;
}
/* Мобильные устройства — курсор pointer */
@media (hover: none) {
  .btn { color: inherit }
  .btn-acc { color: var(--paper) }
}

/* ── КАСТОМНЫЕ ПУНКТЫ МЕНЮ ── */
.nlink-shop {
  border-top: 2px solid rgba(192,57,43,.2);
  margin-top: 4px;
  padding-top: 18px !important;
}
.nlink-shop .nlink-n { color: var(--red) }
.nlink-shop:hover { color: var(--paper) }
.nsoc-av { color: var(--red) !important; border-color: rgba(192,57,43,.3) !important }
.nsoc-av:hover { border-color: var(--red) !important; background: rgba(192,57,43,.1) !important }

/* ── ФУТЕР ССЫЛКИ ── */
.ftr-links {
  display: flex; gap: 14px; flex-wrap: wrap; align-items: center;
  font-family: 'Dela Gothic One', cursive; font-size: 9px;
  letter-spacing: .12em; text-transform: uppercase;
}
.ftr-link {
  color: var(--grey); transition: color .2s;
  padding-bottom: 1px; border-bottom: 1.5px solid transparent;
}
.ftr-link:hover { color: var(--ink); border-color: var(--red) }
.ftr-shop { color: var(--red) }
.ftr-shop:hover { color: var(--ink) !important; border-color: var(--ink) !important }

/* ── SHOP BANNER на главной ── */
.shop-banner {
  background: var(--ink);
  padding: 0 7vw;
}
.shop-banner-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
  padding: 28px 0;
  border-top: 3px solid rgba(192,57,43,.4);
  border-bottom: 3px solid rgba(192,57,43,.4);
}
.shop-banner-text {
  display: flex; flex-direction: column; gap: 4px;
}
.shop-label {
  font-family: 'JetBrains Mono', monospace; font-size: 9px;
  letter-spacing: .4em; text-transform: uppercase; color: var(--red);
}
.shop-title {
  font-family: 'Dela Gothic One', cursive; font-size: 1.4rem;
  color: var(--paper); letter-spacing: .02em;
}
.shop-desc {
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  color: rgba(245,240,232,.45); letter-spacing: .04em;
}
.shop-btn {
  flex-shrink: 0;
  border-color: var(--red) !important;
  /* переопределяем цвета для версии на тёмном фоне */
}
.shop-btn { color: var(--paper); background: var(--red); border-color: var(--red) }
.shop-btn::before { background: var(--paper) }
.shop-btn:hover { color: var(--ink) !important }
.shop-btn::after { background: rgba(192,57,43,.4) }

@media(max-width: 640px) {
  .shop-banner { padding-left: 5vw; padding-right: 5vw }
  .shop-banner-inner { flex-direction: column; align-items: flex-start }
  .shop-btn { width: 100%; justify-content: center }
  .ftr-links { gap: 10px }
}
