/* Shared, scoped welcome-screen styles for standalone /welcome.html and same-document Screen 1. */
.appetite-welcome-page,
body[data-view="welcome"] {
  margin: 0;
  min-block-size: 100vh;
  min-block-size: 100svh;
  background: #22161c !important;
  color: #f7ead9;
}

body:not(.appetite-welcome-page):not([data-view="welcome"]) .appetite-welcome {
  display: none !important;
}

body[data-view="welcome"] .site-header,
body[data-view="welcome"] main.shell,
body[data-view="welcome"] footer.shell,
body[data-view="welcome"] .bottom-nav,
body[data-view="welcome"] #plan-tray,
body[data-view="welcome"] .list-top {
  display: none !important;
}

.appetite-welcome {
  --welcome-background: #22161c;
  --welcome-cream: #f7ead9;
  --welcome-muted: #ded0ca;
  --welcome-peach: #efa77f;
  --welcome-ink: #281b21;
  --welcome-side: clamp(18px, 5.4vw, 34px);
  box-sizing: border-box;
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  inline-size: 100%;
  max-inline-size: 30rem;
  min-block-size: 100vh;
  min-block-size: 100svh;
  margin-inline: auto;
  /* Keep title comfortably below Dynamic Island / status area and anchor search cleanly above bottom bar */
  padding-block-start: max(calc(1.1rem + env(safe-area-inset-top, 0px)), 2.95rem);
  padding-block-end: max(calc(0.85rem + env(safe-area-inset-bottom, 0px)), 1.15rem);
  overflow-x: clip;
  background:
    radial-gradient(ellipse at 50% 4%, rgba(62, 40, 52, 0.34) 0%, transparent 32%),
    radial-gradient(ellipse at 50% 98%, rgba(56, 36, 48, 0.28) 0%, transparent 30%),
    var(--welcome-background);
  color: var(--welcome-cream);
  font-family: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.45;
  text-align: center;
  color-scheme: dark;
}

.appetite-welcome *,
.appetite-welcome *::before,
.appetite-welcome *::after {
  box-sizing: border-box;
}

.appetite-welcome[hidden] {
  display: none !important;
}

.appetite-welcome__header {
  display: block;
  position: relative;
  z-index: 2;
  border: 0;
  padding-block: 0;
  padding-inline: var(--welcome-side);
}

.appetite-welcome__title {
  margin: 0;
  color: var(--welcome-cream);
  font-family: "Newsreader", Georgia, "Times New Roman", serif;
  font-size: clamp(2.6rem, 13vw, 4.15rem);
  font-weight: 400;
  letter-spacing: -0.044em;
  line-height: 0.97;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.appetite-welcome__title > span,
.appetite-welcome__tagline > span {
  display: block;
}

.appetite-welcome__title > span + span {
  margin-block-start: 0.05em;
}

.appetite-welcome__tagline {
  margin: clamp(0.7rem, 1.9svh, 1.05rem) 0 0;
  color: rgba(247, 234, 217, 0.93);
  font-size: clamp(1.01rem, 4.2vw, 1.16rem);
  font-weight: 400;
  letter-spacing: -0.016em;
  line-height: 1.42;
  text-wrap: balance;
}

.appetite-welcome__art {
  position: relative;
  z-index: 0;
  flex: 0 0 0px;
  inline-size: 100%;
  min-inline-size: 0;
  block-size: 0;
  margin-block-start: clamp(0.85rem, 2.15svh, 1.2rem);
  margin-block-end: 0;
  overflow: visible;
  pointer-events: none;
}

.appetite-welcome__art picture {
  display: block;
  inline-size: min(97%, 52.5svh, 26.25rem);
  margin-inline-start: auto;
  -webkit-mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 84%,
    rgba(0, 0, 0, 0.72) 90.5%,
    rgba(0, 0, 0, 0.32) 92.2%,
    transparent 94.5%
  );
  mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 84%,
    rgba(0, 0, 0, 0.72) 90.5%,
    rgba(0, 0, 0, 0.32) 92.2%,
    transparent 94.5%
  );
}

