
:root {
    --oris-primary: #7394c5;
    --oris-primary-light: #8eb0dc;
    --oris-primary-dark: #476c9b;
    --oris-deep: #172a43;
    --oris-deep-2: #223b5c;
    --oris-accent: #62e8f4;
    --oris-surface: #f2f6fb;
    --oris-border: #c9d6e7;
    --oris-text: #1b2838;
}

* { box-sizing: border-box; }

 /* --- ZÁKLADNÍ NASTAVENÍ --- */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    background-color: #f0f0f0;
    font-family: Arial, sans-serif;
    font-size: 12px;
    display: flex;
    justify-content: center;
}

.wrapper {
    width: 800px;
    background-color: white;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

/* --- HLAVIČKA --- */
header {
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    text-decoration: none;
}

.logo span {
    color: #7394c5;
    border-bottom: 2px solid #7394c5;
}



/* --- NAVIGACE --- */
nav {
    background-color: #7394c5;
    padding: 4px 10px;
    display: flex;
    gap: 15px;
}

nav a {
    color: white;
    text-decoration: none;
    font-size: 12px;
    font-weight: bold;
}

/* --- LOGIN V HLAVIČCE --- */
.header-login {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: #7394c5;
}

.header-login label {
    font-weight: bold;
}

.header-login input {
    border: 1px solid #7394c5;
    padding: 2px;
    width: 90px;
    font-size: 11px;
}

.login-submit {
    background: linear-gradient(#8eb0dc, #7394c5);
    color: white;
    border: 1px solid #476c9b;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    margin-bottom: -1px;
}

/* --- LIŠTY --- */
.online-status {
    background-color: #eeeeee;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    padding: 4px 15px;
    font-size: 11px;
    color: #333;
    text-align: right;
}

.online-status strong {
    color: #7394c5;
}

.info-bar {
    background-color: #7394c5;
    color: white;
    margin: 8px 10px;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    border-radius: 3px;
    font-size: 12px;
}

.info-label {
    background-color: white;
    color: #7394c5;
    padding: 1px 6px;
    font-weight: bold;
    margin-right: 10px;
    border-radius: 2px;
    font-size: 11px;
}

.error-banner {
    background: #ffdbdb;
    color: #a94442;
    padding: 10px;
    text-align: center;
    border-bottom: 1px solid #ebccd1;
    font-size: 12px;
}

/* --- HLAVNÍ OBSAH --- */
.content, .main-grid {
    flex: 1;
    padding: 10px;
}

.main-grid {
    display: grid;
    grid-template-columns: 65% 33%;
    gap: 15px;
}

/* --- KATEGORIE MÍSTNOSTÍ --- */
.categories {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-content: start;
}

.cat-box {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.cat-icon {
    width: 28px;
    height: 28px;
    background-color: #eee;
    border: 1px solid #ccc;
    flex-shrink: 0;
}

.cat-text h3 {
    margin: 0 0 2px 0;
    font-size: 12px;
    color: #7394c5;
    font-weight: bold;
}

.cat-text p {
    margin: 0;
    font-size: 11px;
    color: #666;
    line-height: 1.3;
}

/* --- SIDEBAR --- */
.sidebar {
    border-left: 1px solid #eee;
    padding-left: 10px;
}

.login-box {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    padding: 8px;
    margin-bottom: 10px;
}

.login-box input {
    width: 100%;
    margin-bottom: 4px;
    font-size: 11px;
    padding: 3px;
    box-sizing: border-box;
}

.btn-primary {
    background-color: #7394c5;
    color: white;
    border: none;
    padding: 4px;
    width: 100%;
    cursor: pointer;
    font-weight: bold;
    font-size: 11px;
}

.user-photos {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 5px;
}

.photo-slot {
    width: 45px;
    height: 55px;
    background-color: #ddd;
    border: 1px solid #bbb;
}

/* --- PATIČKA --- */
footer {
    text-align: center;
    font-size: 10px;
    color: #888;
    padding: 15px;
    border-top: 1px solid #eee;
    background: white;
    margin-top: auto;
}

/* --- FORMULÁŘE --- */
.standard-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 500px;
    margin: 0 auto;
}

.standard-form label {
    font-weight: bold;
    color: #333;
    font-size: 11px;
    margin-bottom: 2px;
}

.standard-form input[type="text"],
.standard-form input[type="email"],
.standard-form input[type="password"],
.standard-form input[type="number"],
.standard-form input[type="date"],
.standard-form select,
.standard-form textarea {
    padding: 4px;
    border: 1px solid #7394c5;
    font-size: 12px;
    background-color: #fff;
    box-sizing: border-box;
}

.standard-form .checkbox-row {
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 5px;
    background: #eee;
    padding: 4px;
    border-radius: 4px;
}

.btn-main {
    background-color: #7394c5;
    color: white;
    border: 1px solid #476c9b;
    padding: 6px 12px;
    font-weight: bold;
    cursor: pointer;
    font-size: 12px;
    text-decoration: none;
    display: inline-block;
}

.btn-main:hover {
    background-color: #5f82b2;
}

.alert.error {
    color: red;
    background: #fff0f0;
    border: 1px solid red;
    padding: 8px;
    font-size: 11px;
    margin-bottom: 10px;
}

.alert.success {
    color: green;
    background: #f0fff0;
    border: 1px solid green;
    padding: 8px;
    font-size: 11px;
    margin-bottom: 10px;
}

/* --- PROFIL --- */
.profile-view-container {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 15px;
}

.profile-photo-large {
    width: 180px;
    height: 220px;
    background: #eee;
    border: 1px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 5px;
    position: relative;
}

.profile-photo-large a {
    display: block;
    width: 100%;
    height: 100%;
    cursor: zoom-in;
}

.profile-photo-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.profile-info-table th {
    text-align: left;
    background: #edf3fa;
    color: #476c9b;
    padding: 5px 8px;
    border-bottom: 1px solid #c9d6e7;
    width: 100px;
}

.profile-info-table td {
    padding: 5px 8px;
    border-bottom: 1px solid #eee;
    color: #333;
}

.profile-message-box {
    background: #fffbe6;
    border: 1px solid #ffeebb;
    padding: 8px;
    margin-bottom: 10px;
    font-style: italic;
    color: #555;
    font-size: 12px;
}

/* --- LIGHTBOX --- */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
}

.lightbox:target {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    border: 5px solid white;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    background: black;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: white;
    text-decoration: none;
    font-weight: bold;
    text-shadow: 0 0 5px black;
}

/* --- PŘÁTELÉ A SEZNAM PROFILŮ --- */
.friends-list {
    margin-top: 15px;
    border-top: 1px solid #7394c5;
    padding-top: 8px;
}

.friends-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.friend-card {
    width: 70px;
    text-align: center;
    font-size: 10px;
}

.friend-avatar {
    width: 70px;
    height: 70px;
    background: #ddd;
    margin-bottom: 2px;
    border: 1px solid #ccc;
    position: relative;
}

/* Karty v seznamu profilů */
.profile-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.profile-card {
    border: 1px solid #ddd;
    background: #f9f9f9;
    padding: 10px;
    display: flex;
    gap: 10px;
}

.profile-card img {
    width: 60px;
    height: 75px;
    object-fit: cover;
    border: 1px solid #ccc;
    background: #eee;
}

.profile-card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.profile-card h4 {
    margin: 0 0 5px 0;
    font-size: 13px;
    color: #7394c5;
}

.profile-card .details {
    font-size: 11px;
    color: #666;
    margin-bottom: 5px;
}

.btn-friend-add {
    background: #28a745;
    color: white;
    border: 1px solid #218838;
    padding: 3px 6px;
    font-size: 10px;
    text-decoration: none;
    text-align: center;
    display: inline-block;
    border-radius: 2px;
}
.btn-friend-pending {
    background: #ffc107;
    color: #333;
    border: 1px solid #e0a800;
    padding: 3px 6px;
    font-size: 10px;
    text-align: center;
    display: inline-block;
    border-radius: 2px;
    cursor: default;
}
.btn-friend-accept {
    background: #28a745;
    color: white;
    text-decoration: none;
    padding: 2px 5px;
    border-radius: 3px;
    font-weight: bold;
}
.btn-friend-reject {
    background: #dc3545;
    color: white;
    text-decoration: none;
    padding: 2px 5px;
    border-radius: 3px;
    font-weight: bold;
}


/* --- ADMIN --- */
.admin-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 180px;
    background: #2c3e50;
    color: white;
    padding: 15px;
    z-index: 1000;
    transition: transform 0.3s ease; /* Pro animaci vysouvání */
}

