.ivc-app {
  --ivc-ink: #1f2633;
  --ivc-muted: #687284;
  --ivc-line: #e4e8ef;
  --ivc-surface: #ffffff;
  --ivc-bg: #f5f7fa;
  --ivc-primary: #e85d3f;
  --ivc-primary-dark: #c9442a;
  --ivc-primary-soft: #fff0eb;
  --ivc-accent: #f5aa35;
  --ivc-success: #238a63;
  --ivc-shadow: 0 24px 70px rgba(31, 38, 51, 0.1);
  width: 100%;
  margin: 32px auto;
  color: var(--ivc-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  line-height: 1.7;
  box-sizing: border-box;
}

.ivc-app *,
.ivc-app *::before,
.ivc-app *::after {
  box-sizing: border-box;
}

.ivc-app button {
  font: inherit;
}

.ivc-shell {
  position: relative;
  max-width: 920px;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 44px);
  overflow: hidden;
  border: 1px solid rgba(228, 232, 239, 0.9);
  border-radius: 30px;
  background:
    radial-gradient(circle at 0 0, rgba(245, 170, 53, 0.11), transparent 30%),
    radial-gradient(circle at 100% 0, rgba(232, 93, 63, 0.1), transparent 32%),
    var(--ivc-bg);
  box-shadow: var(--ivc-shadow);
}

.ivc-hero {
  max-width: 710px;
  margin: 0 auto 28px;
  text-align: center;
}

.ivc-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 7px 12px;
  border: 1px solid rgba(232, 93, 63, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--ivc-primary-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.ivc-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ivc-primary);
  box-shadow: 0 0 0 5px rgba(232, 93, 63, 0.12);
}

