.s1 {
  padding: calc(24 / 393 * 100vw) calc(18 / 393 * 100vw);
  padding-bottom: calc(40 / 393 * 100vw);
}

.s1-title {
  font-size: calc(32 / 393 * 100vw);
  font-weight: 700;
  margin: 0 0 calc(24 / 393 * 100vw) 0;
}

.setup-section {
  margin-bottom: calc(60 / 393 * 100vw);
}


.setup-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.setup-section__title {
  font-size: calc(20 / 393 * 100vw);
  font-weight: 700;
  margin: 0;
}

.setup-section__sub {
  font-size: calc(16 / 393 * 100vw);
  margin: calc(6 / 393 * 100vw) 0 calc(16 / 393 * 100vw) 0;
}

.player-card {
  background: #F2F5F3;
  border-radius: calc(9 / 393 * 100vw);
  padding: 0 calc(12 / 393 * 100vw) calc(12 / 393 * 100vw);
}

.player-row {
  display: flex;
  align-items: center;
  border-bottom: 1px solid #DBE4E0;
  padding: calc(10 / 393 * 100vw) 0;
}

.player-row:last-of-type {
  border-bottom: none;
}

.player-tag {
  background: var(--primary);
  color: #fff;
  font-size: calc(9 / 393 * 100vw);
  padding: calc(4 / 393 * 100vw) calc(8 / 393 * 100vw);
  margin-right: calc(10 / 393 * 100vw);
  white-space: nowrap;
  border-radius: calc(2 / 393 * 100vw);
  transition: background 0.2s;
}

.player-tag.is-error {
  background: #c00;
  text-align: center;
}

.player-row input {
  border: none;
  flex: 1;
  background: transparent;
  padding: calc(10 / 393 * 100vw) 0;
  font-size: calc(16 / 393 * 100vw);
}

.point-setting__base {
  background: #F2F5F3;
  border-radius: calc(8 / 393 * 100vw);
  padding: calc(12 / 393 * 100vw);
  margin: calc(12 / 393 * 100vw) 0;
  font-size: calc(18 / 393 * 100vw);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(8 / 393 * 100vw);
  text-align: center;
}

.point-setting__base input {
  width: calc(88 / 393 * 100vw);
  font-size: calc(18 / 393 * 100vw);
  padding: calc(8 / 393 * 100vw) calc(10 / 393 * 100vw);
  text-align: center;
  border: 1px solid var(--border);
  border-radius: calc(4 / 393 * 100vw);
  transition: border-color 0.2s;
}

.point-setting__base input:invalid,
.point-setting__base input.is-empty {
  border-color: #c00;
}

.point-setting__medals {
  display: flex;
  justify-content: center;
  gap: calc(18 / 393 * 100vw);
  margin: calc(10 / 393 * 100vw) 0 0;
  padding: 0 calc(18 / 393 * 100vw);
}

.medal-box {
  width: calc(38 / 393 * 100vw);
  text-align: center;
  font-size: calc(12 / 393 * 100vw);
}

.medal-box img {
  width: calc(36 / 393 * 100vw);
  height: calc(36 / 393 * 100vw);
  object-fit: contain;
}

.medal-box input {
  width: calc(38 / 393 * 100vw);
  margin: calc(6 / 393 * 100vw) auto calc(4 / 393 * 100vw) auto;
  padding: calc(6 / 393 * 100vw) 0;
  text-align: center;
  font-size: calc(18 / 393 * 100vw);
  border: 1px solid var(--border);
  border-radius: calc(4 / 393 * 100vw);
  transition: border-color 0.2s;
}

.medal-box input:invalid,
.medal-box input.is-empty {
  border-color: #c00;
}

.medal-box div {
  font-weight: 400;
  color: #111827;
}

.hole-tabs {
  display: flex;
  margin: calc(16 / 393 * 100vw) 0;
  border-bottom: 1px solid #DBE4E0;
}

