:root {
  --bg: #f4efe6;
  --card: #fffdf8;
  --ink: #2b241e;
  --muted: #8a8076;
  --line: #eadfce;
  --dark: #3b332c;
  --orange: #d9773a;
  --green: #3d8a5a;
  --red: #c45c4a;
  --tab-h: 58px;
  --nav-h: 48px;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; height: 100%;
  background: #d9d0c3;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
}
#phone {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100%;
  background: var(--bg);
  position: relative;
  box-shadow: 0 0 0 1px #cfc4b4;
}
.nav {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  padding: 0 12px;
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
}
.nav-back {
  width: 32px; height: 32px;
  border: 0; background: transparent;
  font-size: 28px; line-height: 28px;
  color: var(--ink); cursor: pointer;
  text-decoration: none;
  display: flex; align-items: center; justify-content: center;
}
.nav-title { flex: 1; text-align: center; font-weight: 650; letter-spacing: 1px; }
.nav-right { width: 32px; }
#view, #app, .page-view {
  display: block;
  padding: 0 14px 74px;
  min-height: 70vh;
}
.tabbar {
  position: sticky;
  bottom: 0;
  height: var(--tab-h);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #fbf8f2;
  border-top: 1px solid var(--line);
  z-index: 10;
}
.tabbar a {
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; color: var(--muted);
  font-size: 12px; font-weight: 600;
}
.tabbar a.on { color: var(--ink); }
.hero {
  background: var(--dark);
  color: #f6efe4;
  border-radius: 16px;
  padding: 16px 16px 12px;
}
.hero .hint { font-size: 12px; color: #cbbba8; }
.hero .label { font-size: 12px; color: #cbbba8; margin-top: 10px; }
.hero .big { font-size: 28px; font-weight: 700; letter-spacing: 0.5px; margin: 4px 0; }
.hero .sub { font-size: 12px; color: #e0c9a4; }
.grid3, .grid2 {
  display: grid; gap: 10px; margin-top: 12px;
}
.grid3 { grid-template-columns: 1fr 1fr 1fr; }
.grid2 { grid-template-columns: 1fr 1fr; }
.metric .k { font-size: 11px; color: #cbbba8; }
.metric .v { font-size: 14px; font-weight: 650; margin-top: 2px; }
.hero-foot {
  display: flex; justify-content: space-between;
  margin-top: 12px; font-size: 12px; color: #d7c6b0;
}
.hero-foot a { color: #f0d7b2; text-decoration: none; }
.banner {
  margin: 10px 0;
  background: #f8ead7;
  color: #8a5a32;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 12px;
}
.card {
  background: var(--card);
  border-radius: 14px;
  padding: 14px;
  margin: 10px 0;
  border: 1px solid #efe6d8;
}
a.card { display: block; text-decoration: none; color: inherit; }
.card h3 { margin: 0 0 8px; font-size: 15px; }
.row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
}
.muted { color: var(--muted); font-size: 12px; }
.orange { color: var(--orange); }
.green { color: var(--green); }
.red { color: var(--red); }
.cover-icons { display: flex; gap: 10px; margin: 8px 0; }
.cover-icons .ic {
  width: 56px; text-align: center; font-size: 11px; color: var(--muted);
}
.cover-icons .ic .g {
  width: 44px; height: 44px; margin: 0 auto 4px;
  border-radius: 12px; display: flex; align-items: center; justify-content: center;
  border: 1px dashed #d8cbb8; background: #f3eee6; font-size: 18px;
}
.cover-icons .ic.on .g { background: #3b332c; color: #f6efe4; border-style: solid; border-color: #3b332c; }
.cover-icons .ic.next .g { border: 1px dashed var(--orange); color: var(--orange); }
.hold-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.hold-head h3 { flex: 1; margin: 0; min-width: 4em; }
.mv-side { text-align: right; flex-shrink: 0; max-width: 56%; }
.mv-px { color: var(--ink); font-weight: 700; font-size: 14px; margin-top: 4px; }
.quad {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 10px 0;
}
.qcard {
  background: var(--card);
  border: 1px solid #efe6d8;
  border-radius: 14px;
  padding: 12px;
}
.mini-btn {
  border: 1px solid var(--line); background: #fff;
  border-radius: 14px; padding: 4px 10px;
  font-size: 12px; color: var(--ink); cursor: pointer;
  text-decoration: none; display: inline-block;
}
.mini-btn.on { background: var(--dark); color: #fff; border-color: var(--dark); }
.cost-seg { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }
.hits { background: #fff; border: 1px solid var(--line); border-radius: 10px; margin-top: 6px; overflow: hidden; }
.hits .hit { padding: 10px 12px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 14px; }
.hits .hit:last-child { border-bottom: 0; }
.hits .hit:hover { background: #f8ead7; }
.quota {
  font-size: 12px; color: #8a5a32; background: #f8ead7;
  border-radius: 8px; padding: 8px 10px; margin-bottom: 8px;
}
.tag {
  display: inline-block; background: #2b241e; color: #fff;
  border-radius: 12px; padding: 2px 8px; font-size: 11px;
}
.hcard {
  background: var(--card);
  border-radius: 14px;
  padding: 12px;
  margin: 8px 0;
  border: 1px solid #efe6d8;
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.hcard .top { display: flex; justify-content: space-between; align-items: flex-start; }
.hcard .name { font-weight: 700; }
.hcard .code { font-size: 12px; color: var(--muted); }
.hcard .amt { font-size: 18px; font-weight: 700; text-align: right; }
.cols4 {
  display: grid; grid-template-columns: repeat(4, 1fr);
  margin-top: 8px; font-size: 12px;
}
.cols4 .k { color: var(--muted); }
.cols4 .v { font-weight: 650; margin-top: 2px; }
.bar {
  height: 4px; background: #efe6d8; border-radius: 4px; margin-top: 8px; overflow: hidden;
}
.bar > i { display: block; height: 100%; background: var(--orange); width: 0; }
.fab {
  position: fixed;
  right: calc(50% - 215px + 18px);
  bottom: 76px;
  width: 48px; height: 48px;
  border-radius: 24px;
  background: var(--dark); color: #fff;
  border: 0; font-size: 28px; cursor: pointer;
  box-shadow: 0 6px 16px rgba(43,36,30,.25);
  text-decoration: none;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
}
@media (max-width: 430px) { .fab { right: 18px; } }
.sheet {
  position: fixed; inset: 0; background: rgba(0,0,0,.35);
  display: flex; align-items: flex-end; justify-content: center; z-index: 20;
}
.sheet .box {
  width: 100%; max-width: 430px;
  background: #fff; border-radius: 16px 16px 0 0;
  padding: 16px 16px 24px;
}
.sheet button.opt {
  width: 100%; padding: 12px; margin: 6px 0;
  border: 1px solid var(--line); border-radius: 12px;
  background: #fff; font-size: 15px; cursor: pointer;
}
.btn {
  display: block; width: 100%;
  background: var(--dark); color: #fff;
  border: 0; border-radius: 12px;
  padding: 12px; font-size: 15px; cursor: pointer;
  text-align: center; text-decoration: none;
}
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn.danger { background: #fff; color: var(--red); border: 1px solid #f0d4ce; }
.form-item { margin: 10px 0; }
.form-item label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.form-item input, .form-item select {
  width: 100%; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 10px;
  font-size: 15px; background: #fff; font-family: inherit;
  box-sizing: border-box; min-height: 44px; height: 44px; line-height: 44px;
}
.form-item textarea {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px;
  font-size: 15px; background: #fff; font-family: inherit;
  box-sizing: border-box; height: 120px; min-height: 120px; line-height: 1.5;
}
.seg { display: flex; background: #efe8dc; border-radius: 12px; padding: 3px; margin: 8px 0 12px; }
.seg a {
  flex: 1; text-align: center; padding: 8px;
  text-decoration: none; color: var(--muted); border-radius: 10px; font-weight: 650; font-size: 14px;
}
.seg a.on { background: var(--dark); color: #fff; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal-grid .hd { font-size: 11px; color: var(--muted); padding: 6px 0; }
.cal-grid .day { padding: 8px 0 14px; border-radius: 10px; position: relative; font-size: 13px; cursor: pointer; color: inherit; text-decoration: none; display: block; }
.cal-grid .day.has { background: #f3e8d8; cursor: pointer; }
.cal-grid .day.on { outline: 2px solid var(--orange); }
.alloc { height: 8px; background: #efe6d8; border-radius: 4px; margin-top: 6px; overflow: hidden; }
.alloc i { display: block; height: 100%; background: var(--orange); border-radius: 4px; }
.cal-grid .dots { position: absolute; left: 0; right: 0; bottom: 4px; font-size: 8px; letter-spacing: 1px; }
.dot-b { color: #4a7dc0; } .dot-r { color: #c45c4a; } .dot-g { color: #3d8a5a; }
.tools { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tool {
  background: var(--card); border: 1px solid #efe6d8;
  border-radius: 14px; padding: 14px; text-decoration: none; color: inherit;
}
.tool .ico { font-size: 22px; margin-bottom: 6px; }
.tool b { display: block; font-size: 14px; }
.tool span { font-size: 11px; color: var(--muted); }
.list-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; border-bottom: 1px solid var(--line);
  text-decoration: none; color: inherit; gap: 8px;
}
.list-row:last-child { border-bottom: 0; }
.toast {
  position: fixed; left: 50%; bottom: 80px; transform: translateX(-50%);
  background: rgba(43,36,30,.92); color: #fff;
  padding: 8px 14px; border-radius: 8px; font-size: 13px; z-index: 30;
}
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.note-card { display: block; text-decoration: none; color: inherit; }
.year-bars { display: flex; align-items: flex-end; gap: 4px; margin: 12px 0 6px; }
.year-bars > i {
  flex: 1; background: #e6d7c2; border-radius: 4px 4px 0 0; min-height: 4px;
}
.year-bars > i.on { background: var(--orange); }
.year-bars > i.has { background: #c9ae88; }
.year-bars .yb { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; }
.year-bars .yb-track { position: relative; width: 100%; height: 90px; }
.year-bars .yb-expect, .year-bars .yb-paid {
  position: absolute; left: 0; right: 0; bottom: 0;
  border-radius: 4px 4px 0 0; min-height: 0;
}
.year-bars .yb-expect { background: #e6d7c2; }
.year-bars .yb-paid { background: #c9a227; }
.year-bars .yb-m { margin-top: 4px; font-size: 11px; color: var(--muted, #8a8076); }
.held-row { box-shadow: inset 3px 0 0 #c9a227; }
.sector-up { color: var(--green); }
.sector-down { color: var(--red); }
.me-hero { background: var(--dark); color: #f6efe4; border-radius: 16px; padding: 16px; }
.badge { display: inline-block; background: #5a5249; border-radius: 10px; padding: 2px 8px; font-size: 11px; }
.dialog {
  position: fixed; inset: 0; background: rgba(0,0,0,.4);
  display: flex; align-items: center; justify-content: center; z-index: 25;
}
.dialog .panel {
  width: 300px; background: #fff; border-radius: 14px; padding: 18px;
}
.dialog .acts { display: flex; gap: 8px; margin-top: 14px; }
.article { white-space: pre-wrap; line-height: 1.7; font-size: 15px; }
.tiny { font-size: 11px; color: var(--muted); }
