.restaurant-coach-page {
  --restaurant-teal: #087f78;
  --restaurant-teal-dark: #075d59;
  --restaurant-gold: #d8a227;
  --restaurant-coral: #d65d4a;
  --restaurant-ink: #10284f;
  --restaurant-soft: #f3f8f7;
}

.restaurant-hero {
  position: relative;
  isolation: isolate;
  display: block;
  width: 100%;
  min-height: clamp(440px, 42vw, 510px);
  margin: 0;
  padding: 2rem max(1.5rem, calc((100% - 1180px) / 2));
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #0b2745;
  box-shadow: none;
}

.restaurant-hero::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(6, 27, 54, .97) 0%, rgba(6, 27, 54, .91) 38%, rgba(6, 27, 54, .54) 62%, rgba(6, 27, 54, .12) 100%),
    linear-gradient(0deg, rgba(6, 27, 54, .38), transparent 42%);
  pointer-events: none;
}

.restaurant-hero .coach-hero-copy {
  position: relative;
  z-index: 2;
  width: min(760px, 100%);
}

.restaurant-hero .coach-kicker {
  display: inline-flex;
  max-width: 100%;
  margin-bottom: .85rem;
  padding: .62rem .82rem;
  border-radius: 7px;
  background: rgba(255, 255, 255, .95);
  color: var(--restaurant-ink);
  font-size: clamp(.9rem, 1.15vw, 1.02rem);
  line-height: 1.35;
  letter-spacing: .04em;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .14);
}

.restaurant-hero h1 {
  max-width: 620px;
  color: #fff;
  font-size: clamp(2.8rem, 5vw, 4.55rem);
  line-height: 1;
  text-shadow: 0 4px 24px rgba(0, 0, 0, .38);
}

.restaurant-hero .coach-hero-copy > p:not(.coach-kicker):not(.restaurant-privacy-note) {
  max-width: 740px;
  margin-top: .9rem;
  color: rgba(255, 255, 255, .94);
  font-size: 1.03rem;
  line-height: 1.62;
}

.restaurant-hero .coach-meta span {
  border-color: rgba(255, 255, 255, .28);
  background: rgba(255, 255, 255, .13);
  color: #fff;
}

.restaurant-hero .coach-link-button.primary {
  background: var(--restaurant-teal);
  color: #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .2);
}

.restaurant-hero .coach-link-button.secondary {
  border-color: rgba(255, 255, 255, .38);
  background: rgba(255, 255, 255, .92);
  color: var(--restaurant-ink);
}

.restaurant-hero .coach-hero-copy > p.restaurant-privacy-note {
  display: flex;
  max-width: 740px;
  align-items: flex-start;
  gap: .5rem;
  margin: .85rem 0 0;
  color: rgba(255, 255, 255, .86);
  font-size: .78rem;
  font-weight: 750;
  line-height: 1.45;
}

.restaurant-privacy-note i {
  flex: 0 0 auto;
  color: #a9e6d9;
  font-size: 1rem;
}

.restaurant-hero .coach-hero-visual {
  position: absolute;
  inset: 0;
  margin: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #0b2745;
}

.restaurant-hero .coach-hero-visual img {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: center 44%;
}

.restaurant-welcome figure,
.restaurant-stage .coach-avatar {
  background: #e9f3f1;
}

.restaurant-welcome figure img,
.restaurant-stage .coach-avatar img {
  object-position: center 18%;
}

.restaurant-steps {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.restaurant-menu {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid rgba(8, 127, 120, .2);
  border-radius: 8px;
  background: #fff;
}

.restaurant-menu .coach-section-heading {
  align-items: flex-start;
}

.restaurant-menu .coach-section-heading h3 {
  margin-bottom: .25rem;
}

.restaurant-menu .coach-section-heading p:not(.coach-kicker) {
  max-width: 720px;
  margin: 0;
  color: var(--coach-muted);
  line-height: 1.5;
}

.restaurant-selected-pill {
  display: inline-flex;
  min-height: 44px;
  max-width: 300px;
  align-items: center;
  gap: .45rem;
  padding: .55rem .7rem;
  border: 1px solid rgba(8, 127, 120, .24);
  border-radius: 8px;
  background: var(--restaurant-soft);
  color: var(--restaurant-ink);
  font-size: .82rem;
  font-weight: 850;
  line-height: 1.3;
}

.restaurant-selected-pill i {
  flex: 0 0 auto;
  color: var(--restaurant-teal);
}

.restaurant-menu-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
  margin-top: .85rem;
}

.restaurant-menu-loading {
  grid-column: 1 / -1;
  margin: 0;
  padding: 1rem;
  color: var(--coach-muted);
  text-align: center;
}

.restaurant-dish-card {
  display: grid;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--coach-line);
  border-radius: 8px;
  background: #fff;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.restaurant-dish-card.is-selected {
  border-color: var(--restaurant-teal);
  box-shadow: 0 0 0 3px rgba(8, 127, 120, .13);
}

.restaurant-dish-card.is-selected .restaurant-dish-select {
  background: var(--restaurant-teal-dark);
}

