
  .pe3dt-root{color-scheme:light}
  .pe3dt-root *{box-sizing:border-box}
  .pe3dt-root{margin:0;overflow:hidden}
  .pe3dt-root button,.pe3dt-root input,.pe3dt-root select{font:inherit}
  .pe3dt-root button{cursor:pointer;-webkit-tap-highlight-color:transparent}
  .pe3dt-root .trace-app{
    --main:#1e3a5f;--main-dark:#0f1e3a;--main-light:#2d5a8f;
    --accent:#d4af37;--accent-light:#f4cf5f;--text:#2c3e50;--muted:#677785;
    min-height:100vh;min-height:100dvh;color:var(--text);
    background:linear-gradient(135deg,#0ea5e9,#6366f1,#8b5cf6);
    font-family:system-ui,-apple-system,"Segoe UI","Hiragino Kaku Gothic ProN",Meiryo,sans-serif;
  }
  body.admin-bar .pe3dt-root .trace-app,
  body.admin-bar .pe3dt-root .app-shell{height:calc(100vh - 32px);height:calc(100dvh - 32px);min-height:0}
  .pe3dt-root .app-shell{height:100vh;height:100dvh;display:flex;flex-direction:column}
  .pe3dt-root .topbar{height:66px;flex:0 0 66px;padding:9px 18px;display:flex;align-items:center;gap:14px;background:var(--main);color:#fff;box-shadow:0 2px 12px #0003;z-index:20}
  .pe3dt-root .brand{display:flex;align-items:center;gap:10px;min-width:260px}
  .pe3dt-root .brand-mark{width:40px;height:40px;border:2px solid var(--accent);border-radius:12px;display:grid;place-items:center;background:#fff1}
  .pe3dt-root .brand h1{font-size:18px;line-height:1;margin:0;font-weight:900;white-space:nowrap}
  .pe3dt-root .brand small{display:block;margin-top:5px;color:#dce8f5;font-size:11px;font-weight:700}
  .pe3dt-root .sport-tabs{flex:1;display:flex;justify-content:center;gap:7px;overflow-x:auto;scrollbar-width:none}
  .pe3dt-root .sport-tabs::-webkit-scrollbar{display:none}
  .pe3dt-root .sport-tab{height:40px;min-width:98px;padding:0 16px;border:0;border-radius:999px;background:#ffffff18;color:#fff;font-weight:900;white-space:nowrap}
  .pe3dt-root .sport-tab[aria-selected="true"]{background:var(--accent);color:var(--main-dark)}
  .pe3dt-root .top-actions{display:flex;gap:8px}
  .pe3dt-root .round-head{width:42px;height:42px;border:0;border-radius:50%;background:#ffffff18;color:#fff;display:grid;place-items:center}
  .pe3dt-root .ico{width:24px;height:24px;display:block;fill:currentColor}
  .pe3dt-root button:focus-visible,.pe3dt-root input:focus-visible,.pe3dt-root select:focus-visible{outline:4px solid var(--accent-light);outline-offset:2px}

  .pe3dt-root .workspace{flex:1;min-height:0;padding:14px 16px 16px;display:grid;grid-template-rows:minmax(0,1fr) auto;gap:12px}
  .pe3dt-root .stage-grid{min-height:0;display:grid;grid-template-columns:1fr 1fr;gap:14px}
  .pe3dt-root .viewer{min-width:0;min-height:0;position:relative;overflow:hidden;background:#fff;border-radius:16px;box-shadow:0 8px 24px #0003;border-top:4px solid var(--main-light)}
  .pe3dt-root .viewer-head{height:48px;padding:0 14px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #e8edf2;background:#fff}
  .pe3dt-root .viewer-title{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:900;color:var(--main)}
  .pe3dt-root .badge{padding:5px 9px;border-radius:999px;background:#eaf1f8;color:var(--main);font-size:12px;font-weight:900}
  .pe3dt-root .media-area{position:absolute;inset:48px 0 0;background:linear-gradient(145deg,#14253b,#09121e);display:grid;place-items:center;overflow:hidden}
  .pe3dt-root video{width:100%;height:100%;object-fit:contain;background:#07101b;display:none}
  .pe3dt-root #videoOverlay{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:2}
  .pe3dt-root .empty-video{display:flex;flex-direction:column;align-items:center;text-align:center;color:#fff;padding:20px}
  .pe3dt-root .empty-video .upload-disc{width:88px;height:88px;border:2px dashed #9bb8d6;border-radius:50%;display:grid;place-items:center;background:#ffffff0d;margin-bottom:15px}
  .pe3dt-root .empty-video strong{font-size:20px}.pe3dt-root .empty-video p{margin:7px 0 16px;color:#b8c8d9;font-size:13px}
  .pe3dt-root .file-label{min-height:44px;padding:0 18px;border-radius:12px;background:var(--accent);color:var(--main-dark);font-weight:900;display:flex;align-items:center;gap:8px;cursor:pointer;box-shadow:0 4px 12px #0005}
  .pe3dt-root #videoFile{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
  .pe3dt-root .phase-chip{position:absolute;left:14px;bottom:14px;padding:7px 12px;border-radius:10px;background:#07101bcc;color:#fff;font-size:13px;font-weight:900;z-index:3;backdrop-filter:blur(5px)}
  .pe3dt-root .canvas-wrap{position:absolute;inset:48px 0 0;background:radial-gradient(circle at 50% 42%,#f8fbff 0,#dbe7f3 58%,#aebed1 100%);touch-action:none}
  .pe3dt-root #poseCanvas{width:100%;height:100%;display:block}
  .pe3dt-root .canvas-hint{position:absolute;top:10px;left:50%;transform:translateX(-50%);padding:6px 11px;border-radius:999px;background:#173552d9;color:#fff;font-size:12px;font-weight:800;pointer-events:none;white-space:nowrap}
  .pe3dt-root .axis{position:absolute;left:12px;bottom:10px;width:54px;height:54px;border-radius:50%;background:#fffbd;box-shadow:0 2px 8px #0002;pointer-events:none}
  .pe3dt-root .axis span{position:absolute;font-size:10px;font-weight:900}.pe3dt-root .axis .x{right:5px;top:23px;color:#e34b4b}.pe3dt-root .axis .y{left:24px;top:3px;color:#2e9d63}.pe3dt-root .axis .z{left:5px;bottom:5px;color:#367bd2}
  .pe3dt-root .model-status{position:absolute;right:12px;bottom:11px;padding:6px 9px;background:#fffde;border-radius:8px;color:var(--main);font-size:12px;font-weight:900}

  .pe3dt-root .control-deck{display:grid;grid-template-columns:minmax(390px,1.25fr) minmax(330px,1fr);gap:12px}
  .pe3dt-root .player-panel,.pe3dt-root .lesson-panel{background:#fff;border-radius:16px;box-shadow:0 8px 22px #0002;min-width:0}
  .pe3dt-root .player-panel{padding:11px 14px}
  .pe3dt-root .transport{display:flex;align-items:center;gap:8px}
  .pe3dt-root .transport-btn{width:44px;height:44px;border:0;border-radius:50%;display:grid;place-items:center;background:#eaf0f6;color:var(--main)}
  .pe3dt-root .transport-btn.main-play{width:50px;height:50px;background:var(--accent);color:var(--main-dark)}
  .pe3dt-root .timeline-wrap{flex:1;min-width:90px}
  .pe3dt-root .time-row{display:flex;justify-content:space-between;font-variant-numeric:tabular-nums;font-size:11px;font-weight:800;color:var(--muted);margin-top:1px}
  .pe3dt-root #timeline{width:100%;height:7px;accent-color:var(--main);cursor:pointer}
  .pe3dt-root .speed-select{height:40px;border:2px solid #dbe4ed;border-radius:10px;padding:0 8px;background:#fff;color:var(--main);font-weight:900}
  .pe3dt-root .phase-row{display:grid;grid-template-columns:repeat(4,1fr);gap:7px;margin-top:9px}
  .pe3dt-root .phase-btn{height:36px;border:2px solid #dce4ec;border-radius:10px;background:#f8fafc;color:var(--main);font-weight:900;font-size:13px}
  .pe3dt-root .phase-btn[aria-pressed="true"]{border-color:var(--accent);background:#fff7d4;box-shadow:inset 0 -3px 0 var(--accent)}
  .pe3dt-root .lesson-panel{padding:10px 12px;display:grid;grid-template-columns:1fr auto;gap:12px;align-items:center;border-left:5px solid var(--accent)}
  .pe3dt-root .lesson-label{font-size:11px;color:var(--muted);font-weight:900;letter-spacing:.08em}.pe3dt-root .lesson-text{margin:3px 0 0;font-size:17px;line-height:1.35;color:var(--main-dark);font-weight:900}
  .pe3dt-root .lesson-tools{display:flex;gap:7px;align-items:center}
  .pe3dt-root .tool-select{height:40px;border:2px solid #dbe4ed;border-radius:10px;background:#fff;padding:0 8px;color:var(--main);font-weight:900}

  .pe3dt-root .floating-tools{position:fixed;right:20px;top:82px;display:flex;flex-direction:column;gap:10px;z-index:15}
  .pe3dt-root .float-btn{width:52px;height:52px;border:0;border-radius:50%;display:grid;place-items:center;background:#fff;color:var(--main);box-shadow:0 4px 14px #0004;position:relative}
  .pe3dt-root .float-btn[aria-pressed="true"]{background:var(--accent);color:var(--main-dark)}
  .pe3dt-root .float-btn::after{content:attr(data-tip);position:absolute;right:61px;padding:6px 9px;border-radius:7px;background:#0f1e3ae8;color:#fff;font-size:12px;font-weight:800;white-space:nowrap;opacity:0;pointer-events:none;transform:translateX(4px);transition:.15s}
  .pe3dt-root .float-btn:hover::after,.pe3dt-root .float-btn:focus-visible::after{opacity:1;transform:none}
  .pe3dt-root .demo-note{position:fixed;left:18px;top:80px;padding:6px 10px;border-radius:8px;background:#fffde;color:var(--main);box-shadow:0 3px 10px #0002;font-size:11px;font-weight:800;z-index:10}
  .pe3dt-root .demo-note[data-state="ready"]{background:#e8fff0;color:#17663a}.pe3dt-root .demo-note[data-state="error"]{background:#fff0f0;color:#9b2525}

  @media(max-width:1050px){
    .pe3dt-root .brand{min-width:auto}.pe3dt-root .brand small{display:none}.pe3dt-root .sport-tab{min-width:84px;padding:0 11px}
    .pe3dt-root .workspace{padding-right:78px}.pe3dt-root .control-deck{grid-template-columns:1fr}.pe3dt-root .lesson-panel{min-height:64px}
    .pe3dt-root .floating-tools{right:13px}.pe3dt-root .stage-grid{gap:10px}
  }
  @media(max-width:720px){
    .pe3dt-root{overflow:auto}.pe3dt-root .trace-app,.pe3dt-root .trace-app .app-shell{min-height:100dvh;height:auto;overflow:visible}
    .pe3dt-root .topbar{height:58px;flex-basis:58px;padding:7px 8px;gap:7px;position:sticky;top:0}.pe3dt-root .brand-mark{display:none}.pe3dt-root .brand h1{font-size:14px}.pe3dt-root .brand{min-width:112px}
    .pe3dt-root .top-actions{display:none}.pe3dt-root .sport-tabs{justify-content:flex-start}.pe3dt-root .sport-tab{min-width:75px;height:38px;font-size:12px;padding:0 8px}
    .pe3dt-root .workspace{padding:9px 66px 14px 9px;display:block}.pe3dt-root .stage-grid{display:block}.pe3dt-root .viewer{height:42vh;min-height:310px;margin-bottom:10px}
    .pe3dt-root .control-deck{display:block}.pe3dt-root .player-panel,.pe3dt-root .lesson-panel{margin-bottom:10px}.pe3dt-root .transport{flex-wrap:wrap}.pe3dt-root .timeline-wrap{order:5;flex-basis:100%}
    .pe3dt-root .phase-row{grid-template-columns:repeat(2,1fr)}.pe3dt-root .lesson-panel{grid-template-columns:1fr}.pe3dt-root .lesson-tools{justify-content:flex-start;overflow-x:auto}
    .pe3dt-root .floating-tools{right:8px;top:70px}.pe3dt-root .float-btn{width:48px;height:48px}.pe3dt-root .float-btn::after{display:none}.pe3dt-root .demo-note{display:none}
  }
  @media(max-width:782px){
    body.admin-bar .pe3dt-root .trace-app,
    body.admin-bar .pe3dt-root .app-shell{height:calc(100vh - 46px);height:calc(100dvh - 46px)}
  }
  @media(prefers-reduced-motion:reduce){.pe3dt-root *{scroll-behavior:auto!important;transition-duration:.01ms!important}}
