/* Тока Бока (tocalifeworld.ru) — персона «Домик Крампетов»: пастель + комикс-контур.
   Системные шрифты, без внешних ресурсов. */

:root {
  --ink: #23405a;
  --ink-soft: #4d6b83;
  --bg: #f2f8fd;
  --panel: #ffffff;
  --mint: #17a673;
  --coral: #ff6b5a;
  --sun: #ffc93c;
  --sky: #3fa9e0;
  --pink: #ff8fb1;
  --violet: #8b6fe0;
  --line: #d7e7f2;
  --radius: 18px;
  --shadow: 0 3px 0 rgba(35, 64, 90, .13);
  --font: "Trebuchet MS", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; }

a { color: #1470b8; text-decoration: underline; }
a:hover { color: #0d4f86; }

.container { max-width: 960px; margin: 0 auto; padding: 0 16px; }

/* --- лента-шапка в духе商店-обложек игры --- */
.ribbon {
  display: flex;
  height: 8px;
}
.ribbon i { flex: 1; }
.ribbon i:nth-child(1) { background: var(--mint); }
.ribbon i:nth-child(2) { background: var(--sun); }
.ribbon i:nth-child(3) { background: var(--coral); }
.ribbon i:nth-child(4) { background: var(--sky); }
.ribbon i:nth-child(5) { background: var(--pink); }
.ribbon i:nth-child(6) { background: var(--violet); }

.site-header {
  position: relative;
  background: var(--panel);
  border-bottom: 3px solid var(--ink);
  box-shadow: var(--shadow);
}

.head-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  min-height: 58px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
  flex: 0 0 auto;
  padding: 6px 0;
}
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: var(--coral);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--ink);
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  font-weight: 700;
  font-size: 19px;
}
.brand-text small {
  font-weight: 400;
  font-size: 12px;
  color: var(--ink-soft);
}

