.lc-page, .lc-gate {
  --chat-edge: #e5dfd7;
  --chat-soft: #f6f3ed;
  width: min(100%, 800px);
  margin: 0 auto 64px;
  color: var(--ink);
}
.lc-page :is(button, input, textarea, summary) { font: inherit; }
.lc-page :is(h1, h2, h3, p), .lc-gate h1 { margin: 0; }
.lc-page :is(button, summary, a, input, textarea):focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 2px;
}
.lc-head, .lc-room-title, .lc-subhead, .lc-context, .lc-circle, .lc-settings, .lc-page .lc-switch {
  display: flex;
  align-items: center;
}
.lc-head { justify-content: space-between; gap: 14px; margin: 6px 0 23px; }
.lc-context { gap: 6px 10px; flex-wrap: wrap; }
.lc-circle { gap: 6px; color: var(--muted); font-size: .79rem; text-underline-offset: 3px; }
.lc-circle svg { color: var(--accent-deep); }
.lc-page .lc-switch { gap: 2px; border-left: 1px solid var(--chat-edge); padding: 0 0 0 9px; color: var(--accent-deep); font-size: .76rem; }
.lc-head h1, .lc-gate h1, .lr-header h1 {
  margin-top: 6px;
  font-size: clamp(1.7rem, 3.3vw, 2.35rem);
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: -.055em;
}
.lc-page .lc-settings {
  gap: 6px; flex: none; min-height: 36px; padding: 6px 11px;
  border: 1px solid var(--chat-edge); border-radius: 7px;
  color: var(--ink-secondary); background: var(--surface); font-size: .81rem;
}
.lc-attend, .lc-gate {
  border: 1px solid var(--chat-edge); border-radius: 12px;
  background: var(--surface);
}
.lc-attend { padding: 18px 21px 6px; }
.lc-page h2 { font-size: 1.05rem; font-weight: 640; line-height: 1.45; letter-spacing: -.018em; }
.lc-subhead, .lc-room-title { justify-content: space-between; gap: 12px; }
.lc-subhead > span, .lc-hint { color: var(--muted); font-size: .78rem; }
.lc-subhead > span { font-variant-numeric: tabular-nums; }
.lc-people, .lc-chips, .lc-quick { display: flex; flex-wrap: wrap; gap: 7px; }
.lc-people { margin: 12px 0 13px; }
.lc-seat-picker { margin:7px 0 9px; }
.lc-seat-picker > summary {
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  min-height:40px;cursor:pointer;list-style:none;font-size:.88rem;
}
.lc-seat-picker > summary::-webkit-details-marker {display:none}
.lc-seat-picker > summary > span {min-width:0;overflow-wrap:anywhere;color:var(--ink-secondary)}
.lc-seat-picker > summary strong {display:flex;align-items:center;gap:4px;flex:none;color:var(--accent-deep);font-size:.81rem;font-weight:600}
.lc-seat-picker[open] > summary svg {transform:rotate(180deg)}
.lc-seat-search {display:flex;align-items:center;gap:8px;padding:0 10px;border:1px solid var(--chat-edge);border-radius:7px;color:var(--muted)}
.lc-seat-search:focus-within {outline:2px solid var(--accent-deep);outline-offset:1px}
.lc-seat-search input {min-width:0;width:100%;min-height:41px;border:0;background:transparent;color:var(--ink);font-size:16px}
.lc-seat-search input:focus-visible {outline:0}
.lc-seat-picker .lc-people {padding:3px;max-height:min(36svh,16rem);overflow:auto;overscroll-behavior:contain}
.lc-seat-picker [hidden], .lc-seat-picker .lc-person[hidden] {display:none}
.lc-page .lc-seat-empty {margin:10px 0;color:var(--muted);font-size:.85rem}
.lc-page .lc-person, .lc-chip span {
  border: 1px solid var(--chat-edge); border-radius: 7px;
  background: var(--surface); color: var(--ink-secondary);
}
.lc-page .lc-person {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 34px; padding: 4px 11px; font-size: .85rem;
}
.lc-self { padding-left: 5px; border-left: 1px solid currentColor; font-size: .68rem; font-weight: 500; line-height: 1; }
.lc-check { display: inline-grid; place-items: center; flex: none; width: 12px; height: 12px; }
.lc-check::before, .lc-check::after {
  content: ''; grid-area: 1/1; width: 8px; height: 1.5px; border-radius: 2px; background: currentColor;
}
.lc-check::after { transform: rotate(90deg); }
.lc-person[aria-pressed=true] .lc-check::before { transform: translate(-2px,1px) rotate(42deg) scaleX(.55); }
.lc-person[aria-pressed=true] .lc-check::after { transform: translate(1.5px,-.3px) rotate(-48deg); }
.lc-page .lc-person[aria-pressed=true], .lc-chip input:checked + span {
  border-color: #e9b396; background: var(--accent-soft); color: #903a16; font-weight: 620;
}
.lc-tools { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0 18px; border-top: 1px solid var(--chat-edge); }
.lc-tools details { min-width: 0; }
.lc-tools details[open] { flex-basis: 100%; padding-bottom: 8px; }
.lc-tools .lr-entry { margin: 0; padding: 0; border: 0; background: transparent; }
.lc-tools details > summary {
  display: flex; align-items: center; gap: 5px; width: fit-content; min-height: 36px;
  list-style: none; color: var(--muted); font-size: .79rem; cursor: pointer;
}
.lc-tools details > summary::-webkit-details-marker { display: none; }
.lc-tools details > summary > svg { color: var(--muted); margin: 0; }
.lc-tools details[open] > summary, .lc-tools details[open] > summary svg { color: var(--accent-deep); }
.lc-tools summary strong { font-weight: 530; }
.lc-tools .lr-entry { margin-left: auto; }
.lc-tools .lr-entry summary { color: var(--accent-deep); }
.lc-tools .lr-entry summary svg { color: inherit; }
.lc-roster p { margin: 5px 0; color: var(--muted); font-size: .84rem; line-height: 1.65; }
.lc-roster p strong { margin-right: 8px; color: var(--ink); }
.lc-pref-form { padding: 4px 0; }
.lc-pref-form p, .lc-hint { color: var(--muted); line-height: 1.6; }
.lc-pref-form p, .lc-extra { font-size: .84rem; }
.lc-pref-form fieldset { min-width: 0; margin: 15px 0 0; padding: 6px 0 0; border: 0; }
.lc-pref-form legend { padding: 0; font-size: .88rem; font-weight: 650; }
.lc-chip { display: inline-block; position: relative; cursor: pointer; }
.lc-chip input { position: absolute; inset: 50% auto auto 50%; width: 1px; height: 1px; opacity: 0; }
.lc-chip span { display: block; padding: 5px 9px; font-size: .82rem; }
.lc-chip input:focus-visible + span { outline: 2px solid var(--accent-deep); outline-offset: 2px; }
.lc-extra { display: flex; align-items: center; gap: 10px; margin: 9px 0 3px; color: var(--muted); }
.lc-extra input { width: min(260px,65%); padding: 7px 9px; border: 1px solid var(--chat-edge); border-radius: 6px; color: var(--ink); background: var(--surface); }
.lc-page .lc-primary, .lc-gate .lc-primary {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px; padding: 8px 17px; border-radius: 7px;
  background: var(--btn); color: #fff; font-size: .88rem; font-weight: 600;
}
.lc-pref-form > .lc-primary { margin-top: 9px; }
.lc-room { margin-top: 24px; }
.lc-room-title { padding: 0 2px 11px; border-bottom: 1px solid var(--chat-edge); }
.lc-room-title h2, .lr-chat-head h2 { font-size: .91rem; color: var(--ink-secondary); }
.lc-mode { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .75rem; white-space: nowrap; }
.lc-mode::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #968e82; }
.lc-mode[data-connected=true] { color: var(--accent-deep); }
.lc-mode[data-connected=true]::before { background: var(--accent); }
.lc-transcript { display: grid; align-content: start; gap: 24px; padding: 20px 2px 14px; }
.lc-welcome { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: clamp(8px, 2.3vh, 22px) 0 2px; text-align: center; }
.lc-welcome-art {
  flex: none; width: 72px; height: 72px; border-radius: 50%;
  background: #f3dfc1 url('assets/lunch-welcome.webp') 53% 62% / 138% auto no-repeat;
  box-shadow: inset 0 0 0 1px #42240d12;
}
.lc-welcome h3 { font-size: clamp(1.25rem, 2.3vw, 1.65rem); font-weight: 640; letter-spacing: -.035em; }
.lc-welcome p, .lc-notes, .lc-byline, .lc-pending { color: var(--muted); font-size: .82rem; line-height: 1.65; }
.lc-welcome p { margin-top: 6px; }
.lc-turn { min-width: 0; overflow-wrap: anywhere; }
.lc-mine { justify-self: end; max-width: 90%; text-align: right; }
.lc-byline { display: flex; align-items: center; flex-wrap: wrap; gap: 3px 5px; margin-bottom: 6px; font-size: .76rem; }
.lc-byline strong, .lr-byline strong { font-size: inherit; font-weight: 600; color: var(--ink-secondary); }
.lc-diners::before { content: '·'; margin-right: .4em; color: #9d9287; }
.lc-assistant-mark {
  display: inline-grid; place-items: center; flex: none; width: 23px; height: 23px;
  border: 1px solid #e6cdb8; border-radius: 8px; color: var(--accent-deep); background: var(--accent-soft);
}
.lc-mine .lc-byline { justify-content: flex-end; }
.lc-copy { white-space: pre-wrap; font-size: .96rem; line-height: 1.75; }
.lc-mine .lc-copy, .lr-own > p {
  display: inline-block; padding: 9px 14px; border-radius: 12px 3px 12px 12px;
  background: #f9ebdd; color: var(--ink); text-align: left;
}
.lc-answer .lc-notes { margin-top: 7px; }
.lc-page .lc-shop-name { padding: 0; color: var(--ink); text-align: left; }
.lc-shop-name:hover, .lc-circle:hover { text-decoration: underline; }
.lc-pending { display: inline-flex; align-items: center; gap: 8px; width: fit-content; padding: 6px 10px; border-radius: 9px; background: var(--chat-soft); }
.lc-waiting-dots { display: inline-flex; align-items: center; gap: 2px; color: var(--accent-deep); }
.lc-waiting-dots i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
@media (prefers-reduced-motion: no-preference) {
  .lc-check::before, .lc-check::after { transition: transform var(--motion-fast,130ms) var(--ease-out,ease-out); }
  .lc-waiting-dots i { animation: lc-dot-pulse 1.1s ease-in-out 4; }
  .lc-waiting-dots i:nth-child(2) { animation-delay: .12s; }
  .lc-waiting-dots i:nth-child(3) { animation-delay: .24s; }
  @keyframes lc-dot-pulse { 0%, 70%, 100% { opacity: .45; } 35% { opacity: 1; transform: translateY(-1.5px); } }
}
.lc-quick { padding: 8px 1px 6px; }
.lc-page .lc-quick button {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px;
  border: 1px solid var(--chat-edge); border-radius: 7px; background: var(--surface);
  color: var(--ink-secondary); font-size: .81rem; text-align: left;
}
.lc-quick button > svg { color: var(--accent-deep); }
.lc-room:not(:has(.lc-welcome)) .lc-quick button > svg { display: none; }
.lc-room:has(.lc-welcome) .lc-quick { justify-content: center; }
.lc-compose, .lr-compose {
  display: flex; align-items: flex-end; gap: 10px; padding: 8px;
  border: 1px solid #cec6bd; border-radius: 14px; background: var(--surface);
  box-shadow: 0 4px 15px -8px #3f2b2040;
}
.lc-compose textarea, .lr-compose textarea {
  flex: 1; min-width: 0; min-height: 40px; max-height: 160px; padding: 5px 7px;
  border: 0; background: transparent; color: var(--ink); line-height: 1.55; resize: none;
}
.lc-page :is(input, textarea)::placeholder { color: var(--muted); opacity: 1; }
.lc-gate { padding: 30px; }
.lc-gate p { margin: 10px 0 18px; color: var(--muted); }
@media (hover: hover) {
  .lc-page :is(.lc-settings, .lc-quick button, .lc-person[aria-pressed=false]):enabled:hover,
  .lc-chip:hover input:not(:checked) + span { border-color: #c3b5a6; background: var(--chat-soft); }
  .lc-tools summary:hover, .lc-tools summary:hover > svg { color: var(--ink); }
  .lc-page .lc-primary:hover:enabled { background: #000; }
}
@media (max-width: 620px) {
  .lc-page, .lc-gate { margin-bottom: 28px; }
  .lc-head { gap: 9px; margin: 0 0 15px; }
  .lc-attend { padding: 14px 13px 4px; }
  .lc-people { margin: 10px 0; gap: 5px; }
  .lc-page .lc-person { min-height: 32px; padding: 4px 8px; }
  .lc-tools { gap: 0 12px; }
  .lc-room { margin-top: 18px; }
  .lc-transcript { gap: 20px; padding: 16px 1px 12px; }
  .lc-byline, .lr-byline { font-size:.74rem; line-height:1.45; }
  .lc-byline { gap:4px 7px; }
  .lc-byline strong, .lr-byline strong { color:#514035; font-weight:640; }
  .lc-assistant-mark { width:25px; height:25px; border:0; border-radius:8px; color:#99451f; background:#f8e5d5; }
  .lc-assistant-mark svg { width:16px; height:16px; }
  .lc-copy, .lr-message > p { font-size:.96rem; line-height:1.63; }
  .lc-mine { max-width:87%; }
  .lc-mine .lc-copy, .lr-own > p {
    max-width:100%; padding:9px 13px; border:1px solid #e9d6c3; border-radius:15px 5px 15px 15px;
    background:#f8eada; color:#3d2e24; text-align:start;
  }
  .lc-diners { color:#746a60; }
  .lc-answer .lc-notes { margin-top:8px; padding-inline-start:9px; border-inline-start:2px solid #e6dacd; color:#6a6057; font-size:.79rem; }
  .lc-welcome { align-items: center; flex-direction: row; text-align: left; padding: 8px 0; }
  .lc-welcome-art { width: 54px; height: 54px; }
  .lc-welcome p { margin-top: 4px; }
  .lc-room:has(.lc-welcome) .lc-quick { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .lc-quick { gap: 6px; }
  .lc-page .lc-quick button { font-size: .78rem; padding: 7px 8px; }
}
@media (max-width: 380px) {
  .lc-tools { gap: 0 8px; }
  .lc-tools details > summary { font-size: .74rem; gap: 3px; }
  .lc-tools summary > svg { width: 13px; }
}

html.chat-open { overflow: hidden; overscroll-behavior: none; }
.chat-open body {
  position: fixed;
  top: var(--chat-top, 0px);
  left: 0;
  right: 0;
  height: 100vh;
  height: var(--chat-height, 100dvh);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) 0 env(safe-area-inset-left, 0px);
}
/* UIKit sizes this page to the keyboard guide; only the transcript scrolls. */
html.chat-open.ios-lunch-shell, .chat-open.ios-lunch-shell body { height:100%; }
.chat-open.ios-lunch-shell body { position:static; }
.chat-open #topbar, .chat-open #mobile-nav { flex: none; }
.chat-open #main { flex: 1 1 0; min-height: 0; width: 100%; padding: 0; }
.chat-open #main > .lc-page { display: flex; flex-direction: column; width: 100%; height: 100%; min-height: 0; margin: 0; padding: 0; }
.chat-scroll {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  padding: clamp(12px, 1.7vw, 24px) max(19px, calc((100% - 794px) / 2)) 12px;
  scrollbar-width: thin;
  scrollbar-color: #aaa299 transparent;
}
.chat-scroll:focus-visible { outline: none; box-shadow: inset 0 -1px 0 var(--line-strong); }
.lc-jump-slot { position: relative; flex: none; width: min(794px, calc(100% - 38px)); height: 0; margin-inline: auto; }
.lc-page .lc-jump {
  position: absolute; z-index: 1; bottom: 5px; right: 0;
  display: inline-flex; align-items: center; gap: 4px; padding: 7px 11px;
  border: 1px solid var(--chat-edge); border-radius: 20px; background: var(--surface); color: var(--ink-secondary);
  box-shadow: 0 2px 8px #392d231a; font-size: .77rem; font-weight: 600;
}
.lc-page .lc-jump[data-unread] { border-color: #d5ab8b; background: var(--accent-soft); color: var(--accent-deep); }
.lc-page .lc-jump[hidden] { display: none; }
.chat-dock {
  flex: none;
  width: min(800px, calc(100% - 32px));
  margin-inline: auto;
  padding: 12px 3px max(12px, env(safe-area-inset-bottom, 0px));
  background: var(--paper);
}
.lc-page .chat-dock .lc-hint { margin: 0 0 5px; }
.chat-dock :is(.lc-compose, .lr-compose):focus-within { border-color: var(--accent-deep); box-shadow: 0 0 0 2px var(--accent-soft); }
.lc-page .chat-dock textarea:focus-visible { outline: none; }
.chat-dock button[type=submit] svg { display:none; }
.chat-dismiss { display:none; }
.chat-dock .lr-status:empty, .chat-dock:has(.lr-compose[hidden]):has(.lr-status:empty) { display: none; }
.chat-open:is(.native-chat-visible, .native-field-editing) .chat-dock { padding-block:0; border-top:0; }
.chat-open.native-field-editing .chat-dock form {display:none}
.chat-open.native-chat-visible .chat-dock .lc-hint:not([hidden]), .chat-open.native-chat-visible .chat-dock .lr-status:not(:empty) { padding-top:6px; }
.chat-open.native-chat-visible .chat-dock form { visibility:hidden; height:var(--native-bar-height,50px); min-height:0; padding:0; margin:0; overflow:hidden; }
.chat-open:is(.native-chat-editing, .native-field-editing) #mobile-nav { display:none; }

@media (max-width: 740px), (pointer:coarse) and (max-height:540px) {
  .chat-open #mobile-nav { position: static; }
  .chat-open.chat-keyboard #mobile-nav { display: none; }
  .chat-open.chat-keyboard .bar-right :is(.location,.bar-rule) { display:none; }
  .chat-open.chat-keyboard .chat-dismiss { display:inline-flex; align-items:center; gap:4px; min-height:40px; padding:0 7px; color:var(--ink-secondary); font-size:.82rem; }
  .chat-scroll { padding-top: 12px; padding-bottom: 10px; }
  .chat-dock { width:100%; margin:0; padding:7px 12px 8px; border-top:1px solid #ece6de; }
  .chat-dock :is(.lc-compose,.lr-compose) { gap:6px; padding:3px; background:#fbfaf7; border-radius:23px; border-color:#d4ccc0; box-shadow:none; }
  .chat-dock :is(.lc-compose,.lr-compose):focus-within { border-color:#b58f69; box-shadow:inset 0 0 0 1px #b58f691a; }
  .chat-dock textarea { min-height:40px; max-height:min(124px, calc(var(--chat-height,100dvh) * .27)); margin:0; padding:9px 6px 9px 11px; font-size:16px; line-height:22px; border-radius:19px; }
  @supports (field-sizing:content) {
    .chat-dock textarea { field-sizing:content; }
  }
  .lc-page .chat-dock button[type=submit] { flex:none; width:40px; height:40px; padding:0; border-radius:50%; }
  .chat-dock button[type=submit] svg { display:block; stroke-width:2.1; }
  .chat-dock button[type=submit] span { display:none; }
  .lc-page .chat-dock .lc-hint, .lc-page .chat-dock .lr-status { padding-inline:6px; }
  .chat-open.chat-keyboard .chat-dock { padding-bottom:0; }
}
@media (pointer:coarse) and (orientation:landscape) {
  .chat-open.chat-keyboard .bar-inner { height:40px; }
  .chat-open.chat-keyboard .desktop-nav { display:none; }
}
@supports (font: -apple-system-body) {
  @media (pointer: coarse) {
    html:is(.chat-open, :has(#main > .lc-gate)) {
      font: -apple-system-body;
      & .brand { font-size:clamp(16px, 1.05rem, 24px); min-width:0; }
      & .brand img, & .bar-right { flex-shrink:0; }
      & .brand > span { overflow:hidden; text-overflow:ellipsis; }
      & .location, & .chat-dismiss { font-size:min(.86rem, 16px); }
      & .main-avatar { font-size:min(.8rem, 16px); }
      & #mobile-nav .nav-link { min-width:0; font-size:clamp(11px, .72rem, 15px); }
    }
    .chat-open .lc-person { max-width:100%; overflow-wrap:anywhere; }
    .chat-dock textarea { font-size:max(16px, 1rem); line-height:1.35; }
  }
  @media (pointer:coarse) and (orientation:landscape) and (max-height:550px) {
    .chat-open .bar-inner { width:calc(100% - 24px); height:40px; }
    .chat-open .bar-inner :is(.desktop-nav, .account-name, .account > svg) { display:none; }
    .chat-open:not(.chat-keyboard, .native-chat-editing, .native-field-editing) #mobile-nav { display:grid; position:static; }
    .chat-open #mobile-nav .nav-link { min-height:36px; padding:5px; }
    .chat-open:is(.native-chat-editing, .native-field-editing) #topbar { display:none; }
  }
}
