/* Wine Blinds: Bootstrap 5.3's dark theme in a wine palette, and the site's own pieces
   (PLAN.md, slice 5). Everything that colours the page is under [data-bs-theme=dark], so
   the printed tag sheet, which App.razor keeps on the light theme, is left alone. */

:root {
    --wb-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "URW Palladio L", P052, "Book Antiqua", Charter, "Bitstream Charter", Georgia, "Noto Serif", serif;
    --wb-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif;
}

[data-bs-theme=dark] {
    /* Near-black with a little red in it, a warm off-white, burgundy, and one accent: the
       gold of a capsule. Text and links are AA or better on every background here. */
    --wb-ink: #150b0e;
    --wb-surface: #1e1116;
    --wb-surface-2: #2c1820;
    --wb-border: #4a2a33;
    --wb-border-strong: #6e4550;
    --wb-text: #f4ece4;
    --wb-muted: #c9b5ab;
    --wb-wine: #9b2a45;
    --wb-wine-bright: #b13352;
    --wb-wine-deep: #7d2037;
    --wb-accent: #e2b768;
    --wb-accent-bright: #f0d29c;
    --wb-danger: #ff9aa2;

    --bs-body-font-family: var(--wb-sans);
    --bs-body-bg: var(--wb-ink);
    --bs-body-bg-rgb: 21, 11, 14;
    --bs-body-color: var(--wb-text);
    --bs-body-color-rgb: 244, 236, 228;
    --bs-emphasis-color: #fff8f2;
    --bs-emphasis-color-rgb: 255, 248, 242;
    --bs-secondary-color: var(--wb-muted);
    --bs-secondary-color-rgb: 201, 181, 171;
    --bs-secondary-rgb: 201, 181, 171;
    --bs-secondary-bg: var(--wb-surface-2);
    --bs-tertiary-bg: var(--wb-surface);
    --bs-heading-color: #fff8f2;
    --bs-border-color: var(--wb-border);
    --bs-border-radius: 0.6rem;
    --bs-border-radius-lg: 0.9rem;
    --bs-link-color: var(--wb-accent);
    --bs-link-color-rgb: 226, 183, 104;
    --bs-link-hover-color: var(--wb-accent-bright);
    --bs-link-hover-color-rgb: 240, 210, 156;
    --bs-code-color: #f3a6b8;
    --bs-primary: var(--wb-wine);
    --bs-primary-rgb: 155, 42, 69;
    --bs-primary-text-emphasis: #f3a6b8;
    --bs-primary-bg-subtle: #2e0f18;
    --bs-primary-border-subtle: #6b2436;
    --bs-success-text-emphasis: #b5e6bc;
    --bs-success-bg-subtle: #14281a;
    --bs-success-border-subtle: #2f6b3d;
    --bs-danger-text-emphasis: #ffc2c7;
    --bs-danger-bg-subtle: #3a1218;
    --bs-danger-border-subtle: #7a2632;
    --bs-warning-text-emphasis: #f6d79a;
    --bs-focus-ring-color: rgba(226, 183, 104, 0.45);
    --bs-form-valid-color: #9fd4a6;
    --bs-form-valid-border-color: #4f8a5a;
    --bs-form-invalid-color: var(--wb-danger);
    --bs-form-invalid-border-color: #ff6b78;
}

[data-bs-theme=dark] body {
    min-height: 100vh;
    /* Candlelight through a glass: a burgundy glow at the top of the page. */
    background:
        radial-gradient(130% 55% at 50% -12%, rgba(155, 42, 69, 0.42), rgba(155, 42, 69, 0) 70%) no-repeat,
        var(--wb-ink);
    -webkit-font-smoothing: antialiased;
}

[data-bs-theme=dark] ::selection {
    background: rgba(177, 51, 82, 0.7);
    color: #fff;
}

/* FocusOnNavigate focuses the page's h1 for screen readers; it needs no ring. */
h1:focus,
[data-bs-theme=dark] h1:focus-visible {
    outline: none;
}

/* Type: a serif for names and headings, the system sans for the rest. */
[data-bs-theme=dark] h1,
[data-bs-theme=dark] h3 {
    font-family: var(--wb-serif);
    font-weight: 600;
    letter-spacing: -0.005em;
}

