/* Tenant-admin layout and controls. Display palettes are local to this app. */

@import "digisomm-tokens.css?v=20261109-smaak";

/* Everything before the brand is kept in one cascade layer. Unlayered rules
   beat layered ones whatever their specificity, so the brand below sets the
   look without a contest of selectors against four thousand lines of earlier
   corrections -- and whatever the brand does not restyle keeps working as it
   did. New work goes in the brand, not in here. */
@layer legacy {

:root {
  /* De namen die dit paneel al gebruikte, nu gevuld uit de tokenbasis.
     Eén plek om te wijzigen; niets verderop in dit bestand kent nog een hex. */
  --canvas: var(--ds-bg);
  --surface: var(--ds-surface);
  --surface-muted: var(--ds-surface-2);
  --surface-veil: var(--ds-surface-veil);
  --sidebar: var(--ds-rail);
  --sidebar-muted: var(--ds-rail-text-dim);
  --text: var(--ds-text);
  --muted: var(--ds-text-muted);
  --line: var(--ds-line);
  --line-strong: var(--ds-line-strong);
  --accent: var(--ds-accent);
  --accent-bright: var(--ds-accent-bright);
  --accent-hover: var(--ds-accent-bright);
  --accent-soft: var(--ds-accent-soft);
  --action: var(--ds-action);
  --action-hover: var(--ds-action-hover);
  --on-accent: var(--ds-text-on-accent);
  --success: var(--ds-success);
  --success-soft: var(--ds-success-bg);
  --warning: var(--ds-warning);
  --danger: var(--ds-danger);
  --danger-soft: var(--ds-danger-bg);
  --focus: var(--ds-focus);
  --shadow: var(--ds-shadow);
  --shadow-sm: var(--ds-shadow-sm);
  --scrim: var(--ds-scrim);
  --raise-1: var(--ds-raise-1);
  --raise-2: var(--ds-raise-2);
  --raise-3: var(--ds-raise-3);

  /* De rail is donkerder dan de pagina in plaats van de enige donkere plek. */
  --rail-text: var(--ds-rail-text);
  --rail-text-dim: var(--ds-rail-text-dim);
  --rail-line: var(--ds-rail-line);
  --rail-accent: var(--ds-rail-accent);
  --rail-raise-1: var(--ds-rail-raise-1);
  --rail-raise-2: var(--ds-rail-raise-2);
  --rail-raise-3: var(--ds-rail-raise-3);

  --radius: var(--ds-radius-lg);
  --rail-width: 248px;
  --content-gutter: var(--ds-gutter);
  font-family: var(--ds-font-body);
}


* {
  box-sizing: border-box;
}

html {
  background: var(--canvas);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--canvas);
  font-size: 15px;
  line-height: 1.5;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button,
summary,
select {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  transform: translateY(-180%);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}

.skip-link:focus {
  transform: translateY(0);
}

.entry-shell {
  background: var(--canvas);
}

.entry-main {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.entry-card {
  width: min(100%, 430px);
  padding: clamp(24px, 5vw, 40px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.entry-card-wide {
  width: min(100%, 680px);
}

.entry-card h1 {
  margin: 0;
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.12;
}

.entry-card > p:not(.step-label) {
  margin: 10px 0 0;
  color: var(--muted);
}

.entry-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
  font-weight: 700;
}

.step-label {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
}

.entry-footnote {
  display: block;
  margin-top: 24px;
  color: var(--muted);
  font-size: 0.8rem;
}

.stack-form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.compact-form {
  grid-template-columns: 1fr auto;
  align-items: end;
}

label {
  display: grid;
  gap: 6px;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 650;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
}

textarea {
  min-height: 104px;
  resize: vertical;
}

input:disabled,
fieldset:disabled input,
fieldset:disabled select,
fieldset:disabled textarea {
  color: var(--muted);
  background: var(--surface-muted);
}

.code-input {
  font-family: var(--ds-font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.primary-button,
.secondary-button,
.danger-button,
.inline-search button,
.search-results button,
.install-button,
.preview-link {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

.primary-button,
.inline-search button,
.search-results button,
.preview-link {
  color: var(--on-accent);
  background: var(--action);
  border: 1px solid var(--action);
}

.primary-button:hover,
.inline-search button:hover,
.search-results button:hover,
.preview-link:hover {
  background: var(--action-hover);
  border-color: var(--action-hover);
}

.secondary-button,
.install-button {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line-strong);
}

.danger-button {
  color: var(--on-accent);
  background: var(--danger);
  border: 1px solid var(--danger);
}

.secret-panel {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  margin: 24px 0;
  padding: 16px;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.secret-panel > span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.secret-panel details {
  grid-column: 1 / -1;
}

.break-code {
  display: block;
  margin-top: 8px;
  overflow-wrap: anywhere;
}

.recovery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 28px;
  margin: 24px 0;
  padding-left: 28px;
}

.workspace-list {
  display: grid;
  gap: 8px;
  margin-top: 24px;
}

.workspace-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.workspace-list button:hover {
  border-color: var(--accent);
}

.workspace-list span {
  display: grid;
  gap: 2px;
}

.workspace-list small {
  color: var(--muted);
}

.workspace-list em {
  color: var(--accent);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 700;
}

.workbench-shell {
  min-height: 100vh;
}

.ledger-rail {
  position: fixed;
  z-index: 20;
  inset: 0 auto 0 0;
  display: flex;
  width: var(--rail-width);
  flex-direction: column;
  padding: 20px 16px;
  color: var(--rail-text);
  background: var(--sidebar);
  border-right: 1px solid var(--rail-line);
  scrollbar-width: thin;
  scrollbar-color: var(--rail-raise-3) transparent;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 2px 4px;
  text-decoration: none;
}

.brand > span:last-child,
.tenant-marker,
.account-link {
  display: grid;
}

.brand strong {
  font-size: 0.95rem;
}

.brand small,
.tenant-marker span,
.tenant-marker small,
.account-link small {
  color: var(--sidebar-muted);
  font-size: 0.7rem;
}

.tenant-marker {
  gap: 3px;
  margin: 28px 0 12px;
  padding: 12px;
  background: var(--rail-raise-1);
  border: 1px solid var(--rail-raise-2);
  border-radius: var(--radius);
}

.tenant-marker span {
  font-weight: 700;
}

.tenant-marker strong {
  overflow: hidden;
  font-size: 0.85rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tenant-marker small {
  overflow: hidden;
  font-family: var(--ds-font-mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* The marker that opens.
   Closed it is the marker exactly, so a restaurant with one tenant is not
   shown a control it can never use; open it is the list of the others, with
   the role beside each because the same person is not the same thing at every
   restaurant they work for. */
.tenant-switch > summary {
  list-style: none;
  cursor: pointer;
}

.tenant-switch > summary::-webkit-details-marker {
  display: none;
}

.tenant-switch > summary span::after {
  content: " ▾";
}

.tenant-switch[open] > summary span::after {
  content: " ▴";
}

.tenant-switch > summary:hover {
  border-color: var(--rail-raise-3);
}

.tenant-choices {
  display: grid;
  gap: 3px;
  margin: -6px 0 12px;
  padding: 4px;
}

.tenant-choices button {
  display: grid;
  gap: 1px;
  padding: 8px 10px;
  color: var(--rail-text-dim);
  text-align: left;
  background: var(--rail-raise-1);
  border: 1px solid var(--rail-raise-2);
  border-radius: 6px;
}

.tenant-choices button:hover {
  color: var(--rail-text);
  background: var(--rail-raise-2);
}

.tenant-choices button strong {
  overflow: hidden;
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tenant-choices button small {
  color: var(--sidebar-muted);
  font-size: 0.68rem;
}

.ledger-nav {
  display: grid;
  gap: 3px;
}

.ledger-nav a {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--rail-text-dim);
  border-radius: 6px;
  font-size: 0.875rem;
  text-decoration: none;
}

.ledger-nav a > span {
  color: var(--sidebar-muted);
  font-family: var(--ds-font-mono);
  font-size: 0.64rem;
}

.ledger-nav a:hover {
  color: var(--rail-text);
  background: var(--rail-raise-1);
}

.ledger-nav a[aria-current="page"] {
  color: var(--rail-text);
  background: var(--rail-raise-2);
  box-shadow: inset 3px 0 0 var(--rail-accent);
  font-weight: 650;
}

.ledger-nav a[aria-current="page"] > span {
  color: var(--accent-bright);
}

.account-link {
  gap: 2px;
  margin-top: auto;
  padding: 14px 10px 4px;
  border-top: 1px solid var(--rail-line);
  text-decoration: none;
}

.account-link strong {
  font-size: 0.8rem;
}

.workbench-main {
  min-width: 0;
  min-height: 100vh;
  margin-left: var(--rail-width);
  padding-bottom: 56px;
}

.topbar {
  display: flex;
  min-height: 64px;
  align-items: center;
  gap: 14px;
  padding: 10px var(--content-gutter);
  background: var(--surface-veil);
  border-bottom: 1px solid var(--line);
}

.topbar > div:first-of-type {
  display: grid;
  min-width: 0;
}

.topbar > div:first-of-type span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar > div:first-of-type strong {
  font-size: 0.9rem;
}

.topbar-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.rail-toggle {
  display: none;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  padding: 7px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
}

.rail-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--text);
}

.page-intro {
  display: flex;
  max-width: 1440px;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 34px var(--content-gutter) 22px;
}

.page-intro h1 {
  margin: 0;
  font-size: var(--ds-text-2xl);
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.page-intro p {
  max-width: 720px;
  margin: 7px 0 0;
  color: var(--muted);
}

.role-chip,
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}

.metric-grid {
  display: grid;
  max-width: 1440px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 var(--content-gutter);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.metric-grid article {
  display: grid;
  gap: 7px;
  padding: 18px;
  border-right: 1px solid var(--line);
}

.metric-grid article:last-child {
  border-right: 0;
}

.metric-grid span {
  color: var(--muted);
  font-size: 0.82rem;
}

.metric-grid strong {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.metric-grid a {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
}

.notice,
.editor-sheet,
.catalog-search,
.record-list,
.creation-grid,
.account-card,
.panel,
.stat-tiles,
.two-column,
.card-sheet,
.workbench-main > .empty-note {
  max-width: 1440px;
  margin-right: var(--content-gutter);
  margin-left: var(--content-gutter);
}

.notice {
  margin-bottom: 16px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--line-strong);
  border-radius: 6px;
}

.notice p {
  margin: 0;
}

.notice-error {
  background: var(--danger-soft);
  border-left-color: var(--danger);
}

.notice-success {
  background: var(--success-soft);
  border-left-color: var(--success);
}

.editor-sheet,
.account-card {
  padding: clamp(18px, 3vw, 28px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.editor-sheet fieldset {
  margin: 0 0 28px;
  padding: 0;
  border: 0;
}

.editor-sheet legend {
  margin-bottom: 14px;
  font-size: 1rem;
  font-weight: 700;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.wide-field {
  grid-column: 1 / -1;
}

.theme-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.theme-options label {
  cursor: pointer;
}

.theme-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.theme-options span {
  display: grid;
  gap: 3px;
  padding: 13px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.theme-options input:checked + span {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.theme-options small {
  color: var(--muted);
}

.permission-note,
.empty-note {
  padding: 12px 14px;
  color: var(--muted);
  background: var(--surface-muted);
  border-radius: 6px;
}

.creation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.creation-panel,
.record-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.creation-panel > summary,
.record-card > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 13px 15px;
  list-style: none;
  font-weight: 700;
}

.creation-panel > summary::-webkit-details-marker,
.record-card > summary::-webkit-details-marker {
  display: none;
}

.creation-panel > summary::after,
.record-card > summary::after {
  margin-left: auto;
  color: var(--accent);
  content: "+";
  font-size: 1.1rem;
}

.creation-panel[open] > summary::after,
.record-card[open] > summary::after {
  content: "−";
}

.catalog-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
  gap: 20px;
  margin-bottom: 18px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.catalog-search h2 {
  margin: 0;
  font-size: 1rem;
}

.catalog-search p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.inline-search {
  display: flex;
  align-items: end;
  gap: 8px;
}

.inline-search label {
  flex: 1;
}

.search-results {
  display: grid;
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
}

.search-results form {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.search-results form:last-child {
  border-bottom: 0;
}

.search-results span {
  display: grid;
}

.search-results small {
  color: var(--muted);
}

.record-list {
  display: grid;
  gap: 8px;
  padding-bottom: 36px;
}

.record-heading {
  display: grid;
  flex: 1;
  min-width: 0;
}

.record-heading strong,
.record-heading small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-heading small {
  color: var(--muted);
  font-weight: 400;
}

.record-index {
  color: var(--muted);
  font-family: var(--ds-font-mono);
  font-size: 0.7rem;
}

.status-live {
  color: var(--success);
  background: var(--success-soft);
  border-color: var(--success);
}

.status-draft {
  color: var(--warning);
}

.status-archived {
  color: var(--muted);
}

.record-form {
  padding: 18px;
  background: var(--surface-muted);
  border-top: 1px solid var(--line);
}

.record-form .primary-button {
  margin-top: 16px;
}

.split-editor {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  border-top: 1px solid var(--line);
}

.split-editor .record-form {
  border-top: 0;
}

.pairing-form {
  padding: 18px;
  border-left: 1px solid var(--line);
}

.pairing-form h3 {
  margin: 0;
  font-size: 1rem;
}

.pairing-form > p {
  margin: 6px 0 14px;
  color: var(--muted);
  font-size: 0.82rem;
}

.check-list {
  display: grid;
  max-height: 320px;
  margin-bottom: 14px;
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.check-list label {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px;
  border-bottom: 1px solid var(--line);
  font-weight: 500;
}

.check-list label:last-child {
  border-bottom: 0;
}

.check-list input {
  width: auto;
  min-height: 0;
}

.account-card {
  max-width: 760px;
}

.account-card dl {
  margin: 0 0 24px;
}

.account-card dl div {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.account-card dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.account-card dd {
  margin: 0;
}

.error-stage {
  display: grid;
  max-width: 640px;
  justify-items: start;
  gap: 12px;
  padding: clamp(32px, 8vw, 90px);
}

.error-stage > strong {
  color: var(--accent);
  font-size: 3rem;
  line-height: 1;
}

.error-stage h1,
.error-stage p {
  margin: 0;
}

.error-stage h1 {
  font-size: 1.8rem;
}

@media (max-width: 980px) {
  .ledger-rail {
    position: static;
    width: 100%;
  }

  html[data-ui-ready] .ledger-rail {
    position: fixed;
    width: var(--rail-width);
    transform: translateX(-105%);
    transition: transform 180ms ease;
    box-shadow: var(--shadow);
  }

  html[data-ui-ready] .rail-open .ledger-rail {
    transform: translateX(0);
  }

  /* The page behind an open drawer, dimmed and tappable.
     Dimmed because the rail is over the page rather than beside it, and
     tappable because "press the same button again" is not the gesture anybody
     reaches for first -- they press the thing they wanted to get back to. */
  .rail-open .workbench-main::before {
    position: fixed;
    z-index: 19;
    inset: 0;
    background: var(--scrim);
    content: "";
  }

  .workbench-main {
    margin-left: 0;
  }

  .rail-toggle {
    display: none;
  }

  html[data-ui-ready] .rail-toggle {
    display: block;
  }

  .metric-grid,
  .creation-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-grid article:nth-child(2) {
    border-right: 0;
  }

  .metric-grid article:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .split-editor {
    grid-template-columns: 1fr;
  }

  .pairing-form {
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}
@media (max-width: 680px) {
  .entry-main {
    padding: 12px;
  }

  .topbar {
    min-height: 58px;
  }

  .install-button {
    display: none !important;
  }

  .preview-link {
    padding: 8px 10px;
    font-size: 0.74rem;
  }

  .page-intro {
    align-items: flex-start;
    flex-direction: column;
    padding-top: 26px;
  }

  .form-grid,
  .theme-options,
  .catalog-search,
  .recovery-grid,
  .creation-grid,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .metric-grid article,
  .metric-grid article:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .metric-grid article:last-child {
    border-bottom: 0;
  }

  .inline-search {
    align-items: stretch;
    flex-direction: column;
  }

  .record-card > summary {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .status-pill { margin-left: 0; }

  .compact-form,
  .secret-panel {
    grid-template-columns: 1fr;
  }

  .account-card dl div {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* The wine list is grouped by colour, so the heading carries a colour chip:
   the eye finds the group before it reads the word. */
.wine-colour-group + .wine-colour-group { margin-top: 26px; }
.colour-heading {
    align-items: center;
    display: flex;
    font-size: .95rem;
    gap: 9px;
    margin: 0 0 10px;
}
.colour-count {
    background: var(--raise-1);
    border-radius: 10px;
    font-size: .72rem;
    font-weight: 500;
    padding: 1px 8px;
}
.colour-dot {
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    display: inline-block;
    flex: none;
    height: 12px;
    width: 12px;
}
.colour-red { background: var(--ds-wine-red); }
.colour-white { background: var(--ds-wine-white); }
.colour-rose { background: var(--ds-wine-rose); }
.colour-sparkling { background: var(--ds-wine-sparkling); }
.colour-other { background: var(--ds-wine-other); }

.pairing-search { display: block; margin: 0 0 8px; }
.pairing-search input { width: 100%; }
.pairing-summary { color: var(--muted); font-size: .78rem; margin: 0 0 8px; }
.check-list [data-pairing-item][hidden] { display: none; }
.check-list [data-pairing-item] small { display: block; font-size: .72rem; opacity: .7; }
.visually-hidden {
    clip: rect(0 0 0 0); clip-path: inset(50%); height: 1px; overflow: hidden;
    position: absolute; white-space: nowrap; width: 1px;
}

/* Same inset as everything else in the column, for the same reason: it used to
   be a direct child of the card and had no padding of its own. */
.panel {
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.panel + .panel,
.panel + .two-column,
.stat-tiles + .panel,
.two-column + .panel {
  margin-top: 18px;
}

.panel > h2 {
  margin: 0 0 14px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.panel > h2 + .hint {
  margin-top: -8px;
}

.panel > :last-child {
  margin-bottom: 0;
}

.two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.two-column > .panel {
  margin: 0;
}

.hint {
  max-width: 74ch;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.82rem;
}

.detail-list {
  margin: 0;
}

.detail-list > div {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(0, 1fr);
  gap: 14px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.detail-list > div:first-child {
  border-top: 0;
}

.detail-list dt {
  color: var(--muted);
  font-size: 0.78rem;
}

.detail-list dd {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.text-link {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
}

.plain-list {
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.plain-list li {
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.plain-list li:first-child {
  border-top: 0;
}

.plain-list .meta {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

/* --- Branding ---------------------------------------------------------- */

.logo-card {
  padding: 20px 22px;
}

.logo-preview {
  margin: 14px 0;
}

.logo-preview img {
  display: block;
  max-width: 220px;
  max-height: 70px;
  padding: 10px;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: 6px;
}

/* --- Statistics -------------------------------------------------------- */

.stat-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin-bottom: 18px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.stat-tile {
  display: grid;
  gap: 6px;
  padding: 18px;
  border-right: 1px solid var(--line);
}

.stat-tile:last-child {
  border-right: 0;
}

.stat-value {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.stat-label {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.stat-bar-row {
  display: grid;
  grid-template-columns: minmax(0, 140px) minmax(0, 1fr) 40px;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
  border-top: 1px solid var(--line);
}

.stat-bar-row:first-of-type {
  border-top: 0;
}

.stat-bar-label {
  overflow: hidden;
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-bar-track {
  display: block;
  height: 7px;
  background: var(--surface-muted);
  border-radius: 999px;
}

.stat-bar-fill {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
}

.stat-bar-value {
  color: var(--muted);
  font-size: 0.78rem;
  text-align: right;
}

/* --- Printable wine cards ----------------------------------------------
   The screen version is a preview; @media print is the real target, so
   everything that is interface rather than content is dropped and a card is
   never split across two pages. */

.page-intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-sheet {
  margin-top: 22px;
}

.sheet-heading {
  margin: 0 0 12px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
}

@media print {
  .no-print,
  .ledger-rail,
  .topbar,
  nav {
    display: none !important;
  }

  .workbench-main {
    margin-left: 0;
  }

  body {
    background: var(--surface);
  }

  .card-sheet,
  .card-grid {
    margin: 0;
    max-width: none;
  }

  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .wc-frame,
  .wc {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* Ink on paper. The card keeps the restaurant's colours -- that is the
     point of printing it -- but the shadow is a screen idea and the browser
     drops backgrounds unless the person ticks the box. */
  .wc {
    box-shadow: none;
    border-color: rgba(var(--theme-accent-rgb), 0.35);
  }

  .card-sheet {
    break-before: page;
    page-break-before: always;
  }

  .card-sheet:first-of-type {
    break-before: auto;
    page-break-before: auto;
  }
}

@media (max-width: 900px) {
  .two-column {
    grid-template-columns: 1fr;
  }

  .detail-list > div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .stat-tile {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .stat-tile:last-child {
    border-bottom: 0;
  }

  .stat-bar-row {
    grid-template-columns: minmax(0, 100px) minmax(0, 1fr) 36px;
    gap: 10px;
  }
}

/* Agreeing has to be cheaper than disagreeing, or only complaints get
   recorded. It sits above the correction panel and costs one tap.

   It also has to sit inside the column's padding: as a direct child of the
   card it had none of its own, so the text ran to the card edge while every
   control above it was inset. */
.confirm-form {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 18px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}

/* Bordered, not bare. A button with the browser's chrome stripped and nothing
   put back reads as unfinished beside a row of styled controls — but it stays
   lighter than the save button beside it, because confirming is meant to be
   the cheap action. */
.confirm-form button {
  margin: 0;
  padding: 6px 12px;
  color: var(--accent);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.confirm-form button:hover {
  color: var(--accent-hover);
  background: var(--accent-soft);
  border-color: var(--accent);
}

/* The install guide (layout.php, app.js wireInstallGuide): prominent until
   the app is on the home screen, then never again. */
.install-guide {
  max-width: 720px;
  margin: 14px clamp(16px, 4vw, 40px) 4px;
  padding: 18px 18px 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: 20px;
  background: linear-gradient(160deg, var(--accent-soft), var(--surface) 70%);
  box-shadow: 0 10px 28px rgba(26, 26, 36, 0.08);
}

.install-guide[hidden] {
  display: none;
}

.install-guide-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.install-guide-icon {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(26, 26, 36, 0.18);
}

.install-guide h2 {
  margin: 0 0 4px;
  font-size: 1.2rem;
  line-height: 1.2;
}

.install-guide-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.install-steps {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.install-steps[hidden] {
  display: none;
}

.install-steps li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.95rem;
  line-height: 1.45;
}

.install-step-number {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--surface);
  font-weight: 700;
  font-size: 0.85rem;
}

.install-glyph {
  display: inline-block;
  width: 1.15em;
  height: 1.15em;
  margin: 0 1px;
  vertical-align: -0.2em;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.install-glyph circle {
  fill: var(--accent);
  stroke: none;
}

.install-guide-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
}

.confirm-done {
  margin-top: 0;
  margin-bottom: 0;
  color: var(--success, #2f6b3c);
  font-size: 0.8rem;
  font-weight: 700;
}

.confirm-form small {
  flex: 1;
  min-width: 180px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.4;
}


/* Draft and live side by side, with both counts always visible: a list being
   worked on and a list that is finished look identical otherwise. */
.mode-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 1440px;
  margin: 0 var(--content-gutter) 16px;
}

.mode-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.8rem;
  text-decoration: none;
}

.mode-tab--active {
  color: var(--on-accent);
  background: var(--sidebar);
  border-color: var(--sidebar);
}

.mode-tab .count {
  padding: 1px 8px;
  background: var(--raise-2);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.mode-tab--active .count {
  background: var(--rail-raise-3);
}

/* Only shown while something is waiting, so it is never furniture. */
.publish-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  max-width: 1440px;
  margin: 0 var(--content-gutter) 18px;
  padding: 14px 18px;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
}

.publish-bar strong {
  display: block;
  font-size: 0.9rem;
}

.publish-bar span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.8rem;
}

/* --- Selecting wines to turn on or off ---------------------------------- */

/* The checkbox sits beside the card rather than inside its summary, so the row
   is a two-column grid: the pick, then the card that opens. */
.record-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

.record-row > .record-card {
  grid-column: 2;
}

/* No checkbox, no column to leave room for. Without this the card keeps the
   gap where the checkbox would have been, and a role that cannot toggle sees a
   list indented for a control it never gets. */
.record-row-plain {
  display: block;
}

.record-pick {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 28px 0 0;
  accent-color: var(--accent);
  cursor: pointer;
}

/* The label names the wine for a screen reader and is not shown, because the
   card beside it already says the name to everyone else. */
.record-pick-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* A wine that is off keeps its full row — it is still on the list, still
   priced, still editable — and only loses colour, which is the whole
   difference a guest sees. */
.record-row-off > .record-card {
  background: var(--surface-muted);
}

.record-row-off .record-heading strong {
  color: var(--muted);
}

.record-pills {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.status-pill.availability-unavailable {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: var(--danger-soft);
}

.status-pill.availability-available {
  color: var(--success);
  background: var(--success-soft);
  border-color: var(--success-soft);
}

.bulk-bar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  max-width: 1440px;
  margin: 0 var(--content-gutter) 12px;
  padding: 11px 15px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: opacity 0.15s;
}

/* Faded, not disabled. The buttons still submit and the server answers an empty
   selection with a sentence; a disabled button would just sit there. */
.bulk-bar-idle {
  box-shadow: none;
}

.bulk-bar-count {
  display: grid;
  gap: 2px;
  margin: 0;
  font-size: 0.82rem;
}

.bulk-bar-count strong {
  font-size: 1.05rem;
}

.bulk-bar-count small {
  color: var(--muted);
  font-size: 0.74rem;
}

.bulk-bar-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.colour-select-all {
  margin-left: auto;
  padding: 7px 12px;
  min-height: 36px;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.colour-select-all:hover {
  border-color: var(--accent);
}

@media (max-width: 720px) {
  .bulk-bar-actions {
    width: 100%;
    margin-left: 0;
  }

  .bulk-bar-actions button {
    flex: 1;
  }
}

/* --- The wine as a guest sees it ---------------------------------------- */

/* The card beside the fields that produce it, not above them. Stacked, the
   card pushed the form below the fold and stopped being a reference while
   editing, which is the only thing it is for. */
/* The card at the width it has on a phone, and the fields beside it.
   The drawer is grey and the forms in it are white, so the two columns read as
   one pair rather than as a card that wandered into a form. */
.wine-editor {
  display: grid;
  grid-template-columns: minmax(0, 342px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  padding: 20px;
  border-top: 1px solid var(--line);
  background: var(--surface-muted);
}

.wine-editor > .wc-frame { min-width: 0; }

/* Each form beside the card is its own block now that they sit in a column
   with room between them, rather than sections of one grey panel divided by
   hairlines. */
.wine-editor-fields > .record-form,
.wine-editor-fields > .confirm-form {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.wine-editor-fields > .confirm-form { padding: 12px 16px; }
.wine-editor-fields .correction-link { margin: 0; padding-left: 2px; }

.wine-editor-fields {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.wine-editor-fields > .record-form {
  border-top: 0;
}

@media (max-width: 900px) {
  .wine-editor {
    grid-template-columns: minmax(0, 1fr);
  }

  .wine-editor {
    gap: 16px;
    padding: 14px;
  }
}

.layer-note {
  max-width: 1440px;
  margin: 0 var(--content-gutter) 14px;
}

/* Typed rather than clicked, so it sits in the bar instead of behind a
   dialogue nobody reads. */
.publish-form {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.publish-form label {
  display: grid;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 700;
}

.publish-form input {
  padding: 8px 10px;
  font: inherit;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
}

/* The published card's one control. It sits where the edit form does in the
   concept, so the difference between the two layers is visible rather than
   inferred from a missing button. */
.live-toggle {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.live-toggle small {
  flex: 1;
  min-width: 180px;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.4;
}

.wine-editor-fields > .permission-note {
  margin: 0;
  padding: 0 18px 18px;
}

/* On its way off the card. The tag says what happens; the fading says it
   without reading. Not struck through: the row still has to be usable, and a
   line through a form is harder to read than a lighter one. */
.record-row-going > .record-card {
  opacity: 0.55;
}

.record-row-going:hover > .record-card,
.record-row-going > .record-card[open] {
  opacity: 1;
}

/* What publishing will do, wine by wine. A count cannot tell a fifty-cent price
   change from a wine moved to another category, and the person pressing the
   button is the only one who can. */
.publish-plan {
  max-width: 1440px;
  margin: 0 var(--content-gutter) 18px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
}

.publish-plan > summary {
  font-weight: 700;
  cursor: pointer;
}

.publish-plan ul {
  margin: 12px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 7px;
}

.publish-plan li {
  line-height: 1.5;
}

.publish-plan li strong {
  margin-right: 6px;
}

.publish-plan li span {
  color: var(--muted);
  font-size: 0.84rem;
}

.publish-plan .plan-added::marker { color: var(--success); }
.publish-plan .plan-removed::marker { color: var(--danger); }
.publish-plan .plan-changed::marker { color: var(--warning); }

/* A wine with no price at all stays behind. Said on the wine it applies to,
   because a rule under the list is a rule about nothing in particular. */
.publish-plan .plan-blocked {
  color: var(--danger);
  font-weight: 600;
}

.publish-plan .hint {
  margin: 12px 0 0;
}

/* ---------------------------------------------------------------------------
 * The house-style workbench
 *
 * Settings as rows -- a name on the left, the choices on the right, aligned all
 * the way down -- with the guest's screen beside them and one bar that follows
 * you for everything that saves.
 * ------------------------------------------------------------------------ */

.style-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 356px;
  gap: 32px;
  align-items: start;
  padding: 0 var(--content-gutter) 48px;
}

.style-controls { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

/* Wide enough for a 320px phone and its shadow, and it stays in view while the
   controls scroll -- a colour judged without the card is not judged at all. On
   a short screen it scrolls itself rather than hiding its own bottom. */
.style-preview {
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 4px;
}

.style-panel {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.style-panel > h2 {
  margin: 0 0 14px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* One setting. The name column is fixed so every row starts on the same line;
   below 560px it moves above its choices rather than squeezing them. */
.style-row {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 7px 0;
}

.style-row + .style-row { border-top: 1px solid var(--surface-muted); }

.style-row-name { display: flex; flex-direction: column; gap: 2px; font-size: 0.88rem; font-weight: 600; }
.style-row-name small { font-weight: 400; font-size: 0.74rem; line-height: 1.35; color: var(--muted); }

/* A row that is no longer on the theme's own value says so, and says it where
   the eye already is rather than in a summary somewhere else. */
.style-changed {
  align-self: flex-start;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.style-row-changed { background: var(--accent-soft); }
.style-row input[type="text"], .style-row input[type="url"] { width: 100%; }

.chip-options { display: flex; flex-wrap: wrap; gap: 6px; }

.chip { cursor: pointer; }
.chip input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.chip span {
  display: block;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.82rem;
  line-height: 1.3;
  white-space: nowrap;
}

.chip input:checked + span {
  border-color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
}

.chip input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.chip input:disabled + span { opacity: 0.5; cursor: default; }

/* "Thema" is the way back, not a style. It reads as one. */
.chip-default span { border-style: dashed; color: var(--muted); }
.chip-default input:checked + span { border-style: solid; color: var(--text); }

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

.swatch { display: flex; flex-direction: column; gap: 6px; cursor: pointer; }

.swatch input[type="color"] {
  width: 100%;
  height: 42px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
}

.swatch input[type="color"]:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.swatch-name { font-size: 0.8rem; font-weight: 600; text-align: center; }
.swatch small { font-family: var(--ds-font-mono); font-size: 0.68rem; color: var(--muted); text-align: center; }
.swatch-changed .swatch-name { color: var(--accent); }
.swatch-changed input[type="color"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.swatch > label { display: flex; flex-direction: column; gap: 6px; cursor: pointer; }

/* The logo beside the colours picked from it (14 October 2026): its own
   colours as dots under every swatch, and a pipette where the browser has one. */
.logo-colours {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-muted);
}
.logo-colours img { display: block; flex: none; max-width: 200px; max-height: 96px; }
.logo-colours figcaption { display: grid; gap: 3px; font-size: 0.85rem; color: var(--muted); }
.logo-colours figcaption strong { color: var(--text); }
.swatch-picks { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; }
.swatch-pick,
.swatch-eyedropper {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
}
.swatch-pick svg { display: block; width: 100%; height: 100%; border-radius: 50%; }
.swatch-eyedropper svg { width: 12px; height: 12px; }
.swatch-eyedropper:hover { color: var(--text); }
.swatch-pick:focus-visible,
.swatch-eyedropper:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (max-width: 700px) {
  .logo-colours { flex-direction: column; align-items: flex-start; }
}

.field-hint { margin: 12px 0 0; color: var(--muted); font-size: 0.8rem; line-height: 1.55; }

/* The proposal for the card's four scales, under the register check: one
   line, one button, the reasons folded. */
.structure-suggestion { display: grid; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.structure-suggestion .hint { margin: 0; }
.structure-suggestion [data-structure-actions] { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.structure-reasons { font-size: 0.8rem; color: var(--muted); }
.structure-reasons summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.structure-reasons ul { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 3px; }
.structure-reasons li { line-height: 1.5; }
/* The four profile ticks under the card: one quiet line each, no boxes. */
.profile-tags { display: grid; gap: 2px; margin: 0; padding: 0; border: 0; min-width: 0; }
.profile-tags legend { margin: 0 0 4px; padding: 0; font-size: 0.8rem; font-weight: 600; line-height: 1.45; }
.profile-tags legend small { display: block; color: var(--muted); font-size: 0.75rem; font-weight: 400; }
.profile-tag { display: flex; align-items: flex-start; gap: 8px; padding: 2px 0; font-size: 0.8rem; line-height: 1.45; cursor: pointer; }
.profile-tag input { flex: none; width: 15px; height: 15px; margin: 2px 0 0; accent-color: var(--accent); }
.workbench-shell .profile-tag input[type="checkbox"] { width: 15px; height: 15px; min-height: 0; }
.profile-tag span { min-width: 0; }
.profile-tag strong { font-weight: 600; }
.profile-tag small { color: var(--muted); font-size: 0.75rem; }
.profile-tag small::before { content: " · "; }
.profile-tag:has(input:checked) strong { color: var(--accent); }
/* What the card reads as by itself (WineProfile::reading), ticked on its own. */
.profile-tag-derived { margin-left: 4px; color: var(--muted); font-size: 0.7rem; font-style: normal; font-weight: 500; }
.profile-tag-derived[hidden] { display: none; }

/* Folded away: the settings a restaurant touches once, and never during
   service. Same rows inside, so opening one changes nothing about how it
   reads. */
.style-fine > summary {
  margin: -18px -20px;
  padding: 18px 20px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
}

.style-fine[open] > summary { margin-bottom: 4px; }

/* Everything that saves, in one bar that follows the page down. */
.style-bar {
  position: sticky;
  bottom: 12px;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.style-bar .primary-button, .style-bar .secondary-button { margin: 0; }
.style-bar-note { flex: 1 1 200px; color: var(--muted); font-size: 0.78rem; line-height: 1.4; }

.logo-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.logo-form input[type="file"] { flex: 1 1 200px; min-width: 0; font-size: 0.82rem; }

/* The account: what a restaurant states, and what was agreed with it. */
.account-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  gap: 28px;
  align-items: start;
  padding: 0 var(--content-gutter) 48px;
}

.account-side { position: sticky; top: 20px; }
.account-main { display: grid; gap: 20px; align-content: start; min-width: 0; }
.account-venue { scroll-margin-top: 20px; }

@media (max-width: 1000px) {
  .account-layout { grid-template-columns: minmax(0, 1fr); }
  .account-side { position: static; }
}

/* A page that is one card and the few things that go with it. */
/* The card and what belongs with it, as a pair in the middle of the page
   rather than a card hugging the left edge under a full-width paragraph. */
.card-page {
  display: grid;
  grid-template-columns: minmax(0, 460px) minmax(240px, 340px);
  gap: 28px;
  align-items: start;
  justify-content: center;
  padding: 0 var(--content-gutter) 48px;
}

.card-page-side { display: flex; flex-direction: column; gap: 12px; }
.card-page-side textarea { width: 100%; }

.correction-link { margin: 6px 0 0; font-size: 13px; }
.correction-link small { display: block; margin-top: 2px; color: var(--ds-text-muted, var(--muted)); font-size: 12px; }
.creation-link { align-self: flex-start; }

@media (max-width: 560px) {
  .style-row { grid-template-columns: minmax(0, 1fr); align-items: start; }
}

@media (max-width: 1100px) {
  .style-workbench { grid-template-columns: minmax(0, 1fr); }
  /* The preview leads on a narrow screen: it is the thing being judged, and a
     sticky column that no longer has a column to stick to is just a box. */
  .style-preview { position: static; max-height: none; order: -1; justify-self: center; }
}

@media (max-width: 900px) {
  .card-page { grid-template-columns: minmax(0, 1fr); justify-content: stretch; }
}

/* A bar whose length is data, not a style attribute.
 *
 * These used to be a <span style="width:NN%">, which the page's own CSP has
 * been refusing ever since style-src was tightened to 'self' -- the track drew
 * and the fill did not, so every one of these read zero. <progress> carries its
 * value in an attribute, which no policy has an opinion about. */
progress.stat-bar-track {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 7px;
  border: 0;
  background: var(--surface-muted);
  border-radius: 999px;
  overflow: hidden;
}

progress.stat-bar-track::-webkit-progress-bar { background: var(--surface-muted); }
progress.stat-bar-track::-webkit-progress-value { background: var(--accent); border-radius: 999px; }
progress.stat-bar-track::-moz-progress-bar { background: var(--accent); border-radius: 999px; }

/* ---------------------------------------------------------------------------
 * What the sommelier did
 *
 * Charts drawn as SVG geometry, not as elements with heights in a style
 * attribute. This panel sends style-src 'self': a bar carrying its height that
 * way renders at zero, silently and correctly, on every screen. It did exactly
 * that here for weeks. Geometry is attributes, so it draws.
 * ------------------------------------------------------------------------ */

/* How far back the page looks. Three links, not a dropdown: three is a row. */
.stat-window {
  display: flex;
  gap: 4px;
  padding: 3px;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.stat-window a {
  padding: 6px 13px;
  color: var(--muted);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.stat-window a:hover {
  color: var(--text);
}

.stat-window a[aria-current="page"] {
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.pulse-figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.pulse-figures > div {
  display: grid;
  gap: 6px;
}

.spark,
.hour-strip {
  display: block;
  width: 100%;
  height: auto;
  color: var(--accent);
}

.spark-bar {
  fill: var(--line-strong);
}

/* The line through the bars. The stroke is also an attribute in the markup, so
   the trend is still drawn if this file never arrives -- the bars are the data
   and the line is the reading of it, and a chart missing its reading is worse
   than one drawn plainly. */
.spark-trend {
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hour-bar {
  fill: var(--accent);
  fill-opacity: 0.75;
}

.hour-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
}

/* The ranking. A number in front would be a second thing to read; the bar
   already says the order, and the first row says it loudest. */
.rank-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(60px, 130px) 46px 54px;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.rank-row:first-child {
  border-top: 0;
}

.rank-first .rank-name {
  font-weight: 700;
}

.rank-name {
  display: grid;
  min-width: 0;
  gap: 1px;
  overflow: hidden;
  font-size: 0.84rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-name small {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 400;
}

.rank-bar {
  display: block;
  width: 100%;
  height: 7px;
  background: var(--surface-muted);
  border-radius: 999px;
}

progress.rank-bar::-webkit-progress-bar { background: var(--surface-muted); border-radius: 999px; }
progress.rank-bar::-webkit-progress-value { background: var(--accent); border-radius: 999px; }
progress.rank-bar::-moz-progress-bar { background: var(--accent); border-radius: 999px; }

.rank-count {
  color: var(--muted);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* How well the wine answered, and whether the last seven days disagree with
   the period. The arrow only appears when there is something to disagree
   about. */
.match-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  justify-content: center;
  padding: 3px 7px;
  color: var(--text);
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.match-badge em {
  font-size: 0.6rem;
  font-style: normal;
}

.match-up em {
  color: var(--success);
}

.match-down em {
  color: var(--accent);
}

.match-flat em {
  display: none;
}

/* ---------------------------------------------------------------------------
 * The proposal, over the list
 *
 * A native <dialog>: escape closes it, focus stays inside it, and the list
 * behind it keeps its scroll position. On a phone it takes the screen, because
 * a card with fields on it at 360px wide has nothing to spare.
 * ------------------------------------------------------------------------ */

.card-dialog {
  width: min(880px, 100%);
  max-width: 100%;
  max-height: 92dvh;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-muted);
  color: var(--text);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.card-dialog::backdrop { background: var(--scrim); }

.card-dialog-close {
  display: flex;
  justify-content: flex-end;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.card-dialog-close button { margin: 0; }

.card-dialog-body { max-height: calc(92dvh - 60px); overflow-y: auto; padding: 18px; }

.card-dialog .card-page {
  padding: 0;
  justify-content: start;
  grid-template-columns: minmax(0, 460px) minmax(220px, 1fr);
}

@media (max-width: 900px) {
  .card-dialog {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  .card-dialog-body { max-height: calc(100dvh - 60px); padding: 14px; }
  .card-dialog .card-page { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------------------------------------------------------------------
 * Acting without leaving
 *
 * A line that says something is happening, a sentence that says what happened,
 * and a fade for what arrives. Three small things between "I pressed it" and "I
 * can see it worked" — which is the whole difference between a panel and a page.
 * ------------------------------------------------------------------------ */

.page-progress {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  background-size: 40% 100%;
  background-repeat: no-repeat;
  animation: page-progress 1s linear infinite;
}

@keyframes page-progress {
  from { background-position: -40% 0; }
  to { background-position: 140% 0; }
}

.toast-rail {
  position: fixed;
  z-index: 50;
  right: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  max-width: min(420px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  padding: 11px 15px;
  border-radius: var(--radius);
  background: var(--sidebar);
  color: var(--rail-text);
  font-size: 0.86rem;
  line-height: 1.45;
  box-shadow: var(--shadow);
  cursor: pointer;
  animation: toast-enter 0.22s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.toast-error { background: var(--danger); color: var(--on-accent); }
.toast-leaving { animation: toast-leave 0.2s ease-in both; }

@keyframes toast-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@keyframes toast-leave {
  from { opacity: 1; }
  to { opacity: 0; transform: translateY(4px); }
}

.region-enter { animation: region-enter 0.18s ease-out both; }

@keyframes region-enter {
  from { opacity: 0.4; }
  to { opacity: 1; }
}

/* The press has an answer before the server does. */
.is-busy {
  position: relative;
  opacity: 0.65;
  pointer-events: none;
}

/* --- Thinking orbs --------------------------------------------------------
 * The dotted mark from orbs.js. Resting dots in the muted ink, working dots in
 * the accent, so each mode draws them in its own palette. */

.orb {
  --orb-accent: var(--accent);
  --orb-ink: var(--muted);
  display: block;
  flex: none;
}

.orb-20 { width: 20px; height: 20px; }
.orb-64 { width: 64px; height: 64px; }

/* In a pressed control the label gives way to the orb in the same place, so
   the control keeps its width. The orb is inked with the label's own colour,
   which the script reads before the label turns transparent. */
:is(button, a).is-busy.is-thinking {
  opacity: 1;
  color: transparent;
  text-shadow: none;
}

.is-thinking > :not(.orb) { visibility: hidden; }

.orb-in-control {
  position: absolute;
  top: 50%;
  left: 50%;
  margin: -10px 0 0 -10px;
}

/* A screen on its way: over the content column, never over the rail. */
.screen-orb {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  pointer-events: none;
  animation: orb-arrive var(--ds-motion-slow) var(--ds-ease) both;
}

.screen-orb > .orb {
  box-sizing: content-box;
  padding: 14px;
  background: var(--surface);
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
}

[data-region="page"].is-loading {
  opacity: 0.55;
  transition: opacity var(--ds-motion) var(--ds-ease);
}

.dialog-orb {
  display: grid;
  min-height: 240px;
  place-items: center;
}

@keyframes orb-arrive {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: none; }
}

@media (min-width: 981px) {
  .screen-orb { left: var(--rail-width); }
}

@media (prefers-reduced-motion: reduce) {
  .page-progress, .toast, .toast-leaving, .region-enter, .screen-orb { animation: none; }
  [data-region="page"].is-loading { transition: none; }
  .page-progress { opacity: 0.8; }
}

@media (max-width: 700px) {
  .toast-rail { right: 12px; left: 12px; bottom: 12px; max-width: none; align-items: stretch; }
}

/* ---------------------------------------------------------------------------
 * Guided dish pairing
 *
 * The editor is one small application inside the workbench: a real five-step
 * sequence, with a live service-ticket summary that records what has already
 * been decided. Without JavaScript the fieldsets simply remain one complete,
 * ordinary form in the same order.
 * ------------------------------------------------------------------------ */

.dish-editor-intro {
  align-items: start;
}

.back-link {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}

.dish-overview,
.category-tool,
.dish-sheet,
.dish-flow {
  max-width: 1440px;
  margin-right: var(--content-gutter);
  margin-left: var(--content-gutter);
}

.dish-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.dish-overview > div {
  display: grid;
  gap: 3px;
  padding: 16px 18px;
  border-right: 1px solid var(--line);
}

.dish-overview > div:last-child { border-right: 0; }
.dish-overview strong { font-size: 1.45rem; line-height: 1; }
.dish-overview span { color: var(--muted); font-size: 0.74rem; }

.category-tool {
  margin-bottom: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.category-tool > summary {
  padding: 12px 15px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
}

.compact-category-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 10px;
  padding: 0 15px 15px;
}






/* The wines coupled to a dish, opened from its row and changed there. */
.dish-wines > summary {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  padding: 6px 12px 6px 10px;
  color: var(--accent);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 650;
  list-style: none;
}
.dish-wines > summary::-webkit-details-marker { display: none; }
.dish-wines > summary .ui-icon { width: 15px; height: 15px; }
.dish-wines > summary b {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  padding: 0 6px;
  color: var(--surface);
  background: var(--accent);
  border-radius: 999px;
  font-size: 0.68rem;
}
.dish-wines > summary:hover { border-color: var(--accent); }
.dish-wines[open] > summary { color: var(--text); background: var(--surface-muted); border-color: transparent; }
.dish-wines-form { display: grid; gap: 8px; max-width: 560px; margin-top: 12px; }
.dish-wines-hint { margin: 0; color: var(--muted); font-size: 0.76rem; }
.dish-wines-form .pairing-search { margin: 0; }
.dish-wines-form .check-list:not(:has(label:not([hidden]))) { display: none; }
.dish-wines-form .pairing-summary { min-height: 0; margin: 0; color: var(--muted); font-size: 0.76rem; }
.dish-wines-form .pairing-summary:not(:has(span:not([hidden]))) { display: none; }
.dish-wines-form .secondary-button { justify-self: start; }

.dish-empty {
  display: grid;
  justify-items: start;
  gap: 7px;
  padding: 28px;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}

.dish-empty p { margin: 0 0 8px; color: var(--muted); }

.dish-flow {
  margin-bottom: 42px;
}

.dish-flow-progress {
  margin-bottom: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.dish-flow-progress ol {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.dish-flow-progress li {
  position: relative;
  border-right: 1px solid var(--line);
}

.dish-flow-progress li:last-child { border-right: 0; }

.dish-flow-progress button,
.dish-flow-progress [data-dish-progress-label] {
  width: 100%;
  min-height: 48px;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  color: var(--muted);
  background: transparent;
  border: 0;
  font-size: 0.72rem;
  font-weight: 700;
  text-align: left;
}

.dish-flow-progress button { display: flex; }
.dish-flow-progress [data-dish-progress-label] { display: flex; }
.dish-flow-progress b,
.dish-flow-progress button span {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  flex: 0 0 auto;
  background: var(--surface-muted);
  border-radius: 50%;
  font-size: 0.65rem;
}

.dish-flow-progress li.is-current button,
.dish-flow-progress li.is-current [data-dish-progress-label] { color: var(--text); }
.dish-flow-progress li.is-current b,
.dish-flow-progress li.is-current button span { color: var(--on-accent); background: var(--accent); }
.dish-flow-progress li.is-complete b,
.dish-flow-progress li.is-complete button span { color: var(--success); background: var(--success-soft); }

.dish-flow-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  align-items: start;
  gap: 14px;
}

.dish-flow-stage {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.dish-step {
  display: grid;
  gap: 20px;
  min-width: 0;
  margin: 0;
  padding: clamp(22px, 4vw, 38px);
  border: 0;
  border-bottom: 1px solid var(--line);
}

.dish-step:last-child { border-bottom: 0; }
.dish-flow-enhanced .dish-step:not(.is-active) { display: none; }

.dish-step legend {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 0;
}

.dish-step legend span {
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dish-step legend strong {
  font-size: clamp(1.25rem, 3vw, 1.65rem);
  letter-spacing: -0.025em;
  line-height: 1.18;
}

.dish-step-intro {
  max-width: 66ch;
  margin: -11px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.dish-details-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.dish-name-field,
.dish-description-field { grid-column: 1 / -1; }


.dish-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.dish-choice-grid-base,
.dish-choice-grid-tastes { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.dish-choice-card { position: relative; cursor: pointer; }
.dish-choice-card input { position: absolute; width: 1px; height: 1px; min-height: 0; opacity: 0; }

.dish-choice-card > span {
  display: grid;
  min-height: 126px;
  align-content: start;
  gap: 4px;
  padding: 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.dish-choice-card:hover > span { border-color: var(--line-strong); transform: translateY(-1px); }
.dish-choice-card input:checked + span { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.dish-choice-card input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.dish-choice-card strong { margin-top: 3px; font-size: 0.86rem; }
.dish-choice-card small { color: var(--muted); font-size: 0.72rem; font-weight: 450; line-height: 1.4; }

.dish-choice-mark {
  display: inline-flex;
  width: max-content;
  min-width: 32px;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  padding: 3px 7px;
  color: var(--muted);
  background: var(--surface-muted);
  border-radius: 999px;
  font-family: var(--ds-font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.04em;
}

.dish-choice-card input:checked + span .dish-choice-mark { color: var(--accent); background: var(--accent-soft); }

.dish-step-actions {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 4px;
}

.dish-step-actions > :only-child { margin-left: auto; }
.dish-final-actions { border-top: 1px solid var(--line); padding-top: 18px; }

.dish-live-card {
  position: sticky;
  top: 80px;
  padding: 20px;
  background: var(--sidebar);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  color: var(--on-accent);
  box-shadow: var(--shadow);
}

.dish-live-label {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dish-live-card h2 { margin: 8px 0 22px; font-size: 1.35rem; letter-spacing: -0.025em; line-height: 1.15; }
.dish-live-card dl { display: grid; gap: 10px; margin: 0; }
.dish-live-card dl div { display: grid; grid-template-columns: 76px 1fr; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--rail-line); }
.dish-live-card dt { color: var(--muted); font-size: 0.68rem; font-weight: 700; }
.dish-live-card dd { margin: 0; font-size: 0.78rem; font-weight: 700; }

.dish-live-tastes { display: flex; flex-wrap: wrap; gap: 5px; margin: 15px 0 21px; }
.dish-live-tastes span { padding: 4px 7px; color: var(--on-accent); background: var(--rail-raise-2); border-radius: 999px; font-size: 0.66rem; }

.dish-live-footer { display: grid; gap: 5px; }
.dish-live-footer > span { color: var(--warning); font-size: 0.71rem; font-weight: 750; }
.dish-live-footer > span.is-ready { color: var(--success); }
.dish-live-footer strong { color: var(--muted); font-size: 0.69rem; font-weight: 500; }
.dish-live-footer b { color: var(--on-accent); }

.dish-section-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.dish-section-heading h2 { margin: 0; font-size: 0.96rem; }
.dish-section-heading p { margin: 3px 0 0; color: var(--muted); font-size: 0.75rem; }
.dish-section-heading > span { flex: 0 0 auto; padding: 5px 8px; background: var(--accent-soft); border-radius: 999px; color: var(--accent); font-size: 0.69rem; font-weight: 700; }

.dish-wine-list { max-height: 290px; }
.dish-wine-picker .pairing-summary { min-height: 1em; margin-bottom: 0; }

/* What the sommelier says about the dish, in step 5: the list a guest
   would get, with the same percentages; the chef picker folded under it. */
.dish-advice { margin: 0 0 16px; }
.dish-advice-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.dish-advice-list li { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px; font-size: 0.9rem; }
.dish-advice-list li.is-perfect { border-color: var(--accent); }
.dish-advice-list li > span { flex: 1 1 auto; min-width: 0; display: grid; }
.dish-advice-list li > span small { color: var(--muted); font-size: 0.74rem; }
.dish-advice-list li > em { flex: 0 0 auto; font-style: normal; font-size: 0.69rem; font-weight: 700; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 4px 8px; }
.dish-advice-match { flex: 0 0 3.2em; font-family: var(--font-display, inherit); font-size: 1.05rem; font-weight: 700; color: var(--accent); }
.dish-advice-relaxed { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 0.75rem; font-style: normal; }
.dish-advice-info-toggle { display: inline-grid; place-items: center; width: 18px; height: 18px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--accent); font: 600 0.7rem/1 var(--ds-font-body, inherit); cursor: pointer; }
.dish-advice-info { margin-top: 10px; font-size: 0.85rem; }
.dish-advice-info summary { color: var(--accent); font-weight: 600; cursor: pointer; }
.dish-advice-info dl { display: grid; gap: 8px; margin: 8px 0 0; }
.dish-advice-info dt { font-weight: 600; }
.dish-advice-info dd { margin: 0; color: var(--muted); line-height: 1.5; }
.dish-advice-empty { margin: 0; color: var(--muted); font-size: 0.82rem; line-height: 1.5; }
.dish-chef-picker { margin: 0 0 16px; border: 1px solid var(--line); border-radius: 14px; }
.dish-chef-picker > summary { padding: 12px 14px; color: var(--accent); font-size: 0.78rem; font-weight: 750; cursor: pointer; }
.dish-chef-picker > summary small { font-weight: 500; color: var(--muted); }
.dish-chef-picker > .dish-wine-picker { padding: 2px 14px 14px; }

.dish-advanced {
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.dish-advanced > summary { padding: 12px 14px; color: var(--accent); font-size: 0.78rem; font-weight: 750; }
.dish-advanced > .dish-details-grid { padding: 2px 14px 14px; }

.dish-publish-choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.dish-publish-choice > div { display: grid; gap: 2px; }
.dish-publish-choice small { color: var(--muted); font-size: 0.72rem; }
.dish-publish-choice label { min-width: 150px; }

.field-error {
  margin: 0;
  color: var(--danger);
  font-size: 0.74rem;
  font-weight: 650;
}

.error-summary ul { margin: 7px 0 0; padding-left: 20px; }

@media (max-width: 980px) {
  .compact-category-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compact-category-form button { justify-self: start; }
  .dish-flow-layout { grid-template-columns: minmax(0, 1fr); }
  .dish-live-card { position: static; grid-row: 1; }
  .dish-live-card dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .dish-overview { grid-template-columns: 1fr; }
  .dish-overview > div { grid-template-columns: 40px 1fr; align-items: baseline; border-right: 0; border-bottom: 1px solid var(--line); }
  .dish-overview > div:last-child { border-bottom: 0; }
  .compact-category-form,
  .dish-details-grid,
  .dish-choice-grid,
  .dish-choice-grid-base,
  .dish-choice-grid-tastes { grid-template-columns: 1fr; }
  .dish-flow-progress { overflow-x: auto; }
  .dish-flow-progress ol { min-width: 510px; }
  .dish-flow-progress button,
  .dish-flow-progress [data-dish-progress-label] { min-height: 43px; }
  .dish-step { padding: 22px 17px; }
  .dish-choice-card > span { min-height: 0; }
  .dish-step-actions { align-items: stretch; flex-direction: column-reverse; }
  .dish-step-actions .primary-button,
  .dish-step-actions .secondary-button { width: 100%; }
  .dish-live-card dl { grid-template-columns: 1fr; }
  .dish-section-heading,
  .dish-publish-choice { align-items: stretch; flex-direction: column; }
  .dish-publish-choice label { min-width: 0; }
}


/* Common presentation across the three tenant-admin display modes.
 * Palettes live in digisomm-tokens.css; guest previews keep --theme-* tokens.
 */
.metric-grid strong,
.stat-value,
.rank-count,
.dish-overview strong,
.bulk-bar-count strong {
  font-variant-numeric: tabular-nums;
}

.inline-search,
.publish-form { flex-wrap: wrap; }
.inline-search label,
.publish-form label { flex: 1 1 200px; min-width: 0; }

.ledger-rail {
  --text: var(--ds-rail-text);
  --muted: var(--ds-rail-text-dim);
  --sidebar-muted: var(--ds-rail-text-dim);
  --line: var(--ds-rail-line);
  --line-strong: var(--ds-rail-raise-3);
  --accent: var(--ds-rail-accent);
  --accent-bright: var(--ds-rail-accent);
  --raise-1: var(--ds-rail-raise-1);
  --raise-2: var(--ds-rail-raise-2);
  --raise-3: var(--ds-rail-raise-3);
  --surface: var(--ds-rail-raise-1);
  color: var(--ds-rail-text);
}

/* Preserve the existing guest-preview fallback; it is not an admin palette. */
.wc-frame,
.style-preview {
  --theme-accent-rgb: 47, 125, 104;
}

@media print {
  .mode-switch { display: none; }
  :root {
    color-scheme: light;
    --canvas: #ffffff;
    --surface: #ffffff;
    --surface-muted: #f4f2ed;
    --text: #14100e;
    --muted: #615b55;
    --line: #ddd7ce;
    --line-strong: #9a8b7e;
    --accent: #742d42;
    --on-accent: #ffffff;
  }
}

/* Task hierarchy and responsive tenant controls. */
.nav-group-label {
  margin: 16px 12px 5px;
  color: var(--rail-text-dim);
  font-size: 0.75rem;
  font-weight: 500;
}

.tenant-marker strong { white-space: normal; overflow-wrap: anywhere; }
.account-link[aria-current="page"] { background: var(--rail-raise-2); }
.account-link:focus-visible { outline-color: var(--rail-accent); }
.rail-close { display: none; }

.home-actions { margin: 0 var(--content-gutter); max-width: 720px; }
.home-actions a { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 80px; padding: 20px 4px; border-bottom: 1px solid var(--line); text-decoration: none; }
.home-actions strong { font-size: 1.1rem; font-weight: 550; }
.home-actions span, .home-note, .list-summary { color: var(--muted); font-size: 0.875rem; }
.home-actions a:hover strong { text-decoration: underline; text-underline-offset: 4px; }
.home-note { margin: 24px var(--content-gutter); }
.rail-more > summary, .rail-preferences > summary { padding: 12px; color: var(--rail-text-dim); font-size: 0.875rem; }
.rail-preferences { margin-top: auto; }
.rail-preferences + .account-link { margin-top: 0; }
.rail-preferences .rail-mode { margin-top: 0; padding-top: 8px; border-top: 0; }
.rail-more .ledger-nav { margin-top: 4px; }
.topbar .preview-link { color: var(--muted); background: transparent; border-color: var(--line); }
.topbar .preview-link:hover { color: var(--text); background: var(--surface-muted); }

.wine-add-panel {
  margin: 0 var(--content-gutter) 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  scroll-margin-top: 20px;
}
.wine-add-panel > summary { padding: 13px 18px; font-size: 0.875rem; font-weight: 600; }
.wine-add-panel .creation-panel > summary { min-height: 48px; }
.wine-add-panel > .creation-grid { margin: 12px 18px; }
.wine-add-panel > .catalog-search { margin: 12px 18px 18px; border: 0; padding: 0; }

.inventory-tools {
  display: grid;
  grid-template-columns: minmax(180px, 2fr) minmax(130px, 1fr) minmax(160px, 1fr);
  gap: 12px 16px;
  margin: 0 var(--content-gutter) 20px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.inventory-tools label { min-width: 0; font-size: 0.82rem; }
.inventory-result-count { grid-column: 1 / 3; margin: 0; align-self: center; color: var(--muted); font-size: 0.82rem; }
.inventory-tools > button { justify-self: end; min-height: 32px; background: transparent; border: 0; text-decoration: underline; text-underline-offset: 3px; }
.inventory-empty { margin: 16px var(--content-gutter); padding: 28px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.record-prices { display: flex; gap: 20px; font-variant-numeric: tabular-nums; }
.record-prices > span { display: grid; gap: 2px; min-width: 68px; text-align: right; }
.record-prices small { color: var(--muted); font-size: 0.75rem; font-weight: 400; }
.record-prices b { font-size: 0.875rem; font-weight: 600; }
.record-heading strong { white-space: normal; overflow-wrap: anywhere; line-height: 1.4; }
.record-row { position: relative; }
.record-row .record-pick-label { top: 17px; left: -10px; width: 38px; height: 44px; clip-path: none; font-size: 0; cursor: pointer; }
.record-row:has(.record-pick:checked) > .record-card { border-color: var(--accent); box-shadow: inset 3px 0 var(--accent); }
.record-row-off .record-heading strong { color: var(--text); }
.record-row-going > .record-card { opacity: 1; }
.record-row-going .record-heading strong { text-decoration: line-through; }
.status-pill.availability-unavailable { color: var(--muted); background: var(--surface-muted); border-color: var(--line); }
.record-pills .status-pill { font-size: 0.75rem; }
.mode-tabs { gap: 8px; }
.mode-tab { min-height: 44px; display: inline-flex; align-items: center; }
.mode-tab--active { color: var(--accent); background: var(--accent-soft); border-color: var(--accent); }
.bulk-bar-count { grid-template-columns: auto 1fr; column-gap: 6px; align-items: baseline; }
.bulk-bar-count small { grid-column: 1 / -1; }
.bulk-bar button:disabled { cursor: default; color: var(--muted); background: var(--surface-muted); border-color: var(--line); }

.workbench-shell :is(.primary-button, .secondary-button, .danger-button, .preview-link) { min-height: 44px; font-size: 0.875rem; }
.workbench-shell :is(.field-hint, .hint, .permission-note, .style-bar-note) { font-size: 0.82rem; line-height: 1.55; }
.workbench-shell :is(input, select, textarea) { scroll-margin-block: 24px; }
.workbench-shell :is(input, select, textarea)[aria-invalid="true"] { border-color: var(--danger); }
.workbench-shell label { font-size: 0.875rem; }
.workbench-main [data-region="page"] { max-width: 1520px; }
.workbench-main .page-intro p { max-width: 68ch; font-size: 0.94rem; }
.dish-choice-mark { display: none; }
.dish-choice-card > span { min-height: 92px; }
.dish-choice-card small { font-size: 0.78rem; }
.dish-live-card { color: var(--text); background: var(--surface-muted); border: 1px solid var(--line); box-shadow: none; }
.dish-live-card dl div { border-color: var(--line); }
.dish-live-tastes span { color: var(--text); background: var(--raise-2); font-size: 0.78rem; }
.dish-live-footer b { color: var(--text); }
.dish-live-label, .dish-live-card dt, .dish-live-footer strong { font-size: 0.78rem; letter-spacing: 0; text-transform: none; }
.dish-step legend strong { font-family: var(--ds-font-body); font-size: 1.4rem; }
.style-panel h2 { font-size: 1rem; font-weight: 650; letter-spacing: 0; text-transform: none; }
.style-panel, .account-card, .panel { box-shadow: none; }
.wine-list-share-panel > summary { font-size: 1rem; }
.setting-choice input { min-height: 18px; }
.topbar-actions .preview-link { white-space: nowrap; }

@media (max-width: 1100px) {
  .inventory-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inventory-tools > label:first-child { grid-column: 1 / -1; }
  .inventory-result-count { grid-column: 1; }
  .record-card > summary { display: grid; grid-template-columns: minmax(0, 1fr) auto 16px; gap: 10px; }
  .record-heading { grid-column: 1; }
  .record-prices { grid-column: 2; grid-row: 1 / 3; }
  .record-pills { grid-column: 1; grid-row: 2; }
  .record-card > summary::after { grid-column: 3; grid-row: 1 / 3; }
}
@media (max-width: 980px) {
  .rail-open { overflow: hidden; }
  html[data-ui-ready] .rail-close { display: block; min-height: 44px; margin-bottom: 12px; color: var(--rail-text); background: var(--rail-raise-2); border: 1px solid var(--rail-line); border-radius: 6px; }
  html[data-ui-ready] .ledger-rail { height: 100dvh; overscroll-behavior: contain; padding-bottom: max(20px, env(safe-area-inset-bottom)); }
}
@media (max-width: 680px) {
  .workbench-shell input, .workbench-shell select, .workbench-shell textarea { font-size: 16px; }
  .inline-search label { flex: auto; width: 100%; }
  .page-intro { gap: 16px; }
  .page-intro-actions { width: 100%; gap: 8px; }
  .page-intro-actions > a { flex: 1; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-grid article { padding: 16px 12px; border-right: 1px solid var(--line); }
  .metric-grid article:nth-child(2n) { border-right: 0; }
  .metric-grid article:nth-child(n + 3) { border-bottom: 0; }
  .metric-grid a { min-height: 36px; display: flex; align-items: center; line-height: 1.4; }
  .inventory-tools { padding: 14px; gap: 12px; }
  .inventory-tools > label { grid-column: 1 / -1; }
  .record-card > summary { grid-template-columns: minmax(0, 1fr) 16px; padding: 14px 12px; }
  .record-heading { grid-column: 1; }
  .record-pills { grid-column: 1; grid-row: 2; }
  .record-prices { grid-column: 1; grid-row: 3; justify-content: start; gap: 24px; padding-top: 4px; }
  .record-prices > span { text-align: left; min-width: 64px; }
  .record-card > summary::after { grid-column: 2; grid-row: 1; align-self: start; }
  .record-pick { margin-top: 19px; }
  .record-row .record-pick-label { top: 7px; }
  .bulk-bar { position: static; }
  .bulk-bar-actions { flex-wrap: wrap; }
  .dish-overview > div { padding: 14px 10px; }
  .dish-overview span { font-size: 0.78rem; }
  .style-bar { position: static; }
}
@media (max-width: 380px) {
  .topbar { gap: 8px; }
  .topbar-actions .preview-link { font-size: 0.75rem; padding: 8px; }
  .metric-grid { grid-template-columns: 1fr; }
  .metric-grid article { border-right: 0; border-bottom: 1px solid var(--line); }
  .metric-grid article:nth-child(3) { border-bottom: 1px solid var(--line); }
}
@media print {
  .home-actions, .inventory-tools, .wine-add-panel, .rail-close { display: none !important; }
}

/* Reveal optional controls in place instead of presenting every choice at once. */
.inventory-tools { grid-template-columns: minmax(0, 1fr) auto; padding: 0; background: transparent; border: 0; align-items: end; }
.inventory-tools > label:first-child { grid-column: 1; }
.inventory-result-count { grid-column: 1; font-size: 0.78rem; }
.inventory-filters > summary, .optional-fields > summary, .list-tools > summary { min-height: 44px; padding: 11px 0; color: var(--muted); font-size: 0.875rem; }
.inventory-filters > summary { padding: 11px 14px; border: 1px solid var(--line-strong); border-radius: 6px; }
.inventory-filters[open] { grid-column: 1 / -1; }
.inventory-filters[open] > summary { width: fit-content; }
.inventory-filter-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding-top: 16px; }
.optional-fields[open] > summary, details.style-panel[open] > summary { margin-bottom: 12px; }
.list-tools { margin: 0 var(--content-gutter) 32px; }
.wine-colour-group { gap: 0; }
.record-row > .record-card { background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.record-heading strong, .record-prices b { font-weight: 500; }
.record-pills:empty { display: none; }
.record-pills .status-pill { background: transparent; border: 0; padding-inline: 0; }
.wine-editor { grid-template-columns: minmax(0, 1fr); }
.wine-preview { padding: 0 18px; }
/* The guest's card at exactly its width in the app: a 390-pixel phone less
   the app's 24-pixel margins. Beside the prices on a computer, open. */
.wine-preview .wc-frame,
.wine-entry-card .wc-frame { width: 342px; max-width: 100%; }
@media (min-width: 1000px) {
  .wine-editor { grid-template-columns: minmax(0, 1fr) 342px; }
  .wine-preview { padding: 0; }
}
.record-form .optional-fields { margin-top: 14px; }
.account-details { align-self: start; }
.account-details > form > .style-panel { border: 0; padding-inline: 0; }
details.style-panel > summary { font-size: 0.94rem; font-weight: 550; }
.style-row-name small { display: none; }
@media (max-width: 680px) {
  .home-actions a { align-items: flex-start; flex-direction: column; gap: 6px; }
  .inventory-filter-fields { grid-template-columns: 1fr; }
  .inventory-tools > label:first-child { grid-column: 1; }
}

/* Het productmerk gebruikt op elk formaat dezelfde twee gegraveerde
   contouren. Het SVG is een masker zodat het op de rail albast en op het
   lichte aanmeldvlak bordeaux kan zijn zonder een tweede logo-asset. */
.brand-mark {
  display: block;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  background: var(--ds-bordeaux);
  -webkit-mask: url("digisomm-mark.svg") center / contain no-repeat;
  mask: url("digisomm-mark.svg") center / contain no-repeat;
}

.brand .brand-mark {
  background: var(--ds-alabaster);
}

[data-ds-mode="night"] .entry-brand .brand-mark {
  background: var(--ds-alabaster);
}

/* Compatibility rules added after the supplied visual layer. They preserve
   workflows introduced after that stylesheet was prepared. */

.style-controls > form[data-house-style-form] { display: grid; gap: 14px; }
.settings-page { display: grid; gap: 14px; padding: 0 var(--content-gutter) 48px; max-width: 820px; }
.sommelier-settings-form { display: grid; gap: 14px; }
.sommelier-settings-form .style-bar { position: static; }

.setting-choice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  cursor: pointer;
}

.setting-choice input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
}

.setting-choice input:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.setting-choice input:disabled { cursor: default; opacity: 0.55; }
.setting-choice span { display: grid; gap: 4px; }
.setting-choice strong { font-size: 0.92rem; }
.setting-choice small { color: var(--muted); font-size: 0.78rem; line-height: 1.5; }
.style-row > select { width: 100%; min-width: 0; }

.quick-style-choice {
  display: grid;
  grid-template-columns: minmax(120px, 0.42fr) minmax(0, 0.58fr);
  align-items: center;
  gap: 6px 14px;
}

.quick-style-choice > span { font-size: 0.88rem; font-weight: 650; }
.quick-style-choice > select { width: 100%; min-width: 0; }
.quick-style-choice > small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.45;
}

.boost-panel-copy {
  max-width: 680px;
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.boost-current {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 7px 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-muted);
}

.boost-current .status-pill { margin-left: 0; }
.boost-current small { grid-column: 2; color: var(--muted); font-size: 0.78rem; }

.boost-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.boost-form label { grid-column: 1; }
.boost-form .primary-button { grid-column: 2; grid-row: 2; align-self: end; }
.boost-form .field-hint { grid-column: 1 / -1; margin-top: 0; }

.boost-action {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.boost-action .field-hint { flex: 1 1 260px; margin: 0; }
.boost-paid-note { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.78rem; }

.wine-list-share-panel {
  padding: 0;
  overflow: hidden;
}

.wine-list-share-panel > summary {
  padding: 15px 18px;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.wine-list-share-panel > summary:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: -3px;
}

.wine-list-share-panel[open] > summary {
  border-bottom: 1px solid var(--line);
}

.wine-list-share-content {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.wine-list-share-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.wine-list-share-heading p {
  max-width: 580px;
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.wine-list-share-heading .secondary-button { flex: 0 0 auto; }
.wine-list-share-field { display: grid; gap: 7px; }
.wine-list-share-field > label { font-size: 0.82rem; font-weight: 650; }
.wine-list-share-field .field-hint { margin: 0; }

.copy-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 8px;
}

.copy-control input,
.copy-control textarea {
  width: 100%;
  min-width: 0;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.76rem;
}

.copy-control textarea { resize: vertical; }
.copy-control .secondary-button { align-self: stretch; }

@media (max-width: 620px) {
  .wine-list-share-heading { align-items: stretch; flex-direction: column; }
  .wine-list-share-heading .secondary-button { text-align: center; }
  .copy-control { grid-template-columns: minmax(0, 1fr); }
  .copy-control .secondary-button { justify-content: center; }
}

@media (max-width: 560px) {
  .quick-style-choice { grid-template-columns: minmax(0, 1fr); }
  .boost-form { grid-template-columns: minmax(0, 1fr); }
  .boost-form .primary-button { grid-column: 1; grid-row: auto; width: 100%; }
}
/* The QR page: the card (one SVG, drawn by server/assets/qr-card.js and the
   same file that is downloaded) beside its choices and the downloads. Both
   panels carry these rules; tests/qr-code.test.js holds them to it. */
.qr-generator {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 1fr);
  gap: 18px 24px;
  align-items: start;
  max-width: 1440px;
  margin: 0 var(--content-gutter);
  padding-bottom: 40px;
}

.qr-preview-stage {
  position: sticky;
  top: 16px;
  display: grid;
  min-height: 520px;
  place-items: center;
  padding: clamp(20px, 4vw, 52px);
  background-color: #e6e9e9;
  background-image:
    linear-gradient(rgba(23, 32, 35, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 32, 35, 0.045) 1px, transparent 1px);
  background-size: 24px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.qr-poster {
  display: grid;
  width: min(100%, 480px);
  aspect-ratio: 1;
  place-items: center;
  overflow: hidden;
  /* The die-cut radius belongs to the artwork (88 of 1080). */
  border-radius: 8.15%;
  /* A sticker lying flat on the card: an edge, no halo around it. */
  box-shadow: 0 0 0 1px rgba(23, 32, 35, 0.1), 0 1px 3px rgba(23, 32, 35, 0.12);
  print-color-adjust: exact;
}

/* The round sticker is cut as a circle (qr-card.js sets data-shape). */
.qr-poster[data-shape="round"] {
  border-radius: 50%;
}

.qr-poster > svg {
  display: block;
  width: 100%;
  height: 100%;
}

.qr-poster-pending {
  color: var(--muted);
  font-size: 0.8rem;
}

.qr-side {
  display: grid;
  gap: 16px;
}

.qr-style-form,
.qr-action-panel {
  display: grid;
  gap: 14px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.qr-style-form h2,
.qr-action-panel h2,
.qr-action-panel p {
  margin: 0;
}

.qr-style-form h2,
.qr-action-panel h2 {
  font-size: 1rem;
}

.qr-action-panel > div:first-child p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.8rem;
}

.qr-choice {
  display: grid;
  gap: 6px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.qr-choice legend {
  margin-bottom: 6px;
  padding: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.qr-choice:disabled {
  opacity: 0.45;
}

.qr-choice-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.qr-option {
  position: relative;
  display: inline-flex;
  cursor: pointer;
}

.qr-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.qr-option span {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.85rem;
}

.qr-option input:checked + span {
  color: var(--ds-accent, #7a1b2e);
  background: var(--ds-accent-soft, #f7e9ec);
  border-color: var(--ds-accent, #7a1b2e);
  font-weight: 600;
}

.qr-option input:focus-visible + span {
  outline: 2px solid var(--ds-accent, #7a1b2e);
  outline-offset: 2px;
}

.qr-option input:disabled + span {
  cursor: not-allowed;
  opacity: 0.45;
}

.qr-text-field {
  display: grid;
  gap: 5px;
}

.qr-text-field span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.qr-text-field input {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  font: inherit;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.qr-colour-field {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: 0.8rem;
}

.qr-colour-field input {
  width: 40px;
  height: 32px;
  padding: 2px;
  cursor: pointer;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.qr-font-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.qr-font-fields legend {
  grid-column: 1 / -1;
  margin-bottom: 6px;
  padding: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.qr-font-fields:disabled { opacity: 0.45; }

/* A choice the chosen look or shape does not use: dimmed, still sent. */
.qr-unused { opacity: 0.45; }

.qr-text-field select {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  font: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.qr-adjusted:empty { display: none; }

.qr-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.qr-notice,
.qr-error {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
}

.qr-notice { color: var(--ds-success, #1d7a4b); background: color-mix(in srgb, var(--ds-success, #1d7a4b) 12%, transparent); }
.qr-error { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); }

.qr-style-form > .primary-button {
  justify-self: start;
}

.qr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.qr-actions button:disabled {
  cursor: wait;
  opacity: 0.5;
}

.qr-status {
  color: var(--muted);
  font-size: 0.76rem;
}

.qr-target {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  text-align: center;
}

.qr-target a {
  color: inherit;
  overflow-wrap: anywhere;
}

.qr-noscript {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--danger);
}

@media (max-width: 900px) {
  .qr-generator {
    grid-template-columns: minmax(0, 1fr);
  }

  .qr-preview-stage {
    position: static;
    min-height: 0;
    padding: 18px;
  }
}

@media print {
  .qr-generator {
    display: block;
    width: 105mm;
    max-width: none;
    margin: 0 auto;
    padding: 0;
  }

  .qr-preview-stage {
    position: static;
    min-height: 0;
    padding: 0;
    background: #fff;
    border: 0;
  }

  .qr-poster {
    width: 105mm;
    height: 105mm;
    box-shadow: none;
    break-inside: avoid;
    page-break-inside: avoid;
  }
}


/* Tenant workbench surface system. Keep guest cards and print output separate.
 * One wine sheet, an inset editing surface, and a compact task overview share
 * the same rhythm. No tenant data or public theme tokens are changed here.
 */
.ui-icon { display: inline-block; width: 20px; height: 20px; flex: 0 0 auto; vertical-align: middle; }
.workbench-shell .wine-entry {
  display: grid;
  max-width: 1120px;
  margin: 0 var(--content-gutter);
  padding: 0;
  border: 0;
  background: transparent;
  gap: 24px;
}
.wine-entry .primary-button { margin-top: 0; }
.wine-entry .form-grid { align-items: start; }
.price-missing { color: var(--warning); border: 1px solid currentColor; background: var(--surface); }
.wine-entry .panel { margin: 0; }
.wine-entry .optional-fields { padding: 20px; border: 1px solid var(--line); border-radius: 10px; }
.wine-entry .optional-fields > label { margin-top: 16px; }
.wine-entry-save { display: flex; align-items: end; gap: 16px; flex-wrap: wrap; }
.wine-entry-layout { display: grid; grid-template-columns: minmax(0, 1fr) 342px; gap: 24px; align-items: start; }
.wine-entry-fields { display: grid; gap: 24px; min-width: 0; }
.wine-entry-card { position: sticky; top: 20px; display: grid; gap: 10px; }
.wine-entry-card > .hint { margin: 0; }
@media (max-width: 1000px) {
  .wine-entry-layout { grid-template-columns: minmax(0, 1fr); }
  .wine-entry-card { position: static; justify-items: center; }
}
.wine-entry-save > label { flex: 1 1 260px; }
.wine-add-panel > .creation-link { margin: 0 18px 18px; }
.workbench-shell .search-results form { display: grid; grid-template-columns: minmax(180px, 1fr) 110px 110px auto; gap: 16px; align-items: end; }
.workbench-shell .search-results input { width: 100%; min-width: 0; }
.workbench-shell .publish-form .check-label { display: flex; align-items: center; gap: 8px; }
.workbench-shell .publish-form input[type="checkbox"] { width: 20px; min-height: 20px; }
@media (max-width: 760px) {
  .workbench-shell .search-results form { grid-template-columns: 1fr 1fr; }
  .workbench-shell .search-results form > span,
  .workbench-shell .search-results form > button { grid-column: 1 / -1; }
  .wine-entry-save > button { width: 100%; }
}
.entry-shell .auth-brand :is(strong, small) { font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }
@media screen {
  .workbench-shell { --rail-width: 232px; }
  .workbench-shell .ledger-rail { padding: 16px 12px; }
  .workbench-shell .brand {
    min-height: 76px;
    margin: -16px -12px 0;
    padding: 16px 24px;
    color: var(--rail-accent);
    background: transparent;
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  }
  .workbench-shell .tenant-logo { text-decoration: none; }
  .workbench-shell .tenant-logo img { display: block; width: 100%; max-width: 196px; height: auto; }
  .workbench-shell .tenant-logo .tenant-logo-inverse { display: none; }
  [data-ds-mode="night"] .workbench-shell .tenant-logo .tenant-logo-primary { display: none; }
  [data-ds-mode="night"] .workbench-shell .tenant-logo .tenant-logo-inverse { display: block; }
  .workbench-shell .tenant-marker { margin: 24px 6px 20px; padding: 12px; border-color: var(--rail-line); background: transparent; }
  .workbench-shell .tenant-marker span { font-size: 0.75rem; font-weight: 500; }
  .workbench-shell .tenant-marker strong { font-size: 0.875rem; font-weight: 600; }
  .workbench-shell .ledger-nav { gap: 5px; }
  .workbench-shell .ledger-nav a { min-height: 48px; gap: 14px; padding: 12px 16px; border-radius: 8px; color: var(--rail-text); font-weight: 500; }
  .workbench-shell .ledger-nav a .ui-icon { color: var(--rail-text-dim); }
  .workbench-shell .ledger-nav a[aria-current="page"] { color: var(--rail-accent); background: var(--rail-raise-2); box-shadow: none; }
  .workbench-shell .ledger-nav a[aria-current="page"] .ui-icon { color: currentColor; }
  .workbench-shell :is(.rail-more, .rail-preferences) > summary {
    display: flex; align-items: center; gap: 14px; min-height: 48px; padding: 12px 16px;
    color: var(--rail-text-dim); list-style: none; border-radius: 8px; font-weight: 500;
  }
  .workbench-shell :is(.rail-more, .rail-preferences) > summary::-webkit-details-marker { display: none; }
  .workbench-shell :is(.rail-more, .rail-preferences) > summary:hover { background: var(--rail-raise-1); }
  .workbench-shell :is(.rail-more, .rail-preferences) > summary > .ui-icon:last-child { margin-left: auto; width: 14px; height: 14px; transform: rotate(90deg); }
  .workbench-shell :is(.rail-more, .rail-preferences)[open] > summary > .ui-icon:last-child { transform: rotate(-90deg); }
  .workbench-shell .rail-preferences { padding-top: 20px; }
  .workbench-shell .rail-mode { padding-inline: 8px; }
  .workbench-shell .account-link { grid-template-columns: 24px minmax(0, 1fr); column-gap: 12px; padding: 18px 12px 8px; }
  .workbench-shell .account-link .ui-icon { grid-row: 1 / 3; align-self: center; color: var(--rail-text-dim); }
  .workbench-shell .account-link strong { font-size: 0.875rem; font-weight: 600; overflow-wrap: anywhere; }
  .workbench-shell .account-link small { grid-column: 2; font-size: 0.75rem; }
  .workbench-shell .topbar { min-height: 76px; background: transparent; }
  .workbench-shell .topbar strong { font-weight: 500; }
  .workbench-shell .topbar .preview-link { color: var(--accent); border-color: transparent; gap: 10px; }
  .workbench-shell .topbar .preview-link .ui-icon { width: 17px; height: 17px; }
  .workbench-shell .page-intro { align-items: center; padding-top: 32px; padding-bottom: 28px; }
  .workbench-shell .page-intro h1 { font-size: clamp(1.6rem, 2.8vw, 2rem); font-weight: 600; letter-spacing: -0.035em; }
  .workbench-shell label { font-weight: 500; }
  .workbench-shell :is(input, select, textarea) { border-radius: 8px; font-weight: 400; }
  .workbench-shell :is(input, textarea)::placeholder { color: var(--ds-text-faint); opacity: 1; }
  .workbench-shell :is(.primary-button, .secondary-button, .danger-button, .inline-search button, .search-results button) {
    gap: 10px; min-height: 44px; padding: 11px 18px; border-radius: 8px; font-size: 0.875rem; font-weight: 600;
    transition: background-color var(--ds-motion-fast), border-color var(--ds-motion-fast), box-shadow var(--ds-motion-fast);
  }
  .workbench-shell .primary-button { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 1px 2px var(--raise-2); }
  .workbench-shell .secondary-button:hover { background: var(--surface-muted); }
  .workbench-shell .danger-button { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }
  .workbench-shell :is(.primary-button, .secondary-button):active { box-shadow: inset 0 1px 3px var(--raise-3); }

  .home-workspace { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(260px, 1fr); gap: 20px; margin: 0 var(--content-gutter); max-width: 1120px; }
  .home-wine { padding: 32px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 2px 4px var(--raise-1); }
  .home-section-title { display: flex; gap: 14px; align-items: center; }
  .home-section-title .ui-icon { width: 30px; height: 30px; color: var(--accent); }
  .home-section-title h2 { margin: 0; font-size: 1.4rem; font-weight: 600; letter-spacing: -0.025em; }
  .home-description { margin: 16px 0 0; color: var(--muted); font-size: 0.94rem; }
  .home-inventory { margin: 32px 0 16px; font-size: 0.94rem; font-weight: 600; }
  .home-availability { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; min-height: 48px; margin: 0; border-radius: 8px; background: var(--surface-muted); font-size: 0.875rem; text-decoration: none; }
  a.home-availability:hover { background: var(--accent-soft); }
  .home-availability .ui-icon { width: 16px; height: 16px; color: var(--accent); }
  .home-wine-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 28px; }
  .home-workspace .home-actions { display: grid; grid-template-rows: 1fr 1fr; gap: 16px; margin: 0; max-width: none; }
  .home-workspace .home-actions > a { display: grid; grid-template-columns: 28px minmax(0, 1fr) 16px; gap: 16px; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 2px 4px var(--raise-1); }
  .home-workspace .home-actions > a > .ui-icon:first-child { width: 26px; height: 26px; align-self: start; margin-top: 3px; color: var(--accent); }
  .home-workspace .home-actions > a > .ui-icon:last-child { width: 16px; height: 16px; color: var(--accent); }
  .home-workspace .home-actions > a:hover { border-color: var(--line-strong); }
  .home-workspace .home-actions strong { color: var(--text); font-size: 1.1rem; font-weight: 600; }
  .home-action-copy { display: grid; gap: 6px; }
  .home-action-copy .home-action-label { padding-top: 10px; color: var(--accent); font-size: 0.82rem; font-weight: 600; }

  .wine-workspace { margin: 0 var(--content-gutter); }
  .wine-toolbar { display: flex; flex-wrap: wrap; align-items: start; justify-content: space-between; gap: 18px 28px; margin-bottom: 24px; }
  .wine-workspace .mode-tabs { margin: 23px 0 0; gap: 8px; border-bottom: 1px solid var(--line); }
  .wine-workspace .mode-tab { min-height: 46px; padding: 10px 12px; border: 0; border-radius: 0; background: transparent; color: var(--muted); box-shadow: none; font-weight: 500; }
  .wine-workspace .mode-tab--active { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); font-weight: 600; }
  .wine-workspace .mode-tab .count { background: var(--surface-muted); color: var(--muted); font-size: 0.75rem; font-weight: 500; }
  .wine-workspace .mode-tab--active .count { color: var(--on-accent); background: var(--action); }
  .wine-workspace .inventory-tools { position: relative; flex: 1 1 380px; max-width: 570px; margin: 0; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; row-gap: 6px; padding: 0; }
  .wine-workspace .inventory-tools > label:first-child { grid-column: 1; font-size: 0.8rem; }
  .search-field { display: block; position: relative; }
  .search-field > .ui-icon { position: absolute; top: 13px; left: 13px; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
  .workbench-shell .search-field input { padding-left: 40px; font-size: 0.875rem; }
  .wine-workspace .inventory-filters > summary { display: flex; gap: 8px; align-items: center; background: var(--surface); color: var(--text); font-weight: 500; list-style: none; }
  .wine-workspace .inventory-filters > summary::-webkit-details-marker { display: none; }
  .wine-workspace .inventory-filters[open] > summary { border-color: var(--accent); background: var(--accent-soft); }
  .wine-workspace .inventory-filters[open] { grid-column: 1 / -1; }
  .wine-workspace .inventory-filter-fields { padding: 16px; margin-top: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
  .wine-workspace .inventory-result-count { margin: 0; min-height: 20px; }
  .wine-workspace .inventory-tools > button { min-height: 32px; padding: 4px; font-size: 0.78rem; }
  .wine-workspace :is(.wine-add-panel, .publish-bar, .publish-plan, .layer-note, .bulk-bar, .inventory-empty, .list-tools) { margin-left: 0; margin-right: 0; }
  .wine-sheet { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 2px 4px var(--raise-1); }
  .wine-sheet .wine-colour-group { margin: 0; padding: 0; gap: 0; }
  .wine-sheet .colour-heading { padding: 18px 22px; margin: 0; background: var(--surface); border-bottom: 1px solid var(--line); font-size: 0.94rem; font-weight: 600; }
  .wine-sheet > .wine-colour-group:first-child .colour-heading { border-radius: 12px 12px 0 0; }
  .wine-sheet .colour-count { color: var(--muted); background: var(--surface-muted); }
  .wine-sheet .record-row { column-gap: 0; grid-template-columns: 48px minmax(0, 1fr); border-bottom: 1px solid var(--line); }
  .wine-sheet .record-row:last-child { border-bottom: 0; }
  .wine-sheet .wine-colour-group + .wine-colour-group { border-top: 1px solid var(--line); }
  .wine-sheet .record-row > .record-card { border: 0; border-radius: 0; box-shadow: none; overflow: visible; }
  .wine-sheet .record-row:has(.record-card[open]), .wine-sheet .record-row:has(.record-pick:checked) { background: var(--surface-muted); }
  .wine-sheet .record-row:has(.record-pick:checked) { box-shadow: inset 3px 0 var(--accent); }
  .wine-sheet .record-row-plain { display: block; padding-left: 18px; }
  .wine-sheet .record-pick { margin: 29px 0 0 20px; accent-color: var(--action); }
  .wine-sheet .record-pick-label { top: 15px; left: 8px; width: 40px; height: 44px; }
  .wine-sheet .record-card > summary { display: grid; grid-template-columns: minmax(0, 1fr) 164px 126px 18px; align-items: center; min-height: 82px; padding: 16px 22px 16px 8px; gap: 12px; font-weight: 500; }
  .wine-sheet .record-card > summary::after { content: none; }
  .wine-sheet .record-card > summary > .ui-icon { grid-column: 4; grid-row: 1; width: 16px; height: 16px; color: var(--muted); }
  .wine-sheet .record-card[open] > summary > .ui-icon { transform: rotate(-90deg); color: var(--accent); }
  .wine-sheet .record-card > summary:hover .record-heading strong { color: var(--accent); }
  .wine-sheet .record-heading { grid-column: 1; grid-row: 1; gap: 4px; }
  .wine-sheet .record-heading strong { font-size: 0.94rem; font-weight: 600; }
  .wine-sheet .record-heading small { white-space: normal; overflow-wrap: anywhere; font-size: 0.8rem; }
  .wine-sheet .record-prices { grid-column: 2; grid-row: 1; gap: 20px; }
  .wine-sheet .record-prices > span { min-width: 72px; }
  .wine-sheet .record-prices b { font-weight: 500; font-size: 0.9rem; white-space: nowrap; }
  .wine-sheet .record-pills { grid-column: 3; grid-row: 1; display: grid; gap: 3px; margin: 0; }
  .wine-sheet .record-pills .status-pill { white-space: normal; font-weight: 500; line-height: 1.4; }
  .wine-sheet .wine-editor { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0 22px 16px 8px; border-top: 0; background: transparent; }
  .wine-sheet .wine-editor-fields { gap: 12px; padding: 20px; border: 1px solid var(--line); border-radius: 10px 10px 0 0; background: var(--surface); }
  .wine-sheet .wine-editor-fields > :is(.record-form, .confirm-form) { margin: 0; padding: 0; border: 0; background: transparent; box-shadow: none; }
  .wine-sheet .wine-editor-fields > .record-form > .form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 0; }
  .wine-save-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; }
  .wine-sheet .wine-save-actions .primary-button { margin: 0; }
  .wine-sheet .wine-save-actions .permission-note { display: inline; margin: 0; }
  .wine-sheet .live-toggle .secondary-button { min-height: 44px; padding: 8px 0; background: transparent; border: 0; color: var(--accent); font-weight: 500; text-decoration: underline; text-underline-offset: 4px; }
  .wine-sheet .wine-preview { padding: 0 20px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 10px 10px; background: var(--surface); }
  .wine-sheet .wine-preview[open] { padding-bottom: 20px; }
  .wine-sheet .wine-preview > summary { padding-block: 14px; }
  .wine-sheet .wine-preview .confirm-form { padding-inline: 0; }
  .wine-workspace .list-tools { margin-top: 20px; }
  .wine-empty { display: grid; justify-items: start; gap: 12px; padding: 40px; }
  .wine-empty > .ui-icon { width: 32px; height: 32px; color: var(--accent); }
  .wine-empty h2 { margin: 0; font-size: 1.25rem; font-weight: 600; }
  .wine-empty p { margin: 0 0 8px; color: var(--muted); }

  .workbench-shell .category-tool { background: transparent; border: 0; }
  .workbench-shell .category-tool > summary { padding-inline: 0; min-height: 44px; font-weight: 500; }
  .workbench-shell .style-panel { padding: 24px; border-radius: 12px; }
  .workbench-shell .style-panel > h2 { margin-bottom: 20px; font-size: 1.05rem; font-weight: 600; }
  .workbench-shell details.style-panel > summary { min-height: 44px; display: list-item; align-content: center; font-size: 1rem; }
  .workbench-shell .style-row { padding-block: 14px; }
  .workbench-shell .style-bar { border-radius: 10px; box-shadow: var(--shadow-sm); }
  .workbench-shell .sommelier-settings-form { gap: 0; }
  .workbench-shell .sommelier-settings-form .style-panel { border-radius: 12px 12px 0 0; }
  .workbench-shell .sommelier-settings-form .style-bar { border-radius: 0 0 12px 12px; border-top: 0; box-shadow: none; }
  .workbench-shell .setting-choice { min-height: 44px; align-items: center; }
  .workbench-shell .setting-choice input { margin-top: 0; }
  .workbench-shell .toast { border: 1px solid var(--line); border-left: 3px solid var(--success); }
  .workbench-shell .toast-error { border-left-color: var(--danger); background: var(--danger-soft); color: var(--danger); }
}

@media screen and (max-width: 1200px) {
  .wine-sheet .record-card > summary { grid-template-columns: minmax(0, 1fr) 164px 18px; }
  .wine-sheet .record-card > summary > .ui-icon { grid-column: 3; }
  .wine-sheet .record-pills { grid-column: 1; grid-row: 2; }
  .wine-sheet .record-prices { grid-row: 1 / 3; }
  .wine-toolbar { gap: 14px; }
  .wine-workspace .inventory-tools { flex-basis: 100%; max-width: none; }
  .wine-workspace .mode-tabs { margin-top: 0; }
  .home-workspace { grid-template-columns: minmax(0, 1.2fr) minmax(240px, 1fr); }
  .home-wine, .home-workspace .home-actions > a { padding: 24px; }
}
@media screen and (max-width: 980px) {
  html[data-ui-ready] .workbench-shell .rail-close { order: -1; margin-top: 4px; }
  .workbench-shell .ledger-rail .brand { margin-top: 0; border-radius: 8px; margin-inline: 0; padding-inline: 12px; }
}
@media screen and (max-width: 680px) {
  .workbench-shell .topbar { min-height: 64px; }
  .workbench-shell .page-intro { align-items: flex-start; gap: 12px; padding-block: 16px; }
  .workbench-shell .topbar .preview-link { gap: 6px; padding-inline: 6px; }
  .workbench-shell .topbar .preview-link .ui-icon { display: none; }
  .home-workspace { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .home-workspace .home-actions { gap: 14px; }
  .home-workspace .home-actions > a { align-items: center; grid-template-columns: 24px minmax(0, 1fr) 16px; }
  .home-wine-actions { align-items: stretch; }
  .home-wine-actions .primary-button { flex: 1 1 auto; }
  .wine-workspace .inventory-tools { grid-template-columns: minmax(0, 1fr) auto; }
  .workbench-shell .search-field input { font-size: 16px; }
  .wine-workspace .inventory-tools > label:first-child { grid-column: 1; grid-row: 1; }
  .wine-workspace .inventory-filters { grid-column: 2; grid-row: 1; align-self: end; }
  .wine-workspace .inventory-filters[open] { grid-column: 1 / -1; grid-row: 2; }
  .wine-workspace .inventory-result-count { grid-row: auto; grid-column: 1; margin: 0; }
  .wine-workspace .inventory-tools { gap: 8px 10px; }
  .wine-workspace .inventory-tools > [data-inventory-reset] { justify-self: end; min-height: 44px; }
  .wine-sheet .colour-heading { padding: 14px 16px; }
  .wine-sheet .record-row { grid-template-columns: 40px minmax(0, 1fr); }
  .wine-sheet .record-pick { margin: 21px 0 0 14px; }
  .wine-sheet .record-pick-label { top: 7px; left: 2px; }
  .wine-sheet .record-card > summary { grid-template-columns: minmax(0, 1fr) 16px; gap: 8px; padding: 16px 16px 16px 4px; }
  .wine-sheet .record-card > summary > .ui-icon { grid-column: 2; align-self: start; margin-top: 4px; }
  .wine-sheet .record-prices { grid-column: 1; grid-row: 3; padding-top: 4px; gap: 24px; }
  .wine-sheet .record-prices > span { text-align: left; }
  .wine-sheet .wine-editor { padding: 0 12px 12px 0; margin-left: -28px; }
  .wine-sheet .wine-editor-fields { padding: 16px; }
  .wine-sheet .wine-editor-fields > .record-form > .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .wine-sheet .wine-editor-fields > .record-form > .form-grid > label:last-child:nth-child(3) { grid-column: 1 / -1; }
  .wine-sheet .wine-save-actions .primary-button { flex: 1; }
  .wine-sheet .wine-save-actions .permission-note { flex-basis: 100%; }
  .wine-sheet .wine-preview { padding-inline: 16px; }
  .wine-empty { padding: 28px 22px; }
  .workbench-shell .style-panel { padding: 20px; }
}

/* --- On or off, on the row ------------------------------------------------
 * The switch sits in its own column at the end of the row, outside the card's
 * summary, so a tap on it never opens the card. On is the action colour, off
 * the strong line colour, and the row keeps its full-contrast text either way:
 * the switch and the "Niet beschikbaar" label carry the state. The thumb
 * overshoots a hair on its way across -- enough to feel it land, not enough to
 * notice as an effect. */

.record-row:has(> .record-switch) { grid-template-columns: auto minmax(0, 1fr) auto; }
.record-row-plain:has(> .record-switch) { display: grid; grid-template-columns: minmax(0, 1fr) auto; }

.record-switch {
  grid-row: 1;
  grid-column: -2;
  align-self: start;
  margin: 19px 10px 0 0;
}

.switch {
  display: inline-grid;
  place-items: center;
  width: 56px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.switch:focus-visible { outline: none; }
.switch:focus-visible .switch-track { outline: 3px solid var(--focus); outline-offset: 2px; }

.switch-track {
  position: relative;
  width: 42px;
  height: 26px;
  border-radius: 999px;
  background: var(--line-strong);
  transition: background-color var(--ds-motion) var(--ds-ease);
}

.switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 1px 3px var(--raise-3);
  transition: transform var(--ds-motion-slow) cubic-bezier(0.34, 1.36, 0.64, 1);
}

.switch[aria-checked="true"] .switch-track { background: var(--action); }
.switch[aria-checked="true"] .switch-thumb { transform: translateX(16px); }
.switch:active .switch-thumb { transform: scale(0.9); }
.switch[aria-checked="true"]:active .switch-thumb { transform: translateX(16px) scale(0.9); }

/* A saved row says so for a moment, in the colour of the thing that saved it. */
.row-settled > .record-card { animation: row-settled 1.1s var(--ds-ease); }

/* No end frame: it fades into whatever the row is -- on, or greyed out. */
@keyframes row-settled {
  from { background-color: var(--accent-soft); }
}

.toast { display: flex; gap: 14px; align-items: center; justify-content: space-between; }

.toast-action {
  flex: none;
  min-height: 32px;
  padding: 4px 10px;
  border: 1px solid currentColor;
  border-radius: 6px;
  background: none;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

@media screen {
  .wine-sheet .record-row:has(> .record-switch) { grid-template-columns: 48px minmax(0, 1fr) auto; }
  .wine-sheet .record-row:has(> .record-switch) .record-card > summary { padding-right: 8px; }
}

@media screen and (max-width: 680px) {
  .wine-sheet .record-row:has(> .record-switch) { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .record-switch { margin: 5px 2px 0 0; }
}

@media print {
  .record-switch { display: none; }
}

/* On a phone the selection's actions wait at the bottom of the screen, where
   the thumb is, instead of at the top of a list scrolled far past. Only with
   the script: without it the bar is always shown, and belongs in the flow. The
   list makes room at its end, and a message rises above the bar, not onto it. */
@media screen and (max-width: 680px) {
  html[data-ui-ready] .wine-workspace .bulk-bar {
    position: fixed;
    z-index: 20;
    top: auto;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    left: 12px;
    margin: 0;
    box-shadow: var(--shadow);
  }
  html[data-ui-ready] .wine-workspace:has(.bulk-bar:not([hidden])) { padding-bottom: 136px; }
  html[data-ui-ready] body:has(.bulk-bar:not([hidden])) .toast-rail { bottom: calc(148px + env(safe-area-inset-bottom, 0px)); }
}

/* A ticked row is marked once, on the row. The card inside it drew a second
   line of its own right beside the first. */
@media screen {
  .wine-sheet .record-row:has(.record-pick:checked) > .record-card { box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
  .switch-track, .switch-thumb { transition: none; }
  .row-settled > .record-card { animation: none; }
}

/* ==========================================================================
 * Fields, disclosures and placement — one pass over the whole workbench
 *
 * Written after going through every screen at phone and desktop width. Kept
 * in one block, scoped to the signed-in workbench, so the sign-in pages (shared
 * with the platform panel below) are untouched and the reasoning stays in one
 * place instead of in thirty corrections spread through the file.
 * ======================================================================== */

/* --- Fields ------------------------------------------------------------------
   One height, one radius, a quiet inner shade, and a border that answers the
   pointer. The border keeps --line-strong: it is what gives a field its 3:1
   outline against the page. Guest-card fields (.wc) keep the guest's look. */
.workbench-shell :is(input:not([type="checkbox"], [type="radio"], [type="color"], [type="file"], [type="range"], [type="hidden"]), select, textarea):not(.wc *, .choice-input) {
  min-height: 46px;
  border-radius: 10px;
  box-shadow: inset 0 1px 2px var(--raise-1);
  transition: border-color var(--ds-motion) var(--ds-ease), background-color var(--ds-motion) var(--ds-ease);
}
.workbench-shell :is(input:not([type="checkbox"], [type="radio"], [type="color"], [type="file"], [type="range"], [type="hidden"]), select, textarea):not(.wc *, .choice-input):hover:not(:disabled, :focus) {
  border-color: var(--muted);
}
.workbench-shell textarea:not(.wc *) { line-height: 1.5; }

/* A select draws its own arrow, inset from the edge, in the muted ink of the
   mode it is in -- two gradients rather than an image, so it follows night
   mode without a second asset. */
.workbench-shell select:not([multiple], .wc *) {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 42px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 21px) calc(50% + 1px), calc(100% - 16px) calc(50% + 1px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  text-overflow: ellipsis;
}

/* Money is typed after a euro sign that is already there, in tabular figures
   so a column of prices lines up. */
.money-field { position: relative; display: block; }
.money-field::before {
  content: "€";
  position: absolute;
  top: 50%;
  left: 14px;
  z-index: 1;
  color: var(--muted);
  font-weight: 500;
  pointer-events: none;
  transform: translateY(-50%);
}
.workbench-shell .money-field > input { padding-left: 32px; font-variant-numeric: tabular-nums; }

.workbench-shell :is(input[type="checkbox"], input[type="radio"]) { accent-color: var(--action); }

/* The file control: the browser's grey button becomes one of ours, in a
   dashed drop zone. The words beside it stay the browser's own, in the
   guest's language. */
.workbench-shell input[type="file"] {
  min-height: 52px;
  padding: 6px;
  color: var(--muted);
  background: var(--surface-muted);
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  font-size: 0.85rem;
  cursor: pointer;
}
.workbench-shell input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 9px 14px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

/* Every hint the same quiet size and colour. The grape hint was the one in
   full ink, and read like a label. */
.workbench-shell :is(.field-hint, label > small) { color: var(--muted); font-size: 0.8rem; font-weight: 400; line-height: 1.5; }

/* --- Disclosures ------------------------------------------------------------
   The browser's black triangle, eight kinds of it, becomes one chevron after
   the words, turning when it opens. Panels that are cards put it at the edge. */
.workbench-shell :is(.optional-fields, .list-tools, .category-tool, .dish-advanced, details.style-panel, .wine-add-panel, .publish-plan) > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  list-style: none;
  cursor: pointer;
}
.workbench-shell :is(.optional-fields, .list-tools, .category-tool, .dish-advanced, details.style-panel, .wine-add-panel, .publish-plan) > summary::-webkit-details-marker { display: none; }
.workbench-shell :is(.optional-fields, .list-tools, .category-tool, .dish-advanced, details.style-panel, .wine-add-panel, .publish-plan) > summary::after {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform var(--ds-motion) var(--ds-ease);
}
.workbench-shell :is(.optional-fields, .list-tools, .category-tool, .dish-advanced, details.style-panel, .wine-add-panel, .publish-plan)[open] > summary::after {
  transform: translateY(2px) rotate(-135deg);
}
.workbench-shell :is(details.style-panel, .wine-add-panel) > summary { justify-content: space-between; min-height: 44px; }
.workbench-shell details.style-panel:not([open]) { padding-block: 12px; }
.workbench-shell .optional-fields > summary { color: var(--accent); font-weight: 500; }
/* A title is a title: "NAAM EN THEMA" was the only one in capitals. */
.workbench-shell .style-fine > summary { color: var(--text); font-size: 1rem; font-weight: 550; letter-spacing: 0; text-transform: none; }

/* Printing and adding a category sit together under the list as two quiet
   rows, not two islands with a screen of air between them. */
.workbench-shell .list-tools { margin-block: 0; padding-block: 2px; border-top: 1px solid var(--line); }
.workbench-shell .list-tools:first-of-type { margin-top: 24px; }
.workbench-shell .list-tools:last-of-type { margin-bottom: 32px; border-bottom: 1px solid var(--line); }
.workbench-shell .list-tools > summary { color: var(--text); font-weight: 500; }
.workbench-shell .list-tools[open] { padding-bottom: 16px; }

/* --- Headings and weights -------------------------------------------------- */
/* A section title in muted grey read as disabled. */
.workbench-shell .style-panel > h2 { color: var(--text); }
/* 750 and 800 have no cut of their own in this face; the browser drew them
   with its heaviest, which smears at eleven pixels. */
.workbench-shell :is(.dish-step legend span, .dish-live-label, .dish-live-footer > span, .dish-advanced > summary) { font-weight: 650; }

/* --- Placement -------------------------------------------------------------- */
/* The dish count sat against the edge of the content, out of line with the
   heading above it and the list below. */
.workbench-shell .list-summary { margin: 0 var(--content-gutter) 4px; }


/* The sommelier setting and its save bar are one card: the same line around
   both, the bar a shade darker as its footer. */
.workbench-shell .sommelier-settings-form .style-bar { border-color: var(--line); background: var(--surface-muted); }

/* A form's save line: the choice takes what it needs, not the whole width. */
.wine-entry-save > label { flex: 0 1 420px; }

.account-signout { margin: 8px var(--content-gutter) 40px; }

/* A save note is a sentence under the buttons, not a grey box between them. */
.workbench-shell .wine-save-actions .permission-note { padding: 0; background: none; font-size: 0.8rem; }

/* --- The wine row ----------------------------------------------------------
   The card spans the switch's column too, and the switch sits over its top
   right corner. Before, the open card was held to the middle column and its
   form got two thirds of a phone. */
@media screen {
  .wine-sheet .record-row:has(> .record-switch) > .record-card { grid-column: 2 / -1; grid-row: 1; }
  .wine-sheet .record-row > .record-switch { position: relative; z-index: 1; grid-column: -2; grid-row: 1; }
  .wine-sheet .record-row:has(> .record-switch) .record-card > summary { padding-right: 76px; }
}

@media screen and (max-width: 680px) {
  .wine-sheet .record-row:has(> .record-switch) .record-card > summary { padding-right: 62px; }
  /* Prices on one line: "Fles € 32,00   Glas € 8,50". Stacked label over
     value, they made every wine two lines taller than it has to be. */
  .wine-sheet .record-prices { gap: 18px; padding-top: 6px; }
  .wine-sheet .record-prices > span { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
  .wine-sheet .record-prices small { font-size: 0.78rem; }

  /* Saving: the main action across the width, the two alternatives side by
     side under it, the note last. */
  .wine-sheet .wine-save-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .wine-sheet .wine-save-actions { grid-template-columns: 1fr; }
  .wine-sheet .wine-save-actions > * { margin: 0; }
  /* Cancelling is the way out, not a third choice: a quiet line under the two
     ways to save. */
  .wine-sheet .wine-save-actions [data-cancel-wine] { order: 1; min-height: 40px; color: var(--muted); background: none; border-color: transparent; font-weight: 500; }
  .wine-sheet .wine-save-actions .permission-note { order: 2; }

  /* Page actions: one per line, the main one first, never wrapped mid-label. */
  .page-intro-actions { flex-direction: column; align-items: stretch; }
  .page-intro-actions > .primary-button { order: -1; }
  .page-intro-actions > a { flex: none; white-space: nowrap; }
  /* A page with one action has it straight in the header: the same full width. */
  .page-intro > .primary-button { width: 100%; }

  /* The dish steps: numbers for the steps you are not on, the name only for
     the one you are. Five names did not fit and ran off the screen. */
  .dish-flow-progress { overflow: visible; }
  .dish-flow-progress ol { display: flex; min-width: 0; }
  .dish-flow-progress li { flex: 0 0 auto; }
  .dish-flow-progress li.is-current { flex: 1 1 auto; }
  .dish-flow-progress li:not(.is-current) :is(button, [data-dish-progress-label]) { font-size: 0; gap: 0; justify-content: center; padding-inline: 12px; }
  /* The form first, its summary after it: the first field is what the screen
     is for. */
  .dish-live-card { grid-row: auto; }

  /* The sticker first, then what to do with it. */
  .qr-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qr-actions > .primary-button { grid-column: 1 / -1; }
  .qr-actions button { min-width: 0; padding-inline: 8px; font-size: 0.8rem; white-space: nowrap; }
}

/* --- Filters on the wine list -----------------------------------------------
   The filter button stays where it was tapped. Opened, it used to take a row
   of its own: the button jumped under the search box, the box grew, and the
   whole list dropped by the height of the panel. Now the panel drops over the
   list from under the search row, and nothing on the page moves. */
.wine-workspace .inventory-tools { position: relative; }
.wine-workspace .inventory-filters,
.wine-workspace .inventory-filters[open] { position: static; grid-column: 2; grid-row: 1; align-self: end; }
.wine-workspace .inventory-filters[open] > .inventory-filter-fields {
  position: absolute;
  z-index: 15;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  margin: 0;
  box-shadow: var(--shadow);
  animation: filters-drop var(--ds-motion) var(--ds-ease) both;
}
@keyframes filters-drop {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

/* --- Under the guest card --------------------------------------------------
   The two things to say about the card sit under it, flush with its edge: a
   plain button to confirm it, and a link to correct it. The confirm form drew
   a line of its own above it, indented, which read as a stray rule. */
.wine-sheet .wine-preview .confirm-form { margin: 16px 0 0; padding: 0; border: 0; }
.wine-sheet .wine-preview .confirm-form button {
  min-height: 42px;
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
}
.wine-sheet .wine-preview .correction-link { margin: 12px 0 0; padding: 0; font-size: 0.85rem; }
.wine-sheet .wine-preview .correction-link a { color: var(--accent); text-underline-offset: 3px; }
.wine-sheet .wine-preview .wc-frame { max-width: 100%; margin-top: 4px; }

@media screen and (max-width: 680px) {
  /* On a phone the confirm button takes the full width, like every other
     action in the card; the correction link follows under it. */
  .wine-sheet .wine-preview[open] { padding-bottom: 16px; }
  .wine-sheet .wine-preview .confirm-form button { width: 100%; }
}

/* The step count sat on the fieldset's border, where a legend is drawn by
   default; floated, the legend is an ordinary first line inside the card. */
.dish-step > legend { float: left; margin-bottom: 18px; }
.dish-step > legend + * { clear: both; }

@media (prefers-reduced-motion: reduce) {
  .workbench-shell :is(input, select, textarea),
  .workbench-shell details > summary::after { transition: none; }
  .wine-workspace .inventory-filters[open] > .inventory-filter-fields { animation: none; }
}

/* ==========================================================================
 * Unified authentication and in-rail appearance controls
 * ====================================================================== */

body.entry-shell::after,
body.login-shell::after {
  content: none;
}

.entry-main,
.login-main {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  place-items: center;
  padding: clamp(18px, 4vw, 44px);
  background: var(--ds-bg);
}

.entry-main > [data-region="page"] {
  display: grid;
  width: 100%;
  place-items: center;
}

.auth-card {
  position: relative;
  z-index: 1;
  width: min(100%, 440px);
  padding: clamp(26px, 5vw, 42px);
  color: var(--ds-text);
  background: var(--ds-surface);
  border: 1px solid var(--ds-line);
  border-top: 3px solid var(--ds-brass);
  border-radius: var(--ds-radius-lg);
  box-shadow: var(--ds-shadow);
}

.auth-card--wide {
  width: min(100%, 680px);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 30px;
}

.auth-brand .brand-mark {
  width: 40px;
  height: 40px;
  background: var(--ds-bordeaux);
}

.auth-brand > span:last-child {
  display: grid;
  gap: 1px;
}

.auth-brand strong {
  color: var(--ds-text-strong);
  font-family: var(--ds-font-display);
  font-size: 1.32rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1;
}

.auth-brand small {
  color: var(--ds-text-muted);
  font-family: var(--ds-font-body);
  font-size: var(--ds-text-2xs);
  line-height: 1.35;
}

.auth-card h1 {
  margin: 0;
  color: var(--ds-text-strong);
  font-family: var(--ds-font-display);
  font-size: clamp(1.8rem, 5vw, 2.3rem);
  font-weight: 400;
  letter-spacing: var(--ds-track-tight);
  line-height: 1.08;
}

.auth-intro {
  max-width: 58ch;
  margin: 10px 0 0;
  color: var(--ds-text-muted);
  line-height: 1.6;
}

.auth-step {
  margin: 0 0 8px;
  color: var(--ds-accent);
  font-size: var(--ds-text-xs);
  font-weight: 600;
}

.auth-form {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 7px;
  margin-top: 24px;
}

.auth-field {
  display: block;
  color: var(--ds-text);
  font-size: var(--ds-text-sm);
  font-weight: 600;
}

.auth-form > input:not([type="hidden"]) {
  position: relative;
  width: 100%;
  min-height: 46px;
  margin: 0 0 8px;
  padding: 10px 12px;
  color: var(--ds-text);
  caret-color: var(--ds-action);
  background: var(--ds-surface);
  border: 1px solid var(--ds-line-strong);
  border-radius: var(--ds-radius);
  pointer-events: auto;
}

.auth-form > input:not([type="hidden"]):hover {
  border-color: var(--ds-line-accent);
}

.auth-form > input:not([type="hidden"]):focus {
  border-color: var(--ds-action);
  outline: 3px solid var(--ds-accent-soft);
  outline-offset: 1px;
}

.auth-submit {
  display: inline-flex;
  width: 100%;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  margin-top: 5px;
  padding: 10px 16px;
  color: var(--ds-text-on-accent);
  background: var(--ds-action);
  border: 1px solid var(--ds-action);
  border-radius: var(--ds-radius);
  cursor: pointer;
  font-size: var(--ds-text-sm);
  font-weight: 600;
}

.auth-submit:hover {
  background: var(--ds-action-hover);
  border-color: var(--ds-action-hover);
}

.auth-submit:focus-visible {
  outline: 3px solid var(--ds-focus);
  outline-offset: 3px;
}

.auth-checkbox {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 2px 0 7px;
  color: var(--ds-text-muted);
  font-size: var(--ds-text-sm);
  font-weight: 500;
}

.auth-checkbox input {
  width: 18px;
  min-height: 18px;
  margin: 0;
  accent-color: var(--ds-action);
}

.auth-error,
.auth-card .notice-error {
  margin: 20px 0 0;
  padding: 11px 13px;
  color: var(--ds-danger-ink);
  background: var(--ds-danger-bg);
  border: 1px solid color-mix(in srgb, var(--ds-danger) 48%, transparent);
  border-radius: var(--ds-radius);
}

.auth-card .notice-error p {
  margin: 0;
}

.auth-card .notice-error p + p {
  margin-top: 5px;
}

.auth-note {
  margin: 22px 0 0;
  color: var(--ds-text-muted);
  font-size: var(--ds-text-xs);
  line-height: 1.55;
}

.auth-secret {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 10px 14px;
  margin: 24px 0 0;
  padding: 16px;
  color: var(--ds-text);
  background: var(--ds-surface-2);
  border: 1px solid var(--ds-line);
  border-left: 3px solid var(--ds-accent);
  border-radius: var(--ds-radius);
}

.auth-secret > span {
  color: var(--ds-text-muted);
  font-size: var(--ds-text-xs);
  font-weight: 600;
}

.auth-secret details {
  grid-column: 1 / -1;
}

.auth-secret code {
  overflow-wrap: anywhere;
}

.auth-card .recovery-grid,
.auth-card .owner-recovery-codes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
  margin: 24px 0 0;
  padding: 16px 16px 16px 34px;
  background: var(--ds-surface-2);
  border: 1px solid var(--ds-line);
  border-radius: var(--ds-radius);
}

.ledger-rail,
.cellar-rail {
  overflow-y: auto;
}

.rail-mode {
  margin-top: auto;
  padding: 14px 4px 12px;
  border-top: 1px solid var(--ds-rail-line);
}

.rail-mode__label {
  display: block;
  margin: 0 6px 8px;
  color: var(--ds-rail-text-dim);
  font-size: var(--ds-text-2xs);
  font-weight: 600;
}

.rail-mode .mode-switch {
  position: static;
  z-index: auto;
  display: grid;
  width: 100%;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 0;
  opacity: 1;
}

.rail-mode .mode-switch button {
  display: grid;
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 43px;
  place-items: center;
  gap: 1px;
  padding: 5px 2px;
  color: var(--ds-rail-text-dim);
  background: var(--ds-rail-raise-1);
  border: 1px solid transparent;
  border-radius: var(--ds-radius);
  box-shadow: none;
  font-family: var(--ds-font-body);
  font-size: var(--ds-text-3xs);
  line-height: 1.15;
}

.rail-mode .mode-switch button > span:first-child {
  color: var(--ds-rail-accent);
  font-family: var(--ds-font-mono);
  font-size: 0.72rem;
}

.rail-mode .mode-switch button:hover {
  color: var(--ds-rail-text);
  background: var(--ds-rail-raise-2);
  transform: none;
}

.rail-mode .mode-switch button[aria-pressed="true"] {
  color: var(--ds-rail-text);
  background: var(--ds-rail-raise-2);
  border-color: var(--ds-rail-accent);
  box-shadow: inset 0 -2px 0 var(--ds-rail-accent);
}

.rail-mode + .account-link,
.rail-mode + .rail-user {
  margin-top: 0;
}

.rail-mode + .rail-user {
  padding-top: 8px;
  border-top: 0;
}

@media (max-width: 560px) {
  .entry-main,
  .login-main {
    align-items: start;
    padding: 12px;
  }

  .auth-card {
    padding: 24px 20px;
  }

  .auth-secret {
    grid-template-columns: 1fr;
  }

  .auth-secret details {
    grid-column: auto;
  }

  .auth-card .recovery-grid,
  .auth-card .owner-recovery-codes {
    grid-template-columns: 1fr;
  }
}
}

/* ==========================================================================
 * DigiSomm — Porcelain and wine
 *
 * The brand. Unlayered, so it wins over everything in `legacy` above.
 *
 * One idea carries it: the drop from the logo marks where you are. Everything
 * else stays quiet -- white sheets on porcelain drawn with one hairline, no
 * shadow under things that do not float, DigiSomm Display for titles and figures only,
 * Commissioner for all that is read and typed, and the logo's wine red for
 * actions, focus and the current place and nothing else.
 * ======================================================================== */

/* --- Ground ---------------------------------------------------------------- */

body.workbench-shell,
body.entry-shell {
  color: var(--ds-text);
  background: var(--ds-bg);
  font-family: var(--ds-font-body);
  font-size: var(--ds-text-base);
  line-height: 1.55;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Not inside the house-style phone (.house-style): it draws the guest app in
   the restaurant's own ink and type, and this heading rule turned its titles
   this panel's near-black. */
.workbench-shell :is(h1, h2, h3, h4):not(.house-style *) { color: var(--ds-text-strong); text-wrap: balance; }
.workbench-shell :is(p, li, dd):not(.house-style *) { text-wrap: pretty; }
.workbench-shell :is(button, input, select, textarea) { font-family: inherit; }
.workbench-shell :focus-visible { outline: 2px solid var(--ds-focus); outline-offset: 2px; }
.workbench-shell ::selection { background: var(--ds-accent-soft); color: var(--ds-text-strong); }

/* Figures that are read as figures: prices, counts, percentages. */
.workbench-shell :is(.record-prices, .count, .colour-count, .stat-value, .rank-count, .money-field input, .wc-prices) {
  font-variant-numeric: tabular-nums;
}

/* The drop, drawn in CSS from a square with one sharp corner turned upward.
   Used only to say "you are here". */
.workbench-shell :is(.ledger-nav a[aria-current="page"], .tab[aria-current="page"], .tab.tab-holds-current, .account-link[aria-current="page"])::before {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  background: var(--ds-accent);
  border-radius: 50% 0 50% 50%;
  transform: rotate(-45deg);
}

/* --- The rail: a column on a wide screen ---------------------------------- */

@media (min-width: 981px) {
  body.workbench-shell { --rail-width: 252px; }

  body.workbench-shell .ledger-rail {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: var(--rail-width);
    height: 100dvh;
    padding: 22px 14px 16px;
    overflow-y: auto;
    color: var(--ds-rail-text);
    background: var(--ds-rail);
    border-right: 1px solid var(--ds-line);
    box-shadow: none;
    transform: none;
  }

  body.workbench-shell .workbench-main { margin-left: var(--rail-width); }
  body.workbench-shell .tabbar { display: none; }
  body.workbench-shell .rail-close { display: none; }
}

.workbench-shell .ledger-rail .brand {
  display: block;
  min-height: 0;
  margin: 0 0 18px;
  padding: 4px 10px;
  background: none;
}
.workbench-shell .ledger-rail .brand img { display: block; width: 150px; max-width: 100%; height: auto; }
.workbench-shell .ledger-rail .brand img.tenant-logo-inverse { display: none; }
[data-ds-mode="night"] .workbench-shell .ledger-rail .brand img.tenant-logo-primary { display: none; }
[data-ds-mode="night"] .workbench-shell .ledger-rail .brand img.tenant-logo-inverse { display: block; }

/* The restaurant being worked on: a quiet label, a switch when there are more. */
.workbench-shell .ledger-rail .tenant-marker {
  display: grid;
  gap: 1px;
  margin: 0 0 18px;
  padding: 10px 12px;
  color: var(--ds-text);
  background: var(--ds-surface-2);
  border: 0;
  border-radius: var(--ds-radius);
  list-style: none;
}
.workbench-shell .ledger-rail .tenant-marker span { color: var(--ds-text-muted); font-size: var(--ds-text-3xs); font-weight: 500; }
.workbench-shell .ledger-rail .tenant-marker strong { font-size: var(--ds-text-sm); font-weight: 600; overflow-wrap: anywhere; }
.workbench-shell .tenant-switch > summary { cursor: pointer; }
.workbench-shell .tenant-switch > summary::-webkit-details-marker { display: none; }
.workbench-shell .tenant-choices { display: grid; gap: 4px; margin: -10px 0 18px; }
.workbench-shell .tenant-choices button {
  display: grid;
  gap: 1px;
  padding: 9px 12px;
  color: var(--ds-text);
  text-align: left;
  background: none;
  border: 1px solid var(--ds-line);
  border-radius: var(--ds-radius);
  cursor: pointer;
}
.workbench-shell .tenant-choices button:hover { border-color: var(--ds-accent); }
.workbench-shell .tenant-choices small { color: var(--ds-text-muted); font-size: var(--ds-text-3xs); }

.workbench-shell .ledger-nav { display: grid; gap: 2px; margin: 0; }
.workbench-shell .ledger-nav + .ledger-nav {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--ds-line);
}
.workbench-shell .ledger-nav a,
.workbench-shell .account-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 10px 12px 10px 26px;
  color: var(--ds-text);
  font-size: var(--ds-text-sm);
  font-weight: 500;
  text-decoration: none;
  background: none;
  border-radius: var(--ds-radius);
  box-shadow: none;
  transition: background-color var(--ds-motion-fast) var(--ds-ease), color var(--ds-motion-fast) var(--ds-ease);
}
.workbench-shell .ledger-nav a .ui-icon,
.workbench-shell .account-link .ui-icon { flex: none; width: 20px; height: 20px; color: var(--ds-text-muted); }
.workbench-shell .ledger-nav a:hover,
.workbench-shell .account-link:hover { background: var(--ds-surface-2); }
.workbench-shell .ledger-nav a[aria-current="page"],
.workbench-shell .account-link[aria-current="page"] { color: var(--ds-accent); font-weight: 600; background: none; }
.workbench-shell .ledger-nav a[aria-current="page"] .ui-icon,
.workbench-shell .account-link[aria-current="page"] .ui-icon { color: currentColor; }
.workbench-shell :is(.ledger-nav a, .account-link)[aria-current="page"]::before { left: 8px; top: calc(50% - 4px); width: 8px; height: 8px; }

.workbench-shell .account-link { margin-top: auto; padding-block: 12px; border-top: 1px solid var(--ds-line); border-radius: 0 0 var(--ds-radius) var(--ds-radius); }
.workbench-shell .account-link > span { display: grid; min-width: 0; }
.workbench-shell .account-link strong { grid-column: auto; font-weight: 600; overflow-wrap: anywhere; }
.workbench-shell .account-link small { grid-column: auto; }
.workbench-shell .account-link small { color: var(--ds-text-muted); font-size: var(--ds-text-3xs); font-weight: 400; }

/* --- The top bar ------------------------------------------------------------ */

.workbench-shell .topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
  padding: 10px var(--ds-gutter);
  background: transparent;
  border-bottom: 0;
}
.workbench-shell .topbar-home {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--ds-text-strong);
  text-decoration: none;
}
.workbench-shell .topbar-home strong { overflow: hidden; font-size: var(--ds-text-base); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.workbench-shell .topbar-mark { flex: none; width: 22px; height: 22px; }
.workbench-shell .topbar-actions { display: flex; flex: none; align-items: center; gap: 8px; }
.workbench-shell .topbar .preview-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 8px 14px;
  color: var(--ds-accent);
  font-size: var(--ds-text-sm);
  font-weight: 600;
  text-decoration: none;
  background: var(--ds-surface);
  border: 1px solid var(--ds-line);
  border-radius: var(--ds-radius-pill);
}
.workbench-shell .topbar .preview-link:hover { border-color: var(--ds-accent); }
.workbench-shell .topbar .preview-link .ui-icon { width: 15px; height: 15px; }
.workbench-shell .install-button { min-height: 40px; padding: 8px 14px; color: var(--ds-text); background: none; border: 1px solid var(--ds-line); border-radius: var(--ds-radius-pill); font-weight: 600; }

@media (min-width: 981px) {
  /* The rail already names the restaurant; the bar keeps only its action. */
  .workbench-shell .topbar { justify-content: flex-end; min-height: 64px; }
  .workbench-shell .topbar-home { display: none; }
}

/* --- A phone: bar on top, tabs below, the rest in a sheet -------------------- */

.tabbar { display: none; }

@media (max-width: 980px) {
  body.workbench-shell .workbench-main {
    margin-left: 0;
    padding-bottom: calc(var(--ds-tabbar-height) + env(safe-area-inset-bottom, 0px) + 40px);
  }

  .workbench-shell .topbar {
    position: sticky;
    top: 0;
    z-index: 25;
    min-height: 56px;
    padding-top: calc(8px + env(safe-area-inset-top, 0px));
    padding-bottom: 8px;
    background: var(--ds-surface-veil);
    border-bottom: 1px solid var(--ds-line);
    -webkit-backdrop-filter: saturate(1.5) blur(14px);
    backdrop-filter: saturate(1.5) blur(14px);
  }
  .workbench-shell .topbar .preview-link { min-height: 36px; padding: 6px 12px; font-size: var(--ds-text-2xs); }

  /* A floating capsule rather than a strip nailed to the edge: it sits above
     the home indicator, the page shows around it, and a pill slides to
     whatever was just tapped -- before the page has even arrived, so the
     thumb gets its answer at once. */
  .workbench-shell .tabbar {
    position: fixed;
    right: max(10px, env(safe-area-inset-right, 0px));
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    left: max(10px, env(safe-area-inset-left, 0px));
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    min-height: var(--ds-tabbar-height);
    padding: 5px;
    /* Liquid glass (9 October 2026, in place of a red glow):
       the page shows through, blurred and a touch more saturated; a lit top
       edge and a soft shade give it thickness; nothing in it is tinted. */
    background: var(--ds-glass-fill);
    border: 1px solid var(--ds-glass-edge);
    border-radius: 26px;
    box-shadow:
      inset 0 1px 0 var(--ds-glass-lens-edge),
      inset 0 -1px 0 var(--ds-glass-shade),
      0 1px 2px var(--ds-raise-2),
      0 18px 40px -16px var(--ds-raise-3);
    -webkit-backdrop-filter: blur(24px) saturate(1.8);
    backdrop-filter: blur(24px) saturate(1.8);
  }
  /* The current tab sits under a lens: clearer glass with a highlight along
     its top, as light on a curved surface, and a faint shadow beneath. */
  .workbench-shell .tab-indicator {
    position: absolute;
    top: 5px;
    bottom: 5px;
    left: 5px;
    width: calc((100% - 10px) / 5);
    overflow: hidden;
    background: color-mix(in srgb, var(--ds-accent) 11%, var(--ds-glass-lens));
    border-radius: 21px;
    box-shadow:
      inset 0 1px 0 var(--ds-glass-lens-edge),
      inset 0 0 0 1px var(--ds-glass-edge),
      inset 0 -2px 4px var(--ds-glass-shade),
      0 8px 18px -10px color-mix(in srgb, var(--ds-accent) 55%, transparent),
      0 3px 10px -4px var(--ds-glass-shade);
    pointer-events: none;
    transform: translateX(calc(var(--slot, 0) * 100%));
    /* A small overshoot, as a finger-flicked thing would. */
    transition: transform 460ms cubic-bezier(0.34, 1.4, 0.5, 1), opacity 180ms linear;
  }
  .workbench-shell .tab-indicator::after {
    content: "";
    position: absolute;
    inset: 2px 4px auto;
    height: 46%;
    background: linear-gradient(180deg, var(--ds-glass-lens-edge), transparent);
    border-radius: 19px 19px 40% 40%;
    opacity: 0.7;
  }
  .workbench-shell .tabbar[data-active="0"] .tab-indicator { --slot: 0; }
  .workbench-shell .tabbar[data-active="1"] .tab-indicator { --slot: 1; }
  .workbench-shell .tabbar[data-active="2"] .tab-indicator { --slot: 2; }
  .workbench-shell .tabbar[data-active="3"] .tab-indicator { --slot: 3; }
  .workbench-shell .tabbar[data-active="4"] .tab-indicator { --slot: 4; }
  .workbench-shell .tabbar[data-active="none"] .tab-indicator { opacity: 0; }
  .workbench-shell .tab {
    position: relative;
    z-index: 1;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 3px;
    min-width: 0;
    min-height: 54px;
    padding: 6px 2px 5px;
    color: var(--ds-text-muted);
    font: inherit;
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1.1;
    text-decoration: none;
    background: none;
    border: 0;
    border-radius: 21px;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
    transition: color 200ms var(--ds-ease);
  }
  .workbench-shell .tab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .workbench-shell .tab .ui-icon {
    width: 23px;
    height: 23px;
    stroke-width: 1.5;
    transition: transform 360ms cubic-bezier(0.34, 1.5, 0.5, 1), stroke-width 200ms linear;
  }
  /* The press: the icon gives under the thumb and springs back. */
  .workbench-shell .tab:active .ui-icon { transform: scale(0.84); transition-duration: 90ms; }
  /* Current follows the indicator's slot, so colour and pill move together,
     on the tap rather than on the server's reply. */
  .workbench-shell .tabbar[data-active="0"] .tab[data-tab="0"],
  .workbench-shell .tabbar[data-active="1"] .tab[data-tab="1"],
  .workbench-shell .tabbar[data-active="2"] .tab[data-tab="2"],
  .workbench-shell .tabbar[data-active="3"] .tab[data-tab="3"],
  .workbench-shell .tabbar[data-active="4"] .tab[data-tab="4"] { color: var(--ds-accent); font-weight: 600; }
  .workbench-shell .tabbar[data-active="0"] .tab[data-tab="0"] .ui-icon,
  .workbench-shell .tabbar[data-active="1"] .tab[data-tab="1"] .ui-icon,
  .workbench-shell .tabbar[data-active="2"] .tab[data-tab="2"] .ui-icon,
  .workbench-shell .tabbar[data-active="3"] .tab[data-tab="3"] .ui-icon,
  .workbench-shell .tabbar[data-active="4"] .tab[data-tab="4"] .ui-icon { stroke-width: 1.8; transform: translateY(-1px) scale(1.06); }
  /* The pill says where you are; the drop stays the rail's. */
  .workbench-shell .tab::before { content: none !important; }

  /* "Meer": the rail rises as a sheet above the tab bar. */
  .workbench-shell .ledger-rail .brand,
  .workbench-shell .ledger-rail .ledger-nav-daily,
  .workbench-shell .ledger-rail .rail-close { display: none; }
  .workbench-shell .ledger-rail .ledger-nav + .ledger-nav { margin-top: 0; padding-top: 0; border-top: 0; }
  html[data-ui-ready] body.workbench-shell .ledger-rail {
    position: fixed;
    inset: auto 10px calc(var(--ds-tabbar-height) + env(safe-area-inset-bottom, 0px) + 20px) 10px;
    z-index: 40;
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: auto;
    height: auto;
    max-height: min(74dvh, 560px);
    padding: 12px;
    overflow-y: auto;
    overscroll-behavior: contain;
    color: var(--ds-text);
    background: var(--ds-glass-fill);
    border: 1px solid var(--ds-glass-edge);
    border-radius: 22px;
    box-shadow: inset 0 1px 0 var(--ds-glass-lens-edge), 0 18px 40px -16px var(--ds-raise-3);
    -webkit-backdrop-filter: blur(24px) saturate(1.8);
    backdrop-filter: blur(24px) saturate(1.8);
    box-shadow: var(--ds-shadow);
    opacity: 0;
    transform: translateY(calc(100% + 96px));
    transition: transform var(--ds-motion-slow) var(--ds-ease), opacity var(--ds-motion) linear;
  }
  html[data-ui-ready] body.workbench-shell.rail-open .ledger-rail { opacity: 1; transform: none; }
  .workbench-shell .ledger-rail .tenant-marker { margin-bottom: 8px; }
  .workbench-shell .ledger-rail .account-link { margin-top: 8px; border-radius: var(--ds-radius); }
  .workbench-shell.rail-open .workbench-main::before { background: var(--ds-scrim); }

  /* What sits at the bottom of the page sits above the tab bar. */
  .workbench-shell .toast-rail { bottom: calc(var(--ds-tabbar-height) + env(safe-area-inset-bottom, 0px) + 22px); }
  html[data-ui-ready] .workbench-shell .wine-workspace .bulk-bar { bottom: calc(var(--ds-tabbar-height) + env(safe-area-inset-bottom, 0px) + 20px); }
  html[data-ui-ready] body.workbench-shell:has(.bulk-bar:not([hidden])) .toast-rail { bottom: calc(var(--ds-tabbar-height) + env(safe-area-inset-bottom, 0px) + 160px); }
}

@media (prefers-reduced-motion: reduce) {
  html[data-ui-ready] body.workbench-shell .ledger-rail { transition: none; }
  .workbench-shell .tab-indicator, .workbench-shell .tab .ui-icon { transition: none; }
}

/* --- Touch, not a cursor ---------------------------------------------------------
   No grey or blue flash where a finger lands: every control answers the press
   itself. And no focus ring for a finger or a mouse (html[data-modality],
   set in app.js); a keyboard brings them back. Text fields keep their own
   focus style either way -- there you need to see where you type. */

.workbench-shell, .entry-shell { -webkit-tap-highlight-color: transparent; }
html[data-modality="pointer"] :is(.workbench-shell, .entry-shell) :focus-visible:not(input, select, textarea) { outline: none; }
html[data-modality="pointer"] :is(.workbench-shell, .entry-shell) :focus-visible:not(input, select, textarea) * { outline: none; }
/* Where focus is only moved to be announced (a new screen's heading). */
:is(.workbench-shell, .entry-shell) [tabindex="-1"]:focus { outline: none; }

/* --- Page heading -------------------------------------------------------------- */

.workbench-shell [data-region="page"] { max-width: 1240px; }

.workbench-shell .page-intro {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px 24px;
  margin: 0;
  padding: 18px var(--ds-gutter) 22px;
}
.workbench-shell .page-intro h1 {
  margin: 0;
  font-family: var(--ds-font-display);
  font-size: var(--ds-text-2xl);
  font-weight: 500;
  letter-spacing: -0.012em;
  line-height: 1.04;
}
.workbench-shell .page-intro p { max-width: 62ch; margin: 8px 0 0; color: var(--ds-text-muted); font-size: var(--ds-text-base); }
.workbench-shell .page-intro-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.workbench-shell .back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  color: var(--ds-text-muted);
  font-size: var(--ds-text-sm);
  font-weight: 500;
  text-decoration: none;
}
.workbench-shell .back-link:hover { color: var(--ds-accent); }

@media (min-width: 981px) {
  .workbench-shell .page-intro { padding-top: 8px; padding-bottom: 28px; }
}

/* Section titles inside a page: the body face, set firmly. */
.workbench-shell :is(.panel, .style-panel, .record-card, .qr-action-panel, .dish-step) > h2,
.workbench-shell .panel h2,
.workbench-shell .style-panel > h2 {
  margin: 0 0 14px;
  color: var(--ds-text-strong);
  font-family: var(--ds-font-body);
  font-size: var(--ds-text-md);
  font-weight: 600;
  letter-spacing: -0.005em;
  text-transform: none;
}

/* --- Buttons -------------------------------------------------------------------
   Three kinds and no more. The action in wine, with the faintest light along
   its top edge like the rim of a glass; the alternative in white with a line;
   the destructive one in its own red, never the brand's. */

.workbench-shell :is(.primary-button, .secondary-button, .danger-button, .inline-search button, .search-results button, .auth-submit) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  font-family: var(--ds-font-body);
  font-size: var(--ds-text-sm);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.005em;
  text-decoration: none;
  border-radius: var(--ds-radius);
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color var(--ds-motion-fast) var(--ds-ease), border-color var(--ds-motion-fast) var(--ds-ease), color var(--ds-motion-fast) var(--ds-ease), transform var(--ds-motion-fast) var(--ds-ease);
}
.workbench-shell :is(.primary-button, .inline-search button, .search-results button, .auth-submit) {
  color: var(--ds-text-on-accent);
  background: var(--ds-action);
  border: 1px solid transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 1px 2px rgba(79, 15, 29, 0.22);
}
.workbench-shell :is(.primary-button, .inline-search button, .search-results button, .auth-submit):hover { background: var(--ds-action-hover); }
.workbench-shell :is(.secondary-button, .install-button) {
  color: var(--ds-text-strong);
  background: var(--ds-surface);
  border: 1px solid color-mix(in srgb, var(--ds-line-strong) 55%, var(--ds-surface));
  box-shadow: 0 1px 1px var(--ds-raise-1);
}
.workbench-shell .secondary-button:hover { border-color: var(--ds-text-muted); }
.workbench-shell .danger-button {
  color: var(--ds-danger);
  background: var(--ds-surface);
  border: 1px solid color-mix(in srgb, var(--ds-danger) 45%, var(--ds-surface));
}
.workbench-shell .danger-button:hover { background: var(--ds-danger-bg); }
.workbench-shell :is(.primary-button, .secondary-button, .danger-button, .inline-search button, .search-results button, .auth-submit):active { transform: translateY(1px); }
.workbench-shell :is(.primary-button, .secondary-button, .danger-button, .inline-search button, .search-results button, .auth-submit):disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}
.workbench-shell :is(.primary-button, .secondary-button) .ui-icon { width: 18px; height: 18px; }

.workbench-shell .text-link {
  color: var(--ds-accent);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  background: none;
  border: 0;
  cursor: pointer;
}

/* The small "✓ Deze gegevens kloppen"-type actions: a secondary button's
   manners at a smaller size, not a pill of their own. */
.workbench-shell .confirm-form button {
  min-height: 40px;
  padding: 8px 14px;
  color: var(--ds-accent);
  font-size: var(--ds-text-sm);
  font-weight: 600;
  background: var(--ds-surface);
  border: 1px solid color-mix(in srgb, var(--ds-line-strong) 55%, var(--ds-surface));
  border-radius: var(--ds-radius);
}
.workbench-shell .confirm-form button:hover { border-color: var(--ds-accent); background: var(--ds-accent-soft); }

/* --- Fields ----------------------------------------------------------------- */

.workbench-shell label { color: var(--ds-text-strong); font-size: var(--ds-text-xs); font-weight: 500; }
.workbench-shell :is(input:not([type="checkbox"], [type="radio"], [type="color"], [type="file"], [type="range"], [type="hidden"]), select, textarea):not(.wc *, .choice-input) {
  min-height: 46px;
  color: var(--ds-text-strong);
  font-size: var(--ds-text-base);
  background-color: var(--ds-surface);
  border: 1px solid var(--ds-line-strong);
  border-radius: var(--ds-radius);
  box-shadow: inset 0 1px 2px var(--ds-raise-1);
}
.workbench-shell :is(input, select, textarea):not(.wc *, .choice-input):focus { border-color: var(--ds-accent); }
.workbench-shell :is(input, select, textarea):not(.wc *, .choice-input):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--ds-accent) 22%, transparent);
  outline-offset: 0;
}
.workbench-shell :is(input, textarea)::placeholder { color: color-mix(in srgb, var(--ds-text-muted) 80%, var(--ds-surface)); opacity: 1; }
.workbench-shell :is(input, select, textarea):disabled { color: var(--ds-text-muted); background-color: var(--ds-surface-2); }
.workbench-shell :is(input, select, textarea)[aria-invalid="true"] { border-color: var(--ds-danger); }
@media (max-width: 680px) {
  .workbench-shell :is(input, select, textarea) { font-size: 16px; }
}
.workbench-shell :is(.field-hint, .hint, label > small, .style-bar-note, .permission-note) { color: var(--ds-text-muted); font-size: var(--ds-text-2xs); font-weight: 400; }
.workbench-shell .field-error { color: var(--ds-danger); font-size: var(--ds-text-2xs); font-weight: 500; }

/* The switch keeps its shape; its "on" is the wine. */
.workbench-shell .switch[aria-checked="true"] .switch-track { background: var(--ds-action); }
.workbench-shell .switch-track { background: color-mix(in srgb, var(--ds-line-strong) 75%, var(--ds-surface)); }

/* --- Status, notices, counts ------------------------------------------------- */

.workbench-shell .status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 2px 10px;
  color: var(--ds-text-muted);
  font-size: var(--ds-text-3xs);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  background: var(--ds-surface-2);
  border: 0;
  border-radius: var(--ds-radius-pill);
}
.workbench-shell .status-pill.availability-unavailable { color: var(--ds-text-muted); background: var(--ds-surface-2); }
.workbench-shell .status-pill.price-missing { color: var(--ds-warning); background: var(--ds-warning-bg); }
.workbench-shell .status-pill:is(.draft-added, .draft-changed) { color: var(--ds-accent); background: var(--ds-accent-soft); }
.workbench-shell .status-pill.draft-removed { color: var(--ds-danger); background: var(--ds-danger-bg); }
.workbench-shell .status-pill.status-live { color: var(--ds-success); background: var(--ds-success-bg); }

.workbench-shell .count,
.workbench-shell .colour-count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  color: var(--ds-text-muted);
  font-size: var(--ds-text-3xs);
  font-weight: 600;
  background: var(--ds-surface-2);
  border-radius: var(--ds-radius-pill);
}

.workbench-shell .notice {
  margin: 0 var(--ds-gutter) 16px;
  padding: 12px 16px;
  color: var(--ds-text);
  font-size: var(--ds-text-sm);
  background: var(--ds-surface);
  border: 1px solid var(--ds-line);
  border-left: 3px solid var(--ds-text-muted);
  border-radius: var(--ds-radius);
}
.workbench-shell .notice-success { border-left-color: var(--ds-success); }
.workbench-shell .notice-error { color: var(--ds-danger); background: var(--ds-danger-bg); border-color: color-mix(in srgb, var(--ds-danger) 30%, transparent); border-left-color: var(--ds-danger); }

.workbench-shell .toast-rail { right: 20px; bottom: 20px; }
.workbench-shell .toast {
  gap: 14px;
  padding: 12px 14px 12px 16px;
  color: var(--ds-text-strong);
  font-size: var(--ds-text-sm);
  background: var(--ds-surface);
  border: 1px solid var(--ds-line);
  border-radius: 14px;
  box-shadow: var(--ds-shadow);
}
.workbench-shell .toast::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  align-self: center;
  background: var(--ds-success);
  border-radius: 50%;
}
.workbench-shell .toast-error { color: var(--ds-danger); background: var(--ds-surface); border-color: color-mix(in srgb, var(--ds-danger) 35%, var(--ds-line)); }
.workbench-shell .toast-error::before { background: var(--ds-danger); }
.workbench-shell .toast-action {
  min-height: 34px;
  padding: 6px 12px;
  color: var(--ds-accent);
  font-weight: 600;
  background: var(--ds-accent-soft);
  border: 0;
  border-radius: var(--ds-radius-sm);
}
@media (max-width: 700px) {
  .workbench-shell .toast-rail { right: 12px; left: 12px; }
}

.workbench-shell .page-progress {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--ds-accent), transparent) no-repeat;
  background-size: 40% 100%;
}

/* The two layers of the wine list: a segmented control rather than tabs
   with an underline, because the two are one choice. */
.workbench-shell .mode-tabs {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: var(--ds-surface-2);
  border: 0;
  border-radius: 12px;
}
.workbench-shell .mode-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 6px 14px;
  color: var(--ds-text-muted);
  font-size: var(--ds-text-sm);
  font-weight: 500;
  text-decoration: none;
  background: none;
  border: 0;
  border-radius: 9px;
  box-shadow: none;
}
.workbench-shell .mode-tab--active {
  color: var(--ds-text-strong);
  font-weight: 600;
  background: var(--ds-surface);
  box-shadow: 0 1px 2px var(--ds-raise-2), 0 0 0 1px var(--ds-line);
}
.workbench-shell .mode-tab--active .count { color: var(--ds-text-on-accent); background: var(--ds-action); }

/* --- Dialog ---------------------------------------------------------------------- */

.workbench-shell .card-dialog {
  padding: 0;
  color: var(--ds-text);
  background: var(--ds-surface);
  border: 1px solid var(--ds-line);
  border-radius: 20px;
  box-shadow: var(--ds-shadow);
}
.workbench-shell .card-dialog::backdrop { background: var(--ds-scrim); }

@media (max-width: 680px) {
  /* A heading, and its actions under it at full width. */
  .workbench-shell .page-intro { flex-direction: column; align-items: stretch; gap: 16px; }
}

/* A checkbox's label names the wine for a screen reader and is the larger
   target for a thumb; it is never shown as text. */
.workbench-shell .record-pick-label { color: transparent; font-size: 0; }
.workbench-shell .record-pick,
.workbench-shell .check-label input,
.workbench-shell .setting-choice input { accent-color: var(--ds-action); }

/* --- Sheets ------------------------------------------------------------------
   One surface for what is worked on: white, one hairline, the larger radius,
   no shadow -- it does not float. Only what floats (menus, dialogs, toasts,
   the sheet from "Meer") casts one. */

.workbench-shell :is(.panel, .style-panel, .wine-sheet, .dish-step, .qr-action-panel, .home-wine, .home-actions > a, .dish-group, .stat-tile, .record-list > .record-card, .supplier-management .record-card, .wine-add-panel, .publish-bar, .publish-plan, .inventory-empty, .wine-empty, .dish-empty) {
  background: var(--ds-surface);
  border: 1px solid var(--ds-line);
  border-radius: var(--ds-radius-lg);
  box-shadow: none;
}

.workbench-shell .empty-note,
.workbench-shell .inventory-empty { color: var(--ds-text-muted); background: var(--ds-surface-2); border: 0; border-radius: var(--ds-radius); }

/* --- Overview ------------------------------------------------------------------ */

.workbench-shell .home-workspace { gap: 16px; margin: 0 var(--ds-gutter); }
.workbench-shell .home-wine { padding: clamp(20px, 3vw, 30px); }
.workbench-shell .home-section-title { display: flex; align-items: center; gap: 12px; }
.workbench-shell .home-section-title h2 { margin: 0; font-size: var(--ds-text-lg); font-weight: 600; }
.workbench-shell .home-section-title .ui-icon { width: 24px; height: 24px; color: var(--ds-accent); }
.workbench-shell .home-description { margin: 6px 0 0; color: var(--ds-text-muted); }

/* The count of wines on the card is the one figure on this screen that
   matters, so it is set as a figure: DigiSomm Display, large. */
.workbench-shell .home-figure { display: flex; align-items: baseline; gap: 12px; margin: 22px 0 16px; }
.workbench-shell .home-figure strong {
  color: var(--ds-text-strong);
  font-family: var(--ds-font-display);
  font-size: clamp(2.8rem, 8vw, 3.6rem);
  font-weight: 500;
  line-height: 0.9;
}
.workbench-shell .home-figure span { color: var(--ds-text-muted); font-size: var(--ds-text-base); }

.workbench-shell .home-availability {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  margin: 0 0 20px;
  padding: 10px 14px;
  color: var(--ds-warning);
  font-weight: 500;
  text-decoration: none;
  background: var(--ds-warning-bg);
  border-radius: var(--ds-radius);
}
.workbench-shell .home-availability .ui-icon { width: 18px; height: 18px; }
.workbench-shell .home-wine-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }

.workbench-shell .home-actions { display: grid; gap: 12px; }
.workbench-shell .home-actions > a {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 14px;
  padding: 18px 18px;
  color: var(--ds-text);
  text-decoration: none;
  transition: border-color var(--ds-motion-fast) var(--ds-ease);
}
.workbench-shell .home-actions > a:hover { border-color: color-mix(in srgb, var(--ds-accent) 45%, var(--ds-line)); }
.workbench-shell .home-actions > a > .ui-icon:first-child { width: 22px; height: 22px; color: var(--ds-accent); }
.workbench-shell .home-actions > a > .ui-icon:last-child { width: 16px; height: 16px; color: var(--ds-text-muted); }
.workbench-shell .home-action-copy { display: grid; gap: 2px; min-width: 0; }
.workbench-shell .home-action-copy strong { font-size: var(--ds-text-md); font-weight: 600; }
.workbench-shell .home-action-copy > span { color: var(--ds-text-muted); font-size: var(--ds-text-sm); }
/* The whole card is the link; a second "… beheren" line said it again. */
.workbench-shell .home-action-label { display: none; }

@media (min-width: 900px) {
  .workbench-shell .home-workspace { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
}

/* --- The wine list -------------------------------------------------------------- */

.workbench-shell .wine-sheet { overflow: hidden; }
.workbench-shell .wine-sheet .colour-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 14px 20px;
  color: var(--ds-text-strong);
  font-size: var(--ds-text-base);
  font-weight: 600;
  background: var(--ds-surface);
  border-bottom: 1px solid var(--ds-line);
}
/* What is in the glass: a disc of the wine's own colour, with a fine rim so
   the pale ones still read on white. */
.workbench-shell .colour-dot { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(34, 27, 38, 0.18); }
.workbench-shell .colour-dot.colour-red { background: var(--ds-wine-red); }
.workbench-shell .colour-dot.colour-white { background: var(--ds-wine-white); }
.workbench-shell .colour-dot.colour-rose { background: var(--ds-wine-rose); }
.workbench-shell .colour-dot.colour-sparkling { background: var(--ds-wine-sparkling); }
.workbench-shell .colour-dot.colour-other { background: var(--ds-wine-other); }
.workbench-shell .colour-select-all {
  margin-left: auto;
  min-height: 34px;
  padding: 4px 12px;
  color: var(--ds-accent);
  font-size: var(--ds-text-2xs);
  font-weight: 600;
  background: none;
  border: 1px solid var(--ds-line);
  border-radius: var(--ds-radius-pill);
}
.workbench-shell .wine-sheet .record-row { background: var(--ds-surface); border-bottom: 1px solid var(--ds-line); }
.workbench-shell .wine-sheet .record-row:last-child { border-bottom: 0; }
.workbench-shell .wine-sheet .record-row:has(.record-card[open]) { background: color-mix(in srgb, var(--ds-surface-2) 55%, var(--ds-surface)); }
.workbench-shell .wine-sheet .record-heading strong { color: var(--ds-text-strong); font-size: var(--ds-text-base); font-weight: 600; }
.workbench-shell .wine-sheet .record-heading small { color: var(--ds-text-muted); font-size: var(--ds-text-2xs); }
.workbench-shell .wine-sheet .record-prices small { color: var(--ds-text-muted); font-size: var(--ds-text-3xs); font-weight: 400; }
.workbench-shell .wine-sheet .record-prices b { color: var(--ds-text-strong); font-size: var(--ds-text-sm); font-weight: 600; }
.workbench-shell .wine-sheet .record-card > summary > .ui-icon { color: var(--ds-text-muted); }
.workbench-shell .wine-sheet .record-card[open] > summary > .ui-icon { color: var(--ds-accent); }
.workbench-shell .wine-sheet .wine-editor-fields,
.workbench-shell .wine-sheet .wine-preview { background: var(--ds-surface); border-color: var(--ds-line); }

.workbench-shell .inventory-filters > summary {
  min-height: 46px;
  color: var(--ds-text-strong);
  background: var(--ds-surface);
  border: 1px solid color-mix(in srgb, var(--ds-line-strong) 55%, var(--ds-surface));
  border-radius: var(--ds-radius);
}
.workbench-shell .inventory-filters[open] > summary { color: var(--ds-accent); background: var(--ds-accent-soft); border-color: var(--ds-accent); }
.workbench-shell .inventory-filter-fields { background: var(--ds-surface); border: 1px solid var(--ds-line); border-radius: 14px; }
.workbench-shell .inventory-result-count { color: var(--ds-text-muted); font-size: var(--ds-text-2xs); }
.workbench-shell .search-field .ui-icon { color: var(--ds-text-muted); }

.workbench-shell .bulk-bar {
  background: var(--ds-surface);
  border: 1px solid var(--ds-line);
  border-radius: 16px;
  box-shadow: var(--ds-shadow);
}

/* --- Dishes -------------------------------------------------------------------- */

/* The dish sheet (13 October 2026; it may look different from the wine
   page, because the actions differ). It reads as the menu does: one
   sheet per category, its name a heading in the display face, one row per
   dish with its name and its price on one line, as a menu prints them, and
   under it one line that says where the dish stands with the sommelier: the
   coupled wines (opened and changed in place) and the way to the advice, or,
   in the warning colour, that the profile is still to be completed. The whole
   row opens the dish (the link is stretched over the row and the tools stand
   above it), so the chevron sits at the far right whatever the row holds. The
   same on a laptop and a phone. Removing lives in the dish itself and, on a
   phone, behind a swipe to the left (.swipe-row). */
.workbench-shell .dish-sheet-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 16px; margin: 0 var(--ds-gutter) 14px; }
.workbench-shell .dish-sheet-tools .list-summary { margin: 0; }
.workbench-shell .dish-sheet-tools .category-tool { margin: 0; }
.workbench-shell .dish-sheet { display: grid; gap: 22px; margin: 0 var(--ds-gutter) 32px; }
.workbench-shell .dish-group { overflow: hidden; }
.workbench-shell .dish-group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 16px 20px 13px; border-bottom: 1px solid var(--ds-line); }
.workbench-shell .dish-sheet-heading { margin: 0; color: var(--ds-text-strong); font-family: var(--ds-font-display); font-size: var(--ds-text-lg); font-weight: 500; letter-spacing: -0.01em; line-height: 1.2; }
.workbench-shell .dish-group-count { color: var(--ds-text-muted); font-size: var(--ds-text-xs); white-space: nowrap; }
.workbench-shell .dish-rows { margin: 0; padding: 0; list-style: none; }
.workbench-shell .dish-row { border-bottom: 1px solid var(--ds-line); background: var(--ds-surface); }
.workbench-shell .dish-row:last-child { border-bottom: 0; }
.workbench-shell .dish-row-body {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 16px;
  grid-template-areas: "open price chevron" "line line line";
  align-items: center;
  column-gap: 14px;
  row-gap: 5px;
  padding: 15px 20px;
  transition: background-color 160ms var(--ds-ease);
}
.workbench-shell .dish-row-body:hover { background: color-mix(in srgb, var(--ds-surface-2) 55%, var(--ds-surface)); }
.workbench-shell .dish-row--incomplete .dish-row-body { background: color-mix(in srgb, var(--ds-warning-bg) 40%, var(--ds-surface)); }
.workbench-shell .dish-row--incomplete .dish-row-body:hover { background: color-mix(in srgb, var(--ds-warning-bg) 60%, var(--ds-surface)); }
.workbench-shell .dish-row-open { grid-area: open; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-width: 0; color: inherit; text-decoration: none; }
/* The whole row opens the dish: the link covers the row, the tools stand above it. */
.workbench-shell .dish-row-open::after { content: ""; position: absolute; inset: 0; }
.workbench-shell .dish-row-open:focus-visible { outline: none; }
.workbench-shell .dish-row-body:has(.dish-row-open:focus-visible) { box-shadow: inset 0 0 0 2px var(--ds-focus); }
.workbench-shell .dish-row-open strong { font-size: var(--ds-text-md); font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.workbench-shell .dish-row-status { color: var(--ds-text-muted); font-size: var(--ds-text-xs); }
.workbench-shell .dish-row-price { grid-area: price; color: var(--ds-text-strong); font-size: var(--ds-text-base); font-variant-numeric: tabular-nums; white-space: nowrap; }
.workbench-shell .dish-row-chevron { grid-area: chevron; display: grid; place-items: center; align-self: center; width: 16px; height: 16px; color: var(--ds-text-muted); transition: transform 160ms var(--ds-ease), color 160ms var(--ds-ease); }
.workbench-shell .dish-row-chevron .ui-icon { width: 16px; height: 16px; }
.workbench-shell .dish-row-body:hover .dish-row-chevron { transform: translateX(2px); color: var(--ds-accent); }
.workbench-shell .dish-row-line { grid-area: line; position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 22px; min-width: 0; margin: 0; color: var(--ds-text-muted); font-size: var(--ds-text-sm); line-height: 1.4; }
.workbench-shell .dish-row-line .ui-icon { flex: none; width: 15px; height: 15px; }
.workbench-shell .dish-row-line:not(.dish-row-tools) { flex-wrap: nowrap; align-items: flex-start; gap: 7px; pointer-events: none; }
.workbench-shell .dish-row-line:not(.dish-row-tools) .ui-icon { margin-top: 2px; }
.workbench-shell .dish-row-line > span { flex: 1 1 auto; min-width: 0; }
.workbench-shell .dish-row-warn { color: var(--ds-text-muted); }
.workbench-shell .dish-row-warn .ui-icon, .workbench-shell .dish-row-warn b { color: var(--ds-warning-ink); font-weight: 600; }
.workbench-shell .dish-row-tools > .dish-wines { margin: 0; min-width: 0; }
.workbench-shell .dish-row-tools .dish-wines > summary,
.workbench-shell .dish-row-tool { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; margin: -8px 0; padding: 0; color: var(--ds-accent); background: none; border: 0; border-radius: 0; font-size: var(--ds-text-sm); font-weight: 600; text-decoration: none; white-space: nowrap; cursor: pointer; list-style: none; }
.workbench-shell .dish-row-tools .dish-wines > summary::-webkit-details-marker { display: none; }
.workbench-shell .dish-row-tools .dish-wines > summary:hover,
.workbench-shell .dish-row-tool:hover { text-decoration: underline; text-underline-offset: 4px; }
.workbench-shell .dish-row-tools .dish-wines > summary b { display: inline-grid; min-width: 20px; height: 20px; place-items: center; padding: 0 6px; color: var(--ds-accent); background: var(--ds-accent-soft); border-radius: 999px; font-size: var(--ds-text-3xs); font-weight: 700; }
.workbench-shell .dish-row-tool .ui-icon { width: 14px; height: 14px; transition: transform 160ms var(--ds-ease); }
.workbench-shell .dish-row-tool:hover .ui-icon { transform: translateX(2px); }
/* Opened, the coupled wines take the whole line; the advice link wraps under them. */
.workbench-shell .dish-row-tools .dish-wines[open] { flex: 1 1 100%; }
.workbench-shell .dish-row-tools .dish-wines[open] > summary { color: var(--ds-text-strong); }
.workbench-shell .dish-row-tools .dish-wines-form { display: grid; gap: 10px; max-width: 560px; margin: 12px 0 6px; padding: 14px 16px; background: var(--ds-surface-2); border-radius: var(--ds-radius); }
.workbench-shell .dish-row-tools .dish-wines-hint { margin: 0; color: var(--ds-text-muted); font-size: var(--ds-text-xs); }
.workbench-shell .dish-row-tools .pairing-search { margin: 0; }
.workbench-shell .dish-row-tools .check-list { max-height: 320px; margin: 0; background: var(--ds-surface); border-color: var(--ds-line); border-radius: var(--ds-radius-sm); }
.workbench-shell .dish-row-tools .check-list:not(:has(label:not([hidden]))) { display: none; }
.workbench-shell .dish-row-tools .pairing-summary { min-height: 0; margin: 0; color: var(--ds-text-muted); font-size: var(--ds-text-xs); }
.workbench-shell .dish-row-tools .pairing-summary:not(:has(span:not([hidden]))) { display: none; }
.workbench-shell .dish-row-tools .secondary-button { justify-self: start; }
@media (max-width: 760px) {
  .workbench-shell .dish-sheet { gap: 18px; }
  .workbench-shell .dish-group-head { padding: 14px 16px 11px; }
  .workbench-shell .dish-row-body { column-gap: 12px; padding: 13px 16px; }
  .workbench-shell .dish-row-line { gap: 2px 18px; }
}

.workbench-shell .dish-flow-progress { background: var(--ds-surface); border: 1px solid var(--ds-line); border-radius: 14px; }
.workbench-shell .dish-flow-progress li.is-current b,
.workbench-shell .dish-flow-progress li.is-current button span { color: var(--ds-text-on-accent); background: var(--ds-action); }
.workbench-shell .dish-step legend span { color: var(--ds-accent); font-size: var(--ds-text-2xs); font-weight: 600; letter-spacing: 0; text-transform: none; }
.workbench-shell .dish-step legend strong { font-family: var(--ds-font-display); font-size: var(--ds-text-xl); font-weight: 500; letter-spacing: -0.01em; }
.workbench-shell .dish-live-card { color: var(--ds-text); background: var(--ds-surface-2); border: 0; border-radius: var(--ds-radius-lg); }
.workbench-shell .dish-live-label { color: var(--ds-text-muted); font-size: var(--ds-text-2xs); letter-spacing: 0; text-transform: none; }
.workbench-shell .dish-live-card h2 { font-family: var(--ds-font-display); font-weight: 500; }
.workbench-shell :is(.dish-choice-card, .check-list label) { border-radius: var(--ds-radius); }

/* --- Statistics ------------------------------------------------------------------ */

.workbench-shell .stat-value {
  font-family: var(--ds-font-display);
  font-weight: 500;
  letter-spacing: -0.01em;
}
.workbench-shell .stat-label { color: var(--ds-text-muted); letter-spacing: 0; text-transform: none; }
.workbench-shell :is(.stat-bar-track, .rank-bar, .hour-bar) { border-radius: var(--ds-radius-pill); }

/* --- Settings pages: sommelier, house style, account ------------------------------- */

.workbench-shell .style-panel { padding: clamp(18px, 3vw, 26px); }
.workbench-shell details.style-panel:not([open]) { padding-block: 10px; }
.workbench-shell .style-bar {
  background: var(--ds-surface-veil);
  border: 1px solid var(--ds-line);
  border-radius: 14px;
  box-shadow: var(--ds-shadow);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
}
.workbench-shell .sommelier-settings-form .style-bar,
.workbench-shell .account-details .style-bar { box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
/* The serving choice and its button are one sheet: the button belongs to it. */
.workbench-shell .sommelier-settings-form { display: grid; gap: 0; }
.workbench-shell .sommelier-settings-form .style-panel { border-bottom: 0; border-radius: var(--ds-radius-lg) var(--ds-radius-lg) 0 0; }
.workbench-shell .sommelier-settings-form .style-bar {
  margin: 0;
  border-top: 1px solid var(--ds-line);
  border-radius: 0 0 var(--ds-radius-lg) var(--ds-radius-lg);
  background: var(--ds-surface);
}
.workbench-shell .setting-choice strong { font-weight: 600; }
.workbench-shell .detail-list dt { color: var(--ds-text-muted); font-size: var(--ds-text-2xs); font-weight: 500; letter-spacing: 0; text-transform: none; }
.workbench-shell .detail-list dd { color: var(--ds-text-strong); font-weight: 500; }
.workbench-shell .account-signout { display: flex; justify-content: flex-start; }
.workbench-shell .account-version { margin: -24px var(--content-gutter) 40px; color: var(--ds-text-faint); font-size: var(--ds-text-3xs); }

/* --- QR -------------------------------------------------------------------------- */

.workbench-shell .qr-action-panel h2 { font-size: var(--ds-text-md); }
.workbench-shell .qr-preview-stage { background: var(--ds-surface-2); border: 0; border-radius: var(--ds-radius-lg); }
/* The sticker is a print, not the panel: its words stay the sticker's own. */

/* --- The guest's card, kept exactly as guests see it --------------------------------
   These adjust the guest-card stylesheet, which is itself unlayered; inside
   `legacy` they would lose to it. */
.wc-frame,
.style-preview { --theme-accent-rgb: 47, 125, 104; }
.wine-editor > .wc-frame { min-width: 0; }
.wine-sheet .wine-preview .wc-frame { max-width: 100%; margin-top: 4px; }
@media print {
  .wc-frame, .wc { break-inside: avoid; page-break-inside: avoid; }
  .wc { box-shadow: none; border-color: rgba(var(--theme-accent-rgb), 0.35); }
  .tabbar, .topbar, .ledger-rail { display: none !important; }
  body.workbench-shell .workbench-main { margin: 0; padding: 0; }
}

/* --- Signing in --------------------------------------------------------------
   The first thing a restaurant sees of us. The logo, a white sheet on
   porcelain, the title in DigiSomm Display, and nothing else competing with the form. */

body.entry-shell .entry-main {
  display: grid;
  min-height: 100dvh;
  place-items: center;
  padding: clamp(20px, 5vw, 56px) 16px;
  background: var(--ds-bg);
}
body.entry-shell .auth-card {
  width: min(100%, 420px);
  padding: clamp(26px, 6vw, 40px);
  color: var(--ds-text);
  background: var(--ds-surface);
  border: 1px solid var(--ds-line);
  border-top: 1px solid var(--ds-line);
  border-radius: 22px;
  box-shadow: 0 1px 2px var(--ds-raise-1), 0 24px 60px -30px rgba(79, 15, 29, 0.28);
}
body.entry-shell .auth-card--wide { width: min(100%, 620px); }
body.entry-shell .auth-brand { display: grid; justify-items: start; gap: 6px; margin: 0 0 30px; }
body.entry-shell .auth-logo { display: block; width: 168px; height: auto; }
body.entry-shell .auth-brand > span { color: var(--ds-text-muted); font-size: var(--ds-text-2xs); font-weight: 500; letter-spacing: 0.01em; }
body.entry-shell .auth-step { margin: 0 0 6px; color: var(--ds-accent); font-size: var(--ds-text-2xs); font-weight: 600; letter-spacing: 0; text-transform: none; }
body.entry-shell .auth-card h1 {
  margin: 0 0 22px;
  color: var(--ds-text-strong);
  font-family: var(--ds-font-display);
  font-size: clamp(1.9rem, 6vw, 2.3rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.05;
}
body.entry-shell .auth-intro { margin: -10px 0 22px; color: var(--ds-text-muted); }
body.entry-shell .auth-form { display: grid; gap: 8px; }
body.entry-shell .auth-field { margin-top: 10px; color: var(--ds-text-strong); font-size: var(--ds-text-xs); font-weight: 500; }
body.entry-shell .auth-form :is(input:not([type="hidden"]), select) {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  color: var(--ds-text-strong);
  font: inherit;
  font-size: 16px;
  background: var(--ds-surface);
  border: 1px solid var(--ds-line-strong);
  border-radius: var(--ds-radius);
  box-shadow: inset 0 1px 2px var(--ds-raise-1);
}
body.entry-shell .auth-form :is(input, select):focus { border-color: var(--ds-accent); outline: 3px solid color-mix(in srgb, var(--ds-accent) 22%, transparent); outline-offset: 0; }
body.entry-shell .auth-submit {
  width: 100%;
  min-height: 50px;
  margin-top: 18px;
  color: var(--ds-text-on-accent);
  font: inherit;
  font-size: var(--ds-text-base);
  font-weight: 600;
  background: var(--ds-action);
  border: 1px solid transparent;
  border-radius: var(--ds-radius);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 1px 2px rgba(79, 15, 29, 0.22);
  cursor: pointer;
}
body.entry-shell .auth-submit:hover { background: var(--ds-action-hover); }
body.entry-shell .auth-note { margin: 22px 0 0; color: var(--ds-text-muted); font-size: var(--ds-text-2xs); }
body.entry-shell .auth-note a { color: var(--ds-accent); font-weight: 600; text-underline-offset: 3px; }
body.entry-shell :focus-visible { outline: 2px solid var(--ds-focus); outline-offset: 2px; }
body.entry-shell .notice { margin: 0 0 16px; }

/* Choosing a restaurant: each one a row to press. */
body.entry-shell .workspace-list { display: grid; gap: 8px; }
body.entry-shell .workspace-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 12px 16px;
  color: var(--ds-text);
  text-align: left;
  background: var(--ds-surface);
  border: 1px solid var(--ds-line);
  border-radius: 14px;
  cursor: pointer;
}
body.entry-shell .workspace-list button:hover { border-color: var(--ds-accent); }
body.entry-shell .workspace-list span { display: grid; gap: 2px; }
body.entry-shell .workspace-list strong { font-weight: 600; }
body.entry-shell .workspace-list small { color: var(--ds-text-muted); font-size: var(--ds-text-2xs); }
body.entry-shell .workspace-list em { color: var(--ds-accent); font-size: var(--ds-text-2xs); font-style: normal; font-weight: 600; }

body.entry-shell .secret-panel,
body.entry-shell .recovery-grid { background: var(--ds-surface-2); border: 0; border-radius: 14px; }

/* --- Small corrections after looking at every screen ----------------------------- */

/* The page behind the "Meer" sheet dims with its bar, not under it. */
@media (max-width: 980px) {
  .workbench-shell.rail-open .workbench-main::before { z-index: 26; }
  html[data-ui-ready] .workbench-shell .ledger-rail .account-link { margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--ds-line); border-radius: 0; }
}

/* A day's count is a quiet bar; the line over it is the trend being read. */
.workbench-shell .spark-bar { fill: color-mix(in srgb, var(--ds-accent) 22%, var(--ds-surface)); }
.workbench-shell .spark-trend { color: var(--ds-accent); }

/* --- The privacy notice, one tap from anywhere ------------------------------------ */

.workbench-shell .rail-legal { display: block; margin: 4px 10px 0; padding: 6px 0; color: var(--ds-rail-text-dim); font-size: var(--ds-text-3xs); text-decoration: underline; text-underline-offset: 3px; }
.workbench-shell .rail-legal:hover { color: var(--ds-rail-text); }
.entry-shell .entry-legal { margin: 18px 0 0; text-align: center; font-size: var(--ds-text-2xs); }
.entry-shell .entry-legal a { color: var(--ds-text-muted); text-underline-offset: 3px; }

/* --- Sending in the wine list ------------------------------------------------------- */

.workbench-shell .scan-upload h2 { margin-top: 0; }
.workbench-shell .scan-drop { display: grid; gap: 6px; padding: var(--ds-space-5); background: var(--ds-surface-2); border: 1.5px dashed var(--ds-line-strong); border-radius: var(--ds-radius-lg); cursor: pointer; }
.workbench-shell .scan-drop:hover { border-color: var(--ds-accent); }
.workbench-shell .scan-drop-title { color: var(--ds-text-strong); font-size: var(--ds-text-md); font-weight: 600; }
.workbench-shell .scan-drop-hint { color: var(--ds-text-muted); font-size: var(--ds-text-xs); }
.workbench-shell .scan-drop input[type="file"] { margin-top: 6px; width: 100%; background: var(--ds-surface); border-style: solid; }
.workbench-shell .scan-picked { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 10px; margin: 14px 0 0; padding: 0; list-style: none; }
.workbench-shell .scan-picked li { display: grid; gap: 4px; color: var(--ds-text-muted); font-size: var(--ds-text-3xs); text-align: center; overflow-wrap: anywhere; }
.workbench-shell .scan-picked img,
.workbench-shell .scan-picked .scan-picked-pdf { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: top; background: var(--ds-surface-2); border: 1px solid var(--ds-line); border-radius: var(--ds-radius-sm); }
.workbench-shell .scan-picked .scan-picked-pdf { display: grid; place-items: center; color: var(--ds-text-strong); font-weight: 600; }
.workbench-shell .scan-note-field { display: grid; gap: 6px; margin: var(--ds-space-4) 0; }
.workbench-shell .scan-actions { display: flex; justify-content: flex-end; margin-top: var(--ds-space-4); }
.workbench-shell .scan-actions button[aria-busy="true"] { opacity: 0.6; pointer-events: none; }
.workbench-shell .scan-history-list { display: grid; margin: 0; padding: 0; list-style: none; }
.workbench-shell .scan-history-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-top: 1px solid var(--ds-line); }
.workbench-shell .scan-history-list li:first-child { border-top: 0; }
.workbench-shell .scan-history-list strong { display: block; color: var(--ds-text-strong); }
.workbench-shell .scan-history-meta { display: block; color: var(--ds-text-muted); font-size: var(--ds-text-xs); }
@media (max-width: 640px) {
  .workbench-shell .scan-actions .primary-button { width: 100%; }
}

/* --- Opmerkingen: a structured remark to DigiSomm, and what became of it (26 October 2026) --- */

.workbench-shell .feedback-form h2,
.workbench-shell .feedback-history h2 { margin-top: 0; }
.workbench-shell .feedback-form .form-grid { margin-bottom: 0; }
.workbench-shell .feedback-form textarea { min-height: 128px; resize: vertical; }
.workbench-shell .feedback-form .hint { margin: var(--ds-space-4) 0 0; max-width: 62ch; }
.workbench-shell .feedback-actions { display: flex; justify-content: flex-end; margin-top: var(--ds-space-4); }
.workbench-shell .feedback-empty { margin: 0; color: var(--ds-text-muted); font-size: var(--ds-text-sm); }
.workbench-shell .feedback-list { display: grid; margin: 0; padding: 0; list-style: none; }
.workbench-shell .feedback-item { display: grid; gap: 6px; padding: 16px 0; border-top: 1px solid var(--ds-line); }
.workbench-shell .feedback-item:first-child { border-top: 0; padding-top: 4px; }
.workbench-shell .feedback-item.is-handled .feedback-title,
.workbench-shell .feedback-item.is-handled .feedback-body { color: var(--ds-text-muted); }
.workbench-shell .feedback-item-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.workbench-shell .feedback-status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--ds-radius-pill); font-size: var(--ds-text-2xs); font-weight: 600; letter-spacing: 0.01em; line-height: 1.5; background: var(--ds-surface-2); color: var(--ds-text-muted); border: 1px solid var(--ds-line); }
.workbench-shell .feedback-status.is-busy { background: var(--ds-warning-bg); color: var(--ds-warning-ink); border-color: transparent; }
.workbench-shell .feedback-status.is-done { background: var(--ds-success-bg); color: var(--ds-success-ink); border-color: transparent; }
.workbench-shell .feedback-tick { font-size: var(--ds-text-xs); line-height: 1; }
.workbench-shell .feedback-kind { color: var(--ds-text-muted); font-size: var(--ds-text-2xs); }
.workbench-shell .feedback-title { color: var(--ds-text-strong); font-size: var(--ds-text-md); line-height: 1.35; }
.workbench-shell .feedback-body { margin: 0; max-width: 68ch; color: var(--ds-text); font-size: var(--ds-text-sm); line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; }
.workbench-shell .feedback-meta { margin: 0; color: var(--ds-text-muted); font-size: var(--ds-text-xs); }
@media (max-width: 640px) {
  .workbench-shell .feedback-actions .primary-button { width: 100%; }
}
@media (min-width: 900px) {
  /* The three choices on one line; the title and the text take the width. */
  .workbench-shell .feedback-form .form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .workbench-shell .feedback-form .wide-field { grid-column: 1 / -1; }
}

/* --- Website: the wine list on the restaurant's own website (30 October 2026) ---
   The address, the websites and a folded example of the answer; minimal,
   for a developer (31 October 2026). */

.workbench-shell .website-address h2 { margin-top: 0; }
.workbench-shell .website-address .hint,
.workbench-shell .website-origins .hint { margin: var(--ds-space-3) 0 0; max-width: 64ch; }
.workbench-shell .website-origins-field { display: grid; gap: 6px; }
.workbench-shell .website-origins textarea { min-height: 88px; resize: vertical; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; }
.workbench-shell .website-actions { display: flex; justify-content: flex-end; margin-top: var(--ds-space-4); }
.workbench-shell .website-address code { white-space: nowrap; padding: 1px 5px; background: var(--ds-surface-2); border-radius: 4px; color: var(--ds-text-strong); font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.85em; }
.workbench-shell .website-preview > summary { display: flex; align-items: center; min-height: 44px; color: var(--ds-text-strong); font-size: var(--ds-text-md); font-weight: 600; list-style: none; cursor: pointer; }
.workbench-shell .website-preview > summary::-webkit-details-marker { display: none; }
.workbench-shell .website-preview > summary::after { margin-left: auto; color: var(--ds-accent); content: "+"; font-size: 1.1rem; }
.workbench-shell .website-preview[open] > summary::after { content: "\2212"; }
.workbench-shell .website-json { max-height: 440px; margin: var(--ds-space-3) 0 0; padding: 14px 16px; overflow: auto; background: var(--ds-surface-2); border: 1px solid var(--ds-line); border-radius: var(--ds-radius-sm); color: var(--ds-text); font: 0.76rem/1.55 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; white-space: pre; tab-size: 2; }
.workbench-shell .website-danger { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 20px; max-width: 1440px; margin: var(--ds-space-3) var(--content-gutter) var(--ds-space-6); }
@media (max-width: 640px) {
  .workbench-shell .website-actions .primary-button { width: 100%; }
}

/* On a computer, the guest's card stands beside a wine's prices, open, at its
   exact width in the app (342px, a 390-pixel phone less the app's margins):
   two panels side by side instead of one under the other. Last in the file so
   it wins over the list's own layout at the same specificity. */
@media (min-width: 1000px) {
  .wine-sheet .wine-editor { grid-template-columns: minmax(0, 1fr) calc(342px + 34px); gap: 16px; align-items: start; }
  .wine-sheet .wine-editor-fields { border-radius: 10px; }
  .wine-sheet .wine-preview { padding: 0 16px; border-top: 1px solid var(--line); border-radius: 10px; }
  .wine-sheet .wine-preview[open] { padding-bottom: 16px; }
  .wine-sheet .wine-preview .wc-frame { width: 342px; max-width: 100%; }
}
.account-venue > .field-hint { margin: 0 0 14px; }

/* A value chosen from a list (server/assets/choice-field.js): grapes one by
   one as chips, a country or appellation as one field; the options open
   under it. The same rules in every panel that loads the script. */
.choice { position: relative; min-width: 0; }
.choice-multiple { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 46px; padding: 6px 8px; background: var(--ds-surface); border: 1px solid var(--ds-line-strong); border-radius: var(--ds-radius); cursor: text; }
.choice-multiple:focus-within { border-color: var(--ds-accent); box-shadow: 0 0 0 3px var(--ds-accent-soft); }
.choice-chips { display: contents; margin: 0; padding: 0; list-style: none; }
.choice-chips li { display: inline-flex; align-items: center; gap: 2px; min-height: 32px; padding: 0 4px 0 12px; background: var(--ds-accent-soft); color: var(--ds-text); border-radius: 999px; font-size: 15px; font-weight: 500; }
.choice-remove { display: inline-grid; place-items: center; width: 28px; height: 28px; margin: 0; padding: 0; background: transparent; border: 0; border-radius: 999px; color: var(--ds-text-muted); font-size: 18px; line-height: 1; cursor: pointer; }
.choice-remove:hover { background: var(--ds-surface); color: var(--ds-text); }
.choice-multiple .choice-input { flex: 1 1 120px; min-width: 120px; min-height: 32px; margin: 0; padding: 4px; background: transparent; border: 0; box-shadow: none; outline: 0; font-size: 16px; }
/* A blend's shares, in a panel of their own under the grapes (14 October
   2026: a number field inside the chip was too cramped).
   The chip only says the share; the panel holds a bar of the blend and one
   row per grape with a stepper. The number is written into the field's value
   as "Merlot 60 %", which the server reads. */
.choice-chips .choice-chip-share { margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--ds-surface); color: var(--ds-text-muted); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.choice-blend { margin-top: 8px; }
.choice-blend[hidden] { display: none; }
.choice-blend-open { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; margin: 0; padding: 0 2px; border: 0; background: transparent; color: var(--ds-accent); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.choice-blend-open span { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 999px; background: var(--ds-accent-soft); font-size: 15px; line-height: 1; }
.choice-blend-open small { color: var(--ds-text-muted); font-size: 12px; font-weight: 400; }
.choice-blend.is-open { padding: 14px 14px 12px; border: 1px solid var(--ds-line); border-radius: var(--ds-radius); background: var(--ds-surface); }
.choice-blend-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin-bottom: 10px; }
.choice-blend-title { font-size: 14px; font-weight: 600; color: var(--ds-text); }
.choice-blend-total { order: 3; flex-basis: 100%; color: var(--ds-text-muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.choice-blend-total.is-over { color: var(--ds-danger, #a3242c); font-weight: 600; }
.choice-blend-clear { margin: 0 0 0 auto; padding: 4px 2px; border: 0; background: transparent; color: var(--ds-text-muted); font: inherit; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.choice-blend-bar { display: block; width: 100%; height: 10px; border-radius: 999px; background: var(--ds-line); overflow: hidden; }
.choice-blend-seg { fill: var(--ds-accent); transition: fill-opacity .2s ease; }
.choice-blend-seg.seg-2 { fill: color-mix(in srgb, var(--ds-accent) 68%, var(--ds-surface)); }
.choice-blend-seg.seg-3 { fill: color-mix(in srgb, var(--ds-accent) 44%, var(--ds-surface)); }
.choice-blend-seg.seg-4 { fill: color-mix(in srgb, var(--ds-accent) 28%, var(--ds-text-muted)); }
.choice-blend-seg.seg-5 { fill: color-mix(in srgb, var(--ds-accent) 16%, var(--ds-text-muted)); }
.choice-blend-seg.is-derived { fill-opacity: .32; }
.choice-blend-rows { margin: 10px 0 0; padding: 0; list-style: none; }
.choice-blend-rows li { display: flex; align-items: center; gap: 10px; min-height: 48px; border-top: 1px solid var(--ds-line); }
.choice-blend-rows li:first-child { border-top: 0; }
.choice-blend-dot { flex: none; width: 10px; height: 10px; }
.choice-blend-name { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 15px; font-weight: 500; color: var(--ds-text); }
.choice-blend-stepper { display: inline-flex; flex: none; align-items: center; height: 38px; border-radius: 999px; background: var(--ds-accent-soft); }
.choice-blend-step { display: inline-grid; place-items: center; width: 38px; height: 38px; margin: 0; padding: 0; border: 0; border-radius: 999px; background: transparent; color: var(--ds-text); font: inherit; font-size: 19px; line-height: 1; cursor: pointer; touch-action: manipulation; }
.choice-blend-step:active { background: color-mix(in srgb, var(--ds-accent) 14%, transparent); }
body .choice-blend .choice-blend-stepper input.choice-share { width: 3.4ch; min-width: 0; min-height: 0; height: 30px; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; outline: 0; color: var(--ds-text); font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
body .choice-blend .choice-blend-stepper input.choice-share:focus { outline: 0; border: 0; box-shadow: none; }
.choice-blend-stepper .choice-share::placeholder { color: var(--ds-text-muted); opacity: .6; font-weight: 500; }
.choice-blend-stepper .choice-share-unit { margin: 0 2px 0 3px; color: var(--ds-text-muted); font-size: 14px; }
.choice-blend-stepper:focus-within { box-shadow: 0 0 0 2px var(--ds-accent); }
.choice-blend-note { margin: 8px 0 0; color: var(--ds-text-muted); font-size: 12.5px; line-height: 1.45; }
.grape-shares { margin: 6px 0 0; }
.grape-shares-warning { font-weight: 600; }
.choice-options { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; right: 0; max-height: 280px; margin: 0; padding: 4px; overflow-y: auto; overscroll-behavior: contain; list-style: none; background: var(--ds-surface); border: 1px solid var(--ds-line-strong); border-radius: var(--ds-radius); box-shadow: 0 12px 32px rgba(20, 16, 14, 0.16); }
.choice-options[hidden] { display: none; }
.choice-option { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; padding: 8px 12px; border-radius: calc(var(--ds-radius) - 2px); color: var(--ds-text); font-size: 15px; font-weight: 400; cursor: pointer; }
.choice-option small { color: var(--ds-text-muted); font-size: 12px; }
.choice-option[aria-selected="true"] { background: var(--ds-accent-soft); }
@media (hover: hover) { .choice-option:hover { background: var(--ds-surface-2); } }
.choice-option-new { border-top: 1px solid var(--ds-line); margin-top: 4px; color: var(--ds-accent); font-weight: 600; }
.choice-empty { padding: 10px 12px; color: var(--ds-text-muted); font-size: 14px; }
/* A field filled in from a choice (the region from the appellation): lit for a
   moment, with a line saying where it came from. */
.choice-filled { animation: choice-filled 1.6s ease-out; }
@keyframes choice-filled { from { background-color: var(--ds-accent-soft); border-color: var(--ds-accent); } }
.choice-fill-note { margin: 6px 0 0; color: var(--ds-text-muted); font-size: 13px; font-weight: 400; }
.choice-fill-note[hidden] { display: none; }
.choice-fill-pick { min-height: 32px; margin: 4px 4px 0 0; padding: 4px 12px; background: var(--ds-surface); border: 1px solid var(--ds-line-strong); border-radius: 999px; color: var(--ds-text); font-size: 13px; font-weight: 600; cursor: pointer; }
.choice-fill-pick:hover { border-color: var(--ds-accent); }
@media (prefers-reduced-motion: reduce) { .choice-filled { animation: none; } }

/* Prevent focus-triggered iOS zoom without disabling the reader's own zoom.
   Keep the floor above compact table, authentication and card field rules. */
@media (max-width: 900px), (pointer: coarse) {
  input:not([type="hidden"], [type="checkbox"], [type="radio"], [type="range"], [type="color"], [type="button"], [type="submit"]),
  select, textarea, [contenteditable="true"] {
    font-size: max(16px, 1em) !important;
  }
}

/* A draft put back by the form memory (server/assets/form-memory.js): said
   once, at the top of the form, with one button to start over. */
.form-memory-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 14px; padding: 10px 12px; border: 1px solid rgba(122, 27, 46, 0.28); border-radius: 10px; background: rgba(122, 27, 46, 0.06); font-size: 13px; line-height: 1.45; }
.form-memory-forget { appearance: none; border: 1px solid rgba(122, 27, 46, 0.5); border-radius: 999px; padding: 5px 12px; background: transparent; color: #7A1B2E; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.form-memory-forget:hover { background: rgba(122, 27, 46, 0.1); }
.form-memory-hint { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 12px; padding: 8px 12px; border: 1px dashed rgba(122, 27, 46, 0.4); border-radius: 10px; font-size: 13px; line-height: 1.45; }
.form-memory-hint a { color: #7A1B2E; font-weight: 600; }

/* --- Flow: the app moves like an app (9 October 2026) -----------------------
   A page arrives rather than appears: a real navigation cross-fades and rises
   (the browser's view transition, where it has one), a region the live layer
   swaps in rises the same way, the tab bar and the top bar stay put through
   both, a fold's content settles in, and a press gives under the finger.
   Nothing moves under reduced motion. */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 140ms ease-out both ds-vt-out; }
::view-transition-new(root) { animation: 260ms cubic-bezier(0.2, 0.7, 0.2, 1) both ds-vt-in; }
@keyframes ds-vt-out { to { opacity: 0; } }
@keyframes ds-vt-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes ds-region-enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.region-enter { animation: ds-region-enter 280ms cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.workbench-shell details[open] > :not(summary) { animation: ds-region-enter 220ms cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.workbench-shell :is(.primary-button, .secondary-button, .danger-button, .dish-row-tool, .dish-wines > summary, .preview-link) {
  transition: transform 120ms var(--ds-ease), background-color 160ms var(--ds-ease), border-color 160ms var(--ds-ease), box-shadow 160ms var(--ds-ease), color 160ms var(--ds-ease);
}
.workbench-shell :is(.primary-button, .secondary-button, .danger-button, .dish-wines > summary):active { transform: scale(0.98); }
/* Cards lift a hair off the porcelain instead of sitting in a drawn box. */
.workbench-shell :is(.panel, .dish-group, .home-wine) { box-shadow: 0 1px 2px var(--ds-raise-2), 0 10px 24px -20px var(--ds-raise-3); }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  .region-enter, .workbench-shell details[open] > :not(summary) { animation: none; }
  .workbench-shell :is(.primary-button, .secondary-button, .danger-button, .dish-wines > summary):active { transform: none; }
}
@media (max-width: 980px) {
  /* The chrome is one material: the top bar is the same glass as the tab bar
     and the page scrolls under it. */
  .workbench-shell .topbar {
    position: sticky;
    top: 0;
    z-index: 25;
    /* Denser than the tab bar: the restaurant's name sits on it, and the
       page's own fields scroll under it. */
    background: var(--ds-surface-veil);
    border-bottom: 1px solid var(--ds-line);
    -webkit-backdrop-filter: blur(20px) saturate(1.8);
    backdrop-filter: blur(20px) saturate(1.8);
  }
  .workbench-shell .tabbar { view-transition-name: ds-tabbar; }
  .workbench-shell .topbar { view-transition-name: ds-topbar; }
  /* Three actions on a phone: the main one full width, the two others beside each other. */
  .workbench-shell .page-intro-actions:has(> :nth-child(3)) { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .workbench-shell .page-intro-actions:has(> :nth-child(3)) > .primary-button { grid-column: 1 / -1; order: -1; }
  .workbench-shell .page-intro-actions:has(> :nth-child(3)) > a { flex: none; white-space: normal; text-align: center; }
  /* A wine's name has room on a phone; the bar gives way, the name may wrap once. */
  .workbench-shell .rank-row { grid-template-columns: minmax(0, 1.5fr) minmax(36px, 0.8fr) 38px 52px; gap: 8px; }
  .workbench-shell .rank-name { white-space: normal; }
  .workbench-shell .rank-name > :first-child { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
  /* The account's save bars are the foot of their card, not a card in a card. */
  .workbench-shell form[action="/account"] .style-bar,
  .workbench-shell form[action="/account/zaak"] .style-bar { position: static; margin: 18px 0 0; padding: 14px 0 0; background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; }
}

/* A wine taken out of the shared catalogue: one quiet line in its editor. */
.wine-blocked-note { margin: 0 0 12px; padding: 10px 12px; color: var(--ds-text-muted); background: var(--ds-surface-2); border-radius: 10px; font-size: 0.82rem; line-height: 1.5; }

/* Actions ordered by use (9 October 2026): the rare ones behind "Meer", the
   risky or undoing ones as quiet text, apart from the main action. */
.action-menu { position: relative; }
.action-menu > summary { list-style: none; gap: 6px; cursor: pointer; }
.action-menu > summary::-webkit-details-marker { display: none; }
.action-menu > summary .ui-icon { width: 14px; height: 14px; transform: rotate(90deg); transition: transform 180ms var(--ds-ease); }
.action-menu[open] > summary .ui-icon { transform: rotate(-90deg); }
.action-menu-list { position: absolute; top: calc(100% + 6px); right: 0; z-index: 20; display: grid; width: min(320px, calc(100vw - 32px)); padding: 6px; background: var(--ds-surface); border: 1px solid var(--ds-line); border-radius: 14px; box-shadow: 0 18px 40px -16px var(--ds-raise-3); }
.action-menu-list a { display: grid; gap: 2px; padding: 10px 12px; color: var(--ds-text-strong); border-radius: 10px; font-weight: 600; text-decoration: none; }
.action-menu-list a small { color: var(--ds-text-muted); font-size: 0.78rem; font-weight: 400; line-height: 1.4; }
@media (hover: hover) { .action-menu-list a:hover { background: var(--ds-surface-2); } }
.danger-link, .quiet-link { min-height: 40px; padding: 8px 4px; background: none; border: 0; font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer; }
.danger-link { color: var(--ds-danger, #A3261F); }
.quiet-link { color: var(--ds-text-muted); }
@media (hover: hover) { .danger-link:hover, .quiet-link:hover { text-decoration: underline; } }
@media (max-width: 980px) {
  .workbench-shell .page-intro-actions:has(> .action-menu) { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
  .workbench-shell .page-intro-actions:has(> .action-menu) > .primary-button { order: 0; }
}

/* The tab bar's shape (9 October 2026): a true capsule, lower and narrower,
   floating off the edges and centred on a wide phone; the lens is the same
   capsule inside it, so the two radii agree. */
@media (max-width: 980px) {
  .workbench-shell .tabbar {
    right: auto;
    left: 50%;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    width: min(calc(100% - 24px), 440px);
    min-height: 60px;
    padding: 4px;
    border-radius: 999px;
    transform: translateX(-50%);
  }
  .workbench-shell .tab-indicator {
    top: 4px;
    bottom: 4px;
    left: 4px;
    width: calc((100% - 8px) / 5);
    border-radius: 999px;
  }
  .workbench-shell .tab-indicator::after { inset: 2px 10px auto; border-radius: 999px 999px 50% 50%; }
  .workbench-shell .tab { min-height: 52px; gap: 2px; padding: 5px 2px 4px; border-radius: 999px; font-size: 0.66rem; letter-spacing: 0; }
  .workbench-shell .tab .ui-icon { width: 21px; height: 21px; }
}

/* The concept waiting on the overview (9 October 2026): the restaurant learns
   that its list stands ready instead of finding it. */
.home-concept {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2px 12px;
  margin: 0 0 20px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: inherit;
  text-decoration: none;
}
.home-concept strong { grid-column: 1; }
.home-concept span { grid-column: 1; font-size: 0.875rem; color: var(--muted); }
.home-concept .ui-icon { grid-column: 2; grid-row: 1 / span 2; width: 16px; height: 16px; color: var(--accent); }

/* Voorwaarden (9 October 2026). At the first sign-in a step of its own, built
   like a signing page: no navigation (body.focus-shell), one column at a
   reading measure, what is signed and why, each document with its gist and
   its full text in a scrollable reading pane, then the signer and the two
   declarations. Rebuilt the same day: the first version put the form under
   two open legal texts, beside an empty side panel. */
.focus-shell .workbench-main { margin-left: 0; }
.focus-topbar { display: flex; align-items: center; gap: 14px; }
.focus-topbar .focus-logo { display: block; flex: none; }
.focus-topbar .focus-logo img { width: auto; height: 28px; max-width: none; }
.focus-tenant { min-width: 0; padding-left: 14px; overflow: hidden; color: var(--muted); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; border-left: 1px solid var(--line); }
.focus-signout { margin: 0 0 0 auto; }

.consent { max-width: 760px; margin: 0 auto; padding: 36px var(--content-gutter) 72px; }
.consent-step { margin: 0 0 6px; color: var(--accent); font-size: 0.85rem; font-weight: 600; }
.consent-head h1 { margin: 0; }
.consent-lead { max-width: 62ch; margin: 12px 0 0; color: var(--muted); font-size: 1.02rem; line-height: 1.6; }
.consent-lead strong { color: var(--text); }
.consent > .notice { margin-top: 20px; }

.consent-blocker { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-top: 24px; padding: 18px 20px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); border-radius: var(--radius); }
.consent-blocker p { max-width: 52ch; margin: 0; line-height: 1.5; }

.consent-documents { display: grid; gap: 16px; margin-top: 28px; }
.consent-doc { padding: 22px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.consent-doc-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.consent-doc-head h2 { margin: 0; font-size: 1.12rem; }
.consent-doc-meta { margin: 0; color: var(--muted); font-size: 0.82rem; }
.consent-points { display: grid; gap: 6px; margin: 14px 0 0; padding-left: 1.15em; line-height: 1.55; }
.consent-points li::marker { color: var(--accent); }
.consent-note { margin: 10px 0 0; color: var(--muted); font-size: 0.8rem; }
.consent-done { margin: 12px 0 0; color: var(--success); font-weight: 600; line-height: 1.5; }

.consent-doc-actions { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 20px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.consent-full { flex: 1 1 auto; min-width: 0; }
.consent-full > summary { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; color: var(--accent); font-weight: 600; cursor: pointer; list-style: none; }
.consent-full > summary::-webkit-details-marker { display: none; }
.consent-full > summary::after { width: 7px; height: 7px; margin-top: -3px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform 0.15s ease; content: ""; }
.consent-full[open] > summary::after { margin-top: 3px; transform: rotate(-135deg); }
.consent-print { color: var(--muted); text-underline-offset: 3px; }
.consent-reader { max-height: min(60vh, 520px); margin-top: 12px; padding: 16px 18px; overflow: auto; color: var(--text); background: var(--canvas); border: 1px solid var(--line); border-radius: 10px; font-size: 0.95rem; line-height: 1.62; overscroll-behavior: contain; }
.consent-reader:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.consent-reader h3 { margin: 20px 0 6px; font-size: 0.95rem; }
.consent-reader h3:first-of-type { margin-top: 14px; }
.consent-reader p { max-width: 68ch; margin: 0 0 10px; }

.consent-form { margin-top: 24px; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.consent-form h2 { margin: 0; font-size: 1.12rem; }
.consent-signer { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; margin: 18px 0 0; }
.consent-signer dt { color: var(--muted); font-size: 0.8rem; }
.consent-signer dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.consent-field { margin-top: 20px; }
.consent-field label { display: block; font-weight: 600; }
.consent-hint { margin: 2px 0 8px; color: var(--muted); font-size: 0.85rem; }
.consent-field input { width: 100%; min-height: 46px; padding: 10px 12px; color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; font: inherit; font-size: 16px; }
.consent-field input[aria-invalid="true"] { border-color: var(--danger); }
.consent-checks { margin: 22px 0 0; padding: 0; border: 0; }
.consent-checks legend { margin-bottom: 8px; padding: 0; font-weight: 600; }
.consent-check { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; line-height: 1.5; background: var(--canvas); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.consent-check + .consent-check { margin-top: 8px; }
.consent-check input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); }
.consent-check:has(input:checked) { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.consent-check:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.consent-submit { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 22px; }
.consent-submit p { flex: 1 1 240px; margin: 0; color: var(--muted); font-size: 0.85rem; line-height: 1.5; }

.consent-continue { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 20px; margin-top: 24px; }
.consent-continue p { max-width: 52ch; margin: 0; color: var(--muted); line-height: 1.5; }
.consent-provider { margin-top: 36px; color: var(--muted); font-size: 0.8rem; text-align: center; }
.consent-provider p { margin: 0; }
.consent-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 640px) {
  .consent { padding: 22px 16px 48px; }
  .consent-doc, .consent-form { padding: 18px 16px; }
  .consent-signer { grid-template-columns: minmax(0, 1fr); }
  .consent-submit .primary-button, .consent-continue .primary-button, .consent-blocker .primary-button { width: 100%; justify-content: center; }
  .focus-tenant { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .consent-full > summary::after { transition: none; }
}
/* The same title letter as every page of the restaurant app, the logo on the
   same column as the text, and declarations read as sentences, not labels. */
.workbench-shell .consent-head h1 { font-family: var(--ds-font-display); font-size: var(--ds-text-2xl); font-weight: 500; letter-spacing: -0.012em; line-height: 1.08; }
.focus-shell .focus-topbar { padding-inline: max(var(--content-gutter), calc((100% - 760px) / 2 + var(--content-gutter))); }
.workbench-shell .consent-check { display: flex; gap: 12px; color: var(--text); font-size: 0.95rem; font-weight: 400; }
.workbench-shell .consent-field label { display: block; color: var(--text); font-size: 0.95rem; font-weight: 600; }
@media (max-width: 640px) {
  .focus-shell .focus-topbar { padding-inline: 16px; }
}
/* A tick box the size of the box, beside the first line of its sentence:
   the panel's fields are 44px high for the thumb, which pushed it down. */
.workbench-shell .consent-check { align-items: flex-start; }
.workbench-shell .consent-check input[type="checkbox"] { width: 20px; height: 20px; min-height: 0; margin: 2px 0 0; padding: 0; }
/* The full text reads in the text colour, not the panel's muted grey. */
.workbench-shell .consent-reader :is(p, h3) { color: var(--text); }
.workbench-shell .consent-points li { color: var(--text); }

/* A fixed width (9 October 2026): no zoom, and nothing beyond the screen.
   The viewport refuses zoom, a double tap does not zoom, and nothing
   may push the page sideways: what is wider (a long table) scrolls inside its
   own box. clip, not hidden, so sticky bars keep working. */
html { touch-action: manipulation; }
html, body { max-width: 100%; overflow-x: clip; }
img, video, canvas { max-width: 100%; }

/* The dish editor, one frame and compact (10 October 2026). The stage around
   the steps drew its own hairline and the step drew one 1px inside it: two
   boxes, one of them empty. The step is the card; the stage is only room. */
.workbench-shell .dish-flow-stage { background: transparent; border: 0; border-radius: 0; overflow: visible; }
.workbench-shell .dish-step { gap: 14px; padding: clamp(18px, 3vw, 26px); }
.workbench-shell .dish-step > legend { margin-bottom: 10px; }
.workbench-shell .dish-step-intro { margin: -6px 0 0; }
.workbench-shell .dish-choice-grid { gap: 8px; }
.workbench-shell .dish-choice-card > span { min-height: 0; gap: 3px; padding: 10px 11px; }
.workbench-shell .dish-choice-mark { min-height: 20px; padding: 2px 6px; }
.workbench-shell .dish-flow-layout { gap: 12px; }
.workbench-shell .dish-live-card { padding: 16px 18px; }
.workbench-shell .dish-live-card h2 { margin: 4px 0 12px; }
/* The chef choices: the fold's own line names them, so no second heading
   inside it, and no empty line under the list while nothing is searched. */
.workbench-shell .dish-chef-picker .dish-section-heading h2 { display: none; }
.workbench-shell .dish-chef-picker .pairing-summary:not(:has(span:not([hidden]))) { display: none; }
.workbench-shell .dish-chef-picker { margin-bottom: 0; }
.workbench-shell .dish-final-actions { padding-top: 14px; }
/* Removing a dish: quiet, apart from the flow, under the card. */
.workbench-shell .dish-remove { display: flex; justify-content: flex-end; max-width: calc(100% - 332px); margin-top: 10px; }
@media (max-width: 980px) {
  .workbench-shell .dish-remove { max-width: none; justify-content: center; }
}
@media (max-width: 760px) {
  /* Two choices a row on a phone: twelve bases under each other were three
     screens of scrolling. */
  .workbench-shell .dish-choice-grid,
  .workbench-shell .dish-choice-grid-base,
  .workbench-shell .dish-choice-grid-tastes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workbench-shell .dish-step { padding: 18px 16px; }
  .workbench-shell .dish-editor-intro p { display: none; }
}

/* --- Statistics, rebuilt (10 October 2026) -------------------------------------
   Clear and usable on a phone. Phone first: one column of panels, each saying one thing; from 900px two
   panels side by side where they belong together. Charts stretch to their
   panel at a fixed height (preserveAspectRatio none, strokes non-scaling), so
   a 90-day chart on a computer is not 400px high and a phone's is not 60. */
.workbench-shell .st-intro { align-items: end; }
.workbench-shell .st-intro p { margin: 4px 0 0; color: var(--ds-text-muted); }
.workbench-shell .st-intro .stat-window { align-self: end; }
.workbench-shell .st-summary ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.workbench-shell .st-summary li { position: relative; padding-left: 18px; color: var(--ds-text); font-size: var(--ds-text-base, 1rem); line-height: 1.45; }
.workbench-shell .st-summary li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 7px; height: 7px; border-radius: 50%; background: var(--ds-accent); }
.workbench-shell .st-summary h2,
.workbench-shell .st-days h2,
.workbench-shell .st-wines h2,
.workbench-shell .st-never h2,
.workbench-shell .st-hours h2,
.workbench-shell .st-card h2,
.workbench-shell .st-gaps h2,
.workbench-shell .st-chosen h2 { margin: 0 0 10px; }
/* Four figures since "keer gekozen" joined them (24 October 2026): two by
   two on a phone, one row from a tablet up. */
.workbench-shell .st-figures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 640px) {
  .workbench-shell .st-figures { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.workbench-shell .st-figures > div { display: grid; gap: 2px; padding: 14px 16px; background: var(--ds-surface); border: 1px solid var(--ds-line); border-radius: var(--ds-radius-lg); }
.workbench-shell .st-figure { font-family: var(--ds-font-display); font-size: clamp(1.6rem, 6vw, 2.2rem); line-height: 1.05; color: var(--ds-text-strong); font-variant-numeric: lining-nums tabular-nums; }
.workbench-shell .st-figure-label { color: var(--ds-text-muted); font-size: var(--ds-text-xs); line-height: 1.3; }
/* The window to the hour (25 October 2026: an evening, a day or a span):
   the presets stay one capsule row, scrolling sideways where it
   does not fit, with "Eigen periode" folded under it; the restart line and the
   per-day note are quiet; the restart control sits at the very foot, folded. */
.workbench-shell .st-window-tools { display: grid; gap: 6px; justify-items: end; max-width: 100%; }
.workbench-shell .st-window-tools .stat-window { max-width: 100%; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.workbench-shell .st-window-tools .stat-window::-webkit-scrollbar { display: none; }
.workbench-shell .st-window-tools .stat-window a { flex: 0 0 auto; }
.workbench-shell .stat-custom { justify-self: end; max-width: 100%; }
.workbench-shell .stat-custom > summary { padding: 6px 13px; color: var(--ds-text-muted); font-size: 0.78rem; font-weight: 700; cursor: pointer; list-style: none; }
.workbench-shell .stat-custom > summary::-webkit-details-marker { display: none; }
.workbench-shell .stat-custom > summary[aria-current="page"], .workbench-shell .stat-custom[open] > summary { color: var(--ds-text-strong); }
.workbench-shell .stat-custom-form { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: end; padding: 4px 0 0; }
.workbench-shell .stat-custom-form label { display: grid; gap: 4px; margin: 0; color: var(--ds-text-muted); font-size: var(--ds-text-xs); }
.workbench-shell .stat-custom-moment { display: flex; gap: 6px; }
.workbench-shell .stat-custom-moment input[type="number"] { width: 4.6em; }
.workbench-shell .stat-custom-form .secondary-button { min-height: 40px; }
.workbench-shell .st-since { display: block; margin-top: 2px; font-size: var(--ds-text-xs); color: var(--ds-text-muted); }
.workbench-shell .st-note { max-width: 1440px; margin: -8px var(--content-gutter) 16px; color: var(--ds-text-muted); font-size: var(--ds-text-xs); line-height: 1.4; }
.workbench-shell .st-reset { max-width: 1440px; margin: 8px var(--content-gutter) 24px; }
.workbench-shell .st-reset > summary { width: fit-content; padding: 8px 0; color: var(--ds-text-muted); font-size: var(--ds-text-sm); cursor: pointer; }
.workbench-shell .st-reset > p { max-width: 62ch; margin: 4px 0 12px; color: var(--ds-text-muted); font-size: var(--ds-text-sm); line-height: 1.5; }
.workbench-shell .st-reset-form { display: grid; gap: 8px; justify-items: start; }
.workbench-shell .st-reset-form .check-label { font-size: var(--ds-text-sm); }

.workbench-shell .st-chart { position: relative; margin-top: 6px; }
.workbench-shell .st-chart-plot { display: block; width: 100%; height: 140px; color: var(--ds-accent); overflow: visible; }
.workbench-shell .st-chart-hours { height: 96px; }
.workbench-shell .st-chart-base { stroke: var(--ds-line-strong); stroke-width: 1; }
.workbench-shell .st-chart-axis { display: flex; justify-content: space-between; margin-top: 6px; color: var(--ds-text-muted); font-size: var(--ds-text-3xs, 0.75rem); font-variant-numeric: tabular-nums; }
.workbench-shell .st-days .spark-bar { fill: color-mix(in srgb, var(--ds-accent) 30%, var(--ds-surface)); }
.workbench-shell .hour-bar { fill: color-mix(in srgb, var(--ds-accent) 35%, var(--ds-surface)); fill-opacity: 1; }
.workbench-shell .hour-bar[data-peak] { fill: var(--ds-accent); }

.workbench-shell .st-grid { display: grid; gap: 16px; }
@media (min-width: 900px) {
  .workbench-shell .st-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}

/* A ranked wine: its name on its own line (wrapping, never cut off), what
   it scored under it, and a bar the width of the panel. */
.workbench-shell .st-rank { display: grid; margin: 0; padding: 0; list-style: none; counter-reset: st-rank; }
.workbench-shell .st-rank > li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 10px; padding: 10px 0; border-top: 1px solid var(--ds-line); }
.workbench-shell .st-rank > li:first-child { border-top: 0; }
.workbench-shell .st-rank-name { grid-column: 1 / -1; color: var(--ds-text-strong); font-weight: 600; line-height: 1.3; }
.workbench-shell .st-rank-meta { color: var(--ds-text-muted); font-size: var(--ds-text-xs); font-variant-numeric: tabular-nums; }
.workbench-shell .st-rank progress { grid-column: 1 / -1; }
.workbench-shell .st-rank-quiet .st-rank-name { font-weight: 500; }
.workbench-shell .st-rank progress,
.workbench-shell .st-bars progress { display: block; width: 100%; height: 6px; appearance: none; border: 0; border-radius: 999px; background: var(--ds-surface-2); overflow: hidden; }
.workbench-shell .st-rank progress::-webkit-progress-bar,
.workbench-shell .st-bars progress::-webkit-progress-bar { background: var(--ds-surface-2); border-radius: 999px; }
.workbench-shell .st-rank progress::-webkit-progress-value,
.workbench-shell .st-bars progress::-webkit-progress-value { background: var(--ds-accent); border-radius: 999px; }
.workbench-shell .st-rank progress::-moz-progress-bar,
.workbench-shell .st-bars progress::-moz-progress-bar { background: var(--ds-accent); border-radius: 999px; }

.workbench-shell .st-list { display: grid; margin: 0; padding: 0; list-style: none; }
.workbench-shell .st-list > li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--ds-line); }
.workbench-shell .st-list > li:first-child { border-top: 0; }
.workbench-shell .st-list span { min-width: 0; color: var(--ds-text-strong); line-height: 1.3; }
.workbench-shell .st-list small { flex: none; color: var(--ds-text-muted); font-size: var(--ds-text-xs); }
.workbench-shell .st-actions { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 12px 0 0; }
.workbench-shell .st-more { margin-top: 8px; }
.workbench-shell .st-more > summary { padding: 8px 0; color: var(--ds-accent); font-size: var(--ds-text-sm); font-weight: 600; cursor: pointer; }

.workbench-shell .st-card h3 { margin: 18px 0 8px; color: var(--ds-text-muted); font-family: var(--ds-font-body); font-size: var(--ds-text-xs); font-weight: 600; }
.workbench-shell .st-card-figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; }
.workbench-shell .st-card-figures > div { display: flex; flex-direction: column-reverse; gap: 2px; padding: 10px 12px; background: var(--ds-surface-2); border-radius: var(--ds-radius); }
.workbench-shell .st-card-figures dt { color: var(--ds-text-muted); font-size: var(--ds-text-3xs, 0.75rem); }
.workbench-shell .st-card-figures dd { margin: 0; font-family: var(--ds-font-display); font-size: 1.45rem; line-height: 1.1; color: var(--ds-text-strong); font-variant-numeric: lining-nums tabular-nums; }
.workbench-shell .st-type-bar { display: block; width: 100%; height: 12px; border-radius: 999px; overflow: hidden; }
.workbench-shell .st-type-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 0 0; padding: 0; list-style: none; color: var(--ds-text); font-size: var(--ds-text-sm); }
.workbench-shell .st-type-legend li { display: inline-flex; align-items: center; gap: 6px; }
.workbench-shell .st-type-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(34, 27, 38, 0.18); }
.workbench-shell rect.st-type { shape-rendering: crispEdges; }
.workbench-shell rect.st-type-red { fill: var(--ds-wine-red); }
.workbench-shell rect.st-type-white { fill: var(--ds-wine-white); }
.workbench-shell rect.st-type-rose { fill: var(--ds-wine-rose); }
.workbench-shell rect.st-type-sparkling { fill: var(--ds-wine-sparkling); }
.workbench-shell rect.st-type-other { fill: var(--ds-wine-other); }
.workbench-shell .st-type-dot.st-type-red { background: var(--ds-wine-red); }
.workbench-shell .st-type-dot.st-type-white { background: var(--ds-wine-white); }
.workbench-shell .st-type-dot.st-type-rose { background: var(--ds-wine-rose); }
.workbench-shell .st-type-dot.st-type-sparkling { background: var(--ds-wine-sparkling); }
.workbench-shell .st-type-dot.st-type-other { background: var(--ds-wine-other); }
.workbench-shell .st-card-columns { display: grid; gap: 0 28px; }
@media (min-width: 900px) {
  .workbench-shell .st-card-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.workbench-shell .st-prices { display: grid; margin: 0; }
.workbench-shell .st-prices > div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--ds-line); }
.workbench-shell .st-prices > div:first-child { border-top: 0; }
.workbench-shell .st-prices dt { color: var(--ds-text-muted); font-size: var(--ds-text-sm); }
.workbench-shell .st-prices dd { margin: 0; color: var(--ds-text-strong); font-weight: 600; font-variant-numeric: tabular-nums; }
.workbench-shell .st-bars { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.workbench-shell .st-bars > li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 10px; font-size: var(--ds-text-sm); }
.workbench-shell .st-bars span { min-width: 0; overflow: hidden; color: var(--ds-text); text-overflow: ellipsis; white-space: nowrap; }
.workbench-shell .st-bars b { color: var(--ds-text-muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.workbench-shell .st-bars progress { grid-column: 1 / -1; height: 5px; }

.workbench-shell .st-gap-list { display: grid; margin: 0; padding: 0; list-style: none; }
.workbench-shell .st-gap-list > li + li { border-top: 1px solid var(--ds-line); }
.workbench-shell .st-gap-list a { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: start; gap: 12px; padding: 11px 0; color: inherit; text-decoration: none; }
.workbench-shell .st-gap-list b { font-family: var(--ds-font-display); font-size: 1.45rem; line-height: 1.1; color: var(--ds-accent); text-align: right; font-variant-numeric: lining-nums tabular-nums; }
.workbench-shell .st-gap-list span { display: grid; gap: 2px; color: var(--ds-text-strong); font-weight: 600; }
.workbench-shell .st-gap-list small { color: var(--ds-text-muted); font-size: var(--ds-text-xs); font-weight: 400; }
.workbench-shell .st-gap-list a:hover span { color: var(--ds-accent); }

@media (max-width: 640px) {
  .workbench-shell .st-intro { flex-direction: column; align-items: stretch; gap: 12px; }
  .workbench-shell .st-intro .stat-window { align-self: stretch; }
  /* Five presets since 25 October 2026: the row scrolls sideways instead of
     squeezing them (flex: 0 0 auto above), and the form folds under it. */
  .workbench-shell .st-intro .stat-window a { text-align: center; }
  .workbench-shell .st-window-tools { justify-items: stretch; }
  .workbench-shell .stat-custom { justify-self: start; }
  .workbench-shell .st-figures { gap: 8px; }
  .workbench-shell .st-figures > div { padding: 12px; }
  .workbench-shell .st-card-figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workbench-shell .st-chart-plot { height: 120px; }
}
/* The page's own blocks on the content column like every panel, one rhythm
   of 16px between them; panels inside a pair take no column margin of their
   own. */
.workbench-shell .st-figures,
.workbench-shell .st-grid { max-width: 1440px; margin-inline: var(--content-gutter); }
.workbench-shell :is(.st-summary, .st-figures, .st-days, .st-grid, .st-card, .st-gaps, .tbc) { margin-top: 0; margin-bottom: 16px; }
.workbench-shell .st-grid > .panel { margin: 0; }
.workbench-shell .st-grid + .st-grid { margin-top: 0; }
@media (max-width: 640px) {
  .workbench-shell .st-grid { gap: 16px; }
}

/* Removing a wine for good (10 October 2026): quiet, under its editor, apart
   from saving; in the selection bar a text button after the two switches. */
.workbench-shell .wine-remove { display: flex; justify-content: flex-end; margin-top: 4px; }
.workbench-shell .bulk-bar-actions .danger-link { align-self: center; }

/* The step title on the card's top edge in Safari (11 October 2026).
   A fieldset that is a grid makes
   its legend a grid item, and WebKit then draws it on the border whatever its
   float says. As an ordinary block the floated legend is a first line inside
   the card in every browser; the gaps the grid gave are margins. */
.workbench-shell .dish-step { display: block; }
.workbench-shell .dish-step > legend { float: left; width: 100%; }
.workbench-shell .dish-step > :not(legend) + :not(legend) { margin-top: 14px; }
.workbench-shell .dish-step > legend + * { clear: both; margin-top: 0; }
/* Unlayered, so the hidden steps of the enhanced flow must be said again here. */
.workbench-shell .dish-flow-enhanced .dish-step:not(.is-active) { display: none; }

/* A label that names no grape (11 October 2026): what the appellation usually
   is, under the appellation, a tap per grape into the grapes field. */
.workbench-shell .grape-hint { grid-column: 1 / -1; padding: 12px 14px; border-radius: var(--ds-radius); background: var(--ds-surface-2); color: var(--ds-text); font-size: var(--ds-text-sm); }
.workbench-shell .grape-hint[hidden] { display: none; }
.workbench-shell .grape-hint p { margin: 0 0 8px; }
.workbench-shell .grape-hint-grapes { display: flex; flex-wrap: wrap; gap: 6px; }
.workbench-shell .grape-hint-grapes:empty { display: none; }
.workbench-shell .grape-hint-grape { min-height: 40px; padding: 6px 14px; border: 1px solid var(--ds-line-strong); border-radius: 999px; background: var(--ds-surface); color: var(--ds-text-strong); font-weight: 600; }
.workbench-shell .grape-hint-grape[aria-pressed="true"] { border-color: var(--ds-accent); background: var(--ds-accent-soft); color: var(--ds-accent); }
.workbench-shell .grape-hint-grape[aria-pressed="true"]::before { content: "✓ "; }
/* What the EU register permits beside the usual grapes (19 October 2026): a quieter row. */
.workbench-shell .grape-hint-allowed-label { flex-basis: 100%; margin-top: 6px; color: var(--ds-text-muted); font-size: 0.875rem; }
.workbench-shell .grape-hint-grape.is-allowed { min-height: 32px; padding: 4px 10px; border-color: var(--ds-line); font-weight: 500; }

/* Removing by swiping, and where the delete buttons stand (12 October 2026).
   On a touch screen a row marked data-swipe-row slides left under a finger
   and uncovers one red action (wireSwipeActions in app.js): it follows the
   finger with a little give past its width, a tap on it asks "Zeker?" in the
   row itself, a second tap removes, and the row folds away before the page
   answers. A vertical finger still scrolls. On a computer nothing is wired:
   the quiet red button lives in the dish's own editor and under a wine's
   editor, right-aligned under a hairline, apart from saving and cancelling.
   The dish list's own delete form is never shown; it exists for the swipe. */
.swipe-row { position: relative; overflow: hidden; touch-action: pan-y; }
.swipe-row > :not(.swipe-action) { transform: translateX(var(--swipe-x, 0px)); transition: transform 240ms cubic-bezier(0.2, 0.9, 0.25, 1.08); }
.swipe-row.is-swiping > :not(.swipe-action) { transition: none; }
.swipe-action {
  position: absolute; top: 0; right: 0; bottom: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  width: max(96px, calc(-1 * var(--swipe-x, 0px))); margin: 0; padding: 0 0 0 4px; border: 0;
  border-radius: inherit; background: var(--ds-danger); color: #fff; font: inherit; font-size: 12px; font-weight: 650; line-height: 1.1;
  opacity: 0; pointer-events: none; transition: opacity 120ms ease, background-color 160ms ease, width 240ms cubic-bezier(0.2, 0.9, 0.25, 1.08);
}
.swipe-action .ui-icon, .swipe-action svg { width: 22px; height: 22px; }
.swipe-row.is-swiping .swipe-action { transition: opacity 120ms ease; }
.swipe-row.is-open .swipe-action, .swipe-row.is-swiping .swipe-action { opacity: 1; }
.swipe-row.is-open .swipe-action { pointer-events: auto; }
.swipe-row.is-armed .swipe-action { background: color-mix(in srgb, var(--ds-danger) 82%, black); }
.swipe-row.is-removing { transition: max-height 260ms cubic-bezier(0.2, 0.7, 0.2, 1), opacity 180ms ease, margin 260ms ease; max-height: 0 !important; margin-top: 0 !important; margin-bottom: 0 !important; opacity: 0; pointer-events: none; }
.workbench-shell .dish-remove.dish-remove--swipe { display: none; }
.workbench-shell .wine-remove.wine-remove--swipe { display: none; }
.wine-remove, .dish-remove:not(.dish-remove--swipe) {
  display: flex; justify-content: flex-end; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--ds-line, var(--line));
}
.wine-remove .danger-link, .dish-remove .danger-link { margin: 0; }
@media (prefers-reduced-motion: reduce) {
  .swipe-row > :not(.swipe-action), .swipe-action, .swipe-row.is-removing { transition: none; }
}

/* The dish advice, row by row (14 October 2026: on a phone the notes ran
   off the card and the wine's name broke a word per line). The match stands in a column
   of its own; under the name the year and colour, and under those the
   notes, which wrap instead of pushing the name aside. */
.workbench-shell .dish-advice-list { gap: 0; overflow: hidden; border: 1px solid var(--ds-line); border-radius: var(--ds-radius-lg, 14px); background: var(--ds-surface); }
.workbench-shell .dish-advice-list > li.dish-advice-item { display: grid; grid-template-columns: 3.4rem minmax(0, 1fr); align-items: start; gap: 12px; padding: 12px 14px; border: 0; border-top: 1px solid var(--ds-line); border-radius: 0; font-size: 0.92rem; }
.workbench-shell .dish-advice-list > li.dish-advice-item:first-child { border-top: 0; }
.workbench-shell .dish-advice-list > li.is-perfect { background: color-mix(in srgb, var(--ds-accent) 5%, transparent); }
.workbench-shell .dish-advice-match { display: flex; align-items: baseline; justify-content: flex-end; gap: 1px; padding-top: 1px; font-family: var(--ds-font-display); font-size: 1.32rem; font-weight: 600; line-height: 1.1; color: var(--ds-accent); font-variant-numeric: tabular-nums; }
.workbench-shell .dish-advice-match small { font-family: var(--ds-font-body); font-size: 0.72rem; font-weight: 600; color: color-mix(in srgb, var(--ds-accent) 70%, var(--ds-text-muted)); }
.workbench-shell .dish-advice-match--chef { justify-content: center; align-self: center; width: 2.2rem; height: 2.2rem; justify-self: end; align-items: center; padding: 0; border-radius: 999px; background: var(--ds-accent-soft); font-size: 1rem; }
.workbench-shell .dish-advice-wine { display: grid; gap: 2px; min-width: 0; }
.workbench-shell .dish-advice-wine > strong { color: var(--ds-text-strong); font-weight: 600; line-height: 1.3; overflow-wrap: break-word; }
.workbench-shell .dish-advice-wine > small { color: var(--ds-text-muted); font-size: 0.78rem; }
.workbench-shell .dish-advice-notes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.workbench-shell .dish-advice-notes em { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-height: 26px; padding: 3px 4px 3px 10px; border-radius: 999px; background: var(--ds-accent-soft); color: var(--ds-accent); font-size: 0.74rem; font-style: normal; font-weight: 600; line-height: 1.25; }
.workbench-shell .dish-advice-notes em.dish-advice-chef { padding-right: 10px; background: var(--ds-accent); color: var(--ds-on-accent, #fff); }
.workbench-shell .dish-advice-notes em.dish-advice-relaxed { background: var(--ds-surface-sunken, color-mix(in srgb, var(--ds-text) 6%, transparent)); color: var(--ds-text-muted); }
.workbench-shell .dish-advice-info-toggle { flex: none; width: 20px; height: 20px; min-height: 0; border-color: var(--ds-line-strong); background: var(--ds-surface); }

/* How the sommelier chooses wine for the dish: automatically, or the chef's
   choices alone (14 October 2026). Two quiet cards in step 1. */
/* An example dish in step 1 (29 October 2026): one select, the line that
   says what it filled in, and the hint that it is a start. */
.workbench-shell .dish-template { display: grid; gap: 6px; margin: 16px 0 0; padding: 12px 14px 13px; border: 1px dashed var(--ds-line); border-radius: var(--ds-radius); background: var(--ds-surface-muted, var(--ds-surface)); }
.workbench-shell .dish-template > label { display: grid; gap: 6px; margin: 0; color: var(--ds-text-strong); font-size: 0.92rem; font-weight: 600; }
.workbench-shell .dish-template > label small { color: var(--ds-text-muted); font-size: 0.78rem; font-weight: 500; }
.workbench-shell .dish-template select { width: 100%; min-width: 0; font-weight: 500; }
.workbench-shell .dish-template-note { margin: 0; padding: 8px 11px; border-left: 2px solid var(--ds-accent); color: var(--ds-text-strong); font-size: 0.84rem; line-height: 1.45; }
.workbench-shell .dish-template-hint { margin: 0; color: var(--ds-text-muted); font-size: 0.78rem; line-height: 1.45; }
.workbench-shell .dish-mode { display: block; min-width: 0; margin: 18px 0 0; padding: 0; border: 0; }
.workbench-shell .dish-mode-options { display: grid; clear: both; gap: 8px; }
.workbench-shell .dish-mode > legend { float: left; width: 100%; margin: 0 0 8px; padding: 0; color: var(--ds-text-strong); font-size: 0.92rem; font-weight: 600; }
.workbench-shell .dish-mode-option { position: relative; display: block; cursor: pointer; }
.workbench-shell .dish-mode-option input { position: absolute; top: 15px; left: 14px; width: 18px; height: 18px; min-height: 0; margin: 0; accent-color: var(--ds-accent); }
.workbench-shell .dish-mode-option > span { display: grid; gap: 3px; padding: 12px 14px 12px 42px; border: 1px solid var(--ds-line); border-radius: var(--ds-radius); background: var(--ds-surface); transition: border-color .15s ease, box-shadow .15s ease; }
.workbench-shell .dish-mode-option > span strong { color: var(--ds-text-strong); font-size: 0.95rem; font-weight: 600; }
.workbench-shell .dish-mode-option > span small { color: var(--ds-text-muted); font-size: 0.8rem; line-height: 1.45; }
.workbench-shell .dish-mode-option input:checked + span { border-color: var(--ds-accent); box-shadow: inset 0 0 0 1px var(--ds-accent); }
.workbench-shell .dish-mode-option input:focus-visible + span { box-shadow: 0 0 0 3px var(--ds-accent-soft), inset 0 0 0 1px var(--ds-accent); }
@media (min-width: 700px) {
  .workbench-shell .dish-mode-options { grid-template-columns: 1fr 1fr; }
}
/* The count beside the advice is a small tag, not a full-width band on a phone. */
.workbench-shell .dish-advice .dish-section-heading > .dish-advice-count { align-self: flex-start; justify-self: start; width: fit-content; }

/* The sign on the sign-in pages ("01 Het teken" of DigiSomm Logo Set.pdf,
   14 October 2026), on the logo set's proportions with C the D's height:
   the drop as high as the wordmark, its line and the tagline together (2.2 C);
   the line 0.51 C under the baseline, the tagline 0.47 C under the line; the
   drop's distance in app/logo.svg's proportion (business/panflet-a6/kaart.html
   holds the same rules). */
/* One x-height between the drop and the D, as in app/logo.svg (0.64C to the lettering's box). */
body.entry-shell .auth-sign { --c: 17px; display: flex; align-items: flex-start; gap: calc(var(--c) * 0.64); }
body.entry-shell .auth-sign-drop { display: block; height: calc(var(--c) * 2.2); width: auto; margin-top: calc(var(--c) * 0.104); }
body.entry-shell .auth-sign-col { display: flex; flex-direction: column; align-items: flex-start; margin-top: 0; }
body.entry-shell .auth-sign .auth-logo { display: block; width: calc(var(--c) * 6.652); height: auto; }
body.entry-shell .auth-sign-rule { display: block; width: calc(var(--c) * 2.07); margin-top: calc(var(--c) * (0.51 - 0.334)); border-top: 1px solid #C595A1; }
body.entry-shell .auth-sign-tagline { display: block; margin-top: calc(var(--c) * 0.47 - var(--c) * 0.23 * 0.2); color: var(--ds-text-muted); font-size: calc(var(--c) * 0.23 / 0.7); font-weight: 500; line-height: 1; letter-spacing: 0.26em; text-transform: uppercase; white-space: nowrap; }
body.entry-shell .auth-brand { gap: 12px; }

/* --- Wijnkaartjes: the wine card's form, chosen in the house style ---------
   18 October 2026. One row per form with a small sketch of it drawn
   in CSS (three <i> per sketch), so the choice is seen before it is read. */
.card-style-choices { display: grid; gap: 8px; margin-top: 10px; }
.card-style-choice { display: grid; grid-template-columns: auto 46px minmax(0, 1fr); align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--ds-line); border-radius: var(--ds-radius); background: var(--ds-surface); cursor: pointer; }
.card-style-choice:has(input:checked) { border-color: var(--ds-accent); box-shadow: 0 0 0 1px var(--ds-accent); }
.card-style-choice input { margin: 0; accent-color: var(--ds-accent); }
.card-style-choice strong { display: block; font-size: 0.92rem; font-weight: 650; color: var(--ds-text-strong); }
.card-style-choice small { display: block; margin-top: 2px; font-size: 0.78rem; line-height: 1.35; color: var(--ds-text-muted); }
.card-style-sketch { position: relative; display: block; width: 46px; height: 58px; border: 1px solid var(--ds-line); border-radius: 6px; background: var(--ds-surface); overflow: visible; }
.card-style-sketch i { position: absolute; display: block; border-radius: 2px; background: color-mix(in srgb, var(--ds-accent) 22%, transparent); }
.card-style-sketch i:nth-child(1) { left: 7px; right: 14px; top: 9px; height: 5px; background: var(--ds-text-strong); opacity: .7; }
.card-style-sketch i:nth-child(2) { left: 7px; right: 7px; top: 22px; height: 3px; background: var(--ds-accent); }
.card-style-sketch i:nth-child(3) { left: 7px; right: 7px; top: 32px; height: 16px; background: repeating-linear-gradient(to bottom, color-mix(in srgb, var(--ds-accent) 30%, transparent) 0 2px, transparent 2px 5px); }
.card-style-sketch--ribbon i:nth-child(1) { left: -5px; right: 18px; top: 6px; height: 7px; background: var(--ds-accent); opacity: 1; border-radius: 0 2px 2px 0; }
.card-style-sketch--compare i:nth-child(3) { background:
  radial-gradient(circle at 25% 2px, var(--ds-accent) 2.3px, transparent 2.8px),
  radial-gradient(circle at 70% 8px, var(--ds-accent) 2.3px, transparent 2.8px),
  radial-gradient(circle at 45% 14px, var(--ds-accent) 2.3px, transparent 2.8px),
  linear-gradient(to bottom, transparent 1.3px, color-mix(in srgb, var(--ds-accent) 40%, transparent) 1.3px 2.7px, transparent 2.7px 7.3px, color-mix(in srgb, var(--ds-accent) 40%, transparent) 7.3px 8.7px, transparent 8.7px 13.3px, color-mix(in srgb, var(--ds-accent) 40%, transparent) 13.3px 14.7px, transparent 14.7px); }
.card-style-sketch--label { border-style: double; border-width: 3px; }
.card-style-sketch--label i:nth-child(1) { left: 10px; right: 10px; top: 12px; }
.card-style-sketch--label i:nth-child(2) { left: 18px; right: 18px; top: 24px; height: 1.5px; }
.card-style-sketch--label i:nth-child(3) { left: 9px; right: 9px; background: radial-gradient(circle, var(--ds-accent) 1.4px, transparent 1.8px) 0 0 / 5px 5px; height: 10px; top: 34px; }
.card-style-sketch--menu { border-width: 0; border-top: 1px solid var(--ds-line); border-bottom: 1px solid var(--ds-line); border-radius: 0; background: none; }
.card-style-sketch--menu i:nth-child(1) { right: 20px; top: 10px; height: 4px; }
.card-style-sketch--menu i:nth-child(2) { top: 24px; height: 0; border-top: 1.5px dotted var(--ds-text-muted); background: none; }
.card-style-sketch--menu i:nth-child(3) { top: 34px; height: 4px; background: var(--ds-text-strong); opacity: .6; right: 18px; }
.card-style-sketch--block i:nth-child(1) { inset: 0 0 auto 0; height: 26px; border-radius: 5px 5px 0 0; background: var(--ds-accent); opacity: 1; }
.card-style-sketch--block i:nth-child(2) { left: 7px; right: 7px; top: 32px; height: 4px; background: var(--ds-text-strong); opacity: .6; }
.card-style-sketch--block i:nth-child(3) { top: 42px; height: 8px; background: repeating-linear-gradient(to right, var(--ds-accent) 0 5px, transparent 5px 7px); }
.logo-colours .logo-house-style { justify-self: start; margin-top: 6px; }
.logo-colours .logo-house-style-said { color: var(--ds-text); font-size: 0.82rem; }

/* A closed wine carries no editor (22 October 2026); the slot holds its place
   while the row is fetched, and is the link to it without script. */
.wine-editor-slot { padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface-muted); }
.wine-editor-slot.is-loading { min-height: 120px; }
.wine-editor-slot.is-loading > a { visibility: hidden; }

/* Zoeken (23 October 2026): one search field, the wine's guest card with its
   two buttons, and the light result rows under it, at a reading width. */
.workbench-shell .wine-search { max-width: 640px; }
.workbench-shell .wine-search-form { margin: 0 0 var(--ds-space-4, 16px); }
.workbench-shell .wine-search-field { display: block; position: relative; }
.workbench-shell .wine-search-field > .ui-icon { position: absolute; top: 50%; left: 14px; width: 18px; height: 18px; transform: translateY(-50%); color: var(--ds-text-muted); pointer-events: none; }
.workbench-shell .wine-search-field input { width: 100%; min-height: 50px; padding: 0 16px 0 44px; font-size: 16px; color: var(--ds-text-strong); background: var(--ds-surface); border: 1px solid color-mix(in srgb, var(--ds-line-strong) 55%, var(--ds-surface)); border-radius: var(--ds-radius-pill, 999px); }
.workbench-shell .wine-search-card { display: grid; justify-items: start; gap: 14px; margin: 0 0 22px; }
.workbench-shell .wine-search-card > .wc-frame { width: 342px; max-width: 100%; }
.workbench-shell .wine-search-review { display: grid; gap: 10px; width: 342px; max-width: 100%; }
.workbench-shell .wine-search-review .confirm-form { margin: 0; padding: 0; border: 0; background: none; }
.workbench-shell .wine-search-review .confirm-form button { width: 100%; min-height: 46px; }
.workbench-shell .wine-search-review .correction-link { margin: 0; text-align: center; }
.workbench-shell .wine-search-elsewhere { margin: 0; font-size: var(--ds-text-sm); }
.workbench-shell .wine-search-count { margin: 0 0 6px; color: var(--ds-text-muted); font-size: var(--ds-text-2xs); }
.workbench-shell .wine-search-count:empty { display: none; }
.workbench-shell .wine-search-hits { margin: 0; padding: 0; list-style: none; background: var(--ds-surface); border: 1px solid var(--ds-line); border-radius: 16px; overflow: hidden; }
.workbench-shell .wine-search-hits:not(:has(> li:not([hidden]))) { display: none; }
.workbench-shell .wine-search-hits > li + li > a { border-top: 1px solid var(--ds-line); }
.workbench-shell .wine-search-hits a { display: grid; grid-template-columns: 12px minmax(0, 1fr) 16px; align-items: center; gap: 12px; min-height: 58px; padding: 10px 14px; color: inherit; text-decoration: none; }
.workbench-shell .wine-search-hits a[aria-current="true"] { background: var(--ds-accent-soft); }
.workbench-shell .wine-search-hits a > .ui-icon { width: 16px; height: 16px; color: var(--ds-text-muted); }
.workbench-shell .wine-search-hit-copy { display: grid; gap: 2px; min-width: 0; }
.workbench-shell .wine-search-hit-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ds-text-strong); font-weight: 600; }
.workbench-shell .wine-search-hit-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ds-text-muted); font-size: var(--ds-text-2xs); }
/* The page's own blocks keep the gutter every page keeps (the title has its own). */
.workbench-shell .wine-search > :is(.wine-search-form, .wine-search-card, .wine-search-count, .wine-search-hits, .hint) { margin-inline: var(--ds-gutter); }
