:root {
    color-scheme: light;
    --paper: #f5eee4;
    --surface: #fffaf2;
    --ink: #211d18;
    --muted: #6e6253;
    --gold: #8a642e;
    --line: #d9cbb7;
    --rz-primary: #6d4d24;
    --rz-primary-light: #eaddc6;
    --rz-primary-dark: #463016;
    --rz-on-primary: #fffaf2;
    --rz-text-font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --rz-text-color: #211d18;
    --rz-body-background-color: #f5eee4;
    --rz-base-background-color: #fffaf2;
    --rz-border-radius: 6px;
    font-family: var(--rz-text-font-family);
    color: var(--ink);
    background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.6; background: var(--paper); }
a { color: var(--gold); text-underline-offset: 4px; }
button, input, select, textarea { font: inherit; }
button, select, input:not([type=checkbox]), .rz-button { min-height: 44px; }
button, a, input, select, textarea { touch-action: manipulation; }
:focus-visible { outline: 3px solid #825610; outline-offset: 4px; }
.shell { max-width: 1240px; margin: auto; padding: 0 32px; }
body:has(.shell-public) { background: radial-gradient(ellipse at 50% 40%, var(--surface), var(--paper) 70%) fixed; }
.shell-public { min-height: 100svh; display: flex; flex-direction: column; }
.shell-public main { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: clamp(40px, 8svh, 80px) 0 clamp(72px, 14svh, 144px); }
.site-header { min-height: 104px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); }
.wordmark { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-mark { display: block; width: 44px; height: 44px; flex: none; }
.wordmark-type { display: block; font: 700 30px Georgia, serif; font-variant: small-caps; letter-spacing: -.8px; line-height: 1; }
.wordmark-type small { display: block; margin-top: 8px; color: var(--ink); font: 10px var(--rz-text-font-family); text-align: center; letter-spacing: 4px; }
nav { display: flex; gap: 26px; flex-wrap: wrap; }
.site-header nav a { color: var(--muted); text-decoration: none; padding: 10px 0; font-size: .9rem; }
.site-header nav a.active { color: var(--ink); border-bottom: 2px solid var(--gold); }
main { min-height: 70vh; padding: 46px 0 64px; }
footer { padding: 24px 0; border-top: 1px solid var(--line); color: var(--muted); display: flex; justify-content: space-between; gap: 16px; font-size: .8rem; }
h1, h2, h3 { font-family: Georgia, 'Times New Roman', serif; line-height: 1.2; color: var(--ink); }
h1 { font-size: clamp(2rem, 4.2vw, 3.6rem); font-weight: 400; letter-spacing: -1.4px; margin: 12px 0 20px; }
h2 { font-size: 1.6rem; font-weight: 400; }
h3 { font-size: 1.25rem; }
p { margin: 10px 0; }
.eyebrow { font-size: .68rem; font-weight: 650; text-transform: uppercase; letter-spacing: 2.5px; color: var(--gold); }
.muted, small { color: var(--muted); }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 22px; background: var(--ink); color: var(--surface); border-radius: 5px; text-decoration: none; font-size: .88rem; }
.page-heading, .section-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 30px; }
.collection-heading { margin-bottom: 20px; gap: 12px; }
.collection-heading h1 { font-size: 2rem; letter-spacing: -.6px; margin: 0; }
.collection-summary { color: var(--muted); margin: 6px 0 0; font-size: .9rem; }
.collection-results-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin: 18px 0 12px; }
.view-switch { display: flex; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); padding: 3px; }
.view-switch a { display: inline-flex; align-items: center; min-height: 44px; padding: 6px 14px; border-radius: 4px; text-decoration: none; color: var(--muted); font-size: .85rem; }
.view-switch a[aria-current=true] { background: var(--ink); color: var(--surface); }
.bottle-table-scroll { max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.bottle-table { width: 100%; min-width: 900px; border-collapse: collapse; font-size: .85rem; }
.bottle-table th, .bottle-table td { padding: 10px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.bottle-table thead th { background: #eee4d5; font-weight: 600; white-space: nowrap; }
.bottle-table tbody th { min-width: 200px; max-width: 320px; overflow-wrap: anywhere; font-weight: 550; }
.bottle-table td { white-space: nowrap; }
.bottle-table .producer-cell { min-width: 150px; max-width: 240px; white-space: normal; overflow-wrap: anywhere; }
.bottle-table tbody tr:last-child > * { border-bottom: 0; }
.bottle-table tbody tr:hover { background: var(--paper); }
.bottle-table a { display: inline-flex; align-items: center; min-height: 44px; }
.table-expression { display: block; font-weight: 400; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.filter-panel { background: #eee4d5; padding: 24px; border-radius: 8px; }
.search-label { margin-bottom: 8px; }
.primary-filters { display: grid; grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr)); align-items: end; gap: 16px; }
.primary-filters > * { min-width: 0; }
.filter-disclosure { border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--ink); padding: 8px 12px; cursor: pointer; font-size: .85rem; }
.filter-disclosure span:last-child { margin-left: 6px; }
.filter-count { color: var(--muted); }
.additional-filters { border-top: 1px solid var(--line); margin-top: 18px; }
.collection-view-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
.collection-sort { display: flex; align-items: center; gap: 8px; }
.collection-sort > select { width: auto; margin: 0; }
.table-sort { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 0; background: transparent; border: 0; color: var(--ink); text-align: left; cursor: pointer; font-weight: 600; }
.table-sort span { color: var(--gold); }
.bottle-table thead th { padding-block: 4px; }
.filter-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 18px; }
label { display: block; font-size: .85rem; font-weight: 550; }
label > input:not([type=checkbox]), label > select, label > textarea, label > .rz-textbox, label > .rz-numeric { display: block; width: 100%; margin-top: 6px; }
input, select, textarea { background: var(--surface); color: var(--ink); border: 1px solid #ac9c87; border-radius: 5px; padding: 9px 12px; max-width: 100%; }
select { appearance: none; padding-right: 2rem; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--gold); vertical-align: middle; margin-right: 6px; }
.filter-actions, .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 22px; }
.collection-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 22px; }
.whisky-card { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); transition: border-color .15s; }
.whisky-card:hover { border-color: var(--gold); }
.card-link { color: inherit; text-decoration: none; display: block; height: 100%; }
.whisky-photo { aspect-ratio: 1.2; display: grid; place-items: center; background: #e9dece; position: relative; padding: 20px; }
.whisky-photo img { height: 100%; width: 100%; object-fit: contain; min-height: 0; }
.bottle-placeholder { width: 70px; height: 144px; border: 1px solid #ad9672; border-radius: 18px 18px 10px 10px; background: linear-gradient(150deg, #e2cfb0, #d1b388); display: flex; flex-direction: column; align-items: center; justify-content: center; font: 40px Georgia, serif; color: #5b4228; position: relative; margin-top: 25px; }
.bottle-placeholder:before { content: ''; position: absolute; width: 26px; height: 38px; background: #ae8c5a; border: 1px solid #8a6f48; border-radius: 3px; top: -30px; }
.bottle-placeholder span { font: 6px system-ui; letter-spacing: 1px; }
.card-content { padding: 22px; }
.card-content h2 { font-size: 1.65rem; margin: 9px 0 4px; }
.expression { color: var(--muted); margin-top: 0; font-weight: 400; }
.card-content .muted { font-size: .82rem; }
.card-summary { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 18px; font-size: .76rem; color: var(--muted); }
.panel, .bottle-row { background: var(--surface); border: 1px solid var(--line); padding: 28px; border-radius: 8px; margin: 20px 0; }
.narrow { max-width: 660px; margin-inline: auto; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-bottom: 22px; }
.form-grid label { min-width: 0; }
.rz-textbox, .rz-numeric { width: 100%; }
/* Keep Radzen's spinner buttons inside the numeric field despite the global button minimum. */
.rz-numeric-button { min-height: 0; }
.validation-message, .validation-errors { color: #8e2920; }
.notice { padding: 18px 22px; border: 1px solid var(--gold); border-radius: 6px; background: #f0e3cb; margin: 20px 0; }
.error { background: #fff0e9; border-color: #a74b35; color: #742b1f; }
.empty-state { text-align: center; padding: 60px 20px; border: 1px dashed var(--line); border-radius: 8px; margin: 28px 0; }
.detail-hero { display: grid; grid-template-columns: minmax(200px, .8fr) 1.2fr; gap: 48px; margin: 30px 0 50px; }
.detail-photo { background: #e9dece; border-radius: 8px; min-height: 320px; display: grid; place-items: center; padding: 28px; }
.detail-photo img { max-height: 420px; width: 100%; object-fit: contain; }
.detail-photo .bottle-placeholder { transform: scale(1.6); }
.description { white-space: pre-wrap; }
.photo-editor { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 20px; }
.photo-editor small { display: block; margin: 8px 0; }
.photo-editor input { width: 100%; font-size: .8rem; }
.bottle-heading { display: flex; justify-content: space-between; align-items: center; }
.badge { background: #f0e3cb; color: #5b4228; padding: 4px 10px; font-size: .75rem; border-radius: 4px; }
.whisky-photo .badge { position: absolute; top: 12px; right: 12px; }
.remaining { max-width: 360px; margin: 12px 0; font-size: .9rem; }
meter { display: block; width: 100%; height: 13px; accent-color: var(--gold); }
.bottle-metadata { display: flex; gap: 36px; flex-wrap: wrap; margin: 18px 0; }
dt { color: var(--muted); font-size: .75rem; } dd { margin: 0; }
.bottle-small-photo { max-height: 140px; max-width: 120px; }
summary { cursor: pointer; min-height: 44px; padding-block: 10px; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .8rem; }
.history-entry { padding: 12px 0; border-top: 1px solid var(--line); }
.compact { margin: 0; gap: 8px; }
.invitation-row { display: flex; justify-content: space-between; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.invite-link { width: 100%; }
.page-index { margin-bottom: 30px; }
.prose { max-width: 850px; overflow-wrap: anywhere; }
.prose h2, .prose h3 { margin-top: 28px; }
.login-panel { width: 100%; max-width: 380px; margin: 0 auto; padding: 40px 32px 28px; text-align: center; overflow-wrap: anywhere; background: var(--surface); border: 3px double var(--gold); border-radius: 4px; box-shadow: 0 1px 2px rgba(33, 29, 24, .06), 0 12px 32px -12px rgba(33, 29, 24, .18); }
.login-mark { display: block; margin: 0 auto 14px; width: 48px; height: 48px; }
.login-wordmark { font-size: clamp(2.1rem, 4vw, 2.5rem); font-variant: small-caps; font-weight: 700; letter-spacing: -.6px; margin: 0; }
.login-established { display: flex; align-items: center; gap: 12px; margin: 6px 0 0; color: var(--muted); font-size: 10px; letter-spacing: 4px; text-transform: uppercase; }
.login-established::before, .login-established::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
.login-membership { margin: 22px 0 18px; }
.login-panel h2 { font-size: 1.3rem; margin: 0 0 8px; }
.login-alert { margin: 0 0 14px; padding: 10px 14px; border: 1px solid #a74b35; border-radius: 5px; background: #fff0e9; color: #742b1f; font-size: .85rem; }
.login-buttons, .login-actions { display: flex; flex-direction: column; gap: 10px; }
.login-actions { margin-top: 20px; }
.provider-button, .login-button { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 48px; padding: 10px 18px; background: #fff; border: 1px solid #ac9c87; border-radius: 5px; color: var(--ink); font-size: .9rem; font-weight: 500; text-decoration: none; cursor: pointer; transition: border-color .15s, background-color .15s; }
.provider-button:hover, .login-button:hover { border-color: var(--gold); background: var(--paper); }
.provider-button img { flex: none; width: 18px; height: 18px; }
.login-note { margin: 16px 0 0; color: var(--muted); font-size: .8rem; text-align: center; }
.login-panel .development { margin-top: 24px; padding-top: 8px; border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
.login-panel .development summary { min-height: 44px; padding: 10px 0; cursor: pointer; }
.login-panel .development .rz-button { margin: 5px; max-width: 100%; }
.skip-link { position: absolute; top: -100px; left: 16px; z-index: 10000; background: var(--ink); color: white; padding: 12px; }
.skip-link:focus { top: 10px; }
.initial-loading { padding: 25vh 20px; text-align: center; font: 40px Georgia, serif; }
.initial-loading span { display: block; margin-top: 20px; font: 16px system-ui; color: var(--muted); }
#blazor-error-ui { display: none; position: fixed; bottom: 0; padding: 16px; background: #fff0e9; width: 100%; z-index: 10000; }
@media (max-width: 900px) {
    .collection-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .site-header { flex-direction: column; align-items: flex-start; padding: 20px 0; gap: 16px; }
    nav { gap: 20px; }
    .filter-grid, .primary-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .primary-filters > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 580px) {
    .shell { padding: 0 18px; }
    main { padding-top: 28px; }
    h1 { letter-spacing: -.7px; }
    .page-heading { align-items: flex-start; flex-direction: column; }
    .collection-grid, .form-grid, .detail-hero { grid-template-columns: minmax(0, 1fr); }
    .filter-panel, .panel, .bottle-row { padding: 18px; }
    .filter-grid { gap: 12px; }
    .detail-hero { gap: 24px; }
    .detail-photo { min-height: 260px; }
    footer { flex-direction: column; }
    .invitation-row { flex-direction: column; }
    .rz-data-grid { max-width: 100%; }
    .login-panel { padding: 32px 20px 24px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
