:root {
    color-scheme: only light;
    --paper: #f2e9d8;
    --paper-dark: #e8d9bd;
    --orange: #fe953b;
    --yellow: #f7e477;
    --ink: #241304;
    --red: #b3341c;
    --green: #4a6b2a;
    --faded: #8a7c66;
    --display: "Haettenschweiler", "Arial Narrow", Impact,
        "Liberation Sans Narrow", "Roboto Condensed", sans-serif-condensed,
        sans-serif;
    --body: Arial, Helvetica, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--body);
    line-height: 1.45;
}

h1,
h2,
h3 {
    font-family: var(--display);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 0.5em;
    overflow-wrap: anywhere;
}

.hidden {
    display: none !important;
}

img {
    max-width: 100%;
    display: block;
}

.act {
    display: inline-block;
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    line-height: 0;
}

.act img {
    width: 30px;
    height: 30px;
}

.act:hover img,
.act:focus-visible img {
    transform: rotate(-4deg);
}

.act:disabled {
    cursor: default;
    opacity: 0.3;
}

.act:disabled:hover img,
.act:disabled:focus-visible img {
    transform: none;
}

.act-lg img {
    width: 44px;
    height: 44px;
}

.act.on {
    outline: 3px solid var(--ink);
    outline-offset: 1px;
}

.act.off img {
    opacity: 0.35;
}

.btn {
    font-family: var(--display);
    font-size: 20px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: transparent;
    color: var(--ink);
    border: 2px solid var(--ink);
    padding: 8px 26px 6px;
    cursor: pointer;
}

.btn:hover,
.btn:focus-visible {
    background: var(--ink);
    color: var(--paper);
}

.btn-wide {
    width: 100%;
}

.hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    background: var(--paper) url("/static/assets/hero.jpeg") center / cover no-repeat;
}

.hero-nav {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    padding: 18px 22px;
}

.brand {
    line-height: 0;
}

.brand:hover img,
.brand:focus-visible img {
    transform: rotate(-4deg);
}

.brand-logo {
    width: 120px;
    height: auto;
}

.nav-center-logo {
    order: 3;
    flex: 0 1 100%;
    display: block;
    height: 160px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    margin: 0;
}

@media (min-width: 801px) {
    .nav-center-logo {
        order: initial;
        flex: initial;
        position: absolute;
        left: 50%;
        top: 18px;
        transform: translateX(-50%);
        height: 200px;
        width: auto;
        margin: 0;
    }
}

.nav-login {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-login img {
    width: 40px;
    height: 40px;
}

.nav-login-label {
    font-family: var(--display);
    font-size: 18px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink);
}

.nav-login:hover img {
    transform: rotate(-4deg);
}

.player {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;
    padding: 0 20px;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: clamp(20px, 7vw, 60px);
}

.ctrl img {
    width: clamp(44px, 9vw, 64px);
    height: clamp(44px, 9vw, 64px);
}

.ctrl-main img {
    width: clamp(76px, 16vw, 108px);
    height: clamp(76px, 16vw, 108px);
}

.track-title {
    min-height: 1.4em;
    margin: 0;
    font-family: var(--display);
    font-size: clamp(18px, 3vw, 26px);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-align: center;
}

.track-title:not(:empty) {
    background: var(--ink);
    color: var(--yellow);
    padding: 6px 18px 4px;
    transform: rotate(-1.5deg);
}

.hero-scroll {
    align-self: center;
    padding: 14px;
    line-height: 0;
}

.hero-scroll img {
    width: 34px;
    height: 34px;
}

#yt-host {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    left: -9999px;
    bottom: 0;
}

.tour {
    background: var(--orange);
    display: grid;
    grid-template-columns: minmax(280px, 5fr) 7fr;
    gap: clamp(24px, 5vw, 72px);
    padding: clamp(40px, 7vw, 88px) clamp(20px, 6vw, 80px);
}

.tour-art img {
    position: sticky;
    top: 24px;
    width: 100%;
}

.tour-list h2 {
    font-size: clamp(40px, 6vw, 64px);
    transform: rotate(-1deg);
}

.dates {
    list-style: none;
    margin: 0;
    padding: 0;
}

.date-row {
    display: flex;
    align-items: baseline;
    gap: clamp(14px, 3vw, 40px);
    padding: 20px 4px 18px;
    border-bottom: 2px solid var(--ink);
}

.date-row:first-child {
    border-top: 2px solid var(--ink);
}

.date-when {
    flex: none;
    width: 110px;
    font-family: var(--display);
    font-size: 24px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.date-line + .date-line {
    margin-top: 2px;
}

.date-what {
    flex: 1 1 auto;
    min-width: 0;
}

.date-title {
    font-family: var(--display);
    font-size: 24px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    overflow-wrap: anywhere;
}

.date-desc {
    margin: 2px 0 0;
    font-size: 14px;
    overflow-wrap: anywhere;
}

.empty {
    font-family: var(--display);
    font-size: 20px;
    text-transform: uppercase;
}

.footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 44px 20px;
    background: var(--ink);
}

