/* katalama.ru — визитка + страница игры. Самодостаточно (без внешних шрифтов/CDN
   → CSP-safe, деплоится куда угодно). Тёплая бумага + чернильно-зелёный акцент. */

:root {
    --paper: #f6f1e7;
    --card: #fffdf8;
    --ink: #23201b;
    --muted: #6f675a;
    --accent: #3a5a40;
    --accent-soft: #e2e8e2;
    --line: #e7ded0;
    --shadow: 0 10px 40px rgba(60, 50, 30, .12);
    --radius: 18px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--ink);
    background:
        radial-gradient(1100px 560px at 82% -12%, #fbf7ee 0%, transparent 60%),
        var(--paper);
}

a { color: var(--accent); }

/* ─────────────────────────  Главная (визитка)  ───────────────────────── */

.page-bio {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 18px;
}

.card--bio {
    width: 100%;
    max-width: 460px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 40px 38px 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.avatar {
    width: 76px;
    height: 76px;
    border-radius: 22px;
    background: var(--accent);
    color: #fff;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 1px;
    display: grid;
    place-items: center;
    box-shadow: 0 6px 18px rgba(58, 90, 64, .35);
}

.name { margin: 8px 0 0; font-size: 27px; line-height: 1.15; }
.handle { color: var(--muted); font-size: 16px; font-weight: 500; margin-left: 4px; }
.tagline { margin: 0; color: var(--accent); font-weight: 600; }
.about { margin: 2px 0 0; color: var(--muted); line-height: 1.6; }

.links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.link {
    text-decoration: none;
    color: var(--ink);
    background: var(--accent-soft);
    border: 1px solid var(--line);
    padding: 8px 15px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    transition: transform .15s ease, background .15s ease;
}
.link:hover { transform: translateY(-1px); background: #d3e0d3; }

/* Ненавязчивое упоминание платформы + вход в игру. */
.aside {
    margin: 16px 0 0;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.65;
}
.aside-cta { font-weight: 600; white-space: nowrap; }

/* ─────────────────────────  Страница игры  ───────────────────────── */

.play-top {
    max-width: 720px;
    margin: 0 auto;
    padding: 22px 18px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.back { text-decoration: none; font-weight: 600; }
.back:hover { text-decoration: underline; }
.play-top-handle { color: var(--muted); font-size: 14px; }

.play-wrap {
    max-width: 720px;
    margin: 18px auto 40px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px 30px 24px;
}

.play-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.play-head h1 { margin: 0; font-size: 24px; }

.play-btn {
    cursor: pointer;
    border: 0;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 15px;
    transition: filter .15s ease, transform .1s ease;
}
.play-btn:hover { filter: brightness(1.08); }
.play-btn:active { transform: translateY(1px); }
.play-btn:disabled { opacity: .6; cursor: default; }

.play-sub { margin: 8px 0 14px; color: var(--muted); font-size: 14px; }

.game-container {
    min-height: 640px;
    border: 1px dashed var(--line);
    border-radius: 14px;
    background: #fbf8f1;
    display: flex;
    overflow: hidden;
}
.game-frame { width: 100%; min-height: 640px; border: 0; display: block; }

.game-status { font-size: 14px; min-height: 18px; color: var(--muted); margin-bottom: 6px; }
.game-status--loading { color: var(--accent); }
.game-status--error { color: #a23b2d; }

.play-note { margin: 14px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.55; }

@media (max-width: 560px) {
    .card--bio { padding: 32px 24px 26px; }
    .play-wrap { padding: 22px 18px; border-radius: 14px; }
    .game-container, .game-frame { min-height: 560px; }
}
