/*
 * FamilyEasy website: base styles and the shared component classes (brand "Potager", docs/brand/BRAND.md).
 * Tokens are in tokens.css. Page-specific styles live next to their component (Blazor CSS isolation, *.razor.css).
 * The look reproduces the React website (web/src) one to one: Tailwind's classes were translated to these rules.
 *
 * Sections: 1 reset · 2 base · 3 helpers · 4 components · 5 print
 */

/* ============================================================ 1. Reset (as Tailwind's preflight) */
*,
::before,
::after,
::backdrop {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0 solid;
}
html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
  -webkit-tap-highlight-color: transparent;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
}
ol,
ul,
menu {
  list-style: none;
}
img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block;
  vertical-align: middle;
}
img,
video {
  max-width: 100%;
  height: auto;
}
a {
  color: inherit;
  text-decoration: inherit;
}
b,
strong {
  font-weight: bolder;
}
small {
  font-size: 80%;
}
code,
kbd,
samp,
pre {
  font-family: var(--font-mono);
  font-size: 1em;
}
button,
input,
select,
optgroup,
textarea,
::file-selector-button {
  font: inherit;
  font-feature-settings: inherit;
  letter-spacing: inherit;
  color: inherit;
  background-color: transparent;
  border-radius: 0;
  opacity: 1;
}
button,
input:where([type='button'], [type='reset'], [type='submit']),
::file-selector-button {
  appearance: button;
}
::placeholder {
  opacity: 1;
}
textarea {
  resize: vertical;
}
summary {
  display: list-item;
}
table {
  border-collapse: collapse;
  text-indent: 0;
  border-color: inherit;
}
hr {
  height: 0;
  color: inherit;
  border-top-width: 1px;
}
fieldset {
  min-width: 0;
}

/* ============================================================ 2. Base */
html {
  text-rendering: optimizeLegibility;
  scroll-padding-top: 5rem;
}
body {
  min-height: 100dvh;
  background: var(--fe-bg);
  color: var(--fe-ink);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'ss01';
}
h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  text-wrap: balance;
  line-height: 1.15;
  letter-spacing: -0.005em;
}
p {
  text-wrap: pretty;
}
::selection {
  background: var(--fe-primary-soft);
  color: var(--fe-on-primary-soft);
}
:focus-visible {
  outline: 3px solid var(--fe-focus);
  outline-offset: 2px;
}
[hidden] {
  display: none !important;
}
button,
[role='button'],
summary,
label[for] {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================ 3. Helpers */
.sr-only,
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
/* Readable measure for running text. */
.prose-measure {
  max-width: 68ch;
}
/* A card: white on the mint ground, no border, depth by tint (24 px corners). */
.paper {
  border-radius: var(--radius-lg);
  background: var(--fe-surface);
}
/* An organic blob behind a hero picture, an empty-state drawing or a recipe placeholder (one per screen). */
.pebble {
  border-radius: 48% 52% 44% 56% / 55% 45% 55% 45%;
}
.skeleton {
  display: block;
  background: linear-gradient(90deg, var(--fe-surface-mid) 25%, var(--fe-surface-low) 50%, var(--fe-surface-mid) 75%);
  background-size: 200% 100%;
  border-radius: var(--radius-sm);
  animation: fe-shimmer 1.6s linear infinite;
}
.scrollbar-none {
  scrollbar-width: none;
}
.scrollbar-none::-webkit-scrollbar {
  display: none;
}
.icon {
  flex-shrink: 0;
}
/* Text */
.text-xs {
  font-size: var(--text-xs);
  line-height: var(--leading-xs);
}
.text-sm {
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
}
.text-md {
  font-size: var(--text-md);
  line-height: var(--leading-md);
}
.text-lg {
  font-size: var(--text-lg);
  line-height: var(--leading-lg);
}
.text-xl {
  font-size: var(--text-xl);
  line-height: var(--leading-xl);
}
.text-2xl {
  font-size: var(--text-2xl);
  line-height: var(--leading-2xl);
}
.text-3xl {
  font-size: var(--text-3xl);
  line-height: var(--leading-3xl);
}
.muted {
  color: var(--fe-ink-soft);
}
.strong {
  font-weight: 600;
  color: var(--fe-ink);
}
.display {
  font-family: var(--font-display);
  font-weight: 600;
}
.mono-code {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.2em;
}
.handwritten {
  font-family: var(--font-hand);
  font-size: 1.35em;
  line-height: 1.2;
}
.tabular {
  font-variant-numeric: tabular-nums;
}
.text-danger {
  color: var(--fe-danger);
}
.link {
  font-weight: 600;
  color: var(--fe-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}
/* Layout: a column or a row with a gap (--gap), wrapping rows. */
.stack {
  display: flex;
  flex-direction: column;
  gap: var(--gap, 1rem);
}
.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--gap, 0.75rem);
}
.row--end {
  justify-content: flex-end;
}
.row--between {
  justify-content: space-between;
}
.grow {
  flex: 1 1 0%;
  min-width: 0;
}
.self-start {
  align-self: flex-start;
}

/* ============================================================ 4. Components */

/* ---- Spinner ---- */
.spinner {
  width: 1.25rem;
  height: 1.25rem;
  animation: fe-spin 0.9s linear infinite;
}
.page-spinner {
  display: grid;
  min-height: 40vh;
  place-items: center;
  color: var(--fe-primary);
}
.page-spinner .spinner {
  width: 2rem;
  height: 2rem;
}

