/* Mobile-first shared UI */
/* フリーダイヤルアイコン：高さは番号の文字サイズ（1em）以内。 */
.phone::before,
.header-phone a::before,
.phone-number::before {
  content: '';
  display: inline-block;
  width: 1.29em;
  height: 1em;
  margin-right: 0.2em;
  vertical-align: -0.1em;
  background-color: currentColor;
  -webkit-mask: url('../img/icon-fc.svg') center / contain no-repeat;
  mask: url('../img/icon-fc.svg') center / contain no-repeat;
}

.phone-number {
  white-space: nowrap;
}

/* 任意のSP専用改行。PC・タブレットでは改行せず、SPだけ改行する。 */
br.br-sp {
  display: none;
}

@media (max-width: 767px) {
  br.br-sp {
    display: block;
  }
}

/* 電話の表示要素だけは端末判定に追従。段組み・メニューの幅判定は維持。 */
body[data-device='sp'] .phone-mobile {
  display: inline-block;
}

body[data-device='sp'] .phone-desktop {
  display: none;
}

body[data-device='pc'] .phone-mobile,
body[data-device='tab'] .phone-mobile {
  display: none;
}

body[data-device='pc'] .phone-desktop,
body[data-device='tab'] .phone-desktop {
  display: inline;
}

.line-link {
  background: #06c755;
  border-color: #06c755;
  color: white;
  gap: 8px;
}

.line-link::before {
  content: '';
  display: block;
  width: 28px;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
  background: url('../img/icon-line.png') center / contain no-repeat;
}

.button.line-link {
  background: #06c755;
  border-color: #06c755;
  color: white;
  gap: 8px;
}

.header-line.line-link::before {
  width: 22px;
}

.preview-note {
  background: #edf1f5;
  color: var(--muted);
  padding: 10px 20px;
  font-size: 0.75rem;
  line-height: 1.6;
  border-left: 3px solid #aebdcd;
}

body>.preview-note {
  border: 0;
  text-align: center;
}

.site-header {
  padding-block: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.site-header>a {
  font-size: 1.25rem;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0.05em;
}

.site-header nav {
  display: flex;
  gap: 8px 18px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.8rem;
  width: 100%;
}

.site-header nav a {
  text-decoration: none;
  font-weight: 700;
  padding-block: 8px;
}

.site-header nav a:last-child {
  margin-left: auto;
  border-bottom: 2px solid var(--accent);
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  background: white;
  padding: 10px;
  z-index: 10;
}

.skip-link:focus {
  top: 10px;
}

.link-ex::after {
  content: '';
  width: 24px;
  aspect-ratio: 1 / 1;
  margin-left: 2px;
  background: var(--primary);
  -webkit-mask: url('../img/icon-open-in-new.svg') center / contain no-repeat;
  mask: url('../img/icon-open-in-new.svg') center / contain no-repeat;
}

.button,
button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  min-height: 56px;
  padding: 14px 22px;
  border: 1px solid var(--primary);
  border-radius: 5px;
  background: white;
  color: var(--primary);
  font-size: 1.2rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  width: 100%;
  line-height: 1.5;
}

.button[data-cta='form'],
#confirm-button {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  box-shadow: 0 3px 0 #cc7a00;
}

.button[data-cta='form']::after {
  content: '';
  width: 32px;
  aspect-ratio: 1 / 1;
  background-color: white;
  -webkit-mask: url('../img/icon-arrow-circle-right.svg') center / contain no-repeat;
  mask: url('../img/icon-arrow-circle-right.svg') center / contain no-repeat;
}

button:disabled {
  cursor: not-allowed;
  background: #e7ecf0;
  border-color: #cbd4dd;
  color: #667484;
  box-shadow: none;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 28px;
}

.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr);
}

.card {
  background: white;
  border: 1px solid var(--line);
  padding: 24px;
  border-radius: 6px;
  min-width: 0;
}

.card> :last-child {
  margin-bottom: 0;
}

/* 表示方法・比率・個別レイアウトを分離する。 */
.ratio-square {
  aspect-ratio: 1 / 1;
}

.ratio-4-3 {
  aspect-ratio: 4 / 3;
}