.admin-sidebar h3 {
    color: #7394c5;
    font-size: 14px;
    margin-top: 0;
    border-bottom: 1px solid #444;
    padding-bottom: 5px;
}

.admin-sidebar a {
    display: block;
    color: #fff;
    text-decoration: none;
    padding: 6px 0;
    font-size: 11px;
    border-bottom: 1px solid #34495e;
}

/* Křížek pro zavření admin menu */
.admin-close-btn {
    display: none; /* Na PC skryté */
    text-align: right;
    margin-bottom: 15px;
    color: #ccc;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
}

/* Tlačítko pro admin menu na mobilu */
.admin-toggle-btn {
    display: none; /* Na PC skryté */
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 60px; /* ZVĚTŠENO */
    height: 60px; /* ZVĚTŠENO */
    background: #2c3e50;
    color: #7394c5;
    border: 3px solid white;
    border-radius: 50%;
    z-index: 1001;
    font-size: 30px; /* ZVĚTŠENO */
    font-weight: bold;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
    cursor: pointer;
}

/* --- MOBILNÍ DESIGN --- */
@media (max-width: 768px) {
    .wrapper {
        width: 100%;
        border: none;
    }
    
    header {
        flex-direction: column;
        gap: 10px;
    }
    
    .header-login {
        width: 100%;
        justify-content: center;
    }
    
    .main-grid {
        grid-template-columns: 1fr;
    }
    
    .categories {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        border-left: none;
        border-top: 2px solid #eee;
        padding-left: 0;
        padding-top: 20px;
    }
    
    .profile-view-container {
        grid-template-columns: 1fr;
    }
    
    /* Mobilní admin */
    .admin-sidebar {
        transform: translateX(-100%); /* Výchozí stav: skryto */
    }
    
    .admin-sidebar.open {
        transform: translateX(0); /* Otevřeno */
        box-shadow: 2px 0 10px rgba(0,0,0,0.5);
    }
    
    .admin-toggle-btn {
        display: flex; /* Zobrazíme tlačítko */
    }

    .profile-list-grid {
        grid-template-columns: 1fr; /* Na mobilu pod sebou */
    }
}

/* Responzivní CSS pro reklamní prostor */
.ad-wrapper {
    margin: 20px auto;
    width: 100%;
    max-width: 970px; /* Standardní max šířka pro leaderboard */
    text-align: center;
    overflow: hidden;
}

