/*
    Kept. A cellar at night: warm black, cream type, and one quiet gold where something matters.
    Phone first: one column, big touch targets, a tab bar within thumb reach.

    The look is restraint. Gold is flat and used sparingly: the one thing a page is for, the tab you are
    on, the number that matters. A card is one surface with a hairline round it, with no gloss and no glow.
    What says what a thing is, is a small label in spaced capitals. Colour belongs to the wine. And nothing
    is given more room than it needs: on a phone the top of the screen is where the page's work begins.
*/

:root {
    color-scheme: dark;

    --bg: #0f0c0c;
    --surface: #171314;
    --surface-raised: #1d1819;
    --line: #2d2627;
    --line-strong: #3a3233;
    --mark: #6b625e;
    --text: #f5f1ea;
    --muted: #a49b95;
    --faint: #857d78;
    --brand: #7b1e3a;
    --gold: #c4a264;
    --gold-bright: #d2b67f;
    --on-gold: #15110a;
    --danger: #ff9086;
    --ok: #a5dbb0;
    --warn: #e9cc8b;

    /* Where a wine is in its drinking window, in the cellar's own warm colours: stone while it keeps, cream when it is ready, gold to
       drink soon, red once it is past its best. */
    --stage-keep: #b4a796;
    --stage-keep-rgb: 180 167 150;
    --stage-ready: #efe1c4;
    --stage-ready-rgb: 239 225 196;
    --stage-soon: var(--gold-bright);
    --stage-past: var(--danger);

    /* The same colours as three numbers, for where one is wanted part see-through: rgb(var(--gold-rgb) / .4). */
    --bg-rgb: 15 12 12;
    --gold-rgb: 196 162 100;
    --gold-bright-rgb: 210 182 127;
    --muted-rgb: 164 155 149;

    /*
        The warm red that lights a hero: the head of the front page, a stage, a shelf drawn out, the door to a
        cellar. It is one red wherever it is used, a deep garnet, quiet enough to sit with the warm black and
        the gold. It is never the brighter red of a red wine, which belongs to the wine.
    */
    --ember-rgb: 122 36 40;

    --radius: 20px;
    --gutter: 1.1rem;
    --tabbar-height: 64px;

    /*
        Titles are set in Marcellus and everything else in Figtree (see _Fonts.cshtml). Marcellus draws 1 and
        0 like I and O, so the figures in a title come from "Kept Numerals", which is named first. Marcellus
        has one weight: a title is never bold, and nothing is drawn as a smeared copy of a bolder face.
    */
    --serif: "Kept Numerals", "Marcellus", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
    --sans: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-synthesis: style;

    /* Wine colours. Every drawing of a bottle takes its colour from --wine. */
    --red: #a3213d;
    --white: #e6d37f;
    --rose: #f2a0ad;
    --sparkling: #cdbb85;
    --dessert: #d18f2c;
    --fortified: #7a3a22;
    --orange: #e78d3b;
    --unsorted: #8f807a;

    /*
        The other drinks. Every warm colour is a wine's, so these two are cool. Each was measured against
        every colour above and against the colours that say when to drink, for ordinary sight and for
        red-green colour blindness, and they are told apart from each other by lightness as much as by hue.
    */
    --spirit: #a97bf0;
    --beer: #3a66c2;
    --mixer: #3fa99b;

    /* What racks are made of. */
    --wood: #6d4529;
    --wood-light: #94633d;
    --wood-dark: #3a2314;
    --steel: #b6bec4;
    --steel-dark: #58616a;

    /* Charts: one colour for every mark, and lines that stay behind it. */
    --series: #c4a264;
    --grid: #272122;
    --axis: #3a3233;
}

@view-transition { navigation: auto; }

*, *::before, *::after { box-sizing: border-box; }

html { background: var(--bg); }

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.5 var(--sans);
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

a { color: var(--gold-bright); text-underline-offset: 3px; }
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: 0; }
h1 { font-size: 2.05rem; line-height: 1.1; margin: 0 0 .3rem; }
h2 { font-size: 1.32rem; line-height: 1.3; margin: 1.8rem 0 .65rem; }
p { margin: .5rem 0; }
small, .muted { color: var(--muted); }
small { display: block; font-size: .82rem; line-height: 1.4; margin-top: .3rem; }
[hidden] { display: none !important; }

/* Frame */

.topbar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    --bottle-at: calc(var(--gutter) + 3.95rem);
    min-height: calc(env(safe-area-inset-top) + 51px);
    padding: calc(env(safe-area-inset-top) + .45rem) var(--gutter) calc(.45rem + 1px);
    background: rgb(var(--bg-rgb) / .9);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    view-transition-name: topbar;
}

/*
    The line and the bottle (_Line.cshtml). The foot of the bar is not a rule but a stroke: the shelf, which
    rises into a bottle standing beside the name and comes down again. The drawing is far wider than any
    screen, and is slid along so that the bottle stands at --bottle-at.
*/
.topbar-line { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.topbar-line svg { position: absolute; bottom: 0; left: calc(var(--bottle-at) - 1500px); display: block; --line-foot: 147; --line-over: 242; }
.topbar-line path { fill: none; stroke: var(--mark); stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; }

/*
    When somebody arrives the stroke draws itself, as a pen would: in along the shelf to the foot of the
    bottle, up and over the bottle without hurry, and away along the shelf. _Line.cshtml says when that is.
    The numbers are how far along the stroke the pen has got, counted back from 6000: the bottle's foot is
    147 along, and its far side 242. A can, a spirits bottle or a coupe in its place says its own
    (--line-foot and --line-over, from HeaderLine), so that the pen goes over each as it goes over the bottle.
*/
@media (prefers-reduced-motion: no-preference) {
    .is-arriving .topbar-line .line-stroke { stroke-dasharray: 6000; stroke-dashoffset: 6000; animation: draw-line 2.5s .2s forwards; }
}

@keyframes draw-line {
    0% { stroke-dashoffset: 6000px; animation-timing-function: ease-out; }
    11% { stroke-dashoffset: calc(6000px - var(--line-foot) * 1px); animation-timing-function: cubic-bezier(.4, 0, .4, 1); }
    54% { stroke-dashoffset: calc(6000px - var(--line-over) * 1px); animation-timing-function: cubic-bezier(.3, 0, .3, 1); }
    88% { stroke-dashoffset: 5150px; animation-timing-function: ease-out; }
    100% { stroke-dashoffset: 0px; }
}

/*
    The glint. Each time a page opens, a short length of gold runs once along the stroke: in along the shelf,
    up and over the bottle, and away. It is the same stroke drawn again over the first, in gold, with all
    but that short length left out. When the stroke is drawing itself the glint waits for it. Still, and for
    anyone who has asked for less movement, it cannot be seen at all.
*/
.topbar-line .line-glint { stroke: var(--gold); stroke-width: 1.4; stroke-dasharray: 64 4000; stroke-dashoffset: 64; opacity: 0; }

@media (prefers-reduced-motion: no-preference) {
    .topbar-line .line-glint { animation: glint-line 2.3s .45s forwards; }
    .is-arriving .topbar-line .line-glint { animation-delay: 2.5s; }

    /* On the front page the glint waits while the bottle turns into each drink and back (line-cycle.js), and runs once it is a bottle again. */
    .is-arriving .topbar-line.will-turn:not(.is-cycled) .line-glint { animation: none; }
}

/* How far along the stroke the tail of the glint has got: to the bottle's foot, slowly over the bottle, across a phone's width, and away. */
@keyframes glint-line {
    0% { stroke-dashoffset: 64px; opacity: 0; animation-timing-function: ease-out; }
    6% { opacity: 1; }
    12% { stroke-dashoffset: calc(64px - var(--line-foot) * 1px); animation-timing-function: cubic-bezier(.4, 0, .5, 1); }
    38% { stroke-dashoffset: calc(27px - var(--line-over) * 1px); animation-timing-function: cubic-bezier(.3, 0, .5, 1); }
    70% { stroke-dashoffset: -620px; opacity: 1; animation-timing-function: ease-out; }
    100% { stroke-dashoffset: -1750px; opacity: 0; }
}

/*
    While Kept is at work on the cellar the glint runs again every six seconds: the same run as above, in the
    first part of each six seconds, and nothing for the rest. It stops when the work does (line.js). A device
    with a PIN, which is left on a wall, does not loop: it runs the glint once when the work begins, so that
    only a change moves on it.
*/
@keyframes glint-loop {
    0% { stroke-dashoffset: 64px; opacity: 0; animation-timing-function: ease-out; }
    2.3% { opacity: 1; }
    4.6% { stroke-dashoffset: calc(64px - var(--line-foot) * 1px); animation-timing-function: cubic-bezier(.4, 0, .5, 1); }
    14.6% { stroke-dashoffset: calc(27px - var(--line-over) * 1px); animation-timing-function: cubic-bezier(.3, 0, .5, 1); }
    26.8% { stroke-dashoffset: -620px; opacity: 1; animation-timing-function: ease-out; }
    38.3%, 100% { stroke-dashoffset: -1750px; opacity: 0; }
}

@media (prefers-reduced-motion: no-preference) {
    .topbar-line.is-working .line-glint { animation: glint-loop 6s .45s infinite; }
    .is-arriving .topbar-line.is-working .line-glint { animation-delay: 2.5s; }
    body[data-lock] .topbar-line.is-working .line-glint { animation: glint-line 2.3s .2s forwards; }
}

.brand { display: block; color: var(--text); }
.wordmark { display: block; height: 1.55rem; width: auto; }

/* Whose cellar this is. Tapping it leads back to the choice of cellars. */
.who {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    min-width: 0;
    min-height: 36px;
    padding: 0 .85rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: .82rem;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.who::after { content: "⇄"; flex: none; color: var(--faint); font-size: .8rem; }

/* The right of the bar: whose cellar it is, and the way to its settings. */
.topbar-end { display: flex; align-items: center; justify-content: flex-end; gap: .45rem; min-width: 0; max-width: 70%; }
.gear { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); }
.gear svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.gear[aria-current="page"] { border-color: var(--gold); color: var(--gold-bright); }

.page {
    max-width: 44rem;
    margin: 0 auto;
    padding: 1.1rem var(--gutter) calc(var(--tabbar-height) + env(safe-area-inset-bottom) + 3.2rem);
}

/* The way back, in the small spaced capitals that say what a thing is. */
.crumb { margin: 0 0 .35rem; font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; }
.crumb a { color: var(--faint); text-decoration: none; }
.crumb a::before { content: "‹ "; }

/* The part of a page that its address names, or that a script brings to the top, stops just under the bar and not behind it. */
:target, h2[id] { scroll-margin-top: 4.4rem; }

/* The tabs sit on the foot of the screen, from edge to edge, with a hairline over them. */
.tabbar {
    position: fixed;
    inset: auto 0 0;
    z-index: 5;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 6.4rem));
    justify-content: center;
    align-items: center;
    height: calc(var(--tabbar-height) + env(safe-area-inset-bottom) + 8px);
    padding: 0 .6rem env(safe-area-inset-bottom);
    border-top: 1px solid var(--line);
    background: var(--bg);
    view-transition-name: tabbar;
}

/* A server on a business's team has three tabs: the cellar, its racks and Service. */
.tabbar.is-three { grid-template-columns: repeat(3, minmax(0, 6.4rem)); }

.tab {
    display: grid;
    justify-items: center;
    gap: 5px;
    padding: .45rem 0;
    color: var(--faint);
    font-size: .72rem;
    font-weight: 500;
    letter-spacing: .01em;
    text-decoration: none;
}

.tab svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.tab[aria-current="page"] { color: var(--gold); }

/* Adding a bottle is what the app is for, so its tab is a button that stands proud of the bar. */
.tab-add svg {
    width: 46px;
    height: 46px;
    margin-top: -1.2rem;
    padding: 11px;
    border-radius: 50%;
    background: var(--gold);
    color: var(--on-gold);
    stroke-width: 1.8;
    box-shadow: 0 0 0 5px var(--bg);
}

/* Messages */

.flash, .notice, .problem, .validation-summary-errors {
    padding: .75rem 1rem;
    border: 1px solid transparent;
    border-radius: var(--radius);
    margin: 0 0 1rem;
}

.flash { border-color: rgba(165, 219, 176, .3); color: var(--ok); }
.notice { border-color: rgb(var(--gold-rgb) / .38); color: var(--gold-bright); }
.problem, .validation-summary-errors { background: rgba(255, 144, 134, .06); border-color: rgba(255, 144, 134, .35); color: var(--danger); }
.validation-summary-errors ul { margin: 0; padding-left: 1.1rem; }
.validation-summary-valid { display: none; }
.field-validation-error { color: var(--danger); font-size: .85rem; }

/*
    A page with nothing to show yet (_Empty), the same everywhere: its drawing at the left, one sentence beside it, and the one way on
    under the sentence. A card, as every way on is, and no taller than the drawing and two lines of words.
*/
.empty {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    column-gap: .9rem;
    row-gap: .75rem;
    align-items: start;
    margin: 0 0 1.2rem;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
}
.empty > p { margin: 0; font-size: 1rem; line-height: 1.45; }
.empty > .btn { justify-self: start; min-height: 46px; padding: 0 1.1rem; border-radius: 14px; font-size: .95rem; }

/* A way on to something worth doing: a card with a fine gold line round it. A quiet one has the hairline every card has. */
.callout {
    display: grid;
    gap: .15rem;
    margin: 1.2rem 0;
    padding: 1rem 1.1rem;
    border: 1px solid rgb(var(--gold-rgb) / .5);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
}

.callout strong { font-size: 1.04rem; font-weight: 600; line-height: 1.35; }
.callout strong::after { content: " ›"; color: var(--gold); }
.callout span { color: var(--muted); font-size: .92rem; line-height: 1.45; }
.callout.quiet { border-color: var(--line); }

/*
    A cellar with nothing in it (Cellar.cshtml) has one big way in, a photo of a bottle, with the other ways under it.
*/
.first-lede { margin: .3rem 0 0; color: var(--muted); font-size: 1.02rem; line-height: 1.5; }
.first-ways { display: grid; gap: .6rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.first-ways a {
    display: grid;
    gap: .15rem;
    padding: .85rem 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--muted);
    font-size: .92rem;
    line-height: 1.45;
    text-decoration: none;
}

.first-ways strong { color: var(--text); font-size: 1.02rem; font-weight: 600; }
.first-ways strong::after { content: " ›"; color: var(--gold); }

/*
    A cellar being started, under the heading of each tab (_GettingStarted): its three first steps in one line, joined by a hairline. A
    step done has a gold tick, the next is ringed in gold and named in full colour, and the rest wait in grey.
*/
.start-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 0 1.1rem; padding: .75rem .25rem .7rem; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); list-style: none; }
/* The guides in the app's frame, for someone in a cellar: room under the page for the tabs (_Public, _TabBar). */
.pub.has-tabs { padding-bottom: calc(var(--tabbar-height) + env(safe-area-inset-bottom)); }
.pub.has-tabs .pub-top .topbar-end { display: flex; align-items: center; gap: .5rem; margin-left: auto; }

/* The offer of a passkey, under the first steps: one quiet line, its button and a way to put it away (PasskeyOffer). */
.passkey-offer { display: grid; gap: .55rem; margin: 0 0 1.1rem; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.passkey-offer p { margin: 0; color: var(--muted); font-size: .94rem; line-height: 1.45; }
.passkey-offer p strong { color: var(--text); font-weight: 600; }
.passkey-offer-do { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; }
.passkey-offer-do .btn { min-height: 44px; }
.start-strip li { position: relative; }
.start-strip li + li::before { content: ""; position: absolute; top: .75rem; left: calc(-50% + 1.05rem); right: calc(50% + 1.05rem); height: 1px; background: var(--line-strong); }
.start-strip li.is-done + li::before { background: rgb(var(--gold-rgb) / .55); }
.start-step { display: grid; justify-items: center; gap: .35rem; color: var(--muted); font-size: .8rem; font-weight: 500; line-height: 1.25; text-align: center; text-decoration: none; text-wrap: balance; }
.start-dot { display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--surface); color: var(--muted); font-size: .75rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.start-dot svg { width: .75rem; height: .75rem; fill: none; stroke: var(--gold); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.is-done .start-dot { border-color: rgb(var(--gold-rgb) / .55); }
.is-next .start-step { color: var(--text); font-weight: 600; }
.is-next .start-dot { border: 1.5px solid var(--gold); color: var(--gold-bright); }

/* A callout that sends a form on its way is a button, and has to be told to look like the link it sits beside. */
button.callout { width: 100%; font: inherit; text-align: left; cursor: pointer; }
.hero .summary strong { color: var(--text); font-weight: 600; }

/* Buttons and forms */

.btn, button.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 1.2rem;
    border: 1px solid transparent;
    border-radius: 15px;
    background: var(--gold);
    color: var(--on-gold);
    font: inherit;
    font-weight: 600;
    letter-spacing: .005em;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

/* Flat gold for the one thing a page is for. Everything else a page offers has a hairline round it. */
.btn:active { translate: 0 1px; }
.btn.secondary { background: transparent; border-color: var(--line-strong); color: var(--text); }
.btn.danger { background: transparent; border-color: rgba(255, 144, 134, .5); color: var(--danger); }
.btn.wide { width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.actions .btn { flex: 1 1 10rem; }

button.link { border: 0; padding: 0; background: none; color: var(--gold-bright); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

label { display: block; font-weight: 600; font-size: .86rem; letter-spacing: .01em; margin-bottom: .3rem; }
.field { margin-bottom: .95rem; }
.field .hint, label .hint { font-weight: 400; color: var(--muted); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.pair + small { margin: -.55rem 0 .95rem; }

/* What something is made of beside how strong it is: a long field for the name and a short one for the number. */
.pair.strength { grid-template-columns: minmax(0, 1fr) 5.4rem; }

/* How many beside the size: a count needs three digits, and a size's name its whole width. */
.pair.count-size { grid-template-columns: 6.5rem minmax(0, 1fr); }

/* Under a strength that was not read off the label: that it is an estimate, and a tick to say the label agrees. */
.estimate-note { margin: -.55rem 0 .95rem; }
.estimate-note .check { min-height: 44px; color: var(--muted); font-size: .92rem; }

input:not([type]), input[type="text"], input[type="search"], input[type="tel"], input[type="url"], input[type="number"], input[type="password"], input[type="email"], input[type="date"], select, textarea {
    width: 100%;
    min-height: 50px;
    padding: .65rem .85rem;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #141011;
    color: var(--text);
    font: inherit;
}

/* A phone draws a date field as a button of its own width, with the date in the middle. This makes it a field like the others. */
input[type="date"] { min-width: 0; appearance: none; }
input[type="date"]::-webkit-date-and-time-value { text-align: left; }

input::placeholder { color: var(--faint); }
textarea { min-height: 5rem; resize: vertical; }
select option { background: var(--surface); color: var(--text); }
input[type="checkbox"] { flex: none; width: 1.35rem; height: 1.35rem; accent-color: var(--gold); }

input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, .btn:focus-visible, a:focus-visible, summary:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

/* A field with a list under it that narrows as you type. */
.combo { position: relative; }

.combo-list {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    z-index: 4;
    max-height: min(17rem, 42vh);
    margin: 0;
    padding: .3rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    list-style: none;
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    background: var(--surface-raised);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .6);
}

.combo-list li { display: flex; align-items: center; min-height: 44px; padding: .3rem .7rem; border-radius: 10px; color: var(--muted); cursor: pointer; }
.combo-list b { color: var(--text); font-weight: 600; }
.combo-list li[aria-selected="true"], .combo-list li:hover { background: rgb(var(--gold-rgb) / .14); color: var(--text); }
.combo-list .combo-new { color: var(--gold-bright); }
.combo-list .combo-new:not(:first-child) { margin-top: .3rem; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; }

details.more { margin-top: 1.4rem; }
details.more > summary { cursor: pointer; color: var(--text); font-weight: 600; padding: .5rem 0; }
details.more[open] > summary { margin-bottom: .6rem; }

.card {
    margin: 0 0 .8rem;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

fieldset.card { min-width: 0; }
.check { display: flex; align-items: center; gap: .7rem; margin: 0; font-size: 1rem; font-weight: 400; }
.check strong { font-size: 1.02rem; font-weight: 600; }

/* Notes from Kept, in Settings: each note a box with its name over what it is, and the day and hour of tonight's under its own. */
.notices-form { display: grid; gap: .85rem; }
.notices-form p { margin: 0; }
.notices-form .check { align-items: flex-start; }
.notices-form .check input { margin-top: .2rem; }
.notices-form .check span { color: var(--muted); font-size: .92rem; line-height: 1.45; }
.notices-form .check strong { display: block; color: var(--text); }
.notices-when { margin: -.3rem 0 0 1.9rem; }
.notices-form .btn { justify-self: start; }
.suggestion > .muted { margin: .5rem 0 0; font-size: .9rem; }
.suggestion details.more { margin-top: .3rem; }

/* A suggested rack: what it is in words, with a small drawing of it beside them. */
.suggestion-head { display: flex; gap: 1rem; align-items: flex-start; justify-content: space-between; }
.suggestion-shape { margin: .35rem 0 0; color: var(--muted); font-size: .9rem; }
.sketch { --u: clamp(3px, 1.1vw, 5px); flex: none; max-width: 42%; overflow: hidden; }

/*
    Checking suggested racks (Racks/Setup, rack-setup.js). A card to each rack: its name, which a tap changes in place; its drawing, large,
    on a dark stage of its own, with the moment in the film it was seen best beside it; and its numbers as chips under it, each opened with a
    tap into a − and a + that float over where it stands, so nothing round it moves. How big the drawing comes out is said on it in bottle
    ends and pixels (--ax, --bx across; --ay, --by down, from SketchSize), and the stage takes the height the drawing wants at the card's
    width, up to half the screen; the drawing then takes the --u that fits it. The stage keeps its height while the drawing is drawn again,
    so the card never jumps. The first time a drawing is seen it builds itself, a row or a shelf at a time, quickly; with less motion asked
    for it is simply there.
*/
.setup-lede { margin: .2rem 0 1rem; font-size: .95rem; line-height: 1.5; }
.setup-card { padding: .85rem 1rem 1rem; }
.setup-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
/* The name is as wide as it is, so its pencil stands just after it (rack-setup.js does the same where field-sizing is not known). */
.suggestion input.setup-name[type="text"] {
    flex: 0 1 auto; width: auto; min-width: 5ch; max-width: 100%; field-sizing: content; min-height: 44px; margin: 0 0 0 -.45rem; padding: .15rem 1.7rem .15rem .45rem;
    border: 1px solid transparent; border-radius: 10px; color: var(--text); font: 400 1.32rem/1.25 var(--serif); text-overflow: ellipsis;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23857d78' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20h4L19 9l-4-4L4 16v4z'/%3E%3Cpath d='M13.5 6.5l4 4'/%3E%3C/svg%3E") no-repeat right .45rem center / .95rem;
}
.suggestion input.setup-name[type="text"]:focus { border-color: var(--gold); background: #141011; outline: none; }
.setup-out { position: relative; flex: none; display: inline-flex; align-items: center; min-height: 44px; margin: 0; color: var(--muted); font-size: .86rem; font-weight: 400; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.setup-out input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.setup-out:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
.setup-same { display: inline-flex; align-items: center; gap: .45rem; min-height: 40px; margin: .3rem 0 .1rem; padding: 0 .9rem; border: 1px dashed rgb(var(--gold-rgb) / .6); border-radius: 999px; color: var(--text); font-size: .88rem; font-weight: 500; cursor: pointer; }
.setup-same svg { width: 1rem; height: 1rem; fill: none; stroke: var(--gold); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.setup-maker { margin: .15rem 0 0; color: var(--muted); font-size: .88rem; }

.setup-look { container-type: inline-size; display: grid; grid-template-columns: minmax(0, 1fr); gap: .6rem; margin: .65rem 0 .7rem; }
.setup-look.has-still { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
.setup-frame {
    --pad: .8rem;
    --fw: 100cqw;
    --most: 34px;
    container-type: size;
    display: grid;
    height: clamp(7rem, calc(min((var(--fw) - var(--pad) * 2 - var(--bx)) / var(--ax), var(--most)) * var(--ay) + var(--by) + var(--pad) * 2), min(26rem, 50svh));
    padding: var(--pad);
    border-radius: 14px;
    background: radial-gradient(90% 70% at 50% 0, rgba(255, 255, 255, .045), rgba(255, 255, 255, 0) 70%), linear-gradient(180deg, #171314, #120f0f);
}
.setup-look.has-still .setup-frame { --fw: calc((100cqw - .6rem) * 1.3 / 2.3); }
.setup-drawing {
    --u: max(3px, calc(min((100cqw - var(--bx)) / var(--ax), (100cqh - var(--by)) / var(--ay), var(--most, 34px)) * var(--fit, 1)));
    display: grid; place-items: center; width: 100%; height: 100%;
}
.setup-drawing .rack { margin: 0; }
@supports not (width: 1cqw) {
    .setup-frame { height: auto; }
    .setup-drawing { --u: clamp(4px, 2.4vw, 12px); }
}
.setup-still { display: block; overflow: hidden; border-radius: 14px; background: #120f0f; }
.setup-still img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* The one number Kept is least sure of, asked with its likely answers. Kept's own suggestion is ringed in a dashed gold line. */
.setup-ask { display: grid; gap: .45rem; margin: 0 0 .7rem; padding: .65rem .8rem .75rem; border: 1px solid rgb(var(--gold-rgb) / .45); border-radius: 14px; overflow: hidden; }
.setup-ask p { margin: 0; font-size: .95rem; font-weight: 600; }
.setup-answers { display: flex; flex-wrap: wrap; gap: .4rem; }
.setup-answer { min-width: 3.4rem; min-height: 44px; padding: 0 .9rem; border: 1px solid var(--line-strong); border-radius: 999px; background: none; color: var(--text); font: inherit; font-size: .95rem; font-variant-numeric: tabular-nums; cursor: pointer; touch-action: manipulation; }
.setup-answer[aria-pressed="true"] { border-style: dashed; border-color: rgb(var(--gold-rgb) / .7); }

.setup-dials { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0 0 .55rem; }
.setup-dial { position: relative; display: inline-flex; }
.setup-chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 .95rem; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface-raised); color: var(--muted); font: inherit; font-size: .92rem; white-space: nowrap; cursor: pointer; touch-action: manipulation; }
.setup-chip b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.setup-dial.is-unset .setup-chip { border-style: dashed; background: none; }
.setup-dial.is-open .setup-chip { visibility: hidden; }
.setup-step {
    position: absolute; left: 50%; top: 50%; z-index: 3; display: inline-flex; align-items: center; gap: .1rem;
    padding: .2rem; translate: calc(-50% + var(--nudge, 0px)) -50%; border: 1px solid var(--gold); border-radius: 999px;
    background: var(--surface-raised); box-shadow: 0 10px 28px rgb(0 0 0 / .6); white-space: nowrap;
}
.setup-step:focus { outline: none; }
.setup-by { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: rgb(var(--gold-rgb) / .14); color: var(--gold-bright); font: 400 1.35rem/1 var(--sans); cursor: pointer; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.setup-by:active { background: rgb(var(--gold-rgb) / .3); }
.setup-num { display: inline-flex; align-items: baseline; gap: .2rem; padding: 0 .3rem; color: var(--muted); font-size: .92rem; }
.setup-step input[type="number"] {
    width: 2.9em; min-height: 0; padding: .3rem 0; border: 0; border-bottom: 1px solid var(--line-strong); border-radius: 0; background: none;
    color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; text-align: center; -moz-appearance: textfield; appearance: textfield;
}
.setup-step input[type="number"]::-webkit-outer-spin-button, .setup-step input[type="number"]::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none; }
.setup-step input[type="number"]:focus { border-bottom-color: var(--gold); outline: none; }
.setup-holds { margin: 0 0 .15rem; color: var(--muted); font-size: .92rem; }
.setup-holds b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.setup-basis { margin: .35rem 0 0; font-size: .88rem; }

/* Left out, a card folds to one line that says so, and the way back. A rack left out as another seen again says which. */
.setup-gone { display: none; align-items: center; justify-content: space-between; gap: .8rem; margin: 0; color: var(--muted); font-size: .92rem; }
.setup-gone strong { color: var(--text); font-weight: 600; }
.setup-gone-same, .setup-card[data-out="same"] .setup-gone-left { display: none; }
.setup-card[data-out="same"] .setup-gone-same { display: inline; }
.setup-back { flex: none; display: inline-flex; align-items: center; min-height: 44px; margin: 0; color: var(--gold-bright); font-size: .88rem; font-weight: 400; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.setup-card:has([data-create]:not(:checked)) { padding-block: .3rem; }
.setup-card:has([data-create]:not(:checked)) .setup-gone { display: flex; }
.setup-card:has([data-create]:not(:checked)) .setup-body { display: none; }

@media (prefers-reduced-motion: no-preference) {
    /* Each piece of the drawing waits for its turn, then takes its place: a hole or a cube comes up, a shelf slides in. */
    html.js .setup-frame.is-new :is(.slot-grid > .hole, .shelf, .bay, .cube, .fridge-head) { opacity: 0; animation: setup-anyway 0s 2.5s forwards; }
    .setup-frame.is-held :is(.slot-grid > .hole, .shelf, .bay, .cube, .fridge-head) { opacity: 0; }
    .setup-frame.is-building :is(.slot-grid > .hole, .cube) { opacity: 0; animation: setup-up .36s cubic-bezier(.2, .8, .3, 1) var(--at, 0ms) forwards; }
    .setup-frame.is-building :is(.shelf, .bay) { opacity: 0; animation: setup-in .4s cubic-bezier(.2, .8, .3, 1) var(--at, 0ms) forwards; }
    .setup-frame.is-building .fridge-head { opacity: 0; animation: setup-lit .5s ease-out var(--at, 0ms) forwards; }
    .setup-drawing.is-redrawn { animation: setup-redrawn .18s ease-out; }
    .setup-step:not([hidden]) { animation: setup-step .14s ease-out; }
}
@keyframes setup-anyway { to { opacity: 1; } }
@keyframes setup-up { from { opacity: 0; scale: .35; } to { opacity: 1; scale: 1; } }
@keyframes setup-in { from { opacity: 0; translate: -12% 0; } to { opacity: 1; translate: 0 0; } }
@keyframes setup-lit { to { opacity: 1; } }
@keyframes setup-redrawn { from { opacity: .55; } }
@keyframes setup-step { from { opacity: 0; scale: .92; } }

/*
    Racks just set up from a walkthrough, on the racks page, once (Racks/Index, SetUp): what the cellar now holds over the wall, each new
    rack standing up in its place, half a second in and then one after another in the order it was walked, and the way to fill the first
    under it. With less motion asked for they are simply there.
*/
.set-up-said { margin: .2rem 0 .9rem; font-size: 1.45rem; line-height: 1.25; text-wrap: balance; }
.dock.set-up-go { margin-top: -1.3rem; margin-bottom: .4rem; }
@media (prefers-reduced-motion: no-preference) {
    .standing.joins { animation: set-up-join .6s cubic-bezier(.2, .8, .3, 1) backwards; animation-delay: calc(.5s + var(--join, 0) * 120ms); }
}
@keyframes set-up-join { from { opacity: 0; translate: 0 1.4rem; scale: .94; } }

/* A wine found in a film of bottles: the picture it was read from, what it was taken to be, and where it will go. */
.found { position: relative; min-width: 0; padding-left: 1.2rem; overflow: hidden; }
.found::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--wine, var(--unsorted)); }
.found-head { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: .9rem; align-items: center; margin-bottom: .2rem; }
.found-head .thumb { display: block; }

/* A bottle from a receipt, drawn where a label photo would be, standing at the foot of the same frame. */
.found-head .thumb.drawn { display: grid; place-items: end center; width: 56px; height: 74px; padding-bottom: 2px; }
.found-head .thumb.drawn .upright { --bottle: 68px; --wide: calc(var(--bottle) / 3.4); }
.found-head .check strong { overflow-wrap: anywhere; }
.found-title { margin: 0; overflow-wrap: anywhere; line-height: 1.3; }
.found-head:has(.found-ask, .found-shown) { align-items: start; }
.found-title strong { font-weight: 600; }

/* What goes in, under the heading: how many, what they are worth, and where. */
.found-total { margin: 0 0 1rem; color: var(--muted); }

/* A wine left out stays on the page, quieter, with the way to put it back beside its name. */
.found-out-mark { display: none; color: var(--muted); font-weight: 400; }
.found-out-mark .link { font-size: inherit; }
.found:has(.found-out input:checked) .found-out-mark { display: inline; }
.found:has(.found-out input:checked) .found-head .thumb,
.found:has(.found-out input:checked) .found-head .suggestion-shape,
.found:has(.found-out input:checked) .found-head .found-sum,
.found:has(.found-out input:checked) .found-head .found-ask,
.found:has(.found-out input:checked) .found-head .found-shown { opacity: .45; }
.found-out { margin: .1rem 0 .8rem; }
/* While labels are read, leaving one out is a quiet word under it, not a box. */
.found-out-quick { position: relative; display: inline-flex; align-items: center; min-height: 44px; margin: 0; font-size: .86rem; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.found-out-quick input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.found-out-quick:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }
.found-out-gone { display: none; }
.found-out-quick:has(input:checked) .found-out-in { display: none; }
.found-out-quick:has(input:checked) .found-out-gone { display: inline; color: var(--text); }

/* Which kind of drink it is, asked with one tap when nothing else could say for sure. Kept's suggestion is first, and marked. */
.found-ask { margin: .55rem 0 0; padding: 0; border: 0; min-width: 0; }
.found-ask legend { padding: 0; margin-bottom: .35rem; font-size: .88rem; color: var(--text); }
.found-chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.found-chip { position: relative; display: inline-grid; place-items: center; min-height: 2.5rem; padding: 0 .8rem; border: 1px solid var(--line-strong); border-radius: 999px; font-size: .86rem; cursor: pointer; }
.found-chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.found-chip.is-suggested { border-style: dashed; border-color: rgb(var(--gold-rgb) / .6); }
.found-chip:has(input:checked) { border-style: solid; border-color: var(--gold); background: rgb(var(--gold-rgb) / .12); }
.found-chip:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }

/* What only matters without scripts: with them, the page does it by itself. */
html.js .no-js-only { display: none; }
.found .trio { grid-template-columns: 5rem minmax(0, 1fr) 5rem; }
.found-places { margin: .3rem 0 .2rem; }
.found-places .advice-label { margin-bottom: .4rem; }

/* How many bottles of a found wine there are and where they go, under its name. */
.found-sum { margin: .3rem 0 0; color: var(--muted); font-size: .88rem; }
.found-sum strong { color: var(--text); font-weight: 600; }

/* A found wine's fields, folded away under it. */
details.found-edit { margin: .2rem 0 0; border-top: 1px solid var(--line); }
details.found-edit > summary { padding: .65rem 0; }
.found-edit > details.more { margin-top: .6rem; }

/* The main action of a long form, kept above the tab bar. */
.dock {
    position: sticky;
    z-index: 3;
    bottom: calc(var(--tabbar-height) + env(safe-area-inset-bottom));
    margin: 1rem calc(var(--gutter) * -1) 0;
    padding: .9rem var(--gutter) 1.4rem;

    /* Solid down to the tab bar, so that nothing on the page shows through under the buttons. */
    background: linear-gradient(rgb(var(--bg-rgb) / 0), rgb(var(--bg-rgb) / .96) 26%, rgb(var(--bg-rgb)) 60%);
}

.found-again { margin: .9rem 0 .2rem; text-align: center; }
.found-again .link { min-height: 44px; }

/* A film filling in: every bottle as the film named it, the glass filling as the labels come back, and each card filling in as its label lands. */
.found.is-reading { border-style: dashed; border-color: rgb(var(--gold-rgb) / .3); }
.found-spot { color: var(--muted); }
.found-shown { margin: .35rem 0 0; color: var(--muted); font-size: .88rem; }
.found-shown .link { min-height: 44px; margin-left: .25rem; font-size: inherit; }

/* Where its owner said on the film that it goes, in their words, under where it goes. Said and not done, it reads a shade stronger. */
.found-head:has(.found-said) { align-items: start; }
.found-said { margin: .3rem 0 0; color: var(--muted); font-size: .88rem; overflow-wrap: anywhere; }
.found-said.is-amiss { color: var(--text); }
.found:has(.found-out input:checked) .found-head .found-said { opacity: .45; }
.found.is-filled { animation: found-filled 1.6s ease-out; }
.found.is-filled .found-title strong,
.found.is-filled .suggestion-shape { animation: wt-arrive .5s ease-out both; }
@keyframes found-filled { from { box-shadow: 0 0 0 1px rgb(var(--gold-rgb) / .6); } to { box-shadow: 0 0 0 1px rgb(var(--gold-rgb) / 0); } }

/* Kept's camera: what the camera sees, edge to edge, a frame to hold each label in, and the bottles caught along the foot. */
.kcam {
    position: fixed; inset: 0; z-index: 90;
    display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto auto;
    background: #000; color: #fff; overscroll-behavior: contain; touch-action: manipulation;
}
.kcam[hidden], .kcam [hidden] { display: none !important; }
html.is-filming, html.is-filming body { overflow: hidden; }
.kcam-view { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.kcam-guide::after { content: ""; position: absolute; left: 6%; right: 6%; top: 4%; height: 2px; background: var(--gold); opacity: 0; pointer-events: none; }
.kcam.is-locking:not(.is-caught) .kcam-guide::after { animation: kcam-sweep 1.1s ease-in-out infinite alternate; }
@keyframes kcam-sweep { from { top: 4%; opacity: .85; } to { top: 96%; opacity: .85; } }
.kcam.is-locking .kcam-page polygon { stroke: var(--gold); }
.kcam.kcam > .kcam-tick { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.kcam.kcam > .kcam-know { position: absolute; left: 1rem; right: 1rem; bottom: 8.5rem; z-index: 3; display: grid; gap: .3rem; padding: .85rem 1rem; border: 1px solid var(--line-strong); border-radius: 16px; background: var(--surface); animation: kcam-know .4s cubic-bezier(.2, .8, .3, 1) both; }
.kcam-know.is-known { border-color: var(--gold); }
.kcam-know strong { font-family: var(--serif); font-size: 1.15rem; font-weight: 400; }
.kcam-know p { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.35; }
.kcam-know div p:first-child { color: var(--text); }
.kcam-know .kcam-know-choice { display: flex; gap: .5rem; margin-top: .45rem; }
.kcam-know-choice .btn { flex: 1 1 0; padding-inline: .5rem; }
.kcam-know-choice .btn[hidden] { display: none; }
@keyframes kcam-know { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
.kcam-rack { display: grid; grid-template-columns: repeat(15, 1fr); gap: 4px; margin: .2rem 1rem .5rem; padding: 6px; border-radius: 10px; background: rgb(0 0 0 / .55); }
.kcam-rack i { aspect-ratio: 1; border-radius: 50%; background: rgb(255 255 255 / .1); }
.kcam-rack i.is-in { background: var(--wine, var(--unsorted)); }
.kcam-rack i.is-reading { background: var(--gold); opacity: .75; }
.kcam-rack i.is-dropping { animation: kcam-drop .5s cubic-bezier(.3, 1.3, .5, 1) both; }
@keyframes kcam-drop { from { opacity: 0; transform: translateY(-90px) scale(1.5); } to { opacity: 1; transform: none; } }

/*
    The cellar's own rack at the foot of the picture, while filming, drawn as its own page draws it, small: what is in it already stands back,
    each bottle caught waits at the side in gold while it is read, and goes into its spot in its color. A tall rack shows the shelves round
    the spot, and the window moves along it.
*/
.kcam-dock { margin: .1rem 1rem .35rem; padding: .25rem .5rem .3rem; border-radius: 12px; background: rgb(0 0 0 / .58); backdrop-filter: blur(6px); }
.kcam-dock-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; min-height: .9rem; margin: 0 0 .2rem; color: rgb(255 255 255 / .84); font-size: .72rem; line-height: 1.2; }
.kcam-dock-head > span:first-child { min-width: 0; text-wrap: balance; }
.kcam-dock-waiting { display: flex; flex: none; flex-wrap: wrap; justify-content: flex-end; gap: 4px; max-width: 45%; }
.kcam-dock-waiting i { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 6px rgb(var(--gold-rgb) / .55); animation: kcam-wait .35s ease-out both; }
.kcam-dock-waiting i.is-read { background: var(--wine, var(--unsorted)); box-shadow: 0 0 0 1px rgb(255 255 255 / .35); }
.kcam-dock-waiting i.is-roomless { opacity: .55; box-shadow: 0 0 0 1px rgb(255 255 255 / .5); }
@keyframes kcam-wait { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
.kcam-dock-window {
    position: relative; height: clamp(44px, calc(9dvh - 6px), 72px); overflow: hidden; border-radius: 8px; transition: height .36s cubic-bezier(.3, .7, .3, 1);
    -webkit-mask: linear-gradient(transparent, #000 8px, #000 calc(100% - 8px), transparent);
    mask: linear-gradient(transparent, #000 8px, #000 calc(100% - 8px), transparent);
}

/* Shut until a rack is shown in it: the bottles caught wait on the line over it while Kept finds their spots. */
.kcam-dock-window:empty { height: 0; }
.kcam-dock-head:has(+ .kcam-dock-window:empty) { margin-bottom: 0; }
.kcam-dock-rack { position: absolute; left: 0; top: 0; }
.kcam-dock-rack .rack { box-shadow: none; }
.kcam-dock-rack .is-kept { opacity: .4; filter: saturate(.55); }
.kcam-dock-rack .is-new { animation: kcam-settle .55s ease-out; }
@keyframes kcam-settle { from { box-shadow: 0 0 0 2px var(--gold-bright), 0 0 10px 3px rgb(var(--gold-bright-rgb) / .7); filter: brightness(1.35); } }
/* Over the window, whatever shape it is drawn in: a bottle end drawn filled is otherwise placed where it lies. */
.kcam-dock > i.kcam-dock-flyer.filled { position: absolute; z-index: 2; margin: 0; pointer-events: none; }
.kcam.kcam > .kcam-tally { position: absolute; left: 1rem; right: 1rem; top: 40%; z-index: 3; margin: 0; padding: 1rem; border-radius: 16px; background: var(--surface); font-family: var(--serif); font-size: 1.35rem; line-height: 1.25; text-align: center; animation: kcam-know .4s ease-out both; }
.marked-coming.has-photo { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .7rem .9rem; align-items: center; }
.marked-coming-photo { grid-column: 1 / -1; position: relative; overflow: hidden; max-height: 42vh; border-radius: 6px; }
.marked-coming-photo img { display: block; width: 100%; height: 100%; max-height: 42vh; object-fit: contain; opacity: .8; }
.marked-coming-photo::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--gold); animation: marked-reading 2.4s ease-in-out infinite alternate; }
@keyframes marked-reading { from { top: 2%; } to { top: 97%; } }
.marked-ring.is-first { animation: marked-first 1s ease-out 2 both; animation-delay: var(--first, 2s); transform-box: fill-box; transform-origin: center; }
@keyframes marked-first { 0%, 100% { scale: 1; } 40% { scale: 1.5; } }
.level-just { display: grid; gap: .55rem; margin: 0 0 .8rem; padding: .7rem .8rem; border: 1px solid rgb(var(--gold-rgb) / .4); border-radius: 12px; }
.level-just p { display: grid; gap: .1rem; margin: 0; }
.level-just strong { font-family: var(--serif); font-size: 1.15rem; font-weight: 400; }
.level-just span { color: var(--muted); font-size: .92rem; }
.level-just-frame { position: relative; overflow: hidden; width: min(100%, 12rem); margin: 0 auto; border-radius: 8px; }
.level-just-frame img { display: block; width: 100%; }
.level-just-frame::after { content: ""; position: absolute; left: 0; right: 0; top: var(--line, 50%); height: 2px; background: var(--gold); animation: level-just-line 1.1s cubic-bezier(.2, .8, .3, 1) both; }
@keyframes level-just-line { from { top: 100%; } to { top: var(--line, 50%); } }
.plate-pour { display: grid; grid-template-columns: 4.4rem 1fr; gap: .9rem; align-items: center; margin: 0 0 1rem; padding: .85rem 1rem; border: 1px solid rgb(var(--gold-rgb) / .4); border-radius: 14px; }
.plate-pour svg { width: 100%; height: auto; overflow: visible; }
.plate-pour-wine { fill: var(--wine, var(--unsorted)); clip-path: inset(100% 0 0 0); animation: plate-pour-fill 1.5s ease-out .3s forwards; }
@keyframes plate-pour-fill { to { clip-path: inset(0 0 0 0); } }
.plate-pour-line { fill: none; stroke: var(--text); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.plate-pour p { display: grid; gap: .15rem; margin: 0; animation: arrive .5s ease-out 1.2s both; }
.plate-pour small { color: var(--muted); font-size: .88rem; }
.plate-pour strong { font-family: var(--serif); font-size: 1.15rem; font-weight: 400; }
.receipt-paper { position: fixed; left: 50%; top: 5rem; z-index: 20; width: min(70vw, 16rem); margin-left: calc(min(70vw, 16rem) / -2); pointer-events: none; animation: receipt-paper 1.3s cubic-bezier(.5, 0, .7, .4) .15s both; }
.receipt-paper img { display: block; width: 100%; border-radius: 4px; box-shadow: 0 8px 26px rgb(0 0 0 / .55); }
@keyframes receipt-paper { 60% { opacity: 1; transform: translateY(0) rotate(-1.5deg); } 100% { opacity: 0; transform: translateY(-16rem) rotate(-5deg); } }
.is-from-receipt .found { animation: receipt-line .55s cubic-bezier(.2, .8, .3, 1) both; animation-delay: calc(.5s + var(--n, 0) * 110ms); }
@keyframes receipt-line { from { opacity: 0; transform: translateY(22px) scale(.97); } to { opacity: 1; transform: none; } }
.scan-board { margin: 0 0 1.2rem; padding: 0; list-style: none; display: grid; gap: 6px; }
.scan-board li { display: grid; grid-template-columns: 4.2rem 1fr 2.2rem; gap: .5rem; align-items: center; font-size: .92rem; }
.scan-board li.is-leading strong { color: var(--gold); }
.scan-board strong { font-weight: 600; }
.scan-board i { display: block; height: 8px; border-radius: 4px; background: rgb(var(--gold-rgb) / .7); width: var(--share, 0%); }
.scan-board li.is-moved i { animation: scan-bar .8s ease-out both; }
@keyframes scan-bar { from { width: 0; } to { width: var(--share, 0%); } }
.scan-board span { text-align: right; font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) {
    .kcam.is-locking:not(.is-caught) .kcam-guide::after, .marked-coming-photo::after, .marked-ring.is-first { animation: none; }
    .kcam-rack i.is-dropping, .level-just-frame::after, .kcam-know, .plate-pour p, .is-from-receipt .found, .scan-board li.is-moved i { animation: none; }
    .kcam-dock-waiting i, .kcam-dock-rack .is-new { animation: none; }
    .kcam-dock-window { transition: none; }
    .plate-pour-wine { animation: none; clip-path: none; }
}
.kcam.kcam > .kcam-focus { position: absolute; width: 64px; height: 64px; margin: -32px 0 0 -32px; border: 1.5px solid var(--gold); border-radius: 50%; pointer-events: none; animation: kcam-focus .9s ease-out both; }
@keyframes kcam-focus { from { opacity: 0; scale: 1.4; } 30% { opacity: 1; scale: 1; } to { opacity: 0; scale: 1; } }
.kcam > :not(.kcam-view) { position: relative; }
.kcam-top {
    display: flex; align-items: center; justify-content: space-between; gap: .8rem;
    padding: calc(env(safe-area-inset-top) + .7rem) 1rem 1.2rem;
    background: linear-gradient(rgb(0 0 0 / .55), transparent);
}
.kcam-round {
    display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
    border: 0; border-radius: 50%; background: rgb(0 0 0 / .4); color: #fff; backdrop-filter: blur(6px);
}
.kcam-round svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.kcam-round[aria-pressed="true"] { color: var(--gold); }
.kcam-count {
    margin-right: auto; padding: .45rem .85rem; border-radius: 1.1rem; background: rgb(0 0 0 / .4);
    font-size: .9rem; font-variant-numeric: tabular-nums; backdrop-filter: blur(6px);

    /* A long count, "5 bottles and cans · about $424 · 5 ready now", goes onto two even lines rather than leaving a word alone. */
    line-height: 1.3; text-wrap: balance;
}
.kcam-guide { position: relative; align-self: center; justify-self: center; width: min(64vw, 21rem); max-height: 100%; aspect-ratio: 3 / 4; }
.kcam-guide > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.kcam-guide rect { fill: none; }
.kcam-guide-edge { stroke: rgb(255 255 255 / .6); stroke-width: 1.5; transition: stroke .3s ease; }
.kcam-guide-fill { stroke: var(--gold); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .12s linear; }
.kcam-got { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; }
.kcam-got svg { width: 3.4rem; height: 3.4rem; fill: none; stroke: var(--gold); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 1px 8px rgb(0 0 0 / .55)); }
.kcam.is-caught .kcam-got { animation: kcam-got .9s ease-out both; }
.kcam.is-caught .kcam-guide-edge { stroke: var(--gold); }
@keyframes kcam-got { 0% { opacity: 0; transform: scale(.7); } 25% { opacity: 1; transform: scale(1.06); } 70% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.kcam-hint { min-height: 2.4em; margin: .6rem 0 0; padding: 0 1rem; font-family: var(--serif); font-size: 1.15rem; text-align: center; text-shadow: 0 1px 8px rgb(0 0 0 / .75); }
.kcam-hint.arriving { animation: arrive .35s ease-out; }
.kcam-caught { display: flex; gap: .55rem; min-height: 4.9rem; margin: 0; padding: .3rem 1rem .4rem; list-style: none; overflow-x: auto; scrollbar-width: none; }
.kcam-caught::-webkit-scrollbar { display: none; }
.kcam-caught li { display: grid; flex: none; gap: .25rem; justify-items: center; align-content: start; width: 3.6rem; animation: kcam-in .45s ease-out both; }
.kcam-caught img { width: 3.4rem; height: 3.4rem; border: 1.5px solid var(--gold); border-radius: 10px; object-fit: cover; }
.kcam-caught span {
    display: -webkit-box; overflow: hidden; width: 100%; color: rgb(255 255 255 / .88);
    font-size: .62rem; line-height: 1.15; text-align: center; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.kcam-caught li.is-named span { animation: arrive .35s ease-out; }
.kcam-caught li { position: relative; }
.kcam-caught li.is-unread img { border-style: dashed; border-color: rgb(255 255 255 / .55); opacity: .45; transition: opacity .3s ease; }
.kcam-caught li.is-unread::after {
    content: "?"; position: absolute; top: 1.05rem; left: 50%; transform: translateX(-50%);
    color: #fff; font-family: var(--serif); font-size: 1.1rem; text-shadow: 0 1px 6px rgb(0 0 0 / .7);
}
.kcam-caught li.is-unread span { color: rgb(255 255 255 / .6); }
.kcam-caught li.is-again img { opacity: .6; }
.kcam-caught li.is-back img { opacity: .6; }
.kcam-caught li.is-back span { color: rgb(255 255 255 / .6); }
.kcam-caught li.is-again span { color: rgb(255 255 255 / .6); }
@keyframes kcam-in { from { opacity: 0; transform: translateY(8px) scale(.9); } to { opacity: 1; transform: none; } }
.kcam-bottom {
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
    padding: .5rem 1rem calc(env(safe-area-inset-bottom) + 1rem); background: linear-gradient(transparent, rgb(0 0 0 / .6));
}
.kcam-other {
    justify-self: start; min-height: 44px; padding: .6rem 0; border: 0; background: none; color: rgb(255 255 255 / .82);
    font: inherit; font-size: .82rem; text-decoration: underline; text-underline-offset: 3px;
}
.kcam-other, .kcam-undo { grid-column: 1; grid-row: 1; }
.kcam-undo {
    justify-self: start; min-height: 44px; padding: .5rem .9rem; border: 1.5px solid var(--gold); border-radius: 99px;
    background: rgb(0 0 0 / .55); color: #fff; font: inherit; font-size: .88rem; backdrop-filter: blur(6px);
}
.kcam-caught li.is-offered img { outline: 2px solid #fff; outline-offset: 1px; }
.kcam-time { justify-self: end; color: rgb(255 255 255 / .85); font-size: .9rem; font-variant-numeric: tabular-nums; }
.kcam-shutter { display: grid; place-items: center; width: 76px; height: 76px; padding: 0; border: 3px solid #fff; border-radius: 50%; background: transparent; }
.kcam-shutter span { width: 58px; height: 58px; border-radius: 50%; background: var(--gold); transition: width .25s ease, height .25s ease, border-radius .25s ease; }
.kcam.is-filming .kcam-shutter span { width: 28px; height: 28px; border-radius: 7px; }
.kcam.is-filming .kcam-other { visibility: hidden; }

/* Filming starts the moment the camera opens, so the phone's own camera stays a tap away until the first label is caught. */
.kcam.is-filming:not(.has-caught) .kcam-other { visibility: visible; }

/* For one photo: the shutter takes it now, the phone's camera stays a tap away, and there is no count or time. A menu's page has a
   page-shaped frame; a dinner, a square one. */
.kcam[data-camera-kind].is-filming .kcam-shutter span { width: 58px; height: 58px; border-radius: 50%; }
.kcam[data-camera-kind].is-filming .kcam-other { visibility: visible; }
.kcam[data-camera-kind] .kcam-count,
.kcam[data-camera-kind] .kcam-time,
.kcam[data-camera-kind] .kcam-caught { visibility: hidden; }
.kcam[data-camera-kind="page"] .kcam-guide { width: min(84vw, 30rem); aspect-ratio: 1 / 1.36; }
.kcam[data-camera-kind="plate"] .kcam-guide { width: min(80vw, 28rem); aspect-ratio: 1; }
.kcam[data-camera-kind="table"] .kcam-guide { width: min(88vw, 32rem); aspect-ratio: 1; }
.kcam[data-camera-kind="date"] .kcam-guide { width: min(72vw, 24rem); aspect-ratio: 2 / 1; }
.kcam[data-camera-kind="bottle"] .kcam-guide { width: min(44vw, 14rem); aspect-ratio: 1 / 2.6; }

/* Several pages in one go, as a receipt's: the count and the strip of pages are shown, and once one is taken the shutter is Done. */
.kcam[data-camera-several] .kcam-count,
.kcam[data-camera-several] .kcam-caught { visibility: visible; }
.kcam[data-camera-kind].has-pages .kcam-shutter span { width: 28px; height: 28px; border-radius: 7px; }

/* A page held up is drawn round in gold once its edges are found, and the frame steps back. */
.kcam > .kcam-page { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0; transition: opacity .2s ease; }
.kcam-page polygon { fill: rgb(var(--gold-rgb) / .1); stroke: var(--gold); stroke-width: 3; stroke-linejoin: round; }
.kcam-page.is-found { opacity: 1; }
.kcam.has-page .kcam-guide { opacity: .2; }
.kcam > .kcam-leave {
    position: absolute; inset: auto 1rem calc(env(safe-area-inset-bottom) + 7rem); padding: 1rem 1.1rem;
    border-radius: var(--radius); background: var(--surface); color: var(--text); box-shadow: 0 12px 32px rgb(0 0 0 / .55);
}
.kcam-leave p { margin: 0 0 .9rem; }
.kcam-leave div { display: flex; gap: .6rem; justify-content: flex-end; }

/*
    A video already taken, watched in Kept's camera as if it were being filmed: it plays in the picture, a ring round the shutter fills as the
    video goes by, and the strip, the count and the rack fill as its labels are caught and read. Once watched, the picture steps back while
    the last labels are read, and there is no way out but the page that checks them. A video filmed on its side is shown whole. Less motion
    asked for, the video is not shown playing faster than it was filmed: the last label caught stands still in its place.
*/
.kcam.kcam.is-played .kcam-other { visibility: hidden; }
.kcam.is-played .kcam-shutter { position: relative; border-color: rgb(255 255 255 / .28); }
.kcam.is-played .kcam-shutter::before {
    content: ""; position: absolute; inset: -3px; border-radius: 50%;
    background: conic-gradient(var(--gold) calc(var(--played, 0) * 1turn), transparent 0);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
}
.kcam.kcam.is-played .kcam-shutter span { width: 12px; height: 12px; border-radius: 50%; }
.kcam.is-watched .kcam-shutter span { animation: kcam-breathe 1.2s ease-in-out infinite alternate; }
@keyframes kcam-breathe { from { opacity: .4; transform: scale(.75); } to { opacity: 1; transform: scale(1.3); } }
.kcam.is-watched .kcam-view { opacity: .5; transition: opacity .5s ease; }
.kcam.is-watched .kcam-top [data-camera-close] { visibility: hidden; }
.kcam.is-wide .kcam-view { object-fit: contain; }
.kcam.kcam > .kcam-still { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.kcam.kcam.is-wide > .kcam-still { object-fit: contain; }
.kcam.is-played.is-calm .kcam-view, .kcam.is-played.has-still .kcam-view { opacity: 0; }

/* Watched, each label caught is shown in the frame while it is read, with the gold line going over it. */
.kcam.is-reading .kcam-guide::after { animation: kcam-sweep 1.1s ease-in-out infinite alternate; }
.kcam-caught li.is-fresh img { animation: kcam-fresh .9s ease-out both; }
@keyframes kcam-fresh { from { box-shadow: 0 0 0 2px var(--gold-bright), 0 0 12px 3px rgb(var(--gold-bright-rgb) / .7); } }
@media (prefers-reduced-motion: reduce) {
    .kcam.is-watched .kcam-shutter span, .kcam-caught li.is-fresh img, .kcam.is-reading .kcam-guide::after { animation: none; }
    .kcam.is-watched .kcam-view { transition: none; }
}
@media (prefers-reduced-motion: reduce) {
    .kcam.is-caught .kcam-got, .kcam-caught li, .kcam-hint.arriving, .kcam-caught li.is-named span { animation: none; }
    .kcam.is-caught .kcam-got { opacity: 1; }
    .kcam-guide-fill, .kcam-shutter span { transition: none; }
}
@media (prefers-reduced-motion: reduce) {
    .found.is-filled, .found.is-filled .found-title strong, .found.is-filled .suggestion-shape { animation: none; }
}

/*
    A walk through the cellar in Kept's camera (camera.js, walk). A rack is held in view, not a label held up, so the frame goes round most
    of the picture. Each rack found stands at the foot in the order walked, drawn as it stands and made small to fit its box (camera.js
    fits it to WALK_ART_WIDE by WALK_ART_TALL, which are this box's size): the newest builds up from its floor where the gold mark of the
    moment that found it was, and a rack another view changes glows a moment, its numbers changing in place. A fridge's temperature shows
    on its display once seen, and a maker's name under the rack's own. Done, the picture steps back behind the racks while Kept checks
    them, and there is no way out but the page that checks them. Less motion asked for, everything is simply where it goes.
*/
.kcam[data-camera-walk="true"] .kcam-guide { width: calc(100vw - 2rem); max-width: 44rem; height: 100%; max-height: none; aspect-ratio: auto; }
.kcam[data-camera-walk="true"] .kcam-caught { display: none; }
/* The racks stand on a shade of their own, so that their names read over a bright picture as well as a dark one. */
.kcam-walk {
    display: flex; align-items: flex-end; gap: .7rem; min-height: 7.6rem; margin: 0; padding: .55rem 1rem .35rem; list-style: none; overflow-x: auto; scrollbar-width: none;
    background: linear-gradient(rgb(0 0 0 / 0), rgb(0 0 0 / .62) 1.6rem, rgb(0 0 0 / .62)); text-shadow: 0 1px 4px rgb(0 0 0 / .8);
}
.kcam-walk::-webkit-scrollbar { display: none; }
.kcam-walk > li { display: grid; flex: none; grid-template-rows: 76px auto auto auto; justify-items: center; gap: .05rem; width: 104px; }
.kcam-walk-art { position: relative; display: block; width: 104px; height: 76px; margin-bottom: .4rem; border-radius: 8px; }
.kcam-walk-art .kcam-dock-rack { position: absolute; width: max-content; transform-origin: 0 0; }
.kcam-walk-art .rack { box-shadow: none; }
.kcam-walk-art .fridge-temp { visibility: hidden; }
.kcam-walk-temp {
    position: absolute; left: 50%; translate: -50% 0; color: #86ccff; pointer-events: none;
    font: 600 .56rem/1 ui-monospace, "Cascadia Mono", Consolas, monospace; text-shadow: 0 0 6px rgba(70, 160, 255, .95);
}
.kcam-walk strong { overflow: hidden; max-width: 100%; color: #fff; font-size: .72rem; font-weight: 500; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.kcam-walk-maker, .kcam-walk-holds { overflow: hidden; max-width: 100%; min-height: 1.2em; font-size: .62rem; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.kcam-walk-maker { color: var(--gold); }
.kcam-walk-holds { color: rgb(255 255 255 / .72); font-variant-numeric: tabular-nums; }

/* The mark of a moment caught and still being looked at: a rack's outline in gold, with the gold line going over it. */
.kcam-walk-new strong { color: var(--gold); font-weight: 400; }
.kcam-walk-new .kcam-walk-art i { position: absolute; left: 30px; right: 30px; top: 6px; bottom: 0; overflow: hidden; border: 1.5px dashed rgb(var(--gold-rgb) / .8); border-radius: 6px; }
.kcam-walk-new .kcam-walk-art i::after { content: ""; position: absolute; left: 10%; right: 10%; top: 4%; height: 2px; background: var(--gold); animation: kcam-sweep 1.1s ease-in-out infinite alternate; }
.kcam-walk-rack.is-growing .kcam-walk-art { animation: kcam-walk-build .52s cubic-bezier(.2, .8, .3, 1) both; }
.kcam-walk-rack.is-growing > :not(.kcam-walk-art) { animation: arrive .35s ease-out .2s both; }
@keyframes kcam-walk-build { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
.kcam-walk-rack.is-joined .kcam-walk-art { animation: kcam-walk-pulse 1.3s ease-out; }
@keyframes kcam-walk-pulse {
    0% { scale: 1.08; filter: brightness(1.7) drop-shadow(0 0 3px var(--gold-bright)) drop-shadow(0 0 10px rgb(var(--gold-bright-rgb) / .9)); }
    35% { scale: 1; }
    100% { filter: none; }
}
.kcam-walk .arriving { animation: arrive .35s ease-out; }
.kcam-walk-rack.is-joined :is(strong, .kcam-walk-holds) { animation: kcam-walk-told 1.3s ease-out; }
.kcam-walk-rack.is-joined .arriving { animation: arrive .35s ease-out, kcam-walk-told 1.3s ease-out; }
@keyframes kcam-walk-told { from { color: var(--gold-bright); } }
.kcam-walk > li.is-offered .kcam-walk-art { outline: 1.5px solid rgb(255 255 255 / .85); outline-offset: 1px; }

/* Done: the camera's last picture steps back behind the racks while Kept checks them, and the shutter breathes. */
.kcam.is-walked .kcam-view, .kcam.is-walked > .kcam-still { opacity: .5; transition: opacity .5s ease; }
.kcam.is-walked .kcam-top [data-camera-close], .kcam.is-walked .kcam-other, .kcam.is-walked .kcam-time { visibility: hidden; }
.kcam.is-walked .kcam-shutter { border-color: rgb(255 255 255 / .28); }
.kcam.kcam.is-walked .kcam-shutter span { width: 12px; height: 12px; border-radius: 50%; animation: kcam-breathe 1.2s ease-in-out infinite alternate; }
@media (prefers-reduced-motion: reduce) {
    .kcam-walk-rack.is-growing .kcam-walk-art, .kcam-walk-rack.is-growing > :not(.kcam-walk-art), .kcam-walk .arriving { animation: none; }
    .kcam-walk-new .kcam-walk-art i::after, .kcam.kcam.is-walked .kcam-shutter span { animation: none; }
    .kcam-walk-rack.is-joined .kcam-walk-art { animation: none; outline: 1.5px solid var(--gold); outline-offset: 1px; }
    .kcam-walk-rack.is-joined :is(strong, .kcam-walk-holds, .arriving) { animation: none; color: var(--gold-bright); }
    .kcam.is-walked .kcam-view, .kcam.is-walked > .kcam-still { transition: none; }
}
.leave { margin-top: 1.2rem; text-align: center; }

/* Three short fields side by side: what a wine costs and when to drink it. */
.trio { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: .6rem; }
.trio .field { margin-bottom: .3rem; }
.estimates { margin-bottom: 1.1rem; }
.estimates .notice { margin: .5rem 0; }
.estimates small { margin-bottom: .2rem; }
.estimates button.link, .place button.link { min-height: 44px; }

.place { margin-bottom: 1rem; scroll-margin-top: 5rem; }
.estimates { scroll-margin-top: 5rem; }

/*
    Wine, spirits and beer share one form, and what differs is mostly words: a spirit or a beer has a style
    where a wine has a grape, a spirit has no years to be drunk in, and a beer has a date. The type chosen in
    the form decides which are shown, at once and without a script. Words for the other drinks start hidden,
    so a browser that cannot tell what is chosen shows the wine's.
*/
.for-other, .for-spirit, .for-beer { display: none; }
.drink:has(select[data-type] option:is([value="Spirit"], [value="Beer"], [value="Mixer"]):checked) .for-wine { display: none; }
.drink:has(select[data-type] option:is([value="Spirit"], [value="Beer"], [value="Mixer"]):checked) .for-other { display: inline; }
.drink:has(select[data-type] option:is([value="Spirit"], [value="Beer"], [value="Mixer"]):checked) div.for-other { display: block; }
.drink:has(select[data-type] option:is([value="Spirit"], [value="Mixer"]):checked) .for-spirit,
.drink:has(select[data-type] option[value="Beer"]:checked) .for-beer { display: block; }
.drink:has(select[data-type] option[value="Beer"]:checked) span.for-beer { display: inline; }
.drink:has(select[data-type] option:is([value="Spirit"], [value="Mixer"]):checked) .not-for-spirit,
.drink:has(select[data-type] option[value="Beer"]:checked) .not-for-beer { display: none; }

/* With the years gone, a spirit's cost is a field of the usual width, not a third of the row. */
.drink:has(select[data-type] option[value="Spirit"]:checked) .estimates .trio { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

/* The date on a beer: the day it was canned and its best-before day side by side, and a way to read one from a photo. */
.pack-date { margin-bottom: 1.1rem; }

/* A date field has a width of its own that it will not go under unless its column is allowed to. */
.pack-date .pair { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.pack-date .field { margin-bottom: .3rem; }
.pack-date .pair + small { margin: 0; }
.pack-date-photo { display: flex; flex-wrap: wrap; align-items: center; gap: 0 .9rem; margin: .1rem 0 0; }
.pack-date-status { color: var(--muted); font-size: .88rem; }

/*
    The best-before box. When that day was worked out from the day of packaging it is shown in the box, in
    the colour of something Kept supplied, where a date printed on the can would go. It is laid over the
    field, and the field's own blank is hidden under it. Tapping the box still opens it for a printed date.
*/
.pack-date-box { position: relative; display: block; }
.pack-date-worked { position: absolute; inset: 0 auto 0 0; display: flex; align-items: center; max-width: 100%; padding: 0 .85rem; overflow: hidden; color: var(--gold-bright); white-space: nowrap; pointer-events: none; }
input[type="date"].is-worked { color: transparent; }
.pack-date-box:focus-within .pack-date-worked { display: none; }
.pack-date-box:focus-within input[type="date"].is-worked { color: var(--text); }

/* What the dates come to, under them: when to drink it, and how that was arrived at. */
.pack-date-fresh { margin: .15rem 0 .55rem; color: var(--muted); font-size: .88rem; line-height: 1.5; }
.pack-date-fresh .when { margin-right: .3rem; }

/* A photo of the date being read: the label's viewfinder, smaller, because it sits among the fields. */
.scan-date { margin: .9rem 0 .5rem; }
.scan-date .scan-frame { border-radius: 14px; view-transition-name: none; }
.scan-date .scan-photo { min-width: 9rem; min-height: 7rem; max-height: 11rem; }
.scan-date .scan-corners { inset: 9px; }
.scan-date .scan-caption { margin-top: .7rem; font-size: 1.02rem; }

/* A field that has just been filled in from a photo catches the light, so that it is seen to have changed. */
.just-filled { animation: filled 1.6s ease-out; }
@keyframes filled {
    from { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold), 0 0 18px 3px rgb(var(--gold-bright-rgb) / .4); }
    to { box-shadow: 0 0 0 0 rgb(var(--gold-bright-rgb) / 0); }
}

/* A suggestion the app has already filled in, with why. */
.advice {
    margin-bottom: .9rem;
    padding: .75rem 1rem;
    border: 1px solid rgb(var(--gold-rgb) / .5);
    border-radius: var(--radius);
    background: var(--surface);
}

.advice-label { display: block; color: var(--faint); font-size: .72rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.advice strong { display: block; margin-top: .1rem; font-family: var(--serif); font-size: 1.36rem; line-height: 1.2; color: var(--text); }
.advice p { margin: .2rem 0 0; color: var(--muted); font-size: .9rem; line-height: 1.4; }
.advice .btn { min-height: 46px; }

/* A place for each bottle being added: its number, where it goes, and the way to choose somewhere else. */
.places { list-style: none; margin: 0 0 .5rem; padding: 0; counter-reset: place; }
.place-row { display: grid; grid-template-columns: 1.5rem minmax(0, 1fr) auto; gap: 0 .5rem; align-items: center; min-height: 44px; counter-increment: place; scroll-margin-top: 5rem; }
.place-row::before { content: counter(place); color: var(--muted); font-size: .82rem; font-variant-numeric: tabular-nums; text-align: center; }
.place-name { font-size: 1rem; font-weight: 500; }
.place-row > .advice, .place-row > .field-validation-error, .place-row > details.choose-place { grid-column: 1 / -1; }
.place-row > .advice { margin-bottom: .4rem; }
.place-row > .field-validation-error { margin-bottom: .3rem; }
.place-row > button.link { min-height: 44px; font-size: .9rem; white-space: nowrap; }

/* One row needs no number. */
.place-row:only-child { grid-template-columns: minmax(0, 1fr) auto; }
.place-row:only-child::before { content: none; }

/*
    Choosing a place: a rack drawn as a choice. Every place with room is a label round a radio button, so a
    tap chooses it and lights it gold with no script. The drawing scrolls inside a short box, which keeps
    its slots big enough to tap however tall the rack is. The buttons above it draw another rack.
*/
details.choose-place { margin-top: 0; }
details.choose-place > .chips { margin-bottom: 0; }
details.choose-place > small { margin-top: 0; }
button.chip { background: none; font: inherit; font-size: .88rem; cursor: pointer; }

.pick-stage {
    max-height: 20rem;
    overflow: auto;
    margin: .6rem calc(var(--gutter) * -1) .4rem;
    padding: .6rem var(--gutter) 1rem;
    overscroll-behavior: contain;
}

.pick-stage .rack { margin-inline: auto; }
.pick-stage .rack-slots { --track: 2.75rem; }

.rack label { margin-bottom: 0; cursor: pointer; }
.rack label input { position: absolute; opacity: 0; pointer-events: none; }
.rack label:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }

label.hole:has(input:checked) {
    background: var(--gold);
    color: var(--on-gold);
    font-weight: 700;
    text-shadow: none;
    box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--gold);
    transition: box-shadow .15s ease;
}

/* A shelf, a bay or a bin holds several bottles, so the whole of it is the thing to tap. Chosen, it is ringed, and the place the bottle would take turns gold. */
label.shelf-run, label.bay { border-radius: 8px; }
label.shelf-run:has(input:checked), label.bay:has(input:checked) { background: rgb(var(--gold-rgb) / .08); box-shadow: 0 0 0 1.5px var(--gold); transition: box-shadow .15s ease; }
label:has(input:checked) > .hole.next { background: var(--gold); box-shadow: 0 0 0 1.5px var(--gold); }
label:has(input:checked) > .profile.next { background: var(--gold); }
label.bin:has(input:checked) { background: rgb(var(--gold-bright-rgb) / .42); }

/* The places that are not in any drawing: somewhere in the rack, or in no rack at all. */
.pick-other { display: flex; flex-wrap: wrap; gap: 0 1.3rem; margin: .3rem 0 0; }
.pick-other label { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; margin: 0; color: var(--muted); font-size: .9rem; font-weight: 400; }
.pick-other input { flex: none; width: 1.2rem; height: 1.2rem; margin: 0; accent-color: var(--gold); }

/* A form's first submit button is the one the return key presses. This one is there only to be that. */
.default-action, .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* Where a wine is in its drinking window. */
.when { display: inline-block; padding: .05rem .5rem; border: 1px solid currentColor; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.when-hold { color: var(--stage-keep); }
.when-ready { color: var(--stage-ready); }
.when-drinksoon { color: var(--stage-soon); }
.when-past { color: var(--stage-past); }
.facts .when { margin-right: .35rem; }

.chips { display: flex; gap: .45rem; margin: 0 calc(var(--gutter) * -1) .6rem; padding: 0 var(--gutter); overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }

/* Where the chips are the choice itself, every one of them is in sight: they wrap, and do not scroll off the side. */
.chips.wrap { flex-wrap: wrap; overflow-x: visible; }
.chips.wrap .chip { min-height: 44px; }
.pick-ask { margin: .1rem 0 .6rem; color: var(--muted); font-size: .92rem; }
.chip { flex: none; display: inline-flex; align-items: center; gap: .4rem; min-height: 38px; padding: 0 .9rem; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: .88rem; text-decoration: none; }
.chip span { opacity: .75; }
.chip .dot { width: .6rem; height: .6rem; }
.chip[aria-current="true"], .chip[aria-pressed="true"] { border-color: var(--gold); background: none; color: var(--text); }

/* A chip for a stage of drinking takes that stage's colour once it is chosen, so the list below reads as the same thing. */
.chip.when-hold[aria-current="true"] { border-color: var(--stage-keep); background: rgb(var(--stage-keep-rgb) / .14); color: var(--stage-keep); }
.chip.when-ready[aria-current="true"] { border-color: var(--stage-ready); background: rgb(var(--stage-ready-rgb) / .12); color: var(--stage-ready); }
.chip.when-past[aria-current="true"] { border-color: var(--danger); background: rgba(255, 144, 134, .14); color: var(--danger); }

/* A plan: moves to make, in order. */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }

.step {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: .15rem .8rem;
    align-items: center;
    margin-bottom: .6rem;
    padding: .8rem .9rem .8rem 2.9rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    counter-increment: step;
}

.step::before {
    content: counter(step);
    position: absolute;
    top: .8rem;
    left: .8rem;
    display: grid;
    place-items: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: var(--wine, var(--unsorted));
    color: #fff;
    font-size: .74rem;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
}

.step > * { grid-column: 1; }
.step form { grid-column: 2; grid-row: 1 / span 4; margin: 0; }
.step .btn { min-height: 44px; padding: 0 1rem; }
.steps-all { margin: .7rem 0 1.3rem; }
.step-wine { color: var(--text); font-size: 1rem; font-weight: 500; line-height: 1.3; text-decoration: none; }
.step-route { color: var(--muted); font-size: .88rem; }
.step-route strong { color: var(--text); font-weight: 600; }
.step-why { color: var(--muted); font-size: .8rem; line-height: 1.35; }
.step-wait { color: var(--muted); font-size: .8rem; font-style: italic; line-height: 1.35; }

/* A trip: every move off one rack, with how many go where and why. The moves fold inside it. */
.trip { scroll-margin-top: 5rem; }
.trip-head { display: flex; justify-content: space-between; align-items: center; gap: .8rem; }
.trip-from { font-family: var(--serif); font-size: 1.2rem; }
.trip-to { margin: .25rem 0 0; color: var(--text); font-size: .9rem; }
.trip-why { margin: .2rem 0 0; color: var(--muted); font-size: .84rem; }
.trip details.more { margin-top: .5rem; }
.trip h3 { margin: .6rem 0 .5rem; color: var(--muted); font: 500 .8rem var(--sans); letter-spacing: .08em; text-transform: uppercase; }
.trip .step { background: rgba(0, 0, 0, .18); }
.trip-lead { margin: -.3rem 0 .8rem; font-size: .92rem; }
/* Moves worth making, one rack at a time: a tab for each rack, and the board of the one chosen, its rack drawn in a frame that scrolls. */
.trip-boards { margin-bottom: 1rem; }
.trip-boards .chip span { margin-left: .3rem; color: var(--muted); font-weight: 600; }
.trip-boards .chip[aria-current="page"] { border-color: var(--gold); color: var(--text); }
.trip-board { scroll-margin-top: 5rem; margin: 0 0 1.4rem; }
.trip-board > h2 { margin: 0; }
.trip-board .trip-rack { max-height: 320px; margin: .8rem 0 .4rem; }
.trip-board h3 { margin: 1rem 0 .5rem; color: var(--muted); font: 500 .8rem var(--sans); letter-spacing: .08em; text-transform: uppercase; }
details.plan-how, details.tidier { margin-top: 0; }

/* Cellar: the opening figures and the list */

.summary { color: var(--muted); margin: 0 0 1rem; }

.hero { margin-bottom: 1.3rem; }

/*
    Tonight: a few bottles worth opening now, side by side, to swipe between. Each card is tinted with its
    wine's colour and ends with a window onto the rack the bottle is in, where that wine's bottles are lit.
*/
.tonight { margin: 0 calc(var(--gutter) * -1) 1.1rem; }

.tonight-track {
    display: flex;
    gap: .8rem;
    padding: .2rem var(--gutter) .9rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
}

.tonight-track::-webkit-scrollbar { display: none; }

/* The way from what to open tonight to a tasting, quiet under the cards so that it offers rather than asks. */
.tonight-taste { margin: 0 0 1.4rem; font-size: .92rem; }
.tonight-taste a { color: var(--gold-bright); font-weight: 500; text-decoration: none; }
.tonight-taste a::after { content: " \203A"; }
.tonight-taste a:hover, .tonight-taste a:focus-visible { text-decoration: underline; }

.pour {
    flex: 0 0 min(88%, 23rem);
    scroll-snap-align: start;
    display: grid;
    align-content: start;
    gap: .75rem;
    padding: 1rem 1.05rem 1.05rem;
    border: 1px solid var(--line);
    border-radius: 22px;
    background:
        radial-gradient(130% 80% at 100% 0%, color-mix(in srgb, var(--wine, var(--unsorted)) 20%, transparent), transparent 64%),
        var(--surface);
}

.pour:only-child { flex-basis: 100%; }
.pour-top { display: flex; align-items: center; justify-content: space-between; gap: .6rem; min-height: 1.5rem; }
.pour-lead { color: var(--faint); font-size: .72rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.pour-wine { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: .9rem; align-items: center; color: inherit; text-decoration: none; }
.pour-wine .thumb { box-shadow: none; }
.pour-maker { display: block; font: 400 1.42rem/1.12 var(--serif); }
.pour-name { display: block; margin-top: .1rem; font-size: .98rem; line-height: 1.3; color: var(--muted); }
.pour-facts { display: block; margin-top: .2rem; color: var(--faint); font-size: .84rem; }
.pour-why { margin: 0; font-size: .95rem; line-height: 1.45; }
.pour-serve { margin: 0; color: var(--muted); font-size: .84rem; line-height: 1.4; }

.pour-where {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: .9rem;
    align-items: center;
    margin: 0;
    padding: .55rem .8rem .55rem .55rem;
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 16px;
    background: rgba(0, 0, 0, .3);
    color: inherit;
    text-decoration: none;
}

.pour-where.loose { grid-template-columns: 1fr; padding-left: .8rem; }
.pour-where:active { background: rgba(0, 0, 0, .45); }

/* The window onto the rack. The script scrolls it to the lit bottle, and its edges fade, so it reads as a part of something bigger. */
.pour-rack {
    --u: 7px;
    display: block;
    width: 5.4rem;
    height: 5.4rem;
    overflow: hidden;
    border-radius: 11px;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 16%, #000 84%, transparent);
    mask-image: linear-gradient(180deg, transparent, #000 16%, #000 84%, transparent);
}

.pour-rack .rack { width: fit-content; margin: .9rem auto; }
.pour-place-label { display: block; color: var(--faint); font-size: .7rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; }
.pour-place strong { display: block; font: 500 1rem/1.3 var(--sans); }
.pour-go { display: inline-block; margin-top: .25rem; color: var(--muted); font-size: .88rem; font-weight: 500; }
.pour-go::after { content: " ›"; }
.pour-actions { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: .6rem; }
.pour-ask { display: block; margin-top: .55rem; padding: .35rem 0; color: var(--gold-bright); font-size: .9rem; text-align: center; text-decoration: none; }
.pour-ask:hover, .pour-ask:focus-visible { text-decoration: underline; }
.hand-ask { position: relative; display: block; margin: .15rem 1.1rem 0; padding: .45rem 0; color: var(--gold-bright); font-size: .92rem; text-align: center; text-decoration: none; }
.peek-dock .hand { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.peek-dock .hand-ask { margin: 0; padding: .5rem 1rem .6rem; border: 1px solid var(--line-strong); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); background: var(--surface); box-shadow: 0 14px 34px rgba(0, 0, 0, .6); }
.hand-ask:hover, .hand-ask:focus-visible { text-decoration: underline; }
/* Opened it, and Ask about it, side by side under the card. */
.hand-acts { display: flex; justify-content: center; align-items: baseline; gap: 1.6rem; }
.hand-acts:hover { text-decoration: none; }
.hand-acts form { margin: 0; }
.hand-acts a, .hand-acts button { padding: .1rem 0; border: 0; background: none; color: var(--gold-bright); font: inherit; text-decoration: none; cursor: pointer; }
.hand-acts a:hover, .hand-acts a:focus-visible, .hand-acts button:hover, .hand-acts button:focus-visible { text-decoration: underline; }
.ask-wine { margin: 0 0 1.2rem; }
/* A wine's page: what is done most, in gold over the boards, the way to ask about it, and its figures in a line under its window. */
.wine-open { margin: 0 0 .7rem; }
.wine-open .btn { width: 100%; }
.wine-ask { margin: 0 0 1rem; }
.wine-ask a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; text-decoration: none; }
.wine-ask a::after { content: "›"; margin-left: .4rem; color: var(--gold); }
.wine-figures { color: var(--text); }
.wine-boards { margin-bottom: 1.2rem; }
.wine-about > .facts { margin-top: 0; }
.wine-about { margin: 0 0 1.4rem; }
.talk-wine { margin: 0 0 1rem; }
.talk-wine .answer-card { margin: 0; }
.pour-actions > :only-child { grid-column: 1 / -1; }
.pour-actions .pour-open { display: grid; }
.pour-actions .pour-ask { display: grid; place-items: center; min-height: 46px; margin: 0; padding: 0 .4rem; }

/* A Tonight card kept short, so that the wines are not far below it: a smaller bottle, the rack's window a strip, and Opened it
   beside Ask about it. */
.tonight .pour { gap: .6rem; padding: .85rem .95rem .9rem; }
.tonight .pour-standing .upright { --bottle: 7.6rem; }
.tonight .pour-where { gap: .75rem; padding: .35rem .7rem .35rem .4rem; }
.tonight .pour-rack { width: 4.6rem; height: 3.4rem; }
.pour-actions .btn { width: 100%; min-height: 46px; padding-inline: .5rem; box-sizing: border-box; font-size: .96rem; white-space: nowrap; }

/* What one tap on a card did: said once at the top of the cellar, with a line for how it was and the way to take it back. */
.opened {
    display: grid;
    gap: .7rem;
    margin: 0 0 1.1rem;
    padding: .9rem 1rem 1rem;
    border: 1px solid rgba(165, 219, 176, .3);
    border-radius: var(--radius);
    background: rgba(165, 219, 176, .08);
}

.opened-what { margin: 0; line-height: 1.45; }
.opened-what strong { display: block; color: var(--ok); }
.opened-what a { color: inherit; }
.opened-pour, .opened-serve { margin: .5rem 0 0; color: var(--muted); line-height: 1.45; }
.opened-pour strong { color: var(--gold-bright); font-weight: 600; }
.opened-how { display: grid; gap: .5rem; }
.opened-rate { order: -1; display: flex; flex-wrap: wrap; align-items: center; gap: .1rem .7rem; margin: 0; font-weight: 600; }
.opened-note { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; }
.opened-note .btn { min-height: 46px; }
.opened-undo { font-size: .92rem; }

/*
    A bottle that wants air (breathing.js): a glass on its card fills with the wine's colour while it breathes, the minutes left in large
    figures beside it. When it is ready the glass is full and glows, and what was waiting (how it was, how to pour it) comes in.
*/
.opened-air { display: flex; align-items: center; gap: 1rem; margin: .1rem 0 0; padding-top: .8rem; border-top: 1px solid rgba(165, 219, 176, .18); }
.air-glass { flex: none; width: 96px; height: 152px; overflow: visible; transition: filter .8s ease; }
.air-wine { fill: var(--wine, var(--unsorted)); }
.air-depth { fill: url(#air-depth); }
.air-dark { stop-color: rgba(0, 0, 0, .45); }
.air-clear { stop-color: rgba(255, 255, 255, .06); }
.air-line { fill: none; stroke: rgba(245, 241, 234, .8); stroke-width: 1.6; stroke-linecap: round; }
.air-shine { fill: none; stroke: rgba(245, 241, 234, .16); stroke-width: 2.6; stroke-linecap: round; }
.air-words { display: grid; gap: .25rem; min-width: 0; }
.air-label { color: var(--muted); font-size: .72rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; }
.air-left { color: var(--gold-bright); font-family: var(--serif); font-size: 2.5rem; line-height: 1.1; }
.opened-air .opened-pour { margin: 0; }
.air-early { justify-self: start; margin-top: .2rem; font-size: .9rem; }
.opened.is-ready .air-glass { filter: drop-shadow(0 0 14px rgb(var(--gold-bright-rgb) / .5)); }
.opened.is-ready .air-label { color: var(--ok); }
.opened .air-in { animation: air-in .5s ease-out both; }
@keyframes air-in { from { opacity: 0; translate: 0 6px; } }

/*
    Rating a bottle: five glasses to tap. The glasses up to its rating are full, in the colour of what was
    drunk, with the rating in words beside them. A tap fills them one after another along the row. Each glass
    is as big as a fingertip, whatever size it is drawn.
*/
.rate { display: inline-flex; flex-wrap: wrap; align-items: center; margin: 0 -.25rem; vertical-align: middle; }
.rate-glass, .rate-pick label { display: grid; place-items: center; min-width: 2.5rem; min-height: 2.9rem; margin: 0; padding: 0; border: 0; background: none; cursor: pointer; }
.rate-glass svg, .rate-pick svg { display: block; width: 1.6rem; height: auto; overflow: visible; transition: scale .15s; }
.rate-rim, .rate-stem { fill: none; stroke: rgb(var(--muted-rgb) / .55); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; transition: stroke .25s; }
.rate-wine { fill: var(--wine, var(--red)); transform: scaleY(0); transform-origin: 12px 19px; transition: transform .2s ease-in; }
.rate-glass.is-on .rate-rim, .rate-glass.is-on .rate-stem, .rate-pick input:checked ~ label .rate-rim, .rate-pick input:checked ~ label .rate-stem { stroke: var(--gold-bright); }
.rate-glass.is-on .rate-wine, .rate-pick input:checked ~ label .rate-wine { transform: scaleY(1); transition: transform .4s cubic-bezier(.2, .7, .2, 1); }

/* Tapped a moment ago: each glass fills just after the one before it. */
.rate.is-poured .rate-glass.is-on .rate-wine, .rate.is-poured .rate-glass.is-on .rate-rim, .rate.is-poured .rate-glass.is-on .rate-stem,
.rate-pick input:checked ~ label .rate-wine, .rate-pick input:checked ~ label .rate-rim, .rate-pick input:checked ~ label .rate-stem { transition-delay: calc(var(--at) * 70ms); }
.rate-glass:active svg, .rate-pick label:active svg { scale: .88; }
.rate-glass:focus-visible, .rate-pick input:focus-visible + label { outline: 2px solid var(--gold); outline-offset: -3px; border-radius: 10px; }
.rate-word { margin-left: .55rem; color: var(--gold-bright); font: 500 .95rem/1.2 var(--sans); white-space: nowrap; }
.rate-word:empty { display: none; }

/*
    A drink once rated: the glasses give way to the rating as it stands, small glasses and its word, with Change rating, which
    brings the glasses back by ticking a hidden box through its label (Keep it puts them away again). The moment a rating is
    kept (rate.js) the row lifts glass by glass, a ring of gold goes out from the glass tapped, and the rating then arrives.
*/
.rate-box { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .2rem .7rem; vertical-align: middle; }
.rate-again { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.rate-done, .rate-keep { display: none; }
.rate-box.is-done > .rate { display: none; }
.rate-box.is-done > .rate-done { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .15rem .6rem; }
.rate-box.is-done > .rate-again:checked ~ .rate { display: inline-flex; }
.rate-box.is-done > .rate-again:checked ~ .rate-done { display: none; }
.rate-box.is-done > .rate-again:checked ~ .rate-keep { display: inline; }
.rate-minis { display: inline-flex; gap: 2px; }
.rate-mini svg { display: block; width: 1.05rem; height: auto; overflow: visible; }
.rate-mini.is-on .rate-wine { transform: scaleY(1); }
.rate-mini.is-on .rate-rim, .rate-mini.is-on .rate-stem { stroke: var(--gold-bright); }
.rate-done-word { color: var(--gold-bright); font: 500 .95rem/1.2 var(--sans); white-space: nowrap; }
.rate-change, .rate-keep { color: var(--muted); font-size: .86rem; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: .2em; white-space: nowrap; cursor: pointer; }
.rate-change:hover, .rate-keep:hover { color: var(--text); }
.rate-again:focus-visible ~ .rate-done .rate-change, .rate-again:focus-visible ~ .rate-keep { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
.rate-glass { position: relative; }
.rate.is-celebrating .rate-glass.is-on svg { animation: rate-hop .5s cubic-bezier(.3, 1.6, .5, 1) backwards; animation-delay: calc(var(--at) * 70ms + .25s); }
.rate.is-celebrating .rate-glass.is-last::after { content: ""; position: absolute; top: 50%; left: 50%; width: 2.6rem; height: 2.6rem; margin: -1.3rem 0 0 -1.3rem; border: 2px solid var(--gold-bright); border-radius: 50%; opacity: 0; pointer-events: none; animation: rate-ring .75s ease-out forwards; animation-delay: calc(var(--at) * 70ms + .35s); }
.rate-done.is-arriving { animation: rate-arrive .45s cubic-bezier(.2, .7, .2, 1); }
.rate-done.is-arriving .rate-mini.is-on svg { animation: rate-hop .5s cubic-bezier(.3, 1.6, .5, 1) backwards; }
.rate-done.is-arriving .rate-mini:nth-child(2) svg { animation-delay: 50ms; }
.rate-done.is-arriving .rate-mini:nth-child(3) svg { animation-delay: 100ms; }
.rate-done.is-arriving .rate-mini:nth-child(4) svg { animation-delay: 150ms; }
.rate-done.is-arriving .rate-mini:nth-child(5) svg { animation-delay: 200ms; }
@keyframes rate-hop { 0% { transform: translateY(0); } 45% { transform: translateY(-6px); } 100% { transform: translateY(0); } }
@keyframes rate-ring { 0% { opacity: .95; transform: scale(.45); } 100% { opacity: 0; transform: scale(1.8); } }
@keyframes rate-arrive { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
    .rate.is-celebrating .rate-glass.is-on svg, .rate.is-celebrating .rate-glass.is-last::after, .rate-done.is-arriving, .rate-done.is-arriving .rate-mini svg { animation: none; }
}
.history form:has(.rate) { margin: .1rem 0; }
.rate-row { display: flex; flex-wrap: wrap; align-items: center; gap: .1rem .8rem; margin: .7rem 0 0; }

/* A rating to choose before a form is sent, where a tap must not send it. The chosen glass and those below it are full. */
.rate-pick { min-width: 0; margin: 0 0 .95rem; padding: 0; border: 0; }
.rate-pick legend { padding: 0; margin-bottom: .1rem; font-size: .86rem; font-weight: 600; }
.rate-pick div { display: inline-flex; flex-direction: row-reverse; margin: 0 -.25rem; }
.rate-pick input { position: absolute; width: 1px; height: 1px; opacity: 0; }

/*
    What to order: the drinks Kept picked from a photographed list. The one to order stands first, on a card
    of its own, and the rest follow by kind, each with its price as the list printed it and a line of why.
*/
.menu { margin: 0 0 1.4rem; }
.menu-top { display: grid; gap: .35rem; margin: 0 0 1.2rem; padding: 1.1rem 1.1rem 1.2rem; border: 1px solid rgb(var(--gold-rgb) / .5); border-radius: var(--radius); background: var(--surface); }
.menu-top h2 { margin: 0; font: 400 clamp(1.4rem, 6vw, 1.9rem)/1.2 var(--serif); text-wrap: balance; }
.menu-price { color: var(--gold-bright); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.menu-top .menu-price { margin: 0; font-size: 1.1rem; }
.menu-why { margin: 0; color: var(--muted); line-height: 1.5; }
.menu-top .menu-why { color: var(--text); }
.menu-kind { margin: 1.3rem 0 .4rem; color: var(--faint); font: 600 .72rem/1.2 var(--sans); letter-spacing: .2em; text-transform: uppercase; }
.menu-list { margin: 0; padding: 0; list-style: none; }
.menu-list li { display: grid; gap: .2rem; padding: .8rem 0; border-top: 1px solid var(--line); }
.menu-name { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 0; }
.menu-name strong { font: 600 1.02rem/1.3 var(--sans); }
.menu-skips strong { color: var(--muted); font-weight: 500; }

/*
    The menu itself, marked up (Menu/Marked, menu-marks.js): the photo as it was taken, on the page's own dark, with the marks a
    sommelier would make. Only the highlighter is drawn by hand, and it is laid into the photo as ink is on paper, so the print shows
    through. The words beside it are in Kept's own type, numbered in the green and red of the list below.
*/
.menu-show { margin: 0 0 1.2rem; }
.marked { margin: 0 0 1.4rem; }

/* A list photographed as several pages: each page under the one before, named quietly above it. */
.marked-page-number { margin: 0 0 .45rem; color: var(--muted); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }

/* What was ordered from a list: "Ordered this" under a pick, then a tick and the five glasses asking how it was. */
.menu-order { margin: .45rem 0 0; }
.menu-order-go { display: inline-block; margin-top: .45rem; font-size: .9rem; }
button.menu-order-go { margin-top: 0; }
.menu-ordered { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .9rem; margin: .55rem 0 0; }
.menu-ordered-said { display: inline-flex; align-items: center; gap: .3rem; margin: 0; color: var(--gold-bright); font-size: .9rem; font-weight: 600; }
.menu-ordered-said svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.menu-ordered-rate { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .6rem; margin: 0; }
.menu-ordered-ask { color: var(--muted); font-size: .9rem; }
.menu-ordered-taste { margin: 0; font-size: .9rem; }

/* Something other than Kept's picks: what was ordered, rated, and the way to say so, with why. */
.menu-else { margin: 1.6rem 0 1rem; }
.menu-else-card { margin: 0 0 1rem; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.menu-else-card .menu-name { margin: .1rem 0 .3rem; }
.menu-else-card .menu-ordered-rate { margin-top: .5rem; }
.menu-else-more { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; margin-top: .6rem; font-size: .9rem; }
.menu-else-more form { margin: 0; }
button.link.is-quiet { color: var(--muted); }
.menu-else-form > summary { font-weight: 500; }
.menu-else-form form { display: grid; gap: .55rem; margin-top: .7rem; }
.menu-else-label { margin: .3rem 0 0; color: var(--muted); font-size: .92rem; }
.menu-else-form .chips { margin: 0; padding: 0; }
.menu-else-every { justify-self: start; font-size: .9rem; }
.menu-else-said { width: 100%; resize: vertical; }

/* Sending the picks on as a PDF, under them: a quiet button with the share mark, and a line saying how it went. */
.menu-share { margin: 1.4rem 0 1.2rem; }
.menu-share .btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; }
.menu-share .btn svg { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.menu-share-said { min-height: 1.3em; margin: .45rem 0 0; color: var(--muted); font-size: .9rem; text-align: center; }
.menu-share-for { margin: .2rem 0 1rem; padding-left: 1.3rem; }
.menu-share-for li { margin: .25rem 0; }
.menu-share-for .menu-price { margin-left: .5rem; }
.menu-share-someone { margin-top: .4rem; }
.menu-share-someone > summary { color: var(--muted); font-size: .92rem; }
.menu-share-someone .chips { margin: .5rem 0 0; padding: 0; }

/* Under the photo button, the way to photograph a list of several pages: quiet, for the few lists that need it. */
.capture-several { margin: -.6rem 0 1.25rem; color: var(--muted); font-size: .92rem; }
.capture-several .link { margin-left: .25rem; }

/* A list being marked up, as every list is once it has been chosen from: the glass fills while it is, and the marked list takes its place. */
.marked-coming { display: flex; align-items: center; gap: .9rem; margin: 0 0 1.4rem; padding: .7rem .95rem; border: 1px solid rgb(var(--gold-rgb) / .32); border-radius: var(--radius); background: var(--surface); }
.marked-coming p { display: grid; gap: .1rem; margin: 0; }
.marked-coming span { color: var(--muted); font-size: .9rem; }
.marked-coming-wine { animation: marked-pour 2.6s ease-in-out infinite alternate; }
@keyframes marked-pour { from { transform: translateY(22px); } to { transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .marked-coming-wine { animation: none; transform: translateY(12px); } }
.marked-summary { margin: -.3rem 0 .7rem; font: 1rem/1.38 var(--serif); color: var(--text); text-wrap: pretty; }
/* The photo fills the width of the screen until the marks are drawn; then it is cut to the page it shows, with margins for the words. */
.marked-page { position: relative; }
.marked-photo { border-radius: 3px; box-shadow: 0 6px 22px rgb(0 0 0 / .55); }
.marked-photo img { display: block; width: 100%; height: auto; border-radius: 3px; }
.is-cut .marked-photo { position: absolute; overflow: hidden; }
.is-cut .marked-photo img { position: absolute; max-width: none; border-radius: 0; }
/* A page flattened as if photographed square on is drawn on a canvas that fills the photo's place; the photo itself is only its source. */
.is-flat .marked-photo img { display: none; }
.marked-flat { display: block; width: 100%; height: 100%; }
/* While the page settles flat it has no frame of its own, so that only the page is seen to move. Then a light passes over it once. */
.is-settling .marked-photo { overflow: visible; box-shadow: none; }
.marked-flat { box-shadow: 0 6px 22px rgb(0 0 0 / .55); }
.marked-glint { position: absolute; inset: 0; pointer-events: none; opacity: 0; background: linear-gradient(105deg, transparent 38%, rgb(var(--gold-bright-rgb) / .38) 50%, transparent 62%) no-repeat; background-size: 260% 100%; mix-blend-mode: screen; }
.marked-glint.is-on { animation: marked-glint 1s ease-in-out both; }
@keyframes marked-glint { from { opacity: 1; background-position: 120% 0; } 85% { opacity: 1; } to { opacity: 0; background-position: -30% 0; } }
.marked-ink, .marked-words { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.marked-ink { mix-blend-mode: multiply; }
.marked-highlight { fill: rgb(150 220 95 / .58); }
.marked-highlight.is-light { fill: rgb(150 220 95 / .3); }
.marked-highlight.is-red { fill: rgb(255 120 130 / .5); }
.marked-note { font-family: var(--sans); font-weight: 500; fill: #e9e2d6; }
.marked-rank { font-family: var(--sans); font-weight: 700; }
.marked-rank.is-green { fill: #8fd9a0; }
.marked-rank.is-red { fill: #ff9fa8; }
.marked-ring { fill: none; }
.marked-ring.is-green { stroke: #3fa35b; }
.marked-ring.is-red { stroke: #d05060; }
.marked-lead { fill: none; stroke-linecap: round; }
.marked-lead.is-green { stroke: #4fae68; }
.marked-lead.is-red { stroke: #d05060; }
.marked-dot.is-green { fill: #2f8f4a; }
.marked-dot.is-red { fill: #c62334; }
.marked-hit { fill: transparent; pointer-events: all; cursor: pointer; }
/* What a lightly marked pick says when it is tapped. */
.marked-card { position: absolute; z-index: 2; display: grid; margin: 0; grid-template-columns: auto minmax(0, 1fr); column-gap: .5rem; width: max-content; max-width: min(17rem, 100%); padding: .5rem .75rem .55rem .55rem; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface-raised); box-shadow: 0 8px 24px rgb(0 0 0 / .5); font-size: .84rem; line-height: 1.3; }
.marked-card[hidden] { display: none; }
.marked-card span:first-child { grid-row: span 2; display: grid; place-items: center; width: 1.35rem; height: 1.35rem; border: 1.5px solid #3fa35b; border-radius: 50%; color: #8fd9a0; font-weight: 700; font-size: .74rem; }
.marked-card strong { font-weight: 600; }
.marked-card span:last-child { color: var(--muted); }
@media (prefers-reduced-motion: no-preference) {
    .marked-lead { animation: marked-draw var(--t) var(--d) ease-out both; }
    .marked-sweep { animation: marked-sweep var(--t) var(--d) cubic-bezier(.5, 0, .35, 1) both; }
    .marked-fade { animation: marked-fade .45s var(--d) ease-out both; }
}
@keyframes marked-draw { from { stroke-dashoffset: var(--length); } to { stroke-dashoffset: 0; } }
@keyframes marked-sweep { from { clip-path: inset(-20% 100% -20% 0); } to { clip-path: inset(-20% 0 -20% 0); } }
@keyframes marked-fade { from { opacity: 0; } to { opacity: 1; } }
.marked-why { display: grid; gap: .9rem; margin: 0 0 1.2rem; padding: 0; list-style: none; }
.marked-why li { display: grid; grid-template-columns: 2rem minmax(0, 1fr); column-gap: .6rem; }
.marked-why li p { grid-column: 2; margin: 0; }
.marked-why li > :is(.menu-order, .menu-ordered, .menu-order-go) { grid-column: 2; justify-self: start; }
.marked-number { grid-row: span 2; display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border: 2px solid #3fa35b; border-radius: 50%; color: #8fd9a0; font: 600 .95rem/1 var(--sans); }
.marked-why .is-skip .marked-number { border-color: #d05060; color: #ff9fa8; }

/* Every list kept, with its place and its day; the last time at a place; and naming the place a list was photographed at. */
.menu-rename { white-space: nowrap; }
.menu-last { margin: -.2rem 0 1rem; padding: .7rem .9rem; border-left: 2px solid var(--gold); background: rgb(var(--gold-rgb) / .06); line-height: 1.5; }
/* The menus photographed on one visit, on each one's page: the others as small photos, this one as its number. They wrap, so none is out of sight. */
.menu-visit { margin: 0 0 1rem; }
.menu-visit > p { margin: 0 0 .4rem; color: var(--muted); font-size: .86rem; }
.menu-visit ol { display: flex; flex-wrap: wrap; gap: .375rem; margin: 0; padding: 0; list-style: none; }
.menu-visit li { flex: none; width: 44px; height: 44px; }
.menu-visit a, .menu-visit li > span { display: grid; place-items: center; width: 100%; height: 100%; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-raised); }
.menu-visit a:hover { border-color: var(--gold); }
.menu-visit a:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 2px; }
.menu-visit img { display: block; width: 100%; height: 100%; margin: 0; border-radius: 0; object-fit: cover; }
.menu-visit li > span { border-color: var(--gold); color: var(--gold); font-weight: 500; }
.menu-where { margin: .4rem 0 1rem; color: var(--muted); font-size: .92rem; }
.menu-where .link { margin-left: .3rem; }
.menu-where-pick { margin: 1.4rem 0; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.menu-where-pick summary { cursor: pointer; font-weight: 600; }
.menu-where-pick[open] summary { margin-bottom: .6rem; }
.menu-where-near { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0 0 .8rem; }
.menu-where-near .chip { display: grid; gap: .05rem; padding: .45rem .75rem; text-align: left; cursor: pointer; }
.menu-where-near .chip small { margin: 0; color: var(--muted); font-size: .78rem; }
.menu-where-near .chip.is-on { border-color: var(--gold); }
.menu-where-name { display: flex; gap: .5rem; margin: 0 0 .5rem; }
.menu-where-name input { flex: 1; min-width: 0; }
.marked-page.is-plain { margin: 1rem 0 1.4rem; }

/* A list that has just been read: it says so, the check draws itself, and the pick to order rises into place with its edge lit once. */
.menu-done { display: flex; align-items: center; gap: .55rem; margin: 0 0 .9rem; color: var(--gold-bright); font: 600 1rem/1.3 var(--sans); }
.menu-done svg { flex: none; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 26; }
.menu.has-arrived .menu-done svg { animation: menu-check .5s .1s ease-out both; }
.menu.has-arrived .menu-top { animation: menu-arrive .85s .15s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes menu-check { from { stroke-dashoffset: 26; } to { stroke-dashoffset: 0; } }
@keyframes menu-arrive {
    from { opacity: 0; translate: 0 14px; border-color: var(--gold-bright); }
    55% { border-color: var(--gold-bright); box-shadow: 0 0 36px rgb(var(--gold-rgb) / .35); }
}
@media (prefers-reduced-motion: reduce) {
    .menu.has-arrived .menu-top, .menu.has-arrived .menu-done svg { animation: none; }
}
.menu-go { margin: 0 0 1.2rem; }

/* The cellar asking how the last few bottles were: each with its label, its name and five glasses. */
.rate-ask { margin: 0 0 1.1rem; padding: .85rem 1rem .4rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.rate-ask h2 { margin: 0 0 .1rem; font-size: 1.2rem; line-height: 1.3; }
.rate-hint { margin: 0 0 .3rem; color: var(--muted); font-size: .86rem; }
.rate-ask ul { margin: 0; padding: 0; list-style: none; }
.rate-ask li { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: .8rem; padding: .55rem 0; }
.rate-ask li + li { border-top: 1px solid var(--line); }
.rate-ask .thumb { width: 44px; height: 58px; border-radius: 7px; }
.rate-ask a { display: block; color: var(--text); font: 500 1.02rem/1.3 var(--sans); text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
    .rate-wine, .rate-rim, .rate-stem, .rate-glass svg, .rate-pick svg { transition: none !important; }
}

/* Under the views, the cellar's two other ways to be seen, each a page of its own. */
/* The cellar two more ways, side by side: on a map and by flavor, each a card with the cellar's own map or wheel drawn in it. */
.cellar-also { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; margin: .1rem 0 1.2rem; }
.also-card {
    display: grid; grid-template-rows: auto 1fr; overflow: hidden;
    border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); text-decoration: none;
}
.also-card:hover, .also-card:focus-visible { border-color: var(--line-strong); }
.also-art { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 10; overflow: hidden; background: #090d10; }
.also-art > svg { display: block; width: 100%; height: 100%; }
.also-art > :not(svg) { width: 78%; max-height: 92%; }
.also-art.is-drawn > * { animation: wt-arrive .5s ease-out both; }
.also-art .map-dot { fill: var(--gold); stroke: none; }
.also-art .map-count { fill: var(--on-gold); }
.also-wheel { padding: .45rem 0; }
.also-wheel-middle { fill: #090d10; }
.also-words { display: grid; align-content: start; gap: .15rem; padding: .6rem .75rem .75rem; }
.also-words strong { font-family: var(--serif); font-size: 1.02rem; font-weight: 400; }
.also-words small { color: var(--muted); font-size: .8rem; line-height: 1.3; }
@media (prefers-reduced-motion: reduce) { .also-art.is-drawn > * { animation: none; } }
/* On a laptop the cards are wider than tall pictures want: a broader, shorter picture shows more of the map at its own size. */
@media (min-width: 64rem) { .also-art { aspect-ratio: 5 / 2; } }
.filters-apply-themselves [data-filters-apply] { display: none; }

.pulled-link {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    min-height: 44px;
    margin: -.3rem 0 .9rem;
    color: var(--text);
    font-weight: 500;
    text-decoration: none;
}

.pulled-link svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: var(--gold); stroke-width: 1.4; stroke-linejoin: round; }
.pulled-link::after { content: " ›"; color: var(--gold); }

/*
    Should I buy this (Shop.cshtml): the bottle as read, then a card for each thing that bears on buying it, one under another on a
    phone and two across on a desk, and "Bought it" under them all.
*/
.shop-board { display: grid; gap: .8rem; margin: 0 0 1.2rem; }
.shop-board .card { margin: 0; }
.shop-board h2 { margin: 0 0 .45rem; font-size: 1.05rem; }
.shop-board p { margin: 0 0 .45rem; line-height: 1.5; }
.shop-board p:last-child { margin-bottom: 0; }
.shop-years, .shop-shops { display: grid; gap: .3rem; margin: 0 0 .5rem; padding: 0; list-style: none; color: var(--muted); font-size: .94rem; line-height: 1.45; }
.shop-years strong { color: var(--text); font-weight: 600; }
.shop-verdict { color: var(--gold-bright); font-weight: 500; }
.shop-ask { display: flex; gap: .5rem; margin: .6rem 0 .3rem; }
.shop-ask input { flex: 1; min-width: 0; }
.shop-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.shop-shelf { margin-top: .6rem; }

/* Kept's take, first on the board: the call in its colour, the few words that say it, why, then what the bottle is and how to have it. */
.shop-take { border-color: rgb(var(--gold-rgb) / .45); }
.shop-call { display: inline-block; margin: 0 0 .35rem; padding: .18rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.shop-call.is-buy, .shop-call.is-several { background: rgb(165 219 176 / .16); color: var(--ok); }
.shop-call.is-price { background: rgb(var(--gold-rgb) / .16); color: var(--gold-bright); }
.shop-call.is-pass { background: rgb(255 144 134 / .14); color: var(--danger); }
.shop-board .shop-headline { margin: 0 0 .3rem; color: var(--text); font: 400 1.35rem/1.25 var(--serif); text-wrap: balance; }
.shop-why { color: var(--text); }
.shop-about { margin: .9rem 0 .3rem; color: var(--muted); font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.shop-serve { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .3rem .8rem; margin: .6rem 0 0; font-size: .94rem; line-height: 1.45; }
.shop-serve dt { color: var(--muted); }
.shop-serve dd { margin: 0; }
.shop-weighing { display: flex; align-items: center; gap: .6rem; color: var(--muted); }

/* While the take is asked for: a small glass filling with gold, and emptying, until it comes. */
.shop-weighing-glass { position: relative; flex: none; width: 12px; height: 17px; border: 1.5px solid var(--mark); border-top: 0; border-radius: 0 0 5px 5px; overflow: hidden; }
.shop-weighing-glass::after { content: ""; position: absolute; inset: auto 0 0; height: 0; background: var(--gold); }
@media (prefers-reduced-motion: no-preference) {
    .shop-weighing-glass::after { animation: shop-fill 2.4s ease-in-out infinite; }
}
@keyframes shop-fill { 0%, 10% { height: 0; } 60%, 75% { height: 75%; } 100% { height: 0; } }

@media (min-width: 46rem) {
    .shop-board { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}

/* The page itself: the wine it found, the racks that hold it with its bottles lit, and a button for each place. */
.pulled-wine { margin: .3rem 0 1rem; }
/* A lit place that is a button, in a drawing for taking a bottle out, looks as the link it stands in for does. */
:where(.rack) :where(button) { appearance: none; -webkit-appearance: none; margin: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: inherit; cursor: pointer; }
.pulled-pick { display: grid; gap: .7rem; margin: 0 0 1rem; }
.pulled-pick .chip .count { min-width: 1.45rem; height: 1.45rem; margin-left: .35rem; font-size: .8rem; }



/* The wines a photo could be, when it could be more than one: a tile for each. */
.pulled-places { display: grid; gap: .6rem; margin: 0 0 1rem; }
.pulled-places .callout { margin: 0; }
.pulled-again { margin-top: 1.2rem; }

/*
    Explore: what the bottles can do together. Cards for the runs and sets Kept finds, forms that ask for a
    plan, and the plan itself: bottles to pull in order, drinks to mix, a game, and a tasting sheet on paper.
*/
.explore-part { margin: 0 0 1.6rem; }
.explore-part > h2 { margin-bottom: .6rem; }
.ideas { display: grid; gap: .6rem; }
.ideas .callout { width: 100%; margin: 0; }
.idea > summary { list-style: none; cursor: pointer; }
.idea > summary::-webkit-details-marker { display: none; }
.idea[open] > summary { border-color: var(--line-strong); border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.idea[open] > summary strong::after { content: " ⌄"; }
.idea > form { padding: .9rem 1rem 1rem; border: 1px solid var(--line-strong); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); background: var(--surface); }
.idea .field { margin: 0 0 .7rem; }
.explore-later .muted { margin: 0 0 .5rem; font-size: .92rem; }
.explore-later b { color: var(--text); font-weight: 600; }

/*
    The Explore page: two screens. What Kept will plan is a grid of tiles, two across. What it found is a
    row of cards to swipe along, and a card for each of the other ways to look at the cellar. The measures
    are from the design it was drawn to, at a phone's width.
*/
.hub-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin: 0 0 1.6rem; }
.hub-actions form { display: grid; margin: 0; }
.hub-tile { display: flex; flex-direction: column; gap: 4px; box-sizing: border-box; width: 100%; min-height: 84px; margin: 0; padding: 14px 14px 13px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--text); font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.hub-tile strong { font-size: .94rem; font-weight: 600; line-height: 1.3; }
.hub-tile strong::after { content: " \203A"; color: var(--gold); }
.hub-read { grid-template-columns: minmax(0, 1fr); }
.hub-tile > .drawing-place { position: relative; overflow: hidden; }
.hub-tile > .drawing-place svg { position: absolute; top: 0; left: 50%; width: auto; max-width: none; translate: -50% 0; }
.hub-tile span { color: var(--muted); font-size: .81rem; line-height: 1.35; }
.hub-tile:hover, .hub-tile:focus-visible, .hub-tasting:hover, .hub-tasting:focus-visible, .hub-flavour:hover, .hub-flavour:focus-visible { border-color: var(--line-strong); }
.hub-tile:focus-visible, .hub-tasting:focus-visible, .hub-flavour:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 2px; }

.hub-part { margin: 0 0 1.6rem; }
.hub-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin: 0 0 .75rem; }
.hub-head h2 { margin: 0; }
.hub-head a { flex: none; color: var(--gold-bright); font-size: .88rem; text-decoration: none; }
.hub-part > .card { margin: 0; }

/* The row runs to the edges of the screen, and each card stops at the page's margin as it is swiped along. */
.hub-rail { display: flex; gap: 10px; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: var(--gutter); scrollbar-width: none; }
.hub-rail::-webkit-scrollbar { display: none; }
.hub-tasting { flex: 0 0 272px; display: flex; flex-direction: column; gap: 10px; box-sizing: border-box; padding: 16px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); color: var(--text); text-decoration: none; scroll-snap-align: start; }
.hub-kind { color: var(--muted); font-size: .69rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; }
.hub-tasting strong { font: 400 1.5rem/1.08 var(--serif); }
.hub-years { display: flex; flex-wrap: wrap; gap: 5px; }
.hub-years i { padding: 4px 9px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: .81rem; font-style: normal; font-weight: 600; font-variant-numeric: tabular-nums; }
.hub-years i.wanted { border-style: dashed; border-color: var(--mark); color: var(--faint); }
.hub-note { display: -webkit-box; overflow: hidden; color: var(--muted); font-size: .81rem; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; }

.hub-flavour { display: flex; align-items: center; gap: 16px; margin: 0 0 1.6rem; padding: 16px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); color: var(--text); text-decoration: none; }
.hub-ring { flex: none; display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; }
.hub-ring i { width: 40px; height: 40px; border-radius: 50%; background: var(--surface); }
.hub-flavour-words { display: grid; gap: 8px; min-width: 0; }
.hub-flavour-words strong { font-size: .94rem; font-weight: 600; }
.hub-flavour-words strong::after { content: " \203A"; color: var(--gold); }
.hub-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.hub-chips em { padding: 3px 8px; border-radius: 999px; background: color-mix(in srgb, var(--tint) 34%, var(--surface)); font-size: .75rem; font-style: normal; }
.hub-friends { margin: 0 0 1.2rem; }

/*
    A short form, out of sight until the page's address names it. Then it stands over the page from the
    bottom of the screen, above the bar of tabs, with the page dimmed behind it. The page behind does not
    scroll while a form is up.
*/
.hub-sheet, .hub-shade { display: none; }
.hub-sheets:has(.hub-sheet:target) .hub-shade { display: block; position: fixed; inset: 0; z-index: 30; background: rgba(8, 5, 5, .62); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.hub-sheet:target { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 31; box-sizing: border-box; max-width: 34rem; max-height: 88vh; max-height: 88dvh; margin: 0 auto; padding: 1.1rem var(--gutter) calc(env(safe-area-inset-bottom) + 1.3rem); overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--line); border-bottom: 0; border-radius: 28px 28px 0 0; background: var(--surface-raised); box-shadow: 0 -18px 50px rgba(0, 0, 0, .55); animation: hub-sheet .28s cubic-bezier(.2, .8, .25, 1); }
.hub-sheet header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.hub-sheet h2 { margin: 0; font-size: 1.6rem; line-height: 1.1; }
.hub-close { display: inline-flex; align-items: center; min-height: 44px; padding: 0 .2rem; color: var(--gold-bright); font-size: .92rem; text-decoration: none; }
.hub-sheet-about { margin: .2rem 0 1rem; color: var(--muted); font-size: .92rem; line-height: 1.45; }
.hub-sheet .field { margin: 0 0 .8rem; }
html:has(.hub-sheet:target) { overflow: hidden; }
@keyframes hub-sheet { from { translate: 0 28px; opacity: 0; } }

/*
    The map of a cellar. The land is Natural Earth's coast, drawn by Kept, in two tones a little apart: the
    sea darker than the page, the land the colour of a card. A mark is a ring of gold with its bottles
    counted in it and its name under it, and the chosen one is filled. The same marks, small and without
    their names, are on the card that leads to the map.
*/
.map-sea { fill: #090d10; }
.map-land { fill: #241e1c; fill-rule: evenodd; stroke: rgb(var(--gold-bright-rgb) / .3); stroke-width: .7; stroke-linejoin: round; }
.map-water { fill: #090d10; stroke: rgb(var(--gold-bright-rgb) / .2); stroke-width: .4; }
.map-river { fill: none; stroke: #2b4654; stroke-width: .9; stroke-linecap: round; stroke-linejoin: round; }
.map-far .map-river { stroke-width: .6; }
.map-far .map-border { stroke-opacity: .45; }
.map-city-name.on-left { text-anchor: end; }
.map-border { fill: none; stroke: rgba(255, 255, 255, .22); stroke-width: .7; stroke-dasharray: 3 2.5; }
.map-state { fill: none; stroke: rgba(255, 255, 255, .11); stroke-width: .5; stroke-dasharray: 1.5 2.5; }
.map-city { fill: #8f877e; }
.map-city-name { fill: #9a9189; font: 500 9px var(--sans); paint-order: stroke; stroke: rgba(22, 18, 17, .82); stroke-width: 2.4px; stroke-linejoin: round; pointer-events: none; }
.map-pin { cursor: pointer; }
.map-halo { fill: rgb(var(--gold-rgb) / .12); }
.map-dot { fill: var(--surface-raised); }
.hub-map .map-dot { stroke: none; }
.map-share { fill: none; stroke: var(--wine, var(--unsorted)); stroke-width: 3.2; }
.map-belt { fill: rgb(var(--gold-rgb) / .055); }
.map-belt-name, .map-sea-name { font: 500 8.5px var(--sans); letter-spacing: .3em; text-anchor: middle; text-transform: uppercase; pointer-events: none; }
.map-belt-name { fill: rgb(var(--gold-bright-rgb) / .55); }
.map-sea-name { fill: #46555e; font-style: italic; }
.map-count { fill: var(--text); font: 600 14px var(--sans); text-anchor: middle; pointer-events: none; }
.map-name { fill: #cfc7be; font: 500 12px var(--sans); text-anchor: middle; paint-order: stroke; stroke: rgba(14, 12, 11, .88); stroke-width: 4px; stroke-linejoin: round; }
.map-pin.is-on .map-dot, .hub-map .map-dot { fill: var(--gold); }
.map-pin.is-on .map-count, .hub-map .map-count { fill: var(--on-gold); }
.map-pin.is-on .map-name { fill: var(--text); font-weight: 600; }
.map-lead { stroke: rgb(var(--gold-rgb) / .6); stroke-width: 1; }
.map-home { fill: var(--gold); }
.map-pin:focus { outline: none; }
.map-pin:focus-visible .map-dot { stroke: var(--text); stroke-width: 3; }

/* The map takes the whole screen. On a screen wider than a phone it keeps a phone's shape, in the middle. */
html:has(.mapscreen) { overflow: hidden; }
/* The page's own bars are under the map: the keyboard and a screen reader pass them by. */
html:has(.mapscreen) :is(.topbar, .tabbar) { visibility: hidden; }
.mapscreen { position: fixed; inset: 0; z-index: 20; display: grid; justify-items: center; background: #060505; }
.map-frame { position: relative; width: min(100vw, 30rem); height: 100vh; height: 100dvh; background: #090d10; overflow: hidden; }
.map-frame .map { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
/* While the map moves, map.js moves and scales the picture already drawn (translate and scale, about its corner), and what
   lies past the edge of the drawing's box is drawn too, so that a drag brings land into view and not an empty edge. */
.map-frame .map { overflow: visible; transform-origin: 0 0; will-change: transform, translate, scale; }
/* Holding a place on a phone is the start of a drag, not a request to see the link. */
.map-frame .map a { -webkit-tap-highlight-color: transparent; }
.map-frame .map.is-moving { cursor: grabbing; }
.map-land, .map-water, .map-river, .map-state, .map-border, .map-lead, .map-versus { vector-effect: non-scaling-stroke; }
/* The drawing is as big as the screen is wide, whatever its height, and slides up so that the middle of its room for
   marks is the middle of the space between the heading and the sheet. That space is a good deal less on a phone with its
   browser's bars showing than on the phone, and the sheet would otherwise stand over the marks. The heading is about
   104px below the screen's top, and the sheet's top is 54% of the screen's height down. */
@supports (height: 1dvh) and (width: min(1vw, 1rem)) {
    .map-frame .map {
        inset: 0 auto auto 0;
        height: calc(min(100vw, 30rem) * 844 / 390);
        transform: translateY(min(0px, calc((env(safe-area-inset-top) + 104px) / 2 + 27dvh - var(--middle) * min(100vw, 30rem) / 390)));
    }
}
.map-top { position: absolute; z-index: 3; left: 0; right: 0; top: 0; padding: calc(env(safe-area-inset-top) + .9rem) 0 1.8rem; background: linear-gradient(var(--bg) 62%, rgb(var(--bg-rgb) / 0)); }
.map-title { display: flex; align-items: center; gap: 12px; padding: 0 18px 12px; }
.map-back { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; background: var(--bg); color: var(--text); }
.map-back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.map-title h1 { margin: 0; font-size: 1.75rem; line-height: 1.1; }
.map-filters { display: flex; align-items: center; gap: 6px; padding: 0 18px; overflow-x: auto; scrollbar-width: none; }
.map-filters::-webkit-scrollbar { display: none; }
.map-chip { flex: none; display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: #cfc7be; font-size: .88rem; text-decoration: none; white-space: nowrap; }
.map-chip[aria-current="true"] { border-color: var(--text); background: var(--text); color: #14100c; }
.map-out { border-color: rgb(var(--gold-rgb) / .6); color: var(--gold-bright); }
.map-out::before { content: "\2039\00a0"; }
.map-sheet { position: absolute; z-index: 4; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: 14px; box-sizing: border-box; max-height: 46vh; max-height: var(--sheet, 46dvh); padding: 10px 20px calc(env(safe-area-inset-bottom) + 22px); overflow-y: auto; border-top: 1px solid var(--line); border-radius: 28px 28px 0 0; background: var(--surface-raised); }
.map-sheet.is-settling { transition: max-height .22s ease; }
/* Low or halfway the sheet is a card that the hand moves, with its words still; up, its words scroll, and stay in it. */
.map-sheet.is-peek, .map-sheet[data-state="peek"], .map-sheet[data-state="half"] { overflow-y: hidden; touch-action: none; }
.map-sheet[data-state="full"] { overscroll-behavior: contain; }
.map-sheet :is(.chips, .map-suggest, .map-filters) { touch-action: pan-x; }
/* While another sheet is being fetched, this one says so by fading a little. */
.map-sheet > :not(.map-grab) { transition: opacity .2s; }
.map-frame.is-going .map-sheet > :not(.map-grab) { opacity: .55; }
/* The handle is the sheet's whole top edge, and stays at the top while the words scroll under it. */
.map-grab { position: sticky; top: -10px; z-index: 3; flex: none; align-self: stretch; height: 38px; margin: -10px -20px -10px; padding: 0; border: 0; border-radius: 28px 28px 0 0; background: var(--surface-raised); cursor: grab; touch-action: none; -webkit-tap-highlight-color: transparent; }
.map-grab span { display: block; width: 40px; height: 5px; margin: 16px auto 17px; border-radius: 999px; background: var(--line-strong); }
.map-grab:hover span, .map-grab:focus-visible span { background: var(--gold-bright); }
.map-sheet.is-dragging .map-grab { cursor: grabbing; }
.map-sheet.is-dragging { user-select: none; -webkit-user-select: none; }
.map-about h2 { margin: 0; font-size: 1.75rem; line-height: 1.05; }
.map-about p { margin: .2rem 0 0; color: var(--muted); font-size: .88rem; line-height: 1.4; }
.map-wines { list-style: none; margin: 0; padding: 0; }
.map-wines li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 44px; border-top: 1px solid var(--line); font-size: .94rem; }
.map-wines a { flex: 1; display: grid; gap: .05rem; min-width: 0; padding: .4rem 0; color: var(--text); text-decoration: none; }
.map-wines a b, .map-wines a small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-wines a b { font-weight: 400; }
.map-wines a small { color: var(--muted); font-size: .78rem; }
.map-wines span { flex: none; color: var(--muted); font-size: .88rem; }
.map-wines .map-more-wines a { display: block; padding: 0; color: var(--gold-bright); font-size: .9rem; }
.map-wines .map-more-wines a::after { content: "\00a0\203A"; }
.map-sheet form { margin: 0; }
.map-go { display: block; box-sizing: border-box; width: 100%; padding: 14px; border: 1px solid var(--gold); border-radius: 16px; background: none; color: var(--text); font: 600 1rem var(--sans); text-align: center; text-decoration: none; cursor: pointer; }
.map-go:hover, .map-go:focus-visible { background: rgb(var(--gold-rgb) / .12); }
.map-note { margin: 0; color: var(--faint); font-size: .8rem; }

/*
    What the sheet teaches. First what is worked out from where the place is, each a line with a gold dot
    before it. Then the few lines written on the place, each under what it is about, signed as Kept's. Two
    places set side by side have the same things in two columns.
*/
.map-facts { display: grid; gap: .3rem; list-style: none; margin: 0; padding: 0; font-size: .9rem; line-height: 1.4; }
.map-facts li { display: grid; grid-template-columns: .9rem minmax(0, 1fr); align-items: baseline; }
.map-facts li::before { content: ""; width: .38rem; height: .38rem; border-radius: 50%; background: var(--gold); translate: 0 -.12rem; }
.map-guide { display: grid; gap: .55rem; margin: 0; }
.map-guide dt, .map-topic { margin: 0; color: var(--faint); font-size: .68rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.map-guide dd { margin: .1rem 0 0; font-size: .92rem; line-height: 1.45; }
.map-by { margin: -.5rem 0 0; color: var(--faint); font-size: .76rem; font-style: italic; }
.map-cellar { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.4; }
.map-cellar b { display: block; color: var(--faint); font-size: .68rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.map-ways { display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem 1.4rem; margin: 0; }
.map-ways a { display: inline-flex; align-items: center; min-height: 40px; color: var(--gold-bright); font-size: .92rem; text-decoration: none; }
.map-ways a::after { content: "\00a0\203A"; }
.map-about h2 i { color: var(--muted); font-size: .7em; font-style: normal; }
.map-pairs { display: grid; gap: .3rem; }
.map-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .9rem; }
.map-pair p { margin: 0; font-size: .88rem; line-height: 1.4; }
.map-pair-head p { color: var(--gold-bright); font-weight: 600; }
.map-topic { margin-top: .45rem; }
.map-versus { stroke: var(--gold); stroke-width: 1.2; stroke-dasharray: 4 3; }
.map-zoom { position: absolute; right: 12px; top: calc(env(safe-area-inset-top) + 124px); z-index: 3; display: grid; gap: 6px; }
.map-zoom button[aria-disabled="true"] { opacity: .4; }
.map-zoom[hidden] { display: none; }
.map-zoom button { width: 40px; height: 40px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--bg); color: var(--text); font: 500 1.4rem/1 var(--sans); cursor: pointer; }
.map-zoom button:hover, .map-zoom button:focus-visible { border-color: var(--gold); color: var(--gold-bright); }
.map-zoom button[hidden] { display: none; }
.map-zoom button svg { display: block; width: 20px; height: 20px; margin: auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.map-topic-list { margin: .5rem 0 -.4rem; }
.map-compare { display: grid; gap: .45rem; }
.map-compare .map-topic { margin-top: 0; }
.map-suggest { display: flex; gap: .5rem; margin: 0 -20px; padding: 0 20px; overflow-x: auto; scrollbar-width: none; }
.map-suggest::-webkit-scrollbar { display: none; }
.map-suggest a { flex: none; display: grid; align-content: center; gap: .1rem; min-height: 48px; padding: .45rem .9rem; border: 1px solid rgb(var(--gold-rgb) / .55); border-radius: 14px; color: var(--text); text-decoration: none; }
.map-suggest a:hover, .map-suggest a:focus-visible { background: rgb(var(--gold-rgb) / .12); }
.map-suggest b { font-size: .92rem; font-weight: 600; }
.map-suggest b::after { content: "\00a0\203A"; color: var(--gold-bright); }
.map-suggest span { color: var(--muted); font-size: .78rem; }
.map-suggest .map-any { border-color: var(--line-strong); }
.map-pick { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 0 1rem; }
.map-pick p { grid-column: 1 / -1; }
.map-cancel { display: inline-flex; align-items: center; min-height: 40px; color: var(--gold-bright); font-size: .92rem; text-decoration: none; }
.map-places { list-style: none; margin: 0; padding: 0; }
.map-places li { border-top: 1px solid var(--line); }
.map-places a { display: grid; gap: .05rem; min-height: 52px; padding: .5rem 0; align-content: center; color: var(--text); text-decoration: none; }
.map-places b { overflow: hidden; font-size: .96rem; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.map-places small { overflow: hidden; color: var(--muted); font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.map-places a:hover b, .map-places a:focus-visible b { color: var(--gold-bright); }
/*
    A place's story on its sheet: its drawing over a line, a few sentences and a few dates. Then the places to set it beside, each with why,
    and two places side by side: the answer first, where each sits on the same scales, what differs, and two bottles to pour.
*/
.map-story, .map-answer { flex: none; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-raised); }
.map-answer { border-color: var(--gold); }
.ask-picture.map-story, .ask-picture.map-answer { padding: 0; }
.map-story > svg, .map-answer > svg { display: block; width: 100%; height: auto; }
.map-story > div, .map-answer > div { display: grid; gap: .55rem; padding: .9rem 1rem 1rem; }
.map-story h3, .map-answer h3, .map-inglass h3, .map-why h3, .map-taste h3 { margin: 0; font-family: var(--serif); font-weight: 400; }
.map-story h3 { font-size: 1.3rem; line-height: 1.25; }
.map-answer h3 { font-size: 1.5rem; line-height: 1.2; }
.map-story p, .map-answer p { margin: 0; font-size: .94rem; line-height: 1.55; }
.map-story .map-kicker, .map-answer .map-kicker { color: var(--faint); font-size: .68rem; font-weight: 600; letter-spacing: .16em; line-height: 1.4; text-transform: uppercase; }
.map-answer .map-kicker { color: var(--gold-bright); }
.map-dates { display: grid; gap: .5rem; list-style: none; margin: .2rem 0 0; padding: 0; }
.map-dates li { display: grid; grid-template-columns: 3.4rem .75rem minmax(0, 1fr); gap: .4rem; align-items: baseline; font-size: .88rem; line-height: 1.4; }
.map-dates b { color: var(--gold-bright); font-weight: 600; }
.map-dates li::before { content: ""; order: 1; width: .6rem; height: .6rem; border-radius: 50%; background: var(--gold); }
.map-dates span { order: 2; }
.map-story .map-yours { padding-top: .7rem; border-top: 1px solid var(--line); font-size: .9rem; line-height: 1.45; }
.map-yours a { color: var(--text); font-weight: 600; }
.map-story .map-by { margin: 0; font-size: .76rem; }
.map-whole { display: inline-flex; align-items: center; min-height: 40px; color: var(--gold-bright); font-size: .92rem; text-decoration: none; }
.map-whole::after { content: "\00a0\203A"; }

.map-offers { display: grid; gap: .5rem; }
.map-offer { display: grid; gap: .1rem; padding: .7rem .85rem; border: 1px solid var(--line); border-radius: 14px; color: var(--text); text-decoration: none; }
.map-offer.is-first { border-color: var(--gold); }
.map-offer b { font-size: .96rem; font-weight: 600; }
.map-offer span { color: var(--muted); font-size: .82rem; line-height: 1.4; }
.map-offer:hover, .map-offer:focus-visible, .map-any:hover, .map-any:focus-visible { background: rgb(var(--gold-rgb) / .12); }
.map-any { display: flex; align-items: center; min-height: 44px; padding: 0 .85rem; border: 1px solid var(--line); border-radius: 14px; color: var(--text); font-size: .94rem; font-weight: 500; text-decoration: none; }
.map-every > summary { display: flex; align-items: center; min-height: 44px; color: var(--gold-bright); cursor: pointer; font-size: .92rem; list-style: none; }
.map-every > summary::-webkit-details-marker { display: none; }
.map-every > summary::after { content: "\00a0\203A"; }
.map-every[open] > summary::after { content: "\00a0\2039"; }

.map-verdict { display: grid; gap: 1.1rem; }
.map-answer-waiting { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); gap: .8rem; align-items: center; padding: .9rem 1rem; }
.map-answer-waiting[hidden] { display: none; }
.map-answer-waiting svg { width: 2.6rem; height: auto; }
.map-answer-waiting p { color: var(--muted); font-size: .92rem; }
.map-waiting-glass { fill: none; stroke: var(--text); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.map-waiting-wine { fill: #7a1f35; transform-box: fill-box; transform-origin: 50% 100%; animation: map-waiting-fill 2.8s ease-in-out infinite alternate; }
@keyframes map-waiting-fill { from { transform: scaleY(.12); } to { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .map-waiting-wine { animation: none; } }

.map-inglass, .map-why, .map-taste { display: grid; gap: .6rem; }
.map-inglass h3, .map-why h3, .map-taste h3 { font-size: 1.2rem; line-height: 1.3; }
.map-inglass-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .2rem 1rem; }
.map-legend { display: flex; gap: .8rem; margin: 0; color: var(--muted); font-size: .8rem; }
.map-legend span { display: inline-flex; align-items: center; gap: .32rem; }
.map-legend span::before { content: ""; width: .62rem; height: .62rem; border-radius: 50%; background: currentColor; }
.map-legend .is-one, .map-tastes .is-one { color: #d9925a; }
.map-legend .is-two, .map-tastes .is-two { color: #9fbfdf; }
.map-scale { display: grid; grid-template-columns: 4.6rem minmax(0, 1fr); gap: .6rem; align-items: center; font-size: .88rem; }
.map-scale-line { position: relative; display: block; height: 16px; margin: 0 8px; background: linear-gradient(var(--line-strong), var(--line-strong)) 0 50% / 100% 2px no-repeat; }
.map-scale-line i { position: absolute; top: 0; left: calc(var(--at) - 8px); box-sizing: border-box; width: 16px; height: 16px; border: 2px solid var(--surface); border-radius: 50%; }
.map-scale-line .is-one { background: #d9925a; }
.map-scale-line .is-two { background: #7fa3c9; }
.map-tastes { margin-top: .2rem; }
.map-by.map-by-scales { margin: 0; }
.map-why-row { display: grid; gap: .2rem; padding-bottom: .55rem; border-bottom: 1px solid var(--line); }
.map-why-row .map-topic { margin: 0; }
.map-taste-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .6rem; }
.map-bottle { display: grid; align-content: start; gap: .2rem; padding: .7rem; border: 1px solid var(--line); border-radius: 14px; color: var(--text); text-decoration: none; }
.map-bottle b { font-size: .88rem; font-weight: 600; line-height: 1.3; }
.map-bottle small { color: var(--muted); font-size: .78rem; line-height: 1.35; }
.map-bottle.is-to-buy { border: 1px dashed var(--gold); }
.map-bottle.is-to-buy small { color: var(--gold-bright); }
.map-go.map-go-full { border-color: var(--gold); background: var(--gold); color: #1a1209; }
.map-ask { display: flex; align-items: center; justify-content: center; min-height: 44px; color: var(--gold-bright); font-size: .92rem; text-decoration: none; }

/* The filter: one button in the row, which opens a panel of the types the cellar has and when to drink them. */
.map-show { flex: none; min-width: 0; }
.map-show > summary { list-style: none; cursor: pointer; gap: 7px; max-width: 46vw; }
.map-show > summary::-webkit-details-marker { display: none; }
.map-show > summary svg { flex: none; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.map-show > summary span { overflow: hidden; text-overflow: ellipsis; }
.map-show.is-narrowed > summary { border-color: var(--text); background: var(--text); color: #14100c; }
.map-show[open] > summary { border-color: var(--gold); }
.map-show-panel { position: absolute; left: 12px; right: 12px; top: calc(100% - 1.2rem); z-index: 5; display: grid; gap: .5rem; max-height: calc(100dvh - 180px); overflow-y: auto; padding: 14px 16px 16px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface-raised); box-shadow: 0 12px 30px rgb(0 0 0 / .5); }
.map-show-panel .map-topic { margin: 0; }
.map-show-panel .chips { margin: 0 0 .3rem; padding: 0; }
/* The panel stands over the sheet while it is open. */
.map-top:has(.map-show[open]) { z-index: 5; }

/* The regions to try: no filter but a switch, which adds dashed rings to the map. It sits apart at the end of the row and looks like them. */
.map-try { flex: none; margin-left: auto; display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 13px 0 11px; border: 1px dashed var(--line-strong); border-radius: 999px; background: var(--bg); color: #cfc7be; font-size: .88rem; text-decoration: none; white-space: nowrap; }
.map-try i { width: 12px; height: 12px; border-radius: 50%; border: 1.4px dashed rgb(210 182 127 / .85); }
.map-try[aria-pressed="true"] { border-color: rgb(var(--gold-rgb) / .9); background: rgb(var(--gold-rgb) / .14); color: var(--gold-bright); }
.map-try[aria-pressed="true"] i { border-style: solid; background: rgb(196 162 100 / .35); }

/* The colours of the chosen place's ring, by type: the key to every ring on the map. */
.mix-key.map-key { margin: -.5rem 0 0; }
.mix-key.map-key li { display: inline-flex; align-items: center; gap: .35rem; }

/* The regions to try near the chosen place, in a line, and every one at the foot of the sheet. */
.map-tries { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.55; }
.map-tries i { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 50%; border: 1.3px dashed rgb(210 182 127 / .85); vertical-align: -1px; }
.map-tries a { color: var(--gold-bright); text-underline-offset: 3px; }
.map-tries .map-tries-all { white-space: nowrap; text-decoration: none; }
.map-tries .map-tries-all::after { content: "\00a0\203A"; }
.map-apart { margin: -.2rem 0 0; font-size: .95rem; line-height: 1.5; }
.map-try-all { display: grid; gap: .4rem; }
.map-try-all > summary { display: flex; align-items: center; min-height: 44px; border-top: 1px solid var(--line); color: var(--gold-bright); font-size: .92rem; cursor: pointer; list-style: none; }
.map-try-all > summary::-webkit-details-marker { display: none; }
.map-try-all > summary::after { content: "\00a0\203A"; transition: rotate .2s; }
.map-try-all[open] > summary::after { rotate: 90deg; }
.map-try-all .map-topic { margin-top: .5rem; }
.map-try-names { margin: 0; color: var(--faint); font-size: .9rem; line-height: 1.7; }
.map-try-names a { color: var(--text); text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.map-try-all a[aria-current="true"] { color: var(--gold-bright); }
.map-go-quiet { border-color: var(--line-strong); font-weight: 500; }

/* A screen that cannot draw the map shows the places as a list, between the heading and the sheet. */
.map-list[hidden] { display: none; }
.map-ghost { cursor: pointer; }
.map-ghost-hit { fill: transparent; }
.map-ghost-ring { fill: rgb(var(--bg-rgb) / .55); stroke: rgb(var(--gold-bright-rgb) / .8); stroke-width: 1.3; stroke-dasharray: 2.4 2; }
.map-ghost-name { fill: #bdb3a8; font: 500 10px var(--sans); text-anchor: middle; paint-order: stroke; stroke: rgba(14, 12, 11, .85); stroke-width: 3px; stroke-linejoin: round; }
.map-ghost.is-on .map-ghost-ring { fill: rgb(var(--gold-rgb) / .3); stroke: var(--gold-bright); stroke-dasharray: none; stroke-width: 1.8; }
.map-ghost.is-on .map-ghost-name { fill: var(--text); font-weight: 600; }
.map-ghost:focus { outline: none; }
.map-ghost:focus-visible .map-ghost-ring { stroke: var(--text); }

/* The world the cellar's places are drawn on: OpenStreetMap's, drawn by MapLibre, in Kept's colours (wwwroot/map/style.json). */
/* The map is a layer of its own: nothing drawn on it, not even the chosen place, can stand over the heading or the sheet. */
.map-frame .map-world { position: absolute; inset: 0; z-index: 0; isolation: isolate; background: #090d10; touch-action: none; }
.map-frame .map-world .maplibregl-canvas { outline: none; }
.map-frame .map-world .maplibregl-canvas:focus-visible { outline: 2px solid var(--gold); outline-offset: -4px; }
.map-list { position: absolute; z-index: 1; top: calc(env(safe-area-inset-top) + 124px); left: 0; right: 0; bottom: calc(var(--sheet-now, 120px) + 8px); display: grid; align-content: start; gap: .5rem; margin: 0; padding: 0 24px; overflow-y: auto; list-style: none; color: var(--muted); }
.map-list a { color: var(--gold-bright); }

/* A place: a ring in the colours of what is from there, its count in the middle, and its name under it. */
.map-world .place { position: absolute; top: 0; left: 0; margin: 0; display: block; width: var(--size, 30px); height: var(--size, 30px); color: var(--text); text-decoration: none; -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; }
.map-world .place::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; background: rgb(14 10 9 / .5); }
.map-world .place-ring { position: relative; display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; box-shadow: 0 2px 8px rgb(0 0 0 / .55); transition: box-shadow .2s; }
.map-world .place-ring::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: #1b1513; }
.map-world .place-ring b { position: relative; z-index: 1; font: 600 12px/1 var(--sans); letter-spacing: .01em; font-variant-numeric: tabular-nums; }
.map-world .place { z-index: 1; }
.map-world .place-name { position: absolute; top: calc(100% + 5px); left: 50%; transform: translateX(calc(-50% + var(--nudge, 0px))); white-space: nowrap; font: 500 12.5px/1.1 var(--sans); letter-spacing: .01em; text-shadow: 0 0 3px #0e0a09, 0 0 3px #0e0a09, 0 1px 3px #000; pointer-events: none; transition: opacity .15s; }
.map-world .place.is-quiet .place-name { opacity: 0; }
/* A name with no room under its ring goes beside it, or over it. */
.map-world .place[data-side="right"] .place-name { top: 50%; left: calc(100% + 6px); transform: translateY(-50%); }
.map-world .place[data-side="left"] .place-name { top: 50%; left: auto; right: calc(100% + 6px); transform: translateY(-50%); }
.map-world .place[data-side="above"] .place-name { top: auto; bottom: calc(100% + 5px); }
/* A ring that stands for several places has a second ring behind it, in its own colours. */
.map-world .place.is-many .place-ring::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 50%; background: inherit; transform: translate(4px, -4px); opacity: .55; }
.map-world .place.is-many .place-ring::after { background: #241d1a; }
.map-world .place.is-on { z-index: 2; }
.map-world .place.is-on .place-ring { box-shadow: 0 0 0 2px #0e0a09, 0 0 0 4px var(--gold-bright), 0 2px 8px rgb(0 0 0 / .55); }
.map-world .place.is-on .place-ring::after { background: color-mix(in srgb, var(--gold) 24%, #1b1513); }
.map-world .place.is-on .place-name { color: var(--gold-bright); font-weight: 600; }
.map-world .place:focus-visible { outline: none; }
.map-world .place:focus-visible .place-ring { box-shadow: 0 0 0 2px var(--text); }

/* A famous region the cellar has nothing from: a small dashed ring in gold, with its name. */
.map-world .place.stranger { --size: 14px; z-index: 0; color: #c9bfb3; }
.map-world .place.stranger.is-on { z-index: 2; }
.map-world .place.stranger::before { inset: -12px; background: transparent; }
.map-world .place.stranger .place-ring { border: 1.4px dashed rgb(210 182 127 / .85); background: rgb(14 10 9 / .55); box-shadow: none; }
.map-world .place.stranger .place-ring::after { display: none; }
.map-world .place.stranger .place-name { top: calc(100% + 4px); font-size: 11.5px; font-weight: 500; }
.map-world .place.stranger.is-on .place-ring { border-style: solid; border-color: var(--gold-bright); background: rgb(196 162 100 / .3); }

/* The credit OpenStreetMap's licence asks for, kept just above the sheet. */
.map-frame .maplibregl-ctrl-bottom-left { bottom: calc(var(--sheet-now, 120px) + 6px); transition: bottom .3s ease; }
.map-frame .maplibregl-ctrl.maplibregl-ctrl-attrib { margin: 0 0 0 10px; background: rgb(15 11 10 / .72); color: var(--muted); font: 400 10.5px/1.6 var(--sans); }
.map-frame .maplibregl-ctrl-attrib a { color: var(--muted); }
.map-frame .maplibregl-ctrl-attrib.maplibregl-compact { min-height: 22px; }
.map-frame .maplibregl-ctrl-attrib-button { filter: invert(1) opacity(.55); }

.hub-map { display: block; margin: 0 0 1.6rem; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); color: var(--text); text-decoration: none; overflow: hidden; }
.hub-map:hover, .hub-map:focus-visible { border-color: var(--line-strong); }
.hub-map svg { display: block; width: 100%; height: 132px; }
.hub-map .map-count { font-size: 12px; }
.hub-map-words { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 14px 16px; }
.hub-map-words span { display: grid; gap: 2px; }
.hub-map-words strong { font-size: .94rem; font-weight: 600; }
.hub-map-words small { color: var(--muted); font-size: .81rem; }
.hub-map-words i { color: var(--gold); font-size: 1.25rem; font-style: normal; }

/*
    The wait: a sheet over the page while something that takes a while is done. A glass fills as the work
    goes on, the steps are ticked off as each is reached, and a bar under them says how far along it is.
    How far is --done, from 0 to 1, which the script moves.
*/
.wait { --done: 0; width: min(23rem, calc(100vw - 2rem)); padding: 1.5rem 1.4rem 1rem; border: 1px solid var(--line-strong); border-radius: 24px; background: var(--surface); color: var(--text); text-align: center; box-shadow: 0 30px 80px rgba(0, 0, 0, .65); }
.wait::backdrop { background: rgba(6, 5, 5, .86); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.wait[open] { animation: wait-in .4s cubic-bezier(.2, .8, .2, 1); }
.wait[open]::backdrop { animation: wait-dim .4s ease-out; }
.wait h2 { margin: .7rem 0 1rem; color: var(--text); font: 400 1.5rem/1.2 var(--serif); }
.wait-glass { display: block; width: 6.4rem; height: 8rem; margin: 2.5rem auto 0; overflow: visible; }
.wait-fact { margin: .7rem 0 .2rem; padding: .65rem .8rem; border: 1px solid var(--line); border-radius: 14px; animation: arrive .5s ease both; }
.wait-fact[hidden] { display: none; }
.wait-fact p { margin: 0; }
.wait-fact-name { color: var(--text); font: 400 1.02rem/1.25 var(--serif); }
.wait .wait-fact-text { margin-top: .25rem; color: var(--muted); font-size: .86rem; line-height: 1.42; }
.wait-rim, .wait-stem { fill: none; stroke: var(--gold-bright); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.wait-shine { fill: none; stroke: rgba(255, 255, 255, .3); stroke-width: 2; stroke-linecap: round; }
.wait-level { transform: translateY(calc(86px - var(--done) * 58px)); }
.wait-wave { fill: url(#wait-wine); animation: wait-wave 2.6s linear infinite; }
.wait-wave.back { fill: #c8475f; opacity: .55; animation-duration: 4.1s; animation-direction: reverse; }

/* The wine going in, poured from a bottle held over the glass. The whole bottle tips in above the rim, in the
   glass's own gold line with a label on it, so that it can only be a bottle, and the wine leaves its lip in one short,
   full stream that falls straight into the glass, with a glint running down it. A pour that came from a corner, thin
   and from nothing, was taken for something else: the bottle is always whole and in sight, and the stream is short.
   The wine in the glass is drawn over the stream's foot, so it ends at the surface however full the glass is. When the
   work is done the last of the stream falls in after the rest, and the bottle is lifted away. The paths of the stream
   are measured as a hundred long, whatever their real length, so that the dashes below hold for all of them. */
.wait-bottle { transform-origin: 80px -10px; animation: wait-tip .45s ease-out backwards; transition: transform .5s ease-in .25s, opacity .4s ease-in .3s; }
.wait-bottle-glass { fill: #2a0b15; stroke: var(--gold-bright); stroke-width: 2; stroke-linejoin: round; }
.wait-bottle-label { fill: #e6d9b8; }
.wait-bottle-print { fill: none; stroke: #6b4a2a; stroke-width: 1.2; stroke-linecap: round; }
.wait-bottle-lip { fill: var(--gold-bright); }
.wait-bottle-foil { fill: none; stroke: var(--gold-bright); stroke-width: 1.4; stroke-linecap: round; opacity: .8; }
.wait.is-done .wait-bottle, .wait.is-stopped .wait-bottle { transform: rotate(16deg); opacity: 0; }
.wait-stream { fill: none; stroke: #b3294a; stroke-width: 4.4; stroke-linejoin: round; stroke-dasharray: 100 100; animation: wait-fall .6s ease-in .35s backwards, wait-thin 3.4s ease-in-out 1.1s infinite; transition: stroke-dashoffset .5s ease-in; }
.wait-glint { fill: none; stroke: rgb(255 224 230 / .5); stroke-width: 1; stroke-linecap: round; stroke-dasharray: 6 26; animation: wait-run 1.1s linear infinite, wait-show .3s linear .9s backwards; transition: opacity .2s; }

/* A bottle does not pour evenly. It gulps air, and the wine comes in glugs: three to a round here, a big one, then
   a small one and a middling one close together, so that it never ticks like a clock. Each glug is a swell that
   leaves the lip and falls down the stream, gathering speed as anything falling does. It is drawn as two lengths
   of the stream, a long one a little thicker than the stream and a short fat one at its head, so that it swells
   and tails off and is not a bead on a thread. With it a bubble goes up the neck, the bottle dips and comes back,
   and where the swell lands a ripple spreads and the wine in the glass bobs. Between glugs the stream runs thin.
   All of it keeps the one round of 3.4 seconds, each part starting when its glug does or when it lands. --from and
   --to are where a length starts, out of sight above the lip, and where it ends, at the foot of the stream. */
.wait-swell, .wait-glug { fill: none; stroke: #b3294a; stroke-linecap: round; stroke-dashoffset: var(--from); opacity: 0; animation: wait-glug 3.4s linear 1.1s infinite; }
.wait-swell { --from: 22; --to: -78; stroke-width: 5.4; stroke-dasharray: 22 78; }
.wait-glug { --from: 11; --to: -89; stroke-width: 6.6; stroke-dasharray: 10 90; }
.wait-swell.second { --from: 14; --to: -86; stroke-width: 5; stroke-dasharray: 14 86; }
.wait-glug.second { --from: 7; --to: -93; stroke-width: 5.8; stroke-dasharray: 6 94; }
.wait-swell.third { --from: 18; --to: -82; stroke-width: 5.2; stroke-dasharray: 18 82; }
.wait-glug.third { --from: 9; --to: -91; stroke-width: 6.2; stroke-dasharray: 8 92; }
:is(.wait-swell, .wait-glug).second { animation-delay: 2.25s; }
:is(.wait-swell, .wait-glug).third { animation-delay: 2.85s; }
.wait-nod { transform-origin: 80px -10px; animation: wait-nod 3.4s ease-in-out 1.1s infinite; }
.wait-bubble { fill: rgb(255 255 255 / .14); stroke: rgb(255 244 226 / .85); stroke-width: .8; opacity: 0; animation: wait-bubble 3.4s ease-out 1.1s infinite; }
.wait-bob { animation: wait-bob 3.4s ease-in-out 1.72s infinite; }
.wait-ripple { fill: none; stroke: #e7a0ae; stroke-width: 1; opacity: 0; transform-box: fill-box; transform-origin: center; animation: wait-ripple 3.4s ease-out 1.72s infinite; }
.wait-ripple.second { animation-delay: 2.87s; }
.wait-ripple.third { animation-delay: 3.47s; }
.wait.is-done .wait-stream, .wait.is-stopped .wait-stream { stroke-dashoffset: -100; }
.wait.is-done .wait-glint, .wait.is-stopped .wait-glint { opacity: 0; }
.wait.is-done :is(.wait-swell, .wait-glug, .wait-ripple, .wait-bubble, .wait-nod, .wait-bob), .wait.is-stopped :is(.wait-swell, .wait-glug, .wait-ripple, .wait-bubble, .wait-nod, .wait-bob) { animation: none; }
.wait.is-done .wait-level { transition: transform .5s ease-out; }
.wait-steps { list-style: none; display: grid; gap: .5rem; width: fit-content; max-width: 100%; margin: 0 auto 1.1rem; padding: 0; text-align: left; }
.wait-steps li { position: relative; padding-left: 1.7rem; color: var(--muted); font-size: .95rem; line-height: 1.3; opacity: .5; transition: color .3s, opacity .3s; }
.wait-steps li::before { content: ""; position: absolute; left: .2rem; top: .28rem; box-sizing: border-box; width: .7rem; height: .7rem; border: 1.5px solid currentColor; border-radius: 50%; }
.wait-steps li.now { color: var(--text); font-weight: 600; opacity: 1; }
.wait-steps li.now::before { border-color: var(--gold-bright); background: var(--gold-bright); animation: wait-pulse 1.2s ease-in-out infinite; }
.wait-steps li.done { opacity: .9; }
.wait-steps li.done::before { left: .4rem; top: .1rem; width: .36rem; height: .7rem; border: solid var(--gold-bright); border-width: 0 2px 2px 0; border-radius: 0; rotate: 45deg; animation: wait-tick .3s ease-out; }
.wait-bar { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.wait-bar i { display: block; width: calc(var(--done) * 100%); height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--gold), var(--gold-bright) 50%, var(--gold)) 0 0 / 200% 100%; animation: wait-sheen 1.6s linear infinite; }
.wait.is-done .wait-bar i { transition: width .5s ease-out; }
.wait-note { margin: .8rem 0 .2rem; color: var(--muted); font-size: .84rem; }
.wait-problem { display: none; margin: 0 0 .6rem; line-height: 1.45; }
.wait.is-stopped .wait-problem { display: block; }
.wait.is-stopped .wait-steps, .wait.is-stopped .wait-bar, .wait.is-stopped .wait-note { display: none; }
.wait.is-stopped .wait-wave { animation-play-state: paused; }
.wait button.wait-stop { min-height: 40px; margin-top: .2rem; color: var(--muted); }
.wait button.wait-stop[hidden] { display: none; }

/* A sheet over the page takes the focus itself when it opens, and shows nothing for it. */
.wait:focus, .tray:focus { outline: none; }
.wait.is-done .wait-stop { visibility: hidden; }
@keyframes wait-in { from { opacity: 0; translate: 0 18px; scale: .96; } }
@keyframes wait-dim { from { opacity: 0; } }
@keyframes wait-wave { to { transform: translateX(60px); } }
@keyframes wait-tip { from { transform: rotate(18deg); opacity: 0; } }
@keyframes wait-show { from { opacity: 0; } }
@keyframes wait-fall { from { stroke-dashoffset: 100; } }
@keyframes wait-run { to { stroke-dashoffset: -32; } }
@keyframes wait-ripple { 0% { opacity: .8; transform: scale(.25, .6); } 27%, 100% { opacity: 0; transform: scale(1.6, 1.25); } }
@keyframes wait-glug { 0% { opacity: 1; stroke-dashoffset: var(--from); animation-timing-function: cubic-bezier(.5, 0, .9, .55); } 21% { opacity: 1; stroke-dashoffset: var(--to); } 21.1%, 100% { opacity: 0; stroke-dashoffset: var(--to); } }
@keyframes wait-thin { 0%, 100% { stroke-width: 3.6; } 4% { stroke-width: 5; } 20% { stroke-width: 3.4; } 33.8% { stroke-width: 3.5; } 37% { stroke-width: 4.4; } 51.5% { stroke-width: 3.8; } 55% { stroke-width: 4.8; } 72% { stroke-width: 3.3; } }
@keyframes wait-nod { 0%, 20%, 33.8%, 51.5%, 70%, 100% { transform: rotate(0deg); } 3% { transform: rotate(-1.9deg); } 11% { transform: rotate(.5deg); } 36.5% { transform: rotate(-1deg); } 43% { transform: rotate(.3deg); } 54.5% { transform: rotate(-1.5deg); } 62% { transform: rotate(.4deg); } }
@keyframes wait-bubble { 0%, 33.8%, 51.5%, 100% { opacity: 0; transform: translate(0, 0); } 1.2% { opacity: .8; } 9% { opacity: 0; transform: translate(19px, -11px); } 35% { opacity: .6; } 41.5% { opacity: 0; transform: translate(14px, -8px); } 52.7% { opacity: .7; } 60% { opacity: 0; transform: translate(19px, -11px); } }
@keyframes wait-bob { 0%, 20%, 33.8%, 51.5%, 70%, 100% { transform: translateY(0); } 4% { transform: translateY(1.4px); } 12% { transform: translateY(-.5px); } 37.5% { transform: translateY(.7px); } 44% { transform: translateY(-.3px); } 55.5% { transform: translateY(1.1px); } 62.5% { transform: translateY(-.4px); } }
@keyframes wait-pulse { 50% { box-shadow: 0 0 0 5px rgb(var(--gold-bright-rgb) / .2); } }
@keyframes wait-tick { from { opacity: 0; scale: .4; } }
@keyframes wait-sheen { from { background-position: 200% 0; } }

/* One or several of a few: each a pill that lights when it is chosen. The browser's own box is kept for the keyboard and out of sight. */
.pill-field { min-width: 0; margin: 0 0 .7rem; padding: 0; border: 0; }
.pill-field legend { margin-bottom: .4rem; padding: 0; font-size: .86rem; font-weight: 600; }
.pills { display: flex; flex-wrap: wrap; gap: .45rem; }
.pill { position: relative; display: inline-flex; align-items: center; gap: .4rem; min-height: 40px; margin: 0; padding: 0 .95rem; border: 1px solid var(--line); border-radius: 999px; background: none; font-size: .95rem; font-weight: 500; cursor: pointer; }
.pill input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.pill:has(input:checked) { border-color: var(--gold); background: rgb(var(--gold-rgb) / .08); color: var(--text); }
.pill:has(input[type="checkbox"]:checked) span::before { content: ""; display: inline-block; width: .32rem; height: .62rem; margin: 0 .5rem .12rem .1rem; border: solid var(--gold); border-width: 0 2px 2px 0; rotate: 45deg; }
.pill:has(input:focus-visible) { outline: 2px solid var(--gold-bright); outline-offset: 2px; }
.pill-more { margin-top: .5rem; }
.pill-more > summary { display: inline-flex; align-items: center; min-height: 40px; color: var(--gold-bright); font-size: .9rem; list-style: none; cursor: pointer; }
.pill-more > summary::-webkit-details-marker { display: none; }
.pill-more > summary::after { content: "›"; margin-left: .35rem; }
.pill-more[open] > summary::after { content: "⌄"; }
.pill-group { margin: .35rem 0 .35rem; color: var(--muted); font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.pill-more .pills + .pill-group { margin-top: .7rem; }
label.pill-words { margin-top: .7rem; }

.theme { display: grid; gap: .45rem; margin: 0 0 .8rem; }
.theme h3 { margin: 0; font: 400 1.25rem/1.2 var(--serif); }
.theme-kind { margin: 0; color: var(--faint); font-size: .72rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.theme-why { margin: 0; line-height: 1.45; }
.theme .muted { margin: 0; font-size: .9rem; }
.theme form { margin-top: .4rem; }
.years { display: flex; flex-wrap: wrap; gap: .4rem; margin: .1rem 0; }
.year { display: inline-flex; align-items: center; min-height: 2.1rem; padding: 0 .75rem; border: 1px solid var(--line-strong); border-radius: 999px; background: none; color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; text-decoration: none; }
.year.wanted { border-style: dashed; border-color: var(--muted); background: none; color: var(--muted); font-weight: 500; }
.year.wanted::before { content: "+ "; }
.theme-wines { list-style: none; margin: .1rem 0; padding: 0; }
.theme-wines li { padding: .35rem 0; border-top: 1px solid var(--line); }
.theme-wines a { color: inherit; font-weight: 500; text-decoration: none; }
.theme-wines span { display: block; color: var(--muted); font-size: .84rem; }

.plan-pours { list-style: none; margin: 0 0 1.4rem; padding: 0; display: grid; gap: .8rem; }
.plan-pour { position: relative; display: grid; gap: .55rem; padding-top: 1.1rem; background: radial-gradient(130% 80% at 100% 0%, color-mix(in srgb, var(--wine, var(--unsorted)) 22%, transparent), transparent 64%), var(--surface); }
.plan-number { position: absolute; top: .7rem; right: .9rem; color: var(--gold-bright); font: 400 1.5rem/1 var(--serif); opacity: .8; }
.plan-pour .pour-wine { padding-right: 2rem; }
.plan-where { margin: 0; color: var(--muted); font-size: .92rem; text-decoration: none; }
a.plan-where::after { content: " ›"; color: var(--gold); }
.plan-where strong { color: var(--text); font-weight: 600; }
.plan-gone { margin: 0; }
.plan-gone strong { display: block; font: 600 1.05rem/1.25 var(--sans); }
.plan-gone span { color: var(--muted); font-size: .9rem; }
.plan-why { margin: 0; line-height: 1.45; }
.plan-notes { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .3rem .8rem; margin: 0; font-size: .93rem; }
.plan-notes dt { color: var(--faint); font-size: .7rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; padding-top: .2rem; }
.plan-notes dd { margin: 0; line-height: 1.45; }

.recipe { display: grid; gap: .5rem; margin: 0 0 .8rem; }
.recipe h3 { margin: 0; font: 400 1.25rem/1.2 var(--serif); }
.recipe h4 { margin: .3rem 0 0; color: var(--faint); font-size: .7rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; }
.recipe ul, .recipe ol { margin: 0; padding-left: 1.15rem; line-height: 1.5; }
.recipe-method { margin: .2rem 0 0; line-height: 1.5; }
.recipe-bottles { display: flex; flex-wrap: wrap; gap: .3rem .9rem; margin: 0; font-size: .9rem; }
.plan-list { list-style: none; margin: 0 0 1.4rem; padding: .3rem 1rem; }
.plan-list li { padding: .55rem 0; line-height: 1.45; }
.plan-list li + li { border-top: 1px solid var(--line); }
.plan-adds strong { display: block; font: 600 1rem/1.3 var(--sans); }
.plan-adds span { color: var(--muted); font-size: .93rem; }
.plan-print { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0 0 1.2rem; }
.plan-print > span { color: var(--muted); font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; margin-right: .2rem; }
.plan-print .btn { min-height: 40px; padding: 0 .9rem; font-size: .92rem; }
.plan-print:has(+ .plan-print-how) { margin-bottom: .5rem; }
.plan-print-how { margin: 0 0 1.2rem; color: var(--muted); font-size: .84rem; line-height: 1.45; }
.plan-print-how b { color: var(--text); font-weight: 600; }
.plan-flavours { margin: 0; font-size: .93rem; }
.plan-flavours span { margin-right: .5rem; color: var(--faint); font-size: .7rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; }

/* The flavour guide: a wheel in colour and the words for how a wine feels, on paper like the sheet. */
.guide-body { display: grid; gap: 1rem 1.6rem; align-items: start; }
.wheel { display: block; width: 100%; max-width: 30rem; margin: 0 auto; }
.wheel path { stroke: #fbf8f1; stroke-width: 1; }
.wheel text { fill: #1c1513; text-anchor: middle; dominant-baseline: central; font-family: var(--sans); }
.wheel .on-dark { fill: #fff; }
.wheel-family { font-size: 8.6px; font-weight: 700; letter-spacing: .02em; }
.wheel-word { font-size: 7.4px; }
.wheel-word.lit { font-size: 8px; font-weight: 700; }
.wheel-hub { fill: #fbf8f1; stroke: #1c1513; stroke-width: 1.2; }
.wheel .wheel-title { font: 400 11px var(--serif); }
.guide-words h3:first-child { margin-top: 0; }
.guide-words p { margin: 0 0 .5rem; font-size: .88rem; line-height: 1.45; }
.guide-scales { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .45rem .7rem; align-items: center; margin: 0; font-size: .8rem; }
.guide-scales dt { font-weight: 700; }
.guide-scales dd { display: flex; justify-content: space-between; gap: .3rem; margin: 0; padding: .28rem .6rem; border-radius: 999px; background: linear-gradient(90deg, color-mix(in srgb, var(--scale) 14%, #fbf8f1), color-mix(in srgb, var(--scale) 78%, #fbf8f1)); }
.guide-scales dd span:last-child { color: #fff; font-weight: 600; text-shadow: 0 0 2px rgba(0, 0, 0, .35); }
.guide-say { font: italic 1rem/1.45 var(--sans); }
@media (min-width: 46rem) { .guide-body { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); } }

/*
    How a wine tastes, on the screen: the same wheel as the printed guide in the app's own colours, with the
    wine's flavours in full colour and the rest faint, and its place marked on each of the guide's scales.
    For a cellar the wheel shows every flavour its wines have, the commonest strongest.
*/
.taste { display: grid; gap: .9rem; padding: 1rem; }
.taste .taste-wheel { width: 100%; max-width: 27rem; margin: 0 auto; }
.taste-wheel path { stroke: var(--surface-raised); stroke-width: 1.3; }
.taste-wheel a { text-decoration: none; cursor: pointer; }
.taste-wheel a:hover .taste-piece, .taste-wheel a:focus-visible .taste-piece { filter: brightness(1.25) saturate(1.15); }
.taste-wheel a:focus-visible { outline: none; }
.taste-wheel text.wheel-word { fill: rgba(245, 237, 230, .6); font-size: 10px; }
.taste-wheel text.wheel-word.lit { fill: #1c1513; font-size: 10.6px; font-weight: 700; }
.taste-wheel text.wheel-word.lit.on-dark { fill: #fff; }
.taste-wheel text.wheel-family { font-size: 9px; }
.taste-wheel .wheel-hub { fill: var(--surface); stroke: var(--gold); stroke-width: 1.4; }
.taste-wheel text.wheel-title { fill: var(--gold-bright); }
.taste-wheel path.taste-found { fill: var(--gold-bright); stroke: none; }
/* How to serve a drink, under what it is: its glass drawn, how warm, and how long to decant, each a tile that opens its drink's page. */
.serve-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; max-width: 26rem; margin: .9rem 0 1.1rem; padding: 0; list-style: none; }
.serve-tile {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem; height: 100%; min-height: 44px; padding: .75rem .35rem;
    border: 1px solid var(--line); border-radius: 14px; color: var(--text); font-size: .82rem; font-weight: 500; line-height: 1.25; text-align: center;
    text-decoration: none; text-wrap: balance;
}
a.serve-tile:hover, a.serve-tile:focus-visible { border-color: rgb(var(--gold-rgb) / .55); }
.serve-tile svg { width: auto; height: 1.65rem; fill: none; stroke: #d9d1c7; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.serve-tile svg[viewBox^="-34"] { height: 1.95rem; margin: -.15rem 0; stroke-width: 4.6; }
.kept-notes { display: grid; gap: .8rem; padding: 1rem; }
.kept-notes p, .kept-notes dl { margin: 0; }
.kept-about { font-size: .98rem; line-height: 1.5; }
.kept-notes dl { display: grid; gap: .6rem; }
.kept-notes dt { color: var(--faint); font-size: .68rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.kept-notes dd { margin: .1rem 0 0; font-size: .94rem; line-height: 1.45; }
.kept-by { color: var(--faint); font-size: .76rem; font-style: italic; }

/* While a new drink's notes are written: a glass filling with gold and emptying beside what is coming, each ticked as it comes in. */
.kept-notes.is-writing { grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: .9rem; }
.notes-writing-glass { position: relative; display: inline-block; flex: none; width: 15px; height: 21px; margin-top: .15rem; border: 1.5px solid var(--mark); border-top: 0; border-radius: 0 0 6px 6px; overflow: hidden; vertical-align: -.3rem; }
.notes-writing-glass::after { content: ""; position: absolute; inset: auto 0 0; height: 0; background: var(--gold); }
.notes-writing-said { font-size: .98rem; line-height: 1.45; }
.notes-writing-steps { display: grid; gap: .35rem; margin: .5rem 0 0; padding: 0; list-style: none; color: var(--muted); font-size: .9rem; }
.notes-writing-steps li { display: flex; align-items: center; gap: .5rem; }
.notes-writing-steps li::before { content: ""; flex: none; width: .55rem; height: .55rem; border: 1.5px solid var(--mark); border-radius: 50%; }
.notes-writing-steps li.is-done { color: var(--text); }
.notes-writing-steps li.is-done::before { border-color: var(--gold); background: var(--gold); }
.taste-writing { display: flex; align-items: center; gap: .6rem; color: var(--muted); }
.wine-boards a.is-writing::after { content: ""; display: inline-block; width: .45rem; height: .45rem; margin-left: .35rem; border-radius: 50%; background: var(--gold); vertical-align: .1rem; }
@media (prefers-reduced-motion: no-preference) {
    .notes-writing-glass::after { animation: shop-fill 2.4s ease-in-out infinite; }
    .wine-boards a.is-writing::after { animation: notes-writing-pulse 1.6s ease-in-out infinite; }
    .wine-about-board.is-arriving .kept-notes, .wine-about-board.is-arriving .taste, .wine-about-board.is-arriving .serve-row { animation: air-in .5s ease-out both; }
}
@keyframes notes-writing-pulse { 50% { opacity: .35; } }
.taste-chips { margin: 0; padding: 0; overflow: visible; }
.taste-chips .chip { color: var(--text); }
.taste-chips .chip i { width: .62rem; height: .62rem; border-radius: 50%; }
.taste-chips .chip span { opacity: 1; color: var(--muted); font-variant-numeric: tabular-nums; }
.taste-scales { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .45rem .8rem; align-items: center; margin: 0; }
.taste-scales dt { color: var(--muted); font-size: .8rem; font-weight: 600; }
.taste-scales dd { display: flex; gap: 3px; margin: 0; }
.taste-scales dd span { flex: 1 1 auto; padding: .28rem .45rem; border-radius: 999px; background: rgba(255, 255, 255, .05); color: rgb(var(--muted-rgb) / .75); font-size: .74rem; text-align: center; white-space: nowrap; }
/* The step a wine stands at is marked in cream with dark words, readable on every scale; colour is left to the flavour wheel. */
.taste-scales dd span.at { background: var(--text); color: var(--bg); font-weight: 700; text-shadow: none; }
.taste-note, .taste-found-note { margin: 0; color: var(--muted); font-size: .86rem; line-height: 1.45; }
.taste-found-note b { color: var(--text); font-weight: 600; }
.taste-found-note i { display: inline-block; width: 1.1rem; height: .3rem; margin-right: .45rem; border-radius: 999px; background: var(--gold-bright); vertical-align: middle; }
.cellar-taste form { margin: 0; }
.taste-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 .8rem; }
.taste-fields .pill { min-height: 36px; padding: 0 .75rem; font-size: .88rem; }
.taste-fields .pill-group { margin-top: .55rem; }

/* Who is tasting: friends to tick and names to add, on the plan. */
.who-form { display: grid; gap: .7rem; margin: 0 0 1.4rem; }
.who-form .field { margin: 0; }
.who-ask { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.45; }
.who-ask strong { display: block; margin-bottom: .15rem; color: var(--text); font: 600 1.05rem/1.3 var(--sans); }
details.who-more { margin: 0 0 1.4rem; }
details.who-more .who-form { margin-bottom: 0; }

/* A tasting and a friend: who was there, what each wine scored, and what a friend has liked. */
.guests .where-slots { color: var(--muted); }
details.guest-more { margin: -.3rem 0 1.2rem; }
.guest-add { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: .6rem; }
.guest-add .field { margin: 0; }
.live-go, .scan-go, .reveal-go { margin: 0 0 1.4rem; }
.live-go + .scan-go, .live-go + .reveal-go, .scan-go + .reveal-go { margin-top: -.7rem; }

/* Friends who would like a wine, going by what they have scored. */
.would-love { display: grid; gap: .15rem; margin: 1.2rem 0; padding: .9rem 1.1rem; border: 1px solid rgb(var(--gold-rgb) / .35); border-radius: var(--radius); background: rgb(var(--gold-rgb) / .07); }
.would-love strong { color: var(--text); font: 600 1.05rem/1.3 var(--sans); }
.would-love span { color: var(--muted); font-size: .92rem; line-height: 1.5; }

/*
    Scanning a tasting's sheets. How many are in is a bar that fills, and a sheet just saved moves it on
    from where it stood. Under it the camera, and then whose sheet Kept took the photo for.
*/
.tally { display: grid; gap: .45rem; margin: 0 0 .4rem; }
.tally strong { color: var(--gold-bright); font: 400 1.2rem/1.25 var(--serif); }
.tally-bar { height: .55rem; border-radius: 999px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.tally-bar span { display: block; width: var(--in, 0%); height: 100%; border-radius: inherit; background: var(--gold); animation: tally-on .9s cubic-bezier(.2, .7, .2, 1) backwards; }
@keyframes tally-on { from { width: var(--was, 0%); } }
.scan-how { margin: -.4rem 0 1.2rem; text-align: center; }
.whose .pills { margin-bottom: .2rem; }
.whose .field { margin: .5rem 0 0; }
details.whose { margin: 0; }
details.whose > summary { padding: 0; font-size: .92rem; font-weight: 500; }
.whose-again { margin: 0; }

/* The name is asked for only of someone who is not listed. With nobody listed there is nothing to choose, and it is asked at once. */
.whose:has(.pills):not(:has(input[value=""]:checked)) .whose-name { display: none; }

/*
    The Reveal: a tasting played back for the table. As the page is sent it is a column of acts to read down.
    The script stages it: one act fills the screen, over everything else, and its lines arrive in turn. At a
    blind tasting a wine starts under a cover of brown paper with its letter on it, and turns over.
*/
.reveal { display: grid; gap: 1rem; }
.scene { display: grid; justify-items: center; gap: .6rem; padding: 1.5rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-align: center; }
.scene h1, .scene h2 { max-width: 24ch; margin: 0; font: 400 clamp(1.6rem, 6.4vw, 2.7rem)/1.15 var(--serif); text-wrap: balance; }
.scene-kicker { margin: 0; color: var(--gold-bright); font-size: .78rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; }
.scene-sub, .scene-facts { margin: 0; color: var(--muted); }
.scene-hint { max-width: 22rem; margin: .4rem 0 0; color: var(--muted); font-size: .88rem; }
.scene-begin { width: min(100%, 20rem); margin: .7rem 0 0; }
.scene-score { display: flex; align-items: center; justify-content: center; gap: .7rem; margin: .1rem 0; }
.scene-score b { color: var(--gold-bright); font: 400 clamp(3.4rem, 16vw, 5.6rem)/1 var(--serif); font-variant-numeric: tabular-nums; }
.scene-score span { display: grid; justify-items: start; font-size: 1.05rem; text-align: left; }
.scene-score small { margin: 0; }
.scene-line { display: grid; justify-items: center; gap: .12rem; max-width: 30rem; margin: .35rem 0 0; }
/* At Pin it on the map, the glass's map: everyone's pin with their name, and the place itself as a ring. */
.scene-map { width: min(100%, 30rem); margin: .7rem 0 0; }
.scene-map .game-map { cursor: default; }
/* On the TV the glass's map takes the label's place once it arrives, so that it is large and nothing runs off the screen. */
@media (min-width: 46rem) and (orientation: landscape) {
    .reveal.is-staged .scene-wine .scene-map { grid-column: 1; grid-row: 2 / span 6; align-self: center; width: clamp(18rem, 36vw, 36rem); margin: 0; z-index: 1; }
    .reveal.is-staged .scene-wine:has(.scene-map) .turn { grid-column: 1; }
    .reveal.is-staged .scene-wine:has(.scene-map.is-in) .turn { opacity: 0; transition: opacity .5s ease; }
}
.scene-line > span { color: var(--muted); font-size: .7rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.scene-line strong { font: 400 1.2rem/1.3 var(--serif); }
.scene-line q { color: var(--muted); font-style: italic; }
.scene-line small { margin: 0; color: var(--muted); }
.scene-end { margin: 1rem 0 0; }
.scene-winner .scene-kicker { font-size: .95rem; }
.scene-winner .turn-face { box-shadow: 0 18px 40px rgba(0, 0, 0, .55), 0 0 60px rgb(var(--gold-rgb) / .35); }

.reveal .turn { width: clamp(7.5rem, 30vw, 11rem); aspect-ratio: 3 / 4; margin: .5rem 0 .3rem; perspective: 1100px; }
.turn-card { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 1.2s cubic-bezier(.3, .1, .2, 1); }
.turn-face { position: absolute; inset: 0; border-radius: 16px; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 18px 40px rgba(0, 0, 0, .55); }
.turn-label img, .turn-label .thumb { display: block; width: 100%; height: 100%; border-radius: 0; object-fit: cover; }
.turn-label .thumb.drawn .drawn-initials { font-size: clamp(2.3rem, 9.5vw, 3.5rem); }
.turn-label .thumb.drawn .drawn-year { font-size: clamp(.72rem, 2.7vw, 1rem); }
.turn-cover { display: none; }

.quiz-reveal { display: grid; gap: .7rem; width: min(100%, 32rem); margin: .4rem 0; padding: 0; list-style: none; text-align: left; }
.quiz-reveal li { display: grid; gap: .15rem; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, .03); }
.quiz-reveal span { color: var(--muted); font-size: .92rem; }
.quiz-reveal strong { font: 600 1.02rem/1.3 var(--sans); }
.quiz-reveal small { margin: 0; color: var(--gold-bright); }

.guest-cards { display: grid; gap: .7rem; width: min(100%, 34rem); margin: .5rem 0 0; padding: 0; list-style: none; text-align: left; }
.guest-card { margin: 0; padding: .9rem 1rem; }
.guest-name { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; margin: 0 0 .35rem; }
.guest-name a { color: var(--text); font: 400 1.25rem/1.2 var(--serif); text-decoration: none; }
.honour { padding: .15rem .6rem; border: 1px solid rgb(var(--gold-rgb) / .5); border-radius: 999px; background: rgb(var(--gold-rgb) / .12); color: var(--gold-bright); font-size: .7rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.guest-lines { margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: .95rem; line-height: 1.5; }
.guest-card button { min-height: 40px; margin-top: .3rem; }

.reveal-nav, .reveal-close { display: none; }
html:has(.reveal.is-staged) { overflow: hidden; }
.reveal.is-staged { position: fixed; inset: 0; z-index: 20; grid-template-rows: minmax(0, 1fr) auto; gap: 0; background: radial-gradient(130% 55% at 50% 0%, rgb(var(--ember-rgb) / .5), rgb(var(--ember-rgb) / 0) 72%), var(--bg); }
.reveal.is-staged .scene { display: none; grid-row: 1; border: 0; border-radius: 0; background: none; }
.reveal.is-staged .scene.is-on { display: grid; align-content: safe center; padding: calc(env(safe-area-inset-top) + 3.6rem) 1.2rem 1.2rem; overflow-y: auto; animation: scene-in .45s ease-out; }
.reveal.is-staged [data-step] { opacity: 0; translate: 0 16px; transition: opacity .55s ease, translate .55s cubic-bezier(.2, .7, .2, 1); }
.reveal.is-staged [data-step].is-in { opacity: 1; translate: 0 0; }
.reveal.is-staged .turn-cover { display: grid; place-content: center; justify-items: center; gap: .3rem; transform: rotateY(180deg); background: linear-gradient(155deg, #cfae82, #a17f54 58%, #80633f); color: #2a1a08; }
.turn-cover b { font: 400 clamp(3.6rem, 15vw, 5.2rem)/1 var(--serif); }
.turn-cover span { font-size: .74rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.reveal.is-staged .turn.is-covered:not(.is-turned) .turn-card { transform: rotateY(180deg); }
.reveal.is-staged .turn.is-setting .turn-card { transition: none; }
.reveal.is-staged .reveal-nav { grid-row: 2; display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto; align-items: center; gap: .8rem; padding: .7rem 1rem calc(env(safe-area-inset-bottom) + .8rem); }
.reveal.is-staged .reveal-nav[hidden] { display: none; }
.reveal-back { width: 3rem; height: 3rem; border: 1px solid var(--line); border-radius: 999px; background: none; color: var(--text); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.reveal-back:disabled { opacity: .35; cursor: default; }
.reveal-at { color: var(--muted); font-size: .86rem; font-variant-numeric: tabular-nums; text-align: center; }
.reveal-next { min-width: 7.5rem; }
.reveal.is-staged .reveal-close, .live.is-staged .reveal-close { position: fixed; top: calc(env(safe-area-inset-top) + .7rem); right: .9rem; z-index: 21; display: grid; place-items: center; width: 2.7rem; height: 2.7rem; border: 1px solid var(--line); border-radius: 999px; background: rgb(var(--bg-rgb) / .6); color: var(--muted); font-size: 1.5rem; line-height: 1; text-decoration: none; }
.reveal.is-staged .reveal-close[hidden] { display: none; }
@keyframes scene-in { from { opacity: 0; } }

/*
    On a screen that is wide and lying down, such as a television, a wine's card stands beside what is said of
    it, and everything is sized by the screen: it is read from across a room.
*/
@media (min-width: 46rem) and (orientation: landscape) {
    .reveal.is-staged .scene-wine.is-on { grid-template-columns: auto minmax(0, 46vw); column-gap: 5vw; justify-content: center; justify-items: start; text-align: left; }
    .reveal.is-staged .scene-wine .scene-kicker { grid-column: 1 / -1; justify-self: center; margin-bottom: 1.5vh; }
    .reveal.is-staged .scene-wine .turn { grid-row: 2 / span 6; align-self: center; width: clamp(11rem, 26vw, 24rem); margin: 0; }
    .reveal.is-staged .scene-wine .scene-line { justify-items: start; max-width: none; }
    .reveal.is-staged .scene-wine .scene-score { justify-content: flex-start; }
    .reveal.is-staged .scene h1, .reveal.is-staged .scene h2 { font-size: clamp(2rem, 4.3vw, 4.4rem); }
    .reveal.is-staged .scene-kicker { font-size: clamp(.9rem, 1.35vw, 1.5rem); }
    .reveal.is-staged .scene-sub, .reveal.is-staged .scene-facts { font-size: clamp(1rem, 1.6vw, 1.7rem); }
    .reveal.is-staged .scene-score b { font-size: clamp(4rem, 9vw, 9rem); }
    .reveal.is-staged .scene-score span { font-size: clamp(1.05rem, 1.7vw, 1.8rem); }
    .reveal.is-staged .scene-score small, .reveal.is-staged .scene-line small { font-size: clamp(.82rem, 1.2vw, 1.3rem); }
    .reveal.is-staged .scene-line > span { font-size: clamp(.7rem, 1vw, 1.1rem); }
    .reveal.is-staged .scene-line strong { font-size: clamp(1.2rem, 2.1vw, 2.3rem); }
    .reveal.is-staged .scene-line q { font-size: clamp(1rem, 1.6vw, 1.7rem); }
    .reveal.is-staged .turn-label .thumb.drawn .drawn-initials { font-size: clamp(3rem, 7vw, 6.5rem); }
    .reveal.is-staged .turn-label .thumb.drawn .drawn-year { font-size: clamp(.9rem, 1.7vw, 1.7rem); }
    .reveal.is-staged .turn-cover b { font-size: clamp(4.5rem, 11vw, 10rem); }
    .reveal.is-staged .turn-cover span { font-size: clamp(.74rem, 1.2vw, 1.2rem); }
    .reveal.is-staged .quiz-reveal { width: min(100%, 62vw); font-size: clamp(1rem, 1.5vw, 1.6rem); }
    .reveal.is-staged .quiz-reveal span { font-size: .9em; }
    .reveal.is-staged .quiz-reveal strong { font-size: 1.2em; }
    .reveal.is-staged .quiz-reveal small { font-size: .85em; }
    .reveal.is-staged .guest-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); width: min(100%, 78vw); }
}

@media (prefers-reduced-motion: reduce) {
    .turn-card, .reveal.is-staged [data-step] { transition: none; }
    .reveal.is-staged .scene.is-on { animation: none; }
}

/*
    A tasting held live. A guest's pages, on their own phone, have no menus: the name over the door and one
    thing to do at a time. A glass is as full as the score it stands for, by --level, from 0 to 1.
*/
.glass-rim, .glass-stem { fill: none; stroke: var(--gold-bright); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.glass-level { transform: translateY(calc(var(--empty, 80px) - var(--level, 0) * var(--full, 72px))); transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
/* How far the drink moves in each glass, empty to full: a wine glass's bowl, a beer glass, a spirit's tumbler, a small cup for sake. */
.is-beer { --empty: 126px; --full: 116px; }
.is-tumbler { --empty: 124px; --full: 66px; }
.is-cup { --empty: 124px; --full: 42px; }
.glass-foam { fill: #f4ead2; opacity: min(1, calc(var(--level, 0) * 8)); }

body.guest { min-height: 100dvh; }
.guest-top { display: flex; justify-content: center; padding: calc(env(safe-area-inset-top) + .9rem) var(--gutter) .1rem; }
.guest-top .wordmark { height: 1.4rem; }
.page.guest-page { max-width: 30rem; padding-top: 1.1rem; padding-bottom: calc(env(safe-area-inset-bottom) + 2.5rem); text-align: center; }
.guest-page h1 { margin: .25rem 0 .5rem; font-size: clamp(1.8rem, 8vw, 2.4rem); text-wrap: balance; overflow-wrap: anywhere; }
.guest-page .summary { margin: 0 0 1.2rem; }
.seat-kicker, .seat-now { margin: 0; color: var(--gold-bright); font-size: .74rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.seat-name { margin: .15rem 0 1.1rem; color: var(--muted); font-size: .9rem; }

.join-form { display: grid; gap: 1rem; text-align: left; }
.join-names { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.join-name { min-height: 3.7rem; padding: .5rem .8rem; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface); color: var(--text); font: 500 1.1rem/1.2 var(--sans); overflow-wrap: anywhere; cursor: pointer; }
.join-name:active { translate: 0 1px; }
.join-seat { position: relative; display: grid; }
.join-seat .face { position: absolute; top: 50%; left: .7rem; z-index: 1; width: 34px; height: 34px; translate: 0 -50%; font-size: .95rem; pointer-events: none; }
.join-seat .join-name { padding-left: 3.3rem; text-align: left; }
.join-form .field { margin: .4rem 0 0; }

.seat, .seat-stage { display: grid; justify-items: center; width: 100%; }
.seat-stage { gap: .45rem; }
.seat-look { max-width: 24rem; margin: 0; color: var(--muted); font-style: italic; }
.seat-glass { display: block; width: 8.4rem; height: auto; margin: .5rem 0 0; overflow: visible; }
.seat-score { display: flex; align-items: baseline; justify-content: center; gap: .5rem; min-height: 4rem; margin: 0; }
.seat-score output { color: var(--gold-bright); font: 400 4rem/1 var(--serif); font-variant-numeric: tabular-nums; }
.seat-score output:empty { display: none; }
.seat-score span { color: var(--muted); }
.seat-entry { display: grid; justify-items: center; gap: .45rem; width: 100%; }

/* The score is slid, with a thumb big enough to find without looking down from the glass for long. */
.seat-slider { -webkit-appearance: none; appearance: none; width: 100%; height: 3.2rem; margin: 0; background: none; cursor: pointer; touch-action: pan-y; }
.seat-slider::-webkit-slider-runnable-track { height: .7rem; border-radius: 999px; background: linear-gradient(90deg, #4a0d1e, #b3294a 62%, var(--gold)); }
.seat-slider::-moz-range-track { height: .7rem; border-radius: 999px; background: linear-gradient(90deg, #4a0d1e, #b3294a 62%, var(--gold)); }
.seat-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 2.7rem; height: 2.7rem; margin-top: -1rem; border: 3px solid var(--bg); border-radius: 50%; background: var(--gold-bright); box-shadow: 0 4px 14px rgba(0, 0, 0, .55); }
.seat-slider::-moz-range-thumb { width: 2.4rem; height: 2.4rem; border: 3px solid var(--bg); border-radius: 50%; background: var(--gold-bright); box-shadow: 0 4px 14px rgba(0, 0, 0, .55); }
.seat-slider:focus-visible { outline: none; }
.seat-slider:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--gold-bright); outline-offset: 3px; }
.seat-slider:focus-visible::-moz-range-thumb { outline: 2px solid var(--gold-bright); outline-offset: 3px; }
.seat-slider:disabled { opacity: .45; cursor: default; }
.seat-scale { display: flex; justify-content: space-between; width: 100%; margin: -.55rem 0 .5rem; padding: 0 1rem; color: var(--muted); font-size: .76rem; font-variant-numeric: tabular-nums; }

.seat-notes, .seat-guess { display: grid; gap: .5rem; width: 100%; margin: 0 0 .5rem; }

/* Each note with its small "How?" beside it, and the sheet that opens from it: the guide's line, and words to tap into the note. */
.seat-note { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.seat-note input { flex: 1; min-width: 0; }
.seat-how-open { flex: none; min-height: 44px; padding: 0 .3rem; border: 0; background: none; color: var(--gold-bright); font: 600 .9rem/1 var(--sans); cursor: pointer; }
.seat-how-open:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 2px; border-radius: 6px; }
.seat-how { text-align: left; }
.seat-how-tap { margin: .9rem 0 .5rem !important; color: var(--muted); font: 600 .74rem/1.2 var(--sans) !important; letter-spacing: .16em; text-transform: uppercase; }
.seat-how-words { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0 0 .4rem; }
.seat-how-word { min-height: 40px; padding: 0 .85rem; border: 1px solid var(--line-strong); border-radius: 999px; background: transparent; color: var(--text); font: 500 .92rem/1 var(--sans); cursor: pointer; }
.seat-how-word[aria-pressed="true"] { border-color: var(--gold); background: rgb(var(--gold-rgb) / .14); color: var(--gold-bright); }
.seat-how-word:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 2px; }

/* What a guest tastes: twelve families to open and four words in each, three to choose, each tap kept as it is made. */
.seat-taste { width: 100%; min-width: 0; margin: 0 0 .7rem; padding: 0; border: 0; text-align: left; }
.seat-taste legend { padding: 0; margin: 0 0 .15rem; color: var(--text); font: 600 1rem/1.3 var(--sans); }
.seat-taste-hint { margin: 0 0 .5rem; color: var(--muted); font-size: .86rem; }
.seat-picked { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .5rem; padding: 0; list-style: none; }
.seat-picked:empty { display: none; }
.seat-picked button { min-height: 40px; padding: 0 .85rem; border: 1px solid var(--gold); border-radius: 999px; background: rgb(var(--gold-rgb) / .14); color: var(--gold-bright); font: 600 .95rem/1 var(--sans); }
.seat-families { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; }
.seat-family { display: flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 .3rem; border: 2px solid var(--family); border-radius: 12px; background: rgb(0 0 0 / .22); color: var(--text); font: 600 .88rem/1.15 var(--sans); text-align: center; }
.seat-family.is-open { background: var(--family); color: #1c1513; }
.seat-family.on-dark.is-open { color: #fff; }
.seat-wordset { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; padding: .6rem; border: 1px solid var(--family); border-radius: 14px; background: rgb(0 0 0 / .18); }
.seat-word { min-height: 50px; padding: 0 .5rem; border: 2px solid var(--family); border-radius: 999px; background: transparent; color: var(--text); font: 600 1rem/1.15 var(--sans); }
.seat-word[aria-pressed="true"] { background: var(--family); color: #1c1513; }
.seat-word.on-dark[aria-pressed="true"] { color: #fff; }

/* The button that keeps a score stays at the foot of the screen, over whatever is being filled in above it. */
.seat-lock { position: sticky; bottom: 0; z-index: 2; width: calc(100% + 2 * var(--gutter)); margin: 0 calc(-1 * var(--gutter)); padding: .9rem var(--gutter) calc(env(safe-area-inset-bottom) + .5rem); background: linear-gradient(180deg, rgb(var(--bg-rgb) / 0), var(--bg) 1.1rem); }
.seat-guess { grid-template-columns: minmax(0, 1fr) 6rem; min-width: 0; padding: 0; border: 0; text-align: left; }
.seat-guess legend { padding: 0; margin: 0 0 .35rem; color: var(--text); font: 600 1rem/1.3 var(--sans); }
.seat-guess input:first-of-type { grid-column: 1 / -1; }
.seat input:disabled { opacity: .6; }
.seat-said { min-height: 1.3rem; margin: .45rem 0 0; color: var(--muted); font-size: .9rem; }
.seat-table { width: 100%; margin: .6rem 0 0; padding: .9rem 1rem; border: 1px solid var(--line-strong); border-radius: 14px; background: rgb(var(--gold-rgb) / .08); font: 400 1.3rem/1.35 var(--serif); }
.seat-quiz { display: grid; gap: .9rem; width: 100%; margin: .3rem 0 .8rem; padding: 0; list-style: none; text-align: left; counter-reset: asked; }
.seat-quiz li { display: grid; gap: .4rem; counter-increment: asked; }
.seat-quiz span::before { content: counter(asked) ". "; color: var(--gold-bright); font-weight: 700; }

/* The wines already poured: what this guest gave each, and what the table did once that was shown. */
.seat-past { display: grid; width: 100%; margin: 1.8rem 0 0; padding: 0; list-style: none; text-align: left; }
.seat-past li { display: grid; grid-template-columns: minmax(0, 1fr) 2rem 5rem; align-items: baseline; gap: .6rem; padding: .55rem 0; border-top: 1px solid var(--line); }
.seat-past span { font-weight: 500; overflow-wrap: anywhere; }
.seat-past b { color: var(--gold-bright); font-variant-numeric: tabular-nums; text-align: right; }
.seat-past small { margin: 0; font-variant-numeric: tabular-nums; text-align: right; }
.seat-lost { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 1rem); z-index: 6; width: max-content; max-width: calc(100vw - 2rem); margin: 0; padding: .6rem 1rem; border: 1px solid rgba(255, 144, 134, .4); border-radius: 999px; background: var(--surface-raised); color: var(--danger); font-size: .88rem; translate: -50% 0; }

/*
    The host's screen, which the table watches. It covers the page, and the one button at its foot moves the
    tasting on. There is a glass on it for each guest: empty, then half full when their score is in, then as
    full as the score itself once the host shows them.
*/
.live-defs { position: absolute; }
.live-rehearsal { position: absolute; inset: calc(env(safe-area-inset-top) + .7rem) 3.6rem auto 1rem; z-index: 2; margin: 0; padding: .3rem .8rem; border: 1px dashed rgb(var(--gold-rgb) / .6); border-radius: 999px; background: rgb(var(--bg-rgb) / .7); color: var(--gold-bright); font-size: .82rem; line-height: 1.3; text-align: center; }
.live-stage, .live-nav { display: none; }
html:has(.live.is-staged) { overflow: hidden; }
.live.is-staged { position: fixed; inset: 0; z-index: 20; display: grid; grid-template-rows: minmax(0, 1fr) auto; background: radial-gradient(130% 55% at 50% 0%, rgb(var(--ember-rgb) / .5), rgb(var(--ember-rgb) / 0) 72%), var(--bg); }
.live.is-staged .live-stage { grid-row: 1; display: grid; align-content: safe center; justify-items: center; gap: .6rem; padding: calc(env(safe-area-inset-top) + 3.6rem) 1.2rem 1rem; overflow-y: auto; text-align: center; animation: scene-in .45s ease-out; }
.live-stage h1 { max-width: 22ch; margin: 0; font: 400 clamp(1.7rem, 7vw, 2.8rem)/1.15 var(--serif); text-wrap: balance; overflow-wrap: anywhere; }
.live-stage .scene-sub { max-width: 30rem; }

.live-door { display: grid; justify-items: center; gap: 1.2rem; }
.live-invite { display: grid; justify-items: center; gap: .5rem; }
.live-code { width: clamp(11rem, 58vw, 17rem); padding: .5rem; border-radius: 18px; background: #fff; box-shadow: 0 18px 44px rgba(0, 0, 0, .55), 0 0 0 1px rgb(var(--gold-rgb) / .5); }
.live-code svg, .live-late svg { display: block; width: 100%; height: auto; }
.live-link { display: grid; justify-items: inherit; gap: .45rem; max-width: 100%; margin: .4rem 0 0; color: var(--muted); font-size: .9rem; }
.live-link a { max-width: 100%; color: var(--gold-bright); font-size: .8rem; overflow-wrap: anywhere; }
.live-link .btn { width: auto; min-height: 42px; padding: 0 1.1rem; }
.live-names { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; max-width: 40rem; margin: .8rem 0 0; padding: 0; list-style: none; }
.live-names li { padding: .35rem .9rem; border: 1px dashed var(--line); border-radius: 999px; color: var(--muted); transition: color .4s, border-color .4s, background-color .4s; }
.live-names li.is-here { border: 1px solid rgb(var(--gold-rgb) / .6); background: rgb(var(--gold-rgb) / .12); color: var(--gold-bright); }
.live-names li.is-here::before { content: ""; display: inline-block; width: .32rem; height: .62rem; margin: 0 .5rem .1rem .1rem; border: solid var(--gold-bright); border-width: 0 2px 2px 0; rotate: 45deg; }

.live { --live-big: clamp(3.4rem, 15vw, 5.4rem); }
.live-glasses { --count: 4; --across: 4; --rows: 1; --small: 1; --gap: 300ms; display: flex; flex-wrap: wrap; justify-content: center; gap: .9rem 1rem; max-width: 60rem; margin: .7rem 0 0; padding: 0; list-style: none; }
.live-glasses li { --turn: 0; display: grid; align-content: start; justify-items: center; gap: .1rem; width: var(--wide, min(7rem, calc((100vw - 2.5rem - (var(--across) - 1) * 1rem) / var(--across)))); }
.live-glasses svg { display: block; width: 100%; height: auto; overflow: visible; opacity: .45; transition: opacity .5s; }
.live-glasses li.is-in svg { opacity: 1; }
.live-glasses .glass-level { transition: transform 1.1s cubic-bezier(.2, .7, .2, 1); }
.live-score { min-height: 1.15em; color: var(--gold-bright); font: 400 clamp(1.6rem, 6.5vw, 2.3rem)/1.15 var(--serif); font-variant-numeric: tabular-nums; }
.live-name { max-width: 100%; color: var(--muted); font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-glasses li.is-in .live-name { color: var(--text); }

/* When the scores go up the glasses settle one after another along the row, each with its number, and the average comes last. */
.live-glasses li.is-shown .glass-level { transition-delay: calc(var(--turn) * var(--gap)); }
.live-glasses li.is-shown .live-score { animation: live-pop .5s cubic-bezier(.2, 1.4, .4, 1) calc(var(--turn) * var(--gap)) backwards; }
.live.is-late .live-glasses li.is-shown .glass-level { transition-delay: 0s; }
.live.is-late .live-glasses li.is-shown .live-score { animation: none; }
.live-result { display: grid; place-items: center; min-height: var(--live-big); margin: .3rem 0 0; }
.live-average { display: flex; align-items: baseline; justify-content: center; gap: .6rem; margin: 0; }
.live-average b { min-width: 1.6em; color: var(--gold-bright); font: 400 var(--live-big)/1 var(--serif); font-variant-numeric: tabular-nums; text-align: right; }
.live-average.is-coming { visibility: hidden; }
.live-average span, .live-count { color: var(--muted); }
.live-count { margin: 0; }
/* Beside the glasses: the story of the wine while it is tasted, and then the table's wheel. On a phone it stands under the glasses. */
.live-main { display: grid; justify-items: center; gap: .6rem; width: 100%; }
.live-face { display: grid; justify-items: center; width: 100%; max-width: 40rem; margin-top: .6rem; }
.live-story { display: grid; justify-items: center; gap: .8rem; width: 100%; }
.live-picks { max-width: 100%; min-height: 1.2em; color: var(--muted); font-size: .72rem; line-height: 1.25; text-align: center; overflow-wrap: anywhere; }
.live-glasses li.is-shown .live-picks, .live-glasses li.is-in .live-picks { color: var(--text); }
.live-label { display: block; width: auto; max-width: min(100%, 15rem); max-height: 17rem; border-radius: 12px; object-fit: contain; box-shadow: 0 14px 34px rgba(0, 0, 0, .55), 0 0 0 1px rgb(var(--gold-rgb) / .35); animation: scene-in .6s ease-out; }
.live-tale { display: grid; gap: .45rem; width: 100%; text-align: center; }
.live-tale p, .live-tale ul { margin: 0; }
.live-where { color: var(--gold-bright); font: 400 1.35rem/1.25 var(--serif); }
.live-grape { color: var(--muted); font-size: .95rem; letter-spacing: .08em; text-transform: uppercase; }
.live-about { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; color: var(--text); font-size: 1.05rem; line-height: 1.4; }
.live-place { display: grid; gap: .35rem; padding: 0; list-style: none; color: var(--muted); font-size: .98rem; line-height: 1.35; }
.live-place li { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.live-place b, .live-more b { margin-right: .5em; color: var(--gold-bright); font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.live-more p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.live-more p.is-worth { display: block; overflow: visible; }
.live-table { display: grid; justify-items: center; gap: .7rem; width: 100%; animation: scene-in .5s ease-out; }
.live-face .wheel { width: min(100%, 24rem, 44svh); max-width: none; }
.live-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; max-width: 100%; margin: 0; padding: 0; list-style: none; }
.live-chips .chip { padding: .3rem .75rem; border: 1px solid rgb(var(--gold-rgb) / .5); border-radius: 999px; background: rgb(var(--gold-rgb) / .1); color: var(--muted); font-size: .88rem; animation: chip-in .5s ease-out both; }
.live-chips .chip b { color: var(--gold-bright); font-weight: 600; }
.live-says { display: grid; gap: .45rem; width: 100%; max-width: 34rem; }
.live-says p { margin: 0; font-size: 1.05rem; line-height: 1.4; }
.live-says .says-table { color: var(--text); font: 400 1.3rem/1.3 var(--serif); }
.live-says .says-kept { color: var(--gold-bright); }
.live-says .says-odd, .live-says .says-take { color: var(--muted); }
.live-more { display: grid; gap: .5rem; width: 100%; max-width: 34rem; color: var(--muted); font-size: .95rem; line-height: 1.4; }
.live-more p { margin: 0; }
.live-night { display: grid; justify-items: center; gap: .7rem; width: 100%; max-width: 40rem; }
.live-night .wheel { width: min(100%, 24rem, 44svh); max-width: none; }
.live-night .says-table { max-width: 34rem; margin: 0; color: var(--text); font: 400 1.3rem/1.3 var(--serif); }
.live-wheel { min-height: 44px; color: var(--muted); }
/* On a phone the switch for the wheel has a row of its own above the buttons, so that none of them is squeezed off the screen. */
@media (max-width: 45.99rem) {
    .live.is-staged .live-nav { flex-wrap: wrap; row-gap: .2rem; }
    .live-wheel { flex: 1 0 100%; order: -1; min-height: 36px; text-align: center; }
}
@keyframes chip-in { from { opacity: 0; translate: 0 .5rem; } }
@keyframes piece-bloom { 0% { filter: brightness(2.2) saturate(1.5); } 100% { filter: none; } }

/* A live wheel is lit by a script: a piece grows stronger with each guest who names it, and blooms as it is named. */
.live .taste-wheel .taste-piece { transition: fill-opacity .8s ease; }
.live .taste-wheel .taste-piece.is-bloom { animation: piece-bloom 1s ease-out; }
.live .taste-wheel .taste-piece.is-agreed { stroke: #fff6d8; stroke-width: 3; }
.live .taste-wheel path.taste-expected { fill: var(--gold-bright); fill-opacity: 0; transition: fill-opacity .6s ease; }
.live .taste-wheel path.taste-expected.is-expected { fill-opacity: 1; }
.live .taste-wheel text.wheel-word { transition: fill .6s; }
.live-questions { display: grid; gap: .6rem; width: min(100%, 36rem); margin: .3rem 0; padding: 0 0 0 1.4rem; text-align: left; }
.live-questions li { font: 500 1.1rem/1.35 var(--sans); }
.live-questions li::marker { color: var(--gold-bright); }

.live.is-staged .live-nav { grid-row: 2; display: flex; align-items: center; gap: 1rem; padding: .7rem 1rem calc(env(safe-area-inset-bottom) + .8rem); }
.live-late { flex: none; display: grid; justify-items: center; gap: .15rem; width: 3.6rem; }
.live-late svg { border-radius: 6px; }
.live-late span { color: var(--muted); font-size: .62rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.live-finish { min-height: 44px; margin-left: auto; color: var(--muted); }
.live-next { min-width: min(100%, 12rem); margin-left: auto; }
.live-finish:not([hidden]) + .live-next { margin-left: 0; }
@keyframes live-pop { from { opacity: 0; scale: .5; } }

/*
    On a television everything is sized by the screen, by its height as much as its width, so that a wine's
    whole scene fits without scrolling: nobody can scroll a television. The code to join stands beside the words.
*/
@media (min-width: 46rem) and (orientation: landscape) {
    .live { --live-big: clamp(2.2rem, min(8vw, 11vh), 8.5rem); }
    .live.is-staged .live-stage { gap: min(.6rem, 1.4vh); padding-top: calc(env(safe-area-inset-top) + min(1.5rem, 3vh)); padding-bottom: min(1rem, 2vh); }
    .live-stage h1 { max-width: 76vw; font-size: clamp(1.3rem, min(4.6vw, 7.5vh), 4.8rem); }
    .live-stage h1.is-long { max-width: 84vw; font-size: clamp(1.1rem, min(3.4vw, 5.4vh), 3.5rem); }
    .live-stage .scene-kicker { font-size: clamp(.7rem, min(1.35vw, 2.6vh), 1.5rem); }
    .live-stage .scene-sub, .live-count { max-width: 60vw; font-size: clamp(.85rem, min(1.6vw, 3.2vh), 1.7rem); }
    .live-door { grid-template-columns: auto minmax(0, 44vw); align-items: center; gap: 5vw; }
    .live-invite { justify-items: start; text-align: left; }
    .live-code { width: clamp(9rem, min(30vw, 52vh), 34rem); padding: min(1vw, 1.6vh); }
    .live-names { max-width: 80vw; margin-top: min(.8rem, 2vh); font-size: clamp(.8rem, min(1.5vw, 3vh), 1.6rem); }
    /* A row holds as many glasses as the script says and no more, so two rows are of a length: fourteen is seven and seven. */
    .live-glasses { --wide: clamp(2.4rem, min(15vw, calc(22vh * var(--small)), calc(72vw / var(--count))), 17rem); gap: 1.6vh 1.6vw; max-width: min(92vw, calc(var(--count) * (var(--wide) + 1.6vw))); margin-top: min(.7rem, 1.4vh); }
    .live-score { font-size: calc(clamp(1.2rem, min(3.6vw, 6vh), 4rem) * var(--small)); }
    .live-name { font-size: clamp(.72rem, calc(min(1.4vw, 3vh) * var(--small)), 1.5rem); }
    .live-average span { font-size: clamp(.9rem, min(1.7vw, 3.4vh), 1.8rem); }
    .live-questions { width: min(100%, 66vw); }
    .live-questions li { font-size: clamp(1rem, min(2vw, 4.4vh), 2.2rem); }
    .live.is-staged .live-nav { padding-top: min(.7rem, 1.4vh); }
    .live-late { width: clamp(2.6rem, min(5.2vw, 9vh), 6.5rem); }

    /* With something to show beside the glasses the wine's own scene stands in the left half, and the face in the right. */
    .live.has-face .live-wine { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; align-content: safe center; justify-items: stretch; column-gap: 3vw; }
    .live.has-face .live-main { justify-items: center; }
    .live.has-face .live-stage h1 { max-width: 40vw; }
    .live.has-face .live-glasses { --wide: clamp(2rem, min(9vw, calc(18vh * var(--small)), calc((43vw - (var(--count) - 1) * 1.1vw) / var(--count))), 12rem); gap: 1.4vh 1.1vw; max-width: 44vw; }
    .live-picks { font-size: clamp(.6rem, calc(min(1.05vw, 2.1vh) * var(--small)), 1.3rem); }
    .live-face { max-width: none; margin: 0; }
    .live-story { gap: min(.8rem, 1.6vh); }
    .live-label { max-width: 24vw; max-height: 30vh; }
    .live-tale { max-width: 38vw; gap: min(.45rem, .9vh); }
    .live-where { font-size: clamp(1.1rem, min(2.4vw, 4.8vh), 3rem); }
    .live-grape { font-size: clamp(.7rem, min(1.2vw, 2.4vh), 1.5rem); }
    .live-about, .live-place { font-size: clamp(.8rem, min(1.4vw, 2.8vh), 1.7rem); }
    .live-place b, .live-more b { font-size: clamp(.58rem, min(.95vw, 1.9vh), 1rem); }
    .live-face .wheel, .live-night .wheel { width: min(100%, 40vh, 34vw); }
    .live-table { gap: min(.6rem, 1.2vh); }
    .live-chips .chip { font-size: clamp(.72rem, min(1.2vw, 2.4vh), 1.5rem); }
    .live-says, .live-more { max-width: 40vw; gap: min(.45rem, .9vh); }
    .live-says p { font-size: clamp(.8rem, min(1.35vw, 2.7vh), 1.6rem); }
    .live-says .says-table { font-size: clamp(.95rem, min(1.8vw, 3.6vh), 2.2rem); }
    .live-more { font-size: clamp(.75rem, min(1.2vw, 2.4vh), 1.4rem); }
    .live-night .wheel { width: min(100%, 52vh, 40vw); }
    .live-night .says-table { max-width: 40vw; font-size: clamp(.95rem, min(1.8vw, 3.6vh), 2.2rem); }

    /* At the end the night's wheel stands beside the words, as the wine's wheel does, so that nothing is below the fold of a television. */
    .live.is-staged .live-over.has-night { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); column-gap: 3vw; align-content: safe center; align-items: center; }
    .live-over.has-night > .live-night { grid-column: 2; grid-row: 1 / span 8; }
    .live-over.has-night > :not(.live-night) { grid-column: 1; }
    .live-over.has-night h1 { max-width: 40vw; }
    .live-over.has-night .scene-sub { max-width: 40vw; }
    .live .taste-wheel text.wheel-word { font-size: 12px; }
    .live .taste-wheel text.wheel-word.lit { font-size: 12.6px; }
    .live .taste-wheel text.wheel-family { font-size: 10.4px; }
}

@media (prefers-reduced-motion: reduce) {
    .glass-level, .live-glasses .glass-level, .live-glasses svg, .live-names li { transition: none; }
    .live.is-staged .live-stage, .live-glasses li.is-shown .live-score { animation: none; }
    .live-glasses li.is-shown .glass-level { transition-delay: 0s; }
}
.standings strong { display: block; font: 600 1rem/1.3 var(--sans); }
.standings span { color: var(--muted); font-size: .92rem; }
/* People: everyone you drink with, each with a face, their photo or their initial on a colour of their own. */
.face { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--face, #3a3a52); color: var(--text); font: 400 1.15rem/1 var(--serif); }
/* A face before a name on a chip or a pill: the photo where there is one, and otherwise the initial on the person's colour. */
.has-face { padding-left: .3rem; }
.has-face::before { content: attr(data-initial); flex: none; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--face-photo, none) center / cover no-repeat, var(--face, #3a3a52); color: var(--text); font: 400 .9rem/1 var(--serif); }
.has-face.has-photo::before { color: transparent; }
.people-part { margin: 0 0 1.6rem; }
.person-sketch h2 { margin: 0 0 .5rem; color: var(--gold-bright); font: 600 .74rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; }
.person-sketch [data-sketch-text] { margin: 0; font: italic 400 1.02rem/1.5 var(--serif); }
.person-sketch [data-sketch-text]:empty { display: none; }
.sketch-wait { display: flex; align-items: center; gap: .55rem; margin: 0; color: var(--muted); font-size: .92rem; }
.sketch-wait svg { width: 18px; height: 24px; flex: none; }
.sketch-wait .rate-wine { transform-origin: 50% 100%; animation: sketch-pour 1.6s ease-in-out infinite alternate; }
@keyframes sketch-pour { from { transform: scaleY(.2); } to { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .sketch-wait .rate-wine { animation: none; } }
.taste-kinds { display: grid; gap: .45rem; margin: .9rem 0 0; padding: .8rem 0 0; border-top: 1px solid var(--line); list-style: none; }
.taste-kinds li { display: grid; grid-template-columns: 4.6rem 1fr; gap: .6rem; font-size: .9rem; line-height: 1.4; }
.taste-kinds b { color: var(--gold-bright); font: 600 .72rem/1.9 var(--sans); letter-spacing: .12em; text-transform: uppercase; }
.taste-kinds span { color: var(--muted); }
.people-kicker { margin: 1.4rem 0 .6rem; color: var(--muted); font: 600 .74rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; }
.people-card { margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 18px; background: var(--surface-raised); overflow: hidden; }
.people-card li + li { border-top: 1px solid var(--line); }
.people-row { display: flex; align-items: center; gap: .85rem; min-height: 64px; padding: .6rem .9rem; color: var(--text); text-decoration: none; }
.people-row > i { color: var(--muted); font-style: normal; font-size: 1.3rem; }
.people-text { flex: 1; min-width: 0; display: grid; gap: .15rem; }
.people-text strong { font: 600 1rem/1.25 var(--sans); }
.people-text span { color: var(--muted); font-size: .86rem; line-height: 1.35; }
.people-you { padding: .3rem .55rem; border: 1px solid rgb(var(--gold-rgb) / .45); border-radius: 999px; color: var(--gold-bright); font: 600 .68rem/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; }
.people-more { display: inline-block; margin: .7rem 0 0; font-weight: 600; }
.people-add { display: flex; gap: .5rem; margin: .8rem 0 0; }
.people-add input { flex: 1; min-width: 0; }
.person-head { display: flex; align-items: center; gap: .9rem; margin: .4rem 0 1rem; }
.person-head .face { width: 64px; height: 64px; font-size: 1.7rem; }
.person-head h1 { margin: 0; }
.person-head p { margin: .2rem 0 0; }
.person-figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; margin: 0 0 1rem; }
.person-figures div { display: flex; flex-direction: column-reverse; gap: .3rem; padding: .7rem .5rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-raised); text-align: center; }
.person-figures dd { margin: 0; font: 400 1.5rem/1 var(--serif); }
.person-figures dt { color: var(--muted); font-size: .76rem; line-height: 1.3; }
.person-taste, .person-profile { margin: 0 0 1rem; padding: 1rem; }
.person-taste h2, .person-profile h2 { margin: 0 0 .4rem; font: 400 1.15rem/1.3 var(--serif); }
.person-taste p, .person-profile p { margin: 0 0 .5rem; }
.person-taste .taste-bars { margin: .4rem 0 0; padding: 0; }
.profile-form { display: grid; gap: .3rem; }
.profile-photo { margin: .8rem 0 0; }
.profile-photo input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.person-lately { margin: 0 0 1rem; padding: .3rem 1rem; list-style: none; }
.person-lately li { padding: .55rem 0; }
.person-lately li + li { border-top: 1px solid var(--line); }
.person-place { display: grid; gap: .6rem; padding: 1rem; }
.person-place form { margin: 0; }
.person-actions { display: grid; gap: .6rem; margin: 1.2rem 0; }
.taste-summary { margin: 0 0 1.2rem; }
.taste-summary strong::after { content: none; }
.taste-bars { list-style: none; margin: 0 0 1.2rem; padding: .5rem 1rem; }
.taste-bars li { display: grid; grid-template-columns: minmax(5.5rem, 34%) minmax(0, 1fr) auto; gap: .7rem; align-items: center; padding: .5rem 0; }
.taste-bars li + li { border-top: 1px solid var(--line); }
.taste-name { font-weight: 500; }
.taste-bar { height: .6rem; border-radius: 999px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.taste-bar i { display: block; height: 100%; border-radius: 999px; background: var(--gold); }
.taste-score { font-variant-numeric: tabular-nums; font-weight: 650; }
.taste-score small { color: var(--muted); font-weight: 400; }

/* Typing in or checking a guest's sheet: a card to a wine. */
.sheet-form { display: grid; gap: .8rem; margin: 1rem 0; }
.sheet-row { display: grid; gap: .6rem; margin: 0; }
.sheet-row legend { padding: 0 .3rem; font: 600 1.02rem/1.3 var(--sans); color: var(--text); }
.sheet-row .field { margin: 0; }
.sheet-score-field input { max-width: 6rem; }

/* A sheet made out to one guest: their name at its head and the code that leads back to it in the corner. */
.sheet.personal { margin-bottom: 1rem; }
.sheet-head-personal { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.sheet-guest { margin: 0 0 .2rem !important; color: #1c1513 !important; font: 400 1.7rem/1.1 var(--serif) !important; }
.sheet-code { flex: 0 0 auto; display: grid; justify-items: center; gap: .15rem; width: 5.2rem; }
.sheet-code svg { display: block; width: 100%; height: auto; }
.sheet-code span { display: grid; justify-items: center; gap: .1rem; color: #1c1513; font: 600 .56rem/1.1 ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .06em; }
.sheet-code b { font-weight: inherit; white-space: nowrap; }

/* The spare sheet is made out to nobody: where a guest's name would be it has a line to write one on. */
.sheet.spare .sheet-guest { display: flex; align-items: flex-end; min-height: 2rem; margin: 0 0 .45rem !important; color: #5b4d47 !important; font: 500 .86rem/1.1 var(--sans) !important; }
.sheet.spare .sheet-guest::after { flex: 0 1 13rem; width: auto; }

.plan-end { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.4rem; margin: 1.6rem 0 0; }

/* The sheet is paper wherever it is shown: on the screen as a look at what will print, and in print as the whole page. */
.sheet { margin: 1rem 0 0; padding: 1.2rem 1.1rem 1rem; border-radius: 10px; background: #fbf8f1; color: #1c1513; box-shadow: 0 14px 30px rgba(0, 0, 0, .45); overflow-x: auto; }
/* The Kept wordmark on every sheet: in its top corner, or at its foot on a guest's sheet, where the code has the corner. */
.sheet { position: relative; }
.sheet-brand { position: absolute; top: 1.2rem; right: 1.1rem; color: #1c1513; }
.sheet-brand .wordmark { height: 1.3rem; }
.sheet:not(.personal) .sheet-head h2 { padding-right: 4.6rem; }
.sheet.personal .sheet-brand { top: auto; bottom: .85rem; }
.sheet.personal .sheet-made { padding-right: 4.8rem; }
.sheet-head h2 { margin: 0; color: #1c1513; font: 400 1.35rem/1.2 var(--serif); }
.sheet-head p { display: flex; justify-content: space-between; gap: 1rem; margin: .35rem 0 .9rem; color: #5b4d47; font-size: .86rem; }
.sheet-fill::after { content: ""; display: inline-block; width: 8.5rem; margin-left: .4rem; border-bottom: 1px solid #8a7b74; }
.sheet table { width: 100%; min-width: 30rem; border-collapse: collapse; font-size: .86rem; }
.sheet th { padding: .3rem .4rem; border-bottom: 1.5px solid #1c1513; font-size: .68rem; font-weight: 600; letter-spacing: .1em; text-align: left; text-transform: uppercase; }
.sheet td { height: 4.6rem; padding: .45rem .4rem; border-bottom: 1px solid #c9bdb5; vertical-align: top; }
.sheet td + td { border-left: 1px solid #e0d6cf; }
.sheet-number { width: 1.6rem; color: #7a5f1c; font: 400 1.5rem/1 var(--serif); }
/* The empty glass in the Look box, drawn as a pencil would, and the pale words in the Smell and Taste boxes. */
.sheet td.sheet-look-cell { position: relative; }
.sheet-glass { position: absolute; right: .4rem; bottom: .4rem; width: 1.5rem; height: 2.25rem; fill: none; stroke: #b3a69e; stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round; }
.sheet-hint { display: block; color: #a99c94; font-size: .6rem; letter-spacing: .02em; line-height: 1.3; }
.sheet-wine { width: 34%; }
.sheet-wine strong { display: block; font: 400 .98rem/1.25 var(--serif); }
.sheet-look { display: block; margin-top: .25rem; color: #5b4d47; font-size: .78rem; line-height: 1.35; }
.sheet-score { width: 3.2rem; color: #8a7b74; text-align: right; vertical-align: bottom !important; white-space: nowrap; }
.sheet-foot { display: flex; flex-wrap: wrap; gap: .6rem 2rem; margin: 1rem 0 0; font-size: .86rem; }
.sheet-made { margin: .9rem 0 0; color: #8a7b74; font-size: .72rem; }
.sheet .sheet-letter, .sheet .sheet-guess, .sheet .sheet-quiz, .sheet.blind .sheet-name, .sheet.blind .sheet-look { display: none; }
.sheet.blind .sheet-letter, .sheet.blind .sheet-quiz { display: block; }
.sheet.blind .sheet-guess { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .2rem .3rem; margin-top: .5rem; color: #5b4d47; font-size: .76rem; }
.sheet-guess i { flex: 1 1 2.6rem; min-width: 2.6rem; height: 1.1rem; border-bottom: 1px solid #8a7b74; }
.sheet h3 { margin: 1rem 0 .3rem; color: #1c1513; font: 400 1.05rem/1.2 var(--serif); }
.sheet-quiz ol, .key-quiz, .key-wines { margin: 0; padding-left: 1.2rem; font-size: .88rem; }
/* A question and its answer on one line, so that a sheet with a quiz stays on one sheet of paper. */
.sheet-quiz ol { padding: 0; list-style: none; counter-reset: question; }
.sheet-quiz li { display: flex; align-items: flex-end; gap: .4rem; padding: .3rem 0; counter-increment: question; }
.sheet-quiz li::before { content: counter(question) "."; }
.sheet-quiz li i { flex: 1 1 22%; min-width: 22%; height: 1.1rem; border-bottom: 1px solid #8a7b74; }
.plan-key { margin-top: 1rem; }
.key-wines { list-style: none; padding: 0; }
.key-wines li { display: flex; gap: .7rem; padding: .3rem 0; border-bottom: 1px solid #e0d6cf; }
.key-wines strong { flex: 0 0 4rem; font-weight: 600; }
/* The answers are the page to show the table at the end: each wine with the drawing of where it is from and its story in a line. */
.key-wines li.has-scene { display: grid; grid-template-columns: 7.5rem 4rem minmax(0, 1fr); align-items: center; padding: .55rem 0; }
.key-scene { display: block; overflow: hidden; border-radius: 8px; }
.key-scene svg { display: block; width: 100%; height: auto; }
.key-scene.is-kind { height: 3.21rem; }
.key-scene.is-kind .drawing { float: none; width: 100%; height: auto; margin: -2.14rem 0 0; border-radius: 0; box-shadow: none; }
.key-wines li.has-scene > span:last-child { display: block; }
.key-wines li.has-scene strong { color: #7a5f1c; font: 400 1.15rem/1.1 var(--serif); }
.key-story { display: block; margin-top: .2rem; color: #5b4d47; font-size: .78rem; font-style: italic; line-height: 1.35; }
.key-quiz li { padding: .4rem 0; }
.key-quiz span { display: block; color: #5b4d47; }
.key-quiz strong { display: block; font-weight: 600; }

/* On a phone the sheet is shown small enough to see whole, as a picture of the page that will print. */
@media screen and (max-width: 34rem) {
    .sheet { padding: .9rem .7rem .8rem; }
    .sheet table { min-width: 0; font-size: .7rem; table-layout: fixed; }
    .sheet th { padding: .25rem .2rem; font-size: .56rem; letter-spacing: .04em; }
    .sheet td { height: 3.9rem; padding: .3rem .2rem; }
    /* With a fixed layout the widths come from the heading row, so they are set there. */
    .sheet th:first-child { width: 1.1rem; }
    .sheet th:nth-child(2) { width: 42%; }
    .sheet th:last-child { width: 2.3rem; }
    .sheet-wine strong { font-size: .8rem; }
    .sheet-look, .sheet.blind .sheet-guess { font-size: .64rem; }
    .sheet-fill::after { width: 5.5rem; }
    .sheet-hint, .sheet-glass { display: none; }
}

@media print {
    @page { margin: 14mm; }
    /* The app is dark, and a dark page would print its margins dark. Paper is white to its edges. */
    :root { color-scheme: light; }
    html, body { background: #fff !important; color: #000; }

    /*
        On the screen the page is at least as tall as the window. Paper is not the window: a phone's is
        taller than a sheet of paper, and a page held to that height runs on to a second, blank sheet.
    */
    html, body { height: auto !important; min-height: 0 !important; }
    .topbar, .tabbar, .flash, .problem { display: none !important; }

    /*
        A page that holds the guests' sheets, the key or the flavour guide prints only those. Any other page, such as a
        planned trip, prints as it is. The rule that leaves the rest off was once written for every page, and left a trip
        and every other page with nothing on it but blank paper.
    */
    main.page:has(> [data-sheet], > .plan-key, > .guide) > *:not([data-sheet]):not(.plan-key):not(.guide) { display: none !important; }

    /*
        The colours of a page that is not a sheet are put to paper's: the theme is dark, and its light text and its dark
        surfaces would print as faint words in dark boxes. A sheet sets its own.
    */
    main.page:not(:has(> [data-sheet], > .plan-key, > .guide)) {
        --bg: #fff; --surface: #fff; --surface-raised: #fff; --line: #d8cfca; --line-strong: #b8aca5; --mark: #8a7f7a;
        --text: #1b1415; --muted: #4a3f42; --faint: #5f5558; --gold: #7a5f1c; --gold-bright: #7a5f1c; --on-gold: #fff;
        --danger: #a3211b; --ok: #1f6b3a; --warn: #8a5a00;
        --stage-keep: #6b5f52; --stage-keep-rgb: 107 95 82; --stage-ready: #6f5a2c; --stage-ready-rgb: 111 90 44;
        --bg-rgb: 255 255 255; --gold-rgb: 122 95 28; --gold-bright-rgb: 122 95 28; --muted-rgb: 74 63 66;
        color: var(--text);
    }

    /*
        One thing prints at a time: the guests' sheets, or the spare, or the answers, or the flavour guide,
        as the page is marked. With no mark the sheets print, and on a page that has none the guide does.
    */
    .plan-key, main.page:has(> [data-sheet]) > .guide, .printing-key main.page > [data-sheet], .printing-guide main.page > [data-sheet] { display: none !important; }
    .printing-guide main.page > .guide { display: block !important; }

    /* The spare waits behind the guests' own sheets and prints when it is asked for. With nobody named it is the only sheet, and prints as the sheets do. */
    main.page > :where(.sheet.personal:not(.spare)) ~ .sheet.spare, .printing-spare main.page > [data-sheet]:not(.spare) { display: none !important; }
    .printing-spare main.page > .sheet.spare { display: block !important; break-before: auto; }
    .guide-body { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
    .wheel { max-width: none; }
    .wheel path, .guide-scales dd { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .printing-key .plan-key { display: block !important; margin: 0; }
    .printing-key .plan-key > summary { display: none; }
    .printing-key .plan-key > .sheet { display: block !important; }
    main.page { margin: 0; padding: 0; max-width: none; }
    .sheet { margin: 0; padding: 0; border-radius: 0; background: #fff; box-shadow: none; overflow: visible; }
    .sheet table { min-width: 0; font-size: 10pt; }
    .sheet td { height: 26mm; }
    .sheet tr { break-inside: avoid; }

    .sheet-brand { top: 0; right: 0; }
    .sheet.personal .sheet-brand { top: auto; bottom: 0; }
    .sheet-brand .wordmark { height: 7mm; }

    /*
        Each guest's sheet is a page of its own. The break goes before every sheet but the first, so that
        nothing comes after the last one: a break with nothing after it prints a blank page in some browsers.
    */
    .sheet.personal { margin: 0; }
    /* A guest's sheet is framed in a fine gold line, as the cellar book's cover is, the page's own height. */
    .sheet.personal { box-sizing: border-box; min-height: 246mm; padding: 6mm 6mm 4mm; border: .35mm solid #b58a38; outline: .15mm solid #b58a38; outline-offset: 1.1mm; }
    .sheet.personal .sheet-brand { right: 6mm; bottom: 5mm; }
    .sheet.personal .sheet-made { padding-right: 18mm; }
    .sheet.personal ~ .sheet.personal { break-before: page; }

    /* The answers and the flavour guide are a page each, and are kept whole on it. */
    .sheet.guide, .plan-key > .sheet { break-inside: avoid; }
    .sheet.guide .wheel { max-height: 150mm; }
    .sheet-code { width: 27mm; }
    .sheet-code span { font-size: 8.5pt; }
}

/* Choosing a spreadsheet: the browser's own file button is kept out of sight, and a tile in the app's style stands for it. */
.sheet-pick { display: block; margin: 0 0 1rem; cursor: pointer; }
.sheet-pick input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.sheet-pick-tile { display: grid; justify-items: center; gap: .3rem; padding: 1.3rem 1rem; border: 1.5px dashed rgb(var(--gold-rgb) / .5); border-radius: var(--radius); background: rgb(var(--gold-rgb) / .05); text-align: center; }
.sheet-pick-tile svg { width: 2rem; height: 2rem; fill: none; stroke: var(--gold-bright); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.sheet-pick-tile strong { font: 600 1.02rem/1.3 var(--sans); color: var(--text); overflow-wrap: anywhere; }
.sheet-pick-tile span { color: var(--muted); font-size: .86rem; }
.sheet-pick input:focus-visible + .sheet-pick-tile { outline: 2px solid var(--gold-bright); outline-offset: 2px; }
.sheet-pick.chosen .sheet-pick-tile { border-style: solid; background: rgb(var(--gold-rgb) / .1); }

/* The switch between the cellar as a list and as a timeline. */
.views { display: inline-flex; gap: .25rem; margin: .1rem 0 .9rem; padding: .25rem; border: 1px solid var(--line); border-radius: 999px; background: none; }
.views a { display: inline-flex; align-items: center; gap: .4rem; min-height: 36px; padding: 0 .95rem; border-radius: 999px; color: var(--muted); font-size: .9rem; font-weight: 600; text-decoration: none; }
.views a[aria-current="true"] { background: var(--surface-raised); color: var(--text); }
.views svg { width: 1.05rem; height: 1.05rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/*
    The timeline: each wine's drinking window along the years. A row is the wine's name over its bar, and
    every bar's track carries a mark for today, so the eye reads straight down the page at now.
*/
.spans { position: relative; padding: 1rem 1rem .9rem; }
.spans .spans-help { position: absolute; top: 1rem; right: 1rem; margin: 0; }
.spans-key { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin: 0 0 .9rem; font-size: .8rem; }
.spans-key span { display: inline-flex; align-items: center; gap: .4rem; }
.spans-key span { color: var(--muted); }
.spans-key i { width: 1.2rem; height: .5rem; border-radius: 999px; }
.spans-key .when-past i { background: var(--stage-past); }
.spans-key .when-drinksoon i { background: var(--stage-soon); }
.spans-key .when-ready i { background: var(--stage-ready); }
.spans-key .when-hold i { background: var(--stage-keep); }
/* One column that is as wide as the card and no wider, however long a name in it is. */
.spans-plot { display: grid; grid-template-columns: minmax(0, 1fr); gap: .5rem; }
.spans-today { position: relative; height: .9rem; }
.spans-today b { position: absolute; left: calc(var(--now) * 100%); translate: -50% 0; color: var(--text); font: 600 .62rem var(--sans); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.spans-stage { display: flex; justify-content: space-between; align-items: baseline; margin: .55rem 0 0; font: 600 .7rem var(--sans); letter-spacing: .14em; text-transform: uppercase; }
.spans-stage:first-of-type { margin-top: 0; }
.spans-stage span { color: var(--muted); font-weight: 600; letter-spacing: 0; }
.span-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: .28rem; padding: .12rem 0; color: inherit; text-decoration: none; }
.span-head { display: flex; justify-content: space-between; align-items: baseline; gap: .2rem .8rem; }
/* A name is never cut short: on a phone it takes two lines, with its years under it. */
.span-name { min-width: 0; color: var(--text); font: 500 .98rem/1.3 var(--sans); text-wrap: pretty; }
@media (max-width: 30rem) { .span-head { flex-wrap: wrap; } .span-years { flex-basis: 100%; } }
.span-name .dot { display: inline-block; width: .5rem; height: .5rem; margin-right: .45rem; vertical-align: .08em; }
.span-years { flex: none; color: var(--muted); font-size: .76rem; font-variant-numeric: tabular-nums; }
.span-track { position: relative; height: 12px; border-radius: 999px; background: rgba(255, 255, 255, .05); }
.span-track::after { content: ""; position: absolute; top: -3px; bottom: -3px; left: calc(var(--now) * 100% - 1px); width: 2px; border-radius: 2px; background: var(--text); box-shadow: 0 0 0 2px var(--surface); }
.span-bar { position: absolute; inset: 0 auto 0 var(--from); width: var(--wide); border-radius: 999px; background: currentColor; }
.span-bar.runs-on { border-radius: 999px 0 0 999px; -webkit-mask-image: linear-gradient(90deg, #000 55%, transparent); mask-image: linear-gradient(90deg, #000 55%, transparent); }
.span-bar.runs-in { border-radius: 0 999px 999px 0; -webkit-mask-image: linear-gradient(270deg, #000 55%, transparent); mask-image: linear-gradient(270deg, #000 55%, transparent); }
.span-bar.runs-in.runs-on { border-radius: 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent); mask-image: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent); }
.span-row:active .span-track { background: rgba(255, 255, 255, .1); }
.spans-years { position: relative; height: 1rem; margin-top: .2rem; color: var(--muted); font-size: .68rem; font-variant-numeric: tabular-nums; }
.spans-years span { position: absolute; top: 0; translate: -50% 0; }
.spans-years span:first-child { translate: 0 0; }
.spans-none { margin: .9rem 0 0; color: var(--muted); font-size: .9rem; }

/* Importing a spreadsheet: what was found, the first rows of it, what could not be used, and which column is which. */
.import-found strong { color: var(--text); font-weight: 600; }
.import-rows { margin: 0 calc(var(--gutter) * -1) 1rem; padding: 0 var(--gutter); overflow-x: auto; }
.import-rows table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.import-rows th { padding: .3rem .8rem .3rem 0; color: var(--muted); font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.import-rows td { padding: .55rem .8rem .55rem 0; border-top: 1px solid var(--line); vertical-align: top; }
.import-rows td:first-child { min-width: 9rem; }
.import-rows td:nth-child(2) { white-space: nowrap; }
.import-rows td:last-child, .import-rows th:last-child { padding-right: 0; }
.import-rows td strong { display: block; font: 600 1rem/1.3 var(--sans); }
.import-rows td span { display: block; color: var(--muted); font-size: .84rem; }
.import-heading { margin: 1.1rem 0 .3rem; color: var(--warn); font-weight: 600; }
.opened .import-heading { margin-top: 0; }
.import-problems { margin: 0 0 .5rem; padding-left: 1.1rem; font-size: .92rem; }
.import-problems li + li { margin-top: .25rem; }
.import-columns { display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: 0 .8rem; }
.import-form > .btn { margin-top: 1rem; }
.import-form details.more { margin-top: 1rem; }

/*
    Asking Kept. The box a question is typed in is one rounded line with its button inside it, on the cellar
    page and under a conversation alike.
*/
.ask { margin: 0 0 1.3rem; }

.ask-row {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .3rem .3rem .3rem 1.15rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: var(--surface);
    transition: border-color .15s ease;
}

.ask-row:focus-within { border-color: var(--gold); }
.ask-row input, .ask-row input:focus-visible { flex: 1; min-width: 0; min-height: 44px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; outline: none; }

.ask-send {
    flex: none;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: var(--gold);
    color: var(--on-gold);
    cursor: pointer;
}

.ask-send:active { translate: 0 1px; }
.ask-send:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; }
.ask-send svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ask-form.is-busy .ask-send { opacity: .4; pointer-events: none; }
.ask-form { margin-top: 1.4rem; }

/* A conversation: what was asked on the right, and what Kept said under it, with a card for each wine it points at. */
.talk { min-height: 46vh; }
.talk-ideas { margin-top: 1rem; }
.talk-ideas .chip { color: var(--text); }
/* How many questions a new cellar's first taste has left, quiet under the line that says what to ask. */
.talk-allowance { margin: .35rem 0 0; font-size: .86rem; }
.turns { display: grid; gap: 1.1rem; margin: 0; padding: 0; list-style: none; }
.turn { scroll-margin-bottom: 10rem; animation: arrive .3s ease both; }

.turn.you {
    justify-self: end;
    max-width: 88%;
    padding: .6rem 1rem;
    border: 1px solid var(--line-strong);
    border-radius: 20px 20px 5px 20px;
    background: var(--surface-raised);
}

.turn.you p { margin: 0; }
.turn.kept { display: grid; gap: .85rem; }
.turn.kept > .problem { margin: 0; }
/* The answer's own words. A card or a picture under a paragraph keeps its own look. */
.said > p { margin: 0 0 .75rem; font-size: 1.04rem; line-height: 1.58; }
.said > p:last-child { margin-bottom: 0; }
.said:empty, .pointed:empty { display: none; }

/* An answer's lists, as Said reads them: three or more wines, steps or measures, a line each. Its opening words may be in bold. */
.said > :is(ol, ul) { display: grid; gap: .35rem; margin: 0 0 .75rem; padding-left: 1.35rem; font-size: 1.04rem; line-height: 1.5; }
.said > :is(ol, ul):last-child { margin-bottom: 0; }
/* An answer sits inside the conversation's own list, where a browser would draw its bullets as rings. */
.said > ul { list-style-type: disc; }
.said > :is(ol, ul) > li { padding-left: .15rem; }
.said > :is(ol, ul) > li::marker { color: var(--faint); font-variant-numeric: tabular-nums; }
.said > :is(p, ol, ul, .said-head) strong { color: var(--text); font-weight: 600; }
.said-head { margin: 1rem 0 .4rem; font: 600 .78rem/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.said-head:first-child { margin-top: 0; }
.said-table { overflow-x: auto; margin: 0 0 .75rem; border: 1px solid var(--line); border-radius: 14px; }
.said-table table { width: 100%; border-collapse: collapse; font-size: .92rem; line-height: 1.4; font-variant-numeric: tabular-nums; }
.said-table :is(th, td) { padding: .5rem .7rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.said-table th { color: var(--faint); font-weight: 600; font-size: .76rem; letter-spacing: .06em; text-transform: uppercase; background: var(--surface); }
.said-table tr:last-child td { border-bottom: 0; }

/* While more of the answer is on its way, a mark sits after its last word. */
.said.is-arriving > li:last-child::after, .said.is-arriving > :is(ol, ul):last-child > li:last-child::after,
.said.is-arriving > p:last-child::after {
    content: "";
    display: inline-block;
    width: .45em;
    height: 1.05em;
    margin-left: .2em;
    vertical-align: -.18em;
    border-radius: 2px;
    background: var(--gold);
    animation: blink 1s steps(2, jump-none) infinite;
}

/* What Kept is doing before there is anything to read: the words, with light passing along them. */
.doing {
    width: fit-content;
    margin: 0;
    background: linear-gradient(90deg, var(--muted) 35%, var(--gold-bright) 50%, var(--muted) 65%) 0 0 / 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-style: italic;
    animation: pass 1.5s linear infinite;
}

/* What Kept is doing in the app before there is anything to read: a small glass filling, beside the steps of the work. */
.ask-wait { --done: 0; display: flex; align-items: center; gap: .9rem; margin: .1rem 0; }
.ask-wait .wait-glass { flex: none; width: 2.6rem; height: 3.25rem; margin: 0; }
.ask-steps { display: grid; gap: .25rem; margin: 0; padding: 0; list-style: none; font-size: .95rem; line-height: 1.35; }
.ask-steps li { color: var(--faint); }
.ask-steps li.done::before { content: "\2713"; margin-right: .45rem; color: var(--gold-bright); font-style: normal; }
.ask-steps li.now {
    width: fit-content;
    background: linear-gradient(90deg, var(--muted) 35%, var(--gold-bright) 50%, var(--muted) 65%) 0 0 / 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-style: italic;
    animation: pass 1.5s linear infinite;
}

.pointed { display: grid; gap: .7rem; }

/* The cards of the wines a paragraph named, under it, before the answer goes on. */
.said-cards { display: grid; gap: .55rem; margin: .15rem 0 1rem; }
.said-cards:last-child { margin-bottom: 0; }

/*
    A picture an answer asked for, drawn from the cellar: what it is worth, what to open next, where a bottle is, a vertical, a place.
    Each is a panel the width of the answer, with its figures in the cellar's own colours, and a way at its foot to where the same
    thing is in the app. It comes in as a card does.
*/
.said-picture:empty { display: none; }
.said-picture.said-art, .said-picture:has(> .ask-art) { float: right; width: 84px; margin: .25rem 0 .5rem 1rem; }
.plan-art { float: right; margin: .1rem 0 .5rem 1rem; }
.menu-dish-art { width: 56px; margin: 1rem 0 .3rem; }
.menu-dish-art .ask-art { width: 56px; height: 56px; border-radius: 12px; }
.plan-places { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; margin: 0 0 1.4rem; padding: 0; list-style: none; }
.plan-places a { display: block; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; color: var(--text); text-decoration: none; }
.plan-places svg { display: block; width: 100%; height: auto; }
.plan-places b { display: block; padding: .5rem .7rem .55rem; font: 500 .9rem/1.25 var(--sans); }
.plan-places b::after { content: "\00A0\203A"; color: var(--gold); }
.ask-art { position: relative; overflow: hidden; width: 84px; height: 84px; border-radius: 16px; box-shadow: 0 8px 22px rgb(0 0 0 / .35); }
.ask-art .drawing { width: 100%; height: 100%; margin: 0; float: none; border-radius: 0; box-shadow: none; }
.ask-art .drawing svg { display: block; width: 100%; height: 100%; }
.ask-art .drawing-place svg { position: absolute; top: 0; left: 50%; width: auto; max-width: none; translate: -50% 0; }
.ask-art .drawing-place[data-scene="barossa-valley"] svg { left: 0; translate: 0 0; }
.ask-art .drawing-place[data-scene="southern-rhone"] svg, .ask-art .drawing-place[data-scene="armagnac"] svg { left: auto; right: 0; translate: 0 0; }
.ask-picture { display: grid; gap: .55rem; margin: 0; padding: .9rem 1rem 1rem; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); animation: arrive .35s ease both; }
.worth { display: flow-root; margin: 1.2rem 0; }
.worth .drawing-beside { margin-top: 0; }
.worth-scene svg { display: block; width: 100%; height: auto; margin-bottom: .7rem; border-radius: 12px; }
.worth-tag { margin: 0 0 .2rem; color: var(--faint); font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.worth-name { margin: 0 0 .3rem; color: var(--text); font: 400 1.14rem/1.28 var(--serif); text-wrap: balance; }
.worth-text { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.55; text-wrap: pretty; }
.worth-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .3rem 1rem; margin-top: .6rem; font-size: .88rem; }
.worth-foot form { margin: 0; }
.worth-foot .link { color: var(--faint); font-size: .84rem; }
.ask-picture p { margin: 0; }
.ask-plate { padding: .5rem .5rem .8rem; }
.ask-plate .docs-plate { margin: 0; }
.ask-plate .docs-plate svg { height: auto; border-radius: 12px; }
.ask-plate .docs-plate figcaption { margin: .5rem .4rem 0; color: var(--muted); font-size: .88rem; line-height: 1.45; }
.ask-plate .ask-more { margin-inline: .4rem; }
.ask-big { font: 400 2.1rem/1.05 var(--serif); color: var(--text); }
.ask-sub { color: var(--muted); font-size: .88rem; line-height: 1.4; }
.ask-lead { font-weight: 600; font-size: .95rem; }
.ask-more { justify-self: start; color: var(--muted); font-size: .88rem; font-weight: 500; text-decoration: none; }
.ask-more::after { content: " ›"; }

.ask-split { display: flex; gap: 2px; height: .55rem; margin-top: .2rem; overflow: hidden; border-radius: 999px; }
.ask-split > span { flex-basis: 0; min-width: 4px; background: var(--wine, var(--unsorted)); }
.ask-split > .ask-split-rest, .ask-split-key .ask-split-rest i { background: var(--line-strong); }
.ask-split-key { display: flex; flex-wrap: wrap; gap: .3rem .9rem; margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: .82rem; }
.ask-split-key i { display: inline-block; width: .55rem; height: .55rem; margin-right: .35rem; border-radius: 50%; background: var(--wine, var(--unsorted)); }
.ask-split-key b { margin-left: .25rem; color: var(--text); font-weight: 600; }
.ask-dearest { display: grid; gap: 0; margin: .2rem 0 0; padding: 0; list-style: none; counter-reset: dearest; }
.ask-dearest li { counter-increment: dearest; border-top: 1px solid var(--line); }
.ask-dearest a { display: grid; grid-template-columns: 1.2rem minmax(0, 1fr) auto; gap: .6rem; align-items: baseline; padding: .5rem 0; color: inherit; font-size: .9rem; text-decoration: none; }
.ask-dearest a::before { content: counter(dearest); color: var(--faint); font-variant-numeric: tabular-nums; }
.ask-dearest b { font-weight: 600; font-variant-numeric: tabular-nums; }

.ask-next-list { display: grid; margin: 0; padding: 0; list-style: none; }
.ask-next-list li { border-top: 1px solid var(--line); }
.ask-next-list a { display: grid; gap: .2rem; padding: .55rem 0 .55rem .75rem; border-left: 3px solid var(--wine, var(--unsorted)); color: inherit; text-decoration: none; }
.ask-next-name { font-size: .95rem; font-weight: 500; line-height: 1.3; }
.ask-next-facts { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; color: var(--muted); font-size: .8rem; }

.ask-where { padding: .45rem; }
.ask-add-photo { display: grid; flex: none; place-items: center; width: 44px; height: 44px; color: var(--muted); cursor: pointer; }
.ask-add-photo input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.ask-add-photo svg { width: 1.45rem; height: 1.45rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.ask-photo-chip { display: flex; align-items: center; gap: .6rem; margin: 0 0 .4rem; padding: .35rem .6rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: .88rem; }
.ask-photo-chip[hidden] { display: none; }
.ask-photo-chip img { width: 2.6rem; height: 2.6rem; border-radius: 8px; object-fit: cover; }
.ask-sent-photo { display: block; max-width: 11rem; margin-bottom: .4rem; border-radius: 12px; }
.proposal-all { width: 100%; margin-top: .5rem; }
.plain-questions { display: grid; margin: .4rem 0 1.2rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.plain-questions a { display: grid; gap: .12rem; padding: .7rem 2rem .72rem 1rem; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .92rem; line-height: 1.4; text-decoration: none; background: no-repeat right .9rem center / .5rem url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 14'%3E%3Cpath d='M1 1l6 6-6 6' fill='none' stroke='%23c4a264' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.plain-questions a:last-child { border-bottom: 0; }
.plain-questions a:hover, .plain-questions a:focus-visible { background-color: var(--surface-raised); }
.plain-questions strong { color: var(--text); font-size: 1rem; font-weight: 600; }
.plain-questions .plain-other { color: var(--gold); font-weight: 600; }
.insurance-where { display: none; }
@media screen and (max-width: 63.99rem) {
    .insurance-where { display: block; margin-top: .2rem; color: var(--muted); font-size: .8rem; line-height: 1.35; }
    .insurance-where-column { display: none; }
}
@media print {
    .no-print { display: none; }
}
.bottle-remind, .already-drunk { flex: 1 1 100%; margin: .4rem 0; }
.bottle-remind summary, .already-drunk summary { padding: .35rem 0; font-weight: 600; cursor: pointer; }
.bottle-remind .field input { width: 100%; }
.already-drunk .field input { width: 100%; }
.already-drunk small { display: block; margin-top: .3rem; color: var(--muted); }
.board-card > .ask-chart { margin: 0; padding: 0; border: 0; background: none; }
.ranked li:has(.rate) .ranked-value { grid-column: 2 / -1; justify-self: start; margin-top: .3rem; }
.insurance-total { margin: 1rem 0 .4rem; }
.insurance-note { margin-top: 1rem; font-size: .85rem; }
@media print {
    .insurance-actions { display: none; }
    .insurance-table { font-size: 10pt; }
}
.ask-chart { display: grid; gap: .5rem; padding: .85rem; }
.ask-chart-title { margin: 0; font: 400 1.08rem/1.3 var(--serif); }
.ask-chart .bar-list, .ask-chart .columns { margin: 0; }
.ask-wheels { gap: 1rem; }
.ask-wheel { display: grid; gap: .4rem; }
.ask-table-wrap { overflow-x: auto; }
.ask-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.ask-table th { padding: .3rem .4rem; color: var(--muted); font-weight: 500; text-align: left; white-space: nowrap; }
.ask-table td { padding: .4rem; border-top: 1px solid var(--line); }
.ask-map svg { display: block; width: 100%; height: auto; border-radius: 12px; }
.ask-map-dot { fill: var(--gold); }
.ask-map-ring { fill: none; stroke: var(--gold); stroke-width: 1.4; stroke-dasharray: 3 3; }
.ask-map-road { fill: none; stroke: var(--gold); stroke-width: 1.6; stroke-dasharray: 5 4; stroke-linecap: round; opacity: .8; }
.ask-map-count { fill: var(--on-gold); font: 600 9.5px var(--sans); text-anchor: middle; }
.ask-map-name { fill: var(--text); font: 500 10px var(--sans); paint-order: stroke; stroke: rgb(0 0 0 / .65); stroke-width: 2.4px; }
.ask-where { display: grid; gap: .45rem; }
.ask-where .pour-where { grid-template-columns: 1fr; margin: 0; }
.ask-where .pour-where.loose { padding: .8rem; }
.ask-where .pour-rack { width: 100%; height: auto; pointer-events: none; overflow: hidden; }
.ask-where .pour-rack .rack { zoom: 2.4; margin: .4rem auto; }
.ask-where > .pour-place { margin: .35rem .4rem .2rem; }

.ask-years { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; list-style: none; }
.ask-years li > a, .ask-years .is-missing { display: inline-flex; align-items: baseline; gap: .2rem; min-height: 36px; padding: .45rem .75rem; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; text-decoration: none; }
.ask-years small { color: var(--muted); font-weight: 500; }
.ask-years .is-missing { border-style: dashed; color: var(--faint); font-weight: 500; }

.ask-place-name { font: 400 1.6rem/1.1 var(--serif); }
.ask-place-yours { font-size: .92rem; }

@media (prefers-reduced-motion: reduce) {
    .ask-picture { animation: none; }
}

/*
    An answer that names three wines or more shows each as a line a phone can hold several of: its label, its maker and name, when to
    drink it and how many, and where it is. The whole line is still the way to its page, and its place the way to its rack.
*/
.is-compact .answer-card { gap: .3rem; padding: .6rem .8rem .65rem; border-radius: 14px; }
.is-compact .answer-card .pour-wine { grid-template-columns: 36px minmax(0, 1fr); gap: .7rem; }
.is-compact .answer-card .thumb { width: 36px; height: 48px; border-radius: 6px; }
.is-compact .answer-card .drawn-label { scale: .64; }
.is-compact .answer-card .pour-maker { font: 600 1rem/1.25 var(--sans); }
.is-compact .answer-card .pour-name { margin-top: 0; font-size: .9rem; }
.is-compact .answer-card .pour-facts { display: none; }
.is-compact .answer-card :is(.answer-foot, .pour-where) { margin-left: calc(36px + .7rem); }
.is-compact .answer-card .answer-foot { font-size: .8rem; }
.is-compact .answer-card .pour-where { padding: 0; border: 0; border-radius: 0; background: none; }
.is-compact .answer-card .pour-place-label { display: none; }
.is-compact .answer-card .pour-place strong { display: inline; color: var(--muted); font-size: .86rem; font-weight: 500; }
.is-compact .answer-card .pour-go { display: none; }
.is-compact .answer-card .pour-place strong::after { content: " ›"; }
.answer-card { gap: .65rem; padding: .9rem 1rem 1rem; border-radius: 18px; box-shadow: none; animation: arrive .35s ease both; }
.answer-card .pour-maker { font-size: 1.2rem; }
.answer-foot { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .7rem; }
.answer-count { color: var(--muted); font-size: .84rem; }
.talk-own { margin: 1.2rem 0 0; text-align: center; font-size: .88rem; }
.talk-own a { color: var(--muted); }

@keyframes arrive { from { opacity: 0; translate: 0 8px; } }
@keyframes blink { from { opacity: 1; } to { opacity: .15; } }
@keyframes pass { from { background-position: 100% 0; } to { background-position: -120% 0; } }

@media (prefers-reduced-motion: reduce) {
    .turn, .answer-card, .doing, .ask-steps li.now, .said.is-arriving > p:last-child::after { animation: none; }
    .doing, .ask-steps li.now { color: var(--muted); background: none; }
}
.hero-moment { margin: 0 0 .55rem; color: var(--gold); font: 600 .72rem/1.2 var(--sans); letter-spacing: .2em; text-transform: uppercase; }
.hero-count { margin: 0; font-size: 4.2rem; line-height: 1; color: var(--gold); }
.hero-count span { margin-left: .45rem; font: 600 .76rem var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--faint); }
.hero .summary { margin: .25rem 0 1rem; }

/* Narrowed, the whole cellar's count is a line over the type key, so that what was asked for comes up on the first screen. */
.hero.is-narrowed { margin-bottom: .9rem; }
.hero.is-narrowed > :is(.hero-moment, .summary, .hero-coming) { display: none; }
.hero.is-narrowed > .hero-count { margin-bottom: .55rem; font-size: 1.7rem; }

.mix { display: flex; gap: 3px; height: 10px; border-radius: 999px; overflow: hidden; }
.mix-part { flex: 1 0 6px; background: var(--wine, var(--unsorted)); }
.mix-key { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin: .65rem 0 0; padding: 0; list-style: none; color: var(--muted); font-size: .86rem; }
/* On the cellar's first screen the key is one line: on a phone the three types there are most of and how many more, and every type on a wider screen. */
.hero .mix-key { flex-wrap: nowrap; overflow: hidden; white-space: nowrap; }
.hero .mix-key .mix-later, .hero .mix-key .mix-more-wide { display: none; }
.hero .mix-key .mix-more a { color: var(--faint); }
@media (min-width: 46rem) {
    .hero .mix-key .mix-later, .hero .mix-key .mix-more-wide { display: list-item; }
    .hero .mix-key .mix-last, .hero .mix-key .mix-more:not(.mix-more-wide) { display: none; }
}
/* "+N more" opens the rest of the key where it is, on as many lines as it takes. */
.hero .mix-key.is-open { flex-wrap: wrap; white-space: normal; }
.hero .mix-key.is-open .mix-later, .hero .mix-key.is-open .mix-last { display: list-item; }
.hero .mix-key.is-open .mix-more { display: none; }

/*
    The key is how the list is narrowed by type: each type is a target a finger can find, its text where the key's text was, and the
    type chosen is ringed in gold, with the rest of the bar dimmed. Each part of the bar narrows to its type too, over a finger's height.
*/
.hero .mix-key { flex-wrap: wrap; overflow: visible; gap: 0 .1rem; margin: .3rem -.55rem 0; }
.hero .mix-key a { display: inline-flex; align-items: center; gap: .35rem; min-height: 36px; padding: 0 .55rem; border: 1px solid transparent; border-radius: 999px; color: inherit; text-decoration: none; }
.hero .mix-key a:hover, .hero .mix-key a:focus-visible { color: var(--text); }
.hero .mix-key a[aria-current="true"] { border-color: var(--gold); color: var(--text); }
.hero .mix-key .mix-clear { margin-left: .15rem; font-style: normal; color: var(--faint); }
.hero .mix { overflow: visible; border-radius: 0; }
.hero .mix-part { position: relative; transition: opacity .2s; }
.hero .mix-part:first-child { border-radius: 999px 0 0 999px; }
.hero .mix-part:last-child { border-radius: 0 999px 999px 0; }
.hero .mix-part:only-child { border-radius: 999px; }
.hero .mix-part::before { content: ""; position: absolute; inset: -12px 0; }
.hero .mix.has-choice .mix-part:not(.is-on) { opacity: .28; }

/*
    The cellar narrowed in place (narrow.js). A slow answer dims the list while it comes; the list then comes in a little low and settles,
    its first wines one after another. The gold ring glides from type to type, the real ring held back until it lands. A figure that
    changes rolls, a digit at a time: each digit that changes is a strip of the old and the new, a line high, that slides.
*/
.is-narrowing > form[data-filters] ~ * { opacity: .55; transition: opacity .2s .05s; }
.narrow-in { animation: narrow-in .36s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 24ms); }
@keyframes narrow-in { from { opacity: 0; transform: translateY(10px); } }
.mix-glide { position: fixed; z-index: 30; box-sizing: border-box; border: 1px solid var(--gold); border-radius: 999px; pointer-events: none; }
.hero .mix-key a.is-arriving[aria-current="true"] { border-color: transparent; }
[data-roll] { font-variant-numeric: tabular-nums; }
.roll { display: inline-block; height: 1lh; overflow: hidden; vertical-align: top; }
.roll-strip { display: block; }
.roll-strip > span { display: block; height: 1lh; }
@media (prefers-reduced-motion: reduce) {
    .narrow-in { animation: none; }
}

/* Finding wine: a search box, chips for the two questions asked most, and the rest folded away. */
.filters { margin-bottom: 1rem; }
.filters .search { margin-bottom: 0; border-radius: 999px; padding-left: 1.1rem; }

/* The names in the cellar that finish what is typed, straight under the box, in the words' own colour, so they read as names to tap. */
.filters .suggest { margin-top: .55rem; margin-bottom: 0; }
.filters .suggest .chip { color: var(--text); }
/* The folded filters stand over the list, apart from the form they belong to. */
details.filters-more { margin: 0 0 1rem; }
details.filters-more > summary { font-size: .9rem; font-weight: 500; }
details.filters-more .btn { margin-bottom: .4rem; }
.shown { margin: 0 0 .9rem; color: var(--muted); font-size: .92rem; }
.shown a { margin-left: .3rem; white-space: nowrap; }
.wines { list-style: none; margin: 0; padding: 0; }
.wines + .empty, .empty + .wines { margin-top: 1rem; }

.wine {
    position: relative;
    display: grid;
    grid-template-columns: 56px 1fr auto;
    gap: .9rem;
    align-items: center;
    margin-bottom: .6rem;
    padding: .7rem .9rem .7rem 1.05rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    color: inherit;
    text-decoration: none;
    overflow: hidden;
}

/* The stripe down the left edge is the wine's colour. */
.wine::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--wine, var(--unsorted)); }
.wine:active { background: var(--surface-raised); }

.thumb { width: 56px; height: 74px; border-radius: 9px; object-fit: cover; background: rgba(0, 0, 0, .35); }
.thumb.blank { display: grid; place-items: center; }

/*
    A label drawn for a wine nobody has photographed: the producer's initials on a paper label, on glass of
    the wine's colour, with a streak of light down one side. It is the same size as a photo, so a list
    reads as a row of bottles either way.
*/
.thumb.drawn {
    display: grid;
    place-items: center;
    padding: 0 13%;
    background:
        linear-gradient(100deg, rgba(255, 255, 255, 0) 8%, rgba(255, 255, 255, .2) 14%, rgba(255, 255, 255, 0) 24%),
        linear-gradient(180deg, color-mix(in srgb, var(--wine, var(--unsorted)) 58%, #000), color-mix(in srgb, var(--wine, var(--unsorted)) 24%, #060304));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07);
}

.drawn-label {
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 2px;
    width: 100%;
    aspect-ratio: 1 / 1.08;
    border-radius: 2px;
    background: linear-gradient(180deg, #f7efdf, #e7dabf);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .5);
    color: #2a1a21;
}

.drawn-initials { font: 400 1.05rem/1 var(--serif); letter-spacing: .01em; }
.drawn-year { font: 700 .46rem/1 var(--sans); letter-spacing: .1em; color: var(--brand); }
.thumb.drawn.large .drawn-label { gap: 5px; border-radius: 3px; }
.thumb.drawn.large .drawn-initials { font-size: 2.2rem; }
.thumb.drawn.large .drawn-year { font-size: .78rem; }
.wine-text { min-width: 0; }
.wine-title { display: block; font-size: 1.02rem; font-weight: 500; line-height: 1.3; }
.wine-meta { display: block; color: var(--muted); font-size: .84rem; line-height: 1.35; }
.wine-where { color: var(--muted); }

.count {
    display: grid;
    place-items: center;
    min-width: 2.3rem;
    height: 2.3rem;
    padding: 0 .5rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    color: var(--text);
    font-size: .98rem;
    font-weight: 500;
}

/* A colour class only names the wine's colour; whatever it sits on decides how to show it. */
.colour-red { --wine: var(--red); }
.colour-white { --wine: var(--white); }
.colour-rose { --wine: var(--rose); }
.colour-sparkling { --wine: var(--sparkling); }
.colour-dessert { --wine: var(--dessert); }
.colour-fortified { --wine: var(--fortified); }
.colour-orange { --wine: var(--orange); }
.colour-spirit { --wine: var(--spirit); }
.colour-beer { --wine: var(--beer); }
.colour-mixer { --wine: var(--mixer); }

.dot { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; background: var(--wine, var(--unsorted)); }

/* Wine page */

.wine-head { display: grid; grid-template-columns: 112px 1fr; gap: 1.1rem; align-items: start; margin-bottom: 1.2rem; }
.wine-head img, .wine-head .thumb { display: block; width: 112px; height: 150px; border-radius: 14px; object-fit: cover; }
.wine-head .thumb.blank { display: grid; }
.wine-head .thumb .dot { width: 1.6rem; height: 1.6rem; }
.wine-head h1 { font-size: 1.75rem; }
.wine-head p { margin: .1rem 0; }

.wine-name { font-family: var(--serif); font-size: 1.12rem; color: #ddd5ca; }
.facts { margin: .6rem 0 .4rem; padding: 0; list-style: none; color: var(--muted); font-size: .92rem; }
.facts li + li { margin-top: .3rem; }

/* Where a wine's bottles are: a row for each rack, with its slots and how many. A row leads to the rack. */
.card.where { list-style: none; margin: 0 0 1rem; padding: 0 1rem; }
.where a, .where-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: .7rem; align-items: center; min-height: 56px; padding: .5rem 0; color: inherit; text-decoration: none; }
.where-row { grid-template-columns: minmax(0, 1fr) auto; }
.where li + li a, .where li + li .where-row { border-top: 1px solid var(--line); }
.where-rack { display: block; font-size: 1.02rem; font-weight: 500; line-height: 1.3; }
.where-slots { display: block; color: var(--muted); font-size: .84rem; }
.where a::after { content: "›"; color: var(--faint); }
.where .count { min-width: 2rem; height: 2rem; font-size: .95rem; }
.advice > .btn { margin-top: .8rem; }

/* The one bottle the page's actions are about, or the question of which it is. */
.bottle-where { display: block; margin: 0; font-size: 1.05rem; font-weight: 500; color: var(--text); text-decoration: none; }
.card.bottle { scroll-margin-top: 5rem; }
.card.bottle > .muted { margin: .2rem 0 .7rem; font-size: .92rem; }
.card.bottle > .chips { margin-inline: -1rem; padding-inline: 1rem; margin-bottom: 0; }
.bottle-loose { margin: .5rem 0 0; }
.bottle-loose a { display: inline-flex; align-items: center; min-height: 44px; }

/* How much is left of a spirit: a row of steps with the one it is at lit. Tapping another says so at once. */
.level { margin: 1rem 0 .2rem; }
.level .advice-label { display: block; margin-bottom: .4rem; }
.level .chips { margin: 0 -1rem; padding-inline: 1rem; }

/* In a card, a rack drawn for choosing in runs to the card's edges and no further. */
.card .pick-stage { margin-inline: -1rem; padding-inline: 1rem; }
.card .choose-place > .chips { margin-inline: -1rem; padding-inline: 1rem; }

/* A place that holds the bottle being looked for is one thing to tap, as a place to put one is. */
a.shelf-run, a.bay { border-radius: 8px; }
a.shelf-run:active, a.bay:active { background: rgb(var(--gold-rgb) / .22); }
.card.bottle small { margin-top: 0; }
.card.bottle .actions { margin-top: .5rem; gap: 0 1.2rem; }
.card.bottle details { flex: 1 1 100%; }
.card.bottle details > summary { display: inline-flex; align-items: center; min-height: 44px; color: var(--text); font-weight: 600; cursor: pointer; }
.card.bottle details[open] > summary { margin-bottom: .5rem; }
.card.bottle form { margin: 0 0 .6rem; }

/* Capture */

.capture { display: block; margin: 1.25rem 0; }
.capture input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }

.capture-button {
    display: grid;
    place-items: center;
    align-content: center;
    gap: .7rem;
    min-height: 13rem;
    border: 1px dashed rgb(var(--gold-rgb) / .7);
    border-radius: 22px;
    background: var(--surface);
    color: var(--text);
    font-family: var(--serif);
    font-size: 1.4rem;
    cursor: pointer;
}

.capture input:focus-visible + .capture-button { outline: 2px solid var(--gold); outline-offset: 3px; }
.capture-button > svg { width: 52px; height: 52px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.is-busy .capture, .is-busy .place { display: none; }

/* The same name on the photo being read and on the photo at the top of the next page makes the one glide into the other. */
.label-photo { display: block; max-width: 100%; max-height: 17rem; margin: 0 auto 1rem; border-radius: 16px; box-shadow: 0 16px 36px rgba(0, 0, 0, .5); view-transition-name: label-photo; }

/* The label photo, small, when nothing was read from it and the form has to be typed. */
.label-photo.small { max-height: 9rem; margin-bottom: .8rem; }

/*
    Reading a label

    While a photo is sent and read it sits in a viewfinder with a beam passing down it. Under it is a line
    saying what stage things are at, and the things being looked for, each catching the light in turn.
*/

.scan { margin: 1.25rem 0; text-align: center; }

.scan-frame {
    position: relative;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
    border-radius: 18px;
    background: #0a0808;
    box-shadow: 0 0 0 1px rgb(var(--gold-rgb) / .35), 0 0 46px rgb(var(--gold-rgb) / .22), 0 18px 40px rgba(0, 0, 0, .55);
    overflow: hidden;
    view-transition-name: label-photo;
}

/* No taller than leaves the words under it in sight above the tab bar, on a short phone too. */
.scan-photo { display: block; min-width: 11rem; max-width: 100%; min-height: min(13rem, 30svh); max-height: min(19rem, 40svh); object-fit: cover; filter: saturate(.8) brightness(.72); animation: develop 2.4s ease-in-out infinite alternate; }

/* The beam: a bright edge with a tail of light behind it, travelling down the label. */
.scan-beam {
    position: absolute;
    inset: 0 0 auto;
    height: 40%;
    background: linear-gradient(180deg, rgb(var(--gold-bright-rgb) / 0) 0%, rgb(var(--gold-bright-rgb) / .1) 55%, rgb(var(--gold-bright-rgb) / .42) 96%, #fff6d8 98.5%, rgb(var(--gold-bright-rgb) / 0) 100%);
    mix-blend-mode: screen;
    animation: sweep 2.4s cubic-bezier(.45, 0, .55, 1) infinite;
}

/* Viewfinder marks, one in each corner. */
.scan-corners {
    --mark: linear-gradient(var(--gold-bright) 0 0);
    position: absolute;
    inset: 12px;
    background:
        var(--mark) left top / 24px 2px, var(--mark) left top / 2px 24px,
        var(--mark) right top / 24px 2px, var(--mark) right top / 2px 24px,
        var(--mark) left bottom / 24px 2px, var(--mark) left bottom / 2px 24px,
        var(--mark) right bottom / 24px 2px, var(--mark) right bottom / 2px 24px;
    background-repeat: no-repeat;
    animation: breathe 1.4s ease-in-out infinite;
}

.scan-caption { min-height: 1.6em; margin: 1rem 0 0; font-family: var(--serif); font-size: 1.15rem; color: var(--gold-bright); }

/* The list has been read: the beam is spent and the frame holds its gold for a breath before the answer comes in. */
.scan.is-done .scan-beam { animation: none; opacity: 0; }
.scan.is-done .scan-photo { animation: none; filter: saturate(1) brightness(.95); }
.scan.is-done .scan-frame { box-shadow: 0 0 0 2px var(--gold-bright), 0 0 60px rgb(var(--gold-rgb) / .5), 0 18px 40px rgba(0, 0, 0, .55); transition: box-shadow .25s; }
.scan.is-done .scan-caption::before { content: "\2713\00a0"; }
.scan.is-done .scan-caption::after { content: ""; }
.scan-caption::after { content: "…"; }
.scan-caption.arriving { animation: arrive .35s ease-out; }

.scan-finds { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; margin: .8rem 0 0; padding: 0; list-style: none; }

.scan-finds li {
    padding: .22rem .7rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: linear-gradient(100deg, rgb(var(--gold-bright-rgb) / 0) 35%, rgb(var(--gold-bright-rgb) / .3) 50%, rgb(var(--gold-bright-rgb) / 0) 65%) 100% 0 / 300% 100% no-repeat, rgba(255, 255, 255, .03);
    color: var(--muted);
    font-size: .8rem;
    animation: glint 1.9s linear infinite;
}

.scan-finds li:nth-child(2) { animation-delay: .14s; }
.scan-finds li:nth-child(3) { animation-delay: .28s; }
.scan-finds li:nth-child(4) { animation-delay: .42s; }
.scan-finds li:nth-child(5) { animation-delay: .56s; }
.scan-finds li:nth-child(6) { animation-delay: .7s; }
.scan-finds li:nth-child(7) { animation-delay: .84s; }

/*
    Reading a walkthrough

    The same idea as reading a label, for a video: the pictures taken from it fill a strip one by one, what
    was said is drawn as a wave under them, and once everything has been sent a beam passes along the strip.
*/

.tips { margin: 0 0 1.2rem; padding: 0; list-style: none; counter-reset: tip; }
.tips li { position: relative; margin-bottom: .7rem; padding-left: 2.2rem; color: var(--muted); font-size: .95rem; counter-increment: tip; }
.tips li::before { content: counter(tip); position: absolute; top: .1rem; left: 0; display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border: 1px solid rgb(var(--gold-rgb) / .5); border-radius: 50%; color: var(--gold-bright); font-size: .78rem; }
.tips strong { color: var(--text); font-weight: 600; }

/* A second way to choose a video, shown as a link. The file input is hidden as it is in the big button. */
.pick { display: inline-flex; align-items: center; min-height: 44px; margin: 0; color: var(--gold-bright); font-weight: 400; font-size: 1rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.pick input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.pick input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 3px; }

.reel-frame { position: relative; padding: 8px; border-radius: 16px; background: #0a0808; box-shadow: 0 0 0 1px rgb(var(--gold-rgb) / .35), 0 0 46px rgb(var(--gold-rgb) / .18), 0 18px 40px rgba(0, 0, 0, .55); overflow: hidden; }
.reel { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; margin: 0; padding: 0; list-style: none; }
.reel li { aspect-ratio: 4 / 3; border-radius: 5px; background: rgba(255, 255, 255, .05); overflow: hidden; }
.reel img { display: block; width: 100%; height: 100%; object-fit: cover; animation: surface .35s ease-out; }

/* The beam travels across the strip, and only once the pictures have gone to be read. */
.scan-beam.across { inset: 0 auto 0 0; width: 34%; height: auto; display: none; background: linear-gradient(90deg, rgb(var(--gold-bright-rgb) / 0) 0%, rgb(var(--gold-bright-rgb) / .1) 55%, rgb(var(--gold-bright-rgb) / .42) 96%, #fff6d8 98.5%, rgb(var(--gold-bright-rgb) / 0) 100%); animation: sweep-across 2.6s cubic-bezier(.45, 0, .55, 1) infinite; }
.is-reading .scan-beam.across { display: block; }

.wave { display: block; width: 100%; height: 44px; margin-top: .8rem; color: var(--series); }

.sending { display: block; width: 100%; height: 6px; margin: .8rem 0 0; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .08); overflow: hidden; appearance: none; }
.sending::-webkit-progress-bar { background: rgba(255, 255, 255, .08); }
.sending::-webkit-progress-value { border-radius: 999px; background: var(--gold); }
.sending::-moz-progress-bar { border-radius: 999px; background: var(--gold); }

@keyframes sweep-across { from { translate: -100% 0; } to { translate: 300% 0; } }
@keyframes surface { from { opacity: 0; scale: 1.25; } }

/*
    Fresh from a label, the wine is shown as it was read, and what was read arrives one line after another,
    as if being written in. The form to change it is folded away under it, so that after a good read the
    button that saves is on the first screen.
*/
.just-read .facts li { animation: arrive .5s cubic-bezier(.2, .7, .2, 1) backwards; }
.just-read .facts li:nth-child(2) { animation-delay: .08s; }
.just-read .facts li:nth-child(3) { animation-delay: .16s; }
.just-read .facts li:nth-child(4) { animation-delay: .24s; }

.as-read .wine-head { margin-bottom: .9rem; }
.as-read .wine-head + .muted { margin: 0; font-size: .92rem; }
.as-read > .pair { margin-top: .6rem; }
.as-read .place h2 { margin-top: .6rem; }

/* The photo glides from where it was read to its place beside the wine's name. */
.wine-head .label-read { view-transition-name: label-photo; }

/* The fold sits tight under what it folds away. With nothing above it to read, it starts the form. */
.bottle-form > details.more { margin-top: 0; }
.wine-head + .muted + details.more { margin-top: .2rem; }

@keyframes breathe { 50% { opacity: .45; } }
@keyframes sweep { from { translate: 0 -100%; } to { translate: 0 255%; } }
@keyframes develop { to { filter: saturate(1) brightness(.92); } }
@keyframes glint { from { background-position: 100% 0; } 60%, to { background-position: 0 0; } }
@keyframes arrive { from { opacity: 0; translate: 0 8px; } }

/*
    Racks

    Every rack is drawn from the front. A bottle in a wooden rack points out at you, so it is a circle
    (.hole). A bottle in a fridge lies sideways behind the glass, so it is a bottle in profile (.profile).
    Either one is empty until it is also .filled, and then it takes the colour of its wine.

    Each drawing comes in two sizes: .full on the rack's own page, and .mini on the racks page, where
    everything is measured in --u, the width of one bottle end.
*/

.cellar-wall {
    --u: clamp(5px, 2vw, 10px);
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: center;
    gap: 1.6rem .9rem;
    margin: 0 calc(var(--gutter) * -1) 1.3rem;
    padding: 1.8rem .9rem 1.3rem;
    border-block: 1px solid var(--line);
    background:
        radial-gradient(90% 60% at 50% 0, rgba(255, 255, 255, .045), rgba(255, 255, 255, 0) 70%),
        linear-gradient(180deg, #171314, #120f0f);
}

/* Each rack takes only the width of its drawing, so a long name wraps under it instead of pushing its neighbours away. */
.standing { display: grid; justify-items: center; width: min-content; color: inherit; text-align: center; text-decoration: none; }
.standing-name { margin-top: .6rem; font-size: .86rem; font-weight: 500; line-height: 1.25; }
.standing-count { color: var(--faint); font-size: .72rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.standing:active .rack { scale: .97; }

/*
    The crate the bottles with no spot yet wait in (_Waiting), first among the racks: a wooden case from the front, the size of a small
    rack, with the newest of them standing in it in their own colours. Where there are no racks it is a card of its own.
*/
.crate { display: block; width: calc(var(--u, 8px) * 7); height: auto; overflow: visible; }
.crate-bottle { fill: var(--wine, var(--unsorted)); stroke: #f1e2cc; stroke-width: 1; stroke-linejoin: round; }
.crate-label { fill: #f1e2cc; opacity: .55; }
.crate-wood { fill: #7a5238; }
.crate-slat { fill: none; stroke: #5a3a26; stroke-width: 1.2; }
.crate-post { fill: none; stroke: #5a3a26; stroke-width: 3; }
.crate-hold { fill: #26170f; }
.standing.waiting { width: calc(var(--u, 8px) * 11); }
.standing.waiting .standing-name { text-wrap: balance; }
.standing:active .crate { scale: .97; }
.waiting-card { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: .9rem; }
.waiting-card .crate { width: 4.4rem; }
.waiting-words { display: grid; gap: .1rem; min-width: 0; }
.waiting-words strong { color: var(--text); font-size: 1.02rem; font-weight: 600; }
.waiting-words span { color: var(--muted); font-size: .9rem; line-height: 1.4; }

/*
    Putting bottles away, one at a time: which bottle this is, how far along the walk is, and the place it
    goes lit in a drawing of its rack. The bar fills as the bottles are put away.
*/
.walk-at { margin: .2rem 0 .35rem; color: var(--faint); font-size: .72rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.walk-at span { color: var(--faint); }
.walk-bar { height: 2px; margin: .1rem 0 1rem; border-radius: 2px; background: var(--line); }
/* How far along: a hairline that turns gold, with a bead where the walk has got to. */
.walk-bar i::after { content: ""; position: absolute; right: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.walk-was { display: flex; align-items: baseline; gap: .45rem; margin: .7rem 0 .9rem; color: var(--ok); font-size: .88rem; line-height: 1.35; }
.walk-bar + .walk-was { margin-top: -.4rem; }
.walk-was svg { flex: none; width: .85rem; height: .85rem; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; translate: 0 .08rem; }
.walk-bar i { position: relative; display: block; height: 100%; border-radius: 2px; background: var(--gold); transition: width .4s ease-out; }
.walk-bottle { margin: 0 0 .8rem; }
/* On a short screen the drawing is no taller than the room between the place named over it and the two buttons, so the place lit in it can be seen. */
.walk-form .pick-stage { max-height: clamp(10rem, calc(100svh - 34rem), 20rem); }
.walk-actions { position: sticky; bottom: calc(var(--tabbar-height) + env(safe-area-inset-bottom) + .6rem); z-index: 2; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 1rem; margin: .4rem calc(var(--gutter) * -1) 0; padding: 1.5rem var(--gutter) .8rem; background: linear-gradient(180deg, rgb(var(--bg-rgb) / 0), var(--bg) 1.1rem); }
/* Nothing of the drawing shows between the two buttons and the bar of tabs under them. */
.walk-actions::after { content: ""; position: absolute; inset: 100% 0 auto; height: calc(var(--tabbar-height) + env(safe-area-inset-bottom) + .6rem); background: var(--bg); }
.walk-actions .btn { margin: 0; }
.walk-later { min-height: 44px; color: var(--muted); }
.walk-done { display: grid; justify-items: center; gap: .2rem; margin: 1.4rem 0; padding: 1.6rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-align: center; }
.walk-done svg { width: 2.6rem; height: 2.6rem; fill: none; stroke: var(--ok); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.walk-done p { margin: 0; }
.walk-done strong { font: 400 1.4rem/1.25 var(--serif); }
.walk-done + .actions .btn { flex-basis: 100%; }

/*
    The cellar seen whole: the same wall on the cellar page, with what a search or a filter kept lit where it
    lies. Everything else stands back. The light comes up rack by rack along the wall, once, and then holds:
    there may be hundreds of bottles alight, so none of them pulses.
*/
#find { scroll-margin-top: 4.8rem; }
.cellar-wall.whole { margin-top: .3rem; }
.cellar-wall.is-lighting .filled:not(.lit), .cellar-wall.is-lighting .rack:has(.lit) .filled:not(.lit) { opacity: .15; filter: saturate(.3); }
.rack.steady .hole.lit { box-shadow: 0 0 0 1.5px var(--gold-bright), 0 0 9px 2px rgb(var(--gold-bright-rgb) / .7); animation: none; }
.rack.steady .profile.lit { filter: brightness(1.2); animation: none; }
.rack.steady.mini .hole.lit { box-shadow: 0 0 0 1px var(--gold-bright), 0 0 5px 1px rgb(var(--gold-bright-rgb) / .8); }
.cellar-wall.is-lighting .rack.steady .lit { animation: light-up .5s ease-out both; animation-delay: calc(var(--rack, 0) * 70ms); }
@keyframes light-up { from { opacity: .15; filter: saturate(.3); } }

/* Free places: the bottles stand back and every empty place is lit, to show where there is room. */
.cellar-wall.is-free .filled { opacity: .13; filter: saturate(.3); }
.cellar-wall.is-free i.hole:not(.filled) { background: radial-gradient(circle, var(--gold-bright) 0 44%, rgb(var(--gold-bright-rgb) / .22) 62%); box-shadow: 0 0 5px 1px rgb(var(--gold-bright-rgb) / .4); }
.cellar-wall.is-free i.profile:not(.filled) { background: rgb(var(--gold-bright-rgb) / .8); }
.standing-count.is-lit { color: var(--gold-bright); font-size: .78rem; font-weight: 650; }

@media (prefers-reduced-motion: reduce) {
    .cellar-wall.is-lighting .rack.steady .lit { animation: none; }
}

.rack-stage { margin: 0 calc(var(--gutter) * -1) 1.3rem; padding: .6rem var(--gutter) 1.3rem; overflow-x: auto; }
.rack-stage .rack { margin-inline: auto; }
.rack { position: relative; transition: scale .12s ease; }

/* A bottle end-on. Empty, it is the dark mouth of the slot. */
.hole {
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 58%, #040202 0 55%, rgba(0, 0, 0, .5) 58%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07);
    color: rgba(245, 237, 230, .4);
    font: normal 500 .6rem/1 var(--sans);
    text-decoration: none;
}

.hole.filled {
    background: var(--wine, var(--unsorted));
    box-shadow: 0 1px 3px rgba(0, 0, 0, .65), inset 0 0 0 1px rgba(0, 0, 0, .35);
    color: rgba(0, 0, 0, .78);
    font-weight: 700;
    font-size: .78rem;
}

/* A bottle in profile, neck to the right. Empty, it is a faint outline of where one would lie. */
.profile {
    display: block;
    aspect-ratio: 3.4;
    clip-path: polygon(3% 0, 56% 0, 63% 7%, 68% 18%, 72% 30%, 95% 30%, 95% 24%, 100% 24%, 100% 76%, 95% 76%, 95% 70%, 72% 70%, 68% 82%, 63% 93%, 56% 100%, 3% 100%, 0 88%, 0 12%);
    background: rgba(255, 255, 255, .075);
}

.profile.filled {
    --foil: rgba(0, 0, 0, .42);
    background:
        linear-gradient(#f7efe1, #e6d8bd) 22% 50% / 27% 64% no-repeat,
        linear-gradient(90deg, rgba(0, 0, 0, 0) 81%, var(--foil) 81%),
        linear-gradient(180deg, rgba(255, 255, 255, .45) 4%, rgba(255, 255, 255, 0) 40%, rgba(0, 0, 0, .5) 100%),
        var(--wine, var(--unsorted));
}

.profile.filled.colour-sparkling { --foil: var(--gold); }

/* Bottles are laid neck to neck, as they are on a real shelf. */
.profile:nth-child(even) { scale: -1 1; }

a.hole:active, a.profile:active { filter: brightness(1.35); }

@supports (color: color-mix(in srgb, red, blue)) {
    /*
        The base of the bottle, in the colour of what is in it: the hollow of its punt in the middle, a rim of dark glass round it,
        and the same light as the bottles out of the rack, a gleam on the upper left and a line of gold on the lower right (::after).
    */
    .hole.filled {
        position: relative;
        background:
            radial-gradient(closest-side, rgba(0, 0, 0, 0) 88%, rgba(0, 0, 0, .5) 93%),
            radial-gradient(closest-side, rgba(0, 0, 0, .3), rgba(0, 0, 0, .08) 34%, rgba(255, 255, 255, .16) 47%, rgba(255, 255, 255, 0) 50%),
            radial-gradient(ellipse 75% 75% at 40% 36%, color-mix(in srgb, var(--wine, var(--unsorted)) 65%, #fff), var(--wine, var(--unsorted)) 45%, color-mix(in srgb, var(--wine, var(--unsorted)) 45%, #000) 90%, color-mix(in srgb, var(--wine, var(--unsorted)) 30%, #000));
        color: #fff;
        text-shadow: 0 0 3px rgba(0, 0, 0, .9), 0 1px 1px rgba(0, 0, 0, .6);
    }

    .hole.filled::after {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: 50%;
        background: conic-gradient(rgba(0, 0, 0, 0) 0 118deg, rgb(var(--gold-rgb) / .9) 128deg 152deg, rgba(0, 0, 0, 0) 164deg 292deg, rgb(255 244 226 / .5) 304deg 336deg, rgba(0, 0, 0, 0) 348deg);
        -webkit-mask: radial-gradient(closest-side, rgba(0, 0, 0, 0) 79%, #000 83% 90%, rgba(0, 0, 0, 0) 94%);
        mask: radial-gradient(closest-side, rgba(0, 0, 0, 0) 79%, #000 83% 90%, rgba(0, 0, 0, 0) 94%);
        pointer-events: none;
    }

    .hole.filled.can::after, .hole.is-out::after { content: none; }
}

/* Opened from a wine, the rack dims and that wine's bottles stay lit. */
.rack:has(.lit) .filled:not(.lit) { opacity: .28; }
.hole.lit { box-shadow: 0 0 0 2px var(--gold-bright), 0 0 16px 5px rgb(var(--gold-bright-rgb) / .75); animation: glow 1.1s ease-in-out infinite alternate; }
.profile.lit { animation: gleam 1.1s ease-in-out infinite alternate; }

/*
    Bottles about to go in, on the page that checks them when there is nothing to check (BatchModel.AllRead): each is drawn where it will
    lie, in its own colour, ringed in gold and breathing, and the bottles already there stand back a little, so the new ones read at once.
*/
.rack:has(.arriving) .filled:not(.arriving) { opacity: .42; }
.hole.arriving { box-shadow: 0 0 0 1px var(--gold-bright), 0 0 5px 1px rgb(var(--gold-bright-rgb) / .8); animation: glow 1.4s ease-in-out infinite alternate; }
.profile.arriving { animation: gleam 1.4s ease-in-out infinite alternate; }

/*
    Bottles that have just gone in, on the page they come to: each lands in its place, one after another along the rows, as they would be
    put in by hand. A wooden rack's bottle is pushed into its hole, end on, from in front; a fridge's slides onto its shelf. Each keeps a
    ring of gold a moment once it is in. Until its turn a bottle is not there, and the others wait as they are. A big delivery lands in the
    time of thirty.
*/
@media (prefers-reduced-motion: no-preference) {
    .hole.landing { animation: land-in 1.5s cubic-bezier(.2, .8, .3, 1) backwards; animation-delay: calc(.5s + min(var(--land, 0), 30) * 100ms); }
    .profile.landing { animation: land-along 1.5s cubic-bezier(.2, .8, .3, 1) backwards; animation-delay: calc(.5s + min(var(--land, 0), 30) * 100ms); }
}

@media (prefers-reduced-motion: reduce) {
    .hole.landing, .profile.landing { animation: landed 1.6s ease-out; }
}

/* Each ends as the bottle is drawn anyway: the last frame is left to the bottle's own look, so nothing jumps when it is done. */
@keyframes land-in {
    0% { opacity: 0; scale: 1.9; }
    30% { opacity: 1; scale: 1; box-shadow: 0 0 0 2px var(--gold-bright), 0 0 10px 3px rgb(var(--gold-bright-rgb) / .7); }
}

@keyframes land-along {
    0% { opacity: 0; translate: 45% 0; filter: brightness(1.8); }
    30% { opacity: 1; translate: 0 0; filter: brightness(1.8); }
}

@keyframes landed {
    0% { filter: brightness(1.8); }
}

/*
    A can lies on its side behind a fridge's glass: a short metal body as long as a 12 oz can is beside its width, a rolled rim
    at each end, and its print, in the colour of the drink, all the way round between them. --can is its length in the place
    a bottle would take, which is longer in the small drawing. Seen end-on in a wooden rack, it is a can's silver end, ringed
    in the colour of the drink.
*/
.profile.filled.can {
    --can: 52%;
    clip-path: polygon(0 16%, 1.4% 8%, 3% 4%, calc(var(--can) - 3%) 4%, calc(var(--can) - 1.4%) 8%, var(--can) 16%, var(--can) 84%, calc(var(--can) - 1.4%) 92%, calc(var(--can) - 3%) 96%, 3% 96%, 1.4% 92%, 0 84%);
    background:
        linear-gradient(180deg, rgba(0, 0, 0, .4), rgba(255, 255, 255, .28) 26%, rgba(255, 255, 255, 0) 46%, rgba(0, 0, 0, .5)) 9% 50% / calc(var(--can) - 9%) 100% no-repeat,
        linear-gradient(var(--wine, var(--unsorted)), var(--wine, var(--unsorted))) 9% 50% / calc(var(--can) - 9%) 100% no-repeat,
        linear-gradient(180deg, #3a3d41, #a5abb1 18%, #eef1f3 32%, #a5abb1 56%, #6a6f74 80%, #3a3d41);
}
.rack-fridge.mini .profile.filled.can { --can: 40%; }
.hole.filled.can {
    background: radial-gradient(circle, #8d9298 0 30%, #c9cdd1 34% 46%, #7c8187 50%, #e3e6e9 56%, #9aa0a6 64%, #5f6469 70%, var(--wine, var(--unsorted)) 74%);
    color: rgba(0, 0, 0, .7);
}

@keyframes glow { to { box-shadow: 0 0 0 2px var(--gold), 0 0 5px 1px rgb(var(--gold-bright-rgb) / .35); } }
@keyframes gleam { to { filter: brightness(1.7); } }

.axis { display: grid; place-items: center; color: rgba(245, 237, 230, .55); font: normal 500 .68rem/1 var(--sans); }

/* Bottles in a rack but in no slot. Inside a fridge this is the bay at the bottom. */
.bay {
    display: grid;
    grid-template-columns: repeat(var(--per), minmax(0, 2.4rem));
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
    padding: 8px;
    border: 1px dashed rgba(255, 255, 255, .2);
    border-radius: 10px;
}

.mini .bay { grid-template-columns: repeat(var(--per), var(--u)); gap: 2px; margin-top: 3px; padding: 2px; border: 0; }

/* A rack with a slot for every bottle: timber, with a dark hole for each. */

.rack-slots { --track: minmax(1.75rem, 2.5rem); --break: .5rem; --axis: 1.3rem; }
.rack-slots.full { width: fit-content; }
.rack-slots.mini { --track: var(--u); --break: calc(var(--u) * .7); }

.slot-grid {
    display: grid;
    gap: 5px;
    padding: 8px 12px 13px 7px;
    border-radius: 12px;
    background:
        repeating-linear-gradient(0deg, rgba(0, 0, 0, .1) 0 1px, rgba(0, 0, 0, 0) 1px 7px),
        linear-gradient(90deg, var(--wood-dark), var(--wood) 12%, var(--wood-light) 50%, var(--wood) 88%, var(--wood-dark));
    box-shadow: 0 16px 34px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .14);
}

/* Row numbers stay in view while a wide rack scrolls sideways. */
.slot-grid .axis-row { position: sticky; left: 4px; z-index: 1; border-radius: 6px; background: var(--wood-dark); }

.rack-slots.mini .slot-grid { gap: 2px; padding: 4px; border-radius: 4px; box-shadow: 0 8px 16px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .14); }

/* Shelves and fridges: each row is a shelf holding several bottles. */

.shelf { display: flex; align-items: center; gap: 6px; }
.shelf-run { flex: 1; display: grid; grid-template-columns: repeat(var(--per), minmax(0, 1fr)); gap: 4px; padding: 5px 0 4px; }

.rack-shelves {
    padding: 8px 14px 0;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--wood) 0 9px, rgba(0, 0, 0, .34) 9px calc(100% - 9px), var(--wood) calc(100% - 9px));
    box-shadow: 0 16px 34px rgba(0, 0, 0, .5);
}

.rack-shelves .shelf { margin-bottom: 6px; border-bottom: 7px solid var(--wood-light); box-shadow: 0 3px 0 rgba(0, 0, 0, .4); }
.rack-shelves.full { width: min(100%, 24rem); }
.rack-shelves.mini { padding: 3px 6px 0; border-radius: 3px; background: linear-gradient(90deg, var(--wood) 0 3px, rgba(0, 0, 0, .34) 3px calc(100% - 3px), var(--wood) calc(100% - 3px)); box-shadow: 0 8px 16px rgba(0, 0, 0, .5); }
.rack-shelves.mini .shelf { margin-bottom: 2px; border-bottom-width: 2px; box-shadow: none; }
.rack-shelves.mini .shelf-run { grid-template-columns: repeat(var(--per), var(--u)); gap: 2px; padding: 2px 0 1px; }

.rack-fridge {
    padding: 0 16px 12px 12px;
    border: 3px solid var(--steel-dark);
    border-radius: 16px;
    background: linear-gradient(180deg, #121a20, #080c0f);
    box-shadow:
        inset 0 0 0 2px rgba(182, 190, 196, .55),
        inset 0 0 50px rgba(60, 130, 190, .14),
        0 18px 40px rgba(0, 0, 0, .55);
}

/* The glass door: a sheen across it and a handle down one side. */
.rack-fridge::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(112deg, rgba(255, 255, 255, .13) 0%, rgba(255, 255, 255, 0) 24%, rgba(255, 255, 255, 0) 66%, rgba(255, 255, 255, .06) 100%);
    pointer-events: none;
}

.rack-fridge::after {
    content: "";
    position: absolute;
    top: 24%;
    bottom: 24%;
    right: 4px;
    width: 5px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--steel-dark), var(--steel), var(--steel-dark));
    pointer-events: none;
}

.fridge-head { display: flex; justify-content: center; align-items: center; min-height: 2.1rem; }
.fridge-temp { color: #86ccff; font: 600 .82rem ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .08em; text-shadow: 0 0 10px rgba(70, 160, 255, .95); }
.rack-fridge.full { width: min(100%, 23rem); }
.rack-fridge .shelf { border-bottom: 2px solid rgba(182, 190, 196, .3); }
.rack-fridge .shelf-run { gap: 4px 6px; padding: 6px 0 5px; }
.rack-fridge .bay { grid-template-columns: repeat(var(--per), minmax(0, 1fr)); gap: 6px 10px; margin-top: 0; padding: 10px 7% 2px; border: 0; }

.rack-fridge.mini { padding: 0 calc(var(--u) * .85) calc(var(--u) * .5) calc(var(--u) * .6); border-width: 2px; border-radius: calc(var(--u) * .9); box-shadow: inset 0 0 0 1px rgba(182, 190, 196, .5), 0 10px 20px rgba(0, 0, 0, .55); }
.rack-fridge.mini::after { right: 1px; width: 2px; }
.rack-fridge.mini .fridge-head { min-height: calc(var(--u) * 1.7); }
.rack-fridge.mini .fridge-temp { font-size: calc(var(--u) * 1.05); letter-spacing: 0; text-shadow: 0 0 5px rgba(70, 160, 255, .95); }
.rack-fridge.mini .shelf { border-bottom-width: 1px; }
.rack-fridge.mini .shelf-run { grid-template-columns: repeat(var(--per), calc(var(--u) * 2)); gap: 1px 2px; padding: 1px 0; }
.rack-fridge.mini .profile { aspect-ratio: 4.4; }
.rack-fridge.mini .bay { grid-template-columns: repeat(var(--per), minmax(0, 1fr)); gap: 1px 3px; padding: 3px 6% 0; }

/* Diamond bins: a cube crossed corner to corner, with a pile of bottles in each quarter. */

.cubes { display: grid; grid-template-columns: repeat(var(--cubes), minmax(8.5rem, 12rem)); gap: 8px; }
.rack-bins.full { width: fit-content; max-width: none; }
.rack-bins.mini .cubes { grid-template-columns: repeat(var(--cubes), calc(var(--u) * 6.5)); gap: 3px; }

.cube {
    --slat: 3px;
    position: relative;
    aspect-ratio: 1;
    border: 7px solid var(--wood);
    border-radius: 6px;
    background:
        linear-gradient(45deg, rgba(0, 0, 0, 0) calc(50% - var(--slat)), var(--wood-light) calc(50% - var(--slat)) calc(50% + var(--slat)), rgba(0, 0, 0, 0) calc(50% + var(--slat))),
        linear-gradient(-45deg, rgba(0, 0, 0, 0) calc(50% - var(--slat)), var(--wood-light) calc(50% - var(--slat)) calc(50% + var(--slat)), rgba(0, 0, 0, 0) calc(50% + var(--slat))),
        #0d0806;
    box-shadow: 0 14px 30px rgba(0, 0, 0, .5), inset 0 0 18px rgba(0, 0, 0, .8);
}

.mini .cube { --slat: 1px; border-width: 3px; border-radius: 3px; box-shadow: 0 8px 16px rgba(0, 0, 0, .5); }
.cube .hole { position: absolute; translate: -50% -50%; pointer-events: none; }

.bin { position: absolute; inset: 0; }
.bin:active { background: rgb(var(--gold-rgb) / .22); }
.bin-top { clip-path: polygon(0 0, 100% 0, 50% 50%); }
.bin-right { clip-path: polygon(100% 0, 100% 100%, 50% 50%); }
.bin-bottom { clip-path: polygon(0 100%, 100% 100%, 50% 50%); }
.bin-left { clip-path: polygon(0 0, 0 100%, 50% 50%); }

.cube-name {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    place-items: center;
    width: 1.5rem;
    height: 1.5rem;
    translate: -50% -50%;
    border-radius: 50%;
    background: var(--wood-light);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .6);
    color: var(--on-gold);
    font: 700 .75rem/1 var(--sans);
    pointer-events: none;
}

.rack-contents { list-style: none; margin: 0; padding: 0; }
.rack-contents li { display: flex; gap: .8rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.rack-contents .slot-name { flex: 0 0 4.8rem; color: var(--faint); font-size: .88rem; }
.rack-contents .slot-wines { display: grid; gap: .3rem; }
.rack-contents a { color: var(--text); font-size: .95rem; text-decoration: none; }

/*
    Out of the rack

    On a rack's own page a tap on a bottle brings it out to be looked at, the way it would come out in the
    cellar. A shelf of a fridge comes out whole: its bottles stand up side by side on a tray over the page,
    and one of them is in hand. From a wooden rack or open shelves only the bottle comes out: it rises from
    where it lies and its neighbours stay put. Either way a card says what the bottle in hand is and leads
    to its page. pull.js does the moving. Every bottle here is a drawing, with the maker's initials and the
    year for a label.
*/
html.has-tray { overflow: hidden; }
.rack-stage-fridge.pulls .shelf, .rack-stage-bins.pulls .bin { cursor: pointer; }

/* While a bin's bottles are out on the tray, the bin they came from is marked. */
.rack-stage .bin.is-out { background: rgb(var(--gold-rgb) / .22); }

/* Bottles are tapped one after another, quickly. A second tap is a second bottle, and never a request to zoom. */
.rack-stage.pulls a { touch-action: manipulation; }

/* While a shelf is out its place in the drawing is bare: the shelf is on the tray. A bottle out of its slot leaves the slot dark. */
.rack-stage .shelf-run, .rack-stage .bay { transition: opacity .2s ease; }
.rack-stage .is-out > .shelf-run, .rack-stage .bay.is-out { opacity: 0; }
.rack-stage .hole.is-out { background: radial-gradient(circle at 50% 58%, #040202 0 55%, rgba(0, 0, 0, .5) 58%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07), 0 0 0 2px rgb(var(--gold-bright-rgb) / .55); color: rgba(0, 0, 0, 0); animation: none; }

/*
    Which bottle did you open? (taken.js): the bottle tapped comes out of its spot as the form goes. A copy of it lifts out over the page,
    stands up and rises, glowing, and the spot it lay in is lit as free: the dark mouth of a slot ringed in gold, or the outline of a
    bottle in a fridge filled with a little gold.
*/
.pick-stage .hole.is-out { background: radial-gradient(circle at 50% 58%, #040202 0 55%, rgba(0, 0, 0, .5) 58%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07), 0 0 0 2px var(--gold-bright), 0 0 12px 3px rgb(var(--gold-bright-rgb) / .6); color: rgba(0, 0, 0, 0); animation: freed .5s ease-out both; }
.pick-stage .profile.is-out { background: rgb(var(--gold-bright-rgb) / .7); opacity: 1; animation: freed .5s ease-out both; }
.pick-stage .bin.is-out { background: rgb(var(--gold-rgb) / .22); }
.taken-flier { position: fixed; z-index: 70; pointer-events: none; filter: drop-shadow(0 0 10px rgb(var(--gold-bright-rgb) / .7)) drop-shadow(0 8px 14px rgba(0, 0, 0, .55)); }
.taken-flier > i { display: block; width: 100%; height: 100%; margin: 0; opacity: 1; animation: none; }
@keyframes freed { from { opacity: .2; } }

/*
    A bottle standing up: the shape the fridge drawing lays on its side, with the shoulders rounded. Its size
    comes from --bottle, how tall it stands, which the tray and the rack each set. pull.js opens the round
    end of a bottle into this outline, point for point, so the outline keeps its count of points.

    In the rack a bottle is a colour, which says what kind of drink it is. Out of the rack it is a bottle,
    and is drawn as glass. A wine kept from the light is in dark glass, with its colour deep inside: --glass
    is what shows through the middle of the bottle and --glass-edge what shows at its sides, where the glass
    is looked along and not through. The wines sold in clear glass show their colour, and the air above the
    wine in the neck, --air. --foil is the capsule over the cork. All of it is made from --wine, so a bottle
    out of the rack is still plainly the colour it was in it.
*/
.upright { position: relative; display: block; filter: drop-shadow(1px 0 0 rgb(var(--gold-rgb) / .85)) drop-shadow(0 6px 7px rgba(0, 0, 0, .55)); }

.upright-glass {
    --glass: color-mix(in srgb, var(--wine, var(--unsorted)) 38%, #0d0709);
    --glass-edge: color-mix(in srgb, var(--wine, var(--unsorted)) 9%, #050304);
    --foil: color-mix(in srgb, var(--wine, var(--unsorted)) 52%, #170a0e);
    --air: rgba(0, 0, 0, 0);
    position: relative;
    display: block;
    width: calc(var(--wide) * var(--broad, 1));
    height: calc(var(--bottle) * var(--tall, 1));
    clip-path: polygon(29% 0, 71% 0, 71% 3%, 68% 3.6%, 68% 29%, 74.24% 29.23%, 80.25% 29.91%, 85.78% 31.02%, 90.63% 32.51%, 94.61% 34.33%, 97.56% 36.41%, 99.39% 38.66%, 100% 41%, 100% 96.5%, 99.1% 98.5%, 96.5% 99.6%, 92% 100%, 8% 100%, 3.5% 99.6%, .9% 98.5%, 0 96.5%, 0 41%, .61% 38.66%, 2.44% 36.41%, 5.39% 34.33%, 9.37% 32.51%, 14.22% 31.02%, 19.75% 29.91%, 25.76% 29.23%, 32% 29%, 32% 3.6%, 29% 3%);

    /*
        From the top layer down: the foot in the dark of its slot, for a bottle out of a wooden rack; the
        capsule, which is metal and lit from the left, with the line where it ends; the air in the neck; the
        neck, a narrow tube that is dark at its sides; the thick glass of the base; the shoulder, turning
        away from the light; and the body.
    */
    background:
        var(--foot, linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0))),
        linear-gradient(90deg, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0) 22%, rgba(255, 255, 255, .32) 34%, rgba(255, 255, 255, 0) 50%, rgba(0, 0, 0, .52)) 50% 0 / 42% 17% no-repeat,
        linear-gradient(180deg, var(--foil) 93%, color-mix(in srgb, var(--foil) 50%, #000) 93%) 50% 0 / 42% 17% no-repeat,
        linear-gradient(var(--air), var(--air)) 50% 17% / 36% 5% no-repeat,
        linear-gradient(90deg, var(--glass-edge), var(--glass) 38%, var(--glass) 62%, var(--glass-edge)) 50% 0 / 36% 31% no-repeat,
        linear-gradient(180deg, rgba(0, 0, 0, 0) 92.5%, rgba(0, 0, 0, .5) 96%, rgba(255, 255, 255, .12) 97.6%, rgba(0, 0, 0, .45)),
        linear-gradient(180deg, rgba(0, 0, 0, 0) 28.9%, rgba(0, 0, 0, .36) 29%, rgba(0, 0, 0, 0) 44%),
        linear-gradient(90deg, var(--glass-edge), var(--glass) 26%, var(--glass) 60%, var(--glass-edge));
    font-size: calc(var(--bottle) * var(--broad, 1) / 13);
}

.upright-glass.colour-fortified { --glass: color-mix(in srgb, var(--wine) 26%, #0a0605); }
.upright-glass.colour-sparkling { --glass: color-mix(in srgb, var(--wine) 16%, #1c2a16); --glass-edge: #070b06; --foil: var(--gold); }
.upright-glass.colour-white { --glass: color-mix(in srgb, var(--wine) 84%, #fff); --glass-edge: color-mix(in srgb, var(--wine) 52%, #2f3312); --foil: color-mix(in srgb, var(--wine) 40%, #6f7448); --air: rgba(255, 255, 255, .34); }
.upright-glass.colour-rose { --glass: color-mix(in srgb, var(--wine) 86%, #fff); --glass-edge: color-mix(in srgb, var(--wine) 60%, #5a2630); --foil: color-mix(in srgb, var(--wine) 34%, #d8cfc8); --air: rgba(255, 255, 255, .34); }
.upright-glass.colour-dessert { --glass: color-mix(in srgb, var(--wine) 88%, #ffe9a8); --glass-edge: color-mix(in srgb, var(--wine) 58%, #3d2508); --foil: var(--gold); --air: rgba(255, 255, 255, .3); }
.upright-glass.colour-orange { --glass: color-mix(in srgb, var(--wine) 88%, #ffd9a8); --glass-edge: color-mix(in srgb, var(--wine) 58%, #43200a); --foil: #2c2420; --air: rgba(255, 255, 255, .3); }

/*
    A bottle of wine as it is sold (BottleShape): drawn to scale from the bottle its wine comes in, in the glass it comes in, and lit
    as everything in Kept is lit, by one warm light from the upper left, with a gold rim on its right (.upright). The outlines are
    measured in millimetres and turned into polygons by handoff/tools/bottle-mock/outlines.mjs.

    The glass is darkest at its sides, where it is looked along, and the wine shows through it as much as that glass lets it: little
    through the dark glass of a red, all of it through the clear glass of a rosé. The wine stands to the neck in a full bottle and
    lower in one kept open (--left, from 0 to 1, of the body). --foil is the colour of the capsule, which BottleShape picks for the
    wine. Each style says where its capsule ends (--capsule), where its label sits, where its shoulder catches the light, how full a
    full bottle is (--full), and how much of its height is its body (--body).
*/
.upright-glass.shape-wine {
    --g-edge: #050704;
    --g-tint: #0b100a;
    --g-mid: #162113;
    --show: 22%;
    --shine: .55;
    --pour: color-mix(in srgb, var(--wine, var(--unsorted)) 46%, #14030a);
    --level: var(--full, 77%);
    --room: 150%;
    --paper: linear-gradient(180deg, #f4ecda, #e7dbbf);
    --ink: #2a1f1a;
    --ink-soft: #7a1f2c;
    background:
        var(--foot, linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0))),
        var(--bar, linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0))),
        linear-gradient(180deg, rgba(0, 0, 0, 0) 93.5%, rgba(0, 0, 0, .42) 93.5% 96%, rgba(255, 255, 255, .2) 96% 98%, rgba(0, 0, 0, 0) 98%) 0 0 / 100% var(--capsule) no-repeat,
        linear-gradient(90deg, color-mix(in srgb, var(--foil) 30%, #000), color-mix(in srgb, var(--foil) 62%, #000) 24%, color-mix(in srgb, var(--foil) 92%, #000) 31%, color-mix(in srgb, var(--foil) 48%, #fff) 37.5%, var(--foil) 45%, color-mix(in srgb, var(--foil) 70%, #000) 60%, color-mix(in srgb, var(--foil) 42%, #000) 69%, color-mix(in srgb, var(--foil) 25%, #000)) 0 0 / 100% var(--capsule) no-repeat,
        linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, 0) 50%, rgba(0, 0, 0, .35)),
        linear-gradient(90deg, rgb(196 162 100 / 0) 62%, rgb(196 162 100 / calc(.22 * var(--shine))) 84%, rgb(196 162 100 / calc(.05 * var(--shine))) 93%, rgb(196 162 100 / 0)),
        radial-gradient(ellipse 43% 1.8% at 50% 99%, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0)),
        linear-gradient(180deg, var(--meniscus, rgba(0, 0, 0, 0)) 0 .9%, rgba(0, 0, 0, 0) 2%) 50% 100% / 88% var(--level) no-repeat,
        linear-gradient(90deg,
            color-mix(in srgb, color-mix(in srgb, var(--pour) 45%, #000) var(--show), transparent),
            color-mix(in srgb, var(--pour) var(--show), transparent) 35%,
            color-mix(in srgb, color-mix(in srgb, var(--pour) 88%, #fff) var(--show), transparent) 60%,
            color-mix(in srgb, color-mix(in srgb, var(--pour) 40%, #000) var(--show), transparent)) 50% 100% / 88% var(--level) no-repeat,
        linear-gradient(90deg, var(--g-edge), var(--g-tint) 14%, var(--g-mid) 42%, var(--g-tint) 72%, var(--g-edge));
}

.upright-glass.shape-wine.is-open { --level: calc(var(--left, .5) * var(--body, 60%)); }

/* What each wine shows through its glass. A red is deep, a port is brown, and the others are the colour they are poured. */
.upright-glass.shape-wine.colour-white { --pour: color-mix(in srgb, var(--wine) 82%, #8a6a1a); --ink-soft: #6b5a2a; }
.upright-glass.shape-wine.colour-rose, .upright-glass.shape-wine.colour-sparkling, .upright-glass.shape-wine.colour-orange { --pour: var(--wine); }
.upright-glass.shape-wine.colour-dessert { --pour: color-mix(in srgb, var(--wine) 88%, #5a2a04); }
.upright-glass.shape-wine.colour-fortified { --pour: color-mix(in srgb, var(--wine) 70%, #2a0e04); }

/* The glass: dark for most reds, antique green, the deep green of Champagne, the brown of port, and clear. */
.upright-glass.glass-antique { --g-edge: #0b1008; --g-tint: #1b2613; --g-mid: #33451f; --show: 34%; --shine: .75; }
.upright-glass.glass-champagne { --g-edge: #060a05; --g-tint: #101b0d; --g-mid: #1f3217; --show: 12%; --shine: .6; }
.upright-glass.glass-brown { --g-edge: #0b0603; --g-tint: #190e06; --g-mid: #33200e; --show: 20%; --shine: .65; }
.upright-glass.glass-flint { --g-edge: rgb(214 226 222 / .42); --g-tint: rgb(236 242 240 / .07); --g-mid: rgb(255 255 255 / .03); --show: 92%; --shine: 1; --meniscus: color-mix(in srgb, var(--pour) 55%, #fff); }

/* Each bottle: its outline, and where on it things are, as shares of its height. */
.upright-glass.style-bordeaux { --capsule: 18.67%; --label-top: 52.67%; --label-tall: 30%; --label-bottom: 17.33%; --full: 76.7%; --body: 64.7%; --shoulder: 32%; --streak-y: 63.3%; --streak-h: 34.7%; --room: 165%; --room-tall: 187%; }
.upright-glass.style-burgundy { --capsule: 17.33%; --label-top: 57.33%; --label-tall: 28.67%; --label-bottom: 14%; --full: 81.3%; --body: 49.3%; --shoulder: 40%; --streak-y: 67.3%; --streak-h: 30.7%; --room: 124%; --room-tall: 179%; }
.upright-glass.style-champagne { --capsule: 38.41%; --label-top: 58.28%; --label-tall: 27.15%; --label-bottom: 14.57%; --full: 80%; --body: 51.7%; --shoulder: 39.7%; --streak-y: 67.2%; --streak-h: 30.8%; --room: 120%; --room-tall: 162%; }
.upright-glass.style-port {
    --capsule: 9.8%; --label-top: 53.59%; --label-tall: 28.76%; --label-bottom: 17.65%; --full: 77.8%; --body: 56.9%; --shoulder: 36.6%; --streak-y: 65.7%; --streak-h: 32.4%; --room: 148%; --room-tall: 181%;
    /* The bar top: a stopper wider than the neck, with the dark of the cork's shank under it and the light along its top. */
    --bar: linear-gradient(180deg, rgba(255, 255, 255, .18) 0 1%, rgba(0, 0, 0, 0) 1% 4.6%, rgba(11, 7, 5, .8) 4.6% 5.6%, rgba(0, 0, 0, 0) 5.6%);
}
.upright-glass.style-flute { --capsule: 18.2%; --label-top: 67.3%; --label-tall: 23.6%; --label-bottom: 9.1%; --full: 76.4%; --body: 34.8%; --shoulder: 62.1%; --streak-y: 78.6%; --streak-h: 19.5%; --room: 109%; --room-tall: 183%; }
.upright-glass.style-bordeaux { clip-path: polygon(69.21% 0%, 69.48% 0.21%, 69.79% 0.42%, 70.03% 0.63%, 70.13% 0.83%, 70.13% 2%, 69.97% 2.17%, 69.59% 2.33%, 69.19% 2.5%, 68.95% 2.67%, 68.8% 3%, 68.72% 3.33%, 68.69% 3.67%, 68.68% 4%, 68.7% 8.17%, 68.78% 12.33%, 69.02% 16.5%, 69.47% 20.67%, 69.59% 21.33%, 69.8% 22%, 70.18% 22.67%, 70.79% 23.33%, 71.43% 23.83%, 72.22% 24.33%, 73.18% 24.83%, 74.34% 25.33%, 75.74% 25.83%, 77.36% 26.33%, 79.11% 26.83%, 80.92% 27.33%, 82.83% 27.83%, 84.87% 28.33%, 86.9% 28.83%, 88.82% 29.33%, 90.62% 29.83%, 92.38% 30.33%, 93.99% 30.83%, 95.39% 31.33%, 96.55% 31.83%, 97.52% 32.33%, 98.31% 32.83%, 98.95% 33.33%, 99.44% 33.83%, 99.76% 34.33%, 99.94% 34.83%, 100% 35.33%, 100% 97.33%, 99.95% 97.75%, 99.77% 98.17%, 99.37% 98.58%, 98.68% 99%, 98.04% 99.25%, 97.2% 99.5%, 96.28% 99.75%, 95.39% 100%, 4.61% 100%, 3.72% 99.75%, 2.8% 99.5%, 1.96% 99.25%, 1.32% 99%, 0.63% 98.58%, 0.23% 98.17%, 0.05% 97.75%, 0% 97.33%, 0% 35.33%, 0.06% 34.83%, 0.24% 34.33%, 0.56% 33.83%, 1.05% 33.33%, 1.69% 32.83%, 2.48% 32.33%, 3.45% 31.83%, 4.61% 31.33%, 6.01% 30.83%, 7.62% 30.33%, 9.38% 29.83%, 11.18% 29.33%, 13.1% 28.83%, 15.13% 28.33%, 17.17% 27.83%, 19.08% 27.33%, 20.89% 26.83%, 22.64% 26.33%, 24.26% 25.83%, 25.66% 25.33%, 26.82% 24.83%, 27.78% 24.33%, 28.57% 23.83%, 29.21% 23.33%, 29.82% 22.67%, 30.2% 22%, 30.41% 21.33%, 30.53% 20.67%, 30.98% 16.5%, 31.22% 12.33%, 31.3% 8.17%, 31.32% 4%, 31.31% 3.67%, 31.28% 3.33%, 31.2% 3%, 31.05% 2.67%, 30.81% 2.5%, 30.41% 2.33%, 30.03% 2.17%, 29.87% 2%, 29.87% 0.83%, 29.97% 0.63%, 30.21% 0.42%, 30.52% 0.21%, 30.79% 0%); }
.upright-glass.style-burgundy { clip-path: polygon(68.16% 0%, 68.42% 0.21%, 68.7% 0.42%, 68.93% 0.63%, 69.03% 0.83%, 69.03% 2%, 68.87% 2.17%, 68.52% 2.33%, 68.14% 2.5%, 67.91% 2.67%, 67.77% 3%, 67.69% 3.33%, 67.67% 3.67%, 67.66% 4%, 67.67% 7%, 67.75% 10%, 67.98% 13%, 68.41% 16%, 68.67% 17%, 69.06% 18%, 69.56% 19%, 70.15% 20%, 71.01% 21.25%, 71.99% 22.5%, 73.09% 23.75%, 74.25% 25%, 75.68% 26.42%, 77.21% 27.83%, 78.82% 29.25%, 80.47% 30.67%, 82.29% 32.17%, 84.18% 33.67%, 86.08% 35.17%, 87.94% 36.67%, 89.55% 38%, 91.15% 39.33%, 92.7% 40.67%, 94.15% 42%, 95.38% 43.17%, 96.56% 44.33%, 97.63% 45.5%, 98.51% 46.67%, 99.11% 47.67%, 99.58% 48.67%, 99.89% 49.67%, 100% 50.67%, 100% 97.33%, 99.95% 97.75%, 99.74% 98.17%, 99.28% 98.58%, 98.51% 99%, 97.77% 99.25%, 96.82% 99.5%, 95.78% 99.75%, 94.78% 100%, 5.22% 100%, 4.22% 99.75%, 3.18% 99.5%, 2.23% 99.25%, 1.49% 99%, 0.72% 98.58%, 0.26% 98.17%, 0.05% 97.75%, 0% 97.33%, 0% 50.67%, 0.11% 49.67%, 0.42% 48.67%, 0.89% 47.67%, 1.49% 46.67%, 2.37% 45.5%, 3.44% 44.33%, 4.62% 43.17%, 5.85% 42%, 7.3% 40.67%, 8.85% 39.33%, 10.45% 38%, 12.06% 36.67%, 13.92% 35.17%, 15.82% 33.67%, 17.71% 32.17%, 19.53% 30.67%, 21.18% 29.25%, 22.79% 27.83%, 24.32% 26.42%, 25.75% 25%, 26.91% 23.75%, 28.01% 22.5%, 28.99% 21.25%, 29.85% 20%, 30.44% 19%, 30.94% 18%, 31.33% 17%, 31.59% 16%, 32.02% 13%, 32.25% 10%, 32.33% 7%, 32.34% 4%, 32.33% 3.67%, 32.31% 3.33%, 32.23% 3%, 32.09% 2.67%, 31.86% 2.5%, 31.48% 2.33%, 31.13% 2.17%, 30.97% 2%, 30.97% 0.83%, 31.07% 0.63%, 31.3% 0.42%, 31.58% 0.21%, 31.84% 0%); }
.upright-glass.style-champagne { clip-path: polygon(66.74% 0%, 67.01% 0.17%, 67.31% 0.33%, 67.55% 0.5%, 67.65% 0.66%, 67.65% 1.66%, 67.51% 1.82%, 67.19% 1.99%, 66.88% 2.15%, 66.74% 2.32%, 67.06% 2.48%, 67.76% 2.65%, 68.46% 2.81%, 68.78% 2.98%, 68.78% 4.3%, 68.53% 4.47%, 67.99% 4.64%, 67.44% 4.8%, 67.19% 4.97%, 67.2% 7.86%, 67.25% 10.76%, 67.39% 13.66%, 67.65% 16.56%, 67.9% 17.72%, 68.35% 18.87%, 68.96% 20.03%, 69.68% 21.19%, 70.64% 22.52%, 71.74% 23.84%, 72.97% 25.17%, 74.32% 26.49%, 75.98% 27.98%, 77.79% 29.47%, 79.71% 30.96%, 81.67% 32.45%, 83.74% 33.94%, 85.9% 35.43%, 88.07% 36.92%, 90.16% 38.41%, 91.99% 39.74%, 93.81% 41.06%, 95.5% 42.38%, 96.95% 43.71%, 98.06% 44.87%, 99.03% 46.03%, 99.73% 47.19%, 100% 48.34%, 100% 97.35%, 99.9% 97.76%, 99.57% 98.18%, 98.98% 98.59%, 98.08% 99.01%, 97.28% 99.25%, 96.27% 99.5%, 95.17% 99.75%, 94.12% 100%, 5.88% 100%, 4.83% 99.75%, 3.73% 99.5%, 2.72% 99.25%, 1.92% 99.01%, 1.02% 98.59%, 0.43% 98.18%, 0.1% 97.76%, 0% 97.35%, 0% 48.34%, 0.27% 47.19%, 0.97% 46.03%, 1.94% 44.87%, 3.05% 43.71%, 4.5% 42.38%, 6.19% 41.06%, 8.01% 39.74%, 9.84% 38.41%, 11.93% 36.92%, 14.1% 35.43%, 16.26% 33.94%, 18.33% 32.45%, 20.29% 30.96%, 22.21% 29.47%, 24.02% 27.98%, 25.68% 26.49%, 27.03% 25.17%, 28.26% 23.84%, 29.36% 22.52%, 30.32% 21.19%, 31.04% 20.03%, 31.65% 18.87%, 32.1% 17.72%, 32.35% 16.56%, 32.61% 13.66%, 32.75% 10.76%, 32.8% 7.86%, 32.81% 4.97%, 32.56% 4.8%, 32.01% 4.64%, 31.47% 4.47%, 31.22% 4.3%, 31.22% 2.98%, 31.54% 2.81%, 32.24% 2.65%, 32.94% 2.48%, 33.26% 2.32%, 33.12% 2.15%, 32.81% 1.99%, 32.49% 1.82%, 32.35% 1.66%, 32.35% 0.66%, 32.45% 0.5%, 32.69% 0.33%, 32.99% 0.17%, 33.26% 0%); }
.upright-glass.style-port { clip-path: polygon(69.69% 0%, 70.57% 0.08%, 71.55% 0.16%, 72.34% 0.25%, 72.67% 0.33%, 72.67% 4.58%, 72.2% 4.66%, 71.18% 4.74%, 70.15% 4.82%, 69.69% 4.9%, 69.77% 5.23%, 69.95% 5.56%, 70.13% 5.88%, 70.21% 6.21%, 70.13% 6.62%, 69.95% 7.03%, 69.77% 7.43%, 69.69% 7.84%, 69.69% 9.48%, 69.72% 11.11%, 69.8% 12.75%, 69.95% 14.38%, 70.31% 15.03%, 71.07% 15.69%, 71.95% 16.34%, 72.67% 16.99%, 73.24% 17.65%, 73.79% 18.3%, 74.19% 18.95%, 74.35% 19.61%, 74.35% 20.26%, 74.32% 20.92%, 74.24% 21.57%, 74.09% 22.22%, 73.57% 22.71%, 72.6% 23.2%, 71.66% 23.69%, 71.24% 24.18%, 71.25% 25%, 71.28% 25.82%, 71.35% 26.63%, 71.5% 27.45%, 72.09% 28.27%, 73.28% 29.08%, 74.85% 29.9%, 76.55% 30.72%, 78.44% 31.54%, 80.59% 32.35%, 82.84% 33.17%, 84.97% 33.99%, 87.02% 34.8%, 89.06% 35.62%, 91% 36.44%, 92.75% 37.25%, 94.28% 38.07%, 95.66% 38.89%, 96.88% 39.71%, 97.93% 40.52%, 98.69% 41.18%, 99.35% 41.83%, 99.82% 42.48%, 100% 43.14%, 100% 97.39%, 99.97% 97.79%, 99.78% 98.2%, 99.31% 98.61%, 98.45% 99.02%, 97.59% 99.26%, 96.46% 99.51%, 95.22% 99.75%, 94.04% 100%, 5.96% 100%, 4.78% 99.75%, 3.54% 99.51%, 2.41% 99.26%, 1.55% 99.02%, 0.69% 98.61%, 0.22% 98.2%, 0.03% 97.79%, 0% 97.39%, 0% 43.14%, 0.18% 42.48%, 0.65% 41.83%, 1.31% 41.18%, 2.07% 40.52%, 3.13% 39.71%, 4.34% 38.89%, 5.72% 38.07%, 7.25% 37.25%, 9% 36.44%, 10.94% 35.62%, 12.98% 34.8%, 15.03% 33.99%, 17.16% 33.17%, 19.41% 32.35%, 21.56% 31.54%, 23.45% 30.72%, 25.15% 29.9%, 26.72% 29.08%, 27.91% 28.27%, 28.5% 27.45%, 28.65% 26.63%, 28.72% 25.82%, 28.75% 25%, 28.76% 24.18%, 28.34% 23.69%, 27.4% 23.2%, 26.43% 22.71%, 25.91% 22.22%, 25.76% 21.57%, 25.68% 20.92%, 25.65% 20.26%, 25.65% 19.61%, 25.81% 18.95%, 26.21% 18.3%, 26.76% 17.65%, 27.33% 16.99%, 28.05% 16.34%, 28.93% 15.69%, 29.69% 15.03%, 30.05% 14.38%, 30.2% 12.75%, 30.28% 11.11%, 30.31% 9.48%, 30.31% 7.84%, 30.23% 7.43%, 30.05% 7.03%, 29.87% 6.62%, 29.79% 6.21%, 29.87% 5.88%, 30.05% 5.56%, 30.23% 5.23%, 30.31% 4.9%, 29.85% 4.82%, 28.82% 4.74%, 27.8% 4.66%, 27.33% 4.58%, 27.33% 0.33%, 27.66% 0.25%, 28.45% 0.16%, 29.43% 0.08%, 30.31% 0%); }
.upright-glass.style-flute { clip-path: polygon(69.97% 0%, 70.26% 0.19%, 70.58% 0.38%, 70.83% 0.57%, 70.94% 0.76%, 70.94% 1.82%, 70.77% 1.97%, 70.39% 2.12%, 69.98% 2.27%, 69.7% 2.42%, 69.46% 2.73%, 69.34% 3.03%, 69.29% 3.33%, 69.28% 3.64%, 69.29% 8.03%, 69.37% 12.42%, 69.57% 16.82%, 69.97% 21.21%, 70.42% 23.48%, 71.18% 25.76%, 72.2% 28.03%, 73.42% 30.3%, 74.85% 32.58%, 76.52% 34.85%, 78.36% 37.12%, 80.3% 39.39%, 82.41% 41.67%, 84.69% 43.94%, 87.02% 46.21%, 89.26% 48.48%, 91.08% 50.38%, 92.9% 52.27%, 94.62% 54.17%, 96.14% 56.06%, 97.21% 57.58%, 98.16% 59.09%, 98.96% 60.61%, 99.59% 62.12%, 99.8% 62.88%, 99.93% 63.64%, 99.99% 64.39%, 100% 65.15%, 100% 98.48%, 99.65% 98.86%, 98.81% 99.24%, 97.77% 99.62%, 96.83% 100%, 3.17% 100%, 2.23% 99.62%, 1.19% 99.24%, 0.35% 98.86%, 0% 98.48%, 0% 65.15%, 0.01% 64.39%, 0.07% 63.64%, 0.2% 62.88%, 0.41% 62.12%, 1.04% 60.61%, 1.84% 59.09%, 2.79% 57.58%, 3.86% 56.06%, 5.38% 54.17%, 7.1% 52.27%, 8.92% 50.38%, 10.74% 48.48%, 12.98% 46.21%, 15.31% 43.94%, 17.59% 41.67%, 19.7% 39.39%, 21.64% 37.12%, 23.48% 34.85%, 25.15% 32.58%, 26.58% 30.3%, 27.8% 28.03%, 28.82% 25.76%, 29.58% 23.48%, 30.03% 21.21%, 30.43% 16.82%, 30.63% 12.42%, 30.71% 8.03%, 30.72% 3.64%, 30.71% 3.33%, 30.66% 3.03%, 30.54% 2.73%, 30.3% 2.42%, 30.02% 2.27%, 29.61% 2.12%, 29.23% 1.97%, 29.06% 1.82%, 29.06% 0.76%, 29.17% 0.57%, 29.42% 0.38%, 29.74% 0.19%, 30.03% 0%); }

/* The light on the glass: a long streak down the side nearest the light, a thinner one beside it, a faint one down the far side, and a glow on the shoulder. */
.upright-glass.shape-wine::before {
    background:
        radial-gradient(ellipse 2.6% calc(var(--streak-h) * .55) at 20% calc(var(--streak-y) - var(--streak-h) * .35), rgb(255 244 226 / calc(.62 * var(--shine))) 30%, rgb(255 244 226 / 0)),
        radial-gradient(ellipse 2.4% var(--streak-h) at 20.3% var(--streak-y), rgb(255 244 226 / calc(.36 * var(--shine))) 40%, rgb(255 244 226 / 0)),
        radial-gradient(ellipse .9% calc(var(--streak-h) * .82) at 27% var(--streak-y), rgb(255 244 226 / calc(.3 * var(--shine))) 40%, rgb(255 244 226 / 0)),
        radial-gradient(ellipse 1.5% calc(var(--streak-h) * .9) at 92.5% var(--streak-y), rgb(255 255 255 / calc(.12 * var(--shine))) 50%, rgb(255 255 255 / 0)),
        radial-gradient(ellipse 17% 1.3% at 28% var(--shoulder), rgb(255 244 226 / calc(.3 * var(--shine))), rgb(255 244 226 / 0));
}

/* The bottle is round: its sides fall away into shade, and the label with them. */
.upright-glass.shape-wine::after { background: linear-gradient(90deg, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0) 16%, rgb(255 248 236 / .14) 27%, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0) 72%, rgba(0, 0, 0, .55)); }

/*
    The label: paper, a little curved where it goes round the bottle, with the maker's name in capitals as big as fits (--fit) and
    the year under a rule. Its paper is cream, white or black with gold, the same for every bottle of a maker (DrawnLabel).
*/
.upright-glass.shape-wine .upright-label {
    left: 3.5%;
    top: var(--label-top);
    width: 93%;
    height: var(--label-tall);
    gap: .32em;
    padding: 4% 4% 2%;
    box-sizing: border-box;
    border-radius: 0;
    background: var(--paper);
    color: var(--ink);
    clip-path: polygon(0 0, 12.5% 1.53%, 25% 2.63%, 37.5% 3.28%, 50% 3.5%, 62.5% 3.28%, 75% 2.63%, 87.5% 1.53%, 100% 0, 100% 96.5%, 87.5% 98.03%, 75% 99.13%, 62.5% 99.78%, 50% 100%, 37.5% 99.78%, 25% 99.13%, 12.5% 98.03%, 0 96.5%);
}
.upright-glass.shape-wine .upright-label b { font: 400 calc(var(--fit, 1) * .92em)/1.08 var(--serif); letter-spacing: .07em; text-align: center; text-transform: uppercase; }
.upright-glass.shape-wine .upright-label i { display: grid; justify-items: center; gap: .5em; font: 600 .42em/1 var(--sans); font-style: normal; letter-spacing: .16em; color: var(--ink-soft); }
.upright-glass.shape-wine .upright-label i::before { content: ""; width: 2.6em; height: 1px; background: currentColor; opacity: .55; }
.upright-glass.shape-wine.paper-white { --paper: linear-gradient(180deg, #f8f5ef, #e9e4d9); --ink: #1f1b1a; }
.upright-glass.shape-wine.paper-black { --paper: linear-gradient(180deg, #1b161d, #0f0c11); --ink: #d9be80; --ink-soft: #c9a75e; }

/*
    Its own label sits where a label is stuck on that bottle, curved the same way, as wide as it is on the real bottle and as tall as its
    own shape makes it, within the bottle's body (--room). A tall label, a portrait over the name, would be a thin strip there, so it may
    rise into the shoulder instead, whole and never stretched: as far as the glass is still at least 72% as wide as the bottle (--room-tall,
    measured from each outline), and never more than 58% of the bottle's width, so that its top corners sit inside the glass.
*/
.upright-glass.shape-wine .upright-label.own {
    left: 50%;
    top: auto;
    bottom: var(--label-bottom);
    width: max(
        min(var(--across, 92%), calc(var(--room) * var(--shape, 1))),
        min(var(--across, 92%), 58%, calc(var(--room-tall, var(--room)) * var(--shape, 1))));
    height: auto;
    padding: 0;
    background: #1b1a1c;
}

/*
    Elsewhere than a rack's tray, a bottle stands at a size of its own: beside a wine on a Tonight card, and at the head of its
    wine's page, where it is what was the picture of its label, and grows from the bottle tapped on a rack's tray or in a list (turns.js).
*/
.pour-standing { grid-template-columns: auto minmax(0, 1fr); }
.pour-standing .upright { --bottle: 11rem; --wide: calc(var(--bottle) / 3.4); }
.wine-standing { display: grid; place-items: end center; width: 112px; min-height: 150px; color: inherit; }
.wine-standing .upright { --bottle: 168px; --wide: calc(var(--bottle) / 3.4); }

/*
    What is not a bottle of wine is not drawn as one (BottleShape). Each keeps the light, the shade and the label of the
    bottle above, and changes its outline, what it is made of and where its label sits. --room is how tall its label may be,
    as a share of its width, so that a label cut from a picture is never taller than the body it is stuck on.

    A can: brushed metal, a lid narrower than the body, and a rolled foot. What is printed on it goes all the way round.
*/
.upright-glass.shape-can {
    --room: 160%;
    clip-path: polygon(13% 0, 87% 0, 89% 1.6%, 89% 3.6%, 100% 9%, 100% 92%, 95% 97.6%, 86% 100%, 14% 100%, 5% 97.6%, 0 92%, 0 9%, 11% 3.6%, 11% 1.6%);
    background:
        var(--foot, linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0))),
        linear-gradient(180deg, #6d7176 0, #d4d8dc 1.8%, #8a8e93 3.6%, rgba(0, 0, 0, 0) 9.5%, rgba(0, 0, 0, 0) 91%, rgba(0, 0, 0, .4) 95%, rgba(255, 255, 255, .18) 97%, rgba(0, 0, 0, .5)),
        linear-gradient(90deg, #4c5055, #b8bdc2 16%, #eef1f3 29%, #a5abb1 52%, #6a6f74 80%, #3a3d41);
}
.upright-glass.shape-can::before { background: radial-gradient(ellipse 5% 34% at 27% 52%, rgba(255, 255, 255, .5) 55%, rgba(255, 255, 255, 0)); }
.upright-glass.shape-can .upright-label { top: 12%; left: 0; width: 100%; height: 76%; border-radius: 0; background: linear-gradient(90deg, color-mix(in srgb, var(--wine, var(--unsorted)) 70%, #000), var(--wine, var(--unsorted)) 30%, color-mix(in srgb, var(--wine, var(--unsorted)) 80%, #fff) 45%, var(--wine, var(--unsorted)) 62%, color-mix(in srgb, var(--wine, var(--unsorted)) 60%, #000)); color: #fff; }
.upright-glass.shape-can .upright-label i { color: rgba(255, 255, 255, .85); }
/* The label Kept found in the owner's photo of a can is what is printed on it, so it covers the whole body, curved by the light, and never a strip of it. */
.upright-glass.shape-can .upright-label.own { top: 10%; bottom: 8.4%; left: 0; width: 100%; height: auto; aspect-ratio: auto; translate: none; border-radius: 0; background: #1b1a1c; }
.upright-glass.shape-can .upright-label.own img { object-fit: cover; }
.upright-glass.shape-can .upright-label.own::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0) 20%, rgba(255, 255, 255, .22) 30%, rgba(255, 255, 255, 0) 42%, rgba(0, 0, 0, 0) 66%, rgba(0, 0, 0, .6)); pointer-events: none; }

/* A beer bottle: brown glass, a long neck that swells to round shoulders, and a crown cap. */
.upright-glass.shape-beer {
    --room: 118%;
    --glass: #5a3412;
    --glass-edge: #1d0f05;
    clip-path: polygon(35% 0, 65% 0, 66% 4.5%, 63.5% 6%, 63.5% 18%, 66% 26%, 76% 33%, 90% 38.5%, 98% 43%, 100% 47%, 100% 97%, 98% 99.4%, 94% 100%, 6% 100%, 2% 99.4%, 0 97%, 0 47%, 2% 43%, 10% 38.5%, 24% 33%, 34% 26%, 36.5% 18%, 36.5% 6%, 34% 4.5%);
    background:
        var(--foot, linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0))),
        linear-gradient(90deg, #6b6f74, #e0e3e6 40%, #7d8186) 50% 0 / 32% 5.5% no-repeat,
        linear-gradient(180deg, rgba(0, 0, 0, 0) 94%, rgba(0, 0, 0, .5) 97%, rgba(255, 255, 255, .1) 98.5%, rgba(0, 0, 0, .45)),
        linear-gradient(90deg, var(--glass-edge), var(--glass) 30%, color-mix(in srgb, var(--glass) 70%, #c98a3c) 42%, var(--glass) 58%, var(--glass-edge));
}
.upright-glass.shape-beer::before { background: radial-gradient(ellipse 6% 26% at 18% 70%, rgba(255, 255, 255, .34) 55%, rgba(255, 255, 255, 0)), radial-gradient(ellipse 4% 10% at 42% 22%, rgba(255, 255, 255, .34), rgba(255, 255, 255, 0)); }
.upright-glass.shape-beer .upright-label { top: 56%; height: 28%; }
.upright-glass.shape-beer .upright-label.own { bottom: 11%; width: min(var(--across, 92%), calc(var(--room) * var(--shape, 1))); }

/*
    A spirit: clear, heavy glass with square shoulders, a short neck and a stopper, and the spirit showing through it, brown
    or clear, up to where the neck begins.
*/
.upright-glass.shape-spirit {
    --room: 150%;
    --drink: rgba(214, 222, 228, .22);
    clip-path: polygon(31% 0, 69% 0, 69% 9%, 62% 10%, 62% 16.5%, 74% 18%, 93% 19.6%, 100% 23%, 100% 98%, 98% 100%, 2% 100%, 0 98%, 0 23%, 7% 19.6%, 26% 18%, 38% 16.5%, 38% 10%, 31% 9%);
    background:
        var(--foot, linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0))),
        linear-gradient(90deg, #22160e, #6e4c33 38%, #9a7253 50%, #3a2717) 50% 0 / 38% 9.6% no-repeat,
        linear-gradient(180deg, rgba(0, 0, 0, 0) 95%, rgba(255, 255, 255, .22) 96.5%, rgba(0, 0, 0, .4)),
        linear-gradient(90deg, rgba(255, 255, 255, .26), rgba(255, 255, 255, .04) 14%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, .06) 86%, rgba(255, 255, 255, .3)),
        linear-gradient(180deg, rgba(220, 226, 230, .2) 0 22%, var(--drink) 22%);
}
.upright-glass.shape-spirit.drink-dark { background:
        var(--foot, linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0))),
        linear-gradient(90deg, #22160e, #6e4c33 38%, #9a7253 50%, #3a2717) 50% 0 / 38% 9.6% no-repeat,
        linear-gradient(180deg, rgba(0, 0, 0, 0) 95%, rgba(255, 255, 255, .22) 96.5%, rgba(0, 0, 0, .4)),
        linear-gradient(90deg, rgba(255, 255, 255, .26), rgba(255, 255, 255, .04) 14%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, .06) 86%, rgba(255, 255, 255, .3)),
        linear-gradient(180deg, rgba(220, 226, 230, .2) 0 22%, rgba(0, 0, 0, 0) 22%),
        linear-gradient(90deg, #5b2e0e, #b0641f 30%, #d98a3a 46%, #a35a1b 70%, #4a250b) 0 100% / 100% 78% no-repeat;
}
.upright-glass.shape-spirit::before { background: radial-gradient(ellipse 4% 30% at 12% 60%, rgba(255, 255, 255, .55) 55%, rgba(255, 255, 255, 0)), radial-gradient(ellipse 12% 1.6% at 30% 21%, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0)); }
.upright-glass.shape-spirit .upright-label { top: 40%; height: 40%; left: 10%; width: 80%; }
.upright-glass.shape-spirit .upright-label.own { bottom: 12%; width: min(var(--across, 86%), calc(var(--room) * var(--shape, 1))); }

/* A mixer: a small bottle of clear glass, a pale drink in it, a short neck and a cap in its own colour. */
.upright-glass.shape-mixer {
    --room: 110%;
    clip-path: polygon(36% 0, 64% 0, 64% 8%, 62% 9%, 62% 16%, 74% 26%, 92% 34%, 100% 42%, 100% 97%, 97% 100%, 3% 100%, 0 97%, 0 42%, 8% 34%, 26% 26%, 38% 16%, 38% 9%, 36% 8%);
    background:
        var(--foot, linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0))),
        linear-gradient(90deg, color-mix(in srgb, var(--wine, var(--unsorted)) 50%, #000), var(--wine, var(--unsorted)) 45%, color-mix(in srgb, var(--wine, var(--unsorted)) 50%, #000)) 50% 0 / 30% 8.5% no-repeat,
        linear-gradient(90deg, rgba(255, 255, 255, .24), rgba(255, 255, 255, .03) 16%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, .05) 84%, rgba(255, 255, 255, .28)),
        linear-gradient(180deg, rgba(220, 230, 228, .16) 0 30%, rgba(214, 236, 226, .34) 30%);
}
.upright-glass.shape-mixer::before { background: radial-gradient(ellipse 5% 26% at 16% 68%, rgba(255, 255, 255, .5) 55%, rgba(255, 255, 255, 0)); }
.upright-glass.shape-mixer .upright-label { top: 52%; height: 30%; }
.upright-glass.shape-mixer .upright-label.own { bottom: 11%; width: min(var(--across, 92%), calc(var(--room) * var(--shape, 1))); }

/*
    What only glass does: a long light down the side nearest the window, a thin one down the far side, and
    a glint on the shoulder and on the neck. They lie under the label, which is paper and does not shine.
*/
.upright-glass::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 6.5% 28% at 15% 67%, rgba(255, 255, 255, .46) 60%, rgba(255, 255, 255, 0)),
        radial-gradient(ellipse 2.5% 27% at 91% 67%, rgba(255, 255, 255, .2) 55%, rgba(255, 255, 255, 0)),
        radial-gradient(ellipse 13% 2.2% at 31% 36.2%, rgba(255, 255, 255, .42), rgba(255, 255, 255, 0)),
        radial-gradient(ellipse 3.5% 8% at 41.5% 23.5%, rgba(255, 255, 255, .42), rgba(255, 255, 255, 0));
    pointer-events: none;
}

/* The bottle is round: its sides fall away into shade, the far one more. This lies over the label as well as the glass, which is what sets the label round the bottle. */
.upright-glass::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 0, 0, .34), rgba(0, 0, 0, 0) 20%, rgba(255, 255, 255, .08) 30%, rgba(0, 0, 0, 0) 46%, rgba(0, 0, 0, 0) 64%, rgba(0, 0, 0, .46)); pointer-events: none; }

.upright-label { position: absolute; left: 7%; top: 50%; display: grid; align-content: center; justify-items: center; gap: .2em; width: 86%; height: 36%; border-radius: 2px; background: linear-gradient(180deg, #f7efdf, #e7dabf); color: #2a1a21; }
.upright-label b { font: 400 1em/1 var(--serif); }
.upright-label i { font: 700 .46em/1 var(--sans); letter-spacing: .08em; color: var(--brand); }

/*
    A bottle's own label, cut from the picture kept of the bottle and put on by label.js in place of the drawn
    one. It is as wide on the bottle as it is on the real one, --across, and as tall as its own shape makes
    it: --shape is its width over its height. It sits low on the body, where labels are stuck. A label too
    tall for the body is made smaller all round and is never squashed. A bottle stands 3.4 times as tall as
    it is wide, so the 45% of its height that a label may take is 153% of its width. The light over the glass
    falls over the label too, which is what sets it round the bottle.
*/
.upright-label.own { left: 50%; top: auto; bottom: 12%; display: block; width: min(var(--across, 92%), calc(var(--room, 153%) * var(--shape, 1))); height: auto; aspect-ratio: var(--shape, 1); translate: -50% 0; overflow: hidden; border-radius: 1px; background: #1b1a1c; animation: label-on .3s ease-out; }
.upright-label.own img { display: block; width: 100%; height: 100%; }

/*
    A drink with a proper photo of it as it is sold wears that in place of the drawing: the bottle or can cut out of its white
    backdrop by real.js, standing where the drawing stood and as tall. Until it is ready, and for good if it cannot be cut, the
    drawing stays.
*/
/* Named within its bottle, so that no drawn glass (a dark spirit's is three classes deep) shows behind the photo. */
.upright .upright-glass.real { clip-path: none; background: none; }
.upright .upright-glass.real::before, .upright .upright-glass.real::after, .upright .upright-glass.real .upright-label { display: none; }
.upright-photo { position: absolute; left: 50%; bottom: 0; display: block; width: auto; max-width: none; height: 100%; translate: -50% 0; animation: label-on .3s ease-out; }

/* On the wine's own page, the photo as it is sold stands in the place of the label photo. */
.wine-sold { display: grid; place-items: end center; width: 112px; height: 150px; }
.wine-sold img { max-width: 112px; max-height: 150px; width: auto; height: auto; object-fit: contain; opacity: 0; transition: opacity .25s; }
.wine-sold img.cut { opacity: 1; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .5)); }
.wine-sold img.uncut { opacity: 1; border-radius: 6px; }
.sold-links { margin-top: -.4rem; }
.credits { display: grid; gap: .35rem; margin: 0 0 2rem; padding: 0; list-style: none; color: var(--muted); font-size: .88rem; line-height: 1.45; }
.credits a { color: var(--text); text-underline-offset: 3px; }

@keyframes label-on { from { opacity: 0; } }

/* The card for the bottle in hand: what it is, whether it is ready, where it lives, and the way to its page. */
.hand { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .8rem; align-items: center; padding: .65rem .7rem .75rem 1rem; border: 1px solid var(--line-strong); border-radius: var(--radius); background: rgba(0, 0, 0, .3); color: inherit; text-decoration: none; }
.hand:active { background: rgba(0, 0, 0, .5); }
.hand:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.hand-text { display: grid; gap: .35rem; min-width: 0; }

/* Room for two lines whether the name takes one or two, so nothing jumps as bottles are picked up. */
.hand-title { display: flex; align-items: flex-end; min-height: 2.75rem; font: 600 1.05rem/1.25 var(--sans); }
.hand-title > span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.hand-kind { color: var(--text); font-size: .86rem; font-weight: 500; }
.hand-kind[hidden] { display: none; }
.hand-about { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .55rem; min-height: 1.5rem; color: var(--muted); font-size: .84rem; }
.hand svg { width: 1.5rem; height: 1.5rem; fill: none; stroke: var(--gold-bright); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* A fridge shelf, out. */

.tray {
    --bottle: clamp(6.5rem, 30vh, 15rem);
    --wide: calc(var(--bottle) / 3.4);
    --mark: 1.5rem;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: var(--text);
    overflow: hidden;
}

@supports (height: 1dvh) {
    .tray { --bottle: clamp(6.5rem, 30dvh, 15rem); }
}

/* The one column is the screen's width and no more, however long the row inside it is. */
.tray[open] { display: grid; grid-template-columns: minmax(0, 1fr); align-items: end; justify-items: center; }
.tray::backdrop { background: none; }
.tray-dim { position: absolute; inset: 0; background: rgba(8, 4, 6, .62); opacity: 0; transition: opacity .25s ease; touch-action: none; }
.tray.is-open .tray-dim { opacity: 1; }

.tray-panel { position: relative; width: 100%; min-width: 0; max-width: 36rem; padding-bottom: calc(env(safe-area-inset-bottom) + 1rem); touch-action: none; }

.tray-surface {
    position: absolute;
    inset: 0;
    border: 1px solid var(--line-strong);
    border-bottom: 0;
    border-radius: 24px 24px 0 0;
    background: radial-gradient(120% 60% at 50% 0%, rgb(var(--ember-rgb) / .36), rgb(var(--ember-rgb) / 0) 70%), var(--surface);
    box-shadow: 0 -18px 60px rgba(0, 0, 0, .6);
    transform-origin: 0 0;
}

/* A fridge shelf comes out into the cold light of the fridge. */
.tray-fridge .tray-surface { border-color: rgba(182, 190, 196, .4); background: radial-gradient(120% 70% at 50% 0%, rgba(60, 130, 190, .24), rgba(60, 130, 190, 0) 70%), linear-gradient(180deg, #17212a, #0a0f13); }

/* A bin comes out onto the wood it is made of. */
.tray-bins .tray-surface { border-color: rgb(var(--gold-rgb) / .35); background: radial-gradient(120% 70% at 50% 0%, rgba(150, 100, 60, .26), rgba(150, 100, 60, 0) 70%), linear-gradient(180deg, #1c120d, #0b0705); }

.tray-head { position: relative; display: flex; align-items: baseline; gap: .7rem; padding: 1rem 1.1rem 0; }
.tray-head h2 { margin: 0; color: var(--text); font: 400 1.35rem/1.2 var(--serif); }
.tray-head span { flex: 1; color: var(--muted); font-size: .88rem; }
.tray-close, .tray-step, .peek-back { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: rgba(0, 0, 0, .3); color: var(--text); cursor: pointer; }
.tray-close, .tray-step { align-self: center; margin: -.3rem -.3rem -.3rem 0; }
.tray-close svg, .tray-step svg, .peek-back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tray-close:focus-visible, .tray-step:focus-visible, .peek-back:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.tray-step:disabled { opacity: .3; cursor: default; }
.tray .hand { margin: .6rem 1.1rem 0; }

/* The words arrive a moment after the tray, and leave before it. */
.tray-head, .tray .hand, .tray .hand-ask { opacity: 0; translate: 0 8px; transition: opacity .14s ease, translate .14s ease; }
.tray.is-open .tray-head, .tray.is-open .hand, .tray.is-open .hand-ask { opacity: 1; translate: 0 0; transition: opacity .3s ease .14s, translate .4s cubic-bezier(.2, .8, .2, 1) .14s; }
.tray-run { opacity: 0; transition: opacity .16s ease .1s; }
.tray.is-open .tray-run { opacity: 1; transition: opacity .2s ease; }

/* The row: as long as it needs to be, and scrolled sideways when that is longer than the screen is wide. */
.tray-run {
    position: relative;
    overflow: auto hidden;
    overscroll-behavior: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    touch-action: pan-x;
    -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0), #000 1rem, #000 calc(100% - 1rem), rgba(0, 0, 0, 0));
    mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0), #000 1rem, #000 calc(100% - 1rem), rgba(0, 0, 0, 0));
}

.tray-run::-webkit-scrollbar { display: none; }
.tray-row { position: relative; display: flex; align-items: flex-end; justify-content: center; gap: .6rem; width: max-content; min-width: 100%; padding: 1.9rem 1.2rem .4rem; }

/* What the bottles stand on: the steel front of the shelf. */
.tray-row::after {
    content: "";
    position: absolute;
    left: .5rem;
    right: .5rem;
    bottom: calc(.4rem + var(--mark) - 5px);
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(180deg, #e3e8eb, var(--steel) 45%, var(--steel-dark));
    box-shadow: 0 8px 14px rgba(0, 0, 0, .5);
    pointer-events: none;
}

.tray-bottle { position: relative; flex: 0 0 auto; display: grid; justify-items: center; padding: 0; border: 0; border-radius: 0; background: none; color: inherit; font: inherit; text-decoration: none; cursor: pointer; scroll-snap-align: center; -webkit-appearance: none; appearance: none; }
.tray-bottle:focus-visible { outline: none; }
.tray-bottle:focus-visible .upright { outline: 2px solid var(--gold); outline-offset: 5px; border-radius: 8px; }
.tray-mark { display: grid; align-items: end; height: var(--mark); color: rgba(245, 237, 230, .6); font: 500 .68rem/1 var(--sans); font-variant-numeric: tabular-nums; }

/*
    The shelf comes out in one piece, and then its bottles stand up in turn, outward from the one that was
    touched: each from lying back on the shelf to upright, where it stands. They lie back the same way.
    Nothing crosses anything else. --at is how many places a bottle is from the one that was touched.
*/
.tray-bottle .upright-glass { transform-origin: 50% 100%; }
.tray.is-open .tray-bottle .upright-glass { animation: stand-up .5s cubic-bezier(.3, 1.3, .5, 1) both; animation-delay: calc(var(--at, 0) * 38ms + 120ms); }
.tray.is-closing .tray-bottle .upright-glass { animation: lie-back .2s ease-in both; animation-delay: calc(var(--at, 0) * 9ms); }

@keyframes stand-up {
    from { opacity: 0; transform: perspective(40rem) rotateX(84deg); }
    30% { opacity: 1; }
    to { opacity: 1; transform: perspective(40rem) rotateX(0deg); }
}

@keyframes lie-back { to { opacity: 0; transform: perspective(40rem) rotateX(84deg); } }

/* The bottle in hand is lifted, in a light of its own. */
.tray-bottle .upright { transition: translate .32s cubic-bezier(.3, 1.4, .5, 1), filter .25s ease; }
.tray-bottle[aria-pressed="true"] .upright { translate: 0 -10px; filter: drop-shadow(0 0 11px rgb(var(--gold-bright-rgb) / .85)); }
.tray-bottle.lit .upright, .peek.lit .upright { animation: upright-lit 1.1s ease-in-out infinite alternate; }

@keyframes upright-lit { to { filter: drop-shadow(0 0 12px rgb(var(--gold-bright-rgb) / .95)); } }

/* An empty spot: the outline of where a bottle would stand. A tap adds one there. */
.tray-bottle.vacant .upright { filter: none; }
.tray-bottle.vacant .upright-glass { background: rgba(255, 255, 255, .07); }
.tray-bottle.vacant .upright-glass::before { content: none; }
.tray-bottle.vacant .upright-glass::after { content: "+"; inset: 62% 0 auto; background: none; color: rgba(245, 237, 230, .55); font: 300 1.6em/1 var(--sans); text-align: center; }

/* On a wide screen the tray stands clear of the bottom edge. */
@media (min-width: 40rem) and (min-height: 36rem) {
    .tray[open] { align-items: center; }
    .tray-panel { padding-bottom: 1.1rem; }
    .tray-surface { border-bottom: 1px solid rgb(var(--gold-rgb) / .3); border-radius: 24px; }
    .tray-fridge .tray-surface { border-color: rgba(182, 190, 196, .4); }
}

/*
    A bottle, out of a wooden rack. It stands where it lies in the rack, with its foot still in the dark of
    its slot, leaning a little, and scrolls with the rack. It is a picture and takes no taps, so the bottles
    it stands in front of can still be reached: the card at the foot of the screen is the way to its page.
*/
.peeks { --bottle: clamp(8.5rem, 25vh, 13rem); --wide: calc(var(--bottle) / 3.4); position: absolute; left: 0; top: 0; z-index: 4; width: 0; height: 0; }
.peek { position: absolute; display: block; pointer-events: none; transform: rotate(var(--lean, 0deg)); will-change: transform; }
.peek .upright { filter: drop-shadow(1px 0 0 rgb(var(--gold-rgb) / .85)) drop-shadow(0 10px 12px rgba(0, 0, 0, .6)); }
.peek .upright-glass { --foot: linear-gradient(180deg, rgba(0, 0, 0, 0) 82%, rgba(0, 0, 0, .7) 100%); }

/* The card takes the place of the tabs while a bottle is out, and the page makes room to scroll the last rows clear of it. */
.peek-dock { position: fixed; inset: auto .7rem calc(env(safe-area-inset-bottom) + .6rem); z-index: 6; max-width: 32rem; margin: 0 auto; opacity: 0; translate: 0 1.2rem; transition: opacity .18s ease, translate .3s cubic-bezier(.2, .8, .2, 1); }
.peek-dock.is-up { opacity: 1; translate: 0 0; }
.peek-dock .hand { border-color: var(--line-strong); background: var(--surface); box-shadow: 0 14px 34px rgba(0, 0, 0, .6); }
.peek-back { position: absolute; top: -1.2rem; right: .5rem; width: 36px; height: 36px; background: var(--surface-raised); box-shadow: 0 6px 14px rgba(0, 0, 0, .5); }
html.has-peek .page { padding-bottom: calc(var(--tabbar-height) + env(safe-area-inset-bottom) + 9.5rem); }

/*
    Reports

    Figures first, then breakdowns. Every bar and column is the same colour, because each chart shows one
    measure: the colour was checked against this surface for contrast and for colour-blind readers. Names
    and numbers are always in text colours, never the colour of the mark.
*/

.figures { margin-bottom: 1.2rem; }
.figure-hero { margin: .3rem 0 0; font: 500 3.4rem/1 var(--sans); letter-spacing: -.02em; }
.figure-label { margin: .45rem 0 1.1rem; color: var(--muted); font-size: .9rem; }

.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.tile { display: block; min-width: 0; padding: .75rem .9rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: inherit; text-decoration: none; }
.tile dt, .tile-label { display: block; color: var(--muted); font-size: .8rem; }
.tile dd, .tile-value { display: block; margin: .2rem 0 0; font: 650 1.6rem/1.15 var(--sans); }
.tile dd.tile-note { margin-top: .3rem; overflow: hidden; font: 400 .8rem/1.3 var(--sans); text-overflow: ellipsis; white-space: nowrap; }
.tile-note a { color: var(--muted); }
a.tile:active { background: var(--surface-raised); }

@media (min-width: 36rem) {
    .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.segmented { display: inline-grid; grid-auto-flow: column; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: rgba(0, 0, 0, .25); }
.segmented a { padding: .4rem 1rem; border-radius: 999px; color: var(--muted); font-size: .88rem; text-decoration: none; }
.segmented a[aria-current="true"] { background: var(--surface-raised); color: var(--text); }


/*
    The reports are four boards, one shown at a time, with a switch under the heading. A board is a few
    cards, each one thing about the cellar, and the overview's cards lead to the board that has more.
*/
.title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.title-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: .92rem; text-decoration: none; }
.title-link::after { content: "›"; margin-left: .35rem; color: var(--gold); }
.boards { display: grid; grid-template-columns: repeat(5, auto); justify-content: space-between; gap: 2px; margin: .1rem 0 1.1rem; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: none; }
.boards a { display: flex; align-items: center; justify-content: center; min-height: 38px; padding: 0 .55rem; border-radius: 999px; color: var(--muted); font-size: .84rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.boards a[aria-current="page"] { background: var(--surface-raised); color: var(--text); }

/* Five boards on the narrowest phones: tighter, so that the last one stays inside the frame. */
@media (max-width: 24rem) { .boards a { padding: 0 .36rem; font-size: .8rem; } }
/* Three boards share the width evenly: the Plans tab's Occasions, Tastings and Trips, and a wine's Bottles, About and Opened. */
.boards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.boards.three a { font-size: .9rem; }
.hub-start { margin-top: 1.4rem; }
.hub-start > h2 { margin: 0 0 .6rem; }
.live-start { margin-bottom: 1.2rem; }
.board-card { margin: 0 0 .9rem; padding: .95rem 1rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.board-card h2 { margin: 0 0 .75rem; }
.board-card h3 { margin: .95rem 0 .7rem; color: var(--muted); font: 500 .86rem/1.4 var(--sans); }
.board-card h2 + h3 { margin-top: -.35rem; }
.board-card > :last-child, .board-card .tiles { margin-bottom: 0; }
.board-card .tile { background: rgba(0, 0, 0, .22); }
.board-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }

/*
    What stands out: a few sentences, each leading to the bottles it is about. The lead is said first and strongest, and the gold rule at
    the left marks them as Kept's own reading of the figures under them.
*/
.findings { margin: 1rem 0 1.1rem; }
.findings-head { display: block; margin: 0 0 .55rem; color: var(--gold); font: 600 .72rem/1.2 var(--sans); letter-spacing: .2em; text-transform: uppercase; }
.findings ul { display: grid; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.findings a { display: block; padding: .6rem .85rem .65rem; border-left: 2px solid var(--gold); border-radius: 0 12px 12px 0; background: var(--surface); color: var(--muted); font-size: .95rem; line-height: 1.45; text-decoration: none; }
.findings a strong { color: var(--text); font-weight: 600; }
.findings a:hover, .findings a:focus-visible { background: var(--surface-raised); }

/* The plan in a line on the overview, leading to the plan itself. */
.plan-line { display: grid; gap: .3rem; color: var(--text); line-height: 1.45; text-decoration: none; }
.plan-line .findings-head { margin: 0; }
.plan-go { color: var(--gold-bright); font-size: .88rem; font-weight: 600; }
.plan-go::after { content: " ›"; }

/*
    The drinking plan: a row for each year, its bar the bottles to drink by its end. Gold is what the pace opens in the year, wine is more
    than it opens, and the dark start of the first row is what is past its best already. The mark across a bar is the pace.
*/
.plan-said { margin: -.2rem 0 .9rem; line-height: 1.5; }
.plan-rows { display: grid; gap: .45rem; margin: 0; padding: 0; list-style: none; }
.plan-row { display: grid; grid-template-columns: 4.6rem minmax(0, 1fr) 2.6rem; align-items: center; gap: .6rem; }
.plan-year { color: var(--muted); font-size: .86rem; white-space: nowrap; }
.plan-bar { position: relative; display: flex; height: 14px; border-radius: 4px; background: rgba(255, 255, 255, .04); }
.plan-bar i { display: block; height: 100%; }
.plan-bar i:first-child { border-radius: 4px 0 0 4px; }
.plan-bar i:last-of-type { border-radius: 0 4px 4px 0; }
.plan-past, .plan-key .plan-past { background: #5a2430; }
.plan-within, .plan-key .plan-within { background: var(--gold); }
.plan-over, .plan-key .plan-over { background: #a8324a; }
.plan-bar .plan-pace { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--text); }
.plan-count { color: var(--text); font-size: .9rem; font-variant-numeric: tabular-nums; text-align: right; }
.plan-key { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin: .8rem 0 0; color: var(--muted); font-size: .8rem; }
.plan-key span { display: inline-flex; align-items: center; gap: .35rem; }
.plan-key i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.plan-key .plan-pace { display: inline-block; width: 2px; height: 12px; border-radius: 1px; background: var(--text); }
.plan-undated { margin: 0 0 .9rem; }

/* Where the opened bottles came from: the cellar map's sea and land, and a gold ring for each place. */
.you-map { display: block; width: 100%; height: auto; margin: .2rem 0 .7rem; border-radius: 14px; border: 1px solid var(--line-strong); }
.you-place circle { fill: rgb(var(--gold-rgb) / .28); stroke: var(--gold-bright); stroke-width: 1.4; }
.you-place text { fill: var(--text); font: 600 9.5px var(--sans); paint-order: stroke; stroke: #090d10; stroke-width: 3px; }
.you-journey { margin: 0 0 .5rem; line-height: 1.5; }

/* A drawing on each report board: beside the headline figure, or at the top right of the board's first card, so it takes no room of its own. */
.figures.has-art, .board-card.has-art { position: relative; }
.figures.has-art > .drawing, .board-card.has-art > .drawing { position: absolute; top: 0; right: 0; width: 56px; height: 56px; }
.board-card.has-art > .drawing { top: .75rem; right: .85rem; width: 44px; height: 44px; border-radius: 10px; }
.figures.has-art .figure-hero, .board-card.has-art > h2, .board-card.has-art > h2 + h3 { padding-right: 60px; }
.ranked.visited li::before { content: none; }
.ranked.visited li { grid-template-columns: minmax(0, 1fr) auto; }
.plan-row.is-beyond .plan-bar i:last-of-type { -webkit-mask-image: linear-gradient(90deg, #000 70%, transparent); mask-image: linear-gradient(90deg, #000 70%, transparent); }
.board-head a { flex: none; color: var(--muted); font-size: .86rem; text-decoration: none; }
.board-head a::after { content: "›"; margin-left: .3rem; color: var(--gold); }
.board-switches { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; margin: 0 0 .9rem; }
.board-switches .views { margin: 0; }
.board-more { margin: .8rem 0 0; }
.boards ~ .chips { margin-bottom: .8rem; }
.boards ~ .segmented { margin-bottom: .9rem; }
.boards ~ .tiles.flow { margin-bottom: .9rem; }

/* A ranked list of bars. The value column is a fixed width so that every bar is drawn to the same scale. */
.bars { list-style: none; margin: 0; padding: 0; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1fr) 5.8rem; gap: .25rem .8rem; align-items: center; padding: .45rem 0; color: inherit; text-decoration: none; }
.bar-label { min-width: 0; overflow: hidden; font-size: .95rem; text-overflow: ellipsis; white-space: nowrap; }
.bar-label .dot { margin-right: .45rem; }
.bar-value { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.bar-track { height: 10px; }
.bar-fill { display: block; min-width: 2px; height: 100%; border-radius: 0 4px 4px 0; background: var(--series); transform-origin: left; animation: grow-across .6s ease-out both; }
.bar-note { color: var(--muted); font-size: .78rem; font-variant-numeric: tabular-nums; text-align: right; }
a.bar-row:hover .bar-fill, a.bar-row:focus-visible .bar-fill { filter: brightness(1.25); }
.bar-row.rest { color: var(--muted); }
.bar-row.rest .bar-value { font-weight: 400; }

/* Columns. Each one's hit area is the full height of the plot, so a short column is as easy to point at as a tall one. */
.columns-chart { margin: 0; }

/* What a chart over time counts decides its colour: gold for what came in, wine red for what was drunk, blue for what was held. */
.columns-chart.tone-in { --series: var(--gold); }
.columns-chart.tone-out { --series: #a8324a; }
.columns-chart.tone-held { --series: #d9c98a; }
.tiles.flow { margin-bottom: 1.1rem; }
.tile.tone-in dd:first-of-type { color: var(--gold-bright); }
.tile.tone-out dd:first-of-type { color: #d9707f; }
.tile-sub { margin: .1rem 0 0; color: var(--muted); font: 400 .8rem var(--sans) !important; }
/* Under the stages: the ready bottles that are early in their window, which is why Not ready can be low. */
.tiles-note { display: grid; gap: .1rem; margin: -.4rem 0 1rem; padding: .55rem .8rem; border-left: 2px solid var(--gold); color: var(--text); font-size: .88rem; line-height: 1.4; text-decoration: none; }
.tiles-note span { color: var(--muted); font-size: .82rem; }
.tiles-note:hover strong, .tiles-note:focus-visible strong { text-decoration: underline; }
.board-card .tiles + .tiles-note { margin: .7rem 0 0; }
a.tile .tile-sub { display: block; }
.plot { position: relative; height: 150px; margin-top: 1.4rem; padding-left: 2rem; }
.plot-grid span { position: absolute; right: 0; left: 2rem; border-top: 1px solid var(--grid); }
.plot-grid span:last-child { border-top-color: var(--axis); }
.plot-grid b { position: absolute; top: -.5rem; right: calc(100% + .4rem); color: var(--muted); font: 400 .68rem/1 var(--sans); font-variant-numeric: tabular-nums; }
.plot-columns { position: relative; display: grid; grid-template-columns: repeat(var(--columns), minmax(0, 1fr)); height: 100%; }
.col { position: relative; display: flex; align-items: flex-end; justify-content: center; height: 100%; padding: 0 1px; color: inherit; text-decoration: none; outline-offset: -2px; }
.col-bar { width: min(100%, 24px); height: var(--h); border-radius: 4px 4px 0 0; background: var(--series); transform-origin: bottom; animation: grow-up .6s ease-out both; }
.col:hover .col-bar, .col:focus-visible .col-bar { filter: brightness(1.25); }
.col-value { position: absolute; bottom: calc(var(--h) + 3px); left: 50%; translate: -50% 0; font: 600 .72rem/1 var(--sans); }
.col-value:empty { display: none; }

.col::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(var(--h) + 1.4rem);
    left: 50%;
    z-index: 3;
    width: max-content;
    max-width: 13rem;
    padding: .35rem .55rem;
    translate: -50% 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #0a0808;
    color: var(--text);
    font-size: .76rem;
    line-height: 1.3;
    opacity: 0;
    pointer-events: none;
    transition: opacity .12s;
}

.col:hover::after, .col:focus-visible::after { opacity: 1; }
.col.tip-start::after { left: 0; translate: none; }
.col.tip-end::after { right: 0; left: auto; translate: none; }

.plot-axis { display: grid; grid-template-columns: repeat(var(--columns), minmax(0, 1fr)); padding: .35rem 0 0 2rem; color: var(--muted); font-size: .68rem; }
.plot-axis span { display: flex; justify-content: center; white-space: nowrap; }

.table-view { margin-top: .6rem; }
.table-view summary { color: var(--muted); font-size: .8rem; cursor: pointer; }
.table-view table { width: 100%; margin-top: .4rem; border-collapse: collapse; font-size: .86rem; font-variant-numeric: tabular-nums; }
.table-view th, .table-view td { padding: .3rem 0; border-bottom: 1px solid var(--grid); font-weight: 400; text-align: left; }
.table-view td, .table-view thead th:last-child { text-align: right; }
.table-view thead th { color: var(--muted); font-size: .76rem; }

.ranked { list-style: none; margin: 0; padding: 0; counter-reset: rank; }
.ranked li { display: grid; grid-template-columns: 1.5rem minmax(0, 1fr) auto; gap: 0 .5rem; padding: .55rem 0; border-bottom: 1px solid var(--line); counter-increment: rank; }
.ranked li::before { content: counter(rank); grid-row: 1 / span 2; padding-top: .2rem; color: var(--muted); font-size: .8rem; }
.ranked a { color: var(--text); font-weight: 500; text-decoration: none; }
.ranked-value { font-weight: 600; font-variant-numeric: tabular-nums; }
.ranked-note { grid-column: 2 / span 2; color: var(--muted); font-size: .8rem; }

@keyframes grow-across { from { transform: scaleX(0); } }
@keyframes grow-up { from { transform: scaleY(0); } }

/* History */

.history { list-style: none; margin: 0; padding: 0 0 0 1.1rem; border-left: 1px solid var(--line); }
.history li { position: relative; padding: 0 0 1.1rem; }
.history li::before { content: ""; position: absolute; left: calc(-1.1rem - 5px); top: .45rem; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px var(--bg); }
.history time { display: block; color: var(--muted); font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; }
.history a { color: var(--text); font-size: 1.02rem; font-weight: 500; text-decoration: none; }
.history q { display: block; color: var(--muted); font-style: italic; }

/* What friends made of a wine at tastings: an average, then each friend's score and their own words. */
.friends-score { margin: 0 0 .7rem; color: var(--muted); }
.friends-score b { color: var(--gold-bright); font: 650 1.7rem/1 var(--sans); }
.friends-score span { margin-left: .3rem; font-size: .88rem; }
.friend-notes { list-style: none; display: grid; gap: .55rem; margin: 0 0 1.2rem; padding: 0; }
.friend-notes li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .15rem .8rem; align-items: baseline; padding: .75rem .9rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.friend-name { color: var(--text); font: 600 1.02rem/1.3 var(--sans); text-decoration: none; }
.friend-score { color: var(--gold-bright); font: 650 1.25rem/1 var(--sans); font-variant-numeric: tabular-nums; white-space: nowrap; }
.friend-score small { color: var(--muted); font-size: .72rem; font-weight: 400; }
.friend-notes q { grid-column: 1 / -1; color: var(--text); font-style: italic; line-height: 1.45; }
.friend-flavours { grid-column: 1 / -1; color: var(--muted); font-size: .86rem; }
.friend-when { grid-column: 1 / -1; color: var(--muted); font-size: .8rem; text-decoration: none; }

/* Settings: starting again is folded away and marked as what it is. */
.start-again > summary { color: var(--danger); }
.start-again .card { display: grid; gap: .8rem; }
.start-again .card p, .start-again .field { margin: 0; }
.start-again-warning { color: var(--danger); font-weight: 600; }
.start-again .problem { margin-bottom: .6rem; }
.start-again-history { margin: 0; }
.undo-kept { display: grid; gap: .8rem; margin-bottom: .8rem; }
.undo-kept p { margin: 0; }
.undo-kept strong { display: block; font: 600 1.05rem/1.3 var(--sans); }
.undo-kept span { color: var(--muted); font-size: .93rem; }
.start-again input[type="text"] { text-transform: uppercase; letter-spacing: .12em; }
.callout.offer { border-color: rgba(255, 144, 134, .45); }
.callout.offer strong { color: var(--danger); }

/* The way back for a bottle marked as drunk by mistake. Quiet, because it is rarely wanted. */
.history .undo > summary { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: .86rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.history .undo form { margin: 0 0 .4rem; }

/* Sign-in */

.signin { max-width: 22rem; margin: 2.5rem auto; text-align: center; }
/* A drawing at the head of a page with little else on it: a door into Kept, a table's first screen, a page that is not there. */
.head-art { width: 112px; margin: 0 0 1.1rem; }
.head-art:has(> .drawing-wide) { width: min(280px, 82%); }
.head-art > .drawing { float: none; width: 100%; height: auto; margin: 0; border-radius: 18px; box-shadow: 0 14px 34px rgb(0 0 0 / .45); }
.head-art > .drawing svg { height: auto; }
.signin > .head-art, .guest-page .head-art { margin: 0 auto 1.2rem; }
.scene > .head-art, .live-stage > .head-art { width: clamp(112px, 22vh, 240px); margin: 0 0 .5rem; }
.signin form { text-align: left; margin-top: 1.4rem; }

/* Choosing a cellar: a door for each. */
.doors { display: grid; gap: .8rem; }

.door {
    position: relative;
    display: grid;
    gap: .15rem;
    width: 100%;
    padding: 1.15rem 3rem 1.15rem 1.2rem;
    border: 1px solid var(--line-strong);
    border-radius: 20px;
    background: radial-gradient(120% 140% at 0% 0%, rgb(var(--ember-rgb) / .42), rgb(var(--ember-rgb) / 0) 62%), var(--surface);
    color: var(--text);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: translate .12s ease, border-color .12s ease;
}

.door::after { content: "›"; position: absolute; top: 50%; right: 1.2rem; translate: 0 -55%; color: var(--gold); font-size: 1.8rem; line-height: 1; }
.door:hover { border-color: var(--gold); }
.door:active { translate: 0 1px; }
.door:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.door-name { font-family: var(--serif); font-size: 1.45rem; line-height: 1.2; }
.door-holds { color: var(--text); font-size: .9rem; line-height: 1.35; opacity: .86; }
.door-note { color: var(--muted); font-size: .85rem; }
.door.here { border-color: var(--gold); }
.door.here .door-note { color: var(--gold-bright); }
.leave .link { min-height: 44px; color: var(--muted); }

/* Which version is running: there to be found by whoever looks for it, and out of everyone else's way. */
.signin-version { margin: 2.4rem 0 0; color: var(--muted); font-size: .78rem; letter-spacing: .04em; opacity: .7; }

/*
    Signing in as a person. A passkey first, as the one large button; an email and password under a quiet "or"; the old door, while a
    cellar is nobody's yet, folded away at the foot. The same column carries making a cellar yours, joining and a new password.
*/
.signin h1 { margin-bottom: .35rem; text-wrap: balance; }
.signin-lede { margin: 0 auto 1.4rem; color: var(--muted); line-height: 1.5; text-wrap: balance; }
.signin-passkey { margin: 1.6rem 0 0; }
.passkey-btn { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; min-height: 3.1rem; font-size: 1.02rem; }
.passkey-btn svg, .welcome-key svg { width: 1.45rem; height: 1.45rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
/*
    Signing in with Google, in the dark button Google asks for: its four-colour G on near-black, a grey edge, light grey words. It is
    as tall as the passkey button above it, so the two read as a pair.
*/
.google-form { margin: .8rem 0 0; }
.signin .google-form { margin-top: .8rem; }
.google-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .7rem; width: 100%; min-height: 3.1rem; padding: 0 1rem;
    border: 1px solid #8e918f; border-radius: 15px; background: #131314; color: #e3e3e3;
    font: inherit; font-size: 1rem; font-weight: 500; letter-spacing: .01em; cursor: pointer;
}
.google-btn:hover { background: #1c1c1e; }
.google-btn:active { translate: 0 1px; }
.google-btn:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 2px; }
.google-btn svg { width: 1.2rem; height: 1.2rem; flex: none; }
.card > .google-form:first-child { margin-top: 0; }

/* Two-step verification: the square for the app to scan, black on white as a camera reads it best, the key to type, the codes to keep. */
.two-step-setup ol { margin: 0 0 1.1rem; padding-left: 1.2rem; display: grid; gap: 1rem; }
.two-step-setup li > span { display: block; }
.two-step-setup li a { color: var(--gold-bright); }
.two-step-setup .field, .two-step-setup label { margin: 0; }
.two-step-setup input { margin-top: .5rem; max-width: 12rem; letter-spacing: .2em; }
.two-step-square { display: block; width: 11rem; margin: .7rem 0 0; padding: .5rem; border-radius: 12px; background: #fff; }
.two-step-square svg { display: block; width: 100%; height: auto; }
.two-step-key { display: inline-block; margin-top: .4rem; padding: .35rem .6rem; border: 1px solid var(--line-strong); border-radius: 10px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92rem; letter-spacing: .04em; }
.two-step-on { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem; }
.two-step-on p { margin: 0; }
.recovery-codes textarea { width: 100%; margin: .2rem 0 .8rem; padding: .7rem .85rem; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--bg); color: var(--text); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .95rem; line-height: 1.6; resize: none; }

.signin-or { display: flex; align-items: center; gap: .8rem; margin: 1.6rem 0 .2rem; color: var(--muted); font-size: .82rem; }
.signin-or::before, .signin-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.signin-email { margin-top: 1rem; }
.signin-forgot { margin: .9rem 0 0; text-align: center; font-size: .9rem; }
.signin-forgot a, .signin-note a { color: var(--gold-bright); }
.signin-note { margin: 1.6rem 0 0; color: var(--muted); font-size: .86rem; line-height: 1.5; }
.signin-fixed { margin: .2rem 0 0; padding: .7rem .85rem; border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); }
.signin-door { margin: 2rem 0 0; text-align: left; }
.signin-door > summary { color: var(--muted); font-size: .88rem; text-align: center; cursor: pointer; }
.signin-door[open] > summary { margin-bottom: .9rem; }
.signin .problem { text-align: left; }

/* Starting a cellar: the sign-in page's look, with what comes next as three numbered steps, and a way to sign in instead. */
.signup-steps { display: grid; gap: .75rem; margin: 1.8rem 0 0; padding: 1.05rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-align: left; list-style: none; counter-reset: step; }
.signup-steps li { position: relative; padding-left: 2.15rem; color: var(--muted); font-size: .9rem; line-height: 1.45; counter-increment: step; }
.signup-steps li::before {
    content: counter(step);
    position: absolute; top: -.05rem; left: 0;
    display: grid; place-items: center; width: 1.45rem; height: 1.45rem;
    border: 1px solid rgb(var(--gold-rgb) / .55); border-radius: 50%;
    color: var(--gold-bright); font-size: .76rem; font-weight: 600; font-variant-numeric: tabular-nums;
}
.signup-steps b { color: var(--text); font-weight: 600; }
.signup-switch { margin: 1.1rem 0 0; color: var(--muted); font-size: .92rem; }
.signup-switch a { color: var(--gold-bright); font-weight: 600; }

/* Giving a year of Kept, and redeeming one. Both are the signing-in column, with the drawing at its head and the price or the code set out. */
.gift .drawing, .gift-redeem .drawing { margin: 0 auto 1.3rem; }
.gift-price { display: grid; justify-items: center; gap: .15rem; margin: 0 0 1.4rem; }
.gift-price b { font-family: var(--serif); font-size: 2.6rem; line-height: 1; color: var(--gold-bright); }
.gift-price span { color: var(--muted); font-size: .9rem; }
.gift-in { display: grid; gap: .55rem; margin: 0 0 1.8rem; padding: 1.05rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-align: left; list-style: none; }
.gift-in li { position: relative; padding-left: 1.5rem; color: var(--muted); font-size: .9rem; line-height: 1.45; }
.gift-in li::before { content: ""; position: absolute; left: .25rem; top: .55rem; width: .4rem; height: .4rem; border-radius: 50%; background: var(--gold-bright); }
.gift-them { margin: 1.8rem 0 .2rem; font-size: 1.05rem; }

/* A code to read aloud, type or write on a card: spaced out, in the one gold, and wide enough to tap and copy. */
.gift-code {
    margin: 0 0 1.4rem; padding: .9rem .7rem; border: 1px solid rgb(var(--gold-bright-rgb) / .45); border-radius: var(--radius);
    background: radial-gradient(120% 90% at 50% 0, rgb(var(--gold-bright-rgb) / .1), transparent 70%);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.3rem; letter-spacing: .12em; color: var(--gold-bright);
    text-align: center; overflow-wrap: anywhere; user-select: all;
}

/* The few words whoever bought the gift wrote, as a letter sets them apart. */
.gift-words { margin: 0 0 1.4rem; padding: .2rem 0 .2rem 1.1rem; border-left: 2px solid rgb(var(--gold-bright-rgb) / .5); text-align: left; }
.gift-words p { margin: 0; font-family: var(--serif); font-size: 1.05rem; line-height: 1.5; color: var(--text); }
.gift-words footer { margin: .35rem 0 0; color: var(--muted); font-size: .86rem; }

/* A field for whatever fills in every field it finds: out of sight and out of reach for a person, and not hidden in a way a script reads. */
.signup-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Signing out, at the foot of the settings. */
/* Settings in five groups, each under a small heading and set off from the one before by a line. */
.settings-group { margin: 0 0 1.6rem; }
.settings-group + .settings-group { padding-top: 1.4rem; border-top: 1px solid var(--line); }
.settings-kicker { margin: 0 0 .85rem; color: var(--muted); font: 600 .72rem/1.2 var(--sans); letter-spacing: .2em; text-transform: uppercase; }
.settings-kicker + h2 { margin-top: 0; }
/* What a switch that saved itself said, under it (account.js). */
.saves-itself { margin: .55rem 0 0; font-size: .88rem; }
.business-more { margin: .2rem 0 .8rem; }
.settings-out { margin: 2.4rem 0 1rem; padding-top: 1.4rem; border-top: 1px solid var(--line); text-align: center; }
.settings-out .muted { margin: .6rem 0 0; font-size: .86rem; }

/* Making a cellar yours from an account: each cellar of theirs that can be put away as they take it, a box each. */
.claim-others { display: grid; gap: .6rem; margin: 0 0 1.1rem; }
.claim-other { display: flex; align-items: flex-start; gap: .75rem; padding: .85rem .95rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-align: left; cursor: pointer; }
.claim-other input { margin-top: .1rem; }
.claim-other span { display: grid; gap: .2rem; }
.claim-other b { font-weight: 600; }
.claim-other small { color: var(--muted); font-size: .86rem; line-height: 1.4; }

/* Putting away a cellar, when there are several to choose from: one card each, as when a door cellar is made yours. */
.put-away-choices { display: grid; gap: .6rem; margin: 0; padding: 0; border: 0; min-width: 0; }
.put-away-choices legend { margin: 0 0 .5rem; padding: 0; font-weight: 600; }

/* The way to start a cellar, on the page for signing in. */
.signin-new { margin: 2rem 0 0; padding: 1.2rem 0 0; border-top: 1px solid var(--line); }
.signin-new p { margin: 0 0 .7rem; color: var(--muted); font-size: .92rem; }

/* The next step after joining: a passkey, offered first and largest. */
.welcome-key { display: grid; justify-items: center; gap: .35rem; margin: 1.2rem 0 1.6rem; padding: 1.4rem 1.2rem 1.2rem; border: 1px solid rgb(var(--gold-bright-rgb) / .45); border-radius: var(--radius); background: radial-gradient(120% 90% at 50% 0, rgb(var(--gold-bright-rgb) / .1), transparent 70%); text-align: center; }
.welcome-key > svg { width: 2.4rem; height: 2.4rem; color: var(--gold-bright); }
.welcome-key h2 { margin: .2rem 0 0; }
.welcome-key p { margin: 0 0 .6rem; color: var(--muted); line-height: 1.5; }
.welcome-key [data-passkey-create] { width: 100%; }

/* Lists of passkeys, devices, sign-ins and invitations: what each is on the left, and what can be done with it on the right. */
.security-list { display: grid; gap: .1rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.security-sub { margin: 1.4rem 0 .2rem; color: var(--muted); font: 600 .78rem/1.3 var(--sans); letter-spacing: .08em; text-transform: uppercase; }
.security-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .2rem 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.security-list .security-what { flex: 1 1 14rem; }
.security-what { display: grid; gap: .15rem; min-width: 0; }
.security-what strong { font-weight: 600; overflow-wrap: anywhere; }
.security-name { display: flex; flex-wrap: wrap; align-items: center; gap: .1rem .45rem; }
.security-name .tag { margin-left: 0; }
.security-what .muted { font-size: .84rem; }
.security-list form { flex: none; }
.security-list button.link { min-height: 44px; }
.security-history li { padding: .5rem 0; }
.tag { display: inline-block; margin-left: .45rem; padding: .05rem .5rem; border-radius: 999px; font-size: .72rem; font-weight: 600; vertical-align: .1em; }
.tag-ok { border: 1px solid rgb(var(--gold-bright-rgb) / .5); color: var(--gold-bright); }
.security-email p { margin: 0 0 .5rem; }
.invite-link { display: flex; gap: .6rem; align-items: center; }
.invite-link input { flex: 1; min-width: 0; font-size: .85rem; }
.security-out { margin: 2.4rem 0 1rem; }
.sharing-acts { display: flex; flex: none; gap: 1rem; align-items: center; }
.sharing-acts form { display: contents; }
.sharing-role { border: 0; margin: 0 0 .9rem; padding: 0; }
.sharing-role legend { margin-bottom: .4rem; color: var(--muted); font-size: .9rem; }
.sharing-role .check { margin-bottom: .45rem; }
.callout.claim-cellar { border-color: rgb(var(--gold-bright-rgb) / .6); background: radial-gradient(140% 120% at 0 0, rgb(var(--gold-bright-rgb) / .1), transparent 70%); }

/*
    Asking an AI

    The page where a cellar's private link is made and given to an AI assistant. The questions someone
    might ask are set as things said, one under another.
*/
.asks { display: grid; gap: .5rem; margin: .8rem 0 1.2rem; padding: 0; list-style: none; }
.asks li { padding: .7rem .95rem; border: 1px solid var(--line); border-radius: 16px 16px 16px 5px; background: rgba(255, 255, 255, .03); font-size: 1rem; line-height: 1.35; }

.link-card label { color: var(--text); }
.copy { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; }
.copy input { font-size: .85rem; text-overflow: ellipsis; }
.copy .btn { min-width: 5.4rem; }

/* One fold for each AI, with the steps for it inside. */
details.ai { margin-top: 0; border-top: 1px solid var(--line); }
details.ai > summary { padding: .85rem 0; font-size: 1.04rem; font-weight: 600; }
details.ai > p { margin-top: 0; }
details.ai > small { margin-bottom: 1.1rem; }

.may p:first-child { margin-top: 0; }
.may .asks { margin-bottom: 1rem; }
.link-change { margin-bottom: 1.3rem; }

/*
    A picture, larger

    A label photo opens over the page it is on, in a dialog that lightbox.js makes. A tap anywhere closes it.
*/
a[data-lightbox] { cursor: zoom-in; }
html.has-lightbox { overflow: hidden; }

.lightbox {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: calc(env(safe-area-inset-top) + 4rem) .7rem calc(env(safe-area-inset-bottom) + 1.2rem);
    border: 0;
    background: none;
    color: var(--text);
    overflow: hidden;
    cursor: zoom-out;
}

.lightbox[open] { display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; }
.lightbox::backdrop { background: rgba(8, 4, 6, .9); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 14px; box-shadow: 0 24px 60px rgba(0, 0, 0, .6); opacity: 0; scale: .97; transition: opacity .18s ease, scale .18s ease; }
.lightbox.is-shown img { opacity: 1; scale: 1; }

.lightbox-close {
    position: absolute;
    top: calc(env(safe-area-inset-top) + .7rem);
    right: .7rem;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: rgba(0, 0, 0, .5);
    color: var(--text);
    cursor: pointer;
}

.lightbox-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.lightbox-close:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
    @view-transition { navigation: none; }
    * { animation: none !important; transition: none !important; }
}

/* Kept's readings: a type that is Kept's guess, the wines whose type is to be settled, and what a second look changed. */
.type-guess { display: flex; flex-wrap: wrap; align-items: center; gap: .1rem 1rem; }
.type-guess form { display: contents; }
.type-guess .link, .type-guess a { display: inline-flex; align-items: center; min-height: 44px; }
/* The Plans boards ask about each drink they leave out, a question to a line: Yes, or Something else. */
.type-asks { padding-top: .35rem; padding-bottom: .5rem; }
.type-asks ul { margin: 0; padding: 0; list-style: none; }
.type-asks li { padding: .45rem 0 0; column-gap: 1.25rem; }
.type-asks li > span { flex-basis: 100%; }
.type-asks li + li { border-top: 1px solid rgb(var(--gold-rgb) / .16); }
.type-asks-more > summary { display: flex; align-items: center; min-height: 44px; border-top: 1px solid rgb(var(--gold-rgb) / .16); cursor: pointer; list-style: none; }
.type-asks-more > summary::-webkit-details-marker { display: none; }
.type-asks-more > summary::after { content: "\00a0\203A"; }
.type-asks-more[open] > summary { display: none; }
.type-asks-more ul { border-top: 1px solid rgb(var(--gold-rgb) / .16); }
.type-asks-why { margin: .15rem 0 0; color: var(--muted); font-size: .86rem; }
.settle h3 { margin: 0 0 .25rem; font-family: var(--sans); font-size: 1.02rem; font-weight: 600; letter-spacing: 0; }
.settle p { margin: 0 0 .75rem; color: var(--muted); }
.settle-types { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .9rem; }
.settle-types .btn { margin: 0; }
.settle-types a { display: inline-flex; align-items: center; min-height: 44px; }
.looked { margin: 0 0 .8rem; padding: .2rem 1rem; list-style: none; }
.looked li { display: grid; gap: .15rem; padding: .7rem 0; border-top: 1px solid var(--line); }
.looked li:first-child { border-top: 0; }
.looked span, .looked small { color: var(--muted); }

/* What changed, a line for each thing: what it was, and what it is now. */
.looked-what { display: grid; gap: .1rem; margin: 0; padding: 0; list-style: none; color: var(--muted); }
.looked .looked-what li { display: block; padding: 0; border: 0; }
.looked button.link { justify-self: start; min-height: 44px; }

/*
    Wine trips: the trips that have been planned, and one trip a day at a time. Every class here begins wt-, since a
    trip off a rack (above) has its own .trip.
*/
.hub-trip { margin: 0 0 .9rem; }

/* The trips that have been planned, each a card to open. */

.wt-form { display: grid; gap: .1rem; padding: 1rem; }
.wt-form h2 { margin: 0 0 .15rem; font-size: 1.32rem; }
.wt-form p { margin: 0 0 .7rem; }
.wt-form .field { margin-bottom: .7rem; }
.wt-form .field small { margin-top: .35rem; }
.wt-row { display: grid; grid-template-columns: minmax(0, 7.2rem) minmax(0, 1fr); gap: .75rem; }
details.wt-new > summary { display: flex; align-items: center; gap: .8rem; min-height: 48px; font-family: var(--serif); font-size: 1.32rem; list-style: none; cursor: pointer; }
details.wt-new > summary::-webkit-details-marker { display: none; }
/* A plus when it is shut and a minus when it is open: a place to press, which the same row as a heading was not. */
details.wt-new > summary::before {
    content: "+";
    display: grid;
    flex: none;
    place-items: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 50%;
    background: var(--gold);
    color: var(--bg);
    font-size: 1.6rem;
    line-height: 1;
}
details.wt-new[open] > summary::before { content: "\2212"; }
details.wt-new[open] > summary { margin-bottom: .6rem; }

/* The head of a trip: where it is, what it is called, and what it comes to. */
.wt-head { margin: 0 0 1rem; }
.wt-area { margin: 0 0 .35rem; color: var(--gold-bright); font-size: .74rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.wt-title { margin: 0 0 .5rem; font-size: 2rem; line-height: 1.08; }
.wt-summary { margin: 0 0 .8rem; font-size: .98rem; line-height: 1.5; }
.wt-meta { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; }
.wt-meta span { padding: .2rem .75rem; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--muted); font-size: .82rem; }

/* What can be done with a trip: send it, add a day, and the less usual in a menu. */
.wt-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1rem; }
.wt-actions > form { display: contents; }
.wt-actions .btn { flex: 1 1 8rem; min-height: 46px; margin: 0; }
.wt-menu { position: relative; flex: 0 0 auto; }
.wt-menu > summary {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    min-height: 46px;
    padding: 0 .9rem;
    border: 1px solid var(--line-strong);
    border-radius: 15px;
    color: var(--text);
    font-weight: 600;
    list-style: none;
    cursor: pointer;
}
.wt-menu > summary::-webkit-details-marker { display: none; }
.wt-menu-list {
    position: absolute;
    right: 0;
    top: calc(100% + .4rem);
    z-index: 4;
    min-width: 15rem;
    padding: .35rem;
    border: 1px solid var(--line-strong);
    border-radius: 16px;
    background: var(--surface-raised);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .6);
}
.wt-menu-list form { margin: 0; }
.wt-menu-list a, .wt-menu-list button {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 46px;
    padding: 0 .8rem;
    border: 0;
    border-radius: 10px;
    background: none;
    color: var(--text);
    font: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}
.wt-menu-list .is-danger { color: var(--danger); }

/* The days, to move between. With the script, only the day chosen is shown; without it, every day is, one under another. */
.wt-tabs {
    position: sticky;
    top: calc(env(safe-area-inset-top) + 51px);
    z-index: 3;
    display: flex;
    gap: .45rem;
    margin: 0 calc(var(--gutter) * -1) 1rem;
    padding: .55rem var(--gutter);
    overflow-x: auto;
    background: rgb(var(--bg-rgb) / .92);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.wt-tabs a {
    display: inline-flex;
    flex: none;
    align-items: center;
    min-height: 42px;
    padding: 0 1.05rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    color: var(--muted);
    font-size: .94rem;
    font-weight: 600;
    text-decoration: none;
}
.wt-tabs a[aria-current="true"] { border-color: var(--text); background: var(--text); color: var(--bg); }

.wt-day { margin: 0 0 1.8rem; scroll-margin-top: calc(env(safe-area-inset-top) + 7rem); }
.wt-day[hidden] { display: none; }
.wt-day-head { display: grid; gap: .2rem; margin: 0 0 .8rem; }
.wt-day-n { margin: 0; color: var(--gold-bright); font-size: .74rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.wt-day h2 { margin: 0; font-size: 1.4rem; line-height: 1.2; }

/* A picture, with nothing written on it. */
.wt-photo { position: relative; margin: 0; aspect-ratio: 16 / 9; background: var(--surface-raised); }
.wt-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Where a day goes, across the top of it: wider and shorter than the picture of a place, and rounded as a card is. */
.wt-banner { margin: 0 0 .8rem; overflow: hidden; border-radius: var(--radius); aspect-ratio: 2 / 1; }

/* A day is a list of places in order, each a row that opens to the place. The whole day can be read without scrolling past a picture. */
.wt-timeline { display: grid; gap: .1rem; margin: 0; padding: 0; list-style: none; }
.wt-drive { margin: .25rem 0 .35rem 4.7rem; color: var(--faint); font-size: .8rem; }
.wt-drive::before { content: "\2193\00a0\00a0"; }
.wt-card { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.wt-card[open] { border-color: var(--line-strong); }
.wt-card > summary { display: flex; align-items: center; gap: .7rem; min-height: 66px; padding: .6rem .85rem; list-style: none; cursor: pointer; }
.wt-card > summary::-webkit-details-marker { display: none; }
.wt-card > summary::after {
    content: "";
    flex: none;
    width: .5rem;
    height: .5rem;
    margin: 0 .2rem 0 .1rem;
    border-right: 2px solid var(--faint);
    border-bottom: 2px solid var(--faint);
    transform: rotate(45deg);
    transition: transform .15s;
}
.wt-card[open] > summary::after { transform: rotate(-135deg); }
.wt-when { flex: none; width: 3.6rem; color: var(--gold-bright); font-size: .8rem; font-weight: 600; line-height: 1.25; white-space: nowrap; font-variant-numeric: tabular-nums; }
.wt-thumb { position: relative; display: block; flex: none; width: 3rem; height: 3rem; overflow: hidden; border-radius: 10px; background: var(--surface-raised); }
.wt-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* A place with no picture keeps its square, so the names of a day stand in one line; a small gold mark is all it holds. */
.wt-thumb.is-empty::after { content: ""; position: absolute; top: 50%; left: 50%; width: .45rem; height: .45rem; margin: -.225rem 0 0 -.225rem; border-radius: 50%; background: var(--gold); opacity: .55; }
.wt-what { display: grid; flex: 1; gap: .08rem; min-width: 0; }
.wt-what b { font-family: var(--serif); font-size: 1.06rem; font-weight: 400; line-height: 1.22; overflow-wrap: anywhere; }
.wt-what small { margin: 0; color: var(--muted); font-size: .8rem; line-height: 1.3; }
.wt-card.is-maybe .wt-what small { color: var(--faint); }

.wt-body { display: grid; gap: .7rem; padding: 0 1rem 1rem; }
.wt-body .wt-photo { margin: 0 -1rem; }
.wt-why, .wt-try { margin: 0; font-size: .97rem; line-height: 1.5; }
.wt-try b, .wt-lunch b { margin-right: .5rem; color: var(--faint); font-size: .68rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.wt-label { margin: .1rem 0 -.35rem; color: var(--faint); font-size: .68rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.wt-yours { display: grid; gap: 0; margin: .1rem 0 0; padding: 0; list-style: none; }
.wt-yours li { display: grid; grid-template-columns: .7rem minmax(0, 1fr); gap: .65rem; align-items: start; padding: .4rem 0; }
.wt-yours .dot { margin-top: .42rem; }
.wt-yours a { color: var(--text); font-weight: 500; text-decoration: none; }
.wt-yours small { margin-top: .05rem; }
.wt-body .wt-yours { margin: 0; }
.wt-facts { display: grid; gap: .4rem; margin: 0; }
.wt-facts div { display: grid; grid-template-columns: 4.4rem minmax(0, 1fr); gap: .5rem; }
.wt-facts dt { padding-top: .2rem; color: var(--faint); font-size: .68rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.wt-facts dd { margin: 0; font-size: .92rem; line-height: 1.4; }
.wt-unknown { margin: 0; color: var(--muted); font-size: .86rem; }
.wt-seen { margin: 0; color: var(--faint); font-size: .8rem; }
.wt-links { display: flex; flex-wrap: wrap; gap: 0 1.3rem; margin: 0; }
.wt-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--gold-bright); font-size: .92rem; font-weight: 500; text-decoration: none; }

/* Changing a place: a step earlier, a step later, or out. Quiet, and a form each, so that it works without the script. */
.wt-edit { display: flex; flex-wrap: wrap; gap: 0 1.2rem; margin: 0; padding-top: .2rem; border-top: 1px solid var(--line); }
.wt-edit form { margin: 0; }
.wt-edit button { min-height: 44px; font-size: .88rem; }
.wt-edit .is-danger { color: var(--danger); }

.wt-lunch { margin: .85rem 0 0; padding: .75rem 1rem; border-left: 2px solid var(--gold); border-radius: 0 12px 12px 0; background: var(--surface); font-size: .96rem; line-height: 1.5; }

/* A place that has closed since the trip was planned: struck out where it was, with the way to find another at the top of its card. */
.wt-card.is-closed summary b { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.wt-card.is-closed .wt-thumb img { filter: grayscale(1); opacity: .6; }
.wt-closed { display: grid; gap: .6rem; justify-items: start; margin: 0; padding: .75rem 1rem; border-left: 2px solid var(--danger); border-radius: 0 12px 12px 0; background: var(--surface); }
.wt-closed p { margin: 0; font-size: .92rem; line-height: 1.45; }
.wt-closed form { margin: 0; }

/* A place the day was planned with and lost because it had closed: said quietly, under the day's places. */
.wt-left { margin: .7rem 0 0; color: var(--muted); font-size: .88rem; line-height: 1.45; }
.wt-left b { margin-right: .5rem; color: var(--faint); font-size: .68rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }

/* What is to be read when it is wanted: the wines of yours from there, what was left out, what is worth knowing. */
.wt-fold { margin: 0 0 .6rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.wt-fold > summary { display: flex; align-items: center; justify-content: space-between; min-height: 54px; padding: 0 1rem; font-weight: 600; list-style: none; cursor: pointer; }
.wt-fold > summary::-webkit-details-marker { display: none; }
.wt-fold > summary::after {
    content: "";
    width: .5rem;
    height: .5rem;
    border-right: 2px solid var(--faint);
    border-bottom: 2px solid var(--faint);
    transform: rotate(45deg);
    transition: transform .15s;
}
.wt-fold[open] > summary::after { transform: rotate(-135deg); }
.wt-fold-body { padding: 0 1rem 1rem; }
.wt-fold-body > .muted { margin: 0 0 .5rem; font-size: .9rem; }
.wt-skips { display: grid; gap: .7rem; margin: 0; padding: 0; list-style: none; }
.wt-skips li { padding-left: .9rem; border-left: 1px solid var(--line-strong); }
.wt-skips small { margin-top: .15rem; }
.wt-tips { display: grid; gap: .4rem; margin: 0; padding-left: 1.1rem; }
.wt-checked { margin: 1rem 0 1.1rem; color: var(--muted); font-size: .84rem; line-height: 1.45; }

.wt-credits { margin: 0 0 1.1rem; color: var(--faint); font-size: .8rem; line-height: 1.4; }
.wt-credits summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; }
.wt-credits ul { display: grid; gap: .45rem; margin: 0 0 .4rem; padding: 0; list-style: none; }
.wt-credits li { display: grid; gap: .05rem; }
.wt-credits a { color: var(--muted); }

/*
   A trip being put together. It is shown as soon as it is outlined, every place named at its time, and each part fills in as it is
   looked up. A part that can change is a piece, which has no box of its own, so that the page is laid out as a finished trip is.
   One glass at the top fills as the places come back; a place still coming has a quiet gold sheen where its words will be.
*/
.wt-piece { display: contents; }

.wt-progress { display: flex; align-items: center; gap: .9rem; margin: 0 0 1rem; padding: .7rem .95rem; border: 1px solid rgb(var(--gold-rgb) / .32); border-radius: var(--radius); background: var(--surface); }
.wt-progress-glass { flex: none; width: 30px; height: 42px; overflow: visible; }
.wt-progress-line { fill: none; stroke: var(--gold); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.wt-progress-wine { fill: url(#wt-wine); transition: transform .9s cubic-bezier(.2, .7, .2, 1); }
.wt-progress-words { display: grid; flex: 1; gap: .2rem; min-width: 0; }
.wt-progress-words p { margin: 0; }
.wt-progress-words b { font-family: var(--serif); font-size: 1.04rem; font-weight: 400; }
.wt-progress-count { color: var(--muted); font-size: .82rem; font-variant-numeric: tabular-nums; }
.wt-progress-bar { height: 3px; margin-top: .2rem; overflow: hidden; border-radius: 99px; background: var(--line); }
.wt-progress-bar i { display: block; height: 100%; border-radius: inherit; background: var(--gold); transition: width .9s cubic-bezier(.2, .7, .2, 1); }

.wt-card.is-pending { border-style: dashed; border-color: rgb(var(--gold-rgb) / .28); }
.wt-banner.is-waiting,
.wt-thumb.is-loading,
.wt-skeleton i {
    background: linear-gradient(100deg, var(--surface-raised) 30%, rgb(var(--gold-rgb) / .2) 50%, var(--surface-raised) 70%) 0 0 / 300% 100%;
    animation: wt-sheen 1.7s ease-in-out infinite;
}
.wt-looking span {
    background: linear-gradient(90deg, var(--muted) 20%, var(--gold-bright) 50%, var(--muted) 80%) 0 0 / 250% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: wt-sheen 2s linear infinite;
}
.wt-skeleton { display: grid; gap: .5rem; margin: .1rem 0 .9rem; }
.wt-skeleton i { display: block; height: .62rem; border-radius: 99px; }
.wt-skeleton i:nth-child(2) { width: 84%; }
.wt-skeleton i:nth-child(3) { width: 56%; }
@keyframes wt-sheen { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* What has just come back arrives, and what has gone fades: nothing jumps. */
.is-new { animation: wt-arrive .5s ease-out both; }
.is-leaving { opacity: 0; transition: opacity .3s ease; }
@keyframes wt-arrive { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
    .wt-banner.is-waiting, .wt-thumb.is-loading, .wt-skeleton i, .wt-looking span, .is-new { animation: none; }
    .wt-looking span { color: var(--muted); background: none; }
    .wt-progress-wine, .wt-progress-bar i { transition: none; }
}

/* Places Kept suggests: a card for each, with its picture, and a button that plans it. */
.wt-ideas > h2 { margin-top: 1.4rem; }
.wt-idea { margin: 0 0 1rem; overflow: hidden; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); }
.wt-idea .wt-body { padding-top: 1rem; }
.wt-idea .wt-body header { display: grid; gap: .2rem; }
.wt-idea h3 { margin: 0; font-family: var(--serif); font-size: 1.4rem; font-weight: 400; line-height: 1.2; }
.wt-eyebrow { display: flex; flex-wrap: wrap; gap: .1rem .85rem; margin: 0; font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.wt-time { color: var(--gold-bright); }
.wt-verdict { color: var(--muted); }
.wt-where { margin: 0; color: var(--muted); font-size: .88rem; }
.wt-idea form { margin: .2rem 0 0; }

/* What is only for paper is not on the screen. */
.wt-print-only { display: none; }

/* Printed, a trip is every day with every place open, and none of the buttons. */
@media print {
    .wt-tabs, .wt-actions, .wt-edit, .topbar, .tabbar, .plan-change, .plan-changed { display: none !important; }
    .wt-day[hidden] { display: block !important; }
    .wt-card { break-inside: avoid; }
    /* A picture is a strip on paper, so that a day is not a run of pages of photographs. */
    .wt-photo { aspect-ratio: auto; height: 46mm; }
}

/* Opened, a place shows its picture large, and the small one in its line gives way to it: each picture is shown once. */
.wt-card > summary .wt-thumb { transition: width .25s ease, margin .25s ease, opacity .2s ease; }
.wt-card:not(.is-pending)[open] > summary .wt-thumb:has(img) { width: 0; margin-right: -.7rem; opacity: 0; }

/* A name that has no room beside a larger place's is let go, and comes back as the map is pinched closer. */
.map-name { transition: opacity .15s; }
svg.map[data-home="1"] .map-lead, svg.map[data-home="1"] .map-home { display: none; }
.map-name.is-quiet, .map-ghost-name.is-quiet, .map-belt-name.is-quiet { opacity: 0; }

/* The places of a map that are off its screen, in the sheet, each a tap away. */
.map-away { margin: .15rem 0 .7rem; color: var(--muted); font-size: .84rem; line-height: 1.5; }
.map-away a { color: var(--gold-bright); white-space: nowrap; text-underline-offset: 3px; }

/*
    "What's this?": a small mark beside a word worth a few lines, and the sheet it opens (words.js). The mark has no
    room of its own to take: it is the size of a letter, with a larger place to tap round it. The sheet comes up
    from the bottom of a phone, over the page, and puts itself away on a tap behind it.
*/
.word {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 1.1rem;
    height: 1.1rem;
    margin-left: .45rem;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    color: var(--muted);
    font-size: .7rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    vertical-align: .08em;
}
.word::after { content: ""; position: absolute; inset: -.7rem; }
.word:hover, .word:focus-visible { border-color: var(--gold-bright); color: var(--gold-bright); }

/* A word worth a few lines is its own way to them, drawn with a dotted line, so that it takes no room a mark would. */
.word-text { color: inherit; white-space: nowrap; text-decoration: underline dotted var(--faint); text-decoration-thickness: 1px; text-underline-offset: .28em; }
.word-text:hover, .word-text:focus-visible { text-decoration-color: var(--gold-bright); }

.wine-links { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 1.1rem; }
.wine-links .link { padding: 0; }

.words {
    inset: auto 0 0 0;
    width: min(100%, 32rem);
    max-height: min(86vh, 40rem);
    margin: 0 auto;
    padding: 1.3rem 1.4rem 0;
    overflow: auto;
    border: 1px solid var(--line-strong);
    border-bottom: 0;
    border-radius: 24px 24px 0 0;
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 -20px 60px rgba(0, 0, 0, .55);
}
.words:focus { outline: none; }
.words::backdrop { background: rgba(6, 5, 5, .72); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.words[open] { animation: words-in .28s cubic-bezier(.2, .8, .2, 1); }
.words section[hidden] { display: none; }
.words h2 { margin: 0 0 .55rem; font: 400 1.4rem/1.2 var(--serif); }
.words p { margin: 0 0 .7rem; font-size: .97rem; line-height: 1.5; }
.words b { font-weight: 600; }
/* The way out stays in reach however long the words are: it is pinned to the foot of the sheet. */
.words-foot {
    position: sticky;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: .5rem -1.4rem 0;
    padding: .7rem 1.4rem calc(1rem + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: var(--surface);
}
.words-foot a { color: var(--gold-bright); font-size: .92rem; }
.words-close { min-height: 44px; margin-left: auto; padding: 0 1.5rem; border: 1px solid var(--line-strong); border-radius: 999px; background: transparent; color: var(--text); font: inherit; cursor: pointer; }
.words-close:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 2px; }
html.has-words { overflow: hidden; }

/* Where each fact of a wine came from: what it is, in a few words who says so, and how to change it. */
.origin-list { display: grid; margin: 0 0 .3rem; padding: 0; list-style: none; }
.origin-list li { display: grid; grid-template-columns: 5rem minmax(0, 1fr); gap: .05rem .8rem; padding: .7rem 0; border-top: 1px solid var(--line); }
.origin-list li:first-child { border-top: 0; }
.origin-what { padding-top: .3rem; color: var(--faint); font-size: .68rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.origin-value { font-weight: 500; line-height: 1.35; overflow-wrap: anywhere; }
.origin-from { grid-column: 2; color: var(--muted); font-size: .88rem; }
.origin-from.from-you { color: var(--text); }
.origin-list small { grid-column: 2; margin: 0; color: var(--muted); font-size: .84rem; line-height: 1.4; }
.origin-list small a { margin-left: .35rem; color: var(--gold-bright); text-underline-offset: 3px; white-space: nowrap; }
.origin-list small a:first-child { margin-left: 0; }
.origin-note { margin: .6rem 0 .2rem; color: var(--muted); font-size: .88rem; }

@keyframes words-in { from { translate: 0 28px; opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .words[open] { animation: none; } }

/* The flavour wheel as something to choose with: it turns, a word lights, and the wines that have it are named under it. */
.flavour-picker { display: grid; gap: 1rem; }
.flavour-picker .taste-wheel { width: 100%; max-width: 26rem; margin-inline: auto; touch-action: pan-y pinch-zoom; cursor: grab; user-select: none; -webkit-user-select: none; }
.flavour-picker .taste-wheel:active { cursor: grabbing; }
.flavour-picker.is-live a[data-word] { cursor: pointer; }
.flavour-picker a[data-word] .taste-piece { transition: opacity .2s, stroke-width .2s; }
.flavour-picker[data-picks] a[data-word]:not(.is-picked) { opacity: .5; }
.flavour-picker a[data-word].is-picked .taste-piece { fill-opacity: 1; stroke: var(--gold-bright); stroke-width: 2.4; }
.flavour-picker a[data-word]:focus-visible .taste-piece { stroke: var(--text); stroke-width: 2.4; }

.flavour-tray { display: grid; gap: .6rem; }
.flavour-hint { margin: 0; text-align: center; color: var(--muted); font-size: .95rem; }
.flavour-chosen { margin: 0; color: var(--text); font-size: .95rem; line-height: 1.4; }
.flavour-wines { display: grid; gap: .45rem; margin: 0; padding: 0; list-style: none; }
.flavour-wines a { display: grid; grid-template-columns: .7rem minmax(0, 1fr) auto; gap: .2rem .75rem; align-items: center; min-height: 54px; padding: .5rem .8rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text); text-decoration: none; }
.flavour-wines a:hover, .flavour-wines a:focus-visible { border-color: var(--line-strong); }
.flavour-wine { display: grid; gap: .05rem; min-width: 0; }
.flavour-wine b { font-weight: 600; font-size: .96rem; line-height: 1.25; overflow-wrap: anywhere; }
.flavour-wine small { margin: 0; color: var(--muted); font-size: .8rem; }
.flavour-more { padding: .2rem .4rem; color: var(--muted); font-size: .86rem; }
/* A flavour found in several kinds: each kind's drinks under its own name. */
.flavour-kind { margin: .55rem 0 0; padding: 0 .4rem; color: var(--gold-bright); font: 600 .74rem var(--sans); letter-spacing: .14em; text-transform: uppercase; }
.flavour-kind:first-child { margin-top: 0; }
.flavour-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0; font-size: .92rem; }
.flavour-foot a { color: var(--gold-bright); text-underline-offset: 3px; }

/* On the hub the wheel has its own place, above the cards, and a heading of its own. */
.hub-wheel { margin: 0 0 1.6rem; padding: 1.1rem 1rem 1rem; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.hub-wheel h2 { margin: 0 0 .25rem; font-size: 1.4rem; }
.hub-wheel > .muted { margin: 0 0 .8rem; font-size: .94rem; }
.hub-wheel-more { margin: .4rem 0 0; text-align: center; }
.hub-wheel-more a { color: var(--gold-bright); font-size: .92rem; text-underline-offset: 3px; }
/* The heading above the wheel already says what to do, so the tray stays empty until a flavour is chosen. */
.hub-wheel .flavour-hint { display: none; }
.hub-wheel .flavour-picker { gap: .6rem; }

/* The card of the map is a map you can read: lit land, and the places with most bottles named beside their marks. */
.hub-map .map-sea { fill: #080c0f; }
.hub-map .map-land { fill: #3d322d; stroke: rgb(var(--gold-bright-rgb) / .55); }
.map-place { fill: var(--text); font: 600 11px var(--sans); paint-order: stroke; stroke: rgba(8, 12, 15, .9); stroke-width: 3px; stroke-linejoin: round; pointer-events: none; }

/* A change Ask Kept offers: what it would do, and the button that does it. */
.proposal { display: grid; gap: .5rem; padding: 1rem 1.1rem; border: 1px solid var(--line-strong); border-radius: 18px; background: var(--surface); }
.proposal strong { font: 400 1.15rem/1.3 var(--serif); }
.ask-photo-take { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; width: 100%; min-height: 52px; margin-top: .3rem; cursor: pointer; }
.ask-photo-take input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.ask-photo-take svg { width: 1.35rem; height: 1.35rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.ask-photo.is-ready button[type="submit"] { display: none; }
.proposal-lines { margin: 0; padding-left: 1.1rem; color: var(--muted); font-size: .95rem; line-height: 1.5; }
.proposal-lines li:first-child { color: var(--text); }
.proposal-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.2rem; margin-top: .3rem; }
.proposal-actions a { color: var(--gold-bright); text-underline-offset: 3px; }
.proposal-done { margin: 0; color: var(--text); }
.proposal.is-done { border-color: var(--ok); }

/* Ask Kept, in the bar of every page of a cellar, beside the gear: the bubble and the word, so that it says what it is. */
.ask-link { width: auto; grid-auto-flow: column; gap: .3rem; padding: 0 .75rem 0 .6rem; border-color: rgb(var(--gold-rgb) / .45); border-radius: 999px; color: var(--gold-bright); text-decoration: none; }
.ask-word { font-size: .84rem; font-weight: 600; line-height: 1; }
/* On the narrowest phones the word gives its room back to the cellar's name, and the bubble is a circle again. */
@media (max-width: 22.4rem) { .ask-word { display: none; } .ask-link { width: 36px; padding: 0; } }
.callout.offer.proposal { border-color: rgb(var(--gold-rgb) / .5); }
.callout.offer.proposal strong { color: var(--text); }
.callout.offer.proposal strong::after { content: none; }
.proposal-lines { list-style: none; padding: 0; }
.proposal.is-failed { border-color: rgba(255, 144, 134, .45); }

/* A wine whose year nobody has read: said quietly, with the way to give it. */
.year-unread { margin: .15rem 0 .4rem; font-size: .88rem; }
.year-unread a:not(.word) { color: var(--gold-bright); text-underline-offset: 3px; }
.year-note { margin-bottom: .6rem; }
.year-form { display: flex; align-items: center; gap: .6rem; margin: .4rem 0; }
.year-form input[type="number"] { width: 7rem; }

/* Saying how it tastes in your own words: a box under the wheel, and one in a wine's taste fields. */
.flavour-say { margin: .2rem 0 0; }
.flavour-heard { margin: .1rem 0 0; color: var(--muted); font-size: .92rem; line-height: 1.5; }
.taste-say { display: grid; gap: .4rem; margin: .6rem 0 1rem; }
.taste-say label { color: var(--muted); font-size: .9rem; }
.taste-say .ask-row { gap: .6rem; }

/* A date printed in numbers alone can be two days: the likelier is filled in and the other is offered on its own line. */
.pack-date-status .date-other { display: block; margin-top: .3rem; }
.empties-seen, .empties-done { display: grid; gap: .8rem; margin: 0 0 1.2rem; padding: 0; list-style: none; }
.empties-seen > li, .empties-done > li { display: grid; gap: .3rem; padding: .7rem 1rem; border: 1px solid var(--line); border-radius: 14px; }
.empties-take { display: flex; align-items: flex-start; gap: .65rem; min-height: 44px; cursor: pointer; }
.empties-take input { flex: none; width: 1.35rem; height: 1.35rem; margin-top: .1rem; accent-color: var(--gold); }
.empties-how { display: flex; flex-wrap: wrap; gap: .6rem .9rem; align-items: end; }
.empties-how label { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; font-size: .88rem; min-width: 0; }
.empties-how input { width: 4.5rem; min-height: 46px; }
.empties-how select { max-width: 100%; min-height: 46px; }
.empties-note { color: var(--muted); }
.empties-next { margin: 1rem 0; }
.case-said { display: block; margin-top: .3rem; }
.case-ask { margin-top: .4rem; }
.case-ask .chips { margin-top: .25rem; }
.case-ask .chip { min-height: 44px; min-width: 44px; }
.case-ask .chip[aria-pressed="true"] { border-color: var(--gold); }
.pack-date-status .date-which { display: block; margin-top: .3rem; }
.pack-date-status .date-which .chips { display: flex; flex-wrap: wrap; margin-top: .4rem; }
.pack-date-status .date-which .chip { min-height: 44px; }
.pack-date-status .date-old { display: block; margin-top: .3rem; color: var(--ink); font-weight: 600; }
.pack-date-status button.link { min-height: 44px; }

/* While what was said is put into the wheel's words, the hub glows, and a pointer shows which word the wheel came to rest on. */
.flavour-picker .taste-wheel .wheel-hub { transition: stroke-width .3s; }
.flavour-picker.is-whirling .taste-wheel .wheel-hub { stroke: var(--gold-bright); stroke-width: 3.2; }
.taste-wheel path.wheel-pointer { fill: var(--gold-bright); stroke: none; opacity: 0; transition: opacity .35s; pointer-events: none; }
.taste-wheel path.wheel-pointer.is-shown { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
    .flavour-picker .taste-wheel .wheel-hub, .taste-wheel path.wheel-pointer { transition: none; }
}

/* Said before a bottle is opened: it is the last of its year, and its year belongs to a run of the wine. A heads-up, not a stop. */
.heads-up { margin: 1.1rem 0; padding: .95rem 1.1rem 1rem; border: 1px solid rgb(var(--gold-rgb) / .45); border-radius: 16px; background: rgb(var(--gold-rgb) / .07); }
.heads-up strong { display: block; color: var(--text); font-weight: 600; line-height: 1.4; }
.heads-up p { margin: .45rem 0 0; color: var(--muted); line-height: 1.55; }
.heads-up a { display: inline-block; margin-top: .5rem; color: var(--gold-bright); font-weight: 600; }

/* The same, in a line on a Tonight card, before the tap. */
.pour-heads-up { margin: .6rem 0 0; color: var(--muted); font-size: .92rem; line-height: 1.5; }
.pour-heads-up strong { color: var(--text); font-weight: 600; }
.pour-heads-up a { margin-left: .35rem; color: var(--gold-bright); white-space: nowrap; }

/* A word that belongs to the number after it stays with it, so that a line never ends on "about". */
.keep-together { white-space: nowrap; }

/* The hint in a box for asking ends in an ellipsis where the box is too narrow for it, and is never cut in the middle of a word. */
input[type="text"], input[type="search"], input:not([type]), .ask-row input { text-overflow: ellipsis; }

/* Drinks to mix: the same sheet with a steel shaker in place of the bottle and a tumbler with ice in place of the glass. The
   shaker tips in, shakes for a moment with nothing coming out, and then pours, so the pour starts a second later than the
   bottle's does. It is a long stream into a tumbler with ice in it, and the shaker is whole and in sight, so it can only be
   what it is. When the work is done a slice of orange settles on the rim. */
.wait.is-cocktail .wait-level { transform: translateY(calc(92px - var(--done) * 50px)); }
.wait.is-cocktail .wait-wave { fill: url(#wait-spirit); }
.wait.is-cocktail .wait-wave.back { fill: #f5b26a; opacity: .55; }
.wait.is-cocktail .wait-stream, .wait.is-cocktail :is(.wait-swell, .wait-glug) { stroke: #eb9238; }
.wait.is-cocktail .wait-glint { stroke: rgb(255 238 214 / .55); }
.wait.is-cocktail .wait-ripple { stroke: #ffd9a8; }
.wait.is-cocktail .wait-stream { animation: wait-fall .6s ease-in 1.35s backwards, wait-thin 3.4s ease-in-out 2.1s infinite; }
.wait.is-cocktail .wait-glint { animation: wait-run 1.1s linear infinite, wait-show .3s linear 1.95s backwards; }
.wait.is-cocktail :is(.wait-swell, .wait-glug) { animation-delay: 2.1s; }
.wait.is-cocktail :is(.wait-swell, .wait-glug).second { animation-delay: 3.25s; }
.wait.is-cocktail :is(.wait-swell, .wait-glug).third { animation-delay: 3.85s; }
.wait.is-cocktail .wait-nod { animation-delay: 2.1s; }
.wait.is-cocktail .wait-bob { animation-delay: 2.72s; }
.wait.is-cocktail .wait-ripple { animation-delay: 2.72s; }
.wait.is-cocktail .wait-ripple.second { animation-delay: 3.87s; }
.wait.is-cocktail .wait-ripple.third { animation-delay: 4.47s; }
/* Reading how much is left: the one wait whose work measures a drink instead of making one, so nothing pours. A bottle stands
   still and a line of gold travels down it looking for where the drink ends, from the shoulder at the start to the surface as the
   answer arrives, which is the order the question is put in. The base and the shoulder are ticked off as it passes them. Nothing
   here moves on its own: the line is carried by --done, which the script moves, so it tells the truth about how far along the
   work is rather than running on a loop of its own. */
.wait.is-bottle .wait-read-glass { fill: rgb(214 226 217 / .5); }
.wait.is-bottle .wait-read-drink { fill: url(#wait-left); }
.wait.is-bottle .wait-read-surface { fill: #e0859c; opacity: .8; }
.wait.is-bottle .wait-read-punt { fill: rgb(214 226 217 / .85); }
.wait.is-bottle .wait-read-shine { fill: #fff; opacity: .3; }
.wait.is-bottle .wait-read-cap { fill: #6b1230; }
.wait.is-bottle .wait-read-label { fill: #f3eee2; opacity: .9; }
.wait.is-bottle .wait-read-tick { fill: none; stroke: var(--gold-bright); stroke-width: 2; stroke-linecap: round; opacity: 0; }
.wait.is-bottle .wait-read-finder { transform: translateY(calc(52px + var(--done) * 44px)); }
.wait.is-bottle .wait-read-scan { fill: none; stroke: var(--gold-bright); stroke-width: 2.2; stroke-linecap: round; }
.wait.is-bottle .wait-read-beam { fill: var(--gold-bright); opacity: .16; }

/* The marks land in the order they are looked for, the base first, and stay once they are found. */
@media (prefers-reduced-motion: no-preference) {
    .wait.is-bottle .wait-read-tick.base { animation: wait-found .4s ease-out .5s forwards; }
    .wait.is-bottle .wait-read-tick.shoulder { animation: wait-found .4s ease-out 1.3s forwards; }
    .wait.is-bottle .wait-read-beam { animation: wait-beam 2.1s ease-in-out infinite; }
}

@media (prefers-reduced-motion: reduce) {
    .wait.is-bottle .wait-read-tick { opacity: .9; }
}

@keyframes wait-found { from { opacity: 0; transform: translateX(-3px); } to { opacity: .9; transform: none; } }
@keyframes wait-beam { 0%, 100% { opacity: .1; } 50% { opacity: .26; } }

/* Settling on the surface when the answer is there, the way the glass settles when it is full. */
.wait.is-bottle.is-done .wait-read-finder { transition: transform .5s ease-out; }

.wait-shake { transform-origin: 0 0; animation: wait-shake .09s ease-in-out .5s 9 alternate; }
@keyframes wait-shake { from { transform: translate(-2px, 1.5px) rotate(-3.5deg); } to { transform: translate(2px, -1.5px) rotate(3.5deg); } }
.wait-shaker-body { fill: #c4cad4; stroke: #eef1f5; stroke-width: 1.4; stroke-linejoin: round; }
.wait-shaker-cap { fill: #9aa3ae; }
.wait-shaker-band { fill: none; stroke: var(--gold-bright); stroke-width: 1.4; opacity: .85; }
.wait-shaker-shine { fill: none; stroke: rgb(255 255 255 / .8); stroke-width: 1.8; stroke-linecap: round; }
.wait-ice rect { fill: rgb(214 238 255 / .26); stroke: rgb(255 255 255 / .72); stroke-width: 1; }
.wait-ice-shine { fill: none; stroke: rgb(255 255 255 / .85); stroke-width: 1.2; stroke-linecap: round; }
.wait-garnish { opacity: 0; transform-box: fill-box; transform-origin: center; transform: scale(.55); transition: opacity .4s ease-out, transform .5s cubic-bezier(.2, .9, .3, 1.3); }
.wait.is-done .wait-garnish { opacity: 1; transform: none; }
.wait.is-done .wait-shake, .wait.is-stopped .wait-shake { animation: none; }
@media (prefers-reduced-motion: reduce) {
    .wait-shake { animation: none; }
}

/* The wheel's knob: a button over the hub, with the arrows that say it turns. A finger on it never scrolls the page, and a finger
   on the rest of the wheel always does. */
.wheel-stage { position: relative; width: 100%; max-width: 26rem; margin-inline: auto; }
.flavour-picker .wheel-stage .taste-wheel { max-width: none; margin: 0; }
.wheel-knob { position: absolute; left: 50%; top: 50%; width: 27.4%; aspect-ratio: 1; translate: -50% -50%; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--gold-bright); cursor: grab; touch-action: none; -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; }
.wheel-knob:active { cursor: grabbing; }
.wheel-knob svg { display: block; width: 100%; height: 100%; opacity: .6; transition: opacity .2s; }
.wheel-knob:hover svg, .wheel-knob:focus-visible svg { opacity: 1; }
.wheel-knob:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; }

.wait.is-cocktail .wait-shine { stroke: rgb(255 255 255 / .5); }

/* Ask Kept as a conversation: the replies the answer suggests, the name of the conversation, and the earlier ones. */
.talk-replies { margin-top: 1rem; }
.talk-replies .chip { color: var(--text); }
.talk-title { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .3rem .9rem; align-items: baseline; margin: 0 0 .6rem; color: var(--muted); font-size: .95rem; }
.talk-title span { color: var(--text); overflow-wrap: anywhere; }
.talk-offered { margin: 0; font-size: .92rem; }
.talk-earlier-heading { margin: 1.6rem 0 .5rem; font-size: 1rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }

/* Where a wine's cost comes from: the shops it was found priced at, each with its price and its page. */
details.priced { margin-top: .7rem; font-size: .95rem; }
details.priced > summary { cursor: pointer; color: var(--muted); }
details.priced ul { display: grid; gap: .4rem; margin: .6rem 0 .4rem; padding: 0; list-style: none; }
details.priced li { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem .7rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
details.priced li a { overflow-wrap: anywhere; }
details.priced li span { white-space: nowrap; }
details.priced .muted { margin: 0; font-size: .85rem; }

/* Retaking a label's photo: what the new one says that is different, to take or leave. */
.retake-photo { margin: 0 0 1rem; }
.retake-form { display: grid; gap: .9rem; }
.retake-list { display: grid; gap: .6rem; margin: 0; padding: 0; list-style: none; }
.retake-list .check { align-items: flex-start; }
.retake-list b { display: block; font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.retake-now { color: var(--muted); overflow-wrap: anywhere; }
.retake-photo-says { color: var(--text); overflow-wrap: anywhere; }
.retake-yours { display: block; margin-top: .15rem; color: var(--muted); }

/* What Kept has been doing: what is waiting, and a line for each thing done. */
.activity-now p { margin: 0 0 .6rem; }
.activity-now p:last-child { margin-bottom: 0; }
.activity-waiting { display: grid; gap: .35rem; margin: .4rem 0 .6rem; padding: 0; list-style: none; }
.activity-waiting li { display: flex; justify-content: space-between; gap: 1rem; }
.activity-day { margin: 1.4rem 0 .5rem; font-size: .95rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.activity-list { display: grid; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.activity-list li { display: grid; gap: .15rem; padding: .7rem .85rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.activity-meta { display: flex; gap: .6rem; align-items: baseline; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.activity-meta time { letter-spacing: 0; text-transform: none; }
.activity-subject { font-weight: 600; overflow-wrap: anywhere; }
.activity-said { color: var(--muted); overflow-wrap: anywhere; }

/* Kept at work: a small light by the words, and a note when new lines have come in below where the page is read. */
.activity-dot { display: inline-block; width: .55rem; height: .55rem; margin-right: .5rem; border-radius: 50%; background: var(--gold-bright); box-shadow: 0 0 0 0 rgb(var(--gold-bright-rgb) / .5); animation: activity-beat 1.6s ease-out infinite; vertical-align: .08em; }
@keyframes activity-beat { 70% { box-shadow: 0 0 0 .5rem rgb(var(--gold-bright-rgb) / 0); } 100% { box-shadow: 0 0 0 0 rgb(var(--gold-bright-rgb) / 0); } }
@media (prefers-reduced-motion: reduce) { .activity-dot { animation: none; } }
.activity-new { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .7rem; margin: 0 0 .8rem; padding: .35rem .85rem; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); font-size: .92rem; }
.activity-new[hidden] { display: none; }
.activity-new .link { min-height: 44px; }
/* A cost Kept did not write was left as it is: its owner can say to use the shops' price instead, on the wine and on the line. */
.cost-offer form { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .6rem; }
.cost-offer .link, .activity-offer .link { min-height: 44px; text-align: left; }

/* Where a cost no shop priced comes from, under it, and what would let Kept price it. */
.wine-facts li.cost-why, li.cost-why { display: block; color: var(--muted); font-size: .9rem; line-height: 1.5; }
.cost-why a { color: var(--gold-bright); }
.cost-wider { margin: .25rem 0 0; padding-left: 1.1rem; }
.list-head { margin: 1.6rem 0 .5rem; }
.cost-wider li { margin: .1rem 0; }
.cost-ask { margin-top: .5rem; }
/* What Kept asks, as taps: a cost's name, year or maker, and what to change in a plan or a trip. */
.cost-offers, .change-offers { display: flex; flex-wrap: wrap; gap: .4rem; }
.cost-offers .chip, .change-offers .chip { flex: 0 1 auto; max-width: 100%; min-height: 36px; padding: .3rem .75rem; background: none; border-color: rgb(var(--gold-rgb) / .4);
    color: var(--text); font: inherit; font-size: .85rem; line-height: 1.25; text-align: left; cursor: pointer; }
.cost-offers .chip:hover, .cost-offers .chip:focus-visible, .change-offers .chip:hover, .change-offers .chip:focus-visible { border-color: var(--gold-bright); color: var(--gold-bright); }
/* Typing a year, a name, a maker or a change is one more tap away: the chip opens to a field the width of the line. */
.cost-other, .change-other { flex: 0 1 auto; max-width: 100%; }
.cost-other[open], .change-other[open] { flex-basis: 100%; }
.cost-other summary, .change-other summary { list-style: none; color: var(--muted); border-style: dashed; }
.cost-other summary::-webkit-details-marker, .change-other summary::-webkit-details-marker { display: none; }
.cost-other[open] summary, .change-other[open] summary { border-style: solid; border-color: var(--gold); color: var(--text); }
.cost-other .cost-type, .change-other .change-type { margin-top: .4rem; }
.cost-type, .change-type { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.cost-type input { flex: 1 1 9rem; min-width: 0; min-height: 40px; font-size: .95rem; }
.cost-type .btn, .change-type .btn { flex: none; min-height: 40px; padding: 0 .9rem; font-size: .9rem; }
.change-type textarea { flex: 1 1 100%; min-width: 0; min-height: 3.2rem; font-size: .95rem; resize: vertical; }

/* After a plan or a trip: what to change, and the change it was made with, with the way back. */
.plan-change { margin: 1rem 0 1.25rem; }
.plan-change-ask { margin: 0 0 .5rem; color: var(--muted); font-size: .9rem; letter-spacing: .02em; }
.plan-change .talk-allowance { margin: -.3rem 0 .6rem; }
.plan-change-used { margin: 1rem 0 1.25rem; font-size: .9rem; }
.plan-changed { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .6rem; margin: .75rem 0 0; color: var(--muted); font-size: .9rem; }
.plan-changed .link { min-height: 44px; text-align: left; }
.activity-offer { margin: 0; }

/* The PIN lock: the page that asks for the PIN, and the padlock beside the settings. */
.lock-form { margin: 0; display: contents; }
button.gear { padding: 0; background: none; font: inherit; cursor: pointer; }
.gear.lock-link.is-shut { border-color: var(--gold); color: var(--gold-bright); }
/* The padlock is one more round button in the bar, so the bar gives its right side a little more of the width. */
.topbar-end:has(.lock-link) { max-width: 80%; }
.pin-form input[type="radio"], .pin-form input[type="checkbox"] { accent-color: var(--gold); }
.unlock { display: grid; justify-items: center; gap: .9rem; padding: 1.2rem 0 2rem; text-align: center; }
.unlock h1 { margin: 0; }
.unlock .summary { max-width: 30ch; margin: 0; }
.unlock-icon { width: 46px; height: 46px; fill: none; stroke: var(--gold-bright); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.unlock-form { display: grid; justify-items: center; gap: 1rem; width: 100%; max-width: 320px; margin: .4rem 0 0; }
.unlock-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.unlock-input { width: 100%; text-align: center; letter-spacing: .45em; font-size: 1.5rem; }
.unlock-input.is-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.unlock-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; width: 100%; }
.unlock-pad[hidden] { display: none; }
.unlock-dots { grid-column: 1 / -1; display: flex; justify-content: center; gap: .7rem; min-height: 1.1rem; margin-bottom: .3rem; }
.unlock-dots i { width: .85rem; height: .85rem; border: 1px solid var(--gold); border-radius: 50%; }
.unlock-dots i.is-on { background: var(--gold); }
.unlock-key { height: 66px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--text); font: 500 1.5rem/1 var(--sans); cursor: pointer; }
.unlock-key:active { background: var(--surface-raised); border-color: var(--gold); }
.unlock-go { border-color: var(--gold); color: var(--gold-bright); }
.unlock-erase { color: var(--muted); font-size: 1.2rem; }
.unlock-looking { margin: .2rem 0 0; }
.unlock-forgot { width: 100%; max-width: 320px; text-align: left; margin: .6rem 0 0; }
.pin-form { display: grid; gap: .8rem; }
.pin-form fieldset { margin: 0; padding: 0; border: 0; display: grid; gap: .5rem; }
.pin-form fieldset label, .pin-form .keep-on { display: grid; gap: .1rem; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 14px; }
.pin-form fieldset label:has(input:checked), .pin-form .keep-on:has(input:checked) { border-color: var(--gold); }
.pin-form fieldset label small, .pin-form .keep-on small { color: var(--muted); }
.pin-form legend { padding: 0; margin: 0 0 .1rem; font: 600 1rem/1.3 var(--sans); }
.pin-state { margin: 0; }
.add-friend { display: grid; gap: .5rem; margin-bottom: 1.2rem; }
.add-friend label { font-weight: 600; }
.add-friend-row { display: flex; gap: .6rem; }
.add-friend-row input { flex: 1; min-width: 0; }
.add-friend p { margin: 0; }

/* A screen waiting to be paired to a tasting: the code, large, with the drawing a phone is pointed at. */
.tv-pair { display: grid; justify-items: center; align-content: center; gap: 1.2rem; min-height: 80svh; padding: 1.5rem 1.2rem 2.5rem; text-align: center; }
.tv-pair .scene-kicker { color: var(--muted); }
.tv-pair h1 { margin: 0; font: 400 clamp(1.9rem, 5vw, 3.4rem)/1.1 var(--serif); text-wrap: balance; }
.tv-pair-body { display: grid; justify-items: center; gap: 1.6rem; }
.tv-code { margin: 0 0 1rem; color: var(--gold-bright); font: 600 clamp(2.4rem, 9vw, 4.8rem)/1 var(--sans); letter-spacing: .2em; }
.tv-steps { margin: 0; padding-left: 1.3rem; text-align: left; font-size: clamp(1.05rem, 2.3vw, 1.5rem); line-height: 1.5; }
.tv-small { margin: 0; color: var(--muted); font-size: clamp(.9rem, 1.6vw, 1.1rem); }
@media (min-width: 880px) {
    .tv-pair-body { grid-template-columns: auto auto; align-items: center; gap: 3.5rem; text-align: left; }
    .tv-pair-body .live-code { width: clamp(14rem, 22vw, 22rem); }
}
.where li .pair-choice { display: grid; gap: .15rem; width: 100%; padding: 1rem var(--gutter); border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }

/*
    Tastings and games. Three ways in, each saying what it includes, the tastings already set up with where each has got to,
    and the sheets that choose what to compare and which game to play. A choice is a card with a ring for its radio, ringed
    in gold when it is the one chosen.
*/
.play-ways { display: grid; gap: 10px; margin: 0 0 1.3rem; }
.play-way { display: grid; grid-template-columns: 34px minmax(0, 1fr); column-gap: 12px; row-gap: 3px; padding: 14px 14px 13px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--text); text-decoration: none; }
.play-way:hover, .play-way:focus-visible { border-color: var(--line-strong); }
.play-way:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 2px; }
.play-way .play-icon { grid-row: 1 / span 3; width: 30px; height: 30px; margin-top: 1px; }
.play-way strong { font-size: .98rem; font-weight: 600; line-height: 1.3; }
.play-way strong::after { content: " \203A"; color: var(--gold); }
.play-way > span { color: var(--muted); font-size: .84rem; line-height: 1.4; }
.play-has { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.play-has i { padding: 2px 9px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--muted); font-size: .74rem; font-style: normal; line-height: 1.5; }
.play-icon { flex: none; fill: none; stroke: var(--gold-bright); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.play-label { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin: 1.1rem 0 .55rem; }
.play-label h3 { margin: 0; color: var(--muted); font: 600 .72rem/1.3 var(--sans); letter-spacing: .16em; text-transform: uppercase; }
.play-label a { flex: none; color: var(--gold-bright); font-size: .86rem; text-decoration: none; }
.hub-play .play-ways + .play-label { margin-top: 0; }
.play-state { flex: none; padding: 3px 9px; border: 1px solid rgb(var(--gold-rgb) / .55); border-radius: 999px; color: var(--gold-bright); font-size: .72rem; font-weight: 600; line-height: 1.4; white-space: nowrap; }
.play-none { margin: .2rem 0 .8rem; color: var(--muted); font-size: .9rem; line-height: 1.45; }
.play-friends { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: .9rem 0 0; padding: 12px 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--text); text-decoration: none; }
.play-friends span { display: grid; gap: 2px; }
.play-friends strong { font-size: .94rem; font-weight: 600; }
.play-friends small { margin: 0; color: var(--muted); font-size: .81rem; }
.play-friends i { color: var(--gold); font-size: 1.25rem; font-style: normal; }
.idea-kind { display: flex; align-items: center; gap: .55rem; margin: 1.2rem 0 .15rem; font: 600 1rem/1.3 var(--sans); }
.idea-kind .play-icon { width: 22px; height: 22px; }
.idea-about { margin: 0 0 .6rem; font-size: .88rem; }
.explore-part .play-friends { margin-top: .4rem; }

.choice-kind { min-width: 0; margin: 0 0 1rem; padding: 0; border: 0; }
.choice-kind legend { display: flex; align-items: center; gap: .55rem; margin: 0 0 .1rem; padding: 0; font: 600 1rem/1.3 var(--sans); }
.choice-kind legend .play-icon, .choice-name .play-icon { width: 22px; height: 22px; }
.choice-about { margin: 0 0 .5rem; color: var(--muted); font-size: .84rem; line-height: 1.4; }
.choice { position: relative; display: grid; gap: 3px; margin: 0 0 8px; padding: 12px 14px 12px 46px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); cursor: pointer; }
.choice input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.choice::before { content: ""; position: absolute; top: 14px; left: 15px; width: 18px; height: 18px; box-sizing: border-box; border: 1.5px solid var(--line-strong); border-radius: 50%; }
.choice:has(input:checked) { border-color: var(--gold); background: rgb(var(--gold-rgb) / .07); }
.choice:has(input:checked)::before { border: 5px solid var(--gold); }
.choice:has(input:focus-visible) { outline: 2px solid var(--gold-bright); outline-offset: 2px; }
.choice-name { display: flex; align-items: center; gap: .5rem; font-size: .98rem; font-weight: 600; line-height: 1.3; }
.choice-rule { color: var(--muted); font-size: .85rem; line-height: 1.4; }
.choice-wines { color: var(--text); font-size: .9rem; line-height: 1.4; }
.choice-game .choice-wines { color: var(--gold-bright); font-size: .85rem; }
.choice-heads { color: var(--warn); font-size: .8rem; line-height: 1.4; }
.choice-names { display: inline-block; margin: -2px 0 10px 46px; color: var(--gold-bright); font-size: .84rem; text-decoration: underline dotted var(--faint); text-underline-offset: .28em; }
.choice-words { margin-top: .4rem; }
.theme .choice-heads { margin: 0; }

/* One tasting: how it is run, three ways together, and the details a row each underneath. */
.run-head { margin: 1.2rem 0 .7rem; }
.run-way { display: grid; gap: .5rem; margin: 0 0 .8rem; padding: 1rem 1rem 1.05rem; }
.run-way.is-on { border-color: var(--ok); }
.run-way h3 { display: flex; align-items: center; gap: .6rem; margin: 0; font: 600 1.02rem/1.3 var(--sans); }
.run-way h3 .play-icon { width: 24px; height: 24px; }
.run-way > p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.45; }
.run-way .btn { margin-top: .2rem; }
.run-now { color: var(--ok) !important; font-weight: 600; }
.run-link { justify-self: center; display: inline-flex; align-items: center; min-height: 40px; color: var(--gold-bright); font-size: .9rem; text-decoration: none; }
.run-link::after { content: "\203A"; margin-left: .35rem; }
.run-buttons { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .2rem; }
.run-buttons .btn { flex: 1 1 auto; margin: 0; padding: 0 1rem; white-space: nowrap; }
.run-tally, .run-also { margin: 0; color: var(--muted); font-size: .86rem; line-height: 1.5; }
.run-also .link { min-height: 32px; padding: 0 .1rem; font-size: .86rem; }
.run-way .plan-print-how { margin: 0; font-size: .8rem; }
.run-wait { margin: .1rem 0 0; }
.run-rows { margin: 1.2rem 0 0; border-top: 1px solid var(--line); }
.run-row { border-bottom: 1px solid var(--line); }
.run-row > summary { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 54px; font-weight: 600; list-style: none; cursor: pointer; }
.run-row > summary::-webkit-details-marker { display: none; }
.run-row > summary b { margin-left: auto; color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.run-row > summary::after { content: "\203A"; color: var(--faint); transition: rotate .2s; }
.run-row[open] > summary::after { rotate: 90deg; }
.run-row[open] { padding-bottom: .9rem; }
.run-row > .muted { margin: 0 0 .7rem; font-size: .9rem; }
.run-wines { margin: 0 0 .8rem; padding-left: 1.3rem; line-height: 1.45; }
.run-wines li { padding: .3rem 0; }
.run-wines a { color: inherit; font-weight: 500; text-decoration: none; }
.run-wines span { display: block; color: var(--muted); font-size: .84rem; }
.run-row .guests { margin-bottom: .8rem; }
.run-row .standings { margin-bottom: 0; }

/* A tasting's sheets and its flavour guide are for paper: each prints from its button, and none takes room on the screen. */
@media screen {
    main.page:has(> .run-head) > [data-sheet], main.page:has(> .run-head) > .guide { display: none; }
}

/* Where the table will watch a live tasting: three ways, each a card to tap. */
.watch-kicker { margin: 0 0 .2rem; color: var(--gold-bright); font-size: .72rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.hub-sheet header > div { min-width: 0; }
.watch-way { display: grid; grid-template-columns: 34px minmax(0, 1fr); column-gap: 12px; row-gap: 3px; margin: .8rem 0 0; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--text); text-decoration: none; }
.watch-way:hover, .watch-way:focus-visible { border-color: var(--gold); }
.watch-way .play-icon { grid-row: 1 / span 2; width: 30px; height: 30px; }
.watch-way strong { font-size: 1rem; font-weight: 600; }
.watch-way strong::after { content: " \203A"; color: var(--gold); }
.watch-way span { color: var(--muted); font-size: .86rem; line-height: 1.45; }
.watch-way b { color: var(--text); font-weight: 600; }
.watch-try { display: flex; justify-content: center; margin: .8rem auto 0; }

/* One grape, many names: each grape with every name it goes by, and the names that only look alike. */
.names-list { display: grid; gap: .1rem; margin: 0 0 .8rem; }
.names-list > div { padding: .5rem .55rem; border-radius: 10px; }
.names-list > div.is-this { background: rgb(var(--gold-rgb) / .12); box-shadow: inset 0 0 0 1px rgb(var(--gold-rgb) / .5); }
.names-list dt { color: var(--gold-bright); font-weight: 600; }
.names-list dd { margin: .1rem 0 0; color: var(--muted); font-size: .9rem; line-height: 1.45; }
.names-list dd b { color: var(--text); font-weight: 600; }
.words h3 { margin: 1rem 0 .4rem; font: 400 1.1rem/1.25 var(--serif); }
.names-apart dt { color: var(--text); }

/* A game on its plan, and on its printed sheets: the question asked of every glass, and the list it is answered from. */
.plan-game-list { margin: .2rem 0 0; color: var(--muted); line-height: 1.45; }
.plan-game-list b { color: var(--text); font-weight: 600; }
.plan-game-answers { margin-top: .4rem; }
.plan-game-answers .plan-list { margin: 0; padding: .2rem 0; }
.plan-game-answers li { display: grid; gap: .1rem; }
.plan-game-answers span { color: var(--gold-bright); }
.sheet-game { margin: 0 0 .7rem; color: #1c1513; font-size: .86rem; line-height: 1.4; }
.sheet-game b { margin-right: .4rem; font: 400 1rem/1.2 var(--serif); }
.sheet-game span { color: #5b4d47; }
/* The three lines under a glass at Two truths and a lie, numbered for the lie to be circled. */
.sheet .sheet-lines { display: none; }
.sheet.blind .sheet-lines { display: block; margin: .4rem 0 0; padding-left: 1.1rem; color: #1c1513; font-size: .74rem; line-height: 1.35; }
.sheet.blind .sheet-lines li + li { margin-top: .15rem; }

/* At a game, the list under each wine on the table's screen, so that everyone can see what they are choosing from. */
.live-game { display: grid; justify-items: center; gap: .4rem; max-width: 44rem; }
.live-ask { margin: 0; color: var(--gold-bright); font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.live-choices { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; margin: 0; padding: 0; list-style: none; }
.live-choices li { padding: .3rem .8rem; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--text); font-size: .9rem; }
.live-choices[hidden] { display: none; }
.live-choices.is-lines { flex-direction: column; align-items: stretch; }
.live-choices.is-lines li { border-radius: 12px; text-align: left; }
.live-game .game-map { width: min(100%, 40rem); cursor: default; }

/* Tonight's plan on the TV: a screen at a time, before the first pour, read from across a room. */
.live-tonight { gap: .5rem; text-align: center; }
.live-tonight-lines { display: grid; gap: .6rem; max-width: 46rem; margin: .8rem auto 0; padding: 0; list-style: none; color: var(--text); font-size: 1.1rem; line-height: 1.45; }
.live-tonight-lines li { text-wrap: balance; }
.live-tonight-dots { display: flex; justify-content: center; gap: .5rem; margin: 1.4rem 0 0; padding: 0; list-style: none; }
.live-tonight-dots li { width: .55rem; height: .55rem; border-radius: 50%; background: var(--line-strong); }
.live-tonight-dots li.is-on { background: var(--gold-bright); }
@media (min-width: 900px) {
    .live-tonight-lines { max-width: 70vw; gap: min(1rem, 2vh); font-size: clamp(1.1rem, min(2vw, 3.6vh), 2.3rem); }
    .live-tonight-dots li { width: min(.8rem, 1.4vh); height: min(.8rem, 1.4vh); }
}

/* On a television the list is read from across the room, so it is sized by the screen as the rest of the stage is. */
@media (min-width: 46rem) and (orientation: landscape) {
    .live-game { gap: min(.6rem, 1.2vh); max-width: 80vw; }
    .live-ask { font-size: clamp(.7rem, min(1.35vw, 2.6vh), 1.5rem); }
    .live-choices { gap: min(.7rem, 1.4vh); }
    .live-choices li { padding: min(.45rem, .9vh) min(1.1rem, 1.6vw); font-size: clamp(.85rem, min(1.7vw, 3.3vh), 1.9rem); }

    /* With the wheel beside the glasses the wine has half the screen, and the list takes less of it. */
    .live.has-face .live-game { max-width: 44vw; }
    .live.has-face .live-choices li { padding: min(.3rem, .6vh) min(.8rem, 1.1vw); font-size: clamp(.75rem, min(1.15vw, 2.3vh), 1.35rem); }
}

/* A night with no shared screen, on the host's phone: the link first, to send, and the code smaller, for whoever is beside them. */
.live-door.is-sent { gap: 1rem; }
.live-door.is-sent .live-link .btn { width: min(100%, 20rem); min-height: 50px; }
.live-code-small { display: grid; justify-items: center; gap: .35rem; }
.live-code-small .live-code { width: clamp(7rem, 34vw, 9rem); padding: .35rem; border-radius: 12px; }
.live-code-small span { color: var(--muted); font-size: .8rem; }
.live-seat { display: grid; gap: .6rem; width: min(100%, 26rem); margin: 1rem 0 0; text-align: left; }
.live-seat p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.45; }
.live-seat strong { color: var(--text); }
.live-seat-row { display: flex; gap: .5rem; }
.live-seat-row input { flex: 1; min-width: 0; }
.live-seat-row .btn { flex: none; min-height: 48px; }

/* A guest's phone at a game: the answer for the glass, tapped from the list. */
.seat-pick { width: 100%; min-width: 0; margin: 0 0 .7rem; padding: 0; border: 0; text-align: left; }
.seat-pick legend { margin: 0 0 .45rem; padding: 0; color: var(--text); font: 600 1rem/1.3 var(--sans); }
.seat-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; }
.seat-choice { min-height: 50px; padding: .4rem .7rem; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface); color: var(--text); font: 500 .95rem/1.2 var(--sans); overflow-wrap: anywhere; cursor: pointer; }
.seat-choice[aria-pressed="true"] { border-color: var(--gold); background: rgb(var(--gold-rgb) / .16); color: var(--gold-bright); font-weight: 600; }
.seat-choices[hidden] { display: none; }
/* Lines to choose from, such as the three at Two truths and a lie, one to a row and read from the left. */
.seat-choices.is-lines { grid-template-columns: minmax(0, 1fr); }
.seat-choices.is-lines .seat-choice { padding: .6rem .85rem; text-align: left; font-size: 1rem; line-height: 1.35; }

/*
    The map of Pin it on the map: the cellar map's sea and land, with no names on it, since a name would be an answer. A guest's pin is
    a drop of gold; on the reveal the right place is a ring, and everyone's pin carries their name.
*/
.game-map { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line-strong); touch-action: manipulation; cursor: crosshair; }
.game-map[hidden] { display: none; }
.game-map-sea { fill: #090d10; }
.game-map-land { fill: #2a2320; fill-rule: evenodd; stroke: rgb(var(--gold-bright-rgb) / .35); stroke-width: .8; stroke-linejoin: round; }
.game-pin path { fill: var(--gold); stroke: #120c08; stroke-width: 1.4; }
.game-pin circle { fill: #120c08; }
.game-pin.is-mine path { fill: var(--gold-bright); }
.game-pin text { fill: var(--text); font: 600 10px var(--sans); paint-order: stroke; stroke: #090d10; stroke-width: 3px; }
.game-pin-answer { fill: none; stroke: var(--gold-bright); stroke-width: 2.4; }
.game-pin-answer-dot { fill: var(--gold-bright); }
/* A pin lands with a little drop. The drop is on its shape, so that the group keeps the place it is put at. */
@media (prefers-reduced-motion: no-preference) {
    .js .game-pin.is-mine path, .js .game-pin.is-mine circle { animation: game-pin-drop .35s cubic-bezier(.3, 1.4, .5, 1) both; }
}
@keyframes game-pin-drop { from { transform: translateY(-14px); opacity: 0; } }
.seat-here { margin: .4rem 0 0; color: var(--gold-bright); }

/* A guest's phone at a night with no shared screen: the table, under the guest's own card. */
.seat-together { display: grid; justify-items: center; gap: .6rem; width: 100%; margin: 1.4rem 0 0; padding: 1.1rem 0 0; border-top: 1px solid var(--line); }
.seat-table-head { margin: 0; color: var(--muted); font: 600 .72rem/1.3 var(--sans); letter-spacing: .16em; text-transform: uppercase; }
.seat-story { display: grid; justify-items: center; gap: .7rem; width: 100%; margin: 0 0 .4rem; text-align: center; }
.seat-story > div { display: grid; gap: .4rem; }
.seat-story p, .seat-story ul { margin: 0; }
.seat-label { display: block; max-width: min(70%, 12rem); max-height: 14rem; border-radius: 12px; object-fit: contain; box-shadow: 0 14px 34px rgba(0, 0, 0, .55), 0 0 0 1px rgb(var(--gold-rgb) / .35); }
.seat-glasses { margin: 0; }
.seat-glasses li { --wide: min(4.4rem, calc((100vw - 3rem - (var(--across) - 1) * .8rem) / var(--across))); }
.seat-glasses .live-score { font-size: 1.4rem; }
.seat-count { margin: 0; color: var(--muted); }
.seat-wheel, .seat-night { display: grid; justify-items: center; gap: .6rem; width: 100%; }
.seat-wheel .wheel, .seat-night .wheel { width: min(100%, 22rem); max-width: none; }
.seat .taste-wheel .taste-piece { transition: fill-opacity .8s ease; }
.seat .taste-wheel .taste-piece.is-bloom { animation: piece-bloom 1s ease-out; }
.seat .taste-wheel .taste-piece.is-agreed { stroke: #fff6d8; stroke-width: 3; }
.seat .taste-wheel path.taste-expected { fill: var(--gold-bright); fill-opacity: 0; transition: fill-opacity .6s ease; }
.seat .taste-wheel path.taste-expected.is-expected { fill-opacity: 1; }
.seat-night .says-table { margin: 0; font: 400 1.2rem/1.3 var(--serif); text-align: center; }
.seat-reveal { width: min(100%, 20rem); margin: .8rem 0 0; }

/* The host's own seat: the night's one button at the foot of the screen, below the guest's own. */
.seat.is-host { padding-bottom: 4.5rem; }
.seat-host { position: fixed; left: 0; right: 0; bottom: 0; z-index: 7; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .6rem var(--gutter) calc(env(safe-area-inset-bottom) + .6rem); border-top: 1px solid var(--line); background: rgb(var(--bg-rgb) / .94); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.seat-host .link { color: var(--muted); font-size: .88rem; text-decoration: none; }
.seat-host .btn { min-height: 46px; }
.seat.is-host .seat-lock { bottom: 4.2rem; }

/* The reveal on a guest's own phone: their card is the one ringed, and the game's board reads as the quiz's does. */
.guest-card.is-mine { border-color: var(--gold); }
.scene-wait { font-size: .95rem; }
.game-board li { grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; }
.game-board strong { color: var(--gold-bright); }

/* Bottles bought and not here yet: the line under the cellar's count, the receipt page, the check page's parts for a receipt, and the list on the way. */
.hero-coming { margin: .7rem 0 0; color: var(--muted); font-size: .88rem; }
.hero-coming a { color: var(--text); text-decoration-color: rgb(var(--gold-rgb) / .5); text-underline-offset: .2em; }
.found-later { margin-top: .45rem; font-size: .92rem; }
.found-paid { max-width: 12rem; }
.receipt-note, .receipt-typed { margin-top: 1rem; }
.receipt-form.is-busy .receipt-note { display: none; }
.receipt-typed form { margin-top: .8rem; }
.arriving-order { margin-top: 1.6rem; }
.arriving-order .list-head { margin-bottom: .7rem; }
.arriving { margin-bottom: .9rem; }
.arriving-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .8rem; align-items: start; }
.arriving-head .dot { margin-top: .45rem; }
.arriving-head strong { overflow-wrap: anywhere; }
.arriving-head p { margin: .2rem 0 0; font-size: .9rem; }
.arriving-due { color: var(--text); }
.arriving-due.is-late { color: var(--gold-bright); }
.arriving-note { color: var(--muted); font-style: italic; }
.arriving-here { margin: .9rem 0 0; }
.arriving .more { margin-top: .8rem; }
.arriving-month { align-self: end; }
.arriving-all { margin: .2rem 0 0; }

/*
    The icons of trips and the places on them: one line weight, drawn in the colour of what they sit in.
    Bought where Kept knew the place: the place, and how the bottles are coming home, asked once for all of them. When they ship is
    asked only of bottles shipped, and the one button says what it will do.
*/
.haul-icon { display: block; width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.counter { display: grid; gap: .9rem; margin-bottom: 1rem; border-color: rgb(var(--gold-rgb) / .45); }
.counter-at { display: flex; align-items: center; gap: .75rem; }
.counter-badge { display: grid; flex: none; place-items: center; width: 2.6rem; height: 2.6rem; border: 1px solid rgb(var(--gold-rgb) / .45); border-radius: 50%; background: rgb(var(--gold-rgb) / .12); color: var(--gold); }
.counter-badge .haul-icon { width: 1.4rem; height: 1.4rem; }
.counter-where { display: grid; flex: 1; gap: .1rem; min-width: 0; }
.counter-where strong { font-weight: 600; overflow-wrap: anywhere; }
.counter-where span { color: var(--muted); font-size: .85rem; }
.counter-at .link { flex: none; font-size: .88rem; }
.counter fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.counter legend { margin-bottom: .55rem; padding: 0; font-family: var(--serif); font-size: 1.2rem; }
.counter-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.counter-opt, .counter-pill { position: relative; cursor: pointer; }
.counter-opt input, .counter-pill input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.counter-opt { display: grid; justify-items: center; gap: .4rem; padding: .8rem .5rem .7rem; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-raised); font-weight: 500; }
.counter-opt .haul-icon { width: 1.75rem; height: 1.75rem; color: var(--muted); transition: color .2s; }
.counter-opt:has(input:checked), .counter-pill:has(input:checked) { border-color: var(--gold); background: rgb(var(--gold-rgb) / .1); }
.counter-opt:has(input:checked) .haul-icon { color: var(--gold); }
.counter-opt:has(input:focus-visible), .counter-pill:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }
.counter-when { display: none; }
.counter:has(input[value="shipped"]:checked) .counter-when { display: block; }
.counter-pills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; }
.counter-pill { display: grid; place-items: center; min-height: 2.75rem; padding: 0 .35rem; border: 1px solid var(--line-strong); border-radius: 999px; font-size: .88rem; line-height: 1.2; text-align: center; }
.counter-month { display: none; gap: .3rem; margin-top: .6rem; font-size: .88rem; }
.counter:has(input[value="month"]:checked) .counter-month { display: grid; }
.counter-note { display: flex; align-items: flex-start; gap: .5rem; margin: .65rem 0 0; color: var(--muted); font-size: .85rem; line-height: 1.45; }
.counter-note .haul-icon { flex: none; width: 1.1rem; height: 1.1rem; margin-top: .1rem; color: var(--gold); }
.counter-car { margin: 0; }
.counter:has(input[value="shipped"]:checked) .counter-car { display: none; }
.counter-if-shipped { display: none; }
form:has(.counter input[value="shipped"]:checked) .counter-if-with { display: none; }
form:has(.counter input[value="shipped"]:checked) .counter-if-shipped { display: inline; }

/* What was bought on a trip: the places bought at, then the bottles by how they came home, each group under its icon. */
.haul-tag { justify-self: start; display: inline-block; margin: 0 0 .5rem; padding: .2rem .6rem; border: 1px solid rgb(var(--gold-rgb) / .6); border-radius: 999px; color: var(--gold); font-size: .78rem; }
.haul-made { display: flex; align-items: center; gap: .6rem; margin: 0 0 1rem; padding: .7rem .85rem; border: 1px dashed rgb(var(--gold-rgb) / .35); border-radius: 14px; color: var(--muted); font-size: .88rem; line-height: 1.35; }
.haul-made .haul-icon { flex: none; color: var(--gold); }
.haul-made span { flex: 1; }
.haul-made .link { flex: none; }
.haul-places { display: grid; gap: .45rem; margin: 0; padding: 0; list-style: none; }
.haul-place { display: flex; align-items: center; gap: .7rem; min-height: 3.6rem; padding: .55rem .85rem; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.haul-when { flex: none; width: 3.1rem; color: var(--gold-bright); font-size: .8rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.haul-badge { display: grid; flex: none; place-items: center; width: 2.2rem; height: 2.2rem; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--gold); }
.haul-what, .haul-line { display: grid; flex: 1; gap: .1rem; min-width: 0; }
.haul-what strong { font-family: var(--serif); font-size: 1.06rem; font-weight: 400; overflow-wrap: anywhere; }
.haul-what small, .haul-line small { color: var(--muted); font-size: .82rem; }
.haul-group { margin-top: 1.5rem; }
.haul-head { display: flex; align-items: center; gap: .6rem; margin: 0 0 .55rem; font-size: 1.2rem; }
.haul-disc { display: grid; flex: none; place-items: center; width: 2rem; height: 2rem; border: 1px solid rgb(var(--gold-rgb) / .4); border-radius: 50%; background: rgb(var(--gold-rgb) / .12); color: var(--gold); }
.haul-disc .haul-icon { width: 1.1rem; height: 1.1rem; }
.haul-count { margin-left: auto; color: var(--muted); font-family: var(--sans, inherit); font-size: .85rem; }
.haul-lines { display: grid; gap: .4rem; margin: 0; padding: 0; list-style: none; }
.haul-lines a { display: flex; align-items: center; gap: .75rem; padding: .6rem .85rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text); text-decoration: none; }
.haul-lines .dot { flex: none; }
.haul-line strong { font-weight: 500; overflow-wrap: anywhere; }
.haul-due { display: flex; align-items: center; gap: .35rem; }
.haul-due .haul-icon { width: .95rem; height: .95rem; color: var(--gold); }
.haul-home { margin-top: 1.6rem; }
.haul-home .btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; }
.haul-home .haul-icon { color: var(--gold); }
.haul-card { display: flex; align-items: center; gap: .75rem; margin: 1rem 0; padding: 12px 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--text); text-decoration: none; }
.haul-card:hover { border-color: var(--gold); }
.haul-card-words { display: grid; flex: 1; gap: .4rem; min-width: 0; }
.haul-card-words strong { font-weight: 600; }
.haul-card-kinds { display: flex; flex-wrap: wrap; gap: .35rem 1rem; color: var(--muted); font-size: .88rem; }
.haul-card-kinds span { display: inline-flex; align-items: center; gap: .35rem; }
.haul-card-kinds .haul-icon { width: 1.05rem; height: 1.05rem; color: var(--gold); }
.haul-card i { color: var(--gold); font-size: 1.25rem; font-style: normal; line-height: 1; }
@media print { .haul-card, .haul-home, .haul-made { display: none; } }

/* Home from a trip: the bottles brought home, waiting for a spot, and the one thing to do with them. */
.welcome-home { position: relative; display: grid; gap: .9rem; margin: 1.2rem 0 1rem; padding: 16px; border: 1px solid rgb(var(--gold-rgb) / .5); border-radius: 18px; background: var(--surface); }
.welcome-top { display: flex; align-items: flex-start; gap: .8rem; padding-right: 2rem; }
.welcome-top .haul-disc { width: 2.6rem; height: 2.6rem; }
.welcome-top .haul-disc .haul-icon { width: 1.35rem; height: 1.35rem; }
.welcome-words { display: grid; gap: .25rem; }
.welcome-words strong { font-family: var(--serif); font-size: 1.25rem; font-weight: 400; line-height: 1.2; }
.welcome-words span { color: var(--muted); font-size: .9rem; line-height: 1.4; }
.welcome-go { display: flex; align-items: center; gap: 1.1rem; margin: 0; }
.welcome-later { position: absolute; top: 6px; right: 6px; margin: 0; }
.welcome-later button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; background: none; color: var(--faint); cursor: pointer; }
.welcome-later svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }

/* A bottle set aside, a wine kept open, and how much is left read from a photo. */
.heads-up.set-aside strong { color: var(--gold-bright); }
.open-line { margin: .6rem 0 .9rem; color: var(--text); font-size: .92rem; }
.open-line.is-pressing .word-text { color: var(--gold-bright); }
.keep-open .chips, .opened-keep .chips { margin-top: .5rem; }
.opened-keep { margin-top: .9rem; }
.unset-aside { margin: .4rem 0 0; }
.level-photo { margin: .5rem 0 0; font-size: .92rem; }
.level-photo input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.level-photo.is-ready button[type="submit"] { display: none; }
.level-photo label { cursor: pointer; }

/* Racks kept at other places, and the sheet of bottles to bring home from one. */
.rack-place { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.rack-place a { font-size: .9rem; }
.bring-list { margin: 0 0 1rem; padding: 0; list-style: none; }
.bring-row { padding: .55rem 0; border-bottom: 1px solid var(--line); }
.bring-row .check span { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: .5rem; align-items: baseline; }
.bring-row .dot { align-self: center; }
.bring-row small { grid-column: 2; color: var(--muted); }
.bring-actions { display: flex; gap: .6rem; }
.bring-actions .btn { flex: 1; }
@media print {
    /* With some ticked, only those print, under their racks' names. With none ticked, the whole list does. */
    .bring-home:has(input:checked) .bring-row:not(:has(input:checked)),
    .bring-home:has(input:checked) .list-head:has(+ .bring-list:not(:has(input:checked))),
    .bring-actions, main.page:has(.bring-home) .crumb, main.page:has(.bring-home) .summary { display: none !important; }
    .bring-row input { display: none; }
}

/* A rack checked against a film: each difference on a card of its own, with what can be said of it. */
.check-line { margin-bottom: .9rem; }
.check-what { display: flex; align-items: center; gap: .55rem; margin: 0; }
.check-what a { color: inherit; text-decoration: none; }
.check-said { margin: .35rem 0 .8rem; color: var(--muted); font-size: .92rem; }
.check-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.check-actions form { margin: 0; }
.check-right ul { margin: .6rem 0 0; padding-left: 1.1rem; color: var(--muted); }

/* An evening's menu card: the wines in the order they are poured, a line to say for each, set as a printed menu is. */
.menu-card { max-width: 32rem; margin: 1.5rem auto 2rem; padding: clamp(1.6rem, 6vw, 2.6rem) clamp(1.2rem, 5vw, 2.4rem); border: 1px solid rgb(var(--gold-rgb) / .45); border-radius: 4px; text-align: center; }
.menu-day { margin: 0; color: var(--gold); font-size: .78rem; letter-spacing: .22em; text-transform: uppercase; }
.menu-card h1 { margin: .5rem 0 1.4rem; font-size: clamp(1.7rem, 6vw, 2.3rem); line-height: 1.15; text-wrap: balance; }
.menu-wines { margin: 0; padding: 0; list-style: none; }
.menu-wines li { padding: 1.1rem 0; border-top: 1px solid var(--line); }
.menu-wines h2 { margin: 0; font-size: 1.2rem; line-height: 1.3; }
.menu-facts { margin: .25rem 0 0; color: var(--muted); font-size: .85rem; letter-spacing: .04em; }
.menu-line { margin: .6rem auto 0; max-width: 26rem; font-family: var(--serif); font-style: italic; line-height: 1.55; }
.menu-food { margin: 1.2rem 0 0; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.menu-buttons { max-width: 32rem; margin: 0 auto; }
.menu-serve { margin: .6rem 0 0; padding-left: 1.1rem; color: var(--muted); }
@media print {
    .menu-actions { display: none !important; }
    .menu-card { margin: 0 auto; border-color: #b8aca5; }
}

/* A drink kept in stock that has fallen below what is kept of it. */
.keep-stock.is-low { color: var(--gold-bright); }
.hero-low a { color: var(--text); }

/*
    Explore's drawings. A tile has its drawing beside its name and its line under both, so it grows by no more than the drawing is
    taller than the name. A way on has its drawing to the right of its words, which run round it. A card of an idea has its drawing in
    its corner, and the row to friends beside its words.
*/
.hub-tile.has-art { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: .7rem; }
.hub-tile.has-art > .drawing, .callout.has-art > .drawing, .play-friends.has-art > .drawing, .hub-tasting.has-art > .drawing, .theme.has-art > .drawing {
    float: none; flex: none; width: 36px; height: 36px; margin: 0; border-radius: 9px; box-shadow: 0 3px 10px rgb(0 0 0 / .3);
}
.callout.has-art > .drawing, .play-friends.has-art > .drawing, .hub-tasting.has-art > .drawing, .theme.has-art > .drawing { width: 40px; height: 40px; border-radius: 10px; }
.hub-tile.has-art > :not(.drawing, strong) { grid-column: 1 / -1; }
.callout.has-art { display: block; }
.callout.has-art > strong, .callout.has-art > span { display: block; }
.callout.has-art > strong { margin-bottom: .15rem; }
.callout.has-art > .drawing { float: right; margin: .15rem 0 .3rem .8rem; }
.hub-tile.has-art strong::after, .callout.has-art strong::after { content: "\00A0\203A"; }
.play-friends.has-art > span { flex: 1; }
.hub-tasting.has-art, .theme.has-art { position: relative; }
.hub-tasting.has-art > .drawing { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 8px; }
.hub-tasting.has-art > .hub-kind { padding-right: 36px; }
.theme.has-art > .drawing { position: absolute; top: 1rem; right: 1rem; }
.theme.has-art > .theme-kind, .theme.has-art > h3 { padding-right: 50px; }
.empty > .drawing { grid-row: span 2; float: none; width: 64px; height: 64px; margin: 0; border-radius: 12px; box-shadow: 0 3px 10px rgb(0 0 0 / .3); }
/* The cellar's first bottle: the label as the camera frames it, over the words. */
.first-bottle > .drawing { width: 64px; height: 64px; margin: 0 0 1.1rem; }

/*
    The pictures that act out a page's main step: on the photo button, a label read and its details filled in (in the room the camera
    had, so the button is no taller); on the plan page for someone starting their free days, their cellar beginning to fill.
*/
.capture-button.has-art { gap: .55rem; }
.capture-button > .drawing-tile, .capture-button > .drawing-beside { float: none; width: 96px; height: 96px; aspect-ratio: 1; border-radius: 16px; }
.capture-button > .drawing { width: min(240px, 78%); height: auto; aspect-ratio: 2 / 1; max-width: none; margin: 0; border-radius: 14px; box-shadow: 0 10px 26px rgb(0 0 0 / .35); }
.plan > .drawing { width: min(268px, 100%); height: auto; aspect-ratio: 280 / 100; max-width: none; margin: 0 auto .7rem; border-radius: 16px; box-shadow: 0 14px 34px rgb(0 0 0 / .45); }

/* A dinner photographed from the sheet over Explore: the photo button made compact, with its drawing beside its words. */
.plate-capture { margin: .2rem 0 1rem; }
.plate-capture .capture-button { min-height: 0; grid-auto-flow: column; justify-content: center; gap: .9rem; padding: .85rem 1rem; font-size: 1.2rem; }
.plate-capture .capture-button > .drawing { width: 52px; height: 52px; aspect-ratio: 1; border-radius: 12px; box-shadow: 0 6px 16px rgb(0 0 0 / .32); }
/* A dinner's bottle opened from its plan, in one tap. */
.plan-open { margin: .7rem 0 0; }

/* What is being eaten, on What to order: a chip for each dish to tap, the ticked ones lit in gold, and the picks laid out by dish. */
.menu-eating { margin: 2rem 0 0; padding-top: 1.4rem; border-top: 1px solid var(--line); scroll-margin-top: 5rem; }
.menu-eating h2 { margin: 0 0 .4rem; }
.menu-dishes { margin-top: .8rem; }
.menu-dish-chip { position: relative; cursor: pointer; }
.menu-dish-chip input { position: absolute; opacity: 0; pointer-events: none; }
.menu-dish-chip:has(input:checked) { border-color: rgb(var(--gold-rgb) / .8); color: var(--text); background: rgb(var(--gold-rgb) / .12); }
.menu-dish-chip:has(input:checked)::before { content: "\2713"; color: var(--gold); }
.menu-dish-chip:has(input:focus-visible) { outline: 2px solid var(--gold-bright); outline-offset: 2px; }
#menu-pair { margin-top: .9rem; }
.menu-paired { margin: .2rem 0 .8rem; color: var(--muted); }
.menu-paired a { color: var(--text); }
.menu-cellar { display: flex; flex-wrap: wrap; gap: .2rem .45rem; align-items: baseline; margin: 1rem 0 0; color: var(--muted); }
/* Saved lists: a page keeps at most one saved thing in view, the one most likely come back to, and every other is one row away. */
.saved-all { display: flex; align-items: center; gap: .5rem; min-height: 48px; margin: .9rem 0 0; padding: 10px 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--text); font-size: .94rem; font-weight: 600; text-decoration: none; }
.saved-all .saved-count { margin-left: auto; color: var(--muted); font-weight: 400; font-variant-numeric: tabular-nums; }
.saved-all i { color: var(--gold); font-size: 1.25rem; font-style: normal; line-height: 1; }
.saved-all:hover { border-color: var(--gold); }
.saved-all:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 2px; }
.saved-heading { margin: 1.6rem 0 0; font-size: 1.15rem; }

/*
    Saved things (Saved.cs): the same row in every list of them, with the wine list's type; the newest few under "Yours" on the page
    they are made from; the way to remove one, at the foot of its own page; and the line said once after removing one.
*/
.saved-yours { margin: 1.4rem 0 0; }
.saved-yours > h2 { margin: 0 0 .6rem; }
.saved-yours + form.wt-form, .saved-yours + .summary { margin-top: 1rem; }
.saved-list { display: grid; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.saved-row { display: flex; align-items: center; gap: .75rem; min-height: 76px; padding: 10px 12px 10px 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--text); text-decoration: none; }
.saved-row:hover { border-color: var(--gold); }
.saved-row:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 2px; }
.saved-pic { position: relative; flex: none; width: 56px; height: 56px; overflow: hidden; border-radius: 12px; background: var(--surface-raised); }
.saved-pic .saved-photo { position: absolute; inset: 0; }
.saved-pic img, .saved-pic .thumb { display: block; width: 100%; height: 100%; margin: 0; border-radius: 0; object-fit: cover; }
.saved-pic .drawing { width: 100%; height: 100%; margin: 0; border-radius: 0; }
.saved-pic .drawing svg { display: block; width: 100%; height: 100%; }
.saved-pic .drawing { float: none; box-shadow: none; }
.saved-pic .drawing-place { position: relative; overflow: hidden; }
.saved-pic .drawing-place svg { position: absolute; top: 0; left: 50%; width: auto; max-width: none; translate: -50% 0; }
/* A place whose drawing has its subject to one side is shown from that side. */
.saved-pic .drawing-place[data-scene="barossa-valley"] svg { left: 0; translate: 0 0; }
.saved-pic .drawing-place[data-scene="southern-rhone"] svg, .saved-pic .drawing-place[data-scene="armagnac"] svg { left: auto; right: 0; translate: 0 0; }
.saved-text { flex: 1; min-width: 0; display: grid; gap: .15rem; }
/* A title takes up to two lines rather than being cut short; only a very long one ends in an ellipsis. */
.saved-text strong { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; font-size: 1.02rem; font-weight: 500; line-height: 1.3; text-wrap: balance; }
/* Its line runs on to a second line rather than being cut off: a plan's line names its bottles, and the date comes after them. */
.saved-text span { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; color: var(--muted); font-size: .86rem; line-height: 1.35; }
.saved-pill { flex: none; padding: .2rem .55rem; border: 1px solid rgb(var(--gold-rgb) / .6); border-radius: 999px; color: var(--gold); font-size: .74rem; white-space: nowrap; }
.saved-row > i { flex: none; color: var(--faint); font-size: 1.25rem; font-style: normal; line-height: 1; }
.saved-remove { margin: 2.4rem 0 0; padding: 1.2rem 0 0; border-top: 1px solid var(--line); text-align: center; }
.saved-remove > summary { display: inline-block; color: var(--muted); cursor: pointer; list-style: none; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.saved-remove > summary::-webkit-details-marker { display: none; }
.saved-remove[open] > summary { display: none; }
.saved-remove-ask { margin: 0; padding: 1rem 1.1rem; border: 1px solid var(--line-strong); border-radius: 18px; background: var(--surface); text-align: left; }
.saved-remove-ask h2 { margin: 0 0 .35rem; font-size: 1.3rem; }
.saved-remove-ask p { margin: 0 0 .9rem; color: var(--muted); }
.saved-remove-acts { display: flex; align-items: center; gap: 1rem; }
.saved-removed p { margin: 0 0 1rem; padding: .85rem 1rem; border: 1px solid var(--line-strong); border-radius: 16px; background: var(--surface); }
.saved-removed .link { font-weight: 600; }
/* Ask Kept opened from a page: that page's questions, each opening on its answer from the guides. Under an answer, the guide it came from. */
.ask-here { margin: 0 0 .4rem; }
.ask-help { border-bottom: 1px solid var(--line); }
.ask-help > summary { display: flex; align-items: center; justify-content: space-between; gap: .8rem; min-height: 48px; padding: .55rem 0; color: var(--text); font-weight: 600; list-style: none; cursor: pointer; }
.ask-help > summary::-webkit-details-marker { display: none; }
.ask-help > summary::after { content: "+"; flex: none; color: var(--gold); font-size: 1.25rem; font-weight: 400; line-height: 1; }
.ask-help[open] > summary::after { content: "\2212"; }
.ask-help > summary:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 2px; }
.ask-help-body { padding: 0 0 .9rem; color: var(--muted); font-size: .94rem; line-height: 1.5; }
.ask-help-body p, .ask-help-body ul { margin: 0 0 .6rem; }
.ask-help-body ul { padding-left: 1.1rem; }
.ask-help-body h3 { margin: .8rem 0 .3rem; color: var(--text); font-size: .94rem; }
.ask-help-more { color: var(--gold); font-weight: 600; text-decoration: none; }
.ask-help-more i { font-style: normal; }
.talk-guide { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: .6rem; margin: .5rem 0 0; padding: 10px 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--text); text-decoration: none; }
.talk-guide small { grid-column: 1; margin: 0; color: var(--muted); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; }
.talk-guide strong { grid-column: 1; font-size: .94rem; font-weight: 600; }
.talk-guide i { grid-column: 2; grid-row: 1 / span 2; color: var(--gold); font-size: 1.25rem; font-style: normal; }
.talk-guide:hover { border-color: var(--gold); }
/*
    Moving bottles: every place in the drawing is a button, those with room lit while something is in hand, the place under a
    dragged bottle ringed in gold, and a full one shakes. What is in hand and Done stay at the foot of the screen.
*/
:where(.board) :where(button) { appearance: none; margin: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.board [data-place] { touch-action: manipulation; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.board .shelf-run, .board .bay { border-radius: 8px; }
.board-stage.is-holding .has-room:not(.bin) { box-shadow: 0 0 0 1.5px rgb(var(--gold-rgb) / .6); }
.board-stage.is-holding .bin.has-room { background: rgb(var(--gold-rgb) / .14); }
.board [data-place].is-over:not(.bin) { box-shadow: 0 0 0 2.5px var(--gold-bright); }
.board .bin.is-over { background: rgb(var(--gold-rgb) / .34); }
.board [data-place].is-full { animation: board-full .35s ease; }
@keyframes board-full { 25% { translate: -3px 0; } 75% { translate: 3px 0; } }
.hole.filled.board-ghost { position: fixed; z-index: 60; top: 0; left: 0; width: 36px; margin: -18px 0 0 -18px; pointer-events: none; box-shadow: 0 10px 20px rgba(0, 0, 0, .6), 0 0 0 2px var(--gold-bright); }
.board-how { margin-bottom: .6rem; }
.board-tabs { margin-bottom: .2rem; }
.board-tabs .chip span { font-variant-numeric: tabular-nums; }
.board-out-put { margin: .3rem 0 .8rem; }
.board-out-list, .board-pick-list, .board-hand-list { margin: 0; padding: 0; list-style: none; }
.board-out-row, .board-pick-row { display: flex; align-items: center; gap: .6rem; width: 100%; min-height: 44px; padding: .45rem 0; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.board-dock { display: grid; grid-template-columns: minmax(0, 1fr); gap: .45rem; }
.board-hand { padding: .6rem .7rem; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.board-hand-head { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .9rem; font-size: .9rem; }
.board-hand-head strong { margin-right: auto; }
.board-hand-head .link { min-height: 36px; }
.board-hand-list { display: flex; gap: .4rem; margin-top: .4rem; overflow-x: auto; scrollbar-width: none; }
.board-hand-list::-webkit-scrollbar { display: none; }
.board-chip { flex: none; display: inline-flex; align-items: center; gap: .4rem; max-width: 15rem; min-height: 36px; padding: 0 .8rem; border: 1px solid var(--line); border-radius: 999px; background: none; color: var(--muted); font: inherit; font-size: .84rem; cursor: pointer; }
.board-chip span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.board-chip.is-next { border-color: var(--gold); color: var(--text); }
.board-chip { touch-action: manipulation; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.board-chip.is-lifted { opacity: .35; }
.board-status { margin: 0; color: var(--muted); font-size: .9rem; }
.board-actions { display: grid; grid-template-columns: 1fr 2fr; gap: .6rem; }
.board-actions .btn:disabled { opacity: .4; cursor: default; }
.board-pick { width: min(30rem, calc(100vw - 2rem)); max-height: 70vh; padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: 20px; background: var(--surface-raised, var(--surface)); color: var(--text); }
.board-pick::backdrop { background: rgb(0 0 0 / .55); }
.board-pick h2 { margin: 0 0 .4rem; font-size: 1.2rem; }
.board-pick-actions { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-top: .8rem; }
.moved-back { margin: -.2rem 0 .8rem; }
.moved-back .link { min-height: 40px; }

@media (prefers-reduced-motion: reduce) {
    .board [data-place].is-full { animation: none; }
}
/* On a rack's page a press and hold on a bottle starts moving it, so the phone's own menu for a link must not open there. */
.rack-stage .rack a, .tray-bottle { -webkit-touch-callout: none; -webkit-user-drag: none; -webkit-user-select: none; user-select: none; }
.rack-stage .is-lifting, .tray-bottle.is-lifting { scale: 1.15; box-shadow: 0 0 0 2.5px var(--gold-bright), 0 6px 16px rgba(0, 0, 0, .6); transition: scale .15s ease; }
/* A bottle dragged on its rack's own page: the place under it ringed in gold, and a place to let it go to choose another rack. */
.rack-stage [data-at].is-over:not(.bin) { box-shadow: 0 0 0 2.5px var(--gold-bright); }
.rack-stage .bin.is-over { background: rgb(var(--gold-rgb) / .34); }
.hold-elsewhere { position: fixed; z-index: 55; left: 50%; bottom: calc(var(--tabbar-height) + env(safe-area-inset-bottom) + 1.2rem); translate: -50% 0; padding: .85rem 1.5rem; border: 1.5px dashed var(--gold); border-radius: 999px; background: rgb(var(--bg-rgb) / .94); color: var(--text); font-weight: 600; white-space: nowrap; }
.hold-elsewhere.is-over { border-style: solid; background: rgb(var(--gold-rgb) / .28); }
/* A photo taken where another kind goes, said plainly: what it turned out to be, and what Kept did with it. */
.menu-routed { display: grid; grid-template-columns: 3.6rem minmax(0, 1fr); align-items: center; gap: .9rem; margin: 0 0 1rem; padding: .85rem 1rem; border: 1px solid rgb(var(--gold-rgb) / .5); border-radius: 18px; background: rgb(var(--gold-rgb) / .07); }
.menu-routed .drawing { width: 3.6rem; height: auto; margin: 0; }
.menu-routed p { display: grid; gap: .2rem; margin: 0; }
.menu-routed strong { font-family: var(--serif); font-size: 1.15rem; font-weight: 400; }
.menu-routed span { color: var(--muted); font-size: .92rem; line-height: 1.4; }
/* Where to buy: the shops Kept found, the cheapest bottle first, each a row to its own page. */
.buy-wine { margin: 0 0 1rem; }
.buy-wine h2 { margin: 0 0 .3rem; font-size: 1.25rem; }
.buy-need { margin: 0 0 .6rem; color: var(--gold); font-weight: 600; font-size: .92rem; }
.buy-shops { display: grid; gap: .45rem; margin: .5rem 0 .4rem; padding: 0; list-style: none; }
.buy-shop { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: .7rem; min-height: 48px; padding: .55rem .9rem; border: 1px solid var(--line); border-radius: 14px; color: var(--text); text-decoration: none; }
.buy-shop:hover { border-color: var(--gold); }
.buy-place { overflow: hidden; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.buy-price { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.buy-shop i { color: var(--gold); font-size: 1.2rem; font-style: normal; }
.buy-seen, .buy-none { margin: .3rem 0 .5rem; }
.buy-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.2rem; margin-top: .4rem; }
.buy-actions .buy-look { flex: 1 1 100%; }
.buy-actions .buy-look:has(.link) { flex: none; }
.buy-actions .link, .buy-search { min-height: 40px; }
.buy-search { display: inline-flex; align-items: center; color: var(--muted); font-size: .9rem; }
.hero-buy { font-weight: 600; }
.plan-buy { display: inline-block; margin-top: .25rem; font-size: .9rem; }
.years a.year.wanted { text-decoration: none; }
.heads-up-links { margin: .5rem 0 0; }
/* A wine being looked for in shops: a line that says so, with three gold dots, while the page asks after it. */
.buy-looking { display: flex; align-items: center; gap: .6rem; margin: .5rem 0; color: var(--gold); font-weight: 600; font-size: .94rem; }
.buy-looking-dots { display: inline-flex; gap: 4px; }
.buy-looking-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); animation: buy-dot 1.2s ease-in-out infinite; }
.buy-looking-dots i:nth-child(2) { animation-delay: .15s; }
.buy-looking-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes buy-dot { 0%, 80%, 100% { opacity: .25; scale: .8; } 40% { opacity: 1; scale: 1; } }
@media (prefers-reduced-motion: reduce) {
    .buy-looking-dots i { animation: none; opacity: .7; }
}

@media print {
    .saved-remove, .saved-removed { display: none; }
}

/*
    Running Kept: the page only whoever runs Kept sees. Every cellar, what it pays and costs, how Kept itself is running, and inviting
    friends. It is the Reports look (boards, tiles, figures, bars and columns) with a few pieces of its own, all named rk-.
*/
.rk-kicker { margin: 0 0 .2rem; color: var(--gold); font: 600 .72rem/1.2 var(--sans); letter-spacing: .2em; text-transform: uppercase; }
.rk-sub { margin: 0 0 1rem; color: var(--muted); font-size: .9rem; }
.boards.rk-boards { grid-template-columns: repeat(6, auto); }
.boards.rk-boards a { padding: 0 .42rem; font-size: .8rem; }
.views.rk-views { display: grid; grid-auto-flow: column; justify-content: space-between; width: 100%; margin-bottom: 1rem; }
.views.rk-views a { justify-content: center; min-height: 34px; padding: 0 .6rem; font-size: .84rem; }

.rk-pill { display: inline-flex; flex: none; align-items: center; min-height: 22px; padding: 0 .55rem; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--muted); font: 600 .72rem/1 var(--sans); white-space: nowrap; }
.rk-pill.paying { border-color: rgb(var(--gold-rgb) / .55); color: var(--gold-bright); }
.rk-pill.free { border-color: rgba(165, 219, 176, .45); color: var(--ok); }
.rk-pill.days { border-color: rgba(233, 204, 139, .4); color: var(--warn); }
.rk-pill.failed { border-color: rgba(255, 144, 134, .5); color: var(--danger); }
.rk-pill.ending, .rk-pill.closed { color: var(--faint); }

.rk-rows { display: grid; gap: .5rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.rk-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .2rem .8rem; padding: .7rem .9rem .75rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: inherit; text-decoration: none; }
.rk-row:hover, .rk-row:focus-visible { background: var(--surface-raised); }
.rk-row .rk-name { display: flex; align-items: center; gap: .5rem; min-width: 0; font-size: 1rem; font-weight: 600; }
.rk-row .rk-name > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-row .rk-cost { font-weight: 650; font-variant-numeric: tabular-nums; text-align: right; }
.rk-row .rk-line { overflow: hidden; color: var(--muted); font-size: .84rem; text-overflow: ellipsis; white-space: nowrap; }
.rk-row .rk-when { color: var(--faint); font-size: .76rem; text-align: right; white-space: nowrap; }
.rk-row.yours { border-color: rgb(var(--gold-rgb) / .35); }
.rk-find { margin: 0 0 .7rem; }
.rk-order { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin: 0 0 .8rem; color: var(--muted); font-size: .84rem; }
.rk-order .views { margin: 0; }
.rk-order .views a { min-height: 32px; padding: 0 .75rem; font-size: .82rem; }
.chips .chip[aria-current="true"] { border-color: var(--line-strong); color: var(--text); }

.rk-feed { display: grid; margin: 0; padding: 0; list-style: none; }
.rk-feed > li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .1rem .8rem; padding: .55rem 0; border-top: 1px solid var(--line); font-size: .92rem; line-height: 1.4; }
.rk-feed > li:first-child { border-top: 0; padding-top: 0; }
.rk-feed b { font-weight: 600; }
.rk-feed a { color: inherit; text-decoration: none; }
.rk-feed time, .rk-feed .rk-right { color: var(--faint); font-size: .78rem; text-align: right; white-space: nowrap; }
.rk-feed .rk-more { grid-column: 1 / -1; color: var(--muted); font-size: .82rem; }
.rk-feed .rk-fast { color: var(--text); font-size: .92rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.rk-feed .rk-bad { color: var(--danger); }
.rk-feed form { display: inline; }

.rk-series { display: flex; gap: 1rem; margin: .2rem 0 -.6rem; color: var(--muted); font-size: .8rem; }
.rk-series i { display: inline-block; width: .65rem; height: .65rem; margin-right: .35rem; border-radius: 2px; vertical-align: -1px; }
.rk-pairs .col { gap: 2px; }
.rk-pairs .col-bar { width: min(45%, 14px); }
.rk-pairs .col-bar.out { height: var(--o); background: #a8324a; }
.columns-chart.tone-cost { --series: #a8324a; }

.rk-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: .9rem; }
.rk-actions .btn, .rk-actions form .btn { width: 100%; min-height: 44px; font-size: .9rem; }
.rk-note { margin: 1.2rem 0 0; padding: .7rem .85rem; border: 1px dashed var(--line-strong); border-radius: 12px; color: var(--muted); font-size: .84rem; line-height: 1.45; }
.rk-switch { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-top: 1px solid var(--line); font-size: .92rem; }
.rk-switch:first-of-type { border-top: 0; }
.rk-switch select { width: auto; min-height: 38px; padding: 0 .6rem; }
.rk-switch input[type="checkbox"] { margin: 0; }
.rk-link { color: var(--muted); font-size: .84rem; text-decoration: none; }
.rk-link:hover { color: var(--text); }
.rk-link + .rk-link::before, .rk-link + form::before { content: "·"; margin: 0 .45rem; color: var(--faint); }
button.rk-link { padding: 0; border: 0; background: none; font: inherit; font-size: .84rem; cursor: pointer; }
.rk-end summary { color: var(--danger); cursor: pointer; font-size: .9rem; }
.rk-end form { margin-top: .8rem; }

.rk-table { width: 100%; border-collapse: collapse; font-size: .88rem; font-variant-numeric: tabular-nums; }
.rk-table th, .rk-table td { padding: .45rem .3rem; border-top: 1px solid var(--line); text-align: right; }
.rk-table th:first-child, .rk-table td:first-child { text-align: left; }
.rk-table thead th { border-top: 0; color: var(--muted); font-weight: 500; font-size: .78rem; }

/* The map of everything Kept talks to: who comes in at the top, Kept, what is its own, and what it calls off one trunk. */
.rk-map { margin: 0 0 .6rem; }
.rk-map svg { display: block; width: 100%; height: auto; overflow: visible; }
.rk-map .node rect { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1; }
.rk-map .node.hub rect { fill: var(--surface-raised); stroke: var(--gold); }
.rk-map .node.own rect { fill: var(--surface-raised); }
.rk-map .node.bad rect { stroke: rgba(255, 144, 134, .7); }
.rk-map .node.idle { opacity: .55; }
.rk-map .name { fill: var(--text); font: 600 12.5px var(--sans); }
.rk-map .hub .name { font: 400 19px var(--serif); }
.rk-map .sub { fill: var(--muted); font: 400 10.5px var(--sans); }
.rk-map .sub.bad { fill: var(--danger); }
.rk-map .band { fill: var(--gold); font: 600 9.5px var(--sans); letter-spacing: .2em; }
.rk-map .edge { fill: none; stroke: #5a4f4b; stroke-linecap: round; }
.rk-map .edge.bad { stroke: var(--danger); stroke-dasharray: 3 3; }
.rk-map .tag rect { fill: var(--bg); stroke: var(--line-strong); }
.rk-map .tag text { fill: var(--text); font: 650 10px var(--sans); font-variant-numeric: tabular-nums; }
.rk-map .tag.bad text { fill: var(--danger); }
.rk-map .dot { fill: var(--gold-bright); }
@media (prefers-reduced-motion: reduce) {
    .rk-map .dot { display: none; }
}
.rk-key { margin: 0 0 1rem; color: var(--muted); font-size: .82rem; line-height: 1.45; }

/* A friend invited to Kept: a welcome made for them, their name on the tag of a bottle set aside, and the note they were sent. */
.invited { text-align: center; }
.invited-for { margin: 0 0 .5rem; color: var(--gold); font: 600 .72rem/1.2 var(--sans); letter-spacing: .22em; text-transform: uppercase; }
.invited h1 { margin: 0 0 1.1rem; font-size: 1.8rem; line-height: 1.2; }
.invited-drawing { margin: 0 auto 1.2rem; }
.invited-note { margin: 0 0 1.2rem; padding: .9rem 1.1rem; border-left: 2px solid var(--gold); border-radius: 0 14px 14px 0; background: var(--surface); text-align: left; }
.invited-note p { margin: 0 0 .5rem; font: italic 400 1.08rem/1.5 var(--serif); }
.invited-note cite { color: var(--muted); font-size: .86rem; font-style: normal; }
.invited-gets { display: grid; gap: .55rem; margin: 0 0 1.1rem; padding: 0; list-style: none; text-align: left; }
.invited-gets li { position: relative; padding-left: 1.2rem; color: var(--muted); font-size: .94rem; line-height: 1.45; }
.invited-gets li::before { content: ""; position: absolute; top: .55em; left: .2rem; width: .4rem; height: .4rem; border-radius: 50%; background: var(--gold); }
.invited-free { margin: 0 0 .4rem; color: var(--gold-bright); font-weight: 600; line-height: 1.45; }

/* The credit DB-IP's licence asks for, under a list that shows towns worked out from internet addresses. */
.places-credit { margin: .6rem 0 0; font-size: .76rem; }
.places-credit a { color: var(--faint); text-decoration: none; }

/*
    Two columns on a laptop. From 64rem a page that is one thing and a list about it sets them side by side: a rack beside the moves off
    it or what is in it, a bottle beside its boards, and the cellar's count and the ways to narrow it beside the wines. A phone, and a
    tablet held upright, keep the one column. The rack pages are grids, so that the drawing stays in sight while the list scrolls past.
    The cellar and a wine's page float what goes on the left, since the cellar's parts are put in afresh as it is narrowed (narrow.js)
    and must stay where they are in the page.
*/
@media (min-width: 64rem) {
    /* Moves worth making: the rack, staying in sight, beside the moves off it. */
    main.page:has(.trip-board) { max-width: 72rem; }
    .trip-board { display: grid; grid-template-columns: minmax(14rem, 22rem) minmax(0, 1fr); column-gap: 3rem; align-items: start; }
    .trip-board > * { grid-column: 1 / -1; }
    .trip-board > .trip-rack { grid-column: 1; grid-row: span 60; position: sticky; top: 5rem; max-height: calc(100svh - 8rem); margin: 1rem 0 0; }
    .trip-board > :is(h3, .steps, .steps-all) { grid-column: 2; }

    /* A rack: its drawing, staying in sight, beside what is in it and what can be done to it. */
    /* A drawing is as wide as it is given, so its column has a width of its own: a fridge drawn at the width of a phone. */
    main.page:has(> .rack-stage) { max-width: 74rem; display: grid; grid-template-columns: minmax(18rem, 25rem) minmax(0, 1fr); column-gap: 3rem; align-items: start; }
    main.page:has(> .rack-stage) > * { grid-column: 1 / -1; }
    main.page:has(> .rack-stage) > .rack-stage { grid-column: 1; grid-row: span 60; position: sticky; top: 5rem; max-height: calc(100svh - 7rem); overflow: auto; }
    main.page:has(> .rack-stage) > :is(#contents, .rack-contents, .callout, details.more) { grid-column: 2; }
    main.page:has(> .rack-stage) > #contents { margin-top: 0; }

    /* A wine: the bottle, the button to open one and the way to ask about it, beside its boards. */
    main.page:has(> .wine-head) { display: flow-root; max-width: 72rem; }
    main.page:has(> .wine-head) > * { margin-left: 25rem; }
    main.page:has(> .wine-head) > :is(.crumb, .wine-head, .problem, .wine-open, .heads-up, .wine-ask, .type-guess) { float: left; clear: left; width: 22rem; margin-left: 0; }

    /* The cellar: its count, its types, the search and the ways of narrowing the list, beside what to open tonight and the wines. A
       float rises no higher than what comes before it in the page, so only those that lead it go on the left. */
    main.page:has(> form[data-filters]) { display: flow-root; max-width: 74rem; }
    main.page:has(> form[data-filters]) > * { margin-left: 26rem; }
    main.page:has(> form[data-filters]) > :is(.hero, form[data-filters], .shown, nav.chips[aria-label="Show by when to drink"], details.filters-more) { float: left; clear: left; width: 23rem; margin-left: 0; }
    main.page:has(> form[data-filters]) > .views { float: left; clear: left; margin-left: 0; }

    /* Beside the list, the names under the box wrap in its column, where a phone's would run off the side. */
    .filters .suggest { margin-inline: 0; padding-inline: 0; flex-wrap: wrap; overflow-x: visible; }
}


/* Who Kept chose for, in a shared cellar: one quiet line it worked out itself, and behind "Change" the people to tap. Nobody has to. */
.menu-table > summary { list-style: none; cursor: pointer; }
.menu-table > summary::-webkit-details-marker { display: none; }
.menu-table-change { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.menu-table-form { display: grid; gap: .6rem; margin: -.2rem 0 1rem; }
.menu-table-form .chips { margin-bottom: 0; }
.menu-table-someone { width: 100%; }
.tonight-table > summary { margin-bottom: .6rem; }
.menu-for { display: inline-block; margin-left: .45rem; padding: 0 .5rem; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--muted); font: 500 .72rem/1.5 var(--sans); vertical-align: .15em; white-space: nowrap; }

/* Anyone else who had some of the bottle just opened: a quiet line, then a name to tap for each, and their own glasses under it. */
.opened-others { margin-top: .2rem; }
.opened-others > summary { display: inline-block; list-style: none; cursor: pointer; }
.opened-others > summary::-webkit-details-marker { display: none; }
.opened-others > summary .link { color: var(--gold-bright); text-decoration: underline; text-underline-offset: 3px; }
.opened-others[open] > summary .link { color: var(--faint); text-decoration: none; font: 600 .72rem/1.2 var(--sans); letter-spacing: .2em; text-transform: uppercase; }
.opened-others .chips { margin: .5rem 0 .2rem; padding: 0; }
.opened-other .opened-rate { margin-top: .4rem; }
.opened-other .opened-rate > span:first-child { flex-basis: 100%; }
.opened-someone { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; margin-top: .7rem; }
.opened-someone .btn { min-height: 46px; }

/* A bottle more than one person rated: each by name, the glasses to tap being the person's own. */
.rate-by { display: flex; align-items: center; margin: .1rem 0; padding: 0; border: 0; min-width: 0; }
.rate-who { flex: none; min-width: 3.9rem; padding-right: .4rem; color: var(--muted); }
.rate-by .rate-glass { min-width: 2.3rem; }
fieldset.rate-by .rate-glass { cursor: default; }

/* Who is drinking, asked while a list is read: one row of names under the photo being read, the ones Kept takes to be there already lit. */
.menu-drinking { max-width: 24rem; margin: 1rem auto 0; }
.menu-drinking-ask { margin: 0 0 .55rem; color: var(--faint); font: 600 .72rem/1.2 var(--sans); letter-spacing: .2em; text-transform: uppercase; }
.menu-drinking .chips { justify-content: center; margin: 0; padding: 0; }

/* First taste */

/* Kept filling in a small cellar: how far it has got, under the count, with a thin gold line that fills as each wine is done. */
.fill-line { display: flex; align-items: center; gap: .75rem; margin: .55rem 0 0; color: var(--muted); font-size: .9rem; }
.fill-line.taste-read { display: block; margin-bottom: .75rem; }
.fill-bar { flex: 1; max-width: 9rem; height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.fill-bar i { display: block; height: 100%; background: var(--gold); transition: width .6s ease; }

/* A small cellar read back: what kind it is, and the order to drink it in, each lane a shelf of its own bottles. */
.read-back { display: grid; gap: .8rem; margin: 1.1rem 0 1rem; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.read-moment { margin: 0; color: var(--gold); font: 600 .72rem/1.2 var(--sans); letter-spacing: .2em; text-transform: uppercase; }
.read-words { margin: 0; font-family: var(--serif); font-size: 1.3rem; line-height: 1.3; }
.read-shelves { display: block; width: 100%; height: auto; }
.read-bottle { fill: var(--wine, var(--mark)); }
.read-plank { fill: #3a2c26; }
.read-shelf { animation: read-slide .7s ease-out both; animation-delay: calc(var(--row) * .3s); }
@keyframes read-slide { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
.read-lanes { display: grid; gap: .4rem; margin: 0; padding: 0; list-style: none; }
.read-lanes li { display: flex; align-items: baseline; gap: .75rem; padding: .6rem .75rem; border: 1px solid var(--line); border-radius: 14px; }
.read-lanes strong { flex: none; width: 5.6rem; font-size: .9rem; font-weight: 600; }
.read-lanes span { flex: 1; color: var(--muted); font-size: .85rem; line-height: 1.45; }
.read-lanes em { flex: none; color: var(--text); font-style: normal; font-variant-numeric: tabular-nums; }
.read-young { margin: 0; color: var(--text); font-size: .95rem; line-height: 1.45; }
.read-keep { margin-top: .2rem; }
@media (prefers-reduced-motion: reduce) { .read-shelf { animation: none; } }

/* The card asked for after a first taste, with what the cellar has: its labels fanned out, three figures, then the two prices. */
.tasted-labels { display: block; width: min(260px, 70vw); height: auto; margin: 0 auto .4rem; }
.tasted-facts { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: .4rem; margin: .6rem 0 .2rem; padding: 0; list-style: none; }
.tasted-facts li { display: grid; gap: .2rem; padding: .7rem .5rem; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); text-align: center; }
.tasted-facts strong { font-family: var(--serif); font-size: 1.35rem; font-weight: 400; }
.tasted-facts span { color: var(--muted); font-size: .78rem; line-height: 1.3; }
.tasted-keep { margin: .8rem 0 -.2rem; font-family: var(--serif); font-size: 1.55rem; font-weight: 400; text-align: center; }

/* Add: two ways in of one weight, side by side (the photo of one label and the film of several), and where they are going after them. */
.add-ways { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; margin: 1.1rem 0 1rem; }
.add-ways:has(> :only-child) { grid-template-columns: minmax(0, 1fr); }
.add-ways > .capture { margin: 0; }
.add-ways .capture-button, .add-ways > .callout { display: grid; place-items: center; align-content: center; gap: .55rem; height: 100%; min-height: 10.5rem; margin: 0; padding: .9rem .6rem; border: 1px dashed rgb(var(--gold-rgb) / .7); border-radius: 22px; background: var(--surface); color: var(--text); font-family: var(--serif); font-size: 1.12rem; line-height: 1.2; text-align: center; cursor: pointer; }
.add-ways > .callout > strong { margin: 0; font-weight: 400; }
.add-ways > .callout > strong::after { content: none; }
.add-ways > .callout > .drawing { float: none; width: min(240px, 78%); height: auto; aspect-ratio: 2 / 1; margin: 0; border-radius: 14px; box-shadow: 0 10px 26px rgb(0 0 0 / .35); }
.add-ways:has(> :only-child) .capture-button { min-height: 13rem; font-size: 1.4rem; }
.is-busy .add-ways { display: none; }
.add-film-note { margin: -.4rem 0 1rem; color: var(--muted); font-size: .88rem; line-height: 1.45; }
.is-busy .add-film-note { display: none; }

/* Wine fridge sizes: with no racks yet, a wine fridge in one tap at the size it is sold as, beside a small drawing of one. */
.fridge-sizes { display: grid; grid-template-columns: 3.4rem minmax(0, 1fr); gap: .3rem .9rem; align-items: center; margin: 1rem 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.fridge-art { width: 3.4rem; height: auto; grid-row: span 2; align-self: start; }
.fridge-words h2 { margin: 0; font-family: var(--serif); font-size: 1.25rem; font-weight: 400; }
.fridge-words p { margin: .2rem 0 0; color: var(--muted); font-size: .9rem; line-height: 1.4; }
.fridge-words .fridge-else { margin-top: .35rem; font-size: .85rem; }
.fridge-pick { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.fridge-size { min-width: 2.9rem; height: 2.75rem; padding: 0 .8rem; border: 1px solid var(--line-strong); border-radius: 999px; background: none; color: var(--text); font: 600 .95rem var(--sans); cursor: pointer; }
.fridge-size:hover, .fridge-size:focus-visible { border-color: var(--gold); color: var(--gold-bright); }

/*
    What are we tasting? The tasting helper: a wine the table is drinking, from a menu or a bottle opened, with what it is known for
    lit on Kept's wheel; what someone says placed on the wheel with its second ring of tasters' words; how it feels; the faults; what
    the table found; and the table's wines together on one wheel. Motion only where it explains, played once, and none with Reduce Motion.
*/
.glass-title { margin-bottom: .45rem; font-size: clamp(1.55rem, 7vw, 2rem); line-height: 1.12; text-wrap: balance; }
.glass-known { margin: 0 0 .4rem; color: #d9d0c7; font-size: .95rem; line-height: 1.5; }
.glass-known b, .glass-else b { color: var(--text); font-weight: 600; }
.glass-wheel { display: block; width: min(100%, 22rem); margin: .2rem auto .6rem; }
.glass-wheel.is-together { width: min(100%, 24rem); }
.glass-wheel path { stroke: var(--bg); stroke-width: 1.1; }
.glass-wheel text { text-anchor: middle; dominant-baseline: central; font-family: var(--sans); fill: #1c1513; }
.glass-wheel .on-dark { fill: #fff; }
.glass-wheel .wheel-family { font-size: 9.6px; font-weight: 700; }
.glass-wheel text.wheel-word { fill: rgba(245, 237, 230, .6); font-size: 10px; }
.glass-wheel text.wheel-word.lit { fill: #1c1513; font-size: 10.8px; font-weight: 700; }
.glass-wheel text.wheel-word.lit.on-dark { fill: #fff; }
.glass-wheel .wheel-hub { fill: var(--surface); stroke: var(--gold); stroke-width: 1.4; }
.glass-wheel text.wheel-title { fill: var(--gold-bright); font: 400 13px var(--serif); }
.glass-wheel a { cursor: pointer; }
.glass-wheel a:hover .glass-piece, .glass-wheel a:focus-visible .glass-piece { filter: brightness(1.25) saturate(1.15); }
.glass-wheel a:focus-visible { outline: none; }
.glass-wheel path.glass-found { fill: var(--gold-bright); stroke: none; }
.glass-wheel path.glass-ring { stroke: none; animation: glass-ring .5s calc(var(--at) * .25s) ease-out both; }
.glass-wheel .glass-ring-line { fill: none; stroke: var(--line); stroke-width: 1.4; }
@keyframes glass-ring { from { opacity: 0; } }

.glass-say { margin: .2rem 0 .5rem; }
.glass-hint { margin: 0 .1rem .9rem; color: var(--muted); font-size: .85rem; line-height: 1.45; }
.glass-row { display: flex; justify-content: space-between; align-items: center; gap: .8rem; min-height: 48px; margin: 0 0 .5rem; padding: 0 1rem; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); color: var(--text); text-decoration: none; }
.glass-row.is-together { border-color: rgb(var(--gold-rgb) / .5); }
.glass-row-count { color: var(--muted); font-variant-numeric: tabular-nums; }

/* What someone said, opened out on the wheel. */
.glass-said { display: flex; justify-content: flex-end; margin: 0 0 .55rem; }
.glass-said span { max-width: 78%; padding: .55rem .9rem; border-radius: 16px 16px 4px 16px; background: #2a2224; font-size: .95rem; }
.glass-lead { margin: 0 0 .5rem; font: 400 1.32rem/1.25 var(--serif); text-wrap: pretty; }
.glass-lead.is-small { font-size: 1.12rem; color: #d9d0c7; }
.glass-families { display: block; width: min(100%, 24rem); margin: 0 auto .7rem; }
.glass-families path { stroke: var(--bg); stroke-width: .8; }
.glass-families text { text-anchor: middle; dominant-baseline: central; font-family: var(--sans); }
.glass-families .families-name { font-size: 11px; font-weight: 600; fill: #15110a; }
.glass-families .on-dark { fill: #fff; }
.glass-families .families-word { font-size: 9.6px; fill: #d9d0c7; }
.glass-families .families-word.outer { font-size: 9.2px; fill: var(--muted); }
.glass-families .families-word.lit { font-size: 10.4px; font-weight: 700; fill: #15110a; }
.glass-families .families-word.lit.on-dark { fill: #fff; }
.glass-families .is-said { animation: glass-said 1.1s ease-out both; }
.glass-families .is-meant { animation: glass-light 1.1s .7s ease-out both; }
.glass-families .is-near { animation: glass-light 1.2s calc(var(--turn) * .35s) ease-out both; }
@keyframes glass-said { from { stroke: #fff; stroke-width: 3; } }
@keyframes glass-light { 0%, 30% { fill-opacity: .16; } }
.glass-words { display: flex; align-items: center; justify-content: center; gap: .6rem; margin: 0 0 .7rem; color: var(--muted); font-size: .9rem; }
.glass-words span { display: inline-flex; align-items: center; min-height: 30px; padding: 0 .75rem; border: 1px solid var(--line-strong); border-radius: 999px; color: #d9d0c7; }
.glass-words span.is-to { border-color: var(--gold); background: rgb(var(--gold-rgb) / .14); color: var(--text); font-weight: 600; }
.glass-words svg { width: 22px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.glass-why, .glass-fit { display: grid; gap: .35rem; margin: 0 0 .7rem; padding: .8rem .9rem; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.glass-why b, .glass-fit b { color: var(--gold); font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.glass-why p, .glass-fit p { margin: 0; color: #d9d0c7; font-size: .92rem; line-height: 1.5; }
.glass-else { margin: 0 0 .8rem; color: var(--muted); font-size: .86rem; line-height: 1.5; }
.glass-keep { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; margin: 0 0 .4rem; }
.glass-keep:has(> :only-of-type) { grid-template-columns: minmax(0, 1fr); }
.glass-keep-word { min-height: 46px; padding: 0 .6rem; border: 1px solid var(--line-strong); border-radius: 13px; background: none; color: var(--text); font: 500 .92rem var(--sans); cursor: pointer; }
.glass-keep-word.is-on { border-color: var(--gold); background: rgb(var(--gold-rgb) / .14); }
.glass-both { margin: 0 0 1rem; color: var(--muted); font-size: .82rem; text-align: center; }
.glass-near { display: grid; gap: .4rem; margin: 0 0 .7rem; padding: 0; list-style: none; }
.glass-near li { display: flex; gap: .75rem; align-items: flex-start; padding: .65rem .8rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); animation: glass-rise .5s calc(var(--turn) * .35s) ease-out both; }
.glass-near li > span:last-child { display: grid; gap: .1rem; }
.glass-near b { font-weight: 600; font-size: .96rem; }
.glass-near li > span:last-child > span { color: var(--muted); font-size: .84rem; line-height: 1.4; }
@keyframes glass-rise { from { opacity: 0; translate: 0 6px; } }
.glass-swatch { flex: none; width: 12px; height: 12px; margin-top: .3rem; border-radius: 50%; }
.glass-pick { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .8rem; }
.glass-pick .chip { background: none; color: var(--text); font: inherit; font-size: .9rem; cursor: pointer; }
.glass-taint { margin: 0 0 1rem; color: var(--muted); font-size: .82rem; line-height: 1.45; }
.glass-back { margin: .4rem 0 1rem; text-align: center; }

/* How it feels: five scales, the step this wine usually shows marked with a gold dot. */
.glass-key { display: flex; align-items: center; gap: .5rem; margin: -.2rem 0 .7rem; color: var(--muted); font-size: .82rem; }
.glass-key i { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); }
.glass-scale { display: grid; gap: .5rem; margin: 0 0 .55rem; padding: .75rem; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.glass-scale-head { display: flex; align-items: center; gap: .65rem; }
.glass-scale-head > span { display: grid; gap: .05rem; }
.glass-scale-head b { font-weight: 600; font-size: .95rem; }
.glass-scale-head span span { color: var(--muted); font-size: .82rem; line-height: 1.35; }
.glass-icon { flex: none; width: 28px; height: 28px; }
.glass-icon.is-fault { width: 30px; height: 30px; margin-top: .1rem; }
.glass-steps { display: flex; gap: .3rem; margin: 0; }
.glass-steps button { flex: 1 1 0; min-width: max-content; position: relative; min-height: 38px; padding: 0 .45rem; border: 1px solid var(--line-strong); border-radius: 10px; background: none; color: #d9d0c7; font: .8rem var(--sans); white-space: nowrap; cursor: pointer; }
.glass-steps button.is-on { border-color: var(--gold); background: rgb(var(--gold-rgb) / .16); color: var(--text); font-weight: 600; }
.glass-steps button.is-usual::after { content: ""; position: absolute; top: -4px; right: -3px; width: 9px; height: 9px; border: 2px solid var(--surface); border-radius: 50%; background: var(--gold); }

/* Something off? */
.glass-faults { display: grid; gap: .35rem; margin: 0 0 .7rem; padding: 0; list-style: none; }
.glass-faults li { display: flex; gap: .7rem; align-items: flex-start; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.glass-faults li > span { display: grid; gap: .1rem; min-width: 0; }
.glass-faults b { font-weight: 600; font-size: .92rem; }
.glass-faults li > span > span { color: #d9d0c7; font-size: .8rem; line-height: 1.38; }
.glass-faults em { color: var(--muted); font-size: .8rem; font-style: normal; line-height: 1.38; }
.glass-faults em span { color: var(--gold); }
.glass-foot { margin: 0 0 1rem; color: var(--muted); font-size: .82rem; line-height: 1.45; }

/* What the table found. */
.glass-found-head { display: flex; align-items: flex-end; gap: .75rem; margin: 0 0 .6rem; }
.glass-found-head > svg { flex: none; width: 96px; height: 62px; overflow: visible; }
.glass-found-head > span { display: grid; gap: .15rem; }
.glass-found-head h1 { margin: 0; font-size: 1.6rem; }
.glass-found-head > span > span { color: var(--muted); font-size: .85rem; }
.glass-draw .bowl { fill: none; stroke: #d9d0c7; stroke-width: 1.2; }
.glass-draw .pour { fill: var(--wine); }
.glass-draw .stem { fill: none; stroke: #d9d0c7; stroke-width: 1.2; stroke-linecap: round; }
.glass-clink { fill: none; stroke: var(--gold); stroke-width: 1.4; stroke-linecap: round; }
.glass-kept { display: flex; align-items: center; gap: .6rem; margin: 0 0 .7rem; padding: .6rem .8rem; border-radius: 12px; background: rgb(var(--gold-rgb) / .1); font-size: .9rem; }
.glass-kept svg { flex: none; width: 18px; height: 18px; fill: none; stroke: var(--gold); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.glass-label { margin: .4rem 0 .35rem; color: var(--muted); font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; }
.glass-found { display: grid; gap: .3rem; margin: 0 0 .5rem; padding: 0; list-style: none; }
.glass-found li { display: flex; align-items: center; gap: .65rem; padding: .55rem .8rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.glass-found li .glass-swatch { margin-top: 0; width: 11px; height: 11px; }
.glass-found li b { flex: 1; font-weight: 500; font-size: .95rem; }
.glass-found li b small { color: var(--muted); font-size: .8rem; font-weight: 400; }
.glass-found li > span:last-child { color: var(--muted); font-size: .82rem; }
.glass-found li.is-new { border-color: rgb(var(--gold-rgb) / .6); animation: glass-land .6s ease-out both; }
@keyframes glass-land { from { opacity: 0; translate: 0 -14px; } }
.glass-felt { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0 0 .5rem; }
.glass-felt span { display: inline-flex; align-items: center; min-height: 30px; padding: 0 .7rem; border-radius: 999px; background: #211b1c; color: #d9d0c7; font-size: .82rem; }
.glass-names .chip { background: none; font: inherit; font-size: .88rem; cursor: pointer; }
.glass-rate { display: flex; align-items: center; flex-wrap: wrap; gap: .3rem .7rem; margin: .5rem 0 .8rem; }
.glass-rate > span { color: var(--muted); font-size: .86rem; }
.glass-note { margin: .4rem 0 1rem; color: var(--muted); font-size: .82rem; line-height: 1.45; text-align: center; }

/* The table's wines together. */
.glass-key-wines { display: grid; gap: .35rem; margin: 0 0 .6rem; padding: 0; list-style: none; }
.glass-key-wines li { display: flex; gap: .65rem; align-items: flex-start; padding: .55rem .8rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.glass-key-wines i, .glass-food i { flex: none; width: 18px; height: 6px; margin-top: .45rem; border-radius: 3px; }
.glass-key-wines a { display: grid; gap: .05rem; color: var(--text); text-decoration: none; }
.glass-key-wines b { font-weight: 600; font-size: .93rem; }
.glass-key-wines span { color: var(--muted); font-size: .8rem; }
.glass-meet { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0 0 .8rem; }
.glass-meet span { display: inline-flex; align-items: center; gap: .35rem; min-height: 32px; padding: 0 .75rem; border: 1px solid var(--line-strong); border-radius: 999px; font-size: .86rem; }
.glass-meet i { width: 8px; height: 8px; border-radius: 50%; }
.glass-fit { border-color: rgb(var(--gold-rgb) / .5); }
.glass-fit.is-coming { display: flex; align-items: center; gap: .9rem; }
.glass-fit.is-coming p { display: grid; gap: .1rem; }
.glass-fit.is-coming span { color: var(--muted); font-size: .88rem; }
.glass-fit-part.has-arrived { animation: glass-rise .5s ease-out both; }
.glass-food { display: grid; margin: 0 0 1rem; padding: 0; list-style: none; }
.glass-food li { display: grid; gap: .15rem; padding: .6rem .1rem; border-bottom: 1px solid var(--line); }
.glass-food li b { display: flex; align-items: center; gap: .5rem; font-weight: 600; font-size: .93rem; }
.glass-food li b i { margin-top: 0; }
.glass-food li span { color: var(--muted); font-size: .84rem; line-height: 1.45; }
.glass-food li strong { color: #d9d0c7; font-size: .86rem; font-weight: 500; }
.glass-felt.is-said { align-items: center; margin: -.1rem 0 .8rem; }
.glass-felt.is-said span b { color: var(--muted); font-weight: 500; margin-right: .3rem; }
.glass-felt.is-said a { font-size: .86rem; }
.glass-families .families-name { font-size: 10.5px; }

/* On What to order: the glass at the end of a wine's line, the sheet it opens, and the card for the table's wines together. */
.can-taste { position: relative; cursor: pointer; }
.menu-list li.can-taste .menu-name { padding-right: 3rem; }
.menu-top.can-taste .scene-kicker, .menu-top.can-taste h2 { padding-right: 2.8rem; }
.glass-tap { position: absolute; top: .45rem; right: 0; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--surface); color: var(--gold); cursor: pointer; }
.menu-top .glass-tap { top: .9rem; right: .9rem; }
.glass-tap svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.glass-tap .glass-tap-wine { fill: none; stroke: none; }
.glass-tap.is-on { border-color: var(--gold); background: rgb(var(--gold-rgb) / .14); }
.glass-tap.is-on .glass-tap-wine { fill: var(--red); }
.glass-sheet { inset: auto 0 0 0; width: min(100%, 32rem); max-width: 100%; margin: 0 auto; padding: .6rem 1.1rem 1.4rem; border: 1px solid var(--line-strong); border-bottom: 0; border-radius: 22px 22px 0 0; background: var(--surface); color: var(--text); box-shadow: 0 -20px 60px rgba(0, 0, 0, .55); }
.glass-sheet:focus { outline: none; }
.glass-sheet::backdrop { background: rgba(8, 6, 6, .62); }
.glass-sheet[open] { animation: glass-sheet-in .28s cubic-bezier(.2, .8, .2, 1); }
@keyframes glass-sheet-in { from { translate: 0 28px; opacity: 0; } }
.glass-sheet-grab { display: block; width: 38px; height: 4px; margin: 0 auto .8rem; border-radius: 2px; background: var(--line-strong); }
.glass-sheet-head { display: flex; gap: .9rem; align-items: center; margin: 0 0 .9rem; }
.glass-sheet-head svg { flex: none; width: 54px; height: 78px; }
.glass-sheet-head > span { display: grid; gap: .25rem; }
.glass-sheet-head b { font: 400 1.3rem/1.15 var(--serif); }
.glass-sheet-head > span > span { color: var(--muted); font-size: .86rem; line-height: 1.4; }
.glass-sheet form { margin: 0; }
.glass-sheet-go { display: flex; align-items: center; justify-content: center; gap: .6rem; }
.glass-sheet-go svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.glass-sheet-foot { display: flex; justify-content: space-between; align-items: center; margin: .7rem 0 0; font-size: .9rem; }
.glass-together { display: flex; gap: .85rem; align-items: center; margin: 0 0 1.2rem; padding: .75rem .95rem; border: 1px solid rgb(var(--gold-rgb) / .5); border-radius: var(--radius); background: var(--surface); color: var(--text); text-decoration: none; }
.glass-together svg { flex: none; width: 40px; height: 40px; fill: none; stroke-width: 2.6; }
.glass-together .ring-1 { stroke: #c4a264; }
.glass-together .ring-2 { stroke: #efe1c4; }
.glass-together .ring-3 { stroke: #f2a0ad; }
.glass-together > span { display: grid; gap: .1rem; }
.glass-together b { font-weight: 600; }
.glass-together > span > span { color: var(--muted); font-size: .86rem; }

@media (prefers-reduced-motion: reduce) {
    .glass-wheel path.glass-ring, .glass-families .is-said, .glass-families .is-meant, .glass-families .is-near, .glass-near li, .glass-found li.is-new, .glass-fit-part.has-arrived, .glass-sheet[open] { animation: none; }
}

/*
    Nothing to check (Add/Batch): the labels are all read, and the racks are drawn small, as the racks page draws them, with the new
    bottles in gold where they will lie. The button that puts them there is the one kept in reach at the foot of the page.
*/
.all-read { margin: .9rem 0 1.4rem; padding: 1rem; border: 1px solid rgb(var(--gold-rgb) / .35); border-radius: 14px; background: rgb(var(--gold-rgb) / .06); }
.all-read-said { display: flex; align-items: center; gap: .45rem; margin: 0 0 .8rem; color: var(--gold-bright); font-weight: 600; }
.all-read-said svg { width: 1.15rem; height: 1.15rem; flex: none; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.all-read-racks { display: flex; flex-wrap: wrap; gap: 1rem 1.4rem; align-items: flex-end; }
.all-read-rack { --u: clamp(5px, calc((100vw - 6rem) / var(--across, 12)), 18px); margin: 0; flex: none; max-width: 100%; }
.all-read-rack figcaption { margin-top: .35rem; color: var(--muted); font-size: .82rem; }

/* Come from adding bottles to more than one rack (Cellar): each rack small, the new bottles landing in it, each leading to its rack. */
.landed { --u: clamp(5px, 2vw, 10px); display: flex; flex-wrap: wrap; gap: 1rem 1.4rem; align-items: flex-end; margin: .4rem 0 1.4rem; }
.landed-rack { display: grid; gap: .35rem; color: var(--muted); font-size: .82rem; text-decoration: none; }
.landed-rack:hover span, .landed-rack:focus-visible span { color: var(--text); }

@media (min-width: 64rem) {
    .glass-wheel, .glass-wheel.is-together { width: 26rem; }
    .glass-families { width: 28rem; }
}
/* What are we tasting? on a wine's page: the card on the day a bottle was opened, and what the table found after. */
.glass-card { display: flex; gap: .8rem; align-items: center; margin: 0 0 1rem; padding: .8rem; border: 1px solid rgb(var(--gold-rgb) / .5); border-radius: 16px; background: var(--surface); }
.glass-card > svg { flex: none; width: 46px; height: 46px; }
.glass-card > svg path { stroke: var(--surface); stroke-width: .8; }
.glass-card-hub { fill: var(--surface); }
.glass-card > span { flex: 1; display: grid; gap: .2rem; min-width: 0; }
.glass-card b { font: 400 1.18rem/1.2 var(--serif); }
.glass-card > span > span { color: var(--muted); font-size: .84rem; line-height: 1.4; }
.glass-card form { margin: 0; }
.glass-card-go { min-height: 42px; padding: 0 .95rem; border: 0; border-radius: 12px; background: var(--gold); color: var(--on-gold); font: 600 .9rem var(--sans); cursor: pointer; }
.glass-row.is-kept { margin-bottom: 1rem; }
.glass-row.is-kept b { font-weight: 600; margin-right: .3rem; }
.glass-row.is-kept > span:first-child { color: var(--muted); font-size: .9rem; }
.glass-row.is-kept > span:first-child b { color: var(--text); }
/* What are we tasting? for every drink with a wheel: a spirit's tips in place of faults, each kind's heading at the table, and the line where kinds meet. */
.glass-tips { display: grid; gap: .45rem; margin: 0 0 1rem; padding: 0; list-style: none; counter-reset: tip; }
.glass-tips li { position: relative; display: grid; gap: .15rem; padding: .7rem .8rem .7rem 2.7rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); counter-increment: tip; }
.glass-tips li::before { content: counter(tip); position: absolute; top: .7rem; left: .8rem; display: grid; place-items: center; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: rgb(var(--gold-rgb) / .16); color: var(--gold-bright); font: 600 .8rem var(--sans); }
.glass-tips b { font-weight: 600; font-size: .95rem; }
.glass-tips span { color: #d9d0c7; font-size: .86rem; line-height: 1.45; }
.glass-kind { margin: 1rem 0 0; font: 400 1.3rem/1.2 var(--serif); }
.glass-bridge { padding-top: .5rem; border-top: 1px solid var(--line); }
.glass-felt span b { margin-right: .3rem; color: var(--muted); font-weight: 500; }
/* What are we tasting?, bring the table in: the host's QR and code, and the guests' page of the table's drinks. Big taps, read at arm's length. */
button.glass-row { width: 100%; font: inherit; text-align: left; cursor: pointer; }
.glass-row.is-door .glass-row-count { font-size: .84rem; }
.table-qr { width: min(78vw, 17rem); margin: .4rem auto 1rem; padding: .7rem; border-radius: 18px; background: #fff; }
.table-qr svg { display: block; width: 100%; height: auto; }
.table-typed { margin: 0 0 .6rem; color: var(--muted); font-size: .9rem; line-height: 1.5; text-align: center; }
.table-typed strong { display: block; margin-top: .3rem; color: var(--text); font: 600 1.7rem/1.2 var(--sans); letter-spacing: .14em; }
.table-joined { margin: 0 0 1rem; font-size: .95rem; text-align: center; }
.table-drinks { display: grid; gap: .5rem; margin: .6rem 0 1.2rem; padding: 0; list-style: none; }
.table-drinks a { display: flex; gap: .8rem; align-items: center; min-height: 64px; padding: .75rem .9rem; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--text); text-decoration: none; }
.table-drinks a > span:last-child { display: grid; gap: .15rem; }
.table-drinks b { font-weight: 600; font-size: 1rem; }
.table-drinks a > span:last-child > span { color: var(--muted); font-size: .86rem; line-height: 1.4; }
.table-dots { flex: none; display: grid; grid-template-columns: repeat(2, 12px); gap: 3px; }
.table-dots i { width: 12px; height: 12px; border-radius: 50%; }
.table-name { display: grid; gap: .4rem; margin: 0 0 1.2rem; }
.table-name label { color: var(--muted); font-size: .9rem; }
.table-code { display: grid; gap: .7rem; margin: 1rem 0; }
.table-code input { min-height: 56px; font: 600 1.5rem var(--sans); letter-spacing: .14em; text-align: center; text-transform: uppercase; }
/* What are we tasting?, a step at a time: the step bar, the look strips, the reveal and the together rings. Big taps, read at arm's length. */
.glass-steps-bar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .3rem; margin: .2rem 0 1rem; padding: 0; list-style: none; counter-reset: none; }
.glass-steps-bar a { display: grid; justify-items: center; gap: .2rem; padding: .45rem .2rem; border-radius: 12px; color: var(--muted); font-size: .8rem; text-decoration: none; }
.glass-steps-bar a span { display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border: 1px solid var(--line-strong); border-radius: 50%; font: 600 .82rem var(--sans); }
.glass-steps-bar a.is-done span { border-color: rgb(var(--gold-rgb) / .6); color: var(--gold-bright); }
.glass-steps-bar a[aria-current="step"] { background: var(--surface); color: var(--text); }
.glass-steps-bar a[aria-current="step"] span { border-color: var(--gold); background: var(--gold); color: var(--on-gold); }
.glass-step-ask { margin: 0 0 .5rem; font: 400 1.4rem/1.25 var(--serif); text-wrap: balance; }
.glass-step-line { margin: 0 0 .8rem; color: #d9d0c7; font-size: .92rem; line-height: 1.5; }
.glass-look { margin: 0 0 .6rem; }
.glass-strip { display: flex; gap: .35rem; margin: 0 0 .4rem; }
.glass-strip button { flex: 1 1 0; min-width: 0; display: grid; justify-items: center; gap: .3rem; min-height: 64px; padding: .4rem .2rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--muted); font: .78rem/1.2 var(--sans); cursor: pointer; }
.glass-strip button i { width: 100%; max-width: 3rem; height: 1.6rem; border-radius: 999px; background: var(--swatch); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .08); }
.glass-strip button[aria-pressed="true"] { border-color: var(--gold); color: var(--text); font-weight: 600; }
.glass-reveal { display: grid; gap: .5rem; margin: 0 0 1rem; padding: .85rem .95rem; border: 1px solid rgb(var(--gold-rgb) / .5); border-radius: 16px; background: var(--surface); animation: glass-rise .5s ease-out both; }
.glass-reveal p { margin: 0; color: #d9d0c7; font-size: .92rem; line-height: 1.5; }
.glass-reveal b { color: var(--text); font-weight: 600; }
.glass-reveal-lead { color: var(--text) !important; font: 400 1.12rem/1.35 var(--serif) !important; }
p.glass-reveal { color: var(--text); font-size: .95rem; line-height: 1.5; }
.glass-more-near { margin: 0 0 1rem; }
.glass-more-near summary { color: var(--gold); font-weight: 600; cursor: pointer; }
.glass-more-near .glass-near { margin-top: .5rem; }
.glass-wheel .glass-ring-label circle { stroke: var(--bg); stroke-width: 1.4; }
.glass-wheel .glass-ring-label text { fill: #15110a; font: 700 8.5px var(--sans); }
.glass-key-wines i { display: grid; place-items: center; width: 1.4rem; height: 1.4rem; margin-top: .05rem; border-radius: 50%; color: #15110a; font: 700 .72rem var(--sans); font-style: normal; }
.glass-food-line { margin: 0 0 .7rem; font: 400 1.15rem/1.35 var(--serif); text-wrap: pretty; }
/* What's in your glass?: the cellar's drinks to taste, a row each, the whole row one tap. */
.glass-photo { margin: .6rem 0 .8rem; }
.glass-find { margin: .4rem 0 1rem; }
.glass-find input { margin: 0; border-radius: 999px; padding-left: 1.1rem; }
.glass-bottles { display: grid; gap: .4rem; margin: .2rem 0 1.2rem; padding: 0; list-style: none; }
.glass-bottles li, .glass-bottles form { min-width: 0; margin: 0; }
.glass-bottles a, .glass-bottles button { display: grid; gap: .1rem; width: 100%; min-height: 56px; padding: .6rem .9rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text); font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.glass-bottles a:hover, .glass-bottles button:hover { border-color: var(--gold); }
.glass-bottles a:focus-visible, .glass-bottles button:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 2px; }
.glass-bottles b { min-width: 0; overflow: hidden; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.glass-bottles span { min-width: 0; overflow: hidden; color: var(--muted); font-size: .86rem; text-overflow: ellipsis; white-space: nowrap; }
.glass-front { display: flex; gap: .9rem; align-items: center; padding: .9rem 1rem; border: 1px solid rgb(var(--gold-rgb) / .5); border-radius: var(--radius); background: var(--surface); color: var(--text); text-decoration: none; }
.glass-mark { flex: none; width: 56px; height: 56px; }
.glass-mark path { stroke: var(--surface); stroke-width: .8; opacity: .4; }
.glass-mark path.is-lit { opacity: 1; }
.play-friends.has-art > .glass-mark { border-radius: 50%; box-shadow: none; }
@media (prefers-reduced-motion: no-preference) {
    .js .glass-mark:not(.is-seen) path.is-lit { opacity: .4; }
    .js .glass-mark.is-seen path.is-lit { animation: glass-mark-light 1.2s calc(var(--at) * .25s + .2s) ease-out both; }
}
@keyframes glass-mark-light { from { opacity: .4; } }
.glass-front > span { display: grid; gap: .2rem; }
.glass-front b { font: 400 1.25rem/1.2 var(--serif); }
.glass-front > span > span { color: var(--muted); font-size: .88rem; line-height: 1.4; }
@media (prefers-reduced-motion: reduce) {
    .glass-reveal { animation: none; }
}
/* Which spirit is it?: one big tap a kind, each with its wheel's first colors. */
.glass-which { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; margin: .4rem 0 1.2rem; padding: 0; list-style: none; }
.glass-which form { margin: 0; }
.glass-which button { display: grid; gap: .45rem; justify-items: start; width: 100%; min-height: 76px; padding: .8rem .9rem; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.glass-which b { font: 400 1.15rem/1.2 var(--serif); }
/* Bring the table in: what it does under its name, so a long glass title never squeezes it. */
.glass-row.is-door { display: grid; justify-items: start; gap: .1rem; padding: .65rem 1rem; }
/* The reveal opens at the top of the screen, clear of the header. */
#glass-reveal { scroll-margin-top: 5rem; }
/* Tonight's glasses on the helper's page: one line each, so the ways in stay on the first screen. A glass not yet tasted has an unlit dot. */
.table-drinks.is-one-line { gap: .4rem; margin-bottom: 1rem; }
.table-drinks.is-one-line li { min-width: 0; }
.table-drinks.is-one-line a { min-width: 0; min-height: 52px; padding: .55rem .9rem; }
.table-drinks.is-one-line b { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.table-dots i.is-unlit { box-shadow: inset 0 0 0 1.5px var(--line-strong); }
/* Tears, drawn: a glass's bowl with the drink in it, and the tears running down its side above, thin and quick or slow and thick. */
.glass-strip button svg.glass-tears { width: 100%; max-width: 3.4rem; height: 2.1rem; fill: none; stroke-linecap: round; }
.glass-tears-bowl { stroke: var(--line-strong); stroke-width: 1.3; }
.glass-tears-wine { fill: var(--tear); }
.glass-tears-legs { stroke: var(--tear); }
.glass-tears-legs.is-thin { stroke-width: 1; }
.glass-tears-legs.is-thick { stroke-width: 2.6; }
.glass-tears-drops { fill: var(--tear); }
/* A family this drink does not reach, drawn dark: Malt on a gin that is not a genever. */
.glass-wheel .wheel-family.is-quiet { opacity: .45; }
/*
    What are we tasting?, drawn on the front page: the wine wheel, then a word found, the words it is known for, and the line under it,
    played once when seen (drawings.js). Drawn as it ends for anyone who asked for less motion, or has no script.
*/
.glass-show { max-width: 24rem; margin: .4rem auto 1rem; overflow: visible; }
.drawing.glass-show svg { width: min(100%, 21rem); height: auto; margin: 0 auto; }
.glass-show .glass-piece.is-lit { fill-opacity: 1; }
.glass-show-line { max-width: 21rem; margin: .7rem auto 0; color: var(--text); font: 400 1.12rem/1.4 var(--serif); text-align: center; text-wrap: balance; }
.glass-show-line b { color: var(--gold-bright); font-weight: 400; }
@media (prefers-reduced-motion: no-preference) {
    .js .glass-show:not(.is-seen) .glass-piece.is-lit { fill-opacity: .13; }
    .js .glass-show:not(.is-seen) :is(.glass-show-word, .glass-found, .glass-show-line) { opacity: 0; }
    .js .glass-show.is-seen .glass-piece.is-lit { animation: glass-show-light .9s var(--at) ease-out both; }
    .js .glass-show.is-seen .glass-show-word { animation: glass-show-fade .6s var(--at) ease-out both; }
    .js .glass-show.is-seen .glass-found { animation: glass-show-fade .6s .6s ease-out both; }
    .js .glass-show.is-seen .glass-show-line { animation: glass-show-rise .7s 2.5s ease-out both; }
}
@keyframes glass-show-light { from { fill-opacity: .13; } }
@keyframes glass-show-fade { from { opacity: 0; } }
@keyframes glass-show-rise { from { opacity: 0; transform: translateY(.4rem); } }
/*
    What are we tasting?, simplified: one way in, then four steps, each one screen. A plain line on how, a few taps, then how it
    compares and why the step matters, and one button on. The whole wheel and your own words wait one tap away.
*/
.glass-photo .capture { margin: .9rem 0 .4rem; }
.glass-photo .capture-button { min-height: 9.5rem; }
.glass-photo-line { margin: 0 0 1.1rem; color: var(--muted); font-size: .86rem; line-height: 1.45; text-align: center; }
.glass-join { margin: 1.2rem 0 1rem; font-size: .88rem; text-align: center; }
.glass-how { margin: 0 0 .9rem; color: var(--text); font: 400 1.16rem/1.4 var(--serif); text-wrap: pretty; }
.glass-how-fold { margin: -.3rem 0 .8rem; }
.glass-how-fold > summary { display: inline-block; color: var(--gold); font-size: .88rem; font-weight: 600; cursor: pointer; list-style: none; }
.glass-how-fold > summary::-webkit-details-marker { display: none; }
.glass-how-fold[open] > summary { margin-bottom: .35rem; }
.glass-how-fold .glass-how { font-size: 1.04rem; }
.glass-chips { display: flex; flex-wrap: wrap; gap: .45rem; min-width: 0; margin: 0 0 .9rem; padding: 0; border: 0; }
.glass-chips > legend { width: 100%; margin: 0 0 .5rem; padding: 0; }
.glass-chip { position: relative; display: inline-flex; cursor: pointer; }
.glass-chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.glass-chip > span { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; padding: 0 1rem; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--text); font-size: .95rem; transition: border-color .15s, background-color .15s; }
.glass-chip > span i { width: 10px; height: 10px; border-radius: 50%; }
.glass-chip input:checked + span { border-color: var(--gold); background: rgb(var(--gold-rgb) / .16); font-weight: 600; }
.glass-chip input:checked + span::after { content: ""; width: 10px; height: 6px; margin-left: .1rem; border: solid var(--gold-bright); border-width: 0 0 2px 2px; transform: translateY(-2px) rotate(-45deg); }
.glass-chip input:disabled { cursor: default; }
.glass-chip input:focus-visible + span { outline: 2px solid var(--gold-bright); outline-offset: 2px; }
.glass-chip.is-finer > span { min-height: 36px; padding: 0 .8rem; font-size: .86rem; }
.glass-taps { margin: 0 0 .4rem; }
.glass-taps > .btn { margin-bottom: .7rem; }
.glass-own { margin: 0 0 .7rem; border-top: 1px solid var(--line); }
.glass-own > summary { display: flex; justify-content: space-between; align-items: center; min-height: 46px; color: var(--text); font-size: .95rem; cursor: pointer; list-style: none; }
.glass-own > summary::-webkit-details-marker { display: none; }
.glass-own > summary::after { content: "›"; color: var(--muted); font-size: 1.2rem; transition: transform .2s; }
.glass-own[open] > summary::after { transform: rotate(90deg); }
.glass-pick-word { cursor: pointer; }
.glass-pick-word:hover .glass-piece { filter: brightness(1.25) saturate(1.15); }
.glass-pick-word.is-chosen .glass-piece { fill-opacity: 1; }
.glass-pick-word.is-chosen text.wheel-word { fill: #1c1513; font-size: 10.8px; font-weight: 700; }
.glass-pick-word.is-chosen.on-dark text.wheel-word { fill: #fff; }
.glass-pick-word.is-chosen .glass-piece { stroke: var(--gold-bright); stroke-width: 2.4; }
.glass-pick-word:focus-visible { outline: none; }
.glass-pick-word:focus-visible .glass-piece { stroke: var(--text); stroke-width: 2.4; }
.glass-wheel path.glass-carried { fill: none; stroke: var(--gold-bright); stroke-width: 2.4; stroke-dasharray: 1.6 2.8; stroke-linecap: round; }
.glass-pick-word.is-chosen .glass-carried { display: none; }

/* The big wheel at the smell and the taste, to turn and to tap, with what was chosen under it. */
.glass-wheel-card { display: grid; gap: .7rem; margin: 0 0 .9rem; padding: .9rem; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.glass-wheel-card .glass-wheel { width: 100%; max-width: 26rem; margin: 0 auto; touch-action: pan-y pinch-zoom; user-select: none; -webkit-user-select: none; }
.glass-wheel-card .wheel-stage .glass-wheel { max-width: none; margin: 0; }
.glass-wheel-card .glass-wheel path { stroke: var(--surface); }
.glass-wheel-card .wheel-knob { width: 27%; }
.glass-wheel-card figcaption, .glass-wheel-hint { margin: 0; color: var(--muted); font-size: .84rem; line-height: 1.45; text-align: center; }

/* With the script, the families under the wheel are what was chosen: only the words chosen show, each a card of its own. */
.glass-family-list.is-tray { gap: .45rem; margin: 0; }
.glass-family-list.is-tray > .glass-label { margin: .2rem 0 0; }
.glass-family-list.is-tray .glass-family { border: 0; background: none; }
.glass-family-list.is-tray .glass-family.is-quiet { opacity: 1; }
.glass-family-list.is-tray .glass-family > summary { display: none; }
.glass-family-list.is-tray .glass-family ul { gap: .45rem; padding: 0; }
.glass-family-list.is-tray .glass-family li { padding: .7rem .8rem; border: 1px solid var(--line); border-left: 6px solid var(--side); border-radius: 14px; background: var(--surface-raised); }
.glass-family-list.is-tray .glass-family li:not(.is-on) { display: none; }
.glass-family-list { display: grid; gap: .35rem; margin: .4rem 0 .8rem; }
.glass-family { border: 1px solid var(--line); border-left: 6px solid var(--side); border-radius: 14px; background: var(--surface); }
.glass-family.is-quiet { opacity: .55; }
.glass-family > summary { display: grid; gap: .1rem; padding: .6rem .8rem; cursor: pointer; list-style: none; }
.glass-family > summary::-webkit-details-marker { display: none; }
.glass-family > summary b { font-weight: 600; font-size: .95rem; }
.glass-family > summary span { color: var(--muted); font-size: .8rem; line-height: 1.35; }
.glass-family ul { display: grid; gap: .7rem; margin: 0; padding: .2rem .8rem .8rem; list-style: none; }
.glass-family li { display: grid; justify-items: start; gap: .3rem; }
.glass-means { color: #d9d0c7; font-size: .84rem; line-height: 1.4; }
.glass-finer { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; color: var(--muted); font-size: .78rem; }
.glass-own form { margin: 0 0 .6rem; }
.glass-own .glass-hint { margin: .45rem .1rem 0; }
.glass-reveal p.glass-why-line { color: #d9d0c7; font-size: .9rem; }
.glass-why-line b { display: block; margin-bottom: .15rem; color: var(--gold); font-size: .7rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.glass-next { margin-top: .2rem; }
.glass-back.is-quiet { margin-top: -.3rem; font-size: .86rem; }
.glass-back.is-quiet a { color: var(--muted); }
.glass-more-look { margin: 0 0 .6rem; }
.glass-more-look > summary { min-height: 40px; color: var(--gold); font-size: .9rem; font-weight: 600; cursor: pointer; }
.glass-finish { margin: 0 0 .5rem; }
.glass-finish fieldset.glass-scale { min-width: 0; }
.glass-finish legend.glass-scale-head { float: left; width: 100%; margin: 0 0 .5rem; padding: 0; }
.glass-finish legend.glass-scale-head + .glass-steps { clear: both; }
.glass-steps label { position: relative; display: grid; flex: 1 1 0; min-width: max-content; }
.glass-steps label input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.glass-steps label span { display: grid; place-items: center; min-height: 40px; padding: 0 .45rem; border: 1px solid var(--line-strong); border-radius: 10px; color: #d9d0c7; font: .8rem var(--sans); white-space: nowrap; }
.glass-steps label input:checked + span { border-color: var(--gold); background: rgb(var(--gold-rgb) / .16); color: var(--text); font-weight: 600; }
.glass-steps label input:focus-visible + span { outline: 2px solid var(--gold-bright); outline-offset: 2px; }
.glass-steps label.is-usual::after { content: ""; position: absolute; top: -4px; right: -3px; width: 9px; height: 9px; border: 2px solid var(--surface); border-radius: 50%; background: var(--gold); }
.glass-finish > .btn { margin-top: .3rem; }
.glass-usual { margin: -.1rem 0 .7rem; color: var(--muted); font-size: .86rem; line-height: 1.45; }
.glass-usual b { color: #d9d0c7; font-weight: 600; }
p.glass-reveal.glass-reveal-lead { margin-bottom: .9rem; }
@media (prefers-reduced-motion: reduce) {
    .glass-chip > span, .glass-whole > summary::after, .glass-own > summary::after { transition: none; }
}
/* On a guest's phone, whose page is centered, a step reads as it does on the host's: its line, its taps and how it compares from the left. */
.guest-page :is(.glass-how, .glass-how-fold, .glass-step-line, .glass-taps, .glass-whole, .glass-own, .glass-reveal, .glass-finish, .glass-look, .glass-more-look, .glass-key, .glass-live) { text-align: left; }
/*
    A live tasting that pours more than one kind: at the end, a wheel for each kind, side by side where there is room, each lit by that
    kind's pours and with its own line, since a beer's flavors and a wine's are on wheels of their own.
*/
/* The box that holds each kind's wheel fills its place, so that the wheel in it is drawn at the size the screen gives it. */
.live-kind-wheel { display: grid; justify-items: center; width: 100%; }
.live-nights { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 1.2rem 1.6rem; width: 100%; max-width: 48rem; }
.live-night-kind { display: grid; justify-items: center; align-content: start; gap: .5rem; min-width: 0; }
.live-night-head { margin: 0; color: var(--gold-bright); font: 600 .78rem var(--sans); letter-spacing: .16em; text-transform: uppercase; }
.live-night-kind .wheel { width: min(100%, 19rem); max-width: none; }
.live-night-kind .says-table { max-width: 22rem; margin: 0; color: var(--text); font: 400 1.05rem/1.3 var(--serif); text-align: center; }
@media (min-width: 46rem) and (orientation: landscape) {
    .live-over.has-night > .live-nights { grid-column: 2; grid-row: 1 / span 8; max-width: none; column-gap: 1.2vw; }
    /* With a wheel for each kind, the words at the left give up room to the wheels, so that each is drawn big enough to read across a room. */
    .live.is-staged .live-over.has-nights { grid-template-columns: minmax(0, .62fr) minmax(0, 1.6fr); column-gap: 2.5vw; }
    .live-over.has-nights h1, .live-over.has-nights .scene-sub { max-width: 30vw; }
    .live-night-kind .wheel { width: min(100%, 62vh, 30vw); }
    /* On a television the table's wheel is the thing the room reads from across it: as big as the screen allows beside the glasses. */
    .live-face .live-table .wheel { width: min(100%, 56vh, 40vw); }
    .live-night-head { font-size: clamp(.7rem, min(1vw, 2vh), 1.1rem); }
    .live-night-kind .says-table { max-width: 24vw; font-size: clamp(.8rem, min(1.3vw, 2.6vh), 1.6rem); }
}

/*
    The racks through the years (years.js, _YearDial). A dial over the wall of racks sets a year, and every bottle with a drinking
    window shows what it will be then: to keep stands back, ready is lit, to open soon turns warm, past its best greys. A
    bar for each year counts the bottles ready to open, so a year with none shows as a gap. The colours are the When to drink ones.
    Only the dial's own section: a vertical's row of years on Tastings is also .years.
*/
section.years { display: grid; gap: .75rem; margin: 0 0 1rem; padding: 14px 16px 12px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
section.years[hidden] { display: none; }
.years-head { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: .85rem; }
.years-play { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; padding: 0; border: 1px solid var(--line-strong); border-radius: 50%; background: none; color: var(--text); cursor: pointer; }
.years-play:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.years-play svg { width: 1rem; height: 1rem; fill: currentColor; }
.years-play .years-pause, .years-play[aria-pressed="true"] .years-start { display: none; }
.years-play[aria-pressed="true"] .years-pause { display: block; }
.years-year { min-width: 3.2ch; font-family: var(--serif); font-size: 2.1rem; line-height: 1; font-variant-numeric: tabular-nums; }
.years-said { margin: 0; color: var(--muted); font-size: .86rem; line-height: 1.4; }
.years-track { display: grid; gap: .3rem; }
.years-bars { display: flex; align-items: flex-end; gap: 2px; height: 2.4rem; padding: 0 8px; }
.years-bars i { flex: 1; height: var(--h); min-height: 3px; border-radius: 2px 2px 0 0; background: rgb(var(--stage-ready-rgb) / .3); cursor: pointer; transition: background .2s ease; }
.years-bars i.is-none { height: 3px; background: rgb(var(--stage-keep-rgb) / .25); }
.years-bars i.is-now { background: var(--stage-ready); }
.years-bars i.is-now.is-none { background: var(--stage-keep); }
.years-range { width: 100%; margin: 0; accent-color: var(--gold); }
.years-ends { display: flex; justify-content: space-between; padding: 0 2px; color: var(--faint); font-size: .72rem; font-variant-numeric: tabular-nums; }
.years-key { display: flex; flex-wrap: wrap; gap: .3rem .95rem; margin: 0; padding: 0; color: var(--muted); font-size: .78rem; list-style: none; }
.years-key i { display: inline-block; width: .55rem; height: .55rem; margin-right: .4rem; border-radius: 50%; vertical-align: .02em; }
.years-key .key-ready i { background: var(--stage-ready); }
.years-key .key-soon i { background: var(--stage-soon); }
.years-key .key-young i { background: rgb(var(--stage-keep-rgb) / .45); }
.years-key .key-past i { background: var(--faint); }

.cellar-wall.is-years .filled { transition: opacity .35s ease, filter .35s ease, box-shadow .35s ease; }
.cellar-wall.is-years .filled[data-when="young"] { opacity: .2; filter: saturate(.4); }
.cellar-wall.is-years .filled[data-when="past"] { opacity: .28; filter: grayscale(1); }
.cellar-wall.is-years .filled[data-when="unknown"] { opacity: .35; filter: grayscale(.8); }
.cellar-wall.is-years .filled[data-when="ready"] { filter: brightness(1.12); }
.cellar-wall.is-years .hole.filled[data-when="ready"] { box-shadow: 0 0 0 1.5px var(--stage-ready), 0 0 6px 1px rgb(var(--stage-ready-rgb) / .55); }
.cellar-wall.is-years .hole.filled[data-when="soon"] { box-shadow: 0 0 0 1.5px var(--gold-bright), 0 0 7px 2px rgb(var(--gold-bright-rgb) / .7); }
.cellar-wall.is-years .profile.filled[data-when="soon"] { filter: sepia(.6) saturate(1.7) brightness(1.2); }

@media (prefers-reduced-motion: reduce) {
    .cellar-wall.is-years .filled, .years-bars i { transition: none; }
}

/*
    A wine's life on its Bottles board (_WineLife, WineLife): the curve of the wine rising to its window, at its best across it and
    fading after, the window behind it, now, a dot in the wine's colour for each bottle in the year it is best opened in, and a ring
    for each already opened. The curve draws itself once and the dots follow, soonest first.
*/
.wine-life { margin: 0 0 1rem; padding: 12px 14px 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.life-title { margin: 0 0 .2rem; color: var(--muted); font: 600 .72rem/1.2 var(--sans); letter-spacing: .16em; text-transform: uppercase; }
.life-drawing { display: block; width: 100%; height: auto; overflow: visible; font-family: var(--sans); }
.life-window { fill: rgb(var(--stage-ready-rgb) / .07); }
.life-ground { fill: var(--wine, var(--unsorted)); fill-opacity: .16; }
.life-curve { fill: none; stroke: var(--wine, var(--unsorted)); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.life-floor { stroke: var(--line-strong); stroke-width: 1; }
.life-now { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 3; }
.life-now-said { fill: var(--muted); font-size: 9.5px; text-anchor: middle; }
.life-opened { fill: none; stroke: var(--faint); stroke-width: 1.4; }
.life-bottle { fill: var(--wine, var(--unsorted)); stroke: var(--stage-ready); stroke-width: 1.6; transform-box: fill-box; transform-origin: center; }
.life-year { fill: var(--text); font-size: 10.5px; font-weight: 600; text-anchor: middle; font-variant-numeric: tabular-nums; }
.life-zone { fill: var(--muted); font-size: 9.5px; paint-order: stroke; stroke: var(--surface); stroke-width: 2.5px; stroke-linejoin: round; }
.life-end { fill: var(--muted); font-size: 10px; text-anchor: middle; font-variant-numeric: tabular-nums; }
.life-said { margin: .35rem 0 0; font-size: .95rem; line-height: 1.45; }

@supports (color: color-mix(in srgb, red, blue)) {
    .life-curve { stroke: color-mix(in srgb, var(--wine, var(--unsorted)) 72%, #fff); }
}

.life-curve { stroke-dasharray: 1; stroke-dashoffset: 1; animation: life-draw 1.1s ease-out .1s forwards; }
.life-ground { animation: life-fade .6s ease-out .55s both; }
.life-bottle { animation: life-dot .45s cubic-bezier(.2, .8, .3, 1.35) both; animation-delay: var(--at, 1s); }
@keyframes life-draw { to { stroke-dashoffset: 0; } }
@keyframes life-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes life-dot { from { opacity: 0; scale: .2; } to { opacity: 1; scale: 1; } }

@media (prefers-reduced-motion: reduce) {
    .life-curve { stroke-dashoffset: 0; animation: none; }
    .life-ground, .life-bottle { animation: none; }
}

/*
    Fill the gaps (years.js, _YearDial): the pace the cellar is opened at, as a line across the year bars, the years that fall short of it
    marked, and a chosen short year offered to fill with bottles to buy that will be ready then.
*/
.years-bars { position: relative; }
.years-bars i.is-short { background: rgba(255, 144, 134, .45); }
.years-bars i.is-short.is-now { background: var(--danger); }
.years-pace { position: absolute; right: 8px; bottom: var(--at); left: 8px; height: 0; border-top: 1.5px dashed rgb(var(--stage-ready-rgb) / .75); pointer-events: none; }
.years-pace span { position: absolute; right: 0; bottom: 3px; color: var(--stage-ready); font-size: .66rem; line-height: 1; white-space: nowrap; }
.years-fill { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin: 0; padding: .6rem .7rem .6rem .85rem; border: 1px solid rgba(255, 144, 134, .35); border-radius: 14px; }
.years-fill[hidden] { display: none; }
.years-short { margin: 0; font-size: .86rem; line-height: 1.4; }
.years-fill .btn { flex: none; min-height: 44px; padding: 0 1rem; }
.plan-fill { margin: -.2rem 0 .6rem; font-size: .98rem; line-height: 1.45; }

/* Moving from page to page within Kept, as an app moves: the header and the tabs stay where they are, and the page between them slides
   in a little and fades up in place of the last, a quarter of a second in all, the other way when going back. A bottle tapped in a list
   grows into the picture at the top of its own page, and going back it shrinks into its row again (turns.js names the one that moves).
   A browser that cannot do this changes page as it always has, and nothing moves for anyone who has asked for less motion. */
@media (prefers-reduced-motion: no-preference) {
    @view-transition { navigation: auto; }
}

.topbar { view-transition-name: kept-top; }
.tabbar { view-transition-name: kept-tabs; }
main.page > .wine-head > :first-child { view-transition-name: kept-bottle; }

::view-transition-old(root) { animation: 160ms cubic-bezier(.4, 0, 1, 1) both kept-leave; }
::view-transition-new(root) { animation: 260ms cubic-bezier(.2, .8, .2, 1) 30ms both kept-arrive; }
html:active-view-transition-type(back)::view-transition-old(root) { animation-name: kept-leave-back; }
html:active-view-transition-type(back)::view-transition-new(root) { animation-name: kept-arrive-back; }
::view-transition-group(kept-bottle) { animation-duration: 320ms; animation-timing-function: cubic-bezier(.2, .8, .2, 1); }

@keyframes kept-leave { to { opacity: 0; transform: translateX(-24px); } }
@keyframes kept-arrive { from { opacity: 0; transform: translateX(24px); } }
@keyframes kept-leave-back { to { opacity: 0; transform: translateX(24px); } }
@keyframes kept-arrive-back { from { opacity: 0; transform: translateX(-24px); } }

/* The header and the tabs stay over the page while it changes, whatever else moves with it. A rack is a moving part of its own
   (_Rack.cshtml), so that it grows from where it was; one that is only on the page arriving is put after them, and without this it is
   drawn over the header and the tabs until the page has come in. */
::view-transition-group(kept-top), ::view-transition-group(kept-tabs) { z-index: 1; }

/* Their blur is not in the picture taken of them for the change, so each is given the solid ground it looks to have, and nothing of
   either page shows through them while it slides. */
::view-transition-group(kept-top), ::view-transition-group(kept-tabs) { background: var(--bg); }

/* The version at the foot of the settings, as quiet as the one on the sign-in page; tapped, it says how this device opens Kept. */
.settings-version { margin: 1.6rem 0 .5rem; color: var(--muted); font-size: .78rem; letter-spacing: .04em; text-align: center; }
.settings-version > summary { display: inline-block; min-height: 44px; padding: .9rem .75rem; list-style: none; cursor: pointer; opacity: .7; }
.settings-version > summary::-webkit-details-marker { display: none; }
.settings-version > summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 8px; }
.settings-version p { margin: 0 auto; max-width: 22rem; letter-spacing: 0; line-height: 1.45; }

/* A note from Kept on its own page (Note.cshtml): the email's own card, as the email shows it, and a quiet line under it. */
.note-card { max-width: 560px; margin: 0 auto 1.2rem; overflow: hidden; border: 1px solid #2d2627; border-radius: 20px; background: #191614; }
.note-card img { max-width: 100%; height: auto; }
.note-card a { -webkit-tap-highlight-color: transparent; }
.note-off { max-width: 560px; margin: 0 auto 2rem; padding: 0 .4rem; color: var(--muted); font-size: .86rem; line-height: 1.5; }
.note-off a { color: var(--text); }

/* Your year in Kept (Year.cshtml, year.js): cards side by side, one showing at a time, bars over them saying which, as a story is. */
.story { position: relative; max-width: 26rem; margin: 0 auto 2rem; }
.story-bars { display: flex; gap: 4px; margin: 0 0 .7rem; }
.story-bars span { flex: 1; height: 3px; overflow: hidden; border-radius: 2px; background: var(--line); }
.story-bars i { display: block; width: 0; height: 100%; background: var(--gold); }
@keyframes story-fill { from { width: 0; } to { width: 100%; } }
.story-cards { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 22px; outline: none; }
.story-cards::-webkit-scrollbar { display: none; }
.story-card { display: grid; flex: 0 0 100%; align-content: center; justify-items: center; gap: .6rem; min-height: min(34rem, 72svh); padding: 1.6rem 1.3rem 2rem; scroll-snap-align: start; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); text-align: center; }
.story-card img { max-width: 100%; height: auto; border-radius: 14px; }
.story-card .story-icon { width: 8rem; }
.story-card .story-bottle { width: 4.2rem; }
.story-card p { margin: 0; color: var(--text); line-height: 1.45; }
.story-small { color: var(--muted) !important; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; }
.story-big { margin: 0; font-family: var(--serif); font-size: clamp(3.2rem, 18vw, 5rem); font-weight: 400; line-height: 1; color: var(--gold); }
.story-mid { font-family: var(--serif); font-size: 1.6rem; line-height: 1.25; text-wrap: balance; }
.story-actions { display: grid; gap: .6rem; width: 100%; margin-top: .8rem; }
/* On a phone the card is spaced as the email is on one: its own styles say so only to mail apps, so the page says it again. */
@media (max-width: 37.4rem) {
    .note-card .k-pad { padding: 24px 20px 26px !important; }
    .note-card .k-h1 { font-size: 25px !important; line-height: 31px !important; }
    .note-card .k-tile-cell { width: 44px !important; padding-right: 14px !important; }
    .note-card .k-tile { width: 44px !important; height: 44px !important; }
}

/*
    The way in (_Entrance, entrance.js): the first time someone arrives in a cellar they walk into it. The doors swing open on their own
    sides of the arch, the light inside comes up, the bottle ends light a row at a time, the cellar's name comes up in gold, and the scene
    grows toward the arch until the person is through it, and fades into the page. About three seconds; a tap skips it.
*/
.is-entering, .is-entering body { overflow: hidden; }
.entrance { position: fixed; inset: 0; z-index: 100; display: grid; background: #0d0809; animation: entrance-out .6s 2.65s ease forwards; cursor: pointer; }
.entrance.is-leaving { animation: entrance-out .35s ease forwards; }
.entrance-scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.entrance-world { transform-origin: 195px 500px; animation: entrance-walk 1.4s 1.55s cubic-bezier(.55, 0, .3, 1) forwards; }
.entrance-door-left { transform-origin: 95px 475px; animation: entrance-door-left 1.1s .55s cubic-bezier(.6, 0, .25, 1) forwards; }
.entrance-door-right { transform-origin: 295px 475px; animation: entrance-door-right 1.1s .55s cubic-bezier(.6, 0, .25, 1) forwards; }
.entrance-seam { animation: entrance-gone .2s .6s forwards; }
.entrance-light { opacity: .15; animation: entrance-up 1.2s .8s ease forwards; }
.entrance-end { opacity: .18; animation: entrance-lit .45s calc(1.05s + var(--at)) ease forwards; }
.entrance-flame { transform-box: fill-box; transform-origin: 50% 100%; animation: entrance-flicker 1.4s ease-in-out infinite alternate; }
.entrance-name { position: absolute; left: 0; right: 0; top: max(14vh, env(safe-area-inset-top)); margin: 0; padding: 0 1.2rem; text-align: center; font-family: var(--serif); font-size: clamp(1.9rem, 8vw, 2.8rem); line-height: 1.15; color: var(--gold); opacity: 0; text-shadow: 0 2px 22px rgba(0, 0, 0, .7); animation: entrance-name 1.6s 1.1s ease forwards; }
@keyframes entrance-door-left { to { transform: skewY(-9deg) scaleX(.12); } }
@keyframes entrance-door-right { to { transform: skewY(9deg) scaleX(.12); } }
@keyframes entrance-walk { to { transform: scale(2.3); } }
@keyframes entrance-up { to { opacity: 1; } }
@keyframes entrance-lit { to { opacity: 1; } }
@keyframes entrance-gone { to { opacity: 0; } }
@keyframes entrance-flicker { to { transform: scaleY(1.12) skewX(-3deg); } }
@keyframes entrance-name { 0% { opacity: 0; transform: translateY(10px); } 30%, 80% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-6px); } }
@keyframes entrance-out { to { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) {
    .entrance { animation: entrance-out .4s 1.2s ease forwards; }
    .entrance .entrance-world, .entrance .entrance-door, .entrance .entrance-seam, .entrance .entrance-light, .entrance .entrance-end, .entrance .entrance-flame { animation: none !important; }
    .entrance .entrance-door { opacity: 0; }
    .entrance .entrance-light, .entrance .entrance-end { opacity: 1; }
    .entrance .entrance-name { animation: none !important; opacity: 1; }
}

/* Service, for a business: the day, then each part under a heading of its own, a list or a line when it is empty. */
.service-day { margin: 0 0 .3rem; color: var(--muted); font-size: .78rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.service-part { margin-top: 1.8rem; }
/* A connected till's buttons: bring in now, connect again, and disconnect, in a row that wraps. */
.till-acts { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin-top: .8rem; }
.till-acts form { margin: 0; }
.service-part h2 { margin: 0 0 .7rem; font-size: 1.3rem; }

/* Tonight's menu on Service: each dish, a line for the glass and one for the bottle, where each is, and the line to say. */
.pairings { display: grid; gap: .7rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.pairing { padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.pairing h3 { margin: 0 0 .6rem; font: 400 1.15rem/1.3 var(--serif); }
.pairing-pour { display: grid; gap: .1rem; margin: 0 0 .55rem; }
.pairing-pour a { color: var(--text); text-decoration: none; }
.pairing-pour .dot { margin-right: .45rem; }
.pairing-way { color: var(--muted); font-size: .72rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.pairing-where { margin: 0; color: var(--muted); font-size: .84rem; }
.pairing-say { margin: .4rem 0 0; font-family: var(--serif); font-style: italic; line-height: 1.5; }
.pairing-form { margin-top: 1rem; }

/*
    The pre-shift card on paper: a kitchen's whole menu on as few pages as it fills, in two columns. A dish's notes may run on into the
    next column, so no column is left half empty, but its name always stands with its first pour and a paragraph is never split.
*/
@media print {
    .pairing-card { max-width: none; margin: 0; padding: .15in .25in; border: 0; text-align: left; }
    .pairing-card h1 { margin: .03in 0 .1in; font-size: 16pt; }
    .pairing-card .menu-wines { columns: 2; column-gap: .35in; }
    .pairing-card .menu-wines li { padding: .05in 0; break-inside: auto; }
    .pairing-card .menu-wines h2, .pairing-card .menu-facts { break-after: avoid; }
    .pairing-card .menu-wines p { break-inside: avoid; }
    .pairing-card .menu-wines h2 { font-size: 10.5pt; }
    .pairing-card .menu-facts { margin-top: .02in; font-size: 8pt; letter-spacing: 0; }
    .pairing-card .menu-line { margin: .03in 0 0; max-width: none; font-size: 8.5pt; line-height: 1.3; }
}

/* Why a pairing works, for the staff, under each pour: on Service, and on the pre-shift card in smaller type. */
.pairing-why { margin: -.25rem 0 .7rem; color: var(--muted); font-size: .9rem; line-height: 1.55; }
.pairing-say .pairing-way { display: block; margin-bottom: .15rem; font-family: var(--sans); font-style: normal; }
.pairing-card-why { margin: .1rem auto .4rem; max-width: 26rem; color: var(--muted); font-size: .85rem; line-height: 1.5; }
@media print {
    .pairing-card .pairing-card-why { margin: .01in 0 .03in; max-width: none; color: #4a3a2e; font-size: 7.5pt; line-height: 1.3; }
}

/* Prices, for a business: the pours folded under one line, then each drink with its cost, the prices Kept suggests and the list's own. */
.service-links { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; margin: -.2rem 0 1rem; }
.pours-set { margin: 1rem 0 1.4rem; padding: 0; }
.pours-set > summary { display: grid; gap: .2rem; padding: 1rem 1.1rem; cursor: pointer; list-style: none; }
.pours-set > summary::-webkit-details-marker { display: none; }
.pours-set > summary span { color: var(--muted); font-size: .86rem; line-height: 1.45; }
.pours-form { display: grid; gap: .8rem; padding: 0 1.1rem 1.1rem; }
.pours-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem .8rem; }
.price-rows { display: grid; gap: .6rem; margin: 0; padding: 0; list-style: none; }
.price-row { display: grid; gap: .5rem; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.price-row.is-behind { border-color: rgb(var(--gold-rgb) / .55); }
.price-head { display: grid; gap: .15rem; }
.price-head a { color: var(--text); text-decoration: none; font: 400 1.08rem/1.3 var(--serif); }
.price-head .dot { margin-right: .45rem; }
.price-cost { color: var(--muted); font-size: .84rem; }
.price-suggested, .price-set { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin: 0; }
.price-suggested b { font-size: 1.05rem; font-weight: 600; }
.price-suggested small, .price-set small { color: var(--muted); font-size: .78rem; }
.price-set { color: var(--muted); font-size: .9rem; }
.price-set span { color: var(--text); }
.price-behind { margin: 0; color: var(--warn); font-size: .86rem; }
.price-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; }
.price-actions form { margin: 0; }
.price-own > summary { color: var(--muted); font-size: .9rem; cursor: pointer; }
.price-own-form { display: flex; flex-wrap: wrap; align-items: end; gap: .6rem; margin-top: .6rem; }
.price-own-form .field { width: 7.5rem; margin: 0; }

/* Cocktails costed by the spec: each line with its cost, and the form's lines, a drink or something else, its ounces and its cost. */
.cocktail-name { font: 400 1.08rem/1.3 var(--serif); }
.spec-lines { display: grid; gap: .15rem; margin: 0; padding: 0; list-style: none; font-size: .88rem; }
.spec-lines li { display: flex; justify-content: space-between; gap: 1rem; }
.spec-lines b { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.cocktail-add { margin-top: 1.4rem; padding: 0; }
.cocktail-add > summary { padding: 1rem 1.1rem; cursor: pointer; }
.cocktail-form { display: grid; gap: .7rem; padding: 0 1.1rem 1.1rem; }
.spec-row { display: grid; grid-template-columns: minmax(0, 1fr) 4.5rem; gap: .4rem; margin: 0; padding: .6rem 0 0; border: 0; border-top: 1px solid var(--line); }
.spec-row select, .spec-row input[name="what"] { grid-column: 1 / -1; }

/* Out tonight: a quiet way to say so under each pour, and the list of what is out with the way to bring each back. */
.pairing-out { margin: -.35rem 0 .55rem; }
.pairing-out .link { color: var(--muted); font-size: .82rem; }
.out-tonight { margin: 0 0 1rem; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); }
.out-tonight ul { display: grid; gap: .35rem; margin: .3rem 0 0; padding: 0; list-style: none; }
.out-tonight li { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; font-size: .92rem; }
.out-tonight form { margin: 0; }

/* Every location: a card to each, the location open now marked, and its day in a few short rows. */
.location-head { display: flex; align-items: baseline; justify-content: space-between; gap: .8rem; }
.location-head h2 { margin: 0; }
.location-card.is-here { border-color: color-mix(in srgb, var(--gold) 45%, var(--line)); }
.location-facts { display: grid; gap: .45rem; margin: .8rem 0 1rem; padding: 0; list-style: none; font-size: .92rem; color: var(--muted); }
.location-facts b { display: block; color: var(--text); font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.order-together + .order-together { margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.order-together h3 { margin: 0 0 .5rem; }
.location-add { display: grid; gap: .8rem; }

/* The same under a bottle open now, close under its row, and on a wine's own page under the button that opens it. */
.saved-list .saved-after { margin: -.3rem 0 .15rem; padding-left: .2rem; }
.saved-after form { margin: 0; }
.saved-after .link { color: var(--muted); font-size: .82rem; }
.wine-out { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .55rem; margin: -.15rem 0 .9rem; color: var(--muted); font-size: .86rem; }
.wine-out .link { color: var(--text); font-weight: 600; }

/* What to order: a supplier to a part, a line to each wine with how many, and what the order comes to. */
.order-lines { display: grid; gap: .5rem; margin: 0 0 .8rem; padding: 0; list-style: none; }
.order-lines li { display: grid; gap: .1rem; padding: .7rem .9rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.order-lines a { color: var(--text); text-decoration: none; }
.order-lines small { color: var(--muted); font-size: .82rem; }
.order-total { margin: 0 0 .8rem; color: var(--muted); font-size: .9rem; }
.order-text { width: 100%; margin-top: .5rem; font: .9rem/1.5 var(--mono, ui-monospace, monospace); }

/* Counting the bar: each station with the way to film it, and each open bottle with its level as chips. */
.count-station { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.count-station a:not(.btn) { color: var(--text); text-decoration: none; }
.count-station small { display: block; }
.count-levels { display: grid; gap: .8rem; }
.count-bottle { margin: 0; padding: .8rem .9rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.count-bottle legend { padding: 0 .2rem; }
.count-bottle legend a { color: var(--text); text-decoration: none; }
.count-bottle legend small { color: var(--muted); font-size: .8rem; }
.count-bottle .chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .4rem; }
.count-bottle .chip { display: inline-flex; align-items: center; gap: .3rem; min-height: 36px; padding: 0 .65rem; cursor: pointer; }
.count-bottle .chip input { accent-color: var(--gold); }

/* Sales and margin: the days in three figures, what made the most with a bar to each, and the lists to act on. */
.sales-periods { display: flex; flex-wrap: wrap; gap: .4rem; margin: -.3rem 0 1rem; }
.sales-periods a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 .8rem; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--muted); font-size: .86rem; text-decoration: none; }
.sales-periods a[aria-current="page"] { border-color: var(--gold); color: var(--text); background: rgb(var(--gold-rgb) / .1); }
.sales-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; margin: 0 0 .7rem; }
.sales-tiles div { min-width: 0; padding: .75rem .7rem .7rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.sales-tiles div.is-over { border-color: rgb(var(--gold-rgb) / .55); }
.sales-tiles dt { color: var(--muted); font-size: .76rem; }
.sales-tiles dd { margin: 0; }
.sales-tiles dd:first-of-type { margin-top: .15rem; font: 400 1.3rem/1.2 var(--serif); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.sales-tiles dd + dd { margin-top: .2rem; color: var(--muted); font-size: .74rem; line-height: 1.3; }
.sales-note { margin: 0 0 1rem; color: var(--muted); font-size: .86rem; line-height: 1.45; }
.sales-earners { display: grid; gap: .45rem; margin: 0 0 .8rem; padding: 0; list-style: none; }
.sales-earners li { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .15rem .8rem; align-items: baseline; padding: .65rem .9rem .8rem; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.sales-earners li::after { content: ""; position: absolute; bottom: 0; left: 0; width: var(--w, 0%); height: 3px; background: rgb(var(--gold-rgb) / .55); }
.sales-earners strong { min-width: 0; font-weight: 500; overflow-wrap: anywhere; }
.sales-earners strong a { color: var(--text); text-decoration: none; }
.sales-earners small { grid-column: 1; color: var(--muted); font-size: .8rem; line-height: 1.4; }
.sales-earners b { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.sales-over b, .sales-poured .is-over b { color: var(--warn); }
.sales-item-form { display: grid; gap: .1rem; }
.sales-item-form select { width: 100%; }
.sales-items { margin-top: .8rem; }
.sales-items ul { display: grid; gap: .1rem; margin: .5rem 0 0; padding: 0; list-style: none; }
.sales-items li { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .45rem 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.sales-items li span { min-width: 0; overflow-wrap: anywhere; }
.sales-items small { display: block; color: var(--muted); font-size: .8rem; }
.sales-days { margin: 0 0 1rem; }

/* A business's list for its guests, on their own phones: a row to jump to each part, and each drink with its prices to the right. */
.wl-head { margin-bottom: 1rem; }
.wl-jump { display: flex; gap: .4rem; margin: 0 0 1.2rem; padding-bottom: .2rem; overflow-x: auto; scrollbar-width: none; }
.wl-jump::-webkit-scrollbar { display: none; }
.wl-jump a { display: inline-flex; flex: none; align-items: center; min-height: 36px; padding: 0 .85rem; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--text); font-size: .86rem; text-decoration: none; white-space: nowrap; }
.wl-part { margin-top: 1.6rem; scroll-margin-top: 1rem; }
.wl-part h2 { margin: 0 0 .4rem; font-size: 1.35rem; }
.wl-drinks, .wl-pairings { margin: 0; padding: 0; list-style: none; }
.wl-drinks li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .2rem 1rem; align-items: start; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.wl-name strong { display: block; font: 400 1.08rem/1.3 var(--serif); overflow-wrap: anywhere; }
.wl-name small { display: block; margin-top: .15rem; color: var(--muted); font-size: .82rem; line-height: 1.4; }
.wl-prices { display: grid; gap: .3rem; margin: 0; text-align: right; }
.wl-prices div { display: grid; }
.wl-prices dt { color: var(--muted); font-size: .72rem; letter-spacing: .03em; white-space: nowrap; }
.wl-prices dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.wl-pairings li { display: grid; gap: .15rem; padding: .75rem 0; border-bottom: 1px solid var(--line); }
.wl-pairings strong { font: 400 1.05rem/1.3 var(--serif); }
.wl-pairings span { font-size: .9rem; }
.wl-pairings small { color: var(--muted); font-size: .84rem; font-style: italic; line-height: 1.45; }
.wl-foot { margin: 2rem 0 1rem; color: var(--muted); font-size: .8rem; text-align: center; }

/* The list's code on Service, black on white as a phone's camera reads it best, with its address under it. */
.gl-code { display: grid; justify-items: center; gap: .6rem; margin: 0 0 1rem; }
.gl-qr { display: block; padding: .5rem; border-radius: 10px; background: #fff; }
.gl-qr svg { display: block; width: 11rem; height: 11rem; }
.gl-code figcaption { font-size: .82rem; text-align: center; overflow-wrap: anywhere; }
.gl-code figcaption a { color: var(--muted); }
.gl-sections small { line-height: 1.45; }
.gl-sub { margin: 1.2rem 0 .6rem; font-size: 1.05rem; }
.gl-check { margin: .3rem 0 1rem; }

/* Table cards: paper on the screen as on the sheet, six to a page when printed, with a line to cut along round each. */
.table-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 1rem; margin: 1rem 0 1.4rem; }
.table-card { display: grid; justify-items: center; align-content: center; gap: .5rem; padding: 1.2rem 1rem 1rem; border: 1px dashed #b8aca5; border-radius: 6px; background: #fbf7f2; color: #1d1512; text-align: center; }
.table-card-name { margin: 0; font: 400 1.3rem/1.2 var(--serif); overflow-wrap: anywhere; }
.table-card-qr svg { display: block; width: 9.5rem; height: 9.5rem; }
.table-card-say { margin: 0; font-size: .95rem; }
.table-card-address { margin: 0; color: #6b5d55; font-size: .7rem; letter-spacing: .02em; overflow-wrap: anywhere; }
@media print {
    .table-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 0; }
    .table-card { height: 3.15in; padding: .25in; border-radius: 0; background: #fff; break-inside: avoid; }
    .table-card-name { font-size: 15pt; }
    .table-card-qr svg { width: 1.7in; height: 1.7in; }
    .table-card-say { font-size: 10.5pt; }
    .table-card-address { font-size: 7pt; }
}
.guest-page :is(.wl-drinks, .wl-pairings) { text-align: left; }
.table-cards-actions { margin: 0 0 .4rem; }

/*
    Open now, on the Cellar page: a card for each wine open in the cellar, its label, its name, its glasses drawn as glasses (filled in the
    wine's colour for each one left), and when to drink it. The buttons sit under it on a phone and beside it on a wider screen. One whose
    time is nearly up says so in the warning colour.
*/
.open-now { margin: .4rem 0 1.4rem; scroll-margin-top: 4.5rem; }
.open-now-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .2rem 1rem; margin: 0 0 .7rem; }
.open-now-head h2 { margin: 0; font-size: 1.4rem; }
.open-now-head p { margin: 0; color: var(--muted); font-size: .88rem; }
.open-now-list { display: grid; gap: .6rem; margin: 0; padding: 0; list-style: none; }
.open-row { display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: 0 .9rem; padding: .9rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.open-row.is-pressing { border-color: var(--line-strong); }
.open-label { display: block; align-self: start; }
.open-label .label { width: 100%; }
.open-what { min-width: 0; }
.open-name { margin: 0; font-weight: 600; line-height: 1.3; }
.open-name a { color: var(--text); text-decoration: none; }
.open-tag { display: inline-block; margin-left: .4rem; padding: .05rem .5rem; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--muted); font-size: .72rem; font-weight: 500; letter-spacing: .03em; vertical-align: .12em; white-space: nowrap; }
.open-glasses { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; margin: .45rem 0 0; font-size: .95rem; }
.glass-row { display: inline-flex; gap: 3px; }
.open-glass { width: 13px; height: 20px; fill: none; stroke: var(--mark); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.open-glass.is-full { fill: var(--wine, var(--unsorted)); stroke: var(--wine, var(--unsorted)); }
.open-glass.is-full path { stroke-width: 1.2; }
.open-when { margin: .3rem 0 0; color: var(--muted); font-size: .88rem; line-height: 1.45; }
.open-poured { color: var(--ok); font-size: .84rem; }
.open-poured::before { content: "✓ "; }
.open-row.is-poured { border-color: var(--line-strong); }
.is-pressing .open-when { color: var(--warn); }
.open-acts { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: .8rem; }
.open-acts form { margin: 0; }
.open-acts .btn { width: 100%; }

@media (min-width: 48rem) {
    .open-row { grid-template-columns: 3rem minmax(0, 1fr) auto; align-items: center; }
    .open-acts { grid-column: 3; grid-row: 1; grid-template-columns: auto auto; margin: 0; }
    .open-acts .btn { width: auto; white-space: nowrap; }
}
