:root {
    --cq-bg: #0b1320;
    --cq-bg-soft: #111d2e;
    --cq-card: rgba(18, 31, 49, .94);
    --cq-line: rgba(255, 255, 255, .10);
    --cq-text: #eef4fb;
    --cq-muted: #9fb0c5;
    --cq-gold: #f5c451;
    --cq-green: #3ac47d;
    --cq-red: #ef6262;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body.cq-body {
    margin: 0;
    color: var(--cq-text);
    background:
        radial-gradient(circle at 20% 0%, rgba(58, 196, 125, .12), transparent 34rem),
        radial-gradient(circle at 90% 10%, rgba(245, 196, 81, .12), transparent 30rem),
        linear-gradient(155deg, #08111c 0%, var(--cq-bg) 54%, #101a29 100%);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
}

.cq-shell { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; }
.cq-nav {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    min-height: 72px; border-bottom: 1px solid var(--cq-line);
}
.cq-brand { color: var(--cq-text); text-decoration: none; font-size: 1.25rem; font-weight: 800; letter-spacing: .04em; }
.cq-brand span { color: var(--cq-gold); }
.cq-nav-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem; }
.cq-player-badge { color: var(--cq-muted); font-size: .92rem; margin-right: .25rem; }
.cq-player-badge strong { color: var(--cq-text); }

.cq-hero {
    min-height: calc(100vh - 73px); display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
    gap: clamp(2rem, 6vw, 5rem); align-items: center; padding: 4rem 0 5rem;
}
.cq-kicker { color: var(--cq-gold); text-transform: uppercase; letter-spacing: .16em; font-weight: 800; font-size: .78rem; }
.cq-title { margin: .65rem 0 1rem; max-width: 820px; font-size: clamp(3rem, 8vw, 6.8rem); line-height: .88; letter-spacing: -.055em; }
.cq-title span { display: block; color: var(--cq-gold); }
.cq-lead { color: var(--cq-muted); max-width: 700px; font-size: clamp(1rem, 2vw, 1.18rem); line-height: 1.7; }
.cq-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.7rem; }

.cq-card {
    background: var(--cq-card); border: 1px solid var(--cq-line); border-radius: 22px;
    box-shadow: 0 24px 65px rgba(0,0,0,.28); padding: clamp(1.25rem, 3vw, 2rem);
    backdrop-filter: blur(14px);
}
.cq-card h1, .cq-card h2, .cq-card h3 { margin-top: 0; }
.cq-card p { color: var(--cq-muted); line-height: 1.6; }

.cq-page { padding: 2.5rem 0 5rem; }
.cq-page-header { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.5rem; }
.cq-page-header h1 { margin: 0; font-size: clamp(2rem, 5vw, 3.4rem); }
.cq-page-header p { margin: .45rem 0 0; color: var(--cq-muted); }
.cq-auth-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; align-items: start; }
.cq-form { display: grid; gap: 1rem; }
.cq-field { display: grid; gap: .4rem; }
.cq-field label { font-weight: 700; font-size: .9rem; }
.cq-help { color: var(--cq-muted); font-size: .83rem; line-height: 1.45; }
.cq-divider { display: flex; align-items: center; gap: .7rem; color: var(--cq-muted); margin: .25rem 0; }
.cq-divider::before, .cq-divider::after { content: ""; flex: 1; height: 1px; background: var(--cq-line); }
.cq-status { border-radius: 14px; padding: .85rem 1rem; background: rgba(58,196,125,.10); border: 1px solid rgba(58,196,125,.25); }
.cq-status strong { color: var(--cq-green); }

