:root {
  --green: #2e4943;
  --green-deep: #1e322d;
  --cream: #f0e9e3;
  --cream-2: #e6dfd7;
  --sage: #84938d;
  --gold: #bf8b2e;
  --ink: #1c2422;
  --accept: #34c759;
  --decline: #ff3b30;
  --font: "Avenir Next", Avenir, "Zen Kaku Gothic New", "Hiragino Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  background: var(--cream);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }

/* ---------- layout ---------- */
.stage {
  min-height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 420px) auto;
  gap: 72px;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
}
.pitch .eyebrow { color: var(--gold); letter-spacing: .08em; font-size: 13px; font-weight: 600; margin: 0 0 12px; }
.pitch h1 { color: var(--green); font-size: 44px; line-height: 1.08; margin: 0 0 20px; }
.pitch .lead { font-size: 17px; line-height: 1.7; margin: 0 0 20px; }
.flow { padding-left: 1.3em; margin: 0 0 28px; line-height: 1.8; color: var(--green); }
.lang { display: inline-flex; border: 1px solid var(--green); border-radius: 999px; overflow: hidden; }
.lang button { border: 0; background: transparent; color: var(--green); padding: 6px 16px; font-weight: 600; font-size: 13px; }
.lang button.on { background: var(--green); color: var(--cream); }
.note { color: var(--sage); font-size: 12px; line-height: 1.6; margin-top: 24px; }

