:root {
  --brand: #ff5a1f;
  --brand-strong: #ef4a0d;
  --brand-soft: #fff1e8;
  --amber: #ffb020;
  --ink: #181b22;
  --sub: #5c6472;
  --muted: #8b93a1;
  --line: #edeff3;
  --bg: #f5f6f8;
  --card: #fff;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --shadow: 0 10px 30px rgba(24, 27, 34, 0.08);
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans", system-ui, sans-serif;
  color: var(--ink);
  background: #e6e9ee;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4, p { margin: 0; }

.phone {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  box-shadow: 0 0 70px rgba(15, 20, 30, 0.16);
  overflow-x: hidden;
}

@media (min-width: 600px) {
  body { background: radial-gradient(circle at 20% 0%, #f1f3f7, #dfe3ea 55%); }
}

.app {
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: 24px;
}

.app.with-tabs { padding-bottom: calc(90px + var(--safe-b)); }
.app.has-paybar { padding-bottom: calc(122px + var(--safe-b)); }
.app.screen-enter { animation: fadeUp 0.24s ease both; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.ic {
  width: 22px;
  height: 22px;
  display: inline-block;
  flex: none;
  vertical-align: middle;
}

/* ---------- top bars ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(245, 246, 248, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 8px;
}

.brand { display: flex; align-items: center; gap: 9px; }

.logo {
  width: 31px;
  height: 31px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), #ff8a3d);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 17px;
  box-shadow: 0 6px 14px rgba(255, 90, 31, 0.32);
}

.wordmark {
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.4px;
  line-height: 1.05;
}

.wordmark .dot { color: var(--brand); }

.tagline {
  font-size: 9.5px;
  color: var(--muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-top: 1px;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  color: var(--sub);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.lang-btn .ic { width: 15px; height: 15px; color: var(--brand); }

.page-head {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(245, 246, 248, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.page-head h1 {
  flex: 1;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.2px;
}

.page-head .icon-btn {
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: none;
  width: 36px;
  height: 36px;
}

.page-head .right { margin-left: auto; }

/* ---------- home ---------- */

.greet { padding: 4px 16px 0; }

.loc {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: var(--sub);
  font-weight: 600;
}

.loc .ic { width: 14px; height: 14px; color: var(--brand); }

.greet h1 {
  font-size: 22px;
  letter-spacing: -0.4px;
  margin: 8px 0 2px;
}

.greet-sub { font-size: 12.5px; color: var(--muted); }

.search {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 14px 16px 0;
  height: 46px;
  padding: 0 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.search .ic { width: 18px; height: 18px; color: var(--muted); }
.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  font-size: 15px;
  background: transparent;
  color: var(--ink);
}
.search input::placeholder { color: #aab1bc; }

.hero {
  position: relative;
  display: block;
  width: calc(100% - 32px);
  margin: 14px 16px 0;
  padding: 18px;
  border-radius: 20px;
  text-align: left;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(120deg, #ff6a2b, #ff3d6e);
  box-shadow: 0 18px 30px -16px rgba(255, 74, 31, 0.72);
  transition: transform 0.15s ease;
}

.hero:active { transform: scale(0.985); }

.hero::after {
  content: "";
  position: absolute;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  right: -48px;
  top: -66px;
}

.hero::before {
  content: "";
  position: absolute;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  left: -44px;
  bottom: -60px;
}

.hero .eyebrow {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(4px);
}

.hero .eyebrow .ic { width: 13px; height: 13px; }

.hero-title {
  position: relative;
  display: block;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.3px;
  margin-top: 9px;
  padding-right: 60px;
}

.hero-sub {
  position: relative;
  display: block;
  font-size: 12px;
  opacity: 0.92;
  margin-top: 3px;
  padding-right: 60px;
}

.hero .cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
  height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  background: #fff;
  color: var(--brand-strong);
  font-size: 12.5px;
  font-weight: 800;
}

.hero .cta .ic { width: 14px; height: 14px; }

.hero .plate {
  position: absolute;
  right: 16px;
  bottom: 4px;
  font-size: 60px;
  transform: rotate(-7deg);
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.18));
  pointer-events: none;
}

.cats {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 16px 16px 6px;
  scrollbar-width: none;
}
.cats::-webkit-scrollbar { display: none; }

.chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  color: var(--sub);
  white-space: nowrap;
  transition: all 0.16s ease;
}

.chip.on {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
  box-shadow: 0 8px 16px -8px rgba(24, 27, 34, 0.65);
}

.shead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 14px 16px 8px;
}

.shead h2 { font-size: 16.5px; letter-spacing: -0.2px; }
.shead .count { font-size: 12px; color: var(--muted); }

.rlist {
  padding: 2px 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rcard {
  display: flex;
  gap: 12px;
  padding: 11px;
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(0, 0, 0, 0.03);
  box-shadow: 0 8px 20px -14px rgba(24, 27, 34, 0.36);
  transition: transform 0.15s ease;
}

.rcard:active { transform: scale(0.985); }

.rthumb {
  flex: none;
  width: 78px;
  height: 78px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 36px;
  position: relative;
  overflow: hidden;
}

.rthumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.35), transparent 55%);
}

