/*
 * DClosers site stylesheet: the shell (header, mega menu, drawer, footer) and the components every page shares.
 * The look follows the current Japanese official site (closers.happytuk.co.jp); content width grows with the screen.
 * No web fonts, no raster UI sprites, no inline styles anywhere (the CSP forbids them). Art lives in /game/
 * (exporter output, never committed); UI glyphs are SVG files in /img/ui/ painted through CSS masks.
 *
 * Components (class names are the interface the page stylesheets and views build on):
 *   Layout           .wrap (page-width column)  .section (white band, 40/100 padding)
 *                    .section-title (24px/700)  .page (the <main> element)
 *   Shell            .site-header  .site-logo  .gnav (.gnav--bar mega menu, .gnav--drawer)  .header-tools
 *                    .lang-form  .pill-btn (sign-in / account pill)  .user-menu  .download-block (DOWNLOAD)
 *                    .drawer (mobile menu, a <details>)  .site-footer
 *   Inner header     .sub-header (+ .sub-header--plain without art)  .sub-header__title  .sub-header__subtitle
 *   Notices          .notice-strip (+ --warning); .notice-banner is the in-page notice box
 *   Pills            .pill with .pill--notice | --event | --update | --maintenance
 *   Buttons          .btn (yellow)  .btn--accent  .btn--dark  .btn--lg; .btn-link for a text-only button
 *   Tabs             ul.tabs > li (.is-active) > a; li.tabs__aside holds a trailing .more-link
 *   Card             .card (shadowed #FDFDFD panel)
 *   List rows        ul.list-rows > li.list-rows__item(.is-pinned/.is-important) > .list-rows__mark .pill .list-rows__pin? .list-rows__title .list-rows__time
 *   Table            table.data-table (th/td; .data-table__num right-aligns a column)
 *   Pager            nav.pager-wrap > ul.pager (the _Pager partial)
 *   Forms            inputs, selects and textareas inside .page are styled directly; .form-note is a muted hint
 *   Icons            span.icon.icon--clock | --globe | --download | --discord | --pin | --external
 *   Misc             .more-link  .sr-only  .skip-link  .status-badge
 */

:root {
    --c-bar: #181818;
    --c-bg: #f6f6f6;
    --c-surface: #ffffff;
    --c-card: #fdfdfd;
    --c-accent: #ffd400;
    --c-text: #212529;
    --c-muted: #767676;
    --c-link: #135599;
    --c-rule: #c0beb8;
    --c-rule-soft: #dfdfdf;
    --c-th: #f9f9f9;
    --c-tabline: #dee2e6;
    --c-error: #d93025;
    --cat-notice: #ff81a0;
    --cat-event: #59b7c8;
    --cat-update: #7560bc;
    --cat-maintenance: #2e8dde;

    --font-en: "Helvetica Neue", Arial, sans-serif;
    --font-zh: "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", sans-serif;
    --font-ja: "Hiragino Kaku Gothic ProN", "BIZ UDPGothic", Meiryo, sans-serif;
    --font-ko: "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;

    --header-height: 80px;
    --mega-panel-height: 285px;
    --wrap-width: min(92vw, clamp(1140px, 66vw, 1600px));
}

@media (max-width: 1199.98px) {
    :root {
        --wrap-width: auto;
    }
}

@media (max-width: 1319.98px) {
    :root {
        --header-height: 56px;
    }
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-family: var(--font-en);
    -webkit-text-size-adjust: 100%;
}

html[lang="zh-TW"] { font-family: var(--font-zh); }
html[lang="ja"] { font-family: var(--font-ja); }
html[lang="ko"] { font-family: var(--font-ko); }

/* Korean breaks between words, not inside them; a token longer than its box still wraps. */
html[lang="ko"] body {
    overflow-wrap: anywhere;
    word-break: keep-all;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    background: var(--c-bg);
    color: var(--c-text);
    font-size: 16px;
    line-height: 1.6;
    overflow-wrap: break-word;
}

h1, h2, h3, h4, h5 {
    margin: 0;
    color: var(--c-text);
    font-weight: 700;
    line-height: 1.3;
}

