* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #162017;
    background: #f7f2e9;
    -webkit-text-size-adjust: 100%;
}

a {
    color: #6b2f12;
}

.maintenance {
    min-height: 100vh;
    background:
        linear-gradient(rgba(18, 25, 17, 0.18), rgba(18, 25, 17, 0.46)),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1600' height='1000' viewBox='0 0 1600 1000'%3E%3Crect width='1600' height='1000' fill='%23d8c7a5'/%3E%3Cpath d='M0 670c190-70 330-64 520 4s365 69 548-11 349-95 532-19v356H0z' fill='%2399a66b'/%3E%3Cpath d='M0 0h1600v480c-185 42-342 34-488-24-195-78-378-83-590-14C330 505 178 510 0 468z' fill='%23eee3c9'/%3E%3Ccircle cx='1210' cy='180' r='96' fill='%23c88038' opacity='.75'/%3E%3C/svg%3E");
    background-size: cover;
    background-position: center;
}

.maintenance-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 6vh min(8vw, 96px);
}

.maintenance-copy {
    max-width: 760px;
    color: #fffaf0;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}

.eyebrow {
    margin: 0 0 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
}

h1 {
    margin: 0 0 20px;
    font-size: clamp(2.4rem, 7vw, 5.8rem);
    line-height: 1;
    letter-spacing: 0;
}

h2 {
    margin-top: 34px;
}

p {
    max-width: 760px;
    font-size: 1.1rem;
    line-height: 1.65;
}

input,
button {
    min-height: 44px;
    border-radius: 6px;
    font: inherit;
}

input {
    width: 100%;
    border: 1px solid rgba(255, 250, 240, .68);
    padding: 10px 12px;
    background: rgba(255, 250, 240, .94);
    color: #162017;
}

button {
    border: 0;
    padding: 10px 16px;
    background: #6d3b16;
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.contact-block {
    display: grid;
    gap: 5px;
    max-width: 620px;
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    font-size: 1rem;
}

.bot-gap {
    user-select: none;
}

.protected-contact-card,
.protected-contact,
.protected-contact-line {
    -webkit-user-select: none;
    user-select: none;
}

.protected-contact-card {
    cursor: default;
}

.protected-contact:empty::after {
    content: "wird geschützt angezeigt";
    color: #6d6256;
    font-size: 0.94em;
}

.legal-links {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    margin-top: 28px;
}

.legal-links a,
.back-link {
    font-weight: 700;
}

.legal-page {
    width: min(900px, calc(100% - 32px));
    margin: 0 auto;
    padding: 44px 0 72px;
}

.city-page {
    min-height: 100vh;
    background: #f6f2e9;
}

.city-shell {
    width: min(1040px, calc(100% - 32px));
    margin: 0 auto;
    padding: 44px 0 72px;
}

.city-header {
    margin-bottom: 28px;
}

.city-header h1 {
    color: #1c281b;
    text-shadow: none;
}

.city-header p {
    color: #4f493e;
}

.city-events {
    display: grid;
    gap: 16px;
    margin: 28px 0;
}

.event-card {
    display: grid;
    gap: 10px;
    padding: clamp(18px, 4vw, 26px);
    border: 1px solid #d8cfbe;
    border-radius: 8px;
    background: #fffaf0;
    box-shadow: 0 12px 30px rgba(56, 38, 18, .07);
}

.event-card h2,
.event-card p {
    margin: 0;
}

.event-description {
    max-width: 760px;
    color: #4f493e;
    line-height: 1.65;
}

.event-date {
    color: #7a5b26;
    font-weight: 800;
}

.prose {
    max-width: 760px;
    line-height: 1.7;
    white-space: normal;
}

.public-code-form {
    display: grid;
    grid-template-columns: minmax(180px, 260px) auto;
    gap: 12px;
    align-items: end;
    margin-top: 26px;
    max-width: 450px;
}

.public-code-form label {
    display: grid;
    gap: 7px;
    font-weight: 800;
}

.booklet-page {
    background:
        linear-gradient(180deg, rgba(255, 250, 240, .92), rgba(245, 239, 227, .96)),
        radial-gradient(circle at 18% 0%, rgba(194, 132, 56, .16), transparent 34%),
        #f5efe3;
}

.booklet-shell {
    width: min(1080px, calc(100% - 28px));
    margin: 0 auto;
    padding: 26px 0 72px;
}

.booklet-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    padding: 10px 14px;
    background: rgba(245, 239, 227, .92);
    border-bottom: 1px solid rgba(98, 73, 38, .18);
    backdrop-filter: blur(14px);
    box-shadow: 0 10px 24px rgba(56, 38, 18, .08);
}

.booklet-topbar-inner {
    width: min(1080px, 100%);
    min-height: 46px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}

.booklet-topbar strong {
    min-width: 0;
    color: #241c14;
    font-size: clamp(1rem, 3vw, 1.18rem);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.booklet-topbar a {
    color: #6d3b16;
    font-weight: 900;
    text-decoration: none;
}

.booklet-topbar-back {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    padding: 8px 10px;
    border: 1px solid #d5c7ae;
    border-radius: 999px;
    background: #fffaf0;
}

.booklet-topbar-back::before {
    content: "<";
    margin-right: 7px;
}

.booklet-topbar-auth {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    min-width: 0;
}

.booklet-topbar-code {
    max-width: 118px;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 9px;
    border: 1px solid rgba(109, 59, 22, .2);
    border-radius: 999px;
    background: #fff7e7;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .72);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #62421d;
    font-weight: 850;
    font-variant-numeric: tabular-nums;
}

.booklet-login-hint {
    max-width: min(34vw, 330px);
    color: #5f513e;
    font-size: .9rem;
    font-weight: 750;
    line-height: 1.2;
    text-align: right;
}

.booklet-login-hint::after {
    content: " ->";
    color: #6d3b16;
    font-weight: 950;
}

.booklet-topbar-login,
.booklet-topbar-logout {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 11px;
    border-radius: 999px;
    border: 1px solid transparent;
    line-height: 1;
    white-space: nowrap;
}

.booklet-topbar-login {
    background: #6d3b16;
    color: #fffaf0 !important;
    box-shadow: 0 8px 18px rgba(109, 59, 22, .2);
}

.booklet-topbar-logout {
    background: #fffaf0;
    border-color: #d5c7ae;
    color: #6d3b16;
}

.booklet-hero {
    padding: 24px clamp(2px, 1vw, 8px) 20px;
}

.booklet-hero h1 {
    color: #1c281b;
    font-size: clamp(2.4rem, 10vw, 4.6rem);
    text-shadow: none;
}

.booklet-hero p {
    color: #423d33;
}

.booklet-intro {
    max-width: 720px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #d8cfbe;
    color: #40392f;
    line-height: 1.65;
}

.booklet-flash {
    max-width: 720px;
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    padding: 12px 14px;
    border: 1px solid #d8cfbe;
    border-radius: 8px;
    background: #fffaf0;
    color: #40392f;
    box-shadow: 0 10px 22px rgba(56, 38, 18, .06);
}

.booklet-flash {
    justify-content: flex-start;
    border-color: #9fb27b;
    background: #f2f7e8;
    color: #33471f;
    font-weight: 850;
}

.booklet-flash.error {
    border-color: #c78d83;
    background: #fff0ed;
    color: #73291e;
}

.booklet-login-shell {
    max-width: 720px;
}

.booklet-code-card {
    display: grid;
    gap: 14px;
    max-width: 430px;
    margin-top: 20px;
    padding: 18px;
    border: 1px solid #d8cfbe;
    border-radius: 8px;
    background: #fffaf0;
    box-shadow: 0 14px 32px rgba(56, 38, 18, .08);
}

.booklet-code-card label {
    display: grid;
    gap: 7px;
    color: #392b1c;
    font-weight: 900;
}

.booklet-code-card input {
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid #bca98c;
    border-radius: 6px;
    background: #fffdfa;
    color: #211910;
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.booklet-nav {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 0;
    margin: 8px 0 20px;
    background: linear-gradient(#f5efe3 72%, rgba(245, 239, 227, 0));
    scrollbar-width: thin;
}

.booklet-nav a {
    flex: 0 0 auto;
    padding: 9px 12px;
    border: 1px solid #d5c7ae;
    border-radius: 999px;
    background: #fffaf0;
    color: #46331c;
    font-weight: 800;
    text-decoration: none;
}

.booklet-overview-grid,
.booklet-list {
    display: grid;
    gap: 18px;
}

.booklet-overview-grid {
    grid-template-columns: repeat(auto-fit, minmax(285px, 1fr));
    align-items: stretch;
}

.booklet-card {
    padding: clamp(18px, 5vw, 28px);
    border: 1px solid #d8cfbe;
    border-radius: 8px;
    background: #fffaf0;
    box-shadow: 0 14px 32px rgba(56, 38, 18, .08);
}

.booklet-brewery-card {
    min-height: 100%;
}

.booklet-brewery-link {
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 14px;
    min-height: 100%;
    padding: 0;
    border: 1px solid #d8cfbe;
    border-radius: 8px;
    background: #fffaf0;
    color: inherit;
    text-decoration: none;
    overflow: hidden;
    box-shadow: 0 14px 32px rgba(56, 38, 18, .08);
}

.booklet-brewery-card:nth-child(3n + 1) .booklet-brewery-link {
    background: #fff8ec;
}

.booklet-brewery-card:nth-child(3n + 2) .booklet-brewery-link {
    background: #f7f0de;
}

.booklet-brewery-card:nth-child(3n) .booklet-brewery-link {
    background: #fff5e3;
}

.booklet-brewery-link:hover,
.booklet-brewery-link:focus-visible {
    border-color: #a86f32;
    box-shadow: 0 18px 36px rgba(56, 38, 18, .13);
    outline: none;
}

.booklet-brewery-visual {
    position: relative;
    display: grid;
    place-items: center;
    gap: 10px;
    min-height: 168px;
    padding: 18px;
    background:
        linear-gradient(135deg, rgba(122, 91, 38, .12), rgba(255, 250, 240, .52)),
        #eadcc2;
    border-bottom: 1px solid rgba(90, 65, 28, .15);
}

.booklet-brewery-visual.detail {
    min-height: 0;
    align-self: stretch;
    border: 1px solid rgba(90, 65, 28, .15);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(122, 91, 38, .14), rgba(255, 250, 240, .6)),
        #eadcc2;
}

.booklet-brewery-visual > span:not(.booklet-tasted-badge) {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 11px;
    border-radius: 999px;
    background: rgba(255, 250, 240, .88);
    color: #5b3a18;
    font-weight: 900;
    font-size: .95rem;
}

.booklet-logo-frame {
    width: 94px;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(90, 65, 28, .2);
    border-radius: 8px;
    background: rgba(255, 250, 240, .86);
    color: #65421f;
    font-size: 1.45rem;
    font-weight: 900;
    box-shadow: 0 10px 22px rgba(59, 40, 18, .08);
}

.booklet-logo-frame.large {
    width: min(104px, 28vw);
}

.booklet-logo-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.booklet-default-logo {
    width: 100%;
    height: 100%;
    padding: 6px;
}

.booklet-default-logo .handle {
    fill: none;
}

.booklet-brewery-link h2 {
    margin: 0;
    color: #20281c;
    font-size: clamp(1.25rem, 4vw, 1.75rem);
}

.booklet-brewery-number {
    display: inline-block;
    margin-right: 8px;
    color: #7a5424;
    font-weight: 900;
}

.booklet-brewery-copy {
    display: grid;
    align-items: center;
    padding: 0 18px 18px;
}

.booklet-tasted-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(68, 45, 17, .9);
    color: #fffaf0;
    font-size: .82rem;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(48, 30, 10, .18);
}

.booklet-brewery-link p {
    margin: 0 0 10px;
    color: #4a4032;
    font-size: 1rem;
}

.booklet-ad-strip {
    display: block;
    margin: 18px 0;
    min-height: clamp(88px, 18vw, 188px);
}

.booklet-ad-card {
    display: none;
    overflow: hidden;
    border: 1px solid rgba(90, 65, 28, .16);
    border-radius: 8px;
    background: rgba(255, 250, 240, .78);
    box-shadow: 0 10px 26px rgba(59, 40, 18, .08);
}

.booklet-ad-card.is-active {
    display: block;
}

.booklet-ad-card a,
.booklet-ad-card img {
    display: block;
}

.booklet-ad-card img {
    width: 100%;
    max-height: clamp(88px, 18vw, 188px);
    object-fit: contain;
}

.booklet-card-meta,
.booklet-muted-chip {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #efe1c9;
    color: #5d421e;
    font-weight: 850;
    font-size: .92rem;
}

.booklet-open-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
    margin: 2px 18px 18px;
    padding: 11px 13px;
    border-radius: 6px;
    background: #6d3b16;
    color: #fffaf0;
    font-weight: 950;
    text-decoration: none;
}

.booklet-open-button::after {
    content: ">";
}

.booklet-detail-heading {
    display: grid;
    grid-template-columns: minmax(132px, 190px) 1fr;
    gap: clamp(16px, 4vw, 28px);
    align-items: center;
    padding: clamp(14px, 3vw, 22px);
    border: 1px solid #d8cfbe;
    border-radius: 8px;
    background: #fffaf0;
    box-shadow: 0 14px 32px rgba(56, 38, 18, .08);
}

.booklet-detail-hero h1 {
    font-size: clamp(2rem, 7vw, 4rem);
}

.booklet-brewer h2 {
    margin: 0 0 10px;
    color: #20281c;
    font-size: clamp(1.55rem, 6vw, 2.25rem);
}

.booklet-brewer p {
    margin: 0 0 10px;
}

.booklet-beers {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.booklet-beer {
    display: grid;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid #e3d8c7;
}

.booklet-beer-card {
    display: grid;
    gap: 12px;
    padding: clamp(18px, 5vw, 28px);
    border: 1px solid #d8cfbe;
    border-radius: 8px;
    background: #fffaf0;
    box-shadow: 0 12px 28px rgba(56, 38, 18, .07);
}

.booklet-beer-card:nth-child(even) {
    background: #fff8ec;
}

.booklet-beer-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
}

.booklet-beer-head h2 {
    margin: 0;
    color: #241c14;
    font-size: clamp(1.5rem, 6vw, 2.25rem);
}

.booklet-beer h3 {
    margin: 0;
    color: #2b241a;
    font-size: clamp(1.25rem, 5vw, 1.65rem);
}

.booklet-beer p {
    margin: 0;
}

.beer-number {
    color: #9a8156;
    font-weight: 900;
    margin: 0;
}

.beer-specs {
    color: #665943;
    font-weight: 750;
}

.beer-color-chip {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    width: fit-content;
    padding: 6px 10px 6px 6px;
    border: 1px solid #d8cfbe;
    border-radius: 999px;
    background: #fff7e8;
    color: #4d3b27;
    font-weight: 800;
}

.beer-color-swatch {
    width: 34px;
    height: 24px;
    border: 1px solid rgba(35, 24, 16, .3);
    border-radius: 999px;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, .55);
}