.rbody {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.rname {
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rmeta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--muted);
  flex-wrap: wrap;
}

.star { color: #ff9f1c; font-weight: 700; }

.rdesc {
  font-size: 12px;
  color: var(--sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rpromo {
  margin-top: 1px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 700;
  color: #e8431a;
  background: #fff0e9;
  border-radius: 6px;
  padding: 2px 6px;
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rpromo .ic { width: 12px; height: 12px; }

/* ---------- restaurant ---------- */

.cover {
  position: relative;
  height: 190px;
  display: grid;
  place-items: center;
}

.cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), transparent 38%, rgba(0, 0, 0, 0.05));
}

.cover-actions {
  position: absolute;
  top: calc(10px + env(safe-area-inset-top, 0px));
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  z-index: 5;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14);
  color: var(--ink);
}

.icon-btn .ic { width: 20px; height: 20px; }

.cover-emoji {
  font-size: 86px;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 14px 20px rgba(0, 0, 0, 0.2));
}

.r-sheet {
  position: relative;
  z-index: 2;
  margin-top: -24px;
  padding: 18px 16px 30px;
  border-radius: 24px 24px 0 0;
  background: var(--bg);
}

.r-sheet.has-cart { padding-bottom: 112px; }

.r-title { font-size: 22px; font-weight: 800; letter-spacing: -0.4px; }

.r-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--sub);
  margin-top: 5px;
}

.r-desc { font-size: 13px; color: var(--sub); margin-top: 10px; }

.scan-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e9f8ef;
  color: #0f8a4b;
  font-size: 12px;
  font-weight: 700;
}

.scan-chip .ic { width: 14px; height: 14px; }

.coupon-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 11px 13px;
  border-radius: 14px;
  background: linear-gradient(120deg, #fff3ec, #ffe8dc);
  border: 1px dashed #ffb48a;
}

.cp-ic {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--brand);
  flex: none;
}

.cp-ic .ic { width: 18px; height: 18px; }

