/* The editor sits around the same restaurant page the guest interacts with. */
.template-bar { position: sticky; top: 0; z-index: 9; background: #fff; color: var(--brand); border-bottom: 1px solid var(--xx-line); --focus: var(--brand); }
.template-bar-inner { width: min(1392px,calc(100% - var(--gutter) * 2)); margin: auto; min-height: 62px; padding: 8px clamp(5px,2vw,32px); display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 3px clamp(12px,2vw,30px); }
#template-account { grid-column:3; grid-row:1; justify-self:end; }
@media (min-width: 1100px) {
  .template-bar-inner { grid-template-columns: minmax(max-content,1fr) minmax(0,760px) minmax(max-content,1fr); }
}
.template-brand { display: flex; align-items: center; justify-self: start; min-width: 0; min-height: 44px; }
.template-brand .xx-mascot { display:none; }
:is(.start-brand,.template-brand,.brand):hover .wordmark > :first-child { text-decoration: underline; text-underline-offset: 3px; }
.template-quick { display: flex; align-items: center; min-width: 0; width: 100%; gap: 4px; padding: 3px; border-radius: 12px; background: #f8faf7; border: 1px solid var(--xx-line); }
.template-quick:focus-within { outline: 2px solid var(--brand); outline-offset: 2px; }
.template-writing-field { display: grid; flex: 1; min-width: 0; }
/* The label reserves enough lines for the entire translated placeholder. */
.template-writing-field > * { grid-area: 1 / 1; min-width: 0; min-height: 38px; padding: 8px 10px; font: 400 15px/1.45 var(--sans); white-space: pre-wrap; overflow-wrap: anywhere; }
.template-writing-field label { opacity: 0; pointer-events: none; user-select: none; }
.template-writing-field textarea { display: block; width: 100%; field-sizing: content; resize: none; border: 0; background: transparent; color: var(--ink); }
.template-writing-field textarea:not(:placeholder-shown) { max-height: 9em; }
.template-writing-field textarea::placeholder { color: var(--soft); opacity: 1; }
.template-writing-field textarea:focus { outline: 0; }
#template-generate { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 6px 12px; border-radius: 9px; background: var(--leaf); color: var(--brand); font-size: 13px; font-weight: 700; }
#template-generate:not(:disabled):hover { background: var(--brand); color: var(--card); }
#template-generate:disabled { opacity: .72; cursor: default; }
.template-result { grid-column: 2; display: grid; min-width: 0; gap: 2px; font: 500 13px/1.4 var(--sans); }
#restaurant-prompt-hint { margin: 0; color: var(--brand); line-height: 1.5; text-wrap: pretty; }
.template-feedback { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; color: var(--soft); }
.template-feedback:has(#quick-status:empty):has(#quick-languages[hidden]),
#quick-status:empty { display: none; }
.template-feedback button { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.template-work-actions, #quick-extra { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; }
.template-work-actions :is(button,a,summary), #quick-save {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 38px; padding: 6px 10px; border-radius: 8px;
  color: var(--brand); font: 600 14px/1.3 var(--sans); cursor: pointer;
}
.template-work-actions :is(button,a,summary):hover { background: #f0f4ef; }
.template-work-actions [data-nav-icon], #quick-save [data-nav-icon] { display: inline-flex; }
.template-work-actions svg, #quick-save svg { width: 16px; height: 16px; }
#quick-more { position: relative; }
#quick-more summary { list-style: none; }
#quick-more summary::-webkit-details-marker { display: none; }
.owner-chevron { width: 7px; height: 7px; margin: -3px 2px 0; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
#quick-more[open] summary { background: #f0f4ef; }
#quick-more[open] summary .owner-chevron { transform: translateY(3px) rotate(225deg); }
#quick-more > summary:not([hidden]) + #quick-extra {
  position: absolute; z-index: 1; top: calc(100% + 4px); inset-inline-start: 0;
  display: grid; gap: 2px; width: max-content; min-width: 10rem; padding: 5px;
  border: 1px solid var(--xx-line); border-radius: 12px; background: #fff; box-shadow: 0 8px 24px #17382a21;
}
#quick-extra button { justify-content: flex-start; text-align: start; }
#quick-save { margin-inline-start: auto; padding-inline: 14px; border: 1px solid var(--brand); background: var(--brand); color: #fff; text-decoration: none; }
#quick-save:hover { background: var(--brand-hover); }
#quick-save .save-short { display: none; }
#prompt-dialog {
  --idea-ink: #173d30; --idea-muted: #53685d; --focus: #35764f; --idea-pad: clamp(20px,3vw,32px);
  width: min(900px,calc(100% - 40px)); max-width: none; max-height: calc(100dvh - 40px);
  margin: auto; padding: 0; overflow: hidden; overscroll-behavior: contain;
  background: #fff; color: var(--idea-ink); border: 0; border-radius: 24px; box-shadow: 0 24px 90px #142d2442;
}
#prompt-dialog[open] { display: flex; flex-direction: column; }
#prompt-dialog::backdrop { background: rgb(15 31 24 / .46); backdrop-filter: blur(5px); }
html:has(#prompt-dialog[open]) { overflow: hidden; }
.inspiration-head {
  flex: none; display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center;
  gap: 3px 10px; padding: 23px var(--idea-pad) 20px;
}
#prompt-title { color: var(--idea-ink); font: 720 clamp(26px,3.3vw,38px)/1.15 var(--sans); letter-spacing: -.045em; overflow-wrap: anywhere; }
#prompt-title:focus { outline: none; }
#prompt-help { grid-column: 1 / -1; margin: 0; color: var(--idea-muted); font: 450 .92rem/1.45 var(--sans); }
.inspiration-head button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; flex: none; }
.inspiration-head [data-nav-icon] { display: grid; place-items: center; }
#shuffle-prompts { gap: 6px; padding: 0 13px; border-radius: 999px; background: #edf4ed; color: #295b3f; font: 650 .82rem/1.2 var(--sans); }
#shuffle-prompts:hover { background: #dfecdf; }
#close-prompts { width: 44px; height: 44px; border-radius: 50%; color: #465a4f; }
#close-prompts:hover { background: #f1f4f1; }
#prompt-options {
  display: grid; grid-template-columns: minmax(0,.91fr) minmax(0,1fr); column-gap: clamp(20px,3vw,30px);
  min-height: 0; padding: 0 var(--idea-pad) var(--idea-pad); overflow-y: auto; overscroll-behavior: contain;
}
.idea-option {
  position: relative; display: grid; grid-template-columns: clamp(68px,7vw,84px) minmax(0,1fr) 24px;
  align-items: center; gap: 14px; min-width: 0; padding: 12px 0;
  background: transparent; color: var(--idea-ink); text-align: start;
}
:where(#prompt-options:not(.is-library)) .idea-option:not(:first-child) { grid-column: 2; }
:where(#prompt-options:not(.is-library)) .idea-option:nth-child(n+3) { border-top: 1px solid #e3eae4; }
:where(#prompt-options:not(.is-library)) .idea-option:nth-child(2) { padding-top: 0; }
:where(#prompt-options:not(.is-library)) .idea-option:last-child { padding-bottom: 0; }
:where(#prompt-options:not(.is-library)) .idea-option:not(:first-child):not(:has(.idea-photo)) { grid-template-columns: minmax(0,1fr) 24px; }
.idea-photo { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 12px; }
.idea-copy { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; overflow-wrap: anywhere; }
.idea-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 8px; }
.idea-name { font: 700 1.19rem/1.2 var(--sans); letter-spacing: -.03em; }
.idea-type { color: #536f5d; font: 600 .73rem/1.3 var(--sans); }
.idea-dish { font: 500 .89rem/1.4 var(--sans); }
.idea-dish:empty { display: none; }
.idea-event { display: flex; align-items: baseline; gap: 5px; color: var(--idea-muted); font: 450 .82rem/1.4 var(--sans); }
.idea-event-icon { display: inline-flex; flex: none; align-self: flex-start; margin-top: .12em; }
.idea-dish::first-letter, .idea-event-title::first-letter { text-transform: uppercase; }
.idea-arrow { display: grid; place-items: center; color: #3c694d; }
:where(#prompt-options:not(.is-library)) .idea-option:first-child {
  grid-area: 1 / 1 / span 4; grid-template-columns: minmax(0,1fr) auto; min-height: 280px;
  align-items: end; align-content: end; padding: 24px; isolation: isolate; overflow: hidden;
  border-radius: 16px; background: #163b2e; color: #fff;
}
:where(#prompt-options:not(.is-library)) .idea-option:first-child .idea-photo { position: absolute; inset: 0; z-index: -2; height: 100%; border-radius: 0; }
:where(#prompt-options:not(.is-library)) .idea-option:first-child::before {
  content: ""; position: absolute; z-index: -1; inset: 0;
  background: linear-gradient(0deg, rgb(7 23 15 / .97), rgb(7 23 15 / .77) 24%, rgb(7 23 15 / .06) 67%);
}
:where(#prompt-options:not(.is-library)) .idea-option:first-child .idea-type {
  position: absolute; top: 18px; left: 18px; max-width: calc(100% - 36px); padding: 5px 10px;
  border-radius: 999px; background: #f6faf0; color: #264934; font-weight: 650;
}
:where(#prompt-options:not(.is-library)) .idea-option:first-child .idea-name { font-size: clamp(28px,3.1vw,40px); line-height: 1.08; }
:where(#prompt-options:not(.is-library)) .idea-option:first-child .idea-dish { margin-top: 3px; color: #fff; font-size: 1rem; }
:where(#prompt-options:not(.is-library)) .idea-option:first-child .idea-event { color: #e8f3dc; font-size: .86rem; }
:where(#prompt-options:not(.is-library)) .idea-option:first-child .idea-arrow { width: 38px; height: 38px; border-radius: 50%; background: #d3ec9e; color: #183824; }
.idea-option:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; border-radius: 12px; }
:where(#prompt-options:not(.is-library)) .idea-option:first-child:focus-visible { outline-color: #d3ec9e; }
@media (hover:hover) {
  :where(#prompt-options:not(.is-library)) .idea-option:not(:first-child):hover .idea-name { text-decoration: underline; text-underline-offset: 3px; }
  :where(#prompt-options:not(.is-library)) .idea-option:first-child:hover .idea-arrow { background: #ecffc9; }
}
@media (max-width: 680px) {
  #prompt-dialog {
    --idea-pad: 18px; position: fixed; inset: auto 0 0; width: 100%; max-height: min(92dvh,780px);
    margin: 0 auto; border-radius: 22px 22px 0 0;
  }
  .inspiration-head { gap: 4px 5px; padding-block: 14px; }
  #prompt-title { font-size: clamp(23px,5.7vw,29px); }
  #prompt-help { font-size: .84rem; }
  #shuffle-prompts { padding-inline: 10px; }
  #prompt-options { grid-template-columns: minmax(0,1fr); padding-bottom: max(18px,env(safe-area-inset-bottom)); }
  .idea-option { grid-template-columns: 64px minmax(0,1fr) 20px; gap: 11px; padding-block: 11px; }
  :where(#prompt-options:not(.is-library)) .idea-option:not(:first-child) { grid-column: 1; }
  :where(#prompt-options:not(.is-library)) .idea-option:nth-child(2) { padding-top: 14px; }
  :where(#prompt-options:not(.is-library)) .idea-option:first-child { grid-area: auto; min-height: 188px; padding: 18px; }
  :where(#prompt-options:not(.is-library)) .idea-option:first-child::before { background: linear-gradient(0deg,rgb(7 23 15 / .94),rgb(7 23 15 / .54) 50%,rgb(7 23 15 / .06) 85%); }
  :where(#prompt-options:not(.is-library)) .idea-option:first-child .idea-type { top: 12px; left: 13px; }
  :where(#prompt-options:not(.is-library)) .idea-option:first-child .idea-name { font-size: clamp(27px,7vw,34px); }
  :where(#prompt-options:not(.is-library)) .idea-option:first-child .idea-dish { font-size: .92rem; }
  :where(#prompt-options:not(.is-library)) .idea-option:first-child .idea-arrow { width: 34px; height: 34px; }
  :where(#prompt-options:not(.is-library)) .idea-option:first-child .idea-copy { padding-top: 30px; }
  .idea-name { font-size: 1.08rem; }
  .idea-photo { border-radius: 10px; }
}
@media (max-width: 359px) {
  #prompt-dialog { --idea-pad: 13px; }
  .idea-option { grid-template-columns: 54px minmax(0,1fr) 18px; gap: 8px; }
}
@media (forced-colors: active) {
  #prompt-dialog, .idea-option, #shuffle-prompts { border: 1px solid ButtonText; }
  :where(#prompt-options:not(.is-library)) .idea-option:first-child .idea-copy { padding: 4px; background: Canvas; color: CanvasText; }
}
.template-preview .demo-mast { color: var(--brand); background: var(--paper); }
.template-preview .demo-mast :is(.house-signature,.demo-nav a,.locale-choice) { color: inherit; }
.template-preview .demo-mast select { background: var(--card); border-color: var(--line); }
.template-preview .demo-mast :focus-visible { outline-color: var(--brand); }
.template-preview .demo-footer :is(.house-credit > span,.owner-entry) { color: var(--leaf); }
.template-preview .demo-visit :is(.template-address-button,.house-address a) { color: var(--brand); }
#restaurant-shell[data-personal] .demo-nav { grid-auto-flow: column; grid-template-columns: none; }
#template-generate [data-nav-icon] { display: flex; }
.template-preview { min-width: 0; }
.template-bar:not([hidden]) + #template-layout .house-mast { top: var(--template-bar-height,64px); }
html:has(body[data-view="restaurant"] #template-bar:not([hidden])) { scroll-padding-top: calc(82px + var(--template-bar-height,64px)); }
#template-editor { min-width: 0; background: var(--card); color: var(--ink); padding: 18px 20px 22px; border-bottom: 1px solid var(--line); }
.template-editor-head,.template-editor-foot,.template-photo { display: flex; align-items: center; justify-content: space-between; gap: 7px; flex-wrap: wrap; }
.template-editor-head h2 { color: var(--brand); font-size: 20px; line-height: 1.3; }
.template-editor-head .close-modal { width: 40px; height: 40px; font-size: 24px; }
.template-hint { display: block; color: var(--soft); font-size: 12px; line-height: 1.5; }
.template-editor-head + p { margin: 0 0 14px; }
.template-field { min-width: 0; display: grid; gap: 5px; margin: 10px 0; font-size: 13px; font-weight: 650; color: var(--brand); }
.template-field :is(input,textarea,select),.template-time-row input {
  display: block; width: 100%; min-width: 0; min-height: 40px; padding: 7px 10px; border: 1px solid var(--line);
  border-radius: 7px; background: white; color: var(--ink); font: 400 14px/1.45 var(--sans);
}
.template-field textarea { resize: vertical; }
.template-photo { justify-content: flex-start; }
#template-details details { margin-top: 10px; padding: 9px 0 2px; border-top: 1px solid var(--line); }
#template-details summary { padding: 4px 0; cursor: pointer; color: var(--brand); font-weight: 650; }
#template-details fieldset { border: 0; padding: 0; margin: 13px 0 9px; min-width: 0; }
#template-details legend { padding: 0 0 4px; color: var(--brand); font-size: 13px; font-weight: 650; }
#template-week { display: grid; gap: 4px; }
.weekday-hours { border-top: 1px solid var(--line); padding: 3px 0 6px; }
.weekday-hours > label { display: flex; min-height: 40px; align-items: center; gap: 8px; color: var(--brand); font-size: 14px; cursor: pointer; }
.weekday-hours input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--brand); }
.weekday-hours .text-button { min-height: 36px; padding-inline: 0; font-size: 13px; }
.template-time-row { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr) 31px; gap: 4px; align-items: center; margin: 4px 0; }
.template-time-row input { padding-inline: 5px; }
.template-time-row button { min-height: 38px; font-size: 19px; color: var(--brand); }
#template-status:empty { display: none; }
#template-status { margin-top: 9px; }
.template-editor-foot { margin-top: 15px; }
.template-preview #template-sign { position: absolute; inset: 0 auto auto 0; pointer-events: none; }
#restaurant-shell[data-personal] .house-signature { max-width: 38%; }
#restaurant-shell[data-personal] .house-hero h1 { font-size: clamp(44px,6.1vw,91px); line-height: 1.04; overflow-wrap: anywhere; }
#personal-intro,.house-address address { white-space: pre-line; overflow-wrap: anywhere; }
.house-event { display: flex; align-items: baseline; flex-wrap: wrap; gap: 3px 10px; margin-top: 12px; padding-left: 10px; border-left: 2px solid var(--leaf); overflow-wrap: anywhere; }
.house-event span { color: var(--leaf); font-size: 12px; }
.house-event strong { font-size: 16px; }
#restaurant-shell[data-personal] #menu-title > [lang="pt"],#restaurant-shell[data-personal] #visit-title > [lang="pt"],
#restaurant-shell[data-personal] .house-visit h3 span[lang="pt"] { display: none; }
#restaurant-shell[data-personal] :is(#menu-title,#visit-title) small { display: block; margin: 0; color: inherit; font: 400 clamp(30px,3.4vw,50px)/1.15 var(--serif); letter-spacing: -.04em; }
.template-address-button { color: var(--leaf); text-decoration: underline; text-underline-offset: 4px; min-height: 42px; }
.personal-menu { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: clamp(22px,4vw,62px); padding: 3px 0; margin: 0; list-style: none; border-top: 1px solid var(--line); }
.personal-menu li { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); color: var(--brand); }
.personal-menu strong { min-width: 0; overflow-wrap: anywhere; font: 500 clamp(21px,2.15vw,31px)/1.25 var(--serif); }
.personal-menu .item-price { flex: none; max-width: 45%; overflow-wrap: anywhere; text-align: end; font-size: 15px; font-variant-numeric: tabular-nums; }
@media (min-width: 1051px) {
  #template-layout.is-editing { display: grid; grid-template-columns: clamp(296px,23vw,360px) minmax(0,1fr); align-items: start; }
  #template-editor { position: sticky; top: var(--template-bar-height,64px); max-height: calc(100dvh - var(--template-bar-height,64px)); overflow-y: auto; overscroll-behavior: contain; border-right: 1px solid var(--line); }
  .is-editing .house-mast-row { gap: 10px; padding-inline: 0; }
  .is-editing .house-nav { gap: 1px; }
  .is-editing .house-nav a { padding-inline: 10px; }
  .is-editing .house-hero h1 { font-size: clamp(52px,5.5vw,83px); }
  .is-editing .house-intro { padding-left: clamp(24px,3vw,48px); }
  .is-editing .dish-line { flex-wrap: wrap; gap: 3px 10px; }
}
@media (max-width: 1050px) {
  #template-editor { width: min(100%,720px); margin: 0 auto; }
}
@media (max-width: 900px) {
  .template-bar { position: relative; }
  .template-bar:not([hidden]) + #template-layout .house-mast { top: 0; }
  html:has(body[data-view="restaurant"] #template-bar:not([hidden])) { scroll-padding-top: 7rem; }
  #inicio { scroll-margin-top: calc(var(--template-bar-height,0px) + var(--gutter) + 55px); }
  .template-bar-inner { padding-inline: 2px; }
}
@media (max-width: 640px) {
  .template-bar-inner { grid-template-columns: minmax(0,1fr) auto; grid-template-areas: "brand brand" "prompt prompt" "feedback feedback"; gap: 0 8px; padding-block: 8px 10px; }
  .template-quick { grid-area: prompt; margin-top: 6px; }
  .template-writing-field > * { font-size: 16px; padding: 6px 7px; line-height: 1.35; }
  .template-result { grid-area: feedback; margin-top: 5px; }
  #template-generate { min-height: 44px; padding-inline: 8px; }
  #template-editor { padding-inline: var(--gutter); }
  .template-field :is(input,textarea,select),.template-time-row input { font-size: 16px; }
  #restaurant-shell[data-personal] .house-hero h1 { font-size: clamp(34px,9.8vw,56px); }
  #restaurant-shell[data-personal] .house-signature { max-width: 60%; }
  .personal-menu { grid-template-columns: 1fr; }
}
@media (max-width: 370px) {
  .template-bar-inner { padding-inline: 0; }
  .template-writing-field > * { padding-inline: 6px; }
}
@media (max-width: 440px) {
  #template-generate [data-nav-icon] { display: none; }
}

/* Global brand controls belong to the creator shell; restaurant themes stay independent. */
.template-bar .template-quick input{min-height:48px;font-size:16px;line-height:1.5}
.template-bar .template-quick button{min-height:48px;padding:10px 16px;border-radius:999px;font-size:14px;line-height:1.5}
.template-bar .template-quick{border-radius:12px}
.template-bar button:focus-visible,.template-bar input:focus-visible{outline:3px solid var(--xx-focus);outline-offset:3px}

.mobile-owner-tools, #mobile-generate-label, #mobile-dining-nav, .mobile-locale-code { display: none; }
#mobile-trial-tools:empty { display: none; }

@media (min-width: 481px) {
  html:lang(zh) #mobile-save-slot .save-full { display: inline; }
  html:lang(zh) #mobile-save-slot .save-short { display: none; }
}

@media (max-width: 780px), (max-width: 1000px) and (max-height: 540px) and (pointer: coarse) {
  .template-bar { position: relative; }
  .template-bar:not([hidden]) + #template-layout .house-mast { top: 0; }
  html:has(body[data-view="restaurant"] #template-bar:not([hidden])) { scroll-padding-top: calc(52px + .5rem); }
  .template-bar-inner {
    grid-template-columns: auto minmax(0,1fr) auto;
    grid-template-areas: "brand tools account" "prompt prompt prompt";
    gap: 3px 8px;
    width: min(100% - 24px, 680px);
    min-height: 0;
    padding: 4px 0 8px;
  }
  .template-bar[data-editing-site] .template-bar-inner {
    grid-template-areas: "brand tools account"; padding-block: 4px;
  }
  #template-account { grid-area:account; }
  #template-account > .auth-button { padding-inline:10px; }
  .template-bar[data-editing-site] #mobile-prompts-slot { display: none; }
  #mobile-guest-slot:empty, #mobile-work-slot:empty, #mobile-save-slot:empty { display: none; }
  .template-brand { grid-area: brand; min-height: 44px; }
  .mobile-owner-tools { grid-area: tools; display: flex; align-items: center; justify-content: flex-end; gap: clamp(5px,2vw,12px); }
  .template-bar[data-editing-site] .template-bar-inner:has(#quick-save[aria-controls="auth-dialog"]) .mobile-owner-tools { grid-column: 2 / -1; }
  .mobile-owner-tools button {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-width: 44px; min-height: 44px; padding: 3px 5px;
    color: var(--brand); background: transparent; font: 600 13px/1.25 var(--sans); white-space: nowrap;
  }
  #mobile-owner-tools :is(#quick-guest,#quick-work) {
    display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px;
    margin: 0; padding-inline: 3px; color: var(--brand); font: 600 13px/1.2 var(--sans);
    text-align: center;
  }
  #mobile-guest-slot [data-nav-icon] { display: none; }
  #mobile-owner-tools #quick-work {
    padding-inline: 9px; border: 1px solid var(--line); border-radius: 7px; text-decoration: none;
  }
  #mobile-trial-tools button {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0;
    background: transparent; color: inherit; border: 0; font: 650 .875rem/1.4 var(--sans);
    text-decoration: underline; text-underline-offset: 4px;
  }
  #mobile-trial-tools .owner-chevron { display: none; }
  #mobile-prompts-slot button { color: var(--brand); text-decoration: underline; text-underline-offset: 4px; }
  #mobile-generate-label { display: inline; }
  #template-quick { grid-area: prompt; margin: 0; }
  .template-writing-field > * { min-height: 42px; padding: 9px 8px; font-size: 16px; line-height: 1.35; }
  #template-generate { min-width: 48px; min-height: 44px; padding: 4px 10px; }
  #template-generate [data-nav-icon] { display: none; }
  #generate-label, #restaurant-prompt-hint {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
  .template-result { display: none; grid-area: auto; grid-column: 1 / -1; align-items: center; gap: 2px 8px; margin: 0; }
  .template-result:has(#quick-status:not(:empty),#quick-languages:not([hidden])) { display: flex; }
  #quick-status { flex: 1 1 9rem; }
  .template-result #quick-guest { display: none; }

  #owner-tools-dialog {
    --brand: var(--xx-primary); --card: #fff; --paper: #f8faf7; --line: var(--xx-line); --leaf: #e7edc8;
    position: fixed; inset: auto 0 0; width: min(100%, 28rem); max-width: 100%; max-height: 85dvh;
    margin: 0 auto; padding: 16px 20px max(16px,env(safe-area-inset-bottom));
    border: 1px solid var(--line); border-radius: 20px 20px 0 0; overflow-y: auto; overscroll-behavior: contain;
    background: var(--card); color: var(--brand);
  }
  #owner-tools-dialog::backdrop { background: rgb(12 36 30 / .5); }
  html:has(#owner-tools-dialog[open]) { overflow: hidden; }
  #owner-tools-dialog .service-heading { margin: 0 0 6px; border-bottom: 1px solid var(--line); }
  #owner-tools-dialog .service-heading h2 { font: 700 1.2rem/1.3 var(--sans); }
  #owner-tools-dialog .close-modal { width: 44px; height: 44px; }
  #mobile-edit-prompt:has(form) { padding-block: 8px; }
  #mobile-edit-prompt .template-quick { background: var(--paper); border: 1px solid var(--line); }
  #mobile-edit-prompt .template-quick:focus-within { outline-color: var(--brand); }
  #mobile-edit-feedback .template-result { color: var(--soft); }
  #mobile-edit-feedback .template-result:has(#quick-status:not(:empty),#quick-languages:not([hidden])) {
    display: grid; gap: 3px; padding-block: 0 8px; border-bottom: 1px solid var(--line);
  }
  #mobile-edit-feedback [data-action="retry-copy"] { min-height: 44px; justify-self: start; color: var(--brand); }
  #restaurant-shell > .toast { bottom: calc(12px + env(safe-area-inset-bottom,0px)); }

  #mobile-owner-actions { display: grid; }
  #mobile-owner-actions .template-work-actions { display: contents; }
  #mobile-owner-actions #quick-extra { display: grid; }
  #mobile-owner-actions #quick-more > summary:not([hidden]) + #quick-extra {
    position: static; width: auto; min-width: 0; margin-bottom: 6px; padding: 0 0 0 14px;
    border: 0; border-inline-start: 2px solid var(--xx-line); border-radius: 0; box-shadow: none;
  }
  #mobile-owner-actions :is(a,button,summary), #owner-tools-dialog .owner-works-link {
    display: flex; align-items: center; width: 100%; max-width: none; min-height: 46px;
    margin: 0; padding: 8px 2px; border: 0; border-radius: 0; justify-content: flex-start;
    background: transparent; color: var(--brand); font: 600 1rem/1.35 var(--sans);
    text-align: start; text-decoration: none; white-space: normal;
  }
  #mobile-owner-actions summary .owner-chevron { margin-inline-start: auto; }
  #mobile-owner-actions :is(a,button):hover, #owner-tools-dialog .owner-works-link:hover { text-decoration: underline; }
  #mobile-save-slot #quick-save { min-height: 44px; min-width: 44px; padding-inline: 9px; font-size: 13px; }
  #mobile-save-slot .save-full, #mobile-save-slot [data-nav-icon] { display: none; }
  #mobile-save-slot .save-short { display: inline; }

  #template-layout .demo-mast-row {
    position: relative; display: grid; grid-template-columns: minmax(0,1fr) auto auto;
    min-height: 50px; gap: 5px; padding-block: 0;
  }
  #template-layout .demo-mast .house-signature {
    max-width: 100%; min-height: 46px; gap: 6px; font-size: clamp(20px,5.4vw,26px);
  }
  #template-layout .demo-mast .house-signature::before { width: 18px; }
  #template-layout .locale-choice {
    justify-content: center; min-height: 44px; min-width: 50px; padding-inline: 6px 17px; border-radius: 6px;
  }
  #template-layout .locale-choice:focus-within { outline: 2px solid currentColor; outline-offset: 1px; }
  #template-layout .mobile-locale-code { display: inline; font: 650 13px/1 var(--sans); }
  #template-layout .locale-choice select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; }
  #template-layout .locale-choice::after { right: 6px; }
  #mobile-dining-nav { display: block; position: relative; color: var(--room-ink); }
  #mobile-dining-nav summary {
    display: grid; place-items: center; width: 44px; height: 44px; list-style: none; border-radius: 8px; cursor: pointer;
  }
  #mobile-dining-nav summary::-webkit-details-marker { display: none; }
  #mobile-dining-nav summary span { width: 19px; height: 14px; border-block: 2px solid currentColor; position: relative; }
  #mobile-dining-nav summary span::before { content: ""; position: absolute; inset: 4px 0 auto; border-top: 2px solid currentColor; }
  #mobile-dining-nav[open] summary { background: var(--room-line); }
  #mobile-dining-links .demo-nav {
    position: absolute; top: calc(100% + 2px); inset-inline-end: 0; z-index: 2;
    display: flex; flex-direction: column; align-items: stretch; width: max-content; min-width: 10rem;
    max-width: min(80vw,22rem); max-height: 65dvh; overflow-y: auto; gap: 0; margin: 0; padding: 4px;
    color: var(--room-ink); background: var(--room-paper); border: 1px solid var(--room-line); border-radius: 8px;
    box-shadow: 0 5px 15px rgb(0 0 0 / .12);
  }
  #mobile-dining-links .demo-nav a { display: flex; align-items: center; min-height: 44px; padding: 7px 12px; text-align: start; }
}
@media (max-width:480px) {
  .template-bar-inner { column-gap:5px; }
  .mobile-owner-tools { flex-wrap:wrap; gap:3px; }
  #mobile-owner-tools :is(#quick-guest,#quick-work,#quick-save) { white-space:nowrap; }
  #mobile-owner-tools #quick-work, #mobile-save-slot #quick-save { padding-inline:6px; }
}
@media (max-width:380px) {
  .template-brand { width:44px; justify-content:center; }
  .template-brand .wordmark.xx-wordmark { display:none; }
  .template-brand .xx-mascot { display:block; }
  #template-account > .auth-button { padding-inline:8px; }
}
@media (min-width: 781px) and (max-width: 1000px) and (max-height: 540px) and (pointer: coarse) {
  .template-bar-inner {
    grid-template-columns: auto minmax(0,1fr) auto auto; grid-template-areas: "brand prompt tools account";
    gap: 2px 16px; width: calc(100% - 32px); padding-block: 5px;
  }
  .template-bar[data-editing-site] .template-bar-inner { grid-template-columns:auto minmax(0,1fr) auto; }
}

.library-controls,.library-pages { display:flex; align-items:center; gap:.6rem; padding:.6rem var(--idea-pad); flex:none; }
.library-controls { border-block:1px solid #dce5de; background:#f6f9f6; }
.library-controls select,.library-controls input { min-width:0; min-height:42px; background:white; border:1px solid #afc3b6; color:#173d30; padding:.48rem .65rem; border-radius:8px; font:inherit; }
.library-controls label { max-width:48%; }
.library-controls select { max-width:100%; }
.library-controls input { flex:1; width:5rem; }
.library-pages { flex-wrap:wrap; justify-content:flex-end; border-top:1px solid #dce5de; padding-bottom:max(.65rem,env(safe-area-inset-bottom)); }
.library-pages span { flex:1; font-size:.85rem; color:var(--idea-muted); }
.library-pages button { min-height:42px; padding:.4rem .8rem; font-weight:650; border-radius:7px; background:#ecf2ea; color:var(--idea-ink); }
.library-pages button:disabled { opacity:.45; }
#prompt-options.is-library { grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 1.25rem; padding-block:.4rem; }
#prompt-options.is-library .idea-option { grid-area:auto; min-height:88px; padding:.8rem 0; grid-template-columns:70px minmax(0,1fr) 18px; gap:.7rem; border-block-end:1px solid #dce5de; }
#prompt-options.is-library .idea-photo { aspect-ratio:1; }
@media(max-width:660px) {
  #prompt-options.is-library { grid-template-columns:1fr; }
  .library-controls { gap:.45rem; padding-block:.45rem; }
  #prompt-options.is-library .idea-option { grid-template-columns:64px minmax(0,1fr) 18px; }
}
