/* ========================================
   基本設定
======================================== */

:root {
  --ink: #252525;
  --line: #a8abb0;
  --blue: #2784db;
  --blue-hover: #226bb5;
}

body {
  margin: 0;
  min-width: 320px;

  background-color: #920016;
  background-image: url("https://www.ing-jet.net/img/web/background.gif");
  background-repeat: repeat;
  background-position: center top;
}

/* フォーム内のみ box-sizing を統一 */
.fm-shell,
.fm-shell *,
.fm-shell *::before,
.fm-shell *::after {
  box-sizing: border-box;
}

/* 大きな区切り見出し */
.fm-section-title {
  margin: 54px 0 24px;
  padding-bottom: 10px;

  border-bottom: 1px solid #ddd;

  font-size: 21px;
  font-weight: 700;
  line-height: 1.5;
}

.fm-form > .fm-section-title:first-of-type {
  margin-top: 0;
}

@media screen and (max-width: 640px) {
  .fm-section-title {
    margin: 42px 0 20px;
    font-size: 19px;
  }
}

/* ========================================
   全体レイアウト
======================================== */

.fm-shell {
  max-width: 840px;
  margin: 0 auto;
  padding: 34px 0 27px;

  color: var(--ink);

  font-family:
    "Helvetica Neue",
    "Hiragino Kaku Gothic ProN",
    "Hiragino Sans",
    Meiryo,
    sans-serif;

  font-size: 16px;
  line-height: 1.65;
}

.fm-header {
  margin: 0 0 31px;
  text-align: center;
}

.fm-header a {
  display: inline-block;
  line-height: 0;
}

.fm-header img {
  width: 220px;
  max-width: 75vw;
  height: auto;
}

.fm-panel {
  padding: 35px 39px 39px;

  background: #fff;
  border-radius: 10px;

  letter-spacing: -0.02em;
}

.fm-footer {
  margin: 34px 0 0;

  color: #fff;
  text-align: center;
  font-size: 14px;
}


/* ========================================
   タイトル・説明文
======================================== */

.fm-panel h1 {
  margin: 0 0 31px;

  text-align: center;
  font-size: 32px;
  font-weight: 500;
  line-height: 1.45;
}

.fm-lead {
  margin: 0 0 31px;

  font-weight: 500;
  line-height: 1.65;
}

.fm-rule {
  height: 1px;
  margin: 0 0 35px;

  background: #ddd;
  border: 0;
}


/* ========================================
   フォーム共通
======================================== */

.fm-form {
  margin: 0;
}

.fm-field {
  margin: 0 0 37px;
}

.fm-title {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;

  margin: 0 0 9px;

  font-size: 16px;
  font-weight: 700;
  line-height: 1.45;
}

.fm-title-text {
  display: block;
}

.fm-status {
  display: inline-block;

  padding: 1px 7px;

  border-radius: 8px;
  background: #8f1a0b;
  color: #fff;

  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
}

.fm-status--optional {
  background: #f0f1f2;
  color: #777;
}

.fm-subfield {
  display: block;

  margin: 12px 0 7px;

  font-weight: 500;
}

.fm-subfield:first-of-type {
  margin-top: 0;
}


/* ========================================
   入力欄
======================================== */

.fm-text,
.fm-select,
.fm-textarea {
  display: block;

  width: 100%;
  max-width: 100%;
  min-height: 48px;

  padding: 10px 14px;

  border: 1px solid var(--line);
  border-radius: 9px;

  background: #fff;
  color: var(--ink);

  font: inherit;
  line-height: 1.5;
}

.fm-text::placeholder,
.fm-textarea::placeholder {
  color: #a8acb1;
  opacity: 1;
}

.fm-text:focus,
.fm-select:focus,
.fm-textarea:focus {
  outline: 2px solid #78b7f2;
  outline-offset: 1px;
}


/* 入力欄サイズ */

.fm-text--wide {
  max-width: 100%;
}