/* ---- Buttons: pills; primary basil, soft mint, quiet text only ---- */
.btn {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  height: 2.75rem;
  gap: 0.5rem;
  padding: 0 1.25rem;
  border-radius: var(--radius-pill);
  font-size: var(--text-base);
  line-height: var(--leading-base);
  font-weight: 600;
  white-space: nowrap;
  user-select: none;
  cursor: pointer;
  transition: all 200ms ease-out;
}
.btn:disabled,
.btn[aria-disabled='true'] {
  pointer-events: none;
  opacity: 0.5;
}
.btn--sm {
  height: 2.25rem;
  gap: 0.375rem;
  padding: 0 0.875rem;
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
}
.btn--lg {
  height: 3.5rem;
  gap: 0.625rem;
  padding: 0 1.75rem;
  font-size: var(--text-md);
  line-height: var(--leading-md);
}
.btn--block {
  width: 100%;
}
.btn--primary {
  background: var(--fe-primary);
  color: var(--fe-on-primary);
}
.btn--primary:hover {
  filter: brightness(1.1);
}
.btn--primary:active {
  filter: brightness(0.95);
}
.btn--soft {
  background: var(--fe-primary-soft);
  color: var(--fe-on-primary-soft);
}
.btn--soft:hover,
.btn--olive:hover {
  filter: brightness(0.97);
}
.btn--soft:active {
  filter: brightness(0.95);
}
.btn--olive {
  background: var(--fe-olive-soft);
  color: var(--fe-on-olive-soft);
}
.btn--outline {
  border: 1px solid var(--fe-line);
  background: var(--fe-surface);
  color: var(--fe-ink);
}
.btn--outline:hover {
  border-color: color-mix(in srgb, var(--fe-line-strong) 60%, transparent);
  background: var(--fe-surface-low);
}
.btn--outline:active {
  background: var(--fe-surface-mid);
}
.btn--quiet {
  background: transparent;
  color: var(--fe-primary);
}
.btn--quiet:hover {
  background: var(--fe-surface-high);
}
.btn--quiet:active {
  background: var(--fe-surface-highest);
}
.btn--danger {
  background: var(--fe-danger);
  color: var(--fe-on-danger);
}
.btn--danger:hover {
  filter: brightness(1.1);
}
.btn--danger-quiet {
  background: transparent;
  color: var(--fe-danger);
}
.btn--danger-quiet:hover {
  background: color-mix(in srgb, var(--fe-danger-soft) 60%, transparent);
}
.btn .spinner {
  width: 1rem;
  height: 1rem;
}

/* ---- Icon buttons (round) ---- */
.icon-btn {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 200ms;
}
.icon-btn:disabled {
  opacity: 0.4;
}
.icon-btn--sm {
  width: 2.25rem;
  height: 2.25rem;
}
.icon-btn--lg {
  width: 3.5rem;
  height: 3.5rem;
}
.icon-btn--quiet {
  color: var(--fe-ink-soft);
}
.icon-btn--quiet:hover {
  background: var(--fe-surface-high);
  color: var(--fe-ink);
}
.icon-btn--outline {
  border: 1px solid var(--fe-line);
  background: var(--fe-surface);
  color: var(--fe-ink);
}
.icon-btn--outline:hover {
  background: var(--fe-surface-low);
}
.icon-btn--soft {
  background: var(--fe-primary-soft);
  color: var(--fe-on-primary-soft);
}
.icon-btn--soft:hover {
  filter: brightness(0.97);
}
.icon-btn--primary {
  background: var(--fe-primary);
  color: var(--fe-on-primary);
}
.icon-btn--primary:hover {
  filter: brightness(1.1);
}
.icon-btn--surface {
  background: var(--fe-surface);
  color: var(--fe-ink);
  box-shadow: var(--fe-shadow-soft);
}
.icon-btn--surface:hover {
  background: var(--fe-surface-low);
}

/* ---- Chips: filter (aria-pressed), choice (radio), tag (label) ---- */
.chip {
  display: inline-flex;
  min-height: 2.25rem;
  align-items: center;
  gap: 0.375rem;
  padding: 0 0.875rem;
  border: 1px solid var(--fe-line);
  border-radius: var(--radius-pill);
  background: var(--fe-surface);
  color: var(--fe-ink);
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all 150ms;
}
.chip:hover {
  border-color: color-mix(in srgb, var(--fe-line-strong) 60%, transparent);
  background: var(--fe-surface-low);
}
.chip:disabled,
.chip[aria-disabled='true'] {
  cursor: not-allowed;
  opacity: 0.45;
}
.chip > .icon:first-child:is([data-check]) {
  margin-left: -0.125rem;
}
.chip--suggested {
  border-style: dashed;
  border-color: var(--fe-honey);
}
.chip[aria-pressed='true'],
.chip--on {
  border-color: color-mix(in srgb, var(--fe-primary) 30%, transparent);
  background: var(--fe-primary-soft);
  color: var(--fe-on-primary-soft);
}
.chip--olive[aria-pressed='true'] {
  border-color: color-mix(in srgb, var(--fe-olive) 40%, transparent);
  background: var(--fe-olive-soft);
  color: var(--fe-on-olive-soft);
}
.chip--accent[aria-pressed='true'] {
  border-color: var(--fe-accent);
  background: var(--fe-accent-soft);
  color: var(--fe-on-accent-soft);
}
.chip[role='radio'][aria-checked='true'] {
  border-color: var(--fe-primary);
  background: var(--fe-primary);
  color: var(--fe-on-primary);
}
.tag {
  display: inline-flex;
  min-height: 1.75rem;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
}
.tag--removable {
  padding-right: 0.25rem;
}
.tag__remove {
  display: grid;
  width: 1.5rem;
  height: 1.5rem;
  margin-left: 0.125rem;
  place-items: center;
  border-radius: var(--radius-pill);
}
.tag__remove:hover {
  background: var(--fe-hover-shade);
}

/* Tones shared by tags, badges and notices. */
.tone-neutral {
  background: var(--fe-surface-high);
  color: var(--fe-ink-soft);
}
.tone-primary {
  background: var(--fe-primary-soft);
  color: var(--fe-on-primary-soft);
}
.tone-olive {
  background: var(--fe-olive-soft);
  color: var(--fe-on-olive-soft);
}
.tone-honey {
  background: var(--fe-honey-soft);
  color: var(--fe-on-honey-soft);
}
.tone-accent {
  background: var(--fe-accent-soft);
  color: var(--fe-on-accent-soft);
}
.tone-danger {
  background: var(--fe-danger-soft);
  color: var(--fe-on-danger-soft);
}

/* ---- Badge ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.625rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  line-height: var(--leading-xs);
  font-weight: 600;
}
/* A count on apricot (navigation badges). */
.count-badge {
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-pill);
  background: var(--fe-accent);
  color: var(--fe-on-accent);
  font-size: var(--text-xs);
  line-height: var(--leading-xs);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ---- Card ---- */
