@font-face {
    font-family: 'Ari W9500';
    src: url('assets/fonts/ari-w9500.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Ari W9500';
    src: url('assets/fonts/ari-w9500-bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* extra variants below are only used for the randomized home link fonts
   (see ARI_FONT_VARIANTS in script.js) - the site default stays 'Ari W9500' */

@font-face {
    font-family: 'Ari W9500 Bold';
    src: url('assets/fonts/ari-w9500-bold.ttf') format('truetype');
    font-display: swap;
}

@font-face {
    font-family: 'Ari W9500 Condensed';
    src: url('assets/fonts/ari-w9500-condensed.ttf') format('truetype');
    font-display: swap;
}

@font-face {
    font-family: 'Ari W9500 Condensed Bold';
    src: url('assets/fonts/ari-w9500-condensed-bold.ttf') format('truetype');
    font-display: swap;
}

@font-face {
    font-family: 'Ari W9500 Display';
    src: url('assets/fonts/ari-w9500-display.ttf') format('truetype');
    font-display: swap;
}

@font-face {
    font-family: 'Ari W9500 Condensed Display';
    src: url('assets/fonts/ari-w9500-condensed-display.ttf') format('truetype');
    font-display: swap;
}

/* used only for the "buy me a coffee" wordmark next to the cafezinho chips,
   to echo the cursive script in BMC's own logo. */
@font-face {
    font-family: 'Dancing Script';
    src: url('assets/fonts/dancing-script-bold.ttf') format('truetype');
    font-weight: 700;
    font-display: swap;
}

:root {
    --bg: #000;
    --fg: #e8e8e8;
    --fg-dim: #9a9a9a;
    --muted: #888;
    --window-bar: #1c1c1c;
    --window-bar-fg: #d8d8d8;
    --window-border: #3a3a3a;
    --swatch-linho: #fffbf6;
    --swatch-noite: #191919;
    --swatch-flama: #ea5e2b;
    --titlebar-bg: var(--window-bar);
    --titlebar-fg: var(--window-bar-fg);
}

body.theme-flama {
    --titlebar-bg: var(--swatch-flama);
    --titlebar-fg: var(--swatch-noite);
}

body.theme-linho {
    --titlebar-bg: var(--swatch-linho);
    --titlebar-fg: var(--swatch-noite);
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    background-color: #1a1512;
    color: var(--fg);
    font-family: 'Ari W9500', ui-monospace, 'Courier New', monospace;
    font-size: 15px;
    line-height: 1.5;
}

#bg-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

a {
    color: inherit;
}

button {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    text-align: left;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
}

/* ---------- home: scattered stage ---------- */

.stage {
    position: relative;
    width: 850px;
    max-width: 100%;
    min-height: 900px;
    margin: 120px auto 0;
    padding: 40px 0;
}

.scatter-link {
    position: absolute;
    text-decoration: none;
    letter-spacing: 0.02em;
    cursor: pointer;
    z-index: 2;
    touch-action: none;
    user-select: none;
    -webkit-user-drag: none;
    opacity: 1;
    transition: opacity 0.3s ease, color 0.15s ease;
}

.scatter-link:hover {
    color: var(--fg-dim);
}

.scatter-link.dragging {
    cursor: grabbing;
}

.chat-status-icon {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 5px;
    vertical-align: middle;
}

/* ---------- window (avatar, chat) ---------- */

.window {
    position: absolute;
    width: 330px;
    border: 1px solid var(--window-border);
    background: var(--bg);
    z-index: 1;
    touch-action: none;
    user-select: none;
    -webkit-user-drag: none;
}

.window.dragging .window-titlebar {
    cursor: grabbing;
}

.window-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    cursor: grab;
    background: var(--titlebar-bg);
    color: var(--titlebar-fg);
    border-bottom: 1px solid var(--window-border);
    transition: background-color 0.15s ease, color 0.15s ease;
}

.window-title {
    font-size: 13px;
}

.window-minimize,
.modal-close {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    width: 26px;
    height: 26px;
    padding: 0;
}

.window-minimize::before,
.modal-close::before,
.modal-close::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 11px;
    height: 2px;
    background: currentColor;
}

.window-minimize::before {
    transform: translate(-50%, -50%);
}

.window.minimized .window-minimize::before {
    width: 9px;
    height: 9px;
    background: none;
    border: 2px solid currentColor;
    transform: translate(-50%, -50%);
}

.modal-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.modal-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.window-minimize:hover {
    color: #fff;
}

.modal-close:hover {
    color: #ff4d4d;
}

.window-body {
    padding: 0;
}

.window.minimized .window-body {
    display: none;
}

.dot-placeholder {
    background-color: #0a0a0a;
    background-image:
        radial-gradient(circle, #fff 1px, transparent 1.2px);
    background-size: 6px 6px;
    opacity: 0.5;
}

.avatar-gif {
    display: block;
    width: 100%;
    height: 260px;
    object-fit: cover;
    object-position: left center;
}

/* ---------- color swatches ---------- */

.swatch {
    position: absolute;
    width: 26px;
    height: 31px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0;
    opacity: 1;
    transition: transform 0.15s ease, opacity 0.3s ease;
}

.swatch:hover {
    transform: scale(1.1);
}

.swatch::after {
    content: attr(data-label);
    position: absolute;
    top: -22px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    white-space: nowrap;
    background: var(--window-bar);
    border: 1px solid var(--window-border);
    padding: 2px 6px;
    color: var(--fg);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.swatch:hover::after {
    opacity: 1;
}

.swatch.copied::after {
    content: 'copiado';
    opacity: 1;
}

/* ---------- now playing (last.fm) ---------- */

.now-playing {
    position: absolute;
    display: flex;
    gap: 8px;
    align-items: baseline;
    max-width: 320px;
    cursor: pointer;
    z-index: 2;
    user-select: none;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.now-playing-icon {
    display: inline-flex;
    align-items: center;
    height: 12px;
    flex-shrink: 0;
}

.now-playing-status-icon {
    display: block;
    width: 12px;
    height: 12px;
}

/* the pause icon (shown while something's actually playing) blinks slowly;
   the play icon (last played track, nothing live) stays still. */
.now-playing.is-live .now-playing-status-icon {
    animation: now-playing-blink 1.8s ease-in-out infinite;
}

@keyframes now-playing-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.25; }
}

.now-playing-track-wrap {
    display: inline-block;
    width: 180px;
    overflow: hidden;
    white-space: nowrap;
    text-transform: uppercase;
}

.now-playing-track {
    display: inline-block;
    white-space: nowrap;
}

.now-playing-track-wrap.marquee .now-playing-track {
    animation-name: marquee-scroll;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    animation-duration: var(--marquee-duration, 8s);
}

@keyframes marquee-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* ---------- content panel (revealed when a link is clicked) ---------- */

.content-panel {
    position: absolute;
    left: 0;
    width: 850px;
    max-width: 100%;
    padding-left: 380px;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    line-height: 1.9;
}

.content-panel.visible {
    opacity: 1;
}

.content-placeholder {
    color: var(--muted);
    font-style: italic;
    margin: 0;
}

.content-desc {
    max-width: 620px;
    color: var(--fg-dim);
    font-size: 14px;
    line-height: 1.7;
    margin: 0 0 24px;
}

.gallery-masonry {
    column-count: 3;
    column-gap: 14px;
    width: 100%;
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 14px;
    border: 1px solid var(--window-border);
}

/* placed after .scatter-link/.swatch/.now-playing so it always wins the
   opacity cascade regardless of which of those classes an element also has */
.content-hidden {
    opacity: 0;
    pointer-events: none;
}

/* ---------- chat: floating window (like the avatar window) ---------- */

.chat-window {
    width: 330px;
    z-index: 2;
}

.chat-window .window-body iframe {
    display: block;
    border: none;
}

/* ---------- bh: floating window with a Leaflet map (like the avatar window) ---------- */

.bh-window {
    width: 320px;
    z-index: 2;
}

.bh-map {
    width: 100%;
    height: 260px;
    background: #000;
}

.leaflet-control-attribution {
    background: rgba(0, 0, 0, 0.7) !important;
    color: var(--muted) !important;
    font-size: 9px !important;
}

.leaflet-control-attribution a {
    color: var(--fg-dim) !important;
}

.leaflet-control-zoom a {
    background: var(--window-bar) !important;
    color: var(--fg) !important;
    border-color: var(--window-border) !important;
}

.leaflet-control-zoom a:hover {
    color: #fff !important;
}

/* ---------- shared: home menu items with an icon that only shows on hover ---------- */
/* used by cafezinho, webringue, login and fotografia (see .menu-item-widget
   in the markup). collapsed to zero width/no margin at rest, so the label
   text sits exactly where it would with no icon at all; hovering grows the
   icon back in, and the text eases over since width/margin transition. */

.menu-item-widget {
    display: inline-flex;
    align-items: center;
}

.menu-item-inner {
    text-decoration: none;
}

.scatter-link:hover .menu-item-inner {
    color: var(--fg-dim);
}

.menu-item-icon {
    display: block;
    width: 0;
    height: 16px;
    margin-right: 0;
    opacity: 0;
    overflow: hidden;
    transition: width 0.2s ease, margin-right 0.2s ease, opacity 0.2s ease;
}

.scatter-link:hover .menu-item-icon,
.scatter-link.icon-revealed .menu-item-icon {
    width: 16px;
    margin-right: 6px;
    opacity: 1;
}

/* ---------- cafezinho: home scatter-link with amount chips linking to
   buymeacoffee.com/outrolucas ---------- */

.cafezinho-chips:not([hidden]) {
    display: inline-flex;
}

.cafezinho-chips {
    align-items: center;
    gap: 9px;
    margin-left: 6px;
}

.cafezinho-brand {
    font-family: 'Dancing Script', cursive;
    font-size: 15px;
    color: #fd0;
}

.lastfm-brand {
    color: #d1170e;
    text-decoration: none;
}

.lastfm-brand:hover {
    text-decoration: underline;
}

.cafezinho-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 7px;
    background: var(--window-bar);
    border: 1px solid var(--window-border);
    border-radius: 4px;
    color: var(--fg-dim);
    font-family: 'Ari W9500', ui-monospace, 'Courier New', monospace;
    font-size: 10px;
    text-decoration: none;
}

.cafezinho-chip:hover {
    color: #fff;
    border-color: var(--fg-dim);
}

/* ---------- webringue: home scatter-link with prev/next neighbor sites ---------- */

.webring-nav-group:not([hidden]) {
    display: inline-flex;
}

.webring-nav-group {
    gap: 6px;
    margin-left: 6px;
}

.webring-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: var(--window-bar);
    border: 1px solid var(--window-border);
    border-radius: 4px;
    text-decoration: none;
    color: var(--fg-dim);
}