a {
    color: var(--c-link);
    text-decoration: none;
}

a:hover {
    color: #0c3b6e;
}

img {
    border: 0;
}

ul, ol, dl, dd, p {
    margin: 0;
    padding: 0;
}

li {
    list-style: none;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

summary {
    cursor: pointer;
}

:focus-visible {
    outline: 2px solid var(--c-link);
    outline-offset: 2px;
}

.site-header :focus-visible,
.site-footer :focus-visible {
    outline-color: var(--c-accent);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: 8px;
    top: -60px;
    z-index: 10000;
    padding: 8px 14px;
    background: var(--c-accent);
    color: var(--c-bar);
    font-weight: 700;
}

.skip-link:focus {
    top: 8px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ---- icons: SVG files painted with the text colour through a mask ------------------------------------------------ */

.icon {
    display: inline-block;
    flex: 0 0 auto;
    width: 1em;
    height: 1em;
    background-color: currentColor;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
    vertical-align: -0.125em;
}

.icon--clock {
    -webkit-mask-image: url("../img/ui/clock.svg");
    mask-image: url("../img/ui/clock.svg");
}

.icon--globe {
    -webkit-mask-image: url("../img/ui/globe.svg");
    mask-image: url("../img/ui/globe.svg");
}

.icon--download {
    -webkit-mask-image: url("../img/ui/download.svg");
    mask-image: url("../img/ui/download.svg");
}

.icon--discord {
    -webkit-mask-image: url("../img/ui/discord.svg");
    mask-image: url("../img/ui/discord.svg");
}

.icon--pin {
    -webkit-mask-image: url("../img/ui/pin.svg");
    mask-image: url("../img/ui/pin.svg");
}

.icon--external {
    -webkit-mask-image: url("../img/ui/external.svg");
    mask-image: url("../img/ui/external.svg");
}

/* ---- layout primitives -------------------------------------------------------------------------------------------- */

.wrap {
    width: var(--wrap-width);
    margin-inline: auto;
}

@media (max-width: 1199.98px) {
    .wrap {
        padding-inline: 20px;
    }
}

.section {
    padding: 40px 0 100px;
    background: var(--c-surface);
}

.section-title {
    margin: 0 0 24px;
    font-size: 24px;
    font-weight: 700;
}

.page {
    flex: 1 0 auto;
    background: var(--c-surface);
}

/*
 * Content that sits directly in .page instead of a .section > .wrap (the ranking boards and the profile editor) is
 * kept on the page column and spaced from the band above and the footer below.
 */
.page > :not(.sub-header, .section, .hero, .notice-strip) {
    width: var(--wrap-width);
    margin-inline: auto;
}

.page > .sub-header + :not(.section, .hero, .notice-strip),
.page > .notice-strip + :not(.sub-header, .section, .hero, .notice-strip) {
    margin-top: 40px;
}

.page > :last-child:not(.sub-header, .section, .hero, .notice-strip) {
    margin-bottom: 100px;
}

@media (max-width: 1199.98px) {
    .page > :not(.sub-header, .section, .hero, .notice-strip) {
        margin-inline: 20px;
    }
}

/* ---- header ------------------------------------------------------------------------------------------------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1040;
    display: flex;
    align-items: center;
    height: var(--header-height);
    background: var(--c-bar);
    color: #fff;
}

.site-logo {
    display: flex;
    flex: 0 0 170px;
    align-items: center;
    width: 170px;
    height: 80px;
    margin: 0 60px 0 40px;
}

/* The wordmark scales to the slot the breakpoints below size, keeping its aspect ratio and staying centred. */
.site-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.gnav--bar {
    position: relative;
    z-index: 1;
    align-self: stretch;
}

.gnav__list {
    display: flex;
    height: 100%;
}

.gnav__item {
    position: relative;
}

.gnav__top {
    display: block;
    padding: 0 32px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
    font-weight: 900;
    line-height: var(--header-height);
    white-space: nowrap;
    transition: color 0.25s;
}

.gnav__item.is-current > .gnav__top {
    color: #fff;
}

.gnav__top:hover,
.gnav__top:focus-visible,
.gnav__item:hover > .gnav__top,
.gnav__item:focus-within > .gnav__top {
    background: linear-gradient(180deg, #f0e2bd 0%, #f1c95e 55%, #755c18 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/*
 * The external item (Discord) opens in a new tab: a small glyph after its label says so. In the bar it sits in the
 * item's right padding, so it adds no width to the header; in the drawer it follows the label.
 */
.gnav__item--external .icon--external {
    margin-left: 4px;
    font-size: 0.7em;
}

.gnav--bar .gnav__item--external > .gnav__top {
    position: relative;
}

.gnav--bar .gnav__item--external .icon--external {
    position: absolute;
    top: 50%;
    right: 0;
    margin: -0.3em 0 0;
    font-size: 0.6em;
}

.gnav__item--external > .gnav__top:hover .icon--external,
.gnav__item--external > .gnav__top:focus-visible .icon--external {
    background-color: #f1c95e;
}

/*
 * Every column is one grid item: the label row plus a zero-height row whose overflowing list gives the item its
 * width, so neighbouring columns never overlap and each list is centred under its own label.
 */
.gnav--bar .gnav__item {
    display: grid;
    grid-template-rows: var(--header-height) 0;
}

.gnav--bar .gnav__top {
    text-align: center;
}

.gnav--bar .gnav__sub {
    position: relative;
    top: 14px;
    z-index: 2;
    grid-row: 2;
    height: 0;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
}

/*
 * The panel opens 150 ms after the pointer reaches the bar and closes the moment the pointer leaves the bar and its
 * bridge. The delay keeps a pointer that merely crosses the labels on its way into the page from opening anything:
 * the panel, the backdrop and the bridge all wait for it.
 */
.gnav--bar:is(:hover, :focus-within) .gnav__sub {
    opacity: 1;
    visibility: visible;
    transition-delay: 0.15s;
}

/*
 * The hover bridge: the area under the bar, as wide as the columns and as tall as the panel. The lists hang 14px
 * below the labels and a label without a list (Download) has nothing under it, so without the bridge the pointer
 * leaves the bar on its way down and the panel closes. The bridge belongs to the bar (hovering it is hovering the
 * bar), exists only while the bar is hovered with the pointer, and is hidden (so it cannot be hit, and blocks no
 * click on the page) in every other state, keyboard focus included.
 */
.gnav--bar::after {
    content: "";
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    height: var(--mega-panel-height);
    visibility: hidden;
}

.gnav--bar:hover::after {
    visibility: visible;
    transition: visibility 0s 0.15s;
}

.gnav__sub a {
    display: block;
    padding: 5px 16px;
    color: #999;
    font-size: 14px;
    font-weight: 400;
    white-space: nowrap;
    transition: color 0.2s;
}

.gnav__sub a:hover,
.gnav__sub a:focus-visible {
    color: #fff;
}

.mega-backdrop {
    position: absolute;
    top: var(--header-height);
    right: 0;
    left: 0;
    z-index: 0;
    height: var(--mega-panel-height);
    border-top: 1px solid #000;
    background: #000000ce;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s, visibility 0.25s;
}

.gnav--bar:is(:hover, :focus-within) ~ .mega-backdrop {
    opacity: 1;
    visibility: visible;
    transition-delay: 0.15s;
}

.header-tools {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    height: 100%;
    margin-left: auto;
    gap: 14px;
}

/* ---- language select ---------------------------------------------------------------------------------------------- */

.lang-form {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.lang-form__label {
    display: inline-flex;
    font-size: 18px;
}

.lang-form__select {
    max-width: 9.5em;
    height: 36px;
    padding: 0 22px 0 4px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: inherit;
    color-scheme: dark;
    font-size: 14px;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.lang-form__select option {
    background: var(--c-bar);
    color: #fff;
}

.lang-form__field {
    position: relative;
    display: flex;
    min-width: 0;
}

.lang-form__field::after {
    content: "";
    position: absolute;
    right: 4px;
    top: 50%;
    width: 0;
    height: 0;
    margin-top: -2px;
    border: 4px solid transparent;
    border-top-color: currentColor;
    border-bottom-width: 0;
    pointer-events: none;
}

.lang-form__submit {
    height: 28px;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 4px;
    background: transparent;
    color: inherit;
    font-size: 12px;
    cursor: pointer;
}

.js .lang-form__submit {
    display: none;
}

/* ---- sign-in / account pill and user menu ---------------------------------------------------------------------- */

.pill-btn {
    display: inline-flex;
    align-items: center;
    height: 46px;
    padding: 0 22px;
    border: 2px solid var(--c-accent);
    border-radius: 2rem;
    background: transparent;
    color: var(--c-accent);
    font-size: 16px;
    line-height: 21px;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.pill-btn:hover,
.user-menu[open] > .pill-btn {
    background: var(--c-accent);
    color: #000;
}

.user-menu {
    position: relative;
}

.user-menu > summary {
    list-style: none;
}

.user-menu > summary::-webkit-details-marker {
    display: none;
}

.user-menu__name {
    display: block;
    max-width: 9em;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-menu__list {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 3;
    min-width: 11em;
    padding: 6px 0;
    border: 1px solid #333;
    background: #212121;
}

.user-menu__list a,
.user-menu__signout {
    display: block;
    font-family: inherit;
    line-height: 1.6;
    width: 100%;
    padding: 9px 18px;
    border: 0;
    background: transparent;
    color: #ddd;
    font-size: 14px;
    text-align: left;
    white-space: nowrap;
    cursor: pointer;
}

.user-menu__list a:hover,
.user-menu__signout:hover {
    background: #2c2c2c;
    color: #fff;
}

/* ---- DOWNLOAD block ----------------------------------------------------------------------------------------------- */

.download-block {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    overflow: hidden;
    background-color: var(--c-accent);
    background-image: repeating-linear-gradient(115deg, rgba(0, 0, 0, 0.045) 0 6px, transparent 6px 14px);
    color: var(--c-bar);
    font-family: "Arial Black", "Helvetica Neue", Arial, sans-serif;
    font-size: 26px;
    font-style: italic;
    font-weight: 900;
    letter-spacing: 0.02em;
    line-height: 1;
    text-transform: uppercase;
    transition: filter 0.2s;
}

.download-block::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.6) 50%, transparent 70%);
    transform: translateX(-100%);
}

.download-block:hover {
    color: var(--c-bar);
    filter: brightness(1.08);
}

.download-block:hover::before {
    transform: translateX(100%);
    transition: transform 0.5s ease;
}

.download-block .icon {
    position: relative;
    width: 28px;
    height: 28px;
}

.download-block__label {
    position: relative;
}

.download-block--bar {
    flex: 0 0 260px;
    width: 260px;
    height: 80px;
}

.download-block--drawer {
    width: 100%;
    height: 64px;
    margin-top: 12px;
}

/* ---- mobile drawer ------------------------------------------------------------------------------------------------ */

.drawer {
    display: none;
}

.drawer__toggle {
    position: relative;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 4px;
    list-style: none;
}

.drawer__toggle::-webkit-details-marker {
    display: none;
}

.drawer__bars,
.drawer__bars::before,
.drawer__bars::after {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    transition: transform 0.2s, background-color 0.2s;
}

.drawer__bars {
    position: relative;
}

.drawer__bars::before,
.drawer__bars::after {
    content: "";
    position: absolute;
    left: 0;
}

.drawer__bars::before { top: -7px; }
.drawer__bars::after { top: 7px; }

.drawer[open] .drawer__bars {
    background: transparent;
}

.drawer[open] .drawer__bars::before {
    top: 0;
    transform: rotate(45deg);
}

.drawer[open] .drawer__bars::after {
    top: 0;
    transform: rotate(-45deg);
}

.drawer__overlay {
    position: fixed;
    inset: 0;
    z-index: 1;
    background: #000;
    opacity: 0.6;
}

.drawer__panel {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 2;
    width: 320px;
    max-width: 86vw;
    padding: 64px 20px 24px;
    overflow-y: auto;
    background: #212121;
}

.gnav--drawer .gnav__list {
    display: block;
    height: auto;
}

.gnav--drawer .gnav__top {
    padding: 12px 4px;
    color: #fff;
    line-height: 1.4;
}

.gnav--drawer .gnav__sub {
    padding: 0 0 10px;
}

.gnav--drawer .gnav__sub a {
    padding: 6px 4px 6px 20px;
    color: #b5b5b5;
}

.drawer__panel .lang-form {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #3a3a3a;
}

.drawer__account {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #3a3a3a;
}

.drawer__account a,
.drawer__signout {
    display: block;
    width: 100%;
    padding: 12px 4px;
    border: 0;
    background: transparent;
    color: #fff;
    font-family: inherit;
    font-size: 16px;
    font-weight: 900;
    line-height: 1.4;
    text-align: left;
    cursor: pointer;
}

@media (max-width: 1319.98px) {
    .site-header {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        padding: 0 10px;
    }

    .drawer {
        display: block;
        justify-self: start;
    }

    .site-logo {
        flex-basis: auto;
        width: 130px;
        height: 56px;
        margin: 0;
        justify-content: center;
    }

    .gnav--bar,
    .mega-backdrop,
    .header-tools__lang,
    .download-block--bar {
        display: none;
    }

    .header-tools {
        justify-self: end;
        margin-left: 0;
    }

    .pill-btn {
        height: 41px;
        padding: 0 14px;
        font-size: 14px;
    }

    .user-menu__name {
        max-width: 7em;
    }
}

/*
 * The bar (logo, seven nav items when signed in, language select, account pill, DOWNLOAD) is as wide as its widest
 * content: each item is as wide as its sub menu, so padding alone cannot shrink it. The widest case, Japanese signed in
 * with the Discord item and a nickname that fills the pill's cap, needs about 1310 px with the compact spacing, 1500 px
 * with the middle spacing, 1740 px with the wider one and 1850 px with the roomy one; every band below starts above
 * the width its spacing needs, so the bar never scrolls sideways (below 1320 px the drawer takes over).
 */
@media (min-width: 1320px) and (max-width: 1509.98px) {
    .site-logo {
        flex-basis: 120px;
        width: 120px;
        margin: 0 8px;
    }

    .gnav__top {
        padding: 0 10px;
        font-size: 15px;
    }

    .header-tools {
        gap: 8px;
    }

    .header-tools .lang-form__label {
        display: none;
    }

    .lang-form__select {
        max-width: 7em;
    }

    .pill-btn {
        height: 40px;
        padding: 0 14px;
        font-size: 14px;
    }

    .user-menu__name {
        max-width: 6em;
    }

    .download-block--bar {
        flex-basis: 150px;
        width: 150px;
        gap: 8px;
        font-size: 19px;
    }

    .download-block--bar .icon {
        width: 22px;
        height: 22px;
    }
}

@media (min-width: 1510px) and (max-width: 1739.98px) {
    .site-logo {
        flex-basis: 150px;
        width: 150px;
        margin: 0 10px;
    }

    .gnav__top {
        padding: 0 12px;
    }

    .lang-form__select {
        max-width: 8em;
    }

    .header-tools {
        gap: 8px;
    }

    .user-menu__name {
        max-width: 6.5em;
    }

    .download-block--bar {
        flex-basis: 220px;
        width: 220px;
        font-size: 24px;
    }
}

@media (min-width: 1740px) and (max-width: 1869.98px) {
    .site-logo {
        margin: 0 10px;
    }

    .gnav__top {
        padding: 0 24px;
    }
}

/* ---- footer ------------------------------------------------------------------------------------------------------- */

.site-footer {
    flex: 0 0 auto;
    background: var(--c-bar);
    color: #fff;
}

.site-footer__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 64px;
    gap: 14px;
}

.site-footer__copyright {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
}

.site-footer__discord {
    display: inline-flex;
    font-size: 22px;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.2s;
}

.site-footer__discord:hover {
    color: #fff;
}

/* ---- notice strips ------------------------------------------------------------------------------------------------ */

.notice-strip {
    padding: 10px 20px;
    border-bottom: 1px solid #ecd9a0;
    background: #fff6d6;
    color: #4d3d00;
    font-size: 14px;
    text-align: center;
}

.notice-strip strong {
    margin-right: 0.6em;
}

.notice-strip--warning {
    border-bottom-color: #f3c4bd;
    background: #fdecea;
    color: #7a1c13;
}

/* ---- inner-page header band -------------------------------------------------------------------------------------- */

.sub-header {
    position: relative;
    display: flex;
    align-items: center;
    height: 220px;
    overflow: hidden;
    background: var(--c-bar);
    color: #fff;
}

.sub-header__art {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 0 13%;
    /* The art's right ~30% fades to white (login-panel space): scale it out of frame. */
    transform: scale(1.25);
    transform-origin: 0 30%;
}

.sub-header::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.5) 55%, rgba(0, 0, 0, 0.2) 100%);
}

.sub-header--plain {
    background: repeating-linear-gradient(135deg, #181818 0 18px, #202020 18px 36px);
}

.sub-header--plain::after {
    display: none;
}

.sub-header__inner {
    position: relative;
    z-index: 1;
}

@media (max-width: 1199.98px) {
    .sub-header__inner {
        width: 100%;
    }
}

.sub-header__title {
    color: #fff;
    font-size: 40px;
    font-weight: 900;
    line-height: 1.2;
}

.sub-header__subtitle {
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 15px;
}

@media (max-width: 767.98px) {
    .sub-header {
        height: 120px;
    }

    .sub-header__title {
        font-size: 24px;
    }
}

/* ---- category pills ----------------------------------------------------------------------------------------------- */

.pill {
    display: inline-block;
    flex: 0 0 auto;
    padding: 4px 8px;
    border-radius: 25px;
    background: var(--c-muted);
    color: #fff;
    font-size: 13px;
    line-height: 13px;
    white-space: nowrap;
}

.pill--notice { background: var(--cat-notice); }
.pill--event { background: var(--cat-event); }
.pill--update { background: var(--cat-update); }
.pill--maintenance { background: var(--cat-maintenance); }

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    max-width: 100%;
    padding: 0 28px;
    border: 0;
    background: var(--c-accent);
    color: var(--c-bar);
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    transition: filter 0.2s;
}

.btn:hover,
.btn:focus-visible {
    color: var(--c-bar);
    filter: brightness(1.06);
}

.btn--accent {
    background: var(--c-accent);
    color: var(--c-bar);
}

.btn--dark {
    background: var(--c-bar);
    color: #fff;
}

.btn--dark:hover,
.btn--dark:focus-visible {
    color: #fff;
}

.btn--lg {
    min-width: min(320px, 100%);
    height: 64px;
    font-size: 20px;
}

.btn-link {
    padding: 0;
    border: 0;
    background: none;
    color: var(--c-link);
    font: inherit;
    cursor: pointer;
}

.btn-link:hover {
    color: #0c3b6e;
}

.btn-wrap {
    margin: 40px auto 0;
    text-align: center;
}

.more-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #000;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.more-link:hover {
    color: #555;
}

