:root {
  --bg: #0b0b0b;
  --fg: #f2f0eb;
  --dim: #8a8781;
  --line: #242322;
  --card: #141413;
  --gutter: 16px;
}

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

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

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Onest', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }

/* вся страница в один экран */
.page {
  height: 100vh;
  height: 100dvh;
  min-height: 560px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 0 0 max(16px, env(safe-area-inset-bottom));
}

.bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 20px var(--gutter) 16px;
}

.nick {
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.count {
  font-size: 12px;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* панели: на телефоне листаются вбок */
.panels {
  min-height: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  gap: var(--gutter);
  padding: 0 var(--gutter);
  scroll-padding: 0 var(--gutter);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.panels::-webkit-scrollbar { display: none; }

.panel {
  min-height: 0;
  display: grid;
  grid-template-rows: 1fr auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  scroll-snap-align: start;
}

.vis {
  position: relative;
  min-height: 0;
  overflow: hidden;
}

.vis-phone {
  display: flex;
  justify-content: center;
  padding: 24px 24px 0;
}

.vis-phone img {
  display: block;
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: cover;
  object-position: top;
  border: 1px solid #2c2b29;
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
}

.vis-pet {
  background: linear-gradient(to top, #1c1b19 0 40px, transparent 40px);
}

.pet {
  position: absolute;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  border: 0;
  background: none;
  cursor: pointer;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.pet:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; border-radius: 8px; }

.sprite {
  --s: 160px;
  display: block;
  width: var(--s);
  height: var(--s);
  background: url(img/monkey.png) 0 0 / calc(var(--s) * 5) var(--s) no-repeat;
  image-rendering: pixelated;
}

.hint {
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 11px;
  color: var(--dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.h-tap { display: none; }
@media (hover: none) { .h-hover { display: none; } .h-tap { display: inline; } }

.info {
  display: flex;
  flex-direction: column;
  padding: 18px 20px 20px;
  border-top: 1px solid var(--line);
}

.head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.head h2 {
  font-weight: 600;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.num { font-size: 12px; color: var(--accent); }

.desc {
  margin-top: 8px;
  font-size: 15px;
  color: #c9c6bf;
}

.foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
  min-height: 56px;
}

.tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
  color: var(--dim);
}

.tags li {
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.go {
  flex: none;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: #120a06;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: transform .15s ease, filter .15s ease;
}

.go:hover { filter: brightness(1.08); }
.go:active { transform: scale(.97); }
.go:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }

/* точки под панелями (только телефон) */
.dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding-top: 14px;
}

.dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #3a3936;
  cursor: pointer;
  transition: width .2s ease, background .2s ease;
}

.dot[aria-current="true"] { width: 22px; background: var(--fg); }

/* компьютер: панели рядом */
@media (min-width: 900px) {
  :root { --gutter: 40px; }
  .page { padding-bottom: 40px; }
  .bar { padding-top: 32px; padding-bottom: 24px; }
  .nick { font-size: 26px; }
  .panels {
    grid-auto-flow: row;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr auto;
    gap: 20px;
    overflow: visible;
    max-width: 1360px;
    width: 100%;
    margin: 0 auto;
  }
  .panel { grid-row: span 2; grid-template-rows: subgrid; row-gap: 0; }
  .vis-phone { padding: 36px 36px 0; }
  .sprite { --s: 220px; }
  .pet { bottom: 40px; }
  .vis-pet { background: linear-gradient(to top, #1c1b19 0 52px, transparent 52px); }
  .info { padding: 24px 28px 28px; }
  .head h2 { font-size: 36px; }
  .desc { font-size: 16px; max-width: 36em; }
  .dots { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .go, .dot { transition: none; }
}
