/* Review prototype: a visual-first dinner entry screen.
   Keep every visual control paired with a short text label and a full
   keyboard/screen-reader interaction. */
.visual-intent-page {
  width: min(760px, calc(100% - 28px));
  padding-top: 30px;
  padding-bottom: 64px;
}

.meal-visual-hero {
  margin: 0 0 22px;
  text-align: center;
}

.meal-visual-hero h1 {
  margin: 7px 0 0;
  font-size: clamp(2.45rem, 7vw, 4.15rem);
  line-height: .98;
}

.visual-intent-page .meal-intent-form {
  display: grid;
  gap: 18px;
}

.meal-visual-section {
  border: 1px solid #d8ded9;
  border-radius: 24px;
  background: rgba(255,255,255,.92);
  padding: 22px;
  box-shadow: 0 12px 30px rgba(23,33,27,.07);
}

.meal-visual-section > h2 {
  margin: 0 0 16px;
  font-size: 1.2rem;
  letter-spacing: -.01em;
}

.meal-people-overview {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 12px;
}

.meal-visual-tile {
  min-width: 0;
  min-height: 104px;
  border: 1px solid #bfd0c5;
  border-radius: 20px;
  padding: 14px 15px;
  display: grid;
  grid-template-columns: 54px minmax(0,1fr) auto;
  align-items: center;
  gap: 12px;
  text-align: left;
}

button.meal-visual-tile {
  cursor: pointer;
  font: inherit;
}

.household-tile {
  background: #355f49;
  border-color: #355f49;
  color: #fff;
  box-shadow: 0 10px 22px rgba(53,95,73,.2);
}

.guest-tile {
  background: #fff;
  color: #17211b;
  grid-template-columns: 48px minmax(95px,1fr) auto;
}

.meal-visual-icon {
  width: 54px;
  height: 54px;
  border-radius: 17px;
  display: grid;
  place-items: center;
}

