@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Playfair+Display:wght@500;600;700&display=swap');

:root {
    --primary: #3E5240;
    --primary-hover: #31422F;
    --accent: #8A7350;
    --accent-hover: #77623F;
    --bg: #F6F3EC;
    --bg-soft: #F1EDE4;
    --card-bg: #FDFBF7;
    --ink: #2B2822;
    --text-muted: #7C766B;
    --line: #E5DFD2;
    --line-soft: #EFEAE0;
    --danger: #9E5A4B;
    --danger-hover: #87493D;
    --gold: #A98F5F;
    --shadow-sm: 0 1px 2px rgba(43,40,34,.05), 0 1px 4px rgba(43,40,34,.04);
    --shadow-md: 0 2px 4px rgba(43,40,34,.06), 0 4px 14px rgba(43,40,34,.05);
    --radius: 12px;
    --radius-sm: 8px;
}
* { box-sizing: border-box; margin: 0; padding: 0; font-variant: small-caps; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: 'Manrope', 'Segoe UI', 'Arial', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    text-transform: uppercase;
    background: linear-gradient(160deg, #FAF8F3 0%, #F3F0E8 100%);
    background-attachment: fixed;
    color: var(--ink);
    min-height: 100vh;
    padding: 32px 24px;
}
.container { max-width: 1000px; margin: 0 auto; }

/* ===== Шапка ===== */
header {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 12px;
    margin-bottom: 16px;
    padding: 4px 2px 16px;
    border-bottom: 1px solid var(--line-soft);
    background: transparent;
}
h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 24px; font-weight: 600;
    color: var(--ink); letter-spacing: .5px;
    line-height: 1.2;
    text-shadow: 0 1px 1px rgba(250,248,243,.6), 0 2px 8px rgba(43,40,34,.28);
}
h1 img { vertical-align: middle; }
h2 {
    font-size: 13px; font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    color: var(--ink);
    margin-bottom: 14px;
}
h3 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--ink); }

/* ===== Навигация ===== */
nav { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
    padding: 6px 2px;
    border-bottom: 1px solid transparent;
    text-shadow: 0 1px 1px rgba(250,248,243,.55), 0 1px 4px rgba(43,40,34,.22);
    transition: color .15s, border-color .15s;
}
.nav-link:hover { color: var(--primary); border-bottom-color: var(--primary); }
.nav-user { color: var(--text-muted); font-size: 13px; }

.nav-bar {
    display: flex; gap: 4px; flex-wrap: wrap;
    margin-bottom: 28px; padding: 4px;
    background: transparent;
    border: none;
}
.nav-btn {
    flex: 1 1 auto; text-align: center; text-decoration: none;
    color: var(--text-muted); font-size: 12px; font-weight: 600;
    text-transform: uppercase; letter-spacing: .8px;
    padding: 10px 14px; border-radius: var(--radius-sm);
    text-shadow: 0 1px 1px rgba(250,248,243,.55), 0 1px 4px rgba(43,40,34,.22);
    transition: background .15s, color .15s;
}
.nav-btn:hover { background: rgba(62,82,64,.08); color: var(--primary); }

/* ===== Карточки ===== */
.card {
    background: var(--card-bg);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    padding: 26px 28px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s;
}
.card:hover { box-shadow: var(--shadow-md); }

/* ===== Кнопки ===== */
.btn {
    background: var(--primary); color: #FBF9F4;
    border: none; padding: 9px 18px; border-radius: var(--radius-sm);
    cursor: pointer; font-weight: 600; text-decoration: none;
    display: inline-block; font-size: 12px; line-height: 1.5;
    letter-spacing: .4px;
    font-family: 'Manrope', sans-serif;
    box-shadow: 0 1px 2px rgba(43,40,34,.12);
    transition: background .15s, box-shadow .15s;
}
.btn:hover { background: var(--primary-hover); box-shadow: 0 2px 5px rgba(43,40,34,.15); }
.btn-block { display: block; width: 100%; }
.btn-success { background: var(--primary); }
.btn-success:hover { background: var(--primary-hover); }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: var(--danger-hover); }
.btn-sm { padding: 5px 12px; font-size: 11px; border-radius: 6px; }

/* ===== Поля ===== */
.input-group { margin-bottom: 16px; }
label {
    display: block; margin-bottom: 6px;
    color: var(--text-muted); font-size: 11px;
    text-transform: uppercase; letter-spacing: 1px; font-weight: 600;
}
input, select, textarea {
    width: 100%; padding: 9px 12px;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
    color: var(--ink); font-size: 14px; font-family: 'Manrope', sans-serif;
    font-variant: small-caps;
    text-transform: none;
    transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(138,115,80,.14);
}