.fm-text--zip {
  max-width: 150px;
}

.fm-text--phone {
  max-width: 225px;
}

.fm-text--count {
  max-width: 100px;
}


/* 横並び */

.fm-name-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;

  max-width: 530px;
}

.fm-inline {
  display: flex;
  gap: 9px;
  align-items: center;
}


/* ========================================
   プルダウン
======================================== */

.fm-select {
  width: auto;
  height: 48px;

  padding: 0 40px 0 14px;

  -webkit-appearance: none;
  appearance: none;

  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m3 6 5 5 5-5' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px 16px;

  cursor: pointer;
}

.fm-select--pref {
  min-width: 205px;
}


/* ========================================
   ラジオボタン
======================================== */


.fm-radio-group {
  display: grid;
  gap: 9px;
}

.fm-radio {
  display: flex;
  gap: 12px;
  align-items: center;

  width: 100%;
  min-height: 46px;

  padding: 7px 10px;

  border: 1px solid var(--line);
  border-radius: 9px;

  background: #fff;

  line-height: 1.55;
  cursor: pointer;
}

.fm-radio:has(small) {
  align-items: flex-start;
}

.fm-radio:has(small) input[type="radio"] {
  margin-top: 3px;
}

.fm-radio input[type="radio"] {
  flex: 0 0 24px;

  width: 24px;
  height: 24px;

  margin: 0;

  accent-color: var(--blue);
  cursor: pointer;
}

.fm-radio:focus-within {
  outline: 2px solid #78b7f2;
  outline-offset: 1px;
}
.fm-radio small {
  display: block;
  margin-top: 4px;
  color: #777;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.6;
}

.fm-section .fm-radio-group {
  margin-top: 9px;
}

.fm-radio--with-image {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  column-gap: 12px;
  height: auto;
  min-height: 0;
  overflow: hidden;
}

.fm-radio-content {
  display: block;
  min-width: 0;
}

.fm-radio-content .fm-reference {
  display: block;
  width: 100%;
  margin-top: 18px;
}

.fm-radio-content .fm-reference img {
  display: block;
  width: auto;
  max-width: 560px;
  height: auto;
  margin: 0 auto;
}

@media screen and (max-width: 640px) {
  .fm-radio-content .fm-reference img {
    width: 100%;
    max-width: 100%;
  }
}

@media screen and (max-width: 640px) {
  .fm-radio {
    align-items: flex-start;
  }

  .fm-radio input[type="radio"] {
    margin-top: 0.25em;
  }
}

/* ========================================
   チェックボックス
======================================== */

.fm-check-group {
  display: grid;
  gap: 9px;
}

.fm-check {
  display: flex;
  gap: 12px;
  align-items: center;

  width: 100%;
  min-height: 46px;

  padding: 7px 10px;

  border: 1px solid var(--line);
  border-radius: 9px;

  background: #fff;

  line-height: 1.55;
  cursor: pointer;
}

.fm-check:has(small) {
  align-items: flex-start;
}

.fm-check:has(small) input[type="checkbox"] {
  margin-top: 3px;
}

.fm-check input[type="checkbox"] {
  flex: 0 0 24px;

  width: 24px;
  height: 24px;

  margin: 0;

  accent-color: var(--blue);
  cursor: pointer;
  margin-top: 3px;
}

.fm-check:focus-within {
  outline: 2px solid #78b7f2;
  outline-offset: 1px;
}

.fm-check small {
  display: block;
  margin-top: 2px;
  color: #666;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
}

.fm-check > span {
  display: block;
  min-width: 0;
}

/* ========================================
   補足・画像・フィールドセット
======================================== */

.fm-note {
  margin: 15px 0 0;

  color: #a5140d;

  font-size: 13px;
  line-height: 1.65;
}

.fm-note--intro {
  margin-top: 0;
  margin-bottom: 15px;
}


.fm-intro {
  margin: 0 0 10px;
}