.booklet-beer-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 4px;
}

.booklet-note-box {
    display: grid;
    gap: 10px;
    padding: 13px;
    border: 1px solid #ded0b8;
    border-radius: 8px;
    background: #fbf0dd;
}

.booklet-note-box.locked {
    grid-template-columns: 1fr auto;
    align-items: center;
}

.booklet-note-box p {
    margin: 0;
    color: #55432e;
}

.booklet-note-box label {
    display: grid;
    gap: 6px;
    color: #3c2d1e;
    font-weight: 850;
}

.booklet-note-box textarea {
    width: 100%;
    min-height: 72px;
    resize: vertical;
    padding: 9px 10px;
    border: 1px solid #cbb99c;
    border-radius: 6px;
    background: #fffdfa;
    color: #211910;
    font: inherit;
}

.booklet-tasted {
    grid-template-columns: auto 1fr;
    align-items: center;
    width: fit-content;
}

.booklet-tasted input {
    width: 18px;
    height: 18px;
}

.booklet-note-footer {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
}

.booklet-note-footer span {
    color: #725d40;
    font-size: .9rem;
    font-weight: 750;
}

[data-autosave-status] {
    text-align: right;
}

[data-autosave-status][data-state="ok"] {
    color: #426b2f;
}

[data-autosave-status][data-state="pending"] {
    color: #7a5a1d;
}