.restaurant-dish-photo {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #eef3f2;
}

.restaurant-dish-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.restaurant-dish-category {
  position: absolute;
  top: .55rem;
  left: .55rem;
  padding: .28rem .45rem;
  border-radius: 6px;
  background: rgba(16, 40, 79, .92);
  color: #fff;
  font-size: .68rem;
  font-weight: 850;
}

.restaurant-dish-copy {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: .4rem;
  min-width: 0;
  padding: .75rem;
}

.restaurant-dish-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .55rem;
  align-items: start;
}

.restaurant-dish-heading h4 {
  margin: 0;
  color: var(--restaurant-ink);
  font-size: 1rem;
  line-height: 1.3;
}

.restaurant-dish-heading strong {
  color: #76560b;
  font-size: .88rem;
}

.restaurant-dish-copy p {
  margin: 0;
  color: var(--coach-muted);
  font-size: .8rem;
  line-height: 1.45;
}

.restaurant-dish-actions {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: .5rem;
  margin-top: .2rem;
}

.restaurant-dish-listen,
.restaurant-dish-select {
  min-height: 44px;
  border: 1px solid var(--restaurant-teal);
  border-radius: 7px;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.restaurant-dish-listen {
  display: grid;
  width: 44px;
  place-items: center;
  background: #fff;
  color: var(--restaurant-teal-dark);
}

.restaurant-dish-select {
  padding: .55rem .65rem;
  background: var(--restaurant-teal);
  color: #fff;
}

.restaurant-dish-listen:active,
.restaurant-dish-select:active {
  transform: translateY(1px);
}

.restaurant-dish-listen:focus-visible,
.restaurant-dish-select:focus-visible {
  outline: 3px solid rgba(216, 162, 39, .42);
  outline-offset: 2px;
}

.restaurant-dish-listen[aria-pressed="true"] {
  background: #e6f4f2;
}

.restaurant-active-menu {
  margin-bottom: 1rem;
  background: #f8fbfa;
}

.restaurant-context-line {
  margin: .35rem 0 .15rem;
  color: var(--restaurant-teal-dark);
  font-size: .78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.restaurant-stage-list {
  display: grid;
  gap: .55rem;
  margin: .75rem 0 0;
  padding: 0;
  list-style: none;
}

.restaurant-stage-list li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: .55rem;
  align-items: center;
}

.restaurant-stage-list li > span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: #e6f4f2;
  color: var(--restaurant-teal-dark);
  font-size: .76rem;
  font-weight: 900;
}

.restaurant-stage-list strong,
.restaurant-stage-list small {
  display: block;
}

.restaurant-stage-list strong {
  color: var(--restaurant-ink);
  font-size: .88rem;
}

.restaurant-stage-list small {
  margin-top: .12rem;
  color: var(--coach-muted);
  font-size: .72rem;
  line-height: 1.35;
}

.restaurant-delivery-panel {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid rgba(8, 127, 120, .3);
  border-left: 5px solid var(--restaurant-teal);
  border-radius: 8px;
  background: #f5fbfa;
}

.restaurant-delivery-heading {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: .8rem;
  align-items: start;
}

.restaurant-delivery-heading h3,
.restaurant-delivery-heading p {
  margin: 0;
}

.restaurant-delivery-heading h3 {
  color: var(--restaurant-ink);
  font-size: 1.18rem;
}

.restaurant-delivery-heading p:not(.coach-kicker) {
  margin-top: .35rem;
  color: var(--coach-muted);
  line-height: 1.5;
}

.restaurant-delivery-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 8px;
  background: var(--restaurant-teal);
  color: #fff;
  font-size: 1.3rem;
}

.restaurant-delivery-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .55rem;
  margin-top: .9rem;
}

.restaurant-delivery-metrics span {
  min-width: 0;
  padding: .7rem;
  border: 1px solid rgba(16, 40, 79, .13);
  border-radius: 7px;
  background: #fff;
  text-align: center;
}

.restaurant-delivery-metrics strong,
.restaurant-delivery-metrics small {
  display: block;
}

.restaurant-delivery-metrics strong {
  color: var(--restaurant-ink);
  font-size: 1.2rem;
  font-variant-numeric: tabular-nums;
}

.restaurant-delivery-metrics small {
  margin-top: .12rem;
  color: var(--coach-muted);
  font-size: .72rem;
  font-weight: 800;
  line-height: 1.25;
}

.restaurant-delivery-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: .85rem;
}

.restaurant-delivery-actions > * {
  min-height: 44px;
}

.restaurant-delivery-status {
  min-height: 1.5rem;
  margin: .7rem 0 0;
  padding: .65rem .75rem;
  border-radius: 7px;
  background: #e8eff7;
  color: var(--restaurant-ink);
  font-size: .82rem;
  font-weight: 800;
  line-height: 1.45;
}

.restaurant-delivery-status.ready {
  background: #e6f4f2;
  color: var(--restaurant-teal-dark);
}

.restaurant-delivery-status.success {
  background: #e4f5eb;
  color: #17633b;
}

