.hubspot-wrap {
    max-width: 100% !important;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
    font-weight: 900;
}

.hubspot-wrap.w-780 {
    width: 780px;
}

.hubspot-wrap * {
    box-sizing: border-box;
    font-weight: 900;
}

.hubspot-wrap li {
    list-style: none;
}

.hubspot-wrap a {
    color: #3af;
}

.hubspot-wrap legend {
    line-height: 1.5;
    font-size: 13px;
    text-align: left;
    margin: -5px 0 10px;
}

.hubspot-wrap fieldset[class^="form-columns-"] {
    width: 100%;
    max-width: none !important;
    padding-bottom: 10px !important;
}

.hubspot-wrap fieldset[class^="form-columns-"] label {
    display: block;
    font-size: 18px;
    width: 100%;
    text-align: left;
    margin-bottom: 10px;
    letter-spacing: 0;
    line-height: 1.4;
    font-weight: 900;
}

.hubspot-wrap fieldset[class^="form-columns-"] .input {
    margin-right: 0 !important;
    margin-bottom: 10px;
}

.hubspot-wrap fieldset[class^="form-columns-"] .hs-input {
    width: 100% !important;
}

.hubspot-wrap fieldset[class^="form-columns-"] .hs-input.invalid,
.hubspot-wrap fieldset[class^="form-columns-"] .hs-input.error {
    border-color: #e51520;
}

.hubspot-wrap fieldset[class^="form-columns-"] .hs-form-required {
    position: relative;
    font-size: 0;
}

.hubspot-wrap fieldset[class^="form-columns-"] .hs-form-required::after {
    content: "必須";
    font-size: 12px;
    background: #e51520 !important;
    color: #fff !important;
    padding: 4px !important;
    border-radius: 3px !important;
    line-height: 1em !important;
    transform: translateY(-2px);
    display: inline-block;
    margin-left: 6px;
    font-weight: 700;
}

.hubspot-wrap input[type="text"],
.hubspot-wrap input[type="email"],
.hubspot-wrap input[type="tel"],
.hubspot-wrap input[type="date"],
.hubspot-wrap input[type="number"],
.hubspot-wrap textarea {
    font-size: 18px;
    font-weight: 600;
    padding: 12px 12px 10px;
    height: auto;
    border-radius: 3px;
    background: #f4f4f4;
    border: #000 solid 1px;
    color: #000;
    line-height: 1.5;
    margin-bottom: 10px;
    font-family: "Avenir Next", "Segoe UI Variable Display", Arial, "Lato", "Montserrat", "游ゴシック体", YuGothic, "游ゴシック", "Yu Gothic", "Hiragino Kaku Gothic ProN", "ヒラギノ角ゴ ProN W3", "ヒラギノ角ゴ ProN W6", "メイリオ", "Meiryo", "ＭＳ ゴシック", sans-serif;
}

.hubspot-wrap input[type="text"]:focus,
.hubspot-wrap input[type="email"]:focus,
.hubspot-wrap input[type="tel"]:focus,
.hubspot-wrap input[type="date"]:focus,
.hubspot-wrap input[type="number"]:focus,
.hubspot-wrap textarea:focus {
    border-color: #3af;
}

.hubspot-wrap textarea {
    height: 150px;
}

.hubspot-wrap .hs-error-msg,
.hubspot-wrap .hs-error-msgs {
    margin-bottom: 10px;
    color: #e51520;
    font-size: 18px;
}

.hubspot-wrap fieldset.form-columns-2 {
    display: flex;
    justify-content: space-between;
}

.hubspot-wrap fieldset.form-columns-2 > * {
    float: none !important;
    width: calc(50% - 10px) !important;
}

.hubspot-wrap .actions {
    text-align: center;
}

.hubspot-wrap .hs-submit input[type="submit"] {
    background: #000;
    color: #fff;
    font-size: 18px;
    width: 320px;
    max-width: 100%;
    padding: 20px;
    margin-top: 10px;
    border-radius: 3px;
    border: none;
    cursor: pointer;
    transition: .3s;
    font-weight: 900;
}

