/* The theme kit template's shared structure (docs/strategy/THEMES_FIDELIDAD.md).
   Loaded on every kit page before the ambience sheet, scoped to .theme-kit, and
   never on a classic page: classic themes keep their own partials and Tailwind.

   The kit partials (app/views/theme_kits/menu/*) carry semantic tk-* classes;
   this sheet lays them out in one of five menu styles, picked by the root class
   tk-style--<style> (ThemeKit#menu_style), and every look-and-feel decision is a
   --tk-* variable with a default here that each ambience sheet overrides:
   type, rules, cards, chips, prices. The chrome shared with classic pages (the
   sticky top bar, the section chips, the search) is reached through the data
   attributes its behaviour already depends on, so its markup stays untouched. */

.theme-kit {
  /* Text faces end in the Noto fallbacks for the scripts a menu can be in. */
  --tk-sans: 'Noto Sans', 'Noto Sans Armenian', 'Noto Sans Arabic', 'Noto Sans Hebrew', 'Noto Sans JP', 'Noto Sans SC',
    'Noto Sans KR', 'Noto Sans Thai', 'Noto Sans Devanagari', 'Noto Sans Bengali', 'Noto Sans Tamil', 'Noto Sans Telugu',
    'Noto Sans Ethiopic', system-ui, sans-serif;
  --tk-serif: 'Noto Serif', 'Noto Serif Armenian', 'Noto Naskh Arabic', 'Noto Serif Hebrew', 'Noto Serif JP', 'Noto Serif SC',
    'Noto Serif KR', 'Noto Serif Thai', 'Noto Serif Devanagari', 'Noto Serif Bengali', 'Noto Serif Tamil', 'Noto Serif Telugu',
    'Noto Serif Ethiopic', Georgia, serif;
  --tk-page: var(--theme-bg);
  --tk-pad: 1.25rem;
  --tk-section-gap: 1.5rem;

  --tk-h2-font: var(--tk-display);
  --tk-h2-size: 1.375rem;
  --tk-h2-weight: 700;
  --tk-h2-style: normal;
  --tk-h2-color: var(--theme-text);
  --tk-h2-transform: none;
  --tk-h2-spacing: normal;
  --tk-h2-align: start;

  --tk-name-font: inherit;
  --tk-name-size: 1rem;
  --tk-name-weight: 600;
  --tk-name-transform: none;
  --tk-name-spacing: normal;
  --tk-name-color: var(--theme-text);

  --tk-price-font: inherit;
  --tk-price-size: 1rem;
  --tk-price-weight: 700;
  --tk-price-color: var(--theme-primary);

  --tk-desc-color: var(--theme-muted);
  --tk-rule: var(--theme-border);
  --tk-rule-style: solid;
  --tk-rule-width: 1px;
  --tk-leader: var(--theme-border);

  --tk-card-bg: var(--theme-surface);
  --tk-card-border: var(--theme-border);
  --tk-card-border-width: 1px;
  --tk-card-radius: 1rem;
  --tk-card-shadow: none;

  --tk-chip-radius: 999px;
  --tk-chip-bg: var(--theme-surface);
  --tk-chip-color: var(--theme-text);
  --tk-chip-border: var(--theme-border);
  --tk-chip-border-width: 1px;
  --tk-chip-weight: 500;
  --tk-chip-transform: none;
  --tk-chip-spacing: normal;
  --tk-chip-active-bg: var(--theme-text);
  --tk-chip-active-color: var(--theme-surface);
  --tk-chip-active-border: var(--theme-text);

  --tk-tag-bg: var(--theme-bg);
  --tk-tag-color: var(--theme-text);

  --tk-tile-radius: var(--tk-card-radius);
}

/* ---- Page ----
   Each ambience sheet sets --theme-font to its own text face on
   .theme-kit--<ambience>.theme-kit, which outranks the :root block of
   shared/_theme_style; everything that already reads --theme-font follows. */

/* The menu sits on the page colour, so boxes and cards (the surface colour)
   stand out from it, as in the mockups. Only the page-level wrappers: dropdowns
   and other panels painted with the surface colour keep it. */