.ad-label {
    font-size: 10px;
    color: #999;
    text-transform: uppercase;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.ad-container {
    background: #f9f9f9;
    border: 1px solid #ddd;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    box-sizing: border-box;
}

/* Omezení velikosti obsahu uvnitř (obrázky, iframy) */
.ad-container img, 
.ad-container iframe {
    max-width: 100%;
    height: auto !important;
    display: block;
}

/* Mobilní optimalizace */
@media (max-width: 600px) {
    .ad-container {
        min-height: 250px; /* Často čtvercové reklamy na mobilu */
    }
}

/* --- ORISCHAT BRANDING A DOLADĚNÍ --- */
body {
    background: linear-gradient(135deg, #e8eef7 0%, #f8fbff 50%, #dce6f3 100%);
    color: var(--oris-text);
}

.wrapper {
    width: min(960px, 100%);
    border-color: var(--oris-border);
    box-shadow: 0 10px 35px rgba(23, 42, 67, .18);
}

.site-header {
    min-height: 78px;
    padding: 10px 18px;
    background: linear-gradient(135deg, var(--oris-deep), var(--oris-deep-2));
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-width: 205px;
}

.logo-icon {
    width: 70px;
    height: 48px;
    object-fit: contain;
    filter: drop-shadow(0 3px 4px rgba(0,0,0,.3));
}

.logo .logo-text {
    display: inline-flex;
    align-items: baseline;
    border: 0;
    color: white;
    font-size: 27px;
    letter-spacing: -.7px;
    line-height: 1;
}

.logo-text strong {
    color: white;
    font-style: normal;
}

.logo-text em {
    color: var(--oris-primary-light);
    font-style: normal;
    font-weight: 800;
}

.header-login { color: #d8e4f3; }
.header-login input {
    border-color: #8da7c8;
    background: rgba(255,255,255,.96);
    border-radius: 3px;
}

.login-submit {
    background: linear-gradient(var(--oris-primary-light), var(--oris-primary));
    border-color: #a9bed8;
}

.register-link {
    color: var(--oris-accent);
    text-decoration: none;
    font-size: 10px;
    font-weight: bold;
    margin-left: 5px;
}

.user-logged-info { color: #eaf1f9; text-align: right; line-height: 1.5; }
.user-logged-info a { color: var(--oris-accent); text-decoration: none; }

.main-nav {
    background: linear-gradient(180deg, var(--oris-primary), var(--oris-primary-dark));
    min-height: 31px;
    align-items: center;
    padding: 7px 14px;
    flex-wrap: wrap;
}
.main-nav a:hover { color: #fff; text-decoration: underline; }
.main-nav .is-disabled { opacity: .55; cursor: not-allowed; }

.online-status {
    background: #edf3fa;
    border-color: var(--oris-border);
}
.online-status strong { color: var(--oris-primary-dark); }

.info-bar {
    background: linear-gradient(90deg, var(--oris-primary-dark), var(--oris-primary));
    box-shadow: 0 2px 8px rgba(71,108,155,.18);
}
.info-label { color: var(--oris-primary-dark); }

.verification-warning,
.warning-banner,
.success-banner {
    padding: 10px 14px;
    text-align: center;
    font-size: 12px;
    border-bottom: 1px solid;
}
.verification-warning, .warning-banner { background: #fff7dc; color: #725300; border-color: #f0d77d; }
.success-banner { background: #eaf8f0; color: #176b43; border-color: #addcc3; }

.cat-box {
    padding: 8px;
    border-radius: 6px;
    transition: background .15s ease, transform .15s ease;
}
.cat-box:hover { background: var(--oris-surface); transform: translateY(-1px); }
.cat-icon { border-color: var(--oris-border); background: #edf3fa; border-radius: 5px; }
.cat-text h3 { color: var(--oris-primary-dark); }

.btn-main, .btn-primary, .btn-send {
    background: linear-gradient(180deg, var(--oris-primary), var(--oris-primary-dark));
    border-color: #3b5d86;
    border-radius: 4px;
}
.btn-main:hover, .btn-primary:hover, .btn-send:hover { background: var(--oris-primary-dark); }

.standard-form input[type="text"],
.standard-form input[type="email"],
.standard-form input[type="password"],
.standard-form input[type="number"],
.standard-form input[type="date"],
.standard-form select,
.standard-form textarea {
    border-color: #9db3cf;
    border-radius: 4px;
}
.standard-form input:focus, .standard-form select:focus, .standard-form textarea:focus {
    outline: 2px solid rgba(115,148,197,.25);
    border-color: var(--oris-primary-dark);
}

.profile-info-table th { background: #edf3fa; color: var(--oris-primary-dark); border-color: var(--oris-border); }
.profile-message-box { background: #f4f8fc; border-color: var(--oris-border); }

.admin-sidebar { background: var(--oris-deep); }
.admin-sidebar h3, .admin-toggle-btn { color: var(--oris-accent); }
.admin-sidebar a { border-color: #34506f; }
.admin-sidebar a:hover { color: var(--oris-accent); }
.admin-refresh { display: inline !important; border: 0 !important; color: #b9c9dc !important; font-size: 12px !important; margin-left: 5px; }
.admin-close-btn { background: transparent; border: 0; }

footer { background: #f8fbff; color: #607087; border-color: var(--oris-border); }

@media (max-width: 768px) {
    .site-header { align-items: stretch; }
    .logo { align-self: center; }
    .header-login { flex-wrap: wrap; }
    .header-login .input-group { flex: 1 1 110px; }
    .header-login input { width: 100%; }
    .register-link { flex-basis: 100%; text-align: center; margin-top: 3px; }
    .main-nav { justify-content: center; gap: 12px; }
}

/* --- Ověření e-mailu, hry a nová správa uživatelů --- */
.main-nav a.active {
    color: var(--oris-accent);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.auth-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.verification-actions {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.verification-actions form { margin: 0; }
.verification-actions a { color: inherit; font-weight: bold; }
.notice-button {
    border: 1px solid currentColor;
    background: rgba(255,255,255,.72);
    color: inherit;
    border-radius: 4px;
    padding: 6px 10px;
    cursor: pointer;
    font-weight: bold;
}
.notice-button:hover { background: #fff; }
.inline-banner { margin: 0 0 14px; border: 1px solid; border-radius: 6px; }

.resend-verification-page {
    display: grid;
    place-items: start center;
    padding-top: 28px;
    padding-bottom: 35px;
}
.resend-card {
    width: min(560px, 100%);
    border: 1px solid var(--oris-border);
    border-radius: 12px;
    background: #fff;
    padding: 22px;
    box-shadow: 0 10px 30px rgba(23,42,67,.12);
}
.resend-card h2 { margin-top: 0; color: var(--oris-deep); }
.resend-form { display: grid; gap: 12px; }
.resend-form label { display: grid; gap: 5px; font-weight: bold; }
.resend-form .btn-main { justify-self: start; padding: 8px 14px; cursor: pointer; }
.pending-email { padding: 10px; border-radius: 6px; background: var(--oris-surface); }

.games-page { padding: 18px; }
.games-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 18px;
}
.games-heading h2 { color: var(--oris-deep); margin: 0 0 5px; font-size: 22px; }
.games-heading p { margin: 0; color: #5b6c80; line-height: 1.45; }
.games-count {
    white-space: nowrap;
    background: var(--oris-deep);
    color: var(--oris-accent);
    border-radius: 999px;
    padding: 6px 10px;
    font-weight: bold;
}
.games-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.game-card {
    min-height: 145px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 15px;
    border: 1px solid var(--oris-border);
    border-radius: 10px;
    background: linear-gradient(160deg, #fff, #edf3fa);
    color: var(--oris-text);
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(23,42,67,.08);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.game-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(23,42,67,.16);
    border-color: var(--oris-primary);
}
.game-icon { font-size: 34px; line-height: 1; margin-bottom: 10px; }
.game-title { color: var(--oris-deep); font-size: 14px; font-weight: 800; }
.game-type { color: #6c7c8f; font-size: 10px; margin-top: 4px; }
.game-open { margin-top: auto; padding-top: 12px; color: var(--oris-primary-dark); font-weight: bold; }

.admin-users-page h2 {
    color: var(--oris-primary-dark);
    border-bottom: 2px solid var(--oris-primary);
    padding-bottom: 7px;
}
.admin-user-search {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 16px;
}
.admin-user-search input {
    flex: 1;
    min-width: 120px;
    border: 1px solid #9db3cf;
    border-radius: 4px;
    padding: 7px;
}
.admin-user-search .btn-main { margin: 0; padding: 7px 14px; }
.admin-user-list { display: grid; gap: 10px; }
.admin-user-card {
    display: grid;
    grid-template-columns: minmax(210px, .9fr) minmax(360px, 1.6fr);
    gap: 14px;
    border: 1px solid var(--oris-border);
    border-radius: 8px;
    padding: 12px;
    background: #fff;
}
.admin-user-card.is-blocked { border-color: #e6a7a7; background: #fff7f7; }
.admin-user-summary { display: grid; gap: 5px; align-content: start; }
.admin-user-summary small { color: #6d7887; }
.role-badge, .verified-badge, .unverified-badge {
    display: inline-block;
    margin-left: 5px;
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: bold;
    text-transform: uppercase;
}
.role-user { background: #edf3fa; color: #476c9b; }
.role-moderator { background: #f2eaff; color: #65429b; }
.role-admin { background: #172a43; color: #62e8f4; }
.verified-badge { background: #e5f6ec; color: #176b43; }
.unverified-badge { background: #fff1d6; color: #8a5c00; }
.admin-user-actions { display: grid; gap: 8px; }
.identity-form, .block-form {
    display: flex;
    gap: 8px;
    align-items: end;
    flex-wrap: wrap;
    padding: 8px;
    border-radius: 6px;
    background: var(--oris-surface);
}
.identity-form label, .block-form label {
    display: grid;
    gap: 3px;
    font-size: 10px;
    font-weight: bold;
}
.identity-form input, .identity-form select, .block-form select {
    border: 1px solid #9db3cf;
    border-radius: 4px;
    padding: 6px;
    min-width: 120px;
}
.identity-form .btn-main, .block-form .btn-main { margin: 0; padding: 6px 10px; cursor: pointer; }

@media (max-width: 850px) {
    .games-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .admin-user-card { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .games-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .games-heading { flex-direction: column; }
    .game-card { min-height: 135px; }
    .admin-user-search { flex-wrap: wrap; }
    .admin-user-search input { flex-basis: 100%; }
    .identity-form, .block-form { align-items: stretch; }
    .identity-form label, .block-form label, .identity-form input, .identity-form select, .block-form select { width: 100%; }
}

/* --- Galerie, zeď a chat mezi přáteli --- */
.social-page-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--oris-primary);
    padding-bottom: 10px;
}
.social-page-heading h2 { margin: 0 0 4px; color: var(--oris-deep); }
.social-page-heading p { margin: 0; color: #607087; }
.social-page-heading > span { background: var(--oris-surface); color: var(--oris-primary-dark); padding: 5px 9px; border-radius: 999px; font-weight: bold; white-space: nowrap; }

.gallery-upload-form {
    display: grid;
    grid-template-columns: minmax(170px, .7fr) minmax(220px, 1.3fr) auto;
    gap: 10px;
    align-items: end;
    padding: 12px;
    margin-bottom: 18px;
    background: var(--oris-surface);
    border: 1px solid var(--oris-border);
    border-radius: 8px;
}
.gallery-upload-form label { display: grid; gap: 5px; font-weight: bold; }
.gallery-upload-form input { width: 100%; border: 1px solid #9db3cf; border-radius: 4px; padding: 7px; background: #fff; }
.gallery-upload-form .btn-main { margin: 0; padding: 8px 12px; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.gallery-card { border: 1px solid var(--oris-border); border-radius: 9px; overflow: hidden; background: #fff; box-shadow: 0 4px 12px rgba(23,42,67,.08); }
.gallery-card > a { display: block; aspect-ratio: 4/3; background: #e9eef5; }
.gallery-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-card p { margin: 10px 10px 4px; line-height: 1.4; }
.gallery-card small { display: block; margin: 5px 10px 10px; color: #78879a; }
.gallery-card form { padding: 0 10px 10px; }
.link-danger { border: 0; background: none; padding: 0; color: #b42318; cursor: pointer; font-size: 10px; text-decoration: underline; }
.empty-social { grid-column: 1/-1; padding: 25px; text-align: center; color: #7c8998; background: var(--oris-surface); border-radius: 8px; }

.wall-page { max-width: 760px; margin: 0 auto; width: 100%; }
.wall-compose { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--oris-border); border-radius: 9px; background: var(--oris-surface); margin-bottom: 14px; }
.wall-compose textarea { width: 100%; min-height: 78px; resize: vertical; border: 1px solid #9db3cf; border-radius: 6px; padding: 10px; font: inherit; }
.wall-compose .btn-main { justify-self: end; margin: 0; padding: 7px 13px; }
.wall-feed { display: grid; gap: 12px; }
.wall-post { border: 1px solid var(--oris-border); border-radius: 10px; background: #fff; box-shadow: 0 4px 14px rgba(23,42,67,.08); overflow: hidden; }
.wall-post > header { display: grid; grid-template-columns: 42px 1fr auto; gap: 9px; align-items: center; padding: 10px 12px; background: #f7faff; }
.wall-post > header > div { display: grid; gap: 2px; }
.wall-post > header a { color: var(--oris-primary-dark); text-decoration: none; }
.wall-post > header small, .wall-comment small { color: #8490a0; font-size: 9px; margin-left: 6px; }
.wall-avatar { width: 42px; height: 42px; border-radius: 50%; overflow: hidden; background: var(--oris-deep); color: var(--oris-accent)!important; display: grid; place-items: center; font-size: 18px; font-weight: bold; }
.wall-avatar img { width: 100%; height: 100%; object-fit: cover; }
.wall-content { padding: 14px; font-size: 13px; line-height: 1.55; white-space: normal; }
.wall-comments { padding: 8px 12px 12px; background: #f7f9fc; border-top: 1px solid #e0e7f0; display: grid; gap: 7px; }
.wall-comment { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; padding: 7px 9px; background: #fff; border-radius: 8px; }
.wall-comment a { color: var(--oris-primary-dark); text-decoration: none; }
.wall-comment-form { display: flex; gap: 6px; }
.wall-comment-form input { flex: 1; min-width: 0; border: 1px solid #aabbd0; border-radius: 999px; padding: 7px 10px; }
.wall-comment-form button { border: 0; border-radius: 999px; background: var(--oris-primary-dark); color: #fff; padding: 7px 11px; cursor: pointer; }

.friend-chat-dock { position: fixed; right: 18px; bottom: 16px; z-index: 12000; font-family: Arial,sans-serif; font-size: 12px; }
.friend-chat-launcher { width: 50px; height: 50px; border: 0; border-radius: 50%; background: linear-gradient(145deg,var(--oris-primary),var(--oris-deep)); color: #fff; font-size: 22px; cursor: pointer; box-shadow: 0 8px 24px rgba(23,42,67,.34); position: relative; }
.friend-chat-launcher span { position: absolute; right: -4px; top: -5px; min-width: 20px; height: 20px; padding: 0 5px; display: grid; place-items: center; background: #d92d20; border: 2px solid #fff; border-radius: 999px; font-size: 10px; font-weight: bold; }
.friend-chat-panel { position: absolute; right: 0; bottom: 60px; width: 270px; max-height: 410px; border: 1px solid #9db3cf; border-radius: 10px; overflow: hidden; background: #fff; box-shadow: 0 14px 40px rgba(23,42,67,.28); }
.friend-chat-panel-head, .friend-chat-window > header { background: var(--oris-deep); color: #fff; display: flex; align-items: center; gap: 7px; padding: 9px 10px; }
.friend-chat-panel-head button, .friend-chat-window > header button { margin-left: auto; border: 0; background: transparent; color: #fff; cursor: pointer; font-size: 18px; }
.friend-chat-list { max-height: 360px; overflow-y: auto; }
.friend-chat-friend { width: 100%; border: 0; border-bottom: 1px solid #edf1f6; background: #fff; display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 8px; padding: 8px 10px; text-align: left; cursor: pointer; }
.friend-chat-friend:hover { background: var(--oris-surface); }
.friend-chat-avatar { width: 36px; height: 36px; border-radius: 50%; overflow: visible; background: #dfe7f1; display: grid; place-items: center; position: relative; font-weight: bold; color: var(--oris-primary-dark); }
.friend-chat-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.friend-chat-avatar i { position: absolute; right: 0; bottom: 0; width: 10px; height: 10px; border-radius: 50%; background: #a8b1bd; border: 2px solid #fff; }
.friend-chat-avatar i.online, .friend-chat-presence.online { background: #22a06b; }
.friend-chat-friend b { min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: #d92d20; color: #fff; display: grid; place-items: center; font-size: 10px; }
.friend-chat-empty, .friend-chat-loading { padding: 18px; text-align: center; color: #6d7887; }
.friend-chat-windows { position: absolute; right: 62px; bottom: 0; display: flex; flex-direction: row-reverse; align-items: end; gap: 8px; }
.friend-chat-window { width: 280px; height: 360px; display: grid; grid-template-rows: auto 1fr auto auto; border: 1px solid #8fa7c5; border-radius: 10px 10px 0 0; overflow: hidden; background: #fff; box-shadow: 0 10px 30px rgba(23,42,67,.28); }
.friend-chat-presence { width: 9px; height: 9px; border-radius: 50%; background: #a8b1bd; }
.friend-chat-messages { overflow-y: auto; padding: 9px; display: flex; flex-direction: column; gap: 6px; background: #f2f6fb; }
.friend-chat-message { max-width: 82%; display: flex; gap: 4px; align-items: end; }
.friend-chat-message span { padding: 7px 9px; border-radius: 12px; line-height: 1.35; word-break: break-word; }
.friend-chat-message small { font-size: 8px; color: #8290a1; }
.friend-chat-message.mine { align-self: flex-end; flex-direction: row-reverse; }
.friend-chat-message.mine span { background: var(--oris-primary-dark); color: #fff; border-bottom-right-radius: 3px; }
.friend-chat-message.theirs { align-self: flex-start; }
.friend-chat-message.theirs span { background: #fff; border: 1px solid #d5deea; border-bottom-left-radius: 3px; }
.friend-chat-status { min-height: 0; padding: 0 8px; color: #b42318; font-size: 9px; }
.friend-chat-window > form { display: flex; gap: 5px; padding: 7px; border-top: 1px solid #dce4ee; }
.friend-chat-window > form input { flex: 1; min-width: 0; border: 1px solid #9db3cf; border-radius: 999px; padding: 7px 9px; }
.friend-chat-window > form button { width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--oris-primary-dark); color: #fff; cursor: pointer; }

@media (max-width: 700px) {
    .gallery-upload-form { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .friend-chat-dock { right: 10px; bottom: 10px; }
    .friend-chat-windows { right: 0; bottom: 58px; }
    .friend-chat-window { width: min(340px, calc(100vw - 20px)); height: min(430px, calc(100vh - 100px)); }
    .friend-chat-panel { width: min(300px, calc(100vw - 20px)); }
}
@media (max-width: 430px) {
    .gallery-grid { grid-template-columns: 1fr; }
}

/* --- Mobilní doladění 1.2.1 --- */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

img,
video,
iframe {
    max-width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
}

.content,
.main-grid,
.profile-card-info,
.admin-user-summary,
.admin-user-actions {
    min-width: 0;
}

body,
.wrapper {
    min-height: 100dvh;
}

@media (max-width: 768px) {
    body {
        display: block;
        background: #eef3f9;
        overflow-x: hidden;
    }

    .wrapper {
        width: 100%;
        min-height: 100dvh;
        border: 0;
        box-shadow: none;
        overflow: hidden;
    }

    .site-header {
        min-height: 0;
        padding: 10px 12px;
        gap: 8px;
    }

    .logo {
        min-width: 0;
        align-self: center;
        gap: 7px;
    }

    .logo-icon {
        width: 58px;
        height: 40px;
    }

    .logo .logo-text {
        font-size: 24px;
    }

    .user-logged-info {
        width: 100%;
        text-align: center;
        font-size: 12px;
    }

    .header-login {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px;
        align-items: end;
        gap: 7px;
        width: 100%;
    }

    .header-login .input-group {
        min-width: 0;
    }

    .header-login input,
    .standard-form input[type="text"],
    .standard-form input[type="email"],
    .standard-form input[type="password"],
    .standard-form input[type="number"],
    .standard-form input[type="date"],
    .standard-form select,
    .standard-form textarea,
    .admin-user-search input,
    .identity-form input,
    .identity-form select,
    .block-form select,
    .gallery-upload-form input,
    .wall-comment-form input,
    .friend-chat-window > form input,
    #msg-input {
        min-height: 42px;
        font-size: 16px;
    }

    .login-submit {
        width: 42px;
        height: 42px;
        margin: 0;
    }

    .register-link {
        grid-column: 1 / -1;
        min-height: 32px;
        display: grid;
        place-items: center;
        margin: 0;
    }

    .online-status {
        padding: 6px 12px;
        text-align: center;
    }

    .main-nav {
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 4px;
        padding: 0 8px;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .main-nav::-webkit-scrollbar {
        display: none;
    }

    .main-nav a {
        flex: 0 0 auto;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        padding: 0 10px;
        white-space: nowrap;
    }

    .main-nav .is-disabled {
        display: none;
    }

    .content,
    .main-grid,
    .games-page {
        padding: 12px;
    }

    .info-bar {
        margin: 10px 12px 2px;
        padding: 9px 10px;
        align-items: flex-start;
        line-height: 1.4;
    }

    .info-label {
        flex: 0 0 auto;
    }

    .auth-notice,
    .verification-warning,
    .warning-banner,
    .success-banner,
    .error-banner {
        padding: 11px 12px;
        line-height: 1.45;
    }

    .verification-actions {
        width: 100%;
    }

    .verification-actions form,
    .verification-actions .notice-button,
    .verification-actions a {
        width: 100%;
    }

    .notice-button,
    .btn-main,
    .btn-primary,
    .btn-send {
        min-height: 42px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 9px 13px;
    }

    .main-grid {
        gap: 14px;
    }

    .categories {
        gap: 7px;
    }

    .cat-box {
        min-height: 66px;
        align-items: center;
        padding: 10px;
        border: 1px solid var(--oris-border);
        background: #fff;
        box-shadow: 0 2px 8px rgba(23,42,67,.06);
    }

    .cat-icon {
        width: 44px !important;
        height: 44px !important;
    }

    .cat-text h3 {
        font-size: 14px;
    }

    .cat-text p {
        font-size: 12px;
    }

    .sidebar {
        padding-top: 14px;
    }

    .login-box {
        padding: 12px;
        border-radius: 8px;
    }

    .login-box input {
        min-height: 42px;
        padding: 8px;
        font-size: 16px;
    }

    .user-photos {
        gap: 8px;
    }

    .photo-slot {
        width: 58px;
        height: 68px;
        border-radius: 5px;
        overflow: hidden;
    }

    .profile-view-container {
        gap: 12px;
    }

    .left-col {
        display: grid;
        justify-items: center;
    }

    .profile-photo-large {
        width: min(260px, 100%);
        height: auto;
        aspect-ratio: 4 / 5;
    }

    .profile-info-table,
    .profile-info-table tbody,
    .profile-info-table tr,
    .profile-info-table th,
    .profile-info-table td {
        display: block;
        width: 100%;
    }

    .profile-info-table tr {
        border-bottom: 1px solid #e6ebf2;
        padding: 7px 0;
    }

    .profile-info-table th {
        border: 0;
        padding: 0 8px 3px;
        background: transparent;
        font-size: 10px;
        text-transform: uppercase;
    }

    .profile-info-table td {
        border: 0;
        padding: 0 8px;
        overflow-wrap: anywhere;
    }

    .profile-list-grid {
        gap: 10px;
    }

    .profile-card {
        padding: 10px;
        border-radius: 8px;
    }

    .friends-grid {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .friend-card,
    .friend-avatar {
        width: 100%;
    }

    .friend-avatar {
        height: auto;
        aspect-ratio: 1;
    }

    .rooms-toolbar {
        flex-direction: column;
        align-items: stretch !important;
        gap: 10px;
    }

    .rooms-toolbar h2 {
        font-size: 20px;
    }

    .rooms-search-form {
        width: 100%;
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .rooms-search-form input {
        min-width: 0;
        min-height: 42px;
        padding: 8px !important;
        font-size: 16px;
    }

    .rooms-layout {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    .rooms-sidebar {
        overflow-x: auto;
        border: 1px solid var(--oris-border);
        border-radius: 8px;
        padding: 8px 10px;
        background: var(--oris-surface);
    }

    .rooms-sidebar h4 {
        margin: 0 0 7px;
    }

    .rooms-sidebar ul {
        display: flex;
        gap: 6px;
        margin: 0;
        min-width: max-content;
    }

    .rooms-sidebar li,
    .rooms-sidebar li[style] {
        margin: 0 !important;
    }

    .rooms-sidebar a {
        min-height: 36px;
        display: inline-flex;
        align-items: center;
        padding: 6px 9px;
        border-radius: 999px;
        background: #fff;
        border: 1px solid var(--oris-border);
        white-space: nowrap;
    }

    .rooms-table,
    .rooms-table tbody {
        display: block;
        width: 100%;
    }

    .room-row {
        display: grid;
        grid-template-columns: 54px minmax(0, 1fr) auto;
        align-items: center;
        margin-bottom: 8px;
        border: 1px solid var(--oris-border) !important;
        border-radius: 8px;
        overflow: hidden;
        background: #fff;
    }

    .room-row td {
        display: block;
        width: auto !important;
        min-width: 0;
    }

    .room-icon-cell,
    .room-info-cell,
    .room-meta-cell {
        padding: 8px !important;
    }

    .room-info-cell strong {
        font-size: 14px !important;
    }

    .room-info-cell span {
        display: block;
        margin-top: 3px;
        line-height: 1.35;
    }

    .room-meta-cell {
        width: 46px !important;
    }

    .room-meta-cell > span:first-child {
        display: none !important;
    }

    .room-container {
        height: calc(100dvh - 166px) !important;
        min-height: 520px;
        border-left: 0 !important;
        border-right: 0 !important;
    }

    .room-header {
        gap: 8px;
        padding: 9px 10px !important;
    }

    .room-title-wrap {
        min-width: 0;
    }

    .room-title-wrap > div {
        min-width: 0;
    }

    .room-title {
        display: block;
        font-size: 16px !important;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .room-description {
        display: block;
        margin: 2px 0 0 !important;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .room-main {
        grid-template-columns: 1fr !important;
        grid-template-rows: minmax(0, 1fr) 76px;
    }

    .room-messages {
        border-right: 0 !important;
        padding: 9px !important;
        font-size: 13px !important;
        overscroll-behavior: contain;
    }

    .room-users {
        border-left: 0 !important;
        border-top: 1px solid #ccd5e1;
        padding: 7px 10px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        white-space: nowrap;
    }

    .room-users > strong {
        display: inline !important;
        border: 0 !important;
        margin-right: 8px !important;
    }

    #active-users {
        display: inline-flex;
        gap: 10px;
        align-items: center;
    }

    #active-users > div {
        margin: 0 !important;
    }

    .room-footer {
        padding: 7px !important;
        padding-bottom: max(7px, env(safe-area-inset-bottom)) !important;
    }

    .chat-form {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto auto;
        gap: 6px !important;
    }

    .btn-send {
        padding-inline: 12px;
    }

    .smiley-button {
        width: 42px;
        height: 42px;
        padding: 0 !important;
        border-radius: 6px;
    }

    .smiley-picker {
        left: 8px;
        right: 8px;
        bottom: 60px;
        grid-template-columns: repeat(5, 1fr);
        justify-items: center;
    }

    .games-heading,
    .social-page-heading {
        align-items: stretch;
    }

    .games-count,
    .social-page-heading > span {
        align-self: flex-start;
    }

    .games-grid {
        gap: 9px;
    }

    .game-card {
        min-height: 132px;
        padding: 12px;
    }

    .game-icon {
        font-size: 30px;
    }

    .gallery-upload-form {
        padding: 10px;
    }

    .wall-post > header {
        grid-template-columns: 38px minmax(0, 1fr) auto;
        padding: 9px;
    }

    .wall-avatar {
        width: 38px;
        height: 38px;
    }

    .wall-content {
        padding: 12px;
        overflow-wrap: anywhere;
    }

    .wall-comment {
        display: block;
    }

    .wall-comment small {
        display: block;
        margin: 4px 0 0;
    }

    .wall-comment-form button {
        min-width: 42px;
        min-height: 42px;
    }

    .admin-sidebar {
        width: min(84vw, 310px);
        padding: 16px;
        padding-top: max(16px, env(safe-area-inset-top));
    }

    .admin-close-btn {
        display: block;
        width: 42px;
        height: 42px;
        margin: 0 0 10px auto;
        padding: 0;
    }

    .admin-sidebar a {
        min-height: 42px;
        display: flex;
        align-items: center;
        padding: 8px 0;
        font-size: 12px;
    }

    .admin-toggle-btn {
        left: 10px;
        bottom: max(10px, env(safe-area-inset-bottom));
        width: 48px;
        height: 48px;
        border-width: 2px;
        font-size: 23px;
    }

    .admin-user-card {
        padding: 10px;
    }

    .identity-form,
    .block-form {
        display: grid;
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .identity-form .btn-main,
    .block-form .btn-main {
        width: 100%;
    }

    .ad-wrapper {
        margin: 16px auto;
    }

    .ad-container {
        min-height: 90px;
        padding: 8px;
    }

    footer {
        padding: 14px 62px 74px;
        line-height: 1.5;
    }

    .friend-chat-dock {
        right: 8px;
        bottom: max(8px, env(safe-area-inset-bottom));
    }

    .friend-chat-launcher {
        width: 48px;
        height: 48px;
    }

    .friend-chat-panel {
        position: fixed;
        left: 8px;
        right: 8px;
        bottom: calc(66px + env(safe-area-inset-bottom));
        width: auto;
        max-height: min(58dvh, 440px);
        border-radius: 12px;
    }

    .friend-chat-list {
        max-height: calc(min(58dvh, 440px) - 44px);
    }

    .friend-chat-friend {
        min-height: 54px;
    }

    .friend-chat-windows {
        position: fixed;
        left: 8px;
        right: 8px;
        bottom: 0;
        display: block;
    }

    .friend-chat-window {
        width: 100%;
        height: min(68dvh, 520px);
        border-radius: 14px 14px 0 0;
        padding-bottom: env(safe-area-inset-bottom);
    }

    .friend-chat-panel-head,
    .friend-chat-window > header {
        min-height: 44px;
    }

    .friend-chat-window > form {
        padding: 7px;
    }

    .friend-chat-window > form button {
        width: 42px;
        height: 42px;
    }
}

@media (max-width: 480px) {
    .site-header {
        padding-inline: 10px;
    }

    .header-login {
        grid-template-columns: 1fr 44px;
    }

    .header-login .input-group {
        grid-column: 1 / -1;
    }

    .header-login .login-submit {
        grid-column: 2;
        grid-row: 3;
    }

    .header-login .register-link {
        grid-column: 1;
        grid-row: 3;
        justify-content: start;
        padding-left: 2px;
    }

    .content,
    .main-grid,
    .games-page {
        padding: 10px;
    }

    .info-bar {
        margin-inline: 10px;
    }

    .friends-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .profile-card {
        display: grid;
        grid-template-columns: 64px minmax(0, 1fr);
    }

    .profile-card img {
        width: 64px;
        height: 78px;
    }

    .games-grid,
    .gallery-grid {
        grid-template-columns: 1fr;
    }

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

    .social-page-heading {
        flex-direction: column;
    }

    .wall-post > header {
        grid-template-columns: 36px minmax(0, 1fr);
    }

    .wall-post > header > form,
    .wall-post > header > .link-danger {
        grid-column: 2;
        justify-self: start;
    }

    .room-row {
        grid-template-columns: 48px minmax(0, 1fr) 38px;
    }

    .room-icon-cell img {
        width: 28px;
        height: 28px;
    }

    .room-container {
        min-height: 480px;
    }

    .room-header img {
        width: 28px;
        height: 28px;
    }

    .room-header > div:last-child a {
        font-size: 0;
    }

    .room-header > div:last-child a::after {
        content: "✕";
        font-size: 18px;
    }

    .btn-send {
        width: 44px;
        padding: 0;
        font-size: 0;
    }

    .btn-send::after {
        content: "➤";
        font-size: 18px;
    }

    .admin-user-search .btn-main {
        width: 100%;
    }
}

@media (max-width: 768px) and (orientation: landscape) {
    .room-container {
        height: calc(100dvh - 120px) !important;
        min-height: 340px;
    }

    .room-main {
        grid-template-rows: minmax(0, 1fr) 60px;
    }

    .friend-chat-window {
        height: min(84dvh, 460px);
    }
}

/* --- Soukromý chat: oprava mobilního ovládání 1.2.3 --- */
.friend-chat-window > header {
    min-width: 0;
    user-select: none;
}

.friend-chat-window > header strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.friend-chat-window-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 0 0 auto;
}

.friend-chat-window > header .friend-chat-window-actions button {
    margin-left: 0;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    line-height: 1;
    font-size: 20px;
}

.friend-chat-window > header .friend-chat-window-actions button:hover,
.friend-chat-window > header .friend-chat-window-actions button:focus-visible {
    background: rgba(255,255,255,.14);
    outline: none;
}

.friend-chat-window.is-minimized {
    width: 220px;
    height: 42px;
    grid-template-rows: 1fr;
    border-radius: 10px;
}

.friend-chat-window.is-minimized > header {
    height: 100%;
    cursor: pointer;
}

.friend-chat-window.is-minimized > .friend-chat-messages,
.friend-chat-window.is-minimized > .friend-chat-status,
.friend-chat-window.is-minimized > form {
    display: none;
}

@media (max-width: 700px) {
    .friend-chat-dock.has-expanded-chat .friend-chat-launcher {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(8px) scale(.9);
    }

    .friend-chat-launcher {
        transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
    }

    .friend-chat-window > header .friend-chat-window-actions button {
        width: 38px;
        height: 38px;
        font-size: 23px;
    }

    .friend-chat-window.is-minimized {
        width: calc(100% - 58px);
        height: 48px;
        margin-right: 58px;
        margin-bottom: max(8px, env(safe-area-inset-bottom));
        padding-bottom: 0;
        border-radius: 999px;
        overflow: hidden;
    }

    .friend-chat-window.is-minimized > header {
        min-height: 48px;
        padding: 5px 7px 5px 14px;
        border-radius: 999px;
    }

    .friend-chat-window.is-minimized .friend-chat-close {
        display: none;
    }

    .friend-chat-window.is-minimized .friend-chat-minimize {
        background: rgba(255,255,255,.14);
    }

    .friend-chat-window:not(.is-minimized) > form {
        position: relative;
        z-index: 2;
        padding-right: 8px;
        background: #fff;
    }

    .friend-chat-window:not(.is-minimized) > form button {
        flex: 0 0 44px;
        width: 44px;
        height: 44px;
    }
}

/* --- Evidence rozehraných online her 1.2.4 --- */
.my-games-section {
    margin: 0 0 22px;
    padding: 15px;
    border: 1px solid #9db3cf;
    border-radius: 12px;
    background: linear-gradient(145deg, #f8fbff, #eaf1f9);
    box-shadow: 0 7px 20px rgba(23, 42, 67, .1);
}
.my-games-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}
.my-games-heading h3 {
    margin: 0 0 4px;
    color: var(--oris-deep);
    font-size: 18px;
}
.my-games-heading p {
    margin: 0;
    color: #5b6c80;
    line-height: 1.4;
}
.my-games-grid {
    display: grid;
    gap: 10px;
}
.my-game-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--oris-border);
    border-radius: 9px;
    background: #fff;
}
.my-game-main {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}
.my-game-icon {
    display: grid;
    place-items: center;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--oris-deep);
    font-size: 25px;
}
.my-game-main strong {
    display: block;
    color: var(--oris-primary-dark);
    font-size: 14px;
}
.my-game-meta {
    margin-top: 4px;
    color: #64758a;
    font-size: 10px;
    line-height: 1.45;
}
.my-game-meta code {
    padding: 1px 5px;
    border-radius: 5px;
    background: #e9f0f8;
    color: var(--oris-deep);
    font-weight: 800;
}
.my-game-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}
.compact-btn,
.my-game-actions .compact-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    margin: 0;
    padding: 7px 11px;
    border-radius: 6px;
    border: 1px solid transparent;
    font: inherit;
    font-size: 10px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}
.btn-secondary {
    border-color: #9db3cf;
    background: #fff;
    color: var(--oris-primary-dark);
}
.btn-secondary:hover { background: #edf3fa; }
.btn-danger {
    border-color: #b42318;
    background: #b42318;
    color: #fff;
}
.btn-danger:hover { background: #8f1c14; }
.compact-btn:disabled {
    opacity: .55;
    cursor: wait;
}
.games-action-message {
    min-height: 18px;
    margin-top: 9px;
    color: var(--oris-primary-dark);
    font-size: 11px;
    font-weight: 700;
}

@media (max-width: 700px) {
    .my-games-section { padding: 11px; }
    .my-games-heading { flex-direction: column; gap: 8px; }
    .my-game-card { align-items: stretch; flex-direction: column; }
    .my-game-actions { display: grid; grid-template-columns: 1fr; }
    .my-game-actions .compact-btn { width: 100%; min-height: 42px; font-size: 12px; }
    .my-game-meta { font-size: 11px; }
}

/* --- Cookies lišta a editovatelný právní obsah 1.2.5 --- */
.site-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px 14px;
    flex-wrap: wrap;
}

.site-footer-links {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.site-footer-links a {
    color: var(--oris-primary-dark);
    font-weight: 700;
    text-decoration: none;
}

.site-footer-links a:hover,
.site-footer-links a:focus-visible {
    text-decoration: underline;
}

.cookie-consent-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 15000;
    padding: 12px max(14px, env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
    border-top: 1px solid rgba(142, 176, 220, .55);
    background: rgba(23, 42, 67, .98);
    color: #fff;
    box-shadow: 0 -10px 30px rgba(9, 23, 40, .24);
    backdrop-filter: blur(8px);
}

.cookie-consent-inner {
    width: min(960px, 100%);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.cookie-consent-inner p {
    flex: 1 1 auto;
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
}

.cookie-consent-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cookie-consent-actions a {
    color: #d9e8fb;
    font-weight: 700;
    white-space: nowrap;
}

.cookie-consent-actions .btn-main {
    min-width: 100px;
    margin: 0;
    padding: 9px 15px;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 8px;
}

.cookie-bar-visible .friend-chat-dock {
    bottom: calc(var(--orischat-cookie-bar-height, 0px) + 12px);
}

.legal-page h2,
.admin-content-page h2 {
    margin-top: 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--oris-primary);
    color: var(--oris-primary-dark);
}

.legal-text {
    padding: 4px 2px;
    color: var(--oris-text);
    font-size: 13px;
    line-height: 1.7;
}

.legal-text p {
    margin: 0 0 1.25em;
}

.section-heading-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.section-heading-row p {
    margin: 0;
    color: #66778b;
    line-height: 1.45;
}

.site-content-form {
    display: grid;
    gap: 16px;
}

.admin-editor-card {
    display: grid;
    gap: 9px;
    padding: 18px;
    border: 1px solid var(--oris-border);
    border-radius: 12px;
    background: #f8fbff;
    box-shadow: 0 6px 18px rgba(23, 42, 67, .07);
}

.admin-editor-card h3 {
    margin: 0;
    color: var(--oris-deep);
    font-size: 16px;
}

.admin-editor-card label {
    color: var(--oris-deep);
    font-weight: 800;
}

.admin-editor-card input[type="text"],
.admin-editor-card textarea {
    width: 100%;
    min-width: 0;
    padding: 10px 11px;
    border: 1px solid #9eb2cb;
    border-radius: 8px;
    background: #fff;
    color: var(--oris-text);
    font: inherit;
    font-size: 13px;
    line-height: 1.5;
}

.admin-editor-card textarea {
    resize: vertical;
}

.admin-editor-card input:focus,
.admin-editor-card textarea:focus {
    outline: 3px solid rgba(115, 148, 197, .22);
    border-color: var(--oris-primary-dark);
}

.admin-editor-card small {
    color: #66778b;
    line-height: 1.45;
}

.admin-editor-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 4px;
}

.admin-editor-card-head p {
    margin: 5px 0 0;
    color: #66778b;
    line-height: 1.45;
}

.switch-field {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 7px 10px;
    border: 1px solid var(--oris-border);
    border-radius: 999px;
    background: #fff;
    cursor: pointer;
}

.switch-field input {
    width: 18px;
    height: 18px;
    accent-color: var(--oris-primary-dark);
}

.site-content-save {
    justify-self: start;
    min-height: 42px;
    margin: 0;
    padding: 10px 18px;
}

@media (max-width: 700px) {
    .site-footer {
        align-items: center;
        flex-direction: column;
        gap: 5px;
    }

    .cookie-consent-bar {
        padding: 11px 12px calc(11px + env(safe-area-inset-bottom));
    }

    .cookie-consent-inner {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
    }

    .cookie-consent-inner p {
        font-size: 12px;
    }

    .cookie-consent-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .cookie-consent-actions a,
    .cookie-consent-actions .btn-main {
        min-height: 42px;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        margin: 0;
        text-align: center;
    }

    .cookie-consent-actions a {
        border: 1px solid rgba(255,255,255,.25);
        border-radius: 8px;
        text-decoration: none;
    }

    .section-heading-row,
    .admin-editor-card-head {
        align-items: stretch;
        flex-direction: column;
    }

    .section-heading-row .compact-btn,
    .site-content-save {
        width: 100%;
        min-height: 44px;
    }

    .admin-editor-card {
        padding: 13px;
    }

    .admin-editor-card input[type="text"],
    .admin-editor-card textarea {
        min-height: 44px;
        font-size: 16px;
    }

    .switch-field {
        width: 100%;
        border-radius: 8px;
    }
}

@media (max-width: 420px) {
    .cookie-consent-actions {
        grid-template-columns: 1fr;
    }
}

/* ORISchat 1.3.0 – hlášení, moderace, historie IPv4/IPv6 */
.report-link {
    appearance: none;
    border: 0;
    background: transparent;
    color: #6b7788;
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    padding: 2px 5px;
    text-decoration: underline;
}
.report-link:hover { color: #b42318; }
.room-report-link { margin-left: 6px; text-decoration: none; opacity: .72; }
.wall-post-actions, .wall-comment-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.wall-post-actions form, .wall-comment-actions form { margin: 0; }
.private-report-link { display: block; margin: 1px 0 0 auto; padding: 0 3px; text-decoration: none; opacity: .65; }

.report-modal[hidden] { display: none !important; }
.report-modal { position: fixed; inset: 0; z-index: 12000; display: grid; place-items: center; padding: 16px; }
.report-modal-backdrop { position: absolute; inset: 0; background: rgba(9, 20, 36, .68); backdrop-filter: blur(2px); }
.report-modal-card {
    position: relative; z-index: 1; width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto;
    background: #fff; border: 1px solid var(--oris-border); border-radius: 16px; padding: 22px;
    box-shadow: 0 24px 70px rgba(0,0,0,.35);
}
.report-modal-card h3 { margin: 0 34px 6px 0; color: var(--oris-deep); }
.report-modal-card p { color: #5c6776; margin-top: 0; }
.report-modal-card form { display: grid; gap: 13px; }
.report-modal-card label { display: grid; gap: 6px; font-weight: 700; color: #24364d; }
.report-modal-card select, .report-modal-card textarea { width: 100%; box-sizing: border-box; }
.report-modal-card textarea { min-height: 100px; resize: vertical; }
.report-modal-close { position: absolute; top: 10px; right: 12px; border: 0; background: transparent; font-size: 28px; cursor: pointer; color: #526176; }
.report-modal-status { min-height: 20px; color: #315d91; font-weight: 700; }
body.report-modal-open { overflow: hidden; }

.moderation-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 18px; }
.moderation-filter a { padding: 8px 12px; border: 1px solid var(--oris-border); border-radius: 999px; text-decoration: none; color: var(--oris-primary-dark); background: #fff; }
.moderation-filter a.active { background: var(--oris-deep); color: #fff; border-color: var(--oris-deep); }
.moderation-layout { display: grid; grid-template-columns: minmax(240px, 330px) minmax(0, 1fr); gap: 18px; align-items: start; }
.moderation-list { display: grid; gap: 8px; max-height: 75vh; overflow: auto; }
.moderation-list-item { display: grid; gap: 4px; padding: 12px; background: #fff; border: 1px solid var(--oris-border); border-radius: 10px; text-decoration: none; color: #24364d; }
.moderation-list-item:hover, .moderation-list-item.active { border-color: var(--oris-primary); box-shadow: 0 5px 18px rgba(40,77,119,.13); }
.moderation-list-item span, .moderation-list-item small { color: #6b7788; }
.moderation-detail { background: #fff; border: 1px solid var(--oris-border); border-radius: 14px; padding: 18px; min-width: 0; }
.moderation-detail h3 { margin-top: 0; color: var(--oris-deep); }
.report-details, .moderation-resolution { background: #f5f8fc; border-left: 4px solid var(--oris-primary); padding: 11px 13px; border-radius: 6px; }
.moderation-context { display: grid; gap: 6px; max-height: 390px; overflow: auto; padding: 6px; background: #edf2f8; border-radius: 10px; }
.moderation-context-row { display: grid; grid-template-columns: auto minmax(90px, 150px) minmax(0, 1fr); gap: 8px; align-items: start; padding: 9px; background: #fff; border: 1px solid #d9e2ed; border-radius: 8px; }
.moderation-context-row.reported { border: 2px solid #c43f3f; background: #fff4f3; }
.moderation-context-row small { color: #7a8798; }
.moderation-context-row span { overflow-wrap: anywhere; }
.moderation-action-form { margin-top: 18px; display: grid; gap: 12px; border-top: 1px solid var(--oris-border); padding-top: 16px; }
.moderation-action-form > label { display: grid; gap: 6px; font-weight: 700; }
.moderation-action-form textarea { min-height: 90px; resize: vertical; }
.moderation-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.moderation-buttons button { min-height: 38px; }

.history-summary { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px 18px; background: #f5f8fc; border: 1px solid var(--oris-border); border-radius: 12px; padding: 15px; margin-bottom: 20px; }
.history-list { display: grid; gap: 10px; margin-bottom: 24px; }
.history-card { background: #fff; border: 1px solid var(--oris-border); border-radius: 12px; padding: 14px; }
.history-card.active { border-left: 5px solid #bf7a11; }
.history-card header { display: flex; justify-content: space-between; gap: 12px; }
.history-card small { display: block; margin-top: 6px; color: #6b7788; }
.revoke-penalty-form { display: flex; gap: 8px; margin-top: 10px; }
.revoke-penalty-form input { flex: 1; }
.table-scroll { overflow-x: auto; margin-bottom: 24px; }
.history-table { width: 100%; border-collapse: collapse; background: #fff; }
.history-table th, .history-table td { padding: 9px 10px; border: 1px solid var(--oris-border); text-align: left; white-space: nowrap; }
.history-table th { background: #edf3fa; color: var(--oris-deep); }
.history-report-link { display: grid; gap: 4px; padding: 10px 12px; border: 1px solid var(--oris-border); border-radius: 10px; text-decoration: none; color: #24364d; background: #fff; }
.history-report-link small { color: #6b7788; }

@media (max-width: 820px) {
    .moderation-layout { grid-template-columns: 1fr; }
    .moderation-list { max-height: 320px; }
    .moderation-context-row { grid-template-columns: 1fr; gap: 3px; }
    .history-summary { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .report-modal { padding: 8px; align-items: end; }
    .report-modal-card { width: 100%; max-height: 88vh; border-radius: 16px 16px 0 0; padding: 18px 14px calc(18px + env(safe-area-inset-bottom)); }
    .moderation-detail { padding: 13px; }
    .moderation-buttons { display: grid; }
    .moderation-buttons button { width: 100%; }
    .revoke-penalty-form { flex-direction: column; }
    .wall-post-actions { align-self: flex-start; }
}
.report-snapshot { margin: 10px 0 14px; padding: 11px 13px; background: #fff8e8; border: 1px solid #e6c678; border-radius: 8px; overflow-wrap: anywhere; }