/* ---------- phone ---------- */
.phone {
  position: relative;
  width: 390px;
  height: 800px;
  border-radius: 52px;
  background: #000;
  padding: 12px;
  box-shadow: 0 30px 80px rgba(30, 50, 45, .35), inset 0 0 0 2px #333;
}
.statusbar {
  position: absolute; z-index: 5; top: 12px; left: 12px; right: 12px;
  height: 46px; padding: 16px 30px 0;
  display: flex; justify-content: space-between;
  font-size: 15px; font-weight: 600; color: var(--ink);
  pointer-events: none;
}
.phone.dark .statusbar { color: #fff; }
.sb-right { font-size: 11px; letter-spacing: .05em; }
.screen {
  position: relative; width: 100%; height: 100%;
  border-radius: 40px; overflow: hidden;
  background: var(--cream);
}
.view { position: absolute; inset: 0; padding: 64px 22px 28px; display: flex; flex-direction: column; animation: fade .35s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@media (max-width: 900px) {
  .stage { grid-template-columns: 1fr; gap: 32px; padding: 32px 16px; justify-items: center; }
  .pitch { max-width: 420px; }
}
@media (max-width: 480px) {
  .stage { padding: 0; gap: 0; }
  .pitch { padding: 32px 20px; order: 2; }
  .phone { width: 100vw; height: 100svh; border-radius: 0; padding: 0; box-shadow: none; }
  .statusbar { top: 0; left: 0; right: 0; }
  .screen { border-radius: 0; }
}

/* ---------- buttons ---------- */
.btn { border: 0; border-radius: 14px; padding: 15px 18px; font-weight: 600; font-size: 16px; }
.btn.primary { background: var(--green); color: var(--cream); }
.btn.primary:active { background: var(--green-deep); }
.btn.ghost { background: transparent; color: var(--green); box-shadow: inset 0 0 0 1.5px var(--green); }
.btn.ghost.light { color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.7); }

/* ---------- fridge ---------- */
.app-head { display: flex; flex-direction: column; margin-bottom: 14px; }
.app-name { margin: 0; color: var(--gold); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.app-head h2 { margin: 2px 0 0; color: var(--green); font-size: 28px; }
.items { list-style: none; margin: 0; padding: 0; flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.item { display: grid; grid-template-columns: 84px 1fr; gap: 12px; align-items: center; background: #fff; border-radius: 16px; padding: 8px; animation: fade .4s ease both; }
.item img { width: 84px; height: 56px; object-fit: cover; border-radius: 10px; background: var(--cream-2); }
.item .nm { font-weight: 700; color: var(--green); }
.item .kd { font-size: 12px; color: var(--sage); }
.item .exp { font-size: 13px; margin-top: 4px; }
.item .exp.urgent { color: #b2442f; font-weight: 700; }
.item.gone { opacity: .45; }
.bar { height: 4px; background: var(--cream-2); border-radius: 2px; margin-top: 6px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--gold); }
.empty { flex: 1; color: var(--sage); text-align: center; padding-top: 120px; line-height: 1.7; white-space: pre-line; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0 10px; }

/* ---------- add ---------- */
.add .app-head { flex-direction: row; align-items: center; gap: 8px; }
.back { border: 0; background: none; color: var(--green); font-size: 34px; line-height: 1; padding: 0 6px 4px 0; }
.form { display: flex; flex-direction: column; gap: 18px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--sage); font-weight: 600; }
.form select, .form input:not([type=range]) { font: inherit; font-size: 17px; color: var(--ink); padding: 12px; border-radius: 12px; border: 1px solid var(--cream-2); background: #fff; }
.form input[type=range] { accent-color: var(--green); }
.form output { color: var(--green); font-size: 15px; }
.form .btn { margin-top: 12px; }

/* ---------- scan ---------- */
.scan { align-items: center; justify-content: center; background: var(--green); }
.receipt { position: relative; width: 240px; background: #fffdf8; padding: 22px 20px; font-family: "SFMono-Regular", Menlo, monospace; font-size: 12px; line-height: 1.9; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.receipt p { margin: 0; }
.r-head { text-align: center; font-weight: 700; margin-bottom: 8px !important; }
.r-total { border-top: 1px dashed #999; margin-top: 6px !important; padding-top: 6px; font-weight: 700; }
.scanline { position: absolute; left: 0; right: 0; height: 3px; background: var(--gold); box-shadow: 0 0 14px var(--gold); animation: scan 1.1s ease-in-out infinite alternate; }
@keyframes scan { from { top: 0; } to { top: 100%; } }
.scan-msg { color: var(--cream); margin-top: 22px; }

/* ---------- temptation ---------- */
.tempt { background: linear-gradient(180deg, #2b3b48, #121a20); color: #fff; }
.lock-time { font-size: 76px; font-weight: 300; text-align: center; margin-top: 30px; letter-spacing: -.02em; }
.notif { margin-top: 34px; background: rgba(255,255,255,.16); backdrop-filter: blur(20px); border-radius: 20px; padding: 14px 16px; animation: drop .5s cubic-bezier(.2,.9,.3,1.2) both .4s; }
@keyframes drop { from { opacity: 0; transform: translateY(-30px); } to { opacity: 1; transform: none; } }
.notif p { margin: 0; }
.n-app { font-size: 12px; opacity: .7; }
.n-from { font-weight: 700; margin: 4px 0 2px !important; }
.n-body { font-size: 15px; line-height: 1.5; }
.choices { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }

/* ---------- call ---------- */
.call { color: #fff; align-items: center; background: #000; }
.call-bg { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(30px) brightness(.45) saturate(1.2); z-index: 0; transition: background-image .6s; }
.call > *:not(.call-bg) { position: relative; z-index: 1; }
.caller { text-align: center; margin-top: 34px; }
.caller p { margin: 0; }
.c-label { font-size: 14px; opacity: .75; }
.c-name { font-size: 36px; font-weight: 600; margin: 4px 0 !important; }
.c-sub { font-size: 15px; opacity: .85; }
.avatar { width: 220px; height: 220px; border-radius: 50%; margin: 48px auto 0; background-size: 140%; background-position: center; box-shadow: 0 0 0 4px rgba(255,255,255,.18); }
.avatar.ring { animation: ring 1.6s ease-out infinite; }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.45); } 100% { box-shadow: 0 0 0 36px rgba(255,255,255,0); } }
.avatar.talking { width: 180px; height: 180px; margin-top: 30px; }
.avatar.talking.speaking { animation: talk .5s ease-in-out infinite alternate; }
@keyframes talk { from { transform: scale(1); } to { transform: scale(1.04); } }
.call-btns { margin-top: auto; width: 100%; display: flex; justify-content: space-around; text-align: center; font-size: 14px; }
.call-btns div { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.round { width: 76px; height: 76px; border-radius: 50%; border: 0; display: grid; place-items: center; }
.round svg { width: 36px; height: 36px; fill: #fff; }
.round.accept { background: var(--accept); animation: nudge 1.2s ease-in-out infinite; }
.round.decline { background: var(--decline); }
.round.accept svg { transform: rotate(135deg); }
@keyframes nudge { 0%, 60%, 100% { transform: none; } 70% { transform: rotate(-12deg); } 80% { transform: rotate(12deg); } 90% { transform: rotate(-8deg); } }
.subtitle { min-height: 120px; margin: 28px 4px 0; text-align: center; font-size: 19px; line-height: 1.55; font-weight: 500; text-shadow: 0 1px 8px rgba(0,0,0,.5); }
.replies { margin-top: auto; width: 100%; display: flex; flex-direction: column; gap: 10px; animation: fade .35s ease; }

/* ---------- end ---------- */
.end { align-items: center; text-align: center; justify-content: center; }
.end.sad { background: #2a2a28; color: var(--cream); }
.end.happy { background: var(--green); color: var(--cream); }
.end-img { width: 100%; aspect-ratio: 25 / 16; border-radius: 18px; background-size: cover; background-position: center; margin-bottom: 26px; }
.end.sad .end-img { filter: grayscale(.6); }
.end h2 { font-size: 26px; margin: 0 0 10px; }
.end p { margin: 0; line-height: 1.7; }
.tally { margin: 18px 0 28px !important; color: var(--gold); font-weight: 700; }
.end .btn.primary { background: var(--cream); color: var(--green); width: 100%; }
