* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  text-align: center;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
}

.wrapper {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
}

.bg-img {
  width: 100%;
  display: block;
}

.intro {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 92%;
  text-align: center;
  color: #fff;
  padding: 30px;
  background: url(../images/kuang.png) no-repeat center center;
  background-size: 100% 100%;
}

.intro-title {
  font-size: 42px;
  font-weight: 800;
  color: #fbf262;
  margin-bottom: 20px;
}

.intro-text {
  font-size: 22px;
  line-height: 1.6;
  font-weight: bold;
}

.form {
  position: absolute;
  top: 63%;
  width: 100%;
  text-align: center;
}

.input-stock {
    width: 90%;
    height: 8%;
    border-radius: 1rem;
    border: 2px solid #3ba2bc;
    margin-bottom: 1rem;
    padding: 1.5rem 2rem;
    text-align: center;
    font-size: 30px;
    background: rgb(238 238 238);
    color: black;
}

.btn-start {
  animation: bounce 1s infinite;
}

@keyframes bounce {
  0% { transform: scale(0.95); }
  50% { transform: scale(1); }
  100% { transform: scale(0.95); }
}

/* エラーポップアップ */
.popup-error {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0,0,0,0.7);
  z-index: 9999;
}
.popup-inner {
  background: rgba(0,0,0,0.85);
  padding: 25px 40px;
  font-size: 28px;
  color: #fff;
  border-radius: 12px;
  max-width: 680px;
  text-align: center;
}

/* モーダル */
.overlay {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  background: rgba(0,0,0,0.65);
  z-index: 10000;
  color: #fff;
}

.box {
  background: #094c89;
  border-radius: 12px;
  padding: 28px 20px;
  max-width: 680px;
  margin: 40px auto;
  text-align: left;
}

.box-header {
  font-size: 30px;
  font-weight: bold;
  margin-bottom: 18px;
  text-align: center;
}

.steps .step {
  margin-bottom: 16px;
}

.step-title {
  font-size: 20px;
  margin-bottom: 6px;
}

.bar {
  background: #e2e2e2;
  border-radius: 8px;
  height: 14px;
  overflow: hidden;
}
.bar-fill {
  background: #00c5f4;
  width: 0%;
  height: 100%;
  border-radius: 8px;
  transition: width 0.3s linear;
}

/* 分析結果 */
.result-wrap {
  position: relative;
  display: none;
}

.btn-close {
  position: absolute;
  top: 45px;
  right: 10px;
  background: #243447;
  border: none;
  color: #ff4d4d;
  font-size: 32px;
  font-weight: bold;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
}

.btn-close:hover {
  background: #ff4d4d;
  color: #fff;
}

.box-body {
  font-size: 25px;
  margin-top: 10px;
  text-align: center;
}

.btn-action {
  background: #15a223;
  color: #fff;
  font-size: 24px;
  width: 100%;
  padding: 14px 0;
  border: none;
  border-radius: 8px;
  margin-top: 20px;
  cursor: pointer;
}
.btn-action:hover {
  background: #0e7d19;
}
