* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #201d18;
    background: #fbf8f2;
}

a {
    color: inherit;
}

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

button,
input,
textarea {
    font: inherit;
}

.hero {
    min-height: 78vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 42vw);
    align-items: stretch;
    background: #2f261f;
    color: #fff8ea;
}

.hero-copy {
    align-self: center;
    padding: clamp(36px, 7vw, 92px);
}

.brand-logo {
    width: min(420px, 86vw);
    height: auto;
    margin: 0 0 28px;
    padding: 16px 18px;
    border-radius: 8px;
    background: #fffaf1;
}

.kicker,
.meta {
    margin: 0 0 12px;
    color: #bd7a2d;
    font-size: .78rem;
    font-weight: 850;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.hero h1,
.detail h1 {
    margin: 0;
    max-width: 820px;
    font-size: clamp(2.3rem, 7vw, 5.3rem);
    line-height: .98;
    letter-spacing: 0;
}

.hero p:not(.kicker) {
    max-width: 700px;
    color: #f1dec3;
    font-size: 1.2rem;
    line-height: 1.6;
}

.hero > img,
.hero-fallback {
    width: 100%;
    height: 100%;
    min-height: 420px;
    object-fit: cover;
}

.hero-fallback {
    display: grid;
    place-items: center;
    background: #d9c5a5;
    color: #4a2a14;
    font-size: clamp(4rem, 12vw, 10rem);
    font-weight: 900;
}

.section {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0 76px;
}

.section-head,
.toolbar,
.actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.section-head {
    align-items: end;
    margin-bottom: 22px;
}

.section-head span {
    display: block;
    margin-top: 5px;
}

.section h2,
.toolbar h1 {
    margin: 0;
}

.section-head span,
.empty {
    color: #6f6659;
}

.sort-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    justify-content: flex-end;
}

.sort-tabs a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 11px;
    border: 1px solid rgba(47, 39, 29, .14);
    border-radius: 999px;
    background: #fff;
    color: #4d4338;
    font-size: .88rem;
    font-weight: 800;
    text-decoration: none;
}

.sort-tabs a[aria-current="page"] {
    border-color: #8a4b16;
    background: #8a4b16;
    color: #fff;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

.card {
    overflow: hidden;
    border: 1px solid rgba(57, 48, 35, .16);
    border-radius: 8px;
    background: #fffaf1;
}

.media {
    aspect-ratio: 4 / 3;
    display: grid;
    place-items: center;
    background: #d9c5a5;
    color: #4a2a14;
    text-decoration: none;
}

.media img,
.detail-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media span,
.detail-media span {
    font-size: clamp(3rem, 12vw, 9rem);
    font-weight: 900;
}

.card-body {
    padding: 18px;
}

.card h3 {
    margin: 0 0 10px;
    font-size: 1.25rem;
}

.card h3 a {
    text-decoration: none;
}

.card p,
.detail p {
    line-height: 1.6;
}

.detail {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 84px;
}

.legal {
    width: min(860px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0 84px;
}

.legal h1 {
    margin: 0 0 22px;
    font-size: clamp(2rem, 5vw, 3.6rem);
    line-height: 1;
}

.legal h2 {
    margin-top: 30px;
}

.legal p {
    line-height: 1.7;
}

.protected-contact {
    white-space: pre-line;
    -webkit-user-select: none;
    user-select: none;
    color: #33382f;
}

.footer {
    display: flex;
    justify-content: center;
    gap: 18px;
    padding: 24px 16px 34px;
    color: #6f6659;
    font-weight: 700;
}

.back {
    margin-bottom: 24px;
    font-weight: 800;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(280px, 460px) minmax(0, 1fr);
    gap: clamp(28px, 6vw, 72px);
    align-items: start;
}

.detail-media {
    aspect-ratio: 4 / 5;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 8px;
    background: #d9c5a5;
}

.lead {
    color: #514638;
    font-size: 1.3rem;
    line-height: 1.55;
}

.facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    margin: 28px 0;
}

.facts div {
    padding: 12px;
    border: 1px solid rgba(57, 48, 35, .14);
    border-radius: 8px;
    background: #fffaf1;
}

.facts dt {
    color: #746a5c;
    font-size: .82rem;
    font-weight: 800;
}

.facts dd {
    margin: 4px 0 0;
    font-weight: 850;
}

.button,
.admin button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 14px;
    border: 0;
    border-radius: 6px;
    background: #7b3f16;
    color: #fff;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.admin button.secondary {
    background: #67594b;
}