.hubspot-wrap .hs-submit input[type="submit"]:hover {
    opacity: .5;
}

@media screen and (max-width: 767px) {
    .hubspot-wrap {
        padding-right: 40px;
    }
    
    .hubspot-wrap.sp-20pd {
        padding-right: 20px;
    }
    
    .hubspot-wrap legend {
        font-size: 11px;
        margin: -4px 0 8px;
    }
    
    .hubspot-wrap fieldset[class^="form-columns-"] label {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .hubspot-wrap fieldset[class^="form-columns-"] .input {
        margin-bottom: 8px;
    }
    
    .hubspot-wrap fieldset[class^="form-columns-"] .hs-form-required::after {
        font-size: 10px;
    }
    
    .hubspot-wrap input[type="text"],
    .hubspot-wrap input[type="email"],
    .hubspot-wrap input[type="tel"],
    .hubspot-wrap input[type="date"],
    .hubspot-wrap input[type="number"],
    .hubspot-wrap textarea {
        font-size: 14px;
        padding: 10px 8px 8px;
    }
    
    .hubspot-wrap fieldset.form-columns-2 > * {
        width: calc(50% - 5px) !important;
    }
    
    .hubspot-wrap .hs-submit input[type="submit"] {
        font-size: 16px;
    }
    
    .hubspot-wrap .hs-error-msg,
    .hubspot-wrap .hs-error-msgs {
        margin-bottom: 8px;
        font-size: 14px;
    }
}

/* モーダル確認画面のスタイル */
.modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(0, 0, 0, 0.7) !important;
    z-index: 99999 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 20px !important;
    animation: fadeIn 0.3s ease-out !important;
    overflow: auto !important;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.confirm-inner {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.4s ease-out;
}

.confirm-header {
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    background-color: #fff;
    z-index: 10;
}

.confirm-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
    text-align: center;
}

.confirm-list {
    padding: 24px;
}

.confirm-row {
    margin-bottom: 16px;
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 12px;
}

.confirm-row:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.confirm-label {
    width: 35%;
    font-weight: 600;
    color: #555;
    padding-right: 16px;
}

.confirm-value {
    width: 65%;
    color: #333;
    word-break: break-word;
}

.confirm-actions {
    padding: 20px 24px;
    display: flex;
    justify-content: center;
    gap: 16px;
    border-top: 1px solid #eee;
    background-color: #f9f9f9;
    border-radius: 0 0 8px 8px;
}

.hs-button {
    padding: 10px 24px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    outline: none;
}

.hs-button.back {
    background-color: #f5f5f5;
    color: #555;
    border: 1px solid #ddd;
}

.hs-button.back:hover {
    background-color: #eee;
}

.hs-button.primary {
    background-color: #008bd5;
    color: white;
}

.hs-button.primary:hover {
    background-color: #0078b8;
}

.hs-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .confirm-label,
    .confirm-value {
        width: 100%;
    }
    
    .confirm-label {
        margin-bottom: 4px;
    }
    
    .confirm-actions {
        flex-direction: column-reverse;
        gap: 12px;
    }
    
    .hs-button {
        width: 100%;
    }
}

/* エラーメッセージのスタイル */
#form p.error.form-error {
    margin-bottom: 10px;
    color: #e51520;
    font-size: 18px;
}

/* バリデーションエラー時のフィールドスタイル */
.hubspot-wrap input.validation-error,
.hubspot-wrap textarea.validation-error,
.hubspot-wrap select.validation-error {
    border-color: #df3434 !important;
}

/* チェックボックス、ラジオボタン用のエラー位置調整 */
input[type="checkbox"] + p.error,
input[type="radio"] + p.error {
    margin-left: 20px;
}

