:root {
    --bg: #f4f5f7;
    --surface: #ffffff;
    --surface-2: #f9fafb;

    --text: #0a0203;
    --muted: #727986;
    --line: #e5e7eb;

    /* HG brand palette */
    --accent: #fdb913;
    --accent-2: #ec5a24;
    --accent-soft: #fff4d6;
    --accent-soft-2: #ffe7a3;

    --brand-black: #0a0203;
    --brand-gray: #e6e7e8;
    --brand-red: #c72127;
    --brand-burgundy: #813644;
    --brand-orange: #ec5a24;

    /* Functional colors */
    --green: #07996c;
    --green-soft: #e8f8f1;
    --yellow: #8a5a00;
    --yellow-soft: #fff6dd;
    --red: #c72127;
    --red-soft: #fff0ee;

    --shadow: 0 14px 42px rgba(10, 2, 3, .08);
    --shadow-strong: 0 18px 50px rgba(10, 2, 3, .13);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 22px;
    background: #fff;
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
}

.brand,
.mobile-brand-line {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand {
    margin-bottom: 34px;
}

.mobile-brand-line {
    display: none;
}

.brand__logo {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: var(--brand-black);
    background: linear-gradient(135deg, var(--accent), var(--accent-soft-2));
    font-size: 24px;
    box-shadow: 0 10px 24px rgba(253, 185, 19, .24);
}

.brand__title {
    font-size: 18px;
    font-weight: 900;
    letter-spacing: -.04em;
}

.brand__subtitle {
    color: var(--muted);
    font-size: 13px;
}

.side-nav {
    display: grid;
    gap: 8px;
}

.side-nav__item {
    width: 100%;
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 13px 14px;
    border-radius: 16px;
    color: var(--muted);
    font-weight: 800;
    text-align: left;
}

.side-nav__item.is-active {
    color: var(--brand-black);
    background: var(--accent-soft);
    box-shadow: inset 4px 0 0 var(--accent);
}

.sidebar__bottom {
    margin-top: auto;
}

.main {
    min-width: 0;
    min-height: 100vh;
    padding: 26px 26px 42px;
    display: flex;
    flex-direction: column;
}

.main__content {
    width: 100%;
    flex: 1 0 auto;
    padding-bottom: 36px;
}

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

.page-title {
    margin: 0;
    font-size: clamp(26px, 4vw, 42px);
    line-height: 1;
    letter-spacing: -.055em;
}

.page-subtitle {
    margin: 8px 0 0;
    color: var(--muted);
}

.topbar__actions {
    display: flex;
    gap: 10px;
}

.page {
    display: none;
}

.page.is-active {
    display: block;
}

.week-strip {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: none;
    margin-bottom: 18px;
    opacity: 1;
}

.week-strip::-webkit-scrollbar {
    display: none;
}

.day-card {
    min-width: 84px;
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: 20px;
    padding: 12px 10px;
    text-align: center;
    transition: .18s ease;
}

.day-card.is-active {
    color: var(--brand-black);
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-color: transparent;
    box-shadow: 0 12px 30px rgba(253, 185, 19, .28);
}

.day-card small,
.day-card b,
.day-card span {
    display: block;
}

.day-card small {
    opacity: .8;
    font-weight: 800;
}

.day-card b {
    margin-top: 3px;
    font-size: 23px;
}

.day-card span {
    margin-top: 3px;
    font-size: 12px;
    opacity: .8;
}

.layout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 18px;
    align-items: start;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 14px;
    margin-bottom: 14px;
}

.section-head.compact {
    align-items: flex-start;
}

.section-head h2,
.panel h2 {
    margin: 0;
    font-size: 24px;
    letter-spacing: -.035em;
}

.section-head p,
.panel p {
    margin: 5px 0 0;
    color: var(--muted);
}

.event-list {
    display: grid;
    gap: 12px;
}

.event-card {
    border: 0;
    width: 100%;
    text-align: left;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
    transition: transform .16s ease, box-shadow .16s ease;
}

.event-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-strong);
}

.event-card__top,
.event-card__bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
}

.event-card__bottom {
    align-items: center;
    margin-top: 14px;
}

.event-card h3 {
    margin: 0;
    font-size: 21px;
    letter-spacing: -.03em;
}