.card {
  border-radius: var(--radius-lg);
  background: var(--fe-surface);
}
.card--low {
  background: var(--fe-surface-low);
}
.card--outline {
  border: 1px solid var(--fe-line);
  background: transparent;
}
.card--pad-sm {
  padding: 1rem;
}
.card--pad-md {
  padding: 1.25rem;
}
.card--pad-lg {
  padding: 1.5rem;
}
@media (min-width: 640px) {
  .card--pad-md {
    padding: 1.5rem;
  }
  .card--pad-lg {
    padding: 2rem;
  }
}
.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}
.section-header__text {
  margin-top: 0.25rem;
  max-width: 64ch;
  color: var(--fe-ink-soft);
}
.section-header__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.section-header h1 {
  font-size: var(--text-2xl);
  line-height: var(--leading-2xl);
}
.section-header h2 {
  font-size: var(--text-xl);
  line-height: var(--leading-xl);
}
.section-header h3 {
  font-size: var(--text-lg);
  line-height: var(--leading-lg);
}
@media (min-width: 640px) {
  .section-header h1 {
    font-size: var(--text-3xl);
    line-height: var(--leading-3xl);
  }
}

/* ---- Fields ---- */
.field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.field__label {
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  font-weight: 600;
  color: var(--fe-ink);
}
.field__optional {
  margin-left: 0.375rem;
  font-weight: 400;
  color: var(--fe-ink-soft);
}
.field__error {
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  font-weight: 500;
  color: var(--fe-danger);
}
.field__hint {
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  color: var(--fe-ink-soft);
}
.control {
  display: block;
  width: 100%;
  height: 2.75rem;
  padding: 0 0.875rem;
  border: 1px solid var(--fe-line);
  border-radius: var(--radius-md);
  background: var(--fe-surface);
  color: var(--fe-ink);
  font-size: var(--text-base);
  line-height: var(--leading-base);
  transition: border-color 150ms, background-color 150ms;
}
.control::placeholder {
  color: color-mix(in srgb, var(--fe-ink-soft) 75%, transparent);
}
.control:hover {
  border-color: color-mix(in srgb, var(--fe-line-strong) 70%, transparent);
}
.control:focus-visible {
  border-color: var(--fe-primary);
  outline: 2px solid var(--fe-focus);
  outline-offset: 0;
}
.control[aria-invalid='true'] {
  border-color: var(--fe-danger);
  background: color-mix(in srgb, var(--fe-danger-soft) 15%, var(--fe-surface));
}
.control:disabled {
  opacity: 0.6;
}
input.control:read-only {
  background: var(--fe-surface-low);
}
textarea.control {
  height: auto;
  padding-top: 0.625rem;
  padding-bottom: 0.625rem;
  line-height: 1.625;
}
.select {
  position: relative;
  display: block;
}
.select > select.control {
  appearance: none;
  padding-right: 2.5rem;
}
.select > .icon {
  pointer-events: none;
  position: absolute;
  top: 50%;
  right: 0.75rem;
  transform: translateY(-50%);
  color: var(--fe-ink-soft);
}
.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.checkbox input {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.125rem;
  flex-shrink: 0;
  cursor: pointer;
  border-radius: 4px;
  accent-color: var(--fe-primary);
}
.checkbox label {
  font-weight: 500;
  color: var(--fe-ink);
}

/* ---- Switch ---- */
.switch-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.switch-row label {
  font-weight: 500;
  color: var(--fe-ink);
}
.switch {
  position: relative;
  width: 3rem;
  height: 1.75rem;
  margin-top: 0.125rem;
  flex-shrink: 0;
  border: 2px solid var(--fe-line-strong);
  border-radius: var(--radius-pill);
  background: var(--fe-surface-high);
  transition: background-color 150ms, border-color 150ms;
}
.switch:disabled {
  opacity: 0.5;
}
.switch::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0.125rem;
  width: 1.25rem;
  height: 1.25rem;
  transform: translateY(-50%);
  border-radius: var(--radius-pill);
  background: var(--fe-line-strong);
  box-shadow: var(--fe-shadow-soft);
  transition: all 150ms;
}
.switch[aria-checked='true'] {
  border-color: var(--fe-primary);
  background: var(--fe-primary);
}
.switch[aria-checked='true']::after {
  left: calc(100% - 1.375rem);
  background: var(--fe-on-primary);
}

