/* Wine Blinds: Bootstrap 5.3's dark theme in a wine palette, and the site's own pieces
   (plan 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;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin: 0.35rem 0 0;
    padding: 0;
    list-style: none;
}

/* Five links and more (Themes since plan slice 71) wrap to a second row on a phone. */
.site-links li {
    flex: 1 1 auto;
}

.site-link {
    display: block;
    padding: 0.55rem 0.7rem;
    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-link {
        padding: 0.55rem 0.9rem;
    }

    .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-footer {
    padding: 1.25rem 1rem 2rem;
    border-top: 1px solid var(--wb-border);
    text-align: center;
    font-size: 0.95rem;
}

.site-footer-link {
    color: var(--wb-muted);
    text-decoration: none;
}

.site-footer-link:hover,
.site-footer-link.active {
    color: var(--wb-accent);
}

.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;
}

.page-head-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ---- 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;
}

/* The bottle, between the ornament and the facts: no frame, no shadow, just the photo,
   short enough that the facts still show on a phone. */
.reveal-photo {
    display: block;
    flex: none;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 40vh;
    margin: -0.25rem auto 2rem;
    border-radius: var(--bs-border-radius-lg);
    object-fit: contain;
}

.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 reveal's line for a wine in a blind: "B of 3 in the blind of 17 October", quiet,
   under the notes. */
.reveal-blind {
    margin: 2rem 0 0;
    font-size: 0.95rem;
}

.reveal-blind a {
    color: var(--wb-muted);
    text-decoration: underline;
    text-decoration-color: rgba(226, 183, 104, 0.5);
    text-underline-offset: 0.25em;
}

.reveal-blind a:hover {
    color: var(--wb-text);
}

.reveal-blind-letter {
    color: var(--wb-accent);
    font-family: var(--wb-serif);
    font-size: 1.15rem;
    font-weight: 600;
}

/* ---- A blind's public page: the reveal's look, a wine after another ---- */

.blind-page {
    justify-content: flex-start;
    min-height: 0;
}

.blind-page-count {
    margin: -0.25rem 0 0;
    color: var(--wb-muted);
    font-family: var(--wb-serif);
    font-size: 1.2rem;
    font-style: italic;
}

.blind-story-introduction {
    margin-bottom: 2.5rem;
}

.blind-page-wines {
    margin: 0;
    padding: 0;
    list-style: none;
}

.blind-page-wine + .blind-page-wine {
    margin-top: 2.75rem;
    padding-top: 2.75rem;
    border-top: 1px solid var(--wb-border);
}

.blind-page-letter {
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    margin: 0 auto 0.85rem;
    border: 1px solid rgba(226, 183, 104, 0.6);
    border-radius: 50%;
    color: var(--wb-accent);
    font-family: var(--wb-serif);
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1;
}

[data-bs-theme=dark] .blind-page-wine-name {
    margin: 0 0 0.6rem;
    color: #fff8f2;
    font-family: var(--wb-serif);
    font-size: clamp(1.75rem, 1.3rem + 2.4vw, 2.5rem);
    font-weight: 600;
    line-height: 1.1;
    hyphens: auto;
}

.blind-page-wine .reveal-maker {
    margin-bottom: 1.5rem;
}

/* A photo on a page of several wines (plan slice 26): the small copy, loaded lazily, in a
   box whose size is set here, so the text under it does not jump as it arrives. A bottle
   that is not 3 by 4 sits inside the box. */
.blind-page-photo,
.reveal-photo-several {
    width: auto;
    height: min(32vh, 20rem);
    max-height: none;
    aspect-ratio: 3 / 4;
    margin: 0 auto 1.5rem;
}

.blind-page-wine .reveal-facts {
    margin-bottom: 1.5rem;
}

.blind-page-none {
    color: var(--wb-muted);
}

/* Slice 10's notes for each wine, under its own. */
.blind-story {
    max-width: 32rem;
    margin: 1.5rem auto 0;
    text-align: left;
}