.event-card p {
    margin: 7px 0 0;
    color: var(--muted);
    line-height: 1.35;
}

.schedule-event-top {
    align-items: flex-start;
}

.schedule-event-title {
    min-width: 0;
}

.schedule-event-title h3 {
    overflow-wrap: anywhere;
}

.schedule-event-description {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
}

.time-chip {
    color: var(--brand-black);
    background: var(--accent-soft);
    border-radius: 999px;
    padding: 8px 11px;
    font-size: 14px;
    font-weight: 900;
    white-space: nowrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 8px 11px;
    font-size: 13px;
    font-weight: 900;
}

.badge.green {
    color: var(--green);
    background: var(--green-soft);
}

.badge.yellow {
    color: var(--yellow);
    background: var(--yellow-soft);
}

.badge.red {
    color: var(--red);
    background: var(--red-soft);
}

.badge.purple {
    color: var(--brand-black);
    background: var(--accent-soft);
}

.card-action {
    color: var(--brand-orange);
    font-size: 22px;
    font-weight: 900;
}

.info-panel,
.panel,
.detail-card,
.signup-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
}

.info-panel h3,
.signup-card h3 {
    margin: 0 0 12px;
    font-size: 19px;
    letter-spacing: -.02em;
}

.steps {
    display: grid;
    gap: 10px;
}

.step {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    color: var(--muted);
    line-height: 1.35;
}

.step b {
    flex: 0 0 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    color: var(--brand-black);
    background: var(--accent-soft);
}

.back-link {
    display: inline-flex;
    align-items: center;
    border: 0;
    background: transparent;
    color: var(--brand-orange);
    font-weight: 900;
    margin: 4px 0 18px;
    text-decoration: none;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 18px;
    align-items: start;
    margin-bottom: 18px;
}

.detail-card__hero {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
}

.detail-card h2 {
    margin: 12px 0 0;
    font-size: clamp(30px, 5vw, 48px);
    line-height: .98;
    letter-spacing: -.06em;
}

.detail-card p {
    color: var(--muted);
    line-height: 1.5;
}

.detail-time {
    flex: 0 0 auto;
    font-size: 26px;
    font-weight: 950;
    color: var(--brand-black);
    background: var(--accent-soft);
    border-radius: 20px;
    padding: 13px 15px;
}

.event-description {
    margin-top: 14px;
}

.event-description__text {
    color: var(--muted);
    line-height: 1.5;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    white-space: pre-line;
}

.event-description.is-open .event-description__text {
    display: block;
    overflow: visible;
}

.event-description__toggle {
    border: 0;
    padding: 0;
    margin-top: 8px;
    background: transparent;
    color: var(--brand-orange);
    font-weight: 900;
}

.pill {
    display: inline-flex;
    border-radius: 999px;
    padding: 8px 12px;
    background: var(--green-soft);
    color: var(--green);
    font-weight: 900;
    font-size: 13px;
}

.detail-facts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 18px;
}

.fact {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.fact b {
    display: block;
}

.fact p {
    margin: 3px 0 0;
    font-size: 14px;
}

.capacity {
    margin-top: 18px;
    border-top: 1px solid var(--line);
    padding-top: 16px;
}

.capacity__top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
}

.progress {
    height: 12px;
    margin-top: 10px;
    background: #eef0f4;
    border-radius: 999px;
    overflow: hidden;
}

.progress__bar {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    border-radius: 999px;
}

.signup-card {
    position: sticky;
    top: 20px;
}

.auth-nudge {
    display: grid;
    gap: 12px;
}

.auth-nudge p {
    color: var(--muted);
    line-height: 1.45;
    margin: 0;
}

.players-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.player {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 17px;
    padding: 12px 13px;
    background: var(--surface-2);
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.player.is-you {
    border-color: var(--accent);
    background: var(--accent-soft);
    font-weight: 900;
}

.player.is-free {
    color: var(--green);
    border-style: dashed;
    border-color: rgba(7, 153, 108, .35);
    background: var(--green-soft);
}

.player.is-free span:last-child {
    color: var(--green);
    opacity: .75;
}

.profile-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 18px;
    align-items: start;
}

.auth-form {
    display: grid;
    gap: 13px;
}

