/* 27 宝可梦个体值 IV 计算 · 实验室网格纸：靛蓝 + 荧光绿，输入表 + 0～31 刻度条 */
.ivc{
  --ink:#17233f; --sub:#5d6b8e; --card:#ffffff; --line:#dde4f3;
  --pri:#3b4bd8; --pri-soft:#e9edff; --ok:#0f9b73; --warn:#b8791a; --bad:#cc3f5b; --bg:#f4f6fd;
  color:var(--ink);background:var(--bg);font-size:15px;line-height:1.78;padding:26px 0 54px;min-height:60vh;
}
:root[data-theme="dark"] .ivc{
  --ink:#e6ecff; --sub:#9fadc9; --card:#141c30; --line:#2a3854;
  --pri:#8fa4ff; --pri-soft:rgba(143,164,255,.13); --ok:#4ad6a4; --warn:#f0c26a; --bad:#ff8fac; --bg:#0b1020;
}
.ivc *{box-sizing:border-box;}
.ivc-wrap{max-width:1180px;margin:0 auto;padding:0 18px;}
.ivc h1,.ivc h2{margin:0;line-height:1.35;}
.ivc b{font-weight:700;} .ivc em{font-style:normal;}
.ivc-hero{display:grid;grid-template-columns:1fr 190px;gap:24px;align-items:center;padding:30px 32px;
  border:1px solid var(--line);border-radius:18px;
  background:linear-gradient(120deg,var(--card) 55%,var(--pri-soft));box-shadow:0 3px 16px rgba(40,60,150,.07);}
