/* Speisekarte on phones, "Wolt style": flat list, text left, photo right, tabs that follow the scrolling.
   Same Cuchi colours; nothing here applies on desktop. */
@media (max-width: 59.99rem) {
  html.w-phone { --ph: 3.6rem; }   /* dish photo size; the plus and the count are placed from it, so they stay on the photo corner whatever the row height */
  html.w-phone .k3-sec[hidden] { display: none !important; }
  html.q-nolunch .k3-tabs button[data-ck="lunch"], html.q-nolunch .k3-sec[data-ck="lunch"] { display: none !important; }

  /* quiet head: only "Menu" and one line of hours; no kanji, no legend */
  html.w-phone .k3-oshi, html.w-phone .k3-kj, html.w-phone .k3-tagline, html.w-phone .k3-sub, html.w-phone .k3-legend, html.w-phone .k3-fcount, html.w-phone .k3-eyebrow, html.w-phone .k3-star-h, html.w-phone .k3-now { display: none; }
  html.w-phone .k3-head { margin-bottom: 0.2rem; }
  html.w-phone .k3-title { font-size: 1.5rem; margin: 0; }
  html.w-phone .k3-hours.w-hours { display: flex; align-items: flex-start; gap: 0.7rem; margin: 0.3rem 0 0; font-size: 0.8125rem; line-height: 1.45; color: var(--ink-2); }
  html.w-phone .w-hours .w-t { display: flex; flex-direction: column; font-variant-numeric: tabular-nums; } html.w-phone .w-hours .w-d, html.w-phone .w-hours .w-t span { white-space: nowrap; }

  /* search: one rounded field, the three filter symbols small beside it */
  html.w-phone .k3-filter { flex-direction: row; align-items: center; flex-wrap: nowrap; gap: 0.5rem; margin: 0.7rem 0 0.5rem; padding: 0; border: 0; }
  html.w-phone .k3-filter .k3-search { flex: 1; min-width: 0; height: 2.6rem; padding: 0 0.9rem; border: 0; border-radius: 999px; background: rgb(239 232 220 / 0.08); }
  html.w-phone .k3-fbtns { gap: 0.35rem; }
  html.w-phone .k3-fbtns button { min-width: 2.3rem; height: 2.3rem; padding: 0 0.5rem; border-radius: 999px; font-size: 0.8125rem; }

  /* tabs: text only, a thin line under the current one, stuck below the header */
  html.w-phone .k3-pick-wrap { position: sticky; top: var(--navh, 3.6rem); z-index: 20; margin: 0 -1.25rem; padding: 0 1.25rem; background: var(--bg, #141211); border-bottom: 1px solid rgb(239 232 220 / 0.12); }
  html.w-phone .k3-pick-label, html.w-phone .k3-pick { display: none; }
  html.w-phone .k3-tabs { display: flex; gap: 0.2rem; margin: 0; padding: 0; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: none; mask-image: none; }
  html.w-phone .k3-tabs::-webkit-scrollbar { display: none; }
  html.w-phone .k3-tabs button { flex: none; padding: 0.85rem 0.8rem 0.7rem; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; color: var(--ink-2); font: 500 0.9375rem var(--sans); white-space: nowrap; cursor: pointer; transition: color 200ms ease, border-color 200ms ease; }
  html.w-phone .k3-tabs button.w-on { color: var(--ink); }

  /* groups: flat headings, always open */
  html.w-phone .k3-sec { padding: 0; margin: 0; border: 0; scroll-margin-top: calc(var(--navh, 3.6rem) + 3rem); }
  html.w-phone .k3-sec-head { margin: 1.5rem 0 0.2rem; padding: 0; background: none; border-radius: 0; cursor: default; }
  html.w-phone .k3-sec-head::after, html.w-phone .q-count { display: none; }
  html.w-phone .k3-sec-head h2 { margin: 0; font: 600 1.05rem var(--sans); letter-spacing: 0.06em; text-transform: uppercase; }
  html.w-phone .k3-sec-head p { margin: 0.25rem 0 0; font-size: 0.8125rem; color: var(--ink-2); line-height: 1.4; }
  html.w-phone .k3-sec ul { padding: 0; margin: 0.4rem 0 0; list-style: none; display: block; }

  /* rows: name, two lines of text, price | photo on the right, plus button on the photo */
  html.w-phone .k3-sec li { position: relative; padding: 0.8rem 0; border-bottom: 1px solid rgb(239 232 220 / 0.1); }
  html.w-phone .k3-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main slot" "price slot"; column-gap: 0.9rem; row-gap: 0; align-items: start; width: 100%; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; text-align: left; color: inherit; font: inherit; }
  html.w-phone .k3-row:hover, html.w-phone .k3-row[aria-current="true"] { background: none; box-shadow: none; transform: none; }
  html.w-phone .k3-row-main { grid-area: main; display: block; min-width: 0; padding-right: 0; }
  html.w-phone .k3-row-name { display: block; font: 600 1rem/1.3 var(--sans); }
  html.w-phone .k3-row-desc { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; margin-top: 0.2rem; font-size: 0.8125rem; line-height: 1.4; color: var(--ink-2); }
  html.w-phone .k3-row-price { grid-area: price; justify-self: start; margin-top: 0.4rem; font: 600 0.9375rem var(--sans); color: var(--accent-text); font-variant-numeric: tabular-nums; }
  html.w-phone .k3-flag { margin-left: 0.4rem; font-size: 0.6875rem; font-weight: 600; color: var(--ink-2); }
  /* photo: square with rounded corners; rows without a real photo show no placeholder at all */
  html.w-phone .k3-slot { grid-area: slot; display: none; width: var(--ph); height: var(--ph); margin: 0; border-radius: 0.7rem; overflow: hidden; background: #2a2623; }
  html.w-phone .k3-slot:has(img:not(.k3-slot-seal)) { display: block; }
  html.w-phone .k3-slot img:not(.k3-slot-seal) { width: 100%; height: 100%; object-fit: cover; display: block; }
  html.w-phone .k3-sec li:has(.k3-slot img:not(.k3-slot-seal)) { min-height: calc(var(--ph) + 1.6rem); }
  html.w-phone .k3-row-main { padding-bottom: 0; }

  /* the plus sits in the corner of the photo (or at the right edge when there is no photo); the count appears beside it */
  html.w-phone .o-add { position: absolute; right: 0.2rem; top: calc(0.8rem + var(--ph) - 1.95rem); bottom: auto; width: 1.8rem; height: 1.8rem; z-index: 2; background: rgb(20 18 17 / 0.92); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
  html.w-phone .k3-sec li:not(:has(.k3-slot img:not(.k3-slot-seal))) .o-add { right: 0; top: auto; bottom: 0.8rem; }
  html.w-phone .o-cnt { position: absolute; right: 2.4rem; top: calc(0.8rem + var(--ph) - 1.6rem); bottom: auto; z-index: 2; min-width: 0; padding: 0.1rem 0.5rem; border-radius: 999px; background: var(--accent); color: #fff; font-size: 0.75rem; font-weight: 600; }
  html.w-phone .k3-sec li:not(:has(.k3-slot img:not(.k3-slot-seal))) .o-cnt { right: 2.2rem; top: auto; bottom: 0.95rem; }
  html.w-phone .o-step { display: none !important; }

  html.w-phone .q-keybox h2 { cursor: pointer; margin: 1.5rem 0 0.3rem; padding: 0.8rem 0; font: 600 0.9375rem var(--sans); letter-spacing: 0.06em; text-transform: uppercase; border-top: 1px solid rgb(239 232 220 / 0.12); }
  html.w-phone .q-keybox h2::after { content: " ›"; transition: transform 200ms ease; display: inline-block; }
  html.w-phone .q-keybox.q-open h2::after { transform: rotate(90deg); }
  html.w-phone .q-keybox:not(.q-open) dl { display: none; }
  html.w-phone .nav .lang { display: none; }
}

/* photo on the left, the plus alone on the right edge: they can never touch, whatever the row height */
@media (max-width: 59.99rem) {
  html.w-phone .k3-sec li { padding-right: 2.9rem; }
  html.w-phone .k3-row { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "price"; }
  html.w-phone .k3-sec li:has(.k3-slot img:not(.k3-slot-seal)) .k3-row { grid-template-columns: var(--ph) minmax(0, 1fr); grid-template-areas: "slot main" "slot price"; }
  html.w-phone .o-add, html.w-phone .k3-sec li:not(:has(.k3-slot img:not(.k3-slot-seal))) .o-add { right: 0; top: 50%; bottom: auto; margin-top: -0.9rem; background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
  html.w-phone .o-cnt, html.w-phone .k3-sec li:not(:has(.k3-slot img:not(.k3-slot-seal))) .o-cnt { right: 1.1rem; top: 50%; bottom: auto; margin-top: -1.55rem; }
}

/* dishes without a photo get the same square with the Cuchi seal, so every row looks alike */
@media (max-width: 59.99rem) {
  html.w-phone .k3-slot { display: block; position: relative; }
  html.w-phone .k3-slot:not(:has(img:not(.k3-slot-seal))) { font-size: 0; }
  html.w-phone .k3-slot:not(:has(img:not(.k3-slot-seal)))::before { content: ""; position: absolute; inset: 0; background: url("logo.svg") center / 44% no-repeat; opacity: 0.5; }
  html.w-phone .k3-slot img.k3-slot-seal { display: none; }
  html.w-phone .k3-row, html.w-phone .k3-sec li:has(.k3-slot img:not(.k3-slot-seal)) .k3-row { grid-template-columns: var(--ph) minmax(0, 1fr); grid-template-areas: "slot main" "slot price"; }
  html.w-phone .k3-sec li { min-height: calc(var(--ph) + 1.6rem); }
}

/* dish sheet: calmer text sizes */
@media (max-width: 59.99rem) {
  html.w-phone .k3-info h2 { font-size: 1.5rem; }
  html.w-phone .k3-info .k3-desc { font-size: 0.875rem; line-height: 1.55; margin-top: 0.7rem; }
  html.w-phone .k3-info .k3-note { font-size: 0.875rem; }
}

/* dish sheet: smaller tags and allergen marks */
@media (max-width: 59.99rem) {
  html.w-phone .k3-chips { gap: 0.4rem 0.9rem; margin-top: 1rem; font-size: 0.6875rem; }
  html.w-phone .k3-chips li b { font-size: 0.75rem; }
  html.w-phone .k3-chips li.is-tag { padding: 0.2rem 0.6rem 0.2rem 0.5rem; gap: 0.35rem; font-size: 0.6875rem; }
  html.w-phone .k3-chips li.is-tag::before { width: 0.3rem; height: 0.3rem; }
}

/* opening hours: one row per day, times lined up */
@media (max-width: 59.99rem) {
  html.w-phone .k3-hours.w-hours { flex-direction: column; gap: 0.1rem; }
  html.w-phone .w-hours .w-r { display: flex; align-items: flex-start; gap: 0.7rem; }
  html.w-phone .w-hours .w-d { flex: none; width: 3.1rem; }
}

/* tab line: one element that glides and stretches to the new tab */
@media (max-width: 59.99rem) {
  html.w-phone .k3-tabs { position: relative; }
  html.w-phone .k3-tabs button, html.w-phone .k3-tabs button.is-on { border-bottom-color: transparent; }
  html.w-phone .k3-tabs button { transition: color 350ms ease; }
  html.w-phone .w-ind { position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--accent); pointer-events: none; }
  html.w-phone .w-ind.on { transition: transform 420ms cubic-bezier(0.2, 0.8, 0.2, 1), width 420ms cubic-bezier(0.2, 0.8, 0.2, 1); }
}
@media (prefers-reduced-motion: reduce) { html.w-phone .w-ind.on { transition: none; } }

/* smaller search field; the filters are written out in a row below it */
@media (max-width: 59.99rem) {
  html.w-phone .k3-filter { flex-wrap: wrap; gap: 0.5rem; margin: 0.6rem 0 0.4rem; }
  html.w-phone .k3-filter .k3-search { flex: 1 1 100%; height: 2.2rem; padding: 0 0.8rem; }
  html.w-phone .k3-fbtns { flex: 1 1 100%; display: flex; gap: 0.4rem; }
  html.w-phone .k3-fbtns button { flex: none; min-width: 0; height: 1.9rem; padding: 0 0.8rem; font-size: 0; }
  html.w-phone .k3-fbtns button::after { content: attr(aria-label); font: 500 0.8125rem var(--sans); }
}

/* the spicy filter keeps its chili symbol in front of the word */
@media (max-width: 59.99rem) {
  html.w-phone .k3-fbtns button[data-f="hot"] { font-size: 0.8125rem; }
  html.w-phone .k3-fbtns button[data-f="hot"]::after { margin-left: 0.35rem; }
}

/* live status in the menu head: one line (dot, text, "all hours"); the full list opens on tap */
@media (max-width: 59.99rem) {
  html.w-phone .k3-hours.w-hours { display: block; }
  html.w-phone .w-st { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 0.2rem 0.5rem; font-size: 0.875rem; }   /* dot + status on the first line, "All hours" under the status text */
  html.w-phone .w-hours span.w-stt { font: 600 0.875rem var(--sans); color: var(--ink); }
  html.w-phone .w-dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: #4cc38a; box-shadow: 0 0 0 3px rgb(76 195 138 / 0.18); }
  html.w-phone .w-dot.off { background: #e5595f; box-shadow: 0 0 0 3px rgb(229 89 95 / 0.18); }
  html.w-phone .w-more { grid-column: 2; justify-self: start; padding: 0; border: 0; background: none; color: var(--ink-2); font: 500 0.75rem var(--sans); text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; }
  html.w-phone .w-rows { margin-top: 0.4rem; }
  html.w-phone .w-rows[hidden] { display: none; }
}
