@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@400;500;600&display=swap");

@layer reset, base, components, utilities;

@layer reset {
  * {
    box-sizing: border-box;
  }
}

@layer base {
  :root {
    /* Refactoring UI palette 6: warm greys, red primary, lime for success. */
    --red-050: #ffeeee;
    --red-100: #facdcd;
    --red-500: #ba2525;
    --red-700: #911111;
    --red-800: #780a0a;
    --red-900: #610404;
    --warm-grey-050: #faf9f7;
    --warm-grey-100: #e8e6e1;
    --warm-grey-300: #b8b2a7;
    --warm-grey-500: #857f72;
    --warm-grey-600: #625d52;
    --warm-grey-900: #27241d;
    --lime-green-100: #e2f7c2;
    --lime-green-900: #2b4005;

    --paper: var(--warm-grey-050);
    --ink: var(--warm-grey-900);
    --muted: var(--warm-grey-600);
    --accent: var(--red-700);
    --accent-strong: var(--red-800);
    --danger: var(--red-500);
    --line: var(--warm-grey-100);
    --white: #ffffff;
    /* Page rhythm: after a title, and between a page's sections. */
    --control-radius: 4px;
    /* Read-only table values and ordinary form inputs share one type style. */
    --value-font: 400 1rem/1.6 "DM Sans", sans-serif;
    --h1-size: clamp(2.25rem, 4vw, 3.5rem);
    --title-gap: 2rem;
    --section-gap: clamp(3rem, 6vw, 4.5rem);
    --header-height: 76px;

    @media (max-width: 900px) {
      --header-height: 112px;
    }
  }
  html {
    scroll-behavior: smooth;
  }
  body {
    --lexxy-radius: var(--control-radius);
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font:
      16px/1.6 "DM Sans",
      sans-serif;
  }
  a {
    color: inherit;
    text-decoration: none;

    &:hover {
      color: var(--accent);
    }
  }
  :where(
    button,
    input:not([type="checkbox"]):not([type="radio"]),
    textarea,
    select
  ) {
    border-radius: var(--control-radius);
  }
  textarea {
    resize: vertical;
  }
  img {
    display: block;
    max-width: 100%;
    object-fit: cover;
    border-radius: var(--control-radius);
  }
  h1,
  h2,
  h3 {
    font-family: "Playfair Display", Georgia, serif;
    font-weight: 500;
    line-height: 1.15;
  }
  h1 {
    font-size: var(--h1-size);
    letter-spacing: -0.045em;
    margin: 0.2em 0 0.35em;
  }
  h2 {
    font-size: clamp(2rem, 4vw, 3.4rem);
    letter-spacing: -0.03em;
    margin: 0.3em 0 1em;
  }
  h3 {
    font-size: 1.45rem;
    margin: 0.5em 0;
  }
  p {
    margin: 0.7em 0 1.2em;
  }
  small {
    color: var(--muted);
  }
}

