: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: 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; }

/* 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; }
.topbar {
  --focus: var(--leaf);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 17px 28px; color: var(--card); background: var(--brand); border-radius: 18px;
}
body[data-view="home"] .topbar {
  position: absolute; z-index: 2; top: 0; inset-inline: var(--gutter);
  padding: 26px 40px; background: transparent;
}
.brand {
  display: inline-flex; align-items: center; gap: 9px; flex: none; min-height: 48px;
  padding: 7px 13px 7px 9px; background: var(--leaf); color: var(--hero-green); border-radius: 12px;
}
.brand img { display: block; object-fit: contain; width: 36px; height: 38px; }
.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,.preview-controls { 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; }
.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); }

/* 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; }
.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; }
.editor-head .save-state { font-size: 12px; }
.editor-grid { display: grid; grid-template-columns: minmax(270px,.72fr) minmax(0,1.6fr); gap: 22px; align-items: start; }
.editor-grid.from-restaurant { grid-template-areas: "details preview"; }
.from-restaurant .form-panel { grid-area: details; }
.from-restaurant .preview-panel { grid-area: preview; }
.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; }
#details-form { padding: 17px 21px 20px; display: grid; gap: 14px; }
.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; }
.field small { font-size: 11px; color: var(--soft); }
.style-details, .brief-note { border-top: 1px solid var(--line); }
.style-details summary, .brief-note summary { cursor: pointer; padding: 14px 21px; font-size: 13px; font-weight: 680; }
.style-details summary { list-style: none; display: flex; align-items: center; justify-content: space-between; }
.style-details summary::-webkit-details-marker { display: none; }
.style-details[open] summary svg { transform: rotate(90deg); }
.style-body { padding: 0 21px 17px; }
.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; }
.brief-note p { padding: 0 21px 16px; font-size: 13px; color: var(--soft); white-space: pre-wrap; overflow-wrap: anywhere; }
.preview-panel { position: sticky; top: 81px; }
.preview-controls { padding: 12px 17px; }
.device-switch button { padding: 5px; }
.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; }
.mobile-preview,.mobile-edit { display: none; }
.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); }
.market-work:has(.poster-proof) { padding:0 0 16px; overflow:hidden; }
.market-work:has(.poster-proof) :is(strong,small) { padding-inline:16px; }
#poster-store-name { display:block; margin-top:5px; color:var(--soft); }
.market-work { display:grid; align-content:start; gap:10px; padding:20px; border-radius:14px; border:1px solid var(--line); background:var(--card); color:var(--brand); overflow-wrap:anywhere; }
.market-work:hover { border-color:var(--brand); }
.market-work small { color:var(--soft); }
.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; }
.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; }
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; }
.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%); }
  .editor-grid { gap: 16px; grid-template-columns: minmax(255px,.76fr) minmax(0,1.4fr); }
  .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,253,248,.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; }
  .preview-panel { top: 16px; }
  .toast { bottom: calc(88px + 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; }
  .editor-grid { grid-template-columns: minmax(0,1fr); }
  .preview-panel { position: static; }
  .mobile-preview { display: inline-flex; }
  .editor-grid.from-restaurant { grid-template-areas: "preview" "details"; }
  .from-restaurant .mobile-edit { display: inline-flex; }
  .from-restaurant .preview-panel .panel-head small { display: none; }
  .preview-stage { padding: 12px; }
  .preview-controls { gap: 7px; padding: 11px 14px; }
  .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; }
  .brand img { width: 30px; height: 32px; }
  .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; }
  .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) {
  .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) {
  :root { --gutter: 10px; }
  body[data-view="home"] .topbar { padding: 13px; }
  .hero-copy { padding-inline: 15px; }
  .brand { gap: 6px; padding-inline: 8px; }
  .wordmark { font-size: 10px; letter-spacing: 1.5px; }
  .composer-bar .kinds svg { display: none; }
  .preview-controls .kinds button { padding-inline: 6px; }
}

@media (max-width: 900px) and (pointer: coarse) {
  body: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; }
}