.hole-tab {
  flex: 1;
  padding: calc(12 / 393 * 100vw) 0;
  border: none;
  background: transparent;
  font-size: calc(16 / 393 * 100vw);
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  border-bottom: 4px solid transparent;
  margin-bottom: -1px;
  transition: all 0.2s;
}

.hole-tab.is-active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.hole-settings {
  display: none;
}

.hole-settings.is-active {
  display: block;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: calc(12 / 393 * 100vw);
}

.radio-item {
  display: flex;
  align-items: center;
  gap: calc(6 / 393 * 100vw);
  cursor: pointer;
  font-size: calc(16 / 393 * 100vw);
}

.radio-item input[type="radio"] {
  display: none;
}

.radio-circle {
  width: calc(16 / 393 * 100vw);
  height: calc(16 / 393 * 100vw);
  min-width: calc(6 / 393 * 100vw);
  min-height: calc(16 / 393 * 100vw);
  border: 2px solid #DBE4E0;
  background: #FFFFFF;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
  transition: all 0.2s;
  box-sizing: border-box;
}

.radio-item input[type="radio"]:checked+.radio-circle {
  background: #3AB67D;
  border: 2px solid #3AB67D;
}

.radio-item input[type="radio"]:checked+.radio-circle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: calc(5 / 393 * 100vw);
  height: calc(5 / 393 * 100vw);
  background: #FFFFFF;
  border-radius: 50%;
}

.radio-label {
  color: var(--text);
}

#hole-settings-18 .radio-group .radio-item,
#hole-settings-9 .radio-group .radio-item {
  border-bottom: 1px solid #DBE4E0;
  padding-bottom: calc(12 / 393 * 100vw);
}

#hole-settings-18 .radio-group .radio-item:last-of-type,
#hole-settings-9 .radio-group .radio-item:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

.custom-course {
  margin-top: calc(12 / 393 * 100vw);
  padding-left: calc(24 / 393 * 100vw);
}

.course-input-row {
  display: flex;
  align-items: center;
  gap: calc(8 / 393 * 100vw);
  margin-bottom: calc(8 / 393 * 100vw);
}

.course-label {
  font-size: calc(14 / 393 * 100vw);
  color: #666;
  width: calc(40 / 393 * 100vw);
}

.course-input {
  flex: 1;
  padding: calc(10 / 393 * 100vw) calc(12 / 393 * 100vw);
  border: 1px solid #DBE4E0;
  border-radius: calc(4 / 393 * 100vw);
  font-size: calc(14 / 393 * 100vw);
}

.status-badge {
  font-size: calc(12 / 393 * 100vw);
  padding: calc(4 / 393 * 100vw) calc(12 / 393 * 100vw);
  border-radius: calc(2 / 393 * 100vw);
  white-space: nowrap;
}

.status-badge--price {
  background: #FFF200;
  color: #9A7518;
}

.status-badge--purchased {
  background: #3AB67D;
  color: #fff;
}

.purchase-card {
  background: #F1F4F5;
  border-radius: calc(12 / 393 * 100vw);
  padding: calc(16 / 393 * 100vw);
  margin: calc(16 / 393 * 100vw) 0;
}

.purchase-desc {
  font-size: 16px;
  color: var(--text);
  margin: 0 0 var(--space-sm) 0;
}

.purchase-list {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 var(--space-md) 0;
  padding-left: 0;
  list-style: none;
}

.purchase-list li {
  margin-bottom: calc(3 / 393 * 100vw);
  padding-left: calc(16 / 393 * 100vw);
  position: relative;
}

.purchase-list li::before {
  content: "●";
  color: #0D95D9;
  position: absolute;
  left: 0;
  padding-right: var(--space-xs);
}

.purchase-note {
  font-size: 16px;
  font-weight: 400;
  color: var(--text);
  display: block;
  margin: var(--space-sm) 0;
}

