/* ===========================================================
 * 明天吃什么 · Neo-Brutalism 视觉系统
 * 橙色主调 / 加粗黑线 / 高饱和撞色 / 面性 ICON / C 端潮流感
 * =========================================================== */
:root {
  --orange: #FF6A00;
  --orange-d: #E85D00;
  --yellow: #FFD400;
  --blue: #4DA6FF;
  --green: #2BD97C;
  --pink: #FF4D8D;
  --purple: #A56BFF;
  --cream: #FFF1DF;
  --paper: #FFFFFF;
  --ink: #111111;
  --ink2: #4A4A4A;
  --ink3: #8A8378;
  --bw: 3px;                    /* 加粗黑线 */
  --bw-s: 2.5px;
  --sh: 6px 6px 0 var(--ink);    /* 硬阴影，无模糊 */
  --sh-s: 4px 4px 0 var(--ink);
  --sh-xs: 3px 3px 0 var(--ink);
  --r: 14px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
  margin: 0;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background-color: var(--cream);
  /* 波点网点：潮流底纹 */
  background-image: radial-gradient(rgba(17, 17, 17, .13) 1.3px, transparent 1.3px);
  background-size: 18px 18px;
  display: flex;
  justify-content: center;
  min-height: 100vh;
}

.phone {
  width: 100%;
  max-width: 460px;
  min-height: 100vh;
  position: relative;
  padding-bottom: 84px;
  overflow-x: hidden;
}

.hidden { display: none !important; }

/* ---------------- 弱化的模式行 ---------------- */
.mode-line {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: calc(100% - 36px); margin: 2px 18px 14px; padding: 7px 12px;
  background: transparent; border: 2px dashed rgba(17, 17, 17, .25); border-radius: 10px;
  font-family: inherit; font-size: 11.5px; font-weight: 800; color: var(--ink3); cursor: pointer;
}
.mode-line b { color: var(--orange); font-weight: 900; }

/* ---------------- 顶部曲线滚动带 ---------------- */
.loop-banner {
  background: var(--ink); border-bottom: 4px solid var(--ink); overflow: hidden;
}
.loop-banner svg { display: block; width: 100%; height: auto; }
.loop-text {
  font-size: 22px; font-weight: 900; letter-spacing: .5px;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  paint-order: stroke fill; stroke: var(--ink); stroke-width: 1px;
  dominant-baseline: middle;
}

/* ---------------- Header ---------------- */
.hd { display: flex; align-items: flex-start; justify-content: space-between; padding: 18px 18px 10px; }
.hd h1 {
  margin: 0; font-size: 30px; font-weight: 900; letter-spacing: -1px;
  color: var(--orange); text-shadow: 3px 3px 0 var(--ink);
}
.hd-sub { margin: 5px 0 0; font-size: 12px; font-weight: 700; color: var(--ink2); }
.icon-btn {
  border: var(--bw) solid var(--ink); background: var(--yellow); width: 42px; height: 42px;
  border-radius: 12px; cursor: pointer; box-shadow: var(--sh-s);
  display: flex; align-items: center; justify-content: center; color: var(--ink); padding: 0;
}
.icon-btn:active { transform: translate(4px, 4px); box-shadow: none; }
.icon-btn svg { width: 22px; height: 22px; }