.footer-logo {
    width: 130px;
}

.footer-contact {
    font-family: var(--display);
    font-size: 18px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--paper);
    text-decoration: none;
}

.footer-contact:hover,
.footer-contact:focus-visible {
    color: var(--yellow);
}

.app-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 10px 20px;
    border-bottom: 3px solid var(--ink);
    position: sticky;
    top: 0;
    background: var(--paper);
    z-index: 10;
    flex-wrap: wrap;
}

.app-tabs {
    display: flex;
    gap: clamp(10px, 3vw, 28px);
    flex: 1;
    flex-wrap: wrap;
}

.tab {
    font-family: var(--display);
    font-size: 20px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink);
    text-decoration: none;
    padding: 6px 2px;
    border-bottom: 4px solid transparent;
}

.tab:hover {
    border-bottom-color: var(--faded);
}

.tab.active {
    border-bottom-color: var(--ink);
}

.panel {
    max-width: 1100px;
    margin: 0 auto;
    padding: 26px 20px 90px;
}

.toolbar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 26px;
}

.search {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 220px;
}

.search img {
    width: 24px;
    height: 24px;
    flex: none;
}

.search input {
    flex: 1;
}

input,
select,
textarea {
    font: inherit;
    color: var(--ink);
    background: var(--paper);
    border: 2px solid var(--ink);
    padding: 9px 10px;
    min-width: 0;
}

input::placeholder,
textarea::placeholder {
    color: var(--faded);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--orange);
}

.events {
    list-style: none;
    margin: 0;
    padding: 0;
}

.event-card {
    display: flex;
    gap: clamp(12px, 3vw, 28px);
    align-items: flex-start;
    padding: 18px 4px;
    border-bottom: 2px solid var(--ink);
    flex-wrap: wrap;
}

.event-card:first-child {
    border-top: 2px solid var(--ink);
}

.event-date {
    flex: none;
    width: 84px;
    font-family: var(--display);
    font-size: 22px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.1;
}

.reacted-going .event-date {
    color: var(--green);
}

.reacted-not_going .event-date {
    color: var(--red);
}

.event-date,
.event-body {
    cursor: pointer;
}

.event-body {
    flex: 1 1 240px;
    min-width: 0;
}

.event-title {
    font-family: var(--display);
    font-size: 26px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    overflow-wrap: anywhere;
}

.event-meta {
    margin: 2px 0;
    font-size: 13px;
    color: var(--faded);
}

