:root{
  --paper:#F4EFE3; --paper2:#EBE3D2; --ink:#1F3A5F; --ink2:#2E4D74;
  --red:#C0392B; --red2:#A5301F; --green:#1E7A46; --muted:#6B6256;
  --line:#D8CDB8; --card:#FBF8F0; --gold:#B8893B;
}
*{box-sizing:border-box; -webkit-tap-highlight-color:transparent;}
html,body{margin:0;height:100%;}
body{font-family:'Inter',system-ui,sans-serif; color:var(--ink); background:var(--paper); display:flex; justify-content:center; overscroll-behavior:none;}
.totem{width:100%; max-width:520px; min-height:100dvh; background:radial-gradient(120% 80% at 50% -10%, #FBF7EC 0%, var(--paper) 55%); display:flex; flex-direction:column; position:relative; overflow:hidden;}
.screen{display:none; flex-direction:column; flex:1; min-height:0;}
.screen.active{display:flex; animation:fade .45s ease;}
@keyframes fade{from{opacity:0; transform:translateY(8px);} to{opacity:1; transform:none;}}
.topbar{display:flex; align-items:center; justify-content:space-between; padding:18px 22px 10px; flex:0 0 auto;}
.logo{font-family:'Fraunces',serif; font-weight:700; font-size:30px; letter-spacing:-.5px;}
.logo .r{color:var(--red);}
.topbar .tag{font-size:10px; letter-spacing:.28em; text-transform:uppercase; color:var(--muted);}
.backbtn{border:none; background:transparent; color:var(--ink); font-size:15px; font-weight:600; padding:8px 10px; border-radius:10px; cursor:pointer; display:flex; align-items:center; gap:6px;}
.backbtn:active{background:var(--paper2);}
#s-greet{justify-content:center; align-items:center; text-align:center; padding:40px 28px;}
#s-greet .ciao{font-family:'Fraunces',serif; font-weight:600; font-size:54px; line-height:1.02; color:var(--ink); margin:0;}
#s-greet .sub{margin-top:14px; font-size:17px; color:var(--muted); max-width:300px;}
.biglogo{font-family:'Fraunces',serif;font-weight:700;font-size:46px;letter-spacing:-1px;margin-bottom:8px;}
.biglogo .r{color:var(--red);}
.pulse-cta{margin-top:46px; background:var(--ink); color:#fff; border:none; font-size:18px; font-weight:600; padding:20px 40px; border-radius:999px; cursor:pointer; box-shadow:0 10px 28px rgba(31,58,95,.28); animation:breathe 2.6s ease-in-out infinite;}
@keyframes breathe{0%,100%{transform:scale(1);} 50%{transform:scale(1.045);}}
.pulse-cta:active{transform:scale(.97);}
.head{padding:6px 22px 12px; flex:0 0 auto;}
.head h1{font-family:'Fraunces',serif; font-weight:600; font-size:25px; margin:0;}
.head p{margin:4px 0 0; font-size:13px; color:var(--muted);}
.scroll{flex:1; min-height:0; overflow-y:auto; padding:4px 18px 16px; -webkit-overflow-scrolling:touch;}
.pathwrap{display:flex; flex-direction:column; gap:16px; padding:8px 20px 24px;}
.path{background:var(--card); border:1px solid var(--line); border-radius:20px; padding:26px 24px; cursor:pointer; text-align:left; position:relative; overflow:hidden; transition:transform .12s ease, box-shadow .12s ease;}
.path:active{transform:scale(.985);}
.path .k{font-size:11px; letter-spacing:.2em; text-transform:uppercase; color:var(--red); font-weight:700;}
.path h2{font-family:'Fraunces',serif; font-weight:600; font-size:27px; margin:8px 0 6px;}
.path p{margin:0; font-size:14px; color:var(--muted); max-width:90%;}
.path .arr{position:absolute; right:22px; bottom:22px; font-size:22px; color:var(--ink); opacity:.5;}
.path.chef{border-color:#E3D6BC; background:linear-gradient(180deg,#FBF6E9,#F7EFD9);}
.path.bowl{border-color:#CFE0D4; background:linear-gradient(180deg,#F2F8F1,#EAF3E8);}
.dish{background:var(--card); border:1px solid var(--line); border-radius:18px; padding:18px 18px 16px; margin-bottom:14px; cursor:pointer; position:relative; transition:transform .12s ease, border-color .12s ease;}
.dish:active{transform:scale(.99);}
.dish .row{display:flex; justify-content:space-between; align-items:baseline; gap:10px;}
.dish h3{font-family:'Fraunces',serif; font-weight:600; font-size:22px; margin:0;}
.dish .price{font-weight:700; font-size:17px; color:var(--ink); white-space:nowrap;}
.dish .specs{margin:8px 0 0; font-size:13px; color:var(--ink2); line-height:1.5;}
.dish .specs b{color:var(--ink);}
.dish .desc{margin:8px 0 0; font-size:12.5px; color:var(--muted); font-style:italic; line-height:1.5;}
.dish .add{margin-top:14px; width:100%; border:none; background:var(--ink); color:#fff; font-size:15px; font-weight:600; padding:13px; border-radius:12px; cursor:pointer;}
.dish .add:active{background:var(--ink2);}
.step-label{font-size:11px; letter-spacing:.2em; text-transform:uppercase; color:var(--red); font-weight:700; margin:14px 4px 8px;}
.opt{display:flex; align-items:center; justify-content:space-between; background:var(--card); border:1.5px solid var(--line); border-radius:14px; padding:15px 16px; margin-bottom:10px; cursor:pointer;}
.opt .nm{font-weight:600; font-size:16px;}
.opt .nt{font-size:12px; color:var(--muted); margin-top:2px;}
.opt .tick{width:24px;height:24px;border-radius:50%;border:2px solid var(--line); flex:0 0 auto; display:flex; align-items:center; justify-content:center; color:#fff; font-size:14px;}
.opt.sel{border-color:var(--ink); background:#fff;}
.opt.sel .tick{background:var(--ink); border-color:var(--ink);}
.chips{display:flex; flex-wrap:wrap; gap:9px; margin-bottom:6px;}
.chip{border:1.5px solid var(--line); background:var(--card); border-radius:999px; padding:10px 16px; font-size:14px; font-weight:500; cursor:pointer;}
.chip.sel{border-color:var(--green); background:#EAF3E8; color:var(--green); font-weight:600;}
.footbar{flex:0 0 auto; padding:14px 20px calc(14px + env(safe-area-inset-bottom)); border-top:1px solid var(--line); background:var(--card); display:flex; align-items:center; gap:14px;}
.footbar .info{flex:1; min-width:0;}
.footbar .info .l{font-size:12px; color:var(--muted);}
.footbar .info .v{font-family:'Fraunces',serif; font-weight:600; font-size:20px;}
.btn-primary{border:none; background:var(--ink); color:#fff; font-size:16px; font-weight:600; padding:16px 26px; border-radius:14px; cursor:pointer; white-space:nowrap;}
.btn-primary:disabled{opacity:.4;}
.btn-primary:active{background:var(--ink2);}
.cart-line{display:flex; justify-content:space-between; align-items:flex-start; gap:12px; padding:16px 0; border-bottom:1px solid var(--line);}
.cart-line .nm{font-family:'Fraunces',serif; font-weight:600; font-size:18px;}
.cart-line .sub{font-size:12.5px; color:var(--muted); margin-top:3px;}
.cart-line .pr{font-weight:700; font-size:16px;}
.cart-line .rm{font-size:12px;color:var(--red);margin-top:6px;cursor:pointer;display:inline-block;}
#s-pay{justify-content:center; align-items:center; text-align:center; padding:30px;}
.terminal{width:300px; background:#10243B; color:#fff; border-radius:24px; padding:30px 26px; box-shadow:0 24px 60px rgba(16,36,59,.45);}
.terminal .amt{font-size:13px; opacity:.7; letter-spacing:.05em;}
.terminal .amt b{display:block; font-size:34px; font-weight:700; margin-top:4px; letter-spacing:-.5px;}
.cardslot{margin:26px auto 8px; width:200px; height:128px; border-radius:16px; background:linear-gradient(135deg,#2E5E8C,#1F3A5F); position:relative; overflow:hidden; border:1px solid rgba(255,255,255,.15);}
.cardslot .chip2{position:absolute; top:30px; left:24px; width:34px; height:26px; border-radius:5px; background:linear-gradient(135deg,#E9C46A,#B8893B);}
.cardslot .wave{position:absolute; top:26px; right:20px; font-size:20px; opacity:.8; transform:rotate(90deg);}
.cardslot .num{position:absolute; bottom:30px; left:24px; font-family:monospace; letter-spacing:2px; font-size:13px; opacity:.85;}
.cardslot.insert{animation:insertcard .9s ease forwards;}
@keyframes insertcard{0%{transform:translateY(40px) scale(.96); opacity:.5;} 100%{transform:none; opacity:1;}}
.payline{margin-top:18px; font-size:15px; min-height:22px; font-weight:500;}
.spinner{width:26px;height:26px;border-radius:50%;border:3px solid rgba(255,255,255,.25); border-top-color:#fff; margin:16px auto 0; animation:spin .8s linear infinite;}
@keyframes spin{to{transform:rotate(360deg);}}
.approved{display:none; flex-direction:column; align-items:center; margin-top:8px;}
.approved .ok{width:64px;height:64px;border-radius:50%; background:var(--green); display:flex; align-items:center; justify-content:center; animation:pop .4s ease;}
.approved .ok svg{width:34px;height:34px;}
@keyframes pop{0%{transform:scale(0);} 70%{transform:scale(1.15);} 100%{transform:scale(1);}}
#s-receipt{justify-content:flex-start; align-items:center; padding:24px 20px 30px; overflow-y:auto;}
.receipt{width:330px; background:#fff; border-radius:6px; padding:28px 26px 22px; box-shadow:0 18px 50px rgba(31,58,95,.18); position:relative; font-family:'Inter',sans-serif; margin-top:8px; animation:print 1.1s cubic-bezier(.2,.7,.2,1);}
@keyframes print{from{clip-path:inset(0 0 100% 0); transform:translateY(-20px);} to{clip-path:inset(0 0 0 0); transform:none;}}
.receipt::before, .receipt::after{content:""; position:absolute; left:0; right:0; height:10px; background-image:radial-gradient(circle at 6px 0, transparent 5px, #fff 5px); background-size:12px 10px;}
.receipt::before{top:-9px; transform:rotate(180deg);}
.receipt::after{bottom:-9px;}
.receipt .rlogo{text-align:center; font-family:'Fraunces',serif; font-weight:700; font-size:26px;}
.receipt .rlogo .r{color:var(--red);}
.receipt .raddr{text-align:center; font-size:11px; color:var(--muted); margin:2px 0 14px;}
.rdash{border:none; border-top:1.5px dashed #C9C0AE; margin:12px 0;}
.ritem{display:flex; justify-content:space-between; font-size:13px; margin:5px 0;}
.ritem .nm{color:var(--ink);}
.rtotal{display:flex; justify-content:space-between; font-weight:700; font-size:15px; margin-top:6px;}
.rbig{text-align:center; margin:14px 0 4px;}
.rbig .lbl{font-size:11px; letter-spacing:.2em; text-transform:uppercase; color:var(--muted);}
.rbig .num{font-family:'Fraunces',serif; font-weight:700; font-size:40px; line-height:1.1; color:var(--ink);}
.rpin{margin-top:10px; background:var(--paper); border:1.5px dashed var(--ink); border-radius:12px; padding:12px; text-align:center;}
.rpin .lbl{font-size:11px; letter-spacing:.2em; text-transform:uppercase; color:var(--muted);}
.rpin .digits{display:flex; justify-content:center; gap:10px; margin-top:8px;}
.rpin .d{width:38px;height:48px;border-radius:8px;background:#fff;border:1px solid var(--line); display:flex; align-items:center; justify-content:center; font-family:'Fraunces',serif; font-weight:700; font-size:26px; color:var(--ink);}
.rfoot{text-align:center; font-size:11px; color:var(--muted); margin-top:14px; line-height:1.6;}
.done-cta{margin-top:22px;}
.ws-pill{position:absolute; top:8px; left:50%; transform:translateX(-50%); font-size:10px; color:var(--muted); display:flex; align-items:center; gap:5px; z-index:5;}
.ws-pill .dot{width:6px;height:6px;border-radius:50%;background:#bbb;}
.ws-pill .dot.on{background:var(--green);}

/* ---- language switch ---- */
.lang-switch{margin-top:30px; display:flex; align-items:center; gap:6px;}
.lang-btn{border:none; background:transparent; color:var(--muted); font-size:14px; font-weight:600; padding:8px 12px; border-radius:10px; cursor:pointer;}
.lang-btn.active{color:var(--ink); background:var(--paper2);}
.lang-sep{color:var(--line);}

/* ---- floating cart button ---- */
.fab-cart{position:fixed; right:18px; bottom:22px; width:62px; height:62px; border-radius:50%; border:none; background:var(--ink); color:#fff; cursor:pointer; box-shadow:0 10px 26px rgba(31,58,95,.4); display:flex; align-items:center; justify-content:center; z-index:40; animation:fabIn .3s ease;}
.fab-cart svg{width:26px;height:26px;}
.fab-cart:active{transform:scale(.93);}
@keyframes fabIn{from{transform:scale(0);} to{transform:scale(1);}}
.fab-badge{position:absolute; top:-4px; right:-4px; min-width:24px; height:24px; padding:0 6px; border-radius:12px; background:var(--red); color:#fff; font-size:13px; font-weight:700; display:flex; align-items:center; justify-content:center; border:2px solid var(--paper);}
.fab-cart.pulse{animation:fabPulse .4s ease;}
@keyframes fabPulse{0%{transform:scale(1);} 50%{transform:scale(1.18);} 100%{transform:scale(1);}}

/* ---- help button ---- */
.fab-help{position:fixed; left:18px; bottom:22px; height:48px; padding:0 18px 0 14px; border-radius:999px; border:1.5px solid var(--line); background:var(--card); color:var(--ink); cursor:pointer; display:flex; align-items:center; gap:8px; font-size:14px; font-weight:600; box-shadow:0 6px 18px rgba(31,58,95,.12); z-index:40;}
.fab-help svg{width:18px;height:18px; color:var(--red);}
.fab-help:active{transform:scale(.95);}
.fab-help.ringing svg{animation:ring .5s ease infinite;}
@keyframes ring{0%,100%{transform:rotate(0);} 25%{transform:rotate(-12deg);} 75%{transform:rotate(12deg);}}

/* ---- cart drawer ---- */
.drawer-backdrop{position:fixed; inset:0; background:rgba(16,36,59,.45); opacity:0; pointer-events:none; transition:opacity .25s ease; z-index:45;}
.drawer-backdrop.open{opacity:1; pointer-events:auto;}
.drawer{position:fixed; left:0; right:0; bottom:0; max-width:520px; margin:0 auto; background:var(--paper); border-radius:24px 24px 0 0; transform:translateY(110%); transition:transform .32s cubic-bezier(.2,.8,.2,1); z-index:46; max-height:80vh; display:flex; flex-direction:column; box-shadow:0 -10px 40px rgba(16,36,59,.25);}
.drawer.open{transform:translateY(0);}
.drawer-handle{width:44px;height:5px;border-radius:3px;background:var(--line); margin:12px auto 6px;}
.drawer-head{display:flex; align-items:center; justify-content:space-between; padding:6px 22px 10px;}
.drawer-head h2{font-family:'Fraunces',serif; font-weight:600; font-size:24px; margin:0;}
.drawer-close{border:none; background:transparent; font-size:30px; line-height:1; color:var(--muted); cursor:pointer; padding:0 6px;}
.drawer-items{overflow-y:auto; padding:0 22px; flex:1;}
.drawer-foot{padding:16px 22px calc(20px + env(safe-area-inset-bottom)); border-top:1px solid var(--line);}
.drawer-total{display:flex; justify-content:space-between; font-family:'Fraunces',serif; font-weight:600; font-size:20px; margin-bottom:14px;}
.drawer-actions{display:flex; gap:12px;}
.drawer-actions .btn-primary{flex:1;}
.btn-ghost{flex:1; border:1.5px solid var(--line); background:transparent; color:var(--ink); font-size:15px; font-weight:600; padding:16px; border-radius:14px; cursor:pointer;}
.btn-ghost:active{background:var(--paper2);}
.d-line{display:flex; justify-content:space-between; align-items:flex-start; gap:12px; padding:14px 0; border-bottom:1px solid var(--line);}
.d-line .nm{font-family:'Fraunces',serif; font-weight:600; font-size:17px;}
.d-line .sub{font-size:12px; color:var(--muted); margin-top:2px;}
.d-line .pr{font-weight:700; font-size:15px; white-space:nowrap;}
.d-line .rm{font-size:12px; color:var(--red); margin-top:5px; cursor:pointer; display:inline-block;}
.d-empty{text-align:center; color:var(--muted); padding:30px 0; font-size:14px;}

/* ---- toast ---- */
.toast{position:fixed; left:50%; bottom:90px; transform:translateX(-50%) translateY(20px); background:var(--ink); color:#fff; padding:14px 22px; border-radius:14px; font-size:14px; font-weight:600; opacity:0; pointer-events:none; transition:all .3s ease; z-index:60; box-shadow:0 10px 30px rgba(16,36,59,.35); max-width:90%; text-align:center;}
.toast.show{opacity:1; transform:translateX(-50%) translateY(0);}
