:root {
  --green: #224F2E;
  --green-deep: #173A21;
  --cream: #F8F5EB;
  --green-soft: #E9F0EA;
  --ink: #142019;
  --muted: #66746B;
  --line: #E4EAE6;
  --bg: #F6F8F6;
  --card: #FFFFFF;
  --bad: #C8423B;
  --amber: #B7791F;
  --radius: 20px;
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif; font-size: 16px; }
body { min-height: 100dvh; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
input, textarea, select { font: inherit; color: inherit; }
img { display: block; }
.wrap { max-width: 520px; margin: 0 auto; padding: 0 16px 120px; }

/* header */
.top { background: var(--green); color: var(--cream); padding: calc(18px + env(safe-area-inset-top)) 0 22px; }
.top .wrap { padding-bottom: 0; }
.brand { display: flex; align-items: baseline; gap: 10px; }
.logo { font-size: 30px; font-weight: 800; letter-spacing: -1px; }
.logo span { opacity: .65; }
.logo-img { height: 26px; width: auto; display: block; }
.brand { align-items: center; }
.room-pill { margin-left: auto; background: rgba(255,255,255,.16); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 700; }
.hello { margin-top: 14px; font-size: 22px; font-weight: 800; letter-spacing: -.4px; line-height: 1.2; }
.sub { margin-top: 4px; font-size: 14px; opacity: .85; }
.notice { margin-top: 14px; background: #fff; color: var(--green-deep); border-radius: 14px; padding: 10px 12px; font-size: 13px; font-weight: 600; }
.closed { margin-top: 14px; background: #FFF6E5; color: #7A4E00; border-radius: 14px; padding: 10px 12px; font-size: 13px; font-weight: 600; }

/* tabs & chips */
.tabs { display: flex; gap: 8px; margin: 16px 0 6px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.chip { flex-shrink: 0; height: 36px; padding: 0 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: 14px; font-weight: 600; color: var(--muted); }
.chip.on { background: var(--green-deep); border-color: var(--green-deep); color: #fff; }
.section { margin: 20px 2px 10px; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); }

/* menu cards */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 8px 12px; text-align: left; position: relative; }
.item .ph { aspect-ratio: 1 / 1.1; border-radius: 15px; overflow: hidden; display: grid; place-items: center; }
.pic { display: grid; place-items: center; width: 100%; height: 100%; }
.item .ph img { width: 100%; height: 100%; object-fit: cover; }
.item .ph svg { width: 58%; height: 70%; }
.item .nm { font-weight: 800; font-size: 15px; margin: 10px 4px 0; line-height: 1.2; }
.item .ds { font-size: 12px; color: var(--muted); margin: 3px 4px 0; line-height: 1.35; }
.item .pr { font-weight: 800; font-size: 14px; margin: 8px 4px 0; display: flex; align-items: center; }
.item .pr .add { margin-left: auto; width: 30px; height: 30px; border-radius: 999px; background: var(--green); color: #fff; display: grid; place-items: center; font-size: 20px; line-height: 1; }
.item .count { position: absolute; top: 14px; right: 14px; min-width: 26px; height: 26px; border-radius: 999px; background: var(--green); color: #fff; font-size: 13px; font-weight: 800; display: grid; place-items: center; padding: 0 7px; }
.item.out { opacity: .5; }
.item.out .pr .add { background: var(--muted); }
.tag { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .6px; padding: 3px 7px; border-radius: 6px; background: var(--green-soft); color: var(--green); margin: 8px 4px 0; }
.soldout { position: absolute; top: 16px; left: 16px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 800; border-radius: 6px; padding: 3px 7px; }

/* bottom bar */
.bar { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--bg) 70%, transparent); z-index: 20; }
.bar .inner { max-width: 488px; margin: 0 auto; display: flex; gap: 10px; }
.btn { height: 54px; border-radius: 999px; padding: 0 22px; font-weight: 800; font-size: 16px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.btn.primary { background: var(--green); color: #fff; box-shadow: 0 10px 24px -12px var(--green); }
.btn.dark { background: var(--green-deep); color: #fff; }
.btn.ghost { background: var(--card); border: 1px solid var(--line); }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn .qty { background: rgba(255,255,255,.2); border-radius: 999px; min-width: 28px; height: 28px; display: grid; place-items: center; font-size: 14px; padding: 0 8px; }
.btn .tot { margin-left: auto; }

/* sheet */
.overlay { position: fixed; inset: 0; background: rgba(10,20,14,.45); z-index: 40; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s ease; }
.sheet { background: var(--card); width: 100%; max-width: 520px; max-height: 92dvh; border-radius: 26px 26px 0 0; overflow-y: auto; animation: up .22s cubic-bezier(.2,.8,.2,1); padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
.sheet .hero { height: 260px; display: grid; place-items: center; position: relative; }
.sheet .hero img { width: 100%; height: 100%; object-fit: cover; }
.sheet .hero svg { height: 75%; }
.sheet .close { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border-radius: 999px; background: rgba(255,255,255,.92); display: grid; place-items: center; font-size: 22px; }
.sheet .body { padding: 18px 18px 0; }
.sheet h2 { margin: 0; font-size: 26px; letter-spacing: -.6px; }
.sheet .desc { color: var(--muted); font-size: 14px; margin-top: 4px; }
.sheet .foot { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line); z-index: 41; }
.sheet .foot .inner { max-width: 488px; margin: 0 auto; display: flex; gap: 10px; align-items: center; }
.sheet .head { display: flex; align-items: center; padding: 18px 18px 6px; }
.sheet .head h2 { flex: 1; }
.sheet .head .x { width: 38px; height: 38px; border-radius: 999px; background: var(--bg); display: grid; place-items: center; font-size: 22px; }

.grp { margin-top: 20px; }
.grp .lbl { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .7px; color: var(--muted); margin-bottom: 8px; }
.grp .lbl small { text-transform: none; letter-spacing: 0; font-weight: 600; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { min-height: 42px; padding: 8px 14px; border-radius: 14px; border: 1.5px solid var(--line); font-size: 14px; font-weight: 600; text-align: left; }
.opt.on { border-color: var(--green); background: var(--green-soft); color: var(--green-deep); }
.opt small { display: block; color: var(--muted); font-weight: 600; font-size: 12px; }
.opt.size { flex: 1; min-width: 120px; }
.field { width: 100%; min-height: 46px; padding: 11px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--bg); outline: none; font-size: 15px; }
.field:focus { border-color: var(--green); background: #fff; }
textarea.field { min-height: 70px; resize: vertical; }
.stepper { display: flex; align-items: center; background: var(--bg); border-radius: 999px; padding: 4px; }
.stepper button { width: 44px; height: 44px; border-radius: 999px; background: #fff; font-size: 22px; font-weight: 700; }
.stepper span { width: 34px; text-align: center; font-weight: 800; font-size: 17px; }

/* cart & checkout */
.line { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.line .th { width: 54px; height: 54px; border-radius: 14px; overflow: hidden; display: grid; place-items: center; flex-shrink: 0; }
.line .th img { width: 100%; height: 100%; object-fit: cover; }
.line .th svg { height: 80%; }
.line .info { flex: 1; min-width: 0; }
.line .t { font-weight: 800; font-size: 15px; }
.line .m { font-size: 12px; color: var(--muted); margin-top: 2px; }
.line .r { text-align: right; font-weight: 800; font-size: 14px; }
.line .r .mini { display: flex; gap: 6px; margin-top: 6px; justify-content: flex-end; }
.line .r .mini button { width: 30px; height: 30px; border-radius: 999px; background: var(--bg); font-weight: 800; }
.choice { display: flex; gap: 10px; }
.choice .opt { flex: 1; padding: 12px 14px; }
.choice .opt b { display: block; font-size: 15px; }
.total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 18px; }
.total b { font-size: 26px; letter-spacing: -.5px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.45; }
.row2 { display: flex; gap: 10px; }
.row2 > * { flex: 1; }

/* status */
.ord { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-top: 12px; }
.ord .h { display: flex; align-items: center; gap: 10px; }
.ord .h b { font-size: 17px; }
.ord .h .when { margin-left: auto; font-size: 12px; color: var(--muted); }
.steps { display: flex; gap: 6px; margin: 14px 0 10px; }
.steps i { flex: 1; height: 6px; border-radius: 999px; background: var(--line); }
.steps i.on { background: var(--green); }
.stxt { font-weight: 800; font-size: 18px; letter-spacing: -.3px; }
.stxt.bad { color: var(--bad); }
.ord .items { font-size: 13px; color: var(--muted); margin-top: 6px; }
.pulse { display: inline-block; width: 9px; height: 9px; border-radius: 999px; background: var(--green); margin-right: 8px; animation: pulse 1.4s infinite; vertical-align: middle; }

.err { text-align: center; padding: 80px 24px; }
.err h1 { font-size: 24px; margin: 18px 0 6px; }
.err p { color: var(--muted); }
.loading { min-height: 80dvh; display: grid; place-items: center; }
.spinner { width: 34px; height: 34px; border-radius: 999px; border: 3px solid var(--line); border-top-color: var(--green); animation: spin .8s linear infinite; }
.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; font-weight: 600; font-size: 14px; padding: 12px 18px; border-radius: 16px; opacity: 0; pointer-events: none; transition: .2s; z-index: 60; width: max-content; max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.bad { background: var(--bad); }
.foot-note { text-align: center; color: var(--muted); font-size: 12px; margin-top: 28px; }
.foot-note a { color: var(--green); font-weight: 700; text-decoration: none; }

@keyframes up { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .3; } }
@media (min-width: 560px) { .grid { grid-template-columns: 1fr 1fr 1fr; } .sheet { border-radius: 26px; margin-bottom: 20px; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item .nt { font-size: 11.5px; font-weight: 700; color: var(--green); margin: 5px 4px 0; }
.nutri { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.nutri div { background: var(--green-soft); border-radius: 14px; padding: 10px 6px; text-align: center; }
.nutri b { display: block; font-size: 18px; color: var(--green-deep); letter-spacing: -.3px; }
.nutri span { font-size: 11px; color: var(--muted); font-weight: 600; }
.sheet .hero .pic svg { height: 190px; width: auto; }
.sheet .hero .pic img { width: 100%; height: 100%; object-fit: cover; }
.sheet .hero .pic { position: absolute; inset: 0; }
.line .th .pic svg { height: 42px; width: auto; }
