@charset "UTF-8";

/* ==========================================================================
   21-domain.com  新規ハンドル登録フォーム
   サイト共通デザイン（html.css）に合わせたトーン
   ========================================================================== */

:root {
  color-scheme: light;

  --brand: #2c6fb2;
  --brand-deep: #143557;
  --brand-soft: #4b8ccd;
  --brand-tint: rgba(44, 111, 178, .12);
  --accent: #f2b552;
  --accent-tint: rgba(255, 226, 193, .45);
  --accent-text: #8a5606;

  --danger: #e54355;
  --danger-deep: #a3202f;
  --danger-tint: #fdeff1;
  --success: #1f7a54;
  --success-deep: #14573b;
  --success-tint: #edf8f2;

  --text: #143557;
  --muted: #4c6f96;
  --faint: #6f8fb8;
  --line: rgba(44, 111, 178, .18);
  --surface: #fff;
  --page: #f4f8ff;

  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 10px;
  --shadow-card: 0 12px 24px rgba(15, 40, 70, .08);
  --shadow-header: 0 10px 22px rgba(43, 99, 163, .22);
  --shadow-button: 0 12px 24px rgba(44, 111, 178, .22);
  --container: 980px;
}

* { box-sizing: border-box; }

html {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, Helvetica, Arial, sans-serif;
  color: var(--text);
  line-height: 1.8;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(120% 60% at 50% -10%, #e6f0fe 0%, rgba(230, 240, 254, 0) 60%),
    var(--page);
  font-size: 15px;
}

a {
  color: var(--brand);
  text-decoration: none;
  transition: color .2s ease;
}

a:hover { color: #0b4e8d; text-decoration: underline; }

:where(a, button, input, select, textarea):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

img { max-width: 100%; height: auto; display: block; }

code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--brand-tint);
  color: var(--brand);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .92em;
}

/* ---------- レイアウト -------------------------------------------------- */

.page {
  width: min(100% - 32px, var(--container));
  margin-inline: auto;
  padding-block: 20px 40px;
}

/* ---------- ヘッダー ---------------------------------------------------- */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  padding: 12px 20px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #2b63a3, #4b8ccd);
  box-shadow: var(--shadow-header);
  color: #fff;
}

.site-header__brand { display: inline-flex; }

.site-header__logo {
  width: clamp(180px, 26vw, 250px);
  border-radius: 8px;
  filter: drop-shadow(0 4px 10px rgba(9, 27, 51, .2));
}

.site-header__tag {
  margin: 0;
  font-size: 13px;
  letter-spacing: .04em;
  color: rgba(255, 255, 255, .92);
}

/* ---------- パンくず ---------------------------------------------------- */

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 18px 4px 16px;
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--faint);
}

.breadcrumb a { color: var(--faint); }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb span[aria-hidden] { opacity: .6; }
.breadcrumb [aria-current] { color: var(--muted); }

/* ---------- カード共通 -------------------------------------------------- */

.form-shell {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.intro,
.form-section,
.submit-card,
.status-panel,
.errors {
  padding: clamp(20px, 4vw, 32px);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

/* ---------- イントロ ---------------------------------------------------- */

.intro__eyebrow {
  display: inline-block;
  margin: 0 0 10px;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--brand-tint);
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
}

h1 {
  margin: 0 0 10px;
  color: var(--brand);
  font-size: clamp(1.5rem, 3.6vw, 1.9rem);
  line-height: 1.4;
  letter-spacing: .01em;
}

.intro__lead {
  margin: 0;
  max-width: 62ch;
  color: var(--muted);
}

/* 申請の流れ */

.flow {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: flow;
}

.flow__item {
  flex: 1 1 190px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #f8fbff;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.flow__num {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2c6fb2, #4b8ccd);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.flow__item--last .flow__num {
  background: linear-gradient(135deg, #f2b552, #e79b28);
}

/* 注意書き */

.notice {
  margin-top: 22px;
  padding: 14px 18px;
  border: 1px solid rgba(255, 181, 79, .45);
  border-radius: var(--radius-md);
  background: var(--accent-tint);
  color: var(--accent-text);
  font-size: 14px;
}

.notice strong { color: #7a4a03; }

.required-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0 0;
  color: var(--faint);
  font-size: 13px;
}

/* ---------- エラーサマリー ---------------------------------------------- */

.errors {
  border: 1px solid rgba(229, 67, 85, .35);
  background: var(--danger-tint);
  color: var(--danger-deep);
}

.errors__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 6px;
  color: var(--danger-deep);
  font-size: 1.05rem;
}

.errors__title::before {
  content: "!";
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--danger);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}

.errors__lead {
  margin: 0 0 12px;
  font-size: 13px;
  color: #8c3341;
}

.errors ul {
  margin: 0;
  padding-left: 20px;
}

.errors li + li { margin-top: 4px; }
.errors a { color: var(--danger-deep); text-decoration: underline; }
.errors a:hover { color: var(--danger); }

/* ---------- フォームセクション ------------------------------------------ */

.form-section__head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding-bottom: 16px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.form-section__num {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2c6fb2, #4b8ccd);
  box-shadow: 0 6px 12px rgba(44, 111, 178, .25);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}

.form-section__head h2 {
  margin: 0;
  color: var(--brand);
  font-size: 1.15rem;
  line-height: 1.6;
}

.form-section__desc {
  margin: 2px 0 0;
  color: var(--faint);
  font-size: 13px;
}

/* ---------- フィールド -------------------------------------------------- */

