/* Atomic-age chrome: deep teal charcoal, cream type, mustard labels, a teal primary */
:root {
    --bg: #16211F;
    --panel: #22302F;
    --panel-deep: #1B2726;
    --line: rgba(242, 232, 213, 0.14);
    --line-strong: rgba(242, 232, 213, 0.3);
    --cream: #F2E8D5;
    --cream-dim: rgba(242, 232, 213, 0.62);
    --mustard: #D9A441;
    --teal: #237E78;
    --teal-bright: #2B968E;
    --teal-deep: #1C6660;
    --mint: #9ED8CC;
    --coral: #E76F51;
    --font: "Futura", "Avenir Next", "Century Gothic", "Gill Sans", "Segoe UI", sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg);
    background-image:
        radial-gradient(ellipse 70% 50% at 50% 0%, rgba(35, 126, 120, 0.22), transparent 70%),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(217, 164, 65, 0.08), transparent 70%);
    background-attachment: fixed;
    color: var(--cream);
    font-family: var(--font);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

#gameContainer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

#gameTitle {
    font-size: 20px;
    font-weight: 400;
    letter-spacing: 7px;
    color: var(--cream);
    text-transform: uppercase;
    margin: 2px 0 6px;
    display: flex;
    align-items: center;
    gap: 14px;
}

#gameTitle::before,
#gameTitle::after {
    content: '✦';
    color: var(--mustard);
    font-size: 14px;
    letter-spacing: 0;
}

#gameCanvas {
    border: 2px solid var(--line-strong);
    border-radius: 12px;
    display: block;
    background: #1B2726;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 0 6px rgba(27, 39, 38, 0.6);
}

/* Control Panel */
#controlPanel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 720px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px 22px;
    gap: 16px;
}

/* Stats */
#statsPanel {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 128px;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 10px;
    text-transform: uppercase;
    color: var(--mustard);
    letter-spacing: 2px;
    font-weight: 600;
}

.stat-value {
    font-size: 20px;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.par-label {
    color: var(--cream-dim);
    font-size: 9px;
    font-weight: 400;
    letter-spacing: 1px;
}

/* D-Pad */
#dpadContainer {
    display: flex;
    align-items: center;
    justify-content: center;
}

#dpad {
    display: grid;
    grid-template-columns: 50px 50px 50px;
    grid-template-rows: 50px 50px 50px;
    gap: 3px;
}

#btnUp    { grid-column: 2; grid-row: 1; }
#btnLeft  { grid-column: 1; grid-row: 2; }
#btnCenter{ grid-column: 2; grid-row: 2; }
#btnRight { grid-column: 3; grid-row: 2; }
#btnDown  { grid-column: 2; grid-row: 3; }

.dpad-btn {
    width: 50px;
    height: 50px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel-deep);
    color: var(--cream);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.1s, transform 0.05s, border-color 0.1s;
    user-select: none;
    -webkit-user-select: none;
}

.dpad-btn:hover:not(:disabled) {
    background: var(--teal);
    border-color: var(--teal-bright);
}

.dpad-btn:active:not(:disabled) {
    background: var(--teal-deep);
    transform: scale(0.93);
}

.dpad-center {
    background: var(--mustard);
    border: none;
    cursor: default;
    border-radius: 50%;
    width: 14px;
    height: 14px;
    margin: auto;
    box-shadow: 0 0 10px rgba(217, 164, 65, 0.5);
}

/* Right Panel */
#rightPanel {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    min-width: 128px;
}

#batteryContainer {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    width: 100%;
}

#batteryBar {
    width: 100%;
    height: 12px;
    background: #121A19;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--line);
}

#batteryFill {
    height: 100%;
    width: 100%;
    background: #5BC8A8;
    border-radius: 6px;
    transition: width 0.2s, background-color 0.3s;
}

#batteryText {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    color: #5BC8A8;
}

#levelDisplay {
    display: flex;
    gap: 8px;
    align-items: baseline;
}