.coupon-bar strong { display: block; font-size: 13px; color: #d6451b; }
.coupon-bar span { display: block; font-size: 11px; color: #b4572f; margin-top: 1px; }

.mhead {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 22px 0 10px;
}
.mhead h3 { font-size: 16px; letter-spacing: -0.2px; }
.mhead span { font-size: 12px; color: var(--muted); }

.dishes { display: flex; flex-direction: column; gap: 12px; }

.dish {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 6px 16px -12px rgba(0, 0, 0, 0.34);
}

.dthumb {
  flex: none;
  width: 68px;
  height: 68px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 32px;
}

.dbody { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.dname {
  font-size: 14.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  line-height: 1.3;
}

.hot {
  font-size: 10px;
  font-weight: 700;
  color: #e8431a;
  background: #fff0e9;
  padding: 1px 5px;
  border-radius: 5px;
}

.ddesc {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dfoot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
}

.price { font-size: 15px; font-weight: 800; }
.price small { font-size: 11px; font-weight: 700; color: var(--brand); margin-right: 1px; }

.add-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 12px -4px rgba(255, 90, 31, 0.64);
  transition: transform 0.12s ease;
}
.add-btn:active { transform: scale(0.92); }
.add-btn .ic { width: 16px; height: 16px; }

.stepper { display: inline-flex; align-items: center; gap: 9px; }

.step-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  transition: transform 0.12s ease;
}
.step-btn:active { transform: scale(0.9); }
.step-btn.plus { background: var(--brand); border-color: var(--brand); color: #fff; }
.step-btn .ic { width: 14px; height: 14px; }

.qty { min-width: 13px; text-align: center; font-weight: 700; font-size: 13px; }

.cartbar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(12px + var(--safe-b));
  width: calc(100% - 24px);
  max-width: 456px;
  z-index: 35;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 9px 9px 16px;
  border-radius: 18px;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 18px 40px -14px rgba(0, 0, 0, 0.6);
  animation: fadeUp 0.22s ease both;
}

.cb-info { flex: 1; min-width: 0; }
.cb-total { font-weight: 800; font-size: 17px; letter-spacing: -0.2px; }
.cb-sub { font-size: 11px; color: rgba(255, 255, 255, 0.62); margin-top: 1px; }

.cb-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 42px;
  padding: 0 16px;
  border-radius: 13px;
  background: var(--brand);
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}
.cb-btn .ic { width: 17px; height: 17px; }

/* ---------- checkout ---------- */

.rmini {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 16px 0;
  padding: 10px 12px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 6px 18px -14px rgba(0, 0, 0, 0.4);
}

.rmini .thumb {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 21px;
  flex: none;
}

.rmini .nm { font-weight: 700; font-size: 14px; }
.rmini .mt { font-size: 11.5px; color: var(--muted); margin-top: 1px; }

.card {
  margin: 12px 16px 0;
  padding: 14px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 6px 18px -14px rgba(0, 0, 0, 0.4);
}

.card-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--sub);
  letter-spacing: 0.02em;
  margin-bottom: 9px;
}

.ci { display: flex; align-items: center; gap: 10px; padding: 9px 0; }
.ci + .ci { border-top: 1px dashed var(--line); }

.cthumb {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 20px;
  flex: none;
}

.cname {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.3;
}

.cprice {
  display: block;
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  margin-top: 2px;
}

.cpn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px;
  border-radius: 12px;
  text-align: left;
  background: var(--brand-soft);
  border: 1px solid transparent;
}

.cpn.on { border-color: #ffc6a6; }

.cpn .val { font-weight: 800; color: #d6451b; font-size: 15px; flex: none; }

.cpn .txt { flex: 1; font-size: 11.5px; color: #b4572f; line-height: 1.35; }
.cpn .txt b { font-weight: 700; }

.switch {
  position: relative;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: #e3e6eb;
  transition: background 0.2s ease;
  flex: none;
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
  transition: left 0.2s ease;
}
.switch.on { background: var(--brand); }
.switch.on::after { left: 21px; }

.cpn-empty { font-size: 12px; color: var(--muted); padding: 5px 2px; }

.sum {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--sub);
  padding: 4px 0;
}

.sum .neg { color: var(--brand); font-weight: 700; }

.sum.total {
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  padding-top: 10px;
  margin-top: 6px;
  border-top: 1px solid var(--line);
}

.note {
  display: flex;
  gap: 8px;
  margin: 12px 16px 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #eff6ff;
  color: #2f5e9e;
  font-size: 11.5px;
  line-height: 1.5;
}

.note .ic { width: 16px; height: 16px; flex: none; margin-top: 1px; }

.paybar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 480px;
  z-index: 35;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px calc(12px + var(--safe-b));
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}

.paybar .pt { flex: 1; min-width: 0; }
.paybar .pt small { display: block; font-size: 11px; color: var(--muted); }
.paybar .pt strong { font-size: 20px; letter-spacing: -0.3px; }

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 20px;
  border-radius: 13px;
  font-weight: 800;
  font-size: 14px;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), #ff7a3d);
  color: #fff;
  box-shadow: 0 12px 24px -10px rgba(255, 90, 31, 0.72);
}

