:root {
  --bg:#F4F1EC;
  --card:#FFFFFF;
  --surface:#EDE9E2;
  --text:#16181D;
  --hint:#626770;
  --accent:#5B6BFF;
  --accent-2:#8E7CFF;
  --accent-text:#FFFFFF;
  --up:#13875C;
  --down:#D83E43;
  --warn:#B86D00;
  --border:rgba(22,24,29,.07);
  --shadow:0 2px 12px rgba(24,26,44,.05);
  --shadow-p:0 3px 14px rgba(24,26,44,.06);
  --grad:linear-gradient(90deg,#5B6BFF,#8E7CFF);
  --p1:#E9E5FF;--p2:#FFF0C8;--p3:#DFF3E4;--p4:#FFE1D6;--p5:#DDEBFF;--p6:#FCE0EC;
  --b1:#8E7CFF;--b2:#EBA31A;--b3:#17B978;--b4:#FF8557;--b5:#3E8DFF;--b6:#EC6AA0;
}

*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}
html{color-scheme:light;background:var(--bg)}
body{
  min-height:100vh;max-width:520px;margin:0 auto;padding:18px 14px 84px;
  background:var(--bg);color:var(--text);
  font:14px/1.35 -apple-system,"SF Pro Display","Segoe UI",Roboto,system-ui,sans-serif;
  -webkit-font-smoothing:antialiased;
}
button{font:inherit}
#app{display:none}
.hidden{display:none!important}

.head{display:flex;align-items:center;justify-content:space-between;padding:0 4px;margin-bottom:2px}
.head h1{font-size:21px;font-weight:800;letter-spacing:-.5px}
.date{font-size:12px;font-weight:600;color:var(--hint)}
.sub{padding:0 4px;margin-bottom:14px;color:var(--hint);font-size:12px;font-weight:500}

.tabs{
  display:flex;gap:4px;margin-bottom:14px;padding:5px;overflow-x:auto;
  background:var(--surface);border-radius:16px;scrollbar-width:none;
}
.tabs::-webkit-scrollbar{display:none}
.tab{
  flex:1 0 auto;padding:9px 15px;border:0;border-radius:12px;background:transparent;
  color:var(--hint);font-size:13px;font-weight:700;white-space:nowrap;cursor:pointer;
  transition:background .15s ease-out,color .15s ease-out,box-shadow .15s ease-out,filter .15s ease-out;
}
.tab.on{background:var(--card);color:var(--text);box-shadow:0 2px 6px rgba(24,26,44,.10)}
.tab:active{filter:brightness(.97)}
.tab:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