[data-autosave-status][data-state="error"] {
    color: #9d2f21;
}

.booklet-code-card button {
    min-height: 42px;
    padding: 9px 13px;
    border: 1px solid #6d3b16;
    border-radius: 6px;
    background: #6d3b16;
    color: #fffaf0;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.booklet-vote-inline {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    background: #fbf0dd;
    color: #6d3b16;
    font-size: .9rem;
    font-weight: 900;
    text-decoration: none;
}

.booklet-vote-link {
    justify-self: start;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    padding: 9px 12px;
    border-radius: 6px;
    border: 1px solid #6d3b16;
    background: #6d3b16;
    color: #fffaf0;
    font-weight: 900;
    text-decoration: none;
}

.booklet-vote-link::after {
    content: ">";
}

.booklet-secondary-link {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    padding: 8px 11px;
    border-radius: 6px;
    border: 1px solid #d8cfbe;
    background: #fbf0dd;
    color: #5e3515;
    font-weight: 850;
    text-decoration: none;
}

.legal-page h1 {
    color: #1c281b;
    font-size: clamp(2rem, 5vw, 3.2rem);
    text-shadow: none;
}

@media (max-width: 700px) {
    .maintenance-shell {
        align-items: flex-end;
        padding: 32px 20px;
    }

    .public-code-form {
        grid-template-columns: 1fr;
    }

    .legal-links {
        display: grid;
        gap: 12px;
    }

    .booklet-shell {
        width: min(100% - 20px, 780px);
        padding-top: 18px;
    }

    .booklet-card {
        border-radius: 6px;
    }

    .booklet-brewery-link,
    .booklet-detail-heading {
        grid-template-columns: 1fr;
    }

    .booklet-brewery-visual {
        min-height: 132px;
    }

    .booklet-logo-frame.large {
        width: 96px;
    }

    .booklet-topbar {
        padding: 8px 10px;
    }

    .booklet-topbar-inner {
        grid-template-columns: 1fr auto;
        gap: 6px 10px;
    }

    .booklet-topbar strong {
        grid-column: 1 / -1;
        grid-row: 1;
    }

    .booklet-topbar-back,
    .booklet-topbar-auth {
        grid-row: 2;
    }

    .booklet-topbar-auth {
        justify-self: end;
    }

    .booklet-login-hint {
        max-width: calc(100vw - 112px);
        font-size: .82rem;
    }

    .booklet-note-box.locked,
    .booklet-note-footer {
        align-items: stretch;
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .booklet-code-card button {
        width: 100%;
    }
}
