:root{
  --bg:#0b0f19;
  --panel: rgba(17,24,39,.92);
  --panel2: rgba(15,23,42,.55);
  --text:#e5e7eb;
  --muted:#94a3b8;
  --line: rgba(148,163,184,.18);
  --accent:#60a5fa;
  --ok:#34d399;
  --warn:#fbbf24;
  --bad:#f87171;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,"Hiragino Kaku Gothic ProN","Meiryo",sans-serif;
  background:linear-gradient(180deg,#0b0f19,#0f172a);
  color:var(--text);
}

@media (prefers-reduced-motion: reduce){
  *{animation:none!important;transition:none!important}
}

/* Motion */
@keyframes fadeUp {from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}
@keyframes pop {from{opacity:.9;transform:scale(.985)}to{opacity:1;transform:scale(1)}}
@keyframes shimmer {0%{transform:translateX(-60%)}100%{transform:translateX(160%)}}

/* Hero */
.hero{position:relative;height:200px;overflow:hidden}
.hero img{width:100%;height:100%;object-fit:cover;transform:scale(1.02);filter:saturate(1.05)}
.hero-overlay{
  position:absolute;inset:0;
  background:linear-gradient(180deg,rgba(0,0,0,.35),rgba(0,0,0,.86));
  display:flex;flex-direction:column;justify-content:flex-end;
  padding:16px;
  animation:fadeUp .5s ease-out both;
}
.hero-top{display:flex;gap:8px;align-items:center;justify-content:space-between;margin-bottom:10px}
.pill{
  font-size:11px;color:var(--text);
  border:1px solid rgba(255,255,255,.18);
  background:rgba(0,0,0,.35);
  padding:6px 10px;border-radius:999px;
  backdrop-filter: blur(8px);
}
.pill.ghost{cursor:pointer;opacity:.95}
.pill.ghost:hover{opacity:1}
.hero h1{margin:0;font-size:20px;letter-spacing:.2px}
.hero p{margin:6px 0 0;color:var(--muted);font-size:13px}

/* Layout */
.container{padding:16px;display:grid;gap:18px}
section{animation:fadeUp .35s ease-out both}
section.is-dim{opacity:.55;filter:saturate(.92)}
h2{font-size:15px;margin:0 0 8px;display:flex;align-items:center;gap:8px}
.badge{
  font-size:11px;color:var(--muted);
  border:1px solid var(--line);
  padding:3px 8px;border-radius:999px;
  background:rgba(15,23,42,.6);
}

/* Stepper */
.stepper{
  display:flex;gap:8px;
  padding:10px 10px;
  border:1px solid var(--line);
  border-radius:16px;
  background:rgba(15,23,42,.45);
  backdrop-filter: blur(10px);
}
.step{
  flex:1;
  display:flex;gap:8px;align-items:center;justify-content:center;
  font-size:12px;color:var(--muted);
  padding:10px 8px;border-radius:14px;
  border:1px solid transparent;
}
.step span{
  width:20px;height:20px;border-radius:999px;
  display:grid;place-items:center;
  background:rgba(148,163,184,.15);
  border:1px solid rgba(148,163,184,.25);
  color:var(--text);font-weight:800;font-size:12px;
}
.step.on{
  color:var(--text);
  background:rgba(96,165,250,.10);
  border-color:rgba(96,165,250,.25);
}
.step.done span{
  background:rgba(52,211,153,.18);
  border-color:rgba(52,211,153,.35);
}

/* Grid */
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px}

/* Cards */
.card{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:16px;
  overflow:hidden;
  cursor:pointer;
  position:relative;
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease, opacity .12s ease;
  animation:fadeUp .35s ease-out both;
}
.card:hover{transform:translateY(-2px);border-color:rgba(148,163,184,.35);box-shadow:0 14px 40px rgba(0,0,0,.25)}
.card:active{transform:translateY(0)}
.card.selected{
  border-color: rgba(96,165,250,.7);
  box-shadow: 0 0 0 3px rgba(96,165,250,.18);
}
.card img{width:100%;height:110px;object-fit:cover}
.card .body{padding:10px}
.card .title{font-weight:850;font-size:14px}
.card .sub{font-size:12px;color:var(--muted)}
.card .check{
  position:absolute;top:10px;right:10px;
  width:26px;height:26px;border-radius:999px;
  display:grid;place-items:center;
  background:rgba(0,0,0,.55);
  border:1px solid rgba(255,255,255,.16);
  opacity:0;transform:scale(.95);
  transition: opacity .12s ease, transform .12s ease;
  backdrop-filter: blur(8px);
}
.card.selected .check{opacity:1;transform:scale(1)}
.card .check::before{content:"✓";font-weight:900}
.card .tag{
  position:absolute;left:10px;top:10px;
  font-size:11px;color:var(--text);
  padding:6px 10px;border-radius:999px;
  border:1px solid rgba(255,255,255,.16);
  background:rgba(0,0,0,.35);
  backdrop-filter: blur(8px);
}

/* Slots */
.slot{
  border-radius:16px;
  padding:12px;
  background:rgba(11,18,32,.9);
  border:1px solid var(--line);
  cursor:pointer;
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease, opacity .12s ease;
  animation:fadeUp .35s ease-out both;
}
.slot:hover{transform:translateY(-2px);border-color:rgba(148,163,184,.35);box-shadow:0 14px 40px rgba(0,0,0,.22)}
.slot:active{transform:translateY(0)}
.slot .time{font-weight:900}
.slot .remain{font-size:12px;color:var(--muted);margin-top:2px}
.slot.full{opacity:.35;cursor:not-allowed;filter:grayscale(.2)}
.slot.selected{
  border-color: rgba(96,165,250,.7);
  box-shadow: 0 0 0 3px rgba(96,165,250,.18);
}