.blind-story dt {
    margin-top: 1rem;
    color: var(--wb-muted);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.blind-story dd {
    margin: 0.25rem 0 0;
    line-height: 1.6;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

/* Slice 33's background for each wine, beside the story's notes and in their look. */
.blind-background {
    max-width: 32rem;
    margin: 1.5rem auto 0;
    text-align: left;
}

.blind-background dt {
    margin-top: 1rem;
    color: var(--wb-muted);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.blind-background dd {
    margin: 0.25rem 0 0;
    line-height: 1.6;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.blind-background-credit,
.blind-background-pages-title,
.blind-background-pages {
    max-width: 32rem;
    margin: 1rem auto 0;
    color: var(--wb-muted);
    font-size: 0.85rem;
    text-align: left;
}

.blind-background-pages {
    margin-top: 0.25rem;
    padding-left: 1.2rem;
    overflow-wrap: anywhere;
}

/* Under a story the model wrote: quiet, as the reveal's line for its blind is. */
.blind-story-credit {
    margin: 3rem 0 0;
    color: var(--wb-muted);
    font-size: 0.85rem;
}

/* ---- What to look for (plan slice 57): the chart of how a blind's wines differ, above the
   wines on the guests' page, as the mock-up's phone frames. Two wines: a bar from a centre
   line towards the wine with more, an eighth of the width a step. Three or more: each
   letter at its step. Borders and fills in the page's colours; no script. ---- */

.look-chart {
    width: 100%;
    max-width: 32rem;
    margin: 0 auto 2.75rem;
    padding: 0.9rem 0.8rem 0.8rem;
    border: 1px solid var(--wb-border);
    border-radius: var(--bs-border-radius-lg);
    background-color: var(--wb-surface);
    text-align: left;
}

[data-bs-theme=dark] .look-chart-title {
    margin: 0 0 0.15rem;
    color: #fff8f2;
    font-family: var(--wb-serif);
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.2;
}

.look-chart-compared {
    color: var(--wb-muted);
    font-weight: 400;
}

.look-chart-lede {
    margin: 0 0 0.8rem;
    color: var(--wb-muted);
    font-size: 0.875rem;
}

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

.look-row {
    padding: 0.4rem 0;
    border-top: 1px solid var(--wb-border);
}

.look-att {
    font-weight: 600;
    font-size: 0.9rem;
}

.look-say {
    font-size: 0.9rem;
    line-height: 1.4;
}

/* A wine's letter in a gold ring, as the wines' own letters below. */
.look-ring {
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 1.55em;
    height: 1.55em;
    border: 1px solid var(--wb-accent);
    border-radius: 50%;
    color: var(--wb-accent);
    font-family: var(--wb-serif);
    font-weight: 600;
    line-height: 1;
}

/* Two wines: the step words either side of a bar, the sentence under. */
.look-duel-head,
.look-duel .look-row {
    display: grid;
    grid-template-columns: 5.6em 2.9em minmax(0, 1fr) 2.9em;
    align-items: center;
    column-gap: 0.5rem;
}

.look-duel-head {
    margin-bottom: 0.3rem;
}

.look-duel-head .look-ring {
    justify-self: center;
}

.look-more {
    color: var(--wb-muted);
    font-size: 0.68rem;
    font-style: italic;
    text-align: center;
    white-space: nowrap;
}

.look-lv {
    color: var(--wb-muted);
    font-size: 0.8rem;
    text-align: center;
}

.look-bar {
    position: relative;
    height: 12px;
    border: 1px solid var(--wb-border-strong);
    background-color: var(--wb-ink);
}

.look-bar::after {
    content: "";
    position: absolute;
    left: 50%;
    top: -4px;
    bottom: -4px;
    border-left: 1px solid var(--wb-muted);
}

.look-bar-fill {
    position: absolute;
    top: 0;
    bottom: 0;
}

.look-bar-left {
    right: 50%;
    background-color: var(--wb-wine-bright);
}

.look-bar-right {
    left: 50%;
    background-color: var(--wb-accent);
}

.look-bar-1 { width: 12.5%; }
.look-bar-2 { width: 25%; }
.look-bar-3 { width: 37.5%; }
.look-bar-4 { width: 50%; }

.look-duel .look-say {
    grid-column: 2 / -1;
    padding-top: 0.15rem;
}

/* Three wines or more: the five steps across, each wine's letter at its step. */
.look-steps-head,
.look-steps .look-row {
    display: grid;
    grid-template-columns: 5.1em minmax(0, 1fr);
    align-items: center;
    column-gap: 0.5rem;
}

.look-words,
.look-marks {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    column-gap: 4px;
}

.look-words i {
    color: var(--wb-muted);
    font-size: 0.72rem;
    font-style: italic;
    text-align: center;
}

.look-marks {
    position: relative;
    min-height: 1.75rem;
}

.look-marks::before {
    content: "";
    position: absolute;
    left: 10%;
    right: 10%;
    top: 50%;
    border-top: 1px solid var(--wb-border-strong);
}

.look-step {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-content: center;
    gap: 1px;
    padding: 2px 0;
}

.look-step::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 25%;
    bottom: 25%;
    border-left: 1px solid var(--wb-border-strong);
}

/* Small enough that two letters on one step leave a gap before the next step's, so a pair
   on Mod and a pair on Mod+ do not read as one run of four at phone width. */
.look-step .look-ring {
    position: relative;
    width: 1.45em;
    height: 1.45em;
    background-color: var(--wb-surface);
    font-size: 0.78rem;
}

.look-step .look-all {
    width: auto;
    padding: 0 0.5em;
    border-radius: 1em;
    font-family: var(--wb-sans);
    font-style: italic;
    font-weight: 400;
}

.look-steps .look-say {
    grid-column: 2;
    padding-top: 0.15rem;
}

.look-chart-ends,
.look-chart-fine {
    margin: 0.6rem 0 0;
    color: var(--wb-muted);
    font-size: 0.75rem;
    font-style: italic;
}

.look-chart-fine {
    margin-top: 0.3rem;
}

/* ---- The host's page for a wine (plan slice 23): the reveal's look, then the host's
   own lines under it ---- */

.wine-page {
    max-width: 40rem;
    margin: 0 auto;
}

.wine-page > .alert {
    max-width: 34rem;
    margin: 0 auto 1rem;
}

.wine-page-wine {
    justify-content: flex-start;
    min-height: 0;
}

.wine-page-host {
    max-width: 34rem;
    margin: 1.5rem auto 0;
    padding-top: 1.25rem;
    border-top: 1px solid var(--wb-border);
    text-align: center;
}

.wine-page-host > p {
    margin: 0 0 1rem;
}

.wine-page-tags {
    color: var(--wb-muted);
}

.wine-page-blinds {
    margin: 0 0 1rem;
    padding: 0;
    list-style: none;
}

.wine-page-blind + .wine-page-blind {
    margin-top: 0.4rem;
}

.wine-page-blind-count {
    margin-left: 0.4rem;
    color: var(--wb-muted);
}

/* Send this wine (slice 24), and Send this occasion (slice 26): Text it and Email it,
   then the link and its code, as a blind's form has them. */
.wine-send,
.occasion-send {
    max-width: 34rem;
    margin: 1.5rem auto 0;
    padding-top: 1.25rem;
    border-top: 1px solid var(--wb-border);
}

.wine-send-actions,
.occasion-send-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0 1.25rem;
}

/* Share (slice 29), on a row of its own above Text it and Email it once share.js shows
   it; hidden, Bootstrap's [hidden] rule keeps it out of the row. */
.send-share {
    flex-basis: 100%;
}

.wine-page-occasions {
    margin: 0 0 1rem;
    padding: 0;
    list-style: none;
}

.wine-page-occasion + .wine-page-occasion {
    margin-top: 0.4rem;
}

.wine-page-occasion-place {
    margin-left: 0.4rem;
    color: var(--wb-muted);
}

/* ---- Occasions (plan slice 26): the host's page, and the link's ---- */

.occasion-page {
    max-width: 40rem;
}

.occasion-day {
    margin-bottom: 0.35rem;
}

.occasion-place {
    margin: 0 0 0.25rem;
    font-size: 1.1rem;
    overflow-wrap: anywhere;
}

.occasion-count {
    margin: 0 0 1.25rem;
    color: var(--wb-muted);
    font-family: var(--wb-serif);
    font-style: italic;
}

.occasion-wines {
    display: grid;
    gap: 0.6rem;
    margin: 0 0 1.25rem;
    padding: 0;
    list-style: none;
}

.occasion-wine {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.6rem 0.9rem;
    border: 1px solid var(--wb-border);
    border-radius: var(--bs-border-radius-lg);
}

/* The small copy as a thumbnail, its box set here before it loads. */
.occasion-wine-photo {
    flex: none;
    width: 3rem;
    height: 4rem;
    border-radius: var(--bs-border-radius);
    object-fit: cover;
}

.occasion-wine-nophoto {
    border: 1px dashed var(--wb-border-strong);
}

.occasion-wine-text {
    display: grid;
    min-width: 0;
}

.occasion-wine-name {
    font-family: var(--wb-serif);
    font-size: 1.15rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.occasion-wine-details {
    color: var(--wb-muted);
}

.occasion-none {
    color: var(--wb-muted);
}

.occasion-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
}

.occasion-page .occasion-send {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}

.occasion-item-wines {
    overflow-wrap: anywhere;
}

.occasion-link-head {
    padding: 1.5rem 0.25rem 0.5rem;
    text-align: center;
}

.occasion-link-wines {
    margin: 0;
    padding: 0;
    list-style: none;
}

.occasion-link-wine + .occasion-link-wine {
    border-top: 1px solid var(--wb-border);
}

.occasion-link-card {
    justify-content: flex-start;
    min-height: 0;
}

/* ---- The people on an occasion (plan slice 27) ---- */

.occasion-link-place {
    margin: 0.25rem 0 0.5rem;
    color: var(--wb-text);
    font-size: 1.05rem;
    overflow-wrap: anywhere;
}

.occasion-people {
    margin: 0 0 1.5rem;
}

.occasion-page .occasion-people {
    margin-top: 1.75rem;
}

.occasion-link-people {
    max-width: 34rem;
    margin: 0 auto 1.5rem;
    text-align: center;
}

.occasion-people-heading {
    margin: 0 0 0.5rem;
    color: var(--wb-muted);
    font-family: var(--wb-sans);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.occasion-people-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.6rem;
    margin: 0 0 0.5rem;
    padding: 0;
    list-style: none;
}

.occasion-link-people .occasion-people-list {
    justify-content: center;
}

.occasion-person {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.75rem;
    border: 1px solid var(--wb-border);
    border-radius: 999px;
    overflow-wrap: anywhere;
}

.occasion-person-note,
.occasion-people-none {
    color: var(--wb-muted);
}

.occasion-person-remove {
    padding: 0.1rem 0.5rem;
}

.occasion-link-open {
    margin: 1rem 0 0;
}

.occasion-claim {
    max-width: 24rem;
    margin: 2.5rem auto 0;
    text-align: center;
}

.occasion-claim-line {
    color: var(--wb-muted);
}

.occasion-claim-heading {
    font-family: var(--wb-serif);
    font-size: 1.4rem;
}

.occasion-claim-hint {
    color: var(--wb-muted);
    font-size: 0.9rem;
}

.occasion-name-step {
    text-align: left;
}

.occasion-claim-refused {
    color: var(--wb-muted);
}

.occasion-leave {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.25rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--wb-border);
    color: var(--wb-muted);
    font-size: 0.85rem;
}

[data-bs-theme=dark] .occasion-leave .btn-link {
    --bs-btn-color: var(--wb-muted);
    --bs-btn-hover-color: var(--wb-text);
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.wines-from-occasions {
    margin-top: 2rem;
}

.wines-from-occasions-heading {
    font-size: 1.35rem;
}

/* Whose it is and the day, on its own line under the details. */
.wine-item-from-whose,
.occasion-item-host {
    grid-column: 1;
    color: var(--wb-muted);
}

/* ---- A friend's bottle (plan slice 28) ---- */

.wine-page-occasion-host {
    margin-left: 0.4rem;
    color: var(--wb-muted);
}

/* Whose wine it is, on the host's page and, for the people on it, on the link. */
.occasion-wine-whose,
.occasion-link-whose {
    color: var(--wb-muted);
}

.occasion-link-whose {
    margin: 1rem 0 0;
    font-size: 0.9rem;
}

.occasion-link-whose + .occasion-link-open {
    margin-top: 0.25rem;
}

/* Take it off: a quiet link-like button, as Leave is. */
.occasion-wine-off {
    justify-self: start;
    padding: 0;
}

[data-bs-theme=dark] .occasion-wine-off {
    --bs-btn-color: var(--wb-muted);
    --bs-btn-hover-color: var(--wb-text);
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.occasion-link-open .occasion-wine-off {
    margin-left: 0.75rem;
    vertical-align: baseline;
}

.occasion-add-mine {
    max-width: 34rem;
    margin: 2rem auto 0;
}

.occasion-add-mine .occasion-wine-list {
    margin-bottom: 1rem;
}

.wine-page-back {
    max-width: 34rem;
    margin: 1.5rem auto 0;
    text-align: center;
}

/* 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;
}

/* The newest blind's letter on a choice (plan slice 13), as the public page letters it. */
.attach-choice-letter {
    margin-right: 0.45rem;
    color: var(--wb-accent);
}

/* Between the newest blind's wines and the rest of the host's. */
.attach-divider {
    margin: 0.75rem 0 0;
    color: var(--wb-muted);
    font-family: var(--wb-sans);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.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;
}

/* ---- The front door (plan slice 40): the home page signed out, Learn and Host ---- */

.front {
    max-width: 40rem;
    margin: 0 auto;
}

.front-hero {
    max-width: none;
}

.front-head {
    padding: clamp(1rem, 5vh, 2.5rem) 0 0.5rem;
    text-align: center;
}

.front-head .home-lead {
    margin-top: 1rem;
    margin-bottom: 0;
}

/* The two ways in, side by side even on a phone: each a card that is one link. */
.front-ways {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 0.5rem;
    text-align: left;
}

.front-way {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 1rem 1.1rem 1.1rem;
    border: 1px solid var(--wb-border-strong);
    border-radius: 0.6rem;
    background: var(--wb-surface);
    color: var(--wb-muted);
    text-decoration: none;
}

.front-way:hover,
.front-way:focus-visible {
    border-color: var(--wb-accent);
    background: var(--wb-surface-2);
    color: var(--wb-text);
}

.front-way-title {
    color: var(--wb-accent);
    font-family: var(--wb-serif);
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.2;
}

.front-way-text {
    font-size: 0.95rem;
    line-height: 1.45;
}

.front-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--wb-border);
}

.front-section p {
    line-height: 1.6;
}

[data-bs-theme=dark] .front-section h2 {
    margin-bottom: 1rem;
    color: var(--wb-text);
    font-family: var(--wb-serif);
    font-size: 1.6rem;
    line-height: 1.2;
    text-wrap: balance;
}

/* The numbered steps as on the signed-in home page, at the column's width. */
.front-steps {
    max-width: none;
    margin: 0;
    padding: 0;
    border-top: 0;
}

.front-steps li {
    line-height: 1.55;
}

.front-terms {
    display: grid;
    gap: 0.6rem;
    margin: 0;
}

.front-terms dt {
    display: inline;
    color: var(--wb-text);
}

.front-terms dt::after {
    content: ": ";
}

.front-terms dd {
    display: inline;
    margin: 0;
    color: var(--wb-muted);
}

/* The sheet as a picture: paper on the table, white whatever the theme. */
.front-sheet {
    margin: 1.5rem 0;
}

.front-sheet img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 0.3rem;
    background: #fff;
    box-shadow: 0 0.6rem 2rem rgba(0, 0, 0, 0.55);
}