.theme-kit main.bg-theme-surface,
.theme-kit main > .bg-theme-surface,
.theme-kit main > div > .bg-theme-surface,
.theme-kit #editor_canvas > .bg-theme-surface,
.theme-kit #editor_canvas > div > .bg-theme-surface { background-color: var(--tk-page); }

/* ---- Section ---- */
.theme-kit .tk-section { padding: var(--tk-section-gap) var(--tk-pad) .25rem; }
/* Section photo: under the heading, inside the section's margins, framed as the menu
   style frames its dishes (the style blocks below add their border and shadow). Its
   height is the photo's own (BigPhotoShape); this only draws its frame. Until 2026-11-07
   it ran edge to edge above the heading, as the classic section does, and read as part
   of another page next to cards. */
.theme-kit .tk-section__cover {
  margin: 0 0 .875rem;
  overflow: hidden;
  border-radius: calc(var(--tk-card-radius) * .75);
}
.theme-kit .tk-section__head { margin-bottom: .5rem; text-align: var(--tk-h2-align); }
.theme-kit .tk-section__title {
  margin: 0;
  font-family: var(--tk-h2-font);
  font-size: var(--tk-h2-size);
  font-weight: var(--tk-h2-weight);
  font-style: var(--tk-h2-style);
  line-height: 1.15;
  color: var(--tk-h2-color);
  text-transform: var(--tk-h2-transform);
  letter-spacing: var(--tk-h2-spacing);
  overflow-wrap: anywhere;
}
.theme-kit .tk-section__alt { margin: .125rem 0 0; font-size: .8125rem; color: var(--tk-desc-color); }
.theme-kit .tk-section__desc { margin-top: .375rem; font-size: .875rem; color: var(--tk-desc-color); }
.theme-kit .tk-section__head--untitled { margin-bottom: 0; }

/* ---- Page headings beyond the menu ----
   The booking, manage, invite, waitlist and guest feedback pages keep their own
   Tailwind sizes; their headings take the face the kit gives a section title. */
.theme-kit .tk-heading {
  font-family: var(--tk-h2-font);
  font-weight: var(--tk-h2-weight);
  font-style: var(--tk-h2-style);
}

/* ---- Dish ---- */
.theme-kit .tk-dishes { display: flex; flex-direction: column; }
.theme-kit .tk-dish {
  display: flex;
  align-items: flex-start;
  gap: .875rem;
  padding: .75rem 0;
  color: inherit;
  text-decoration: none;
}
/* The search and allergen filter (menu-search) hide a dish with Tailwind's
   .hidden, one class: the rule above has two and would keep it on screen. */
.theme-kit .tk-dish.hidden { display: none; }
.theme-kit .tk-dish--header { flex-direction: column; align-items: stretch; }
.theme-kit .tk-dish__media { overflow: hidden; border-radius: calc(var(--tk-card-radius) * .75); }
.theme-kit .tk-dish__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .25rem; }
.theme-kit .tk-dish__head { display: flex; align-items: baseline; gap: .75rem; }
.theme-kit .tk-dish__name {
  min-width: 0;
  font-family: var(--tk-name-font);
  font-size: var(--tk-name-size);
  font-weight: var(--tk-name-weight);
  line-height: 1.3;
  color: var(--tk-name-color);
  text-transform: var(--tk-name-transform);
  letter-spacing: var(--tk-name-spacing);
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.theme-kit .tk-dish__leader { display: none; }
.theme-kit .tk-dish__price-wrap { margin-inline-start: auto; display: flex; align-items: baseline; gap: .5rem; white-space: nowrap; }
.theme-kit .tk-dish__price {
  font-family: var(--tk-price-font);
  font-size: var(--tk-price-size);
  font-weight: var(--tk-price-weight);
  color: var(--tk-price-color);
  font-variant-numeric: tabular-nums lining-nums;
  white-space: nowrap;
}
.theme-kit .tk-dish__measure { font-size: .8125rem; font-weight: 400; color: var(--tk-desc-color); }
.theme-kit .tk-dish__alt { margin: 0; font-size: .8125rem; color: var(--tk-desc-color); }
.theme-kit .tk-dish__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .375rem; }
.theme-kit .tk-dish__icons { display: inline-flex; gap: .25rem; color: var(--tk-desc-color); }
.theme-kit .tk-dish__desc { font-size: .875rem; line-height: 1.45; color: var(--tk-desc-color); }
.theme-kit .tk-tag {
  display: inline-block;
  padding: .125rem .5rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
  background: var(--tk-tag-bg);
  color: var(--tk-tag-color);
}
.theme-kit .tk-badge {
  margin-inline-start: .375rem;
  padding: .125rem .5rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 500;
  vertical-align: middle;
  background: var(--theme-border);
  color: var(--theme-muted);
}
/* A sold-out dish (SoldOut): name, prices and their labels in the theme's text
   colour at 60 %, never struck through. The label and the photo band are shared
   with the classic menu (.sold-out-pill, .sold-out-band in application.tailwind.css). */
