/* Beatline level codes. The game's own "minimal" look: one dark ramp, cyan
   #46D7F0 as the one accent, hold green only on hold notes, Archivo. The
   repeated detail is the note pill, which is also the dot of the i in the
   logotype, as in the game. */

:root {
    --bg: #0d0e12;
    --surface: #14161c;
    --raise: #1a1d23;
    --edge: #2e333d;
    --text: #eceff4;
    --text-2: #9097a6;
    --muted: #6b7180;
    --accent: #46d7f0;
    --hold: #5be39a;
    --red: #f0506e;
    --hair: rgba(236, 239, 244, 0.08);
    --focus: var(--accent);
    --skip-bg: var(--text);
    --skip-fg: var(--bg);
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
    --r: 8px;
    --wrap: 1120px;
    --sans: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono:
        ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

body.bl {
    background: var(--bg);
    color: var(--text);
    font: 400 16px/1.55 var(--sans);
    font-variant-numeric: tabular-nums;
}

::selection {
    background: var(--accent);
    color: var(--bg);
}

a {
    color: inherit;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}

h1,
h2,
p {
    margin: 0;
}
h2 {
    font-size: 20px;
    font-weight: 500;
    line-height: 1.3;
}

header.site,
main,
.site-foot {
    max-width: var(--wrap);
    margin: 0 auto;
    padding-inline: 32px;
}

/* ------------------------------------------------------------- masthead */

header.site nav {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 0;
    color: var(--muted);
    font-size: 14px;
}
header.site a {
    color: var(--text-2);
    text-decoration: none;
}
header.site a:hover {
    color: var(--text);
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.brand img {
    image-rendering: pixelated;
}

.masthead {
    padding: 32px 0 32px;
}
.masthead h1 {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 20px;
    font-weight: 400;
}
.logotype {
    font-size: 56px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.01em;
}
/* The dotless i with a note for its dot. */
.logotype .i {
    position: relative;
    display: inline-block;
}
.logotype .dot {
    position: absolute;
    left: 50%;
    top: 0.06em;
    width: 0.36em;
    height: 0.12em;
    border-radius: 0.06em;
    background: var(--accent);
    transform: translateX(-50%);
}
.h1-sub {
    color: var(--text-2);
    font-size: 24px;
}
.lead {
    max-width: 60ch;
    margin-top: 16px;
    color: var(--text-2);
    font-size: 17px;
}

/* -------------------------------------------------------------- buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid var(--edge);
    border-radius: var(--r);
    background: var(--raise);
    color: var(--text);
    font: 500 15px/1.2 var(--sans);
    cursor: pointer;
    transition:
        background-color 0.12s var(--ease),
        border-color 0.12s var(--ease),
        transform 0.12s var(--ease);
}
.btn:hover {
    background: #22262e;
    border-color: #3a404c;
}
.btn:active {
    transform: scale(0.98);
}
.btn.primary {
    border-color: var(--text);
    background: var(--text);
    color: var(--bg);
}
.btn.primary:hover {
    background: #fff;
}
.btn[disabled] {
    opacity: 0.4;
    cursor: not-allowed;
}
.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
}

.notice {
    max-width: 72ch;
    margin: 16px 0;
    padding: 4px 0 4px 16px;
    border-left: 2px solid var(--red);
}
.notice-title {
    color: var(--red);
    font-weight: 500;
}
.notice.warn {
    border-left-color: var(--text-2);
}
.notice.warn .notice-title {
    color: var(--text);
}
.notice p + p {
    margin-top: 4px;
    color: var(--text-2);
}

.fine {
    max-width: 64ch;
    margin-top: 12px;
    color: var(--text-2);
    font-size: 14px;
    line-height: 1.5;
}
.hint {
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}
.hint.bad {
    color: var(--red);
}
.status {
    min-height: 22px;
    margin-top: 8px;
    color: var(--accent);
    font-size: 14px;
}

kbd {
    display: inline-block;
    min-width: 26px;
    margin: 0 2px;
    padding: 1px 6px;
    border: 1px solid var(--edge);
    border-bottom-width: 2px;
    border-radius: 5px;
    background: var(--raise);
    color: var(--text);
    font: 500 13px/1.4 var(--sans);
    text-align: center;
}

.field-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-2);
    font-size: 14px;
}
.code,
input[type="text"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--edge);
    border-radius: var(--r);
    background: var(--bg);
    color: var(--text);
    font: 400 14px/1.5 var(--mono);
    resize: vertical;
    word-break: break-all;
}
input[type="text"] {
    font-size: 16px;
}
.code:focus,
input[type="text"]:focus {
    outline: 2px solid var(--accent);
    outline-offset: 0;
    border-color: transparent;
}
.code[readonly] {
    color: var(--text-2);
}

/* ----------------------------------------------------------------- load */

.load {
    padding: 28px;
    border: 1px solid var(--hair);
    border-radius: 16px;
    background: var(--surface);
}
.load .code {
    max-width: 100%;
}

/* ---------------------------------------------------------------- level */

.level {
    margin-top: 32px;
}
.level-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 520px);
    gap: 48px;
    align-items: start;
}
.artist {
    color: var(--text-2);
    font-size: 17px;
}
.title {
    margin-top: 4px;
    font-size: 40px;
    font-weight: 600;
    line-height: 1.1;
}
.meta {
    margin-top: 8px;
    color: var(--text-2);
}
.meta .name {
    color: var(--text);
}
.stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin: 24px 0 0;
    padding: 16px 0;
    border-block: 1px solid var(--hair);
}
.stats dt {
    color: var(--muted);
    font-size: 13px;
}
.stats dd {
    margin: 2px 0 0;
    font-size: 24px;
    font-weight: 500;
}
.stats dd small {
    color: var(--text-2);
    font-size: 14px;
    font-weight: 400;
}
.busy {
    max-width: 52ch;
    margin-top: 12px;
    color: var(--text-2);
    font-size: 14px;
}
.busy b {
    color: var(--text);
    font-weight: 500;
}