.more-link__plus {
    font-size: 22px;
    font-weight: 300;
    line-height: 1;
}

/* ---- tabs --------------------------------------------------------------------------------------------------------- */

.tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    margin: 0 0 32px;
    border-bottom: 2px solid var(--c-tabline);
}

.tabs li:not(.tabs__aside) > a {
    position: relative;
    display: block;
    height: 48px;
    margin-bottom: -2px;
    padding: 0 30px;
    border-bottom: 4px solid transparent;
    color: #000;
    font-size: 15px;
    font-weight: 700;
    line-height: 46px;
    white-space: nowrap;
}

.tabs li:not(.tabs__aside) > a:hover {
    color: #495057;
}

.tabs li.is-active > a {
    border-bottom-color: var(--c-accent);
    color: #495057;
}

.tabs li.is-active > a::before,
.tabs li.is-active > a::after {
    content: "";
    position: absolute;
    top: 21px;
    width: 8px;
    height: 8px;
    background: var(--c-accent);
    transform: rotate(45deg);
}

.tabs li.is-active > a::before { left: 12px; }

.tabs li.is-active > a::after { right: 12px; }

.tabs__aside {
    margin-left: auto;
    align-self: center;
}

@media (max-width: 575.98px) {
    .tabs li:not(.tabs__aside) > a {
        padding: 0 14px;
    }

    .tabs li.is-active > a::before { left: 3px; }

    .tabs li.is-active > a::after { right: 3px; }
}