.theme-kit .tk-dish--sold-out .tk-dish__name,
.theme-kit .tk-dish--sold-out .tk-dish__price,
.theme-kit .tk-dish--sold-out .tk-dish__measure,
.theme-kit .tk-dish--sold-out .tk-prices__label {
  color: var(--theme-muted);
  color: color-mix(in srgb, var(--theme-text) 60%, transparent);
}
.theme-kit .tk-dish__sold-out { margin-top: .25rem; width: fit-content; }
/* A sold-out photo is framed (for the band), so the frame stands in for the thumb in the grid. */
.theme-kit.tk-style--grid .tk-dishes--grid .tk-dish__thumb-frame { order: -1; width: 100%; border-radius: var(--tk-tile-radius); }
.theme-kit .tk-prices { margin: .125rem 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: .125rem; }
.theme-kit .tk-prices__item { display: flex; align-items: baseline; gap: .75rem; font-size: .9375rem; }
.theme-kit .tk-prices__label { color: var(--tk-desc-color); }
.theme-kit .tk-prices__item .tk-dish__price { margin-inline-start: auto; font-size: calc(var(--tk-price-size) * .94); }
.theme-kit .tk-editor-actions { padding-bottom: .75rem; }

/* ---- Menu styles ---- */

/* line: a rule between dishes. */
.theme-kit.tk-style--line .tk-dish + .tk-dish { border-top: var(--tk-rule-width) var(--tk-rule-style) var(--tk-rule); }

/* leaders: a printed carta, dotted leaders from name to price, no rules. */
.theme-kit.tk-style--leaders .tk-dish { padding: .625rem 0; }
.theme-kit.tk-style--leaders .tk-dish__leader {
  display: block;
  flex: 1;
  min-width: 1rem;
  border-bottom: 2px dotted var(--tk-leader);
  transform: translateY(-.3em);
}
.theme-kit.tk-style--leaders .tk-dish__price-wrap { margin-inline-start: 0; }

/* box: one framed box per section. */
.theme-kit.tk-style--box .tk-dishes {
  padding: 0 1rem;
  background: var(--tk-card-bg);
  border: var(--tk-card-border-width) solid var(--tk-card-border);
  border-radius: var(--tk-card-radius);
  box-shadow: var(--tk-card-shadow);
}
.theme-kit.tk-style--box .tk-dish { padding: .875rem 0; }
.theme-kit.tk-style--box .tk-section__cover {
  border: var(--tk-card-border-width) solid var(--tk-card-border);
  border-radius: var(--tk-card-radius);
  box-shadow: var(--tk-card-shadow);
}
.theme-kit.tk-style--box .tk-dish + .tk-dish { border-top: var(--tk-rule-width) var(--tk-rule-style) var(--tk-rule); }

