/* ============================================
   Гильдия — Public Site
   Стиль «Гильдия 27»: тёмное фэнтези —
   чёрный фон, пергамент, огненные акценты
   ============================================ */

@font-face {
    font-family: 'AugustaTwo';
    src: url('../fonts/AugustaTwo.woff2') format('woff2');
    font-weight: 100 900;
    font-display: swap;
}
@font-face {
    font-family: 'Piazzolla';
    src: url('../fonts/Piazzolla-ExtraLight.woff2') format('woff2');
    font-weight: 200;
    font-display: swap;
}
@font-face {
    font-family: 'Piazzolla';
    src: url('../fonts/Piazzolla-Medium.woff2') format('woff2');
    font-weight: 400 500;
    font-display: swap;
}
@font-face {
    font-family: 'Piazzolla';
    src: url('../fonts/Piazzolla-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-display: swap;
}
@font-face {
    font-family: 'Piazzolla';
    src: url('../fonts/Piazzolla-Bold.woff2') format('woff2');
    font-weight: 700 900;
    font-display: swap;
}

:root {
    --bg-deep: #000000;
    --bg: #0B0B0B;
    --bg-card: #14100b;
    --bg-card-hover: #1a140e;
    --bg-elevated: #171208;
    --gold: #EE9B3A;
    --gold-light: #FFB874;
    --gold-dim: #9a6b35;
    --accent: #E56211;
    --text: #F0E9DE;
    --text-bright: #FFEFDD;
    --text-muted: #D0C1B3;
    --border: #2a2118;
    --border-gold: rgba(238,155,58,.25);
    --success: #7ddc74;
    --danger: #ff6a5f;
    --radius: 0px;
    --radius-sm: 0px;
    --shadow: 0 2px 12px rgba(0,0,0,.4);
    --glow-gold: 0 0 62px 2px rgba(238,155,58,.12);
    --grad-heading: radial-gradient(farthest-corner at 30px 10px, #EE9B3A 0%, #E17A35 100%);
    --grad-btn: linear-gradient(180deg, #F9831B 0%, #ED590C 100%);
}

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

body {
    font-family: 'Piazzolla', Georgia, serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
}

/* Subtle noise texture overlay */
body::before {
    content: '';
    position: fixed; inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.02'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9999;
    opacity: .4;
}

h1, h2, h3, h4, h5 {
    font-family: 'AugustaTwo', serif;
    color: var(--text-bright);
    line-height: 1.2;
}

a { color: var(--gold); text-decoration: none; transition: color .2s; }
a:hover { color: var(--gold-light); }

/* ========== NAVIGATION ========== */
.guild-nav {
    position: fixed; top: 0; left: 0; right: 0;
    z-index: 100;
    background: rgba(0,0,0,.88);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}
.nav-inner {
    max-width: 1100px; margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex; align-items: center; justify-content: space-between;
}
.nav-brand {
    display: flex; align-items: center; gap: 10px;
    font-family: 'AugustaTwo', serif;
    font-weight: 700; font-size: 1.15rem;
    color: var(--text-bright);
}
.nav-brand-icon { font-size: 1.3rem; }
.nav-links { display: flex; gap: 8px; }
.nav-link {
    padding: 8px 16px; border-radius: 0;
    font-family: 'AugustaTwo', serif;
    font-size: .82rem; font-weight: 600;
    color: var(--text-muted);
    letter-spacing: .5px;
    transition: all .2s;
}
.nav-link:hover { color: var(--gold); background: rgba(238,155,58,.06); }
.nav-link-muted { opacity: .5; }
.nav-link-muted:hover { opacity: 1; color: var(--danger); }
.nav-toggle { display: none; background: none; border: none; color: var(--text); font-size: 1.3rem; cursor: pointer; }

/* ========== HERO ========== */
.hero {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 100px 24px 80px;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(238,155,58,.06) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 70%, rgba(230,112,31,.04) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 100%, rgba(238,155,58,.03) 0%, transparent 40%);
    pointer-events: none;
}
.hero-content {
    max-width: 720px;
    text-align: center;
    position: relative;
    animation: heroFadeIn .8s ease;
}
@keyframes heroFadeIn {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-emblem {
    font-size: 3.5rem;
    margin-bottom: 20px;
    display: block;
    filter: drop-shadow(0 0 20px rgba(238,155,58,.3));
}

.hero h1 {
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    font-weight: 400;
    letter-spacing: 1px;
    background-image: var(--grad-heading);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}
.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 36px;
    font-style: italic;
}
.hero-stats {
    display: flex; justify-content: center; gap: 40px;
    margin-bottom: 40px;
}
.hero-stat-value {
    font-family: 'AugustaTwo', serif;
    font-size: 2rem; font-weight: 700;
    color: var(--gold);
    display: block;
}
.hero-stat-label {
    font-size: .85rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Divider ornament */
.ornament {
    display: flex; align-items: center; justify-content: center;
    gap: 16px;
    margin: 24px 0;
    color: var(--gold-dim);
    font-size: .8rem;
}
.ornament::before, .ornament::after {
    content: '';
    width: 60px; height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
}

/* ========== BUTTONS ========== */
.btn-gold {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 32px;
    min-height: 52px;
    background: var(--grad-btn);
    color: #000000;
    font-family: 'AugustaTwo', serif;
    font-weight: 400; font-size: 1.35rem;
    line-height: 1;
    border: none; border-radius: 0;
    clip-path: url(#btn-bg);
    cursor: pointer;
    transition: transform .16s cubic-bezier(.22,1,.36,1), filter .24s, box-shadow .24s;
    box-shadow: 0 0 62px 2px rgba(238,155,58,.2);
}
.btn-gold:hover {
    transform: translateY(-2px) scale(1.01);
    color: #000000;
}
.btn-gold:active { transform: translateY(1px) scale(.98); }
.btn-ghost {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 28px;
    min-height: 48px;
    border: 2px solid #F06510;
    color: #F88500;
    background-color: rgba(0,0,0,.4);
    font-family: 'AugustaTwo', serif;
    font-weight: 400; font-size: 1.2rem;
    line-height: 1;
    border-radius: 0;
    cursor: pointer;
    transition: transform .16s cubic-bezier(.22,1,.36,1), background-color .24s;
}
.btn-ghost:hover {
    background-color: rgba(0,0,0,.55);
    border-color: #F06510;
    color: var(--gold-light);
    transform: translateY(-2px) scale(1.01);
}
.btn-ghost:active { transform: translateY(1px) scale(.98); }
.btn-sm { padding: 8px 18px; font-size: .8rem; }

/* Telegram login button */
.tg-login-wrap { margin-top: 8px; }

/* ========== SECTIONS ========== */
.section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 80px 24px;
}
.section-title {
    font-size: 2.2rem;
    font-weight: 400;
    text-align: center;
    margin-bottom: 12px;
    background-image: var(--grad-heading);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.section-sub {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 48px;
    font-size: 1.05rem;
    font-style: italic;
    border: none;
    outline: none;
}

/* ========== GAME CARDS ========== */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.game-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all .3s;
    position: relative;
    display: flex;
    flex-direction: column;
}
.game-card:hover {
    border-color: var(--border-gold);
    transform: translateY(-4px);
    box-shadow: var(--glow-gold), var(--shadow);
}
.game-card-img {
    height: 180px;
    background: linear-gradient(135deg, #20150d, #150e08);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    position: relative;
}
.game-card-img img {
    width: 100%; height: 100%; object-fit: cover;
}
.game-card-img .no-img {
    font-size: 3rem; opacity: .15;
}
.game-card-slots {
    position: absolute; top: 12px; right: 12px;
    background: rgba(8,7,13,.8);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: 0;
    padding: 4px 12px;
    font-family: 'AugustaTwo', serif;
    font-weight: 700; font-size: .85rem;
}
.slots-open { color: var(--success); }
.slots-few { color: #EE9B3A; }
.slots-full { color: var(--danger); }

.game-card-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.game-card-title {
    font-family: 'AugustaTwo', serif;
    font-size: 1.1rem; font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 8px;
}
.game-card-desc {
    font-size: .92rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.game-card-meta {
    display: flex; flex-direction: column; gap: 6px;
    font-size: .88rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}
.game-card-meta span { display: flex; align-items: center; gap: 8px; }
.game-card-meta i { width: 16px; color: var(--gold-dim); font-size: .8rem; }

.game-card-footer {
    display: flex; align-items: center; justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    margin-top: auto;
}
.game-price {
    font-family: 'AugustaTwo', serif;
    font-weight: 700;
    color: var(--gold);
    font-size: 1.05rem;
}
.badge-booked {
    padding: 6px 14px;
    border-radius: 0;
    font-family: 'AugustaTwo', serif;
    font-size: .78rem;
    font-weight: 600;
    background: rgba(78,173,106,.12);
    color: var(--success);
    border: 1px solid rgba(78,173,106,.2);
}

/* ========== PROFILE ========== */
.profile-wrap {
    max-width: 900px;
    margin: 0 auto;
    padding: 100px 24px 80px;
}

.profile-card {
    background: var(--bg-card);
    border: 1px solid var(--border-gold);
    border-radius: 0;
    padding: 36px;
    position: relative;
    overflow: hidden;
    margin-bottom: 32px;
}
.profile-card::before {
    content: '';
    position: absolute; top: -100px; right: -100px;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(238,155,58,.05) 0%, transparent 70%);
    pointer-events: none;
}

.profile-header {
    display: flex; align-items: center; gap: 24px;
    margin-bottom: 28px;
    position: relative;
}
.profile-avatar {
    width: 80px; height: 80px;
    background: linear-gradient(135deg, var(--gold), #c96a1a);
    border-radius: 0;
    display: grid; place-items: center;
    font-size: 2.2rem;
    box-shadow: 0 4px 24px rgba(238,155,58,.25);
    flex-shrink: 0;
}
.profile-name {
    font-family: 'AugustaTwo', serif;
    font-size: 1.6rem; font-weight: 700;
    color: var(--text-bright);
}
.profile-tag { font-size: .9rem; color: var(--text-muted); margin-top: 2px; }
.profile-status {
    display: inline-block;
    background: linear-gradient(135deg, rgba(238,155,58,.15), rgba(238,155,58,.05));
    border: 1px solid var(--border-gold);
    border-radius: 0;
    padding: 4px 14px;
    font-size: .85rem; font-weight: 600;
    color: var(--gold-light);
    margin-top: 8px;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}
.p-stat {
    text-align: center;
    padding: 16px;
    background: rgba(255,255,255,.02);
    border: 1px solid var(--border);
    border-radius: 0;
}
.p-stat-value {
    font-family: 'AugustaTwo', serif;
    font-size: 1.5rem; font-weight: 700;
    color: var(--text-bright);
}
.p-stat-label {
    font-size: .78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-top: 4px;
}

.progress-section { margin-bottom: 20px; }
.progress-header {
    display: flex; justify-content: space-between;
    font-size: .88rem;
    margin-bottom: 8px;
}
.progress-track {
    height: 6px;
    background: rgba(255,255,255,.06);
    border-radius: 3px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    border-radius: 3px;
    transition: width 1.2s ease;
}
.progress-hint {
    text-align: right;
    font-size: .78rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.achievements {
    display: flex; flex-wrap: wrap; gap: 8px;
}
.ach-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,.03);
    border: 1px solid var(--border);
    border-radius: 0;
    padding: 6px 12px;
    font-size: .82rem;
    color: var(--text);
}

/* Panel (bookings, transactions) */
.panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 24px;
}
.panel-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    font-family: 'AugustaTwo', serif;
    font-weight: 600;
    font-size: .95rem;
    color: var(--text-bright);
}
.panel-row {
    padding: 12px 20px;
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid rgba(255,255,255,.03);
    font-size: .9rem;
}
.panel-row:last-child { border-bottom: none; }
.panel-row-title { color: var(--text); font-weight: 500; }
.panel-row-sub { color: var(--text-muted); font-size: .82rem; }
.panel-row-value { font-weight: 600; }
.panel-row-positive { color: var(--success); }
.panel-row-negative { color: var(--danger); }
.panel-empty {
    padding: 32px;
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
}

/* ========== FOOTER ========== */
.guild-footer {
    border-top: 1px solid var(--border);
    padding: 24px;
    text-align: center;
}
.footer-inner {
    max-width: 1100px; margin: 0 auto;
    display: flex; justify-content: space-between; align-items: center;
    font-size: .85rem; color: var(--text-muted);
}
.footer-brand {
    font-family: 'AugustaTwo', serif;
    font-weight: 600;
    color: var(--gold-dim);
}

/* ========== FLASH MESSAGES ========== */
.flash-wrap {
    position: fixed; top: 72px; left: 50%; transform: translateX(-50%);
    z-index: 200; width: 90%; max-width: 500px;
}
.flash {
    padding: 12px 20px;
    border-radius: 0;
    font-size: .9rem;
    margin-bottom: 8px;
    animation: flashIn .3s ease;
}
@keyframes flashIn { from { opacity: 0; transform: translateY(-8px); } }
.flash-error { background: rgba(199,72,72,.15); color: #ff8a6b; border: 1px solid rgba(199,72,72,.2); }
.flash-success { background: rgba(78,173,106,.15); color: #8fe08d; border: 1px solid rgba(78,173,106,.2); }

/* ========== ANIMATIONS ========== */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.anim { animation: fadeUp .5s ease forwards; opacity: 0; }
.anim-d1 { animation-delay: .1s; }
.anim-d2 { animation-delay: .2s; }
.anim-d3 { animation-delay: .3s; }
.anim-d4 { animation-delay: .4s; }

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--bg-deep); padding: 16px; flex-direction: column; border-bottom: 1px solid var(--border); }
    .nav-links.open { display: flex; }
    .nav-toggle { display: block; }
    .hero-stats { gap: 24px; }
    .hero-stat-value { font-size: 1.5rem; }
    .profile-stats { grid-template-columns: repeat(2, 1fr); }
    .profile-panels { grid-template-columns: 1fr !important; }
    .games-grid { grid-template-columns: 1fr; }
    .footer-inner { flex-direction: column; gap: 8px; }
    .profile-header { flex-direction: column; text-align: center; }
}

.profile-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 640px) {
    .hero h1 { letter-spacing: 1px; }
    .hero-subtitle { font-size: 1rem; }
    .section { padding: 48px 16px; }
}

/* ========== ENHANCED VISUALS ========== */

/* --- Hero floating particles --- */
.hero { position: relative; }
.hero-particles {
    position: absolute; inset: 0;
    overflow: hidden;
    pointer-events: none;
}
.hero-particles span {
    position: absolute;
    width: 3px; height: 3px;
    background: var(--gold);
    border-radius: 50%;
    opacity: 0;
    animation: particleFloat 6s infinite ease-in-out;
}
.hero-particles span:nth-child(1) { left: 10%; animation-delay: 0s; animation-duration: 7s; }
.hero-particles span:nth-child(2) { left: 25%; animation-delay: 1.2s; animation-duration: 5s; }
.hero-particles span:nth-child(3) { left: 40%; animation-delay: 2.5s; animation-duration: 8s; }
.hero-particles span:nth-child(4) { left: 55%; animation-delay: 0.8s; animation-duration: 6s; }
.hero-particles span:nth-child(5) { left: 70%; animation-delay: 3s; animation-duration: 7s; }
.hero-particles span:nth-child(6) { left: 85%; animation-delay: 1.8s; animation-duration: 5.5s; }
.hero-particles span:nth-child(7) { left: 50%; animation-delay: 4s; animation-duration: 9s; }
.hero-particles span:nth-child(8) { left: 15%; animation-delay: 2s; animation-duration: 6.5s; }

@keyframes particleFloat {
    0% { bottom: -10px; opacity: 0; transform: translateX(0); }
    10% { opacity: 0.6; }
    50% { opacity: 0.3; }
    100% { bottom: 100%; opacity: 0; transform: translateX(40px); }
}

/* --- Glowing emblem --- */
.hero-emblem {
    font-size: 4rem;
    margin-bottom: 24px;
    display: block;
    animation: emblemPulse 3s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(238,155,58,.4));
}
@keyframes emblemPulse {
    0%, 100% { filter: drop-shadow(0 0 20px rgba(238,155,58,.3)); transform: scale(1); }
    50% { filter: drop-shadow(0 0 40px rgba(238,155,58,.6)); transform: scale(1.05); }
}