#levelDisplay .stat-value {
    font-size: 15px;
}

.action-btn {
    padding: 7px 16px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--teal);
    color: var(--cream);
    font-family: var(--font);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.action-btn:hover {
    background: var(--teal-bright);
}

.action-btn:active {
    background: var(--teal-deep);
}

.action-btn-quiet {
    background: transparent;
    border-color: var(--line-strong);
    color: var(--cream-dim);
}

.action-btn-quiet:hover {
    background: rgba(242, 232, 213, 0.08);
    color: var(--cream);
}

/* One-line key legend under the panel */
#legend {
    width: 720px;
    text-align: center;
    font-size: 10.5px;
    color: var(--cream-dim);
    letter-spacing: 0.8px;
}

/* === Responsive layout === */
body {
    overflow: auto;
    align-items: flex-start;
    min-height: 100dvh;
    padding: 12px 0 24px;
}

#gameContainer {
    width: min(720px, 100vw - 24px);
}

#gameCanvas {
    width: 100%;
    height: auto;
    aspect-ratio: 720 / 576;
}

#controlPanel,
#legend,
#levelSelect {
    width: 100%;
}

#controlPanel {
    flex-wrap: wrap;
}

#dpad {
    grid-template-columns: 56px 56px 56px;
    grid-template-rows: 56px 56px 56px;
}

.dpad-btn {
    width: 56px;
    height: 56px;
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
}

.dpad-center {
    width: 14px;
    height: 14px;
}

#dockDist.warn {
    color: var(--coral);
}

#batteryText.low,
#batteryFill.low {
    animation: battery-pulse 0.9s ease-in-out infinite;
}

@keyframes battery-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}

/* Level select row */
#levelSelect {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

#levelSelect .level-label {
    font-size: 10px;
    color: var(--mustard);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    margin-right: 6px;
}

#levelSelect .level-label {
    min-width: 92px;
    text-align: center;
}

.level-nav {
    width: 28px;
    height: 28px;
    padding: 0 0 2px;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    background: transparent;
    color: var(--cream);
    font-family: var(--font);
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
}

.level-nav:hover:not(:disabled) {
    border-color: var(--mint);
}

.level-nav:disabled {
    opacity: 0.25;
    cursor: default;
}

.level-nav:focus-visible {
    outline: 2px solid var(--mint);
    outline-offset: 2px;
}

.level-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 46px;
    padding: 5px 10px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: var(--panel);
    color: var(--cream);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    line-height: 1.1;
    transition: background 0.15s, border-color 0.15s;
}

.level-btn:hover:not(:disabled) {
    border-color: var(--mint);
}

.level-btn .level-stars {
    font-size: 8px;
    color: var(--mustard);
    letter-spacing: 1px;
}

.level-btn.current {
    border-color: var(--teal-bright);
    background: var(--teal);
}

.level-btn:disabled {
    opacity: 0.35;
    cursor: default;
}

.action-btn:focus-visible,
.dpad-btn:focus-visible,
.level-btn:focus-visible {
    outline: 2px solid var(--mint);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    #batteryText.low,
    #batteryFill.low {
        animation: none;
    }
}

@media (max-width: 640px) {
    #gameTitle {
        font-size: 15px;
        letter-spacing: 5px;
    }

    #controlPanel {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 10px 12px;
    }

    #statsPanel {
        flex-direction: row;
        justify-content: space-between;
        min-width: 0;
    }

    #rightPanel {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        min-width: 0;
    }

    #batteryContainer {
        width: 46%;
        align-items: flex-start;
    }

    #dpadContainer {
        order: 3;
    }

    #dpad {
        grid-template-columns: 68px 68px 68px;
        grid-template-rows: 68px 68px 68px;
    }

    .dpad-btn {
        width: 68px;
        height: 68px;
        font-size: 20px;
    }
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* === Vacuum design panel === */
.design-panel {
    width: 100%;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 12px 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.design-panel[hidden] {
    display: none;
}

.design-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.design-head .stat-label {
    font-size: 11px;
}

.design-row {
    display: flex;
    flex-wrap: wrap;
    gap: 18px 28px;
    justify-content: center;
}

.design-field {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 150px;
}

.design-field .field-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    text-transform: uppercase;
    color: var(--mustard);
    letter-spacing: 2px;
    font-weight: 600;
}