/* --- form04.php専用スタイル：style.cssからの必要なセクションの移植 --- */
/* トライアルセクションのスタイル */
section.section#trial {
  position: relative;
}
section.section#trial > .inner {
  padding: 60px 0 150px;
  font-family: "Avenir Next", "Segoe UI Variable Display", Arial, "Lato", "Montserrat", "游ゴシック体", YuGothic, "游ゴシック", "Yu Gothic", "Hiragino Kaku Gothic ProN", "ヒラギノ角ゴ ProN W3", "ヒラギノ角ゴ ProN W6", "メイリオ", "Meiryo", "ＭＳ ゴシック", sans-serif;
  overflow: hidden;
  text-align: center;
}
@media (max-width: 768px) {
  section.section#trial > .inner {
    padding: 12vw 0 9.333vw;
  }
}
section.section#trial > .inner > h2 {
  font-size: 50px;
  font-weight: 900;
  font-family: "游ゴシック体", YuGothic, "游ゴシック", "Yu Gothic", "Hiragino Kaku Gothic ProN", "ヒラギノ角ゴ ProN W3", "ヒラギノ角ゴ ProN W6", "メイリオ", "Meiryo", "ＭＳ ゴシック", sans-serif;
  letter-spacing: 0.05em;
  text-align: center;
}
@media (max-width: 768px) {
  section.section#trial > .inner > h2 {
    font-size: 24px;
    font-size: 6.4vw;
  }
}
section.section#trial > .inner > h2 > span {
  display: inline-block;
  padding: 0 28px;
  position: relative;
  font-weight: 900;
  letter-spacing: 0.05em;
}
section.section#trial > .inner > h2 > span > span {
  font-weight: 900;
  -webkit-text-stroke: 1px #000;
}
@media (max-width: 768px) {
  section.section#trial > .inner > h2 > span {
    padding: 0 8vw;
  }
}
section.section#trial > .inner > h2 > span img {
  width: 100%;
}
section.section#trial > .inner > h2 > span > span {
  font-size: 64px;
  font-weight: 900;
}
@media (max-width: 768px) {
  section.section#trial > .inner > h2 > span > span {
    font-size: 35px;
    font-size: 9.3333333333vw;
  }
}
section.section#trial > .inner > h2.ttl_section_h2 > span:before {
  content: none;
}
section.section#trial > .inner > h2.ttl_section_h2 > span:after {
  content: none;
}
section.section#trial > .inner > h2 + p {
  margin-top: 40px;
  font-size: 30px;
  font-weight: 900;
  text-align: center;
}
@media (max-width: 768px) {
  section.section#trial > .inner > h2 + p {
    margin-top: 6.9333vw;
    font-size: 22px;
    font-size: 5.8666666667vw;
    line-height: 1.409;
  }
}
section.section#trial > .inner > p {
  margin-top: 1em;
  font-size: 18px;
  font-weight: 900;
  text-align: center;
}
@media (max-width: 768px) {
  section.section#trial > .inner > p {
    font-size: 13px;
    font-size: 3.4666666667vw;
  }
}
section.section#trial > .inner > .container_trial_main {
  margin-top: 90px;
  text-align: center;
}
@media (max-width: 768px) {
  section.section#trial > .inner > .container_trial_main {
    margin-top: 16vw;
  }
}
section.section#trial > .inner > .container_trial_main span.underline {
  display: inline-block;
  border-bottom: 1px solid #000;
}
section.section#trial > .inner > .container_trial_main > p {
  font-size: 20px;
  text-align: center;
  font-weight: 900;
}
@media (max-width: 768px) {
  section.section#trial > .inner > .container_trial_main > p {
    font-size: 14px;
    font-size: 3.7333333333vw;
  }
}
section.section#trial > .inner > .container_trial_main > .content_trial_lower_text {
  margin-top: 36px;
  text-align: center;
  font-weight: 900;
}
@media (max-width: 768px) {
  section.section#trial > .inner > .container_trial_main > .content_trial_lower_text {
    margin-top: 4.8vw;
  }
}
section.section#trial > .inner > .container_trial_main > .content_trial_lower_text > p {
  font-size: 30px;
  font-weight: 900;
  text-align: center;
}
@media (max-width: 768px) {
  section.section#trial > .inner > .container_trial_main > .content_trial_lower_text > p {
    line-height: 1.4167;
    font-size: 18px;
    font-size: 4.8vw;
  }
}
section.section#trial > .inner > .container_trial_main > .content_trial_form .ttl_content_h3 {
  margin-bottom: 37px;
  line-height: 1.8666666666666667;
  font-size: 30px;
  text-align: center;
  letter-spacing: 0.06em;
  font-weight: 900;
}

