/* Клуб Кронина — винтажная тема в духе предоставленного референса */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=DM+Sans:wght@400;500;600&display=swap');

:root {
  --ink: #171511;
  --ink-soft: #242019;
  --paper: #eee5d5;
  --paper-light: #f6f0e5;
  --paper-dark: #d8cbb6;
  --muted: #a69a87;
  --line: rgba(218, 203, 179, .28);
  --accent: #c7a779;
  --accent-light: #e8dece;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'DM Sans', Arial, sans-serif;
  --content: 1240px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: #d4cbbd; color: var(--ink);
  font-family: var(--serif); font-size: 17px; line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
img { max-width: 100%; display: block; }
.container { width: min(var(--content), calc(100% - 64px)); margin-inline: auto; }
.site-header {
  position: relative; z-index: 10; background: #11100d; color: var(--paper-light);
  border-bottom: 1px solid rgba(232,222,206,.2);
}
.header-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 190px; }
.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  color: var(--accent-light);
  border: none;
  border-radius: 0;
}

.brand-mark svg {
  display: block;
  width: 100%;
  height: 100%;
}
.brand-name { font: 600 19px/1.05 var(--serif); letter-spacing: -.02em; }
.brand-name small { display: block; margin-top: 4px; color: #b6aa97; font-size: 13px; font-weight: 400; }
.main-nav { display: flex; align-items: center; gap: clamp(16px, 2.3vw, 34px); }
.main-nav a, .login-link, .profile-link, .text-button {
  color: #d8cebd; font: 500 12px var(--sans); transition: color .25s ease;
}
.main-nav a:hover, .login-link:hover, .profile-link:hover, .text-button:hover { color: #fff4df; }
.header-actions { display: flex; align-items: center; gap: 17px; white-space: nowrap; }
.logout-form { margin: 0; }
.text-button { background: none; border: 0; cursor: pointer; padding: 0; }
.button {
  min-height: 46px; padding: 0 23px; display: inline-flex; justify-content: center; align-items: center; gap: 18px;
  border: 1px solid #e5d9c6; border-radius: 7px; background: var(--paper-light); color: #1c1914;
  font: 500 12px var(--sans); box-shadow: 0 3px 0 rgba(0,0,0,.12);
  transition: transform .25s ease, background .25s ease, box-shadow .25s ease;
}
.button:hover { transform: translateY(-2px); background: #fffaf0; box-shadow: 0 6px 18px #0003; }
.button span { font-size: 17px; }
.button-small { min-height: 34px; padding: 0 16px; border-radius: 20px; background: transparent; color: var(--paper-light); border-color: #776d5e; box-shadow: none; }
.button-small:hover { background: var(--paper-light); color: var(--ink); }
.button-outline { background: transparent; color: var(--paper-light); border-color: rgba(238,229,213,.55); box-shadow: none; }
.button-outline:hover { background: rgba(238,229,213,.1); color: white; }
.button-light { background: var(--paper-light); color: var(--ink); border-color: var(--paper-light); }
.messages { padding-top: 14px; }
.message { padding: 12px 16px; margin-bottom: 8px; background: var(--paper); border-left: 3px solid var(--accent); font: 13px var(--sans); }
.hero {
  position: relative; overflow: hidden; color: var(--paper-light);
  background:
    linear-gradient(90deg, rgba(12,11,9,.96) 0%, rgba(12,11,9,.87) 32%, rgba(12,11,9,.2) 72%, rgba(12,11,9,.28) 100%),
    radial-gradient(ellipse at 75% 30%, #68513a 0%, #30251a 38%, #12110e 76%);
  border-bottom: 1px solid #3b3024;
}
.hero:before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .16;
  background-image: repeating-linear-gradient(90deg, transparent 0 72px, #a58a61 73px, transparent 75px),
                    repeating-linear-gradient(0deg, transparent 0 5px, #e8d6b4 6px, transparent 7px);
  mix-blend-mode: soft-light;
}
.hero-grid { min-height: 440px; display: grid; grid-template-columns: .9fr 1.1fr; align-items: center; gap: 36px; position: relative; }
.hero-copy { padding: 56px 0 50px; max-width: 560px; position: relative; z-index: 2; }
.eyebrow { display: flex; align-items: center; gap: 10px; color: #b9a98f; font: 500 10px var(--sans); letter-spacing: .22em; text-transform: uppercase; }
.eyebrow-line { width: 24px; height: 1px; background: var(--accent); display: inline-block; }
.hero h1 { margin: 17px 0 14px; font: 500 clamp(43px, 5vw, 69px)/.96 var(--serif); letter-spacing: -.035em; max-width: 650px; }
h1 em, h2 em { font-weight: 400; }
.hero-description { max-width: 420px; color: #d0c6b6; font-size: 17px; line-height: 1.42; margin: 0 0 24px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-note { display: flex; gap: 10px; align-items: center; color: #b8ad9b; margin-top: 28px; font-size: 13px; }
.note-star { color: var(--accent); font-size: 18px; }
.hero-art { min-height: 370px; align-self: stretch; position: relative; display: flex; align-items: end; justify-content: center; padding: 30px 0 34px; perspective: 900px; }
.art-decoration { position: absolute; border: 1px solid #8c7655; opacity: .38; }
.decoration-one { width: 66%; height: 80%; right: 9%; top: 8%; transform: rotate(2deg); }
.decoration-two { width: 58%; height: 74%; right: 15%; top: 12%; transform: rotate(-3deg); }
.book-stack { position: relative; width: min(460px, 95%); height: 235px; z-index: 1; }
.book { position: absolute; height: 64px; left: 0; right: 0; display: flex; flex-direction: column; justify-content: center; padding-left: 28px; color: #c5a775; background: linear-gradient(180deg,#29231b,#0b0b09 35%,#201a13 85%,#050505); border: 1px solid #4c3b26; box-shadow: 0 9px 13px #0008; font: 600 17px/1.05 var(--serif); letter-spacing: .05em; }
.book:after { content:""; position:absolute; left:8px; top:4px; bottom:4px; width:2px; background:#8c6a3d; opacity:.65; }
.book small { font: 8px var(--sans); letter-spacing: .15em; margin-top: 5px; color: #a48b64; }
.book-back { bottom: 144px; transform: rotate(-2deg); right: 24px; left: 30px; }
.book-middle { bottom: 78px; transform: rotate(1deg); left: 4px; right: 6px; }
.book-front { bottom: 12px; transform: rotate(-1deg); left: 28px; right: 30px; }
.book-ornament { position:absolute; right: 22px; top: 10px; color:#8c7049; font-size: 20px; }
.art-caption { position: absolute; right: 0; top: 24%; display: flex; flex-direction: column; gap: 5px; padding: 13px 16px; background: #e4d8c3; color: #26221b; transform: rotate(5deg); box-shadow: 0 10px 25px #0007; }
.art-caption span { font: 9px var(--sans); letter-spacing: .14em; }
.art-caption strong { font: 600 18px var(--serif); }
.stats-strip { background: #1b1915; color: var(--paper); border-bottom: 1px solid #514331; }
.stats-grid { display: grid; grid-template-columns: repeat(3,1fr); padding-block: 22px; }
.stat-item { display: flex; align-items: center; gap: 16px; padding: 4px 28px; border-right: 1px solid #51483a; }
.stat-item:first-child { padding-left: 0; }
.stat-item:last-child { border: 0; }
.stat-number { font: 500 29px var(--serif); color: var(--accent); }
.stat-label { font-size: 14px; color: #c8bdac; }
.section { padding: 76px 0 82px; background: var(--paper-light); }
.section-tinted { background: var(--paper); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 28px; margin-bottom: 30px; }
.section-heading h2, .join-section h2 { font: 500 clamp(34px,4vw,48px)/1 var(--serif); letter-spacing: -.025em; margin: 12px 0 0; }
.section-heading > p { max-width: 330px; color: #665e51; font-size: 16px; margin: 0 0 3px; }
.inline-link, .arrow-link { font: 500 12px var(--sans); border-bottom: 1px solid #8c7c65; padding-bottom: 7px; white-space: nowrap; }
.inline-link span { margin-left: 9px; font-size: 17px; }
.event-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.event-card { display: grid; grid-template-columns: 66px 1fr 20px; gap: 17px; align-items: start; padding: 23px 20px; border: 1px solid #d4c6b0; background: rgba(255,255,255,.26); transition: background .25s, transform .25s; }
.event-card:hover { background: #fffaf0; transform: translateY(-3px); }
.event-date { display: flex; flex-direction: column; border-right: 1px solid #c8b99f; padding-right: 13px; }
.event-date span { font: 500 32px/.9 var(--serif); }
.event-date small { font: 10px var(--sans); color: #756a5a; margin-top: 7px; }
.card-kicker { color: #8c7654; font: 600 9px var(--sans); letter-spacing: .13em; text-transform: uppercase; }
.event-info h3, .book-meta h3 { font: 600 23px/1.05 var(--serif); margin: 7px 0 4px; }
.event-info p { font-size: 14px; margin: 7px 0; }
.muted { color: #756c5e; }
.event-period { display: inline-block; margin-top: 8px; font: 10px var(--sans); color: #827461; }
.arrow-link { border: 0; font-size: 19px; }
.book-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 28px 23px; }
.book-card { min-width: 0; }
.cover-link { display: block; }
.book-cover { aspect-ratio: .68; padding: 10px; background: #29261e; box-shadow: 5px 7px 0 #c5b59d, 0 12px 18px #30251924; transition: transform .3s ease, box-shadow .3s ease; }
.book-card:hover .book-cover { transform: translateY(-5px) rotate(-.5deg); box-shadow: 7px 12px 0 #b8a58b, 0 17px 22px #30251935; }
.book-cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-olive { background: linear-gradient(145deg,#5a6044,#171c15); }
.cover-rust { background: linear-gradient(145deg,#8c4e2f,#2d1d16); }
.cover-blue { background: linear-gradient(145deg,#526875,#182329); }
.cover-plum { background: linear-gradient(145deg,#65515a,#211a20); }
.cover-frame { width: 100%; height: 100%; border: 1px solid #c6ad7a; display: flex; flex-direction: column; align-items: center; text-align: center; justify-content: space-evenly; padding: 12px 8px; color: #ead9b7; }
.cover-symbol { font-size: 26px; }
.cover-author { font: 8px var(--sans); letter-spacing: .12em; }
.cover-title { font: 600 clamp(17px,2vw,26px)/.98 var(--serif); text-transform: uppercase; overflow-wrap: anywhere; }
.cover-year { font: 10px var(--sans); }
.book-meta { padding-top: 16px; }
.book-meta h3 { font-size: 22px; margin-top: 6px; }
.book-meta h3 a:hover { text-decoration: underline; text-decoration-color: #a28a66; text-underline-offset: 4px; }
.book-meta .muted { font: 11px var(--sans); }
.empty-state { text-align: center; padding: 52px 24px; border: 1px solid #d5c7b2; background: #f1e8d9; }
.empty-icon { font-size: 28px; color: #9c8056; }
.empty-state h3 { font: 600 28px var(--serif); margin: 10px 0; }
.empty-state p { color: #716655; font-size: 15px; }
.empty-state .button { margin-top: 12px; }
.join-section { padding: 65px 0; color: var(--paper-light); background: radial-gradient(ellipse at 80% 20%,#453522 0%,#201a13 42%,#11100d 80%); position: relative; overflow: hidden; }
.join-section:after { content:""; position:absolute; inset:0; pointer-events:none; opacity:.13; background:repeating-linear-gradient(90deg,transparent 0 75px,#bda174 76px,transparent 78px); }
.join-inner { display:flex; justify-content:space-between; align-items:center; gap:35px; position:relative; z-index:1; }
.join-section .eyebrow { color:#b8a484; }
.join-section h2 { margin-top:15px; }
.join-section p { max-width:510px; color:#c8bdac; margin:17px 0 0; }
.site-footer { background:#11100d; color:#d8cebd; border-top:1px solid #4c3d2b; }
.footer-inner { min-height:135px; display:grid; grid-template-columns:1fr auto; align-content:center; gap:8px 25px; }
.footer-brand { font:600 25px var(--serif); }
.footer-inner p { margin:0; color:#c5b79f; font-size:15px; }
.footer-inner > span { grid-column:1 / -1; font:10px var(--sans); color:#827968; letter-spacing:.04em; margin-top:8px; }
@media (min-width: 1400px) { :root { --content: 1300px; } .hero-grid { min-height: 490px; } }
@media (max-width: 900px) {
  .container { width:min(100% - 40px, var(--content)); }
  .header-inner { flex-wrap:wrap; padding-block:14px; gap:14px 20px; }
  .brand { min-width:0; }
  .main-nav { order:3; width:100%; justify-content:center; padding-top:8px; border-top:1px solid #373027; }
  .hero-grid { grid-template-columns:1fr 1fr; gap:15px; min-height:400px; }
  .hero h1 { font-size:clamp(38px,6vw,56px); }
  .hero-art { min-height:320px; }
  .event-grid { grid-template-columns:1fr 1fr; }
  .book-grid { grid-template-columns:repeat(4,minmax(0,1fr)); gap:20px 15px; }
  .stat-item { padding-inline:16px; }
}
@media (max-width: 620px) {
  body { font-size:16px; }
  .container { width:calc(100% - 32px); }
  .header-inner { min-height:0; }
  .brand-mark { width:35px; height:35px; font-size:21px; }
  .brand-name { font-size:17px; }
  .header-actions { gap:10px; margin-left:auto; }
  .header-actions .button-small { padding-inline:11px; font-size:10px; }
  .main-nav { overflow-x:auto; justify-content:flex-start; gap:22px; padding-bottom:4px; }
  .main-nav a { flex:0 0 auto; font-size:11px; }
  .hero-grid { display:flex; flex-direction:column; align-items:stretch; gap:0; }
  .hero-copy { padding:43px 0 20px; }
  .hero h1 { font-size:clamp(42px,12vw,60px); }
  .hero-description { font-size:16px; }
  .hero-art { min-height:245px; padding:10px 0 25px; }
  .book-stack { height:190px; max-width:360px; }
  .book { height:52px; font-size:14px; }
  .book-back { bottom:120px; } .book-middle { bottom:64px; } .book-front { bottom:8px; }
  .art-caption { right:2%; top:2%; padding:9px 12px; }
  .stats-grid { grid-template-columns:1fr; padding-block:8px; }
  .stat-item, .stat-item:first-child { padding:13px 0; border-right:0; border-bottom:1px solid #51483a; }
  .stat-item:last-child { border-bottom:0; }
  .stat-number { min-width:38px; }
  .section { padding:52px 0 58px; }
  .section-heading { align-items:start; flex-direction:column; gap:14px; margin-bottom:24px; }
  .section-heading h2, .join-section h2 { font-size:38px; }
  .event-grid { grid-template-columns:1fr; }
  .event-card { padding:18px 15px; gap:13px; }
  .book-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:25px 17px; }
  .cover-title { font-size:clamp(18px,6vw,27px); }
  .book-meta h3 { font-size:21px; }
  .join-inner { align-items:flex-start; flex-direction:column; gap:24px; }
  .join-section { padding:48px 0; }
  .footer-inner { grid-template-columns:1fr; padding-block:28px; }
  .footer-inner > span { grid-column:auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { scroll-behavior:auto !important; transition:none !important; }
}



/* Три зоны шапки: название, центральное меню, кнопки */
.site-header .header-inner {
    display: grid !important;
    grid-template-columns: 1fr auto 1fr !important;
    align-items: center !important;
    gap: 16px !important;
}

.site-header .brand {
    grid-column: 1;
    justify-self: start;
}

.site-header .main-nav {
    grid-column: 2;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-wrap: nowrap !important;
    gap: 20px !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    white-space: nowrap !important;
}

.site-header .header-actions {
    grid-column: 3;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 14px !important;
    margin: 0 !important;
    white-space: nowrap !important;
}

/* На узких экранах меню располагается ниже */
@media (max-width: 1050px) {
    .site-header .header-inner {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: space-between !important;
    }

    .site-header .main-nav {
        order: 3;
        flex: 1 0 100%;
        justify-content: center !important;
        flex-wrap: wrap !important;
        white-space: normal !important;
    }

    .site-header .header-actions {
        margin-left: auto !important;
    }
}

@media (max-width: 1050px) {
    .site-header .header-inner {
        display: grid !important;
        grid-template-columns: auto minmax(0, 1fr) auto !important;
        flex-wrap: nowrap !important;
        gap: 12px !important;
    }

    .site-header .brand {
        grid-column: 1;
        min-width: 0;
    }

    .site-header .main-nav {
        grid-column: 2;
        order: initial;
        flex: initial;
        width: auto !important;
        flex-wrap: nowrap !important;
        justify-content: center !important;
        gap: 10px !important;
        white-space: nowrap !important;
        overflow-x: auto;
    }

    .site-header .main-nav a {
        font-size: 11px;
    }

    .site-header .header-actions {
        grid-column: 3;
        margin-left: 0 !important;
        gap: 8px !important;
    }

    .site-header .header-actions .button-small {
        padding-inline: 10px;
    }
}


/* Телефоны */
@media (max-width: 620px) {
    .site-header .header-inner {
        min-height: 0;
        gap: 12px;
    }

    .site-header .brand-mark {
        width: 35px;
        height: 35px;
        font-size: 21px;
    }

    .site-header .brand-name {
        font-size: 15px;
    }

    .site-header .header-actions {
        gap: 10px;
    }

    .site-header .main-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        gap: 22px;
        padding-bottom: 6px;
    }

    .site-header .main-nav a {
        font-size: 11px;
    }
}

/* Название сайта всегда в две строки */
.site-header .brand-name {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start;
    white-space: nowrap;
    line-height: 1.15;
}

.site-header .brand-name span {
    display: block !important;
}

/* Нижняя часть сайта */
.site-footer {
  margin-top: 80px;
  padding: 38px 20px 32px;
  background: #11100d;
  border-top: 1px solid rgba(232, 222, 206, 0.2);
  text-align: center;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.footer-book {
  display: block;
  width: 48px;
  height: 48px;
  color: var(--accent-light);
}

.footer-book svg {
  display: block;
  width: 100%;
  height: 100%;
}

.footer-title {
  margin: 0;
  color: #d8cebd;
  font: 600 18px/1.4 var(--serif);
  letter-spacing: 0.02em;
}

@media (max-width: 620px) {
  .site-footer {
    margin-top: 48px;
    padding: 30px 16px 26px;
  }

  .footer-book {
    width: 42px;
    height: 42px;
  }

  .footer-title {
    font-size: 16px;
  }
}

/* ==================================
   Литературные игры — стиль книжной страницы
   ================================== */

.games-page {
  padding-top: 60px;
  padding-bottom: 72px;
}

.games-intro {
  max-width: 720px;
}

.games-title {
  max-width: 700px;
  margin: 24px 0 18px;
  color: #30271f;
  font: 400 clamp(36px, 5.5vw, 64px)/1.1 var(--serif);
  letter-spacing: -0.035em;
}

.games-title em {
  display: block;
  color: #8d593e;
  font-weight: 400;
}

.games-lead {
  max-width: 540px;
  color: #5e5145;
  font-size: 16px;
  line-height: 1.8;
}

/* Лёгкие карточки вместо тёмных квадратов */

.games-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 42px;
}

.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  min-height: 300px;
  padding: 26px;
  overflow: hidden;

  background: rgba(255, 252, 245, 0.45);
  border: 1px solid #cbb99b;
  outline: 1px solid rgba(203, 185, 155, 0.35);
  outline-offset: -5px;

  transition: background 0.25s ease, border-color 0.25s ease;
}

.game-card::before,
.game-card::after {
  position: absolute;
  width: 22px;
  height: 22px;
  color: #ad8b5d;
  font: 22px/1 var(--serif);
  pointer-events: none;
}

.game-card::before {
  content: "❧";
  top: 7px;
  left: 8px;
}

.game-card::after {
  content: "❧";
  right: 8px;
  bottom: 7px;
  transform: rotate(180deg);
}

.game-card:hover {
  background: rgba(255, 255, 255, 0.72);
  border-color: #a7895d;
}

/* Номер и декоративный знак */

.game-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 12px;
}

.game-card .card-kicker {
  color: #765538;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.15em;
}

.game-number {
  color: #ad8b5d;
  font: 400 25px/1 var(--serif);
}

.game-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: 26px 0 20px;
  color: #8b6841;
  border: 1px solid #cbb99b;
  border-radius: 50%;
  font: 400 25px/1 var(--serif);
}

.game-card h2 {
  margin: 0 0 12px;
  color: #30271f;
  font: 400 25px/1.25 var(--serif);
}

.game-card p {
  margin: 0 0 24px;
  color: #5e5145;
  font-size: 13px;
  line-height: 1.8;
}

.game-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-bottom: 5px;
  color: #795437;
  border-bottom: 1px solid #bda17a;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.game-link:hover {
  color: #49301f;
  border-color: #795437;
}

.game-link span {
  font-size: 16px;
}

/* Пятая игра — лёгкий акцент */

.game-card-featured {
  background: rgba(222, 205, 174, 0.2);
  border-color: #bda17a;
}

/* Нижний блок рейтинга */

.games-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 36px;
  padding: 24px 0 0;
  border-top: 1px solid #d3c3a8;
}

.games-footer .card-kicker {
  color: #765538;
  font-size: 10px;
  letter-spacing: 0.14em;
}

.games-footer p {
  margin: 8px 0 0;
  color: #5e5145;
  font-size: 13px;
  line-height: 1.7;
}

/* Планшеты */

@media (max-width: 950px) {
  .games-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .game-card {
    min-height: 280px;
  }
}

/* Телефоны */

@media (max-width: 600px) {
  .games-page {
    padding-top: 38px;
    padding-bottom: 48px;
  }

  .games-title {
    font-size: clamp(35px, 10vw, 48px);
  }

  .games-lead {
    font-size: 14px;
  }

  .games-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    margin-top: 30px;
  }

  .game-card {
    min-height: 0;
    padding: 24px;
  }

  .game-icon {
    margin-top: 22px;
    margin-bottom: 16px;
  }

  .games-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }
}

/* ==========================================
   Игровые страницы — винтажное книжное оформление
   ========================================== */

.game-container {
  max-width: 760px;
  margin-inline: auto;
}

.game-container .back-link {
  display: inline-block;
  margin-bottom: 10px;
  color: #71563d;
  font-size: 13px;
  text-decoration: none;
}

.game-container .back-link:hover {
  color: #3f2c1d;
}

.game-title {
  margin: 20px 0 28px;
  color: #30271f;
  font: 400 clamp(34px, 5vw, 50px)/1.12 var(--serif);
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
}

/* Основная игровая область — не тёмный квадрат,
   а светлая книжная страница с двойной рамкой */

.game-container .game-card {
  position: relative;
  box-sizing: border-box;
  min-width: 0;
  margin-top: 24px;
  padding: clamp(24px, 5vw, 42px);

  background: #fbf7ee;
  color: #352b22;

  border: 1px solid #bca47f;
  border-radius: 0;
  outline: 1px solid rgba(188, 164, 127, 0.45);
  outline-offset: -7px;

  box-shadow: 0 8px 24px rgba(62, 45, 27, 0.06);
}

/* Декоративные уголки */

.game-container .game-card::before,
.game-container .game-card::after {
  position: absolute;
  z-index: 1;
  color: #a88758;
  font: 25px/1 var(--serif);
  pointer-events: none;
}

.game-container .game-card::before {
  content: "❧";
  top: 10px;
  left: 12px;
}

.game-container .game-card::after {
  content: "❧";
  right: 12px;
  bottom: 10px;
  transform: rotate(180deg);
}

/* Текст */

.game-container .game-card h2,
.game-container .game-card h3 {
  color: #30271f;
  font-family: var(--serif);
  font-weight: 400;
}

.game-container .game-card p,
.game-container .game-card .muted {
  color: #5d4d3d;
  line-height: 1.75;
}

.game-container .game-card strong {
  color: #38291c;
}

.game-container .game-question {
  margin: 22px 0 14px;
  font: 400 clamp(23px, 4vw, 30px)/1.35 var(--serif);
  overflow-wrap: anywhere;
}

.game-container .prompt-help {
  margin: 12px 0 20px;
  font-size: 14px;
}

/* Обложка */

.game-container .game-cover {
  display: block;
  width: min(100%, 240px);
  max-height: 340px;
  object-fit: contain;
  margin: 0 auto 28px;
  border: 1px solid #dfd1b8;
  border-radius: 2px;
  box-shadow: 0 7px 18px rgba(45, 32, 20, 0.12);
}

/* Текстовые задания */

.game-container .one-letter-prompt {
  margin: 24px 0;
  padding: 24px;
  color: #382c20;
  background: #f5eddf;
  border: 1px solid #d5c2a2;
  outline: 1px solid rgba(213, 194, 162, 0.45);
  outline-offset: -5px;
  border-radius: 0;
  font: clamp(20px, 4vw, 28px)/1.7 var(--serif);
  overflow-wrap: anywhere;
}

.game-container .emoji-prompt {
  margin: 24px 0;
  color: #382c20;
  font-size: clamp(42px, 9vw, 68px);
  line-height: 1.4;
  text-align: center;
  overflow-wrap: anywhere;
}

.game-container .first-line-prompt {
  margin: 24px 0;
  padding: 20px 24px;
  color: #493725;
  background: #f6efe3;
  border-left: 2px solid #b39363;
  font: clamp(21px, 4vw, 29px)/1.6 var(--serif);
  overflow-wrap: anywhere;
}

/* Ошибки и обратная связь */

.game-container .wrong-answer-message {
  margin: 18px 0;
  padding: 13px 16px;
  color: #743f31;
  background: #f8ebe3;
  border: 1px solid #d9b6a4;
  border-radius: 0;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

/* Поля ввода */

.game-container .game-form {
  display: grid;
  gap: 14px;
  min-width: 0;
  margin-top: 26px;
}

.game-container .answer-label {
  color: #493a2b;
  font-size: 13px;
  font-weight: 600;
}

.game-container .game-input {
  display: block;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 14px 15px;
  color: #30271f;
  background: #fffdf8;
  border: 1px solid #cbb99b;
  border-radius: 0;
  font: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.game-container .game-input::placeholder {
  color: #847462;
  opacity: 1;
}

.game-container .game-input:focus {
  outline: none;
  border-color: #967348;
  box-shadow: 0 0 0 3px rgba(150, 115, 72, 0.13);
}

/* Варианты ответов */

.game-container .answer-options {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.game-container .answer-option {
  display: flex;
  align-items: center;
  gap: 12px;
  box-sizing: border-box;
  min-width: 0;
  padding: 14px 16px;
  color: #403326;
  background: #fffdf8;
  border: 1px solid #d4c3a8;
  border-radius: 0;
  cursor: pointer;
  line-height: 1.55;
  overflow-wrap: anywhere;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.game-container .answer-option:hover {
  background: #f5eddf;
  border-color: #ad8b5d;
}

.game-container .answer-option input {
  flex: 0 0 auto;
  accent-color: #8b6841;
}

/* Кнопки */

.game-container .game-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  margin-top: 8px;
  padding: 13px 18px;

  color: #fffaf1;
  background: #765538;
  border: 1px solid #765538;
  border-radius: 0;

  font: 500 13px/1.4 var(--sans);
  text-align: center;
  text-decoration: none;
  cursor: pointer;

  transition: background 0.2s ease, border-color 0.2s ease;
}

.game-container .game-submit:hover {
  color: #fffaf1;
  background: #5e432d;
  border-color: #5e432d;
}

.game-container .button-secondary {
  color: #684b30;
  background: transparent;
  border-color: #bca47f;
}

.game-container .button-secondary:hover {
  color: #49301f;
  background: #f1e5d2;
  border-color: #967348;
}

.game-container .next-round-link {
  margin-top: 18px;
}

/* Результат раунда */

.game-container .game-result {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid #d8c7ab;
  color: #493a2b;
  overflow-wrap: anywhere;
}

.game-container .game-result h2 {
  margin: 0 0 16px;
  font-size: clamp(25px, 4vw, 32px);
  line-height: 1.25;
}

.game-container .game-result p {
  margin: 12px 0;
}

/* Мобильная версия */

@media (max-width: 600px) {
  .game-title {
    margin: 18px 0 22px;
  }

  .game-container .game-card {
    padding: 28px 20px;
    outline-offset: -6px;
  }

  .game-container .game-cover {
    max-height: 300px;
  }

  .game-container .one-letter-prompt {
    padding: 20px;
  }

  .game-container .answer-option {
    padding: 12px;
  }
}


/* Карточки игр целиком работают как ссылки */
.game-card-link {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    height: 100%;
    color: #352b22;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.game-card-link h2 {
    color: #352b22;
    font-size: 1.35rem;
}

.game-card-link p {
    color: #5e5145;
    font-size: 1.05rem;
    line-height: 1.65;
}

.game-card-link .game-link {
    margin-top: auto;
    padding-top: 18px;
    color: #765538;
    font-size: 1.05rem;
    font-weight: 700;
}

.game-card-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(70, 48, 28, 0.12);
}

.game-card-link:focus-visible {
    outline: 3px solid #a77a4e;
    outline-offset: 4px;
}


/* Единый блок рейтинга */
.leaderboard-panel {
    display: flex;
    align-items: center;
    gap: 18px;
    width: 100%;
    box-sizing: border-box;
    margin: 30px 0;
    padding: 22px 26px;
    border: 1px solid #cbb99b;
    border-radius: 14px;
    background: #fbf7ee;
    color: #352b22;
    text-decoration: none;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.leaderboard-panel:hover {
    background: #f5ecdc;
    box-shadow: 0 5px 16px rgba(70, 48, 28, 0.09);
}

.leaderboard-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.leaderboard-copy {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 5px;
}

.leaderboard-copy strong {
    font-size: 1.25rem;
}

.leaderboard-copy > span {
    color: #5e5145;
    font-size: 1.05rem;
    line-height: 1.5;
}

.leaderboard-action {
    color: #765538;
    font-size: 1.05rem;
    font-weight: 700;
    white-space: nowrap;
}

@media (max-width: 600px) {
    .leaderboard-panel {
        flex-wrap: wrap;
        gap: 12px;
        padding: 18px;
    }

    .leaderboard-copy {
        flex-basis: calc(100% - 55px);
    }

    .leaderboard-action {
        margin-left: 48px;
        white-space: normal;
    }
}


/* Более читаемый экран игры */
.game-container {
    color: #352b22;
    font-size: 1.08rem;
}

.game-container .game-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    line-height: 1.25;
}

.game-container .game-card {
    box-sizing: border-box;
    padding: clamp(18px, 4vw, 32px);
    color: #352b22;
    font-size: 1.08rem;
    line-height: 1.65;
}

.game-container .prompt-help,
.game-container .muted {
    color: #625447;
    font-size: 1rem;
    line-height: 1.6;
}

.game-container .answer-label {
    display: block;
    margin: 18px 0 8px;
    color: #352b22;
    font-size: 1.05rem;
    font-weight: 700;
}

.game-container .game-input {
    box-sizing: border-box;
    width: 100%;
    min-height: 50px;
    padding: 12px 14px;
    border: 1px solid #b9a486;
    border-radius: 9px;
    background: #fffdf8;
    color: #352b22;
    font-size: 1.05rem;
}

.game-container .game-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.game-container .answer-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 18px 0;
}

.game-container .answer-option {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 13px;
    border: 1px solid #d4c4aa;
    border-radius: 9px;
    background: #fffaf1;
    color: #352b22;
    font-size: 1rem;
    line-height: 1.45;
    cursor: pointer;
}

.game-container .answer-option input {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    accent-color: #765538;
}

.game-container .game-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    min-height: 48px;
    margin: 0;
    padding: 12px 16px;
    text-align: center;
    font-size: 1rem;
    line-height: 1.4;
    white-space: normal;
}

.game-container .next-round-link {
    margin-top: 12px;
}

@media (max-width: 520px) {
    .game-container .answer-options {
        grid-template-columns: 1fr;
    }

    .game-container .game-card {
        padding: 18px 14px;
    }

    .game-container .game-cover {
        display: block;
        max-width: 150px;
        max-height: 210px;
        width: auto;
        height: auto;
        margin: 0 auto 18px;
        object-fit: contain;
    }
}


/* ===== Фильтры на странице книг ===== */

.book-filters {
    margin: 32px 0 42px;
    padding: 26px;
    background: #f5f0e7;
    border: 1px solid #dfd3c2;
    border-radius: 14px;
}

.book-filters .filter-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 24px;
}

.book-filters .filter-field {
    display: flex;
    flex-direction: column;
    gap: 9px;
    min-width: 0;
}

.book-filters label {
    color: #403329;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.book-filters input,
.book-filters select {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    height: 48px;
    padding: 0 14px;
    border: 1px solid #cbbba7;
    border-radius: 8px;
    background-color: #fffdf9;
    color: #30271f;
    font: inherit;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.book-filters input::placeholder {
    color: #8b7c6d;
}

.book-filters input:focus,
.book-filters select:focus {
    border-color: #79513b;
    box-shadow: 0 0 0 3px rgb(121 81 59 / 14%);
}

.book-filters .filter-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.book-filters .filter-submit {
    min-height: 46px;
    padding: 0 23px;
    border: 1px solid #294236;
    border-radius: 8px;
    background: #294236;
    color: #fffdf8;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.book-filters .filter-submit:hover {
    background: #1e3228;
    transform: translateY(-1px);
}

.book-filters .filter-reset {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border: 1px solid #b9a792;
    border-radius: 8px;
    color: #514438;
    background: transparent;
    font-size: 14px;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
}

.book-filters .filter-reset:hover {
    background: #e9dfd1;
    border-color: #8d7762;
}

@media (max-width: 640px) {
    .book-filters {
        padding: 18px;
        margin: 24px 0 32px;
    }

    .book-filters .filter-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 17px;
    }

    .book-filters .filter-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .book-filters .filter-submit,
    .book-filters .filter-reset {
        width: 100%;
        box-sizing: border-box;
    }
}



/* ===== Вход и регистрация ===== */

.auth-page {
    padding: 64px 20px 80px;
}

.auth-page .auth-container {
    width: 100%;
    max-width: 510px;
    margin: 0 auto;
}

.auth-page .auth-card {
    padding: 38px;
    background: #fffdf8;
    border: 1px solid #e4d8c8;
    border-radius: 16px;
    box-shadow: 0 14px 40px rgb(57 42 29 / 7%);
}

.auth-page .auth-eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    color: #76533d;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
}

.auth-page .auth-eyebrow::before {
    content: "";
    width: 28px;
    height: 1px;
    background: #a66b4d;
}

.auth-page .auth-title {
    margin: 0 0 14px;
    color: #30271f;
    font-family: var(--serif);
    font-size: clamp(34px, 6vw, 46px);
    font-weight: 400;
    line-height: 1.15;
}

.auth-page .auth-title em {
    color: #98513a;
    font-weight: 400;
}

.auth-page .auth-description {
    margin: 0 0 28px;
    color: #625548;
    font-size: 15px;
    line-height: 1.7;
}

.auth-page .auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 0;
}

.auth-page .form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    margin: 0;
}

.auth-page .form-field label {
    color: #403329;
    font-size: 14px;
    font-weight: 600;
}

.auth-page .form-field input,
.auth-page .form-field select,
.auth-page .form-field textarea {
    display: block;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 49px;
    padding: 12px 14px;
    border: 1px solid #d6c8b7;
    border-radius: 8px;
    outline: none;
    background: #fff;
    color: #30271f;
    font-family: inherit;
    font-size: 16px;
    line-height: 1.4;
    box-shadow: none;
    transition: border-color 0.2s, box-shadow 0.2s,
                background-color 0.2s;
}

.auth-page .form-field input:hover,
.auth-page .form-field select:hover,
.auth-page .form-field textarea:hover {
    border-color: #ad927a;
}

.auth-page .form-field input:focus,
.auth-page .form-field select:focus,
.auth-page .form-field textarea:focus {
    border-color: #79513b;
    background: #fffefa;
    box-shadow: 0 0 0 3px rgb(121 81 59 / 13%);
}

.auth-page .form-field input::placeholder {
    color: #978879;
}

.auth-page .form-field input[type="checkbox"] {
    width: auto;
    min-height: auto;
}

.auth-page .form-help {
    color: #6e6052;
    font-size: 12px;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.auth-page .form-help ul {
    margin: 7px 0 0;
    padding-left: 20px;
}

.auth-page .form-help li {
    margin: 4px 0;
}

.auth-page .form-help a {
    color: #794832;
    text-decoration: underline;
}

.auth-page .form-error,
.auth-page .errorlist {
    color: #922f28;
    font-size: 13px;
    line-height: 1.55;
}

.auth-page .errorlist {
    margin: 0;
    padding-left: 18px;
}

.auth-page .auth-form .button {
    display: flex;
    box-sizing: border-box;
    width: 100%;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    margin-top: 4px;
    padding: 13px 20px;
    border: 1px solid #294236;
    border-radius: 8px;
    background: #294236;
    color: #fffdf8;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.auth-page .auth-form .button:hover {
    background: #1e3228;
    transform: translateY(-1px);
}

.auth-page .auth-switch {
    margin: 24px 0 0;
    color: #625548;
    font-size: 14px;
    line-height: 1.7;
    text-align: center;
}

.auth-page .inline-link {
    color: #794832;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: #c6a995;
    text-underline-offset: 3px;
}

.auth-page .inline-link:hover {
    color: #4f3022;
}

@media (max-width: 540px) {
    .auth-page {
        padding: 30px 14px 48px;
    }

    .auth-page .auth-card {
        padding: 25px 20px;
        border-radius: 12px;
    }

    .auth-page .auth-description {
        margin-bottom: 23px;
    }
}