.appetite-welcome__art img {
  display: block;
  inline-size: 100%;
  block-size: auto;
  margin-block-start: -5.5%;
}

.appetite-welcome__footer {
  display: block;
  position: relative;
  z-index: 2;
  isolation: isolate;
  inline-size: 100%;
  margin-block-start: auto;
  border: 0;
  padding-block: 0.55rem 0;
  padding-inline: var(--welcome-side);
  background: transparent;
  font-size: 1rem;
  letter-spacing: normal;
}

.appetite-welcome__footer::before {
  content: "";
  position: absolute;
  inset: -18px 0 -10px;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse 64% 58% at 24% 24%,
      rgba(34, 22, 28, 0.66) 0%,
      rgba(34, 22, 28, 0.34) 62%,
      rgba(34, 22, 28, 0.16) 100%
    ),
    linear-gradient(
      to bottom,
      rgba(34, 22, 28, 0) 0%,
      rgba(34, 22, 28, 0.18) 22%,
      rgba(34, 22, 28, 0.24) 72%,
      rgba(34, 22, 28, 0.56) 100%
    );
  backdrop-filter: blur(1.75px);
  -webkit-backdrop-filter: blur(1.75px);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.65) 18px, #000 36px, #000 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.65) 18px, #000 36px, #000 100%);
}

.appetite-welcome__search-head {
  text-align: left;
  padding-inline: 0.2rem;
  margin: 0 0 0.45rem;
  text-shadow: 0 1px 12px rgba(18, 10, 15, 0.72);
}

.appetite-welcome__search-label {
  display: block;
  margin: 0;
  color: var(--welcome-cream);
  font-size: 1.03rem;
  font-weight: 600;
  line-height: 1.26;
  letter-spacing: -0.014em;
}

.appetite-welcome__search-sub {
  margin: 0.12rem 0 0;
  color: rgba(232, 219, 213, 0.88);
  font-size: 0.84rem;
  line-height: 1.32;
}

.appetite-welcome__search {
  display: flex;
  align-items: center;
  gap: 7px;
  inline-size: 100%;
  min-block-size: 40px;
  margin: 0;
  padding: 2px 5px 2px 13px;
  border: 1px solid rgba(247, 223, 193, 0.92);
  border-radius: 20px;
  background: rgba(255, 242, 223, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--welcome-ink);
  color-scheme: light;
  box-shadow: 0 8px 24px rgba(10, 6, 9, 0.36);
}

.appetite-welcome__search-icon {
  flex: 0 0 17px;
  inline-size: 17px;
  block-size: 17px;
  color: #5b4750;
}

.appetite-welcome__search textarea,
.appetite-welcome__search input {
  flex: 1 1 0;
  min-inline-size: 0;
  inline-size: 100%;
  min-block-size: 28px;
  block-size: 28px;
  max-block-size: 72px;
  padding: 5px 2px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--welcome-ink);
  font-family: inherit;
  font-size: 0.94rem;
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.26;
  resize: none;
  appearance: none;
  -webkit-appearance: none;
}

.appetite-welcome__search textarea::placeholder,
.appetite-welcome__search input::placeholder {
  color: #7c6771;
  opacity: 1;
}

.appetite-welcome__search:focus-within {
  border-color: var(--welcome-peach);
  box-shadow: 0 0 0 3px #efa77f33, 0 10px 26px rgba(10, 6, 9, 0.38);
}

.appetite-welcome__submit {
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  inline-size: 30px;
  block-size: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--welcome-peach);
  color: var(--welcome-ink);
  font-family: Arial, sans-serif;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.appetite-welcome__controls {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-block-start: 0.65rem;
}

.appetite-welcome__modes {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(34, 22, 28, 0.56);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(247, 234, 217, 0.18);
  flex-shrink: 0;
}