.cq-body .ui-inputfield,
.cq-body .ui-password,
.cq-body .ui-password input,
.cq-body .ui-selectonemenu,
.cq-body .ui-inputtextarea {
    width: 100%;
}
.cq-body .ui-inputfield,
.cq-body .ui-password input,
.cq-body .ui-inputtextarea {
    background: rgba(255,255,255,.055); color: var(--cq-text); border-color: rgba(255,255,255,.14);
}
.cq-body .ui-button { border-radius: 11px; }
.cq-body .cq-primary.ui-button { background: var(--cq-gold); border-color: var(--cq-gold); color: #2c2106; font-weight: 800; }
.cq-body .cq-secondary.ui-button { background: transparent; border-color: rgba(255,255,255,.2); color: var(--cq-text); }
.cq-body .ui-datatable, .cq-body .ui-datatable .ui-datatable-data > tr, .cq-body .ui-datatable thead th {
    background: transparent;
}
.cq-body .ui-datatable .ui-datatable-data > tr > td, .cq-body .ui-datatable thead th { border-color: var(--cq-line); color: var(--cq-text); }
.cq-body .ui-datatable thead th { background: rgba(255,255,255,.04); }

.cq-status-chip { display: inline-flex; align-items: center; padding: .3rem .58rem; border-radius: 999px; font-size: .76rem; font-weight: 800; }
.cq-status-PENDING { background: rgba(245,196,81,.16); color: #ffd978; }
.cq-status-APPROVED { background: rgba(58,196,125,.16); color: #70e5a8; }
.cq-status-REJECTED { background: rgba(239,98,98,.16); color: #ff9797; }

@media (max-width: 820px) {
    .cq-shell { width: min(100% - 1.1rem, 1180px); }
    .cq-nav { align-items: flex-start; padding: .9rem 0; }
    .cq-nav, .cq-page-header { flex-direction: column; }
    .cq-hero, .cq-auth-grid { grid-template-columns: 1fr; }
    .cq-hero { padding: 2.6rem 0 4rem; }
}


/* Readability pass: the original compact prototype typography was too small on desktop. */
body.cq-body { font-size: 16px; line-height: 1.5; }
.cq-player-badge { font-size: 1rem; }
.cq-kicker { font-size: .88rem; }
.cq-field label { font-size: 1rem; }
.cq-help { font-size: .92rem; }
.cq-status-chip { font-size: .86rem; }
.cq-body .ui-inputfield,
.cq-body .ui-password input,
.cq-body .ui-inputtextarea,
.cq-body .ui-selectonemenu,
.cq-body .ui-button { font-size: 1rem; }
.cq-body .ui-datatable .ui-datatable-data > tr > td,
.cq-body .ui-datatable thead th { font-size: .95rem; }


/* Project-local Conqueror/Honfoglaló brand mark. */
.cq-brand.cq-brand-image { display:inline-flex; align-items:center; padding:0; border:0; background:transparent; line-height:1; text-decoration:none; }
.cq-brand.cq-brand-image img { display:block; width:auto; height:42px; max-width:min(220px,42vw); }
.cq-game-brand.cq-brand-image img { height:44px; max-width:215px; }
@media (max-width:620px) { .cq-brand.cq-brand-image img { height:34px; max-width:175px; } .cq-game-brand.cq-brand-image img { height:36px; } }


/* v20.9 public-page UX polish */
.cq-home-hero {
    grid-template-columns: minmax(0, 900px);
    justify-content: center;
    text-align: left;
}
.cq-home-intro { width: 100%; }
.cq-home-sublead {
    max-width: 760px;
    margin: 1rem 0 0;
    color: #c3cfdd;
    font-size: clamp(.98rem, 1.8vw, 1.08rem);
    line-height: 1.65;
}

.cq-auth-grid { align-items: stretch; }
.cq-auth-grid > .cq-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}
.cq-auth-grid > .cq-card > .cq-form { flex: 1; align-content: start; }

.cq-register-card { max-width: 720px; margin: 0 auto; }
.cq-field-message {
    display: block;
    margin-top: -.08rem;
    color: #ffb1b1;
    font-size: .88rem;
    line-height: 1.35;
}


/* v20.11 unified parchment theme for public/account/admin pages.
   Gameplay and lobby keep their dedicated theme files. */
body.cq-body:not(.cq-game-body):not(.cq-lobby-body) {
    --cq-public-paper: #e5c98f;
    --cq-public-paper-light: #f5e3b8;
    --cq-public-paper-soft: #d8b878;
    --cq-public-ink: #442918;
    --cq-public-muted: #765b3d;
    --cq-public-line: rgba(103, 66, 32, .35);
    --cq-public-wine: #6f351f;
    --cq-public-wine-dark: #472115;
    --cq-public-gold: #c18a3b;
    color: #f4e2bd;
    background:
        radial-gradient(circle at 16% 6%, rgba(161, 106, 49, .24), transparent 34rem),
        radial-gradient(circle at 86% 16%, rgba(117, 75, 34, .22), transparent 30rem),
        linear-gradient(135deg, #2c1b12 0%, #17100c 54%, #2a1a11 100%);
}

body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .cq-shell {
    padding-bottom: 1.25rem;
}

body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .cq-nav {
    min-height: 72px;
    margin-bottom: .6rem;
    padding: .6rem .85rem;
    border: 1px solid rgba(224, 183, 109, .25);
    border-top: 0;
    border-radius: 0 0 14px 14px;
    background: linear-gradient(180deg, rgba(62, 37, 22, .98), rgba(34, 23, 16, .98));
    box-shadow: 0 12px 30px rgba(0, 0, 0, .24), inset 0 -1px rgba(255, 226, 167, .06);
}

body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .cq-player-badge {
    color: #d8bd8d;
}
body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .cq-player-badge strong {
    color: #fff0c7;
}

body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .cq-page {
    padding-top: 1.4rem;
}

body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .cq-page-header {
    margin-bottom: 1rem;
    padding: .25rem .25rem .15rem;
}
body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .cq-page-header h1 {
    color: #f4dfb3;
    font-family: Georgia, "Times New Roman", serif;
    text-shadow: 0 2px 0 rgba(42, 21, 10, .55);
}
body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .cq-page-header p {
    color: #ceb98f;
}

body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .cq-home-hero {
    min-height: calc(100vh - 98px);
    padding: clamp(1.5rem, 4vw, 3rem) 0 4rem;
}
body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .cq-home-intro {
    position: relative;
    overflow: hidden;
    padding: clamp(1.5rem, 4vw, 3rem);
    border: 1px solid rgba(103, 66, 32, .52);
    border-radius: 20px;
    color: var(--cq-public-ink);
    background:
        linear-gradient(96deg, rgba(255, 252, 232, .28), transparent 35%),
        repeating-linear-gradient(10deg, rgba(83, 49, 22, .027) 0 1px, transparent 1px 9px),
        linear-gradient(145deg, var(--cq-public-paper-light), var(--cq-public-paper) 60%, #d1ad6c);
    box-shadow:
        inset 0 1px rgba(255, 255, 255, .6),
        inset 0 0 42px rgba(103, 63, 27, .1),
        0 24px 58px rgba(0, 0, 0, .28);
}
body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .cq-home-intro::after {
    content: "";
    position: absolute;
    inset: 9px;
    pointer-events: none;
    border: 1px solid rgba(112, 72, 34, .13);
    border-radius: 13px;
}
body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .cq-home-intro > * {
    position: relative;
    z-index: 1;
}
body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .cq-kicker {
    color: #8a5226;
}
body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .cq-title {
    color: #3e2516;
    font-family: Georgia, "Times New Roman", serif;
    text-shadow: 0 1px rgba(255,255,255,.42);
}
body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .cq-title span {
    color: #8a4d23;
}
body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .cq-lead,
body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .cq-home-sublead {
    color: var(--cq-public-muted);
}

body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .cq-card {
    position: relative;
    overflow: hidden;
    color: var(--cq-public-ink);
    border: 1px solid rgba(103, 66, 32, .5);
    background:
        linear-gradient(98deg, rgba(255, 252, 232, .24), transparent 35%),
        repeating-linear-gradient(11deg, rgba(85, 51, 24, .026) 0 1px, transparent 1px 9px),
        linear-gradient(145deg, var(--cq-public-paper-light), var(--cq-public-paper) 58%, #d2af6d);
    box-shadow:
        inset 0 1px rgba(255, 255, 255, .58),
        inset 0 0 36px rgba(103, 63, 27, .09),
        0 18px 42px rgba(0, 0, 0, .22);
    backdrop-filter: none;
}
body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .cq-card::after {
    content: "";
    position: absolute;
    inset: 7px;
    pointer-events: none;
    border: 1px solid rgba(111, 72, 35, .12);
    border-radius: 15px;
}
body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .cq-card > * {
    position: relative;
    z-index: 1;
}
body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .cq-card h1,
body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .cq-card h2,
body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .cq-card h3 {
    color: #442818;
    font-family: Georgia, "Times New Roman", serif;
}
body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .cq-card p,
body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .cq-help,
body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .cq-divider {
    color: var(--cq-public-muted);
}
body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .cq-divider::before,
body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .cq-divider::after {
    background: var(--cq-public-line);
}
body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .cq-field label,
body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .ui-outputlabel {
    color: #4d2e1b;
}

body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .ui-inputfield,
body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .ui-password input,
body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .ui-inputtextarea,
body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .ui-selectonemenu {
    color: #402719;
    border-color: rgba(112, 72, 36, .42);
    background: rgba(255, 248, 219, .75);
    box-shadow: inset 0 1px 3px rgba(78, 44, 19, .09);
}
body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .ui-inputfield:focus,
body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .ui-password input:focus,
body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .ui-inputtextarea:focus {
    border-color: #8b4d23;
    box-shadow: 0 0 0 3px rgba(139, 77, 35, .12), inset 0 1px 3px rgba(78, 44, 19, .09);
}

body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .cq-primary.ui-button {
    color: #fff1c7;
    border-color: #6d351d;
    background: linear-gradient(180deg, #8d4d27, #5b2d19);
    box-shadow: inset 0 1px rgba(255,255,255,.13), 0 5px 14px rgba(62, 31, 14, .18);
}
body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .cq-secondary.ui-button {
    color: #54331f;
    border-color: rgba(103, 66, 32, .45);
    background: linear-gradient(180deg, rgba(255, 246, 214, .9), rgba(208, 174, 113, .82));
}
body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .cq-secondary.ui-button:hover {
    border-color: rgba(112, 59, 28, .68);
    background: linear-gradient(180deg, #fff0c7, #d7b576);
}
body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .cq-nav .cq-secondary.ui-button {
    color: #edd6ab;
    border-color: rgba(218, 176, 106, .34);
    background: rgba(255, 247, 224, .04);
}
body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .cq-nav .cq-primary.ui-button {
    color: #fff0c4;
    border-color: #9b632e;
    background: linear-gradient(180deg, #9a5a2c, #67351e);
}

body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .ui-messages {
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,.14);
}
body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .cq-field-message {
    color: #8e2f29;
    font-weight: 750;
}

body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .cq-status {
    color: #3f2b18;
    border-color: rgba(68, 126, 67, .38);
    background: rgba(105, 154, 91, .14);
}
body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .cq-status strong {
    color: #336739;
}

body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .ui-datatable,
body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .ui-datatable .ui-datatable-data > tr {
    color: var(--cq-public-ink);
    background: rgba(255, 248, 222, .35);
}
body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .ui-datatable thead th {
    color: #52331e;
    border-color: rgba(103, 66, 32, .3);
    background: rgba(130, 83, 39, .10);
}
body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .ui-datatable .ui-datatable-data > tr > td {
    color: #533821;
    border-color: rgba(103, 66, 32, .22);
}
body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .ui-datatable .ui-datatable-data > tr:hover {
    background: rgba(255, 242, 203, .7);
}

body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .ui-dialog,
body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .ui-panel,
body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .ui-fieldset {
    color: var(--cq-public-ink);
    border-color: rgba(103, 66, 32, .4);
    background: linear-gradient(145deg, #f3dfb2, #e4c78e);
}
body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .ui-dialog .ui-dialog-titlebar,
body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .ui-panel .ui-panel-titlebar,
body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .ui-fieldset .ui-fieldset-legend {
    color: #4b2c19;
    border-color: rgba(103, 66, 32, .28);
    background: rgba(123, 75, 31, .08);
}

@media (max-width: 820px) {
    body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .cq-nav {
        padding: .8rem;
    }
    body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .cq-home-intro {
        padding: 1.35rem;
    }
}


/* v20.14: map-inspired parchment atmosphere on the public shell, reliable home title fit,
   and a first-class logout button instead of a browser-looking form control. */
body.cq-body:not(.cq-game-body):not(.cq-lobby-body) {
    background:
        radial-gradient(ellipse at 50% 28%, rgba(248, 222, 160, .60) 0%, rgba(214, 166, 96, .36) 34%, transparent 66%),
        radial-gradient(circle at 14% 18%, rgba(255, 241, 193, .18), transparent 25rem),
        radial-gradient(circle at 88% 72%, rgba(102, 57, 26, .24), transparent 31rem),
        repeating-linear-gradient(11deg, rgba(79, 44, 19, .025) 0 1px, transparent 1px 8px),
        repeating-linear-gradient(101deg, rgba(255, 247, 214, .018) 0 1px, transparent 1px 10px),
        linear-gradient(135deg, #3d281a 0%, #865933 20%, #bd854c 43%, #80502e 72%, #2b1a12 100%);
    background-attachment: fixed;
}

body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .cq-home-intro {
    background:
        radial-gradient(ellipse at 46% 40%, rgba(255, 247, 210, .48), transparent 52%),
        linear-gradient(96deg, rgba(255, 252, 232, .30), transparent 35%),
        repeating-linear-gradient(10deg, rgba(83, 49, 22, .027) 0 1px, transparent 1px 9px),
        linear-gradient(145deg, #f6e5ba, var(--cq-public-paper) 60%, #cfa967);
    box-shadow:
        inset 0 1px rgba(255, 255, 255, .7),
        inset 0 0 48px rgba(103, 63, 27, .12),
        inset 0 0 110px rgba(105, 61, 25, .08),
        0 24px 58px rgba(0, 0, 0, .3);
}

body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .cq-title {
    max-width: 100%;
    font-size: clamp(1.9rem, 6.4vw, 5.4rem);
    line-height: .9;
    letter-spacing: -.065em;
}
body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .cq-title span {
    display: block;
    max-width: 100%;
    white-space: nowrap;
}

body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .cq-nav .cq-logout-action.ui-button {
    color: #ffe7b6;
    border-color: rgba(202, 142, 74, .58);
    background: linear-gradient(180deg, #754329, #49271a);
    box-shadow: inset 0 1px rgba(255,255,255,.10), 0 3px 9px rgba(30, 15, 8, .22);
}
body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .cq-nav .cq-logout-action.ui-button:hover {
    color: #fff3d1;
    border-color: rgba(234, 184, 102, .82);
    background: linear-gradient(180deg, #875031, #56301e);
}

@media (max-width: 430px) {
    body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .cq-title {
        font-size: clamp(1.72rem, 8.1vw, 2.15rem);
        letter-spacing: -.075em;
    }
}


/* Login feedback: one clean global message instead of JSF field-validation noise. */
.cq-login-messages.ui-messages {
    margin: 0 0 .9rem !important;
}
.cq-login-messages .ui-messages-error {
    color: #5f211d !important;
    border: 1px solid rgba(132, 49, 39, .42) !important;
    border-left: 4px solid #8f332a !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, rgba(255, 244, 216, .97), rgba(231, 201, 153, .95)) !important;
    box-shadow: 0 7px 18px rgba(74, 37, 17, .12) !important;
}
.cq-login-messages .ui-messages-error-detail {
    color: #5f211d !important;
    font-weight: 750 !important;
    line-height: 1.45 !important;
}

/* Registration feedback must stay impossible to miss, including non-validation failures. */
.cq-registration-messages.ui-messages {
    margin: 0 0 .9rem !important;
}
.cq-registration-messages .ui-messages-error {
    color: #5f211d !important;
    border: 1px solid rgba(132, 49, 39, .48) !important;
    border-left: 5px solid #8f332a !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, rgba(255, 238, 199, .96), rgba(223, 181, 117, .94)) !important;
    box-shadow: 0 8px 20px rgba(74, 37, 17, .16) !important;
}
.cq-registration-messages .ui-messages-error-summary,
.cq-registration-messages .ui-messages-error-detail {
    color: #5f211d !important;
    font-weight: 800 !important;
    line-height: 1.45 !important;
}

/* v20.17: the home hero has only one content block now. Let the parchment panel use the
   full shell width and size the long country name from the panel width, not the viewport. */
body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .cq-home-hero {
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100%;
}

body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .cq-home-intro {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    justify-self: stretch;
    container-type: inline-size;
}

body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .cq-title {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    font-size: clamp(1.8rem, 7.4cqi, 5.4rem);
    line-height: .92;
    letter-spacing: -.055em;
    overflow: visible;
}

body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .cq-title span {
    display: block;
    box-sizing: border-box;
    width: max-content;
    max-width: 100%;
    white-space: nowrap;
    font-size: .92em;
    letter-spacing: -.06em;
    overflow: visible;
}

@supports not (font-size: 1cqi) {
    body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .cq-title {
        font-size: clamp(1.8rem, 6vw, 5.2rem);
    }
}

@media (max-width: 520px) {
    body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .cq-home-intro {
        padding-inline: clamp(.95rem, 5vw, 1.35rem);
    }

    body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .cq-title {
        font-size: clamp(1.65rem, 8.4cqi, 2.65rem);
        letter-spacing: -.045em;
    }

    body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .cq-title span {
        font-size: .9em;
        letter-spacing: -.055em;
    }
}

/* v20.18: home battle showcase + lobby-matching visual direction.
   The three SVG scenes deliberately reuse the same sword/shield language as the in-game battle banner. */
body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .cq-home-hero {
    grid-template-columns: minmax(0, 1.12fr) minmax(340px, .88fr) !important;
    gap: clamp(1.25rem, 3.8vw, 3.2rem);
    align-items: center;
}

.cq-home-battle-showcase {
    min-width: 0;
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cq-home-battle-stage {
    position: relative;
    width: min(100%, 500px);
    aspect-ratio: 1 / .88;
    min-height: 390px;
    display: grid;
    place-items: center;
    isolation: isolate;
}
.cq-home-battle-aura {
    position: absolute;
    inset: 5% 0 0;
    z-index: -2;
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 48%, rgba(250, 215, 136, .24), transparent 35%),
        radial-gradient(circle at 50% 54%, rgba(91, 46, 22, .4), transparent 67%);
    filter: blur(7px);
}
.cq-home-battle-stage::before,
.cq-home-battle-stage::after {
    content: "";
    position: absolute;
    pointer-events: none;
    border-radius: 50%;
}
.cq-home-battle-stage::before {
    inset: 16% 7% 7%;
    z-index: -1;
    border: 1px solid rgba(232, 187, 102, .16);
    box-shadow: inset 0 0 70px rgba(248, 211, 135, .04), 0 0 80px rgba(20, 9, 4, .2);
}
.cq-home-battle-stage::after {
    width: 58%;
    height: 8px;
    left: 21%;
    bottom: 8%;
    background: rgba(17, 8, 3, .48);
    filter: blur(12px);
}

.cq-home-battle-scene {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-rows: auto 1fr;
    align-items: center;
    padding: clamp(.45rem, 1.4vw, .85rem);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(.985);
    transition: opacity .48s ease, transform .48s ease, visibility 0s linear .48s;
    pointer-events: none;
}
.cq-home-battle-scene.is-active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    transition: opacity .48s ease, transform .48s cubic-bezier(.2,.8,.2,1), visibility 0s;
}
.cq-home-battle-scene.is-leaving {
    opacity: 0;
    transform: translateY(-8px) scale(.985);
}
.cq-home-battle-copy {
    position: relative;
    z-index: 4;
    display: grid;
    gap: .12rem;
    justify-items: center;
    text-align: center;
    text-shadow: 0 2px 12px rgba(12, 5, 2, .74);
}
.cq-home-battle-copy small {
    color: #d6aa60;
    font-size: .66rem;
    font-weight: 950;
    letter-spacing: .17em;
}
.cq-home-battle-copy strong {
    color: #ffe7ad;
    font: 900 clamp(1.35rem, 2.7vw, 2.1rem)/1 Georgia, "Times New Roman", serif;
    letter-spacing: -.02em;
}
.cq-home-battle-copy span {
    max-width: 390px;
    color: #d9c29a;
    font-size: .78rem;
    line-height: 1.42;
}
.cq-home-battle-svg {
    width: 100%;
    max-height: 330px;
    overflow: visible;
    filter: drop-shadow(0 14px 20px rgba(20, 8, 2, .25));
}
.cq-home-emblem circle {
    fill: rgba(54, 29, 17, .38);
    stroke: rgba(229, 182, 92, .4);
    stroke-width: 2;
}
.cq-home-emblem path {
    fill: rgba(215, 170, 88, .20);
    stroke: rgba(245, 211, 139, .46);
    stroke-width: 3;
    stroke-linejoin: round;
}
.cq-home-emblem-attacker { opacity: .72; }
.cq-home-emblem-defender { opacity: .54; }

.cq-home-sword-grip { fill: #765027; stroke: #352213; stroke-width: 3; }
.cq-home-sword-guard { fill: #e4b85e; stroke: #594019; stroke-width: 3; }
.cq-home-sword-blade { fill: #f2d98e; stroke: #6d5424; stroke-width: 3; stroke-linejoin: round; }
.cq-home-shield-left,
.cq-home-shield-right {
    fill: #cdbb94;
    stroke: #614c35;
    stroke-width: 4;
    stroke-linejoin: round;
    transform-box: fill-box;
    transform-origin: center;
}
.cq-home-shield-boss { fill: #e5c56f; stroke: #6a5125; stroke-width: 3; }
.cq-home-impact path,
.cq-home-defense-sparks path,
.cq-home-capture-impact path {
    fill: #fff1a8;
    stroke: #e3a93f;
    stroke-width: 2;
    filter: drop-shadow(0 0 12px rgba(255, 204, 70, .95));
}
.cq-home-defense-sparks circle { fill: #ffe28b; filter: drop-shadow(0 0 9px rgba(255, 204, 70, .9)); }
.cq-home-attack-sword,
.cq-home-attack-shield,
.cq-home-defense-sword,
.cq-home-defense-sword-tip,
.cq-home-defense-shield,
.cq-home-capture-sword,
.cq-home-capture-shield,
.cq-home-capture-boss,
.cq-home-capture-flag,
.cq-home-impact,
.cq-home-defense-sparks,
.cq-home-capture-impact,
.cq-home-defense-ring,
.cq-home-capture-rays {
    transform-box: fill-box;
    transform-origin: center;
    will-change: transform, opacity;
}

/* 1) Attack: slow approach and visible impact, matching the in-game pre-attack banner. */
.cq-home-battle-scene.is-active[data-cq-home-scene="attack"] .cq-home-attack-sword {
    animation: cq-home-attack-sword 3.85s cubic-bezier(.22,.68,.24,1) both;
}
.cq-home-battle-scene.is-active[data-cq-home-scene="attack"] .cq-home-attack-shield {
    animation: cq-home-attack-shield 3.85s cubic-bezier(.22,.68,.24,1) both;
}
.cq-home-battle-scene.is-active[data-cq-home-scene="attack"] .cq-home-impact {
    animation: cq-home-attack-impact 3.85s ease-in-out both;
}
@keyframes cq-home-attack-sword {
    0%   { transform: translate(-76px,-10px) rotate(-12deg) scale(.93); opacity:.28; }
    72%  { transform: translate(-5px,-2px) rotate(-3deg) scale(1); opacity:1; }
    84%  { transform: translate(13px,2px) rotate(2deg) scale(1.045); opacity:1; }
    100% { transform: translate(8px,1px) rotate(-1deg) scale(1); opacity:1; }
}
@keyframes cq-home-attack-shield {
    0%,72% { transform: translateX(0) rotate(0) scale(1); }
    84% { transform: translateX(13px) rotate(5deg) scale(1.035); }
    100% { transform: translateX(0) rotate(0) scale(1); }
}
@keyframes cq-home-attack-impact {
    0%,72% { opacity:0; transform:scale(.15) rotate(0); }
    84% { opacity:1; transform:scale(1.45) rotate(12deg); }
    93% { opacity:.45; transform:scale(.82) rotate(20deg); }
    100% { opacity:0; transform:scale(.25) rotate(28deg); }
}

/* 2) Successful defence: shield absorbs the hit, sword rebounds and the tip snaps away. */
.cq-home-defense-ring {
    fill: none;
    stroke: rgba(235, 193, 91, .0);
    stroke-width: 5;
}
.cq-home-battle-scene.is-active[data-cq-home-scene="defended"] .cq-home-defense-sword {
    animation: cq-home-defense-sword 3.85s cubic-bezier(.22,.68,.24,1) both;
}
.cq-home-battle-scene.is-active[data-cq-home-scene="defended"] .cq-home-defense-sword-tip {
    animation: cq-home-defense-tip 3.85s cubic-bezier(.22,.68,.24,1) both;
}
.cq-home-battle-scene.is-active[data-cq-home-scene="defended"] .cq-home-defense-shield {
    animation: cq-home-defense-shield 3.85s cubic-bezier(.22,.68,.24,1) both;
}
.cq-home-battle-scene.is-active[data-cq-home-scene="defended"] .cq-home-defense-sparks {
    animation: cq-home-defense-sparks 3.85s ease-in-out both;
}
.cq-home-battle-scene.is-active[data-cq-home-scene="defended"] .cq-home-defense-ring {
    animation: cq-home-defense-ring 3.85s ease-in-out both;
}
@keyframes cq-home-defense-sword {
    0%   { transform: translate(-70px,-9px) rotate(-12deg) scale(.94); opacity:.32; }
    68%  { transform: translate(-6px,-2px) rotate(-3deg) scale(1); opacity:1; }
    78%  { transform: translate(3px,0) rotate(-1deg) scale(1.025); opacity:1; }
    100% { transform: translate(-42px,-10px) rotate(-20deg) scale(.93); opacity:.68; }
}
@keyframes cq-home-defense-tip {
    0%,78% { transform: translate(0,0) rotate(0); opacity:1; }
    86% { transform: translate(8px,-7px) rotate(24deg); opacity:1; }
    100% { transform: translate(48px,-42px) rotate(130deg) scale(.65); opacity:0; }
}
@keyframes cq-home-defense-shield {
    0%,68% { transform: translateX(0) rotate(0) scale(1); }
    78% { transform: translateX(-17px) rotate(-7deg) scale(1.085); }
    90% { transform: translateX(-7px) rotate(3deg) scale(1.035); }
    100% { transform: translateX(-3px) rotate(0) scale(1); }
}
@keyframes cq-home-defense-sparks {
    0%,70% { opacity:0; transform:scale(.2); }
    79% { opacity:1; transform:scale(1.32); }
    91% { opacity:.42; transform:scale(.82); }
    100% { opacity:0; transform:scale(.28); }
}
@keyframes cq-home-defense-ring {
    0%,70% { stroke:rgba(235,193,91,0); transform:scale(.7); opacity:0; }
    80% { stroke:rgba(245,208,114,.78); transform:scale(1); opacity:1; }
    100% { stroke:rgba(245,208,114,0); transform:scale(1.32); opacity:0; }
}

/* 3) Successful attack: impact lands, shield breaks apart and the conqueror flag rises. */
.cq-home-capture-rays {
    fill: none;
    stroke: #f3c45f;
    stroke-width: 5;
    stroke-linecap: round;
    opacity: 0;
}
.cq-home-capture-flag path:first-child { fill:none; stroke:#f2d992; stroke-width:5; stroke-linecap:round; }
.cq-home-capture-flag path:last-child { fill:#8b4527; stroke:#e4bb68; stroke-width:3; stroke-linejoin:round; }
.cq-home-battle-scene.is-active[data-cq-home-scene="capture"] .cq-home-capture-sword {
    animation: cq-home-capture-sword 3.85s cubic-bezier(.22,.68,.24,1) both;
}
.cq-home-battle-scene.is-active[data-cq-home-scene="capture"] .cq-home-capture-shield-left {
    animation: cq-home-capture-left 3.85s cubic-bezier(.22,.68,.24,1) both;
}
.cq-home-battle-scene.is-active[data-cq-home-scene="capture"] .cq-home-capture-shield-right {
    animation: cq-home-capture-right 3.85s cubic-bezier(.22,.68,.24,1) both;
}
.cq-home-battle-scene.is-active[data-cq-home-scene="capture"] .cq-home-capture-boss {
    animation: cq-home-capture-boss 3.85s ease-in-out both;
}
.cq-home-battle-scene.is-active[data-cq-home-scene="capture"] .cq-home-capture-impact {
    animation: cq-home-capture-impact 3.85s ease-in-out both;
}
.cq-home-battle-scene.is-active[data-cq-home-scene="capture"] .cq-home-capture-rays {
    animation: cq-home-capture-rays 3.85s ease-in-out both;
}
.cq-home-battle-scene.is-active[data-cq-home-scene="capture"] .cq-home-capture-flag {
    animation: cq-home-capture-flag 3.85s cubic-bezier(.22,.68,.24,1) both;
}
@keyframes cq-home-capture-sword {
    0%   { transform: translate(-74px,-10px) rotate(-12deg) scale(.93); opacity:.3; }
    70%  { transform: translate(-7px,-2px) rotate(-3deg) scale(1); opacity:1; }
    82%  { transform: translate(14px,1px) rotate(2deg) scale(1.075); opacity:1; }
    100% { transform: translate(22px,1px) rotate(0) scale(1.03); opacity:1; }
}
@keyframes cq-home-capture-left {
    0%,76% { transform:translate(0,0) rotate(0); opacity:1; }
    86% { transform:translate(-16px,-4px) rotate(-16deg); opacity:1; }
    100% { transform:translate(-48px,20px) rotate(-42deg); opacity:.08; }
}
@keyframes cq-home-capture-right {
    0%,76% { transform:translate(0,0) rotate(0); opacity:1; }
    86% { transform:translate(16px,-4px) rotate(16deg); opacity:1; }
    100% { transform:translate(48px,20px) rotate(42deg); opacity:.08; }
}
@keyframes cq-home-capture-boss {
    0%,77% { transform:scale(1); opacity:1; }
    87% { transform:scale(1.32) rotate(20deg); opacity:.9; }
    100% { transform:translateY(34px) scale(.55) rotate(110deg); opacity:0; }
}
@keyframes cq-home-capture-impact {
    0%,72% { opacity:0; transform:scale(.15); }
    82% { opacity:1; transform:scale(1.7); }
    93% { opacity:.42; transform:scale(.85); }
    100% { opacity:0; transform:scale(.24); }
}
@keyframes cq-home-capture-rays {
    0%,75% { opacity:0; transform:scale(.6) rotate(-10deg); }
    85% { opacity:.95; transform:scale(1) rotate(0); }
    100% { opacity:0; transform:scale(1.28) rotate(5deg); }
}
@keyframes cq-home-capture-flag {
    0%,80% { opacity:0; transform:translateY(28px) scale(.85); }
    92% { opacity:1; transform:translateY(2px) scale(1.02); }
    100% { opacity:1; transform:translateY(0) scale(1); }
}

.cq-home-battle-dots {
    position: absolute;
    left: 50%;
    bottom: 3.8%;
    z-index: 8;
    display: flex;
    gap: .42rem;
    transform: translateX(-50%);
}
.cq-home-battle-dots i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    border: 1px solid rgba(236, 199, 126, .45);
    background: rgba(93, 51, 27, .58);
    box-shadow: 0 0 0 0 rgba(238, 195, 103, 0);
    transition: transform .3s ease, background .3s ease, box-shadow .3s ease;
}
.cq-home-battle-dots i.is-active {
    transform: scale(1.28);
    background: #e8bc68;
    box-shadow: 0 0 13px rgba(238, 195, 103, .48);
}

@media (max-width: 900px) {
    body.cq-body:not(.cq-game-body):not(.cq-lobby-body) .cq-home-hero {
        grid-template-columns: 1fr !important;
        gap: .75rem;
    }
    .cq-home-battle-stage {
        width: min(100%, 580px);
        min-height: 350px;
        aspect-ratio: 1 / .72;
    }
}
@media (max-width: 520px) {
    .cq-home-battle-stage { min-height: 310px; }
    .cq-home-battle-copy span { max-width: 310px; font-size: .72rem; }
    .cq-home-battle-svg { max-height: 275px; }
}
@media (prefers-reduced-motion: reduce) {
    .cq-home-battle-scene,
    .cq-home-battle-scene * {
        animation: none !important;
        transition-duration: .01ms !important;
    }
}