[data-bs-theme=dark] h1 {
    font-size: clamp(1.9rem, 1.55rem + 1.6vw, 2.5rem);
    line-height: 1.15;
    text-wrap: balance;
    overflow-wrap: anywhere;
}

[data-bs-theme=dark] h2 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--wb-muted);
}

[data-bs-theme=dark] h3 {
    font-size: 1.5rem;
}

[data-bs-theme=dark] h4 {
    font-size: 1.1rem;
    font-weight: 600;
}

[data-bs-theme=dark] hr {
    border-color: var(--wb-border);
    opacity: 1;
}

[data-bs-theme=dark] .text-secondary {
    color: var(--wb-muted) !important;
}

[data-bs-theme=dark] .text-danger {
    color: var(--wb-danger) !important;
}

[data-bs-theme=dark] :focus-visible {
    outline: 2px solid var(--wb-accent);
    outline-offset: 2px;
}

/* ---- Buttons ---- */

[data-bs-theme=dark] .btn {
    --bs-btn-font-weight: 500;
    --bs-btn-focus-box-shadow: 0 0 0 0.2rem rgba(226, 183, 104, 0.5);
}

[data-bs-theme=dark] .btn-lg {
    --bs-btn-font-size: 1.1rem;
    --bs-btn-padding-y: 0.7rem;
}

[data-bs-theme=dark] .btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--wb-wine);
    --bs-btn-border-color: var(--wb-wine);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--wb-wine-bright);
    --bs-btn-hover-border-color: var(--wb-wine-bright);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--wb-wine-deep);
    --bs-btn-active-border-color: var(--wb-wine-deep);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: var(--wb-wine);
    --bs-btn-disabled-border-color: var(--wb-wine);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset, 0 6px 18px -8px rgba(155, 42, 69, 0.9);
}

[data-bs-theme=dark] .btn-outline-light,
[data-bs-theme=dark] .btn-outline-secondary {
    --bs-btn-color: var(--wb-text);
    --bs-btn-border-color: var(--wb-border-strong);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: rgba(244, 236, 228, 0.08);
    --bs-btn-hover-border-color: var(--wb-muted);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: rgba(244, 236, 228, 0.14);
    --bs-btn-active-border-color: var(--wb-muted);
}

[data-bs-theme=dark] .btn-danger {
    --bs-btn-color: #fff;
    --bs-btn-bg: #b4232f;
    --bs-btn-border-color: #b4232f;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #c92c39;
    --bs-btn-hover-border-color: #c92c39;
    --bs-btn-active-bg: #961c27;
    --bs-btn-active-border-color: #961c27;
}

[data-bs-theme=dark] .btn-outline-danger {
    --bs-btn-color: var(--wb-danger);
    --bs-btn-border-color: #a8414c;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #b4232f;
    --bs-btn-hover-border-color: #b4232f;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #961c27;
    --bs-btn-active-border-color: #961c27;
}

/* ---- Forms ---- */

[data-bs-theme=dark] .form-control,
[data-bs-theme=dark] .form-select {
    background-color: var(--wb-surface);
    border-color: var(--wb-border-strong);
    color: var(--wb-text);
}

[data-bs-theme=dark] .form-control:focus,
[data-bs-theme=dark] .form-select:focus {
    background-color: var(--wb-surface);
    border-color: var(--wb-accent);
    box-shadow: 0 0 0 0.2rem rgba(226, 183, 104, 0.25);
    color: var(--wb-text);
}

[data-bs-theme=dark] .form-control::placeholder {
    color: #a8968d;
}

[data-bs-theme=dark] .form-floating > .form-control::placeholder {
    color: transparent;
}

[data-bs-theme=dark] .form-control:disabled {
    background-color: var(--bs-secondary-bg);
}

[data-bs-theme=dark] .form-floating > label,
[data-bs-theme=dark] .form-label {
    color: var(--wb-muted);
}

/* The strip behind a floated label matches the field, not the page. */
[data-bs-theme=dark] .form-floating > .form-control:focus ~ label::after,
[data-bs-theme=dark] .form-floating > .form-control:not(:placeholder-shown) ~ label::after,
[data-bs-theme=dark] .form-floating > .form-control-plaintext ~ label::after,
[data-bs-theme=dark] .form-floating > .form-select ~ label::after {
    background-color: var(--wb-surface);
}