/* Wider than the column on a wide screen, so the sheet's boxes can be made out. */
@media (min-width: 992px) {
    .front-sheet {
        width: 54rem;
        margin-left: calc(50% - 27rem);
    }
}

.front-note {
    color: var(--wb-muted);
    font-size: 0.95rem;
}

.front-theme-list {
    display: grid;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.front-theme {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 1rem 1.1rem;
    border: 1px solid var(--wb-border);
    border-radius: 0.6rem;
    background: var(--wb-surface);
}

.front-theme-title {
    font-family: var(--wb-serif);
    font-size: 1.2rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.front-theme-premise {
    color: var(--wb-muted);
}

.front-join {
    text-align: center;
}

.front-join p {
    margin-bottom: 1.25rem;
    font-size: 1.1rem;
}

.front-more {
    margin: 1.25rem 0 0;
}

/* ---- The guide (plan slice 41): a note of wineblinds-docs/Guide/ as a page, in the front
   door's column, for reading on a phone ---- */

.guide-crumb {
    padding-top: 0.5rem;
    font-size: 0.95rem;
}

.guide-crumb a,
.guide-back a {
    color: var(--wb-muted);
    text-decoration: none;
}

.guide-crumb a::before,
.guide-back a::before {
    content: "\2190\00a0";
}

.guide-crumb a:hover,
.guide-back a:hover {
    color: var(--wb-accent);
}

.guide-note {
    padding-top: clamp(0.75rem, 3vh, 1.75rem);
    font-size: 1.05rem;
    line-height: 1.65;
    overflow-wrap: break-word;
}

[data-bs-theme=dark] .guide-note h1 {
    margin-bottom: 1.5rem;
}

[data-bs-theme=dark] .guide-note h2 {
    margin: 2.5rem 0 0.9rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--wb-border);
    color: var(--wb-text);
    font-family: var(--wb-serif);
    font-size: 1.55rem;
    line-height: 1.2;
    text-wrap: balance;
}

[data-bs-theme=dark] .guide-note h3 {
    margin: 2rem 0 0.75rem;
    color: var(--wb-text);
    font-size: 1.25rem;
    line-height: 1.25;
}

.guide-note p,
.guide-note ul,
.guide-note ol {
    margin-bottom: 1.1rem;
}

.guide-note ul,
.guide-note ol {
    padding-left: 1.4rem;
}

.guide-note li {
    margin-bottom: 0.5rem;
}

.guide-note li::marker {
    color: var(--wb-accent);
}

.guide-note strong {
    color: #fff;
    font-weight: 600;
}

.guide-note em {
    color: var(--wb-text);
}

.guide-note code {
    padding: 0.1rem 0.35rem;
    border-radius: 0.25rem;
    background: var(--wb-surface-2);
    color: var(--wb-accent-bright);
    font-size: 0.88em;
    overflow-wrap: anywhere;
}

.guide-note a {
    text-underline-offset: 0.18em;
}

.guide-note table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    margin-bottom: 1.1rem;
    border-collapse: collapse;
}