.admin {
    min-height: 100vh;
    background: #f4efe7;
}

.admin-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 22px;
    border-bottom: 1px solid #40342a;
    background: #2f261f;
    color: #fff;
}

.admin-nav nav {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.admin-nav a {
    color: #fff;
    text-decoration: none;
}

.admin-nav a[aria-current="page"] {
    color: #f0b35a;
}

.admin-brand {
    display: inline-flex;
    align-items: center;
}

.admin-brand img {
    width: min(220px, 52vw);
    height: auto;
    filter: invert(1);
}

.admin-main {
    width: min(1180px, calc(100% - 28px));
    margin: 0 auto;
    padding: 28px 0 72px;
}

.login {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 18px;
}

.panel {
    width: min(420px, 100%);
    padding: 24px;
    border: 1px solid #d9ded2;
    border-radius: 8px;
    background: #fff;
}

.admin label {
    display: grid;
    gap: 6px;
    margin-bottom: 14px;
    font-weight: 800;
}

.admin input,
.admin select,
.admin textarea {
    width: 100%;
    min-height: 42px;
    border: 1px solid #cbd2c4;
    border-radius: 6px;
    padding: 9px 11px;
    background: #fff;
    color: #1d211b;
}

.admin textarea {
    resize: vertical;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid #d9ded2;
    border-radius: 8px;
    background: #fff;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 12px;
    border-bottom: 1px solid #e5e8df;
    text-align: left;
    vertical-align: top;
}

tr.needs-review {
    background: #fff8e8;
}

th {
    background: #eef1e9;
}

.table-primary {
    margin-bottom: 6px;
    font-weight: 850;
}

.muted,
small {
    color: #746a5c;
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 4px 0 7px;
}

.chip,
.status {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 7px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 850;
}

.chip {
    background: #efe6d5;
    color: #4a3721;
}

.status {
    margin-bottom: 5px;
}

.status.published {
    background: #f2dfbd;
    color: #65400f;
}

.status.draft {
    background: #eee8dc;
    color: #62533d;
}

.status.review {
    background: #ffe0a8;
    color: #6a3a00;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

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

.check input,
td input[type="checkbox"] {
    width: auto;
    min-height: 0;
}

.notice {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #f5ead7;
    color: #5b3717;
    font-weight: 700;
}

.notice.error {
    background: #fae1dc;
    color: #7d1d10;
}

.cache-status {
    margin: 0 0 8px;
    color: #746a5c;
    font-size: .9rem;
}

.untappd-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.untappd-list a {
    display: inline-flex;
    padding: 7px 10px;
    border: 1px solid #e2ddd3;
    border-radius: 999px;
    background: #fbfaf6;
    color: #5b3415;
    font-size: .9rem;
    font-weight: 800;
    text-decoration: none;
}

.source-panel {
    margin: 0 0 24px;
    padding: 18px;
    border: 1px solid #d9ded2;
    border-radius: 8px;
    background: #fff;
}

.pending-panel {
    border-color: #e1aa45;
    background: #fffaf0;
}

.review-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.source-panel-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.source-panel-head h2 {
    margin: 0;
}

.source-panel-head span {
    color: #746a5c;
    font-weight: 850;
}

.tech-group {
    margin-top: 18px;
}

.tech-group h3 {
    margin: 0 0 10px;
    color: #20231e;
}

.source-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin: 0 0 16px;
}

.source-grid div {
    padding: 10px;
    border-radius: 7px;
    background: #f6f1e9;
}

.source-grid dt {
    color: #746a5c;
    font-size: .78rem;
    font-weight: 850;
}

.source-grid dd {
    margin: 4px 0 0;
    overflow-wrap: anywhere;
    font-weight: 800;
}

.ingredient-table {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.ingredient-table article,
.note-grid article {
    padding: 12px;
    border: 1px solid #e2ddd3;
    border-radius: 8px;
    background: #fbfaf6;
}

.ingredient-table strong {
    display: block;
    margin-bottom: 8px;
}

.ingredient-table dl {
    display: grid;
    gap: 5px;
    margin: 0;
}

.ingredient-table dl div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    border-top: 1px solid #eee8dd;
    padding-top: 5px;
}

.ingredient-table dt {
    color: #746a5c;
    font-size: .78rem;
    font-weight: 850;
}

.ingredient-table dd {
    margin: 0;
    text-align: right;
}

.note-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px;
}

