@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@500;600;700;800&family=Noto+Sans+SC:wght@400;500;600;700;800;900&display=swap');

:root {
  --paper: #fff9f3;
  --surface: #fffefa;
  --ink: #20322e;
  --muted: #7c8984;
  --coral: #ff715e;
  --coral-dark: #ed594a;
  --coral-soft: #fff0e9;
  --mint: #dff3e7;
  --mint-dark: #2f7c67;
  --gold: #ffc95b;
  --line: rgba(32, 50, 46, .09);
  --shadow: 0 18px 45px rgba(65, 45, 36, .10);
  --shadow-soft: 0 10px 28px rgba(65, 45, 36, .07);
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
  font-family: "DM Sans", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--paper); color: var(--ink); }
body.modal-open { overflow: hidden; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.ambient { position: fixed; pointer-events: none; filter: blur(2px); opacity: .65; z-index: -1; border-radius: 999px; }
.ambient-one { width: 280px; height: 280px; top: -140px; right: -130px; background: #ffd9cc; }
.ambient-two { width: 230px; height: 230px; top: 38vh; left: -180px; background: #d7eee6; }
.app-shell { width: min(100%, 760px); min-height: 100vh; margin: 0 auto; padding: 0 18px calc(112px + env(safe-area-inset-bottom)); position: relative; }
.topbar { height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand-lockup { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 48px; height: 48px; display: grid; place-items: center; position: relative; border-radius: 17px 17px 21px 21px; color: white; background: linear-gradient(145deg, #ff9782, var(--coral)); box-shadow: 0 8px 18px rgba(255, 113, 94, .27); transform: rotate(-2deg); }
.brand-face { font-weight: 900; letter-spacing: 1px; font-size: 14px; transform: translateY(3px); }
.brand-steam { position: absolute; color: var(--gold); font-size: 24px; font-weight: 900; top: -16px; left: 19px; transform: rotate(88deg); }
.eyebrow { margin: 0 0 1px; color: var(--muted); letter-spacing: .16em; font-size: 10px; font-weight: 800; }
.topbar h1 { margin: 0; font-size: 19px; font-weight: 900; letter-spacing: -.03em; }
.avatar-button { width: 45px; height: 45px; border: 3px solid white; border-radius: 50%; display: grid; place-items: center; position: relative; background: linear-gradient(145deg, #dff3e7, #baddcf); color: var(--mint-dark); box-shadow: 0 7px 17px rgba(43, 93, 77, .13); font-weight: 900; font-size: 17px; }
.online-dot { width: 11px; height: 11px; border: 2px solid white; border-radius: 50%; background: #46b478; position: absolute; right: -1px; bottom: 1px; }

.page { display: none; animation: page-in .36s ease both; }
.page.is-active { display: block; }
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.hero-card { min-height: 272px; position: relative; border-radius: var(--radius-xl); overflow: hidden; padding: 27px 22px; background: linear-gradient(135deg, #243b35 0%, #38584e 100%); box-shadow: 0 20px 42px rgba(32, 50, 46, .18); color: white; }
.hero-card::before { content: ""; position: absolute; width: 260px; height: 260px; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; right: -90px; top: -80px; box-shadow: 0 0 0 35px rgba(255,255,255,.026), 0 0 0 70px rgba(255,255,255,.018); }
.hero-copy { position: relative; z-index: 2; width: 68%; }
.soft-pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 6px 11px; background: rgba(255,255,255,.12); color: #ffe0b4; font-size: 11px; font-weight: 800; letter-spacing: .06em; backdrop-filter: blur(8px); }
.hero-card h2 { margin: 15px 0 8px; font-size: clamp(25px, 7.3vw, 35px); line-height: 1.24; letter-spacing: -.045em; font-weight: 900; }
.hero-card h2 em { color: #ffca68; font-style: normal; }
.hero-card p { margin: 0 0 18px; color: rgba(255,255,255,.66); font-size: 12px; line-height: 1.7; }
.primary-button { border: 0; border-radius: 16px; background: linear-gradient(135deg, #ff806d, #ff6654); color: white; padding: 15px 18px; font-weight: 800; box-shadow: 0 10px 22px rgba(255, 103, 84, .28); transition: .2s ease; }
.primary-button:active { transform: scale(.98); }
.primary-button:disabled { opacity: .58; cursor: wait; }
.primary-button.full { width: 100%; }
.hero-action { padding: 11px 13px; border-radius: 12px; font-size: 11px; box-shadow: none; }
.hero-action span { font-size: 16px; margin-right: 4px; }
.hero-visual { position: absolute; width: 155px; height: 185px; right: -17px; bottom: -4px; z-index: 1; }
.plate { position: absolute; width: 138px; height: 138px; right: 0; bottom: 7px; border-radius: 50%; background: radial-gradient(circle, #fffdf6 0 51%, #eadfd3 52% 60%, #f7eee7 61%); box-shadow: 0 16px 26px rgba(0,0,0,.18); transform: rotate(-13deg); }
.food { position: absolute; filter: drop-shadow(0 6px 5px rgba(0,0,0,.14)); }
.food-a { left: 29px; top: 30px; font-size: 42px; transform: rotate(12deg); }
.food-b { left: 69px; top: 66px; font-size: 39px; transform: rotate(-10deg); }
.food-c { left: 34px; top: 73px; font-size: 42px; }
.spark { position: absolute; color: var(--gold); }
.spark-a { right: 13px; top: 17px; font-size: 20px; }
.spark-b { left: 9px; top: 42px; font-size: 8px; }

.mini-stats { margin: 14px 4px 28px; min-height: 72px; display: flex; align-items: center; justify-content: space-around; border-radius: 20px; background: rgba(255,255,255,.72); border: 1px solid rgba(255,255,255,.9); box-shadow: var(--shadow-soft); backdrop-filter: blur(14px); }
.mini-stats > div:not(.stat-divider) { flex: 1; text-align: center; display: grid; gap: 2px; }
.mini-stats b { color: var(--ink); font-size: 18px; }
.mini-stats span { color: var(--muted); font-size: 9px; }
.stat-divider { width: 1px; height: 30px; background: var(--line); flex: 0 !important; }
.section-block { padding-bottom: 16px; }
.section-heading, .page-title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 15px; margin: 0 2px 16px; }
.section-kicker { color: var(--coral); font-size: 9px; letter-spacing: .2em; font-weight: 900; }
.section-heading h2, .page-title-row h2 { margin: 3px 0 0; font-size: 23px; letter-spacing: -.04em; font-weight: 900; }
.text-button { border: 0; background: transparent; color: var(--muted); font-size: 11px; font-weight: 700; padding: 10px 0; }
.category-scroller { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -18px 17px; padding: 0 18px; }
.category-scroller::-webkit-scrollbar { display: none; }
.category-chip { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.78); padding: 9px 14px; color: #78847f; font-size: 11px; font-weight: 700; }
.category-chip.is-active { border-color: var(--ink); color: white; background: var(--ink); box-shadow: 0 7px 16px rgba(32,50,46,.18); }
.dish-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.dish-card { min-width: 0; border-radius: 22px; background: rgba(255,255,255,.9); overflow: hidden; box-shadow: var(--shadow-soft); border: 1px solid rgba(255,255,255,.9); animation: card-in .42s ease both; }
@keyframes card-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.dish-image { width: 100%; aspect-ratio: 1.12; position: relative; overflow: hidden; background: linear-gradient(145deg, #ffe8d5, #ffd2c5); border: 0; display: grid; place-items: center; padding: 0; }
.dish-image:nth-child(2n) { background: linear-gradient(145deg, #e9f6e9, #cfe9dc); }
.dish-image img { width: 100%; height: 100%; display: block; object-fit: cover; }
.dish-placeholder { font-size: 49px; filter: drop-shadow(0 8px 7px rgba(68,55,44,.14)); transform: rotate(-4deg); }
.dish-calorie { position: absolute; left: 9px; top: 9px; padding: 5px 8px; border-radius: 999px; background: rgba(255,255,255,.88); color: var(--ink); font-size: 8px; font-weight: 900; box-shadow: 0 3px 10px rgba(0,0,0,.08); backdrop-filter: blur(5px); }
.dish-info { padding: 11px 11px 12px; }
.dish-info h3 { margin: 0 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; letter-spacing: -.02em; }
.dish-info p { margin: 0 0 11px; height: 30px; overflow: hidden; color: var(--muted); font-size: 9px; line-height: 1.6; }
.dish-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.dish-author { min-width: 0; color: #9ca6a2; font-size: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.add-dish { width: 30px; height: 30px; flex: 0 0 30px; border: 0; border-radius: 11px; background: var(--coral-soft); color: var(--coral); font-size: 19px; line-height: 1; font-weight: 600; }
.add-dish.is-added { color: white; background: var(--coral); }
.skeleton-card { height: 245px; border-radius: 22px; background: linear-gradient(110deg, #f3ece5 8%, #fffaf5 18%, #f3ece5 33%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position-x: -200%; } }
.empty-state { grid-column: 1/-1; text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-state span { display: block; font-size: 50px; margin-bottom: 12px; }
.empty-state h3 { color: var(--ink); margin: 0 0 6px; }

.page-title-row { align-items: flex-start; margin: 8px 2px 24px; }
.page-title-row p { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.title-doodle { width: 47px; height: 47px; flex: 0 0 47px; display: grid; place-items: center; border-radius: 17px; color: var(--coral); background: var(--coral-soft); font-size: 24px; transform: rotate(5deg); }
.stack-form { display: grid; gap: 14px; }
.form-card { padding: 20px 17px; border-radius: var(--radius-lg); background: rgba(255,255,255,.9); border: 1px solid rgba(255,255,255,.95); box-shadow: var(--shadow-soft); }
.form-card-title { display: flex; align-items: center; gap: 11px; margin-bottom: 18px; }
.form-card-title > span { width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; background: var(--ink); color: white; font-size: 10px; font-weight: 900; }
.form-card-title h3 { font-size: 15px; margin: 0 0 2px; font-weight: 900; }
.form-card-title p { color: var(--muted); margin: 0; font-size: 9px; }
.field-label { display: grid; gap: 8px; color: #52625d; font-size: 11px; font-weight: 800; margin-top: 14px; }
.field-label input, .field-label textarea, .field-label select { width: 100%; border: 1px solid var(--line); outline: 0; border-radius: 14px; background: #faf8f4; padding: 13px 14px; color: var(--ink); font-size: 13px; font-weight: 600; transition: .18s ease; }
.field-label textarea { min-height: 94px; resize: vertical; line-height: 1.65; }
.field-label input:focus, .field-label textarea:focus, .field-label select:focus { border-color: rgba(255,113,94,.55); background: white; box-shadow: 0 0 0 4px rgba(255,113,94,.08); }
.cover-card { padding-bottom: 17px; }
.cover-uploader { min-height: 190px; border: 1.5px dashed rgba(255,113,94,.35); border-radius: 19px; position: relative; display: grid; place-items: center; overflow: hidden; background: linear-gradient(145deg, #fff9f5, #fff2ea); }
.cover-uploader img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.camera-button { border: 0; background: transparent; display: grid; justify-items: center; gap: 5px; color: var(--ink); }
.camera-icon { width: 53px; height: 53px; display: grid; place-items: center; border-radius: 18px; background: var(--coral); color: white; font-size: 27px; box-shadow: 0 10px 22px rgba(255,113,94,.27); }
.camera-button b { font-size: 13px; }
.camera-button small { color: var(--muted); font-size: 9px; }
.replace-photo { position: absolute; right: 10px; bottom: 10px; border: 0; border-radius: 999px; padding: 7px 10px; background: rgba(255,255,255,.9); font-size: 9px; font-weight: 800; }
.upload-progress { position: absolute; height: 4px; bottom: 0; left: 0; right: 0; background: rgba(255,255,255,.5); }
.upload-progress i { display: block; height: 100%; width: 45%; background: var(--coral); animation: upload-move 1s ease-in-out infinite alternate; }
@keyframes upload-move { to { transform: translateX(120%); } }
.emoji-options { display: flex; gap: 8px; flex-wrap: wrap; }
.emoji-options button { width: 42px; height: 42px; border-radius: 13px; border: 1px solid var(--line); background: #faf8f4; font-size: 20px; }
.emoji-options button.is-active { border-color: var(--coral); background: var(--coral-soft); box-shadow: 0 0 0 3px rgba(255,113,94,.08); }
.two-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ingredient-photo-area { margin-top: 16px; }
.inline-label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; color: #52625d; font-size: 11px; font-weight: 800; }
.inline-label small { color: var(--muted); font-size: 9px; font-weight: 500; }
.photo-strip { display: flex; overflow-x: auto; gap: 8px; }
.photo-thumb { width: 72px; height: 72px; flex: 0 0 72px; border-radius: 15px; position: relative; overflow: hidden; }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.photo-thumb button { position: absolute; right: 3px; top: 3px; width: 20px; height: 20px; border: 0; border-radius: 50%; background: rgba(30,45,41,.82); color: white; line-height: 1; padding: 0; }
.outline-button { border: 1px dashed rgba(47,124,103,.35); border-radius: 13px; background: #f3faf6; color: var(--mint-dark); padding: 11px 14px; font-size: 11px; font-weight: 800; }
.outline-button.full { width: 100%; margin-top: 12px; }
.photo-strip:not(:empty) + .outline-button { margin-top: 9px; }
.ai-button { width: 100%; margin-top: 17px; border: 0; border-radius: 17px; display: flex; align-items: center; gap: 11px; text-align: left; padding: 13px; color: white; background: linear-gradient(135deg, #243b35, #395e53); box-shadow: 0 11px 24px rgba(32,50,46,.18); }
.ai-orb { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 12px; background: linear-gradient(145deg, #ffe08a, #ffbd4e); color: #47361d; font-size: 19px; }
.ai-button > span:nth-child(2) { min-width: 0; display: grid; gap: 2px; }
.ai-button b { font-size: 11px; }
.ai-button small { color: rgba(255,255,255,.56); font-size: 8px; }
.ai-button i { margin-left: auto; font-size: 18px; font-style: normal; }
.ai-button.is-loading .ai-orb { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ai-result { margin-top: 12px; padding: 14px; border-radius: 16px; border: 1px solid #d5eadf; background: #f2faf5; }
.ai-result > div { display: inline-grid; gap: 1px; margin-right: 18px; }
.ai-result span { color: var(--muted); font-size: 8px; }
.ai-result strong { color: var(--mint-dark); font-size: 12px; }
.ai-result strong b { font-size: 21px; }
.ai-result p { color: #52625d; font-size: 10px; line-height: 1.65; }
.ai-result > small { display: block; color: #91a09a; font-size: 8px; line-height: 1.55; }
.step-editor-list { display: grid; gap: 11px; }
.step-editor { display: grid; grid-template-columns: 29px 1fr 58px; gap: 9px; align-items: start; }
.step-number { width: 29px; height: 29px; border-radius: 10px; display: grid; place-items: center; color: var(--coral); background: var(--coral-soft); font-size: 10px; font-weight: 900; margin-top: 5px; }
.step-editor textarea { width: 100%; min-height: 75px; resize: vertical; border: 1px solid var(--line); border-radius: 13px; background: #faf8f4; outline: 0; padding: 11px; font-size: 11px; line-height: 1.5; }
.step-image-button { height: 58px; border: 1px dashed var(--line); border-radius: 13px; background: #faf8f4; color: var(--muted); display: grid; place-items: center; overflow: hidden; font-size: 9px; }
.step-image-button img { width: 100%; height: 100%; object-fit: cover; }
.step-remove { grid-column: 2/4; justify-self: end; border: 0; background: transparent; color: #b2aaa6; font-size: 9px; margin-top: -7px; }
.submit-dish { min-height: 57px; display: flex; align-items: center; justify-content: center; gap: 12px; margin: 2px 0 15px; font-size: 14px; }
.submit-dish i { font-style: normal; font-size: 19px; }

.order-list { display: grid; gap: 13px; }
.order-card { padding: 17px; border-radius: 22px; background: rgba(255,255,255,.9); box-shadow: var(--shadow-soft); border: 1px solid white; }
.order-card-head { display: flex; justify-content: space-between; gap: 10px; }
.order-number { color: var(--muted); font-size: 9px; }
.order-card h3 { margin: 5px 0; font-size: 15px; }
.order-time { color: var(--muted); font-size: 10px; }
.status-pill { height: fit-content; border-radius: 999px; padding: 6px 9px; font-size: 9px; font-weight: 900; }
.status-pending { background: #fff2d9; color: #ad7419; }
.status-accepted { background: #e6f5ed; color: #2f7c67; }
.status-completed { background: #eef0ef; color: #6e7c77; }
.status-cancelled { background: #f6e8e6; color: #ae625a; }
.order-dishes { display: flex; flex-wrap: wrap; gap: 7px; margin: 14px 0; }
.order-dishes span { border-radius: 999px; padding: 6px 9px; background: #f7f3ee; font-size: 9px; font-weight: 700; }
.order-card-foot { padding-top: 11px; border-top: 1px dashed var(--line); display: flex; justify-content: space-between; color: var(--muted); font-size: 9px; }
.order-card-foot b { color: var(--ink); }
.order-card-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.order-card-actions button { border: 0; border-radius: 11px; padding: 8px 11px; font-size: 9px; font-weight: 800; }
.cancel-order-button { color: #b36d22; background: #fff1d9; }
.delete-order-button { color: #9a5e58; background: #f6ebe8; }

.profile-hero { text-align: center; padding: 22px 15px 30px; }
.big-avatar { width: 88px; height: 88px; margin: 0 auto 13px; display: grid; place-items: center; border: 5px solid white; border-radius: 31px; transform: rotate(-3deg); background: linear-gradient(145deg, #dff3e7, #badfce); color: var(--mint-dark); box-shadow: var(--shadow); font-size: 33px; font-weight: 900; }
.profile-hero .soft-pill { color: var(--mint-dark); background: var(--mint); padding: 5px 9px; }
.profile-hero h2 { font-size: 25px; margin: 12px 0 5px; }
.profile-hero p { margin: 0 auto; color: var(--muted); font-size: 11px; max-width: 310px; line-height: 1.7; }
.profile-actions { overflow: hidden; border-radius: 23px; background: rgba(255,255,255,.9); box-shadow: var(--shadow-soft); }
.profile-actions button { width: 100%; display: grid; grid-template-columns: 41px 1fr auto; gap: 12px; align-items: center; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; padding: 15px; }
.profile-actions button:last-child { border-bottom: 0; }
.profile-actions button > span { width: 41px; height: 41px; border-radius: 14px; display: grid; place-items: center; background: var(--coral-soft); color: var(--coral); font-size: 18px; }
.profile-actions button div { display: grid; gap: 3px; }
.profile-actions button b { font-size: 12px; }
.profile-actions button small { color: var(--muted); font-size: 8px; }
.profile-actions button i { color: #a8b0ad; font-size: 22px; font-style: normal; }
.tiny-footer { text-align: center; color: #b3bab7; font-size: 9px; margin: 32px 0; }

.bottom-nav { position: fixed; left: 50%; bottom: 0; z-index: 30; width: min(100%, 760px); transform: translateX(-50%); padding: 8px 11px calc(8px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(4, 1fr); background: rgba(255,253,249,.92); border-top: 1px solid rgba(32,50,46,.07); box-shadow: 0 -12px 32px rgba(65,45,36,.07); backdrop-filter: blur(18px); }
.nav-item { position: relative; border: 0; background: transparent; display: grid; justify-items: center; gap: 3px; color: #98a19e; padding: 6px 1px 3px; }
.nav-item > span { width: 27px; height: 23px; display: grid; place-items: center; }
.nav-item > span svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; }
.nav-item b { font-size: 8px; font-weight: 700; }
.nav-item.is-active { color: var(--coral); }
.nav-item.is-active::before { content: ""; position: absolute; top: -8px; width: 21px; height: 3px; border-radius: 0 0 4px 4px; background: var(--coral); }
.nav-badge { position: absolute; top: 2px; right: 21%; min-width: 15px; height: 15px; display: grid; place-items: center; border-radius: 999px; color: white; background: var(--coral); border: 2px solid white; font-size: 7px; font-style: normal; }
.cart-fab { position: fixed; right: max(20px, calc(50vw - 355px)); bottom: calc(81px + env(safe-area-inset-bottom)); z-index: 25; border: 0; border-radius: 999px; height: 49px; display: flex; align-items: center; gap: 6px; color: white; background: var(--ink); padding: 0 16px 0 10px; box-shadow: 0 13px 30px rgba(32,50,46,.28); animation: cart-pop .3s ease both; }
@keyframes cart-pop { from { transform: translateY(10px) scale(.8); opacity: 0; } }
.cart-fab span { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.11); }
.cart-fab b { min-width: 17px; height: 17px; display: grid; place-items: center; border-radius: 50%; background: var(--coral); font-size: 8px; }
.cart-fab em { font-style: normal; font-size: 10px; font-weight: 800; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(22,34,31,.53); display: flex; align-items: flex-end; justify-content: center; padding: 18px; backdrop-filter: blur(8px); animation: fade .2s ease both; }
@keyframes fade { from { opacity: 0; } }
.modal-card { width: min(100%, 620px); max-height: calc(100vh - 32px); overflow-y: auto; border-radius: 28px; background: var(--surface); box-shadow: 0 24px 70px rgba(16,29,25,.3); position: relative; animation: sheet-up .35s cubic-bezier(.2,.8,.2,1) both; }
@keyframes sheet-up { from { opacity: 0; transform: translateY(35px) scale(.98); } }
.nickname-card { padding: 28px 22px 22px; text-align: center; }
.welcome-art { width: 92px; height: 78px; margin: 0 auto 8px; display: grid; place-items: center; position: relative; }
.welcome-art > span { width: 67px; height: 67px; display: grid; place-items: center; border-radius: 23px; background: var(--coral-soft); font-size: 37px; transform: rotate(-5deg); }
.welcome-art i, .welcome-art b { position: absolute; color: var(--coral); font-style: normal; }
.welcome-art i { right: 3px; top: 4px; transform: rotate(12deg); }
.welcome-art b { left: 2px; bottom: 8px; color: var(--gold); }
.nickname-card h2 { font-size: 25px; margin: 4px 0 8px; }
.nickname-card > p { color: var(--muted); font-size: 11px; line-height: 1.75; margin: 0 auto 17px; max-width: 350px; }
.nickname-card .field-label { text-align: left; }
.nickname-card .primary-button { margin-top: 15px; }
.nickname-card > small { display: block; color: #a5aeaa; margin-top: 11px; font-size: 8px; }
.modal-close { position: absolute; z-index: 12; top: 13px; right: 13px; width: 42px; height: 42px; border: 2px solid rgba(255,255,255,.86); border-radius: 50%; display: grid; place-items: center; background: rgba(32,50,46,.88); color: white; box-shadow: 0 7px 20px rgba(22,34,31,.24); backdrop-filter: blur(10px); font-size: 27px; line-height: 1; }
.modal-close.static { position: static; background: #f4efea; color: var(--ink); border: 0; box-shadow: none; }
.detail-sheet { overflow: hidden; }
#dishDetailContent { max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.detail-hero { height: 250px; position: relative; overflow: hidden; display: grid; place-items: center; background: linear-gradient(145deg, #ffe7d4, #ffd4c8); }
.detail-hero img { width: 100%; height: 100%; object-fit: cover; }
.detail-hero .dish-placeholder { font-size: 82px; }
.detail-body { padding: 20px; }
.detail-body .soft-pill { color: var(--coral); background: var(--coral-soft); }
.detail-body h2 { font-size: 25px; margin: 10px 0 6px; }
.detail-description { color: var(--muted); font-size: 11px; line-height: 1.75; }
.detail-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 17px 0; }
.detail-stats div { padding: 12px 8px; border-radius: 15px; background: #f8f4ef; text-align: center; }
.detail-stats b { display: block; font-size: 14px; }
.detail-stats span { color: var(--muted); font-size: 8px; }
.detail-section { padding: 17px 0; border-top: 1px solid var(--line); }
.detail-section h3 { font-size: 13px; margin: 0 0 9px; }
.detail-section p { white-space: pre-line; color: #5f6e69; font-size: 10px; line-height: 1.8; }
.detail-photo-strip { display: flex; gap: 8px; overflow-x: auto; margin-top: 10px; }
.detail-photo-strip img { width: 110px; height: 85px; flex: 0 0 110px; object-fit: cover; border-radius: 14px; }
.cooking-steps { display: grid; gap: 13px; }
.cooking-step { display: grid; grid-template-columns: 29px 1fr; gap: 10px; align-items: start; }
.cooking-step > b { width: 29px; height: 29px; border-radius: 10px; display: grid; place-items: center; background: var(--mint); color: var(--mint-dark); font-size: 10px; }
.cooking-step p { margin: 3px 0; }
.cooking-step img { width: 100%; margin-top: 7px; border-radius: 15px; max-height: 240px; object-fit: cover; }
.detail-add { width: 100%; margin-top: 10px; }
.detail-close-bottom { width: 100%; margin: 10px 0 3px; border: 0; border-radius: 14px; padding: 13px; color: #697772; background: #f2eee9; font-size: 11px; font-weight: 800; }
.sheet-handle { width: 42px; height: 4px; border-radius: 999px; background: #ded8d2; margin: 9px auto 4px; }
.cart-sheet { padding: 13px 18px 22px; }
.sheet-heading { display: flex; justify-content: space-between; align-items: flex-start; padding: 8px 0 12px; }
.sheet-heading h2 { font-size: 21px; margin: 3px 0 0; }
.cart-items { max-height: 200px; overflow-y: auto; display: grid; gap: 8px; padding-bottom: 4px; }
.cart-item { display: grid; grid-template-columns: 41px 1fr auto; gap: 10px; align-items: center; padding: 9px; border-radius: 14px; background: #f8f4ef; }
.cart-item > span { width: 41px; height: 41px; display: grid; place-items: center; border-radius: 12px; background: white; font-size: 22px; }
.cart-item h4 { margin: 0 0 2px; font-size: 11px; }
.cart-item small { color: var(--muted); font-size: 8px; }
.quantity-control { display: flex; align-items: center; gap: 7px; }
.quantity-control button { width: 24px; height: 24px; border-radius: 8px; border: 0; background: white; }
.quantity-control b { font-size: 10px; }
.order-form { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 2px; }
.order-form .field-label { margin-top: 10px; }
.order-form textarea { min-height: 63px; }
.order-total { display: flex; justify-content: space-between; align-items: flex-end; margin: 15px 2px; }
.order-total span { color: var(--muted); font-size: 10px; }
.order-total strong { color: var(--coral); font-size: 12px; }
.order-total strong b { font-size: 24px; }
.toast-stack { position: fixed; z-index: 200; top: max(18px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); width: min(calc(100% - 30px), 450px); display: grid; gap: 8px; pointer-events: none; }
.toast { padding: 12px 14px; border-radius: 14px; color: white; background: #243b35; box-shadow: 0 12px 30px rgba(0,0,0,.2); font-size: 11px; line-height: 1.5; animation: toast-in .25s ease both; }
.toast.error { background: #a94740; }
@keyframes toast-in { from { transform: translateY(-12px); opacity: 0; } }

@media (min-width: 620px) {
  .app-shell { padding-left: 26px; padding-right: 26px; }
  .category-scroller { margin-left: 0; margin-right: 0; padding: 0; }
  .dish-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-copy { width: 60%; }
  .hero-visual { right: 27px; transform: scale(1.15); }
  .modal-backdrop { align-items: center; }
  .cart-sheet { padding: 16px 24px 26px; }
}

@media (max-width: 619px) {
  .modal-backdrop { padding: 0; align-items: flex-end; }
  .modal-card { width: 100%; max-width: none; max-height: calc(100vh - 18px); max-height: calc(100dvh - 18px); border-radius: 27px 27px 0 0; }
  .detail-sheet { height: calc(100vh - 18px); height: calc(100dvh - 18px); }
  #dishDetailContent { max-height: 100%; padding-bottom: max(10px, env(safe-area-inset-bottom)); }
  .modal-close { top: max(12px, env(safe-area-inset-top)); right: 12px; }
  .detail-hero { height: min(47vw, 210px); min-height: 178px; }
  .detail-body { padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
  .detail-body h2 { font-size: clamp(22px, 7vw, 28px); }
  .cart-sheet { padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
}

@media (max-width: 370px) {
  .app-shell { padding-left: 13px; padding-right: 13px; }
  .hero-card { padding-left: 18px; }
  .hero-copy { width: 72%; }
  .hero-visual { right: -36px; opacity: .9; }
  .dish-grid { gap: 9px; }
  .dish-info { padding: 9px; }
  .two-columns { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