.household-icon { background: rgba(255,255,255,.16); }
.guest-icon { width: 48px; height: 48px; background: #edf3ef; }
.meal-visual-icon svg { width: 39px; height: 39px; overflow: visible; }
.household-icon svg { fill: #fff; }
.guest-icon svg { fill: #355f49; }
.guest-icon svg path:last-child { fill: none; stroke: #355f49; stroke-width: 5; stroke-linecap: round; }

.meal-visual-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.meal-visual-copy strong {
  font-size: 1.05rem;
  line-height: 1.1;
}

.meal-visual-copy small {
  font-size: .78rem;
  line-height: 1.25;
  color: #667269;
}

.household-tile .meal-visual-copy small { color: #e7f0e9; }
.meal-chevron { font-size: 1.7rem; line-height: 1; margin-top: -6px; }

.guest-stepper {
  display: grid;
  grid-template-columns: 40px 34px 40px;
  align-items: center;
  justify-content: end;
  gap: 3px;
}

.guest-stepper button {
  width: 40px;
  height: 40px;
  border: 1px solid #aec1b4;
  border-radius: 50%;
  background: #f5f8f6;
  color: #355f49;
  font-size: 1.4rem;
  font-weight: 850;
  line-height: 1;
  cursor: pointer;
}

.guest-stepper output {
  text-align: center;
  font-weight: 900;
  font-size: 1.1rem;
}

.meal-visual-summary {
  margin: 12px 2px 0;
  color: #667269;
  text-align: center;
  font-size: .82rem;
}

.meal-eater-fallback {
  margin-top: 12px;
}

.meal-time-picker {
  display: grid;
  grid-template-columns: minmax(210px, 250px) auto;
  justify-content: center;
  align-items: center;
  gap: 22px;
}

.meal-time-wheel {
  position: relative;
  width: min(250px, 65vw);
  aspect-ratio: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  overflow: hidden;
  border: 7px solid #f0f3f0;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 1px #cdd8d0, 0 12px 30px rgba(23,33,27,.1);
}

.time-quarter {
  min-width: 0;
  border: 0;
  background: #edf3ef;
  color: #355f49;
  cursor: pointer;
  font-size: 1.06rem;
  font-weight: 900;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}

.time-quarter:nth-child(1), .time-quarter:nth-child(2) { border-bottom: 1px solid #cbd8cf; }
.time-quarter:nth-child(1), .time-quarter:nth-child(3) { border-right: 1px solid #cbd8cf; }
.time-quarter:hover { background: #dfeae2; }
.time-quarter.is-selected { background: #355f49; color: #fff; }
.time-quarter:active { transform: scale(.98); }
.time-quarter span { display: block; }
.time-15 span { transform: translate(18px, 16px); }
.time-30 span { transform: translate(-18px, 16px); }
.time-45 span { transform: translate(18px, -16px); }
.time-60 span { transform: translate(-18px, -16px); }

.time-center {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 104px;
  height: 104px;
  transform: translate(-50%, -50%);
  display: grid;
  align-content: center;
  justify-items: center;
  border: 7px solid #fff;
  border-radius: 50%;
  background: #fffaf0;
  box-shadow: 0 3px 14px rgba(23,33,27,.16);
  color: #17211b;
}

.time-center strong { font-size: 2rem; line-height: 1; }
.time-center span { margin-top: 3px; color: #667269; font-size: .73rem; font-weight: 750; }

.meal-time-more {
  display: grid;
  gap: 12px;
  justify-items: center;
}

.time-add {
  width: 76px;
  height: 76px;
  border: 1px solid #b8cbbf;
  border-radius: 50%;
  background: #fff;
  color: #355f49;
  display: grid;
  align-content: center;
  justify-items: center;
  cursor: pointer;
  box-shadow: 0 7px 18px rgba(23,33,27,.08);
}

.time-add span { font-size: 1.65rem; font-weight: 750; line-height: .8; }
.time-add small { margin-top: 4px; font-size: .68rem; font-weight: 850; }
.time-any { border: 0; background: transparent; color: #355f49; font-weight: 800; cursor: pointer; padding: 9px; }
.time-any.is-selected { border-radius: 999px; background: #355f49; color: #fff; padding-inline: 15px; }

.meal-visual-actions {
  display: grid;
  gap: 10px;
}

.meal-find-button, .meal-build-button {
  min-height: 58px;
  border-radius: 17px;
  padding: 13px 18px;
  font: inherit;
  font-size: 1.06rem;
  font-weight: 900;
  cursor: pointer;
}

.meal-find-button { border: 1px solid #355f49; background: #355f49; color: #fff; box-shadow: 0 10px 22px rgba(53,95,73,.18); }
.meal-build-button { border: 1px solid #b8cbbf; background: #fff; color: #355f49; }
.meal-find-button span, .meal-build-button span { margin-right: 5px; }

.meal-visual-status {
  min-height: 1.2em;
  margin: -5px 0 0;
  color: #7d4937;
  text-align: center;
  font-size: .82rem;
}

.household-dialog {
  width: min(560px, calc(100% - 24px));
  max-height: min(720px, calc(100dvh - 24px));
  border: 0;
  border-radius: 24px;
  padding: 0;
  color: #17211b;
  box-shadow: 0 26px 80px rgba(18,31,23,.34);
}

.household-dialog::backdrop { background: rgba(20,32,25,.58); backdrop-filter: blur(3px); }
.household-dialog-body { display: grid; gap: 16px; padding: 22px; }
.household-dialog-body > header { display: flex; justify-content: space-between; align-items: start; gap: 16px; }
.household-dialog h2 { margin: 3px 0 0; font-size: 1.55rem; }
.dialog-kicker { color: #9a4d35; font-size: .7rem; font-weight: 900; text-transform: uppercase; letter-spacing: .12em; }
.dialog-close { width: 44px; height: 44px; border: 1px solid #d4ddd6; border-radius: 50%; background: #fff; color: #355f49; font-size: 1.65rem; line-height: 1; cursor: pointer; }
.visual-eater-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.visual-eater-grid .visual-member-choice {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0,1fr) 26px;
  gap: 9px;
  align-items: center;
  min-height: 78px;
  border: 1px solid #d4ddd6;
  border-radius: 15px;
  padding: 10px;
  background: #fff;
}
.visual-eater-grid .visual-member-choice:has(input:checked) {
  border: 2px solid #355f49;
  padding: 9px;
  background: #edf4ef;
}
.visual-eater-grid .visual-member-choice > span {
  min-height: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
}
.visual-eater-grid .visual-member-choice input:checked + span {
  border: 0;
  padding: 0;
  background: transparent;
}
.visual-member-avatar {
  display: grid!important;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px!important;
  background: #dfece2!important;
  color: #355f49;
  font-size: .93rem;
  font-weight: 950;
}
.visual-member-copy { display: grid!important; gap: 2px; }
.visual-eater-grid .visual-member-choice small {
  display: block;
  color: #667269;
  font-size: .68rem;
}
.visual-member-check {
  display: grid!important;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid #b7c5bb!important;
  border-radius: 50%!important;
  color: transparent;
  font-size: .78rem;
  font-weight: 950;
}
.visual-member-choice:has(input:checked) .visual-member-check {
  border-color: #355f49!important;
  background: #355f49!important;
  color: #fff;
}
.visual-member-choice:has(input:focus-visible) {
  outline: 3px solid #e1b45e;
  outline-offset: 3px;
}
.visual-member-choice input:focus-visible + .visual-member-avatar {
  outline: 0;
}
.household-dialog-note { margin: 0; color: #667269; text-align: center; font-size: .82rem; }
.meal-dialog-done { min-height: 52px; border: 0; border-radius: 14px; background: #355f49; color: #fff; font-weight: 900; cursor: pointer; }

.meal-visual-tile:focus-visible,
.guest-stepper button:focus-visible,
.time-quarter:focus-visible,
.time-add:focus-visible,
.time-any:focus-visible,
.meal-find-button:focus-visible,
.meal-build-button:focus-visible,
.dialog-close:focus-visible,
.meal-dialog-done:focus-visible {
  outline: 3px solid #e1b45e;
  outline-offset: 3px;
}

@media (max-width: 650px) {
  html, body { max-width: 100%; overflow-x: hidden; }
  body[data-app-shell] .site-header { min-height: 60px; padding: 8px 12px; gap: 8px; }
  body[data-app-shell] .site-header .brand { display: block; flex: 0 0 auto; white-space: nowrap; font-size: 1.08rem; line-height: 1; }
  body[data-app-shell] .site-header .header-nav { gap: 0; overflow: hidden; border: 1px solid rgba(249,234,219,.34); border-radius: 999px; }
  body[data-app-shell] .site-header .header-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; font-size: .84rem; }
  body[data-app-shell] .site-header .sns-signout { min-height: 44px; border: 0; border-left: 1px solid rgba(249,234,219,.25); border-radius: 0; padding: 0 10px; font-size: .78rem; }

  .visual-intent-page {
    width: 100%;
    max-width: 760px;
    min-width: 0;
    padding: 10px 10px 30px;
    overflow-x: clip;
  }
  .meal-visual-hero { margin-bottom: 9px; }
  .meal-visual-hero .eyebrow { font-size: .67rem; }
  .meal-visual-hero h1 { margin-top: 4px; font-size: clamp(1.8rem, 8.5vw, 2.2rem); line-height: 1; }
  .visual-intent-page .meal-intent-form { min-width: 0; gap: 9px; }
  .meal-visual-section {
    min-width: 0;
    max-width: 100%;
    border-radius: 16px;
    padding: 12px;
  }
  .meal-visual-section > h2 { margin-bottom: 7px; font-size: 1.08rem; }
  .meal-visual-section .field-note { margin: 0 0 9px; font-size: .9rem; line-height: 1.3; }
  .meal-visual-section .field-note:last-of-type { margin: 9px 0 0; }

  .meal-people-overview { min-width: 0; grid-template-columns: 1fr; gap: 7px; }
  .meal-visual-tile {
    width: 100%;
    min-width: 0;
    min-height: 66px;
    padding: 7px 9px;
    grid-template-columns: 42px minmax(0,1fr) auto;
    grid-template-rows: auto;
    justify-items: stretch;
    gap: 9px;
    text-align: left;
  }
  .meal-visual-icon, .guest-icon { width: 42px; height: 42px; border-radius: 13px; }
  .meal-visual-icon svg { width: 31px; height: 31px; }
  .meal-visual-copy { min-width: 0; justify-items: start; gap: 2px; }
  .meal-visual-copy strong { font-size: 1rem; overflow-wrap: normal; word-break: normal; }
  .meal-visual-copy small { font-size: .78rem; line-height: 1.2; overflow-wrap: normal; word-break: normal; }
  .meal-chevron { position: static; align-self: center; margin: -5px 0 0; font-size: 1.3rem; }
  .guest-tile {
    grid-template-columns: 42px minmax(0,1fr);
    grid-template-areas:
      "guest-icon guest-copy"
      "guest-stepper guest-stepper";
    row-gap: 7px;
  }
  .guest-tile .guest-icon { grid-area: guest-icon; }
  .guest-tile .meal-visual-copy { grid-area: guest-copy; align-self: center; }
  .guest-stepper { grid-area: guest-stepper; justify-self: center; grid-template-columns: 44px 28px 44px; gap: 2px; }
  .guest-stepper button { width: 44px; height: 44px; font-size: 1.25rem; }
  .guest-stepper output { font-size: 1rem; }
  .meal-visual-summary { max-width: 100%; margin-top: 7px; font-size: .8rem; line-height: 1.3; overflow-wrap: anywhere; }

  .meal-time-picker {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    grid-template-columns: minmax(0,178px) 54px;
    gap: 9px;
  }
  .meal-time-wheel { width: min(178px,54vw); max-width: 100%; border-width: 5px; }
  .time-center { width: 76px; height: 76px; border-width: 5px; }
  .time-center strong { font-size: 1.55rem; }
  .time-center span { font-size: .7rem; }
  .time-quarter { font-size: .92rem; }
  .time-add { width: 54px; height: 54px; }
  .time-add span { font-size: 1.4rem; }
  .time-add small { font-size: .67rem; }
  .time-any { min-height: 44px; font-size: .78rem; padding: 7px 3px; }

  .meal-visual-actions { min-width: 0; width: 100%; gap: 7px; }
  .meal-find-button, .meal-build-button { width: 100%; max-width: 100%; min-height: 50px; border-radius: 13px; padding: 10px 14px; font-size: 1rem; }
  .household-dialog { width: 100%; max-width: none; max-height: 92dvh; margin: auto 0 0; border-radius: 20px 20px 0 0; }
  .household-dialog-body { padding: 17px 12px max(16px, env(safe-area-inset-bottom)); }
}

@media (max-width: 365px) {
  .visual-intent-page { padding-inline: 8px; }
  body[data-app-shell] .site-header { padding-inline: 9px; }
  body[data-app-shell] .site-header .header-link { padding-inline: 8px; }
  body[data-app-shell] .site-header .sns-signout { padding-inline: 8px; }
  .meal-visual-section { padding: 11px; }
  .meal-time-picker { grid-template-columns: minmax(0,164px) 52px; gap: 8px; }
  .meal-time-wheel { width: min(164px,51vw); }
  .time-add { width: 52px; height: 52px; }
}