.note-grid h4 {
    margin: 0 0 8px;
}

.note-grid p {
    margin: 0 0 8px;
    line-height: 1.6;
}

.raw-source summary {
    cursor: pointer;
    font-weight: 850;
}

.raw-source pre {
    max-height: 520px;
    overflow: auto;
    padding: 14px;
    border-radius: 7px;
    background: #2b241e;
    color: #f7f2e9;
    font-size: .82rem;
    line-height: 1.45;
}

.danger {
    margin-top: 24px;
    background: #9a2417 !important;
}

.site-header {
    position: fixed;
    top: 0;
    left: 50%;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: min(1160px, 100%);
    margin: 0;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, .5);
    border-radius: 0 0 8px 8px;
    background: linear-gradient(135deg, rgba(255, 255, 255, .58), rgba(255, 255, 255, .22));
    box-shadow: 0 14px 35px rgba(43, 36, 30, .12), inset 0 1px 0 rgba(255, 255, 255, .65);
    transform: translateX(-50%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    backdrop-filter: blur(18px) saturate(150%);
}

.site-brand {
    display: inline-flex;
    width: min(430px, 86vw);
    padding: 0;
    border-radius: 6px;
    background: transparent;
}

.site-brand img {
    width: 100%;
    height: auto;
}

.label-hero {
    width: 100%;
    min-height: min(720px, calc(100vh - 62px));
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 620px) minmax(280px, 1fr);
    gap: clamp(20px, 4vw, 52px);
    align-items: center;
    margin: 0;
    padding: clamp(42px, 7vw, 92px) max(24px, calc((100vw - 1160px) / 2)) clamp(40px, 6vw, 78px);
    background:
        linear-gradient(90deg, rgba(253, 250, 245, .98) 0%, rgba(253, 250, 245, .93) 34%, rgba(253, 250, 245, .56) 56%, rgba(253, 250, 245, .08) 100%),
        url("/assets/brauhaus-hero-bg.jpg") center top / cover no-repeat;
}

.label-hero .hero-copy {
    padding: 0;
    max-width: 610px;
}

.label-hero h1 {
    max-width: 700px;
    margin: 0;
    color: #201d18;
    font-size: clamp(2.35rem, 6vw, 4.8rem);
    line-height: 1;
}

.label-hero p:not(.kicker) {
    max-width: 650px;
    color: #51483d;
    font-size: 1.12rem;
    line-height: 1.65;
}

.label-preview {
    display: none;
}

.scroll-cue {
    position: absolute;
    left: 50%;
    bottom: 18px;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, .65);
    border-radius: 999px;
    background: rgba(255, 255, 255, .32);
    color: #5a3d22;
    font-size: 2rem;
    line-height: 1;
    text-decoration: none;
    transform: translateX(-50%);
    box-shadow: 0 10px 30px rgba(43, 36, 30, .12);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    backdrop-filter: blur(14px) saturate(140%);
    animation: breathe 2.2s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% {
        opacity: .48;
        transform: translateX(-50%) translateY(0) scale(.96);
    }
    50% {
        opacity: 1;
        transform: translateX(-50%) translateY(5px) scale(1.04);
    }
}

.qr-card {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
}