/* PCでは改行を非表示にする */
section.section#trial > .inner > .container_trial_main > .content_trial_form .ttl_content_h3 br.util_sp {
  display: none;
}

@media (max-width: 768px) {
  section.section#trial > .inner > .container_trial_main > .content_trial_form .ttl_content_h3 {
    margin-bottom: calc(28/375*100vw);
    font-size: calc(22/375*100vw);
  }
  /* SPでは改行を表示する */
  section.section#trial > .inner > .container_trial_main > .content_trial_form .ttl_content_h3 br.util_sp {
    display: block;
  }
}

section.section#trial > .inner > .container_trial_main > .content_trial_form.arrow {
  margin-top: 60px;
  background-color: #d3d7dd;
  padding: 45px 0 70px;
  position: relative;
}
@media (max-width: 768px) {
  section.section#trial > .inner > .container_trial_main > .content_trial_form.arrow {
    margin-top: 6.9333vw;
    padding: 9.333vw 0 14.6667vw;
  }
}
section.section#trial > .inner > .container_trial_main > .content_trial_form.arrow:before {
  content: "";
  display: block;
  width: 40px;
  height: 40px;
  border-top: 1px solid #000;
  border-right: 1px solid #000;
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translate(-50%, 0) rotate(135deg);
  z-index: 2;
  background-color: #d3d7dd;
}
@media (max-width: 768px) {
  section.section#trial > .inner > .container_trial_main > .content_trial_form.arrow:before {
    width: 8vw;
    height: 8vw;
    top: -4vw;
  }
}

/* フォーム内のコンテンツをテキスト左寄せに設定 */
section.section#trial .hubspot-wrap form fieldset .field label,
section.section#trial .hubspot-wrap form fieldset .field legend,
section.section#trial .hubspot-wrap form fieldset .field .input {
  text-align: left;
}

/* タイトルとフォームの間隔調整 */
section.section#trial .ttl_section_h2 {
  margin-bottom: 20px;
}

/* チェックボックス要素のスタイル強化（詳細度を上げたセレクタ） */
html#form body section#trial div.inner div.container_trial_main div.content_trial_form div.hubspot-wrap input[type="checkbox"],
html#form body section#formFrame div.hubspot-wrap input[type="checkbox"],
html#form body fieldset.form-columns-1 div.field div.input label.hs-form-checkbox-display input[type="checkbox"],
html#form body div.hubspot-wrap fieldset.form-columns-1 div.field div.input label.hs-form-checkbox-display input[type="checkbox"],
#trial .content_trial_form input[type="checkbox"],
.hubspot-wrap input[type="checkbox"]#privacy_consent,
#trial .content_trial_form .hubspot-wrap input[type="checkbox"]#privacy_consent,
#chk input[type="checkbox"],
#form #chk input[type="checkbox"],
input[type="checkbox"]#privacy_consent {
    width: auto !important;
    height: auto !important;
    margin-right: 8px !important;
    display: inline-block !important;
    position: relative !important;
    opacity: 1 !important;
    visibility: visible !important;
    -webkit-appearance: checkbox !important;
    -moz-appearance: checkbox !important;
    appearance: checkbox !important;
    z-index: 1 !important;
    pointer-events: auto !important;
}

/* 必須マーク */
html#form body .hs-form-required,
html#form body span.hs-form-required,
.hubspot-wrap .hs-form-required,
#form .hubspot-wrap .hs-form-required,
#trial .content_trial_form .hubspot-wrap .hs-form-required,
fieldset div.field label span.hs-form-required {
    display: inline-block !important;
    margin-left: 4px !important;
    color: #e51520 !important;
}