/* cards: every dish its own card. */
.theme-kit.tk-style--cards .tk-dishes { gap: .75rem; }
.theme-kit.tk-style--cards .tk-dish {
  padding: .875rem 1rem;
  background: var(--tk-card-bg);
  border: var(--tk-card-border-width) solid var(--tk-card-border);
  border-radius: var(--tk-card-radius);
  box-shadow: var(--tk-card-shadow);
}
.theme-kit.tk-style--cards .tk-dish--header { padding: .625rem; }
.theme-kit.tk-style--cards .tk-section__cover {
  margin-bottom: .75rem;
  border: var(--tk-card-border-width) solid var(--tk-card-border);
  border-radius: var(--tk-card-radius);
  box-shadow: var(--tk-card-shadow);
}

/* elegant: centred titles, no rules, room to breathe. */
.theme-kit.tk-style--elegant { --tk-h2-align: center; --tk-section-gap: 2.25rem; }
.theme-kit.tk-style--elegant .tk-section__head { margin-bottom: 1rem; }
.theme-kit.tk-style--elegant .tk-section__cover { margin-bottom: 1.25rem; border-radius: .25rem; }
.theme-kit.tk-style--elegant .tk-dish { padding: .625rem 0; }
.theme-kit.tk-style--elegant .tk-dish__head { gap: 1.25rem; }

/* ---- The restaurant's phone and address (public_restaurants/blocks) ----
   One compact row each, on the menu's margins, and close together when they
   follow one another in the owner's block order. */
.theme-kit .tk-contact { padding-inline: var(--tk-pad); }
.theme-kit .tk-contact__row {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  margin: 0;
  font-size: .875rem;
  font-style: normal;
  line-height: 1.35;
  color: var(--tk-desc-color);
}
.theme-kit .tk-contact__row > span,
.theme-kit .tk-contact__row > a { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.theme-kit .tk-contact__row a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.theme-kit .tk-contact__icon { flex-shrink: 0; width: 1rem; height: 1rem; margin-top: .0625rem; color: var(--tk-price-color); }
.theme-kit div:has(> .tk-contact) + div:has(> .tk-contact) { margin-top: .5rem; }
/* A long week of opening hours, folded under a row with today's hours and a
   "Weekly hours" chip at its end, drawn like the section chips so it reads as a
   button. */
.theme-kit .tk-contact--hours summary { cursor: pointer; list-style: none; align-items: center; }
.theme-kit .tk-contact--hours summary::-webkit-details-marker { display: none; }
.theme-kit .tk-contact__today { font-weight: 600; color: var(--tk-name-color); }
.theme-kit .tk-contact__row > .tk-contact__toggle {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: .25rem;
  margin-inline-start: auto;
  padding-block: .1875rem;
  padding-inline: .625rem .375rem;
  border: var(--tk-chip-border-width) solid var(--tk-chip-border);
  border-radius: var(--tk-chip-radius);
  background: var(--tk-chip-bg);
  color: var(--tk-chip-color);
  font-size: .75rem;
  font-weight: 600;
  white-space: nowrap;
}
.theme-kit .tk-contact__chevron { flex-shrink: 0; width: .875rem; height: .875rem; transition: rotate .2s; }
.theme-kit .tk-contact--hours[open] .tk-contact__chevron { rotate: 180deg; }
.theme-kit .tk-contact--hours > section { padding-block: .375rem 0; padding-inline: 1.5rem 0; }
.theme-kit .tk-contact--hours > section > h2,
.theme-kit .tk-contact--hours-inline section > h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* A short week written out next to the clock, "mon – fri 12:00–16:00 · sat – sun …";
   today's group keeps the bold the hours block gives it. Special days stay one per line. */
.theme-kit .tk-contact--hours-inline section { flex: 1; min-width: 0; padding: 0; color: inherit; }
.theme-kit .tk-contact--hours-inline section > dl { margin: 0; font-size: inherit; }
.theme-kit .tk-contact--hours-inline section > dl > div { display: inline; padding: 0; }
.theme-kit .tk-contact--hours-inline section > dl > div + div::before { content: "·"; margin-inline: .375em; }
.theme-kit .tk-contact--hours-inline section > dl dt { display: inline; width: auto; margin-inline-end: .3em; white-space: nowrap; font-weight: 600; }
.theme-kit .tk-contact--hours-inline section > dl dd { display: inline; margin: 0; }
.theme-kit .tk-contact--hours-inline section > div { margin-top: .25rem; }
.theme-kit .tk-contact--hours-inline section > div h3 { margin: 0; font-size: inherit; }

/* grid: line, and two columns of photo tiles where every dish has a photo
   (.tk-dishes--grid, ThemeKitHelper#theme_kit_photo_grid?). The tile is the
   photo, square, then name and price stacked; the owner's side, size and shape
   for the thumbnail give way to the tile. */
.theme-kit.tk-style--grid .tk-dish + .tk-dish { border-top: var(--tk-rule-width) var(--tk-rule-style) var(--tk-rule); }
.theme-kit.tk-style--grid .tk-section__cover { border-radius: var(--tk-tile-radius); }
.theme-kit.tk-style--grid .tk-dishes--grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem .875rem;
  padding: .5rem 0 .75rem;
}
.theme-kit.tk-style--grid .tk-dishes--grid .tk-dish {
  flex-direction: column;
  align-items: stretch;
  gap: .625rem;
  padding: 0;
  border-top: 0;
}
.theme-kit.tk-style--grid .tk-dishes--grid .tk-dish__thumb {
  order: -1;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: var(--tk-tile-radius);
}
.theme-kit.tk-style--grid .tk-dishes--grid .tk-dish__media { border-radius: var(--tk-tile-radius); }
.theme-kit.tk-style--grid .tk-dishes--grid .tk-dish__head { flex-direction: column; align-items: flex-start; gap: .25rem; }
.theme-kit.tk-style--grid .tk-dishes--grid .tk-dish__price-wrap { margin-inline-start: 0; }
.theme-kit.tk-style--grid .tk-dishes--grid .tk-dish__desc { font-size: .8125rem; }

