/* ===== COBRA COMICS — общий стиль каталога сценариев ===== */

:root {
  --red: #e62429;
  --blue: #1b3fbf;
  --navy: #121b3a;
  --yellow: #ffd600;
  --cyan: #19c3d8;
  --paper: #f4ead8;
  --ink: #17120e;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: "Rubik", -apple-system, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 10%, rgba(230,36,41,.06), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(27,63,191,.07), transparent 45%),
    var(--paper);
  background-attachment: fixed;
  line-height: 1.5;
}

/* газетный растр как фоновая текстура секций */
.halftone {
  background-image: radial-gradient(rgba(23,18,14,.13) 1px, transparent 1.6px);
  background-size: 7px 7px;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

.display { font-family: "Russo One", sans-serif; text-transform: uppercase; }
.hand { font-family: "Neucha", cursive; }

/* ===== Шапка ===== */
.masthead {
  background: var(--red);
  border-bottom: 5px solid var(--ink);
  box-shadow: 0 5px 0 rgba(23,18,14,.25);
  position: relative; z-index: 5;
}
.masthead .wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; padding-bottom: 14px; gap: 16px; flex-wrap: wrap;
}
.brand { display: flex; align-items: baseline; gap: 12px; text-decoration: none; }
.brand .logo {
  font-family: "Russo One", sans-serif; font-size: 30px; color: white;
  text-shadow: 3px 3px 0 var(--ink); letter-spacing: 2px;
}
.brand .tag { font-family: "Neucha", cursive; color: #ffe9a8; font-size: 17px; }
.issue-badge {
  background: var(--yellow); border: 3px solid var(--ink); border-radius: 10px;
  padding: 5px 14px; font-family: "Russo One", sans-serif; font-size: 14px;
  box-shadow: 3px 3px 0 var(--ink); transform: rotate(2deg);
}

/* ===== Комикс-панель ===== */
.panel {
  background: white; border: 4px solid var(--ink);
  box-shadow: 9px 9px 0 rgba(23,18,14,.85);
  position: relative;
}
.panel img { display: block; width: 100%; height: auto; }
.tilt-l { transform: rotate(-1.1deg); }
.tilt-r { transform: rotate(1.1deg); }

/* нарративная плашка */
.narr {
  position: absolute; top: -14px; left: -12px; z-index: 3;
  background: var(--yellow); border: 3px solid var(--ink);
  padding: 6px 14px; max-width: 75%;
  font-family: "Neucha", cursive; font-size: 18px; line-height: 1.3;
  box-shadow: 4px 4px 0 rgba(23,18,14,.7); transform: rotate(-1deg);
}
.narr.br { top: auto; left: auto; bottom: -14px; right: -10px; transform: rotate(1deg); }

/* реплики */
.bubble {
  position: absolute; z-index: 3;
  background: white; border: 3px solid var(--ink); border-radius: 18px;
  padding: 8px 14px; max-width: 46%;
  font-family: "Neucha", cursive; font-size: 18px; line-height: 1.25;
  box-shadow: 4px 4px 0 rgba(23,18,14,.5);
}
.bubble::after {
  content: ""; position: absolute; bottom: -16px; left: 28px;
  border: 9px solid transparent; border-top-color: var(--ink);
}
.bubble::before {
  content: ""; position: absolute; bottom: -11px; left: 30px;
  border: 7px solid transparent; border-top-color: white; z-index: 1;
}
.bubble.flip::after { left: auto; right: 28px; }
.bubble.flip::before { left: auto; right: 30px; }
.bubble.thought { border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; font-style: italic; }
.bubble.thought::after, .bubble.thought::before { display: none; }
.bubble .who { font-family: "Russo One", sans-serif; font-size: 11px; text-transform: uppercase; color: var(--blue); display: block; }

/* стикер эмоции — звёздный бёрст */
.pow {
  position: absolute; z-index: 4;
  background: var(--red); color: white;
  font-family: "Russo One", sans-serif; font-size: 20px; text-transform: uppercase;
  padding: 14px 20px; text-align: center; line-height: 1;
  clip-path: polygon(50% 0%, 59% 12%, 74% 4%, 76% 20%, 93% 18%, 87% 33%, 100% 40%,
    89% 51%, 98% 64%, 82% 66%, 84% 82%, 69% 77%, 63% 93%, 50% 82%, 37% 93%, 31% 77%,
    16% 82%, 18% 66%, 2% 64%, 11% 51%, 0% 40%, 13% 33%, 7% 18%, 24% 20%, 26% 4%, 41% 12%);
  text-shadow: 2px 2px 0 var(--ink);
  transform: rotate(-6deg);
}
.pow.y { background: var(--yellow); color: var(--ink); text-shadow: none; }
.pow.c { background: var(--cyan); color: var(--navy); text-shadow: none; }

/* ===== Секции ===== */
.section { padding: 56px 0; }
.section-title {
  display: inline-block; background: var(--ink); color: white;
  font-family: "Russo One", sans-serif; font-size: 26px; text-transform: uppercase;
  padding: 8px 22px; transform: skew(-8deg); margin-bottom: 34px;
  box-shadow: 6px 6px 0 var(--red);
}
.section-title span { display: inline-block; transform: skew(8deg); }

/* ===== Карточки героев ===== */
.heroes { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 34px 26px; }
.hero-card .hero-top { position: relative; }
.hero-card .panel { transition: transform .15s; }
.hero-card:hover .panel { transform: translate(-3px,-3px) rotate(-.5deg); }
.hero-card .name-plate {
  position: absolute; bottom: -16px; left: 50%; transform: translateX(-50%) rotate(-2deg);
  background: var(--red); color: white; border: 3px solid var(--ink);
  font-family: "Russo One", sans-serif; font-size: 17px; text-transform: uppercase;
  padding: 5px 16px; white-space: nowrap; box-shadow: 3px 3px 0 var(--ink); z-index: 3;
}
.hero-card .name-plate.blue { background: var(--blue); }
.hero-card .name-plate.cyan { background: var(--cyan); color: var(--navy); }
.hero-card .name-plate.dark { background: var(--navy); }
.hero-meta { margin-top: 30px; text-align: center; }
.hero-meta .role { font-size: 13.5px; color: #5a4f43; }
.hero-meta .feels {
  margin-top: 8px; font-family: "Neucha", cursive; font-size: 18px; line-height: 1.3;
}
.hero-meta .feels b { color: var(--red); }

/* ===== Сцена ===== */
.scene { display: flex; flex-direction: column; gap: 64px; }
.beat { display: grid; grid-template-columns: 7fr 5fr; gap: 40px; align-items: center; }
.beat.rev { grid-template-columns: 5fr 7fr; }
.beat.rev .beat-art { order: 2; }
.beat.rev .beat-side { order: 1; }
.beat-side .kicker {
  font-family: "Russo One", sans-serif; color: var(--red); font-size: 13px;
  text-transform: uppercase; letter-spacing: 2px; margin-bottom: 8px;
}
.beat-side h3 { font-family: "Russo One", sans-serif; font-size: 24px; margin-bottom: 12px; }
.beat-side p { font-size: 15.5px; margin-bottom: 10px; }
.beat-side .emo {
  display: inline-block; margin-top: 6px;
  background: white; border: 3px dashed var(--red); border-radius: 12px;
  padding: 8px 14px; font-family: "Neucha", cursive; font-size: 17.5px;
}
.beat-side .emo b { color: var(--red); }

/* чат-вставка «тем временем» */
.chatstrip {
  background: var(--navy); border: 4px solid var(--ink); border-radius: 14px;
  box-shadow: 9px 9px 0 rgba(23,18,14,.85); padding: 16px; color: white;
}
.chatstrip .ch-title {
  font-family: "Russo One", sans-serif; font-size: 13px; letter-spacing: 1px;
  text-transform: uppercase; color: #9fb6ff; margin-bottom: 10px;
}
.chatstrip .m {
  background: #1d2b55; border-radius: 10px; padding: 8px 12px; margin-bottom: 8px;
  font-size: 14.5px; max-width: 92%;
}
.chatstrip .m .w { font-weight: 700; font-size: 12.5px; color: var(--cyan); display: block; }
.chatstrip .m a { color: #7fd0f5; word-break: break-all; }
.chatstrip .m.user .w { color: var(--yellow); }
.chatstrip .m:last-child { margin-bottom: 0; }

/* ===== Эпилог: дуги эмоций ===== */
.arcs { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 22px; }
.arc {
  background: white; border: 4px solid var(--ink); border-radius: 4px;
  box-shadow: 7px 7px 0 rgba(23,18,14,.8); padding: 18px 20px;
}
.arc .aname { font-family: "Russo One", sans-serif; font-size: 15px; text-transform: uppercase; margin-bottom: 8px; }
.arc .path { font-family: "Neucha", cursive; font-size: 20px; }
.arc .path .from { color: #a33; }
.arc .path .to { color: #1b7a3d; }
.arc p { font-size: 13.5px; color: #5a4f43; margin-top: 8px; }

/* ===== За кадром (техчасть) ===== */
.backstage { background: var(--navy); color: #e8ecff; border-top: 5px solid var(--ink); border-bottom: 5px solid var(--ink); }
.backstage .section-title { box-shadow: 6px 6px 0 var(--cyan); }
.steps { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.step {
  background: #1a2650; border: 3px solid #0d1430; border-radius: 12px; padding: 18px 20px;
}
.step .sn {
  display: inline-block; font-family: "Russo One", sans-serif; background: var(--cyan);
  color: var(--navy); border-radius: 8px; padding: 2px 10px; font-size: 14px; margin-bottom: 8px;
}
.step h4 { font-size: 16.5px; margin-bottom: 6px; }
.step p, .step li { font-size: 14px; color: #b9c4ea; }
.step ul { margin: 6px 0 0 18px; }

/* ===== Каталог выпусков ===== */
.rack { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 44px 30px; }
.comic-card { text-decoration: none; color: var(--ink); position: relative; display: block; }
.comic-card .panel { aspect-ratio: 3/4; overflow: hidden; transition: transform .15s; }
.comic-card .panel img { width: 100%; height: 100%; object-fit: cover; }
.comic-card:hover .panel { transform: translate(-4px,-4px) rotate(-.8deg); }
.comic-card .issue-no {
  position: absolute; top: -12px; right: -10px; z-index: 3;
  background: var(--yellow); border: 3px solid var(--ink); border-radius: 50%;
  width: 58px; height: 58px; display: flex; align-items: center; justify-content: center;
  font-family: "Russo One", sans-serif; font-size: 19px; box-shadow: 3px 3px 0 var(--ink);
  transform: rotate(8deg);
}
.comic-card .c-title {
  margin-top: 16px; font-family: "Russo One", sans-serif; font-size: 18px; text-transform: uppercase;
}
.comic-card .c-sub { font-family: "Neucha", cursive; font-size: 17px; color: #5a4f43; }
.comic-card.soon .panel {
  display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(45deg, #e7dcc4, #e7dcc4 14px, #efe6d2 14px, #efe6d2 28px);
}
.comic-card.soon .soon-mark {
  font-family: "Russo One", sans-serif; font-size: 26px; color: rgba(23,18,14,.45);
  transform: rotate(-14deg); border: 4px dashed rgba(23,18,14,.35); padding: 10px 20px;
}

/* ===== Обложка выпуска (splash) ===== */
.splash { padding: 64px 0 72px; }
.splash .wrap { display: grid; grid-template-columns: 5fr 6fr; gap: 54px; align-items: center; }
.splash .cover-panel { max-width: 430px; }
.splash h1 {
  font-family: "Russo One", sans-serif; font-size: clamp(34px, 5vw, 54px);
  line-height: 1.05; text-transform: uppercase; margin: 10px 0 18px;
  text-shadow: 3px 3px 0 var(--yellow);
}
.splash .lead { font-size: 17px; max-width: 46ch; }
.splash .lead b { color: var(--red); }
.splash .teaser {
  margin-top: 22px; font-family: "Neucha", cursive; font-size: 21px; line-height: 1.35;
  border-left: 5px solid var(--red); padding-left: 16px;
}

.backlink {
  display: inline-block; margin-bottom: 8px; text-decoration: none;
  font-family: "Russo One", sans-serif; font-size: 13px; text-transform: uppercase;
  color: var(--blue);
}

/* ===== Футер ===== */
.foot {
  padding: 34px 0 44px; text-align: center;
  font-family: "Neucha", cursive; font-size: 17px; color: #6b5f50;
}

/* ===== Мобилка ===== */
@media (max-width: 820px) {
  .splash .wrap, .beat, .beat.rev { grid-template-columns: 1fr; }
  .beat.rev .beat-art { order: 1; }
  .beat.rev .beat-side { order: 2; }
  .beat-side { margin-top: 6px; }
  .steps { grid-template-columns: 1fr; }
  .bubble { font-size: 15px; max-width: 60%; }
  .narr { font-size: 15px; }
  .pow { font-size: 15px; padding: 11px 15px; }
  .splash .cover-panel { margin: 0 auto; }
}

/* ===== Разбор пинга (выпуск 2+) ===== */
.miss { font-size: 14.5px; line-height: 1.5; margin-bottom: 7px; padding-left: 22px; position: relative; }
.miss::before { content: "✗"; position: absolute; left: 0; color: var(--red); font-weight: 800; }
.hit { font-size: 14.5px; line-height: 1.5; margin-bottom: 7px; padding-left: 22px; position: relative; }
.hit::before { content: "✓"; position: absolute; left: 0; color: #1b7a3d; font-weight: 800; }
.pingcase { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: start; }
@media (max-width: 820px) { .pingcase { grid-template-columns: 1fr; } }
.pingcase .pc-label {
  display: inline-block; font-family: "Russo One", sans-serif; font-size: 13px;
  text-transform: uppercase; padding: 4px 12px; border: 3px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink); margin-bottom: 12px; background: #e7dcc4;
}
.pingcase .pc-label.good { background: var(--yellow); }
.pingcase .notes { margin-top: 14px; }

/* ===== Перелинковка героев между выпусками ===== */
.appears { margin-top: 8px; font-size: 12.5px; color: #8a7d6c; }
.appears a {
  color: var(--blue); text-decoration: none; font-family: "Russo One", sans-serif;
  border-bottom: 2px solid rgba(27,63,191,.35);
}
.appears a:hover { border-bottom-color: var(--blue); }
.appears a.cur { color: #8a7d6c; border-bottom: none; pointer-events: none; }

/* ===== Спецвыпуски: интерфейс агента ===== */
.app-frame {
  max-width: 420px; margin: 0 auto; background: #10182f; color: #e8ecff;
  border: 4px solid var(--ink); border-radius: 22px; overflow: hidden;
  box-shadow: 9px 9px 0 rgba(23,18,14,.85);
}
.app-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--navy); }
.app-head .ava {
  width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--cyan);
  object-fit: cover; object-position: top;
}
.app-head .t { font-family: "Russo One", sans-serif; font-size: 14px; }
.app-head .s { font-size: 11.5px; color: #8fa2d4; }
.app-tabs { display: flex; background: #0c1226; }
.app-tab {
  flex: 1; padding: 10px 4px; text-align: center; font-family: "Russo One", sans-serif;
  font-size: 10.5px; text-transform: uppercase; color: #7d8bb8; cursor: pointer;
  border-bottom: 3px solid transparent; user-select: none;
}
.app-tab.active { color: var(--cyan); border-bottom-color: var(--cyan); }
.app-screen { display: none; padding: 14px; min-height: 380px; }
.app-screen.active { display: block; }
.scr-title { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: #8fa2d4; margin: 4px 0 10px; }
.row-item {
  background: #1d2b55; border-radius: 10px; padding: 10px 12px; margin-bottom: 8px;
  display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px;
}
.row-item.click { cursor: pointer; }
.row-item.click:hover { background: #24346a; }
.row-item .rt b { display: block; font-size: 13.5px; }
.row-item .rt span { font-size: 12px; color: #8fa2d4; }
.chip { font-size: 11px; border-radius: 20px; padding: 3px 10px; font-weight: 700; white-space: nowrap; }
.chip.ok { background: rgba(27,122,61,.25); color: #6fdc96; }
.chip.warn { background: rgba(179,112,27,.3); color: #ffcf7d; }
.chip.act { background: rgba(25,195,216,.2); color: var(--cyan); }
.detail { background: #16204a; border-radius: 10px; padding: 12px; margin: 4px 0 10px; font-size: 13.5px; display: none; }
.detail.open { display: block; }
.detail .tl { margin: 6px 0 0 0; list-style: none; }
.detail .tl li { padding: 3px 0 3px 18px; position: relative; font-size: 13px; }
.detail .tl li::before { content: "•"; position: absolute; left: 4px; color: var(--cyan); }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { background: #1d2b55; border-radius: 10px; padding: 12px; text-align: center; }
.stat b { display: block; font-family: "Russo One", sans-serif; font-size: 22px; color: var(--cyan); }
.stat span { font-size: 11.5px; color: #8fa2d4; }
.app-btn {
  display: block; width: 100%; background: var(--cyan); color: var(--navy);
  font-family: "Russo One", sans-serif; font-size: 13px; text-transform: uppercase;
  border: none; padding: 11px; border-radius: 10px; cursor: pointer; margin-top: 10px;
}
.app-btn.ghost { background: transparent; color: var(--cyan); border: 2px solid var(--cyan); }
.app-btn:active { transform: translateY(1px); }
.toast {
  background: #1b7a3d; color: white; padding: 9px 12px; border-radius: 10px;
  margin-top: 10px; display: none; font-size: 13.5px;
}
.toast.show { display: block; }
.chat-q {
  display: inline-block; border: 2px solid var(--cyan); color: var(--cyan);
  border-radius: 18px; padding: 6px 12px; margin: 0 6px 8px 0; cursor: pointer; font-size: 13.5px;
}
.chat-q.used { opacity: .35; pointer-events: none; }
.qa-a { background: #1d2b55; border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; font-size: 13.5px; display: none; }
.qa-a.show { display: block; }
.qa-a .src { font-size: 11.5px; color: #8fa2d4; margin-top: 6px; }
.qa-a .src::before { content: "📄 "; }

/* голосовой экран */
.mic-wrap { text-align: center; padding: 18px 0 6px; }
.mic {
  width: 92px; height: 92px; border-radius: 50%; background: radial-gradient(circle, #19c3d8 0%, #0f7f95 70%);
  margin: 0 auto; display: flex; align-items: center; justify-content: center; font-size: 38px;
  box-shadow: 0 0 0 0 rgba(25,195,216,.5); animation: micpulse 2s infinite;
}
@keyframes micpulse { 0% { box-shadow: 0 0 0 0 rgba(25,195,216,.45); } 70% { box-shadow: 0 0 0 26px rgba(25,195,216,0); } 100% { box-shadow: 0 0 0 0 rgba(25,195,216,0); } }
.wave { display: flex; gap: 3px; align-items: flex-end; height: 26px; justify-content: center; margin: 14px 0 4px; }
.wave i { width: 4px; background: var(--cyan); border-radius: 2px; animation: wv 1s infinite ease-in-out; }
.wave i:nth-child(2n) { animation-delay: .15s; } .wave i:nth-child(3n) { animation-delay: .3s; } .wave i:nth-child(5n) { animation-delay: .45s; }
@keyframes wv { 0%,100% { height: 6px; } 50% { height: 24px; } }
.voice-line { display: none; background: #1d2b55; border-radius: 10px; padding: 9px 12px; margin-bottom: 8px; font-size: 13.5px; }
.voice-line.show { display: block; }
.voice-line .w { font-weight: 700; font-size: 12px; color: var(--cyan); display: block; }
.voice-line.user .w { color: var(--yellow); }

/* проблемы, которые решает агент */
.probs { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.prob { background: white; border: 4px solid var(--ink); border-radius: 4px; box-shadow: 7px 7px 0 rgba(23,18,14,.8); padding: 18px 20px; }
.prob .pain { font-family: "Neucha", cursive; font-size: 19px; color: #a33; margin-bottom: 8px; }
.prob .fix { font-size: 14px; }
.prob .fix b { color: #1b7a3d; }

/* ссылки на спецвыпуски из выпуска 3 */
.spec-more { margin-top: 10px; }
.spec-more a {
  display: inline-block; text-decoration: none; font-family: "Russo One", sans-serif;
  font-size: 12.5px; text-transform: uppercase; color: var(--navy);
  background: var(--cyan); border: 3px solid var(--ink); border-radius: 8px;
  padding: 6px 12px; box-shadow: 3px 3px 0 var(--ink);
}
.spec-more a:hover { transform: translate(-1px,-1px); }

/* навигация между спецвыпусками */
.spec-nav { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 8px; }
.spec-nav a {
  text-decoration: none; font-family: "Russo One", sans-serif; font-size: 11.5px;
  text-transform: uppercase; color: var(--ink); background: white;
  border: 3px solid var(--ink); border-radius: 8px; padding: 6px 10px; box-shadow: 3px 3px 0 rgba(23,18,14,.6);
}
.spec-nav a.cur { background: var(--yellow); pointer-events: none; }

/* ===== Плитки главного экрана аппа (выпуск 4) ===== */
.tile-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.tile {
  background: #1d2b55; border-radius: 12px; padding: 13px 8px; text-align: center;
  cursor: pointer; font-size: 12.5px; line-height: 1.3; user-select: none;
}
.tile:hover { background: #24346a; }
.tile span { display: block; font-size: 24px; margin-bottom: 5px; }