/* チェックボックスラベルのスタイル強化 */
html#form body section#trial div.inner div.container_trial_main div.content_trial_form div.hubspot-wrap label.hs-form-checkbox-display,
html#form body section#formFrame div.hubspot-wrap label.hs-form-checkbox-display,
html#form body fieldset.form-columns-1 div.field div.input label.hs-form-checkbox-display,
html#form body div.hubspot-wrap fieldset.form-columns-1 div.field div.input label.hs-form-checkbox-display,
.hubspot-wrap label.hs-form-checkbox-display,
#trial .content_trial_form .hubspot-wrap label.hs-form-checkbox-display,
#form #chk label.hs-form-checkbox-display {
    display: flex !important;
    align-items: center !important;
    cursor: pointer !important;
    position: relative !important;
    padding-left: 0 !important;
    font-weight: 900 !important;
}

/* レンタルOK!のスタイル強化 */
.underline {
    font-weight: 900 !important;
    border-bottom: 2px solid #000 !important;
}

/* Hubspotラッパーのフォントウェイトとサイズをさらに調整 */
.hubspot-wrap {
    font-weight: 900;
}

.hubspot-wrap fieldset[class^="form-columns-"] label {
    font-weight: 900;
}

/* 必須マークのフォントウェイト調整 */
.hubspot-wrap fieldset[class^="form-columns-"] .hs-form-required::after {
    font-weight: 700;
}

/* --- form04.php専用スタイル（旧custom-form-trial.cssより）--- */
.form-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.form-section {
  margin-bottom: 32px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  padding: 24px;
}
.form-section h3 {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin: 0 0 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f0f0f0;
}
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #555;
  margin-bottom: 8px;
}
.form-group label .require-mark {
  color: #e74c3c;
  margin-left: 4px;
  font-size: 12px;
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  color: #333;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="tel"]:focus,
.form-group input[type="date"]:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #000;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}
.form-group input.validation-error,
.form-group textarea.validation-error {
  border-color: #df3434 !important;
  background-color: #fff8f8;
}
.form-group .error {
  color: #e51520;
  font-size: 18px;
  margin-bottom: 10px;
  margin-top: 0;
  display: block;
}
.privacy-consent {
  margin-top: 32px;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 4px;
}
.privacy-consent label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  color: #555;
  cursor: pointer;
}
.privacy-consent input[type="checkbox"] {
  margin-top: 2px;
}
.privacy-consent a {
  color: #000;
  text-decoration: underline;
}
.privacy-consent a:hover {
  text-decoration: none;
}
.form-submit {
  margin-top: 32px;
  text-align: center;
}
.form-submit button {
  padding: 12px 32px;
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  background: #000;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}
.form-submit button:hover {
  background: #333;
}
.form-submit button:disabled {
  background: #ccc;
  cursor: not-allowed;
}
.error-message {
  margin-bottom: 20px;
  padding: 12px 16px;
  background: #fff8f8;
  border: 1px solid #e74c3c;
  border-radius: 4px;
  color: #e74c3c;
  font-size: 14px;
}
@media (max-width: 768px) {
  .form-container {
    padding: 16px;
  }
  .form-section {
    padding: 16px;
  }
  .form-group input[type="text"],
  .form-group input[type="email"],
  .form-group input[type="tel"],
  .form-group input[type="date"],
  .form-group textarea {
    font-size: 16px;
  }
  .form-submit button {
    width: 100%;
    padding: 14px 24px;
  }
}

/* 日付フィールドの横幅を一律で260pxに設定（セレクタ詳細度を上げる） */
html body .hubspot-wrap input[type="date"],
html body section#trial .hubspot-wrap input[type="date"],
html body section#trial > .inner > .container_trial_main > .content_trial_form .hubspot-wrap input[type="date"],
input[type="date"]#gcame_demostart {
  width: 260px !important;
  max-width: 100% !important;
}

@media screen and (max-width: 767px) {
  html body .hubspot-wrap input[type="date"],
  html body section#trial .hubspot-wrap input[type="date"],
  html body section#trial > .inner > .container_trial_main > .content_trial_form .hubspot-wrap input[type="date"],
  input[type="date"]#gcame_demostart {
    width: 260px !important;
    max-width: 100% !important;
  }
} 