.guide-note th,
.guide-note td {
    padding: 0.4rem 0.7rem;
    border: 1px solid var(--wb-border);
    vertical-align: top;
}

.guide-note blockquote {
    margin: 0 0 1.1rem;
    padding: 0.25rem 0 0.25rem 1rem;
    border-left: 3px solid var(--wb-wine);
    color: var(--wb-muted);
}

.guide-back {
    margin: 2rem 0 0;
}

/* ---- 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;
}

/* The wine form's photo: a reminder of what is stored, not the reveal's. */
.wine-photo {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.wine-photo-img {
    display: block;
    max-width: 100%;
    height: auto;
    max-height: 12rem;
    border-radius: var(--bs-border-radius);
}

/* Read the label (plan slice 8): a filled field the label did not say, and the line
   the read comes back with. */
.label-inferred {
    font-style: italic;
}

.read-label-message {
    color: var(--bs-emphasis-color);
}

/* The waiting panel (plan slice 70, Components/WaitingPanel.razor): in place of the form while
   the model works, in the prepare page's look. Bootstrap's spinner, large, in the accent
   colour; the prepare page's bar, filling over the call's usual time (--waiting-seconds); the
   stages lit in turn, each at its --waiting-at. --waiting-since, set by wwwroot/waiting.js on
   the server's panel, is minus the seconds since the tap, so the bar and the stages carry on
   from the panel the script showed instead of starting again. All of it CSS. */
.waiting {
    max-width: 34rem;
    margin: 0.5rem 0 1.5rem;
    padding: 1.5rem 1.25rem 1.25rem;
    border: 1px solid var(--wb-border-strong);
    border-radius: var(--bs-border-radius-lg);
    background-color: var(--wb-surface);
    scroll-margin-top: 1rem;
}

.waiting-spinner {
    display: block;
    width: 3rem;
    height: 3rem;
    margin-bottom: 1rem;
    border-width: 0.3em;
    color: var(--wb-accent);
}

.waiting-say {
    margin-bottom: 0.9rem;
    color: var(--wb-text);
    font-family: var(--wb-serif);
    font-size: 1.3rem;
    line-height: 1.3;
}

.waiting-bar {
    height: 0.7rem;
    margin-bottom: 0.9rem;
    overflow: hidden;
    border: 1px solid var(--wb-border-strong);
    border-radius: 999px;
    background-color: var(--wb-ink);
}

.waiting-bar i {
    display: block;
    width: 3%;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--wb-wine-bright), var(--wb-accent));
    animation: waiting-fill var(--waiting-seconds) cubic-bezier(0.3, 0.6, 0.5, 1) var(--waiting-since, 0s) forwards;
}

/* Short of the end: a call that runs long still has a bar that is not done. */
@keyframes waiting-fill {
    from {
        width: 3%;
    }

    to {
        width: 94%;
    }
}

.waiting-usually {
    margin-bottom: 0.25rem;
    color: var(--wb-muted);
    font-size: 0.85rem;
}

.waiting-stages {
    margin: 0 0 1rem;
    padding: 0;
    list-style: none;
}

.waiting-stages li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.2rem 0;
    color: var(--wb-muted);
    animation: waiting-lit 0.6s ease calc(var(--waiting-at) + var(--waiting-since, 0s)) forwards;
}

.waiting-stages li::before {
    flex: none;
    width: 0.7rem;
    height: 0.7rem;
    border: 1px solid var(--wb-border-strong);
    border-radius: 50%;
    content: "";
    animation: waiting-lit-mark 0.6s ease calc(var(--waiting-at) + var(--waiting-since, 0s)) forwards;
}

@keyframes waiting-lit {
    to {
        color: var(--wb-text);
    }
}

@keyframes waiting-lit-mark {
    to {
        border-color: var(--wb-accent);
        background-color: var(--wb-accent);
    }
}

.waiting-time {
    margin: 0;
    color: var(--wb-muted);
    font-size: 0.93rem;
}

/* With less motion asked for, the stages light at once rather than fading in; the bar still
   fills, slowly, since it says how long is left. Bootstrap slows its own spinner. */
@media (prefers-reduced-motion: reduce) {
    .waiting-stages li,
    .waiting-stages li::before {
        animation-duration: 0.01s;
    }
}

.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);
}

/* ---- Blinds: the host's list and form ---- */

/* A row of the list holds two links, the blind's form and its public page. */
.blind-item-name {
    color: var(--wb-text);
    text-decoration: none;
}

.blind-item-name:hover {
    color: var(--wb-accent-bright);
}

.blind-item-link {
    color: var(--wb-muted);
    overflow-wrap: anywhere;
}

/* The wine count under the blind's date on its form (plan slice 12). */
.blind-head-count {
    margin: -0.25rem 0 1rem;
    color: var(--wb-muted);
}

/* Set up the glasses, at the top of the blind's page (plan slice 13). */
.blind-setup {
    max-width: 34rem;
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    border: 1px solid var(--wb-border-strong);
    border-radius: var(--bs-border-radius-lg);
    background-color: var(--wb-surface);
}

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

.blind-setup-wines {
    margin: 0 0 1rem;
    padding: 0;
    list-style: none;
}