/* ---- Number stepper (− value +) ---- */
.stepper {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.stepper__button {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  place-items: center;
  border-radius: var(--radius-pill);
  background: var(--fe-surface-high);
  color: var(--fe-ink);
  transition: all 150ms;
}
.stepper__button:hover {
  background: var(--fe-surface-highest);
}
.stepper__button:disabled {
  opacity: 0.4;
}
.stepper__input {
  width: 3.5rem;
  height: 2.25rem;
  appearance: textfield;
  -moz-appearance: textfield;
  border-radius: var(--radius-md);
  text-align: center;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.stepper__input::-webkit-inner-spin-button,
.stepper__input::-webkit-outer-spin-button {
  appearance: none;
  margin: 0;
}
.stepper__text {
  display: block;
  min-width: 6rem;
  text-align: center;
  font-weight: 600;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.stepper--lg .stepper__button {
  width: 3rem;
  height: 3rem;
}
.stepper--lg .stepper__input {
  height: 3rem;
  font-size: var(--text-xl);
}
.stepper--lg .stepper__text {
  font-size: var(--text-lg);
}

/* ---- Radio pills (one choice: role=radiogroup of chips) ---- */
.radio-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ---- Notice (inline message) ---- */
.notice {
  display: flex;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 18px;
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
}
.notice.tone-danger {
  border: 1px solid color-mix(in srgb, var(--fe-danger) 30%, transparent);
}
.notice__icon {
  margin-top: 0.125rem;
  flex-shrink: 0;
}
.notice__body {
  min-width: 0;
  flex: 1 1 0%;
}
.notice__title {
  font-weight: 600;
}
.notice__title + .notice__text {
  margin-top: 0.125rem;
}
.notice__action {
  margin-top: 0.75rem;
}

/* ---- Empty and error states ---- */
.empty-state {
  display: flex;
  max-width: 28rem;
  margin: 0 auto;
  flex-direction: column;
  align-items: center;
  padding: 3rem 1rem;
  text-align: center;
}
.empty-state__art {
  position: relative;
  display: grid;
  width: 11rem;
  margin-bottom: 1.5rem;
  place-items: center;
  color: var(--fe-primary);
}
.empty-state__art > .pebble {
  position: absolute;
  inset: 0.75rem 0.25rem;
  background: var(--fe-surface-high);
}
.empty-state__drawing {
  position: relative;
  width: 9rem;
}
.empty-state h2 {
  font-size: var(--text-xl);
  line-height: var(--leading-xl);
  color: var(--fe-ink);
}
.empty-state__text {
  margin-top: 0.5rem;
  color: var(--fe-ink-soft);
}
.empty-state__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.error-state__icon {
  display: grid;
  width: 3.5rem;
  height: 3.5rem;
  margin-bottom: 1rem;
  place-items: center;
  border-radius: var(--radius-pill);
  background: var(--fe-danger-soft);
  color: var(--fe-on-danger-soft);
}

/* ---- Avatar (initials on a tone derived from the name) ---- */
.avatar {
  position: relative;
  display: inline-grid;
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  place-items: center;
  overflow: hidden;
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1;
}
.avatar--xs {
  width: 1.5rem;
  height: 1.5rem;
  font-size: 0.6rem;
}
.avatar--sm {
  width: 2rem;
  height: 2rem;
  font-size: var(--text-xs);
}
.avatar--lg {
  width: 3.5rem;
  height: 3.5rem;
  font-size: var(--text-lg);
}
.avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar--tone-4 {
  background: var(--fe-surface-highest);
  color: var(--fe-ink);
}

/* ---- Logo ---- */
.logo {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  border-radius: var(--radius-md);
}
.logo svg {
  width: auto;
  height: 2.25rem;
}
.logo--sm svg {
  height: 2rem;
}
.logo--lg svg {
  height: 3.25rem;
}
@media (min-width: 640px) {
  .logo--lg svg {
    height: 4rem;
  }
}
.fill-ink {
  fill: var(--fe-ink);
}
.fill-primary {
  fill: var(--fe-primary);
}

/* ---- Recipe placeholder art ---- */
.recipe-art {
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--fe-surface-mid);
}
.recipe-art__frame {
  position: relative;
  display: grid;
  height: 78%;
  max-height: 12rem;
  aspect-ratio: 6 / 5;
  place-items: center;
}
.recipe-art__frame > .pebble {
  position: absolute;
  inset: 0;
}
[data-theme='dark'] .recipe-art__frame > .pebble {
  opacity: 0.6;
}
.recipe-art__frame > svg {
  position: relative;
  width: auto;
  height: 70%;
}
.bg-honey-soft {
  background: var(--fe-honey-soft);
}
.bg-accent-soft {
  background: var(--fe-accent-soft);
}
.bg-surface-high {
  background: var(--fe-surface-high);
}
.bg-surface-low {
  background: var(--fe-surface-low);
}
.bg-surface-mid {
  background: var(--fe-surface-mid);
}
.bg-surface {
  background: var(--fe-surface);
}

/* ---- Play Store badge ---- */
.play-badge {
  display: inline-flex;
  height: 3rem;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1rem;
  border-radius: var(--radius-md);
  background: #1f3329;
  color: #fff;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.1);
  transition: background-color 150ms;
}
.play-badge:hover {
  background: #14241c;
}
[data-theme='dark'] .play-badge {
  background: #000;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.25);
}
.play-badge__glyph {
  width: 1.25rem;
  height: 1.5rem;
}
.play-badge__text {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1;
}
.play-badge__small {
  font-size: 0.7rem;
  letter-spacing: 0.025em;
  opacity: 0.85;
}
.play-badge__big {
  font-size: var(--text-lg);
  line-height: var(--leading-lg);
  font-weight: 600;
}
.play-badge--lg {
  height: 3.5rem;
  padding: 0 1.25rem;
}
.play-badge--lg .play-badge__glyph {
  width: 1.5rem;
  height: 1.75rem;
}
.play-badge--lg .play-badge__big {
  font-size: var(--text-xl);
  line-height: var(--leading-xl);
}

/* ---- Menus and popovers (open/close in js/site.js; WAI-ARIA menu button) ---- */
.menu {
  position: relative;
}
.menu__panel {
  position: absolute;
  z-index: 40;
  margin-top: 0.5rem;
  min-width: 15rem;
  padding: 0.375rem;
  border: 1px solid color-mix(in srgb, var(--fe-line) 60%, transparent);
  border-radius: 20px;
  background: var(--fe-surface);
  color: var(--fe-ink);
  box-shadow: var(--fe-shadow-lift);
  animation: fe-pop-in 220ms var(--ease-out-soft);
}
.menu__panel--end {
  right: 0;
}
.menu__panel--start {
  left: 0;
}
.menu__item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: var(--radius-md);
  text-align: left;
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  font-weight: 500;
  outline: none;
  cursor: pointer;
}
.menu__item:hover,
.menu__item:focus-visible {
  background: var(--fe-surface-high);
  outline: none;
}
.menu__item--danger {
  color: var(--fe-danger);
}
.menu__item[aria-disabled='true'] {
  opacity: 0.5;
}
.menu__item-label {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.menu__check {
  color: var(--fe-primary);
}
.menu__separator {
  height: 1px;
  margin: 0.375rem 0;
  background: color-mix(in srgb, var(--fe-line) 70%, transparent);
}
.menu__header {
  padding: 0.5rem 0.75rem 0.375rem;
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  color: var(--fe-ink-soft);
}
/* The language and theme menus' trigger. */
.pref-trigger {
  display: inline-flex;
  height: 2.5rem;
  align-items: center;
  gap: 0.375rem;
  padding: 0 0.75rem;
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  font-weight: 600;
  color: var(--fe-ink-soft);
  transition: all 150ms;
}
.pref-trigger:hover {
  background: var(--fe-surface-high);
  color: var(--fe-ink);
}
.pref-trigger--icon {
  width: 2.5rem;
  justify-content: center;
  padding: 0;
}
.pref-trigger__code {
  text-transform: uppercase;
}
/* Theme menu: the icon follows the resolved theme, the check the chosen mode (<html data-theme-mode>, js/site.js). */
.theme-icon {
  display: none;
}
:root[data-theme='light'] .theme-icon--sun,
:root[data-theme='dark'] .theme-icon--moon {
  display: block;
}
.theme-check {
  visibility: hidden;
}
:root[data-theme-mode='light'] .theme-check--light,
:root[data-theme-mode='dark'] .theme-check--dark,
:root:not([data-theme-mode='light']):not([data-theme-mode='dark']) .theme-check--system {
  visibility: visible;
}
.popover__panel {
  position: absolute;
  z-index: 40;
  margin-top: 0.5rem;
  max-height: 20rem;
  min-width: 14rem;
  overflow-y: auto;
  padding: 0.5rem;
  border: 1px solid color-mix(in srgb, var(--fe-line) 60%, transparent);
  border-radius: 20px;
  background: var(--fe-surface);
  color: var(--fe-ink);
  box-shadow: var(--fe-shadow-lift);
  animation: fe-pop-in 220ms var(--ease-out-soft);
}

/* ---- Combobox ---- */
.combobox {
  position: relative;
}
.combobox__list {
  position: absolute;
  inset-inline: 0;
  top: 100%;
  z-index: 30;
  margin-top: 0.25rem;
  max-height: 16rem;
  overflow-y: auto;
  padding: 0.25rem;
  border: 1px solid color-mix(in srgb, var(--fe-line) 60%, transparent);
  border-radius: var(--radius-md);
  background: var(--fe-surface);
  box-shadow: var(--fe-shadow-lift);
}
.combobox__option {
  display: flex;
  cursor: pointer;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
}
.combobox__option:hover {
  background: var(--fe-surface-high);
}
.combobox__option[aria-selected='true'] {
  background: var(--fe-primary-soft);
  color: var(--fe-on-primary-soft);
}
.combobox__hint {
  flex-shrink: 0;
  font-size: var(--text-xs);
  color: var(--fe-ink-soft);
}

/* ---- Tabs (role=tablist) and tab-like navigation ---- */
.tabs {
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar {
  display: none;
}
.tab {
  display: inline-flex;
  height: 2.5rem;
  flex-shrink: 0;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1rem;
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  font-weight: 600;
  color: var(--fe-ink-soft);
  transition: all 200ms;
}
.tab:hover {
  background: var(--fe-surface-high);
  color: var(--fe-ink);
}
.tab[aria-selected='true'],
.tab.active,
.tab[aria-current='page'] {
  background: var(--fe-primary-soft);
  color: var(--fe-on-primary-soft);
}
.tab__count {
  padding: 0 0.5rem;
  border-radius: var(--radius-pill);
  background: var(--fe-surface-high);
  color: var(--fe-ink-soft);
  font-size: var(--text-xs);
  line-height: 1.25rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.tab__count--accent {
  background: var(--fe-accent);
  color: var(--fe-on-accent);
}

/* ---- Dialogs and sheets (rendered by PortalHost; focus and Esc in js/site.js) ---- */
.dialog-layer {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.dialog-layer--sheet {
  align-items: flex-end;
  padding: 0;
}
.dialog-scrim {
  position: absolute;
  inset: 0;
  background: var(--fe-scrim);
  animation: fe-fade-in 180ms var(--ease-out-soft);
}
.dialog {
  position: relative;
  display: flex;
  width: 100%;
  max-height: min(90dvh, 52rem);
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--fe-surface);
  color: var(--fe-ink);
  box-shadow: var(--fe-shadow-lift);
  outline: none;
  animation: fe-pop-in 220ms var(--ease-out-soft);
}
.dialog-layer--sheet .dialog {
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  animation: fe-sheet-in 260ms var(--ease-out-soft);
}
@media (min-width: 640px) {
  .dialog-layer {
    padding: 1.5rem;
  }
  .dialog-layer--sheet {
    align-items: center;
    padding: 1.5rem;
  }
  .dialog-layer--sheet .dialog {
    border-radius: var(--radius-xl);
    animation: fe-pop-in 220ms var(--ease-out-soft);
  }
  .dialog--sm {
    max-width: 28rem;
  }
  .dialog--md {
    max-width: 36rem;
  }
  .dialog--lg {
    max-width: 48rem;
  }
  .dialog__grip {
    display: none;
  }
}
.dialog__grip {
  width: 2.5rem;
  height: 0.375rem;
  margin: 0.625rem auto 0;
  border-radius: var(--radius-pill);
  background: var(--fe-line);
}
.dialog__header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1.5rem 1.5rem 0.5rem;
}
.dialog__heading {
  min-width: 0;
  flex: 1 1 0%;
}
.dialog__title {
  font-size: var(--text-xl);
  line-height: 1.375;
}
.dialog__description {
  margin-top: 0.375rem;
  color: var(--fe-ink-soft);
}
.dialog__close {
  margin: -0.25rem -0.5rem 0 0;
}
.dialog__body {
  min-height: 0;
  flex: 1 1 0%;
  overflow-y: auto;
  padding: 0.75rem 1.5rem;
}
.dialog__footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem max(0.75rem, env(safe-area-inset-bottom));
  border-top: 1px solid color-mix(in srgb, var(--fe-line) 50%, transparent);
}
.dialog__footer {
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
}

/* ---- Toasts (aria-live, above the phone's bottom navigation) ---- */
.toaster {
  pointer-events: none;
  position: fixed;
  inset-inline: 0;
  bottom: 5rem;
  z-index: 60;
  display: flex;
  justify-content: center;
  padding: 0 1rem;
}
@media (min-width: 1024px) {
  .toaster {
    bottom: 1.5rem;
  }
}
.toaster__list {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.toast {
  pointer-events: auto;
  display: flex;
  width: 100%;
  max-width: 28rem;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 20px;
  background: var(--fe-ink);
  color: var(--fe-bg);
  box-shadow: var(--fe-shadow-lift);
  animation: fe-toast-in 260ms var(--ease-out-soft);
}
.toast--error {
  background: var(--fe-danger-soft);
  color: var(--fe-on-danger-soft);
}
.toast > .icon:first-child {
  margin-top: 0.125rem;
}
.toast__message {
  min-width: 0;
  flex: 1 1 0%;
  font-size: var(--text-sm);
  line-height: 1.625;
}
.toast__action {
  flex-shrink: 0;
  padding: 0 0.5rem;
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  font-weight: 700;
  text-underline-offset: 2px;
}
.toast__action:hover {
  text-decoration: underline;
}
.toast__close {
  margin-right: -0.25rem;
  flex-shrink: 0;
  padding: 0.25rem;
  border-radius: var(--radius-pill);
  opacity: 0.75;
}
.toast__close:hover {
  opacity: 1;
}

/* ---- Skip link ---- */
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  z-index: 70;
  border-radius: var(--radius-pill);
  background: var(--fe-ink);
  color: var(--fe-bg);
}
.skip-link:focus {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  clip: auto;
  white-space: normal;
}

/* ---- Load more / pagination ---- */
.load-more {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* ---- Media (signed pictures and videos, gallery, lightbox) ---- */
.media-unavailable {
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: var(--fe-surface-high);
  text-align: center;
  font-size: var(--text-sm);
  color: var(--fe-ink-soft);
}
.video-unplayable {
  position: relative;
  overflow: hidden;
}
.video-unplayable > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.6;
}
.video-unplayable__blank {
  aspect-ratio: 16 / 9;
  width: 100%;
}
.video-unplayable__message {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem;
  text-align: center;
  font-size: var(--text-sm);
  color: #fff;
}
.video-unplayable__download {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  background: rgb(255 255 255 / 0.9);
  font-weight: 500;
  color: #000;
}
.play-tag {
  position: absolute;
  bottom: 0.25rem;
  left: 0.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-pill);
  background: rgb(0 0 0 / 0.65);
  backdrop-filter: blur(8px);
  font-size: 0.7rem;
  font-weight: 600;
  color: #fff;
}
.play-tag svg {
  fill: #fff;
}
.play-tag--large {
  bottom: 0.75rem;
  left: 0.75rem;
  padding: 0.375rem 0.75rem;
  font-size: var(--text-sm);
}
.gallery__hero {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--fe-surface-high);
}
.gallery__hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms;
}
.gallery__hero:hover > img {
  transform: scale(1.015);
}
.gallery__enlarge {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-pill);
  background: rgb(0 0 0 / 0.55);
  backdrop-filter: blur(8px);
  font-size: var(--text-sm);
  font-weight: 600;
  color: #fff;
  opacity: 0.9;
  transition: opacity 150ms;
}
.gallery__hero:hover .gallery__enlarge {
  opacity: 1;
}
.gallery__strip {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: none;
}
.gallery__thumb {
  position: relative;
  display: block;
  width: 4rem;
  height: 4rem;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--fe-surface-high);
  box-shadow: 0 0 0 2px transparent;
  transition: all 150ms;
}
@media (min-width: 640px) {
  .gallery__thumb {
    width: 4.5rem;
    height: 4.5rem;
  }
}
.gallery__thumb:hover {
  filter: brightness(1.05);
}
.gallery__thumb--current {
  box-shadow: 0 0 0 2px var(--fe-primary);
}
.gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.step-media {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.step-media--large {
  flex-wrap: nowrap;
  gap: 1rem;
  margin-top: 2rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.5rem;
  scrollbar-width: none;
}
.step-media__item {
  max-width: 100%;
}
.step-media--large .step-media__item {
  width: 85%;
  flex-shrink: 0;
  scroll-snap-align: center;
}
@media (min-width: 640px) {
  .step-media--large .step-media__item {
    width: 70%;
  }
}
.step-media--single .step-media__item {
  width: 100%;
}
.step-media__open {
  display: block;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--fe-surface-high);
}
.step-media__picture {
  display: block;
  height: 10rem;
  width: auto;
  max-width: 100%;
  object-fit: cover;
}
@media (min-width: 640px) {
  .step-media__picture {
    height: 12rem;
  }
}
.step-media--large .step-media__picture,
.step-media--large .step-media__video {
  max-height: 55dvh;
  height: auto;
  width: 100%;
  object-fit: contain;
}
.step-media__video {
  width: 20rem;
  max-width: 100%;
  border-radius: var(--radius-lg);
  background: #000;
}
@media (min-width: 640px) {
  .step-media__video {
    width: 24rem;
  }
}
.step-media figcaption {
  margin-top: 0.375rem;
  font-size: var(--text-sm);
  color: var(--fe-ink-soft);
}
.step-media--large figcaption {
  font-size: var(--text-base);
}
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  background: rgb(12 19 15 / 0.96);
  color: #fff;
  animation: fe-fade-in 180ms var(--ease-out-soft);
}
.lightbox__bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
}
.lightbox__title {
  min-width: 0;
  flex: 1 1 0%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
}
.lightbox__counter {
  font-size: var(--text-sm);
  color: rgb(255 255 255 / 0.8);
  font-variant-numeric: tabular-nums;
}
.lightbox__button {
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border-radius: var(--radius-pill);
  background: rgb(255 255 255 / 0.12);
  backdrop-filter: blur(8px);
  color: #fff;
  transition: background-color 150ms;
}
.lightbox__button:hover {
  background: rgb(255 255 255 / 0.25);
}
.lightbox__button:focus-visible {
  outline-color: #fff;
}
.lightbox__button--close {
  width: 2.75rem;
  height: 2.75rem;
}
.lightbox__stage {
  position: relative;
  display: flex;
  min-height: 0;
  flex: 1 1 0%;
  align-items: center;
  justify-content: center;
  padding: 0 0.5rem;
  touch-action: pan-y;
}
@media (min-width: 640px) {
  .lightbox__bar {
    padding: 0.75rem 1.5rem;
  }
  .lightbox__stage {
    padding: 0 5rem;
  }
}
.lightbox__figure {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}
.lightbox__media {
  min-height: 0;
  max-height: 100%;
  max-width: 100%;
  border-radius: var(--radius-md);
  object-fit: contain;
}
video.lightbox__media {
  background: #000;
}
.lightbox__caption {
  max-width: 48rem;
  padding: 0 1rem;
  text-align: center;
  color: rgb(255 255 255 / 0.9);
}
.lightbox__prev,
.lightbox__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}
.lightbox__prev {
  left: 0.5rem;
}
.lightbox__next {
  right: 0.5rem;
}
@media (min-width: 640px) {
  .lightbox__prev {
    left: 1.25rem;
  }
  .lightbox__next {
    right: 1.25rem;
  }
}
.lightbox__thumbs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.75rem 1rem;
  scrollbar-width: none;
}
.lightbox__thumb {
  display: block;
  width: 3rem;
  height: 3rem;
  overflow: hidden;
  border-radius: var(--radius-sm);
  box-shadow: 0 0 0 2px transparent;
  opacity: 0.6;
  transition: all 150ms;
}
@media (min-width: 640px) {
  .lightbox__thumb {
    width: 3.5rem;
    height: 3.5rem;
  }
}
.lightbox__thumb:hover {
  opacity: 0.9;
}
.lightbox__thumb[aria-current='true'] {
  box-shadow: 0 0 0 2px #fff;
  opacity: 1;
}
.lightbox__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.lightbox__hint {
  display: none;
  padding-bottom: 0.75rem;
  text-align: center;
  font-size: var(--text-xs);
  color: rgb(255 255 255 / 0.6);
}
@media (min-width: 640px) {
  .lightbox__hint {
    display: block;
  }
}