.webring-chip::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    border-top: 2px solid currentColor;
    border-left: 2px solid currentColor;
}

.webring-prev::before {
    transform: translate(-25%, -50%) rotate(-45deg);
}

.webring-next::before {
    transform: translate(-75%, -50%) rotate(135deg);
}

.webring-chip:hover {
    color: #fff;
    border-color: var(--fg-dim);
}

.webring-preview {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    width: 160px;
    height: auto;
    border: 1px solid var(--window-border);
    border-radius: 4px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease;
    pointer-events: none;
    z-index: 30;
}

.webring-chip:hover .webring-preview {
    opacity: 1;
    visibility: visible;
}

/* ---------- vizinhança: neocities webring badges, revealed one at a time
   next to the color swatches, below the avatar window ---------- */

/* an unpositioned anchor at the stage's own origin (0,0) - each badge below
   is placed with its own left/top in stage coordinates, computed in JS,
   since the two rows start from different x positions (see
   layoutVizinhancaBadges in script.js). */
.vizinhanca-badges {
    position: absolute;
    left: 0;
    top: 0;
}

.vizinhanca-badge:not([hidden]) {
    display: block;
}

.vizinhanca-badge {
    position: absolute;
}

.vizinhanca-badge {
    line-height: 0;
}

.vizinhanca-badge img {
    display: block;
    image-rendering: pixelated;
}