.blind-setup-wine {
    padding: 0.3rem 0;
    font-family: var(--wb-serif);
    font-size: 1.15rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.blind-setup-letter {
    display: inline-block;
    min-width: 1.5rem;
    color: var(--wb-accent);
}

.blind-setup-name {
    color: var(--wb-text);
}

/* The five steps at the top of a blind's page (plan slice 49): a mark (a tick when done,
   its number when not), the name as a link, the state beside it, and its line under. */
.blind-steps {
    max-width: 34rem;
    margin-bottom: 1.5rem;
}

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

.blind-step {
    display: flex;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--wb-border);
}

.blind-step:last-child {
    border-bottom: 0;
}

.blind-step-mark {
    flex: none;
    width: 1.75rem;
    height: 1.75rem;
    border: 1px solid var(--wb-border-strong);
    border-radius: 50%;
    text-align: center;
    line-height: 1.6rem;
    color: var(--wb-muted);
}

.blind-step-done .blind-step-mark,
.blind-step-ready .blind-step-mark {
    border-color: var(--wb-accent);
    color: var(--wb-accent);
}

.blind-step-next .blind-step-mark {
    border-color: var(--wb-wine-bright);
    background-color: var(--wb-wine);
    color: var(--wb-text);
}

.blind-step-body {
    min-width: 0;
}

.blind-step-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 0.6rem;
}

.blind-step-name {
    font-family: var(--wb-serif);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--wb-text);
}

.blind-step-state {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--wb-muted);
}

.blind-step-next .blind-step-state,
.blind-step-done .blind-step-state,
.blind-step-ready .blind-step-state {
    color: var(--wb-accent);
}

.blind-step-line {
    margin: 0.15rem 0 0;
    color: var(--wb-muted);
    overflow-wrap: anywhere;
}

.blind-step-struck .blind-step-name {
    color: var(--wb-muted);
}

/* The next step's one primary button, under its line (plan slice 50). */
.blind-step-go {
    margin-top: 0.6rem;
}

/* Under the steps: the guests' page, the long form, Delete and Back to blinds. */
.blind-steps-links {
    margin-bottom: 0.5rem;
    color: var(--wb-muted);
}

/* A step's screen is headed by its blind, a link back to the steps, and its step. */
.blind-crumb {
    margin-bottom: 0.25rem;
}

.blind-eyebrow {
    margin-bottom: 0.25rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--wb-muted);
}

.blind-screen-back {
    margin-top: 1rem;
}

/* Step 3's parts under its line on the steps (plan slice 51): each a link with where it
   stands, by letter. */
.blind-step-gate {
    margin: 0.4rem 0 0;
}

.blind-step-parts {
    margin: 0.4rem 0 0;
    padding-left: 1.25rem;
}

.blind-step-part {
    margin-top: 0.15rem;
}

.blind-step-part-name {
    color: var(--wb-text);
}

.blind-step-part-where {
    margin-left: 0.4rem;
    color: var(--wb-muted);
}

/* On the background's screen, the wines not open: a row each that opens its own boxes. */
.blind-background-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 0.5rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--wb-border);
    color: var(--wb-text);
    text-decoration: none;
}

.blind-background-row-name {
    font-family: var(--wb-serif);
    font-size: 1.1rem;
    font-weight: 600;
}

.blind-background-row-state {
    margin-left: auto;
    color: var(--wb-accent);
    text-decoration: underline;
}

.blind-background-row-to-do .blind-background-row-state {
    color: var(--wb-muted);
}

/* Where a part's Save and go on leads, under it, and Go on without it. */
.blind-screen-next {
    margin-top: 0.4rem;
    text-align: center;
}

.blind-screen-pass {
    margin-bottom: 0;
}

/* Check it over (plan slice 52): a read-through, each wine, the story and the sheet under a
   head with its quiet Change, the lines as the guests' page sets them, and one button. */
.blind-review-saved {
    max-width: 34rem;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-left: 3px solid var(--wb-accent);
    background-color: var(--wb-surface);
}

.blind-review-missing {
    max-width: 34rem;
    padding-left: 1.25rem;
    color: var(--wb-muted);
}

.blind-review-part {
    max-width: 34rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--wb-border);
}

.blind-review-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
}

.blind-review-head h2 {
    margin: 0;
    font-family: var(--wb-serif);
    font-size: 1.3rem;
    overflow-wrap: anywhere;
}

.blind-review-change {
    flex: none;
    font-size: 0.9rem;
    color: var(--wb-muted);
}

.blind-review-lines {
    margin: 0.75rem 0 0;
}

.blind-review-lines dt {
    margin-top: 0.6rem;
    font-weight: 600;
}

.blind-review-lines dd {
    margin: 0.2rem 0 0;
    line-height: 1.6;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.blind-review-empty {
    margin: 0.5rem 0 0;
    color: var(--wb-muted);
}

.blind-review-pages-title,
.blind-review-pages {
    margin-left: 0;
}

/* The sheet as a small picture: a pale page with its title and its wines. */
.blind-review-sheet-picture {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin: 0.75rem 0 0.5rem;
    padding: 0.75rem 0.9rem;
    border-radius: 0.25rem;
    background-color: #f6f1e7;
    color: #2b2320;
    font-size: 0.8rem;
}

.blind-review-sheet-picture b {
    font-family: var(--wb-serif);
    font-size: 0.95rem;
}

.blind-review-sheet-picture i {
    margin-right: 0.4rem;
    font-weight: 600;
}

.blind-review-sheet-parts {
    margin: 0.5rem 0 0;
    padding-left: 1.25rem;
}

.blind-review-sheet-prints {
    margin-left: 0.4rem;
    color: var(--wb-muted);
}

.blind-review-go {
    max-width: 34rem;
    margin-top: 2rem;
}

.blind-review-not-now {
    margin-top: 0.9rem;
    text-align: center;
}

/* How many glasses a wine has (plan slice 47), under its name, in line with it. */
.blind-setup-count {
    display: block;
    margin-left: 1.5rem;
    color: var(--wb-muted);
    font-family: var(--bs-body-font-family);
    font-size: 0.95rem;
    font-weight: 400;
}

.blind-setup-count-none {
    font-style: italic;
}

.blind-new-wines {
    margin-top: 0.75rem;
}

.blind-new-wine {
    padding: 0.5rem 0.9rem;
}

.blind-wine-list {
    gap: 0;
}

.blind-wine {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) 4.5rem;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.9rem;
}

.blind-wine-tick {
    width: 1.35rem;
    height: 1.35rem;
    margin: 0;
}

.blind-wine-label {
    display: flex;
    flex-direction: column;
    min-width: 0;
    cursor: pointer;
}

.blind-wine-name {
    font-family: var(--wb-serif);
    font-size: 1.1rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.blind-wine-details {
    color: var(--wb-muted);
}

.blind-wine-position {
    text-align: center;
}

.blind-share-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.5rem;
    margin-top: 1rem;
}

/* The code is black modules on white, with the four-module quiet zone around it
   (Tags/QrCodeSvg.cs), big enough to scan from across a table. */
.blind-qr {
    width: 12rem;
    max-width: 100%;
    padding: 1.1rem;
    border-radius: var(--bs-border-radius);
    background: #fff;
}

.blind-qr svg {
    display: block;
    width: 100%;
    height: auto;
}