.color-wheel {
    border-radius: 50%;
    cursor: crosshair;
    touch-action: none;
    transition: opacity 0.15s;
    box-shadow: 0 0 0 3px var(--panel-deep), 0 0 0 4px var(--line-strong);
}

.design-field.is-off .color-wheel {
    opacity: 0.45;
}

.swatch-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--cream-dim);
    font-family: ui-monospace, Menlo, monospace;
}

.swatch {
    display: inline-block;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid var(--line-strong);
}

/* On/off switch */
.switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    text-transform: none;
    letter-spacing: 0;
    font-size: 12px;
    color: var(--cream);
    font-weight: 400;
}

.switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.switch .track {
    width: 38px;
    height: 20px;
    border-radius: 10px;
    background: #3A4A48;
    position: relative;
    transition: background 0.15s;
}

.switch .track::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--cream);
    transition: transform 0.15s;
}

.switch input:checked + .track {
    background: var(--teal-bright);
}

.switch input:checked + .track::after {
    transform: translateX(18px);
}

.switch input:focus-visible + .track {
    outline: 2px solid var(--mint);
    outline-offset: 2px;
}

.color-wheel:focus-visible {
    outline: 2px solid var(--mint);
    outline-offset: 3px;
}

/* === Upgrades panel === */
/* ----- Credits ----- */

.credits {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 6px 0 4px;
    text-align: center;
}

.credits-game {
    font-size: 15px;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: var(--cream);
}

.credits-game::before,
.credits-game::after {
    content: "\2726";
    color: var(--mustard);
    font-size: 11px;
    letter-spacing: 0;
    margin: 0 12px;
    vertical-align: 1px;
}

.credits-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
}

.credits-row {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.credits-row dt {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--mustard);
}

.credits-row dd {
    margin: 0;
    font-size: 15px;
    line-height: 1.4;
    color: var(--cream);
}

.upgrade-hint {
    font-size: 12px;
    color: var(--cream-dim);
    text-align: center;
}

.upgrade-groups {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 24px;
    justify-content: center;
}

.upgrade-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1 1 300px;
    max-width: 340px;
}

.upgrade-group-title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    color: var(--mint);
}

.upgrade-card {
    background: var(--panel-deep);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.upgrade-card.owned {
    border-color: var(--teal-bright);
}

.upgrade-name {
    font-size: 14px;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.upgrade-pips {
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--mustard);
}

.upgrade-desc {
    font-size: 12px;
    color: var(--cream-dim);
}

.upgrade-now {
    font-size: 11px;
    color: var(--mint);
}

.upgrade-buy {
    align-self: flex-start;
    margin-top: 4px;
    text-transform: none;
    letter-spacing: 0;
    font-size: 12px;
}

.upgrade-buy:disabled {
    background: var(--panel);
    border-color: var(--line);
    color: var(--cream-dim);
    cursor: default;
}

#btnUpgrades.has-points {
    background: var(--mustard);
    color: #1B2726;
    border-color: transparent;
    animation: points-glow 1.6s ease-in-out infinite;
}

@keyframes points-glow {
    0%, 100% { box-shadow: 0 0 0 rgba(217, 164, 65, 0); }
    50% { box-shadow: 0 0 14px rgba(217, 164, 65, 0.6); }
}

@media (prefers-reduced-motion: reduce) {
    #btnUpgrades.has-points {
        animation: none;
    }
}

#batteryFill.over {
    box-shadow: 0 0 8px #6EC6FF;
}