/* --- Hero title shimmer --- */
.hero h1 {
    position: relative;
    overflow: hidden;
}
.hero h1::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 60%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent);
    animation: titleShimmer 4s ease-in-out infinite;
}
@keyframes titleShimmer {
    0%, 100% { left: -100%; }
    50% { left: 150%; }
}

/* --- Stat counter glow --- */
.hero-stat-value {
    text-shadow: 0 0 20px rgba(238,155,58,.4);
}

/* --- How it works cards --- */
.how-card {
    padding: 28px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0;
    transition: all .4s ease;
    text-align: center;
}
.how-card:hover {
    border-color: var(--border-gold);
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(238,155,58,.08);
}
.how-card-icon {
    width: 56px; height: 56px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, rgba(238,155,58,.1), rgba(238,155,58,.03));
    border: 1px solid var(--border-gold);
    border-radius: 0;
    display: grid; place-items: center;
    font-size: 1.5rem;
    transition: transform .3s;
}
.how-card:hover .how-card-icon { transform: scale(1.1) rotate(5deg); }
.how-card h4 {
    font-family: 'AugustaTwo', serif;
    font-size: .95rem;
    color: var(--gold);
    margin-bottom: 8px;
}
.how-card p {
    color: var(--text-muted);
    font-size: .88rem;
    line-height: 1.5;
}

/* ========== ENHANCED GAME CARDS ========== */

.game-card {
    position: relative;
    overflow: hidden;
}
.game-card::before {
    content: '';
    position: absolute;
    top: -1px; left: -1px; right: -1px; bottom: -1px;
    background: linear-gradient(135deg, transparent 40%, rgba(238,155,58,.15) 50%, transparent 60%);
    border-radius: var(--radius);
    opacity: 0;
    transition: opacity .4s;
    z-index: 0;
    pointer-events: none;
}
.game-card:hover::before { opacity: 1; }

.game-card-img {
    position: relative;
}
.game-card-img::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 60%;
    background: linear-gradient(transparent, rgba(21,19,30,.9));
    pointer-events: none;
}

.game-card-slots {
    z-index: 2;
    backdrop-filter: blur(12px);
    font-size: .9rem;
    padding: 6px 14px;
    letter-spacing: .5px;
}

.game-card-body { position: relative; z-index: 1; }

.game-card-title {
    transition: color .3s;
}
.game-card:hover .game-card-title { color: var(--gold-light); }

.game-price {
    position: relative;
    padding: 4px 0;
}
.game-price::before {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 1px;
    background: var(--gold);
    transition: width .3s;
}
.game-card:hover .game-price::before { width: 100%; }

/* ========== ENHANCED PROFILE ========== */

.profile-card {
    position: relative;
}
.profile-card::after {
    content: '';
    position: absolute;
    top: -1px; left: -1px; right: -1px; bottom: -1px;
    border-radius: 0;
    background: linear-gradient(135deg, rgba(238,155,58,.3), transparent 30%, transparent 70%, rgba(230,112,31,.2));
    z-index: -1;
    opacity: .5;
    animation: profileGlow 4s ease-in-out infinite alternate;
}
@keyframes profileGlow {
    0% { opacity: .3; }
    100% { opacity: .6; }
}

/* Animated stats */
.p-stat {
    transition: all .3s ease;
    cursor: default;
}
.p-stat:hover {
    background: rgba(238,155,58,.05);
    border-color: var(--border-gold);
    transform: translateY(-3px);
}

.p-stat-value {
    transition: transform .2s;
}
.p-stat:hover .p-stat-value {
    transform: scale(1.08);
}

/* Progress bar shimmer */
.progress-fill {
    position: relative;
    overflow: hidden;
}
.progress-fill::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.25), transparent);
    animation: progressShimmer 2s ease-in-out infinite;
}
@keyframes progressShimmer {
    0% { left: -100%; }
    100% { left: 200%; }
}

/* Achievement badges */
.ach-badge {
    transition: all .3s;
    cursor: default;
}
.ach-badge:hover {
    background: rgba(238,155,58,.08);
    border-color: var(--border-gold);
    transform: translateY(-2px) scale(1.03);
}

/* Profile avatar pulse */
.profile-avatar {
    animation: avatarGlow 3s ease-in-out infinite alternate;
}
@keyframes avatarGlow {
    0% { box-shadow: 0 4px 24px rgba(238,155,58,.2); }
    100% { box-shadow: 0 4px 36px rgba(238,155,58,.4); }
}

/* Profile status badge shimmer */
.profile-status {
    position: relative;
    overflow: hidden;
}
.profile-status::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 60%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.06), transparent);
    animation: statusShimmer 3s ease-in-out infinite;
}
@keyframes statusShimmer {
    0%, 100% { left: -100%; }
    50% { left: 150%; }
}

@media (max-width: 640px) {
    .how-card { padding: 20px 16px; }
    .section > div[style*="grid-template-columns:repeat(3"] {
        grid-template-columns: 1fr !important;
    }
}

/* Fix flash overlay */
.flash-wrap {
    position: fixed;
    top: 72px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    width: 90%;
    max-width: 500px;
}
.flash {
    animation: flashIn .3s ease, flashOut .3s ease 3s forwards;
}
@keyframes flashOut {
    to { opacity: 0; transform: translateY(-8px); pointer-events: none; }
}

/* Clickable card as <a> */
a.game-card {
    display: flex;
    flex-direction: column;
    cursor: pointer;
}
a.game-card:hover { color: inherit; }

/* ========== GAME DETAIL MODAL ========== */

.gm-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.7);
    backdrop-filter: blur(8px);
    z-index: 500;
    justify-content: center;
    align-items: flex-start;
    padding: 60px 16px 40px;
    overflow-y: auto;
}
.gm-overlay.open { display: flex; }

.gm-panel {
    background: var(--bg-elevated);
    border: 1px solid var(--border-gold);
    border-radius: 0;
    max-width: 520px;
    width: 100%;
    overflow: hidden;
    position: relative;
    animation: modalSlideUp .35s ease;
    box-shadow: 0 24px 80px rgba(0,0,0,.5);
}
@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(30px) scale(.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.gm-close {
    position: absolute; top: 14px; right: 14px;
    z-index: 10;
    width: 36px; height: 36px;
    border-radius: 0;
    border: none;
    background: rgba(0,0,0,.5);
    backdrop-filter: blur(8px);
    color: var(--text-muted);
    font-size: .95rem;
    cursor: pointer;
    transition: all .2s;
    display: grid; place-items: center;
}
.gm-close:hover { background: rgba(199,72,72,.3); color: #fff; }

.gm-cover {
    width: 100%;
    background: linear-gradient(135deg, #20150d, #150e08);
    background-size: cover;
    background-position: center;
    position: relative;
}
.gm-cover-has::after {
    content: '';
    position: absolute; bottom: 0; left: 0; right: 0;
    height: 50%;
    background: linear-gradient(transparent, var(--bg-elevated));
}

.gm-content { padding: 24px 28px 28px; }

.gm-header { margin-bottom: 16px; }
.gm-title {
    font-family: 'AugustaTwo', serif;
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--text-bright);
    margin-bottom: 10px;
    line-height: 1.2;
}
.gm-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.gm-badge {
    padding: 4px 12px;
    border-radius: 0;
    font-size: .8rem;
    font-weight: 600;
    background: rgba(0,0,0,.3);
    border: 1px solid rgba(255,255,255,.1);
}

.gm-desc {
    font-size: .95rem;
    line-height: 1.7;
    color: var(--text);
    margin-bottom: 20px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 4px;
    white-space: pre-line;
}
.gm-desc::-webkit-scrollbar { width: 4px; }
.gm-desc::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.gm-info {
    display: flex; flex-direction: column; gap: 6px;
    margin-bottom: 16px;
}
.gm-info-row {
    display: flex; align-items: center; gap: 12px;
    font-size: .9rem;
    color: var(--text);
    padding: 6px 0;
}
.gm-info-row i {
    width: 16px; text-align: center;
    color: var(--gold-dim);
    font-size: .82rem;
}

.gm-slots-bar {
    height: 5px;
    background: rgba(255,255,255,.06);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 20px;
}
.gm-slots-fill {
    height: 100%;
    border-radius: 3px;
    transition: width .4s;
}

.gm-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}
.gm-price { display: flex; align-items: baseline; gap: 4px; }
.gm-price-val {
    font-family: 'AugustaTwo', serif;
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--gold);
}
.gm-price-unit {
    font-size: .85rem;
    color: var(--text-muted);
}

@media (max-width: 640px) {
    .gm-overlay { padding: 20px 10px; }
    .gm-content { padding: 20px; }
    .gm-title { font-size: 1.2rem; }
}

/* ========== CONFIRM MODAL ========== */
.confirm-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.7);
    backdrop-filter: blur(8px);
    z-index: 600;
    justify-content: center;
    align-items: center;
}
.confirm-overlay.open { display: flex; }