.restaurant-delivery-status.error {
  background: #fff0ed;
  color: #8d2e21;
}

.restaurant-delivery-panel.is-submitted {
  border-left-color: #258553;
  background: #f4fbf7;
}

.restaurant-coach-page #floatingMicDock.is-recording {
  border-color: rgba(255, 213, 99, .9);
  box-shadow: 0 0 0 3px rgba(216, 162, 39, .22), 0 18px 40px rgba(7, 31, 79, .3);
}

.restaurant-coach-page > .jaralingua-auth > .auth-trigger {
  display: none;
}

.restaurant-coach-page > .jaralingua-auth {
  pointer-events: none;
}

.restaurant-coach-page > .jaralingua-auth .auth-panel {
  pointer-events: auto;
}

@media (hover: hover) {
  .restaurant-dish-card:hover {
    transform: translateY(-2px);
    border-color: rgba(8, 127, 120, .5);
    box-shadow: 0 8px 22px rgba(16, 40, 79, .08);
  }
}

@media (max-width: 980px) {
  .restaurant-hero {
    min-height: 500px;
  }

  .restaurant-hero::before {
    background:
      linear-gradient(90deg, rgba(6, 27, 54, .96) 0%, rgba(6, 27, 54, .88) 58%, rgba(6, 27, 54, .44) 100%),
      linear-gradient(0deg, rgba(6, 27, 54, .45), transparent 48%);
  }

  .restaurant-menu-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .restaurant-hero {
    width: 100%;
    min-height: 0;
    padding: .95rem 1rem 1rem;
  }

  .restaurant-hero::before {
    background: linear-gradient(90deg, rgba(6, 27, 54, .94), rgba(6, 27, 54, .84));
  }

  .restaurant-hero .coach-hero-visual img {
    object-position: 61% center;
  }

  .restaurant-hero .coach-kicker {
    margin-bottom: .65rem;
    padding: .55rem .65rem;
    font-size: .86rem;
    line-height: 1.3;
  }

  .restaurant-hero h1 {
    font-size: clamp(2.3rem, 10.5vw, 3rem);
    line-height: 1.02;
  }

  .restaurant-hero .coach-hero-copy > p:not(.coach-kicker):not(.restaurant-privacy-note) {
    margin-top: .7rem;
    font-size: .92rem;
    line-height: 1.52;
  }

  .restaurant-hero .coach-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .35rem;
    margin-top: .75rem;
  }

  .restaurant-hero .coach-meta span {
    display: flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    padding: .34rem .45rem;
    border-radius: 7px;
    font-size: .63rem;
    line-height: 1.12;
    text-align: center;
    white-space: normal;
  }

  .restaurant-hero .coach-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .45rem;
    margin-top: .85rem;
  }

  .restaurant-hero .coach-actions .primary {
    grid-column: 1 / -1;
  }

  .restaurant-hero .coach-link-button {
    min-height: 42px;
    padding: .6rem .55rem;
    font-size: .78rem;
    line-height: 1.25;
    text-align: center;
  }

  .restaurant-hero .coach-hero-copy > p.restaurant-privacy-note {
    margin-top: .7rem;
    font-size: .7rem;
    line-height: 1.35;
  }

  .restaurant-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .restaurant-menu .coach-section-heading {
    display: grid;
  }

  .restaurant-selected-pill {
    max-width: none;
  }

  .restaurant-delivery-heading {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .restaurant-delivery-icon {
    width: 42px;
    height: 42px;
  }

  .restaurant-delivery-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .restaurant-delivery-actions > * {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .restaurant-coach-page.has-floating-dock .jaralingua-auth {
    bottom: calc(112px + env(safe-area-inset-bottom));
  }

  .restaurant-coach-page.has-floating-dock .jaralingua-auth-toast {
    bottom: calc(112px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 560px) {
  .restaurant-menu {
    padding: .75rem;
  }

  .restaurant-menu-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .restaurant-dish-card {
    grid-template-columns: 112px minmax(0, 1fr);
  }

  .restaurant-dish-photo {
    min-height: 100%;
    aspect-ratio: auto;
  }

  .restaurant-dish-category {
    top: .35rem;
    left: .35rem;
  }

  .restaurant-dish-copy {
    padding: .65rem;
  }

  .restaurant-dish-heading {
    grid-template-columns: minmax(0, 1fr);
    gap: .15rem;
  }

  .restaurant-dish-actions {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .restaurant-delivery-panel {
    padding: .75rem;
  }

  .restaurant-delivery-heading {
    grid-template-columns: 1fr;
  }

  .restaurant-delivery-metrics {
    gap: .35rem;
  }

  .restaurant-delivery-metrics span {
    padding: .55rem .35rem;
  }

  .restaurant-delivery-metrics strong {
    font-size: 1rem;
  }

  .restaurant-delivery-metrics small {
    font-size: .64rem;
  }
}

@media (max-width: 390px) {
  .restaurant-dish-card {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .restaurant-dish-heading h4 {
    font-size: .9rem;
  }

  .restaurant-dish-copy p {
    font-size: .74rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .restaurant-dish-card {
    transition: none;
  }
}