.fm-link {
  transition: opacity 0.2s ease;
}

a.fm-link:link,
a.fm-link:visited,
a.fm-link:hover,
a.fm-link:focus-visible {
  color: #3869B0 !important;
}

a.fm-link:hover,
a.fm-link:focus-visible {
  opacity: 0.7;
}

.fm-reference {
  display: block;

  width: min(475px, 100%);
  height: auto;

  margin: 31px auto 0;
}

.fm-section {
  padding: 0;
  border: 0;
}

.fm-section > legend {
  display: block;

  width: 100%;
  padding: 0;
}

.fm-section .fm-title {
  margin-bottom: 9px;
}

.fm-textarea {
  max-width: 560px;
  min-height: 320px;

  resize: vertical;
}

.fm-description {
  margin: 10px 0 16px;
  color: #111;
  font-size: 15px;
  line-height: 1.8;
}

@media screen and (max-width: 640px) {
  .fm-description {
    font-size: 14px;
    line-height: 1.75;
  }
}


/* ========================================
   送信ボタン
======================================== */

.fm-submit {
  display: block;

  width: 100%;
  min-height: 72px;

  margin: 54px 0 0;
  padding: 16px 20px;

  border: 0;
  border-radius: 9px;

  background: var(--blue);
  color: #fff;

  font: inherit;
  font-size: 18px;
  font-weight: 700;
  text-align: center;

  appearance: none;
  -webkit-appearance: none;

  box-shadow: none;
  cursor: pointer;
}

.fm-submit:hover {
  background: var(--blue-hover);
}

.fm-submit:focus-visible {
  outline: 3px solid #9fcafa;
  outline-offset: 3px;
}


/* ========================================
   タブレット
======================================== */

@media screen and (min-width: 641px) {

  .fm-shell {
    width: calc(100% - 40px);
  }

}


/* ========================================
   スマートフォン
======================================== */

@media screen and (max-width: 640px) {

  .fm-shell {
    padding: 23px 12px;
  }

  .fm-header {
    margin-bottom: 20px;
  }

  .fm-header img {
    width: 195px;
  }

  .fm-panel {
    padding: 25px 19px 28px;

    border-radius: 8px;
  }

  .fm-panel h1 {
    margin-bottom: 21px;

    font-size: 23px;
  }

  .fm-lead {
    margin-bottom: 24px;
  }

  .fm-field {
    margin-bottom: 30px;
  }

  .fm-name-row {
    gap: 8px;
  }

  .fm-text,
  .fm-select,
  .fm-textarea {
    font-size: 16px;
  }

  .fm-radio,
  .fm-check {
    padding: 8px 9px;
  }

  .fm-submit {
    margin-top: 38px;
  }

  .fm-footer {
    font-size: 12px;
  }

}


/* ========================================
   小さいスマートフォン
======================================== */

@media screen and (max-width: 370px) {

  .fm-name-row {
    grid-template-columns: 1fr;
  }

}

/* ========================================
   カスタムサイズ
======================================== */

.fm-custom-size {
  display: flex;
  align-items: flex-start;
  gap: 40px;
}

.fm-custom-size__content {
  flex: 1;
  min-width: 0;
}

.fm-custom-size__image {
  flex: 0 0 180px;
  margin: 0;
}

.fm-custom-size__image img {
  display: block;
  width: 100%;
  height: auto;
}


/* SP */
@media (max-width: 767px) {

  .fm-custom-size {
    display: block;
  }

  .fm-custom-size__image {
    width: 180px;
    max-width: 100%;
    margin-top: 24px;
  }

}

/* ========================================
   テディべ画像部分
======================================== */
.fm-bear-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.fm-bear-layout .fm-radio-group {
  flex: 1;
  min-width: 0;
  max-width: 760px;
}

.fm-reference--bear {
  flex: 0 0 150px;
  width: 150px;
  margin: 0 0 0 auto;
}

.fm-reference--bear img {
  display: block;
  width: 150px;
  height: auto;
  margin: 0;
}