.rename {
    margin-top: 28px;
}
.rename .code {
    margin-top: 16px;
}

.stage {
    margin: 0;
}
.highway {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 16px;
    background: var(--bg);
    box-shadow: 0 0 0 1px var(--hair);
}
.transport {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-top: 12px;
}
.btn.play {
    min-width: 96px;
}
.pos {
    color: var(--text-2);
    font-size: 14px;
}
.speed {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    color: var(--text-2);
    font-size: 14px;
}
.speed select {
    min-height: 36px;
    padding: 4px 8px;
    border: 1px solid var(--edge);
    border-radius: var(--r);
    background: var(--raise);
    color: var(--text);
    font: 500 14px var(--sans);
}
.cap {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--hair);
    color: var(--muted);
    font-size: 13px;
}

.map {
    display: block;
    width: 100%;
    height: 76px;
    margin-top: 20px;
    border-radius: 8px;
    cursor: pointer;
    touch-action: none;
}
.map:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.map-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    margin-top: 8px;
    color: var(--text-2);
    font-size: 13px;
}
.sw {
    display: inline-block;
    width: 14px;
    height: 4px;
    border-radius: 2px;
}
.sw.tap {
    background: var(--accent);
}
.sw.hold {
    margin-left: 8px;
    background: var(--hold);
}
.map-note {
    margin-left: auto;
    color: var(--muted);
}

/* ------------------------------------------------------- the reference */

.more {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px 48px;
    margin-top: 64px;
    padding-top: 32px;
    border-top: 1px solid var(--hair);
}
.more h2 {
    margin-bottom: 16px;
}
.steps {
    margin: 0;
    padding-left: 20px;
    color: var(--text-2);
}
.steps li + li {
    margin-top: 8px;
}
.errors {
    grid-column: 1 / -1;
}
.error-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 48px;
    margin: 0;
}
.error-list div {
    padding: 12px 0;
    border-bottom: 1px solid var(--hair);
}
.error-list dt {
    font-weight: 500;
}
.error-list dd {
    margin: 2px 0 0;
    color: var(--text-2);
    font-size: 14px;
}

.site-foot {
    margin-top: 64px;
    padding-top: 24px;
    padding-bottom: 40px;
    color: var(--muted);
    font-size: 13px;
}

@media (max-width: 960px) {
    .level-top {
        grid-template-columns: minmax(0, 1fr);
    }
    .stage {
        order: -1;
        max-width: 560px;
    }
}

@media (max-width: 720px) {
    header.site,
    main,
    .site-foot {
        padding-inline: 16px;
    }
    .logotype {
        font-size: 44px;
    }
    .h1-sub {
        font-size: 20px;
    }
    .load {
        padding: 20px 16px;
    }
    .title {
        font-size: 32px;
    }
    .stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .more,
    .error-list {
        grid-template-columns: minmax(0, 1fr);
    }
    .map-note {
        margin-left: 0;
        width: 100%;
    }
}