/* ---------- álbum: floating window with a random photo from assets/photos ---------- */
/* width is auto so the window shrink-wraps to whatever size the photo ends
   up at (capped by .album-photo's max-width/max-height), keeping each
   photo's original aspect ratio instead of stretching/cropping it. */

.album-window {
    width: auto;
    max-width: 360px;
    z-index: 2;
}

.album-window .window-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.album-titlebar-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.album-nav {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    width: 26px;
    height: 26px;
    padding: 0;
}

.album-nav::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 7px;
    height: 7px;
    border-top: 2px solid currentColor;
    border-left: 2px solid currentColor;
}

.album-prev::before {
    transform: translate(-25%, -50%) rotate(-45deg);
}

.album-next::before {
    transform: translate(-75%, -50%) rotate(135deg);
}

.album-nav:hover {
    color: #fff;
}

.album-photo-wrap {
    position: relative;
    display: block;
    line-height: 0;
}

.album-photo {
    display: block;
    max-width: 320px;
    max-height: 320px;
    width: auto;
    height: auto;
    background: #000;
}

.album-footer:not([hidden]) {
    display: flex;
}

.album-footer {
    position: absolute;
    right: 8px;
    bottom: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.album-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--window-bar);
    border: 1px solid var(--window-border);
    border-radius: 4px;
    padding: 3px 6px;
    color: var(--fg-dim);
    font-size: 11px;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