/* ---- Chrome shared with classic pages (reached by its behaviour hooks) ---- */
/* The sticky bar sits on the page colour wherever it is rendered. Its back and
   search buttons fade the pills that scroll under them with a border and a
   shadow in the surface colour; on a kit that colour is the page's, or each
   button shows as a pale half-circle over the bar. */
.theme-kit [data-public-top-bar] { background-color: var(--tk-page); }
.theme-kit [data-public-top-bar] .border-theme-surface { --theme-surface: var(--tk-page); }
.theme-kit [data-public-top-bar] .sm\:border-theme-surface { border-color: var(--tk-page); }

.theme-kit [data-section-nav-target="pill"],
.theme-kit [data-section-nav-target="compactButton"] {
  padding: .4375rem .875rem;
  border: var(--tk-chip-border-width) solid var(--tk-chip-border);
  border-radius: var(--tk-chip-radius);
  background: var(--tk-chip-bg);
  color: var(--tk-chip-color);
  font-weight: var(--tk-chip-weight);
  text-transform: var(--tk-chip-transform);
  letter-spacing: var(--tk-chip-spacing);
}
/* section-nav adds the active classes listed in data-active-classes. */
.theme-kit [data-section-nav-target="pill"].bg-theme-text {
  background: var(--tk-chip-active-bg);
  color: var(--tk-chip-active-color);
  border-color: var(--tk-chip-active-border);
  font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
  .theme-kit .tk-dish { transition: none; }
}

/* ---- The band's art ----
   The stage keeps the art's shape; where the band is wider, its start edge
   fades into the band colour instead of ending in a seam. In RTL the stage sits
   at the left and fades on its right. */