/* The blind's story on the host's form (slice 10): a box pair per wine, under its
   letter and name. */
.blind-story-wine {
    margin-top: 1.5rem;
}

.blind-story-wine-name {
    margin-bottom: 0.6rem;
    font-family: var(--wb-serif);
    font-size: 1.15rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

/* The wines' background on the host's form (slice 33): six boxes per wine, under its
   letter and name, as the story's are. */
.blind-background-wine {
    margin-top: 1.5rem;
}

.blind-background-wine-name {
    margin-bottom: 0.6rem;
    font-family: var(--wb-serif);
    font-size: 1.15rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.blind-background-wine .check-pages {
    margin-bottom: 0.75rem;
}

.blind-look-up {
    margin-top: 0.25rem;
}

/* A wine just looked up, unsaved, with a Save of its own (slice 39). */
.blind-background-unsaved {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
}

.blind-story-letter {
    margin-right: 0.35rem;
    color: var(--wb-accent);
}

.story-confirm p {
    margin-bottom: 0.75rem;
}

.story-confirm-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ---- A blind from a theme (plan slice 31) ---- */

/* The date under a themed blind's title, on its page and the guests' page. */
.blind-head-date {
    margin: -0.25rem 0 0.25rem;
    font-family: var(--wb-serif);
    font-size: 1.15rem;
}

.blind-page-date {
    margin: -0.25rem 0 0.5rem;
    color: var(--wb-text);
    font-family: var(--wb-serif);
    font-size: 1.3rem;
}

/* The brief, full width, to hold up to a specialist in the shop, then the sides with the
   wines on each. */
.blind-theme {
    margin-bottom: 1.5rem;
}

.blind-theme-brief {
    max-width: none;
    padding: 1rem 1.25rem;
    border: 1px solid var(--wb-border-strong);
    border-radius: var(--bs-border-radius-lg);
    background-color: var(--wb-surface);
    font-size: 1.1rem;
    line-height: 1.6;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.blind-sides-title {
    margin-top: 1.5rem;
}

.blind-sides {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 1rem;
}

.blind-side {
    padding: 0.85rem 1.1rem;
    border: 1px solid var(--wb-border);
    border-radius: var(--bs-border-radius-lg);
}

.blind-side-name {
    margin-bottom: 0.5rem;
    color: var(--wb-accent);
    font-family: var(--wb-serif);
    font-size: 1.2rem;
    font-weight: 600;
}

.blind-side-wines {
    margin-bottom: 0.5rem;
}

.blind-side-none,
.blind-side-fits {
    margin-bottom: 0.25rem;
    color: var(--wb-muted);
}

/* A wine's side on the form: under its name, the width of the row. */
.blind-wine-themed .blind-wine-side {
    grid-column: 2 / -1;
}

.blind-new-wine-themed .blind-wine-side {
    margin-top: 0.5rem;
}

.blind-theme-side {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--wb-border);
}

/* Make a blind: the ready themes by title and premise, above the form for wines. */
.blind-from-theme {
    max-width: 34rem;
    margin-bottom: 2rem;
}

.blind-theme-choice {
    padding: 1rem 1.1rem;
}

.blind-theme-choice-title {
    margin-bottom: 0.4rem;
    font-family: var(--wb-serif);
    font-size: 1.2rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.blind-theme-choice-premise {
    color: var(--wb-muted);
}

/* A ready theme not public yet, which an admin alone is shown (plan slice 45): a quiet
   line under its premise. */
.blind-theme-not-public {
    margin-top: -0.5rem;
    font-style: italic;
}

.blind-from-wines-title {
    margin-bottom: 1rem;
}

/* Make a blind: the ready themes narrowed to All, Red or White and shown under their
   steps (plan slice 37). */
.blind-theme-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.blind-theme-step + .blind-theme-step {
    margin-top: 1.25rem;
}

.blind-theme-step-title {
    margin-bottom: 0.5rem;
    color: var(--wb-muted);
}

/* Make a blind: the host's own themes beside the ready ones (plan slice 36). */
.blind-own-themes-title {
    margin: 1.25rem 0 0.5rem;
    color: var(--wb-muted);
}

/* The list's headings sit under the page's h2 (plan slice 71): smaller than a page's h3. */
.blind-theme-lists h3 {
    font-size: 1.15rem;
}

/* The ready themes' heading over their filter (plan slice 71). */
.blind-ready-themes-title {
    margin: 1.5rem 0 0.5rem;
    color: var(--wb-muted);
}

/* Each theme's mark and the button that follows it (plan slice 71, Themes/ThemeProgress.cs):
   Tasted in the accent, In the making a link to its blind. */
.theme-count {
    margin-bottom: 1rem;
    color: var(--wb-accent);
    font-family: var(--wb-serif);
    font-size: 1.1rem;
}

.theme-mark {
    margin: -0.25rem 0 0.5rem;
    font-size: 0.9rem;
}

.theme-mark-tasted {
    color: var(--wb-accent);
}

.theme-mark-tasted::before {
    content: "\2713\00a0";
}

.theme-choice-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.75rem;
}

.theme-make-another,
.theme-change {
    padding-left: 0;
    padding-right: 0;
    color: var(--wb-muted);
}

.theme-make-another:hover,
.theme-change:hover {
    color: var(--wb-accent-bright);
}

/* Make a blind's first screen: three of the host's own themes, each on a line with its
   button. */
.theme-list-compact .blind-theme-choice {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: 1fr;
    align-items: center;
    gap: 0 0.75rem;
    padding: 0.6rem 0.85rem;
}

.theme-list-compact .blind-theme-choice-title {
    grid-column: 1;
    margin: 0;
    font-size: 1.05rem;
}

.theme-list-compact .theme-mark {
    grid-column: 1;
    margin: 0.15rem 0 0;
    font-size: 0.85rem;
}

.theme-list-compact .theme-choice-actions {
    grid-column: 2;
    grid-row: 1 / span 3;
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
}

.theme-list-compact .btn {
    padding: 0.3rem 0.65rem;
    font-size: 0.9rem;
}

.theme-list-compact .theme-make-another {
    padding: 0;
    font-size: 0.85rem;
}

.theme-list-all {
    margin: 0.4rem 0 0.75rem;
}

/* Make a blind asks one question (plan slice 71): three choices, each a heading, a line and
   a way in, that read on one phone screen. */
.make-choices {
    display: grid;
    gap: 1rem;
    max-width: 34rem;
}

.make-choice {
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--wb-border);
}

.make-choice:last-child {
    border-bottom: 0;
}

.make-choice-title {
    margin-bottom: 0.25rem;
}

.make-choice-line {
    margin-bottom: 0.6rem;
    color: var(--wb-muted);
}

.make-describe {
    display: flex;
    gap: 0.5rem;
}

.make-describe .form-control {
    flex: 1;
    min-width: 0;
}

/* Make my blind's failure (plan slice 72): in the waiting panel's place, why, then Try again
   and Type a theme yourself. */
.make-describe-failed {
    max-width: 34rem;
    padding: 1rem 1.25rem;
    border: 1px solid var(--wb-border-strong);
    border-radius: var(--bs-border-radius-lg);
    background-color: var(--wb-surface);
    scroll-margin-top: 1rem;
}

.make-describe-why {
    margin-bottom: 0.75rem;
    color: var(--wb-text);
    font-size: 1.1rem;
}

.make-describe-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.blind-theme-others {
    margin-top: -0.25rem;
}

/* ---- A host's own theme (plan slice 36) ---- */

.theme-form .theme-write {
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--wb-border);
}