/* ---- Upload progress ---- */
.progress {
  height: 0.375rem;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: var(--fe-surface-mid);
}
.progress__bar {
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--fe-primary);
  transition: width 200ms;
}
.progress--indeterminate .progress__bar {
  width: 33%;
  animation: fe-upload-slide 1.2s ease-in-out infinite;
}

/* ---- Reconnection banner (Blazor sets the classes on #components-reconnect-modal) ---- */
.reconnect {
  display: none;
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 80;
  justify-content: center;
  padding: 0.75rem 1rem;
}
.reconnect.components-reconnect-show,
.reconnect.components-reconnect-retrying,
.reconnect.components-reconnect-failed,
.reconnect.components-reconnect-rejected,
.reconnect.components-reconnect-paused,
.reconnect.components-reconnect-resume-failed {
  display: flex;
}
.reconnect__box {
  display: flex;
  max-width: 36rem;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 20px;
  background: var(--fe-honey-soft);
  color: var(--fe-on-honey-soft);
  box-shadow: var(--fe-shadow-lift);
  animation: fe-toast-in 260ms var(--ease-out-soft);
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
}
.reconnect__text {
  min-width: 0;
  flex: 1 1 14rem;
}
.reconnect__state {
  display: none;
}
.components-reconnect-show .reconnect__state--trying,
.components-reconnect-retrying .reconnect__state--trying,
.components-reconnect-failed .reconnect__state--failed,
.components-reconnect-rejected .reconnect__state--rejected,
.components-reconnect-paused .reconnect__state--paused,
.components-reconnect-resume-failed .reconnect__state--rejected {
  display: inline;
}
.reconnect__retry,
.reconnect__reload {
  display: none;
}
.components-reconnect-failed .reconnect__retry,
.components-reconnect-paused .reconnect__retry,
.components-reconnect-rejected .reconnect__reload,
.components-reconnect-resume-failed .reconnect__reload {
  display: inline-flex;
}
.components-reconnect-show .reconnect__spinner,
.components-reconnect-retrying .reconnect__spinner {
  display: block;
}
.reconnect__spinner {
  display: none;
}

