/* 配色は aidub.jp（ペライチ）のテーマ設定に合わせている */
:root {
  --orange: #F39800;      /* aidub.jp のメインカラー */
  --orange-deep: #D35400; /* ボタン（白文字が読める濃さ） */
  --orange-text: #b34700; /* 強調文字 */
  --red: #c0281a;
  --green: #2f7a3a;
  --green-bar: #5aa765;
  --bg: #FAF3E8;
  --bg-soft: #FFF8EF;
  --bg-tint: #FFEED5;
  --line: #F3E1C4;
  --line-strong: #E6D3B5;
  --text: #333333;
  --text-sub: #5a4c3a;
  --text-mute: #6b5d4a;
  --text-faint: #9a8a74;
  --white: #ffffff;
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
  line-height: 1.6;
}

a { color: var(--orange-text); }
a:hover { color: #7a3000; }

[hidden] { display: none !important; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); border: 0; white-space: nowrap;
}

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

/* ヘッダー */
.topline { height: 4px; background: linear-gradient(90deg, var(--orange), #e8412e); }

.site-header { background: var(--white); border-bottom: 1px solid var(--line); }

.header-inner {
  padding-top: 14px; padding-bottom: 14px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px;
}

.brand { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; text-decoration: none; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-logo { font-size: 28px; font-weight: 900; color: var(--orange); letter-spacing: 0.02em; line-height: 1.2; }
.brand-sub { font-size: 16px; font-weight: 700; }
.app-version { font-size: 11px; color: var(--text-faint); font-weight: 400; }

.tel { display: flex; flex-direction: column; align-items: flex-end; }
.tel a { font-size: 18px; font-weight: 700; text-decoration: none; }
.tel span { font-size: 11px; color: var(--text-mute); }

/* 本文 */
.main {
  flex: 1; width: 100%; max-width: 760px; margin: 0 auto;
  padding: 32px 20px 56px;
  display: flex; flex-direction: column; gap: 24px;
}

.intro h1 { margin: 0 0 8px; font-size: 26px; font-weight: 900; line-height: 1.4; }
.intro p { margin: 0; font-size: 15px; line-height: 1.8; color: var(--text-sub); }
.intro b { color: var(--orange-text); }

/* ステップ表示 */
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px;
}
.steps li {
  min-height: 64px; padding: 8px 4px; border-radius: 12px;
  border: 2px solid var(--line-strong); color: var(--text-mute);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  text-align: center;
}
.steps .num {
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; background: var(--line); color: var(--text-mute);
}
.steps .label { font-size: 12px; font-weight: 700; line-height: 1.3; }
.steps li.current { background: var(--white); border-color: var(--orange); color: var(--text); }
.steps li.current .num { background: var(--orange-deep); color: var(--white); }
.steps li.past { background: var(--bg-tint); border-color: transparent; color: #8a3a00; }
.steps li.past .num { background: var(--orange); color: #3a1a00; }

/* カード */
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px 28px;
}
.step { display: flex; flex-direction: column; gap: 22px; }
.head h2, .done h2 { margin: 0 0 6px; font-size: 20px; font-weight: 700; }
.head p { margin: 0; font-size: 14px; line-height: 1.7; color: var(--text-mute); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 700; }
.req { color: var(--red); font-size: 12px; }
.opt { color: var(--text-mute); font-size: 12px; font-weight: 400; }

.input {
  width: 100%; min-height: 48px; padding: 0 14px;
  border: 1.5px solid var(--line-strong); border-radius: 10px;
  background: var(--bg-soft); color: var(--text);
  font-family: inherit; font-size: 16px;
}
textarea.input { padding: 12px 14px; resize: vertical; line-height: 1.6; }
.input:focus { outline: 3px solid rgba(243, 152, 0, 0.35); border-color: var(--orange); }
.input[aria-invalid="true"] { border-color: var(--red); }
.input::placeholder { color: #a0927f; }
.input-code { min-height: 52px; font-size: 18px; letter-spacing: 0.06em; }

.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }

.badge-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.badge { font-size: 15px; font-weight: 700; background: var(--bg-tint); color: #8a3a00; padding: 4px 12px; border-radius: 999px; }
.link-btn { border: 0; background: none; color: var(--orange-text); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; min-height: 44px; padding: 0 6px; }

.note { margin: 0; font-size: 13px; color: var(--text-mute); }
.center { text-align: center; }
.right { text-align: right; }
.note b { color: var(--text); }

.alert {
  margin: 0; font-size: 14px; line-height: 1.6; color: var(--red);
  background: #fff1ef; border-radius: 10px; padding: 10px 14px;
  white-space: pre-line;
}

/* ボタン */
.btn {
  min-height: 54px; padding: 0 24px; border-radius: 999px;
  font-family: inherit; font-size: 18px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; cursor: pointer;
}
.btn-primary { border: 0; background: var(--orange-deep); color: var(--white); }
.btn-primary:hover { background: #b84900; color: var(--white); }
.btn-outline { border: 2px solid var(--orange-deep); background: var(--white); color: var(--orange-text); font-size: 16px; min-height: 50px; }
.btn-outline:hover { background: var(--bg-soft); }
.btn:disabled { opacity: 0.55; cursor: wait; }
.btn:focus-visible, .link-btn:focus-visible, .dropzone:focus-within { outline: 3px solid rgba(243, 152, 0, 0.5); outline-offset: 2px; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-row .btn { flex: 1 1 200px; }

/* ファイル選択 */
.dropzone {
  border: 2px dashed var(--orange); border-radius: var(--radius); background: var(--bg-soft);
  padding: 32px 20px; cursor: pointer; position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
  color: var(--orange-deep); transition: background 0.15s;
}
.dropzone.dragover { background: var(--bg-tint); border-style: solid; }
.dz-title { font-size: 17px; font-weight: 700; color: var(--text); }
.dropzone u { color: var(--orange-text); font-weight: 700; }

.file-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.file-list:empty { display: none; }
.file-item { padding: 10px 6px 10px 14px; background: var(--bg); border-radius: 10px; display: flex; flex-direction: column; gap: 6px; }
.file-row { display: flex; align-items: center; gap: 12px; min-height: 28px; }
.file-row svg { flex: none; color: var(--orange-deep); }
.file-name { flex: 1; min-width: 0; font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { font-size: 13px; color: var(--text-mute); white-space: nowrap; }
.file-status { font-size: 12px; font-weight: 700; color: var(--orange-text); white-space: nowrap; padding-right: 8px; }
.file-status.done { color: var(--green); }
.file-status.wait { color: var(--text-mute); font-weight: 400; }
.file-status.err { color: var(--red); }
.file-err { margin: 0; font-size: 12px; color: var(--red); padding-right: 8px; }
.remove-btn {
  width: 44px; height: 44px; flex: none; border: 0; background: none; color: var(--text-mute); cursor: pointer;
  display: flex; align-items: center; justify-content: center; border-radius: 8px;
}
.remove-btn:hover { background: var(--line); }

/* 進捗 */
.total { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.total-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 14px; color: var(--text-sub); }
.pct { font-size: 40px; font-weight: 900; color: var(--orange-text); line-height: 1; }
.pct small { font-size: 20px; }
.total-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--text-mute); }
.bar { height: 14px; background: var(--line); border-radius: 999px; overflow: hidden; }
.bar > div { width: 0; height: 100%; background: var(--orange); border-radius: 999px; }
.bar.small { height: 6px; margin-right: 8px; }
.bar.complete > div { background: var(--green-bar); }

/* 完了 */
.done { align-items: center; text-align: center; padding: 12px 0; }
.done p { margin: 0; font-size: 15px; line-height: 1.8; color: var(--text-sub); }
.check { width: 84px; height: 84px; border-radius: 50%; background: var(--bg-tint); color: var(--orange-deep); display: flex; align-items: center; justify-content: center; }
.summary { width: 100%; background: var(--bg); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; text-align: left; font-weight: 700; }
.done .btn-row { width: 100%; }

/* 特長 */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.feature { background: var(--white); border-radius: 12px; padding: 16px; display: flex; gap: 12px; align-items: flex-start; }
.feature svg { flex: none; color: var(--orange-deep); }
.feature div { display: flex; flex-direction: column; gap: 4px; }
.feature b { font-size: 14px; }
.feature span { font-size: 12px; line-height: 1.6; color: var(--text-mute); }

/* フッター */
.site-footer { background: var(--white); border-top: 1px solid var(--line); }
.footer-inner {
  padding-top: 20px; padding-bottom: 20px;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 24px;
  font-size: 12px; color: var(--text-mute);
}

@media (max-width: 560px) {
  .main { padding: 24px 16px 40px; gap: 20px; }
  .wrap { padding: 0 16px; }
  .card { padding: 24px 18px; }
  .intro h1 { font-size: 22px; }
  .steps { gap: 6px; }
  .steps li { min-height: 60px; padding: 6px 2px; }
  .steps .label { font-size: 10.5px; }
  .tel { align-items: flex-start; }
  .pct { font-size: 34px; }
}