/* ===== Таблицы ===== */
table { width: 100%; border-collapse: collapse; margin-top: 8px; }
th, td { padding: 10px 10px; text-align: left; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
th {
    color: var(--text-muted); font-weight: 600;
    text-transform: uppercase; letter-spacing: 1px; font-size: 11px;
}
tr:last-child td { border-bottom: none; }

/* ===== Бейджи / алерты ===== */
.badge { background: #EFEBE1; color: var(--text-muted); padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.badge-green { background: #E7EDE4; color: var(--primary); }
.badge-yellow { background: #F2EBD9; color: var(--gold); }
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 13px; border: 1px solid transparent; }
.alert-success { background: #EFF4EC; color: var(--primary); border-color: #DCE7D7; }
.alert-error { background: #F8EEEB; color: var(--danger); border-color: #EDDCD6; }

/* ===== Сетка ===== */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media(max-width: 768px) {
    .grid { grid-template-columns: 1fr; }
    nav { justify-content: flex-start; }
    header { flex-direction: row; text-align: left; flex-wrap: nowrap; gap: 6px; align-items: center; }
    body { padding: 20px 14px; }
    .card { padding: 20px; }
    header h1 { font-size: 16px; flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .header-right { flex-wrap: nowrap; gap: 6px; flex: 0 0 auto; }
    .avatar-link { padding: 3px; }
    .avatar-link .avatar-name { display: none; }
    /* Кликер на телефоне — только иконка и число, без шкалы и уровней */
    .clicker { gap: 4px; padding: 3px 9px; font-size: 12px; flex: 0 0 auto; }
    .clicker-bar { display: none; }
    .clicker-level { display: none; }
    .clicker-progress { display: none; }
    .nav-bar { gap: 3px; padding: 2px; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .nav-bar .nav-btn { flex: 1 0 auto; padding: 8px 10px; font-size: 11px; }
}

/* ===== Типографика ===== */
.muted { color: var(--text-muted); font-size: 12px; line-height: 1.65; }
.big-text { font-size: 22px; margin: 12px 0; font-weight: 700; }
.big-emoji { font-size: 60px; display: block; text-align: center; margin: 12px 0; }
.avatar-display { text-align: center; }

/* ===== Тесты/квизы ===== */
.quiz-question { background: var(--card-bg); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.quiz-options label { display: block; margin: 8px 0; cursor: pointer; font-size: 14px; }
.quiz-options input[type="radio"] { width: auto; margin-right: 8px; accent-color: var(--primary); }
.quiz-list { list-style: none; }
.quiz-list li { padding: 8px 0; border-bottom: 1px solid var(--line-soft); display: flex; justify-content: space-between; align-items: center; gap: 8px; }

/* ===== Чат ===== */
.chat-box { max-height: 400px; overflow-y: auto; background: var(--card-bg); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 16px; }
.chat-msg { margin-bottom: 10px; }
.chat-msg p { margin-top: 3px; }

/* ===== Профиль ===== */
.skin-display { font-size: 14px; margin-top: 6px; }
.progress-bar { background: var(--bg-soft); border-radius: 20px; height: 8px; overflow: hidden; margin-top: 8px; }
.progress-fill { background: var(--primary); height: 100%; border-radius: 20px; }
.reward-mine { background: #F3F2EC; }

/* ===== Вход / регистрация ===== */
.auth-body {
    background: linear-gradient(160deg, #FAF8F3 0%, #EDE9DE 100%);
    background-attachment: fixed;
    min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px;
}
.auth-wrap { width: 100%; max-width: 400px; }
.auth-card {
    background: var(--card-bg); border-radius: 16px; padding: 44px 36px;
    border: 1px solid var(--line-soft); box-shadow: var(--shadow-md);
}
.auth-title { text-align: center; font-family: 'Playfair Display', Georgia, serif; font-size: 26px; margin-bottom: 4px; color: var(--ink); }
.auth-subtitle { text-align: center; font-size: 13px; color: var(--text-muted); margin-bottom: 26px; }
.auth-switch { text-align: center; margin-top: 22px; font-size: 13px; color: var(--text-muted); }
.auth-switch a { color: var(--primary); text-decoration: none; font-weight: 600; }
.auth-switch a:hover { text-decoration: underline; }

/* ===== Фоны страницы ===== */
.bg-white { background: linear-gradient(160deg, #FAF8F3 0%, #F3F0E8 100%); background-attachment: fixed; color: var(--ink); }
.bg-dark { background: #26241F; color: #EDE9DF; }
.bg-dark .card { background: #34312A; border-color: #45413A; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.bg-dark .card:hover { box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.bg-dark .quiz-question, .bg-dark .chat-box { background: #302D27; border-color: #45413A; }
.bg-dark input, .bg-dark select, .bg-dark textarea { background: #2C2A24; color: #EDE9DF; border-color: #4A463E; }
.bg-dark input:focus, .bg-dark select:focus, .bg-dark textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(169,143,95,.16); }
.bg-dark .nav-btn:hover { background: rgba(255,255,255,.06); color: #EDE9DF; }
.bg-dark h1, .bg-dark h2, .bg-dark h3 { color: #EDE9DF; }
.bg-dark .muted { color: #A39C8E; }
.bg-dark header { border-bottom-color: #3E3A33; }
.bg-dark table th, .bg-dark table td { border-bottom-color: #3E3A33; }
.bg-dark .badge { background: #403C34; color: #C4BDAE; }
.bg-dark .badge-green { background: #3A4538; color: #B9CCB2; }
.bg-dark .badge-yellow { background: #48402E; color: #D9C79B; }

.bg-dark .avatar-name { color: #EDE9DF; }
.bg-dark .avatar-emoji { background: rgba(255,255,255,.1); }

.bg-image { background: #F6F3EC; color: var(--ink); }
.bg-image .card { background: rgba(253,251,247,.94); backdrop-filter: blur(2px); }
.bg-image header { background: transparent; border-bottom: 1px solid rgba(43,40,34,.15); }
.bg-image h1 { color: #FFFFFF; text-shadow: 0 1px 2px rgba(0,0,0,.55), 0 2px 10px rgba(0,0,0,.45); }
.bg-image .nav-btn, .bg-image .nav-link { color: #FFFFFF; text-shadow: 0 1px 2px rgba(0,0,0,.5), 0 1px 6px rgba(0,0,0,.4); }
.bg-image .nav-btn:hover, .bg-image .nav-link:hover { color: #FFF3E0; }
.bg-image .avatar-name { color: #FFFFFF; text-shadow: 0 1px 2px rgba(0,0,0,.5); }

/* ===== Выбор фона страницы ===== */
.bg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-top: 14px; }
.bg-option { display: block; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-soft); text-decoration: none; color: var(--ink); background: var(--card-bg); box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s; }
.bg-option:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }
.bg-preview { height: 90px; background-size: cover; background-position: center; }
.bg-label { padding: 10px 12px; font-size: 12px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 6px; }

/* ===== Аватар в шапке ===== */
.header-right { display: flex; align-items: center; gap: 10px; }
.avatar-link { display: flex; align-items: center; gap: 8px; text-decoration: none; padding: 4px 10px 4px 4px; border-radius: 24px; background: transparent; transition: background .15s; }
.avatar-link:hover { background: rgba(0,0,0,.04); }
.avatar-emoji { width: 30px; height: 30px; border-radius: 50%; background: rgba(0,0,0,.06); display: flex; align-items: center; justify-content: center; font-size: 18px; }
.avatar-name { font-size: 12px; font-weight: 700; color: var(--ink); text-transform: uppercase; letter-spacing: .8px; text-shadow: 0 1px 1px rgba(250,248,243,.55), 0 1px 4px rgba(43,40,34,.22); }

/* ===== Аватар-кастомизация ===== */
.avatar-canvas { position: relative; width: 140px; height: 140px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto; border: 1px solid var(--line-soft); overflow: hidden; background: #F0EDE5; }
.avatar-base { font-size: 64px; line-height: 1; z-index: 1; }
.avatar-layer { position: absolute; line-height: 1; z-index: 2; will-change: transform; }
.avatar-layer-body { top: 34%; left: 50%; margin-left: calc(-40px / 2); font-size: 40px; }
.avatar-layer-acc { top: 18%; left: 50%; margin-left: calc(-34px / 2); font-size: 34px; }
.avatar-layer-hat { top: 0; left: 50%; margin-left: calc(-42px / 2); font-size: 42px; text-align: center; }
.avatar-preview-wrap { padding: 8px 0; }
.avatar-canvas-sm { width: 34px; height: 34px; border: 1px solid var(--line-soft); border-radius: 50%; flex: 0 0 auto; }
.avatar-base-sm { font-size: 18px; }
.avatar-layer-sm { font-size: 14px; }
.avatar-layer-sm.avatar-layer-body { top: 36%; font-size: 12px; margin-left: -6px; }
.avatar-layer-sm.avatar-layer-acc { top: 20%; font-size: 11px; margin-left: -5px; }
.avatar-layer-sm.avatar-layer-hat { top: -2%; font-size: 13px; margin-left: -6px; }

/* ===== Панель трансформации слоёв аватара ===== */
.avatar-transform-panel { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.transform-controls { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.transform-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); width: 70px; }
.transform-btn {
    min-width: 32px; height: 32px; padding: 0 8px;
    background: var(--card-bg); border: 1px solid var(--line);
    border-radius: var(--radius-sm); cursor: pointer;
    font-size: 15px; font-weight: 700; color: var(--ink); line-height: 1;
    display: inline-flex; align-items: center; justify-content: center;
    transition: border-color .15s, background .15s, color .15s;
}
.transform-btn:hover { border-color: var(--primary); color: var(--primary); background: #F7FAF6; }
.transform-btn:active { background: #EFF4EC; }
.transform-value { min-width: 44px; text-align: center; font-size: 12px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.transform-reset { margin-left: 4px; font-size: 12px; }
.transform-hint { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.avatar-layer.dragging { opacity: .85; }

/* ===== Пресеты фона аватарки ===== */
.bg-preset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; }
.bg-preset { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; padding: 6px; border: 2px solid var(--line-soft); border-radius: var(--radius-sm); text-align: center; background: var(--card-bg); transition: border-color .15s; }
.bg-preset.saved { border-color: var(--accent); background: #F7F3EA; }
.bg-preset.selected { border-color: var(--primary); background: #EFF4EC; }
.bg-preset input { display: none; }
.bg-swatch { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-soft); display: block; }
.custom-swatch { padding: 0; overflow: hidden; position: relative; }
.custom-swatch input[type="color"] { width: 100%; height: 100%; border: none; padding: 0; cursor: pointer; background: transparent; }
.bg-preset-name { font-size: 11px; color: var(--text-muted); }

/* ===== Предметы одежды ===== */
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
.item-card { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; padding: 10px 6px; border: 2px solid var(--line-soft); border-radius: var(--radius-sm); text-align: center; position: relative; background: var(--card-bg); transition: border-color .15s; }
.item-card.saved { border-color: var(--accent); background: #F7F3EA; }
.item-card.selected { border-color: var(--primary); background: #EFF4EC; }
.item-card.locked { opacity: .45; cursor: not-allowed; }
.item-card input { display: none; }
.item-emoji { font-size: 30px; line-height: 1; }
.item-name { font-size: 11px; color: var(--ink); }
.item-lock { font-size: 10px; color: var(--text-muted); }

/* ===== Экран игры ===== */
.game-hud { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; padding: 12px 16px; background: var(--card-bg); border: 1px solid var(--line-soft); border-radius: var(--radius); }
.game-hud-item { font-size: 12px; color: var(--text-muted); }
.game-hud-value { font-size: 18px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.game-timer { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); }
.game-timer.warn { color: var(--danger); }
.game-question { font-size: 20px; font-weight: 700; margin: 20px 0 24px; line-height: 1.4; }
.game-option { display: block; width: 100%; text-align: left; padding: 11px 14px; margin-bottom: 8px; background: var(--card-bg); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); font-size: 14px; cursor: pointer; font-family: 'Manrope', sans-serif; color: var(--ink); transition: border-color .15s, background .15s; }
.game-option:hover { border-color: var(--primary); background: #F7FAF6; }
.game-option.correct { border-color: var(--primary); background: #EFF4EC; }
.game-option.wrong { border-color: var(--danger); background: #F8EEEB; }
.game-input { font-size: 18px; padding: 12px 14px; text-align: center; }
.game-word-letters { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 20px 0; }
.game-letter { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 44px; padding: 0 8px; background: var(--card-bg); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); font-size: 18px; font-weight: 600; cursor: pointer; user-select: none; transition: border-color .15s; }
.game-letter:hover { border-color: var(--primary); }
.game-letter.used { opacity: .3; cursor: default; }
.game-slot { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 34px; margin: 0 2px; border-bottom: 2px solid var(--line); font-size: 18px; font-weight: 600; }
.game-hint { margin: 14px 0; padding: 10px 14px; background: var(--bg-soft); border-radius: var(--radius-sm); font-size: 13px; color: var(--text-muted); }
.game-combo { font-size: 12px; color: var(--gold); font-weight: 700; }

/* ===== Хаб игр ===== */
.game-card-link { text-decoration: none; color: inherit; display: block; }
.game-card-link:hover .card { border-color: var(--accent); background: var(--card-bg); }
.game-card { transition: border-color .15s, box-shadow .15s; }
.game-card h2 { margin-bottom: 6px; }
.game-card .muted { margin-bottom: 8px; }
.game-best { font-size: 13px; color: var(--ink); margin-top: 6px; }
.game-best b { color: var(--primary); font-weight: 700; }

/* ===== Кликер в шапке ===== */
.clicker {
    display: flex; align-items: center; gap: 8px;
    padding: 5px 12px; border-radius: 20px;
    background: rgba(0,0,0,.05);
    border: 1px solid var(--line-soft);
    font-size: 13px; font-weight: 700;
    font-variant-numeric: tabular-nums;
    user-select: none; white-space: nowrap;
}
.clicker-emoji { font-size: 15px; line-height: 1; }
.clicker-total { color: var(--ink); min-width: 20px; }
.clicker-level {
    font-size: 11px; font-weight: 700;
    color: var(--text-muted);
    background: rgba(255,255,255,.7);
    border: 1px solid var(--line-soft);
    border-radius: 50%; min-width: 22px; height: 22px;
    display: inline-flex; align-items: center; justify-content: center;
}
.clicker-bar {
    width: 110px; height: 8px; border-radius: 20px;
    background: var(--bg-soft); overflow: hidden; position: relative;
}
.clicker-fill {
    height: 100%; width: 0; border-radius: 20px;
    background: var(--primary);
    transition: width .25s ease;
}
.clicker-progress { font-size: 11px; color: var(--text-muted); font-weight: 600; }

.bg-dark .clicker { background: rgba(255,255,255,.06); border-color: #45413A; }
.bg-dark .clicker-total { color: #EDE9DF; }
.bg-dark .clicker-level { background: #3A3733; border-color: #4A4640; color: #C4BDAE; }
.bg-dark .clicker-bar { background: #3A3733; }
.bg-dark .clicker-progress { color: #A39C8E; }

.bg-image .clicker { background: rgba(255,255,255,.92); border-color: rgba(0,0,0,.1); }

@media(max-width: 640px) {
    .clicker-progress { display: none; }
    .clicker-bar { width: 70px; }
}

/* ===== Виджет поддержки ===== */
.support-widget { position: fixed; left: 20px; bottom: 20px; z-index: 10000; }
.support-toggle {
    width: 56px; height: 56px; border-radius: 50%;
    background: var(--primary); color: #fff; font-size: 24px;
    border: none; cursor: pointer; box-shadow: var(--shadow-md);
    display: flex; align-items: center; justify-content: center;
    transition: background .15s, transform .15s;
}
.support-toggle:hover { background: var(--primary-hover); transform: translateY(-2px); }
.support-popup {
    position: absolute; left: 0; bottom: 66px;
    width: 340px; max-width: calc(100vw - 40px);
    height: 440px;
    background: var(--card-bg); border: 1px solid var(--line-soft);
    border-radius: 14px; box-shadow: var(--shadow-md);
    display: none; flex-direction: column; overflow: hidden;
}
.support-popup-head {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 16px; background: var(--bg-soft);
    border-bottom: 1px solid var(--line-soft);
    font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 1px;
}
.support-close { background: none; border: none; font-size: 15px; cursor: pointer; color: var(--text-muted); padding: 2px 6px; }
.support-close:hover { color: var(--danger); }
.support-messages { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.support-empty { color: var(--text-muted); font-size: 12px; text-align: center; margin: auto; }
.support-msg { max-width: 85%; padding: 8px 12px; border-radius: 12px; font-size: 13px; }
.support-msg-mine { background: var(--primary); color: #FBF9F4; align-self: flex-end; }
.support-msg-user { background: var(--bg-soft); align-self: flex-start; }
.support-msg-admin { background: #E7EDE4; align-self: flex-start; color: var(--primary); }
.support-msg-mine .support-msg-head, .support-msg-mine .support-msg-time { color: rgba(255,255,255,.8); }
.support-msg-head { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--text-muted); margin-bottom: 3px; }
.support-msg-admin .support-msg-head { color: var(--primary); }
.support-msg-text { line-height: 1.45; text-transform: none; font-variant: normal; }
.support-msg-time { font-size: 10px; color: var(--text-muted); margin-top: 3px; }
.support-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line-soft); background: var(--card-bg); }
.support-form input { flex: 1; }

/* ===== Админка / предложения постов ===== */
.post-suggestion { border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; background: var(--bg-soft); }
.post-suggestion-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.post-photo { max-width: 100%; max-height: 260px; border-radius: var(--radius-sm); margin-top: 6px; }
.admin-reply { background: #E7EDE4; color: var(--primary); border-radius: var(--radius-sm); padding: 10px 12px; margin-top: 10px; font-size: 13px; }
.suggestion-reply { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.suggestion-reply textarea { min-height: 70px; }