.auth-form label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-weight: 800;
}

.input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px 13px;
    color: var(--text);
    background: #fff;
    outline: none;
}

.input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.primary-btn,
.primary-small-btn,
.ghost-btn,
.danger-btn {
    border: 0;
    border-radius: 16px;
    font-weight: 950;
}

.primary-btn {
    width: 100%;
    padding: 15px;
    color: var(--brand-black);
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 12px 28px rgba(253, 185, 19, .24);
}

.primary-small-btn {
    padding: 11px 14px;
    color: var(--brand-black);
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 10px 24px rgba(253, 185, 19, .22);
    white-space: nowrap;
}

.ghost-btn {
    padding: 11px 14px;
    color: var(--brand-black);
    background: var(--accent-soft);
}

.ghost-btn.full {
    width: 100%;
}

.danger-btn {
    width: 100%;
    padding: 15px;
    color: var(--red);
    background: var(--red-soft);
}

.muted {
    color: var(--muted);
}

.empty-state {
    text-align: center;
    background: var(--surface);
    border-radius: var(--radius);
    padding: 34px 18px;
    box-shadow: var(--shadow);
}

.empty-state h3 {
    margin: 0 0 8px;
    font-size: 22px;
}

.empty-state p {
    color: var(--muted);
    margin: 0 0 18px;
}

.booking-user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface-2);
    margin-bottom: 12px;
}

.booking-user-card__avatar {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    color: var(--brand-black);
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    font-weight: 950;
    font-size: 18px;
}

.booking-user-card b,
.booking-user-card span {
    display: block;
}

.booking-user-card span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 13px;
}

.booking-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

.booking-summary div {
    padding: 12px;
    border-radius: 17px;
    background: var(--accent-soft);
}

.booking-summary span,
.booking-summary b {
    display: block;
}

.booking-summary span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.booking-summary b {
    margin-top: 4px;
}

.small-text {
    font-size: 14px;
    line-height: 1.4;
}

.flash-message {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
    padding: 13px 15px;
    border-radius: 18px;
    font-weight: 900;
    box-shadow: var(--shadow);
}

.flash-message--success {
    color: var(--green);
    background: var(--green-soft);
}

.flash-message--error {
    color: var(--red);
    background: var(--red-soft);
}

.flash-message button {
    border: 0;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .7);
    color: inherit;
    font-size: 20px;
    font-weight: 900;
    line-height: 1;
}

.my-event-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.my-event-actions .ghost-btn,
.my-event-actions .danger-btn,
.my-event-actions .badge {
    white-space: nowrap;
}

.my-event-top {
    align-items: flex-start;
}

.my-event-title {
    min-width: 0;
}

.my-event-title h3 {
    overflow-wrap: anywhere;
}

