/* Round the cabinet: its tokens in Gwen's colours, the frame, her bar and the offline notice. Loaded before the
   cabinet's own styles (gwen-over.css comes after them), by cabinet.html as a document and by /while-you-wait
   into a shadow root, hence :root and :host together. The fonts are fonts.css. */
:root,
:host {
    color-scheme: dark;
    --brand: #3fb3c1;
    --brand-bright: #6fd0da;
    --dark: #1b273a;
    --screen: #111a28;
    --muted: #8a97a8;
    --grey-light: #f8f6f1;
    --grey-line: #d9dfe7;
    --grey-background: #e3eaf2;
    --sans: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --mono: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    --display: 'Cormorant Garamond', 'Times New Roman', serif;
    --script: 'Allura', cursive;
}
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html,
body {
    height: 100%;
}
body,
:host {
    display: flex;
    flex-direction: column;
    min-height: 0;
    font-family: var(--sans);
    background: var(--dark);
    color: var(--grey-light);
    -webkit-font-smoothing: antialiased;
}
.games {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    background: var(--dark);
    color: var(--grey-light);
}
@media (min-width: 1024px) {
    .games > * {
        width: 100%;
        max-width: 1100px;
        margin-inline: auto;
    }
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

/* ---- Gwen's bar: the wordmark and the way back ---------------------------------- */
.gwen-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: max(14px, env(safe-area-inset-top)) 20px 6px;
}
.gwen-brand {
    display: inline-flex;
    flex-direction: column;
    line-height: 1;
    color: var(--grey-light);
    text-decoration: none;
}
.gwen-word {
    font-family: var(--display);
    font-weight: 500;
    font-size: 1.55rem;
    letter-spacing: 0.02em;
}
.gwen-script {
    align-self: flex-end;
    margin-top: -0.35rem;
    font-family: var(--script);
    font-size: 1.3rem;
    color: var(--brand);
}
.gwen-back {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--grey-light);
    text-decoration: none;
    padding: 9px 16px;
    border: 1px solid rgba(248, 246, 241, 0.28);
    border-radius: 999px;
    white-space: nowrap;
}
.gwen-back:hover {
    background: rgba(248, 246, 241, 0.1);
}
.gwen-brand:focus-visible,
.gwen-back:focus-visible,
.gwen-notice button:focus-visible {
    outline: 2px solid var(--brand-bright);
    outline-offset: 3px;
}

/* ---- The offline notice ----------------------------------------------------------- */
.gwen-notice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 10px 20px 0;
    padding: 12px 16px;
    border-radius: 16px;
    background: rgba(63, 179, 193, 0.14);
    border: 1px solid rgba(63, 179, 193, 0.4);
    font-size: 0.92rem;
    width: auto !important;
}
.gwen-notice[hidden] {
    display: none;
}
.gwen-notice strong {
    margin-right: 6px;
}
.gwen-notice button {
    flex-shrink: 0;
    font: inherit;
    font-weight: 600;
    color: var(--dark);
    background: var(--grey-light);
    border: 0;
    border-radius: 999px;
    padding: 8px 16px;
    cursor: pointer;
}
/* A game takes the whole screen: the bar and the notice step aside while one is open */
.games:has(.stage:not([hidden])) .gwen-bar,
.games:has(.stage:not([hidden])) .gwen-notice {
    display: none;
}