.purchase-btn {
  width: 100%;
  padding: calc(14 / 393 * 100vw);
  background: #0D95D9;
  color: #fff;
  border: none;
  border-radius: 50vw;
  font-size: calc(16 / 393 * 100vw);
  font-weight: 600;
  cursor: pointer;
  margin-bottom: calc(12 / 393 * 100vw);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(8 / 393 * 100vw);
}

.purchase-btn::before {
  content: '';
  width: calc(18 / 393 * 100vw);
  height: calc(18 / 393 * 100vw);
  background-image: url('../assets/icons/ico-flag.svg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  flex-shrink: 0;
}

.purchase-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(8 / 393 * 100vw);
}

.purchase-btn__price {
  font-size: 12px;
  font-weight: 400;
  opacity: 0.7;
}

.purchase-btn:active {
  opacity: 0.8;
}

.purchase-terms {
  display: block;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: underline;
}

.nearpin-settings {
  margin: calc(16 / 393 * 100vw) 0;
}

.nearpin-section {
  background: #F2F5F3;
  border-radius: calc(12 / 393 * 100vw);
  padding: calc(16 / 393 * 100vw);
  margin-bottom: calc(16 / 393 * 100vw);
}

.nearpin-section__header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(8 / 393 * 100vw);
  font-size: calc(18 / 393 * 100vw);
  padding-bottom: calc(12 / 393 * 100vw);
  border-bottom: 1px solid #DBE4E0;
  margin-bottom: calc(12 / 393 * 100vw);
}

.nearpin-section__header input {
  width: calc(88 / 393 * 100vw);
  font-size: calc(18 / 393 * 100vw);
  padding: calc(8 / 393 * 100vw) calc(10 / 393 * 100vw);
  text-align: center;
  border: 1px solid #DBE4E0;
  border-radius: calc(4 / 393 * 100vw);
  background: #fff;
}

.nearpin-section__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nearpin-section__label {
  font-size: calc(16 / 393 * 100vw);
  color: var(--text);
}

.nearpin-section__radios {
  display: flex;
  gap: calc(16 / 393 * 100vw);
}

.validation-error {
  font-size: calc(11 / 393 * 100vw);
  color: #c00;
  margin: 0 0 calc(12 / 393 * 100vw) 0;
}

.hole-selector {
  margin-top: calc(18 / 393 * 100vw);
  overflow: hidden;
  max-height: 500px;
  opacity: 1;
  transition: max-height 0.25s ease-out, opacity 0.2s ease-out, margin-top 0.25s ease-out;
}

.hole-selector.is-hidden {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
}

.hole-selector__title {
  font-size: calc(14 / 393 * 100vw);
  font-weight: 600;
  margin: 0 0 calc(8 / 393 * 100vw) 0;
}

.hole-selector__group {
  margin-bottom: calc(12 / 393 * 100vw);
}

.hole-selector__label {
  font-size: calc(12 / 393 * 100vw);
  color: #666;
  margin: 0 0 calc(6 / 393 * 100vw) 0;
}

.hole-selector__checkboxes {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: calc(6 / 393 * 100vw);
}

.hole-checkbox {
  cursor: pointer;
}

.hole-checkbox input[type="checkbox"] {
  display: none;
}

.hole-checkbox-box {
  display: flex;
  align-items: center;
  justify-content: center;
  height: calc(30 / 393 * 100vw);
  border-radius: calc(4 / 393 * 100vw);
  font-size: calc(12 / 393 * 100vw);
  color: var(--text);
  background: #fff;
  transition: all 0.2s;
}

.hole-checkbox input[type="checkbox"]:checked+.hole-checkbox-box {
  background: var(--primary);
  color: #fff;
}

.hole-later {
  cursor: pointer;
}

.hole-later input[type="radio"] {
  display: none;
}

.hole-later-box {
  display: flex;
  align-items: center;
  justify-content: center;
  height: calc(30 / 393 * 100vw);
  border-radius: calc(4 / 393 * 100vw);
  font-size: calc(10 / 393 * 100vw);
  color: var(--text);
  background: #fff;
  transition: all 0.2s;
  white-space: nowrap;
}