.ivc-title {
  margin: 0;
  color: var(--ivc-ink);
  font-size: clamp(28px, 5vw, 46px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.04em;
}

.ivc-lead {
  margin: 14px 0 0;
  color: var(--ivc-muted);
  font-size: clamp(14px, 2vw, 17px);
}

.ivc-card {
  position: relative;
  max-width: 720px;
  min-height: 440px;
  margin: 0 auto;
  border: 1px solid var(--ivc-line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 40px rgba(31, 38, 51, 0.06);
}

.ivc-panel {
  min-height: 440px;
  padding: clamp(24px, 5vw, 48px);
  animation: ivc-fade-up 0.35s ease both;
}

.ivc-panel[hidden],
.ivc-toast[hidden] {
  display: none !important;
}

.ivc-mic-visual {
  position: relative;
  display: grid;
  width: 148px;
  height: 148px;
  margin: 0 auto 28px;
  place-items: center;
}

.ivc-mic-icon {
  position: relative;
  z-index: 3;
  display: grid;
  width: 82px;
  height: 82px;
  border-radius: 25px;
  background: linear-gradient(145deg, #f77455, var(--ivc-primary));
  box-shadow: 0 18px 30px rgba(232, 93, 63, 0.24);
  place-items: center;
  transform: rotate(-3deg);
}

.ivc-mic-icon svg {
  width: 42px;
  height: 42px;
  fill: #fff;
}

.ivc-sound-ring {
  position: absolute;
  border: 1px solid rgba(232, 93, 63, 0.22);
  border-radius: 50%;
  inset: 12px;
}

.ivc-sound-ring--two {
  inset: 0;
  border-color: rgba(232, 93, 63, 0.1);
}

.ivc-app[data-state="ready"] .ivc-sound-ring--one {
  animation: ivc-pulse 2.2s ease-out infinite;
}

.ivc-app[data-state="ready"] .ivc-sound-ring--two {
  animation: ivc-pulse 2.2s 0.55s ease-out infinite;
}

.ivc-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 28px;
  color: var(--ivc-muted);
}

.ivc-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 100px;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.ivc-step-number {
  display: grid;
  width: 30px;
  height: 30px;
  border: 1px solid var(--ivc-line);
  border-radius: 50%;
  background: #fff;
  color: var(--ivc-primary);
  place-items: center;
}

.ivc-step-line {
  width: clamp(22px, 7vw, 72px);
  height: 1px;
  margin-top: -23px;
  background: var(--ivc-line);
}

.ivc-button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 14px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.ivc-button:hover {
  transform: translateY(-2px);
}

.ivc-button:focus-visible,
.ivc-text-button:focus-visible {
  outline: 3px solid rgba(232, 93, 63, 0.25);
  outline-offset: 3px;
}

.ivc-button--primary {
  width: min(100%, 360px);
  margin: 0 auto;
  background: var(--ivc-primary);
  color: #fff;
  box-shadow: 0 12px 25px rgba(232, 93, 63, 0.22);
}

.ivc-button--primary:hover {
  background: var(--ivc-primary-dark);
  color: #fff;
  box-shadow: 0 16px 30px rgba(232, 93, 63, 0.26);
}

.ivc-button-icon {
  font-size: 9px;
  text-shadow: 12px 0 0 rgba(255, 255, 255, 0.5), -12px 0 0 rgba(255, 255, 255, 0.5);
}

.ivc-panel[data-ivc-panel="ready"] {
  text-align: center;
}

.ivc-permission-note {
  margin: 14px 0 0;
  color: #8a93a2;
  font-size: 12px;
}

.ivc-countdown-wrap {
  text-align: center;
}

.ivc-measure-label,
.ivc-result-kicker {
  margin: 0;
  color: var(--ivc-primary-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ivc-countdown {
  display: flex;
  min-height: 92px;
  align-items: center;
  justify-content: center;
  margin: 4px 0;
  color: var(--ivc-ink);
  font-size: clamp(50px, 11vw, 78px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.06em;
}

.ivc-app[data-state="recording"] .ivc-countdown {
  color: var(--ivc-primary);
  animation: ivc-recording-pop 0.75s ease-in-out infinite alternate;
}

.ivc-instruction {
  min-height: 48px;
  margin: 0;
  color: var(--ivc-muted);
  font-size: 14px;
}

.ivc-instruction strong {
  color: var(--ivc-ink);
  font-size: 18px;
}

.ivc-spectrum {
  display: flex;
  height: 116px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 28px 0 18px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid var(--ivc-line);
  border-radius: 18px;
  background: linear-gradient(180deg, #fbfcfd, #f5f7fa);
}

.ivc-spectrum span {
  width: 7px;
  height: 10%;
  min-height: 5px;
  border-radius: 999px;
  background: #cbd1db;
  transition: height 80ms linear, background-color 0.2s ease;
}

.ivc-spectrum span.is-presence-band {
  background: var(--ivc-primary);
}

.ivc-level-row {
  display: grid;
  grid-template-columns: 82px 1fr;
  align-items: center;
  gap: 12px;
  color: var(--ivc-muted);
  font-size: 12px;
  font-weight: 700;
}

.ivc-level-track,
.ivc-progress,
.ivc-metric-track {
  position: relative;
  overflow: hidden;
  border-radius: 999px;
  background: #edf0f4;
}

.ivc-level-track {
  height: 8px;
}

.ivc-level-fill,
.ivc-progress-fill,
.ivc-metric-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--ivc-accent), var(--ivc-primary));
  transition: width 0.1s linear;
}

.ivc-progress {
  height: 4px;
  margin-top: 18px;
}

.ivc-progress-fill {
  transition: width 70ms linear;
}

.ivc-text-button {
  display: block;
  margin: 18px auto 0;
  padding: 4px 8px;
  border: 0;
  background: transparent;
  color: var(--ivc-muted);
  cursor: pointer;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.ivc-result-head {
  display: grid;
  grid-template-columns: 224px 1fr;
  align-items: center;
  gap: 34px;
}

.ivc-score-ring {
  --ivc-score: 0;
  position: relative;
  display: grid;
  width: 224px;
  height: 224px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: conic-gradient(var(--ivc-primary) calc(var(--ivc-score) * 1%), #e9edf3 0);
  box-shadow: 0 16px 34px rgba(31, 38, 51, 0.08);
  place-items: center;
  transform: rotate(0deg);
}

/* 添付イメージのように、太い円形ゲージの中央へ白い区切り線を重ねる。 */
.ivc-score-ring::before {
  position: absolute;
  z-index: 1;
  border: 3px solid rgba(255, 255, 255, 0.92);
  border-radius: inherit;
  content: "";
  pointer-events: none;
  inset: 12px;
}

.ivc-score-inner {
  position: relative;
  z-index: 2;
  display: grid;
  width: 164px;
  height: 164px;
  padding: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow:
    inset 0 0 0 1px var(--ivc-line),
    0 0 0 2px rgba(255, 255, 255, 0.72);
  place-items: center;
}

/* 数字そのものを円の中央に置き、「点」は中央計算に含めず右側へ添える。 */
.ivc-score-value {
  position: relative;
  display: inline-block;
  line-height: 1;
}

.ivc-score-inner strong {
  display: block;
  color: var(--ivc-ink);
  font-size: 76px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.075em;
  font-variant-numeric: tabular-nums;
}

.ivc-score-inner span {
  position: absolute;
  top: 64%;
  left: calc(100% + 8px);
  margin: 0;
  color: #596477;
  font-size: 23px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  transform: translateY(-50%);
}

.ivc-result-copy h3 {
  margin: 8px 0 10px;
  color: var(--ivc-ink);
  font-size: clamp(22px, 4vw, 31px);
  font-weight: 850;
  line-height: 1.35;
  letter-spacing: -0.035em;
}

.ivc-result-copy > p:last-child {
  margin: 0;
  color: var(--ivc-muted);
  font-size: 14px;
}

.ivc-metrics {
  display: grid;
  gap: 16px;
  margin-top: 32px;
  padding: 22px;
  border: 1px solid var(--ivc-line);
  border-radius: 18px;
  background: #fafbfc;
}

.ivc-metric-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
  color: var(--ivc-muted);
  font-size: 12px;
  font-weight: 700;
}

.ivc-metric-head strong {
  color: var(--ivc-ink);
  font-size: 13px;
}

.ivc-metric-track {
  height: 7px;
}

.ivc-metric-track span {
  transition: width 0.75s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ivc-result-tip {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid rgba(245, 170, 53, 0.22);
  border-radius: 16px;
  background: #fffaf0;
}

.ivc-result-tip p {
  margin: 0;
  color: #6f6047;
  font-size: 13px;
}

.ivc-tip-icon {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 6px;
  background: var(--ivc-accent);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.ivc-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 22px;
}

.ivc-actions .ivc-button {
  width: 100%;
  margin: 0;
}

.ivc-button--x {
  background: #17191d;
  color: #fff;
}

.ivc-button--x:hover {
  background: #000;
  color: #fff;
}

.ivc-button--ghost {
  grid-column: 1 / -1;
  border-color: var(--ivc-line);
  background: #fff;
  color: var(--ivc-ink);
}

.ivc-button--ghost:hover {
  border-color: #cbd1db;
  background: #f8f9fb;
  color: var(--ivc-ink);
}

.ivc-error-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.ivc-error-icon {
  display: grid;
  width: 58px;
  height: 58px;
  margin-bottom: 18px;
  border-radius: 18px;
  background: var(--ivc-primary-soft);
  color: var(--ivc-primary);
  font-size: 28px;
  font-weight: 900;
  place-items: center;
}

.ivc-error-panel h3 {
  margin: 0;
  font-size: 23px;
}

.ivc-error-panel p {
  max-width: 500px;
  margin: 12px 0 24px;
  color: var(--ivc-muted);
  font-size: 14px;
}

.ivc-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 720px;
  margin: 18px auto 0;
}

.ivc-info-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(228, 232, 239, 0.85);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
}

.ivc-info-icon {
  flex: 0 0 auto;
  color: var(--ivc-primary);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.ivc-info-card h3 {
  margin: 0 0 4px;
  color: var(--ivc-ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
}

.ivc-info-card p {
  margin: 0;
  color: var(--ivc-muted);
  font-size: 11px;
  line-height: 1.6;
}

.ivc-disclaimer {
  max-width: 720px;
  margin: 16px auto 0;
  color: #8992a0;
  font-size: 10px;
  line-height: 1.7;
  text-align: center;
}

.ivc-toast {
  position: fixed;
  z-index: 99999;
  right: 24px;
  bottom: 24px;
  max-width: min(360px, calc(100vw - 32px));
  padding: 13px 16px;
  border-radius: 12px;
  background: #20242b;
  color: #fff;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.2);
  font-size: 13px;
  font-weight: 700;
  animation: ivc-fade-up 0.25s ease both;
}

@keyframes ivc-pulse {
  0% { opacity: 0.75; transform: scale(0.72); }
  70%, 100% { opacity: 0; transform: scale(1.14); }
}

@keyframes ivc-recording-pop {
  from { transform: scale(0.98); }
  to { transform: scale(1.04); }
}

@keyframes ivc-fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 720px) {
  .ivc-app {
    margin: 18px auto;
  }

  .ivc-shell {
    padding: 18px;
    border-radius: 22px;
  }

  .ivc-card,
  .ivc-panel {
    min-height: 420px;
  }

  .ivc-card {
    border-radius: 20px;
  }

  .ivc-panel {
    padding: 26px 20px;
  }

  .ivc-pc-only {
    display: none;
  }

  .ivc-mic-visual {
    width: 126px;
    height: 126px;
    margin-bottom: 22px;
  }

  .ivc-mic-icon {
    width: 72px;
    height: 72px;
    border-radius: 22px;
  }

  .ivc-step {
    min-width: 78px;
    font-size: 10px;
  }

  .ivc-step-line {
    width: 18px;
  }

  .ivc-spectrum {
    height: 100px;
    gap: 3px;
    padding: 13px 10px;
  }

  .ivc-spectrum span {
    width: 5px;
  }

  .ivc-result-head {
    grid-template-columns: 1fr;
    gap: 20px;
    text-align: center;
  }

  .ivc-score-ring {
    width: 210px;
    height: 210px;
    margin: 0 auto;
  }

  .ivc-score-inner {
    width: 154px;
    height: 154px;
  }

  .ivc-score-inner strong {
    font-size: 70px;
  }

  .ivc-score-inner span {
    left: calc(100% + 7px);
    font-size: 21px;
  }

  .ivc-actions {
    grid-template-columns: 1fr;
  }

  .ivc-button--ghost {
    grid-column: auto;
  }

  .ivc-info-grid {
    grid-template-columns: 1fr;
  }

  .ivc-info-card {
    padding: 14px;
  }
}

@media (max-width: 420px) {
  .ivc-title {
    font-size: 27px;
  }

  .ivc-steps {
    justify-content: space-between;
  }

  .ivc-step {
    min-width: 68px;
  }

  .ivc-step-line {
    flex: 1;
    width: auto;
  }

  .ivc-button {
    min-height: 50px;
    padding-inline: 15px;
  }

  .ivc-score-ring {
    width: min(196px, 68vw);
    height: min(196px, 68vw);
  }

  .ivc-score-inner {
    width: min(144px, 50vw);
    height: min(144px, 50vw);
  }

  .ivc-score-inner strong {
    font-size: clamp(60px, 19vw, 68px);
  }

  .ivc-score-inner span {
    left: calc(100% + 6px);
    font-size: 19px;
  }

  .ivc-metrics {
    padding: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ivc-app *,
  .ivc-app *::before,
  .ivc-app *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
