:root {
  color-scheme: light;
  /* The Market shell and its photographic landing page use these two greens. */
  --brand: #073f39;
  --brand-hover: #0b5149;
  --brand-wash: #e1ebe5;
  --hero-green: #183b30;
  --leaf: #e7edc8;
  --mist: #dae3d4;
  --paper: #f3efe6;
  --card: #fffdf8;
  --ink: #19211f;
  --soft: #736d63;
  --line: #cbc4b7;
  --focus: var(--brand);
  --sans: var(--font-ui, Arial, "PingFang SC", "Microsoft YaHei", sans-serif);
  --serif: Georgia,"Songti SC","SimSun",serif;
  --gutter: 24px;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 82px; }
body { min-width: 288px; margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.55 var(--sans); }
button, input, textarea { font: inherit; color: inherit; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
button { background: transparent; border: 0; padding: 0; cursor: pointer; }
button:disabled { opacity: .62; cursor: progress; }
a { color: inherit; text-decoration: none; }
:where(button,a,summary,input,textarea,[tabindex]):focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
[hidden] { display: none !important; }
h1,h2,h3,p,figure { margin: 0; }
svg { display: inline-block; vertical-align: middle; flex: none; }
.sr-only,.skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: fixed; left: 12px; top: 8px; z-index: 20; background: var(--card); padding: 10px; }

body[data-view]:not([data-view="restaurant"]) { background: #fff; }
#studio-shell { --paper: #fff; --card: #fff; }

/* The same three destinations move into a thumb-accessible dock on mobile. */
#main-nav {
  position: sticky; z-index: 8; top: 0;
  display: flex; justify-content: center; align-items: center; gap: 12px;
  padding: 10px var(--gutter); background: var(--paper); border-bottom: 1px solid var(--line);
}
#main-nav a {
  display: inline-flex; justify-content: center; align-items: center; gap: 9px;
  min-height: 44px; padding: 9px 20px; color: var(--brand); border-radius: 8px;
}
#main-nav a > span { display: flex; }
#main-nav a b { font-size: 14px; font-weight: 500; white-space: nowrap; }
#main-nav a:hover { background: var(--brand-wash); }
#main-nav a[aria-current="page"] { background: var(--brand); color: var(--card); }
.site-shell { position: relative; width: min(1440px,100%); margin: var(--gutter) auto 0; padding-inline: var(--gutter); }
.main-wrap { width: 100%; padding: 0 0 54px; outline: none; }
#studio-utilities { display: contents; }
[data-view="edit"] .topbar .locale-choice select { min-height: 44px; }
.topbar {
  --focus: var(--brand);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 17px 28px; color: var(--brand); background: var(--card); border: 1px solid var(--xx-line); border-radius: 18px;
}
body[data-view="home"] .topbar {
  position: absolute; z-index: 2; top: 0; inset-inline: var(--gutter);
  padding: 26px 40px;
}
.brand {
  display: inline-flex; align-items: center; flex: none; min-height: 48px;
  padding-block: 7px; color: var(--brand);
}
.wordmark { display: block; font: 700 11px/1.1 var(--sans); letter-spacing: 1.7px; white-space: nowrap; }
.wordmark small { display: block; margin-top: 3px; font-size: 9px; line-height: 1.1; font-weight: 500; letter-spacing: 1.2px; }
html:lang(zh) .wordmark > span { font-size: 15px; letter-spacing: .08em; }
html:not(:lang(zh)) .wordmark small { display: none; }
.account-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px;
  max-width: min(210px,44%); padding: 9px 16px; border: 1px solid #dae3d4ae; border-radius: 999px;
  background: #183b30ed; color: #fffdf6; font-size: 14px; font-weight: 600;
}
.account-button span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.account-button:hover { background: var(--leaf); border-color: var(--leaf); color: var(--hero-green); }

.primary,.secondary {
  display: inline-flex; justify-content: center; align-items: center; gap: 8px;
  min-height: 44px; padding: 10px 19px; border-radius: 999px; font-size: 14px; font-weight: 600; line-height: 1.4; text-align: center;
}
.primary { background: var(--brand); border: 1px solid var(--brand); color: var(--card); }
.primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.secondary { border: 1px solid var(--line); background: var(--card); color: var(--brand); }
.secondary:hover { background: var(--brand-wash); border-color: var(--brand); }
.text-button { color: var(--brand); padding: 6px 2px; font-size: 13px; font-weight: 650; }
.text-button:hover { text-decoration: underline; }

