/* Loaded only by the events, rankings, download and character pages. */
.m-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 18px; }
.m-tabs a { padding: 8px 18px; border: 1px solid var(--m-line); border-radius: 7px; background: var(--m-panel-soft); color: var(--m-ink); font-weight: 700; text-decoration: none; }
.m-tabs a:hover { border-color: var(--m-control); }
.m-tabs a[aria-current] { border-color: var(--m-control); color: var(--ev-gold-hi); background: linear-gradient(to bottom, rgba(230, 182, 90, .16), rgba(230, 182, 90, .03)); }
.m-facts { margin: 0; display: grid; gap: 8px; }
.m-facts > div { display: flex; justify-content: space-between; gap: 16px; }
.m-facts dt { font-weight: 700; font-size: 14px; color: var(--m-ink-soft); }
.m-facts dd { margin: 0; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.m-facts-row { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 14px; }
.m-facts-row > div { display: block; }
.m-facts-row dd { text-align: left; font: 500 18px var(--m-font-gauge); }

/* Rankings */
.m-podium { list-style: none; margin: 18px 0 24px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: end; }
.m-seat { padding: 18px; text-align: center; background: var(--m-panel); border: 1px solid var(--m-line); border-radius: 18px; min-width: 0; }
.m-seat-1 { order: 2; padding-block: 34px; }
.m-seat-2 { order: 1; }
.m-seat-3 { order: 3; }
.m-seat h3 { font-size: 24px; margin: 6px 0 2px; overflow-wrap: anywhere; }
.m-seat h3 a { color: var(--m-ink); }
.m-seat p { margin: 0; color: var(--m-ink-soft); font-size: 14.5px; }
.m-seat .m-seat-score { margin-top: 8px; color: var(--m-ink); font: 500 20px var(--m-font-gauge); }
.m-seat small { font-size: 12.5px; color: var(--m-ink-soft); }
.m-rank { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--m-air); font: 500 14px var(--m-font-gauge); }
.m-seat-1 .m-rank { background: linear-gradient(to bottom, #ffdf94, #c98d33); color: var(--ev-gold-ink); }

/* Download */
.m-dl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.m-dl > :only-child { grid-column: 1 / -1; } /* no requirements set yet: the client card takes the row */
.m-dl-pad, .m-dl-spec { display: grid; gap: 12px; justify-items: start; padding: 22px 24px; background: var(--m-panel); border: 1px solid var(--m-line); border-radius: 18px; min-width: 0; }
.m-dl-pad .m-facts { width: 100%; }
.m-dl-spec .m-tabs { margin: 0; }
.m-dl-pending { margin: 0; font-size: 18px; font-weight: 700; }
.m-dl-mirrors { margin: 0; color: var(--m-ink-soft); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.m-spec { width: 100%; margin: 0; display: grid; gap: 8px; }
.m-spec[hidden] { display: none; }
.m-spec > div { display: flex; justify-content: space-between; gap: 16px; }
.m-spec dt { font-weight: 700; font-size: 14px; color: var(--m-ink-soft); }
.m-spec dd { margin: 0; text-align: right; }
.m-prereq { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.m-prereq li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.m-prereq span { color: var(--m-ink-soft); }
.m-steps { list-style: none; counter-reset: step; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.m-steps li { counter-increment: step; min-width: 0; padding: 20px 22px; background: var(--m-panel); border: 1px solid var(--m-line); border-radius: 18px; }
.m-steps li::before { content: counter(step); display: block; font: 400 42px/1 var(--m-font-display); color: var(--m-link); margin-bottom: 6px; }
.m-steps h3 { font-size: 22px; margin-bottom: 2px; }
.m-steps p { margin: 0; color: var(--m-ink-soft); }

/* Adventurer's licence */
.m-licence { display: grid; grid-template-columns: minmax(180px, 280px) minmax(0, 1fr); gap: 24px; padding: 24px; background: var(--m-panel); border: 1px solid var(--m-line); border-radius: 22px; }
.m-licence-photo { display: grid; place-items: center; padding: 18px; border-radius: 16px; background: linear-gradient(to bottom, var(--m-hero-mid), var(--m-sky-top)); }
.m-licence-photo > img { display: block; width: 100%; height: auto; }
.m-licence-photo .m-job-portrait { background: none; margin: 0; padding: 0; width: 100%; height: 300px; }
.m-licence-body { min-width: 0; align-self: center; } /* the portrait sets the card's height; the details sit in its middle */
.m-licence h1 { margin: 4px 0 6px; overflow-wrap: anywhere; }

/* Events */
.m-ev-tzbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 14px 0 20px; }
.m-tzbox { position: relative; }
.m-tzbox-trigger { display: inline-flex; align-items: center; gap: 8px; }
.m-tzbox-label { font-weight: 700; }
.m-tzbox-summary { font-weight: 400; }
.m-tzbox-badge { padding: 1px 8px; border-radius: 999px; background: var(--m-air); font-size: 12px; }
.m-tzbox-badge.is-manual { background: var(--m-hero-top); color: #fff; }
.m-tzbox-panel { position: absolute; z-index: 40; top: calc(100% + 8px); left: 0; width: min(380px, calc(100vw - 32px)); display: grid; gap: 10px; padding: 16px; background: var(--m-panel); border: 1px solid var(--m-line); border-radius: 16px; box-shadow: 0 14px 40px rgba(0, 0, 0, .6); }
.m-tzbox-panel[hidden] { display: none; }
.m-tzbox-sub, .m-tzbox-now { margin: 0; font-size: 14px; color: var(--m-ink-soft); }
.m-tzbox-now b { color: var(--m-ink); }
.m-tzbox-list { max-height: 260px; overflow-y: auto; display: grid; gap: 2px; }
.m-tzbox-group { margin-top: 6px; font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--m-ink-soft); }
.m-tzbox-row { display: flex; justify-content: space-between; gap: 10px; width: 100%; padding: 6px 8px; border: 0; border-radius: 8px; background: transparent; color: var(--m-ink); text-align: left; font-size: 14px; }
.m-tzbox-row:hover, .m-tzbox-row.is-active { background: rgba(230, 182, 90, .14); }
.m-tzbox-row-off { font: 500 12px var(--m-font-gauge); color: var(--m-ink-soft); }
.m-tzbox-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; font-size: 12.5px; color: var(--m-ink-soft); }
.m-ev-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.m-ev-next, .m-ev-boss, .m-ev-card { display: grid; gap: 6px; align-content: start; padding: 20px 22px; background: var(--m-panel); border: 1px solid var(--m-line); border-radius: 18px; min-width: 0; }
.m-ev-next h2, .m-ev-boss h2 { margin: 0; }
.m-ev-next p, .m-ev-boss p { margin: 0; color: var(--m-ink-soft); }
.m-ev-next [data-next-when] i { margin-right: 6px; }
.m-ev-next.is-live, .m-ev-boss.is-live, .m-ev-card.is-live { border-color: var(--m-blossom); }
.m-ev-kickers { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.m-ev-cd { font: 500 15px var(--m-font-gauge); font-variant-numeric: tabular-nums; }
.m-ev-cd-hero { font-size: clamp(26px, 4vw, 38px); line-height: 1.2; color: var(--m-ink); }
.m-ev-cd-label { font-size: 13.5px; color: var(--m-ink-soft); }
.m-ev-recur { margin: 0; font-size: 14px; color: var(--m-ink-soft); }
.m-ev-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; white-space: nowrap; color: var(--m-ink-soft); }
.m-ev-status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--m-link); }
.m-ev-status.is-live { color: var(--m-ink); }
.m-ev-status.is-live .m-ev-status-dot { background: var(--m-blossom); }
.m-ev-status.is-ended .m-ev-status-dot, .m-ev-status.is-closed .m-ev-status-dot { background: var(--m-line); }
.m-ev-timeline { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 4px; }
/* The script trims today's list to the visitor's timezone. Holding its space stops the page jumping when it does. */
@media (scripting: enabled) {
    .m-ev-tl { min-height: 190px; }
    .m-ev-tl:not([data-bound]) .m-ev-timeline { max-height: 150px; overflow: auto; }
}
.m-ev-tl-row { display: grid; grid-template-columns: 62px 26px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 8px 12px; border-radius: 12px; background: var(--m-panel-soft); }
.m-ev-tl-row.is-past { opacity: .62; }
.m-ev-tl-row.is-next { background: var(--m-panel); outline: 2px solid var(--m-control); outline-offset: -2px; }
.m-ev-tl-row.is-live { background: var(--m-panel); outline: 2px solid var(--m-blossom); outline-offset: -2px; }
.m-ev-tl-time { font: 500 14px var(--m-font-gauge); }
.m-ev-tl-name { font-weight: 700; min-width: 0; }
.m-ev-tl-state { font-size: 12.5px; color: var(--m-ink-soft); }
.m-ev-tl-empty { color: var(--m-ink-soft); }
.m-ev-tl-btn { border: 0; background: none; color: var(--m-link); font-weight: 600; text-decoration: underline; padding: 4px 0; }
/* Four regular events: two by two from tablets up, so a long name never pushes its status onto a second line. */
.m-ev-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 14px; }
@media (min-width: 768px) { .m-ev-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.m-ev-card header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px; }
.m-ev-card h3 { font-size: 22px; margin: 0; }
.m-ev-details summary { cursor: pointer; font-weight: 700; font-size: 14px; color: var(--m-link); padding: 4px 0; }
@media (pointer: coarse) { .m-ev-details summary { padding: 12px 0; } }
.m-ev-details .m-facts { margin-top: 8px; }
.m-ev-weekly { padding: 16px 20px; background: var(--m-panel); border: 1px solid var(--m-line); border-radius: 18px; }
.m-ev-weekly summary { cursor: pointer; }
.m-ev-week { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; margin-top: 14px; }
.m-ev-day { min-width: 0; }
.m-ev-day.is-today .m-ev-day-title { color: var(--m-link); }
.m-ev-day-title { font-size: 19px; margin-bottom: 6px; }
.m-ev-day-empty { margin: 0; color: var(--m-ink-soft); font-size: 14px; }
.m-ev-wrow { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 6px; padding: 3px 0; font-size: 14px; }
.m-ev-wtime { font: 500 13px var(--m-font-gauge); color: var(--m-ink-soft); }
.m-ev-wevents { display: grid; gap: 2px; }
.m-ev-wchip { color: var(--m-ink); text-decoration: none; }
.m-ev-wchip:hover { text-decoration: underline; }

@media (max-width: 767.98px) {
    .m-dl, .m-ev-top, .m-steps, .m-licence { grid-template-columns: minmax(0, 1fr); }
    .m-podium { grid-template-columns: minmax(0, 1fr); }
    .m-seat-1, .m-seat-2, .m-seat-3 { order: 0; padding-block: 18px; }
    .m-ev-tl-row { grid-template-columns: 56px 22px minmax(0, 1fr); }
    .m-ev-tl-state { grid-column: 3; }
    .m-tzbox-panel { position: static; width: 100%; margin-top: 8px; }
}