/* ---- Word diff of the review screen ---- */
.diff-added {
  background: var(--fe-olive-soft);
  color: var(--fe-on-olive-soft);
  border-radius: 3px;
  text-decoration: none;
  box-shadow: 0 0 0 1px var(--fe-olive-soft);
}
.diff-removed {
  background: var(--fe-danger-soft);
  color: var(--fe-on-danger-soft);
  border-radius: 3px;
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
  box-shadow: 0 0 0 1px var(--fe-danger-soft);
}

/* ============================================================ 5. Print
 * "Print / save as PDF" on a recipe. Anything marked .no-print disappears (app shell, buttons, dialogs);
 * .print-only appears only on paper. Forest ink on white, basil accents, Fredoka titles; the light palette even
 * when the screen is dark.
 */
.print-only {
  display: none;
}
@media print {
  @page {
    size: A4;
    margin: 16mm 14mm;
  }
  html,
  body {
    background: #fff !important;
    color: #1f3329 !important;
    font-size: 11pt;
  }
  html[data-theme],
  html:not([data-theme]) {
    --fe-bg: #fff;
    --fe-surface: #fff;
    --fe-surface-low: #fff;
    --fe-surface-mid: #e7f0e9;
    --fe-surface-high: #dceadf;
    --fe-ink: #1f3329;
    --fe-ink-soft: #4f6458;
    --fe-line: #c9dbcc;
    --fe-line-strong: #7d9384;
    --fe-primary: #2e6a4f;
    --fe-on-primary: #fff;
    --fe-primary-soft: #cfe6d6;
    --fe-on-primary-soft: #143826;
    --fe-olive-soft: #e2efd3;
    --fe-on-olive-soft: #1c3010;
    --fe-honey-soft: #f8e6a6;
    --fe-on-honey-soft: #3d2e00;
    --fe-accent-soft: #fce6d8;
    --fe-on-accent-soft: #7a3a1a;
    --fe-shadow-soft: 0 0 #0000;
    --fe-shadow-lift: 0 0 #0000;
  }
  .no-print,
  [role='dialog'],
  .toaster,
  .reconnect {
    display: none !important;
  }
  .print-only {
    display: block !important;
  }
  .print-plain {
    box-shadow: none !important;
    border: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: none !important;
  }
  .print-avoid-break {
    break-inside: avoid;
  }
  .print-columns {
    display: grid !important;
    grid-template-columns: 34% 1fr !important;
    gap: 8mm !important;
  }
  h1,
  h2,
  h3 {
    font-family: var(--font-display) !important;
    font-weight: 600 !important;
    color: #1f3329 !important;
  }
  h1 {
    font-size: 24pt !important;
    line-height: 1.15 !important;
  }
  h2 {
    font-size: 14pt !important;
    color: #2e6a4f !important;
  }
  a {
    color: inherit !important;
    text-decoration: none !important;
  }
  img {
    max-height: 70mm;
    object-fit: cover;
  }
  video {
    display: none !important;
  }
  .print-hero {
    aspect-ratio: auto !important;
    height: 70mm !important;
    background: none !important;
  }
  .print-step-media img {
    max-height: 45mm;
    width: auto !important;
  }
}

