* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: #F8FAFC;
  overflow-x: hidden;
  overflow-y: auto;
}

canvas {
  display: block;
  position: fixed;
  top: 0; left: 0;
}

/* ── 共通: ラベル ── */
.ctrl-label {
  color: #6B7280;
  font-size: 16px;
  font-family: sans-serif;
  white-space: nowrap;
}

.btn-group { display: flex; gap: 6px; }

/* ── アクションボタン ── */
.act-btn {
  padding: 10px 18px;
  border: none;
  font-size: 16px;
  font-family: sans-serif;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.15s;
  touch-action: manipulation;
  white-space: nowrap;
  font-weight: 500;
}
.act-start        { background: #16A34A; color: #FFFFFF; font-size: 17px; font-weight: 700; }
.act-start:hover  { background: #15803D; }
.act-share          { background: #EFF6FF; color: #2563EB; border: 1.5px solid #BFDBFE; font-weight: 600; }
.act-share:hover    { background: #DBEAFE; }
.act-share:active   { background: #BFDBFE; }
.act-share:disabled { background: #F3F4F6; color: #C4C9D4; border-color: #E5E7EB; cursor: not-allowed; }
.act-air           { background: #F0F9FF; color: #0284C7; border: 1.5px solid #BAE6FD; font-weight: 600; }
.act-air:hover     { background: #E0F2FE; }
.act-air.active    { background: #0284C7; color: #FFFFFF; border-color: #0284C7; }
.act-air.active:hover { background: #0369A1; }
.act-reset        { background: #FFF7ED; color: #92400E; border: 1.5px solid #FED7AA; font-size: 13px; padding: 7px 14px; font-weight: 400; }
.act-reset:hover  { background: #FFEDD5; border-color: #FDBA74; color: #78350F; }
.act-clear        { background: #F9FAFB; color: #9CA3AF; border: 1.5px solid #E5E7EB; font-size: 13px; padding: 7px 14px; font-weight: 400; }
.act-clear:hover  { background: #F3F4F6; color: #6B7280; border-color: #D1D5DB; }

/* ── お気に入りボタン ── */
.fav-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: #D1D5DB;
  padding: 3px 5px;
  border-radius: 6px;
  line-height: 1;
  flex-shrink: 0;
  transition: background 150ms, color 150ms;
  touch-action: manipulation;
}

.fav-btn:hover        { color: #D97706; }
.fav-btn.active       { color: #D97706; background: #FEF3C7; }
.fav-btn.active:hover { color: #B45309; }

/* ── 全て0 空状態オーバーレイ ── */
#empty-state {
  position: fixed;
  top: 0;
  left: 30%;
  width: 40%;
  height: 100%;
  align-items: center;
  justify-content: center;
  padding-bottom: 16vh;
  pointer-events: none;
  z-index: 10;
}
#empty-state:not([hidden]) {
  display: flex;
}
#empty-state-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(4px);
  border: 1px solid #E5E7EB;
  border-radius: 16px;
  padding: 20px 28px;
}
#empty-state-icon {
  font-size: 36px;
  line-height: 1;
}
#empty-state-msg {
  font-size: 15px;
  font-weight: 600;
  color: #374151;
  margin: 0;
}
#empty-state-sub {
  font-size: 12px;
  color: #9CA3AF;
  margin: 0;
  text-align: center;
}

/* ── ツールチップ ── */
#tooltip {
  display: none;
  position: fixed;
  z-index: 9999;
  max-width: 240px;
  background: #FFFFFF;
  color: #111827;
  font-size: 13px;
  font-family: sans-serif;
  line-height: 1.55;
  padding: 9px 12px;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.10);
  pointer-events: none;
}

.tip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  margin-left: 4px;
  font-size: 10px;
  font-weight: 700;
  color: #9CA3AF;
  background: #F3F4F6;
  border-radius: 50%;
  cursor: default;
  vertical-align: middle;
  line-height: 1;
  flex-shrink: 0;
  transition: color 0.1s, background 0.1s;
}

.tip-icon:hover,
.tip-icon.tip-active {
  color: #374151;
  background: #E5E7EB;
}