/* Save and make a blind beside Save (plan slice 72): the primary one takes the room. */
.theme-save {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.theme-save .btn-primary {
    flex: 1 1 auto;
}

/* The theme to read, from Make a blind with no script (plan slice 72), with the boxes behind
   Change the theme. */
.theme-read {
    margin: 1rem 0 1.25rem;
}

.theme-read-title {
    margin-bottom: 0.2rem;
}

.theme-read-colour {
    margin-bottom: 0.75rem;
    color: var(--wb-muted);
}

.theme-read-question {
    font-family: var(--wb-serif);
    font-size: 1.2rem;
}

.theme-read-sides {
    display: grid;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.theme-read-side {
    padding: 0.6rem 0.9rem;
    border: 1px solid var(--wb-border);
    border-radius: var(--bs-border-radius-lg);
}

.theme-read-side-name {
    margin-bottom: 0.2rem;
}

.theme-read-side-fits {
    margin: 0;
}

.theme-read-heading {
    margin-top: 1rem;
}

.theme-read-notice {
    white-space: pre-line;
}

.theme-change-fold {
    margin-top: 1rem;
}

.theme-change-fold > summary {
    margin-bottom: 0.75rem;
    color: var(--wb-accent);
    cursor: pointer;
}

.theme-side-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
}

.theme-pages {
    margin-top: 1rem;
}

/* ---- Users (the admin's page) ---- */

[data-bs-theme=dark] .users-table {
    --bs-table-bg: transparent;
    --bs-table-border-color: var(--wb-border);
    max-width: 56rem;
    vertical-align: middle;
}

.users-table thead th {
    color: var(--wb-muted);
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.users-email {
    font-weight: 600;
    overflow-wrap: anywhere;
}

.users-subscriber {
    white-space: nowrap;
}

.users-since {
    margin-right: 0.5rem;
    color: var(--wb-muted);
    font-size: 0.875rem;
}

.users-admin {
    padding: 0.2rem 0.65rem;
    border: 1px solid var(--wb-accent);
    border-radius: 999px;
    color: var(--wb-accent);
    font-size: 0.875rem;
}

.users-models-title {
    margin-top: 2rem;
    font-size: 1.25rem;
}

.users-models {
    max-width: 40rem;
}

/* On a phone each account is a card, its cells labelled from data-label. */
@media (max-width: 575.98px) {
    .users-table thead {
        display: none;
    }

    .users-table tbody,
    .users-table tr,
    .users-table th,
    .users-table td {
        display: block;
    }

    [data-bs-theme=dark] .users-table tr {
        margin-bottom: 0.6rem;
        padding: 0.75rem 1rem;
        border: 1px solid var(--wb-border);
        border-radius: var(--bs-border-radius-lg);
    }

    .users-table > :not(caption) > * > * {
        padding: 0.15rem 0;
        border-bottom-width: 0;
    }

    .users-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
    }

    .users-table td::before {
        content: attr(data-label);
        color: var(--wb-muted);
    }

    .users-table td.users-subscriber {
        margin-top: 0.35rem;
    }

    .users-subscriber .users-since {
        margin-left: auto;
    }
}

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

/* The sign-in card (plan slice 85), on Login and Register: one panel on the page's glow,
   24rem at most and in the middle at any width. */
.sign-in-card {
    max-width: 24rem;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 1.25rem;
    border: 1px solid var(--wb-border-strong);
    border-radius: 0.9rem;
    /* The surface, a little see-through, so the glow shows in it. */
    background: rgba(30, 17, 22, 0.85);
}

.sign-in-glass {
    display: block;
    font-size: 2rem;
    margin: 0 auto 0.6rem;
    color: var(--wb-accent);
}

[data-bs-theme=dark] .sign-in-card h1 {
    margin-bottom: 0.25rem;
    font-size: 1.95rem;
    text-align: center;
}

.sign-in-lead {
    margin: 0 0 1.5rem;
    color: var(--wb-muted);
    text-align: center;
}

/* The one-tap ways: a tile each, sharing the row evenly; a tile is the mark over a word. */
.sign-in-ways {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 0.6rem;
}

/* The passkey's script element sits beside its tile and has nothing to show; out of the
   grid, or it would take a column. */
.sign-in-ways > passkey-submit {
    display: none;
}

.sign-in-way {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-width: 0;
    padding: 0.8rem 0.25rem 0.65rem;
    border: 1px solid var(--wb-border-strong);
    border-radius: 0.6rem;
    background: transparent;
    color: var(--wb-text);
    font-size: 0.9rem;
    font-weight: 500;
    overflow-wrap: anywhere;
}

.sign-in-way:hover {
    border-color: var(--wb-muted);
    background: rgba(244, 236, 228, 0.08);
    color: #fff;
}

.sign-in-way:active {
    background: rgba(244, 236, 228, 0.14);
}

.sign-in-mark {
    flex: none;
    width: 1.5rem;
    height: 1.5rem;
}

.sign-in-key {
    fill: none;
    stroke: var(--wb-accent);
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sign-in-key-hole {
    fill: var(--wb-accent);
}

/* "or", between the tiles and the email, with a rule either side. */
.sign-in-divider {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin: 1.4rem 0;
    color: var(--wb-muted);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sign-in-divider::before,
.sign-in-divider::after {
    content: "";
    flex: 1;
    border-top: 1px solid var(--wb-border);
}

/* The card's fields a shade darker than the card, the strip behind a floated label with
   them. */
[data-bs-theme=dark] .sign-in-card .form-control,
[data-bs-theme=dark] .sign-in-card .form-control:focus,
[data-bs-theme=dark] .sign-in-card .form-floating > .form-control:focus ~ label::after,
[data-bs-theme=dark] .sign-in-card .form-floating > .form-control:not(:placeholder-shown) ~ label::after {
    background-color: var(--wb-ink);
}

/* Remember me on the left, Forgot password? on the right. */
.sign-in-line {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem 1rem;
    margin: 0.1rem 0 1.1rem;
    font-size: 0.95rem;
}

.sign-in-remember {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--wb-muted);
}

.sign-in-remember .form-check-input {
    margin: 0;
}

.sign-in-line a,
.sign-in-foot a {
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

/* The passkey when it is the only one-tap way: a button with its words, under Sign in. */
.sign-in-passkey {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.65rem;
    margin-top: 0.6rem;
}

.sign-in-passkey .sign-in-mark {
    width: 1.25rem;
    height: 1.25rem;
}

.sign-in-foot {
    margin: 1.25rem 0 0;
    padding-top: 1.1rem;
    border-top: 1px solid var(--wb-border);
    color: var(--wb-muted);
    text-align: center;
}

.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."
    }

/* Check a bottle (plan slice 32): the link on a themed blind's page, the verdict on the
   check's page, and what each check found, kept on the blind's page. */
.blind-check {
    margin-top: 1.25rem;
}

.blind-check .form-text {
    margin-top: 0.4rem;
}

.blind-side-note {
    color: var(--wb-muted);
    font-style: italic;
}

.blind-checks {
    margin-top: 1.5rem;
}

.blind-check-kept {
    padding: 0.6rem 1rem;
    margin-bottom: 0.6rem;
    border: 1px solid var(--wb-border);
    border-radius: var(--bs-border-radius-lg);
}

.blind-check-kept > summary {
    cursor: pointer;
}

.blind-check-kept[open] > summary {
    margin-bottom: 0.75rem;
}

.blind-check-when {
    color: var(--wb-muted);
}

.check-result {
    margin-bottom: 1.5rem;
}

.check-findings {
    padding: 1rem 1.1rem;
    border: 1px solid var(--wb-border-strong);
    border-radius: var(--bs-border-radius-lg);
    background: var(--wb-surface);
    overflow-wrap: anywhere;
}

.check-side {
    margin-bottom: 0.5rem;
    color: var(--wb-accent);
    font-family: var(--wb-serif);
    font-size: 1.25rem;
    font-weight: 600;
}

.check-claims dt {
    margin-top: 0.75rem;
    font-weight: 600;
}

.check-claims dd {
    margin-bottom: 0;
}

/* The mark beside a claim: what it rests on. Looked up is the accent; the model's own
   judgment and what is not known are quieter. */
.check-mark {
    display: inline-block;
    margin-left: 0.4rem;
    padding: 0 0.45rem;
    border: 1px solid var(--wb-border-strong);
    border-radius: 999px;
    color: var(--wb-muted);
    font-size: 0.8rem;
    font-weight: 400;
}

.check-mark-label,
.check-mark-looked-up {
    border-color: var(--wb-accent);
    color: var(--wb-accent);
}

.check-concerns-title,
.check-pages-title {
    margin: 1rem 0 0.25rem;
    font-weight: 600;
}

.check-concerns,
.check-pages {
    margin-bottom: 0;
    padding-left: 1.2rem;
}

.check-pages {
    font-size: 0.9rem;
}

.check-pages-none {
    margin: 1rem 0 0;
    color: var(--wb-muted);
}

.check-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.check-actions .btn {
    flex: 1 1 10rem;
}

/* The tasting sheet (plan slice 34): its links on a themed blind's page, and its words'
   boxes on a page of their own. The sheet itself is drawn by tasting-sheet.css. */
.blind-sheet {
    margin-top: 1.5rem;
}

.blind-sheet-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.blind-sheet .form-text {
    margin-top: 0.4rem;
}

/* Save and Print the sheets side by side under the boxes (plan slice 39). */
.sheet-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Save, Save and go on (plan slice 51) and Print the sheets: side by side where they fit,
   two to a row on a phone. */
.sheet-actions > * {
    flex: 1 1 9rem;
}

.sheet-part {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--wb-border);
}

.sheet-part-name {
    margin-bottom: 0.25rem;
    font-family: var(--wb-serif);
    font-size: 1.15rem;
    font-weight: 600;
}

.sheet-part-print {
    margin-bottom: 0.6rem;
}

.sheet-list {
    display: grid;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}

.sheet-list-head {
    color: var(--wb-muted);
    font-size: 0.85rem;
}

/* The answers (plan slice 61): a part of the words page as the components are, folded shut in
   a <details> until the host opens it, a box a wine inside. */
.sheet-answers {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--wb-border);
}

