/*
 * The player's account and eShop (ANALYZA-Profile management_eShops_Accounting.md kap. 22, step U1).
 * A layer over stock Bootstrap 5.3, active only inside body.gos-app (the /account and /eshop pages), so the results pages keep
 * their look until U2. Tokens are on .gos-app; the tour's colour comes from --gos2-primary (_PublicModernLayout) and the
 * readable text colour on it from --gos-on-brand (worked out on the server from the colour's luminance).
 * Rule of the project: no text below 1rem (16 px) - de-emphasis is done with colour and weight, never with size.
 */

@font-face {
    font-family: "Barlow";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../lib/fonts/barlow/barlow-latin-ext-400-normal.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Barlow";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../lib/fonts/barlow/barlow-latin-400-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Barlow";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("../lib/fonts/barlow/barlow-latin-ext-500-normal.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Barlow";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("../lib/fonts/barlow/barlow-latin-500-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Barlow";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("../lib/fonts/barlow/barlow-latin-ext-600-normal.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Barlow";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("../lib/fonts/barlow/barlow-latin-600-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Barlow Semi Condensed";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("../lib/fonts/barlow/barlow-semi-condensed-latin-ext-600-normal.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Barlow Semi Condensed";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("../lib/fonts/barlow/barlow-semi-condensed-latin-600-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---- tokens ------------------------------------------------------------------------------------------------------------- */

.gos-app,
.gos-results {
    --gos-canvas: #EEF2EF;
    --gos-surface: #FFFFFF;
    --gos-surface-sunken: #F7F9F8;
    --gos-ink: #16211C;
    --gos-ink-2: #33413A;
    --gos-muted: #52615A;
    --gos-icon-muted: #6F7D77;
    --gos-line: #D3DCD7;
    --gos-line-soft: #E3E9E6;
    --gos-line-strong: #C5D0CA;
    --gos-track: #DFE6E2;
    --gos-brand: var(--gos2-primary);
    --gos-brand-soft: color-mix(in srgb, var(--gos-brand) 13%, #fff);
    --gos-brand-ink: color-mix(in srgb, var(--gos-brand) 72%, #000);
    --gos-attention-bg: #FDF1DC;
    --gos-attention: #7A4300;
    --gos-danger: #B42318;
    --gos-danger-bg: #FDECEA;
    --gos-success: #1E7A46;
    --gos-success-bg: #E5F3EA;
    --gos-font: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --gos-font-figures: "Barlow Semi Condensed", "Barlow", system-ui, sans-serif;
    --gos-tabbar-height: 76px;
    --bs-body-font-family: var(--gos-font);
    --bs-body-color: var(--gos-ink);
    --bs-body-bg: var(--gos-canvas);
    --bs-secondary-color: var(--gos-muted);
    --bs-border-color: var(--gos-line);
    font-family: var(--gos-font);
    font-size: 1rem;
    line-height: 1.5;
    color: var(--gos-ink);
    background: var(--gos-canvas);
}

.gos-app a:not(.btn) {
    color: var(--gos-brand-ink);
}

.gos-app a:not(.btn):hover {
    color: var(--gos-ink);
}

.gos-app .text-secondary {
    color: var(--gos-muted) !important;
}

.gos-app :focus-visible,
.gos-results :focus-visible {
    outline: 3px solid var(--gos-brand-ink);
    outline-offset: 2px;
}

/* Main content leaves room for the fixed tab bar on a phone. */
.gos-has-tabbar {
    padding-bottom: calc(var(--gos-tabbar-height) + env(safe-area-inset-bottom));
}

@media (min-width: 768px) {
    .gos-has-tabbar {
        padding-bottom: 0;
    }
}

.gos-app main.container {
    max-width: 1140px;
    padding-left: 16px;
    padding-right: 16px;
}

/* ---- header: tour name and the avatar ---------------------------------------------------------------------------------------- */

.gos-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid color-mix(in srgb, var(--gos-on-brand, #fff) 60%, transparent);
    color: var(--gos-on-brand, #fff);
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1;
    padding: 0;
    flex: none;
}

.gos-avatar:hover,
.gos-avatar:focus,
.gos-avatar.show {
    background: color-mix(in srgb, var(--gos-on-brand, #fff) 18%, transparent);
    color: var(--gos-on-brand, #fff);
}

.gos-avatar-badge {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gos-brand-soft, #e9f4f0);
    color: var(--gos-brand-ink, #14492F);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.25rem;
    flex: none;
}

.gos-user-menu {
    min-width: 17rem;
    max-width: calc(100vw - 32px);
    padding: 0.5rem 0;
    border-radius: 14px;
}

.gos-user-menu .dropdown-item {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.gos-user-menu .gos-lang {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 0.25rem 1rem 0.5rem;
}

.gos-user-menu .gos-lang button {
    min-height: 44px;
    border-radius: 10px;
    border: 1px solid var(--bs-border-color);
    background: #fff;
    font: inherit;
}

.gos-user-menu .gos-lang button[aria-pressed="true"] {
    font-weight: 600;
    border-color: currentColor;
}

/* ---- navigation: tab bar on a phone, tabs from 768 px ------------------------------------------------------------------- */

.gos-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1030;
    display: grid;
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: column;
    height: calc(var(--gos-tabbar-height) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--gos-surface);
    border-top: 1px solid var(--gos-line);
    box-shadow: 0 -2px 10px rgba(22, 33, 28, .06);
}

.gos-tabbar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--gos-muted);
    text-decoration: none;
    font-size: 1rem;
    line-height: 1.25rem;
    font-weight: 500;
    min-width: 0;
}

.gos-tabbar .gos-tab-pill {
    width: 56px;
    height: 30px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.gos-tabbar .gos-tab-text {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gos-tabbar a[aria-current="page"] {
    color: var(--gos-brand-ink);
    font-weight: 600;
}

.gos-tabbar a[aria-current="page"] .gos-tab-pill {
    background: var(--gos-brand-soft);
}

.gos-tabs {
    background: var(--gos-surface);
    border-bottom: 1px solid var(--gos-line);
}

.gos-tabs ul {
    display: flex;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.gos-tabs a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 52px;
    padding: 0 0.875rem;
    color: var(--gos-ink-2);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 3px solid transparent;
}

.gos-tabs a:hover {
    color: var(--gos-ink);
    background: var(--gos-surface-sunken);
}

.gos-tabs a[aria-current="page"] {
    color: var(--gos-brand-ink);
    font-weight: 600;
    border-bottom-color: var(--gos-brand);
}

/* ---- page structure --------------------------------------------------------------------------------------------------------- */

.gos-page {
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding-top: 4px;
}

.gos-page-narrow {
    max-width: 40rem;
}

.gos-app h1,
.gos-title {
    margin: 0;
    font-size: 1.75rem;
    line-height: 2.125rem;
    font-weight: 600;
    letter-spacing: 0;
}

.gos-app h2,
.gos-section-title {
    margin: 0 0 10px;
    font-size: 1.125rem;
    line-height: 1.5rem;
    font-weight: 600;
}

.gos-subtitle {
    color: var(--gos-muted);
    margin: 2px 0 0;
}

.gos-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    font-weight: 500;
    text-decoration: none;
}

.gos-columns {
    display: grid;
    gap: 28px;
}

@media (min-width: 992px) {
    .gos-columns {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        align-items: start;
    }

    .gos-columns > .gos-column {
        display: flex;
        flex-direction: column;
        gap: 28px;
    }
}

.gos-amount {
    font-family: var(--gos-font-figures);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.gos-amount-xl {
    font-size: 3rem;
    line-height: 3.25rem;
}

.gos-amount-l {
    font-size: 2.25rem;
    line-height: 2.5rem;
}

.gos-amount-m {
    font-size: 1.25rem;
    line-height: 1.5rem;
}

.gos-muted {
    color: var(--gos-muted);
}

.gos-negative {
    color: var(--gos-danger);
}

/* ---- grouped list rows (settings, lists) ----------------------------------------------------------------------------------- */

.gos-group {
    background: var(--gos-surface);
    border: 1px solid var(--gos-line);
    border-radius: 16px;
    overflow: hidden;
}

.gos-row {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    padding: 12px 16px;
    border-top: 1px solid var(--gos-line-soft);
    color: var(--gos-ink);
    text-decoration: none;
    width: 100%;
    background: transparent;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    text-align: left;
    font: inherit;
}

.gos-group > .gos-row:first-child,
.gos-group > :first-child > .gos-row:first-child {
    border-top: 0;
}

.gos-app a.gos-row,
.gos-app button.gos-row {
    color: var(--gos-ink);
    cursor: pointer;
}

.gos-app a.gos-row:hover,
.gos-app button.gos-row:hover {
    background: var(--gos-surface-sunken);
    color: var(--gos-ink);
}

.gos-row-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.gos-row-label {
    font-weight: 500;
    overflow-wrap: anywhere;
}

.gos-row-value {
    color: var(--gos-muted);
    text-align: right;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 55%;
}

.gos-row-action {
    color: var(--gos-brand-ink);
    font-weight: 600;
    white-space: nowrap;
}

.gos-row-icon {
    color: var(--gos-icon-muted);
    font-size: 1.25rem;
    flex: none;
}

.gos-row-lead {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--gos-brand-soft);
    color: var(--gos-brand-ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex: none;
}

.gos-note {
    margin: 8px 4px 0;
    color: var(--gos-muted);
}

.gos-row-form {
    margin: 0;
}

/* A control that only a browser without JavaScript needs (gos-account.js adds .gos-js to the html element). */
.gos-js .gos-js-hide {
    display: none !important;
}

/* ---- the identity block of the Account page ------------------------------------------------------------------------------ */

.gos-who {
    display: flex;
    align-items: center;
    gap: 14px;
}

.gos-who-name {
    font-weight: 600;
    font-size: 1.125rem;
}

/* ---- badges --------------------------------------------------------------------------------------------------------------- */

.gos-tag {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 6px;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 14px;
    background: var(--gos-canvas);
    color: var(--gos-ink-2);
    font-weight: 500;
    white-space: nowrap;
}

.gos-tag-attention {
    background: var(--gos-attention-bg);
    color: var(--gos-attention);
}

.gos-tag-danger {
    background: var(--gos-danger-bg);
    color: var(--gos-danger);
}

.gos-tag-success {
    background: var(--gos-success-bg);
    color: var(--gos-success);
}

.gos-tag-brand {
    background: var(--gos-brand-soft);
    color: var(--gos-brand-ink);
}

/* ---- buttons ---------------------------------------------------------------------------------------------------------------- */

.gos-app .btn {
    --bs-btn-font-size: 1rem;
    --bs-btn-font-weight: 600;
    --bs-btn-border-radius: 12px;
    --bs-btn-padding-x: 1.125rem;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.gos-app .btn-sm {
    --bs-btn-font-size: 1rem;
    --bs-btn-border-radius: 10px;
    --bs-btn-padding-x: 0.875rem;
    min-height: 44px;
}

.gos-app .btn-primary {
    --bs-btn-color: var(--gos-on-brand, #fff);
    --bs-btn-hover-color: var(--gos-on-brand, #fff);
    --bs-btn-active-color: var(--gos-on-brand, #fff);
    --bs-btn-bg: var(--gos-brand);
    --bs-btn-border-color: var(--gos-brand);
    --bs-btn-hover-bg: var(--gos-brand-ink);
    --bs-btn-hover-border-color: var(--gos-brand-ink);
    --bs-btn-active-bg: var(--gos-brand-ink);
    --bs-btn-active-border-color: var(--gos-brand-ink);
}

.gos-app .btn-quiet,
.gos-app .btn-outline-secondary,
.gos-app .btn-outline-primary {
    --bs-btn-color: var(--gos-brand-ink);
    --bs-btn-bg: var(--gos-surface);
    --bs-btn-border-color: var(--gos-line-strong);
    --bs-btn-hover-color: var(--gos-ink);
    --bs-btn-hover-bg: var(--gos-surface-sunken);
    --bs-btn-hover-border-color: var(--gos-line-strong);
    --bs-btn-active-color: var(--gos-ink);
    --bs-btn-active-bg: var(--gos-track);
    --bs-btn-active-border-color: var(--gos-line-strong);
}

.gos-app .btn-outline-danger {
    --bs-btn-color: var(--gos-danger);
    --bs-btn-border-color: var(--gos-line-strong);
    --bs-btn-bg: var(--gos-surface);
    --bs-btn-hover-bg: var(--gos-danger-bg);
    --bs-btn-hover-color: var(--gos-danger);
    --bs-btn-hover-border-color: var(--gos-danger);
}

.gos-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.gos-actions > .btn {
    flex: 1 1 10rem;
}

.gos-signout {
    width: 100%;
    min-height: 52px;
    border-radius: 14px;
    border: 1px solid var(--gos-line-strong);
    background: var(--gos-surface);
    color: var(--gos-ink);
    font: inherit;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.gos-signout:hover {
    background: var(--gos-surface-sunken);
}

/* ---- form controls -------------------------------------------------------------------------------------------------------- */

.gos-app .form-control,
.gos-app .form-select {
    min-height: 48px;
    border-radius: 12px;
    border-color: var(--gos-line-strong);
    font-size: 1rem;
}

.gos-app .form-select-sm {
    min-height: 44px;
    font-size: 1rem;
}

.gos-app .form-control:focus,
.gos-app .form-select:focus {
    border-color: var(--gos-brand);
    box-shadow: 0 0 0 3px var(--gos-brand-soft);
}

.gos-app .form-check-input:checked {
    background-color: var(--gos-brand);
    border-color: var(--gos-brand);
}

.gos-app .form-text {
    font-size: 1rem;
    color: var(--gos-muted);
}

/* A 52 x 32 switch on a settings row (Bootstrap form-switch, enlarged). */
.gos-switch.form-switch {
    padding: 0;
    margin: 0;
    min-height: 32px;
    flex: none;
}

.gos-switch.form-switch .form-check-input {
    width: 52px;
    height: 32px;
    margin: 0;
    float: none;
    cursor: pointer;
}

/* ---- segmented control (links with aria-current, every part has its own address) --------------------------------------- */

.gos-segmented {
    display: grid;
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: column;
    gap: 4px;
    padding: 4px;
    background: var(--gos-track);
    border-radius: 12px;
}

.gos-segmented a {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 8px;
    border-radius: 9px;
    color: var(--gos-ink-2);
    font-weight: 500;
    text-decoration: none;
}

.gos-segmented a[aria-current="page"] {
    background: var(--gos-surface);
    color: var(--gos-ink);
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(22, 33, 28, .18);
}

@media (min-width: 768px) {
    .gos-segmented {
        max-width: 32rem;
    }
}

/* ---- the credit pass ------------------------------------------------------------------------------------------------------ */

.gos-pass {
    background: var(--gos-surface);
    border: 1px solid var(--gos-line);
    border-radius: 18px;
    overflow: hidden;
}

.gos-pass-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--gos-brand);
    color: var(--gos-on-brand, #fff);
    font-weight: 600;
}

.gos-pass-head span:first-child {
    min-width: 0;
    overflow-wrap: anywhere;
}

.gos-pass-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gos-pass-strip {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    border: 1px solid var(--gos-line-strong);
    border-radius: 8px;
    overflow: hidden;
    margin: 10px 0 4px;
}

.gos-pass-strip span {
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-left: 1px solid var(--gos-line);
    font-size: 1.125rem;
}

.gos-pass-strip span:first-child {
    border-left: 0;
}

.gos-pass-strip span.is-on {
    background: var(--gos-brand-soft);
    color: var(--gos-brand-ink);
}

.gos-pass-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.gos-pass-actions > a {
    flex: 1 1 9rem;
}

/* The balance of the tour detail: a smaller pass. */
.gos-balance {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    background: var(--gos-surface);
    border: 1px solid var(--gos-line);
    border-radius: 16px;
    padding: 16px;
}

/* ---- payment from a phone ------------------------------------------------------------------------------------------------ */

.gos-bill {
    background: var(--gos-surface);
    border: 1px solid var(--gos-line);
    border-radius: 18px;
    overflow: hidden;
}

.gos-bill-top {
    padding: 18px 18px 14px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gos-bill-top h2 {
    margin: 0;
}

.gos-field {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 60px;
    padding: 8px 8px 8px 18px;
    border-top: 1px solid var(--gos-line-soft);
}

.gos-field-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.gos-field-value {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: .01em;
    overflow-wrap: anywhere;
}

.gos-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 44px;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid var(--gos-line-strong);
    background: var(--gos-surface);
    color: var(--gos-brand-ink);
    font: inherit;
    font-weight: 500;
    cursor: pointer;
    flex: none;
}

.gos-copy:hover {
    background: var(--gos-surface-sunken);
}

.gos-copy.is-copied {
    color: var(--gos-success);
    border-color: var(--gos-success);
}

.gos-qr-box {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    padding: 18px;
    border-top: 1px solid var(--gos-line-soft);
    background: var(--gos-surface-sunken);
}

.gos-qr {
    width: 128px;
    height: 128px;
    flex: none;
    background: #fff;
    border: 1px solid var(--gos-line);
    border-radius: 10px;
    padding: 8px;
    line-height: 0;
}

.gos-qr svg {
    width: 100%;
    height: 100%;
}

.gos-qr-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1 1 9rem;
    min-width: 0;
}

@media (min-width: 768px) {
    .gos-qr {
        width: 176px;
        height: 176px;
    }
}

/* ---- bottom sheet (Bootstrap offcanvas-bottom) ------------------------------------------------------------------------- */

.gos-sheet.offcanvas-bottom {
    height: auto;
    max-height: 92vh;
    border-radius: 22px 22px 0 0;
    border: 0;
    padding-bottom: env(safe-area-inset-bottom);
}

@media (min-width: 768px) {
    .gos-sheet.offcanvas-bottom {
        left: 50%;
        right: auto;
        width: 36rem;
        transform: translate(-50%, 100%);
    }

    .gos-sheet.offcanvas-bottom.showing,
    .gos-sheet.offcanvas-bottom.show:not(.hiding) {
        transform: translate(-50%, 0);
    }
}

.gos-sheet-handle {
    display: block;
    width: 40px;
    height: 5px;
    border-radius: 3px;
    background: var(--gos-line-strong);
    margin: 8px auto 0;
}

.gos-sheet .offcanvas-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 4px;
    padding: 0 8px;
    min-height: 56px;
    border-bottom: 1px solid var(--gos-line-soft);
}

.gos-sheet .offcanvas-title {
    font-weight: 600;
    font-size: 1.125rem;
    margin: 0;
    text-align: center;
}

.gos-sheet-btn {
    justify-self: start;
    min-height: 44px;
    padding: 0 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--gos-brand-ink);
    font: inherit;
    font-weight: 500;
}

.gos-sheet-btn:hover {
    background: var(--gos-surface-sunken);
}

.gos-sheet-btn.is-save {
    justify-self: end;
    font-weight: 600;
}

.gos-sheet .offcanvas-body {
    padding: 22px 20px 28px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    min-height: 0;
    scrollbar-width: thin;
}

/* A long list must make the BODY scroll: a .gos-group (overflow: hidden) would otherwise shrink inside the flex column and be clipped without a scrollbar. */
.gos-sheet .offcanvas-body > * {
    flex-shrink: 0;
}

.gos-hint {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--gos-surface-sunken);
    color: var(--gos-ink-2);
}

@media (prefers-reduced-motion: reduce) {
    .gos-sheet.offcanvas-bottom {
        transition: none;
    }
}

/* ---- messages and empty states ------------------------------------------------------------------------------------------- */

.gos-app .alert {
    border-radius: 14px;
}

.gos-banner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--gos-attention-bg);
    color: var(--gos-attention);
}

.gos-banner > i {
    font-size: 1.25rem;
    line-height: 1.5rem;
}

.gos-banner-main {
    flex: 1;
    min-width: 0;
}

.gos-banner a {
    color: inherit;
    font-weight: 600;
}

.gos-banner-info {
    background: var(--gos-brand-soft);
    color: var(--gos-brand-ink);
}

.gos-banner-success {
    background: var(--gos-success-bg);
    color: var(--gos-success);
}

.gos-empty {
    background: var(--gos-surface);
    border: 1px dashed var(--gos-line-strong);
    border-radius: 16px;
    padding: 20px;
    color: var(--gos-ink-2);
}

.gos-empty p:last-child {
    margin-bottom: 0;
}

/* ---- tables inside groups (results, movements) on wider screens ------------------------------------------------------------ */

.gos-app .gos-group .table {
    margin: 0;
    --bs-table-bg: transparent;
}

.gos-app .gos-group .table > :not(caption) > * > * {
    padding: 0.75rem 1rem;
    border-bottom-color: var(--gos-line-soft);
}

.gos-app .gos-group .table thead th {
    color: var(--gos-muted);
    font-weight: 500;
}

/* ---- footer -------------------------------------------------------------------------------------------------------------- */

.gos-app footer {
    color: var(--gos-muted);
}

/* ==== eShop (step U1b, kap. 22.2 patterns 4 and 5) ============================================================================ */

/* Shown only when JavaScript runs (the counterpart of .gos-js-hide). */
.gos-js-show {
    display: none !important;
}

.gos-js .gos-js-show {
    display: inline-flex !important;
}

.gos-product {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px;
    border-top: 1px solid var(--gos-line-soft);
}

.gos-group > .gos-product:first-child {
    border-top: 0;
}

.gos-product-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

.gos-product-name {
    font-weight: 600;
    font-size: 1.125rem;
    overflow-wrap: anywhere;
}

.gos-product-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.gos-product-desc > summary {
    color: var(--gos-brand-ink);
    font-weight: 500;
    cursor: pointer;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

.gos-product-desc > div {
    padding: 4px 0 8px;
    color: var(--gos-ink-2);
}

.gos-product-desc > div > :last-child {
    margin-bottom: 0;
}

.gos-qty-input {
    max-width: 7rem;
}

.gos-stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--gos-line-strong);
    border-radius: 12px;
    overflow: hidden;
    background: var(--gos-surface);
    flex: none;
}

.gos-stepper button {
    width: 44px;
    height: 44px;
    border: 0;
    background: var(--gos-surface);
    color: var(--gos-brand-ink);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.gos-stepper button:hover:not(:disabled) {
    background: var(--gos-surface-sunken);
}

.gos-stepper button:disabled {
    color: #9AA6A0;
}

.gos-stepper .gos-qty {
    min-width: 36px;
    text-align: center;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* The cart: a plain block at the end of the catalogue without JavaScript; with it a bar fixed above the tab bar, shown while something is chosen. */
.gos-cartbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 12px 12px 18px;
    border-radius: 16px;
    background: var(--gos-ink);
    color: #fff;
}

.gos-cartbar .gos-cartbar-sum {
    flex: 1 1 7rem;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.gos-cartbar .btn {
    flex: 1 1 auto;
}

.gos-cartbar .btn-primary {
    --bs-btn-bg: #fff;
    --bs-btn-color: var(--gos-ink);
    --bs-btn-border-color: #fff;
    --bs-btn-hover-bg: var(--gos-canvas);
    --bs-btn-hover-color: var(--gos-ink);
    --bs-btn-hover-border-color: var(--gos-canvas);
    --bs-btn-active-bg: var(--gos-track);
    --bs-btn-active-color: var(--gos-ink);
}

.gos-cartbar .btn-quiet {
    --bs-btn-bg: transparent;
    --bs-btn-color: #fff;
    --bs-btn-border-color: rgba(255, 255, 255, .5);
    --bs-btn-hover-bg: rgba(255, 255, 255, .12);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-border-color: #fff;
}

.gos-cartbar .gos-cartbar-error {
    flex-basis: 100%;
    color: #FFD8D3;
}

.gos-js .gos-cartbar {
    position: sticky;
    bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: 1025;
    box-shadow: 0 6px 18px rgba(22, 33, 28, .28);
}

.gos-js .gos-has-tabbar .gos-cartbar {
    bottom: calc(var(--gos-tabbar-height) + 12px + env(safe-area-inset-bottom));
}

.gos-js .gos-cartbar.is-empty {
    display: none;
}

@media (min-width: 768px) {
    .gos-js .gos-has-tabbar .gos-cartbar {
        bottom: calc(16px + env(safe-area-inset-bottom));
    }
}

/* The order summary: lines, total, the sticky bar with the total and the order button. */
.gos-line {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-top: 1px solid var(--gos-line-soft);
}

.gos-group > .gos-line:first-child {
    border-top: 0;
}

.gos-line-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.gos-sum {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 14px 16px;
    border-top: 1px solid var(--gos-line);
    background: var(--gos-surface-sunken);
}

.gos-fold {
    background: var(--gos-surface);
    border: 1px solid var(--gos-line);
    border-radius: 16px;
}

.gos-fold > summary {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    padding: 10px 16px;
    cursor: pointer;
    list-style: none;
    font-weight: 500;
}

.gos-fold > summary::-webkit-details-marker {
    display: none;
}

.gos-fold > summary::after {
    content: "";
    margin-left: auto;
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--gos-icon-muted);
    border-bottom: 2px solid var(--gos-icon-muted);
    transform: rotate(45deg);
    flex: none;
}

.gos-fold[open] > summary::after {
    transform: rotate(225deg);
}

.gos-fold-body {
    padding: 4px 16px 16px;
}

.gos-check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-top: 1px solid var(--gos-line-soft);
    margin: 0;
    cursor: pointer;
}

.gos-group > .gos-check:first-child {
    border-top: 0;
}

.gos-check .form-check-input {
    width: 24px;
    height: 24px;
    margin: 0;
    flex: none;
}

/* A region in a list of choices: the tick is the checkbox, the name opens the courses of the region (a bottom sheet, RegionCoursesSheet). */
.gos-check-region {
    align-items: center;
    cursor: default;
}

.gos-region-link {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
    margin: -10px 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
}

.gos-region-link > span {
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 4px;
}

.gos-region-link > i {
    color: var(--gos-brand-ink);
    font-size: 1.25rem;
}

.gos-region-link:hover > span {
    text-decoration-style: solid;
}

.gos-orderbar {
    position: sticky;
    bottom: 0;
    z-index: 1020;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0 -16px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: var(--gos-surface);
    border-top: 1px solid var(--gos-line);
    box-shadow: 0 -2px 10px rgba(22, 33, 28, .06);
}

.gos-orderbar .gos-orderbar-sum {
    display: flex;
    flex-direction: column;
    flex: 1 1 8rem;
}

.gos-orderbar .btn {
    flex: 1 1 12rem;
}

@media (min-width: 768px) {
    .gos-orderbar {
        margin: 0;
        border: 1px solid var(--gos-line);
        border-radius: 16px;
        bottom: 16px;
    }
}

.gos-legal-links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 20px;
}

.gos-legal-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

.gos-prose {
    background: var(--gos-surface);
    border: 1px solid var(--gos-line);
    border-radius: 16px;
    padding: 20px;
    max-width: 48rem;
}

.gos-prose > :last-child {
    margin-bottom: 0;
}

.gos-code-input {
    font-family: var(--gos-font-figures);
    font-size: 1.25rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}

/* ==== Results pages (step U2, kap. 22.4) ======================================================================================= */

.gos-rnav {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

/* The context bar of a phone: sticks to the top while the table scrolls. */
.gos-rnav-bar {
    position: sticky;
    top: 0;
    z-index: 1015;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: -8px -12px 0;
    padding: 8px 12px;
    background: var(--gos-canvas);
}

.gos-rnav-title {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-height: 52px;
    padding: 6px 14px;
    border: 1px solid var(--gos-line);
    border-radius: 14px;
    background: var(--gos-surface);
    color: var(--gos-ink);
    text-align: left;
    font: inherit;
}

button.gos-rnav-title:hover {
    background: var(--gos-surface-sunken);
}

.gos-rnav-name {
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    font-weight: 600;
    font-size: 1.125rem;
    line-height: 1.5rem;
}

.gos-rnav-name .bi {
    color: var(--gos-brand-ink);
    flex: none;
}

.gos-rnav-sub {
    color: var(--gos-muted);
    max-width: 100%;
}

.gos-rnav-icon {
    width: 52px;
    height: 52px;
    flex: none;
    border: 1px solid var(--gos-line);
    border-radius: 14px;
    background: var(--gos-surface);
    color: var(--gos-brand-ink);
    font-size: 1.25rem;
}

.gos-rnav-head {
    padding-top: 4px;
}

.gos-rnav-h {
    margin: 0;
    font-size: 1.75rem;
    line-height: 2.125rem;
    font-weight: 600;
}

.gos-rnav-segments {
    max-width: 32rem;
}

/* Chips: one row, never wrapped. On a phone it scrolls sideways (the active chip is scrolled into view); from 992 px what does not fit moves into "More N". */
.gos-chips {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.gos-chips-track {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    flex: 1;
    min-width: 0;
    padding: 2px;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent);
}

.gos-chips-track::-webkit-scrollbar {
    display: none;
}

.gos-chips.is-fitted .gos-chips-track {
    -webkit-mask-image: none;
    mask-image: none;
    overflow: hidden;
}

.gos-chip {
    display: inline-flex;
    align-items: center;
    flex: none;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid var(--gos-line-strong);
    border-radius: 22px;
    background: var(--gos-surface);
    color: var(--gos-ink-2);
    font: inherit;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
}

.gos-chip:hover {
    background: var(--gos-surface-sunken);
    color: var(--gos-ink);
}

.gos-chip[aria-current="page"] {
    background: var(--gos-brand);
    border-color: var(--gos-brand);
    color: var(--gos-on-brand, #fff);
    font-weight: 600;
}

.gos-chips-more .dropdown-item {
    min-height: 44px;
    display: flex;
    align-items: center;
}

.gos-chips-more .dropdown-item[aria-current="page"] {
    font-weight: 600;
    background: var(--gos-brand-soft);
    color: var(--gos-brand-ink);
}

/* The sheet with the tree. */
.gos-rsheet .offcanvas-body {
    overflow-y: auto;
}

.gos-tree a.gos-row {
    color: var(--gos-ink);
    text-decoration: none;
}

.gos-tree a.gos-row:hover {
    background: var(--gos-surface-sunken);
}

.gos-tree a.gos-row[aria-current="page"] {
    background: var(--gos-brand-soft);
    color: var(--gos-brand-ink);
    font-weight: 600;
}

.gos-tree-group > summary {
    list-style: none;
    cursor: pointer;
}

.gos-tree-group > summary::-webkit-details-marker {
    display: none;
}

.gos-tree-group[open] > summary .gos-tree-chevron {
    transform: rotate(180deg);
}

.gos-tree > .gos-tree-group:first-child > summary {
    border-top: 0;
}

.gos-tree-child {
    padding-left: 32px;
}

.gos-tree-leaf {
    padding-left: 48px;
}

.gos-tree .is-filtered-out {
    display: none !important;
}

/* "You are N." above the table. */
.gos-me {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding: 10px 10px 10px 16px;
    border-radius: 14px;
    background: var(--gos-brand-soft);
    color: var(--gos-brand-ink);
}

.gos-me-text {
    flex: 1;
    min-width: 0;
}

.gos-me .btn {
    min-height: 44px;
    border-radius: 10px;
    font-weight: 600;
    --bs-btn-bg: var(--gos-surface);
    --bs-btn-color: var(--gos-brand-ink);
    --bs-btn-border-color: var(--gos-line-strong);
    --bs-btn-hover-bg: var(--gos-surface-sunken);
    --bs-btn-hover-color: var(--gos-ink);
    flex: none;
}

#stTable tr.st-me > td {
    background: var(--gos-brand-soft) !important;
}

#stTable tr.st-me .st-player-link {
    color: var(--gos-brand-ink) !important;
}

/* The table on a phone: the position, the player, the main value and the played count; the other columns are in the expanded row. */
@media (max-width: 767.98px) {
    .gos-results .st-ph {
        display: none !important;
    }
}

.st-ph-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    margin: 0;
    padding: 10px 12px;
    background: var(--gos-surface-sunken);
    border-bottom: 1px solid var(--gos-line-soft);
}

.st-ph-summary div {
    display: flex;
    gap: 4px;
}

.st-ph-summary dt {
    font-weight: 500;
    color: var(--gos-muted);
}

.st-ph-summary dd {
    margin: 0;
    font-weight: 600;
}

.gos-results #stBody tr.st-more-hidden {
    display: none;
}

.gos-more {
    display: flex;
    justify-content: center;
    padding: 12px 0;
}

.gos-more .btn {
    min-height: 48px;
    border-radius: 12px;
    font-weight: 600;
    --bs-btn-bg: var(--gos-surface);
    --bs-btn-color: var(--gos-brand-ink);
    --bs-btn-border-color: var(--gos-line-strong);
    --bs-btn-hover-bg: var(--gos-surface-sunken);
    --bs-btn-hover-color: var(--gos-ink);
}

/* Computer: the table in the full width and, for a signed-in player, the panel "Your season" beside it from 1200 px (above it below). */
.gos-results-grid {
    display: grid;
    gap: 24px;
}

.gos-results-main {
    min-width: 0;
}

@media (min-width: 1200px) {
    .gos-results-grid.has-aside {
        grid-template-columns: minmax(0, 1fr) 20rem;
        align-items: start;
    }

    .gos-results-grid.has-aside > .gos-aside {
        position: sticky;
        top: 16px;
        order: 2;
    }
}

.gos-aside {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gos-aside-card {
    background: var(--gos-surface);
    border: 1px solid var(--gos-line);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gos-aside-card h2 {
    font-size: 1.125rem;
    line-height: 1.5rem;
    font-weight: 600;
    margin: 0 0 4px;
}

.gos-aside-card .btn {
    min-height: 44px;
    border-radius: 10px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.gos-aside-card .btn-primary {
    --bs-btn-bg: var(--gos-brand);
    --bs-btn-border-color: var(--gos-brand);
    --bs-btn-color: var(--gos-on-brand, #fff);
    --bs-btn-hover-bg: var(--gos-brand-ink);
    --bs-btn-hover-border-color: var(--gos-brand-ink);
    --bs-btn-hover-color: var(--gos-on-brand, #fff);
}

.gos-aside-card .btn-quiet {
    --bs-btn-color: var(--gos-brand-ink);
    --bs-btn-bg: var(--gos-surface);
    --bs-btn-border-color: var(--gos-line-strong);
    --bs-btn-hover-bg: var(--gos-surface-sunken);
    --bs-btn-hover-color: var(--gos-ink);
    --bs-btn-hover-border-color: var(--gos-line-strong);
}

/* The title and the chips line up with the table (60rem, _StandingsStyles); beside the panel everything starts at the left. */
@media (min-width: 768px) {
    .gos-results .gos-rnav {
        max-width: 60rem;
        width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .gos-results:has(.has-aside) .gos-rnav {
        max-width: none;
        margin-left: 0;
    }
}

/* The HCP change column (Leaderboard1Parameters.ShowHcpChange): "18,4 → 17,9" fits in one line. */
.st-table-fixed col.st-col-hcp {
    width: 7.5rem;
}