@media screen and (max-width: 640px) {

  .fm-bear-layout {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
  }

  .fm-bear-layout .fm-radio-group {
    width: 100%;
    max-width: none;
  }

  .fm-reference--bear {
    width: 150px;
    margin: 0 auto;
  }

  .fm-reference--bear img {
    display: block;
    width: 150px;
    height: auto;
  }

}

/* ========================================
   ふとんカバー サイズ
======================================== */

.fm-futon-size-layout {
  display: flex;
  align-items: center;
  gap: 24px;
}

.fm-futon-size-fields {
  flex: 0 0 200px;
}

.fm-reference--futon {
  flex: 0 0 180px;
  width: 180px;
  margin: 0;
}

.fm-futon-size-fields .fm-subfield {
  display: block;
  margin-bottom: 24px;
}

.fm-futon-size-fields .fm-subfield:last-child {
  margin-bottom: 0;
}

.fm-reference--futon img {
  display: block;
  width: 100%;
  height: auto;
}


/* SP */
@media screen and (max-width: 640px) {

  .fm-futon-size-layout {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .fm-futon-size-fields {
    flex: none;
    width: 100%;
  }

  .fm-reference--futon {
    width: 160px;
    margin: 0 auto;
  }

}

/* ========================================
   フラッグフォーム専用
======================================== */

body.flag-form {
  background-color: #001240;
  background-image: none;
}

.flag-form .fm-header img {
  width: 220px;
}

.flag-form .fm-status {
  background: #8f1a0b;
}

.flag-form .fm-status--optional {
  background: #f0f1f2;
  color: #777;
}

.flag-form .fm-note {
  color: #8f1a0b;
}

/* ゲーフラサイズ */
.fm-size-group {
  display: grid;
  gap: 18px;
}

.fm-size-block {
  padding: 18px;
  border: 1px solid #d9dce0;
  border-radius: 9px;
}

.fm-size-block-title {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
}

.fm-size-image {
  display: block;
  width: min(164px, 100%);
  height: auto;
  margin: 0 auto 14px;
}

.fm-size-block .fm-radio-group {
  gap: 8px;
}

/* カスタムサイズ */
.fm-custom-size-layout {
  display: flex;
  align-items: center;
  gap: 22px;
}

.fm-custom-size-layout .fm-reference {
  flex: 0 0 164px;
  width: 164px;
  margin: 0;
}

/* 袋縫い */
.fm-pole-pocket-layout {
  display: flex;
  align-items: center;
  gap: 22px;
}

.fm-pole-pocket-layout .fm-reference {
  flex: 0 0 164px;
  width: 164px;
  margin: 0;
}

/* ポール */
.fm-pole-images {
  display: grid;
  gap: 18px;
  margin: 0 0 18px;
}

.fm-pole-images img {
  display: block;
  width: min(475px, 100%);
  height: auto;
  margin: 0 auto;
}

.fm-pole-color {
  width: min(164px, 100%) !important;
}

/* ゲーフラ サイズ参考画像 */
.fm-size-image {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 24px auto 28px;
}

@media screen and (max-width: 640px) {
  .fm-custom-size-layout,
  .fm-pole-pocket-layout {
    flex-direction: column;
    align-items: flex-start;
  }

  .fm-custom-size-layout .fm-reference,
  .fm-pole-pocket-layout .fm-reference {
    flex: none;
    margin: 0;
  }

    .fm-pole-images > img {
    width: 100%;
    max-width: 100%;
    margin: 0;
  }

  #fm-pole {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
}

/* パイプ・ソケット外径 */
.fm-pipe-size-layout {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

.fm-pipe-size-image {
  display: block;
  width: auto;
  max-width: none;
  height: auto;
  margin: 0;
}

@media screen and (max-width: 640px) {
  .fm-pipe-size-image {
    width: 100%;
    max-width: 100%;
  }
}

/* カスタムサイズ・下部ハトメ */
.fm-custom-size-layout,
.fm-hatome-layout {
  display: flex;
  align-items: flex-start;
  gap: 40px;
}

.fm-custom-size-fields,
.fm-hatome-fields {
  flex: 0 1 auto;
}

.fm-reference--pipe-custom,
.fm-reference--hatome {
  flex: 0 0 auto;
  width: auto;
  max-width: none;
  height: auto;
  margin: 0;
}

.fm-pipe-size-layout {
  gap: 10px;
}

.fm-pipe-size-layout .fm-note {
  margin-top: 0;
}

@media screen and (max-width: 640px) {
  .fm-hatome-layout {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  .fm-reference--hatome {
    max-width: 100%;
    height: auto;
    margin: 0;
  }
}

/* ダンマク カスタムサイズ画像 */
.fm-reference--danmaku-custom {
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 0;
}

@media screen and (max-width: 640px) {
  .fm-reference--danmaku-custom {
    width: 100%;
    max-width: 100%;
  }
}

/* ダンマク カスタムサイズ画像 */
.fm-reference.fm-reference--danmaku-custom {
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 0;
}

@media screen and (max-width: 640px) {
  .fm-reference.fm-reference--danmaku-custom {
    width: 100%;
    max-width: 100%;
  }
}

/* ダンマク カスタムサイズ */
.fm-custom-size-layout--danmaku {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 24px;
}

.fm-custom-size-fields--danmaku {
  width: 100%;
}

.fm-custom-size-row {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.fm-custom-size-cross {
  font-weight: 700;
}

.fm-reference.fm-reference--danmaku-custom {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

@media screen and (max-width: 640px) {
  .fm-custom-size-row {
    flex-wrap: nowrap;
    gap: 10px;
  }

  .fm-custom-size-row .fm-inline {
    gap: 6px;
  }

  .fm-reference.fm-reference--danmaku-custom {
    width: 100%;
    max-width: 100%;
  }
}

/* ミニフラッグ：カスタムサイズ */
.fm-custom-size-layout--mini {
  display: flex;
  align-items: center;
  gap: 50px;
}

.fm-reference.fm-reference--mini-custom {
  flex: 0 0 auto;
  width: 430px;
  max-width: 48%;
  height: auto;
  margin: 0;
}

.fm-custom-size-fields--mini {
  flex: 1;
  min-width: 0;
}

.fm-custom-size-fields--mini .fm-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.fm-mini-label {
  display: inline-block;
  min-width: 105px;
  font-size: 16px;
  font-weight: 700;
}

.fm-mini-unit {
  font-size: 16px;
  font-weight: 700;
}

.fm-custom-size-fields--mini .fm-select {
  width: 190px;
  min-width: 190px;
}

.fm-mini-note {
  margin: 0 0 24px 115px;
  font-size: 14px;
  font-weight: 700;
}

/* 幅 */
.fm-mini-label--width,
.fm-mini-unit--width,
.fm-mini-note--width {
  color: #e60012;
}

/* 丈 */
.fm-mini-label--height,
.fm-mini-unit--height,
.fm-mini-note--height {
  color: #009944;
}

/* ポール長さ */
.fm-mini-label--pole,
.fm-mini-unit--pole,
.fm-mini-note--pole {
  color: #003cff;
}

@media screen and (max-width: 640px) {
  .fm-custom-size-layout--mini {
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
  }

  .fm-reference.fm-reference--mini-custom {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
  }

  .fm-custom-size-fields--mini .fm-inline {
    flex-wrap: nowrap;
  }

  .fm-mini-label {
    min-width: 90px;
    font-size: 15px;
  }

  .fm-mini-unit {
    font-size: 15px;
  }

  .fm-custom-size-fields--mini .fm-select {
    width: auto;
    min-width: 0;
    flex: 1;
  }

  .fm-mini-note {
    margin: 0 0 20px 100px;
    font-size: 13px;
  }
}