@layer components {
  .site-header {
    height: var(--header-height);
    background: var(--paper);
    border-bottom: 1px solid var(--line);
  }
  .header-inner {
    max-width: 1440px;
    height: 100%;
    margin: auto;
    padding: 0 4.5%;
    display: flex;
    align-items: center;
    gap: 2rem;

    @media (max-width: 900px) {
      flex-wrap: wrap;
      gap: 1rem;
    }
  }
  .wordmark {
    font:
      600 1.45rem/1 "Playfair Display",
      Georgia,
      serif;
    white-space: nowrap;
  }
  nav {
    display: flex;
    gap: clamp(0.7rem, 2vw, 2rem);
    margin: 0 auto;

    @media (max-width: 900px) {
      order: 3;
      width: 100%;
      overflow-x: auto;
      gap: 1.3rem;
      padding: 0.4rem 0;
    }
  }
  .header-actions {
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
  }
  .header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;

    @media (max-width: 900px) {
      margin-left: auto;
    }
  }
  .header-actions .active {
    background: rgba(145, 17, 17, 0.1);
    color: var(--accent);
  }
  .header-actions form {
    display: contents;
    margin: 0;
  }
  .app-shell {
    display: flex;
    flex-direction: column;
    min-height: calc(100dvh - var(--header-height));
  }
  main {
    display: flex;
    flex: 1;
    flex-direction: column;
  }
  .hero {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    min-height: min(680px, 75vh);

    @media (max-width: 900px) {
      grid-template-columns: 1fr;
    }
  }
  .hero-image {
    background: var(--warm-grey-500);
    min-height: 400px;
    overflow: hidden;

    @media (max-width: 900px) {
      height: 55vh;
    }
  }
  .hero-image img {
    width: 100%;
    height: 100%;
  }
  /* Keep the hero's title actions tied to its heading. */
  .hero-content {
    padding: clamp(3rem, 8vw, 8rem) clamp(2rem, 7vw, 8rem);
    align-self: center;
    max-width: 760px;

    .heading-row {
      margin-bottom: 0.6rem;

      h1 {
        margin-bottom: 0.15em;
      }
    }

    > p {
      max-width: 45ch;
      color: var(--muted);
    }

    .hero-tagline {
      font:
        400 clamp(1.3rem, 2.5vw, 2rem)/1.35 "Playfair Display",
        Georgia,
        serif;
      color: var(--accent) !important;
    }

    @media (max-width: 900px) {
      padding: 3rem 5%;
    }
  }
  /* The home hero edited in place: each text keeps its own look as an input. */
  turbo-frame#home_hero {
    display: block;
  }
  .hero-image {
    view-transition-name: home-image;
  }
  .hero-content .section-heading > :first-child {
    view-transition-name: home-title;
  }
  .hero-origin {
    view-transition-name: home-origin;
  }
  .hero-tagline-text {
    view-transition-name: home-tagline;
  }
  .hero-introduction-text {
    view-transition-name: home-introduction;
  }
  ::view-transition-group(home-image),
  ::view-transition-group(home-title),
  ::view-transition-group(home-origin),
  ::view-transition-group(home-tagline),
  ::view-transition-group(home-introduction) {
    animation-duration: 0.4s;
    animation-timing-function: cubic-bezier(0.2, 0, 0, 1);
  }
  .hero-image-editor {
    display: grid;
    min-width: 0;
    grid-template-rows: minmax(400px, 1fr) auto;
    gap: 0;
    height: auto;
    background: var(--warm-grey-100);

    > .language-fields {
      padding: 1rem;
    }
  }
  .image-editor {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border-radius: var(--control-radius);

    > img {
      position: absolute;
      inset: 0;
      object-fit: cover;
    }

    > img[hidden] {
      display: none;
    }

    &.is-dragging .image-editor-drop-hint {
      display: grid;
    }
  }
  /* Shown over the image while a file is dragged onto the editor. */
  /* The dashed border sits inside the image's edges; the label is a button-like box. */
  .image-editor-drop-hint {
    position: absolute;
    inset: 0;
    display: none;
    place-items: center;
    margin: 0;
    padding: 0.5rem;
    pointer-events: none;

    /* A light line whose dashes each cast a dark shadow, so it reads on any photo. */
    &::before {
      position: absolute;
      inset: var(--drop-line-inset, 0.75rem);
      border: var(--drop-line-width, 2px) dashed #fff;
      filter: drop-shadow(0 0 1.5px rgba(0, 0, 0, 0.9));
      content: "";
    }

    > span {
      padding: 0.35rem 0.75rem;
      background: rgba(0, 0, 0, 0.8);
      color: #fff;
      font:
        700 0.8rem/1.2 "DM Sans",
        sans-serif;
      text-align: center;
      text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    }
  }
  .image-editor-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
    left: 1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
  }
  .image-editor:not(.menu-item-image-editor) .image-editor-actions {
    left: auto;
    width: max-content;
    max-width: calc(100% - 2rem);
    padding: 0.5rem;
    border: 1px solid var(--line);
    border-radius: var(--control-radius);
    background: var(--paper);
  }
  .image-editor [hidden] {
    display: none;
  }
  /* A dish photo is too small to overlay its buttons: they sit below it, and beside it
     once the dish stacks on small screens. */
  .image-editor.menu-item-image-editor {
    display: grid;
    flex: 0 0 auto;
    align-content: start;
    gap: 0.5rem;
    width: 11rem;
    overflow: visible;

    > img,
    > .menu-item-photo-placeholder {
      position: static;
      width: 100%;
    }

    /* The image, its placeholder and the drop hint share one cell. */
    > img,
    > .menu-item-photo-placeholder,
    > .image-editor-drop-hint {
      grid-area: 1 / 1;
    }

    > .image-editor-drop-hint {
      position: relative;
      --drop-line-inset: 0.5rem;
    }

    .image-editor-actions {
      position: static;
      flex-direction: column;
      flex-wrap: nowrap;
      align-items: stretch;

      .ui-button {
        justify-content: flex-start;
      }
    }

    @media (max-width: 600px) {
      grid-template-columns: clamp(3.5rem, 12vw, 5rem) minmax(0, 1fr);
      align-items: start;
      width: 100%;

      > .image-editor-drop-hint {
        padding: 0.35rem;
        --drop-line-inset: 0.2rem;
        --drop-line-width: 1px;

        > span {
          padding: 0.15rem 0.2rem;
          font-size: 0.6rem;
        }
      }

      .image-editor-actions {
        grid-column: 2;
        grid-row: 1;
        align-items: flex-start;
      }
    }
  }
  .hero.hero-editor {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 0;

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

    .hero-image-editor {
      height: auto;
    }
    .section-heading > div:first-child {
      min-width: 0;
      flex: 1 1 100%;
    }
  }
  .hero-editor .hero-content {
    display: grid;
    gap: 1.25rem;
  }
  .language-fields {
    display: grid;
    min-width: 0;
    gap: 0.5rem;

    .note-field {
      display: flex;
      min-width: 0;
      align-items: flex-start;
    }

    .ui-input {
      flex: 1 1 auto;
      min-width: 0;
    }
  }
  .button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2rem;
  }
  .page {
    align-self: center;
    width: min(100%, 1220px);
    padding: clamp(3.5rem, 8vw, 7rem) 5%;
  }
  .page.narrow {
    width: min(100%, 850px);
  }
  /* Every edit form shares one width, wide enough for two rich text editors
   side by side without their toolbars collapsing into an overflow menu. */
  .page.form-page {
    width: min(100%, 1080px);
  }
  /* A narrow column shouldn't carry display-sized section headings; at 3.4rem
   they crowd out the action button beside them. */
  .page.narrow h2 {
    font-size: clamp(1.75rem, 3vw, 2.4rem);
  }
  .breadcrumb {
    margin-bottom: 2rem;
  }
  .breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.15rem 0.55rem;
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .breadcrumb li {
    display: flex;
    align-items: baseline;
    gap: 0.55rem;
    color: var(--muted);
  }
  .breadcrumb li + li::before {
    content: "/";
    color: var(--line);
  }

  .breadcrumb [aria-current="page"] {
    color: var(--ink);
    font-weight: 600;
  }
  .heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
  }
  .heading-row h1,
  .heading-row h2 {
    margin: 0;
  }
  .page-title-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 0 0 var(--title-gap);
  }
  .page-title-actions:empty {
    display: none;
  }
  /* A page is a breadcrumb, an h1 (with its actions), then sections. A section
     holds an optional h2 and its content. Only these rules space them; the title
     gap has zero specificity so a component can still override it. */
  :where(.page, .news-post-content) > :where(h1, .heading-row),
  :where(.page, .menu-categories)
    > section
    > :where(h2:first-child, .heading-row:first-child),
  :where(.page > .inline-editor)
    > section
    > :where(h2:first-child, .heading-row:first-child),
  :where(.page)
    > section
    > turbo-frame
    > :where(h2:first-child, .heading-row:first-child) {
    margin: 0 0 var(--title-gap);
  }
  .page > section + section,
  .page > section + .menu-categories,
  .page > .menu-categories + section,
  .menu-categories > section + section {
    margin-top: var(--section-gap);
  }
  .page > section > :first-child,
  .page > section > turbo-frame > :first-child {
    margin-top: 0;
  }
  .page > section > :last-child,
  .page > section > turbo-frame > :last-child {
    margin-bottom: 0;
  }
  /* An owner-editable section wraps its content in a turbo frame. */
  .page > section > turbo-frame {
    display: block;
  }
  /* The owner's edit button sits right beside the section title. */
  .section-heading {
    justify-content: flex-start;
    gap: 1rem;
  }
  /* Nudged down so the buttons sit level with the serif title's letters, not its line box. */
  .section-heading > :not(h2) {
    margin-top: 0.4rem;
  }

  .heading-with-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.3em;

    .icon {
      width: 0.45em;
      height: 0.45em;
      flex-shrink: 0;
      margin-top: 0.4rem;
    }
  }
  .heading-with-icon .heading-icon-tooltip {
    position: static;
    display: inline-flex;
    flex-shrink: 0;
    width: 0.45em;
    height: 0.45em;
    margin-top: 0.4rem;

    > .icon {
      width: 100%;
      height: 100%;
      margin-top: 0;
    }
    .tooltip {
      right: auto;
      left: 0;
      max-width: min(20rem, calc(100vw - 3rem));
      white-space: normal;
    }
  }
  .feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 8%;
    border-bottom: 1px solid var(--line);

    @media (max-width: 600px) {
      grid-template-columns: 1fr;
      row-gap: var(--section-gap);
    }
  }
  .feature-grid > section + section {
    margin-top: 0;
    border-left: 1px solid var(--line);
    padding-left: 12%;

    @media (max-width: 600px) {
      border-left: 0;
      border-top: 1px solid var(--line);
      padding: 2rem 0 0;
    }
  }
  .large {
    font:
      2rem "Playfair Display",
      Georgia,
      serif;
  }

  /* A form action can read as a text link; drop the native button chrome. */

  /* Rows carry no bottom margin, so a link that follows one needs its own. */
  .preview-row + .ui-link,
  .hours-row + .ui-link {
    margin-top: 1.5rem;
  }
  .large + .ui-link.with-arrow {
    margin-top: 0.5rem;
  }
  .icon {
    width: 1.05em;
    height: 1.05em;
    flex: none;
  }
  .icon-mask {
    display: inline-block;
    background-color: currentColor;
    mask-position: center;
    mask-repeat: no-repeat;
    mask-size: contain;
    -webkit-mask-position: center;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: contain;
  }

  /* Quiet actions share one square, background-hover treatment. Add .bordered
   where an action needs an outline; .button remains the large CTA style. */

  /* State, not an action: same icon-and-text shape as a button, no border. */

  .locale-button {
    padding: 0;

    &.active {
      background: transparent;
    }
  }

  /* An open-ended dish label (dietary, daily offer...): lighter than a badge,
   since there is no fixed set and a dish may carry several. */

  .tag-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.5rem 0;
  }
  .tag-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .menu-filter-bar {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem 1.5rem;

    > .tag-filters {
      flex: 1 1 0;
      min-width: 0;
    }
  }

  .menu-reorder-hint {
    margin-top: 2rem;
  }

  .tag-filter:focus-visible,
  .clear-tag-filters:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }
  .clear-tag-filters {
    flex: 0 0 auto;
    margin-left: auto;
    color: var(--muted);
  }
  .no-filter-results {
    color: var(--muted);
  }
  .row-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    color: var(--muted);
  }
  /* button_to wraps its button in a form; let the button be the flex item. */
  .row-actions form {
    display: contents;
    margin: 0;
  }
  .row-actions button {
    font-family: inherit;
  }
  .row-actions .ui-link {
    margin-top: 0;
  }
  /* A row's value followed by its edit actions, spaced instead of separated. */
  .row-end {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
  }
  .row-end form {
    display: contents;
    margin: 0;
  }
  .row-end button {
    font-family: inherit;
  }
  /* Development gallery: arrange specimens without restyling their controls. */
  .dev-gallery > section {
    scroll-margin-top: var(--header-height);
  }
  .dev-gallery-index,
  .dev-samples {
    display: grid;
    gap: 1.5rem;
  }
  .dev-gallery-index {
    margin-bottom: var(--section-gap);
    grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  }
  .dev-samples {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  }
  .dev-sample {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    min-width: 0;
    padding: 1.25rem;
    border: 1px solid var(--line);
    border-radius: var(--control-radius);

    > code {
      color: var(--muted);
      font-size: 0.8rem;
      overflow-wrap: anywhere;
    }
  }
  .table-value {
    font: var(--value-font);
    font-variant-numeric: tabular-nums;
  }
  .preview-row,
  .hours-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    border-bottom: 1px solid var(--line);
    padding: 0.8rem 0;
    margin: 0;
  }
  .preview-row span:last-child,
  .hours-row .table-value {
    white-space: nowrap;
  }
  .cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;

    @media (max-width: 600px) {
      grid-template-columns: 1fr;
    }
  }
  .card img {
    width: 100%;
    aspect-ratio: 1.65;
    margin-bottom: 0;
  }
  .news-card-image {
    display: block;
  }
  .card :is(h2, h3) {
    font-size: 1.75rem;
  }
  .menu-heading-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .menu-category > .heading-row {
    flex-wrap: nowrap;
  }
  .draft-category-group > h3 {
    margin: 1.5rem 0;
    font-size: 1.1rem;
  }
  /* Each dish is one row: a square thumbnail on the left, the text beside it. */
  .menu-page > .section-heading {
    view-transition-name: menu-heading;
  }
  .hours-page-editor > .section-heading > h1,
  .hours-page > .section-heading > h1 {
    width: fit-content;
    view-transition-name: hours-title;
  }
  .page > .section-heading,
  .news-post-content > .section-heading,
  .section-heading:has(> h1),
  .hero-content > .section-heading,
  .news-editor-form > .section-heading {
    flex-direction: column;
    align-items: flex-start;
  }
  .hours-page-editor .inline-editor {
    display: grid;
    gap: var(--section-gap);
  }
  .menu-editor-page .menu-category > .heading-row {
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .menu-page-editor .menu-title-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;

    .note-field {
      min-width: 0;
      flex-direction: column;
      align-items: stretch;
    }

    .note-language {
      font:
        400 1rem/1.4 "DM Sans",
        sans-serif;
      letter-spacing: 0;
    }

    @media (max-width: 900px) {
      grid-template-columns: minmax(0, 1fr);
    }
  }
  .menu-page-editor .menu-category > .section-heading > h2 {
    flex: 1;
    min-width: 0;
  }
  .menu-edit-item-heading {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
  }
  .menu-edit-item-text {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    flex: 1;
    min-width: 0;

    .menu-edit-item-names,
    .language-fields {
      display: contents;
    }

    .note-field {
      min-width: 0;
      flex-direction: column;
      align-items: stretch;
    }

    @media (max-width: 900px) {
      grid-template-columns: minmax(0, 1fr);
    }
  }
  .menu-row-delete {
    flex-shrink: 0;
  }
  .menu-page-editor .menu-row-delete {
    margin-top: calc(1.4rem + 0.4rem);
  }
  /* A tag row is a dish row with the icon picker in the photo's place. */
  .tags-editor .tag-icon-field {
    flex: 0 0 13rem;
    flex-direction: column;
    align-items: stretch;
    min-width: 0;

    .note-language {
      font:
        400 1rem/1.4 "DM Sans",
        sans-serif;
    }

    @media (max-width: 600px) {
      flex-basis: 100%;
    }
  }
  .tags-editor .menu-edit-item-heading {
    display: grid;
    grid-template-columns: 13rem minmax(0, 1fr) minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;

    .menu-edit-item-text,
    .menu-edit-item-names,
    .language-fields {
      display: contents;
    }

    .note-field {
      min-width: 0;
    }

    .menu-row-delete {
      margin-top: 0;
    }
  }
  .tags-editor .tag-column-labels {
    display: grid;
    grid-template-columns: 13rem minmax(0, 1fr) minmax(0, 1fr) 2rem;
    gap: 1rem;
  }
  .tags-editor .menu-item-name-input,
  .tags-editor .tag-column-labels {
    font: var(--value-font);
    letter-spacing: normal;
  }
  .tags-editor .tag-row .note-language {
    display: none;
  }
  @media (max-width: 600px) {
    .tags-editor .tag-column-labels {
      display: none;
    }
    .tags-editor .menu-edit-item-heading {
      grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
      gap: 0.75rem;

      .tag-icon-field {
        display: contents;

        > .note-language {
          grid-area: 1 / 1;
        }

        > .autocomplete,
        > .autocomplete-control {
          grid-area: 2 / 1 / auto / -1;
        }
      }

      .menu-row-delete {
        grid-area: 1 / 2;
        justify-self: end;
      }

      .language-fields > .note-field {
        grid-row: 3;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0.4rem;
      }
    }
    .tags-editor .tag-row .note-language {
      display: block;
      font:
        400 1rem/1.4 "DM Sans",
        sans-serif;
    }
  }
  .menu-category-add-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
  }
  .menu-page-editor .menu-category {
    margin-bottom: var(--section-gap);
  }
  .menu-page-editor .menu-category:last-of-type {
    margin-bottom: 0;
  }
  .menu-edit-item-body {
    display: grid;
    flex: 1;
    min-width: 0;
    gap: 1rem;
  }
  input.ui-input.menu-price-input {
    width: 8ch;
  }
  .menu-edit-item-options,
  .menu-edit-item-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.5rem;
  }
  .menu-edit-item-tags {
    padding: 0;
    margin: 0;
    border: 0;
  }
  @media (max-width: 600px) {
    .menu-edit-item {
      flex-direction: column;
    }
    .menu-edit-item-body {
      width: 100%;
    }
    .menu-page-editor .language-fields .note-field {
      flex-direction: column;
      align-items: stretch;
    }
  }
  .menu-item {
    display: flex;
    align-items: flex-start;
    gap: clamp(0.75rem, 3vw, 1.25rem);
    padding: 1rem 0;
  }
  .menu-list > .menu-item:not(:last-child) {
    border-bottom: 1px solid var(--line);
  }
  .menu-item-photo {
    flex: 0 0 auto;
    display: block;
    width: clamp(3.5rem, 12vw, 5rem);
    aspect-ratio: 1;
    object-fit: cover;
  }
  .menu-item-photo.menu-item-photo-placeholder .icon {
    width: 1.5rem;
    height: 1.5rem;
  }
  /* The body reads as one line: title, its tag filters, owner actions, price.
   The heading wrappers step aside so the row can order their children itself. */
  .menu-item-body {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 0.75rem;
    min-width: 0;
  }
  .menu-item-body .menu-item-heading,
  .menu-item-body .menu-item-title-actions {
    display: contents;
  }
  .menu-item-body .menu-item-title-actions .row-actions {
    order: 2;
  }
  .menu-item-body .menu-item-price {
    order: 3;
    margin-left: auto;
  }
  .menu-item-tags {
    order: 1;
    gap: 0.15rem;
    margin: 0;
  }
  /* Matching tags get a distinct filled background beside the dish title. */
  .menu-item-body .menu-item-description {
    display: -webkit-box;
    order: 4;
    flex: 0 0 100%;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
  }
  body:has(.image-popover:popover-open) {
    overflow: hidden;
  }
  .image-popover-trigger {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;

    &:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 3px;
    }
  }
  .image-popover {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 4rem clamp(1rem, 4vw, 4rem) 1rem;
    border: 0;
    background: var(--paper);
    cursor: default;

    &:popover-open {
      display: grid;
      place-items: center;
    }

    > img {
      width: auto;
      height: auto;
      max-width: 100%;
      max-height: 100%;
      min-height: 0;
      object-fit: contain;
    }

    .image-popover-close {
      position: absolute;
      top: 1rem;
      right: 1rem;
      width: 44px;
      height: 44px;
      background: var(--paper);
    }
  }
  .menu-item-photo-placeholder {
    border-radius: var(--control-radius);
    display: grid;
    place-items: center;
    background: rgba(145, 17, 17, 0.08);
    color: var(--accent);

    .icon {
      width: clamp(2rem, 8vw, 3.5rem);
      height: clamp(2rem, 8vw, 3.5rem);
      stroke-width: 1.25;
    }
  }
  .menu-item-heading {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
  }
  .menu-item-title-actions {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.35rem;
    min-width: 0;

    h3 {
      flex: 0 1 auto;
      min-width: 0;
      margin: 0.3rem 0;
    }
  }
  .menu-overflow-actions {
    position: relative;
    flex: 0 0 auto;

    > button:focus-visible,
    > button:has(+ [popover]:popover-open) {
      border-color: var(--accent);
      background: rgba(145, 17, 17, 0.1);
      color: var(--accent);
    }
  }
  .menu-overflow-actions-menu {
    position: absolute;
    position-area: bottom span-left;
    z-index: 2;
    margin: 0.35rem 0 0;
    min-width: 10rem;
    padding: 0.35rem;
    border: 1px solid var(--line);
    background: var(--white);
    box-shadow: 0 0.5rem 1.25rem rgba(39, 36, 29, 0.12);

    &:popover-open {
      display: flex;
      flex-direction: column;
      gap: 0.15rem;
    }
  }
  .menu-category-actions {
    margin-left: auto;
  }
  [data-menu-reorder-sortable] > .menu-item,
  [data-menu-reorder-sortable] > [data-menu-tag-id],
  [data-menu-reorder-sortable] > .menu-category > .heading-row {
    cursor: grab;

    /* A long press starts a drag on touch screens, so it must not select text or open the link callout. */
    @media (pointer: coarse) {
      -webkit-touch-callout: none;
      user-select: none;
    }
  }
  .is-menu-reordering,
  .is-menu-reordering * {
    cursor: grabbing !important;
    user-select: none;
  }
  .menu-page:has(.menu-categories.is-sorting) .menu-drafts {
    display: none;
  }
  .menu-list[data-menu-reorder-sortable]:not(:has(> .menu-item)) {
    min-height: 4rem;
    border: 2px dashed var(--line);
  }
  .menu-item.is-drag-source,
  .menu-category.is-drag-source {
    outline: 2px dashed var(--accent);
    outline-offset: 0.5rem;

    > * {
      opacity: 0.3;
    }
  }
  .menu-categories.is-sorting {
    > .menu-category {
      margin-top: 0.75rem;
      padding: 0.75rem 1rem;
      border: 1px solid var(--line);
      background: var(--white);
    }

    &:not(.is-folding) > .menu-category > :not(.heading-row) {
      display: none;
    }

    &:not(.is-folding) > .menu-category > .heading-row {
      margin-bottom: 0;
    }
  }
  /* While sections fold or open, their contents stay rendered and are clipped to the animated height. */
  .menu-categories.is-folding > .menu-category {
    overflow: clip;
  }
  .menu-page > .menu-reorder-ghost {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10;
    margin: 0;
    background: var(--white);
    box-shadow:
      0 0 0 0.75rem var(--white),
      0 1rem 2.5rem 0.75rem rgba(39, 36, 29, 0.22);
    pointer-events: none;

    &.menu-category {
      padding: 0.75rem 1rem;
      border: 1px solid var(--accent);
      box-shadow: 0 1rem 2.5rem rgba(39, 36, 29, 0.22);

      > .heading-row {
        margin-bottom: 0;
      }
    }
  }
  .menu-move-dialog {
    width: min(28rem, calc(100% - 2rem));
    padding: 1.5rem;
    border: 1px solid var(--line);
    background: var(--white);
    color: var(--ink);
    box-shadow: 0 1rem 3rem rgba(39, 36, 29, 0.25);

    &::backdrop {
      background: rgba(39, 36, 29, 0.45);
    }

    h2 {
      margin-top: 0;
    }

    select {
      width: 100%;
    }

    .row-actions {
      justify-content: flex-end;
      margin-top: 1.5rem;
    }
  }
  /* Badges ride along with the title, so they must not inherit its serif size. */
  .menu-item-title-actions h3 .badge {
    vertical-align: middle;
    margin-left: 0.15rem;
  }
  @media (max-width: 600px) {
    .menu-page > .heading-row {
      align-items: flex-start;
      gap: 1rem;
    }
    .menu-item-heading {
      align-items: flex-start;
      gap: 0.5rem;
    }
    .menu-item-title-actions h3 {
      overflow-wrap: anywhere;
    }
  }
  .menu-item-price {
    white-space: nowrap;
  }
  .menu-item p {
    color: var(--muted);
    margin: 0.3rem 0;
  }
  /* An editable section's form: the guest rows with inputs in place of their text. */
  .inline-editor,
  .inline-editor-body {
    display: grid;
    gap: 1.4rem;

    .hours-list {
      margin: 0;
    }
  }
  .week-edit-row .week-hours {
    flex-wrap: wrap;
    justify-content: flex-end;
    column-gap: 0;

    .badge {
      margin-right: 0.6rem;
    }
  }
  /* In the week editor a special date continues its weekday's row: no divider
     between them, and today's tint carries on. */
  .week-row.has-special {
    padding-bottom: 0.25rem;
    border-bottom: 0;
  }
  .week-row.has-special + .special-edit-row {
    padding-top: 0.25rem;
  }
  .week-row.today + .special-edit-row {
    background: rgba(145, 17, 17, 0.06);
  }
  .week-day > .badge {
    justify-self: start;
  }
  /* A special date: its delete button first, then the guest row, with the notes
     on their own line under the date and times. */
  .week-row.special-edit-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.35rem 1rem;

    > .week-day {
      grid-area: 1 / 1;
    }

    > .week-hours {
      grid-area: 1 / 2;
    }

    /* The delete button closes the row, after the times. */
    > .hours-remove-action {
      grid-area: 1 / 3;
    }

    &:has(> .hours-remove-action) {
      grid-template-columns: minmax(0, 1fr) auto auto;
    }
  }
  /* A special date's delete button keeps a light tint, so it reads as a button
     at rest too; hover deepens it. */
  /* Adding a day is the list's last row. */
  .hours-list > .add-row-button {
    width: 100%;
    height: auto;
    justify-content: flex-start;
    padding: 0.75rem;
    border: 0;
    border-bottom: 1px dashed var(--line);
  }
  /* "Closed" sits before the times; when ticked, the times are ignored on save. */
  .time-range {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 0.75rem;
  }
  .time-range-inputs > .hours-time-input {
    width: 9rem;
    flex: none;
  }
  .hours-date-input {
    width: 10.5rem;
  }
  /* From and to always stay on one line. */
  .time-range-inputs {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
  }
  .special-edit-notes {
    display: flex;
    grid-column: 1 / -1;
    flex-wrap: wrap;
    gap: 0.35rem 1.5rem;

    .note-field {
      flex: 1;
      min-width: 0;
    }
  }
  /* A note input with its two-letter language label on the same line. */
  .note-field {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
  }
  .note-language {
    color: var(--muted);
  }
  /* Edit rows never wrap on their own: each layout switches at an explicit
     width of the editor itself. */
  .inline-editor {
    container-type: inline-size;
  }
  .week-edit-row .week-day-date,
  .week-edit-row .week-hours,
  .time-range {
    flex-wrap: nowrap;
  }
  /* Too narrow for a row on one line: the label (and a special date's delete
     button) on top, "Closed" and the times on the line below. */
  @container (max-width: 720px) {
    .week-edit-row {
      flex-wrap: wrap;
      row-gap: 0.5rem;

      > .week-hours {
        flex-basis: 100%;
        justify-content: flex-start;
      }
    }
    .week-row.special-edit-row {
      grid-template-columns: minmax(0, 1fr);

      > .week-hours {
        grid-area: 2 / 1 / auto / -1;
        justify-content: flex-start;
      }

      &:has(> .hours-remove-action) {
        grid-template-columns: minmax(0, 1fr) auto;
      }

      > .hours-remove-action {
        grid-area: 1 / 2;
      }
    }
    /* Set the special part off from the weekday's own times above it. */
    .week-row.has-special + .special-edit-row {
      padding-top: 1rem;
    }
  }
  /* Phone width: "Closed" gets its own line, and each reason stacks too. */
  @container (max-width: 600px) {
    /* "Closed" on its own line, then from and to together on the next. */
    .time-range {
      flex-direction: column;
      align-items: flex-start;
      gap: 0.5rem;
    }
    .special-edit-notes {
      flex-direction: column;
      align-items: flex-start;
      gap: 0.75rem;
      margin-top: 0.75rem;

      .note-field {
        width: 100%;
      }
    }
    /* Each reason's HU / EN label sits above its input. */
    .note-field {
      flex-direction: column;
      align-items: flex-start;
      gap: 0.2rem;
    }
  }
  /* Inputs that keep the look of the text they replace, inside the same thin
     border as a .bordered owner button. */
  /* A date input, matching the date text beside a weekday name. */
  /* A special date's reason input, matching the reason text under its day. */
  .week-time-separator {
    margin: 0 0.35rem;
  }
  .hours-list {
    margin: 1.5rem 0 4rem;
  }
  .hours-row {
    padding: 1rem 0;
  }
  .week-row {
    padding: 0.75rem;
  }
  .week-row.today {
    background: rgba(145, 17, 17, 0.06);

    .week-day-name {
      color: var(--accent);
      font-weight: 700;
    }
  }
  /* "Today" and special-day badges sit under the weekday name. */
  .week-day-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
  }
  /* The badge's tint makes the usual gap look tight; match the weekday-to-note spacing. */
  .week-day-badges + .week-day-note {
    margin-top: 0.25rem;
  }
  .week-day {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
  }
  .week-day-date {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.6rem;

    /* The date reads at the weekday's size, set apart only by colour and weight. */
    small {
      font-size: inherit;
      font-weight: 400;
    }
  }
  .week-day-name {
    font-weight: 600;
  }
  /* The reason for a special date. */
  .week-day-note {
    color: var(--accent);
    font-size: inherit;
  }
  .feature-grid .week-list {
    margin: 1rem 0 1.5rem;
  }
  /* Home → /hours: the title and the week table morph into place. */
  .hours-title {
    width: fit-content;
    view-transition-name: hours-title;
  }
  .week-list {
    view-transition-name: hours-week;
  }
  ::view-transition-group(*) {
    animation-duration: 0.4s;
    animation-timing-function: cubic-bezier(0.2, 0, 0, 1);
  }
  ::view-transition-group(hours-title),
  ::view-transition-group(hours-week) {
    animation-duration: 0.4s;
    animation-timing-function: cubic-bezier(0.2, 0, 0, 1);
  }
  ::view-transition-old(hours-title),
  ::view-transition-new(hours-title) {
    height: 100%;
    width: auto;
  }
  @media (prefers-reduced-motion: reduce) {
    ::view-transition-group(*),
    ::view-transition-old(*),
    ::view-transition-new(*) {
      animation: none !important;
    }
  }
  .week-row.past {
    color: var(--muted);
  }
  .week-hours {
    font: var(--value-font);
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
  }
  /* A hint on hover and keyboard focus, anchored to the element it explains. */
  .has-tooltip {
    position: relative;
    cursor: help;

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

    .tooltip {
      position: absolute;
      right: 0;
      bottom: calc(100% + 0.45rem);
      z-index: 10;
      width: max-content;
      padding: 0.45rem 0.65rem;
      border-radius: var(--control-radius);
      background: var(--ink);
      color: var(--white);
      font:
        600 0.78rem/1.35 "DM Sans",
        sans-serif;
      text-transform: none;
      letter-spacing: 0;
      white-space: nowrap;
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      transition: opacity 120ms ease;
    }

    &:hover .tooltip,
    &:focus .tooltip {
      opacity: 1;
      visibility: visible;
    }
  }
  .contact-page-editor .inline-editor {
    display: block;
  }
  .contact-page-editor .inline-editor > section + section {
    margin-top: var(--section-gap);
  }
  .contact-editor-detail {
    display: grid;
    gap: 0.75rem;
    min-width: 0;
  }
  .contact-link-field {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;

    .brand-icon {
      flex: none;
      color: var(--accent);
    }
    .ui-input {
      flex: 1;
      min-width: 0;
    }
  }
  .contact-social-editor {
    align-items: center;

    .contact-link-field {
      flex: 1 1 100%;
    }
  }
  .contact-list > div {
    display: grid;
    grid-template-columns: 7rem minmax(0, 1fr);
    align-items: center;
    border-bottom: 1px solid var(--line);
    padding: 1.2rem 0;
    gap: 1rem;

    @media (max-width: 600px) {
      grid-template-columns: 1fr;
    }
  }
  .contact-label {
    color: var(--muted);
  }
  .contact-detail {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  .contact-value {
    overflow-wrap: anywhere;
    min-width: 0;
  }
  .contact-detail-actions {
    display: flex;
    flex: none;
    gap: 0.25rem;
  }
  .contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  .contact-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
  }
  .brand-icon {
    width: 1.15em;
    height: 1.15em;
    flex: none;
    background-color: currentColor;
    -webkit-mask: center / contain no-repeat;
    mask: center / contain no-repeat;
  }
  .brand-icon-google-maps {
    -webkit-mask-image: url("/assets/brands/google-maps-f0a4b1bc.svg");
    mask-image: url("/assets/brands/google-maps-f0a4b1bc.svg");
  }
  .brand-icon-waze {
    -webkit-mask-image: url("/assets/brands/waze-b2674c52.svg");
    mask-image: url("/assets/brands/waze-b2674c52.svg");
  }
  .brand-icon-whatsapp {
    -webkit-mask-image: url("/assets/brands/whatsapp-6f0c3c9b.svg");
    mask-image: url("/assets/brands/whatsapp-6f0c3c9b.svg");
  }
  .brand-icon-instagram {
    -webkit-mask-image: url("/assets/brands/instagram-3d91be1e.svg");
    mask-image: url("/assets/brands/instagram-3d91be1e.svg");
  }
  .brand-icon-messenger {
    -webkit-mask-image: url("/assets/brands/messenger-bdfa889b.svg");
    mask-image: url("/assets/brands/messenger-bdfa889b.svg");
  }
  .brand-icon-facebook {
    -webkit-mask-image: url("/assets/brands/facebook-9fe6c3b9.svg");
    mask-image: url("/assets/brands/facebook-9fe6c3b9.svg");
  }
  .brand-icon-tiktok {
    -webkit-mask-image: url("/assets/brands/tiktok-9b7e22da.svg");
    mask-image: url("/assets/brands/tiktok-9b7e22da.svg");
  }
  /* Any subtitle: the titles' serif, in the accent colour. */
  .subtitle {
    color: var(--accent);
    font:
      500 1.5rem/1.3 "Playfair Display",
      Georgia,
      serif;
    letter-spacing: -0.01em;
  }
  .story > section > img {
    width: 100%;
    margin: 2rem 0;
  }
  .story-body {
    font-size: 1.15rem;
    line-height: 1.8;
  }
  .news-article .news-cover {
    margin-bottom: var(--title-gap);

    > img,
    > .menu-item-photo-placeholder {
      position: static;
      width: 100%;
      aspect-ratio: 1.65;
    }
  }
  .news-editor-form {
    margin: 0;
  }
  .news-editor-form > .section-heading > h1 {
    width: 100%;
  }
  .news-cover-fields .note-field {
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
  }
  .news-editor .news-title-fields {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;

    .note-field {
      flex-direction: column;
      align-items: stretch;
      gap: 0.4rem;
    }
  }
  .news-editor-form > section + section {
    margin-top: var(--section-gap);
  }
  .news-cover-fields > .language-fields {
    margin-top: 1rem;
  }
  .news-body-fields {
    display: grid;
    gap: 1.5rem;
  }
  .news-article .news-publication {
    display: grid;
    gap: 0.4rem;
    max-width: 24rem;
  }
  .news-publication-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 9rem);
    gap: 1rem;
  }
  .news-publication-summary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
    color: var(--muted);
    font:
      400 1rem/1.4 "DM Sans",
      sans-serif;
  }
  .site-footer {
    padding: 2rem 4.5%;
    border-top: 1px solid var(--line);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: 2rem;
    color: var(--muted);
    font-size: 0.8rem;

    > :nth-child(2) {
      justify-self: center;
    }

    > :last-child {
      justify-self: end;
    }

    @media (max-width: 900px) {
      grid-template-columns: minmax(0, 1fr);
      gap: 1rem;

      > :nth-child(2),
      > :last-child {
        justify-self: start;
      }
    }
  }
  .footer-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;

    form {
      display: contents;
      margin: 0;
    }
  }

  .notifications {
    position: fixed;
    top: calc(1rem + env(safe-area-inset-top));
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: grid;
    gap: 0.5rem;
    width: max-content;
    max-width: min(36rem, calc(100% - 2rem));
    pointer-events: none;
  }
  .notification {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 1px solid currentColor;
    border-radius: 0.75rem;
    background: var(--lime-green-100);
    color: var(--lime-green-900);
    box-shadow: 0 0.25rem 1.5rem rgb(0 0 0 / 0.12);
    pointer-events: auto;
  }
  .notification--alert {
    background: var(--red-050);
    color: var(--red-900);
  }
  .notification > .icon {
    flex-shrink: 0;
  }
  .notification-message {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .notification .notification-dismiss {
    flex-shrink: 0;
    margin-left: auto;
    color: inherit;
  }
  .editor {
    display: grid;
    gap: 1.4rem;
    margin: 2rem 0;
  }
  .form-edit-heading {
    margin-bottom: 2rem;

    h1 {
      margin: 0;
    }

    > form {
      margin: 0;
    }
  }
  .form-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  .form-actions[hidden] {
    display: none;
  }
  /* .button marks the one primary action of a page, wherever it sits: the save
     button on an edit form, or the owner's main action beside a page heading.
     Icon-text links and buttons get the same size as a plain .button,
     regardless of their native element type. The resets undo the compact,
     icon-only treatment quiet owner actions get elsewhere. */
  .editor .field,
  .news-body-fields .field {
    display: grid;
    gap: 0.4rem;
  }
  /* A field on its own row stops at one column's width, so a short input is
   not stretched the full width of the form. */
  .editor > :is(.field, .ui-field) {
    max-width: calc(50% - 0.7rem);
  }
  @media (max-width: 860px) {
    .editor > :is(.field, .ui-field) {
      max-width: none;
    }
  }
  /* Hungarian and English side by side, so a missing translation is obvious. */
  .editor .field-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.4rem;
    align-items: start;
  }
  @media (max-width: 860px) {
    .editor .field-pair {
      grid-template-columns: 1fr;
    }
  }
  /* An upload, its preview and its remove box read as one block. */
  .editor .photo-field {
    display: grid;
    max-width: none;
    gap: 0.6rem;
    justify-items: stretch;
  }
  .photo-upload-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
    align-items: stretch;

    &:has(
      .photo-upload-current:not([hidden]),
      .photo-upload-preview:not([hidden]),
      .photo-upload-removed:not([hidden])
    ) {
      grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
      gap: 1.4rem;

      .photo-upload-file-panel {
        display: block;
      }
    }

    &:not(
        :has(
          .photo-upload-current:not([hidden]),
          .photo-upload-preview:not([hidden]),
          .photo-upload-removed:not([hidden])
        )
      )
      .photo-upload-file-panel {
      display: contents;
    }
  }
  .photo-upload-picker {
    min-width: 0;
  }
  .photo-dropzone {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 7rem;
    gap: 1rem;
    padding: 1.25rem;
    border: 1px dashed var(--line);
    background: var(--white);
    color: var(--muted);
    text-align: left;
    cursor: pointer;
    transition:
      background-color 120ms ease,
      border-color 120ms ease,
      color 120ms ease;

    &:hover,
    &.is-dragging {
      border-color: var(--accent);
      background: rgba(145, 17, 17, 0.08);
      color: var(--accent);
    }

    &:focus-within {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }

    > .icon {
      width: 1.5rem;
      height: 1.5rem;
      color: var(--accent);
    }
  }
  .photo-upload-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .photo-upload-copy,
  .photo-upload-file-info {
    display: grid;
    min-width: 0;
    gap: 0.5rem;
  }
  .photo-upload-file-info {
    align-content: space-between;
  }
  .photo-upload-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
  }
  .photo-upload-prompt {
    color: var(--ink);
    font-weight: 700;
  }
  .photo-upload-hint,
  .photo-upload-filename {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 400;
  }
  .photo-upload-filename {
    max-width: 32ch;
    overflow-wrap: anywhere;
  }
  .photo-upload-current,
  .photo-upload-preview {
    display: grid;
    grid-template-columns: minmax(0, 9rem) minmax(0, 1fr);
    align-items: stretch;
    gap: 0.75rem;
    min-width: 0;
    min-height: 7rem;
  }
  .photo-upload-current[hidden],
  .photo-upload-preview[hidden],
  .photo-upload-removed[hidden] {
    display: none;
  }
  .photo-preview {
    width: 100%;
    max-width: 9rem;
    height: 7rem;
    object-fit: cover;
  }
  .photo-upload-removed {
    display: flex;
    min-height: 7rem;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    color: var(--muted);
    font-size: 0.82rem;
  }
  @media (max-width: 640px) {
    .photo-upload-layout:has(
      .photo-upload-current:not([hidden]),
      .photo-upload-preview:not([hidden]),
      .photo-upload-removed:not([hidden])
    ) {
      grid-template-columns: minmax(0, 1fr);
      gap: 0.75rem;
    }
  }
  .language-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
  }
  .editor label,
  .form-label {
    font:
      700 0.85rem/1.4 "DM Sans",
      sans-serif;
    color: var(--muted);
    letter-spacing: normal;
  }
  .editor > .ui-button {
    justify-self: start;
  }
  .autocomplete {
    position: relative;
  }
  .autocomplete-option-selection[hidden] {
    display: none;
  }
  .autocomplete-selection,
  .autocomplete-option-content > .icon {
    display: inline-flex;
    flex: none;
    align-items: center;
    color: var(--accent);
  }
  /* Keep the slot laid out while empty so the input stays put as the icon comes and goes. */
  .autocomplete-with-selection .autocomplete-selection {
    width: var(--ui-icon-size);
    height: var(--ui-icon-size);
  }
  .autocomplete-selection.is-empty {
    visibility: hidden;
  }
  .autocomplete-selection .icon,
  .autocomplete-option-content > .icon {
    display: block;
    width: var(--ui-icon-size);
    height: var(--ui-icon-size);
  }
  .autocomplete-input {
    box-sizing: border-box;
    min-height: 1.2em;
    flex: 1;
    min-width: 0;
    width: 100%;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    box-shadow: none;
  }
  .autocomplete-toggle {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;

    .icon {
      width: 1rem;
      height: 1rem;
      stroke-width: 1.75;
    }
  }
  .autocomplete-options {
    position: absolute;
    z-index: 20;
    inset: calc(100% + 0.2rem) 0 auto;
    max-height: 16rem;
    overflow-y: auto;
    padding: 0.25rem;
    border: 1px solid var(--line);
    border-radius: var(--control-radius);
    background: var(--paper);
    box-shadow: 0 0.5rem 1.2rem color-mix(in srgb, var(--ink) 12%, transparent);
  }
  .autocomplete-options[hidden],
  .autocomplete-option[hidden],
  .autocomplete-no-results[hidden] {
    display: none;
  }
  .autocomplete-option {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 0.5rem;
    min-height: var(--ui-action-size);
    padding: 0.35rem 0.5rem;
    border: 0;
    border-radius: var(--control-radius);
    background: transparent;
    color: var(--ink);
    font: var(--ui-field-font);
    text-align: left;
    cursor: pointer;

    &:hover,
    &:focus-visible,
    &[aria-selected="true"] {
      background: var(--ui-fill);
    }

    &.is-active {
      background: var(--ui-selected-fill);
    }
  }
  .autocomplete-option-content {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
  }
  .autocomplete-option-label {
    transform: translateY(2px);
  }
  .autocomplete-no-results {
    margin: 0;
    padding: 0.55rem 0.65rem;
    color: var(--muted);
  }
  .editor fieldset {
    border: 0;
    padding: 0;
    margin: 0;
  }
  .editor > fieldset.field {
    max-width: none;
  }
  .editor legend {
    padding: 0;
    font-size: 0.85rem;
    font-weight: 700;
  }
  .tag-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.4rem;
  }
  .tag-choice {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
  }
  .hint {
    color: var(--muted);
    font-size: 0.85rem;
  }
  .admin-section {
    padding-top: var(--title-gap);
    border-top: 1px solid var(--line);
  }
}

@layer utilities {
  .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}
