/* 铁伴 IronMate · 设计契约
   Tech: vanilla / pure-static
   Style tier: warm-paper + hand-drawn cartoon
   Tokens: paper #F7F1E6 / card #FFFCF7 / ink #241E18 / line #E8DECD
           accent #FF6B35 / green #2F7D5C / blue #3E6E8E
   Radius: 20 card / 14 control / 999 pill
   App Shell: 430px 竖屏卡片 + 固定底部 3 项导航（小人 / 记录 / 数据）
*/

:root {
  --paper: #F7F1E6;
  --card: #FFFCF7;
  --ink: #241E18;
  --ink-2: #837666;
  --ink-3: #AFA292;
  --line: #E8DECD;
  --accent: #FF6B35;
  --accent-soft: #FFE8DC;
  --green: #2F7D5C;
  --green-soft: #E3F0E8;
  --blue: #3E6E8E;
  --radius: 20px;
  --radius-sm: 14px;
  --shadow: 0 8px 22px rgba(60, 44, 24, .07);
  --shadow-soft: 0 2px 8px rgba(60, 44, 24, .05);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: #E9E1D2;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Segoe UI", sans-serif;
  -webkit-tap-highlight-color: transparent;
  font-size: 15px;
  line-height: 1.5;
}

button {
  font-family: inherit; color: inherit; cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
input { font-family: inherit; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- App Shell ---------- */
.app {
  position: relative;
  max-width: 430px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: env(safe-area-inset-top) 18px calc(112px + env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 18% 8%, rgba(255, 107, 53, .05), transparent 42%),
    radial-gradient(circle at 88% 30%, rgba(47, 125, 92, .05), transparent 46%),
    var(--paper);
  box-shadow: 0 0 0 1px rgba(60, 44, 24, .05), 0 24px 70px rgba(60, 44, 24, .18);
}

.screen { padding-top: 26px; }
.screen.hidden { display: none; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.screen:not(.hidden) { animation: fadeUp .28s ease both; }

/* ---------- 头部 ---------- */
.app-header { margin-bottom: 16px; }

.brand-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.brand {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 700; letter-spacing: .08em;
  color: var(--ink-2);
}
.brand-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 107, 53, .16);
}
.brand-en {
  font-size: 10px; letter-spacing: .18em; color: var(--ink-3); font-weight: 600;
}

.icon-btn {
  width: 36px; height: 36px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--card);
  display: grid; place-items: center; color: var(--ink-2);
  transition: transform .15s ease, color .15s ease;
}
.icon-btn:active { transform: scale(.94); color: var(--ink); }

.page-title {
  margin: 0;
  font-size: 27px;
  line-height: 1.22;
  font-weight: 800;
  letter-spacing: -.02em;
}
.hl {
  background: linear-gradient(transparent 60%, var(--accent-soft) 60%);
  padding: 0 2px;
  border-radius: 3px;
}
.page-sub {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--ink-2);
}

/* ---------- 卡片 ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}

.card-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 12px;
}
.card-head h3, .gear-card h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.01em;
}
.card-note {
  font-size: 11.5px;
  color: var(--ink-3);
  letter-spacing: .02em;
}

.card-note em { font-style: normal; font-size: 10.5px; margin-left: 1px; }

/* ---------- 小人舞台 ---------- */
.stage-card {
  position: relative;
  padding: 16px 16px 14px;
  background:
    radial-gradient(circle at 50% 34%, #FFFBF2 0%, #FFFCF7 62%),
    var(--card);
  overflow: hidden;
}

.stage-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  position: relative; z-index: 2;
}
.char-name-row { display: flex; align-items: center; gap: 8px; }
.char-name { font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.level-chip {
  font-size: 11px; font-weight: 800;
  color: #fff; background: var(--ink);
  padding: 2px 9px; border-radius: 999px;
  letter-spacing: .03em;
}
.char-meta { margin-top: 3px; font-size: 12px; color: var(--ink-2); }
.char-meta i.up {
  font-style: normal; font-weight: 700; font-size: 11px;
  color: var(--green); background: var(--green-soft);
  padding: 1px 5px; border-radius: 999px; margin-left: 2px;
}
.weekly-chip {
  font-size: 11.5px; font-weight: 700; color: var(--accent);
  background: var(--accent-soft);
  padding: 5px 10px; border-radius: 999px;
  white-space: nowrap;
}

.stage {
  position: relative;
  height: 292px;
  display: flex; align-items: flex-end; justify-content: center;
  cursor: pointer;
  user-select: none;
}
.stage::before {
  content: "";
  position: absolute;
  left: 50%; top: 12px;
  width: 214px; height: 214px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 107, 53, .15), rgba(255, 107, 53, 0) 70%);
}
.stage::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 18px;
  width: 168px; height: 20px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(69, 49, 28, .16), rgba(69, 49, 28, 0) 72%);
}
.char-wrap {
  position: relative; z-index: 1;
  animation: idleFloat 4.6s ease-in-out infinite;
  line-height: 0;
}
.char-wrap svg { width: 232px; height: 290px; display: block; }