.hero{
  margin-bottom:14px;padding:16px;background:var(--card);border-left:5px solid var(--b1);
  border-radius:20px;box-shadow:var(--shadow-p);overflow:hidden;
}
.hero-danger{border-left-color:var(--down);background:linear-gradient(180deg,#FFF6F5,var(--card) 60%)}
.hero-top{display:flex;align-items:center;justify-content:space-between;gap:10px}
.hero .lbl{margin-bottom:6px;color:var(--hint);font-size:11.5px;font-weight:600}
.hero .big{font-size:32px;font-weight:800;letter-spacing:-.6px;line-height:1.1;white-space:nowrap}
.hero .big small{font-size:16px;font-weight:700;color:var(--hint)}
.hero .row{margin-top:14px}

.kpi-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:14px}
.kpi{
  min-width:0;padding:15px 16px;background:var(--card);border-radius:20px;
  box-shadow:var(--shadow-p);overflow:hidden;
}
.kpi-grid>.kpi:nth-child(6n+1){border-left:5px solid var(--b1)}
.kpi-grid>.kpi:nth-child(6n+2){border-left:5px solid var(--b2)}
.kpi-grid>.kpi:nth-child(6n+3){border-left:5px solid var(--b3)}
.kpi-grid>.kpi:nth-child(6n+4){border-left:5px solid var(--b4)}
.kpi-grid>.kpi:nth-child(6n+5){border-left:5px solid var(--b5)}
.kpi-grid>.kpi:nth-child(6n+6){border-left:5px solid var(--b6)}
.kpi .k{margin-bottom:8px;color:var(--hint);font-size:11.5px;font-weight:600}
.kpi .v{font-size:20px;font-weight:800;letter-spacing:-.6px;line-height:1.1}
.kpi .note{margin-top:7px;color:var(--hint);font-size:11px;overflow-wrap:anywhere}
.hero .kpi-grid{margin:14px 0 0}
.hero .kpi{padding:12px 13px;background:#FAF9F6;border-radius:14px;box-shadow:none}
.hero .kpi .v{font-size:16px;letter-spacing:-.25px}

.g{color:var(--up)}.go{color:var(--warn)}.r{color:var(--down)}
.sec{
  margin:20px 4px 10px;color:var(--hint);font-size:12px;font-weight:800;
  text-transform:uppercase;letter-spacing:.6px;
}

.filters{
  display:flex;gap:4px;margin-bottom:12px;padding:5px;overflow-x:auto;
  background:var(--surface);border-radius:16px;scrollbar-width:none;
}
.filters::-webkit-scrollbar{display:none}
.filter{
  flex:0 0 auto;padding:8px 13px;border:0;border-radius:12px;background:transparent;
  color:var(--hint);font-size:12.5px;font-weight:700;white-space:nowrap;cursor:pointer;
  transition:background .15s ease-out,color .15s ease-out,box-shadow .15s ease-out,filter .15s ease-out;
}
.filter.on{background:var(--card);color:var(--text);box-shadow:0 2px 6px rgba(24,26,44,.10)}
.filter:active{filter:brightness(.97)}
.filter:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

.when{margin-left:8px;color:var(--hint);font-size:11px;font-weight:600;white-space:nowrap}

.bottom-nav{
  position:fixed;left:0;right:0;bottom:0;z-index:20;
  display:flex;gap:8px;padding:8px 14px calc(10px + env(safe-area-inset-bottom));
  background:rgba(244,241,236,.92);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);
  border-top:1px solid var(--border);max-width:520px;margin:0 auto;
}
.bn{
  flex:1;display:flex;flex-direction:column;align-items:center;gap:2px;
  padding:8px 4px;border:0;border-radius:14px;background:transparent;color:var(--hint);
  font-size:18px;cursor:pointer;transition:background .15s ease-out,color .15s ease-out,filter .15s ease-out;
}
.bn span{font-size:10.5px;font-weight:700}
.bn.on{background:var(--card);color:var(--accent);box-shadow:var(--shadow)}
.bn:active{filter:brightness(.97)}

.list{display:grid;gap:8px}
.acc-card{
  background:var(--card);border:0;border-left:5px solid var(--accent);
  border-radius:18px;box-shadow:var(--shadow);overflow:hidden;
}
.acc-card.tone-dg{border-left-color:var(--b3)}
.acc-card.tone-dgo{border-left-color:var(--b2)}
.acc-card.tone-dr{border-left-color:var(--down)}
.acc-card summary{
  display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:10px;align-items:center;
  padding:13px 14px;list-style:none;cursor:pointer;
}
.acc-card summary::-webkit-details-marker{display:none}
.acc-card summary:active{filter:brightness(.98)}
.acc-card summary:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.acc-card .t{font-size:14px;font-weight:700;overflow-wrap:anywhere}
.acc-card .amt{font-size:14px;font-weight:800;white-space:nowrap}
.acc-card .chev{color:var(--hint);font-size:20px;line-height:1;transition:transform .15s ease-out}
.acc-card[open] .chev{transform:rotate(90deg)}
.acc-card .details{
  margin:0 14px 12px;padding-top:9px;border-top:1px solid var(--border);
  color:var(--hint);font-size:12px;overflow-wrap:anywhere;
}
.dot{display:inline-block;width:8px;height:8px;margin-right:7px;border-radius:50%;vertical-align:1px}
.dg{background:var(--b3)}.dgo{background:var(--b2)}.dr{background:var(--down)}

.burn{
  margin-top:14px;padding:16px;background:var(--card);border-radius:20px;box-shadow:var(--shadow);
}
.burn .top{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin-bottom:10px}
.burn .top .v{font-size:15px;font-weight:800;text-align:right}
.bar{height:7px;border-radius:4px;background:rgba(22,24,29,.06);overflow:hidden}
.bar>i{display:block;height:100%;border-radius:4px}
.note{color:var(--hint);font-size:11.5px}

.insight{
  display:flex;align-items:flex-start;gap:12px;margin-top:14px;padding:14px 15px;
  border-left:5px solid;border-radius:18px;box-shadow:var(--shadow);
}
.insight.win{background:#E4F6EA;border-left-color:#1FAF54}
.insight.warn{background:#FFF1D6;border-left-color:#F5920B}
.insight.alert{background:#FFE7E2;border-left-color:#E45C4F}
.insight .ic{
  display:flex;align-items:center;justify-content:center;flex:0 0 auto;width:36px;height:36px;
  border-radius:12px;background:rgba(255,255,255,.72);font-size:21px;
}
.insight .t{font-size:13.5px;font-weight:800}
.insight.win .t{color:#0F5A2C}.insight.warn .t{color:#7A4A00}.insight.alert .t{color:#8B2622}
.insight .s{margin-top:3px;color:#4E5159;font-size:12px}

.donut-wrap{flex:0 0 118px;width:118px;height:118px;margin:-2px -2px -2px 0}
.chart-block{margin-top:16px;padding-top:14px;border-top:1px solid var(--border)}
.chart-title{margin-bottom:8px;font-size:12px;font-weight:700;color:var(--hint)}
.chart-wrap{height:178px}
.legend{display:flex;flex-wrap:wrap;gap:8px 12px;margin-top:9px;color:var(--hint);font-size:11.5px}
.legend span{display:inline-flex;align-items:center;gap:5px}
.legend .ldot{width:9px;height:9px;border-radius:50%;display:inline-block}

.foot{margin-top:24px;color:var(--hint);font-size:11px;line-height:1.6;text-align:center}
.msg{padding:60px 20px;color:var(--hint);text-align:center}
.msg .em{display:block;margin-bottom:14px;font-size:34px}

@media(max-width:380px){
  body{padding-inline:12px}.hero{padding:14px}.hero .big{font-size:28px}
  .donut-wrap{flex-basis:102px;width:102px;height:102px}.kpi{padding:13px 12px}
  .kpi .v{font-size:18px}.acc-card summary{padding:12px;gap:7px}.acc-card .amt{font-size:13px}
}
@media(prefers-reduced-motion:reduce){.tab,.acc-card .chev{transition:none}}