/* ---------------- 通用控件 ---------------- */
.btn {
  border: var(--bw) solid var(--ink); cursor: pointer; font-family: inherit;
  font-size: 14px; font-weight: 900; border-radius: 12px; padding: 10px 14px;
  color: var(--ink); background: var(--paper); box-shadow: var(--sh-s);
  transition: transform .08s, box-shadow .08s;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.btn:active { transform: translate(4px, 4px); box-shadow: none !important; }
.btn.primary { background: var(--orange); color: #fff; text-shadow: 1.5px 1.5px 0 rgba(0, 0, 0, .3); }
.btn.soft { background: var(--paper); }
.btn.ghost { background: transparent; box-shadow: none; border-color: transparent; color: var(--ink3); font-weight: 800; }
.btn.ghost.danger { color: #E01E1E; }
.btn.soft.on { background: var(--pink); color: #fff; }
.btn.big { padding: 16px; font-size: 17px; border-radius: 14px; width: 100%; letter-spacing: 1px; box-shadow: var(--sh); }
.btn.tiny { padding: 6px 10px; font-size: 12px; border-radius: 10px; box-shadow: var(--sh-xs); }
.btn.sm { padding: 8px 11px; font-size: 12.5px; }
.btn.block { width: 100%; margin-top: 10px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn svg { width: 17px; height: 17px; flex: none; }
.link {
  background: none; border: none; color: var(--orange); font-size: 12.5px; font-weight: 900;
  cursor: pointer; font-family: inherit; text-decoration: underline; text-decoration-thickness: 2px;
}

.input {
  border: var(--bw-s) solid var(--ink); background: var(--paper); border-radius: 12px;
  padding: 10px 12px; font-size: 14px; font-weight: 700; font-family: inherit; color: var(--ink);
  width: 100%; outline: none; box-shadow: var(--sh-xs);
}
.input:focus { background: #FFFAF0; }
select.input { appearance: none; }

/* ---------------- 刷新提示 ---------------- */
.refresh-tip {
  margin: 4px 18px 12px; background: var(--yellow); border: var(--bw) solid var(--ink);
  border-radius: 12px; padding: 10px 12px; display: flex; align-items: center;
  justify-content: space-between; gap: 8px; font-size: 12.5px; font-weight: 800;
  box-shadow: var(--sh-xs);
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: var(--bw-s) solid var(--ink); background: var(--paper); color: var(--ink);
  padding: 7px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 900; cursor: pointer;
  font-family: inherit; box-shadow: var(--sh-xs); transition: transform .08s, box-shadow .08s, background .12s;
}
.chip:active { transform: translate(3px, 3px); box-shadow: none; }
.chip.on { background: var(--orange); color: #fff; }
.chip.on.g { background: var(--green); color: var(--ink); }
.chip.on.b { background: var(--blue); color: var(--ink); }

/* ---------------- 抽卡 ---------------- */
.card-slot { padding: 0 18px; position: relative; }
.food-card {
  background: var(--paper); border: 4px solid var(--ink); border-radius: 18px;
  box-shadow: 8px 8px 0 var(--ink); padding: 20px 18px 22px; position: relative; overflow: hidden;
}
.food-card::before {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 12px;
  background: repeating-linear-gradient(45deg, var(--ink) 0 7px, transparent 7px 14px);
  opacity: .9;
}
.food-card::after {
  content: ''; position: absolute; right: -46px; top: -46px; width: 132px; height: 132px;
  border-radius: 50%; background: var(--orange); opacity: .16;
}
.sticker {
  position: absolute; right: 14px; top: 14px; z-index: 2;
  background: var(--ink); color: var(--yellow); font-size: 10.5px; font-weight: 900;
  letter-spacing: 1px; padding: 5px 10px; border-radius: 6px; transform: rotate(-7deg);
  border: 2px solid var(--ink);
}
.fc-top { display: flex; align-items: center; gap: 8px; position: relative; z-index: 1; flex-wrap: wrap; }
.fc-badge {
  background: var(--green); border: var(--bw-s) solid var(--ink); color: var(--ink);
  font-size: 11.5px; font-weight: 900; padding: 3px 9px; border-radius: 8px;
}
.fc-stall { font-size: 12px; font-weight: 700; color: var(--ink2); }
.fc-name {
  font-size: 34px; font-weight: 900; margin: 14px 0 6px; line-height: 1.2;
  letter-spacing: -1.5px; position: relative; z-index: 1; min-height: 40px;
}
.fc-name.roll { animation: shake .1s infinite; opacity: .8; }
@keyframes shake { 0%{transform:translateX(-3px) rotate(-1deg)} 50%{transform:translateX(3px) rotate(1deg)} 100%{transform:translateX(-3px) rotate(-1deg)} }
.fc-line { font-size: 12.5px; font-weight: 700; color: var(--ink2); min-height: 19px; position: relative; z-index: 1; }
.fc-price {
  margin: 12px 0 14px; font-size: 52px; font-weight: 900; color: var(--orange);
  text-shadow: 4px 4px 0 var(--ink); line-height: 1; position: relative; z-index: 1;
}
.fc-price small { font-size: 14px; margin-left: 6px; color: var(--ink2); text-shadow: none; font-weight: 800; }

/* 弱化标签：一行浅色小字 */
.fc-meta {
  display: flex; flex-wrap: wrap; gap: 6px 10px; position: relative; z-index: 1;
  padding-top: 12px; border-top: 2px dashed rgba(17, 17, 17, .2);
}
.fc-meta span { font-size: 11.5px; font-weight: 800; color: var(--ink3); }
.fc-meta span + span::before { content: '·'; margin-right: 10px; color: rgba(17, 17, 17, .3); }

/* ---------------- 操作区 ---------------- */
.actions { padding: 14px 18px 0; }
.act-row { display: flex; gap: 8px; margin-top: 10px; }
.act-row .btn { flex: 1; font-size: 13px; padding: 11px 2px; }
.tip-line { font-size: 11.5px; font-weight: 800; color: var(--ink3); text-align: center; margin: 12px 0 0; min-height: 16px; }

/* ---------------- 菜品详情弹层 ---------------- */
.dt-badge {
  display: inline-block; background: var(--green); border: var(--bw-s) solid var(--ink);
  color: var(--ink); font-size: 11.5px; font-weight: 900; padding: 3px 9px;
  border-radius: 8px; margin-bottom: 8px;
}
.dt-stall { margin: 2px 0 10px; font-size: 12.5px; font-weight: 800; color: var(--ink2); }
.dt-price { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.dt-price b { font-size: 34px; font-weight: 900; color: var(--orange); text-shadow: 3px 3px 0 var(--ink); }
.dt-price span { font-size: 12.5px; font-weight: 900; color: var(--ink2); }
.dt-grid { border: var(--bw-s) solid var(--ink); border-radius: 12px; overflow: hidden; }
.dt-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 9px 12px; font-size: 13px; font-weight: 800;
  border-bottom: 2px dashed rgba(17, 17, 17, .18);
}
.dt-row:last-child { border-bottom: none; }
.dt-row:nth-child(odd) { background: #FFFAF1; }
.dt-row span { color: var(--ink3); font-size: 12px; flex: none; }
.dt-row b { color: var(--ink); text-align: right; }
.dt-note {
  margin-top: 12px; font-size: 12px; font-weight: 800; color: var(--ink2); line-height: 2;
  background: var(--cream); border: var(--bw-s) dashed var(--ink); border-radius: 10px; padding: 9px 10px;
}
.dt-note b {
  display: inline-block; background: var(--ink); color: var(--yellow);
  border-radius: 6px; padding: 2px 7px; margin: 0 2px; font-size: 11px; font-weight: 900;
}

/* ---------------- 清单 ---------------- */
.search-row { display: flex; gap: 8px; padding: 0 18px 12px; }
.search-row .narrow { width: 116px; flex: none; }
.lib-list { padding: 0 18px 10px; }
.lib-item {
  background: var(--paper); border: var(--bw-s) solid var(--ink); border-radius: var(--r);
  padding: 12px 13px; margin-bottom: 10px; box-shadow: var(--sh-s);
  display: flex; align-items: center; gap: 10px;
}
.lib-item .li-main { flex: 1; min-width: 0; }
.lib-item .li-name { font-size: 15px; font-weight: 900; letter-spacing: -.3px; }
.lib-item .li-meta { font-size: 11.5px; font-weight: 700; color: var(--ink3); margin-top: 3px; }
.lib-item .li-price { font-size: 17px; font-weight: 900; color: var(--orange); }
.lib-item.off { background: #F1EDE6; box-shadow: none; opacity: .65; }
.star { color: var(--orange); font-size: 11px; }

/* ---------------- 记录 ---------------- */
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 0 18px 12px; }
.stat {
  background: var(--paper); border: var(--bw-s) solid var(--ink); border-radius: var(--r);
  padding: 12px 6px; text-align: center; box-shadow: var(--sh-s);
}
.stat b { display: block; font-size: 21px; font-weight: 900; color: var(--orange); text-shadow: 2px 2px 0 var(--ink); }
.stat span { font-size: 11px; font-weight: 800; color: var(--ink3); }
.rec-list { padding: 0 18px 10px; }
.rec-item {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--paper); border: var(--bw-s) solid var(--ink); border-radius: 12px;
  padding: 11px 13px; margin-bottom: 9px; box-shadow: var(--sh-xs); font-size: 13.5px; font-weight: 900;
}
.rec-item small { color: var(--ink3); font-size: 11px; font-weight: 700; }

/* ---------------- 我的 ---------------- */
.panel {
  background: var(--paper); border: var(--bw) solid var(--ink); border-radius: var(--r);
  box-shadow: var(--sh-s); margin: 0 18px 12px; padding: 14px 16px;
}
.panel-title { font-size: 13px; font-weight: 900; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.panel-title::before {
  content: ''; width: 12px; height: 12px; background: var(--orange);
  border: 2px solid var(--ink); border-radius: 3px;
}
.panel-note { font-size: 12px; font-weight: 700; color: var(--ink3); margin: 0; }
.switch-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-top: var(--bw-s) dashed var(--ink); font-size: 13.5px; font-weight: 900;
}
.switch-row small { display: block; font-size: 11px; color: var(--ink3); font-weight: 700; }
.switch-row input[type=range] { width: 128px; accent-color: var(--orange); }
.switch-row input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--orange); }
.foot { text-align: center; font-size: 11px; font-weight: 800; color: var(--ink3); padding: 8px 0 18px; }

/* ---------------- Tabbar ---------------- */
.tabbar {
  position: fixed; bottom: 0; width: 100%; max-width: 460px;
  display: flex; background: var(--paper); border-top: var(--bw) solid var(--ink);
  padding: 8px 0 10px; z-index: 20;
}
.tab {
  flex: 1; border: none; background: none; font-family: inherit; cursor: pointer;
  color: var(--ink3); display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 0;
}
.tab .ic {
  width: 34px; height: 28px; border-radius: 9px; display: flex; align-items: center; justify-content: center;
  border: 2.5px solid transparent; color: var(--ink3);
}
.tab .ic svg { width: 21px; height: 21px; }
.tab i { font-style: normal; font-size: 10.5px; font-weight: 900; }
.tab.active { color: var(--orange); }
.tab.active .ic { background: var(--orange); border-color: var(--ink); color: #fff; box-shadow: 3px 3px 0 var(--ink); }

/* ---------------- 问卷 ---------------- */
.onboard { min-height: 100vh; }
.ob-wrap { padding: 26px 22px 40px; }
.ob-progress { height: 12px; background: var(--paper); border: var(--bw-s) solid var(--ink); border-radius: 99px; overflow: hidden; }
.ob-progress i { display: block; height: 100%; width: 25%; background: var(--orange); transition: width .3s; border-right: 2.5px solid var(--ink); }
.ob-hint {
  display: inline-block; margin: 16px 0 8px; font-size: 11.5px; font-weight: 900; letter-spacing: 2px;
  background: var(--ink); color: var(--yellow); padding: 4px 10px; border-radius: 6px;
}
.ob-title { font-size: 27px; margin: 8px 0 6px; font-weight: 900; letter-spacing: -1px; line-height: 1.3; }
.ob-sub { font-size: 13px; font-weight: 700; color: var(--ink2); margin: 0 0 22px; line-height: 1.7; }
.ob-options { display: flex; flex-direction: column; gap: 11px; }
.ob-opt {
  text-align: left; background: var(--paper); border: var(--bw) solid var(--ink); border-radius: var(--r);
  padding: 14px 15px; cursor: pointer; font-family: inherit; display: flex;
  align-items: center; gap: 12px; box-shadow: var(--sh-s); transition: transform .08s, box-shadow .08s;
}
.ob-opt:active { transform: translate(4px, 4px); box-shadow: none; }
.ob-opt .emo {
  font-size: 22px; width: 42px; height: 42px; flex: none; display: flex; align-items: center; justify-content: center;
  background: var(--yellow); border: var(--bw-s) solid var(--ink); border-radius: 11px;
}
.ob-opt b { display: block; font-size: 15.5px; font-weight: 900; color: var(--ink); }
.ob-opt small { display: block; font-size: 11.5px; font-weight: 700; color: var(--ink3); margin-top: 2px; }
.ob-opt.on { background: var(--orange); box-shadow: var(--sh-s); }
.ob-opt.on .emo { background: var(--paper); }
.ob-opt.on b { color: #fff; }
.ob-opt.on small { color: rgba(255, 255, 255, .88); }
.ob-multi .ob-opt.on { background: var(--green); }
.ob-multi .ob-opt.on b { color: var(--ink); }
.ob-multi .ob-opt.on small { color: rgba(0, 0, 0, .6); }
.ob-foot { margin-top: 24px; display: flex; justify-content: space-between; gap: 10px; }

/* ---------------- Modal / Toast ---------------- */
.modal {
  position: fixed; inset: 0; background: rgba(17, 17, 17, .55); display: flex;
  align-items: center; justify-content: center; z-index: 50; padding: 18px;
}
.modal-body {
  background: var(--paper); border: var(--bw) solid var(--ink); border-radius: 18px;
  box-shadow: 8px 8px 0 var(--ink); width: 100%; max-height: 84vh; overflow-y: auto; padding: 18px;
}
.modal-body h3 { margin: 0 0 14px; font-size: 18px; font-weight: 900; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-grid label { font-size: 11.5px; font-weight: 900; color: var(--ink2); display: block; }
.form-grid label.inline { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink); }
.form-grid .input { margin-top: 4px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; }
.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%) translateY(16px);
  background: var(--yellow); color: var(--ink); border: var(--bw) solid var(--ink);
  box-shadow: var(--sh-s); padding: 11px 18px; border-radius: 12px;
  font-size: 13px; font-weight: 900; opacity: 0; pointer-events: none; transition: .22s; z-index: 60; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