.sheet-answers-fold > summary {
    margin: 0.4rem 0 0.2rem;
    color: var(--wb-accent);
    cursor: pointer;
}

.sheet-answer {
    margin-top: 0.75rem;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--wb-border);
    border-radius: 0.4rem;
}

.sheet-answer > legend {
    float: none;
    width: auto;
    padding: 0 0.3rem;
    margin-bottom: 0;
}

.sheet-answer-levels {
    margin-top: 0;
}

.sheet-answer-words .form-check-inline {
    margin-right: 0.8rem;
}

/* Prepare it for me on step 3 (plan slice 54): the button beside Or write them yourself, and
   what it will do and cost under them. */
.blind-prepare {
    margin-top: 0.6rem;
}

.blind-prepare-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
}

.blind-prepare-actions form {
    margin: 0;
}

.blind-prepare-what,
.blind-prepare-cost {
    margin: 0.35rem 0 0;
}

/* The prepare page (plan slice 54, the mock-up's "Preparing, at three moments"): the bar and
   its count, then a line a piece of work, each with its mark: a tick, the script's spinner, a
   dot for one to do, or "!" for one that failed, with what it offers. */
.prepare {
    max-width: 34rem;
}

.prepare-bar {
    height: 0.7rem;
    margin: 0.25rem 0 0.4rem;
    overflow: hidden;
    border: 1px solid var(--wb-border-strong);
    border-radius: 999px;
    background-color: var(--wb-surface);
}

.prepare-bar i {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--wb-wine-bright), var(--wb-accent));
    transition: width 0.4s ease;
}

.prepare-count {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--wb-muted);
    font-size: 0.93rem;
}

.prepare-count b {
    color: var(--wb-text);
}

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

.prepare-line {
    display: grid;
    grid-template-columns: 1.9rem minmax(0, 1fr);
    gap: 0.1rem 0.6rem;
    padding: 0.7rem 0;
    border-top: 1px solid var(--wb-border);
}

.prepare-line:first-child {
    border-top: 0;
}

.prepare-mark {
    display: grid;
    grid-row: span 2;
    place-items: center;
    width: 1.6rem;
    height: 1.6rem;
    border: 1px solid var(--wb-border-strong);
    border-radius: 50%;
    color: var(--wb-muted);
    font-size: 0.85rem;
}

.prepare-line-done .prepare-mark {
    border-color: #3f9a55;
    background-color: #3f9a55;
    color: #fff;
}

.prepare-line-doing .prepare-mark {
    border: 0;
    color: var(--wb-accent);
}

.prepare-line-failed .prepare-mark {
    border-color: #997404;
    background-color: #332701;
    color: #f6d79a;
    font-weight: 700;
}

.prepare-title {
    font-weight: 600;
}

.prepare-line-to-do .prepare-title {
    color: var(--wb-muted);
    font-weight: 500;
}

.prepare-say {
    grid-column: 2;
    color: var(--wb-muted);
    font-size: 0.9rem;
}

.prepare-mend {
    display: flex;
    flex-wrap: wrap;
    grid-column: 2;
    gap: 0.4rem;
    margin-top: 0.4rem;
}

.prepare-mend[hidden],
.prepare [hidden] {
    display: none !important;
}

.prepare-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.prepare-again,
.prepare-lost,
.prepare-running,
.prepare-carry-on,
.prepare-end,
.prepare-no-script {
    margin-top: 1rem;
}

.prepare-by-hand {
    padding-left: 1.25rem;
}