[data-bs-theme=dark] .form-floating > .form-control:disabled ~ label::after {
    background-color: var(--bs-secondary-bg);
}

[data-bs-theme=dark] .form-floating > .form-control:focus ~ label,
[data-bs-theme=dark] .form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--wb-muted);
}

[data-bs-theme=dark] .form-check-input {
    background-color: var(--wb-surface);
    border-color: #8a6a70;
}

[data-bs-theme=dark] .form-check-input:checked {
    background-color: var(--wb-wine);
    border-color: var(--wb-wine-bright);
}

[data-bs-theme=dark] .form-check-input:focus {
    border-color: var(--wb-accent);
    box-shadow: 0 0 0 0.2rem rgba(226, 183, 104, 0.25);
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

/* Blazor's validation classes. */
[data-bs-theme=dark] .form-control.invalid,
[data-bs-theme=dark] .form-select.invalid {
    border-color: #ff6b78;
    box-shadow: 0 0 0 1px #ff6b78;
}

.validation-message {
    color: #e50000;
}

[data-bs-theme=dark] .validation-message {
    color: var(--wb-danger);
    font-size: 0.9rem;
    margin-top: 0.35rem;
}

[data-bs-theme=dark] ul.validation-errors,
[data-bs-theme=dark] ul.text-danger[role=alert] {
    padding: 0.75rem 1rem 0.75rem 2rem;
    margin-bottom: 1rem;
    border: 1px solid var(--bs-danger-border-subtle);
    border-radius: var(--bs-border-radius);
    background: var(--bs-danger-bg-subtle);
}

/* The template showed a floating field's placeholder at its right edge as well as the
   label; Bootstrap's default, a hidden placeholder, reads better. */

/* ---- Status messages ---- */

[data-bs-theme=dark] .alert {
    --bs-alert-border-radius: var(--bs-border-radius-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

[data-bs-theme=dark] .alert::before {
    flex: none;
    display: grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    font-weight: 700;
    line-height: 1;
}

[data-bs-theme=dark] .alert-success {
    --bs-alert-color: #d3f5d8;
    --bs-alert-bg: #163220;
    --bs-alert-border-color: #3b7d4a;
}

[data-bs-theme=dark] .alert-success::before {
    content: "\2713";
    background: #3f9a55;
    color: #fff;
}

[data-bs-theme=dark] .alert-danger {
    --bs-alert-color: #ffd0d4;
    --bs-alert-bg: #3a1218;
    --bs-alert-border-color: #8a2a37;
}

[data-bs-theme=dark] .alert-danger::before {
    content: "!";
    background: #c92c39;
    color: #fff;
}

/* ---- Lists ---- */

[data-bs-theme=dark] .list-group {
    --bs-list-group-color: var(--wb-text);
    --bs-list-group-bg: var(--wb-surface);
    --bs-list-group-border-color: var(--wb-border);
    --bs-list-group-action-color: var(--wb-text);
    --bs-list-group-action-hover-color: #fff;
    --bs-list-group-action-hover-bg: var(--wb-surface-2);
    --bs-list-group-action-active-color: #fff;
    --bs-list-group-action-active-bg: #3a1f29;
    --bs-list-group-active-bg: var(--wb-wine);
    --bs-list-group-active-border-color: var(--wb-wine);
}

[data-bs-theme=dark] .nav-pills {
    --bs-nav-link-color: var(--wb-muted);
    --bs-nav-link-hover-color: var(--wb-text);
    --bs-nav-pills-link-active-color: #fff;
    --bs-nav-pills-link-active-bg: var(--wb-wine);
}

/* ---- The mark ---- */

.glass {
    width: 1em;
    height: 1.333em;
    vertical-align: -0.2em;
}

.glass-line {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.glass-wine {
    fill: #c23a5c;
}

/* ---- The frame: a top bar and a column ---- */

.site {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-header {
    background: linear-gradient(180deg, rgba(42, 15, 24, 0.95), rgba(28, 11, 17, 0.85));
    border-bottom: 1px solid #3d1a24;
}

/* On a phone: the brand and the account on one row, the links under them. No toggle, so
   nothing needs a script. From 768px everything is one row. */
.site-nav {
    max-width: 64rem;
    margin: 0 auto;
    padding: 0.5rem 1rem;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
        "brand account"
        "links links";
    align-items: center;
    column-gap: 1rem;
}

.site-brand {
    grid-area: brand;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0;
    font-family: var(--wb-serif);
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--wb-text);
    text-decoration: none;
    white-space: nowrap;
}

.site-brand:hover {
    color: #fff;
}

.site-brand-glass {
    font-size: 1.15rem;
    color: var(--wb-accent);
}

.site-links {
    grid-area: links;
    display: flex;
    gap: 0.25rem;
    margin: 0.35rem 0 0;
    padding: 0;
    list-style: none;
}

.site-links li {
    flex: 1;
}

.site-link {
    display: block;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    color: var(--wb-muted);
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
}

.site-link:hover {
    color: var(--wb-text);
    background: rgba(244, 236, 228, 0.06);
}

.site-link.active {
    color: var(--wb-accent);
    background: rgba(226, 183, 104, 0.12);
}

/* Signed out, the two links sit at the right of the brand. */
.site-links-guest {
    grid-area: account;
    justify-self: end;
    margin: 0;
}

.site-links-guest li {
    flex: none;
}

.site-links-guest .site-link {
    padding: 0.45rem 0.8rem;
}

.site-account {
    grid-area: account;
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    max-width: 100%;
}

.site-account form {
    flex: none;
}

.site-account-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--wb-muted);
    font-size: 0.875rem;
    text-decoration: none;
}

.site-account-name:hover,
.site-account-name.active {
    color: var(--wb-text);
    text-decoration: underline;
}

.site-logout {
    padding: 0.35rem 0.85rem;
    border: 1px solid var(--wb-border-strong);
    border-radius: 999px;
    background: none;
    color: var(--wb-text);
    font-size: 0.875rem;
    white-space: nowrap;
}

.site-logout:hover {
    border-color: var(--wb-muted);
    background: rgba(244, 236, 228, 0.08);
}

@media (min-width: 768px) {
    .site-nav {
        grid-template-columns: auto minmax(0, 1fr) auto;
        grid-template-areas: "brand links account";
        padding: 0.6rem 1.5rem;
    }

    .site-links {
        margin: 0 0 0 1rem;
    }

    .site-links li {
        flex: none;
    }

    .site-links-guest {
        grid-area: account;
    }

    .site-account-name {
        max-width: 18rem;
    }
}

.site-main {
    flex: 1;
    width: 100%;
    max-width: 64rem;
    margin: 0 auto;
    padding: 1.5rem 1rem 4rem;
}

@media (min-width: 768px) {
    .site-main {
        padding: 2.25rem 1.5rem 5rem;
    }
}

.page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    max-width: 40rem;
    margin-bottom: 1.25rem;
}

.page-head h1 {
    margin: 0;
}

/* ---- The reveal: the screen every guest sees ---- */

.site-main-tag {
    max-width: 40rem;
}

.site-main-tag > .alert {
    max-width: 34rem;
    margin: 0 auto 1rem;
}

/* At least most of a phone's screen, centred, so a wine with only a name sits in the
   middle of it rather than at the top; a longer one just grows. */
.reveal {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: min(62svh, 36rem);
    padding: 1.5rem 0.25rem;
    text-align: center;
}

.reveal-eyebrow {
    margin: 0 0 1rem;
    color: var(--wb-accent);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

[data-bs-theme=dark] .reveal-name {
    margin: 0 0 1rem;
    color: #fff8f2;
    font-size: clamp(2.6rem, 1.5rem + 6vw, 4.5rem);
    font-weight: 600;
    line-height: 1.04;
    letter-spacing: -0.015em;
    hyphens: auto;
}

.reveal-details,
.reveal-details dd {
    margin: 0;
}

.reveal-maker {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: baseline;
    gap: 0 0.55rem;
    font-family: var(--wb-serif);
    font-size: clamp(1.25rem, 1.1rem + 0.8vw, 1.5rem);
    line-height: 1.35;
}

.reveal-producer {
    font-style: italic;
    color: var(--wb-text);
}

.reveal-vintage {
    color: var(--wb-accent);
    font-variant-numeric: lining-nums;
}

.reveal-producer ~ .reveal-vintage::before {
    content: "\00B7";
    margin-right: 0.55rem;
    color: var(--wb-muted);
}

.reveal-ornament {
    display: block;
    flex: none;
    width: 9rem;
    height: auto;
    margin: 1.75rem auto;
    fill: var(--wb-accent);
    stroke: var(--wb-accent);
    stroke-width: 1;
    opacity: 0.7;
}

.reveal-ornament circle {
    stroke: none;
}

.reveal-ornament-gem {
    stroke: none;
}

.reveal-facts {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.25rem 2.75rem;
    margin-bottom: 2rem;
}

.reveal-facts > div {
    min-width: 7rem;
    max-width: 100%;
}

.reveal-facts dt {
    margin-bottom: 0.2rem;
    color: var(--wb-muted);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.reveal-facts dd {
    font-size: 1.15rem;
    overflow-wrap: anywhere;
}

.reveal-notes {
    max-width: 32rem;
    margin: 0 auto;
    padding: 0 0 0 1.1rem;
    border-left: 2px solid rgba(226, 183, 104, 0.55);
    color: #ece0d6;
    font-family: var(--wb-serif);
    font-size: 1.12rem;
    font-style: italic;
    line-height: 1.6;
    text-align: left;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

/* The owner's controls: small, below the wine, out of a guest's way. */
.tag-owner {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.25rem;
    max-width: 20rem;
    margin: 3rem auto 0;
    padding-top: 0.75rem;
    border-top: 1px solid var(--wb-border);
    color: var(--wb-muted);
    font-size: 0.85rem;
}

.tag-owner-label {
    margin-right: 0.25rem;
}

[data-bs-theme=dark] .tag-owner .btn-link {
    --bs-btn-color: var(--wb-muted);
    --bs-btn-hover-color: var(--wb-text);
    --bs-btn-active-color: var(--wb-text);
    padding: 0.35rem 0.6rem;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

/* ---- Attaching: the host's screen, tag after tag ---- */

.tag-attach {
    max-width: 34rem;
    margin: 0 auto;
}

.tag-attach h1 {
    margin-bottom: 0.25rem;
}

.tag-attach-lead {
    margin-bottom: 1.25rem;
    color: var(--wb-muted);
}

.attach-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

[data-bs-theme=dark] .attach-list > .attach-choice {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.15rem;
    min-height: 4.5rem;
    padding: 1rem 3rem 1rem 1.25rem;
    border: 1px solid var(--wb-border-strong);
    border-radius: var(--bs-border-radius-lg);
    text-align: left;
}

.attach-choice::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 1.35rem;
    width: 0.6rem;
    height: 0.6rem;
    border-top: 2px solid var(--wb-accent);
    border-right: 2px solid var(--wb-accent);
    transform: translateY(-50%) rotate(45deg);
}

[data-bs-theme=dark] .attach-list > .attach-choice:active {
    border-color: var(--wb-accent);
}

.attach-choice-name {
    font-family: var(--wb-serif);
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.attach-choice-details {
    color: var(--wb-muted);
}

.tag-attach-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

/* ---- An unattached tag, not found, an error ---- */

.tag-empty,
.notice {
    max-width: 30rem;
    margin: 0 auto;
    padding: clamp(1.5rem, 8vh, 4rem) 0.25rem 1rem;
    text-align: center;
}

.tag-empty-glass,
.notice-glass {
    font-size: 3rem;
    margin-bottom: 1.25rem;
    color: var(--wb-muted);
}

[data-bs-theme=dark] .tag-empty h1,
[data-bs-theme=dark] .notice h1 {
    font-size: clamp(1.75rem, 1.5rem + 1.2vw, 2.1rem);
    margin-bottom: 0.75rem;
}

.tag-empty p,
.notice p {
    color: var(--wb-muted);
    font-size: 1.05rem;
}

.notice-detail {
    font-size: 0.875rem !important;
}

.tag-empty-host {
    margin-top: 2.25rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--wb-border);
}

.tag-empty-host p {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

/* ---- Home ---- */

.home {
    max-width: 36rem;
    margin: 0 auto;
    padding: clamp(1.5rem, 9vh, 4.5rem) 0 1rem;
    text-align: center;
}

.home-glass {
    font-size: 3.25rem;
    color: var(--wb-accent);
}

[data-bs-theme=dark] .home-title {
    margin: 1rem 0 0.75rem;
    font-size: clamp(2.75rem, 2rem + 4vw, 3.75rem);
    line-height: 1.05;
}

.home-lead {
    margin: 0 auto 2rem;
    max-width: 28rem;
    color: #e6d9cf;
    font-size: 1.15rem;
    line-height: 1.55;
}

.home-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.home-actions .btn {
    min-width: 9.5rem;
}

.home-steps {
    display: grid;
    gap: 1rem;
    max-width: 26rem;
    margin: 3.5rem auto 0;
    padding: 2rem 0 0;
    border-top: 1px solid var(--wb-border);
    counter-reset: step;
    list-style: none;
    text-align: left;
}

.home-steps li {
    position: relative;
    padding-left: 2.5rem;
    color: var(--wb-muted);
    counter-increment: step;
}

.home-steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: -0.1rem;
    width: 1.7rem;
    height: 1.7rem;
    border: 1px solid rgba(226, 183, 104, 0.5);
    border-radius: 50%;
    color: var(--wb-accent);
    font-family: var(--wb-serif);
    font-size: 0.95rem;
    line-height: 1.6rem;
    text-align: center;
}

.home-steps span {
    color: var(--wb-text);
    font-weight: 600;
}

/* ---- Wines ---- */

.wine-list {
    max-width: 40rem;
    gap: 0.6rem;
}

[data-bs-theme=dark] .wine-list > .wine-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 1rem;
    padding: 0.9rem 1.1rem;
    border: 1px solid var(--wb-border);
    border-radius: var(--bs-border-radius-lg);
}

.wine-item-name {
    grid-column: 1;
    font-family: var(--wb-serif);
    font-size: 1.2rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.wine-item-details {
    grid-column: 1;
    color: var(--wb-muted);
}

.wine-item-tags {
    grid-column: 2;
    grid-row: 1 / span 2;
    padding: 0.2rem 0.65rem;
    border: 1px solid var(--wb-border-strong);
    border-radius: 999px;
    color: var(--wb-muted);
    white-space: nowrap;
}

.empty-state {
    max-width: 40rem;
    padding: 2rem 1.5rem;
    border: 1px dashed var(--wb-border-strong);
    border-radius: var(--bs-border-radius-lg);
    color: var(--wb-muted);
    text-align: center;
}

.empty-state p:last-child {
    margin-bottom: 0;
}

.empty-state-title {
    color: var(--wb-text);
    font-family: var(--wb-serif);
    font-size: 1.35rem;
}

.form-page {
    max-width: 34rem;
}

.form-page > p {
    margin-top: 1rem;
}

.form-page hr {
    margin: 2rem 0 1.25rem;
}

.confirm-panel {
    margin: clamp(0.5rem, 5vh, 3rem) auto 0;
    padding: 1.5rem 1.25rem;
    border: 1px solid var(--bs-danger-border-subtle);
    border-radius: var(--bs-border-radius-lg);
    background: rgba(58, 18, 24, 0.55);
}

.confirm-panel p {
    color: var(--wb-muted);
}

/* ---- Account pages ---- */

.external-login-picker {
    margin-top: 2rem;
}

@media (min-width: 992px) {
    .external-login-picker {
        margin-top: 0;
    }
}

.external-logins {
    display: grid;
    gap: 0.6rem;
}

.manage-lead {
    color: var(--wb-muted);
}

.manage-nav {
    gap: 0.35rem;
}

@media (max-width: 991.98px) {
    .manage-nav {
        padding-bottom: 1rem;
        border-bottom: 1px solid var(--wb-border);
    }

    .manage-nav .nav-link {
        padding: 0.4rem 0.85rem;
        border: 1px solid var(--wb-border);
        border-radius: 999px;
        font-size: 0.9rem;
    }
}

/* ---- The template's error boundary ---- */

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }
