.event-form {
  max-width: 760px;
  margin: 0 auto;
}

.event-form-section {
  margin-bottom: 24px;
}

.event-form-section h2 {
  margin-bottom: 18px;
  font-size: 22px;
  color: #0F2744;
}

.section-note {
  color: var(--muted);
  margin: 0;
}

.form-field {
  display: flex;
  align-items: center;
  margin-bottom: 18px;
}

.form-field label {
  width: 180px;
  flex: 0 0 180px;
  font-weight: 700;
  color: #0F2744;
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="date"],
.form-field select {
  width: 100%;
  max-width: 420px;
  min-height: 44px;
}

.money-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.money-input {
  width: 180px !important;
  text-align: right;
}

.event-form-actions {
  text-align: center;
  margin: 30px 0;
}

@media (max-width: 760px) {
  .form-field {
    display: block;
  }

  .form-field label {
    display: block;
    width: auto;
    margin-bottom: 6px;
  }

  .form-field input[type="text"],
  .form-field input[type="email"],
  .form-field input[type="date"],
  .form-field select {
    max-width: none;
  }
}

/* D013.2: event classes */
.event-class-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 18px;
  background: #F8FAFC;
}

.event-class-card-title {
  font-size: 18px;
  font-weight: 900;
  color: #0F2744;
  margin-bottom: 16px;
}

.event-class-card-actions {
  text-align: center;
  margin-top: 16px;
}

.add-event-class-button {
  display: block;
  width: fit-content;
  margin: 18px auto 0 auto;
}

/* D013.1b: mobile input zoom fix */
@media screen and (max-device-width: 760px) {
  .event-form-page input[type="text"],
  .event-form-page input[type="email"],
  .event-form-page input[type="date"],
  .event-form-page input[type="number"],
  .event-form-page select,
  .event-form-page textarea,
  .event-form-page input[type="text"]:focus,
  .event-form-page input[type="email"]:focus,
  .event-form-page input[type="date"]:focus,
  .event-form-page input[type="number"]:focus,
  .event-form-page select:focus,
  .event-form-page textarea:focus {
    font-size: 20px !important;
    min-height: 56px !important;
    height: 56px !important;
    padding: 12px 14px !important;
  }

  .event-form-page .form-field label {
    font-size: 20px !important;
    margin-bottom: 6px !important;
    font-weight: 600;
    line-height: 1.4;
  }

  .event-form-page button,
  .event-form-page .button {
    font-size: 34px !important;
    min-height: 104px !important;
  }
}

/* D013.3-2: entry field setting summary */
.entry-field-summary-list {
  display: grid;
  gap: 16px;
}

.entry-field-summary-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  background: #F8FAFC;
}

.entry-field-summary-title {
  font-size: 18px;
  font-weight: 900;
  color: #0F2744;
  margin-bottom: 14px;
}

.entry-field-summary-info {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.entry-field-summary-info .info-label {
  display: inline-block;
  min-width: 130px;
  font-weight: 850;
  color: #0F2744;
}

.entry-field-summary-info .info-value {
  color: var(--text);
}

.entry-field-summary-actions {
  text-align: center;
}

/* D013.3: class-based input setting button */
.event-class-input-setting {
  text-align: center;
  margin: 18px 0 10px 0;
}

/* D013.4 Step2: standard fields table */
.standard-field-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 auto;
}

.standard-field-table th,
.standard-field-table td {
  border: 1px solid var(--line);
  padding: 12px;
  text-align: left;
}

.standard-field-table th {
  background: #F8FAFC;
  color: #0F2744;
  font-weight: 850;
}

.standard-field-table td:first-child,
.standard-field-table th:first-child {
  width: 70px;
  text-align: center;
}

.standard-field-table label {
  font-weight: 700;
}

/* D013.4 final: mobile entry field buttons */
@media (max-width: 760px) {
  .entry-field-summary-actions {
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: stretch;
  }

  .entry-field-summary-actions .button,
  .entry-field-summary-actions button {
    width: 100%;
    max-width: none;
    margin: 0;
    box-sizing: border-box;
    white-space: normal;
  }
}

/* D013.4 final button layout */
.entry-field-summary-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.event-form-section .add-event-class-button {
  min-width: 120px;
}

@media (max-width: 760px) {
  .entry-field-summary-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .entry-field-summary-actions .button,
  .entry-field-summary-actions button {
    width: 100%;
  }
}

/* D013.5 Step2: custom field form */
.event-form textarea {
  width: 100%;
  max-width: 420px;
  min-height: 120px;
  font-size: 16px;
}

/* D014 Step1: entry smartphone layout */
@media (max-width: 640px) {
  .event-form-page .page-container {
    width: 100%;
    padding: 0 16px;
    box-sizing: border-box;
  }

  .event-form-page .breadcrumb {
    padding: 10px 16px;
    font-size: 12px;
    box-sizing: border-box;
  }

  .event-form-page h1 {
    font-size: 24px;
    line-height: 1.35;
  }

  .event-form-page .event-form-section,
  .event-form-page .regatta-card {
    padding: 18px;
    margin-bottom: 16px;
    box-sizing: border-box;
  }

  .event-form-page table {
    width: 100%;
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .event-form-page input,
  .event-form-page select,
  .event-form-page textarea {
    width: 100%;
    max-width: 100%;
    min-height: 46px;
    font-size: 16px;
    box-sizing: border-box;
  }

  .event-form-page button {
    width: 100%;
    min-height: 46px;
  }
}

/* D014 Step1: entry mobile fine tuning */
@media (max-width: 640px) {
  .event-form-page .form-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
  }

  .event-form-page .event-form-section {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .event-form-page table input[type="number"],
  .event-form-page table input[type="text"],
  .event-form-page table select {
    width: 120px;
    min-width: 120px;
  }

  .event-form-page table {
    font-size: 14px;
  }
}

/* D014: mobile portrait form layout fix */
@media screen and (max-width: 760px) {
  .event-form-page .event-form {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
  }

  .event-form-page .form-field {
    display: block;
    width: 100%;
  }

  .event-form-page .form-field label {
    display: block;
    width: auto;
    flex: none;
    margin-bottom: 6px;
  }

  .event-form-page .form-field input,
  .event-form-page .form-field select,
  .event-form-page .form-field textarea {
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box;
  }
}

/* D014.5: number input with unit */
.number-with-unit {
  display: flex;
  align-items: center;
  gap: 8px;
}

.number-with-unit .unit {
  white-space: nowrap;
  font-weight: 600;
  color: #0F2744;
}

/* D014.6: support boat button layout */
.support-boat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.support-boat-card-header .event-class-card-title {
  margin-bottom: 0;
}

.support-boat-add-button,
.support-boat-delete-button {
  width: auto !important;
  min-height: 40px !important;
  height: auto !important;
  padding: 7px 14px !important;
  font-size: 15px !important;
  line-height: 1.3 !important;
  border-radius: 8px !important;
}

@media (max-width: 760px) {
  .support-boat-card-header {
    align-items: center;
  }

  .support-boat-delete-button {
    flex: 0 0 auto;
  }

  .support-boat-add-button {
    width: auto !important;
    display: inline-flex !important;
  }
}

/* D014.6: force compact support boat buttons */
.event-form-page .support-boat-add-button,
.event-form-page .support-boat-delete-button {
  width: auto !important;
  min-height: 36px !important;
  height: 36px !important;
  padding: 5px 12px !important;
  font-size: 14px !important;
  line-height: 1.2 !important;
  border-radius: 6px !important;
}

.event-form-page .support-boat-delete-button {
  min-width: 56px !important;
}

.event-form-page .support-boat-add-button {
  min-width: 120px !important;
  margin: 0 auto !important;
}

/* ==========================================
   D014 確認画面デザイン
   ========================================== */

/* 確認画面全体の文字色を統一 */
#entry-confirm-content,
#entry-confirm-content p,
#entry-confirm-content div,
#entry-confirm-content span{
    color:#1d3557;
}

/* 支援艇確認カードをコンパクト化 */
#entry-confirm-content .event-class-card{
    padding:16px 20px;
    margin:12px 0;
}

#entry-confirm-content .event-class-card-title{
    margin-bottom:10px;
}

#entry-confirm-content .event-class-card p{
    margin:6px 0;
    line-height:1.5;
}

/* 戻る・登録ボタン */
#entry-confirm-actions-final{
    display:flex;
    gap:16px;
    justify-content:center;
    margin-top:20px;
}

#entry-confirm-actions-final button{
    min-width:140px;
}


/* D014: force compact confirm support boat card */
#entry-confirm-content .event-class-card {
  padding: 12px 16px !important;
  margin: 10px 0 14px 0 !important;
  min-height: 0 !important;
}

#entry-confirm-content .event-class-card-title {
  font-size: 18px !important;
  margin: 0 0 8px 0 !important;
  line-height: 1.4 !important;
}

#entry-confirm-content .event-class-card p {
  font-size: 16px !important;
  margin: 4px 0 !important;
  line-height: 1.45 !important;
  color: #0F2744 !important;
}

#entry-confirm-actions-final {
  gap: 16px !important;
}

/* D014: confirm support boat display card */
#entry-confirm-content .confirm-support-boat-card {
  background: #fff !important;
  border: 1px solid #d9e1ec !important;
  border-radius: 12px !important;
  padding: 12px 16px !important;
  margin: 10px 0 14px 0 !important;
}

#entry-confirm-content .confirm-support-boat-card .event-class-card-title {
  font-size: 18px !important;
  margin: 0 0 8px 0 !important;
  line-height: 1.4 !important;
  color: #0F2744 !important;
}

#entry-confirm-content .confirm-support-boat-card p {
  font-size: 16px !important;
  margin: 4px 0 !important;
  line-height: 1.45 !important;
  color: #0F2744 !important;
}

/* D015: common compact action buttons */
.event-form-page .event-form-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.event-form-page .event-form-actions button,
.event-form-page .event-form-actions .button {
  width: auto !important;
  min-width: 120px !important;
  min-height: 40px !important;
  height: auto !important;
  padding: 8px 16px !important;
  font-size: 16px !important;
  line-height: 1.3 !important;
  border-radius: 8px !important;
}

@media (max-width: 760px) {
  .event-form-page .event-form-actions {
    gap: 14px;
  }

  .event-form-page .event-form-actions button,
  .event-form-page .event-form-actions .button {
    min-width: 110px !important;
    min-height: 38px !important;
    padding: 7px 14px !important;
    font-size: 15px !important;
  }
}

/* D015: field help text */
.field-help-text {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.5;
  color: #5f6f86;
}

/* D015: field help text */
.field-help-text {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.5;
  color: #5f6f86;
}

/* event page: compact sections inside entry cards */
.event-choice-card .event-choice-section {
  margin: 28px 0;
}

.event-choice-card hr {
  margin: 28px 0;
  border: 0;
  border-top: 1px solid #d9e1ec;
}

/* event page: edit card buttons green */
.event-choice-card-edit .button {
  background: #4CAF50 !important;
  border-color: #4CAF50 !important;
  color: #fff !important;
}

.event-choice-card-edit .button:hover {
  background: #43A047 !important;
  border-color: #43A047 !important;
}

/* event page layout */
.event-choice-divider{
    margin:32px 0;
    border:none;
    border-top:1px solid #d9e2ef;
}

.event-choice-section.compact{
    margin-top:0;
    padding-top:0;
}

.event-choice-card .event-choice-description{
    margin-bottom:14px;
}


/* event page: compact two-action cards */
.event-action-grid .event-choice-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start !important;
  gap: 18px !important;
  min-height: auto !important;
  padding: 48px 40px !important;
}

.event-action-grid .event-choice-title {
  margin: 12px 0 18px 0 !important;
}

.event-action-grid .event-choice-section {
  margin: 0 !important;
  padding: 0 !important;
}

.event-action-grid .event-choice-divider {
  width: 80%;
  margin: 22px auto !important;
  border: 0;
  border-top: 1px solid #d9e2ef;
}

.event-action-grid .event-choice-section .button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 38px !important;
  height: 38px !important;
  padding: 6px 18px !important;
  line-height: 1.2 !important;
  font-size: 15px !important;
}

@media (max-width: 760px) {
  .event-action-grid .event-choice-card {
    padding: 32px 24px !important;
    gap: 14px !important;
  }

  .event-action-grid .event-choice-section .button {
    min-height: 34px !important;
    height: 34px !important;
    padding: 5px 14px !important;
    font-size: 14px !important;
  }
}

/* event page: reduce gap between club and sailor actions */
.event-action-grid .event-choice-divider{
    margin: 12px auto !important;
}

.event-action-grid .event-choice-section{
    margin: 0 !important;
    padding: 0 !important;
}

.event-action-grid .event-choice-description{
    margin: 0 0 10px 0 !important;
}

.event-action-grid .event-choice-card{
    gap: 10px !important;
}

@media (max-width: 760px){
    .event-action-grid .event-choice-divider{
        margin: 10px auto !important;
    }

    .event-action-grid .event-choice-card{
        gap: 8px !important;
    }
}

/* Event page title */
.event-choice-title-row{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:18px;
    margin-bottom:20px;
}

.event-choice-title-icon{
    width:48px;
    height:48px;
    object-fit:contain;
    flex-shrink:0;
}

.event-choice-title-row .event-choice-title{
    margin:0;
}

.event-choice-icon-wrap{
    display:none !important;
}

@media (max-width:760px){

.event-choice-title-row{
    gap:12px;
    margin-bottom:16px;
}

.event-choice-title-icon{
    width:34px;
    height:34px;
}

}


/* D017: mobile button size fix for regatta manage menu */
@media (max-width: 760px) {
  .event-action-grid .event-choice-card > .button,
  .event-action-grid .event-choice-card > button {
    min-height: 34px !important;
    height: 34px !important;
    padding: 5px 14px !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
    width: auto !important;
    max-width: 100% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
}

/* D017: force compact buttons in management menu cards */
@media (max-width: 760px), (max-device-width: 760px) {
  .event-action-grid .event-choice-card a.button,
  .event-action-grid .event-choice-card button,
  .event-action-grid .event-choice-card .button {
    width: auto !important;
    min-width: 0 !important;
    max-width: 220px !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 5px 14px !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
    border-radius: 6px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
}

/* D017 club list */
.table-scroll {
  overflow-x: auto;
  width: 100%;
}

.table-scroll table {
  min-width: 900px;
}

/* D018 payment management */
.payment-confirmed-row {
  background: #e9f8ee !important;
}

.payment-management-table .payment-paid-input {
  width: 140px;
  text-align: right;
}

.payment-management-table td,
.payment-management-table th {
  white-space: nowrap;
}

@media (max-width: 760px), (max-device-width: 760px) {
  .payment-management-table .payment-paid-input {
    width: 110px;
  }
}

/* D018: mobile button size fix on regatta setting page */
@media (max-width: 760px), (max-device-width: 760px) {
  .event-form-page .event-form-actions .button,
  .event-form-page .event-form-actions button,
  .event-form-page .entry-field-summary-actions .button,
  .event-form-page .entry-field-summary-actions button,
  .event-form-page .add-event-class-button,
  .event-form-page .event-class-delete-button,
  .event-form-page .danger-button {
    width: auto !important;
    min-width: 0 !important;
    max-width: 220px !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 5px 14px !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
    border-radius: 6px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .event-form-page .entry-field-summary-actions {
    gap: 10px !important;
    flex-wrap: wrap !important;
  }
}

/* Site-wide modal popup behavior */
.modal-backdrop {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9999 !important;
  background: rgba(15, 23, 42, 0.45) !important;
  display: none;
  align-items: center !important;
  justify-content: center !important;
  padding: 24px !important;
}

.modal-box {
  width: min(520px, 92vw) !important;
  max-height: 80vh !important;
  overflow-y: auto !important;
  background: #fff !important;
  border-radius: 16px !important;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.25) !important;
  padding: 28px !important;
}

.modal-actions {
  display: flex !important;
  justify-content: center !important;
  gap: 14px !important;
  margin-top: 24px !important;
}

@media (max-width: 760px), (max-device-width: 760px) {
  .modal-box {
    width: 92vw !important;
    padding: 22px !important;
  }

  .modal-actions button {
    height: 34px !important;
    min-height: 34px !important;
    padding: 5px 14px !important;
    font-size: 14px !important;
  }
}

/* Public top status sections */
.regatta-status-section {
  margin-top: 32px;
}

.regatta-status-section h2,
.closed-regatta-section summary {
  font-weight: 800;
  color: #0b2345;
}

.closed-regatta-section {
  margin-top: 36px;
}

.closed-regatta-section summary {
  cursor: pointer;
  font-size: 24px;
  margin-bottom: 18px;
}

/* 公開トップ：受付中・受付前・受付終了の見出し位置をカードに揃える */
.regatta-status-section{
    max-width:1460px;
    margin:0 auto;
    padding:0 24px;
}

.regatta-status-section h2{
    margin:40px 0 18px;
}

.closed-regatta-section{
    max-width:1460px;
    margin:40px auto 0;
    padding:0 24px;
}

/* 公開トップ：状態見出しをカード左端に揃える */
.public-top-section {
    max-width: 1460px;
    margin: 0 auto;
    padding: 0 24px;
}

.public-top-section h2 {
    margin: 40px 0 18px;
}

.public-top-section .closed-regatta-section {
    margin-top: 40px;
    padding: 0;
}

/* D019 readonly entry count fields */
.readonly-input,
input[readonly] {
  background: #eef2f6 !important;
  color: #7a8795 !important;
  cursor: not-allowed !important;
}

/* Status badge colors */
.entry-status-badge.status-finished {
  background: #f0f2f5 !important;
  color: #5b6b7c !important;
  border: 1px solid #d9e1ea !important;
}

.entry-status-badge.status-before {
  background: #e1f2fe !important;
  color: #0277bd !important;
  border: 1px solid #b3e5fc !important;
}

/* D020 documents */
.document-output-form {
  margin-top: 20px;
}

.document-check-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.document-check-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #e1e7ef;
  border-radius: 10px;
  background: #fff;
  font-weight: 600;
}

.document-check-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.document-zip-row {
  background: #f4f7fb;
  font-weight: 800;
}

.document-divider {
  border: none;
  border-top: 1px solid #dbe3ec;
  margin: 22px 0;
}

@media (max-width: 760px), (max-device-width: 760px) {
  .document-check-row {
    padding: 12px 14px;
    font-size: 14px;
    align-items: flex-start;
  }
}

/* D021 input field management */
.field-check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
  font-weight: 700;
}

.field-check-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.entry-section-gap {
  height: 56px;
  margin: 0;
}


.section-note {
  margin: 8px 0 18px;
  color: #5F6B7A;
  font-size: 15px;
  line-height: 1.6;
}