a.album-chip:hover {
    color: #fff;
    border-color: var(--fg-dim);
}

.album-chip-icon {
    display: inline-flex;
    flex-shrink: 0;
}

/* ---------- cinema: letterboxd-style carousel, revealed via the
   content-reveal system (like estatística/lucas/wc) ---------- */

.movies-inline-carousel {
    position: absolute;
    z-index: 2;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movies-inline-carousel.visible {
    opacity: 1;
    transform: translateY(0);
}

.movies-carousel {
    display: flex;
    align-items: center;
    gap: 8px;
}

.movies-carousel-viewport {
    width: 380px;
    overflow: hidden;
}

.movies-carousel-track {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    transition: transform 0.3s ease;
}

.movies-card {
    flex-shrink: 0;
    width: 90px;
}

.movies-card-poster {
    display: block;
    width: 100%;
    height: 135px;
    object-fit: cover;
    border-radius: 4px;
}

.movies-card-rating {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-top: 6px;
}

.movies-stars {
    position: relative;
    font-size: 12px;
    line-height: 1;
    letter-spacing: 1px;
}

.movies-stars-bg,
.movies-stars-fg {
    white-space: nowrap;
}

.movies-stars-bg {
    color: var(--window-border);
}

.movies-stars-fg {
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    width: 0%;
    color: #00e054;
}

.movies-heart {
    font-size: 12px;
    color: #ff8000;
}

.movies-carousel-nav {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

/* same chevron-via-border-trick used by the webringue/album nav chips */
.movies-carousel-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: var(--window-bar);
    border: 1px solid var(--window-border);
    border-radius: 4px;
    color: var(--fg-dim);
}

.movies-carousel-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    border-top: 2px solid currentColor;
    border-left: 2px solid currentColor;
}

.movies-carousel-prev::before {
    transform: translate(-25%, -50%) rotate(-45deg);
}

.movies-carousel-next::before {
    transform: translate(-75%, -50%) rotate(135deg);
}

.movies-carousel-btn:hover {
    color: #fff;
    border-color: var(--fg-dim);
}

/* shown above the squares once the widget's been clicked - artist name
   plus a chip saying whether the leftmost square is live or just the
   last thing played. */
.lastfm-status-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.lastfm-status-artist {
    font-size: 11px;
    color: var(--fg-dim);
}

.lastfm-status-chip:not([hidden]) {
    display: inline-flex;
}

.lastfm-status-chip {
    align-items: center;
    background: var(--window-bar);
    border: 1px solid var(--window-border);
    border-radius: 4px;
    padding: 3px 7px;
    font-family: 'Ari W9500', ui-monospace, 'Courier New', monospace;
    font-size: 10px;
    color: var(--fg-dim);
    white-space: nowrap;
}

.lastfm-status-chip.lastfm-status-live {
    border-color: #d1170e;
    color: #d1170e;
}

/* ---------- last.fm: row of squares revealed inline below the widget -
   currently playing (leftmost) + the last few played before it. same
   inline reveal/push-down behavior as the cinema carousel. ---------- */

.lastfm-inline-panel {
    position: absolute;
    z-index: 2;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.lastfm-inline-panel.visible {
    opacity: 1;
    transform: translateY(0);
}

.lastfm-squares {
    display: flex;
    gap: 8px;
}

.lastfm-square {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--window-border);
}

/* the only thing that sets the currently-playing square apart from the
   rest - same size as every other one. */
.lastfm-square-current {
    border-color: #d1170e;
}

.lastfm-square-art {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---------- senha.exe: inline text input, revealed next to the login
   label like the cafezinho/webringue widgets ---------- */

.password-form:not([hidden]) {
    display: flex;
}

.password-form {
    align-items: center;
    gap: 6px;
    margin-left: 6px;
}

.password-input {
    width: 130px;
    background: var(--window-bar);
    border: 1px solid var(--window-border);
    border-radius: 4px;
    color: var(--fg-dim);
    font-family: 'Ari W9500', ui-monospace, 'Courier New', monospace;
    font-size: 10px;
    padding: 3px 7px;
}

.password-input:focus {
    outline: 1px solid var(--fg-dim);
}

.password-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--window-bar);
    border: 1px solid var(--window-border);
    border-radius: 4px;
    padding: 3px 7px;
    color: var(--fg-dim);
    font-family: 'Ari W9500', ui-monospace, 'Courier New', monospace;
    font-size: 10px;
}

