:root{
  --bg:#fff;
  --ink:#0b0b0b;
  --line:#000;
  --clock:#000;
}
html,body{
  height:100%;
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family:"Noto Sans JP", system-ui, -apple-system, Segoe UI, Arial, sans-serif;
  line-height:1.8;
}
img{max-width:100%;height:auto;display:block;}

/* 本文 */
main h2{
  font-size:2vw;
  text-align:center;
  margin-top:100px;
}
main h3{
  font-size:1vw;
  text-align:center;
  margin-top:10vw;
}
main p{
  text-align:center;
  padding:20px 10vw;
}
div{ margin-bottom:17vw; }
.h2-container{ justify-content:center; }
.h2-container h2{
  font-size:1.5em;
  font-weight:500;
  padding-bottom:7px;
}
footer{ padding:0 30vw; text-align:center; }
footer img{ margin-top:20vw; }

/* フェードイン */
#site{ opacity:0; transition:opacity 1.2s ease; }
#site.visible{ opacity:1; }

/* ローディング */
#loading-screen{
  position:fixed; inset:0;
  display:grid; place-items:center;
  background:#fff; z-index:9999;
  transition:opacity 1s ease;
}
#loading-screen.hidden{ opacity:0; pointer-events:none; }
#loading-screen svg{
  width:min(96vmin,1000px);
  height:auto;
  display:block;
  font-family:ui-monospace,monospace;
}
.trace{
  fill:none;
  stroke:var(--line);
  stroke-width:3.5;
  stroke-linejoin:round;
  stroke-linecap:round;
  stroke-dasharray:1400;
  stroke-dashoffset:1400;
  animation:draw 5s linear infinite;
}
@keyframes draw{ to{ stroke-dashoffset:0 } }
.time-label{
  font-size:180px;
  fill:rgba(0,0,0,.12);
  font-weight:700;
  text-anchor:middle;
}
.loading{
  font-size:22px;
  fill:#333;
  text-anchor:middle;
  animation:blink 3s steps(2,start) infinite;
}
@keyframes blink{ to{ visibility:hidden } }

/* 右上HUD（時計のみ） */
#hud{
  position:fixed;
  top:12px;
  right:16px;
  z-index:2000;
  pointer-events:none;
  opacity:0;
  transition:opacity .4s ease;
}
#hud.visible{ opacity:1; }
#hud-clock{
  font:600 16px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", "Noto Sans JP", monospace;
  letter-spacing:.04em;
  color:var(--clock);
  opacity:.9;
}

/* 小画面 */
@media (max-width:480px){
  #hud-clock{ font-size:14px; }
  .time-label{ font-size:120px; }
}
.ecg-logo {
    position: fixed;
    top: 10px;
    left: 10px;  /* right を left に変更 */
    z-index: 1000;
}
.ecg-logo img {
    width: 80px;
    height: auto;
}