*{ box-sizing:border-box; }
html,body{ height:100%; margin:0; }
body{
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Arial;
  background:#0b1020;
  color:#e5e7eb;
}

#app{ min-height:100%; display:flex; flex-direction:column; }

.top{
  padding:16px 14px;
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:14px;
  border-bottom:1px solid rgba(255,255,255,.08);
}

.brand .title{ font-size:18px; font-weight:800; letter-spacing:.2px; }
.brand .subtitle{ opacity:.85; font-size:13px; margin-top:2px; }

.hud{ display:flex; gap:12px; flex-wrap:wrap; }
.hudItem{
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
  padding:10px 12px;
  border-radius:12px;
  min-width:140px;
}
.hudLabel{ font-size:12px; opacity:.8; }
.hudValue{ font-size:15px; font-weight:800; margin-top:2px; }
.hudValue .sub{
  display:block;
  font-size:12px;
  font-weight:700;
  opacity:.85;
  margin-top:2px;
}

.main{
  flex:1 1 auto;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:16px;
}

.card{
  width:min(820px, 96vw);
  background: rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.10);
  border-radius:16px;
  padding:16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}

.noteFrame{
  background:
    radial-gradient(circle at 35% 25%,
      rgba(195, 255, 252, 0.95) 0%,
      rgba(135, 235, 228, 0.78) 42%,
      rgba(130, 165, 178, 0.58) 74%,
      rgba(85, 100, 120, 0.38) 100%
    );

  border:1px solid rgba(255,255,255,.28);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.35),
    inset 0 -10px 30px rgba(0,0,0,.12),
    0 10px 26px rgba(0,0,0,.22);

  border-radius:14px;
  padding:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:220px;

  backdrop-filter: blur(6px) saturate(1.08);
  -webkit-backdrop-filter: blur(6px) saturate(1.08);

  overflow:hidden;
}

#noteImg{
  max-width:min(540px, 92%);
  max-height:280px;
  width:auto;
  height:auto;
  image-rendering:auto;
}

.noteFallback{
  padding:10px 12px;
  border-radius:10px;
  background: rgba(239,68,68,.12);
  border:1px solid rgba(239,68,68,.28);
  color:#fecaca;
  font-size:13px;
}

.statusRow{
  margin-top:12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.phase{ font-weight:800; font-size:14px; }
.countdown{ font-weight:800; font-size:14px; opacity:.9; }

.gaugeWrap{ margin-top:14px; }
.gaugeLabel{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:8px;
  font-size:13px;
  opacity:.95;
}
.gauge{
  width:100%;
  height:12px;
  border-radius:999px;
  background: rgba(255,255,255,.10);
  overflow:hidden;
  border:1px solid rgba(255,255,255,.10);
}
.gaugeFill{
  height:100%;
  width:0%;
  background: rgba(34,197,94,.75);
}

.metrics{
  margin-top:12px;
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:10px;
}
.metric{
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
  border-radius:12px;
  padding:10px 12px;
}
.metric .k{ font-size:12px; opacity:.8; }
.metric .v{ font-size:14px; font-weight:800; margin-top:4px; }

.msg{
  min-height:22px;
  margin-top:12px;
  font-size:13px;
  opacity:.92;
}

.controls{
  margin-top:12px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.btn{
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color:#e5e7eb;
  padding:10px 12px;
  border-radius:12px;
  font-weight:800;
  cursor:pointer;
}
.btn:hover{ background: rgba(255,255,255,.09); }
.btn:disabled{ opacity:.55; cursor:not-allowed; }

.btn.primary{
  background: rgba(59,130,246,.22);
  border-color: rgba(59,130,246,.35);
}

.footnote{
  margin-top:12px;
  font-size:12px;
  opacity:.78;
  line-height:1.35;
}

.hidden{ display:none !important; }

@media (max-width: 720px){
  .metrics{ grid-template-columns: 1fr; }
  #noteImg{ max-height:220px; }
}