.hole-later input[type="radio"]:checked+.hole-later-box {
  background: var(--primary);
  color: #fff;
}

.start-btn {
  width: 100%;
  margin-bottom: calc(12 / 393 * 100vw);
  padding: calc(14 / 393 * 100vw);
  background: #3AB67D;
  color: #fff;
  border: none;
  border-radius: 50vw;
  font-size: calc(16 / 393 * 100vw);
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: none;
}

.start-btn:active {
  opacity: 0.8;
  transform: none;
  box-shadow: none;
}

.delete-all-btn {
  width: 100%;
  padding: calc(14 / 393 * 100vw);
  background: #FFF;
  color: #3AB67D;
  border: 1px solid #3AB67D;
  border-radius: 50vw;
  font-size: calc(16 / 393 * 100vw);
  font-weight: 600;
  cursor: pointer;
  margin-bottom: calc(16 / 393 * 100vw);
}

.delete-all-btn:active {
  opacity: 0.8;
}

.clear-link {
  margin-top: calc(16 / 393 * 100vw);
  text-align: center;
}

.clear-link a {
  color: #777E76;
  font-size: calc(14 / 393 * 100vw);
  text-decoration: underline;
}

.clear-link--test {
  margin-top: calc(12 / 393 * 100vw);
}

.clear-link--test a {
  font-size: calc(12 / 393 * 100vw);
  color: #999;
}

.error {
  color: #c00;
  background: #FFFFFF;
  font-size: calc(14 / 393 * 100vw);
  text-align: center;
  padding: var(--space-sm);
}

/* =========================================================
   Rate Modal (score.html)
   ========================================================= */
.rate-modal {
  padding: 50px 18px 0;
  max-height: 90vh;
  max-width: 95vw !important;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.rate-modal__body {
  flex: 1;
  overflow-y: auto;
}

.rate-modal__title {
  font-size: calc(20 / 393 * 100vw);
  font-weight: 700;
  margin: 0 0 8px;
}

.rate-modal__sub {
  font-size: 13px;
  color: #666;
  margin: 0 0 20px;
}

.rate-modal__base {
  background: #F2F5F3;
  border-radius: 8px;
  padding: 12px;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}

.rate-modal__base input {
  width: calc(88 / 393 * 100vw);
  font-size: calc(18 / 393 * 100vw);
  padding: calc(8 / 393 * 100vw) calc(10 / 393 * 100vw);
  text-align: center;
  border: 1px solid var(--border);
  border-radius: calc(4 / 393 * 100vw);
  transition: border-color 0.2s;
}

.rate-modal__medals {
  display: flex;
  justify-content: space-between;
  gap: calc(8 / 393 * 100vw);
  margin-bottom: calc(40 / 393 * 100vw);
  padding: 0 calc(24 / 393 * 100vw);
}

.rate-modal__medal {
  flex: 1;
  text-align: center;
}

.rate-modal__medal img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.rate-modal__base input:invalid,
.rate-modal__base input.is-empty {
  border-color: #c00;
}

.rate-modal__medal input:invalid,
.rate-modal__medal input.is-empty {
  border-color: #c00;
}

.rate-modal__medal input {
  width: calc(38 / 393 * 100vw);
  height: calc(36 / 393 * 100vw);
  margin: calc(6 / 393 * 100vw) 0 calc(4 / 393 * 100vw);
  padding: 0;
  text-align: center;
  font-size: calc(18 / 393 * 100vw);
  border: 1px solid var(--border);
  border-radius: calc(4 / 393 * 100vw);
  transition: border-color 0.2s;
}

.rate-modal__result {
  font-size: 12px;
  color: #111;
}

.rate-modal__btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  padding: 14px;
  border-radius: 50vw;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  background-color: #3AB67D;
  color: #FFF;
}

.rate-modal__btn--submit {
  background: #3AB67D;
  color: #fff;
}