.btn-primary:active { transform: scale(0.985); }

.btn-ghost {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
}

/* ---------- success ---------- */

.success {
  min-height: 100vh;
  min-height: 100dvh;
  padding: 42px 20px calc(32px + var(--safe-b));
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: linear-gradient(180deg, #fff6f0, var(--bg) 46%);
}

.check-ring {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 18px 36px -12px rgba(22, 163, 74, 0.6);
  animation: pop 0.42s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}

.check-ring .ic { width: 42px; height: 42px; stroke-width: 2.6; }

@keyframes pop {
  from { transform: scale(0.6); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.success h1 { font-size: 23px; letter-spacing: -0.4px; margin: 16px 0 4px; }
.success .sub { color: var(--sub); font-size: 13px; max-width: 300px; }

.order-card {
  width: 100%;
  margin-top: 22px;
  padding: 16px;
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--shadow);
  text-align: left;
}

.orow {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  padding: 5px 0;
}
.orow span { color: var(--muted); }
.orow strong { font-weight: 700; text-align: right; }

.success .coupon { margin: 14px 0 0; width: 100%; }

.btns { display: flex; gap: 10px; width: 100%; margin-top: 22px; }
.btns .btn-primary { flex: 1; }
.btns .btn-ghost { flex: none; }

/* ---------- orders ---------- */

.order-list { padding: 4px 0 8px; }

.order-item {
  margin: 12px 16px 0;
  padding: 14px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 8px 22px -16px rgba(0, 0, 0, 0.5);
}

.oi-head { display: flex; align-items: center; gap: 10px; }

.oi-head .thumb {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 21px;
  flex: none;
}

.oi-head .nm {
  flex: 1;
  min-width: 0;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pill {
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e9f8ef;
  color: #0f8a4b;
  flex: none;
}

.oi-items {
  margin-top: 9px;
  font-size: 12px;
  color: var(--sub);
  line-height: 1.55;
}

.oi-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.oi-foot .time { font-size: 11px; color: var(--muted); }
.oi-foot .amt { font-weight: 800; }

/* ---------- coupons ---------- */

.coupon-list { padding: 2px 0 8px; }

.coupon {
  position: relative;
  display: flex;
  margin: 12px 16px 0;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 24px -18px rgba(0, 0, 0, 0.55);
}

.cval {
  position: relative;
  flex: none;
  width: 96px;
  padding: 16px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, #ff6a2b, #ff3d6e);
}

.cval b { font-size: 23px; letter-spacing: -0.5px; }
.cval small { font-size: 9.5px; opacity: 0.9; letter-spacing: 0.1em; margin-top: 2px; }

.cval::before,
.cval::after {
  content: "";
  position: absolute;
  right: -7px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg);
}
.cval::before { top: -7px; }
.cval::after { bottom: -7px; }

.cinfo { flex: 1; min-width: 0; padding: 12px 14px; }

.ctop { display: flex; align-items: center; gap: 8px; }
.ctop h4 {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cstate {
  flex: none;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
}
.cstate.available { background: #e9f8ef; color: #0f8a4b; }
.cstate.used, .cstate.expired { background: #eef0f4; color: var(--muted); }

.coupon p { margin-top: 3px; font-size: 11.5px; color: var(--sub); }
.coupon p.at { color: var(--muted); }
.coupon p.due { color: var(--muted); font-size: 10.5px; margin-top: 5px; }

.coupon.used .cval,
.coupon.expired .cval { background: linear-gradient(135deg, #b9c0ca, #98a1ad); }
.coupon.used, .coupon.expired { opacity: 0.84; }

/* ---------- me ---------- */

.me-hero {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 4px 16px 0;
  padding: 18px;
  border-radius: 20px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(120deg, #22262f, #3a4150);
}

.me-hero::after {
  content: "";
  position: absolute;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  right: -40px;
  top: -60px;
}

.avatar {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 20px;
  background: linear-gradient(135deg, #ff6a2b, #ffb020);
  box-shadow: 0 10px 20px -8px rgba(255, 106, 43, 0.7);
  flex: none;
}

.me-hero .nm { font-size: 17px; font-weight: 800; }
.me-hero .role { font-size: 11.5px; color: rgba(255, 255, 255, 0.62); margin-top: 2px; }

.list {
  margin: 12px 16px 0;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 22px -18px rgba(0, 0, 0, 0.5);
}

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.row:last-child { border-bottom: 0; }
.row:active { background: #fafbfc; }

.row .ric {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand);
  flex: none;
}
.row .ric .ic { width: 17px; height: 17px; }

.row .rlabel { flex: 1; min-width: 0; }
.row .rval { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.row .chev { width: 17px; height: 17px; color: #c3c9d2; }

.version {
  margin: 22px 0 0;
  text-align: center;
  font-size: 11px;
  color: #aeb5bf;
  letter-spacing: 0.02em;
}

/* ---------- tabbar ---------- */

.tabbar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  z-index: 40;
  width: 100%;
  max-width: 480px;
  display: none;
  padding: 8px 10px calc(8px + var(--safe-b));
  background: rgba(255, 255, 255, 0.93);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.tab {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 4px 0;
  border-radius: 12px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
}

.tab .ic { width: 23px; height: 23px; }
.tab.on { color: var(--brand); }

.tab .badge {
  position: absolute;
  top: -1px;
  right: calc(50% - 22px);
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

/* ---------- empty / toast / sheet ---------- */

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 5px;
  padding: 54px 30px;
}
.empty .em { font-size: 50px; margin-bottom: 4px; filter: saturate(0.92); }
.empty h3 { font-size: 15px; }
.empty p { font-size: 12.5px; color: var(--muted); max-width: 260px; }
.empty .btn-primary, .empty .btn-ghost { margin-top: 14px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(94px + var(--safe-b));
  transform: translate(-50%, 10px);
  z-index: 80;
  max-width: 88vw;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(24, 27, 34, 0.94);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.overlay { position: fixed; inset: 0; z-index: 100; display: none; }
.overlay.show { display: block; }

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 12, 16, 0.45);
  animation: fade 0.2s ease;
}

.sheet {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 100%;
  max-width: 480px;
  transform: translateX(-50%);
  padding: 8px 16px calc(22px + var(--safe-b));
  border-radius: 22px 22px 0 0;
  background: #fff;
  box-shadow: 0 -20px 40px rgba(0, 0, 0, 0.2);
  animation: slideUp 0.26s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.sheet-grab {
  width: 38px;
  height: 4px;
  border-radius: 999px;
  background: #e2e5ea;
  margin: 6px auto 10px;
}

.sheet h3 { font-size: 17px; }
.sheet-sub { margin: 2px 0 10px; font-size: 12px; color: var(--muted); }

.lang-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 8px;
  padding: 14px 12px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 15px;
  font-weight: 600;
}
.lang-opt.on { border-color: var(--brand); background: var(--brand-soft); color: #c2410c; }
.lang-check { width: 20px; height: 20px; color: var(--brand); }
.lang-check .ic { width: 20px; height: 20px; }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp {
  from { transform: translate(-50%, 100%); }
  to { transform: translate(-50%, 0); }
}

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