.qr-grid {
    aspect-ratio: 1;
    border: 8px solid #201d18;
    border-radius: 6px;
    background:
        linear-gradient(90deg, #201d18 12px, transparent 12px) 0 0 / 24px 24px,
        linear-gradient(#201d18 12px, transparent 12px) 0 0 / 24px 24px,
        #fff;
}

.qr-card strong {
    display: block;
    margin-bottom: 6px;
    font-size: 1.15rem;
}

.qr-card span {
    color: #62584b;
    line-height: 1.5;
}

.label-preview p {
    margin: 0;
    color: #746a5c;
    line-height: 1.55;
}

.brand-logo,
.hero,
.detail-layout,
.detail-media {
    all: unset;
}

.section {
    padding-top: 46px;
}

.section-head h2 {
    color: #201d18;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.card {
    border-color: rgba(47, 39, 29, .12);
    background: #fff;
    box-shadow: 0 10px 28px rgba(39, 33, 25, .08);
    min-height: 236px;
    display: flex;
    flex-direction: column;
}

.media {
    aspect-ratio: 16 / 10;
    background:
        radial-gradient(circle at 28% 22%, rgba(222, 159, 70, .48), transparent 36%),
        linear-gradient(135deg, #201d18, #9b632c);
    color: #fff7ea;
}

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 16px 16px 18px;
}

.card-body p {
    color: #5f5548;
}

.card-body > p:not(.meta) {
    display: -webkit-box;
    min-height: 3.2em;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-height: 1.6;
}

.text-link {
    display: inline-flex;
    align-self: flex-end;
    margin-top: auto;
    color: #8a4b16;
    font-weight: 850;
    text-decoration: none;
}

.beer-page {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 24px 0 84px;
}

.beer-hero {
    display: grid;
    grid-template-columns: minmax(260px, 400px) minmax(0, 1fr);
    gap: clamp(24px, 5vw, 58px);
    align-items: center;
}

.beer-label {
    min-height: 320px;
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: 18px;
    border: 1px solid rgba(47, 39, 29, .12);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 20px 50px rgba(39, 33, 25, .12);
}

.beer-label img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.beer-label-fallback {
    display: grid;
    gap: 8px;
    place-items: center;
    text-align: center;
    color: #201d18;
}

.beer-label-fallback span {
    display: grid;
    place-items: center;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: #d99a43;
    color: #fff;
    font-size: 3rem;
    font-weight: 900;
}

.beer-label-fallback strong {
    max-width: 280px;
    font-size: 1.25rem;
}

.beer-label-fallback small {
    color: #665b4c;
}

.beer-intro h1 {
    margin: 0;
    color: #201d18;
    font-size: clamp(2.25rem, 6vw, 4.6rem);
    line-height: 1;
}

.lead {
    max-width: 680px;
    color: #51483d;
}

.fact-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 24px 0;
}

.fact-strip span {
    display: inline-flex;
    gap: 7px;
    align-items: baseline;
    min-height: 36px;
    padding: 8px 11px;
    border: 1px solid rgba(47, 39, 29, .12);
    border-radius: 999px;
    background: #fff;
    color: #302921;
}

.fact-strip strong {
    color: #8a4b16;
    font-size: .78rem;
    text-transform: uppercase;
}

.beer-sections {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr);
    gap: 16px;
    margin-top: 34px;
}

.info-section {
    padding: 20px;
    border: 1px solid rgba(47, 39, 29, .12);
    border-radius: 8px;
    background: #fff;
}

.info-section h2 {
    margin: 0 0 12px;
    color: #201d18;
}

.info-section p {
    color: #51483d;
    line-height: 1.68;
}

.recipe-list {
    display: grid;
    gap: 10px;
    margin: 0;
}

.recipe-list div {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr);
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(47, 39, 29, .1);
}

.recipe-list dt {
    color: #746a5c;
    font-size: .82rem;
    font-weight: 850;
}

.recipe-list dd {
    margin: 0;
    overflow-wrap: anywhere;
    font-weight: 750;
}

.button {
    background: #201d18;
}

@media (max-width: 760px) {
    .hero,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: 0;
    }

    .hero > img,
    .hero-fallback {
        min-height: 260px;
        max-height: 45vh;
    }

    .section-head,
    .toolbar,
    .admin-nav {
        align-items: flex-start;
        flex-direction: column;
    }

    .site-header {
        justify-content: flex-start;
        padding-inline: 18px;
    }

    .site-brand {
        width: min(310px, 82vw);
    }

    .sort-tabs {
        justify-content: flex-start;
    }

    .label-hero,
    .beer-hero,
    .beer-sections {
        grid-template-columns: 1fr;
    }

    .label-hero {
        min-height: 0;
        padding: 92px 18px 40px;
        background:
            linear-gradient(180deg, rgba(253, 250, 245, .98) 0%, rgba(253, 250, 245, .94) 48%, rgba(253, 250, 245, .78) 100%),
            url("/assets/brauhaus-hero-bg.jpg") center right / cover no-repeat;
    }

    .label-preview {
        display: none;
    }

    .beer-label {
        min-height: 220px;
    }

    .recipe-list div {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}