.confirm-panel {
    background: var(--bg-elevated);
    border: 1px solid var(--border-gold);
    border-radius: 0;
    padding: 32px;
    max-width: 400px; width: 90%;
    text-align: center;
    animation: confirmIn .3s ease;
    box-shadow: 0 24px 60px rgba(0,0,0,.5);
}
@keyframes confirmIn {
    from { opacity: 0; transform: scale(.92) translateY(12px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.confirm-icon {
    font-size: 2.2rem;
    margin-bottom: 12px;
    filter: drop-shadow(0 0 12px rgba(238,155,58,.3));
}

.confirm-title {
    font-family: 'AugustaTwo', serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 4px;
}

.confirm-game {
    font-family: 'AugustaTwo', serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 16px;
}

.confirm-details {
    display: flex; flex-direction: column; gap: 6px;
    background: rgba(255,255,255,.02);
    border: 1px solid var(--border);
    border-radius: 0;
    padding: 14px 18px;
    margin-bottom: 16px;
    text-align: left;
}
.confirm-row {
    display: flex; align-items: center; gap: 10px;
    font-size: .9rem;
    color: var(--text);
}
.confirm-row i {
    width: 16px; text-align: center;
    color: var(--gold-dim);
    font-size: .8rem;
}

.confirm-price {
    font-family: 'AugustaTwo', serif;
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--gold);
    margin-bottom: 20px;
}

.confirm-actions {
    display: flex; gap: 12px; justify-content: center;
}
.confirm-actions .btn-ghost {
    flex: 1;
    justify-content: center;
    padding: 12px;
}
.confirm-actions .btn-gold {
    flex: 1;
    justify-content: center;
    padding: 12px;
}

/* ========== AVATAR UPLOAD ========== */
.avatar-upload-btn {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 28px;
    background: rgba(0,0,0,.6);
    backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted);
    font-size: .7rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity .25s;
}
.profile-avatar:hover .avatar-upload-btn { opacity: 1; }
#avatarInput { display: none; }

/* Clickable booking title */
a.bk-title:hover { color: var(--gold) !important; }

/* ========== CUSTOM VOICE PLAYER ========== */
.voice-player {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 4px;
    min-width: 160px;
    max-width: 220px;
}
.voice-play {
    width: 32px; height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--gold);
    color: var(--bg-deep);
    font-size: .75rem;
    cursor: pointer;
    display: grid; place-items: center;
    flex-shrink: 0;
    transition: all .2s;
}
.voice-play:hover { background: var(--gold-light); transform: scale(1.08); }
.voice-play.playing { background: var(--accent); }

.voice-wave-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
.voice-wave {
    display: flex;
    align-items: center;
    gap: 1px;
    height: 24px;
    cursor: pointer;
    position: relative;
}
.voice-bar {
    flex: 1;
    border-radius: 1.5px;
    transition: background .15s;
    min-width: 1.5px;
}
.voice-bar.played {
    background: var(--gold);
}
.voice-bar.unplayed {
    background: rgba(255,255,255,.12);
}
.voice-time {
    font-size: .62rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
}

/* ============================================================
   GUILD27 SECTIONS — секционный каркас с guild27.ru:
   рваные края (clip-path #block-bg), перехлёст секций,
   текстурные фоны, светлый блок расписания
   ============================================================ */