/* ---- card and list rows ------------------------------------------------------------------------------------------ */

.card {
    padding: 15px;
    background: var(--c-card);
    filter: drop-shadow(3px 3px 5px #00000090);
}

.list-rows__item {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 49px;
    padding: 0 10px 0 8px;
    gap: 10px;
    border-bottom: 1px solid var(--c-rule);
}

.list-rows__item:last-child {
    border-bottom: 0;
}

/* The leading slot: every row reserves it, so the category pills line up; an important row paints the triangle in it. */
.list-rows__mark {
    flex: 0 0 18px;
    height: 17px;
}

.list-rows__item.is-important .list-rows__mark {
    background: url("../img/ui/warning.svg") center / contain no-repeat;
}

/* A pinned row gets a soft accent wash and a pushpin glyph in front of the title. */
.list-rows__item.is-pinned {
    background: linear-gradient(90deg, rgba(255, 212, 0, 0.14), rgba(255, 212, 0, 0) 65%);
}

.list-rows__pin {
    flex: 0 0 auto;
    margin-right: -4px;
    color: #8a6d00;
    font-size: 14px;
}

.list-rows__item.is-important .list-rows__title {
    font-weight: 700;
}

.list-rows__title {
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
    color: #000;
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.list-rows__title:hover {
    color: var(--c-link);
}

.list-rows__time {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 6px;
    color: var(--c-text);
    font-size: 12px;
    white-space: nowrap;
}

.list-rows__time .icon {
    font-size: 13px;
}

@media (max-width: 767.98px) {
    .list-rows__item {
        padding-left: 8px;
    }

    .list-rows__title {
        font-size: 13px;
    }

    .list-rows__time .icon {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .list-rows__item {
        flex-wrap: wrap;
        align-items: center;
        min-height: 0;
        padding: 10px 10px 8px 8px;
        row-gap: 2px;
    }

    .list-rows__mark {
        flex-basis: 16px;
        height: 15px;
    }

    .list-rows__title {
        flex: 1 1 0;
    }

    .list-rows__time {
        flex: 0 0 100%;
        color: var(--c-muted);
        font-size: 12px;
    }
}

/* ---- data table --------------------------------------------------------------------------------------------------- */

.data-table {
    width: 100%;
    border-top: 1px solid #000;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 16px 12px;
    border-bottom: 1px solid var(--c-rule-soft);
    text-align: left;
    vertical-align: middle;
}

.data-table th {
    background: var(--c-th);
    color: #000;
    font-weight: 700;
}

.data-table td {
    color: var(--c-text);
}

.data-table .data-table__num {
    text-align: right;
}

/* ---- pager -------------------------------------------------------------------------------------------------------- */

.pager-wrap {
    padding: 60px 0 0;
}

.pager {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 0;
    padding: 0;
}

.pager li {
    min-width: 36px;
    height: 39px;
    border: 1px solid #fff;
    background: #e9e9e9;
    font-size: 16px;
    line-height: 37px;
    text-align: center;
}

.pager li a,
.pager li span {
    display: block;
    height: 37px;
    padding: 0 10px;
    color: #000;
}

.pager li a:hover {
    background: #d5d5d5;
}

.pager li.active {
    background: #000;
}

.pager li.active span {
    color: #fff;
}

.pager li.pager-gap {
    background: transparent;
    color: var(--c-muted);
}

.pager li.pager-prev a,
.pager li.pager-next a,
.pager li.pager-prev .pager-disabled,
.pager li.pager-next .pager-disabled {
    position: relative;
    width: 34px;
    padding: 0;
}

.pager li.pager-prev a::before,
.pager li.pager-next a::before,
.pager li.pager-prev .pager-disabled::before,
.pager li.pager-next .pager-disabled::before {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: 14px;
    height: 14px;
    background: #000;
    -webkit-mask: center / contain no-repeat;
    mask: center / contain no-repeat;
}

.pager li.pager-prev a::before,
.pager li.pager-prev .pager-disabled::before {
    -webkit-mask-image: url("../img/ui/chevron-left.svg");
    mask-image: url("../img/ui/chevron-left.svg");
}

.pager li.pager-next a::before,
.pager li.pager-next .pager-disabled::before {
    -webkit-mask-image: url("../img/ui/chevron-right.svg");
    mask-image: url("../img/ui/chevron-right.svg");
}

.pager li .pager-disabled {
    opacity: 0.3;
}

/* ---- form controls ------------------------------------------------------------------------------------------------ */

.page :where(
    input:not([type]),
    input[type="text"],
    input[type="password"],
    input[type="email"],
    input[type="date"],
    input[type="number"],
    input[type="search"],
    input[type="url"],
    input[type="datetime-local"],
    select,
    textarea
) {
    height: 48px;
    max-width: 100%;
    padding: 0 14px;
    border: 1px solid #ced4da;
    border-radius: 0;
    background: #fff;
    color: var(--c-text);
    font: inherit;
}

.page textarea {
    height: auto;
    min-height: 120px;
    padding: 12px 14px;
}

.page :where(input, select, textarea):focus {
    border-color: var(--c-accent);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(255, 212, 0, 0.45);
}

.page label {
    font-weight: 700;
}

.field-error {
    color: var(--c-error);
    font-size: 13px;
}

.field-hint {
    display: block;
    margin-top: 6px;
    color: var(--c-muted);
    font-size: 13px;
    font-weight: 400;
}

.form-note {
    padding: 0 0 12px;
    color: var(--c-muted);
    font-size: 14px;
}

.error-message ul {
    margin: 0 0 14px;
    padding: 10px 14px;
    background: var(--c-error);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

.status-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 0 10px;
    border-radius: 9px;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    vertical-align: middle;
}

.status-badge.is-verified { background: var(--cat-maintenance); }
.status-badge.is-unverified { background: var(--cat-event); }

/* In-page notice of account, news and profile pages. */
.notice-banner {
    margin: 0 0 20px;
    padding: 10px 14px;
    border-left: 4px solid var(--c-accent);
    background: #fff6d6;
    color: #4d3d00;
    font-size: 14px;
}

/*
 * Bust portraits (and the party crop that stands in for a missing bust) reach the left, right and bottom edges of
 * their canvas with hard cuts, which show as vertical lines on a white row. Fade those three edges out.
 */
.bust-fade {
    -webkit-mask-image:
        linear-gradient(to right, transparent 0, #000 15%, #000 85%, transparent 100%),
        linear-gradient(to top, transparent 0, #000 10%);
    -webkit-mask-composite: source-in;
    mask-image:
        linear-gradient(to right, transparent 0, #000 15%, #000 85%, transparent 100%),
        linear-gradient(to top, transparent 0, #000 10%);
    mask-composite: intersect;
}

/* The published SHA-256 of the launcher ZIP, under the download button of /download. */
.download-panel__hash {
    max-width: 46em;
    margin: 18px auto 0;
    font-size: 15px;
}

.download-panel__hash-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
}

/* A selectable monospace block: one click selects the whole hash. */
.download-panel__hash-value {
    display: block;
    padding: 10px 14px;
    border: 1px solid var(--c-rule-soft);
    background: var(--c-th);
    font-family: Consolas, "SFMono-Regular", Menlo, monospace;
    font-size: 14px;
    word-break: break-all;
    user-select: all;
}

/* The profile editor's actions row: the back link beside the save button. */
.profile-editor__actions .btn {
    margin: 4px 6px;
}