.appetite-welcome__mode-chip {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--welcome-muted);
  padding: 5px 8.5px;
  min-block-size: 30px;
  min-inline-size: 0;
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.15;
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.appetite-welcome__mode-chip.active,
.appetite-welcome__mode-chip[aria-pressed="true"] {
  background: var(--welcome-peach);
  color: var(--welcome-ink);
  font-weight: 700;
}

/* Visually quiet inline location status + Change action */
.appetite-welcome__location {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 2px;
  min-block-size: 30px;
  border: 0;
  background: transparent;
  font-size: 0.75rem;
  color: rgba(232, 219, 213, 0.84);
  text-shadow: 0 1px 10px rgba(18, 10, 15, 0.75);
  min-inline-size: 0;
  max-inline-size: 100%;
}

.appetite-welcome__location.is-active {
  color: rgba(247, 234, 217, 0.9);
}

.appetite-welcome__loc-dot {
  opacity: 0.55;
}

.appetite-welcome__loc-trigger,
.appetite-welcome__loc-change {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 3px 1px;
  min-block-size: 28px;
  min-inline-size: 0;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.appetite-welcome__loc-trigger {
  overflow: hidden;
  text-overflow: ellipsis;
  max-inline-size: 10.5rem;
}

.appetite-welcome__loc-change {
  flex-shrink: 0;
  color: rgba(222, 208, 202, 0.88);
  text-decoration: underline;
  text-decoration-color: rgba(222, 208, 202, 0.36);
  text-underline-offset: 2.5px;
}

.appetite-welcome__status {
  margin: 0;
  color: var(--welcome-cream);
  font-size: 0.82rem;
}

.appetite-welcome__status:not(:empty) {
  margin-block-start: 0.45rem;
}

.appetite-welcome__quiet-entry {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.2rem 1rem;
  margin-block-start: clamp(0.8rem, 2.2svh, 1.25rem);
}

.appetite-welcome__explore-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-block-size: 1.9rem;
  padding-inline: 0.4rem;
  border: 0;
  border-radius: 0.35rem;
  background: transparent;
  color: rgba(222, 208, 202, 0.62);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.005em;
  line-height: 1.2;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.24em;
  text-decoration-color: rgba(222, 208, 202, 0.28);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.appetite-welcome a:focus-visible,
.appetite-welcome button:focus-visible {
  outline: 3px solid var(--welcome-cream);
  outline-offset: 3px;
}

.appetite-welcome textarea:focus-visible,
.appetite-welcome input:focus-visible {
  outline: none;
}

@media (hover: hover) {
  .appetite-welcome__submit:hover {
    background: #f5b18b;
  }

  .appetite-welcome__loc-change:hover,
  .appetite-welcome__explore-link:hover {
    color: var(--welcome-cream);
    text-decoration-color: rgba(247, 234, 217, 0.6);
  }
}

@media (max-width: 358px) {
  .appetite-welcome__controls {
    flex-wrap: wrap;
    justify-content: space-between;
  }
}

@media (max-height: 740px) {
  .appetite-welcome {
    padding-block-start: max(calc(1rem + env(safe-area-inset-top, 0px)), 2.65rem);
    padding-block-end: max(calc(0.65rem + env(safe-area-inset-bottom, 0px)), 0.9rem);
  }

  .appetite-welcome__art {
    margin-block-start: 0.65rem;
  }

  .appetite-welcome__art picture {
    inline-size: min(95%, 51.5svh, 23rem);
  }

  .appetite-welcome__title {
    font-size: clamp(2.2rem, 11.4vw, 3.3rem);
  }

  .appetite-welcome__tagline {
    margin-block-start: 0.45rem;
    font-size: 0.95rem;
  }

  .appetite-welcome__quiet-entry {
    margin-block-start: 0.55rem;
  }
}

@media (min-width: 600px) {
  .appetite-welcome-page {
    display: grid;
    align-items: center;
    background: #22161c;
  }

  .appetite-welcome {
    min-block-size: min(100svh, 58rem);
    background: #22161c;
  }
}

@media (orientation: landscape) and (max-height: 600px) {
  .appetite-welcome {
    min-block-size: 38rem;
  }
}
