:root{
  color-scheme:light;
  --bg:#f3f7fb;
  --surface:#ffffff;
  --surface-soft:#f8fbff;
  --line:#e0e9f3;
  --line-strong:#cfdeed;
  --text:#17263a;
  --muted:#606e83;
  --blue:#1e63ff;
  --blue-2:#5fa8ff;
  --blue-soft:#eaf2ff;
  --green:#18a979;
  --green-soft:#eaf9f4;
  --amber:#d49116;
  --amber-soft:#fff6e4;
  --red:#d9586d;
  --red-soft:#fff0f3;
  --radius:16px;
  --shadow:0 10px 30px rgba(41,79,125,.07);
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--bg);color:var(--text);font:14px/1.45 Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
button,input,select{font:inherit}
button,a{ -webkit-tap-highlight-color:transparent }
a{text-decoration:none;color:inherit}
button{cursor:pointer}
.app-shell{min-height:100vh;display:grid;grid-template-columns:220px minmax(0,1fr)}
.sidebar{position:sticky;top:0;height:100vh;padding:20px 14px;background:#fff;border-right:1px solid var(--line);display:flex;flex-direction:column;z-index:30}
.brand{display:flex;align-items:center;gap:11px;padding:4px 8px 18px}
.brand-mark{width:38px;height:38px;border-radius:12px;background:linear-gradient(145deg,var(--blue),var(--blue-2));color:#fff;display:grid;place-items:center;font-weight:850;font-size:18px;box-shadow:0 8px 20px rgba(30,99,255,.18)}
.brand-copy{display:grid;line-height:1.1}
.brand-copy strong{font-size:14px}
.brand-copy small{font-size:9px;color:#626f7b;letter-spacing:.13em;margin-top:4px;font-weight:750}
.side-nav{display:grid;gap:5px;margin-top:8px}
.side-nav a{min-height:44px;display:flex;align-items:center;gap:12px;color:#63758b;padding:0 12px;border-radius:11px;font-weight:650}
.side-nav a span{width:23px;text-align:center;font-size:18px;color:#5f6e7e}
.side-nav a:hover{background:#f5f9fe;color:#2d4e72}
.side-nav a.active{background:var(--blue-soft);color:#1559df}
.side-nav a.active span{color:var(--blue)}
.sidebar-note{margin-top:auto;border:1px solid var(--line);background:var(--surface-soft);border-radius:14px;padding:12px;display:flex;gap:9px;align-items:center}
.sidebar-note .dot{width:8px;height:8px;border-radius:50%;background:var(--green);box-shadow:0 0 0 4px #daf7ed}
.sidebar-note div{display:grid}
.sidebar-note strong{font-size:11px}
.sidebar-note small{font-size:9px;color:#616f7e}
.workspace{min-width:0}
.topbar{height:68px;display:flex;align-items:center;gap:12px;padding:0 clamp(14px,2vw,26px);background:rgba(255,255,255,.93);backdrop-filter:blur(16px);border-bottom:1px solid var(--line);position:sticky;top:0;z-index:20}
.topbar>div:not(.topbar-spacer){display:grid;line-height:1.1}
.topbar strong{font-size:13px}.topbar small{color:#616e7e;font-size:10px;margin-top:3px}
.topbar-spacer{flex:1}
.read-only-pill{font-size:9px;letter-spacing:.08em;font-weight:800;color:#1459be;background:#edf5ff;border:1px solid #cfe1f8;border-radius:999px;padding:6px 9px;white-space:nowrap}
.clock{font-size:11px;color:#56687f;white-space:nowrap}
.menu-toggle{display:none;border:0;background:#f2f6fb;width:38px;height:38px;border-radius:10px;color:#47627f}
main{padding:24px clamp(14px,2vw,28px) 90px;max-width:1600px;margin:0 auto}
.page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:18px}
.page-head h1{margin:2px 0 4px;font-size:clamp(24px,3vw,34px);letter-spacing:-.035em}
.page-head p{margin:0;color:var(--muted);max-width:760px}
.eyebrow{font-size:10px;font-weight:850;letter-spacing:.11em;color:var(--blue)}
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);min-width:0}
.card-pad{padding:18px}
.grid{display:grid;gap:14px}
.grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.grid-4{grid-template-columns:repeat(4,minmax(0,1fr))}
.section-gap{margin-top:16px}
.section-title{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:10px}
.section-title h2{font-size:14px;margin:0}
.link-btn{border:0;background:none;color:#1763d9;font-weight:700;font-size:11px;padding:5px}
.status{display:inline-flex;align-items:center;gap:6px;font-size:10px;font-weight:800;border-radius:999px;padding:5px 8px;text-transform:uppercase;letter-spacing:.04em}
.status:before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}
.status.online,.status.healthy,.status.success{color:#0d7e5e;background:var(--green-soft);border:1px solid #bce9d9}
.status.warning,.status.degraded,.status.pending{color:#9b6309;background:var(--amber-soft);border:1px solid #f0d79e}
.status.error{color:#b74359;background:var(--red-soft);border:1px solid #f1c2cc}
.hero-grid{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(310px,.55fr);gap:14px}
.health-card{padding:19px;background:linear-gradient(145deg,#fff 0%,#f7fbff 100%);position:relative;overflow:hidden}
.health-card:after{content:"";position:absolute;width:190px;height:190px;border-radius:50%;right:-80px;top:-90px;background:radial-gradient(circle,#dcebff 0%,rgba(220,235,255,0) 70%)}
.health-top{display:flex;justify-content:space-between;gap:10px;align-items:flex-start;position:relative;z-index:1}
.health-top h2{margin:2px 0 5px;font-size:17px}
.big-status{font-size:30px;font-weight:850;letter-spacing:-.04em;color:#203955}
.health-meta{display:flex;gap:18px;margin-top:16px;position:relative;z-index:1}
.metric{display:grid;gap:2px}.metric strong{font-size:21px}.metric span{font-size:10px;color:var(--muted)}
.pipeline{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin-top:17px}
.pipe-step{position:relative;padding:10px 8px;border-radius:11px;background:#f8fbff;border:1px solid #e2ebf4;text-align:center}
.pipe-step strong{display:block;font-size:9px;letter-spacing:.04em}.pipe-step span{display:block;font-size:9px;color:#616e7e;margin-top:5px}
.pipe-step.success strong{color:#128a65}.pipe-step.warning strong{color:#b57b0d}.pipe-step.pending strong{color:#5f6d81}
.alert-card{padding:18px;background:linear-gradient(145deg,#fff,#fbfdff)}
.alert-card h2{font-size:14px;margin:0}
.alert-count{font-size:34px;font-weight:850;margin:13px 0 2px;color:#294866}
.alert-count small{font-size:12px;color:var(--muted);font-weight:650}
.alert-line{display:flex;justify-content:space-between;gap:8px;padding:9px 0;border-bottom:1px solid #edf2f7;font-size:11px}
.alert-line:last-child{border-bottom:0}.alert-line span{color:#5e6d83}.alert-line strong{font-size:11px}
.motor-card{padding:16px}
.motor-cover{height:84px;border-radius:12px;background:linear-gradient(135deg,#eaf3ff,#f8fbff);display:flex;align-items:center;justify-content:center;margin-bottom:13px;position:relative;overflow:hidden}
.motor-cover:before{content:"";width:66px;height:66px;border-radius:24px;background:linear-gradient(145deg,var(--blue),var(--blue-2));transform:rotate(14deg);opacity:.9;box-shadow:0 14px 26px rgba(30,99,255,.2)}
.motor-cover span{position:absolute;color:#fff;font-weight:900;font-size:20px}
.motor-title{display:flex;justify-content:space-between;gap:8px;align-items:center}
.motor-title h3{margin:0;font-size:14px}
.stat-pairs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:11px}
.stat-box{padding:9px;border-radius:10px;background:#f8fbff;border:1px solid #e8eff6;display:grid}
.stat-box span{font-size:9px;color:#616f7e}.stat-box strong{font-size:13px;margin-top:2px}
.arena-card{padding:16px;display:grid;grid-template-columns:auto 1fr;gap:13px;align-items:center}
.avatar{width:54px;height:54px;border-radius:16px;background:linear-gradient(145deg,#f0f6ff,#dceaff);display:grid;place-items:center;font-weight:900;color:#1762d6;font-size:20px;border:1px solid #d7e6f6}
.avatar.saitama{background:linear-gradient(145deg,#fff7e6,#ffe1aa);color:#b66e00}
.avatar.genos{background:linear-gradient(145deg,#eff4fb,#d7e2ee);color:#526b84}
.avatar.tatsumaki{background:linear-gradient(145deg,#ebfff5,#c8f2dc);color:#0b8d5e}
.arena-card h3{margin:0 0 3px;font-size:14px}.arena-card p{margin:0;color:var(--muted);font-size:10px}
.arena-stats{grid-column:1/-1;display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin-top:2px}
.arena-stat{background:#f8fbff;border:1px solid #e7eef6;border-radius:10px;padding:8px;display:grid}.arena-stat span{font-size:9px;color:#606e7d}.arena-stat strong{font-size:12px}
.animal-strip{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:8px}
.animal-mini{background:#fff;border:1px solid #e0e9f3;border-radius:12px;padding:9px;text-align:center;box-shadow:0 6px 16px rgba(43,78,116,.05)}
.animal-emoji{font-size:28px;line-height:1.1}.animal-mini strong{display:block;font-size:10px;margin-top:5px}.animal-mini small{font-size:8px;color:#626f7a}
.activity{display:grid}.activity-row{display:grid;grid-template-columns:96px minmax(0,1fr) auto;gap:10px;align-items:center;padding:11px 0;border-bottom:1px solid #edf2f7}.activity-row:last-child{border-bottom:0}.activity-row time{font-size:10px;color:#5f6d80}.activity-row strong{font-size:11px}.activity-row span{font-size:9px;color:#5f6d81}
.system-list{display:grid;gap:2px}.system-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;padding:10px 0;border-bottom:1px solid #edf2f7;align-items:center}.system-row:last-child{border-bottom:0}.system-row strong{font-size:11px}.system-row small{display:block;color:#616e7a;font-size:9px}
.connection-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.connection-card{background:#f9fbfe;border:1px solid #e4ecf5;border-radius:11px;padding:10px;display:flex;justify-content:space-between;gap:8px}.connection-card span{font-size:10px;color:#5f6d82}.connection-card strong{font-size:10px}
.animal-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px}
.animal-card{background:#fff;border:1px solid #e0e9f2;border-radius:14px;padding:13px;text-align:center;box-shadow:0 7px 18px rgba(43,78,116,.05)}
.animal-card .animal-emoji{font-size:38px}.animal-card h3{margin:7px 0 2px;font-size:12px}.animal-card small{color:#616f7d;font-size:9px}
.table-wrap{overflow:auto;border-radius:14px;border:1px solid var(--line);background:#fff;box-shadow:var(--shadow)}
table{border-collapse:collapse;width:100%;min-width:670px;font-size:11px}th,td{padding:11px 12px;border-bottom:1px solid #edf2f7;text-align:left}th{font-size:9px;text-transform:uppercase;letter-spacing:.06em;color:#606f80;background:#f8fbff}td{color:#52677f}td strong{color:#263f59}
.detail-hero{display:grid;grid-template-columns:auto 1fr auto;gap:16px;align-items:center;padding:20px}.detail-icon{width:72px;height:72px;border-radius:18px;background:linear-gradient(145deg,#eaf3ff,#d8e8ff);display:grid;place-items:center;font-weight:900;color:#1762d6;font-size:25px}.detail-hero h1,.detail-hero h2{margin:0 0 4px;font-size:24px}.detail-hero>div{min-width:0}.detail-hero p{overflow-wrap:anywhere}.detail-hero p{margin:0;color:var(--muted)}
.setting-row{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:14px 0;border-bottom:1px solid #edf2f7}.setting-row:last-child{border-bottom:0}.setting-row strong{font-size:11px}.setting-row small{display:block;color:#616e7c;font-size:9px;margin-top:2px}
.fake-toggle{width:42px;height:24px;border-radius:99px;background:#d7e2ee;position:relative}.fake-toggle.on{background:#68a5ff}.fake-toggle:after{content:"";width:18px;height:18px;border-radius:50%;background:#fff;position:absolute;top:3px;left:3px;box-shadow:0 2px 5px rgba(0,0,0,.15)}.fake-toggle.on:after{left:21px}
.empty-state{text-align:center;padding:42px 18px}.empty-icon{width:68px;height:68px;border-radius:22px;background:#eef5ff;margin:0 auto 13px;display:grid;place-items:center;color:#2b6bd7;font-size:30px}.empty-state h2{font-size:15px;margin:0}.empty-state p{color:var(--muted);max-width:420px;margin:7px auto 0;font-size:11px}
.more-dialog{border:1px solid #d9e5f1;border-radius:16px;padding:14px;background:#fff;color:var(--text);box-shadow:0 28px 70px rgba(38,67,101,.22);width:min(360px,90vw)}
.more-dialog::backdrop{background:rgba(28,50,74,.25)}.dialog-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.dialog-head button{border:0;background:#f1f6fb;border-radius:9px;width:34px;height:34px}.more-dialog>a{display:block;padding:12px;border-radius:10px;color:#4b627b}.more-dialog>a:hover{background:#f4f8fc}
.bottom-nav{display:none}.scrim{position:fixed;inset:0;background:rgba(20,38,58,.26);z-index:25}
:focus-visible{outline:2px solid #2e78ea;outline-offset:2px}
@media(max-width:1200px){.animal-strip{grid-template-columns:repeat(4,1fr)}.animal-grid{grid-template-columns:repeat(5,1fr)}}
@media(max-width:980px){.app-shell{grid-template-columns:1fr}.sidebar{position:fixed;left:0;top:0;width:230px;transform:translateX(-105%);transition:transform .2s ease;box-shadow:16px 0 40px rgba(31,58,90,.15)}body.menu-open .sidebar{transform:none}.menu-toggle{display:grid;place-items:center}.hero-grid{grid-template-columns:1fr}.grid-3{grid-template-columns:1fr 1fr}.animal-grid{grid-template-columns:repeat(4,1fr)}}
@media(max-width:720px){main{padding:16px 12px 95px}.topbar{padding:0 12px}.read-only-pill{display:none}.clock{font-size:10px}.grid-2,.grid-3,.grid-4{grid-template-columns:1fr}.pipeline,.pipeline-4{grid-template-columns:repeat(2,minmax(0,1fr))}.animal-strip{grid-template-columns:repeat(4,1fr)}.animal-grid{grid-template-columns:repeat(3,1fr)}.bottom-nav{position:fixed;display:grid;grid-template-columns:repeat(5,1fr);left:0;right:0;bottom:0;z-index:24;background:rgba(255,255,255,.97);border-top:1px solid var(--line);height:72px;padding:5px 6px max(5px,env(safe-area-inset-bottom));box-shadow:0 -8px 28px rgba(41,73,109,.08);backdrop-filter:blur(16px)}.bottom-nav a,.bottom-nav button{border:0;background:transparent;color:#5f6d81;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-size:9px}.bottom-nav span{font-size:19px}.bottom-nav .active{color:var(--blue)}.page-head{align-items:flex-start;flex-direction:column}.activity-row{grid-template-columns:72px 1fr}.activity-row>span{grid-column:2}.detail-hero{grid-template-columns:auto 1fr}.detail-hero>.status{grid-column:1/-1;width:max-content}}
@media(max-width:430px){.animal-strip{grid-template-columns:repeat(4,1fr);gap:6px}.animal-mini{padding:7px}.animal-emoji{font-size:24px}.animal-grid{grid-template-columns:repeat(2,1fr)}.health-meta{gap:12px}.big-status{font-size:26px}}
/* --- read-only data states and helpers (V2 tokens only) --- */
.skip-link{position:absolute;left:12px;top:-60px;z-index:60;background:#fff;color:var(--blue);border:1px solid var(--line-strong);border-radius:10px;padding:8px 12px;font-weight:700}
.skip-link:focus{top:12px}
.muted{color:#616f7e;font-weight:600}
.mono{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:10px}
.nowrap{white-space:nowrap}
.card-sub{margin:4px 0 0;color:var(--muted);font-size:11px}
.card-note{color:#52677f;font-size:11px;margin:10px 0 0;line-height:1.5}
.source-line{color:#5f6d80;font-size:10px;margin:10px 0 0;line-height:1.45;overflow-wrap:anywhere}
.fact-value{font-size:11px;font-weight:700;color:#263f59;text-align:right;overflow-wrap:anywhere}
.note-cell{min-width:260px;max-width:520px}
.event-line{display:grid;gap:3px;padding:10px 12px;border-radius:11px;background:var(--surface-soft);border:1px solid #e4ecf5;margin-bottom:10px}
.event-line span{font-size:10px;color:#5f6d81}.event-line strong{font-size:11px;line-height:1.45}.event-line small{font-size:9px;color:#616f7e}
.pipeline-4{grid-template-columns:repeat(4,minmax(0,1fr))}
.pipe-step strong{line-height:1.3}
.activity-row strong{overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.motor-cover.saitama:before{background:linear-gradient(145deg,#1e63ff,#5fa8ff)}
.motor-cover.genos:before{background:linear-gradient(145deg,#3c78d8,#8fb8f2)}
.motor-cover.tatsumaki:before{background:linear-gradient(145deg,#8fa6c2,#c3d3e6)}
.detail-icon.tatsumaki{background:linear-gradient(145deg,#f1f5fa,#dfe7f1);color:#5b7089}
.chip-row{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:12px}
.chip{border:1px solid var(--line-strong);background:#fff;color:#4f6781;border-radius:999px;padding:7px 12px;font-size:11px;font-weight:700;min-height:34px}
.chip:hover{background:#f5f9fe}
.chip.active{background:var(--blue-soft);border-color:#bcd4fb;color:#1559df}
.ghost-btn{border:1px solid #cfe1f8;background:#edf5ff;color:#1459be;border-radius:10px;padding:8px 12px;font-size:11px;font-weight:750;min-height:36px;white-space:nowrap}
.ghost-btn:hover:not(:disabled){background:#e2eeff}
.ghost-btn:disabled{background:#f3f6fa;border-color:#e0e7ef;color:#616f7e;cursor:not-allowed}
button.fake-toggle{border:0;padding:0;flex:0 0 auto}
.animal-number-badge{width:40px;height:40px;margin:0 auto;border-radius:12px;display:grid;place-items:center;background:linear-gradient(145deg,var(--blue),var(--blue-2));color:#fff;font-weight:850;font-size:15px}
.animal-mini .animal-number-badge{width:30px;height:30px;font-size:12px;border-radius:9px}
.animal-card .animal-number-badge{width:46px;height:46px;font-size:17px}
.animal-count{display:inline-block;margin-top:7px;font-size:9px;font-weight:750;color:#1559df;background:var(--blue-soft);border-radius:999px;padding:3px 8px}
.animal-card small{display:block}
.card .card.empty-state{box-shadow:none;border-style:dashed;background:var(--surface-soft)}
.history-note h2{font-size:14px;margin:3px 0 4px}.history-note p{margin:0;color:#52677f;font-size:11px}
.progress-head{display:flex;justify-content:space-between;gap:10px;font-size:11px;color:#5e6d83}.progress-head strong{color:#263f59}
.progress{height:10px;border-radius:99px;background:#edf3fa;border:1px solid #e0e9f3;overflow:hidden;margin-top:8px}
.progress-bar{display:block;height:100%;background:linear-gradient(90deg,var(--blue),var(--blue-2));border-radius:99px}
.w-0{width:0}.w-5{width:5%}.w-10{width:10%}.w-15{width:15%}.w-20{width:20%}.w-25{width:25%}.w-30{width:30%}.w-35{width:35%}.w-40{width:40%}.w-45{width:45%}.w-50{width:50%}.w-55{width:55%}.w-60{width:60%}.w-65{width:65%}.w-70{width:70%}.w-75{width:75%}.w-80{width:80%}.w-85{width:85%}.w-90{width:90%}.w-95{width:95%}.w-100{width:100%}
.loading{display:flex;align-items:center;gap:10px;color:#5d7390;font-weight:650}
.spinner{width:18px;height:18px;border-radius:50%;border:2px solid #d6e4f5;border-top-color:var(--blue);animation:spin .8s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.skeleton{height:190px;background:linear-gradient(90deg,#f4f8fc 0%,#eaf1f9 50%,#f4f8fc 100%);background-size:200% 100%;animation:shimmer 1.4s ease infinite}
@keyframes shimmer{to{background-position:-200% 0}}
.error-state .empty-icon{background:var(--red-soft);color:var(--red)}
.more-dialog>a.active{background:var(--blue-soft);color:#1559df}
.reduce-motion *,.reduce-motion *:before,.reduce-motion *:after{transition:none!important;animation:none!important;scroll-behavior:auto!important}
@media(max-width:720px){.pipeline-4{grid-template-columns:repeat(2,minmax(0,1fr))}.fact-value{text-align:left}.system-row{grid-template-columns:1fr}.note-cell{min-width:220px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important;scroll-behavior:auto!important}}