/* ---- Drawings (Components/Art/Drawing.razor): theme colours of the illustrations ---- */
.art-steam {
  stroke: var(--fe-line-strong);
}
.art-pot {
  fill: var(--fe-primary);
}
.art-handle {
  stroke: var(--fe-primary);
}
.art-stripe {
  stroke: var(--fe-primary-soft);
}
.art-fill-highest {
  fill: var(--fe-surface-highest);
}
.art-page {
  fill: var(--fe-surface);
  stroke: var(--fe-line-strong);
}
.art-line {
  stroke: var(--fe-line);
}
.art-stroke-strong {
  stroke: var(--fe-line-strong);
}
.art-plate-inner {
  fill: var(--fe-surface-low);
  stroke: var(--fe-line);
}
.art-lens {
  fill: var(--fe-bg);
  stroke: var(--fe-primary);
}
.art-face {
  fill: var(--fe-honey-soft);
}
[data-theme='dark'] .art-face {
  fill: var(--fe-accent);
}
.art-olive {
  fill: var(--fe-olive);
}
.art-honey {
  fill: var(--fe-honey);
}
.art-fill-strong {
  fill: var(--fe-line-strong);
}
/* The pot on the basil call-to-action card: on-primary colours. */
.art--on-primary .art-pot {
  fill: var(--fe-on-primary);
}
.art--on-primary .art-handle,
.art--on-primary .art-steam {
  stroke: var(--fe-on-primary);
}
.art--on-primary .art-stripe {
  stroke: var(--fe-primary);
}

