* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Noto Sans JP", system-ui, sans-serif;
  color: #f8fafc;
  background:
    radial-gradient(circle at 18% 20%, rgba(56, 189, 248, 0.23), transparent 34%),
    radial-gradient(circle at 82% 12%, rgba(236, 72, 153, 0.20), transparent 34%),
    linear-gradient(135deg, #071827 0%, #070b18 55%, #1a071f 100%);
}

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 42px 18px;
}

.tool-card {
  width: min(960px, 100%);
  padding: 46px 48px 34px;
  border-radius: 28px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 92%, rgba(20, 184, 166, 0.28), transparent 30%),
    linear-gradient(145deg, rgba(148, 163, 184, 0.20), rgba(15, 23, 42, 0.78));
  border: 1px solid rgba(226, 232, 240, 0.22);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(18px);
}

.badge {
  display: inline-block;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  color: #dbeafe;
  border: 1px solid rgba(219, 234, 254, 0.25);
  background: rgba(15, 23, 42, 0.45);
}

h1 {
  margin: 16px 0 10px;
  font-size: clamp(34px, 5vw, 54px);
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1.15;
}

.lead {
  margin: 0 auto 28px;
  max-width: 680px;
  color: #d7e2ef;
  line-height: 1.9;
  font-weight: 800;
}

.tabs {
  display: inline-flex;
  gap: 12px;
  margin-bottom: 32px;
  flex-wrap: wrap;
  justify-content: center;
}

.tab {
  border: 1px solid rgba(226, 232, 240, 0.20);
  background: rgba(15, 23, 42, 0.62);
  color: #cbd5e1;
  padding: 12px 20px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 900;
}

.tab.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.95), rgba(168, 85, 247, 0.95));
  color: #ffffff;
  border-color: transparent;
}

.panel {
  display: none;
  margin-top: 18px;
}

.panel.active {
  display: block;
}

.big-number {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  justify-content: center;
  margin-bottom: 14px;
}

.big-number span {
  font-size: clamp(56px, 8vw, 92px);
  font-weight: 900;
  line-height: 1;
}

.big-number small {
  color: #cbd5e1;
  font-size: 1rem;
  font-weight: 800;
}

.control-row {
  display: grid;
  gap: 18px;
  margin-bottom: 24px;
}

.control-row label {
  display: grid;
  gap: 10px;
  text-align: left;
  font-weight: 700;
  color: #e2e8f0;
}

.control-row input,
.control-row select {
  width: 100%;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.75);
  color: #f8fafc;
  padding: 14px 16px;
  font-size: 1rem;
}

.control-row input[type="range"] {
  accent-color: #38bdf8;
  padding: 0;
}

.beat-lamps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.beat-lamp {
  height: 14px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
  transition: background 0.2s ease;
}

.beat-lamp.active {
  background: linear-gradient(135deg, #38bdf8, #a855f7);
}

.actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

button {
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.62);
  color: #f8fafc;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

button.primary {
  border: none;
  background: linear-gradient(135deg, #38bdf8, #a855f7, #ec4899);
}

button:hover {
  transform: translateY(-1px);
  border-color: rgba(56, 189, 248, 0.5);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.note {
  margin-top: 18px;
  color: #cbd5e1;
  font-size: 0.95rem;
  line-height: 1.7;
}

footer {
  margin-top: 30px;
  color: #a9b8ca;
  font-size: 13px;
  font-weight: 900;
}

footer a {
  color: #bae6fd;
  text-decoration: none;
}

@media (max-width: 760px) {
  .tool-card {
    padding: 34px 20px 28px;
  }

  .control-row {
    gap: 14px;
  }

  .beat-lamps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .beat-lamps {
    grid-template-columns: 1fr;
  }
}

.guitar-string-grid,
.mini-guitar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 22px 0;
}

.string-btn,
.chord-play-btn {
  min-height: 82px;
  border-radius: 18px;
  font-size: 22px;
  line-height: 1.35;
}

.string-btn small {
  color: #bae6fd;
  font-size: 13px;
}

.chord-box {
  margin-top: 20px;
  padding: 22px;
  border-radius: 20px;
  background: rgba(2, 6, 23, 0.74);
  border: 1px solid rgba(125, 211, 252, 0.18);
  overflow-x: auto;
}

#chordDiagram {
  margin: 0;
  color: #f8fafc;
  font-family: "Courier New", monospace;
  font-size: 18px;
  line-height: 1.65;
  text-align: left;
  white-space: pre;
}

.string-btn:hover,
.chord-play-btn:hover {
  background: rgba(56, 189, 248, 0.18);
}

.string-btn.active,
.chord-play-btn.active {
  border: none;
  background: linear-gradient(135deg, #38bdf8, #a855f7, #ec4899);
  box-shadow: 0 0 24px rgba(56, 189, 248, 0.35);
}

@media (max-width: 760px) {
  .guitar-string-grid,
  .mini-guitar-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .string-btn,
  .chord-play-btn {
    min-height: 74px;
    font-size: 20px;
  }

  #chordDiagram {
    font-size: 15px;
  }
}

@media (max-width: 420px) {
  .guitar-string-grid,
  .mini-guitar-grid {
    grid-template-columns: 1fr;
  }
}


/* 無料バッジ */
.badge-free-pill {
  display: inline-flex;
  align-items: center;
  background: #1D9E75;
  color: #E1F5EE;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

.badge-free-outline {
  display: inline-flex;
  align-items: center;
  background: transparent;
  color: #1D9E75;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1.5px solid #1D9E75;
  letter-spacing: 0.03em;
}