.event-desc {
    margin: 6px 0 0;
    font-size: 15px;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.badge {
    display: inline-block;
    font-family: var(--display);
    font-size: 14px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: var(--ink);
    color: var(--paper);
    padding: 2px 8px 0;
    margin-left: 10px;
    vertical-align: 4px;
    transform: rotate(-2deg);
}

.event-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.event-admin {
    display: flex;
    gap: 6px;
    margin-left: 8px;
}

.event-admin .act img {
    width: 26px;
    height: 26px;
}

.cal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.cal-head h2 {
    margin: 0;
    font-size: 34px;
}

.cal-legend {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.dot {
    width: 12px;
    height: 12px;
    display: inline-block;
    margin-left: 14px;
}

.dot:first-child {
    margin-left: 0;
}

.dot-going {
    background: var(--green);
}

.dot-notgoing {
    background: var(--red);
}

.dot-none {
    background: var(--faded);
}

.calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border-top: 2px solid var(--ink);
    border-left: 2px solid var(--ink);
    margin-bottom: 26px;
}

.cal-dow {
    text-align: center;
    font-family: var(--display);
    font-size: 16px;
    text-transform: uppercase;
    padding: 6px 0 4px;
    border-right: 2px solid var(--ink);
    border-bottom: 2px solid var(--ink);
    background: var(--ink);
    color: var(--paper);
}

.cal-day {
    position: relative;
    min-height: 68px;
    padding: 4px 6px;
    font-family: var(--display);
    font-size: 16px;
    border-right: 2px solid var(--ink);
    border-bottom: 2px solid var(--ink);
    cursor: default;
}

.cal-day.has-events {
    cursor: pointer;
}

.cal-day.has-events:hover {
    background: var(--paper-dark);
}

.cal-day.other {
    color: var(--faded);
    background: var(--paper-dark);
}

.cal-day.today {
    box-shadow: inset 0 0 0 3px var(--orange);
}

.cal-day.selected {
    background: var(--ink);
    color: var(--paper);
}

.cal-marks {
    position: absolute;
    left: 6px;
    right: 6px;
    bottom: 6px;
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.cal-marks .dot {
    margin: 0;
    width: 10px;
    height: 10px;
}

.form {
    display: grid;
    gap: 16px;
    max-width: 460px;
}

.form label {
    display: grid;
    gap: 6px;
    font-family: var(--display);
    font-size: 17px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.form input,
.form select,
.form textarea {
    font-family: var(--body);
}

.hint {
    font-family: var(--body);
    font-size: 13px;
    text-transform: none;
    letter-spacing: 0;
    color: var(--faded);
}

.check {
    display: flex !important;
    align-items: center;
    gap: 10px;
}

.check input {
    width: 22px;
    height: 22px;
    accent-color: var(--ink);
}

fieldset {
    border: 2px solid var(--ink);
    margin: 0;
}

legend {
    font-family: var(--display);
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0 8px;
}

.avatar-field {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar-field input {
    flex: 1;
    min-width: 0;
}

.avatar-preview {
    width: 44px;
    height: 44px;
    flex: none;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 0;
}

.chip {
    display: inline-flex !important;
    align-items: center;
    border: 2px solid var(--ink);
    padding: 5px 12px 3px;
    font-family: var(--display);
    font-size: 16px;
    letter-spacing: 0.05em;
    cursor: pointer;
    user-select: none;
}

.chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.chip:has(input:checked) {
    background: var(--ink);
    color: var(--paper);
}

.form-msg {
    min-height: 1.2em;
    margin: 0;
    font-size: 14px;
    font-family: var(--body);
}

.form-msg.ok {
    color: var(--green);
}

.form-msg.err {
    color: var(--red);
}

.dialog {
    background: var(--paper);
    color: var(--ink);
    color-scheme: only light;
    border: 3px solid var(--ink);
    padding: 30px;
    width: min(430px, calc(100vw - 32px));
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    box-sizing: border-box;
}

.dialog::backdrop {
    background: rgba(36, 19, 4, 0.8);
}

.dialog .form {
    max-width: 100%;
}

.dialog-close {
    position: absolute;
    top: 8px;
    right: 8px;
}

.dialog-wide {
    width: min(640px, calc(100vw - 32px));
}

.attendees {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 20px;
}

.attendee-group h3 {
    font-size: 16px;
    margin-bottom: 8px;
}

.attendee-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.attendee {
    display: flex;
    align-items: center;
    gap: 10px;
}

.attendee-info {
    display: flex;
    flex-direction: column;
}

.attendee-name {
    font-weight: bold;
}

.attendee-instruments {
    display: block;
    font-size: 13px;
    color: var(--faded);
}

.avatar {
    width: 32px;
    height: 32px;
    flex: none;
    object-fit: cover;
}

.detail-picture {
    width: 100%;
    max-height: 260px;
    object-fit: cover;
    margin-bottom: 12px;
}

.event-thumb {
    width: 64px;
    height: 64px;
    flex: none;
    object-fit: cover;
    cursor: pointer;
}

.date-thumb {
    width: 56px;
    height: 56px;
    flex: none;
    object-fit: cover;
}

.empty-sm {
    font-size: 13px;
    color: var(--faded);
    margin: 0;
}

@media (max-width: 560px) {
    .attendees {
        grid-template-columns: 1fr;
    }
}

.auth-tabs {
    display: flex;
    gap: 18px;
    margin-bottom: 22px;
}

.auth-tab {
    font-family: var(--display);
    font-size: 22px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: none;
    border: none;
    border-bottom: 4px solid transparent;
    color: var(--ink);
    padding: 4px 2px;
    cursor: pointer;
}

.auth-tab.active {
    border-bottom-color: var(--ink);
}

.table-wrap {
    overflow-x: auto;
    margin-top: 22px;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-top: 26px;
}

.pagination-label {
    font-family: var(--display);
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    min-width: 6em;
    text-align: center;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table th {
    text-align: left;
    font-family: var(--display);
    font-weight: 400;
    font-size: 17px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 10px 12px 8px;
    border-bottom: 3px solid var(--ink);
}

.table td {
    padding: 10px 12px;
    border-bottom: 2px solid var(--ink);
}

.table td.user-name {
    cursor: pointer;
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.table td.user-name:hover .user-cell span {
    text-decoration: underline;
}

.row-actions {
    display: flex;
    gap: 6px;
}

.table select {
    padding: 5px 8px;
}

@media (max-width: 800px) {
    .tour {
        grid-template-columns: 1fr;
    }

    .tour-art img {
        position: static;
        max-width: 420px;
        margin: 0 auto;
    }

    .brand-logo {
        width: 100px;
    }

    .date-when {
        width: 84px;
        font-size: 20px;
    }

    .date-title {
        font-size: 20px;
    }

    .cal-day {
        min-height: 50px;
        font-size: 13px;
    }

    .cal-dow {
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}