.idlerpg-page .lead,
.idlerpg-page .section-text,
.idlerpg-page .command-list,
.idlerpg-page .tips-list,
.idlerpg-page .admin-list {
    max-width: 96ch;
}

.idlerpg-titlebar {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 2ch;
    max-width: 110ch;
}

.idlerpg-titlebar h1 {
    margin-bottom: .25em;
}

.idlerpg-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: .5ch 1ch;
    margin: .5em 0 1.5em;
    max-width: 110ch;
}

.idlerpg-subnav a {
    border: 1px solid var(--c-lines, currentColor);
    padding: .25em 1ch;
    text-decoration: none;
    background: transparent;
    color: var(--c-link, #0aa);
    box-shadow: inset 0 0 0 0 var(--c-lines, currentColor);
    transition:
        background-color .12s ease-in-out,
        color .12s ease-in-out,
        box-shadow .12s ease-in-out,
        transform .08s ease-in-out;
}

.idlerpg-subnav a:hover,
.idlerpg-subnav a:focus {
    background: color-mix(in srgb, var(--c-link, #0aa) 18%, transparent);
    box-shadow: inset 0 -2px 0 0 var(--c-link, #0aa);
    color: var(--c-fg, inherit);
    outline: none;
}

.idlerpg-subnav a:active {
    transform: translateY(1px);
    box-shadow: inset 0 0 0 999px color-mix(in srgb, var(--c-link, #0aa) 28%, transparent);
}

.idlerpg-subnav a.active,
.idlerpg-subnav a.active:hover,
.idlerpg-subnav a.active:focus {
    background: var(--c-link, #0aa);
    border-color: var(--c-link, #0aa);
    color: var(--c-bg, #000);
    box-shadow:
        inset 0 -2px 0 0 var(--c-fg, currentColor),
        0 0 0 1px var(--c-link, #0aa);
}

.idlerpg-stats {
    display: grid;
    gap: 1em;
    grid-template-columns: repeat(auto-fit, minmax(14em, 1fr));
    max-width: 96ch;
    margin: 1em 0 1.5em;
}

.idlerpg-stat {
    border-left: 4px solid var(--c-lines, currentColor);
    padding: .5em 0 .5em 2ch;
}

.idlerpg-stat strong {
    display: block;
    font-size: 1.35em;
}

.idlerpg-intro {
    max-width: 96ch;
    margin: 1em 0 1.5em;
}

.idlerpg-intro .steps {
    display: grid;
    gap: 1em;
    grid-template-columns: repeat(auto-fit, minmax(18em, 1fr));
    margin: 1em 0;
}

.idlerpg-intro .step {
    border-left: 4px solid var(--c-lines, currentColor);
    padding: .5em 0 .5em 2ch;
}

.idlerpg-intro .step strong {
    display: block;
    margin-bottom: .25em;
}

.idlerpg-explain {
    max-width: 96ch;
    margin: 1.5em 0;
}

.idlerpg-explain-grid {
    display: grid;
    gap: 1em;
    grid-template-columns: repeat(auto-fit, minmax(20em, 1fr));
    margin: 1em 0;
}

.idlerpg-explain-card {
    border-left: 4px solid var(--c-lines, currentColor);
    padding: .5em 0 .5em 2ch;
}

.idlerpg-explain-card h3 {
    margin-top: 0;
}

.idlerpg-page table {
    width: 100%;
    max-width: 110ch;
    margin-bottom: 2em;
}

.idlerpg-page th,
.idlerpg-page td {
    border-bottom: 1px solid var(--c-lines, currentColor);
    padding: .25em .5ch .25em 0;
    text-align: left;
    vertical-align: top;
}

.idlerpg-player-table th:nth-child(1),
.idlerpg-player-table td:nth-child(1),
.idlerpg-player-table th:nth-child(4),
.idlerpg-player-table td:nth-child(4),
.idlerpg-player-table th:nth-child(5),
.idlerpg-player-table td:nth-child(5),
.idlerpg-player-table th:nth-child(6),
.idlerpg-player-table td:nth-child(6) {
    text-align: center;
}

.idlerpg-page code,
.idlerpg-sidebar code {
    white-space: nowrap;
}

.idlerpg-page .muted,
.idlerpg-sidebar .muted {
    opacity: .75;
}

.idlerpg-page .warning {
    border-left: 4px solid var(--c-lines, currentColor);
    padding: .5em 0 .5em 2ch;
    max-width: 96ch;
}

.idlerpg-map-wrap {
    max-width: 760px;
    margin: 1em 0 1.5em;
}

.idlerpg-world-map {
    display: block;
    width: min(100%, 720px);
    height: auto;
    border: 1px solid var(--c-lines, currentColor);
    background: #f3edbd;
}

.idlerpg-map-label {
    font-family: inherit;
    font-style: italic;
    font-size: 16px;
    fill: #4b2d10;
    opacity: .88;
}

.idlerpg-map-small-label {
    font-family: inherit;
    font-size: 11px;
    fill: #4b2d10;
    opacity: .8;
}

.idlerpg-map-marker text {
    font-family: inherit;
    font-size: 12px;
}

.idlerpg-map-marker.online circle {
    fill: #2f80ff;
}

.idlerpg-map-marker.offline circle {
    fill: #b33;
}

.idlerpg-map-marker circle {
    stroke: #111;
    stroke-width: 1.5;
}

.idlerpg-map-marker text {
    fill: #111;
    paint-order: stroke;
    stroke: #f3edbd;
    stroke-width: 4px;
    stroke-linejoin: round;
}

.idlerpg-map-quest {
    fill: #d99b00;
    stroke: #111;
    stroke-width: 1.5;
}

.idlerpg-map-quest-line {
    fill: none;
    stroke: #d99b00;
    stroke-width: 2;
    stroke-dasharray: 6 5;
}

.idlerpg-profile-grid {
    display: grid;
    gap: 1em;
    grid-template-columns: repeat(auto-fit, minmax(22em, 1fr));
    max-width: 110ch;
}

.idlerpg-card {
    border-left: 4px solid var(--c-lines, currentColor);
    padding: .5em 0 .5em 2ch;
}

.idlerpg-card h3 {
    margin-top: 0;
}

.idlerpg-events {
    max-width: 110ch;
    padding-left: 2em;
}

.idlerpg-events li {
    margin-bottom: .5em;
}

.idlerpg-events .event-time,
.idlerpg-events .event-kind {
    opacity: .75;
}

.idlerpg-events .event-icon {
    display: inline-block;
    min-width: 2ch;
}

.idlerpg-filter {
    display: inline-grid;
    grid-template-columns: auto 10ch auto minmax(18ch, 24ch) auto auto;
    gap: .45em .75ch;
    align-items: center;
    max-width: 110ch;
    margin: 1em 0 1.5em;
    border-left: 4px solid var(--c-lines, currentColor);
    padding: .55em 0 .55em 2ch;
}

.idlerpg-filter label {
    display: contents;
}

.idlerpg-filter span {
    opacity: .75;
    line-height: 1;
    white-space: nowrap;
}

.idlerpg-filter select,
.idlerpg-filter input,
.idlerpg-filter button,
.idlerpg-filter .filter-reset {
    box-sizing: border-box;
    height: 1.8em;
    border: 1px solid var(--c-lines, currentColor);
    font: inherit;
    font-size: .95em;
    line-height: 1;
    vertical-align: middle;
}

.idlerpg-filter select,
.idlerpg-filter input {
    width: 100%;
    background: var(--c-bg, #000);
    color: var(--c-fg, inherit);
    padding: 0 .75ch;
}

.idlerpg-filter button,
.idlerpg-filter .filter-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    background: transparent;
    color: var(--c-link, #0aa);
    padding: 0 1ch;
    text-decoration: none;
    cursor: pointer;
}

.idlerpg-filter button:hover,
.idlerpg-filter button:focus,
.idlerpg-filter .filter-reset:hover,
.idlerpg-filter .filter-reset:focus {
    background: color-mix(in srgb, var(--c-link, #0aa) 18%, transparent);
    color: var(--c-fg, inherit);
    outline: none;
}

.idlerpg-filter-summary {
    max-width: 110ch;
    margin: -.75em 0 1em;
}

.idlerpg-pager {
    max-width: 110ch;
}

.idlerpg-pager a {
    border: 1px solid var(--c-lines, currentColor);
    padding: .2em .75ch;
    text-decoration: none;
}

.idlerpg-achievements td.status {
    text-align: center;
}

.idlerpg-room-status {
    max-width: 96ch;
}

.idlerpg-room-status td:first-child {
    opacity: .75;
    white-space: nowrap;
}

.idlerpg-items-table td.unique,
.idlerpg-unique-items td.unique {
    font-style: italic;
}

.idlerpg-sidebar .box {
    border-left: 4px solid var(--c-lines, currentColor);
    margin-bottom: 1em;
    padding: .5em 0 .5em 2ch;
}

.idlerpg-sidebar ul {
    padding-left: 1.4em;
}

.idlerpg-sidebar li {
    margin-bottom: .4em;
}

.idlerpg-sidebar code {
    white-space: normal;
    overflow-wrap: anywhere;
}

.idlerpg-rules {
    max-width: 110ch;
}

.idlerpg-rules-grid {
    display: grid;
    gap: 1em;
    grid-template-columns: repeat(auto-fit, minmax(24em, 1fr));
    margin: 1em 0;
}

.idlerpg-rule-card {
    border-left: 4px solid var(--c-lines, currentColor);
    padding: .5em 0 .5em 2ch;
}

.idlerpg-rule-card h3 {
    margin-top: 0;
}

.idlerpg-rule-card table {
    width: min(100%, 68ch);
    max-width: none;
    margin-bottom: 1em;
    table-layout: fixed;
}

.idlerpg-rule-card td {
    text-align: left;
    vertical-align: top;
}

.idlerpg-rule-card td:first-child {
    width: 48%;
    opacity: .75;
    white-space: normal;
}

.idlerpg-rule-card td:last-child {
    width: 52%;
}

.idlerpg-formula {
    max-width: 96ch;
    border-left: 4px solid var(--c-lines, currentColor);
    padding: .5em 0 .5em 2ch;
    margin: 1em 0;
}

@media (max-width: 720px) {
    .idlerpg-titlebar {
        display: block;
    }

    .idlerpg-filter {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        width: min(100%, 46ch);
        padding-left: 1.4ch;
    }

    .idlerpg-filter label {
        display: contents;
    }

    .idlerpg-filter button,
    .idlerpg-filter .filter-reset {
        width: max-content;
    }

    .idlerpg-rule-card table {
        table-layout: auto;
    }

    .idlerpg-rule-card td:first-child,
    .idlerpg-rule-card td:last-child {
        width: auto;
    }
}