.my-event-meta {
    width: 100%;
    margin-top: 8px !important;
    color: var(--muted);
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.mobile-nav {
    display: none;
}

.only-desktop {
    display: block;
}

@media (max-width: 860px) {
    .app-shell {
        display: block;
        padding-bottom: 0;
    }

    .sidebar {
        display: none;
    }

    .main {
        min-height: 100dvh;
        padding: 16px 16px 112px;
    }

    .main__content {
        flex: 1 0 auto;
        padding-bottom: 150px;
    }

    .topbar {
        position: sticky;
        top: 0;
        z-index: 20;
        margin: -16px -16px 16px;
        padding: 16px;
        background: rgba(244, 245, 247, .92);
        backdrop-filter: blur(16px);
        border-bottom: 1px solid rgba(229, 231, 235, .72);
    }

    .topbar__actions {
        display: none;
    }

    .mobile-brand-line {
        display: flex;
        margin-bottom: 20px;
    }

    .page-title {
        font-size: 28px;
    }

    .page-subtitle {
        font-size: 14px;
    }

    .layout-grid,
    .detail-grid,
    .profile-grid {
        grid-template-columns: 1fr;
    }

    .only-desktop {
        display: none !important;
    }

    .week-strip {
        margin-left: -16px;
        margin-right: -16px;
        padding: 0 16px 6px;
        opacity: 0;
    }

    .week-strip.is-ready {
        opacity: 1;
    }

    .day-card {
        min-width: 70px;
        border-radius: 18px;
        padding: 10px 8px;
    }

    .event-card {
        border-radius: 22px;
    }

    .event-card h3 {
        font-size: 20px;
    }

    .schedule-event-description {
        -webkit-line-clamp: 5;
    }

    .detail-facts {
        grid-template-columns: 1fr;
    }

    .back-link {
        margin-top: 8px;
        margin-bottom: 16px;
    }

    .detail-card,
    .signup-card,
    .panel {
        padding: 16px;
        border-radius: 22px;
    }

    .signup-card {
        position: static;
        order: -1;
    }

    .detail-card__hero {
        display: grid;
    }

    .detail-time {
        width: max-content;
    }

    .mobile-nav {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: 12px;
        z-index: 90;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
        padding: 8px;
        background: rgba(255, 255, 255, .92);
        backdrop-filter: blur(18px);
        border: 1px solid rgba(229, 231, 235, .8);
        border-radius: 24px;
        box-shadow: 0 18px 50px rgba(10, 2, 3, .14);
    }

    .mobile-nav__item {
        display: grid;
        place-items: center;
        min-height: 50px;
        text-align: center;
        text-decoration: none;
        border-radius: 17px;
        padding: 8px 6px;
        color: var(--muted);
        font-weight: 900;
    }

    .mobile-nav__item span,
    .mobile-nav__item small {
        display: block;
    }

    .mobile-nav__item small {
        margin-top: 2px;
        font-size: 11px;
        line-height: 1.1;
    }

    .mobile-nav__item.is-active {
        color: var(--brand-black);
        background: var(--accent-soft);
    }

    #myEventsPage .event-card__bottom {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .my-event-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .my-event-actions .ghost-btn,
    .my-event-actions .danger-btn {
        width: 100% !important;
        text-align: center;
        padding: 12px 10px !important;
    }

    #myEventsPage .badge {
        justify-content: center;
        width: 100%;
    }
}

.auth-page {
    display: grid;
    grid-template-columns: minmax(360px, 520px) minmax(320px, 420px);
    gap: 18px;
    align-items: start;
}

.auth-panel {
    max-width: 520px;
    width: 100%;
}

.auth-info {
    max-width: 420px;
}

.auth-panel .auth-form {
    margin-top: 18px;
}

.auth-panel .input {
    min-height: 48px;
}

.checkbox-field {
    display: grid !important;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: flex-start;
    gap: 10px;
    color: var(--muted);
    font-weight: 800;
    line-height: 1.35;
}

.checkbox-field input {
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    accent-color: var(--accent);
}

@media (max-width: 860px) {
    .auth-page {
        grid-template-columns: 1fr;
    }

    .auth-panel {
        max-width: none;
    }
}

.open-play-booking-panel {
    margin-top: 18px;
}

.open-play-form {
    margin-top: 18px;
}