/* Хедер в стиле guild27: чёрный, выше, лого навыпуск, sticky вместо fixed */
.guild-nav { position: sticky; background: #000; backdrop-filter: none; border-bottom: none; }
.flash-wrap { top: 104px; }
.nav-inner { height: 88px; max-width: 1280px; }
.nav-brand img { height: 72px; margin-top: 8px; }
.nav-link { font-size: .95rem; font-weight: 400; color: var(--text-muted); padding: 10px 14px; }
.nav-link:hover { color: #F1E6DA; background: none; filter: drop-shadow(0 0 6px rgba(238,155,58,.35)); }
.nav-link.active, .nav-link-active {
    background: radial-gradient(circle at 32% 50%, #EE9B3A 0%, #C4322B 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Секция с рваным краем и перехлёстом */
.g27-block {
    position: relative;
    width: 100%;
    clip-path: url(#block-bg);
    margin-top: -44px;
    padding: 80px 24px 100px;
}
.g27-block:first-child, .g27-block.no-overlap { margin-top: 0; }
.g27-inner { max-width: 1100px; margin: 0 auto; }

/* Тёмная секция с фоновой текстурой */
.g27-dark { background: var(--bg) url('../img/Card-Bg.webp') center / cover no-repeat; }
.g27-dark-plain { background: var(--bg); }
.g27-masters { background: var(--bg) url('../img/MasterBg.webp') center / cover no-repeat; }
.g27-faq { background: var(--bg) url('../img/FAQ-Bg.webp') center / cover no-repeat; }
.g27-cost { background: var(--bg) url('../img/Cost.webp') center / cover no-repeat; }

/* Светлый пергаментный блок (расписание) */
.g27-light {
    background: #E8DCC4 url('../img/CalendareBg.webp') center / cover no-repeat;
    color: #111;
    box-shadow: 0 0 62px 2px rgba(238,155,58,.2);
    z-index: 3;
}
.g27-light .section-title { text-align: left; }
.g27-light .section-sub { color: rgba(17,17,17,.65); text-align: left; margin-bottom: 24px; }

/* Герой с фоновым видео */
.g27-hero {
    position: relative;
    min-height: calc(100vh - 88px);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    padding: 60px 24px;
    z-index: 2;
}
.g27-hero-video {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover; object-position: center;
    z-index: -1;
    pointer-events: none;
}
.g27-hero::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,.25) 0%, rgba(0,0,0,.45) 70%, rgba(11,11,11,.92) 100%);
    z-index: -1;
}
.g27-hero .hero-content { max-width: 760px; }
.g27-hero-logo { height: 120px; margin-bottom: 12px; filter: drop-shadow(0 0 24px rgba(238,155,58,.35)); }

/* Карточка события в стиле guild27 (светлый блок) */
.g27-events {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
    gap: 20px;
    padding: 8px 0;
}
.g27-event {
    display: flex; flex-direction: column;
    background: transparent;
    cursor: pointer;
    transition: transform .16s cubic-bezier(.22,1,.36,1);
}
.g27-event:hover { transform: translateY(-3px); }
.g27-event-img {
    position: relative;
    height: 190px;
    overflow: hidden;
    background: linear-gradient(135deg, #2b1a10 0%, #4a2c14 45%, #1a0f08 100%);
}
.g27-event-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.g27-event-img .no-img {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 2.6rem; opacity: .35;
}
.g27-event-badges {
    position: absolute; top: 8px; left: 8px; right: 8px;
    display: flex; flex-wrap: wrap; gap: 6px;
    z-index: 2;
}
.g27-badge-dark {
    display: inline-flex; align-items: center; gap: 5px;
    height: 28px; padding: 0 10px;
    border-radius: 999px;
    background: rgba(17,17,17,.78);
    color: #f5e8cf;
    font-family: 'Piazzolla', serif; font-weight: 600; font-size: .82rem;
}
.g27-badge-paper {
    display: inline-flex; align-items: center; gap: 5px;
    height: 28px; padding: 0 10px;
    border-radius: 999px;
    background: #f5e8cf;
    color: #111;
    font-family: 'Piazzolla', serif; font-weight: 600; font-size: .85rem;
}
.g27-event-meta {
    position: absolute; left: 8px; right: 8px; bottom: 8px;
    display: flex; align-items: center; gap: 6px;
    z-index: 2;
}
.g27-seats {
    display: inline-flex; align-items: center;
    height: 28px; margin-left: auto; padding: 0 10px;
    border-radius: 999px;
    color: #000;
    font-family: 'Piazzolla', serif; font-weight: 600; font-size: .88rem;
}
.g27-seats.free { background: #B2FA7B; }
.g27-seats.few  { background: #EE9B3A; }
.g27-seats.full { background: #E26F6F; }
.g27-event-title {
    padding: 10px 2px 2px;
    font-family: 'Piazzolla', serif; font-weight: 600;
    font-size: 1.1rem; line-height: 1.1;
    color: #000;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.g27-event-sub {
    padding: 0 2px;
    font-family: 'Piazzolla', serif; font-weight: 200;
    font-size: .82rem; color: #1B1A19;
}

/* Декоративная черта под строкой (тарифы, списки) */
.g27-rule { position: relative; padding-bottom: 14px; }
.g27-rule img { position: absolute; bottom: 0; left: 0; width: 100%; }

/* Шаги "как это работает" в стиле guild27 */
.g27-how {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
}
.g27-how-card { text-align: left; }
.g27-how-card h4 {
    font-family: 'Piazzolla', serif; font-weight: 600;
    font-size: 1.25rem; color: var(--text-bright);
    margin: 0 0 10px;
}
.g27-how-card p {
    font-family: 'Piazzolla', serif; font-weight: 200;
    font-size: .95rem; color: var(--text);
    line-height: 1.45;
    margin: 0 0 14px;
}
.g27-how-num {
    font-family: 'AugustaTwo', serif;
    font-size: 2.6rem; line-height: 1;
    background-image: var(--grad-heading);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block; margin-bottom: 10px;
}
.g27-how-card img.rule { width: 100%; display: block; }

/* Футер guild27: каменная текстура */
.guild-footer {
    border-top: none;
    padding: 0;
    height: 168px;
    background: transparent;
}
.footer-inner {
    max-width: none;
    height: 100%;
    background: #000 url('../img/Footer-Bg.webp') center / cover no-repeat;
    padding: 10px 32px 0;
    font-size: .9rem;
}
.footer-brand { display: inline-flex; align-items: center; gap: 14px; color: var(--text-dim, #D0D0D0); }
.footer-brand img { height: 84px !important; }
.footer-stick { display: inline-block; width: 1px; height: 64px; background: #FC4100; }
.footer-brand-text {
    font-family: 'AugustaTwo', serif; font-size: 1.5rem; line-height: .95; color: #D0D0D0;
}

/* Гоблин для FAQ/пустых состояний */
.g27-goblin { position: absolute; bottom: 0; right: 4%; height: 78%; pointer-events: none; }

@media (max-width: 1023px) {
    .nav-inner { height: 60px; }
    .nav-brand img { height: 48px; margin-top: 4px; }
    .g27-hero { min-height: 70vh; }
    .g27-hero-logo { height: 84px; }
    .g27-block { margin-top: -30px; padding: 56px 16px 72px; }
    .g27-how { grid-template-columns: 1fr; gap: 20px; }
    .g27-goblin { display: none; }
    .guild-footer { height: auto; }
    .footer-inner { padding: 16px; }
}

/* ---- Тёмные карточки в светлом (пергаментном) контексте ---- */
.g27-light .section-title {
    background-image: none;
    -webkit-text-fill-color: #111;
    color: #111;
}
.g27-light .game-card {
    background: transparent;
    border: none;
    box-shadow: none;
}
.g27-light .game-card:hover { border: none; box-shadow: none; transform: translateY(-3px); }
.g27-light .game-card::before { display: none; }
.g27-light .game-card-img::after { display: none; }
.g27-light .game-card-title { color: #000; }
.g27-light .game-card:hover .game-card-title { color: #9A3E00; }
.g27-light .game-card-desc { color: rgba(17,17,17,.7); }
.g27-light .game-card-meta { color: rgba(17,17,17,.75); }
.g27-light .game-card-meta i { color: #9A3E00; }
.g27-light .game-card-footer { border-top: 1px solid rgba(17,17,17,.18); }
.g27-light .game-price { color: #9A3E00; }
.g27-light .game-price::before { background: #9A3E00; }
.g27-light .btn-ghost { border-color: #9A3E00; color: #9A3E00; background: transparent; }
.g27-light .btn-ghost:hover { background: rgba(154,62,0,.08); color: #7a3000; }
.g27-light .badge-booked { background: rgba(17,102,40,.12); color: #1b6a2f; border-color: rgba(17,102,40,.25); }
.g27-light .ornament { color: rgba(17,17,17,.4); }
.g27-light a { color: #9A3E00; }
.g27-light a:hover { color: #7a3000; }

/* ============================================================
   LANDING V2 + PROFILE V2 — авторская сборка в языке guild27
   ============================================================ */

/* --- Hero v2 --- */
.g27-hero .hero-subtitle {
    font-family: 'Piazzolla', serif;
    font-weight: 200; font-style: normal;
    font-size: 1.25rem;
    color: var(--text);
    max-width: 560px;
    margin: 0 auto 40px;
}
.hero-stats2 {
    display: flex; justify-content: center; align-items: center;
    gap: 28px;
    margin-bottom: 44px;
}
.hero-stat2 { text-align: center; }
.hero-stat2-value {
    font-family: 'AugustaTwo', serif;
    font-size: 2.6rem; line-height: 1;
    display: block;
    background-image: var(--grad-heading);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-stat2-label {
    font-family: 'Piazzolla', serif; font-weight: 600;
    font-size: .8rem; letter-spacing: .14em; text-transform: uppercase;
    color: var(--text-muted);
}
.hero-stick { width: 1px; height: 56px; background: #FC4100; }
.hero-scroll {
    position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
    color: var(--gold); font-size: 1.2rem;
    animation: heroScrollNudge 2.2s ease-in-out infinite;
    z-index: 1;
}
@keyframes heroScrollNudge {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: .7; }
    50% { transform: translateX(-50%) translateY(8px); opacity: 1; }
}

/* --- Заголовок секции: строка с действием справа --- */
.sec-head {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 20px; flex-wrap: wrap;
    margin-bottom: 8px;
}
.sec-head .section-title { margin-bottom: 0; text-align: left; }
.sec-link {
    font-family: 'Piazzolla', serif; font-weight: 600;
    font-size: 1rem;
    text-decoration: underline; text-underline-offset: 4px;
}
.g27-light .sec-link { color: #9A3E00; }

/* --- Пустое расписание с гоблином --- */
.g27-empty {
    display: flex; flex-direction: column; align-items: center;
    padding: 30px 20px 10px;
    text-align: center;
}
.g27-empty img { height: 180px; margin-bottom: 6px; }
.g27-empty-title { font-family: 'Piazzolla', serif; font-weight: 600; font-size: 1.2rem; color: #111; margin-bottom: 6px; }
.g27-empty-sub { font-family: 'Piazzolla', serif; font-weight: 200; font-size: .95rem; color: rgba(17,17,17,.65); margin-bottom: 18px; }

/* --- Путь искателя (шаги) v2 --- */
.g27-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; }
.g27-step { position: relative; padding-top: 6px; }
.g27-step-num {
    display: inline-grid; place-items: center;
    width: 64px; height: 64px;
    border-radius: 50%;
    border: 1px solid rgba(238,155,58,.5);
    background: rgba(11,11,11,.6);
    font-family: 'AugustaTwo', serif;
    font-size: 2rem; line-height: 1;
    color: var(--gold);
    box-shadow: 0 0 30px rgba(238,155,58,.15);
    margin-bottom: 18px;
}
.g27-step h4 {
    font-family: 'Piazzolla', serif; font-weight: 600;
    font-size: 1.3rem; color: var(--text-bright);
    margin: 0 0 10px;
}
.g27-step p {
    font-family: 'Piazzolla', serif; font-weight: 200;
    font-size: 1rem; line-height: 1.5;
    color: var(--text);
    margin: 0 0 16px;
}
.g27-step img.rule { width: 100%; display: block; }

/* --- Мастера на главной --- */
.g27-masters-row {
    display: flex; flex-wrap: wrap; justify-content: center;
    gap: 24px;
    margin-bottom: 36px;
}

/* --- FAQ --- */
.g27-faq-block { position: relative; overflow: hidden; }
.g27-faq-list { max-width: 780px; display: flex; flex-direction: column; gap: 18px; position: relative; z-index: 2; }
.faq-item { border: 0; background: transparent; padding: 0; text-align: left; cursor: pointer; width: 100%; overflow: hidden; }
.faq-q {
    position: relative;
    font-family: 'Piazzolla', serif; font-weight: 600;
    font-size: 1.25rem; line-height: 1.15;
    color: var(--text-bright);
    padding-right: 56px;
    margin: 0 0 14px;
}
.faq-plus {
    position: absolute; right: 8px; top: -2px;
    width: 26px; height: 26px;
    transition: transform .24s cubic-bezier(.22,1,.36,1);
}
.faq-item.is-open .faq-plus { transform: rotate(45deg); }
.faq-a {
    font-family: 'Piazzolla', serif; font-weight: 200;
    font-size: 1rem; line-height: 1.45;
    color: var(--text);
    max-height: 0; opacity: 0; overflow: hidden;
    transform: translateY(-6px);
    transition: opacity .24s, transform .24s, max-height .3s;
    margin: 0;
}
.faq-item.is-open .faq-a { max-height: 300px; opacity: 1; transform: translateY(0); margin-bottom: 14px; }
.faq-a a { color: #FF7C22; }
.faq-rule { width: 100%; display: block; }
.g27-faq-goblin {
    position: absolute; bottom: 0; right: 2%;
    height: 86%;
    pointer-events: none;
    z-index: 1;
}

/* --- Финальный призыв --- */
.g27-cta {
    position: relative;
    display: flex; flex-direction: column; align-items: center; text-align: center;
    padding: 90px 24px 110px;
}
.g27-cta .section-title { margin-bottom: 10px; }
.g27-cta p {
    font-family: 'Piazzolla', serif; font-weight: 200;
    font-size: 1.1rem; color: var(--text);
    max-width: 520px;
    margin: 0 0 30px;
}

/* ============ PROFILE V2 — лист персонажа ============ */
.pf-wrap { max-width: 980px; margin: 0 auto; padding: 56px 24px 90px; }

.pf-sheet {
    position: relative;
    background: var(--bg) url('../img/Card-Bg.webp') center / cover no-repeat;
    border: 1px solid rgba(238,155,58,.25);
    box-shadow: 0 0 62px 2px rgba(238,155,58,.12);
    padding: 36px;
    margin-bottom: 28px;
    overflow: hidden;
}
.pf-head { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.pf-avatar {
    position: relative;
    width: 128px; height: 128px; flex: 0 0 128px;
    border: 1px solid rgba(238,155,58,.5);
    box-shadow: 0 0 30px rgba(238,155,58,.2);
    overflow: hidden;
    background: linear-gradient(160deg, #3a2517 0%, #1c110a 70%);
    display: grid; place-items: center;
    font-size: 3rem;
}
.pf-avatar img.pf-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pf-avatar .avatar-upload-btn { z-index: 2; }
.pf-id { flex: 1 1 auto; min-width: 200px; }
.pf-name {
    font-family: 'AugustaTwo', serif;
    font-size: 2.4rem; line-height: 1;
    color: var(--text-bright);
    margin-bottom: 6px;
}
.pf-mail { font-family: 'Piazzolla', serif; font-weight: 200; font-size: .95rem; color: var(--text-muted); margin-bottom: 12px; }
.pf-rank {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 16px;
    border: 1px solid rgba(238,155,58,.45);
    border-radius: 999px;
    background: rgba(238,155,58,.08);
    font-family: 'Piazzolla', serif; font-weight: 600;
    font-size: .92rem; color: var(--gold-light);
}
.pf-gold { text-align: center; }
.pf-gold-value {
    display: block;
    font-family: 'AugustaTwo', serif;
    font-size: 3rem; line-height: 1;
    background-image: var(--grad-heading);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.pf-gold-value a { color: inherit; text-decoration: none; -webkit-text-fill-color: inherit; }
.pf-gold-label { font-family: 'Piazzolla', serif; font-weight: 600; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); }

.pf-stats {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 30px 0 26px;
}
.pf-stat { text-align: center; padding-bottom: 12px; position: relative; }
.pf-stat img { position: absolute; bottom: 0; left: 0; width: 100%; }
.pf-stat-value { font-family: 'AugustaTwo', serif; font-size: 1.9rem; line-height: 1; color: var(--text-bright); display: block; margin-bottom: 4px; }
.pf-stat-value a { color: inherit; text-decoration: none; }
.pf-stat-label { font-family: 'Piazzolla', serif; font-weight: 600; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); }

.pf-progress { margin-bottom: 4px; }
.pf-progress-head { display: flex; justify-content: space-between; font-family: 'Piazzolla', serif; font-size: .92rem; margin-bottom: 8px; }
.pf-progress-track { height: 7px; background: rgba(255,255,255,.08); overflow: hidden; }
.pf-progress-fill { height: 100%; background: var(--grad-btn); transition: width 1.2s ease; }
.pf-progress-hint { text-align: right; font-family: 'Piazzolla', serif; font-weight: 200; font-size: .8rem; color: var(--text-muted); margin-top: 5px; }

.pf-ach { margin-top: 20px; }
.pf-ach-title { font-family: 'Piazzolla', serif; font-weight: 600; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }

.pf-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.pf-panel { background: var(--bg-card); border: 1px solid var(--border); }
.pf-panel-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px 12px;
    font-family: 'AugustaTwo', serif;
    font-size: 1.15rem;
    color: var(--gold);
    border-bottom: 1px solid rgba(238,155,58,.2);
}
.pf-panel-header a { font-family: 'Piazzolla', serif; font-weight: 600; font-size: .82rem; }

@media (max-width: 860px) {
    .g27-steps { grid-template-columns: 1fr; gap: 26px; }
    .pf-panels { grid-template-columns: 1fr; }
    .pf-head { justify-content: center; text-align: center; }
    .pf-stats { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .g27-faq-goblin { display: none; }
    .hero-stats2 { gap: 18px; }
    .hero-stat2-value { font-size: 2rem; }
}

/* ============================================================
   ЕДИНАЯ ШАПКА GUILD27 (header.siteHeader) — копия стилей
   лендинга (sections/header.css), чтобы внутренние страницы
   выглядели один в один. На лендинге эти же классы стилизует
   его собственный main.css — правила совпадают.
   ============================================================ */
header.siteHeader {
    background-color: #000000;
    display: flex;
    justify-content: center;
    height: 96px;
    position: sticky;
    top: 0;
    z-index: 100;
}
header.siteHeader .navbar {
    height: 96px;
    color: snow;
    width: 1280px;
    display: flex;
    justify-content: space-between;
    z-index: 1;
    padding-left: 0;
    padding-right: 0;
}
header.siteHeader .centerheader { width: 78px; }
header.siteHeader .logo { height: 117px !important; position: absolute; top: 0; }
header.siteHeader .logoLink {
    display: inline-flex; align-items: center; justify-content: center; height: 100%;
    position: relative;
}
header.siteHeader .logoLink:focus-visible { outline: 2px solid #EE9B3A; outline-offset: 6px; }
header.siteHeader .headerBrandText { display: none; }
header.siteHeader .headerBurger { display: none; }
header.siteHeader .headerSpacer { display: block; }
header.siteHeader .headercont {
    display: flex; justify-content: center; align-items: center; gap: 24px;
}
header.siteHeader .Burgermenugate { display: none; }
header.siteHeader .headertabs {
    color: #D0C1B3;
    cursor: pointer;
    transition: transform .16s cubic-bezier(.22,1,.36,1), color .24s, filter .24s;
    user-select: none;
    height: 100%;
    padding-top: 32px;
    box-sizing: border-box;
    font-family: 'Piazzolla', serif;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    white-space: nowrap;
}
header.siteHeader .headertabs:hover {
    color: #F1E6DA;
    filter: drop-shadow(0 0 6px rgba(238,155,58,.35));
    transform: translateY(-1px);
}
header.siteHeader .headertabs:active { transform: translateY(1px) scale(.98); }
header.siteHeader .headertabs--cta {
    background: radial-gradient(circle at 32% 50%, #EE9B3A 0%, #C4322B 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
header.siteHeader .headertabs--cta:hover { filter: drop-shadow(0 0 6px rgba(238,155,58,.45)); }
header.siteHeader .headertabs--muted { opacity: .55; }
header.siteHeader .headertabs--muted:hover { opacity: 1; }
header.siteHeader .welcomeSocials { display: none; }

@media (max-width: 1023px) {
    header.siteHeader { height: 60px; padding-top: env(safe-area-inset-top); }
    header.siteHeader .navbar {
        height: 60px; width: 100%;
        justify-content: start; gap: 12px;
        align-items: center;
        padding-left: max(15px, env(safe-area-inset-left));
        padding-right: max(15px, env(safe-area-inset-right));
    }
    header.siteHeader .centerheader { width: auto; position: relative; gap: 12px; }
    header.siteHeader .headerSpacer { display: none; }
    header.siteHeader .logo { width: 54px; height: 82px !important; position: absolute; top: 0; left: 0; }
    header.siteHeader .logoLink {
        position: relative; flex: 0 0 54px; width: 54px; height: 60px;
        align-items: center; justify-content: flex-start;
        min-height: 44px; min-width: 44px; overflow: visible;
    }
    header.siteHeader .headerBrandText {
        display: inline-block;
        font-family: 'AugustaTwo', serif;
        font-size: 23px; line-height: 1;
        color: #D0D0D0;
    }
    header.siteHeader .headerBurger {
        min-width: 44px; min-height: 44px; width: 44px; height: 44px;
        border-radius: 10px;
        display: inline-flex; flex-direction: column;
        align-items: center; justify-content: center; gap: 4px;
        border: 0; background: transparent;
        color: #E56211; cursor: pointer;
        margin-left: auto;
    }
    header.siteHeader .headerBurger-line {
        height: 2px; border-radius: 999px; background: currentColor;
        transform-origin: center;
        transition: transform .16s, opacity .16s, width .16s;
    }
    header.siteHeader .headerBurger-line:nth-child(1) { width: 15.5px; }
    header.siteHeader .headerBurger-line:nth-child(2) { width: 19.5px; }
    header.siteHeader .headerBurger-line:nth-child(3) { width: 15.5px; }
    header.siteHeader.is-menu-open .headerBurger-line:nth-child(1) { width: 19.5px; transform: translateY(6px) rotate(45deg); }
    header.siteHeader.is-menu-open .headerBurger-line:nth-child(2) { opacity: 0; }
    header.siteHeader.is-menu-open .headerBurger-line:nth-child(3) { width: 19.5px; transform: translateY(-6px) rotate(-45deg); }
    header.siteHeader .headercont.socialmedia {
        position: fixed; left: 0; right: 0;
        top: calc(60px + env(safe-area-inset-top)); bottom: 0;
        display: flex; flex-direction: column;
        align-items: stretch; justify-content: flex-start;
        gap: 0;
        padding: 50px max(15px, env(safe-area-inset-right)) 24px max(15px, env(safe-area-inset-left));
        background-color: rgba(0,0,0,.97);
        background-image: url(/img/burgermenuBack.webp);
        background-size: cover;
        transform: translateY(-12px);
        opacity: 0;
        pointer-events: none;
        transition: transform .24s, opacity .24s;
        overflow-y: auto;
        z-index: -1;
    }
    header.siteHeader.is-menu-open .headercont.socialmedia {
        transform: translateY(0); opacity: 1; pointer-events: auto;
    }
    header.siteHeader .headertabs {
        min-height: 44px; height: auto;
        display: flex; justify-content: center; align-items: center;
        padding: 10px 2px;
        border-bottom: 1px solid rgba(208,193,179,.18);
        font-size: 24px;
    }
    header.siteHeader .Burgermenugate {
        display: flex; position: relative; width: 100%;
        align-items: center; justify-content: center;
        margin-top: 90px; margin-bottom: 30px;
    }
    header.siteHeader .gatetext {
        font-size: 20px;
        font-family: 'Piazzolla', serif; font-weight: 600;
        color: #D0C1B3;
    }
    header.siteHeader .Burgermenugate img {
        position: absolute; width: 100%; height: unset !important;
        top: 50%; transform: translateY(-50%);
    }
    header.siteHeader .welcomeSocials { display: flex; justify-content: center; gap: 10px; }
    header.siteHeader .welcomeSocial { width: 52px; height: 52px; }
    header.siteHeader .welcomeSocial img { width: 100%; height: 100%; }
}

/* ============ Врата гильдии: вход и регистрация ============ */
.gate-wrap { min-height: calc(100vh - 96px - 188px); display: grid; place-items: center; padding: 40px clamp(15px, 4vw, 24px); box-sizing: border-box; }
.gate-panel { width: min(474px, 100%); padding: clamp(28px, 5vw, 48px) clamp(20px, 4vw, 42px); box-sizing: border-box; background: #100706 url('/img/Sign-Bg.webp') center / cover no-repeat; box-shadow: 0 4px 20px 0 rgba(240,97,16,.4); }
.gate-logo { display: flex; justify-content: center; margin-bottom: 18px; }
.gate-logo img { height: 88px; }
.gate-title { margin: 0 0 10px; font-family: 'AugustaTwo', serif; font-weight: 400; font-size: 40px; line-height: 1; text-align: center; background-image: var(--grad-heading); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.gate-lead { margin: 0 0 28px; font-weight: 200; line-height: 1.4; text-align: center; color: var(--text); }
.gate-form { display: grid; gap: 16px; }
.gate-form input { height: 44px; border: 1px solid #7B7B7B; border-radius: 0; background: #100807; color: #E7D7C7; padding: 0 12px; font-size: 20px; font-family: 'Piazzolla', serif; font-weight: 500; width: 100%; box-sizing: border-box; }
.gate-form input::placeholder { color: rgba(231,215,199,.6); }
.gate-form input:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.gate-form input.is-invalid { border-color: var(--danger); }
.gate-form .btn-gold { margin: 8px auto 0; min-width: 220px; }
.gate-label { display: grid; gap: 6px; font-family: 'Piazzolla', serif; font-weight: 600; font-size: 14px; color: var(--text-muted); }
.gate-label i { font-style: normal; color: #E56211; }
.gate-hint { font-weight: 200; font-size: 13px; color: var(--text-muted); }
.gate-error { font-weight: 500; font-size: 13px; color: var(--danger); }
.gate-note { background: rgba(125,220,116,.08); border: 1px solid rgba(125,220,116,.25); padding: 12px 16px; margin-bottom: 18px; font-size: .9rem; color: var(--success); }
.gate-divider { margin: 24px 0; position: relative; display: flex; justify-content: center; align-items: center; }
.gate-divider img { width: 100%; display: block; }
.gate-divider span { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-weight: 500; font-size: 18px; color: #f1e8dc; padding: 0 14px; }
.gate-footer { text-align: center; font-size: .95rem; color: var(--text-muted); }
.gate-footer a { color: var(--gold); }
.gate-footer a:hover { color: var(--gold-light); }

/* ============ Единый футер guild27 (g27Footer) ============ */
footer.g27Footer { height: 188px; background: transparent; }
footer.g27Footer .footerdiv {
    display: flex; justify-content: space-between; align-items: center;
    position: relative;
    background-image: url('/img/Footer-Bg.webp');
    background-size: cover;
    width: 100%; height: 100%;
    padding-inline: 26px; padding-top: 10px;
    box-sizing: border-box;
}
footer.g27Footer .welcomeLogo {
    display: flex; gap: 12px; align-items: center;
    color: #D0D0D0;
    font-family: 'AugustaTwo', serif;
    font-size: 36px; line-height: .9;
}
footer.g27Footer .welcomeLogo img { height: 120px; }
footer.g27Footer .vertStick { display: inline-block; height: 71px; width: 1px; background-color: #FC4100; }
footer.g27Footer .welcomeSocials { display: flex; align-items: center; gap: 8px; }
footer.g27Footer .welcomeSocial {
    width: 60px; height: 60px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    text-decoration: none;
    transition: transform .16s cubic-bezier(.22,1,.36,1), filter .16s;
}
footer.g27Footer .welcomeSocial img { width: 100%; height: 100%; display: block; }
footer.g27Footer .welcomeSocial:hover { transform: translateY(-3px) scale(1.04); filter: drop-shadow(0 0 8px rgba(238,155,58,.35)); }
@media (max-width: 1023px) {
    footer.g27Footer { display: none; }
}

/* ============ Прижатый футер: main растягивается, футер всегда внизу ============ */
body { display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; }
footer.g27Footer { flex-shrink: 0; }

/* Секции-пергаменты тянутся до футера (вместо черноты).
   Модалки в конце main — не в счёт, растим только контентные блоки. */
body > main { display: flex; flex-direction: column; }
body > main > * { flex-shrink: 0; }
body > main > .g27-block,
body > main > .cal-light,
body > main > .gate-wrap,
body > main > .blogWrap,
body > main > .pf-wrap { flex-grow: 1; }

/* ===== Посты: площадь гильдии + стены (ps-*) ===== */
.ps-card { border: 1px solid rgba(238,155,58,.25); background: rgba(255,255,255,.02); padding: 20px; }
.ps-hidden {
    border: 1px dashed rgba(123,123,123,.4); background: rgba(123,123,123,.05);
    padding: 22px 20px; display: flex; align-items: center; gap: 12px;
}
.ps-hidden p { margin: 0; font-weight: 200; font-style: italic; font-size: 15px; color: var(--text-muted); }
.ps-row { display: flex; align-items: flex-start; gap: 12px; }
.ps-ava {
    width: 44px; height: 44px; flex: 0 0 44px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid rgba(238,155,58,.35);
    background: rgba(255,255,255,.03);
    font-family: 'AugustaTwo', serif; font-size: 19px; color: #E6701F;
    text-decoration: none;
}
.ps-ava.master { background: rgba(238,155,58,.14); }
.ps-ava:hover { color: var(--gold); }
.ps-main { flex: 1; min-width: 0; }
.ps-meta { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.ps-name { font-weight: 600; font-size: 16px; color: var(--text); text-decoration: none; }
.ps-name:hover { color: var(--gold); }
.ps-master-pill {
    display: inline-flex; align-items: center; gap: 5px;
    height: 22px; padding: 0 10px; border-radius: 999px;
    background: var(--grad-btn); color: #000;
    font-weight: 700; font-size: 11px;
}
.ps-rank-pill {
    display: inline-flex; align-items: center;
    height: 22px; padding: 0 10px; border-radius: 999px;
    border: 1px solid rgba(238,155,58,.5); background: rgba(11,11,11,.6);
    font-weight: 600; font-size: 11px; color: #E6701F;
}
.ps-date { font-weight: 200; font-size: 13px; color: var(--text-muted); }
.ps-text { margin: 8px 0 0; font-weight: 500; font-size: 16px; line-height: 1.55; color: var(--text); white-space: pre-line; overflow-wrap: break-word; }
.ps-actions { display: flex; align-items: center; gap: 20px; margin-top: 13px; }
.ps-actions button {
    display: inline-flex; align-items: center; gap: 7px;
    border: 0; background: transparent; padding: 0; cursor: pointer;
    font-family: 'Piazzolla', serif; font-weight: 600; font-size: 14px;
    color: var(--text-muted);
    transition: color .16s;
}
.ps-actions button:hover { color: var(--gold); }
.ps-like svg path { fill: none; transition: fill .16s; }
.ps-like.liked { color: #E6701F; }
.ps-like.liked svg path { fill: var(--gold); }
.ps-report { margin-left: auto; color: rgba(123,123,123,.8) !important; }
.ps-report:hover { color: var(--danger) !important; }
.ps-thread { display: none; margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(238,155,58,.18); flex-direction: column; gap: 14px; }
.ps-thread.open { display: flex; }
.ps-t-item { display: flex; align-items: flex-start; gap: 10px; }
.ps-t-ava {
    width: 32px; height: 32px; flex: 0 0 32px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid rgba(238,155,58,.3); background: rgba(255,255,255,.03);
    font-family: 'AugustaTwo', serif; font-size: 14px; color: #E6701F;
}
.ps-t-main { min-width: 0; }
.ps-t-meta { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ps-t-meta .nm { font-weight: 600; font-size: 14px; color: var(--text); }
.ps-t-meta .dt { font-weight: 200; font-size: 12px; color: var(--text-muted); }
.ps-t-text { margin: 3px 0 0; font-weight: 500; font-size: 14px; line-height: 1.5; color: var(--text); overflow-wrap: break-word; }
.ps-t-form { display: flex; gap: 10px; }
.ps-t-form input {
    flex: 1; min-width: 0; height: 40px;
    border: 1px solid #7B7B7B; border-radius: 0;
    background: #100807; color: #E7D7C7;
    padding: 0 12px; font-size: 15px;
    font-family: 'Piazzolla', serif; font-weight: 500;
}
.ps-t-form button {
    height: 40px; padding: 0 18px; border: 0;
    background: var(--grad-btn); color: #000;
    cursor: pointer; font-family: 'Piazzolla', serif; font-weight: 700; font-size: 14px;
}
.ps-composer {
    border: 1px solid rgba(238,155,58,.3); background: rgba(255,255,255,.02);
    padding: 18px; display: flex; align-items: flex-start; gap: 12px;
}
.ps-composer .ava {
    width: 44px; height: 44px; flex: 0 0 44px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid rgba(238,155,58,.4); background: rgba(238,155,58,.1);
    font-family: 'AugustaTwo', serif; font-size: 19px; color: #E6701F;
}
.ps-composer .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.ps-composer textarea {
    border: 1px solid #7B7B7B; border-radius: 0;
    background: #100807; color: #E7D7C7;
    padding: 10px 14px; font-size: 16px;
    font-family: 'Piazzolla', serif; font-weight: 500;
    resize: vertical; width: 100%; box-sizing: border-box;
}
.ps-composer .foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ps-composer .counter { font-weight: 200; font-size: 13px; color: var(--text-muted); }
.ps-composer .counter.warn { color: var(--danger); }
.ps-login-note {
    border: 1px solid rgba(238,155,58,.3); background: rgba(255,255,255,.02);
    padding: 18px 20px;
    font-weight: 500; font-size: 16px; color: var(--text-muted);
}
.ps-login-note a { color: var(--gold); text-decoration: underline; }
.ps-empty {
    margin: 0; padding: 36px 20px; text-align: center;
    font-weight: 200; font-style: italic; font-size: 17px; color: var(--text-muted);
    border: 1px dashed rgba(238,155,58,.25);
}
.ps-more {
    margin: 26px auto 0; display: block;
    border: 1px solid rgba(238,155,58,.4); background: transparent;
    color: #E6701F;
    font-family: 'AugustaTwo', serif; font-size: 21px; line-height: 1;
    padding: 13px 34px; cursor: pointer; text-decoration: none;
    transition: border-color .16s, transform .16s;
}
.ps-more:hover { border-color: var(--gold); color: #E6701F; transform: translateY(-2px); }
.ps-toast {
    position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
    z-index: 200; display: none;
    background: #1a0f08; border: 1px solid var(--gold);
    box-shadow: 0 4px 20px 0 rgba(240,97,16,.4);
    padding: 14px 24px;
    font-family: 'Piazzolla', serif; font-weight: 500; font-size: 15px; color: var(--text);
    max-width: min(480px, calc(100vw - 40px));
    animation: fadeUp .24s ease;
}
.ps-toast.show { display: block; }

/* ===== Кабинет игрока v2 (pf2-*) — вынесено из profile.html, используется и публичным профилем ===== */
/* ===== Кабинет игрока v2 — вид из дизайн-системы ===== */
.pf2-wrap {
    width: min(1180px, 100%);
    margin: 0 auto;
    padding: clamp(24px, 4vw, 56px) clamp(15px, 3vw, 24px);
    box-sizing: border-box;
    display: flex; flex-direction: column; align-items: center; gap: 26px;
}

/* --- Верхняя панель на пергаменте --- */
.pf2-sheet {
    width: 100%;
    position: relative;
    background: #100706 url('/img/Sign-Bg.webp') center / cover no-repeat;
    box-shadow: 0 0 62px 2px rgba(238,155,58,.2);
    padding: clamp(24px, 4vw, 48px);
    box-sizing: border-box;
}
.pf2-head { display: flex; flex-wrap: wrap; gap: 24px 32px; align-items: flex-start; }
.pf2-avatar {
    position: relative;
    width: 148px; height: 148px; flex: 0 0 148px;
    border: 1px solid rgba(238,155,58,.45);
    background: rgba(0,0,0,.55);
    display: flex; align-items: center; justify-content: center;
    font-family: 'AugustaTwo', serif;
    font-size: 56px; line-height: 1;
    background-image: var(--grad-heading);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    overflow: hidden;
}
.pf2-avatar img.pf2-photo {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.pf2-avatar .avatar-upload-btn { z-index: 2; -webkit-text-fill-color: var(--text-muted); font-family: 'Piazzolla', serif; }
.pf2-id { flex: 1 1 260px; min-width: 220px; display: flex; flex-direction: column; gap: 8px; }
.pf2-name {
    margin: 0;
    font-family: 'AugustaTwo', serif; font-weight: 400;
    font-size: clamp(34px, 5vw, 48px); line-height: 1;
    background-image: var(--grad-heading);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.pf2-mail { margin: 0; font-weight: 200; font-size: 17px; color: var(--text-muted); }
.pf2-rank {
    align-self: flex-start;
    display: inline-flex; align-items: center; gap: 8px;
    height: 36px; padding: 0 16px;
    border-radius: 999px;
    border: 1px solid rgba(238,155,58,.55);
    background: rgba(11,11,11,.6);
    font-weight: 600; font-size: 15px;
    color: #E6701F;
}
.pf2-gold { display: flex; flex-direction: column; align-items: flex-end; min-width: 120px; margin-left: auto; }
.pf2-gold-value {
    font-family: 'AugustaTwo', serif;
    font-size: 62px; line-height: 1;
    background-image: var(--grad-heading);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.pf2-gold-value a { color: inherit; text-decoration: none; -webkit-text-fill-color: inherit; }
.pf2-gold-label { font-weight: 600; font-size: 15px; letter-spacing: .22em; text-transform: uppercase; color: var(--text-muted); }

/* --- Статистика --- */
.pf2-stats {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-top: clamp(24px, 3vw, 40px);
}
.pf2-stat { display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; padding-bottom: 18px; }
.pf2-stat-value { font-family: 'AugustaTwo', serif; font-size: 46px; line-height: 1; color: var(--text); }
.pf2-stat-value a { color: inherit; text-decoration: none; }
.pf2-stat-label { font-weight: 600; font-size: 14px; letter-spacing: .18em; text-transform: uppercase; color: var(--text-muted); text-align: center; }
.pf2-stat img { position: absolute; bottom: 0; left: 10%; width: 80%; opacity: .7; }

/* --- Прогресс ранга --- */
.pf2-progress { margin-top: clamp(20px, 3vw, 32px); }
.pf2-progress-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 10px; }
.pf2-progress-head .to { font-weight: 500; font-size: 17px; color: var(--text); }
.pf2-progress-head .to b { font-weight: 600; color: #E6701F; }
.pf2-progress-head .pct { font-weight: 600; font-size: 17px; color: #E6701F; }
.pf2-track { height: 8px; background: rgba(238,155,58,.14); overflow: hidden; }
.pf2-fill { height: 100%; background: var(--grad-btn); box-shadow: 0 0 12px rgba(238,155,58,.5); transition: width .42s cubic-bezier(.22,1,.36,1); }
.pf2-remain { display: flex; justify-content: flex-end; margin-top: 8px; font-weight: 200; font-size: 14px; color: var(--text-muted); }
.pf2-maxrank { text-align: center; font-family: 'AugustaTwo', serif; font-size: 20px; color: var(--gold); margin-top: clamp(20px, 3vw, 32px); }

/* --- Достижения --- */
.pf2-ach { margin-top: 22px; }
.pf2-ach-title { font-weight: 600; font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }

/* --- Панели записей и золота --- */
.pf2-panels {
    width: 100%;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 26px; align-items: stretch;
}
.pf2-panel {
    border: 1px solid rgba(238,155,58,.25);
    background: rgba(255,255,255,.02);
    display: flex; flex-direction: column;
}
.pf2-panel-head {
    display: flex; justify-content: space-between; align-items: center; gap: 16px;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(238,155,58,.2);
}
.pf2-panel-head h2 {
    margin: 0;
    font-family: 'AugustaTwo', serif; font-weight: 400;
    font-size: 26px; line-height: 1;
    background-image: var(--grad-heading);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.pf2-panel-head a { font-weight: 600; font-size: 15px; color: var(--glow-link, #FF7C22); }
.pf2-panel-head a:hover { color: var(--gold); }
.pf2-list { display: flex; flex-direction: column; padding: 8px 22px 18px; }
.pf2-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid rgba(238,155,58,.14); }
.pf2-row:last-child { border-bottom: none; }
.pf2-date { display: flex; flex-direction: column; align-items: center; min-width: 52px; }
.pf2-date b { font-weight: 700; font-size: 26px; line-height: 1; color: var(--text); }
.pf2-date span { font-weight: 200; font-size: 12px; color: var(--text-muted); }
.pf2-row-main { flex: 1; min-width: 0; }
.pf2-row-title { margin: 0; font-weight: 600; font-size: 16px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf2-row-meta { margin: 2px 0 0; font-weight: 200; font-size: 13px; color: var(--text-muted); }
.pf2-pill { flex: 0 0 auto; display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; border: 1px solid; font-weight: 600; font-size: 12px; }
.pf2-tx { display: flex; align-items: baseline; gap: 14px; padding: 13px 0; border-bottom: 1px solid rgba(238,155,58,.14); }
.pf2-tx:last-child { border-bottom: none; }
.pf2-tx-date { flex: 0 0 76px; font-weight: 200; font-size: 13px; color: var(--text-muted); }
.pf2-tx-name { flex: 1; font-weight: 500; font-size: 15px; color: var(--text); }
.pf2-tx-amount { font-weight: 700; font-size: 16px; }
.pf2-empty { flex: 1; display: flex; align-items: center; justify-content: center; padding: 44px 28px; }
.pf2-empty p { margin: 0; font-weight: 200; font-style: italic; font-size: 19px; line-height: 1.5; text-align: center; color: var(--text); }

/* --- Кнопки --- */
.pf2-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 20px; margin-top: 10px; }

/* ===== Друзья / заявки / ЧС (fr-*) ===== */
.fr-label { margin: 0 0 12px; font-weight: 600; font-size: 14px; letter-spacing: .16em; text-transform: uppercase; color: var(--text-muted); }
.fr-label b { color: #E6701F; }
.fr-label i { font-weight: 200; font-size: 12px; letter-spacing: 0; text-transform: none; font-style: italic; }
.fr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.fr-card {
    border: 1px solid rgba(238,155,58,.25); background: rgba(255,255,255,.02);
    padding: 16px 12px;
    display: flex; flex-direction: column; align-items: center; gap: 7px;
    text-align: center; color: inherit; text-decoration: none;
    transition: border-color .16s, transform .16s;
}
a.fr-card:hover { border-color: var(--gold); transform: translateY(-2px); color: inherit; }
.fr-card .ava {
    width: 48px; height: 48px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid rgba(238,155,58,.35); background: rgba(255,255,255,.03);
    font-family: 'AugustaTwo', serif; font-size: 20px; color: #E6701F;
}
.fr-card .nm { margin: 0; font-weight: 600; font-size: 14px; color: var(--text); }
.fr-card .rk {
    display: inline-flex; align-items: center;
    height: 20px; padding: 0 9px; border-radius: 999px;
    border: 1px solid rgba(238,155,58,.5); background: rgba(11,11,11,.6);
    font-weight: 600; font-size: 10px; color: #E6701F;
}
.fr-card .gm { font-weight: 200; font-size: 12px; color: var(--text-muted); }
.fr-req {
    border: 1px solid rgba(238,155,58,.35); background: rgba(238,155,58,.05);
    padding: 14px 16px;
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.fr-req .ava {
    width: 40px; height: 40px; flex: 0 0 40px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid rgba(238,155,58,.35); background: rgba(255,255,255,.03);
    font-family: 'AugustaTwo', serif; font-size: 17px; color: #E6701F;
}
.fr-req .info { flex: 1; min-width: 140px; }
.fr-req .info .nm { margin: 0; font-weight: 600; font-size: 15px; color: var(--text); }
.fr-req .info .rk { margin: 1px 0 0; font-weight: 200; font-size: 12px; color: var(--text-muted); }
.fr-accept {
    height: 36px; padding: 0 16px; border: 0;
    background: var(--grad-btn); color: #000;
    cursor: pointer; font-family: 'Piazzolla', serif; font-weight: 700; font-size: 13px;
}
.fr-decline {
    height: 36px; padding: 0 14px;
    border: 1px solid rgba(123,123,123,.5); background: transparent;
    color: var(--text-muted);
    cursor: pointer; font-family: 'Piazzolla', serif; font-weight: 600; font-size: 13px;
    transition: border-color .16s, color .16s;
}
.fr-decline:hover { border-color: var(--danger); color: var(--danger); }
.fr-bl {
    border: 1px solid rgba(123,123,123,.35); background: rgba(0,0,0,.3);
    padding: 12px 16px;
    display: flex; align-items: center; gap: 12px;
}
.fr-bl .ava {
    width: 36px; height: 36px; flex: 0 0 36px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid rgba(123,123,123,.4); background: rgba(255,255,255,.02);
    font-family: 'AugustaTwo', serif; font-size: 15px; color: var(--text-muted);
}
.fr-bl .nm { flex: 1; min-width: 0; margin: 0; font-weight: 600; font-size: 14px; color: var(--text-muted); }
.fr-bl button {
    height: 34px; padding: 0 14px;
    border: 1px solid rgba(123,123,123,.5); background: transparent;
    color: var(--text-muted);
    cursor: pointer; font-family: 'Piazzolla', serif; font-weight: 600; font-size: 13px;
    transition: border-color .16s, color .16s;
}
.fr-bl button:hover { border-color: var(--gold); color: #E6701F; }
.fr-empty {
    margin: 0; padding: 22px 16px; text-align: center;
    font-weight: 200; font-style: italic; font-size: 15px; color: var(--text-muted);
    border: 1px dashed rgba(238,155,58,.25);
}
/* Кнопки дружбы в чужом профиле */
.fr-actions { display: flex; align-items: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.fr-main-btn {
    display: inline-flex; align-items: center; gap: 8px;
    height: 42px; padding: 0 20px;
    cursor: pointer; border: 0;
    background: var(--grad-btn); color: #000;
    font-family: 'Piazzolla', serif; font-weight: 700; font-size: 14px;
    transition: transform .16s;
}
.fr-main-btn:hover { transform: translateY(-2px); }
.fr-main-btn.requested { background: transparent; border: 1px solid rgba(238,155,58,.4); color: var(--text-muted); }
.fr-main-btn.incoming { background: var(--grad-btn); color: #000; }
.fr-main-btn.friends { background: rgba(238,155,58,.12); border: 1px solid var(--gold); color: #E6701F; }
.fr-block-btn {
    height: 42px; padding: 0 16px;
    cursor: pointer;
    border: 1px solid rgba(123,123,123,.5); background: rgba(0,0,0,.4);
    color: var(--text-muted);
    font-family: 'Piazzolla', serif; font-weight: 600; font-size: 13px;
    transition: border-color .16s, color .16s;
}
.fr-block-btn:hover { border-color: var(--danger); color: var(--danger); }
.fr-block-btn.active { color: var(--danger); border-color: rgba(201,61,61,.6); }

/* ===== Блок друзей: сегменты (по макету «Блок друзей») ===== */
.fr-head {
    display: flex; align-items: center; gap: 14px;
    padding: 16px 22px;
    border-bottom: 1px solid rgba(238,155,58,.25);
    flex-wrap: wrap;
}
.fr-head h2 {
    margin: 0;
    font-family: 'AugustaTwo', serif; font-weight: 400; font-size: 26px; line-height: 1;
    background-image: var(--grad-heading);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.fr-segs { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.fr-seg {
    display: inline-flex; align-items: center; gap: 7px;
    height: 34px; padding: 0 15px; white-space: nowrap;
    cursor: pointer;
    border: 1px solid rgba(238,155,58,.3); background: transparent;
    color: var(--text-muted);
    font-family: 'Piazzolla', serif; font-weight: 600; font-size: 13px;
    transition: border-color .16s, color .16s;
}
.fr-seg:hover { border-color: var(--gold); }
.fr-seg.is-active { border-color: var(--gold); background: rgba(238,155,58,.1); color: #E6701F; }
.fr-seg .cnt {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 19px; height: 19px; padding: 0 5px;
    border-radius: 999px;
    background: rgba(238,155,58,.18); color: #E6701F;
    font-weight: 700; font-size: 11px;
}
.fr-seg .cnt.attn { background: var(--grad-btn); color: #000; }
.fr-body { padding: 22px; }
.fr-pane { display: none; }
.fr-pane.is-active { display: block; }
.fr-big-empty {
    padding: 34px 20px;
    display: flex; flex-direction: column; align-items: center; gap: 14px;
    text-align: center;
}
.fr-big-empty p { margin: 0; font-weight: 200; font-style: italic; font-size: 17px; color: var(--text-muted); }
.fr-bl-hint {
    margin: 0 0 14px;
    display: flex; align-items: center; gap: 8px;
    font-weight: 200; font-style: italic; font-size: 13px; color: var(--text-muted);
}
.fr-bl .dt { margin: 1px 0 0; font-weight: 200; font-size: 12px; color: rgba(123,123,123,.8); }
.fr-bl .ava { filter: grayscale(1); }
.fr-req { border-left: 3px solid var(--gold); }
.fr-card { background: rgba(0,0,0,.3); padding: 18px 14px; }
.fr-card .ava { width: 54px; height: 54px; font-size: 23px; background: rgba(238,155,58,.08); }
.fr-card .rk { gap: 6px; height: 22px; font-size: 11px; }
.fr-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }

/* Метка «в сети» в карточках друзей */
.fr-card .gm .on { color: #7ddc74; font-weight: 600; }

/* ===== Модалка «Позвать за стол» (pfi-*) — кабинет и участники ===== */
.pfi-bg {
    position: fixed; inset: 0; z-index: 120;
    display: none; align-items: center; justify-content: center;
    padding: 24px 16px; box-sizing: border-box;
    background: rgba(5,3,2,.78); overflow-y: auto;
}
.pfi-bg.open { display: flex; }
.pfi-modal {
    position: relative; margin: auto;
    width: min(520px, 100%);
    background: #100706 url('/img/Sign-Bg.webp') center / cover no-repeat;
    box-shadow: 0 4px 30px 0 rgba(240,97,16,.45);
    padding: clamp(24px, 4vw, 36px); box-sizing: border-box;
    color: var(--text);
}
.pfi-modal h3 {
    margin: 0 0 4px;
    font-family: 'AugustaTwo', serif; font-weight: 400; font-size: 28px; line-height: 1;
    background-image: var(--grad-heading);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.pfi-modal .sub { margin: 0 0 14px; font-weight: 200; font-size: 14px; color: var(--text-muted); }
.pfi-x {
    position: absolute; top: 12px; right: 12px;
    width: 28px; height: 28px; border: 0; background: transparent;
    cursor: pointer; padding: 0; color: var(--gold); font-size: 22px; line-height: 1;
}
.pfi-row {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 13px; margin-bottom: 9px;
    border: 1px solid rgba(238,155,58,.3); background: rgba(0,0,0,.3);
}
.pfi-row.seated { opacity: .55; border-color: rgba(238,155,58,.15); background: transparent; }
.pfi-row .ava {
    width: 42px; height: 42px; flex: 0 0 42px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid rgba(238,155,58,.35); background: rgba(255,255,255,.03);
    font-family: 'AugustaTwo', serif; font-size: 18px; color: #E6701F;
}
.pfi-row .info { flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.pfi-row .nm { font-weight: 600; font-size: 15px; color: var(--text); }
.pfi-row .rk {
    display: inline-flex; align-items: center;
    height: 20px; padding: 0 9px; border-radius: 999px;
    border: 1px solid rgba(238,155,58,.5); background: rgba(11,11,11,.6);
    font-weight: 600; font-size: 10px; color: #E6701F; white-space: nowrap;
}
.pfi-btn {
    height: 36px; padding: 0 18px;
    border: 1px solid rgba(238,155,58,.5); background: transparent;
    color: #E6701F; cursor: pointer;
    font-family: 'Piazzolla', serif; font-weight: 700; font-size: 13px; white-space: nowrap;
}
.pfi-btn:hover { border-color: var(--gold); background: rgba(238,155,58,.1); }
.pfi-done {
    height: 36px; padding: 0 16px;
    display: inline-flex; align-items: center;
    border: 1px solid rgba(238,155,58,.25); background: rgba(238,155,58,.06);
    color: var(--text-muted); font-weight: 600; font-size: 13px; white-space: nowrap;
}
.pfi-seated { display: inline-flex; align-items: center; gap: 6px; font-weight: 200; font-style: italic; font-size: 13px; color: var(--text-muted); white-space: nowrap; }
.pfi-note { margin: 14px 0 0; text-align: center; font-weight: 200; font-size: 12px; color: var(--text-muted); }

/* ===== Поиск игроков в шапке ===== */
.headerSearch {
    display: inline-flex; align-items: center; gap: 7px;
    height: 34px; padding: 0 10px;
    border: 1px solid rgba(238,155,58,.35);
    background: rgba(0,0,0,.35);
    color: var(--text-muted);
}
.headerSearch:focus-within { border-color: var(--gold); color: var(--gold); }
.headerSearch input {
    width: 120px; border: 0; background: transparent;
    color: #E7D7C7; font-family: 'Piazzolla', serif; font-weight: 500; font-size: 13px;
    outline: none;
}
.headerSearch input::placeholder { color: rgba(231,215,199,.5); }
header.siteHeader.is-menu-open .headerSearch { width: 100%; box-sizing: border-box; }
header.siteHeader.is-menu-open .headerSearch input { width: 100%; }

/* Пост с картинкой */
.ps-img { margin: 10px 0 0; max-width: 100%; max-height: 420px; border: 1px solid rgba(238,155,58,.25); display: block; }
.ps-attach {
    display: inline-flex; align-items: center; gap: 7px;
    cursor: pointer;
    font-family: 'Piazzolla', serif; font-weight: 600; font-size: 13px;
    color: var(--text-muted);
    transition: color .16s;
}
.ps-attach:hover { color: var(--gold); }
.ps-attach input { display: none; }
.ps-attach .fn { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #7ddc74; }

/* Рост страницы уведомлений до футера */
body > main > .nt-wrap, body > main > .sr-wrap { flex: 1 0 auto; }

/* ===== Живые подсказки поиска (hs-*) ===== */
.headerSearch { position: relative; }
.hs-drop {
    display: none;
    position: absolute; left: -1px; right: -1px; top: calc(100% + 6px); z-index: 250;
    background: #14100A;
    border: 1px solid var(--gold);
    box-shadow: 0 6px 24px 0 rgba(240,97,16,.35);
    max-height: 340px; overflow-y: auto;
    min-width: 240px;
}
.hs-drop.open { display: block; }
.hs-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px;
    text-decoration: none;
    border-bottom: 1px solid rgba(238,155,58,.12);
    transition: background-color .14s;
}
.hs-item:last-child { border-bottom: none; }
.hs-item:hover { background: rgba(238,155,58,.1); }
.hs-item .ava {
    width: 32px; height: 32px; flex: 0 0 32px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid rgba(238,155,58,.35); background: rgba(238,155,58,.08);
    font-family: 'AugustaTwo', serif; font-size: 14px; color: #E6701F;
}
.hs-item .inf { min-width: 0; display: flex; flex-direction: column; }
.hs-item .inf b { font-weight: 600; font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hs-item .inf i { font-style: normal; font-weight: 200; font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hs-none { display: block; padding: 12px; font-weight: 200; font-style: italic; font-size: 13px; color: var(--text-muted); }

/* ===== Панель достижений (pfa-*) — кабинет и страница «Все достижения» ===== */
.pfa-count { font-weight: 500; font-size: 15px; color: var(--text-muted); white-space: nowrap; }
.pfa-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 12px;
    align-content: start;
}
.pf2-panel .pfa-grid { padding: 18px 22px 4px; }
.pf2-panel .pfa-all { margin: 14px 0 18px; }
.pfa-card {
    border: 1px solid rgba(123,123,123,.25);
    background: rgba(0,0,0,.25);
    padding: 18px 12px 15px;
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    text-align: center;
}
.pfa-card.is-earned {
    border-color: rgba(238,155,58,.5);
    background: rgba(238,155,58,.05);
    box-shadow: 0 0 18px rgba(238,155,58,.12);
}
.pfa-emblem {
    width: 50px; height: 50px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(123,123,123,.35);
    font-size: 23px; line-height: 1;
    opacity: .5;
    filter: grayscale(.6);
}
.pfa-card.is-earned .pfa-emblem { border-color: rgba(238,155,58,.6); opacity: 1; filter: none; }
.pfa-name { margin: 0; font-weight: 600; font-size: 14px; line-height: 1.3; color: rgba(123,123,123,.9); }
.pfa-card.is-earned .pfa-name { color: var(--text); }
.pfa-date { font-weight: 200; font-size: 12px; color: var(--text-muted); }
.pfa-prog { width: 100%; display: flex; flex-direction: column; gap: 5px; }
.pfa-bar { height: 3px; background: rgba(123,123,123,.25); overflow: hidden; }
.pfa-bar i { display: block; height: 100%; background: rgba(238,155,58,.5); }
.pfa-prog span { font-weight: 200; font-size: 12px; color: rgba(123,123,123,.9); }
.pfa-all { display: block; margin-top: 18px; text-align: center; font-weight: 600; font-size: 14px; }
.pfa-page { width: min(860px, 100%); margin: 0 auto; padding: clamp(28px, 5vw, 56px) 15px 60px; box-sizing: border-box; flex: 1 0 auto; }
.pfa-page .pfa-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

/* ===== Композер: drag&drop и превью фото ===== */
.ps-composer.is-drag { outline: 2px dashed var(--gold); outline-offset: -6px; background: rgba(238,155,58,.05); }
.ps-prev { position: relative; display: inline-block; margin-top: 12px; max-width: 260px; }
.ps-prev img { display: block; max-width: 100%; max-height: 180px; border: 1px solid rgba(238,155,58,.35); }
.ps-prev button {
    position: absolute; top: -10px; right: -10px;
    width: 24px; height: 24px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid rgba(238,155,58,.5); border-radius: 50%;
    background: #1a0f08; color: var(--text);
    font-size: 15px; line-height: 1; cursor: pointer;
}
.ps-prev button:hover { border-color: var(--danger); color: var(--danger); }

/* ===== Фото в ответах на посты ===== */
.ps-t-img { display: block; max-width: 240px; max-height: 200px; margin-top: 8px; border: 1px solid rgba(238,155,58,.25); }
.ps-t-form input[type="file"] { display: none; }
.ps-t-attach {
    width: 40px; height: 40px; flex: 0 0 40px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid #7B7B7B; color: #7B7B7B;
    cursor: pointer;
    transition: color .16s, border-color .16s;
}
.ps-t-attach:hover { color: var(--gold); border-color: var(--gold); }
.ps-t-form.has-photo .ps-t-attach { color: #7ddc74; border-color: #7ddc74; }
.ps-t-form.is-drag { outline: 2px dashed var(--gold); outline-offset: 4px; }

/* Знак процента: у AugustaTwo нет глифа % */
.pf2-gold-value .pct { font-style: normal; font-family: 'Piazzolla', serif; font-weight: 700; font-size: .55em; }

/* ===== Квесты гильдии в кабинете (qst-*) ===== */
.qst-list { display: flex; flex-direction: column; }
.qst { border-bottom: 1px solid rgba(238,155,58,.14); }
.qst:last-child { border-bottom: none; }
.qst-head {
    width: 100%; display: flex; align-items: center; gap: 14px;
    padding: 16px 22px;
    border: 0; background: transparent; cursor: pointer; text-align: left;
    font-family: 'Piazzolla', serif;
}
.qst-head:hover { background: rgba(238,155,58,.05); }
.qst-state {
    width: 30px; height: 30px; flex: 0 0 30px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid rgba(123,123,123,.4); border-radius: 50%;
    font-size: 14px; color: var(--text-muted);
}
.qst.is-current .qst-state { border-color: var(--gold); color: var(--gold); box-shadow: 0 0 12px rgba(238,155,58,.25); }
.qst.is-done .qst-state { border-color: rgba(125,220,116,.6); color: #7ddc74; }
.qst-title { flex: 1; min-width: 0; font-weight: 600; font-size: 16px; color: var(--text); }
.qst.is-done .qst-title { color: var(--text-muted); }
.qst-meta { font-weight: 200; font-size: 13px; color: var(--text-muted); white-space: nowrap; }
.qst.is-done .qst-meta { color: #7ddc74; }
.qst-arrow { font-size: 12px; color: var(--text-muted); transition: transform .18s; }
.qst.open .qst-arrow { transform: rotate(180deg); }
.qst-tasks { display: none; padding: 2px 22px 16px 66px; }
.qst.open .qst-tasks, .qst.is-current .qst-tasks { display: block; }
.qst.is-current.open .qst-tasks { display: none; } /* текущий открыт по умолчанию, клик сворачивает */
.qst-task {
    display: flex; align-items: center; gap: 10px;
    padding: 7px 0;
    font-size: 14px;
}
.qst-task .tick { flex: 0 0 18px; text-align: center; color: var(--text-muted); }
.qst-task.done .tick { color: #7ddc74; }
.qst-task .lbl { flex: 1; min-width: 0; font-weight: 500; color: var(--text); }
.qst-task.done .lbl { color: var(--text-muted); text-decoration: line-through; text-decoration-color: rgba(125,220,116,.5); }
.qst-task .cnt { font-weight: 200; font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.qst-task .bar { flex: 0 0 90px; height: 3px; background: rgba(123,123,123,.25); overflow: hidden; }
.qst-task .bar i { display: block; height: 100%; background: rgba(238,155,58,.6); }
.qst-task.done .bar i { background: rgba(125,220,116,.55); }
@media (max-width: 640px) {
    .qst-tasks { padding-left: 22px; }
    .qst-task .bar { flex-basis: 54px; }
}

/* ===== Модалка жалобы (rpt-*) ===== */
.rpt-bg {
    position: fixed; inset: 0; z-index: 240;
    display: none; align-items: center; justify-content: center;
    padding: 20px; box-sizing: border-box;
    background: rgba(5,3,2,.78);
}
.rpt-bg.open { display: flex; }
.rpt-box {
    width: min(440px, 100%);
    background: #1a0f08 url('/img/Sign-Bg.webp') center / cover no-repeat;
    border: 1px solid rgba(238,155,58,.45);
    box-shadow: 0 8px 40px rgba(0,0,0,.6);
    padding: 24px;
}
.rpt-box h3 {
    margin: 0 0 6px;
    font-family: 'AugustaTwo', serif; font-weight: 400; font-size: 26px; line-height: 1;
    background-image: var(--grad-heading);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.rpt-box p { margin: 0 0 14px; font-weight: 200; font-size: 14px; color: var(--text-muted); }
.rpt-box textarea {
    width: 100%; box-sizing: border-box;
    border: 1px solid #7B7B7B; border-radius: 0;
    background: #100807; color: #E7D7C7;
    padding: 10px 12px; resize: vertical; min-height: 74px;
    font-size: 15px; font-family: 'Piazzolla', serif; font-weight: 500;
}
.rpt-box textarea::placeholder { color: rgba(231,215,199,.45); }
.rpt-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.rpt-cancel {
    border: 1px solid #7B7B7B; background: transparent; color: var(--text-muted);
    padding: 9px 18px; cursor: pointer;
    font-family: 'Piazzolla', serif; font-weight: 600; font-size: 14px;
}
.rpt-cancel:hover { border-color: var(--gold); color: var(--gold); }
.rpt-send {
    border: 0; background: var(--grad-btn); color: #000;
    padding: 9px 20px; cursor: pointer;
    font-family: 'Piazzolla', serif; font-weight: 700; font-size: 14px;
}

/* ===== Карточка-анонс игры от Линь (ps-game-*) ===== */
.ps-ava.lin { padding: 0; overflow: hidden; }
.ps-ava.lin img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ps-game {
    display: block; margin-top: 12px;
    border: 1px solid rgba(238,155,58,.35);
    background: rgba(0,0,0,.28);
    text-decoration: none; color: inherit;
    transition: border-color .16s, background-color .16s;
}
.ps-game:hover { border-color: var(--gold); background: rgba(238,155,58,.06); color: inherit; }
.ps-game-cover { display: block; width: 100%; max-height: 240px; object-fit: cover; }
.ps-game-body { padding: 14px 16px 15px; }
.ps-game-title {
    margin: 0 0 4px;
    font-family: 'AugustaTwo', serif; font-weight: 400; font-size: 22px; line-height: 1.1;
    color: var(--gold);
}
.ps-game-meta { margin: 0 0 8px; font-weight: 200; font-size: 13px; color: var(--text-muted); }
.ps-game-tags { margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.ps-game-tags span {
    display: inline-flex; padding: 3px 10px;
    border: 1px solid rgba(238,155,58,.4);
    font-weight: 600; font-size: 11px; color: var(--gold);
}
.ps-game-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ps-game-state { font-weight: 600; font-size: 13px; color: #7ddc74; }
.ps-game-state.off { color: var(--text-muted); }
.ps-game-cta {
    display: inline-flex; align-items: center;
    padding: 8px 18px;
    background: var(--grad-btn); color: #000;
    font-weight: 700; font-size: 13px;
}

/* ===== Привязка Telegram в кабинете ===== */
.pf2-tg { display: block; margin-top: 8px; font-size: 13px; }
.pf2-tg .ok { font-style: normal; font-weight: 600; color: #7ddc74; }
.pf2-tg form button {
    border: 0; background: transparent; padding: 0; cursor: pointer;
    font-family: 'Piazzolla', serif; font-weight: 600; font-size: 12px;
    color: var(--text-muted); text-decoration: underline;
}
.pf2-tg form button:hover { color: var(--gold); }
.pf2-tg form button.link-btn { font-size: 13px; color: var(--glow-link, #FF7C22); text-decoration: none; }
.pf2-tg form button.link-btn:hover { color: var(--gold); }

/* ===== Мобильный фикс-марафон (этап 8) ===== */
@media (max-width: 640px) {
    /* iOS зумит страницу при фокусе на поле с шрифтом <16px */
    input:not([type=checkbox]):not([type=radio]):not([type=file]),
    textarea, select { font-size: 16px !important; }

    /* Шапка кабинета: аккуратная колонка по центру */
    .pf2-head { flex-direction: column; align-items: center; gap: 16px; text-align: center; }
    .pf2-id { min-width: 0; align-items: center; }
    .pf2-rank { justify-content: center; }
    .pf2-tg { text-align: center; }
    .pf2-gold { margin: 0 auto; align-items: center; min-width: 0; }
    .pf2-gold-value { font-size: 48px; }

    /* Высокие модалки: центровка режет верх — прижимаем к верху со скроллом */
    .sch-modal-bg, .pfi-bg, .rpt-bg { align-items: flex-start; }
    .sch-modal, .pfi-modal, .rpt-box { margin-top: 14px; margin-bottom: 24px; }
}

/* Подсказка «таблица листается» — только на узких экранах */
.sch-swipehint { display: none; }
@media (max-width: 900px) {
    .sch-swipehint {
        display: block; margin: 6px 0 0; text-align: center;
        font-weight: 200; font-style: italic; font-size: 12px;
        color: rgba(255,239,221,.45);
    }
}

/* ===== Мобильный фикс-марафон, часть 2 ===== */
/* Пользовательский текст не должен растягивать страницу длинными словами и ссылками */
.article-content, .article-content p, .ps-text, .ps-t-text, .nt-text,
.pf2-row-title, .qst-task .lbl, .gd-desc, .dsc-text, .hs-item .inf b,
.pfa-name, .ps-game-title {
    overflow-wrap: break-word;
    word-break: break-word;
    min-width: 0;
}

/* Открытое бургер-меню ровно в ширину экрана */
header.siteHeader .headercont.socialmedia { box-sizing: border-box; }

@media (max-width: 640px) {
    /* Композер: кнопка «Опубликовать» переносится на свою строку во всю ширину */
    .ps-composer .foot { flex-wrap: wrap; }
    .ps-composer .foot .btn-gold { flex: 1 1 100%; min-width: 0 !important; }
    .ps-composer .ava { display: none; }

    /* Форма комментария к статье: кнопка вниз, поле во всю ширину
       (!important — стили dsc-* живут инлайном в article.html и идут позже) */
    .dsc-form { flex-wrap: wrap !important; }
    .dsc-form input[type="text"] { flex: 1 1 100% !important; }
    .dsc-form .btn-gold { flex: 1 1 100% !important; min-width: 0 !important; }
    .dsc-form .dsc-me-ava { display: none !important; }
}

/* ===== Мобильный UI из макетов: таб-бар, лента расписания, кабинет ===== */

/* Нижний таб-бар */
.tabbar { display: none; }
@media (max-width: 640px) {
    .tabbar {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 150;
        display: flex;
        background: var(--bg-deep, #0B0B0B);
        border-top: 1px solid rgba(238,155,58,.25);
        padding-bottom: env(safe-area-inset-bottom);
    }
    .tabbar a {
        position: relative; flex: 1; height: 60px;
        display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
        color: var(--text-muted); text-decoration: none;
        font-family: 'Piazzolla', serif; font-weight: 500; font-size: 11px;
    }
    .tabbar a::before {
        content: ''; position: absolute; top: 0; left: 18%; right: 18%; height: 2px;
        background: transparent;
    }
    .tabbar a.active { color: #E6701F; font-weight: 700; }
    .tabbar a.active::before { background: var(--gold); }
    .tb-badge {
        position: absolute; top: -6px; right: -9px;
        display: inline-flex; align-items: center; justify-content: center;
        min-width: 17px; height: 17px; padding: 0 4px;
        border-radius: 999px; background: #C93D3D; color: #fff;
        font-style: normal; font-weight: 700; font-size: 10px;
        box-shadow: 0 0 8px rgba(201,61,61,.6);
    }
    /* контент и тосты не прячутся под баром */
    body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
    .ps-toast { bottom: 104px; }
}

/* Мобильная лента расписания */
.sch-mlist { display: none; }
@media (max-width: 900px) {
    .sch-scroll, .sch-swipehint { display: none; }
    .sch-mlist { display: flex; flex-direction: column; gap: 18px; }
}
.sch-mday { display: flex; flex-direction: column; gap: 12px; }
.sch-mhead { display: flex; align-items: baseline; gap: 9px; }
.sch-mhead .t { font-family: 'AugustaTwo', serif; font-size: 20px; line-height: 1; color: #2b2b2b; }
.sch-mhead .today {
    display: inline-flex; align-items: center; height: 20px; padding: 0 9px;
    border-radius: 999px; background: var(--grad-btn); color: #000;
    font-weight: 700; font-size: 10px;
}
.sch-moff {
    margin: 0; padding: 8px 0 2px;
    border-top: 1px solid rgba(27,26,25,.15);
    font-weight: 200; font-style: italic; font-size: 14px; color: rgba(27,26,25,.55);
}
.sch-mcard {
    display: block;
    border: 1px solid rgba(27,26,25,.25);
    background: rgba(255,252,243,.75);
    padding: 14px;
    text-decoration: none; color: #1B1A19;
}
.sch-mcard .ttl { margin: 0; font-weight: 600; font-size: 17px; line-height: 1.3; color: #1B1A19; }
.sch-mcard .meta { margin: 3px 0 0; font-weight: 200; font-size: 13px; color: rgba(27,26,25,.6); }
.sch-mcard .tags { margin: 9px 0 0; display: flex; gap: 6px; flex-wrap: wrap; }
.sch-mcard .tags span {
    display: inline-flex; align-items: center; height: 22px; padding: 0 10px;
    border-radius: 999px; border: 1px solid rgba(162,28,28,.45);
    font-weight: 600; font-size: 11px; color: #A21C1C;
}
.sch-mcard .occrow { display: flex; align-items: center; gap: 10px; margin-top: 11px; }
.sch-mcard .occ { flex: 1; height: 5px; background: rgba(27,26,25,.12); overflow: hidden; }
.sch-mcard .occ i { display: block; height: 100%; background: var(--grad-btn); }
.sch-mcard .seatline { font-weight: 600; font-size: 12px; white-space: nowrap; }
.sch-mcard .mbook {
    display: flex; align-items: center; justify-content: center;
    width: 100%; height: 46px; margin-top: 12px;
    background: var(--grad-btn); color: #000;
    clip-path: url(#btn-bg);
    font-family: 'AugustaTwo', serif; font-size: 19px;
}
.sch-mcard .mfull {
    display: flex; align-items: center; justify-content: center;
    width: 100%; height: 46px; margin-top: 12px;
    border: 1px solid rgba(27,26,25,.3);
    color: rgba(27,26,25,.55); font-weight: 600; font-size: 14px;
}

/* Кабинет: угольки в шапке (как в макете) */
.pf2-sheet { position: relative; overflow: hidden; }
.pf2-embers { position: absolute; inset: 0; pointer-events: none; }
.pf2-embers i { position: absolute; bottom: 0; width: 4px; height: 4px; background: var(--gold); opacity: 0; }
.pf2-embers i:nth-child(1) { left: 16%; --drift: 14px; animation: emberFloat 5.4s ease-out .5s infinite; }
.pf2-embers i:nth-child(2) { left: 55%; width: 3px; height: 3px; background: #E6701F; --drift: -16px; animation: emberFloat 6.6s ease-out 2s infinite; }
.pf2-embers i:nth-child(3) { left: 82%; --drift: 9px; animation: emberFloat 4.8s ease-out 3.1s infinite; }
@keyframes emberFloat {
    0% { transform: translateY(0) translateX(0) scale(1); opacity: 0; }
    12% { opacity: .9; }
    100% { transform: translateY(-110px) translateX(var(--drift, 12px)) scale(.4); opacity: 0; }
}

/* Кабинет-мобайл: достижения горизонтальной лентой, статы компактнее */
@media (max-width: 640px) {
    .pf2-panel .pfa-grid {
        display: flex; overflow-x: auto;
        padding-bottom: 10px;
        scrollbar-width: thin;
    }
    .pf2-panel .pfa-card { flex: 0 0 108px; }
    .pf2-stat img { display: none; }
    .pf2-stat-value { font-size: 26px; }
}


/* Месячный календарь на телефоне не нужен — лента недель его заменяет */
@media (max-width: 900px) {
    .sch-cal-card { display: none; }
}