/* 姓／名、郵便番号／都道府県のように対で並ぶ項目が多いため、
   段組みは2カラム固定にして意味のある組み合わせを崩さない。 */
.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 24px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field--wide { grid-column: 1 / -1; }

label,
.field-label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
}

.badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1.7;
}

.badge--required {
  background: var(--danger);
  color: #fff;
}

.badge--optional {
  background: rgba(111, 143, 184, .16);
  color: var(--muted);
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid rgba(44, 111, 178, .28);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  font: inherit;
  line-height: 1.6;
  transition: border-color .15s ease, box-shadow .15s ease;
}

input::placeholder,
textarea::placeholder { color: rgba(20, 53, 87, .42); }

textarea {
  min-height: 130px;
  resize: vertical;
}

select {
  appearance: none;
  padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, var(--brand) 50%),
                    linear-gradient(135deg, var(--brand) 50%, transparent 50%);
  background-position: calc(100% - 20px) calc(50% + 2px), calc(100% - 14px) calc(50% + 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  cursor: pointer;
}

input:hover,
select:hover,
textarea:hover { border-color: rgba(44, 111, 178, .45); }

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid var(--brand-tint);
  outline-offset: 0;
  border-color: var(--brand);
}

.field-hint {
  margin: 0;
  color: var(--faint);
  font-size: 12.5px;
  line-height: 1.7;
}

/* エラー状態 */

.field.is-error > label,
.field.is-error > .field-label { color: var(--danger-deep); }

.field.is-error input,
.field.is-error select,
.field.is-error textarea {
  border-color: var(--danger);
  background: #fffafb;
}

.field.is-error input:focus,
.field.is-error select:focus,
.field.is-error textarea:focus {
  outline-color: rgba(229, 67, 85, .18);
}

.field-error {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0;
  color: var(--danger-deep);
  font-size: 13px;
  font-weight: 600;
}

.field-error::before {
  content: "×";
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  line-height: 1;
}

/* 同意チェック */

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #f8fbff;
  transition: border-color .15s ease, background .15s ease;
}

.checkbox-row:hover { border-color: rgba(44, 111, 178, .4); }

.field.is-error .checkbox-row {
  border-color: var(--danger);
  background: #fffafb;
}

.checkbox-row input {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin: 2px 0 0;
  accent-color: var(--brand);
  cursor: pointer;
}

.checkbox-row label {
  margin: 0;
  display: block;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.75;
  cursor: pointer;
}

.checkbox-row a { text-decoration: underline; }

/* ---------- 送信 -------------------------------------------------------- */

.submit-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.submit-button {
  min-width: min(100%, 340px);
  min-height: 56px;
  padding: 14px 36px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #2c6fb2, #4b8ccd);
  box-shadow: var(--shadow-button);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .02em;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.submit-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(44, 111, 178, .28);
  filter: brightness(1.03);
}

.submit-button:active { transform: translateY(0); }

.privacy-note {
  max-width: 62ch;
  margin: 0;
  color: var(--faint);
  font-size: 12.5px;
  text-align: left;
}

.support-note {
  margin: 0;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  width: 100%;
  color: var(--muted);
  font-size: 13px;
}

/* ---------- 完了・移転パネル -------------------------------------------- */

.status-panel { text-align: left; }

.status-panel h1 { margin-bottom: 12px; }
.status-panel p { margin: 0 0 10px; color: var(--muted); }
.status-panel p:last-child { margin-bottom: 0; }

.status-panel--success {
  border: 1px solid rgba(31, 122, 84, .3);
  background: linear-gradient(180deg, var(--success-tint), #fff 55%);
}

.status-panel--success h1 {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--success-deep);
}

.status-panel--success h1::before {
  content: "✓";
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 8px 16px rgba(31, 122, 84, .25);
  color: #fff;
  font-size: 20px;
  line-height: 1;
}

.status-panel__next {
  margin: 18px 0;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 181, 79, .45);
  background: var(--accent-tint);
  color: var(--accent-text);
  font-size: 14px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 26px;
  border: 1px solid var(--brand);
  border-radius: 999px;
  color: var(--brand);
  font-weight: 700;
  font-size: 14px;
  transition: background .2s ease, color .2s ease;
}

.back-link:hover {
  background: var(--brand);
  color: #fff;
  text-decoration: none;
}

.moved-panel { text-align: center; }
.moved-panel .status-panel__next { text-align: left; }

.moved-panel__action { margin: 26px 0 16px; }

.moved-panel__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.moved-panel__button:hover { color: #fff; text-decoration: none; }

.moved-panel__note {
  color: var(--faint);
  font-size: 13px;
}

/* ---------- フッター ---------------------------------------------------- */

.site-footer {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
}

/* ---------- ハニーポット ------------------------------------------------ */

.bot-field {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* ---------- レスポンシブ ------------------------------------------------ */

@media (max-width: 640px) {
  .page { width: min(100% - 20px, var(--container)); }

  .field-grid { grid-template-columns: 1fr; }
  .field--wide { grid-column: auto; }

  .site-header {
    justify-content: center;
    text-align: center;
  }

  .flow__item { flex-basis: 100%; }

  .submit-button { width: 100%; }

  .status-panel--success h1 { font-size: 1.35rem; }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }

  .submit-button:hover { transform: none; }
}

@media print {
  body { background: #fff; }

  .site-header,
  .breadcrumb,
  .submit-card,
  .site-footer { display: none; }

  .intro,
  .form-section {
    box-shadow: none;
    border: 1px solid #ccc;
    break-inside: avoid;
  }
}