.open-play-form__grid {
    display: grid;
    grid-template-columns: 220px 220px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.open-play-field {
    display: grid;
    gap: 8px;
}

.open-play-field__label {
    color: var(--text);
    font-size: 14px;
    font-weight: 900;
}

.open-play-field__control {
    width: 100%;
    min-height: 52px;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 0 16px;
    color: var(--text);
    background: var(--surface-2);
    outline: none;
    font: inherit;
    font-weight: 750;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.open-play-field__control::placeholder {
    color: rgba(114, 121, 134, .75);
    font-weight: 650;
}

.open-play-field__control:focus {
    border-color: var(--accent);
    background: #fff;
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.open-play-field__error {
    color: var(--red);
    font-size: 13px;
    font-weight: 800;
}

.open-play-form__footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 14px;
    align-items: center;
    margin-top: 18px;
}

.open-play-form__hint {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.4;
}

.open-play-form__submit {
    width: 100%;
}

.open-play-login-btn {
    display: inline-flex;
    width: auto;
    padding-left: 22px;
    padding-right: 22px;
    text-decoration: none;
    align-items: center;
    justify-content: center;
}

@media (max-width: 1100px) {
    .open-play-form__grid {
        grid-template-columns: 1fr 1fr;
    }

    .open-play-field--wide {
        grid-column: 1 / -1;
    }
}

@media (max-width: 860px) {
    .open-play-booking-panel {
        margin-top: 16px;
    }

    .open-play-form__footer {
        grid-template-columns: 1fr;
    }

    .open-play-form__submit {
        min-height: 52px;
    }

    .open-play-login-btn {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .open-play-form {
        margin-top: 14px;
    }

    .open-play-form__grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .open-play-field--wide {
        grid-column: auto;
    }

    .open-play-field__control {
        min-height: 50px;
        border-radius: 16px;
        font-size: 16px;
    }

    .open-play-form__footer {
        margin-top: 14px;
        gap: 12px;
    }

    .open-play-form__hint {
        font-size: 13px;
    }
}

.open-play-description {
    margin-top: 12px;
    max-width: 640px;
    font-size: 15px;
    line-height: 1.55;
    opacity: 0.85;
}

/* =========================================================
   Hobby Games style v2
   Более спокойная версия: белые карточки, черный текст,
   фирменный желтый как основной CTA, оранжевый только как акцент.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=M+PLUS+Rounded+1c:wght@400;500;700;800;900&display=swap');

:root {
    --bg: #f6f6f4;
    --surface: #ffffff;
    --surface-2: #fbfbfa;

    --text: #0a0203;
    --muted: #6f7683;
    --line: #e8e8e4;

    --accent: #fdb913;
    --accent-2: #ec5a24;
    --accent-soft: #fff3cf;
    --accent-soft-2: #ffe8a8;

    --brand-black: #0a0203;
    --brand-gray: #e6e7e8;
    --brand-red: #c72127;
    --brand-burgundy: #813644;
    --brand-orange: #ec5a24;

    --green: #07996c;
    --green-soft: #e8f8f1;
    --yellow: #8a5a00;
    --yellow-soft: #fff6dd;
    --red: #c72127;
    --red-soft: #fff0ee;

    --shadow: 0 16px 44px rgba(10, 2, 3, .07);
    --shadow-strong: 0 18px 48px rgba(10, 2, 3, .11);
    --radius: 24px;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'M PLUS Rounded 1c', Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: geometricPrecision;
}

a,
a:hover,
a:focus {
    text-decoration-thickness: 1.5px;
    text-underline-offset: 3px;
}

.brand__logo,
.booking-user-card__avatar {
    color: var(--brand-black);
    background: var(--accent);
    box-shadow: 0 10px 22px rgba(253, 185, 19, .24);
}

.brand__title,
.page-title,
.section-head h2,
.panel h2,
.event-card h3,
.detail-card h2,
.info-panel h3,
.signup-card h3,
.empty-state h3,
.open-play-field__label {
    color: var(--brand-black);
    font-weight: 800;
    letter-spacing: -.025em;
}

.brand__title {
    font-weight: 900;
}

.page-title {
    font-size: clamp(26px, 4vw, 42px);
    line-height: 1.04;
    letter-spacing: -.035em;
}

.detail-card h2 {
    line-height: 1.03;
    letter-spacing: -.035em;
}

.event-card h3 {
    letter-spacing: -.02em;
}

.sidebar {
    background: #fff;
    border-right-color: var(--line);
}

.side-nav__item {
    color: #626a76;
    font-weight: 800;
    text-decoration: none;
}

.side-nav__item:hover {
    color: var(--brand-black);
    background: #fff8df;
}

.side-nav__item.is-active {
    color: var(--brand-black);
    background: #fff1c2;
    box-shadow: inset 4px 0 0 var(--accent);
}

.sidebar__bottom .ghost-btn,
.topbar__actions .primary-small-btn {
    min-width: 76px;
    justify-content: center;
}

.day-card {
    color: var(--brand-black);
    text-decoration: none;
}

.day-card.is-active {
    color: var(--brand-black);
    background: var(--accent);
    border-color: rgba(10, 2, 3, .08);
    box-shadow: 0 12px 26px rgba(253, 185, 19, .25);
}

.day-card.is-active small,
.day-card.is-active span {
    opacity: .72;
}

.time-chip,
.detail-time {
    color: var(--brand-black);
    background: var(--accent-soft);
    border: 1px solid rgba(253, 185, 19, .38);
    font-weight: 800;
}

.back-link,
.event-description__toggle {
    color: var(--brand-orange);
    text-decoration: none;
}

.back-link:hover,
.event-description__toggle:hover {
    color: var(--brand-red);
}

.event-card,
.info-panel,
.panel,
.detail-card,
.signup-card,
.empty-state {
    background: var(--surface);
    box-shadow: var(--shadow);
}

.event-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-strong);
}

.fact,
.player,
.booking-user-card,
.open-play-field__control,
.input {
    border-color: var(--line);
}

.input:focus,
.open-play-field__control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(253, 185, 19, .22);
}

.primary-btn,
.primary-small-btn,
.ghost-btn,
.danger-btn,
.open-play-login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    font-weight: 800;
    line-height: 1.15;
    text-decoration: none !important;
    transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease, color .16s ease;
}

.primary-btn,
.primary-small-btn {
    color: var(--brand-black);
    background: var(--accent);
    border: 1px solid rgba(10, 2, 3, .08);
    box-shadow: 0 10px 22px rgba(253, 185, 19, .22);
}

.primary-btn:hover,
.primary-small-btn:hover {
    color: var(--brand-black);
    background: #ffc83d;
    box-shadow: 0 12px 26px rgba(253, 185, 19, .28);
    transform: translateY(-1px);
}

.primary-btn:active,
.primary-small-btn:active,
.ghost-btn:active,
.danger-btn:active {
    transform: translateY(0);
}

.ghost-btn {
    color: var(--brand-black);
    background: var(--accent-soft);
    border: 1px solid rgba(253, 185, 19, .44);
    box-shadow: none;
}

.ghost-btn:hover {
    color: var(--brand-black);
    background: #ffe8a8;
}

.danger-btn {
    color: var(--red);
    background: var(--red-soft);
    border: 1px solid rgba(199, 33, 39, .14);
}

.danger-btn:hover {
    background: #ffe2df;
}

.badge {
    font-weight: 800;
}

.badge.purple {
    color: var(--brand-black);
    background: var(--accent-soft);
}

.badge.yellow {
    color: #775000;
    background: var(--yellow-soft);
}

.pill {
    font-weight: 800;
}

.progress {
    background: #eeeeea;
}

.progress__bar {
    background: var(--accent);
}

.player.is-you {
    border-color: rgba(253, 185, 19, .75);
    background: var(--accent-soft);
    color: var(--brand-black);
    font-weight: 800;
}

.booking-user-card__avatar {
    font-weight: 800;
}

.booking-summary div {
    background: var(--accent-soft);
    border: 1px solid rgba(253, 185, 19, .28);
}

.flash-message--success {
    color: var(--green);
    background: var(--green-soft);
}

.flash-message--error {
    color: var(--red);
    background: var(--red-soft);
}

.checkbox-field input {
    accent-color: var(--accent);
}

.open-play-field__control {
    background: var(--surface-2);
    font-weight: 700;
}

.open-play-field__control:focus {
    background: #fff;
}

.mobile-nav {
    background: rgba(255, 255, 255, .94);
    border-color: rgba(232, 232, 228, .9);
}

.mobile-nav__item {
    color: #626a76;
    font-weight: 800;
    text-decoration: none;
}

.mobile-nav__item.is-active {
    color: var(--brand-black);
    background: var(--accent-soft);
    box-shadow: inset 0 -3px 0 var(--accent);
}

@media (max-width: 860px) {
    .topbar {
        background: rgba(246, 246, 244, .94);
        border-bottom-color: rgba(232, 232, 228, .85);
    }

    .page-title {
        font-size: 28px;
        letter-spacing: -.025em;
    }

    .mobile-nav__item:hover {
        text-decoration: none;
    }
}
.schedule-event-top {
    display: block;
}

.schedule-event-title {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.schedule-event-title .time-chip,
.schedule-time-chip {
    width: fit-content;
    max-width: 100%;
}

.detail-card__hero {
    display: block;
}

.detail-card__main {
    min-width: 0;
}

.detail-card__main .detail-time {
    margin-top: 10px;
}

.detail-time {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    flex: 0 1 auto;
    font-size: 22px;
    line-height: 1;
    white-space: nowrap;
}

@media (max-width: 860px) {
    .schedule-event-title {
        gap: 5px;
    }

    .schedule-event-title h3 {
        line-height: 1.12;
    }

    .time-chip,
    .schedule-time-chip {
        font-size: 13px;
        padding: 6px 9px;
        line-height: 1;
    }

    .detail-card h2 {
        line-height: 1.05;
    }

    .detail-time {
        margin-top: 9px;
        font-size: 18px;
        padding: 10px 12px;
        border-radius: 16px;
    }
}

@media (max-width: 420px) {
    .detail-time {
        font-size: 17px;
        padding: 9px 11px;
    }
}

/* =========================================================
   Footer + documents + legal checkbox
   ========================================================= */

.site-footer {
    flex: 0 0 auto;
    margin-top: 0;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--surface);
    box-shadow: 0 12px 34px rgba(15, 23, 42, .06);
}

.site-footer__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(220px, .7fr);
    gap: 20px;
    align-items: start;
}

.site-footer__brand {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.site-footer__brand .brand {
    margin-bottom: 0;
}

.site-footer__contacts {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.site-footer__contacts a,
.site-footer__nav a {
    color: inherit;
    text-decoration: none;
}

.site-footer__contacts a:hover,
.site-footer__nav a:hover {
    color: var(--accent);
}

.site-footer__nav {
    display: flex;
    flex-direction: column;
    gap: 9px;
    min-width: 0;
}

.site-footer__title {
    margin-bottom: 2px;
    color: var(--text);
    font-size: 14px;
    font-weight: 900;
}

.site-footer__nav a {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.35;
}

.document-page {
    max-width: 920px;
}

.document-content {
    color: var(--text);
    font-size: 15px;
    line-height: 1.75;
}

.document-content h1,
.document-content h2,
.document-content h3 {
    margin: 24px 0 12px;
    line-height: 1.2;
}

.document-content h1:first-child,
.document-content h2:first-child,
.document-content h3:first-child {
    margin-top: 0;
}

.document-content p {
    margin: 0 0 14px;
}

.document-content ul,
.document-content ol {
    padding-left: 22px;
    margin: 0 0 14px;
}

.document-content a {
    color: var(--accent);
}

.auth-form .legal-checkbox {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: flex-start;
    column-gap: 10px;
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.45;
    cursor: pointer;
}

.legal-checkbox__input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.legal-checkbox__box {
    position: relative;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface);
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, .05);
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.legal-checkbox__box::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 3px;
    width: 6px;
    height: 10px;
    border-right: 2px solid var(--brand-black);
    border-bottom: 2px solid var(--brand-black);
    transform: rotate(45deg) scale(0);
    opacity: 0;
    transition: transform .15s ease, opacity .15s ease;
}

.legal-checkbox__input:checked + .legal-checkbox__box {
    border-color: var(--accent);
    background: var(--accent);
    box-shadow: 0 8px 18px rgba(253, 185, 19, .24);
}

.legal-checkbox__input:checked + .legal-checkbox__box::after {
    transform: rotate(45deg) scale(1);
    opacity: 1;
}

.legal-checkbox__input:focus-visible + .legal-checkbox__box {
    outline: 3px solid rgba(253, 185, 19, .28);
    outline-offset: 2px;
}

.legal-checkbox__text {
    min-width: 0;
}

.legal-checkbox__text a {
    color: var(--accent);
    font-weight: 900;
    text-decoration: none;
}

.legal-checkbox__text a:hover {
    text-decoration: underline;
}

.legal-checkbox-error {
    margin-top: -4px;
    color: var(--red);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.35;
}

@media (max-width: 860px) {
    .site-footer {
        margin-bottom: 0;
        padding: 18px;
        border-radius: 20px;
    }

    .site-footer__inner {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .site-footer__nav {
        gap: 10px;
    }

    .site-footer__nav a {
        font-size: 13px;
    }

    .document-content {
        font-size: 14px;
        line-height: 1.65;
    }
}

@media (max-width: 560px) {
    .auth-form .legal-checkbox {
        grid-template-columns: 20px minmax(0, 1fr);
        column-gap: 9px;
        font-size: 12px;
        line-height: 1.4;
    }

    .legal-checkbox__box {
        width: 18px;
        height: 18px;
        border-radius: 6px;
    }

    .legal-checkbox__box::after {
        left: 5px;
        top: 2px;
        width: 6px;
        height: 10px;
    }
}
