/* Small additions on top of Bootstrap 6. Everything else is stock components. */
body {
    font-variant-numeric: tabular-nums;
}
.mono {
    font-family: var(--bs-font-monospace);
}
.login-box {
    max-width: 380px;
}

/* Flash messages, top right */
.flash-box {
    position: fixed;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 1080;
    max-width: min(420px, calc(100vw - 1.5rem));
}

/* Stat strip */
.stat {
    min-width: 8.5rem;
}
.stat .value {
    font-family: var(--bs-font-monospace);
    font-size: 1.125rem;
    font-weight: 600;
}

/* Game board: one column per in-game day, scrolls sideways on narrow screens */
.board-scroll {
    overflow-x: auto;
}
.board-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(128px, 1fr));
    gap: 0.625rem;
}
/* Off-script scenes: a full-width strip under the days */
.board-offscript {
    grid-column: 1 / -1;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.board-offscript > :first-child,
.board-offscript > .text-sm {
    grid-column: 1 / -1;
}
/* Phones: days stack, two tiles per row */
@media (max-width: 767px) {
    .board-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .board-day {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .board-day > :first-child {
        grid-column: 1 / -1;
    }
}
.board-day {
    display: grid;
    gap: 0.5rem;
    align-content: start;
}
.tile {
    text-align: start;
    cursor: pointer;
    margin: 0;
    padding: 0.5rem 0.625rem;
    gap: 0.125rem;
    border-width: 2px;
    font: inherit;
    color: inherit;
}
.tile:focus-visible {
    outline: 2px solid var(--bs-primary-bg);
    outline-offset: 2px;
}
.tile.selected {
    box-shadow: 0 0 0 3px var(--bs-primary-focus-ring, var(--bs-primary-bg));
}
.tile.skipped {
    opacity: 0.6;
}
.tile.dead {
    opacity: 0.55;
    border-style: dashed;
    background-image: repeating-linear-gradient(135deg, transparent 0 6px, var(--bs-bg-2) 6px 8px);
}
.tile.dead .tile-title {
    text-decoration: line-through;
}
.tile-title {
    font-weight: 600;
    line-height: 1.25;
    font-size: 0.875rem;
}

/* Detail drawer stays in view while scrolling the board on wide screens */
@media (min-width: 1024px) {
    .detail-sticky {
        position: sticky;
        top: 1rem;
        max-height: calc(100vh - 2rem);
        overflow-y: auto;
    }
}
.say {
    border-inline-start: 4px solid var(--bs-danger-bg);
}

/* If-they / we pairs */
.ift dt,
.ift dd {
    margin: 0;
    padding: 0.375rem 0.5rem;
    border-top: 1px solid var(--bs-border-color);
}
.ift {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-radius-5, 0.375rem);
    overflow: hidden;
    margin: 0;
}
.ift dt:first-of-type,
.ift dd:first-of-type {
    border-top: 0;
}
.ift dt {
    font-weight: 500;
    background: var(--bs-bg-1);
}

.log-scroll {
    max-height: 460px;
    overflow-y: auto;
}
.row-blocks {
    background: var(--bs-danger-bg-subtle);
}
.row-removed {
    opacity: 0.55;
    text-decoration: line-through;
}
.live-dot {
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--bs-secondary-bg);
    margin-inline-end: 0.375rem;
}
.live-dot.on {
    background: var(--bs-success-bg);
}