.pump-strip {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; flex-wrap: wrap;
  min-height: 20px; margin: -10px 0 4px;
}
.ps-label { font-size: 10.5px; letter-spacing: .14em; color: var(--ink-3); font-weight: 700; }
.ps-label.muted { letter-spacing: .02em; font-weight: 400; color: var(--ink-3); }
.ps-pill {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600; color: var(--ink);
  background: var(--card); border: 1px solid var(--line);
  padding: 2px 8px; border-radius: 999px;
}
.ps-pill::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: var(--pc, var(--accent));
}
.ps-hint { font-size: 10.5px; color: var(--ink-3); }

@keyframes idleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
.stage.flexing .char-wrap svg { animation: flexPop .62s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes flexPop {
  0% { transform: scale(1); }
  35% { transform: scale(1.07) translateY(-6px); }
  100% { transform: scale(1); }
}

.xp {
  position: relative; z-index: 2;
  margin-top: 6px;
}
.xp-row {
  display: flex; justify-content: space-between;
  font-size: 11.5px; color: var(--ink-2); font-weight: 600;
  margin-bottom: 6px;
}
.bar {
  height: 7px; border-radius: 999px;
  background: #EFE7D9;
  overflow: hidden;
}
.bar > i {
  display: block; height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #FFB18C, var(--accent));
  transition: width .6s cubic-bezier(.2, .8, .3, 1);
}

/* ---------- 指标格 ---------- */
.grid-4 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  box-shadow: var(--shadow-soft);
}
.s-label {
  display: block;
  font-size: 11.5px; color: var(--ink-2); font-weight: 600;
  margin-bottom: 3px;
}
.s-val {
  font-size: 21px; font-weight: 800; letter-spacing: -.03em;
}
.s-val em { font-size: 12px; font-weight: 700; color: var(--ink-2); font-style: normal; margin-left: 2px; }
.s-val.up { color: var(--green); }
.s-val.down { color: var(--accent); }