.ratio-3-2 {
  aspect-ratio: 3 / 2;
}

.ratio-16-9 {
  aspect-ratio: 16 / 9;
}

.ratio-3-4 {
  aspect-ratio: 3 / 4;
}

/* 通常のratioクラスに併記し、768px以下の比率を指定する。
   個別レイアウトの比率・最小高さより優先する。 */
@media (max-width: 768px) {
  .sp\:ratio-square,
  .sp\:ratio-4-3,
  .sp\:ratio-3-2,
  .sp\:ratio-16-9,
  .sp\:ratio-3-4 {
    min-height: 0 !important;
  }

  .sp\:ratio-square {
    aspect-ratio: 1 / 1 !important;
  }

  .sp\:ratio-4-3 {
    aspect-ratio: 4 / 3 !important;
  }

  .sp\:ratio-3-2 {
    aspect-ratio: 3 / 2 !important;
  }

  .sp\:ratio-16-9 {
    aspect-ratio: 16 / 9 !important;
  }

  .sp\:ratio-3-4 {
    aspect-ratio: 3 / 4 !important;
  }
}

.image-frame {
  position: relative;
  overflow: hidden;
  min-width: 0;
}

.image-frame img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  object-fit: var(--image-fit, cover);
  object-position: var(--image-position, center);
}

.image-frame.placeholder {
  display: grid;
  place-items: center;
  background: #e1e4e7;
  color: #626a72;
  text-align: center;
  padding: 20px;
  font-size: 0.8rem;
  border: 1px solid #d4d8dd;
  border-radius: 3px;
}

.phone {
  color: var(--primary);
  font-size: clamp(1.5rem, 6vw, 1.9rem);
  font-weight: 800;
  letter-spacing: 0.035em;
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}

.phone-mobile {
  display: inline-block;
  min-height: 44px;
}

.phone-desktop {
  display: none;
}

.note {
  font-size: 0.85rem;
  color: var(--muted);
}

label,
legend {
  font-weight: 700;
}

input:not([type='checkbox']),
select,
textarea {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 12px;
  border: 1px solid #a7b6c6;
  border-radius: 4px;
  background: #fafbfd;
  color: var(--ink);
  margin-top: 10px;
  font-size: 16px;
}

input[type='checkbox'] {
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
  vertical-align: middle;
  flex-shrink: 0;
}

textarea {
  resize: vertical;
}

.field {
  margin-block: 28px;
}

fieldset {
  border: 0;
  padding: 0;
  min-width: 0;
}

.checks {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.checks label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-weight: 400;
  cursor: pointer;
}

.checks label:has(input:checked) {
  background: #edf4fc;
  border-color: var(--primary);
}

.required {
  display: inline-block;
  font-size: 0.7rem;
  margin-left: 8px;
  padding: 1px 7px;
  background: #eef2f6;
  color: var(--muted);
  border-radius: 2px;
  vertical-align: middle;
  font-weight: 400;
}

.required.is-required {
  color: white;
  background: #972000;
  font-weight: 700;
}

dl {
  margin: 0;
}

dt {
  font-weight: 700;
  margin-top: 18px;
  color: var(--primary);
  font-size: 0.8rem;
}

dd {
  margin-left: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 0.95rem;
}

details {
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
}

summary {
  cursor: pointer;
  font-weight: 700;
  min-height: 44px;
}

details>p {
  margin: 18px 0 0;
}

.site-footer {
  padding-block: 40px;
  font-size: 0.85rem;
}

.site-footer strong {
  font-size: 1.15rem;
}

.site-footer small {
  color: var(--muted);
}

@media (hover: hover) {

  .button:hover,
  button:not(:disabled):hover {
    filter: brightness(0.96);
  }

  .site-header nav a:hover {
    color: var(--deep);
  }
}

@media (min-width: 768px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }

  .button,
  button {
    width: auto;
    min-width: 260px;
  }

  .phone-mobile {
    display: none;
  }

  .phone-desktop {
    display: inline;
  }

  .checks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .site-header {
    padding-block: 24px;
  }

  .site-header nav {
    width: auto;
    gap: 24px;
  }

  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