.theme-kit .tk-band__stage {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 22%);
  mask-image: linear-gradient(90deg, transparent 0, #000 22%);
}
.theme-kit[dir="rtl"] .tk-band__stage {
  -webkit-mask-image: linear-gradient(270deg, transparent 0, #000 22%);
  mask-image: linear-gradient(270deg, transparent 0, #000 22%);
}

/* The name stops where the drawing starts. Every catalogue art leaves its
   start half empty (the drawing begins at 46-63% of its width, measured on
   the bottom half where the name sits), and the stage is as tall as the band
   and 780/435 as wide, pinned to the end side. So the drawing starts at
   100cqw - band height * 780/435 * (1 - --tk-art-start); the name may run
   1rem into it, over the scrim, and never takes less than 55% of the band.
   The heights mirror the band's h-[13.5rem] sm:h-72 / h-28 sm:h-32. */
.theme-kit .tk-band--tall { --tk-band-h: 13.5rem; }
.theme-kit .tk-band--short { --tk-band-h: 7rem; }
@media (min-width: 640px) {
  .theme-kit .tk-band--tall { --tk-band-h: 18rem; }
  .theme-kit .tk-band--short { --tk-band-h: 8rem; }
}
.theme-kit .tk-band:not(.tk-band--photo) .tk-band__text {
  max-width: max(55%, min(64%, calc(100cqw - var(--tk-band-h) * 1.7931 * (1 - var(--tk-art-start, .5)) + 1rem)));
}

/* The name's line clamp hides whatever leaves its box, and every kit sets the
   name tighter than its glyphs (line-height .95-1.08): the descenders of its
   last line (g, j, p, y) would be cut off. The padding takes them into the box
   and the negative margin gives the room back, so nothing else moves. */
.theme-kit .tk-name { padding-block-end: .2em; margin-block-end: -.2em; }
/* A name the fitter could not fit in its lines (theme_kit_fit_controller):
   the padding would show the top of the next, hidden line. */
.theme-kit .tk-name.tk-name--cut { padding-block-end: 0; margin-block-end: 0; }

/* ---- Today's hours under the name (ThemeKit::TodayHours) ----
   In the band's ink, quieter than the name; a dot in front while open. */
.theme-kit .tk-band__hours {
  margin-top: .25rem;
  font-size: .875rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--tk-band-ink);
  opacity: .82;
}
.theme-kit .tk-band__state { white-space: nowrap; }
.theme-kit .tk-band__state--open::before {
  content: "";
  display: inline-block;
  width: .5rem;
  height: .5rem;
  margin-inline-end: .375rem;
  border-radius: 999px;
  background: #2f9e5b;
  vertical-align: .0625rem;
}

/* ---- The owner's cover photo in the header (ThemeKit::CoverPlacement) ----
   "band": the photo takes the art's place under the kit's own scrim, and
   settles in once, like the photographic kits. "replace": the image is the
   whole header, on the page colour. */
/* A photo is busier than the art the kits' washes were drawn for. From the
   corner where the name sits, a radial wash of the kit's colour with the photo
   blurred under it; tint and blur share one mask, so they fade out together
   and the rest of the photo stays sharp. A soft shadow of the same colour
   under the letters does the rest: together they reach 4.5:1 on the light kits
   and 7:1 on the dark ones over busy and light photos alike, where a scrim
   alone does not (docs/CUSTOMIZATION.md → "Cover photo on kit pages").
   The blur is a blurred copy of the photo inside the masked wash
   (.tk-band__blur, theme_kits/_band), not a backdrop-filter: Chrome drops the
   mask of a backdrop-filter under an ancestor that clips with rounded corners
   (the editor's canvas on a phone or tablet), and the wash then covered the
   whole band, black over a dark photo. */
.theme-kit .tk-band--photo .tk-band__scrim {
  overflow: hidden;
  background: none;
  -webkit-mask-image: radial-gradient(ellipse 110% 125% at 0% 100%, #000 0%, rgba(0, 0, 0, .93) 48%, rgba(0, 0, 0, .43) 74%, transparent 100%);
  mask-image: radial-gradient(ellipse 110% 125% at 0% 100%, #000 0%, rgba(0, 0, 0, .93) 48%, rgba(0, 0, 0, .43) 74%, transparent 100%);
}
.theme-kit[dir="rtl"] .tk-band--photo .tk-band__scrim {
  -webkit-mask-image: radial-gradient(ellipse 110% 125% at 100% 100%, #000 0%, rgba(0, 0, 0, .93) 48%, rgba(0, 0, 0, .43) 74%, transparent 100%);
  mask-image: radial-gradient(ellipse 110% 125% at 100% 100%, #000 0%, rgba(0, 0, 0, .93) 48%, rgba(0, 0, 0, .43) 74%, transparent 100%);
}
.theme-kit .tk-band--photo .tk-band__scrim::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(var(--tk-band-scrim), .92);
}
.theme-kit .tk-band__blur { filter: blur(14px); }
/* A wider band, where the name fits on one line: a narrower ellipse. The band
   is a size container, so the editor's canvas (a phone inside a desktop
   window) draws what a phone draws. */
@container (min-width: 640px) {
  .theme-kit .tk-band--photo .tk-band__scrim {
    -webkit-mask-image: radial-gradient(ellipse 72% 140% at 0% 100%, #000 0%, rgba(0, 0, 0, .93) 48%, rgba(0, 0, 0, .43) 74%, transparent 100%);
    mask-image: radial-gradient(ellipse 72% 140% at 0% 100%, #000 0%, rgba(0, 0, 0, .93) 48%, rgba(0, 0, 0, .43) 74%, transparent 100%);
  }
  .theme-kit[dir="rtl"] .tk-band--photo .tk-band__scrim {
    -webkit-mask-image: radial-gradient(ellipse 72% 140% at 100% 100%, #000 0%, rgba(0, 0, 0, .93) 48%, rgba(0, 0, 0, .43) 74%, transparent 100%);
    mask-image: radial-gradient(ellipse 72% 140% at 100% 100%, #000 0%, rgba(0, 0, 0, .93) 48%, rgba(0, 0, 0, .43) 74%, transparent 100%);
  }
}
/* The shadow is a filter on the block, not a text-shadow: the name's
   line-clamp would cut a text-shadow into a box. The kicker is small and thin
   and sits where the ellipse is weakest, so it gets a denser one. */
.theme-kit .tk-band--photo .tk-band__text {
  filter: drop-shadow(0 0 4px rgba(var(--tk-band-scrim), .9)) drop-shadow(0 0 16px rgba(var(--tk-band-scrim), .9));
}
.theme-kit .tk-band--photo .tk-band__kicker {
  filter: drop-shadow(0 0 2px rgba(var(--tk-band-scrim), .95)) drop-shadow(0 0 8px rgba(var(--tk-band-scrim), .95));
}
/* The owner's own photo ("band"): the wash above was drawn for the catalogue
   photos, composed with an empty corner for the name; over a photo that was not,
   it hid most of it (a dark photo, or a logo in the middle, came out black on a
   phone). Here it stays behind the name: smaller, lighter, a softer blur. The
   drop shadows under the letters keep the name legible over the rest. */
.theme-kit .tk-band--cover .tk-band__scrim::after { background: rgba(var(--tk-band-scrim), .8); }
.theme-kit .tk-band--cover .tk-band__blur { filter: blur(6px); }
.theme-kit .tk-band--cover .tk-band__scrim {
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 0% 100%, #000 0%, rgba(0, 0, 0, .85) 45%, rgba(0, 0, 0, .3) 78%, transparent 100%);
  mask-image: radial-gradient(ellipse 90% 80% at 0% 100%, #000 0%, rgba(0, 0, 0, .85) 45%, rgba(0, 0, 0, .3) 78%, transparent 100%);
}
.theme-kit[dir="rtl"] .tk-band--cover .tk-band__scrim {
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 100% 100%, #000 0%, rgba(0, 0, 0, .85) 45%, rgba(0, 0, 0, .3) 78%, transparent 100%);
  mask-image: radial-gradient(ellipse 90% 80% at 100% 100%, #000 0%, rgba(0, 0, 0, .85) 45%, rgba(0, 0, 0, .3) 78%, transparent 100%);
}
@container (min-width: 640px) {
  .theme-kit .tk-band--cover .tk-band__scrim {
    -webkit-mask-image: radial-gradient(ellipse 60% 88% at 0% 100%, #000 0%, rgba(0, 0, 0, .85) 45%, rgba(0, 0, 0, .3) 78%, transparent 100%);
    mask-image: radial-gradient(ellipse 60% 88% at 0% 100%, #000 0%, rgba(0, 0, 0, .85) 45%, rgba(0, 0, 0, .3) 78%, transparent 100%);
  }
  .theme-kit[dir="rtl"] .tk-band--cover .tk-band__scrim {
    -webkit-mask-image: radial-gradient(ellipse 60% 88% at 100% 100%, #000 0%, rgba(0, 0, 0, .85) 45%, rgba(0, 0, 0, .3) 78%, transparent 100%);
    mask-image: radial-gradient(ellipse 60% 88% at 100% 100%, #000 0%, rgba(0, 0, 0, .85) 45%, rgba(0, 0, 0, .3) 78%, transparent 100%);
  }
}
.theme-kit .tk-band--photo:not(.tk-still) .tk-band__photo,
.theme-kit .tk-band--photo:not(.tk-still) .tk-band__blur { animation: tk-base-settle 5s ease-out 1 both; }
@keyframes tk-base-settle { from { scale: 1.08; } to { scale: 1; } }
/* The owner's framing of the cover ("band"; ImageCrop surface cover_band,
   theme_kits/_band, docs/research/HEADER_IMAGE_FRAMING.md). The variables are the
   photo's size (--tk-frame-pw/ph) and the part of the photo that must always show
   (--tk-frame-rx/ry/rw/rh: the owner's frame, less any margin it held), in pixels of
   the original. The tall band shows that
   rectangle whole at the largest scale that fits, centred on it, and fills the rest with
   more photo; where there is no more photo (a near-square cover in a desktop's 8:3 band)
   the photo is centred on that axis over its blurred copy. The short band (7rem, up to
   6:1) would shrink the rectangle to a strip, so it covers instead, centred on the
   rectangle. left/top are physical on purpose: the photo is never mirrored (docs/RTL.md).
   The container is this box, so cqw/cqh are the band's own width and height. */
.theme-kit .tk-frame { container-type: size; overflow: hidden; }
.theme-kit .tk-frame__fill {
  position: absolute; inset: -1rem; width: calc(100% + 2rem); height: calc(100% + 2rem);
  max-width: none; object-fit: cover; filter: blur(14px);
}
.theme-kit .tk-frame__photo {
  --tk-frame-s: min(100cqw / var(--tk-frame-rw), 100cqh / var(--tk-frame-rh));
  --tk-frame-dx: calc(100cqw - var(--tk-frame-pw) * var(--tk-frame-s));
  --tk-frame-dy: calc(100cqh - var(--tk-frame-ph) * var(--tk-frame-s));
  position: absolute; max-width: none;
  width: calc(var(--tk-frame-pw) * var(--tk-frame-s));
  height: calc(var(--tk-frame-ph) * var(--tk-frame-s));
  left: clamp(min(var(--tk-frame-dx), var(--tk-frame-dx) / 2),
              calc(50cqw - (var(--tk-frame-rx) + var(--tk-frame-rw) / 2) * var(--tk-frame-s)),
              max(0px, var(--tk-frame-dx) / 2));
  top: clamp(min(var(--tk-frame-dy), var(--tk-frame-dy) / 2),
             calc(50cqh - (var(--tk-frame-ry) + var(--tk-frame-rh) / 2) * var(--tk-frame-s)),
             max(0px, var(--tk-frame-dy) / 2));
}
.theme-kit .tk-band--short .tk-frame__photo {
  --tk-frame-s: max(100cqw / var(--tk-frame-pw), 100cqh / var(--tk-frame-ph));
}
/* "emblem": a logo on a white tile, whatever the page's colour scheme (the
   editor's dark mode remaps Tailwind's white). */
.theme-kit .tk-band__emblem { background-color: #fff; }
.theme-kit .tk-logo-header { background: var(--tk-page); }

@media (prefers-reduced-motion: reduce) {
  .theme-kit .tk-band__photo,
  .theme-kit .tk-band__blur { animation: none !important; }
}