.hero {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; align-items: flex-end; min-height: clamp(495px,40vw,605px);
  background: var(--hero-green); color: #fffdf6; border-radius: 24px;
}
.hero-art { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 66% 51%; }
.hero::before {
  content: ""; position: absolute; z-index: -1; inset: 0; pointer-events: none;
  background: linear-gradient(0deg,var(--hero-green) 0%,#183b309e 25%,#183b300d 78%),
              linear-gradient(90deg,#183b30f5 0%,#183b30cd 27%,#183b302b 68%,transparent);
}
.hero-copy { width: min(730px,64%); padding: 128px 0 42px clamp(32px,4.7vw,65px); }
.hero h1 { color: #fffdf6; font-size: clamp(40px,4.2vw,60px); line-height: 1.25; font-weight: 700; letter-spacing: -1.5px; overflow-wrap: anywhere; }
.hero-copy > p { color: var(--mist); margin-top: 15px; font-size: clamp(14px,1.2vw,17px); line-height: 1.8; }
.composer {
  max-width: 550px; margin-top: 22px; padding: 12px 14px; background: var(--card); color: var(--ink);
  border: 1px solid #fffdf699; border-radius: 16px; box-shadow: 0 5px 18px #0a211e30;
}
.composer:focus-within { outline: 2px solid var(--leaf); outline-offset: 3px; }
.composer textarea { display: block; width: 100%; height: 49px; resize: none; padding: 2px; line-height: 1.5; font-size: 14px; background: transparent; border: 0; outline: none; }
.composer textarea::placeholder { color: var(--soft); opacity: 1; }
.composer-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.segments,.device-switch { display: inline-flex; align-items: center; gap: 2px; padding: 3px; background: var(--paper); border: 1px solid #d9d4c9; border-radius: 999px; }
.segments button,.device-switch button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 31px;
  padding: 6px 11px; border-radius: 999px; color: var(--soft); font-size: 12px; line-height: 1.35; font-weight: 600; white-space: nowrap;
}
.segments button:hover,.device-switch button:hover { background: var(--brand-wash); color: var(--brand); }
.segments [aria-pressed="true"],.device-switch [aria-pressed="true"] { background: var(--brand); color: var(--card); }
.composer .kinds [aria-pressed="true"] { background: var(--leaf); color: var(--hero-green); }
.create-button { min-height: 39px; padding: 8px 16px; font-size: 13px; }
.gallery { margin-top: clamp(28px,3.3vw,48px); }
.section-heading,.editor-head,.panel-head,.heading-row { display: flex; align-items: center; }
.section-heading,.editor-head,.panel-head { justify-content: space-between; gap: 16px; }
.section-heading { margin-bottom: 20px; }
.section-heading h2 { color: var(--brand); font-size: clamp(24px,2.15vw,32px); line-height: 1.35; letter-spacing: -.035em; }
.section-heading p,.editor-head p { color: var(--soft); margin-top: 7px; font-size: 14px; }
.catalog-filter button { min-width: 45px; }
.card-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.work-card {
  display: block; min-width: 0; width: 100%; overflow: hidden; text-align: left;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; transition: border-color .18s,box-shadow .18s;
}
.work-card:hover { border-color: var(--brand); box-shadow: 0 5px 16px #073f3917; }
.card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 17px 15px; }
.card-text { display: grid; gap: 3px; min-width: 0; }
.chef-credit {
  display:inline-flex; align-items:center; gap:6px; width:fit-content; max-width:100%;
  min-width:0; padding:2px 8px 2px 2px; border-radius:20px;
  background:#eff4ee; color:#284c37; font:600 .73rem/1.25 var(--sans); text-align:start;
}
.chef-credit img { display:block; flex:none; width:30px; height:30px; object-fit:cover; border-radius:50%; }
.chef-credit > span { min-width:0; overflow-wrap:anywhere; }
.card-text .chef-credit,.published-info .chef-credit { margin-top:4px; }
.card-text strong,.card-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-text strong { color: var(--brand); font-size: 17px; letter-spacing: -.02em; }
.card-text small { color: var(--soft); font-size: 12px; }
.card-arrow { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border: 1px solid var(--line); border-radius: 50%; color: var(--brand); }
.work-card:hover .card-arrow { color: var(--card); background: var(--brand); border-color: var(--brand); }
.library-work { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.library-work .work-card { flex: 1; border: 0; border-radius: 15px 15px 0 0; }
.library-work:has(.library-cover) .work-card { flex:0 0 auto; }
.library-cover { display:block; position:relative; overflow:hidden; aspect-ratio:2.22; background:var(--brand-wash); }
.library-cover img { display:block; width:100%; height:100%; object-fit:cover; }
.library-cover > span { position:absolute; inset:auto auto 10px 14px; padding:3px 9px; border-radius:5px; background:#fffdf5f5; color:#273f34; font-size:.76rem; font-weight:650; }
.library-summary { display:grid; align-content:start; flex:1; gap:7px; margin:0 16px 12px; padding:10px 0 0; border-top:1px solid var(--line); font-size:.88rem; line-height:1.45; }
.library-summary > div { display:grid; grid-template-columns:minmax(4em,26%) minmax(0,1fr); gap:10px; }
.library-summary dt { color:var(--soft); }
.library-summary dd { margin:0; overflow-wrap:anywhere; }
.library-dishes > div { display:flex; gap:8px; align-items:baseline; justify-content:space-between; }
.library-dishes bdi { flex:none; color:var(--brand); font-weight:650; font-variant-numeric:tabular-nums; }
.library-site-publish { display:flex; align-items:center; justify-content:center; gap:8px; margin:0 12px 12px; min-height:44px; }
.library-live-site { display:grid; gap:2px; margin:2px 16px 8px; color:var(--brand); }
.library-live-site > span { font-size:.82rem; font-weight:700; }
.library-live-site a { display:inline-flex; align-items:center; gap:6px; width:fit-content; max-width:100%; min-height:44px; font-size:.9rem; text-decoration:underline; text-underline-offset:3px; }
.library-live-site bdi { min-width:0; overflow-wrap:anywhere; }
.library-live-site svg { flex:none; }
.card-edit-action, .library-publish { display: inline-flex; align-items: center; gap: 6px; color: var(--brand); font-weight: 650; }
.card-edit-action { flex: none; font-size: 13px; }
.library-actions { display:flex; align-items:stretch; border-top:1px solid var(--line); }
.library-publish, .library-delete { display:inline-flex; align-items:center; justify-content:center; gap:6px; min-height:44px; padding:8px 12px; }
.library-publish { flex:1; border-radius:0 0 0 15px; }
.library-delete { flex:none; border-inline-start:1px solid var(--line); border-radius:0 0 15px 0; color:#87493d; }
.library-publish:hover { background:var(--brand-wash); }
.library-delete:hover { background:#fcf0eb; }
.primary.confirm-delete { color:#fff; background:#943e31; border-color:#943e31; }
.primary.confirm-delete:hover { background:#7a3026; }
.delete-error { color:#96392c; }
.work-sync { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin: 8px 0 16px; color: var(--soft); }
.work-sync small { line-height: 1.5; }
.work-sync > div { display: flex; flex-wrap: wrap; gap: 0 14px; }
.work-sync button { min-height: 44px; }
.library-work .work-sync { margin: 0; padding: 0 16px 8px; }

/* Artwork previews carry each restaurant's own palette. */
.mat { position: relative; overflow: hidden; isolation: isolate; aspect-ratio: 1.93; display: grid; place-items: center; }
.mat-site.mat-tomato { background-color: #e3cba8; background-image: repeating-linear-gradient(0deg,transparent 0 18px,#a7715430 18px 30px),repeating-linear-gradient(90deg,transparent 0 18px,#ae7c5b25 18px 30px); }
.mat-coffee { background: #aebba2; }
.mat-house { background: #c5cebf; }
.mat-house .mini-type { color: var(--brand); }
.house-print-mini { display: flex; flex-direction: column; height: 88%; aspect-ratio: 4/5; overflow: hidden; background: var(--paper); box-shadow: 0 5px 12px #163d3240; transform: rotate(-3deg); }
.house-print-mini > div { padding: 6% 7%; background: var(--brand); color: var(--card); }
.house-print-mini small,.house-print-mini > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: clamp(6px,.55vw,9px); }
.house-print-mini small { color: #e6cb91; }
.house-print-mini strong { display: block; margin-top: 2px; overflow: hidden; max-height: 2.1em; overflow-wrap: anywhere; font: 500 clamp(15px,1.4vw,23px)/1.05 var(--serif); }
.house-print-mini img { min-height: 0; flex: 1; width: 100%; object-fit: cover; object-position: 64% center; }
.house-print-mini > span { padding: 5% 7%; color: var(--brand); }
.mat-ramen { background: #aa8272; background-image: repeating-linear-gradient(90deg,transparent 0 36px,#67493818 36px 38px); }
.mat-poster.mat-tomato { background: #dfc6a0; }
.mini-window { width: 82%; height: 77%; overflow: hidden; border-radius: 3px; background: #faf1dc; box-shadow: 0 5px 12px #41372330; transform: rotate(-2.5deg); }
.mini-nav { height: 16%; min-height: 15px; padding-inline: 6%; display: flex; align-items: center; justify-content: space-between; gap: 6px; color: #3b3225; }
.mini-nav b { font-size: clamp(6px,.7vw,9px); max-width: 55%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mini-nav span { display: flex; align-items: center; gap: 6px; white-space: nowrap; font-size: clamp(5px,.5vw,7px); }
.mini-nav i { height: 2px; width: 2px; border-radius: 100%; background: currentColor; }
.mini-body { height: 84%; position: relative; }
.mini-body img { position: absolute; right: 0; width: 60%; height: 100%; object-fit: cover; object-position: 70% center; }
.mini-type { position: relative; height: 100%; max-width: 49%; display: flex; flex-direction: column; justify-content: center; gap: 7px; padding-left: 6%; color: #943b24; }
.mini-type strong { font: 650 clamp(22px,2.7vw,42px)/.89 var(--serif); letter-spacing: -.06em; overflow: hidden; max-height: 2.7em; overflow-wrap: anywhere; }
.mini-type small { font-size: clamp(5px,.57vw,8px); letter-spacing: .09em; }
.mat-ramen .mini-window { transform: rotate(2deg); background: #32261f; }
.mat-ramen .mini-nav { color: #f7edd7; }
.mat-ramen .mini-body img { width: 100%; object-position: 65% 56%; }
.mat-ramen .mini-body::after { content: ""; position: absolute; pointer-events: none; inset: 0; background: linear-gradient(90deg,#2015109c,transparent 70%); }
.mat-ramen .mini-type { z-index: 1; color: #fff1d9; }
.mat-ramen .mini-type strong { line-height: 1.03; letter-spacing: .01em; }
.mat-coffee .mini-type { color: #284e3f; }
.underprint { position: absolute; left: 15%; top: 14%; width: 67%; height: 76%; transform: rotate(-9deg); background: repeating-linear-gradient(0deg,#ded5b5 0px 1px,#eee7cd 1px 10px); border: 4px solid #e6dfc6; box-shadow: 0 5px 13px #27362633; }
.print-sheet { width: 76%; height: 81%; position: relative; overflow: hidden; transform: rotate(5deg); box-shadow: 0 5px 12px #29382a50; border: 4px solid #e7ddbe; background: #2d4836; }
.print-sheet img, .print-shade { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: right 58%; }
.print-shade { background: linear-gradient(90deg,#152b20c2,transparent 76%); }
.print-type { position: absolute; inset: 10% 6% auto; color: #fcf2d5; }
.print-type small { font-size: clamp(6px,.62vw,9px); letter-spacing: .12em; }
.print-type strong { display: block; margin-top: 5px; font: 520 clamp(26px,3vw,45px)/.9 var(--serif); letter-spacing: -.06em; max-width: 80%; overflow: hidden; max-height: 2.1em; overflow-wrap: anywhere; }
.print-foot { position: absolute; left: 6%; bottom: 9%; padding-top: 3px; border-top: 1px solid #f3dfae; color: #fff2d4; font-size: clamp(6px,.6vw,9px); max-width: 85%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.collection, .listing, .editor-page { margin-top: 24px; }
.collection .section-heading { margin-bottom: 27px; }
.collection h1, .editor-head h1 { color: var(--brand); font-size: clamp(26px,2.25vw,36px); line-height: 1.27; letter-spacing: -.035em; overflow-wrap: anywhere; }
.heading-row { gap: 12px; flex-wrap: wrap; }
.status-tag { display: inline-flex; align-items: center; padding: 3px 8px; border: 1px solid #c7d6cc; border-radius: 999px; background: var(--brand-wash); color: var(--brand); font-size: 11px; font-weight: 650; white-space: nowrap; }
.empty-state { padding: 64px 24px; min-height: 310px; display: grid; justify-items: center; align-content: center; text-align: center; border: 1px solid var(--line); border-radius: 20px; background: var(--card); }
.empty-icon { height: 64px; width: 64px; display: grid; place-items: center; color: var(--brand); border-radius: 18px; background: var(--leaf); margin-bottom: 18px; }
.owner-gate { max-width: 40rem; margin: clamp(24px,6vw,72px) auto; }
.owner-gate h1 { color: var(--brand); font-size: clamp(23px,4vw,32px); }
.owner-gate .back-link { min-height: 44px; margin-top: 6px; }
/* When saving opens sign-in, keep that draft action as the single sign-in entry. */
[data-view="account"] .topbar [data-auth-slot]:has(> [aria-controls="auth-dialog"]),
:is(#template-bar, #studio-shell):has(a[data-save-work][aria-controls="auth-dialog"]) [data-auth-slot]:has(> [aria-controls="auth-dialog"]) {
  display: none;
}
.device-drafts { margin-block: 24px; border-top: 1px solid var(--line); }
.device-drafts summary { padding-block: 16px; cursor: pointer; font-weight: 650; color: var(--brand); }
.device-drafts p { margin: 0 0 16px; color: var(--soft); }
.empty-state h2 { color: var(--brand); font-size: 21px; }.empty-state p { max-width: 410px; color: var(--soft); margin: 8px 0 20px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--soft); }
.back-link:hover { color: var(--brand); }
.editor-head { margin: 14px 0 23px; }
.editor-head > div:first-child { min-width: 0; }
.actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex-shrink: 0; }
.work-context, .work-path, .companion-action, .work-identity, .work-meta, .work-actions, .preview-tools { display: flex; align-items: center; }
.work-context { justify-content: space-between; flex-wrap: wrap; gap: 0 16px; margin-bottom: 8px; }
.work-path { flex-wrap: wrap; gap: 7px; min-width: 0; color: var(--xx-muted); font-size: 13px; }
.work-path .back-link, .companion-action { min-height: 44px; }
.work-path > svg { opacity: .65; }
.companion-action { gap: 7px; color: var(--brand); font-size: 14px; font-weight: 650; }
.companion-action:hover, .proof-expand:hover { text-decoration: underline; text-underline-offset: 3px; }
.work-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 22px; margin-bottom: 18px; padding: 16px clamp(16px,2vw,28px);
  border: 1px solid var(--xx-line); border-radius: var(--xx-card-radius); background: linear-gradient(108deg, var(--xx-soft), var(--card) 70%); }
.work-identity { flex: 1 1 220px; min-width: 0; gap: 14px; }
#work-cover { flex: none; width: 60px; height: 60px; border-radius: 10px; object-fit: cover; background: var(--xx-soft); }
.work-heading { min-width: 0; }
.work-heading h1 { color: var(--brand); font-size: clamp(25px,2.2vw,34px); line-height: 1.2; letter-spacing: -.035em; overflow-wrap: anywhere; }
.work-meta { flex-wrap: wrap; gap: 2px 12px; margin-top: 5px; color: var(--xx-muted); font-size: 13px; overflow-wrap: anywhere; }
.work-meta .save-state { display: inline-flex; align-items: baseline; gap: 6px; }
.work-meta .save-state::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--xx-muted); }
.work-meta [data-state="saved"]::before { background: #327551; }
.work-meta [data-state="session"]::before { background: #9a5b24; }
.work-actions { flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.work-actions :is(a,button) { border-radius: var(--xx-control-radius); }
.editor-pane-switch { display: none; }
.editor-grid { display: grid; grid-template-columns: clamp(296px,28vw,366px) minmax(0,1fr); gap: clamp(14px,1.5vw,22px); align-items: start; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 17px; overflow: hidden; }
.panel-head { padding: 19px 22px 15px; border-bottom: 1px solid var(--line); }
.panel-head h2 { color: var(--brand); font-size: 18px; letter-spacing: -.02em; }
.panel-head small { color: var(--soft); font-size: 12px; }
.editor-page .panel { min-width: 0; border-color: var(--xx-line); border-radius: var(--xx-card-radius); }
.editor-page .panel-head { min-height: 60px; padding: 8px 18px; border-color: var(--xx-line); }
.editor-page .panel-head h2 { display: flex; gap: 8px; align-items: center; font-size: 17px; }
.editor-fields { display: grid; gap: 13px; padding: 15px 18px 18px; }
/* Dish prices are edited in both views of a single menu. */
.editor-field-label,.dish-fields label,.group-title label { display:grid; gap:4px; min-width:0; color:var(--brand); font-size:13px; font-weight:650; }
.featured-editor-card,.category-editor { display:grid; gap:12px; min-width:0; padding:12px; border:1px solid var(--line); border-radius:12px; background:var(--card); }
.featured-editor-card:focus-within,.category-editor:focus-within { border-color:var(--brand); }
.pick-heading,.group-title,.editor-art,.art-actions,.row-tools { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.pick-heading,.group-title { justify-content:space-between; }
.editor-art { gap:10px; }
.art-thumb { display:grid; place-items:center; flex:none; width:64px; height:52px; overflow:hidden; border-radius:6px; background:var(--brand-wash); color:var(--brand); }
.art-thumb img { width:100%; height:100%; object-fit:cover; }
.editor-art.logo .art-thumb { width:48px; height:48px; border:1px solid var(--line); background:white; }
.editor-art.logo img { padding:3px; object-fit:contain; }
.art-caption { display:block; color:var(--soft); font-size:12px; }
.art-actions { gap:8px; }
.art-upload,.art-reset { position:relative; display:inline-flex; min-height:34px; align-items:center; cursor:pointer; color:var(--brand); font:600 13px/1.3 var(--sans); text-decoration:underline; text-underline-offset:3px; }
.art-upload:focus-within { outline:2px solid var(--brand); outline-offset:2px; }
.editor-art[aria-busy=true] .art-thumb { opacity:.55; }
.interior-editor-photo { display:grid; grid-template-columns:minmax(60px,25%) minmax(0,1fr); gap:14px; border-bottom:1px solid var(--line); padding-bottom:12px; }
.interior-editor-photo .art-thumb { width:100%; height:auto; aspect-ratio:4/3; }
.interior-editor-options { display:grid; min-width:0; gap:3px; }
.interior-editor-options small { color:var(--soft); }
.interior-caption-field { display:grid; gap:4px; font-size:.85rem; }
#edit-interiors > .art-upload { justify-self:start; min-height:44px; }
.chef-enable { display:flex; align-items:center; gap:10px; min-height:44px; color:var(--brand); font-weight:650; cursor:pointer; }
.chef-enable input { width:20px; height:20px; flex:none; accent-color:var(--brand); }
#chef-settings { display:grid; min-width:0; gap:15px; }
#chef-settings[hidden] { display:none; }
.chef-portrait .art-thumb { width:72px; height:72px; border-radius:50%; }
.chef-portrait .art-upload { min-height:44px; }
.chef-presets { min-width:0; padding:0; margin:0; border:0; }
.chef-presets legend { margin-bottom:7px; color:var(--brand); font-size:14px; font-weight:650; }
.chef-avatar-list { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:5px; max-width:340px; }
.chef-avatar-option { position:relative; display:grid; justify-items:center; align-content:start; gap:4px; min-width:0; padding:5px 1px; color:var(--ink); cursor:pointer; font-size:12px; text-align:center; overflow-wrap:anywhere; }
.chef-avatar-option input { position:absolute; width:1px; height:1px; opacity:0; }
.chef-avatar-option img { width:min(54px,100%); height:auto; aspect-ratio:1; border-radius:50%; }
.chef-avatar-option:has(input:checked) img { outline:2px solid var(--brand); outline-offset:2px; }
.chef-avatar-option:has(input:checked) span { font-weight:700; }
.chef-avatar-option:has(input:checked) span::before { content:"✓ "; }
.chef-avatar-option:focus-within { outline:2px solid var(--focus); outline-offset:1px; border-radius:6px; }
.dish-fields .dish-description-field { grid-column:1 / -1; }
.dish-fields { display:grid; grid-template-columns:minmax(0,1fr) minmax(68px,.48fr); gap:8px; }
.dish-fields input,.group-title input,.category-editor select,.featured-editor-card select { width:100%; min-width:0; min-height:42px; border:1px solid var(--line); border-radius:6px; padding:6px 8px; background:var(--card); color:var(--ink); font:400 16px/1.35 var(--sans); }
.menu-control { display:inline-flex; justify-content:center; align-items:center; gap:5px; min-height:38px; padding:4px 8px; border-radius:5px; color:var(--brand); font:650 13px/1.25 var(--sans); }
.menu-control:hover,.art-reset:hover { background:var(--brand-wash); }
.menu-control[data-menu-action^="add-"] { justify-self:start; border:1px solid var(--line); padding-inline:12px; }
.menu-control:is([data-menu-action="remove-row"],[data-menu-action="remove-pick"],[data-menu-action="remove-group"]) { color:#765647; }
.group-title label { flex:1 1 7rem; }
.category-dish { display:grid; gap:3px; padding-top:12px; border-top:1px solid var(--line); }
.row-tools { gap:2px 5px; justify-content:flex-end; }
.row-move { display:flex; align-items:center; flex:1 1 7rem; gap:5px; min-width:0; font-size:12px; color:var(--soft); }
.row-move select { min-height:36px; width:auto; max-width:100%; }
@media (max-width:600px) {
  .menu-control,.art-upload,.art-reset { min-height:44px; }
  .dish-fields input,.group-title input,.category-editor select,.featured-editor-card select { min-height:44px; }
}
.field { display: grid; gap: 6px; }
.field label, .login-form label { font-size: 13px; font-weight: 700; }
.req { color: var(--brand); margin-left: 4px; }
.field input, .field textarea, .login-form input { width: 100%; display: block; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; font-size: 14px; line-height: 1.55; }
.field input::placeholder,.field textarea::placeholder,.login-form input::placeholder { color: var(--soft); opacity: 1; }
.field textarea { resize: vertical; min-height: 65px; }
.editor-fields :is(.field select,#proof-language) { width: 100%; min-width: 0; min-height: 48px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); font: 400 16px/1.4 var(--sans); }
.editor-fields :is(.field select,#proof-language):focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.field small { font-size: 11px; color: var(--soft); }
.editor-section { border-top: 1px solid var(--xx-line); }
.editor-section summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 46px; padding: 9px 18px; cursor: pointer; list-style: none; color: var(--brand); font-size: 14px; font-weight: 680; }
.editor-section summary::-webkit-details-marker { display: none; }
.editor-section summary:hover { background: var(--xx-soft); }
.editor-section summary:focus-visible { outline-offset: -3px; }
.editor-section[open] > summary svg { transform: rotate(90deg); }
.editor-section[open] > .editor-fields { padding-top: 0; }
.channel-settings > p, .channel-save small { color:var(--soft); font-size:13px; }
.channel-form { display:grid; gap:10px; min-width:0; padding-block:14px 4px; border-top:1px solid var(--xx-line); }
.channel-form h3 { margin:0; color:var(--brand); font-size:17px; }
.channel-plan,.channel-save { display:flex; align-items:center; flex-wrap:wrap; gap:4px 16px; }
.channel-plan { justify-content:space-between; }
.channel-choice,.channel-plan a { display:inline-flex; align-items:center; min-height:44px; color:var(--brand); font-size:14px; }
.channel-choice { gap:8px; font-weight:650; cursor:pointer; }
.channel-choice input { width:18px; height:18px; margin:0; accent-color:var(--brand); }
.channel-plan a { gap:4px; text-decoration:underline; text-underline-offset:3px; }
.channel-form .field input { min-height:44px; font-size:16px; }
.channel-form:has(input[value="external"]:checked) > .field { display:none; }
.channel-alternative { border-top:1px solid var(--xx-line); }
.channel-alternative > summary { min-height:44px; padding:4px 0; font-weight:500; }
.channel-alternative[open] > summary svg { transform:rotate(90deg); }
.channel-save { padding-top:2px; }
.style-body, .editor-brief { padding: 0 18px 16px; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.swatch { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 6px; border: 1px solid var(--line); font-size: 11px; }
.swatch i { display: block; height: 11px; width: 11px; border-radius: 50%; background: linear-gradient(135deg,var(--swatch) 50%,var(--edge) 50%); }
.swatch[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-wash); color: var(--brand); }
.upload-label { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; margin: 6px 7px 6px 0; padding: 7px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); font-size: 13px; font-weight: 600; }
.upload-label:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }
.upload-input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.editor-brief { color: var(--xx-muted); font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.preview-panel { position: sticky; top: 76px; }
.preview-bar, .preview-tools { flex-wrap: wrap; }
.preview-tools { gap: 5px 14px; margin-inline-start: auto; }
.preview-tools .device-switch button, .proof-expand, .editor-pane-switch button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.preview-tools .device-switch button { min-height: 36px; padding: 4px 10px; }
.proof-expand { min-height: 44px; color: var(--brand); font-size: 13px; font-weight: 650; }
.preview-stage { display: flex; justify-content: center; align-items: flex-start; padding: 20px; background-color: #e7e9df; background-image: radial-gradient(#becac1 .8px,transparent .8px); background-size: 9px 9px; min-height: 200px; }
.preview-stage iframe { display: block; width: 100%; max-width: 100%; height: clamp(430px,62vh,730px); border: 1px solid var(--line); background: white; box-shadow: 0 3px 12px rgba(7,63,57,.09); border-radius: 8px; }
.preview-stage.phone iframe { width: 360px; border: 4px solid var(--brand); border-radius: 18px; }
.preview-stage canvas { width: min(100%,385px); height: auto; display: block; box-shadow: 0 4px 15px rgba(7,63,57,.17); }
.listing-stage { border: 1px solid var(--line); border-radius: 15px; }
.listing-stage canvas { width: min(100%,520px); }
.listing-stage iframe { height: 72vh; }
.editor-page .preview-stage { padding: clamp(8px,1vw,14px); background: #e9eee7; }
.editor-page .preview-stage iframe { height: clamp(380px,calc(100dvh - 172px),780px); border-color: var(--xx-line); }
.editor-page .preview-stage.phone iframe { width: 390px; border-color: var(--brand); }
#dialog[open]:has(#editor-proof) { display: flex; flex-direction: column; width: min(1440px,calc(100% - 24px)); height: calc(100dvh - 24px); max-height: none; overflow: hidden; padding: 0; border-radius: var(--xx-card-radius); }
.proof-heading { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--xx-line); }
.proof-heading h2 { min-width: 0; margin: 0; font-size: 18px; overflow-wrap: anywhere; }
.proof-heading button { flex: none; }
#editor-proof { flex: 1; min-height: 0; display: grid; place-items: center; background: #e9eee7; }
#editor-proof iframe { display: block; width: 100%; height: 100%; border: 0; background: var(--card); }
#editor-proof canvas { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; padding: 8px; }
#editor-proof p { padding: 16px; }
.poster-proof { display:grid; place-items:center; min-width:0; width:100%; aspect-ratio:1.75; overflow:hidden; container-type:size; background-color:#e5e1ce; color:var(--brand); }
.poster-proof[data-cuisine-style="ramen"] { background:repeating-linear-gradient(90deg,#cec1aa 0 27px,#c4b49c 27px 28px); }
.poster-proof[data-cuisine-style="coffee"] { background:#d7dec8; }
.poster-proof[data-cuisine-style="tomato"] { background:#e7cdb7; }
.poster-proof canvas { display:block; height:88cqh; width:auto; box-shadow:1px 3px 9px #211e1a35; }
.poster-proof > span { font:500 1.25rem/1.2 var(--serif); }
.work-meta #poster-store-name:empty { display: none; }
.published-collection .section-heading { flex-wrap:wrap; }
.published-collection .section-heading > .text-button { min-height:44px; display:inline-flex; align-items:center; gap:5px; }
.market-work { position:relative; isolation:isolate; display:flex; flex-direction:column; min-width:0; overflow:hidden; overflow-wrap:anywhere; border:1px solid var(--line); border-radius:16px; background:var(--card); color:var(--brand); }
.market-work:hover, .market-work:focus-within { border-color:var(--brand); }
.market-work:has(.published-title:focus-visible) { outline:3px solid var(--focus); outline-offset:3px; }
.market-work :is(.published-cover,.poster-proof) { width:100%; aspect-ratio:1.95; border-bottom:1px solid var(--line); }
.published-cover { display:grid; place-items:center; background:var(--brand); color:var(--card); font:30px/1.2 var(--serif); }
.published-cover img { width:100%; height:100%; min-height:0; object-fit:cover; }
.published-info { flex:1; padding:16px 18px 12px; }
.published-meta, .published-meta span, .published-actions, .published-actions span { display:flex; align-items:center; gap:6px; }
.published-meta { flex-wrap:wrap; justify-content:space-between; font-size:12px; color:var(--soft); }
.published-meta span { font-weight:650; color:var(--brand); }
.published-info h2 { margin:6px 0 0; font-size:clamp(20px,2vw,28px); line-height:1.27; }
.published-title::after { content:""; position:absolute; inset:0; }
.published-info p { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; margin:5px 0 0; color:var(--soft); font-size:14px; }
.published-actions { justify-content:space-between; flex-wrap:wrap; min-height:48px; gap:0 12px; margin-inline:18px; border-top:1px solid var(--line); font-size:14px; font-weight:650; }
.published-manage { display:flex; flex-wrap:wrap; align-items:center; gap:0 12px; margin-inline-start:auto; }
.published-edit, .published-unpublish { position:relative; display:inline-flex; align-items:center; justify-content:center; min-height:44px; min-width:44px; padding-inline:4px; color:var(--soft); }
.published-unpublish { color:#87493d; }
.published-manage :is(a,button):is(:hover,:focus-visible) { color:var(--brand); text-decoration:underline; text-underline-offset:3px; }
@media (min-width:760px) {
  #published-list:has(> .market-work:nth-child(2):last-child) { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
.market-public-url { overflow-wrap:anywhere; text-decoration:underline; }
#market-publish-form .market-review-option { display:flex; align-items:flex-start; gap:8px; font-weight:400; }
#market-publish-form .market-review-option input { width:auto; min-height:0; margin-top:4px; }
#edition-preview :is(iframe,canvas) { display:block; width:100%; height:auto; border:0; }
#dialog:has(#market-publish-form) { width: min(840px,calc(100% - 24px)); }
#edition-preview { margin-top: 12px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
#edition-preview iframe { height: clamp(240px,49dvh,620px); }
#edition-preview canvas { max-height: 49dvh; object-fit: contain; }
#market-store { width:100%; min-height:44px; padding:8px; border:1px solid var(--line); border-radius:8px; background:var(--card); }
dialog { width: min(430px,calc(100% - 32px)); max-height: calc(100vh - 42px); overflow: auto; padding: 27px; color: var(--ink); border: 1px solid var(--line); border-radius: 20px; background: var(--card); box-shadow: 0 24px 90px #0b272438; }
dialog::backdrop { background: #102e2869; }
.dialog-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.dialog-icon { width: 42px; height: 42px; display: grid; place-items: center; background: var(--leaf); color: var(--brand); border-radius: 13px; }
.dialog-icon:has(.xx-mascot) { background: transparent; }
.close-modal { display: grid; place-items: center; height: 34px; width: 34px; border-radius: 50%; color: var(--soft); }
.close-modal:hover { background: var(--brand-wash); }
dialog h2 { color: var(--brand); font-size: 22px; line-height: 1.3; }
#auth-dialog { width:min(400px,calc(100% - 24px)); max-height:calc(100dvh - 24px); padding:clamp(18px,4vw,28px); background:#fff; overscroll-behavior:contain; }
.auth-heading { display:flex; align-items:center; gap:12px; margin-bottom:20px; }
.auth-heading h2 { flex:1; font-size:20px; }
.auth-heading .close-modal { flex:none; width:44px; height:44px; margin-inline-end:-6px; font-size:25px; }
#auth-methods, #auth-dialog .login-form { display:grid; gap:10px; }
.auth-rights { margin-bottom:4px; padding:12px 14px; border-radius:10px; background:var(--brand-wash); }
.auth-rights h3 { margin:0 0 6px; color:var(--brand); font-size:15px; line-height:1.4; }
.auth-rights ul { display:grid; gap:4px; margin:0; padding-inline-start:1.2em; color:var(--ink); font-size:14px; line-height:1.5; }
.auth-rights li::marker { color:var(--brand); }
#auth-dialog .primary, #auth-dialog .secondary { min-height:46px; border-radius:10px; }
#auth-dialog .login-form p, #auth-dialog #auth-status { margin:0; overflow-wrap:anywhere; }
#auth-sent-to { margin:0 0 10px; color:var(--ink); overflow-wrap:anywhere; }
#auth-confirm-help { margin:0 0 8px; }
#auth-dialog #auth-status:not(:empty) { margin-top:12px; }
#auth-dialog .text-button { min-height:44px; justify-self:start; }
.auth-options { display:flex; flex-wrap:wrap; align-items:center; gap:0 16px; }
.auth-options .text-button { margin-top:4px; text-align:start; }
#auth-dialog #auth-back { margin-top:4px; }
dialog p { color: var(--soft); margin: 9px 0 16px; font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; }
.login-form { display: grid; gap: 7px; }
.dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.share-feedback { margin-top:10px; color:var(--brand); text-align:center; font-size:14px; overflow-wrap:anywhere; }
.share-feedback input { display:block; width:100%; max-width:38rem; min-width:0; margin:6px auto; padding:9px; border:1px solid var(--line); border-radius:6px; font:16px/1.4 var(--font-ui); color:var(--brand); background:var(--card); }
.share-feedback[hidden],.share-feedback input[hidden] { display:none; }
.dialog-meta { padding: 12px; background: var(--paper); border-radius: 10px; display: grid; gap: 3px; overflow-wrap: anywhere; }
.dialog-meta small { color: var(--soft); }
.toast { position: fixed; z-index: 9; bottom: 22px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 30px); border-radius: 11px; background: var(--brand); color: var(--card); font-size: 13px; padding: 11px 18px; box-shadow: 0 6px 16px #073f3924; pointer-events: none; }
.toast:empty { display: none; }

@media (max-width: 1050px) {
  .hero-copy { width: min(650px,70%); }
  .preview-bar { gap: 6px 10px; }
  .card-grid { gap: 15px; }
  .card-bottom { padding-inline: 14px; }
}

@media (max-width: 900px) {
  :root { --gutter: 14px; }
  html { scroll-padding-top: 16px; scroll-padding-bottom: 100px; }
  body { padding-bottom: calc(84px + env(safe-area-inset-bottom,0px)); }
  #main-nav {
    position: fixed; top: auto; bottom: calc(12px + env(safe-area-inset-bottom,0px)); inset-inline: 14px;
    display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 4px; padding: 5px;
    background: rgba(255,255,255,.96); border: 1px solid #fffc; border-radius: 24px; box-shadow: 0 8px 30px #073f3929;
  }
  #main-nav a { flex-direction: column; gap: 3px; min-height: 54px; padding: 5px; border-radius: 19px; }
  #main-nav a b { font-size: 11px; line-height: 1.3; }
  .topbar { padding: 14px 20px; }
  body[data-view="home"] .topbar { padding: 20px; }
  .hero { border-radius: 20px; min-height: 0; }
  .hero-art { object-position: 69% 46%; }
  .hero::before {
    background: linear-gradient(0deg,var(--hero-green) 0%,#183b30ed 35%,#183b3040 76%,#183b3015),
                linear-gradient(90deg,#183b3080,transparent 75%);
  }
  .hero-copy { width: min(100%,690px); padding: clamp(165px,24vw,220px) 28px 30px; }
  .hero h1 { font-size: clamp(34px,5vw,47px); letter-spacing: -1px; }
  body[data-view="edit"] { padding-bottom: env(safe-area-inset-bottom,0px); }
  body[data-view="edit"] #main-nav { position: static; margin: 0; padding: 4px var(--gutter); border: 0; border-bottom: 1px solid var(--xx-line); border-radius: 0; background: var(--card); box-shadow: none; }
  body[data-view="edit"] #main-nav a { flex-direction: row; gap: 5px; min-height: 44px; border-radius: 7px; }
  [data-view="edit"] .site-shell { margin-top: 0; }
  [data-view="edit"] .topbar { display: flex; position: relative; z-index: 6; gap: 8px; min-height: 54px; padding: 4px 0; border: 0; border-bottom: 1px solid var(--xx-line); border-radius: 0; }
  [data-view="edit"] .studio-top-actions { display: flex; flex-wrap: nowrap; align-items: center; gap: 4px; }
  [data-view="edit"] .topbar .locale-choice select { border-color: transparent; background: transparent; }
  [data-view="edit"] .editor-page { margin-top: 0; }
  #editor-navigation { position: relative; }
  #editor-navigation > summary { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 8px; list-style: none; cursor: pointer; }
  #editor-navigation > summary::-webkit-details-marker { display: none; }
  #editor-navigation[open] > summary, #editor-navigation > summary:hover { background: var(--xx-soft); }
  .editor-nav-panel { position: absolute; inset-block-start: calc(100% + 4px); inset-inline-end: 0; width: min(250px,calc(100vw - 2 * var(--gutter))); max-height: calc(100dvh - 64px); overflow: auto; padding: 6px; border: 1px solid var(--xx-line); border-radius: 12px; background: var(--card); box-shadow: 0 8px 24px #12382d1a; }
  #editor-navigation #main-nav { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 0; border: 0; }
  #editor-navigation #main-nav a { justify-content: flex-start; gap: 10px; padding-inline: 12px; }
  #editor-navigation #main-nav b { font-size: 14px; text-align: start; }
  #editor-navigation #studio-utilities { display: grid; }
  #editor-navigation .return-house, #editor-navigation .auth-slot { padding: 6px 12px; border-top: 1px solid var(--xx-line); }
  #editor-navigation .return-house, #editor-navigation .auth-button { min-height: 44px; }
  #editor-navigation .auth-slot { grid-area: auto; justify-self: stretch; flex-wrap: wrap; }
  #editor-navigation .auth-name { display: block; flex: 1; max-width: none; }
  #editor-navigation .return-house { grid-area: auto; justify-self: stretch; }
  .editor-grid { display: block; scroll-margin-top: 62px; }
  .editor-page[data-pane="preview"] .form-panel, .editor-page[data-pane="details"] .preview-panel { display: none; }
  .editor-pane-switch { position: sticky; z-index: 4; top: 0; display: flex; gap: 4px; margin: 0 0 10px; padding: 4px; background: var(--card); border: 1px solid var(--xx-line); border-radius: 10px; }
  .pane-choices { display: flex; flex: 1; gap: 4px; min-width: 0; }
  .pane-choices button { flex: 1; min-width: 0; min-height: 44px; padding: 5px 8px; border-radius: 7px; color: var(--brand); font-size: 14px; font-weight: 650; }
  .editor-pane-switch .pane-expand { display: none; }
  .editor-pane-switch [aria-pressed="true"] { color: var(--card); background: var(--brand); }
  .preview-panel { position: static; }
  .editor-page .preview-stage iframe { height: clamp(360px,66dvh,660px); }
  .toast { bottom: calc(88px + env(safe-area-inset-bottom,0px)); }
  body[data-view="edit"] .toast { bottom: calc(12px + env(safe-area-inset-bottom,0px)); }
}

@media (max-width: 760px) {
  .card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .mini-type strong { font-size: 30px; }
  .print-type strong { font-size: 32px; }
  .work-header { gap: 12px; }
  .work-actions { justify-content: flex-start; }
  .preview-stage { padding: 12px; }
  .editor-page .preview-bar { gap: 6px; }
  .preview-stage iframe { height: 510px; }
}

@media (max-width: 620px) {
  .main-wrap { padding-bottom: 24px; }
  .topbar { padding: 12px 16px; border-radius: 16px; }
  body[data-view="home"] .topbar { padding: 16px; }
  .brand { min-height: 44px; }
  .account-button { max-width: 46%; min-height: 42px; padding: 8px 12px; font-size: 12px; }
  .hero-copy { padding: clamp(150px,40vw,205px) 20px 24px; }
  .hero h1 { font-size: clamp(30px,7.4vw,42px); line-height: 1.35; }
  .hero-copy > p { margin-top: 11px; font-size: 14px; line-height: 1.65; }
  .composer { margin-top: 16px; padding: 10px; }
  .composer textarea { height: 48px; font-size: 13px; }
  .composer-bar { gap: 5px; }
  .composer-bar .segments button { gap: 3px; padding-inline: 6px; font-size: 11px; }
  .create-button { gap: 5px; min-height: 36px; padding: 7px 11px; font-size: 12px; }
  .gallery { margin-top: 25px; }
  .section-heading { align-items: flex-start; gap: 8px; margin-bottom: 14px; }
  .section-heading h2 { font-size: 24px; }
  .section-heading p { font-size: 13px; margin-top: 4px; }
  .catalog-filter { flex-shrink: 0; }
  .catalog-filter button { min-width: 30px; padding: 5px 7px; }
  .card-grid { gap: 12px; }
  .mat { aspect-ratio: 1.66; }
  .card-bottom { padding: 10px; gap: 6px; }
  .card-text strong { font-size: 15px; }
  .card-text small { font-size: 11px; }
  .card-arrow { width: 26px; height: 26px; }
  .mini-type { gap: 3px; }
  .mini-type strong { font-size: clamp(18px,4.1vw,27px); }
  .print-type strong { font-size: clamp(20px,4.5vw,31px); margin-top: 1px; }
  .collection,.listing,.editor-page { margin-top: 17px; }
  .work-context { margin-bottom: 4px; gap: 0 8px; }
  .work-path { gap: 4px; font-size: 12px; }
  .companion-action { gap: 5px; font-size: 13px; }
  .work-header { display: grid; grid-template-columns: minmax(0,1fr); padding: 12px; margin-bottom: 10px; }
  .work-identity { gap: 10px; }
  #work-cover { width: 48px; height: 48px; }
  .work-actions { display: grid; grid-template-columns: minmax(0,1fr); }
  .work-actions :is(a,button) { min-height: 46px; gap: 7px; padding: 8px 10px; }
  .editor-page .panel-head { display: none; }
  .editor-page[data-pane="preview"] .pane-expand { display: inline-flex; min-width: 44px; min-height: 44px; padding: 4px 8px; border-inline-start: 1px solid var(--xx-line); color: var(--brand); font-size: 13px; font-weight: 650; }
  .editor-page .preview-stage { padding: 0; }
  .editor-page .preview-stage iframe, .editor-page .preview-stage.phone iframe { width: 100%; border: 0; border-radius: 0; }
  .editor-page .preview-stage canvas { margin-block: 8px; max-width: calc(100% - 16px); }
  #dialog[open]:has(#editor-proof) { width: 100%; height: 100dvh; max-width: none; border: 0; border-radius: 0; }
  .proof-heading { padding: 6px 10px; }
  .collection .section-heading { margin-bottom: 18px; }
  .collection .section-heading > a { flex-shrink: 0; }
  .editor-head { align-items: flex-start; flex-direction: column; gap: 12px; margin-top: 12px; }
  .editor-head h1,.collection h1 { font-size: 26px; }
  .editor-head .actions { align-self: stretch; justify-content: flex-start; flex-wrap: wrap; }
  .empty-state { padding: 44px 18px; }
  .empty-state p { font-size: 13px; }
}

@media (max-width: 425px) {
  html:not(:lang(zh)) .pane-expand span { display:none; }
  .pane-choices button { overflow-wrap:anywhere; }
  .gallery .section-heading { flex-wrap: wrap; }
  .gallery .section-heading > div:first-child { flex: 1 1 180px; }
  .card-grid { grid-template-columns: 1fr; }
  .mat { aspect-ratio: 2.03; }
  .mini-type strong { font-size: 33px; }
  .print-type strong { font-size: 35px; }
  .mini-nav b { font-size: 8px; }
  .mini-nav span,.mini-type small,.print-foot { font-size: 7px; }
  .card-bottom { padding: 12px 14px; }
  .card-text strong { font-size: 16px; }
}

@media (max-width: 360px) {
  html:not(:lang(zh)) .work-actions [data-save-work] svg { display: none; }
  .pane-expand span { display: none; }
  :root { --gutter: 10px; }
  body[data-view="home"] .topbar { padding: 13px; }
  .hero-copy { padding-inline: 15px; }
  .wordmark { font-size: 10px; letter-spacing: 1.5px; }
  .composer-bar .kinds svg { display: none; }
}

@media (max-width: 900px) and (pointer: coarse) {
  body:not([data-view="edit"]):has(main textarea:focus, main input:not([type="file"]):focus) #main-nav { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* Xiaoxiong shared UI v1 — source: Global design/ui-tokens.json */
:root{
  --xx-paper:#f6f4ee;
  --xx-surface:#fffefa;
  --xx-ink:#202720;
  --xx-muted:#5d665e;
  --xx-line:#d8dbd1;
  --xx-primary:#344e3b;
  --xx-hover:#263e2d;
  --xx-soft:#e5ebdf;
  --xx-focus:#8a4f37;
  --xx-control-height:48px;
  --xx-control-radius:8px;
  --xx-card-radius:12px;
}

:root{--brand:var(--xx-primary);--brand-hover:var(--xx-hover);--brand-wash:var(--xx-soft);--paper:var(--xx-paper);--card:var(--xx-surface);--focus:var(--xx-focus)}
.composer-bar,.studio-panel,.prompt-dialog,.poster-studio{font-family:var(--sans);font-size:16px}
.composer-bar .create-button,.account-button,.studio-panel .primary,.studio-panel .secondary{min-height:48px;line-height:1.5;border-radius:999px;font-size:14px}
.field input,.field textarea,.login-form input{font-size:16px;border-radius:8px}
.field input,.login-form input{min-height:48px}
.studio-panel,.prompt-dialog{border-radius:12px}

/* The merchant's assistant shares the editor's mobile details pane and desktop palette. */
.ask-launcher {
  display: inline-flex; align-items: center; gap: 9px; min-height: 48px; max-width: 100%;
  padding: 6px 16px 6px 8px; border: 1px solid var(--xx-primary); border-radius: 999px;
  color: var(--xx-primary); background: #fff; font: 680 15px/1.35 var(--sans);
}
.ask-launcher .xx-mascot { --mascot-size: 32px; }
.ask-heading .xx-mascot { --mascot-size: 42px; }
.ask-launcher > svg { display: none; }
.ask-launcher:hover { background: var(--xx-soft); }
@media (min-width:901px) {
  .ask-entry { position: fixed; z-index: 10; right: max(22px,env(safe-area-inset-right)); bottom: max(22px,env(safe-area-inset-bottom)); }
  .ask-launcher { box-shadow: 0 4px 18px #17342636; }
}
@media (max-width:900px) {
  #template-ask { margin-bottom: 12px; }
  #edit-details .panel-head { display: flex; padding: 4px 14px; min-height: 54px; gap: 8px; }
  #edit-details .ask-launcher { width: auto; gap: 5px; min-height: 44px; padding: 5px 8px; border: 0; font-size: 14px; }
  #edit-details .ask-launcher .xx-mascot { --mascot-size: 26px; }
  #edit-details .ask-launcher > svg { display: none; }
  .ask-launcher { width: 100%; padding: 8px 12px; border-radius: 10px; border-color: var(--xx-line); color: var(--xx-primary); }
  .ask-launcher:hover { background: var(--leaf); }
  .ask-launcher > svg { display: block; margin-inline-start: auto; }
}
#ask-dialog {
  position: fixed; inset: auto max(22px,env(safe-area-inset-right)) max(22px,env(safe-area-inset-bottom)) auto;
  margin: 0; width: min(390px,calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 0;
  border: 1px solid var(--xx-line); border-radius: 16px; background: var(--xx-surface); color: var(--xx-ink);
}
#ask-dialog::backdrop { background: #152e242e; }
.ask-heading { display: flex; align-items: center; gap: 11px; padding: 15px 18px; color: var(--xx-primary); background: #fff; border-bottom: 1px solid var(--xx-line); }
.ask-heading > div { flex: 1; min-width: 0; }
.ask-heading h2 { color: inherit; font-size: 19px; }
.ask-heading p { margin: 2px 0 0; color: var(--xx-muted); font-size: 13px; }
.ask-heading .close-modal { flex: none; width: 44px; height: 44px; margin-inline-end: -6px; color: inherit; background: transparent; font-size: 25px; }
#ask-form { display: grid; gap: 8px; padding: 18px; }
#ask-form label { color: var(--xx-primary); font-weight: 650; }
#ask-command { width: 100%; min-width: 0; min-height: 48px; padding: 9px 12px; border: 1px solid var(--xx-line); border-radius: 8px; background: var(--xx-surface); font-size: 16px; }
#ask-command[aria-invalid="true"] { border-color: #9c462a; }
#ask-form button { justify-self: end; min-height: 44px; border-radius: 8px; }
#ask-form button:disabled { cursor: default; }
.ask-result { padding: 0 18px; }
#ask-reply { margin: 0 0 14px; padding: 10px 12px; border-radius: 8px; background: var(--xx-soft); color: var(--xx-primary); }
#ask-reply:empty { display: none; }
#ask-reply[data-state="error"] { background: #fbede5; color: #813b24; }
#ask-poster { gap: 6px; min-height: 44px; margin-bottom: 16px; border-radius: 8px; }
@media (max-width:900px) {
  #ask-dialog { inset: 0 0 var(--ask-bottom,0px); width: min(100%,440px); max-width: 100%; max-height: calc(var(--ask-height,100dvh) - 12px); margin: auto auto 0; padding-bottom: env(safe-area-inset-bottom); border-radius: 16px 16px 0 0; }
}
.assistant-app { display:flex; flex-direction:column; min-height:100vh; min-height:100svh; }
.assistant-footer { margin-top:auto; padding:4px var(--gutter) max(4px,env(safe-area-inset-bottom)); border-top:1px solid #d9e3dc; text-align:center; color:#466054; background:#fff; }
.global-home-link { display:inline-flex; align-items:center; justify-content:center; gap:4px; min-height:44px; padding:6px 10px; color:inherit; font-size:14px; font-weight:600; text-decoration:none; border-radius:8px; white-space:nowrap; }
.global-home-link:hover { text-decoration:underline; text-underline-offset:4px; }
.global-home-link:focus-visible { outline:2px solid var(--xx-focus, var(--focus)); outline-offset:3px; }
.studio-top-actions { flex-wrap:wrap; }
.copy-progress { display:flex; flex-wrap:wrap; align-items:center; gap:4px 12px; padding:2px 18px 12px; color:var(--muted,#53665c); font-size:.85rem; }
.copy-progress small:empty { display:none; }
#editor-languages .editor-fields { gap:8px; }
#proof-fields { display:grid; gap:12px; }
#proof-fields label { display:grid; gap:4px; font-size:.85rem; overflow-wrap:anywhere; }
#proof-fields textarea { min-height:2.75rem; }
.holiday-picker { display:flex; align-items:stretch; gap:.5rem; min-width:0; }
.holiday-picker select { flex:1; min-width:0; }
.holiday-picker img:not([hidden]) { display:block; order:-1; width:4.25rem; height:2.8rem; object-fit:cover; object-position:86% center; border-radius:7px; }

.works-tools { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.works-tools > * { min-height:44px; }
.library-extra { display:contents; }
.library-work .library-summary { order:1; }
.library-work .work-sync { order:2; }
.library-live-site { order:3; min-width:0; grid-template-columns:minmax(0,1fr); }
.library-site-publish { order:4; }
.library-more { display:none; order:5; }
.library-actions { order:6; }

#dialog:has(.site-analytics) {
  width:min(590px,calc(100% - 24px)); max-height:calc(100dvh - 24px);
  padding:clamp(16px,4vw,28px); overscroll-behavior:contain;
}
#dialog:has(.site-analytics) .dialog-top { float:inline-end; margin:0; }
#dialog:has(.site-analytics) .dialog-icon { display:none; }
#dialog:has(.site-analytics) .close-modal { width:44px; height:44px; }
#dialog:has(.site-analytics) > h2 { margin:0; min-height:44px; display:flex; align-items:center; }
.site-analytics { clear:both; }
.site-analytics .analytics-intro,.site-analytics .analytics-note { margin:6px 0 14px; color:var(--soft); font-size:.84rem; line-height:1.5; }
.analytics-controls { display:grid; grid-template-columns:minmax(0,1.4fr) minmax(0,1fr) minmax(0,1.05fr); gap:10px; margin-block:12px 16px; }
.analytics-controls label { min-width:0; display:grid; gap:4px; font-size:.82rem; font-weight:650; color:var(--brand); }
.analytics-controls :is(select,input) { width:100%; min-width:0; min-height:44px; padding:6px 8px; font:inherit; font-size:1rem; color:var(--ink); background:var(--card); border:1px solid var(--line); border-radius:8px; }
.site-analytics [role="status"] { color:var(--soft); }
.site-analytics [role="status"]:empty { display:none; }
.analytics-metrics { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.analytics-metrics > div { display:grid; align-content:start; gap:4px; border-radius:10px; padding:12px 14px; color:var(--brand); background:var(--brand-wash); }
.analytics-metrics > div:first-child { background:var(--brand); color:#fff; }
.analytics-metrics span { font-size:.82rem; line-height:1.4; }
.analytics-metrics strong { font-size:clamp(1.6rem,4vw,2rem); font-variant-numeric:tabular-nums; line-height:1.2; }
.analytics-heading { display:flex; align-items:baseline; gap:12px; justify-content:space-between; margin:20px 0 8px; }
.analytics-heading h3 { margin:0; font-size:1.05rem; }
.analytics-heading small { color:var(--soft); }
.daily-views { width:100%; border-collapse:collapse; table-layout:fixed; font-size:.88rem; font-variant-numeric:tabular-nums; }
.daily-views th,.daily-views td { padding:7px 4px; border-bottom:1px solid var(--line); text-align:start; }
.daily-views th:first-child { width:49%; }
.daily-views thead th { color:var(--soft); font-weight:600; }
.daily-views tbody th { font-weight:450; }
.daily-views td,.daily-views th:last-child { text-align:end; }
.daily-views td { position:relative; isolation:isolate; }
.daily-views .view-bar { position:absolute; z-index:-1; inset-inline-end:0; top:22%; height:56%; width:var(--amount); border-radius:3px; background:#d8e9dd; }
.analytics-refresh { min-height:44px; margin-top:2px; }

@media (max-width:620px) {
  .analytics-controls { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .analytics-controls > label:first-child { grid-column:1/-1; }
  .works-collection .section-heading { flex-direction:column; align-items:stretch; gap:12px; }
  .works-tools { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .works-tools > :only-child { grid-column:1/-1; }
  .works-collection .card-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; align-items:stretch; }
  .works-collection .card-grid:has(.library-more[aria-expanded="true"]) { align-items:start; }
  .works-collection .card-bottom { flex-direction:column; align-items:stretch; gap:5px; padding:9px 10px; }
  .works-collection .card-text strong { white-space:normal; overflow-wrap:anywhere; }
  .works-collection .card-text small { white-space:normal; line-height:1.35; }
  .works-collection .card-edit-action { font-size:.8rem; }
  .library-cover { aspect-ratio:1.65; }
  .library-cover > span { inset:auto auto 5px 6px; max-width:calc(100% - 12px); overflow:hidden; white-space:nowrap; text-overflow:ellipsis; padding:2px 5px; font-size:.68rem; }
  .library-work .work-sync { padding:0 10px 6px; font-size:.75rem; }
  .library-live-site { margin:0 10px 5px; gap:0; }
  .library-live-site a { width:100%; min-width:0; font-size:.76rem; gap:3px; line-height:1.3; }
  .library-live-site bdi { white-space:normal; overflow-wrap:anywhere; }
  .works-collection .library-site-publish { margin:auto 7px 4px; padding:6px; gap:4px; min-height:44px; font-size:.81rem; line-height:1.3; white-space:normal; }
  .library-more { display:flex; align-items:center; justify-content:space-between; gap:5px; min-height:44px; padding:7px 10px; border-top:1px solid var(--line); color:var(--brand); font-size:.8rem; text-align:start; }
  .library-more[aria-expanded="true"] svg { transform:rotate(180deg); }
  .library-extra { display:block; order:6; min-width:0; }
  .library-more[aria-expanded="false"] + .library-extra { display:none; }
  .library-summary { margin:0 10px 10px; padding-top:8px; font-size:.78rem; }
  .library-summary > div { display:block; }
  .library-dishes > div { flex-wrap:wrap; gap:0 4px; }
  .library-actions { flex-direction:column; }
  .library-actions button { justify-content:flex-start; padding:7px 10px; font-size:.8rem; border-radius:0; text-align:start; }
  .library-actions button svg { flex:none; }
  .library-actions .library-delete { border-inline:0; border-top:1px solid var(--line); border-radius:0 0 15px 15px; }
}