/* ---------- 今日 ---------- */
.today-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.today-head h3 { margin: 0; font-size: 15px; font-weight: 800; }
.today-list { display: flex; flex-direction: column; gap: 7px; }
.today-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 13.5px;
}
.today-row .t-name { font-weight: 600; }
.today-row .t-weight {
  margin-left: auto; font-variant-numeric: tabular-nums;
  color: var(--ink-2); font-size: 12.5px;
}
.part-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  flex: 0 0 auto;
}
.empty-state {
  text-align: center;
  padding: 10px 4px 4px;
  color: var(--ink-2);
  font-size: 13px;
}
.cta-btn {
  width: 100%;
  margin-top: 12px;
  border: none;
  background: var(--ink);
  color: #FFF8EE;
  font-size: 14.5px;
  font-weight: 700;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .15s ease;
}
.cta-btn:active { transform: scale(.985); }
.cta-btn.accent { background: var(--accent); color: #fff; }

/* ---------- 装备 ---------- */
.gear-row { display: flex; flex-wrap: wrap; gap: 8px; }
.gear {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700;
  padding: 6px 10px; border-radius: 999px;
  border: 1px solid var(--line);
  background: #FBF6EC;
  color: var(--ink-2);
}
.gear.on {
  border-color: rgba(255, 107, 53, .35);
  background: var(--accent-soft);
  color: #B4431E;
}
.gear.off { opacity: .62; border-style: dashed; }
.gear i {
  font-style: normal; font-size: 10px; font-weight: 800;
  width: 16px; height: 16px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(36, 30, 24, .08);
}
.gear.on i { background: var(--accent); color: #fff; }

.gear-next {
  margin: 10px 2px 0;
  font-size: 11.5px;
  color: var(--ink-2);
  letter-spacing: .01em;
}
.gear-next em { font-style: normal; font-weight: 800; color: var(--accent); }

/* ---------- 记录页 ---------- */
.date-nav {
  display: flex; align-items: center; gap: 8px;
  margin-top: 12px;
}
.rnd {
  width: 34px; height: 34px; flex: 0 0 auto;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-2);
  font-size: 17px; font-weight: 700;
  display: grid; place-items: center;
  line-height: 1;
  transition: transform .12s ease;
}
.rnd:active { transform: scale(.9); }
.date-display {
  flex: 1;
  height: 34px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: .01em;
}

.weight-card {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px;
}
.wc-main { flex: 1; }
.bw-row {
  display: flex; align-items: center; gap: 8px;
  margin-top: 6px;
}
.bw-input {
  display: flex; align-items: baseline; gap: 4px;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 2px;
  flex: 0 0 auto;
}
.bw-input input {
  width: 76px;
  border: none; background: transparent;
  font-size: 27px; font-weight: 800;
  letter-spacing: -.03em;
  padding: 0;
  text-align: center;
  outline: none;
  font-variant-numeric: tabular-nums;
}
.bw-input input::placeholder { color: #C9BEAE; }
.bw-input span { font-size: 12px; font-weight: 700; color: var(--ink-2); }

.wc-side { text-align: right; flex: 0 0 auto; }
.delta {
  font-size: 14px; font-weight: 800;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.delta.down { color: var(--green); }
.delta.up { color: var(--accent); }
.sub { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }

/* 训练动作 */
.log-items { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }

.log-item {
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 12px 12px;
  background: #FFFDF8;
}
.li-head {
  display: flex; align-items: center; gap: 8px;
}
.ex-name { font-size: 14px; font-weight: 800; letter-spacing: -.01em; }
.ex-part {
  font-size: 10.5px; font-weight: 700;
  padding: 1px 7px; border-radius: 999px;
  background: #F2EBDE; color: var(--ink-2);
}
.del {
  margin-left: auto;
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent;
  color: var(--ink-3); font-size: 15px; line-height: 1;
  display: grid; place-items: center;
}
.del:active { background: #F6EEE0; }

.hint {
  margin: 6px 0 9px;
  font-size: 11.5px;
  color: var(--ink-3);
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
}
.use-last {
  border: 1px solid var(--line);
  background: #FBF6EC;
  color: var(--ink-2);
  font-size: 11px; font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

.li-fields {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: 8px;
}
.field { min-width: 0; }
.f-label {
  display: block;
  font-size: 10.5px; font-weight: 600; color: var(--ink-3);
  margin-bottom: 4px;
  letter-spacing: .02em;
}
.stepper {
  display: flex; align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  overflow: hidden;
  height: 34px;
}
.stepper button {
  width: 28px; height: 100%;
  border: none; background: transparent;
  color: var(--ink-2); font-size: 14px; font-weight: 700;
  display: grid; place-items: center;
  flex: 0 0 auto;
}
.stepper button:active { background: #F5EEE1; }
.stepper input {
  width: 100%; min-width: 0;
  border: none; background: transparent;
  text-align: center;
  /* 16px 起，避免 iOS 聚焦时自动放大页面 */
  font-size: 16px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  outline: none;
  padding: 0;
  color: var(--ink);
}
.stepper.disabled { opacity: .55; }
.stepper.disabled input { text-align: center; font-weight: 600; }

.add-btn {
  width: 100%;
  border: 1.5px dashed #D8CBB6;
  background: transparent;
  color: var(--ink-2);
  font-size: 13.5px; font-weight: 700;
  padding: 11px;
  border-radius: var(--radius-sm);
  transition: background .15s ease;
}
.add-btn:active { background: #FBF6EC; }

.save-btn {
  width: 100%;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 15px; font-weight: 800;
  letter-spacing: .01em;
  padding: 15px;
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 18px rgba(255, 107, 53, .26);
  transition: transform .15s ease;
}
.save-btn:active { transform: scale(.985); }
.auto-note {
  text-align: center;
  font-size: 11px;
  color: var(--ink-3);
  margin: 9px 0 0;
}

/* ---------- 数据页 ---------- */
.chart-box { width: 100%; }
.chart-box svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-empty {
  padding: 14px 0 6px;
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-3);
}

.progress-list { display: flex; flex-direction: column; gap: 10px; }
.prog-row {
  display: flex; align-items: center; gap: 10px;
}
.prog-main { flex: 1; min-width: 0; }
.prog-name { font-size: 13.5px; font-weight: 700; }
.prog-meta { font-size: 11px; color: var(--ink-3); margin-top: 1px; }
.prog-val {
  font-size: 15px; font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.prog-val.pos { color: var(--green); }

.bars {
  display: flex; align-items: flex-end; gap: 7px;
  height: 148px;
  padding-top: 16px;
}
.bar-col {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  height: 100%;
  gap: 5px;
}
.bar-col .b-val {
  font-size: 9.5px; color: var(--ink-3); font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.bar-col .b {
  width: 100%;
  border-radius: 6px 6px 3px 3px;
  background: linear-gradient(180deg, #FFA57E, var(--accent));
  min-height: 4px;
  transition: height .5s cubic-bezier(.2, .8, .3, 1);
}
.bar-col.zero .b { background: #EFE7D9; }
.bar-col .b-lab {
  font-size: 9px; color: var(--ink-3);
  white-space: nowrap;
}

.heatmap { display: grid; gap: 4px; grid-template-columns: repeat(8, 1fr); }
.hm-col { display: grid; gap: 4px; }
.hm-cell {
  aspect-ratio: 1 / 1;
  border-radius: 4px;
  background: #F1EADD;
}
.hm-cell.l1 { background: #FFDDCB; }
.hm-cell.l2 { background: #FFB391; }
.hm-cell.l3 { background: #FF8A5B; }
.hm-cell.l4 { background: var(--accent); }
.hm-today { outline: 2px solid rgba(36, 30, 24, .55); outline-offset: -2px; }

/* ---------- 底部导航 ---------- */
.tabbar {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(430px, 100%);
  display: flex;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255, 252, 247, .94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  border-radius: 18px 18px 0 0;
  z-index: 30;
  box-shadow: 0 -8px 26px rgba(60, 44, 24, .07);
}
.tab {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--ink-3);
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 0 4px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .02em;
  transition: color .18s ease;
}
.tab svg { width: 21px; height: 21px; }
.tab.active { color: var(--accent); }
.tab.active::after {
  content: "";
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--accent);
  margin-top: 1px;
}

/* ---------- 弹层 ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 60; }
.sheet-wrap.hidden { display: none; }
.backdrop {
  position: absolute; inset: 0;
  background: rgba(36, 30, 24, .34);
  animation: fadeIn .2s ease both;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.sheet {
  position: absolute;
  left: 50%; bottom: 0;
  transform: translateX(-50%);
  width: min(430px, 100%);
  max-height: 82vh;
  max-height: 82dvh;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--card);
  border-radius: 22px 22px 0 0;
  padding: 18px 18px calc(22px + env(safe-area-inset-bottom));
  animation: sheetUp .28s cubic-bezier(.2, .9, .3, 1) both;
  box-shadow: 0 -14px 40px rgba(60, 44, 24, .16);
}
@keyframes sheetUp {
  from { transform: translate(-50%, 100%); }
  to { transform: translate(-50%, 0); }
}
.sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.sheet-head h3 { margin: 0; font-size: 17px; font-weight: 800; }
.sheet-head .del { margin-left: 0; width: 32px; height: 32px; font-size: 17px; }

.pick-chips {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin: -4px 0 14px;
}
.pick-chip {
  border: 1px solid var(--line);
  background: #FFFDF8;
  color: var(--ink-2);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 700;
}
.pick-chip.on {
  background: var(--ink);
  border-color: var(--ink);
  color: #FFF8EC;
}

.pick-group { margin-bottom: 16px; }
.pick-group h4 {
  margin: 0 0 8px;
  font-size: 12px; font-weight: 800;
  color: var(--ink-2);
  letter-spacing: .06em;
}
.pick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pick-item {
  border: 1px solid var(--line);
  background: #FFFDF8;
  border-radius: 12px;
  padding: 10px 11px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  display: flex; align-items: center; gap: 7px;
}
.pick-item:active { background: #F8F1E4; }
.pick-item small {
  margin-left: auto;
  font-size: 10px;
  color: var(--ink-3);
  font-weight: 600;
}

.set-row { margin-bottom: 14px; }
.set-row label {
  display: block;
  font-size: 11.5px; font-weight: 700; color: var(--ink-2);
  margin-bottom: 6px;
}
.set-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #FFFDF8;
  padding: 11px 13px;
  font-size: 16px;
  font-weight: 600;
  outline: none;
  color: var(--ink);
}
.set-input:focus { border-color: var(--accent); }
.set-tip { font-size: 11px; color: var(--ink-3); margin-top: 5px; }
.danger-btn, .ghost-btn {
  width: 100%;
  border-radius: 12px;
  padding: 12px;
  font-size: 13.5px;
  font-weight: 700;
  margin-top: 9px;
}
.danger-btn {
  border: 1px solid #F0C9BC;
  background: #FFF3EE;
  color: #C2451F;
}
.ghost-btn {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-2);
}

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  top: 18px;
  transform: translate(-50%, -16px);
  max-width: min(360px, calc(100% - 40px));
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(36, 30, 24, .93);
  color: #FFF7EA;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .01em;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  z-index: 80;
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 手机：铺满整屏，去掉桌面版卡片投影 ---------- */
@media (max-width: 519px) {
  body { background: var(--paper); }
  .app {
    max-width: 100%;
    box-shadow: none;
    border-radius: 0;
  }
  .tabbar {
    width: 100%;
    border-radius: 0;
  }
}

/* ---------- 大屏：把手机壳居中 ---------- */
@media (min-width: 520px) {
  body { padding: 24px 0; }
  .app {
    min-height: calc(100vh - 48px);
    border-radius: 30px;
    overflow: hidden;
    padding-bottom: 104px;
  }
  .tabbar {
    bottom: 24px;
    border-radius: 0 0 30px 30px;
  }
  .sheet { bottom: 0; }
}