.rate-modal__btn--close {
  background: #f2f2f7;
  color: #666;
}

.rate-modal__btn-check {
  width: calc(14 / 393 * 100vw);
  height: calc(14 / 393 * 100vw);
  background-image: url('../assets/icons/ico-check.svg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  filter: brightness(0) invert(1);
}

.rate-modal__btn--close span:first-child {
  width: calc(14 / 393 * 100vw);
  height: calc(14 / 393 * 100vw);
  position: relative;
  display: block;
}

.rate-modal__btn--close span:first-child::before,
.rate-modal__btn--close span:first-child::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(14 / 393 * 100vw);
  height: calc(2 / 393 * 100vw);
  background: #666;
  border-radius: 50vw;
}

.rate-modal__btn--close span:first-child::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.rate-modal__btn--close span:first-child::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.rate-modal__section-title {
  font-size: 16px;
  font-weight: 700;
  margin: 24px 0 12px;
}

.rate-modal__nearpin .purchase-card,
.rate-modal__nearpin .nearpin-settings {
  margin: 0;
}

.rate-modal__footer {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 12px;
  padding: 16px 0;
  border-top: 1px solid #e5e7eb;
  background: #fff;
}

/* =========================================================
   Delete Modal (共通)
   ========================================================= */
.delete-modal {
  padding: 24px 18px;
  text-align: center;
}


.delete-modal__icon img {
  width: calc(60 / 393 * 100vw);
  height: calc(60 / 393 * 100vw);
}

.delete-modal__title {
  font-size: calc(20 / 393 * 100vw);
  font-weight: 700;
  margin: 0;
  color: var(--text);
}

.delete-modal__warning {
  background: #FFEBEE;
  color: #C62828;
  font-size: calc(14 / 393 * 100vw);
  padding: 8px 12px;
  border-radius: 4px;
  margin: 0 0 calc(24 / 393 * 100vw);
}

.delete-modal__desc {
  font-size: calc(16 / 393 * 100vw);
  color: var(--text);
  line-height: 1.6;
  margin: 0 0 30px;
}

.delete-modal__desc strong {
  color: #C62828;
}

.delete-modal__actions {
  display: flex;
  gap: 12px;
}

.delete-modal__btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px;
  border-radius: 50vw;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid #ddd;
  transition: background 0.3s, border-color 0.3s, color 0.3s;
}

.delete-modal__btn--delete {
  background: #f2f2f7;
  border-color: #f2f2f7;
  color: #666;
}

.delete-modal__btn--delete:disabled {
  cursor: not-allowed;
  opacity: 0.8;
}

.delete-modal__btn--delete.is-active {
  background: #C62828;
  border-color: #C62828;
  color: #fff;
  cursor: pointer;
}

.delete-modal__btn--cancel {
  background: #f2f2f7;
  border-color: #f2f2f7;
  color: #666;
}

.delete-modal__btn--cancel .delete-modal__btn-icon {
  width: calc(14 / 393 * 100vw);
  height: calc(14 / 393 * 100vw);
  position: relative;
  display: block;
}

.delete-modal__btn--cancel .delete-modal__btn-icon::before,
.delete-modal__btn--cancel .delete-modal__btn-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(14 / 393 * 100vw);
  height: calc(2 / 393 * 100vw);
  background: #666;
  border-radius: 50vw;
}

.delete-modal__btn--cancel .delete-modal__btn-icon::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.delete-modal__btn--cancel .delete-modal__btn-icon::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.delete-modal__btn-icon {
  font-size: 14px;
  display: flex;
  align-items: center;
}

.delete-modal__btn-icon img {
  width: 14px;
  height: 14px;
  filter: brightness(0) saturate(100%) invert(45%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(90%) contrast(90%);
}

.delete-modal__btn--delete.is-active .delete-modal__btn-icon img {
  filter: brightness(0) invert(1);
}

.start-btn[hidden] {
  display: none !important;
}