.ivc-badge{display:inline-block;padding:5px 13px;border-radius:999px;background:var(--pri);color:#fff;font-size:12px;font-weight:700;letter-spacing:.06em;}
.ivc h1{font-size:31px;font-weight:800;margin:13px 0 12px;}
.ivc h1 em{display:block;font-size:18px;font-weight:600;color:var(--pri);margin-top:6px;}
.ivc-hero p{margin:0 0 16px;max-width:780px;color:var(--sub);font-size:15px;line-height:1.85;}
.ivc-hero p b{color:var(--ink);}
.ivc-hero-meta{display:flex;flex-wrap:wrap;gap:8px;}
.ivc-hero-meta span{padding:5px 11px;border:1px solid var(--line);border-radius:7px;background:var(--card);font-size:12.5px;font-weight:650;color:var(--sub);}
.ivc-dna{display:flex;flex-direction:column;align-items:center;gap:7px;transform:rotate(-8deg);}
.ivc-dna i{font-style:normal;width:52px;height:34px;display:grid;place-items:center;border-radius:8px;
  background:var(--card);border:2px solid var(--pri);color:var(--pri);font:800 15px/1 ui-monospace,Menlo,monospace;
  box-shadow:0 3px 8px rgba(40,60,150,.13);}
.ivc-dna i:nth-child(even){align-self:flex-end;background:var(--pri);color:#fff;}
.ivc-dna i:nth-child(3){border-color:var(--ok);color:var(--ok);}

.ivc-card,.ivc-panel,.ivc-empty,.ivc-kpi{background:var(--card);border:1px solid var(--line);border-radius:14px;box-shadow:0 2px 10px rgba(30,50,120,.05);}
.ivc-card{margin-top:18px;padding:22px 24px;}
.ivc-card-h{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:16px;}
.ivc-card-h h2{font-size:20px;font-weight:750;} .ivc-card-h span{font-size:12.5px;color:var(--sub);} .ivc-card-h b{color:var(--bad);}
.ivc-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;}
.ivc-field{display:flex;flex-direction:column;gap:6px;font-size:13.5px;font-weight:650;color:var(--sub);}
.ivc-field b{color:var(--bad);margin-left:3px;}
.ivc-in,.ivc-ta{width:100%;padding:9px 11px;border:1px solid var(--line);border-radius:9px;background:var(--bg);color:var(--ink);font-size:14px;font-family:inherit;transition:border-color .16s,box-shadow .16s;}
.ivc-in:focus,.ivc-ta:focus{outline:none;border-color:var(--pri);box-shadow:0 0 0 3px var(--pri-soft);}
.ivc-in[type=number]{font-family:ui-monospace,Menlo,monospace;}
.ivc-actions{display:flex;flex-wrap:wrap;gap:9px;margin-top:16px;}
.ivc-btn{padding:10px 17px;border:1px solid var(--line);border-radius:9px;background:var(--card);color:var(--ink);font-size:14px;font-weight:650;cursor:pointer;transition:transform .14s,border-color .14s,box-shadow .14s;}
.ivc-btn:hover{border-color:var(--pri);transform:translateY(-1px);box-shadow:0 3px 10px rgba(30,50,120,.1);}
.ivc-btn:disabled{opacity:.5;cursor:not-allowed;}
.ivc-btn-main{background:var(--pri);border-color:var(--pri);color:#fff;} .ivc-btn-main:hover{filter:brightness(1.12);}
.ivc-btn-ghost{background:transparent;color:var(--sub);}
.ivc-msg{margin:12px 0 0;font-size:13.5px;color:var(--sub);min-height:20px;}
.ivc-msg.is-err{color:var(--bad);font-weight:600;} .ivc-msg.is-ok{color:var(--ok);font-weight:600;}
.ivc-tablecard{margin-top:14px;}
.ivc-tw{overflow:auto;border:1px solid var(--line);border-radius:10px;}
.ivc-inputtb{width:100%;border-collapse:collapse;font-size:13.5px;min-width:720px;}
.ivc-inputtb th,.ivc-inputtb td{padding:9px 10px;border-bottom:1px solid var(--line);text-align:left;}
.ivc-inputtb thead th{background:var(--pri-soft);font-weight:700;white-space:nowrap;}
.ivc-inputtb tbody th{font-weight:700;white-space:nowrap;}
.ivc-inputtb tr:last-child th,.ivc-inputtb tr:last-child td{border-bottom:none;}
.ivc-inputtb td .ivc-in{min-width:100px;}
.ivc-nat{font:650 13px/1.5 ui-monospace,Menlo,monospace;color:var(--sub);white-space:nowrap;}
.ivc-nat.is-up{color:var(--ok);} .ivc-nat.is-down{color:var(--bad);}
.ivc-res{font:800 15px/1.5 ui-monospace,Menlo,monospace;color:var(--pri);white-space:nowrap;}
.ivc-res.is-bad{color:var(--bad);font-size:12.5px;font-weight:650;}
.ivc-empty{margin-top:18px;padding:38px 20px;text-align:center;display:flex;flex-direction:column;align-items:center;gap:8px;}
.ivc-empty-ic{font-size:34px;} .ivc-empty b{font-size:17px;}
.ivc-empty em{max-width:640px;font-size:13.5px;color:var(--sub);line-height:1.8;}

.ivc-out{margin-top:18px;}
.ivc-kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:14px;}
.ivc-kpi{padding:16px;display:flex;flex-direction:column;gap:3px;}
.ivc-kpi.is-hero{background:var(--pri);border-color:var(--pri);}
.ivc-kpi span{font-size:12.5px;color:var(--sub);} .ivc-kpi.is-hero span{color:rgba(255,255,255,.85);}
.ivc-kpi b{font:800 26px/1.3 ui-monospace,SFMono-Regular,Menlo,monospace;color:var(--pri);}
.ivc-kpi.is-hero b{color:#fff;} .ivc-kpi small{font-size:11.5px;color:var(--sub);} .ivc-kpi.is-hero small{color:rgba(255,255,255,.82);}
.ivc-panel{padding:20px 22px;margin-bottom:14px;}
.ivc-h2{font-size:19px;font-weight:750;margin-bottom:14px;display:flex;flex-wrap:wrap;align-items:baseline;gap:10px;}
.ivc-h2 span{font-size:12.5px;font-weight:400;color:var(--sub);}
.ivc-bars{display:flex;flex-direction:column;gap:12px;}
.ivc-bar{display:grid;grid-template-columns:72px 1fr 112px;gap:12px;align-items:center;}
.ivc-bar-k{font-size:13px;font-weight:700;}
.ivc-bar-track{display:grid;grid-template-columns:repeat(32,1fr);gap:2px;background:var(--bg);padding:4px;border-radius:7px;border:1px solid var(--line);}
.ivc-bar-track i{height:16px;border-radius:2px;background:var(--line);}
.ivc-bar-track i.is-on{background:var(--ok);}
.ivc-bar-track i.is-single{background:var(--pri);}
.ivc-bar-v{font:700 13px/1.4 ui-monospace,Menlo,monospace;color:var(--pri);text-align:right;}
.ivc-bar-v.is-bad{color:var(--bad);font-size:12px;}
.ivc-notes{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;}
.ivc-notes div{padding:14px 16px;border-radius:10px;background:var(--bg);border:1px solid var(--line);}
.ivc-notes span{display:block;font-size:12px;color:var(--sub);letter-spacing:.05em;}
.ivc-notes b{display:block;font:750 19px/1.5 ui-monospace,Menlo,monospace;color:var(--pri);margin:4px 0;}
.ivc-notes p{margin:0;font-size:13px;color:var(--sub);line-height:1.75;}
.ivc-tb{width:100%;border-collapse:collapse;font-size:13px;min-width:560px;}
.ivc-tb th,.ivc-tb td{padding:9px 11px;border-bottom:1px solid var(--line);text-align:left;white-space:nowrap;}
.ivc-tb th{background:var(--pri-soft);font-weight:700;}
.ivc-tb tr:last-child td{border-bottom:none;} .ivc-tb tr:hover td{background:var(--bg);}
.ivc-ta{min-height:110px;resize:vertical;font:13.5px/1.7 ui-monospace,Menlo,monospace;}
.ivc-final{margin-top:2px;}
[hidden]{display:none !important;}

@media (max-width:860px){
  .ivc{padding:18px 0 40px;}
  .ivc-hero{grid-template-columns:1fr;padding:22px 18px;} .ivc-dna{display:none;} .ivc h1{font-size:26px;}
  .ivc-card,.ivc-panel{padding:18px 15px;}
  .ivc-grid,.ivc-kpis,.ivc-notes{grid-template-columns:repeat(2,1fr);}
  .ivc-bar{grid-template-columns:64px 1fr;}
  .ivc-bar-v{grid-column:2;text-align:left;}
}