/* === Full screen =========================================================================
   #sidePanel wraps the controls, panels, legend and level select. Normally it lays out as if
   it were not there; in full screen it becomes a side column beside the board. */
#sidePanel {
    display: contents;
}

body.is-fullscreen {
    background: #000;
    background-image: none;
    padding: 0;
    overflow: hidden;
    height: 100dvh;
    min-height: 0;
    align-items: center;
}

body.is-fullscreen #gameContainer {
    width: 100vw;
    height: 100dvh;
    max-width: none;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 10px;
}

body.is-fullscreen #gameTitle {
    display: none;
}

body.is-fullscreen #gameCanvas {
    /* as tall as the screen allows, or as wide as the room beside the side column allows */
    height: min(100dvh - 20px, (100vw - 20px - 14px - 320px) * 576 / 720);
    width: auto;
    border-color: #2A3634;
    box-shadow: none;
}

body.is-fullscreen #sidePanel {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 0 0 320px;
    width: 320px;
    max-height: 100%;
    overflow-y: auto;
    scrollbar-width: thin;
}

body.is-fullscreen #controlPanel {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px 14px;
}

body.is-fullscreen #statsPanel {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    row-gap: 8px;
    min-width: 0;
}

body.is-fullscreen #statsPanel .stat {
    width: 48%;
}

body.is-fullscreen #rightPanel {
    align-items: stretch;
    min-width: 0;
}

body.is-fullscreen #rightPanel .action-btn {
    width: 100%;
}

body.is-fullscreen #batteryContainer {
    align-items: stretch;
}

body.is-fullscreen #levelDisplay {
    justify-content: space-between;
}

body.is-fullscreen .design-panel {
    padding: 10px 12px 12px;
}

body.is-fullscreen #legend {
    font-size: 11px;
    line-height: 1.5;
}

/* Portrait screens: the board on top, everything else scrolls beneath it */
@media (orientation: portrait) {
    body.is-fullscreen #gameContainer {
        flex-direction: column;
        justify-content: flex-start;
        gap: 8px;
    }

    body.is-fullscreen #gameCanvas {
        width: min(100vw - 20px, (100dvh - 20px) * 720 / 576);
        height: auto;
    }

    body.is-fullscreen #sidePanel {
        flex: 1 1 auto;
        width: 100%;
        min-height: 0;
        max-height: none;
    }
}

/* === Graphics settings in the design panel === */
.design-graphics {
    gap: 12px 32px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
}

.design-select {
    display: flex;
    align-items: center;
    gap: 10px;
}

.design-select select {
    background: var(--panel-deep);
    color: var(--cream);
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    padding: 5px 12px;
    font: inherit;
    font-size: 12px;
}

.design-select select:disabled {
    opacity: 0.5;
}

/* === The bar at the top: what to play ===================================================== */
#modeBar {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 10px 14px;
}

.mode-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
}

.mode-tab {
    padding: 8px 16px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: transparent;
    color: var(--cream-dim);
    font-family: var(--font);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.mode-tab:hover {
    color: var(--cream);
    border-color: var(--mint);
}

.mode-tab.current {
    background: var(--teal);
    border-color: var(--teal-bright);
    color: var(--cream);
}

.mode-switch {
    margin-left: auto;
}

.mode-context {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    min-height: 44px;
}

.mode-context[hidden] {
    display: none;
}

#ctxBuild {
    flex-direction: column;
    align-items: stretch;
}

.build-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
}

.build-row[hidden] {
    display: none;
}

.mode-label {
    font-size: 15px;
    letter-spacing: 0.5px;
    min-width: 0;
}

.mode-note {
    font-size: 12px;
    color: var(--cream-dim);
    min-width: 0;
}

.mode-note.problem {
    color: var(--coral);
}

.mode-note.good {
    color: var(--mint);
}

#modeBar .field-label {
    font-size: 10px;
    text-transform: uppercase;
    color: var(--mustard);
    letter-spacing: 2px;
    font-weight: 600;
}