/* Buttons */
.row{
  display:flex;gap:10px;align-items:center;justify-content:space-between;flex-wrap:wrap
}
.btn{
  border:none;
  background:linear-gradient(90deg,#2563eb,#60a5fa);
  color:white;
  padding:12px 14px;
  border-radius:14px;
  font-weight:900;
  cursor:pointer;
  transition: transform .12s ease, filter .12s ease, opacity .12s ease;
}
.btn:hover{transform:translateY(-1px);filter:saturate(1.05)}
.btn:active{transform:translateY(0)}
.btn:disabled{opacity:.45;cursor:not-allowed}
.btn.ghost{
  background:transparent;
  border:1px solid rgba(148,163,184,.28);
}
.btn.ghost:hover{border-color:rgba(148,163,184,.5)}
.mini{font-size:12px;color:var(--muted)}

/* Order panel */
#order{display:grid;gap:12px}
.panel{
  background:rgba(15,23,42,.45);
  border:1px dashed rgba(148,163,184,.30);
  border-radius:16px;
  padding:12px;
  animation:pop .22s ease-out both;
}

/* Ticket */
.ticket{
  background:linear-gradient(135deg,#2563eb,#60a5fa);
  border-radius:18px;
  padding:16px;
  text-align:center;
  position:relative;
  overflow:hidden;
  animation:pop .28s ease-out both;
  box-shadow:0 18px 60px rgba(37,99,235,.25);
}
.ticket::after{
  content:"";
  position:absolute;top:0;left:0;height:100%;width:45%;
  background:linear-gradient(90deg,rgba(255,255,255,0),rgba(255,255,255,.22),rgba(255,255,255,0));
  transform:translateX(-60%);
  animation:shimmer 1.2s ease-out 1;
}
.ticket h3{margin:0 0 10px;font-size:16px}
.ticket .qr{
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;
  font-size:12px;
  word-break:break-all;
  background:rgba(0,0,0,.18);
  border:1px solid rgba(255,255,255,.25);
  border-radius:12px;
  padding:10px;
}
.status-pill{
  display:inline-flex;gap:8px;align-items:center;
  padding:8px 12px;border-radius:999px;
  border:1px solid rgba(255,255,255,.25);
  background:rgba(0,0,0,.18);
  margin-bottom:10px;
  font-size:12px;font-weight:900;
}
.dot{width:8px;height:8px;border-radius:999px;background:var(--muted)}
.dot.ok{background:var(--ok)}
.dot.warn{background:var(--warn)}
.dot.bad{background:var(--bad)}

/* Toast */
.toast{
  position:fixed;left:50%;bottom:14px;transform:translateX(-50%);
  background:rgba(2,6,23,.86);
  border:1px solid rgba(148,163,184,.28);
  color:var(--text);
  padding:10px 12px;border-radius:999px;
  font-size:12px;
  animation:pop .2s ease-out both;
  backdrop-filter: blur(10px);
  z-index:999;
}
.hidden{display:none}

/* Skeleton */
.skel{
  background:rgba(148,163,184,.08);
  border:1px solid rgba(148,163,184,.12);
  border-radius:16px;
  height:140px;
  position:relative;
  overflow:hidden;
}
.skel::after{
  content:"";
  position:absolute;top:0;left:0;height:100%;width:50%;
  background:linear-gradient(90deg,rgba(255,255,255,0),rgba(255,255,255,.14),rgba(255,255,255,0));
  transform:translateX(-60%);
  animation:shimmer 1.2s ease-in-out infinite;
}

/* Bottom Sheet */
.sheet-backdrop{
  position:fixed;inset:0;
  background:rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
  opacity:0;
  pointer-events:none;
  transition: opacity .15s ease;
  z-index:1000;
}
.sheet-backdrop.show{opacity:1;pointer-events:auto}

.sheet{
  position:fixed;left:0;right:0;bottom:0;
  background:rgba(17,24,39,.96);
  border:1px solid rgba(148,163,184,.18);
  border-top-left-radius:18px;
  border-top-right-radius:18px;
  transform: translateY(22px);
  opacity:0;
  pointer-events:none;
  transition: opacity .15s ease, transform .15s ease;
  z-index:1001;
  box-shadow:0 -18px 50px rgba(0,0,0,.35);
  touch-action: none; /* for swipe */
}
.sheet.show{transform:translateY(0);opacity:1;pointer-events:auto;animation:fadeUp .18s ease-out both}
.sheet-inner{max-width:980px;margin:0 auto;padding:10px 14px 16px}
.sheet-grab{
  width:44px;height:5px;border-radius:999px;
  background:rgba(148,163,184,.35);
  margin:6px auto 10px;
}
.sheet-title{font-weight:950;font-size:15px;margin:0 0 6px}
.sheet-sub{font-size:12px;color:var(--muted);margin:0 0 10px}
.sheet-grid{display:grid;gap:10px;margin-top:10px}
.sheet-row{
  display:flex;justify-content:space-between;gap:10px;align-items:center;
  padding:10px 12px;border-radius:14px;
  border:1px solid rgba(148,163,184,.18);
  background:rgba(15,23,42,.55);
}
.sheet-row .k{font-size:12px;color:var(--muted)}
.sheet-row .v{font-weight:900;font-size:13px}
.sheet-actions{display:flex;gap:10px;margin-top:12px}
.sheet-actions .btn{flex:1}
