#container {
  margin-bottom: 120px;
}

.header {
  top: 0;
}

body {
  padding-top: 110px;
}

.breadcrumb {
  width: 95%;
  margin: 0 auto;
  padding: 6px 0;
  font-size: 12px;
}
.breadcrumb span {
  color: #999;
}

.f-banner-box {
  display: block;
  max-width: 630px;
  width: 90%;
  margin: 0 auto 40px;
  text-align: center;
}

.pagetitle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 200px;
  margin-bottom: 40px;
  background: url("/calendar/img/bg_title.png") no-repeat center center/cover;
}
.pagetitle h1 {
  font-size: 35px;
  font-weight: bold;
  color: #333;
}
.pagetitle__sub {
  font-size: 20px;
  float: none;
  margin: 0 auto;
}

.name-counter {
    margin: 0 auto 80px;
    padding-top: 60px;
    padding-top: 20px;
    text-align: center;
    padding-bottom: 40px;
    border-bottom: 1px dashed #777;
}

.name-counter *{
    box-sizing: border-box;
}

.name-counter h2 {
    margin: 0 0 20px;
    font-size: 42px;
}

.input-group {
  width: 90%;
  margin: 0 auto;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
}

.input-group input[type="text"] {
    max-width: 400px;
    display: block;
    margin: 0 auto 20px;
    width: 100%;
    padding: 13px;
    font-size: 20px;
    border: 1px solid #707070;
    border-radius: 3px;
}

.input-group label br{
  display: none;
}

.input-group input[type="text"]:focus {
    outline: none;
    background-color: #ECFEFF;
    border: 1px solid #000;
}

.input-group input[type="text"]::placeholder {
    color: #ACACAC;
}

.input-group button[type="submit"] {
    margin-bottom: 10px;
    color: white;
    padding: 13px 20px;
    border: none;
    border-radius: 5px;
    background-image: linear-gradient(to bottom, #614327, #1D1105);
    cursor: pointer;
    font-size: 18px;
    min-width: 200px;
}
.input-group button[type="submit"]:hover {
    opacity: 0.8;
}
.input-group-radio {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 10px;
}

.input-group-radio label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  padding: 4px 0;
}

.input-group-radio input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid #E26E30;
  border-radius: 50%;
  margin: 0;
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #fff;
}

.input-group-radio input[type="radio"]:checked {
  background: #E26E30;
  border-color: #E26E30;
}

.input-group-radio input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: #fff;
  border-radius: 50%;
}

.input-group-radio input[type="radio"]:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(226, 110, 48, 0.2);
}

.input-group-radio input[type="radio"]:hover {
  border-color: #E26E30;
  background: #FFF5E6;
}

.input-group-radio input[type="radio"]:checked:hover {
  background: #E26E30;
}

.input-group-radio span {
  font-size: 16px;
  color: #333;
  transition: color 0.2s ease;
}

.input-group-radio input[type="radio"]:checked + span {
  color: #E26E30;
  font-weight: 500;
}

/* タッチデバイス用の最適化 */
@media (hover: none) {
  .input-group-radio input[type="radio"] {
    width: 24px;
    height: 24px;
  }

  .input-group-radio input[type="radio"]:checked::after {
    width: 10px;
    height: 10px;
  }
}

.result-box *{
    box-sizing: border-box;
}

.result-box {
    max-width: 800px;
    width: 90%;
    margin: 30px auto 60px;
    box-sizing: border-box;
    padding: 30px;
    border-radius: 4px;
    display: none;
    background: url(../img/bg_stroke.png) repeat center center;
    border: 1px solid #ccc;
}

.result-box:not(:empty) {
    display: block;
}

.stroke-result-inner {
    padding-top: 30px;
    background: #fff;
}

.stroke-title {
    margin: 0;
    padding: 0;
    font-size: 24px;
}

.stroke-name{
    margin: 0;
    padding: 0 15px;
    font-size: 40px;
    font-weight: normal;
    line-height: 1.4;
    word-wrap: break-word;
}

.total-strokes {
    display: inline-block;
    min-width: 200px;
    margin: 0 0 5px;
    padding: 10px;
    background: #eee;
    border-radius: 30px;
    font-size: 18px;
    font-weight: bold;
    line-height: 1.2;
}

.warning {
    color: #856404;
    background-color: #fff3cd;
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
}

.error {
    color: #721c24;
    background-color: #f8d7da;
    padding: 10px;
    border-radius: 4px;
}

.fortune {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
    font-weight: bold;
}

.good {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
}

.middle {
    color: #0c5460;
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
}

.stroke-result {
    margin-top: 8px;
}

.stroke-details {
    padding: 0 40px 40px;
}

.stroke-details.hidden {
    display: none;
}

.detail-row {
    margin-bottom: 20px;
}

.detail-row:last-child {
    margin-bottom: 0;
}

.detail-label {
    display: block;
    margin-bottom: 15px;
    padding: 2px;
    background: #E26E30;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    line-height: 1.5;
}

.detail-content {
    display: block;
    text-align: left;
    font-size: 15px;
}

.detail-content-luck {
    font-size: 30px;
    font-weight: bold;
}

.luck-score {
    color: #981414;
}

.contact-link {
    display: inline-block;
    margin-top: 10px;
    color: #614327;
    text-decoration: none;
    font-weight: bold;
    font-size: 20px;
}

.contact-link:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {

  .name-counter h2 {
      font-size: 33px;
  }

  .input-group label br{
    display: block;
  }

  .name-counter {
      margin: 0 0 60px;
      padding-bottom: 20px;
  }

  .result-box {
      padding: 15px;
  }

  .stroke-title {
      font-size: 20px;
  }

  .stroke-name {
      padding: 0 15px;
      font-size: 25px;
      font-weight: bold;
  }

  .total-strokes {
      font-size: 16px;
  }

  .detail-content-luck {
      font-size: 22px;
  }

  .detail-content {
      font-size: 14px;
      line-height: 1.7;
  }

  .detail-row:not(:last-child) {
      margin-bottom: 40px;
  }

  .stroke-details {
      padding: 0 20px 40px;
  }

}

/* ローディングアニメーション用のスタイル */
.loading {
    text-align: center;
    padding: 20px;
}

.loading-text {
    display: inline-block;
    font-size: 18px;
    color: #614327;
    margin-bottom: 15px;
}

.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #614327;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/*===========================================================================*/
/*  media quary:767px  */
/*===========================================================================*/
@media screen and (max-width: 767px) {
  body {
    padding-top: 0;
  }
  #spHeader {
    border-bottom: 1px solid #eee;
  }
  .breadcrumb {
    font-size: 10px;
  }
  .pagetitle {
    height: 140px;
    gap: 5px;
  }
  .pagetitle__sub {
    font-size: 16px;
  }
  .pagetitle h1 {
    font-size: 22px;
    line-height: 1.5;
  }
}