/* ---- Premium dialog ---- */
.premium__benefits {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.premium__benefits li {
  display: flex;
  gap: 0.625rem;
}
.premium__check {
  margin-top: 0.125rem;
  color: var(--fe-olive);
}
.premium__prices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 1.25rem;
}
.premium__prices li {
  padding: 0.75rem;
  border-radius: var(--radius-md);
  background: var(--fe-surface-low);
  text-align: center;
}
.premium__tier {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--fe-ink-soft);
}
.premium__price {
  display: block;
  margin-top: 0.25rem;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  line-height: var(--leading-xl);
  font-weight: 600;
  color: var(--fe-ink);
}
.premium__per {
  display: block;
  font-size: var(--text-xs);
  color: var(--fe-ink-soft);
}

/* ---- Public pages ---- */
.public-narrow {
  max-width: var(--width-narrow);
  margin: 0 auto;
}

/* ---- Page header (h1 of app pages) ---- */
.page-header {
  margin-bottom: 1.5rem;
}
.page-header__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 1.5rem;
}
.page-header__title {
  font-size: var(--text-3xl);
  line-height: var(--leading-3xl);
  overflow-wrap: break-word;
}
.page-header__text {
  max-width: 62ch;
  margin-top: 0.5rem;
  color: var(--fe-ink-soft);
}
.page-header__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
@media (min-width: 640px) {
  .page-header {
    margin-bottom: 2rem;
  }
  .page-header__title {
    font-size: var(--text-4xl);
    line-height: var(--leading-4xl);
  }
}
.back-link {
  display: inline-flex;
  margin-bottom: 0.75rem;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem 0.25rem 0;
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  font-weight: 600;
  color: var(--fe-ink-soft);
}
.back-link:hover {
  color: var(--fe-ink);
}

/* ---- Account menu ---- */
.user-menu__trigger {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border-radius: var(--radius-pill);
}
.user-menu__trigger:hover {
  background: var(--fe-surface-high);
}
.user-menu__name {
  display: block;
  font-weight: 600;
  color: var(--fe-ink);
}
.user-menu__email {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---- Administration layout ---- */
.page-header.admin-layout__header {
  margin-bottom: 1rem;
}
.tabs.admin-layout__tabs {
  margin: 0 -0.25rem 2rem;
  padding: 0 0.25rem 0.75rem;
  border-bottom: 1px solid color-mix(in srgb, var(--fe-line) 60%, transparent);
}
.admin-layout__badge {
  margin-left: 0.5rem;
}
@media (min-width: 640px) {
  .page-header.admin-layout__header {
    margin-bottom: 1.25rem;
  }
}

/* ---- Code pages (/join, /friend) ---- */
.code-page__title {
  font-size: var(--text-3xl);
  line-height: var(--leading-3xl);
}
.code-page__text {
  margin-top: 0.75rem;
  font-size: var(--text-md);
  line-height: var(--leading-md);
  color: var(--fe-ink-soft);
}
.code-page__form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 2rem;
}
.code-page__form .field {
  flex: 1 1 0%;
}
.code-page__code {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  padding: 1.25rem;
  border-radius: 20px;
  background: var(--fe-surface-mid);
}
.code-page__code-label {
  font-size: var(--text-sm);
  line-height: var(--leading-sm);
  font-weight: 600;
  color: var(--fe-ink-soft);
}
.code-page__code-value {
  margin-top: 0.25rem;
  font-family: var(--font-mono);
  font-size: var(--text-3xl);
  line-height: var(--leading-3xl);
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--fe-ink);
}
.code-page__next {
  margin-top: 2rem;
}
.code-page__found {
  padding: 1rem;
  border-radius: var(--radius-lg);
  background: var(--fe-surface-low);
}
.code-page__person {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.code-page__person-name {
  min-width: 0;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  line-height: var(--leading-xl);
  font-weight: 600;
  overflow-wrap: break-word;
  color: var(--fe-ink);
}
@media (min-width: 640px) {
  .code-page__title {
    font-size: var(--text-4xl);
    line-height: var(--leading-4xl);
  }
  .code-page__form {
    flex-direction: row;
    align-items: flex-end;
  }
  .code-page__form--top {
    align-items: flex-start;
  }
  .code-page__form--top > .btn {
    margin-top: 1.75rem;
  }
}
.gallery__art {
  width: 8rem;
  height: 6rem;
  border-radius: var(--radius-lg);
}
.gallery__notice {
  margin-top: 1rem;
}
.tabs.gallery__tabs {
  margin-top: 1rem;
}
.gallery__media {
  max-width: 28rem;
  margin-top: 1rem;
}
