/*
 * vibeland.org — вид как у игры (game/src/style.css): небо главного меню,
 * тёмный контур, «конфетные» кнопки, плашки цвета бумаги, розовая лента.
 * Одна колонка, на телефоне — во всю ширину. Никаких внешних запросов:
 * шрифт Nunito лежит рядом (assets/fonts, лицензия OFL).
 */

@font-face { font-family: 'Nunito'; font-style: normal; font-display: swap; font-weight: 400; src: url(fonts/nunito-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Nunito'; font-style: normal; font-display: swap; font-weight: 700; src: url(fonts/nunito-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Nunito'; font-style: normal; font-display: swap; font-weight: 900; src: url(fonts/nunito-latin-900-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Nunito'; font-style: normal; font-display: swap; font-weight: 400; src: url(fonts/nunito-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Nunito'; font-style: normal; font-display: swap; font-weight: 700; src: url(fonts/nunito-latin-ext-700-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Nunito'; font-style: normal; font-display: swap; font-weight: 900; src: url(fonts/nunito-latin-ext-900-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* кириллица — для русской версии сайта; браузер скачает её, только если она есть на странице */
@font-face { font-family: 'Nunito'; font-style: normal; font-display: swap; font-weight: 400; src: url(fonts/nunito-cyrillic-400-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Nunito'; font-style: normal; font-display: swap; font-weight: 700; src: url(fonts/nunito-cyrillic-700-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Nunito'; font-style: normal; font-display: swap; font-weight: 900; src: url(fonts/nunito-cyrillic-900-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

:root {
  --page-max: 50rem;
  --page-gutter: clamp(1rem, 5vw, 4.5rem);
  --ink: #1b2a5a;      /* тёмный контур всего — как в игре */
  --deep: #0d1440;
  --paper: #fffaf0;
  --gold: #ffd34d;
  --pink: #ff7ad9;
  --sky-top: #4f7fae;  /* небо Tropical в главном меню */
  --sky-low: #23507e;
  --muted: #4a5682;
  font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: #fff;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
/* японский, корейский и китайский — системными шрифтами, как в игре */
:root:lang(ja) { font-family: 'Nunito', 'Hiragino Maru Gothic ProN', 'Hiragino Sans', 'Yu Gothic UI', 'Meiryo', 'Noto Sans JP', system-ui, sans-serif; }
:root:lang(ko) { font-family: 'Nunito', 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', system-ui, sans-serif; }
:root:lang(zh-Hans) { font-family: 'Nunito', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', system-ui, sans-serif; }
:root:lang(zh-Hant) { font-family: 'Nunito', 'PingFang TC', 'Microsoft JhengHei', 'Noto Sans TC', system-ui, sans-serif; }

* { box-sizing: border-box; }
html {
  min-height: 100%;
  scrollbar-gutter: stable;
  background-color: var(--sky-low);
  /* небо как в главном меню игры: сверху светлее, по краям темнеет */
  background-image: radial-gradient(ellipse at 50% 0%, rgba(6, 12, 30, 0) 40%, rgba(6, 12, 30, 0.35) 100%), linear-gradient(180deg, var(--sky-top), var(--sky-low) 70%, #1a3f68);
}
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.55;
  font-size: 17px;
}
main { flex: 1; }
img { max-width: 100%; height: auto; }

.top, .show-shell, body > main, body > .foot {
  width: min(var(--page-max), calc(100% - var(--page-gutter) - var(--page-gutter)));
  margin-inline: auto;
}

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; padding: 8px 14px; border-radius: 12px; background: var(--paper); color: var(--ink); font-weight: 900; z-index: 10; }
.skip:focus { top: 12px; }

/* ───── шапка ───── */
.top, .show-bar { min-height: 4.55rem; padding-block: .65rem; }
.top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 16px; }
.brand, .show-brand { display: inline-flex; align-items: center; min-height: 44px; min-width: 0; max-width: 100%; }
.brand { text-decoration: none; color: #fff; }
.brand img { display: block; filter: drop-shadow(0 3px 0 rgba(13, 20, 64, 0.35)); }
.brand .mark, .show-brand img { display: block; width: 8.625rem; height: auto; }
.nav, .show-actions { display: flex; align-items: center; gap: 8px; }
.play-link { min-width: 60px; justify-content: center; }
.nav a {
  display: inline-flex; align-items: center; height: 38px; padding: 0 14px; border-radius: 999px; text-decoration: none;
  font-weight: 900; font-size: 15px; color: #fff; background: rgba(16, 22, 58, 0.55); border: 3px solid var(--deep);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.14), 0 3px 0 var(--deep);
}
.nav a[aria-current='page'] { background: var(--paper); color: var(--ink); border-color: var(--ink); }
.nav .play-link {
  color: #123630; background: linear-gradient(#ddffeb, #a3ecbb 60%, #84dcb0);
  box-shadow: inset 0 2px #f1fff1b3, 0 3px var(--deep);
}
.play-link:hover { filter: brightness(1.045); }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

/* ───── первый экран ───── */
.hero { text-align: center; padding: 24px 0 8px; }
.hero .isle { display: block; width: 148px; height: 148px; margin: 0 auto; filter: drop-shadow(0 12px 14px rgba(0, 0, 0, 0.35)); animation: float 3s ease-in-out infinite; }
.hero h1 { margin: 0; }
/* знак — утверждённый «Scalable outlined wordmark» (marketing/logos), как в меню игры; вокруг букв в нём поля под свечение */
.hero .mark { display: block; width: 560px; height: auto; margin: -6px auto 2px; }
.tagline { margin: 0 auto 10px; max-width: 32em; font-size: 22px; font-weight: 900; line-height: 1.3; text-shadow: 0 2px 0 var(--ink); }
.lead { margin: 0 auto 26px; max-width: 34em; font-weight: 700; color: #e6edff; text-shadow: 0 1px 0 rgba(13, 20, 64, 0.5); }

/* ───── кнопки: «конфетные», с объёмом и нажатием ───── */
.buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px 14px; }
.candy {
  position: relative; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-width: 250px; min-height: 64px; padding: 10px 24px; border-radius: 20px; text-decoration: none; text-align: center;
  border: 3px solid #7a3f00; color: #5a2d00; background: linear-gradient(180deg, #fff6c8 0%, #ffd44d 46%, #ffae1f 100%);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.8), inset 0 -4px 0 rgba(190, 95, 0, 0.35), 0 5px 0 #7a3f00, 0 10px 18px rgba(0, 0, 0, 0.3);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6); transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.candy b { display: block; font-weight: 900; font-size: clamp(18px, 4.9vw, 20px); line-height: 1.25; }
.candy small { font-weight: 700; font-size: 13px; line-height: 1.3; opacity: 0.85; }
/* значок — в строке с текстом: если подпись не влезла, переносится ровно */
.candy svg { display: inline-block; width: 0.95em; height: 0.95em; margin-right: 0.35em; vertical-align: -0.12em; }
.candy:active { transform: translateY(4px); box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.8), inset 0 -4px 0 rgba(190, 95, 0, 0.35), 0 1px 0 #7a3f00, 0 4px 10px rgba(0, 0, 0, 0.25); }
.candy.blue { color: #fff; border-color: #123a7a; background: linear-gradient(180deg, #a8e4ff 0%, #3aa3ff 50%, #2477e0 100%); text-shadow: 0 2px 0 #123a7a; box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.6), inset 0 -4px 0 rgba(10, 50, 130, 0.35), 0 5px 0 #123a7a, 0 10px 18px rgba(0, 0, 0, 0.3); }
.candy.blue:active { box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.6), 0 1px 0 #123a7a; }
@media (hover: hover) { .candy:hover { filter: brightness(1.05); } }

.chip {
  display: inline-block; margin: 22px auto 0; padding: 6px 16px; border-radius: 999px; font-weight: 900; font-size: 15px;
  color: var(--ink); background: var(--paper); border: 3px solid var(--ink); box-shadow: 0 3px 0 var(--ink);
}
.more { margin: 14px 0 0; font-weight: 700; font-size: 15px; }
.more a { color: #fff; }

/* ───── плашки: бумага в толстом контуре, заголовок — розовой лентой ───── */
.card {
  --pad: 36px;
  position: relative; margin: 44px 0 0; padding: var(--pad) 18px 22px; border-radius: 26px; color: var(--ink); background: var(--paper);
  border: 4px solid var(--ink); box-shadow: inset 0 -5px 0 rgba(27, 42, 90, 0.08), 0 6px 0 var(--ink), 0 16px 30px rgba(0, 0, 0, 0.3);
}
/* лента висит на верхней кромке, но стоит в потоке: длинная переносится и сдвигает текст, а не наезжает на него */
.card > .ribbon {
  position: relative; display: block; width: fit-content; max-width: 100%; margin: calc(-1 * var(--pad) - 22px) auto 16px; padding: 6px 22px;
  border-radius: 12px; font-weight: 900; font-size: 20px; line-height: 1.3; text-align: center; color: #fff; text-shadow: 0 2px 0 #6e1236;
  border: 3px solid #6e1236; background: linear-gradient(180deg, #ff9cc4, #e0457b);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.4), 0 4px 0 #6e1236, 0 8px 14px rgba(0, 0, 0, 0.25);
}
.card > h1.ribbon { font-size: 22px; }
.card h2 { margin: 30px 0 8px; font-size: 21px; font-weight: 900; line-height: 1.3; }
.card h3 { margin: 22px 0 6px; font-size: 18px; font-weight: 900; line-height: 1.35; }
.card > :first-child:not(.ribbon), .card > .ribbon + * { margin-top: 0; }
.card p, .card ul, .card ol, .card dl { margin: 0 0 12px; }
.card ul, .card ol { padding-left: 1.3em; }
.card li { margin: 4px 0; }
.card a { color: #2459c9; font-weight: 700; text-underline-offset: 2px; }
.card a.candy { color: #5a2d00; }
.card a.candy.blue { color: #fff; }
.card code, .code { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 0.92em; padding: 1px 6px; border-radius: 6px; background: #f0e8d6; white-space: nowrap; }
.note { font-size: 15px; color: var(--muted); }
.updated { margin-top: -4px; font-size: 14px; font-weight: 700; color: var(--muted); text-align: center; }
.path { font-weight: 900; }
.todo { background: #ffe27a; border-radius: 4px; padding: 0 4px; font-weight: 900; }
.mail { font-size: 20px; font-weight: 900; text-align: center; margin: 4px 0 6px; }
.mail a { word-break: break-all; }

/* шаги «как это устроено» */
.steps { list-style: none; padding: 0 !important; display: grid; gap: 12px; counter-reset: step; }
.steps li { position: relative; margin: 0; padding: 2px 0 2px 50px; counter-increment: step; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  font-weight: 900; color: #fff; border: 3px solid #5e1258; background: radial-gradient(circle at 35% 30%, #ffe0f7, var(--pink) 55%, #b42fa4);
  box-shadow: 0 3px 0 #5e1258; text-shadow: 0 1px 0 #5e1258;
}
.steps b { display: block; }

/* платформы на странице скачивания */
.platforms { display: grid; gap: 16px; margin: 6px 0 4px; }
.platform { padding: 18px 12px 16px; border-radius: 20px; border: 3px solid rgba(27, 42, 90, 0.18); background: #fff; text-align: center; }
.platform .candy { display: flex; width: 100%; min-width: 0; padding: 10px 12px; }
.platform h2 { margin: 0 0 4px; }
.platform .req { margin: 0 0 14px; font-size: 15px; color: var(--muted); }
.platform .file { margin: 12px 0 0; font-size: 13px; color: var(--muted); word-break: break-all; }
.platform.soon { background: transparent; border-style: dashed; }
.platform.soon p { margin: 0; }

@media (min-width: 48rem) and (pointer: fine) {
  .desktop-download { order: -1; }
}

/* данные в политике: что, зачем */
.data { display: grid; gap: 10px; margin: 0 0 12px; }
.data > div { padding: 12px 14px; border-radius: 16px; background: #fff; border: 2px solid rgba(27, 42, 90, 0.12); }
.data dt { font-weight: 900; }
.data dd { margin: 2px 0 0; }
.data dd + dd { margin-top: 6px; }
.data .why { font-size: 15px; color: var(--muted); }

.toc { columns: 2 220px; column-gap: 24px; font-weight: 700; }
.toc li { break-inside: avoid; }

/* ───── подвал ───── */
.foot { margin-top: 48px; padding: 18px 0 28px; text-align: center; font-size: 14px; font-weight: 700; color: rgba(255, 255, 255, 0.75); }
.foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; margin-bottom: 8px; }
.foot a { color: #fff; text-underline-offset: 3px; }
.foot p { margin: 4px 0; }

/* 404 */
.lost { text-align: center; }
.lost .isle { width: 120px; height: 120px; display: block; margin: 0 auto 8px; opacity: 0.9; }

a:focus-visible, .candy:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

@media (max-width: 359px) {
  .nav a { padding: 0 10px; }
}
@media (max-width: 32rem) {
  .top, .show-bar { min-height: 0; padding-block: .6rem .1rem; }
  .top { flex-wrap: nowrap; column-gap: 6px; }
  .brand .mark, .show-brand img { width: clamp(100px, 34vw, 138px); }
  .nav, .show-actions { flex-shrink: 0; gap: 6px; }
}
@media (min-width: 640px) {
  .card { --pad: 40px; padding: var(--pad) 36px 26px; }
  .platform { padding: 18px 16px 16px; }
  .platforms { grid-template-columns: 1fr 1fr; }
  .platform.soon { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  .hero .isle { animation: none; }
  .candy { transition: none; }
}
@media print {
  html { background: #fff; }
  body { color: #000; max-width: none; }
  .top .nav, .foot nav, .skip, .buttons { display: none; }
  .card { box-shadow: none; border: 0; padding: 0; margin-top: 24px; }
  .card > .ribbon { margin: 0 0 12px; color: #000; background: none; border: 0; box-shadow: none; text-shadow: none; padding: 0; text-align: left; }
}