.room-select,
#modeBar .design-select select {
    max-width: 11rem;
}

.room-select {
    background: var(--panel-deep);
    color: var(--cream);
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    padding: 6px 12px;
    font: inherit;
    font-size: 12px;
}

#roomName,
#roomLink {
    background: var(--panel-deep);
    color: var(--cream);
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    padding: 6px 14px;
    font: inherit;
    font-size: 13px;
    min-width: 0;
}

#roomName {
    flex: 1 1 6rem;
    max-width: 8.5rem;
}

#roomLink {
    width: 100%;
    font-family: ui-monospace, Menlo, monospace;
    font-size: 11px;
}

#roomName:disabled,
#modeBar select:disabled {
    opacity: 0.55;
}

.tool-btn {
    padding: 7px 13px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: var(--panel-deep);
    color: var(--cream-dim);
    font-family: var(--font);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.tool-btn:hover {
    color: var(--cream);
    border-color: var(--mint);
}

.tool-btn.current,
.tool-btn[aria-pressed="true"] {
    background: var(--mustard);
    border-color: var(--mustard);
    color: #1B2726;
    font-weight: 600;
}

.tool-btn.tool-turn {
    margin-left: 8px;
}

.action-btn:disabled,
.mode-tab:disabled {
    opacity: 0.4;
    cursor: default;
}

.mode-tab:focus-visible,
.tool-btn:focus-visible,
#roomName:focus-visible,
#modeBar select:focus-visible {
    outline: 2px solid var(--mint);
    outline-offset: 2px;
}

.stat[hidden] {
    display: none;
}

#bestDelta.ahead {
    color: #5BC8A8;
}

#bestDelta.behind {
    color: var(--coral);
}

body.is-fullscreen #modeBar {
    padding: 10px 12px;
}

body.is-fullscreen .mode-switch {
    margin-left: 0;
}

/* In the side column the date sits between its arrows and wraps under itself */
body.is-fullscreen #dailyLabel {
    flex: 1 1 8rem;
    font-size: 14px;
}

@media (max-width: 640px) {
    #modeBar {
        padding: 10px 12px;
    }

    .mode-tab {
        padding: 9px 12px;
        letter-spacing: 1.5px;
    }

    .mode-switch {
        margin-left: 0;
    }

    #dailyLabel {
        flex: 1 1 8rem;
        font-size: 14px;
    }

    .tool-btn {
        padding: 9px 12px;
    }
}

/* ----- Home screen prompt (phones and tablets only) ----- */

#installBar {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 720px;
    box-sizing: border-box;
    padding: 9px 12px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-left: 3px solid var(--mustard);
    border-radius: 12px;
    color: var(--cream);
    font-family: var(--font);
    text-align: left;
}

#installBar[hidden],
#btnInstall[hidden] {
    display: none;
}

#installBar img {
    width: 40px;
    height: 40px;
    border-radius: 9px;
    flex: none;
}

.install-text {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 12px;
    line-height: 1.35;
    color: var(--cream-dim);
}

.install-text strong {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.4px;
    color: var(--cream);
}

.install-text svg {
    width: 0.95em;
    height: 1.15em;
    vertical-align: -0.2em;
    color: var(--mint);
}

.install-actions {
    flex: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px 8px;
}

#installAdd[hidden] {
    display: none;
}

.install-never {
    padding: 8px 6px;
    border: 0;
    background: none;
    color: var(--cream-dim);
    font-family: var(--font);
    font-size: 11px;
    letter-spacing: 0.4px;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.install-never:hover {
    color: var(--cream);
}

.install-never:focus-visible {
    outline: 2px solid var(--mint);
    outline-offset: 2px;
}

body.is-fullscreen #installBar {
    display: none;
}

@media (max-width: 640px) {
    #installBar {
        flex-wrap: wrap;
        gap: 8px 10px;
    }

    .install-text {
        flex-basis: calc(100% - 52px);
    }

    .install-actions {
        margin-left: auto;
    }
}