.password-submit:hover {
    color: #fff;
    border-color: var(--fg-dim);
}

.password-input.shake {
    color: var(--swatch-flama);
    border-color: var(--swatch-flama);
    animation: password-shake 0.4s ease;
}

@keyframes password-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

.password-input.success {
    color: #00e054;
    border-color: #00e054;
    animation: password-flash 0.5s ease 2;
}

@keyframes password-flash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.25; }
}

/* ---------- simple sub-pages ---------- */

.page {
    position: relative;
    width: 850px;
    max-width: 100%;
    margin: 0 auto;
    padding: 60px 20px;
}

.back-link {
    display: inline-block;
    margin-bottom: 40px;
    text-decoration: none;
    color: var(--muted);
}

.back-link:hover {
    color: var(--fg);
}

.page h1 {
    font-size: 20px;
    font-weight: 500;
    margin: 0 0 10px;
}

.under-construction {
    color: var(--muted);
    font-style: italic;
}

/* ---------- small screens ---------- */

@media (max-width: 900px) {
    .stage {
        display: flex;
        flex-direction: column;
        gap: 8px;
        width: 100%;
        max-width: 390px;
        margin: 0 auto;
        min-height: 0;
        padding: 56px 16px 24px 40px;
    }

    .stage > * {
        position: static !important;
    }

    /* the stage itself is centered as a block (max-width above), so the
       avatar (which fills the stage's content width) reads as centered on
       screen, while the menu list - which starts at the stage's own left
       padding, same as the avatar - naturally lines up with where the
       avatar begins. no per-element centering needed. */
    #avatar-window {
        order: 0;
    }

    .swatch-row {
        order: 1;
        display: flex;
        gap: 8px;
        margin-bottom: 20px;
    }

    .swatch-row .swatch {
        position: static !important;
    }

    .scatter-link,
    .now-playing {
        order: 2;
    }

    /* reveal panels get moved (see placeInlineOnMobile in script.js) to sit
       right after their trigger in the DOM; giving them the same order as
       the menu group lets that DOM position actually take effect, instead
       of them defaulting to order:0 and landing next to the avatar. */
    /* z-index (not just position) works here despite ".stage > *" forcing
       position:static, because flex items respect z-index regardless of
       their own position value. */
    .movies-inline-carousel,
    .lastfm-inline-panel,
    .content-panel,
    #vizinhanca-badges {
        order: 2;
        z-index: 3;
    }

    .window {
        width: 100%;
        max-width: 330px;
        order: 2;
        z-index: 3;
    }

    /* stays fixed to the viewport like a mobile video caption, instead of
       getting shoved into the stacked flow by ".stage > *" above - and
       wraps earlier instead of overflowing past the screen edges.
       !important on max-width because this media query block sits earlier
       in the file than the base ".caption-box" rule below, which would
       otherwise win the cascade tie on source order alone. */
    .caption-box {
        position: fixed !important;
        max-width: calc(100% - 32px) !important;
    }
}

/* ---------- caption box: game-subtitle-style line shown while a menu
   is open, one custom phrase per widget (see MENU_CAPTIONS in script.js) ---------- */

.caption-box {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%) translateY(8px);
    max-width: 640px;
    width: max-content;
    background: var(--bg);
    border: 2px solid var(--fg);
    border-radius: 10px;
    padding: 10px 18px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 50;
}

.caption-box.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.letterboxd-brand {
    color: inherit;
    text-decoration: none;
}

.letterboxd-brand:hover {
    text-decoration: underline;
}

.letterboxd-dots {
    display: inline-flex;
    align-items: center;
    margin-left: 4px;
    vertical-align: middle;
}

.letterboxd-dots span {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.letterboxd-dots span:nth-child(1) {
    background: #00e054;
}

.letterboxd-dots span:nth-child(2) {
    background: #ff8000;
    margin-left: -2px;
}

.letterboxd-dots span:nth-child(3) {
    background: #40bcf4;
    margin-left: -2px;
}

.caption-box p {
    margin: 0;
    color: var(--fg);
    font-family: 'Ari W9500', ui-monospace, 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.4;
    text-align: center;
}