.nav {
  margin-left: auto;
  display: flex;
  gap: 4px;
  align-items: center;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav a {
  display: inline-block;
  padding: 7px 9px;
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-size: 14.5px;
  white-space: nowrap;
  border: 2px solid transparent;
  background: transparent;
}
.nav a:hover { background: #eaf6ff; border-color: var(--sky); color: #0d5f96; }
.nav a.active { background: var(--mint); border-color: var(--ink); color: #fff; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .12); }

.burger {
  display: none;
  margin-left: auto;
  border: 2px solid var(--ink);
  background: var(--sun);
  color: var(--ink);
  border-radius: 12px;
  font-size: 20px;
  width: 42px;
  height: 40px;
  cursor: pointer;
}

/* --- крошки --- */
.crumbs {
  font-size: 12.5px;
  color: var(--ink-soft);
  margin: 14px 0 4px;
}
.crumbs a { color: var(--ink-soft); text-decoration: none; }
.crumbs a:hover { color: var(--sky); text-decoration: underline; }
.crumbs span + span::before { content: " / "; color: #a9c4d8; }

/* --- заголовки/текст --- */
h1, h2, h3 { line-height: 1.2; margin: 26px 0 12px; color: var(--ink); }
h1 { font-size: 34px; letter-spacing: -.2px; }
h2 {
  font-size: 26px;
  padding-bottom: 6px;
  border-bottom: 3px solid var(--sun);
  display: inline-block;
}
h3 { font-size: 20px; }
p { margin: 12px 0; }
ul, ol { padding-left: 22px; }
li { margin: 6px 0; }
.lead { font-size: 19px; color: #1c4f74; }
.muted { color: var(--ink-soft); font-size: 14px; }
.small { font-size: 14px; }

.hero {
  background: var(--panel);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 22px;
  margin: 18px 0 8px;
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
.hero-text h1 { margin-top: 0; }
.hero-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.chip {
  display: inline-block;
  background: #eef8ff;
  border: 2px solid var(--sky);
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 14px;
  color: #125e93;
}
.chip b { color: var(--ink); }

.panel {
  background: var(--panel);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
  margin: 18px 0;
}
.panel.tint-mint { background: #eefaf4; border-color: #bfe8d6; }
.panel.tint-sun { background: #fffaea; border-color: #ffe4a3; }
.panel.tint-sky { background: #eef7fe; border-color: #c5e3f7; }
.panel.tint-pink { background: #fff2f6; border-color: #ffd0de; }
.panel-title { font-weight: 700; font-size: 19px; margin: 0 0 8px; }

.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.btn {
  display: inline-block;
  padding: 11px 18px;
  border-radius: 999px;
  border: 3px solid var(--ink);
  background: var(--panel);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 3px 0 rgba(35, 64, 90, .2);
  cursor: pointer;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 0 5px 0 rgba(35, 64, 90, .22); }
.btn-primary { background: var(--coral); color: #fff; border-color: var(--ink); }
.btn-primary:hover { color: #fff; background: #f2584a; }
.btn-mint { background: var(--mint); color: #fff; }
.btn-mint:hover { color: #fff; background: #128f61; }
.btn-sky { background: var(--sky); color: #fff; }
.btn-sky:hover { color: #fff; background: #2f92c4; }
.btn-lg { padding: 14px 24px; font-size: 18px; }
.btn:focus-visible, .nav a:focus-visible, a:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

/* --- сетки карточек --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin: 18px 0;
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card:hover { transform: translate(-2px, -2px); box-shadow: 0 5px 0 rgba(35, 64, 90, .2); }
.card-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: #eef6fc; }
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-title { margin: 0; font-size: 18px; }
.card-title a { color: var(--ink); text-decoration: none; }
.card:hover .card-title a { color: #0d5f96; }
.card-desc { margin: 0; font-size: 15px; color: var(--ink-soft); }
.card-meta { margin: 0; font-size: 13px; color: var(--ink-soft); }
.badge {
  display: inline-block;
  font-size: 12px;
  padding: 2px 9px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: var(--sun);
  color: var(--ink);
  font-weight: 700;
}
.badge-mint { background: #d6f5e7; }
.badge-sky { background: #d9eefc; }
.badge-pink { background: #ffe1ea; }
.stretched-link::after { content: ""; position: absolute; inset: 0; }

/* --- таблицы --- */
table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 16px; }
th, td { border: 2px solid var(--line); padding: 9px 11px; text-align: left; vertical-align: top; }
th { background: var(--sun); border-color: #e8c268; color: var(--ink); }
tbody tr:nth-child(even) { background: #fbfdff; }

/* --- галерея/скриншоты --- */
.gallery { display: flex; flex-direction: column; gap: 18px; margin: 18px 0; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; border: 3px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); }
.gallery figcaption, .cap { font-size: 13.5px; color: var(--ink-soft); margin-top: 6px; }

/* --- FAQ --- */
.faq { margin: 18px 0; }
.faq details {
  background: var(--panel);
  border: 3px solid var(--ink);
  border-left-width: 10px;
  border-radius: 14px;
  padding: 10px 14px;
  margin: 10px 0;
  box-shadow: var(--shadow);
}
.faq details:nth-child(4n+1) { border-left-color: var(--mint); }
.faq details:nth-child(4n+2) { border-left-color: var(--sun); }
.faq details:nth-child(4n+3) { border-left-color: var(--coral); }
.faq details:nth-child(4n+4) { border-left-color: var(--sky); }
.faq summary { cursor: pointer; font-weight: 700; font-size: 17px; }
.faq details p { margin: 10px 0 4px; }

/* --- прочее --- */
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin: 14px 0; }
.kv div { background: var(--panel); border: 2px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.kv b { display: block; font-size: 13px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .4px; }
.store-badges { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0; }
.store-badges a { display: inline-block; }
.store-badges img { height: 52px; width: auto; }
.player { position: relative; padding-top: 56.25%; margin: 14px 0; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 3px solid var(--ink); border-radius: var(--radius); }
.pager { display: flex; justify-content: space-between; gap: 12px; margin: 18px 0; }
.pager a {
  background: var(--panel);
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 9px 16px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  max-width: 48%;
}
.pager a:hover { background: #eaf6ff; color: #0d5f96; }
.note { background: #fff8e8; border: 3px dashed #e0b356; border-radius: 14px; padding: 12px 16px; margin: 16px 0; }
code { background: #eef6fc; border: 1px solid #cfe4f2; border-radius: 6px; padding: 1px 6px; font-size: 15px; }

.site-footer { margin-top: 34px; background: var(--panel); border-top: 3px solid var(--ink); padding: 18px 0 26px; }
.foot-links { font-size: 14.5px; color: var(--ink); }
.foot-links a { color: var(--ink); text-decoration: none; }
.foot-links a:hover { color: var(--sky); text-decoration: underline; }
.disclaimer { font-size: 12.5px; color: var(--ink-soft); margin-top: 10px; }

/* --- мобильная вёрстка --- */
@media (max-width: 900px) {
  h1 { font-size: 28px; }
  h2 { font-size: 22px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .burger { display: block; }
  .head-row { position: relative; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: var(--panel);
    border-bottom: 3px solid var(--ink);
    box-shadow: 0 8px 14px rgba(35, 64, 90, .14);
    padding: 8px 12px 12px;
    max-width: none;
    overflow-x: visible;
  }
  .nav.open { display: flex; }
  .nav a { padding: 11px 12px; }
  .brand-text small { display: none; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .card-title { font-size: 16px; }
  .hero { padding: 16px; }
  table { display: block; overflow-x: auto; }
  .pager { flex-direction: column; }
  .pager a { max-width: none; text-align: center; }
  .store-badges img { height: 46px; }
}

@media (max-width: 380px) {
  .card-grid { grid-template-columns: 1fr 1fr; }
}