/* =========================================================
   フリーランス登録フォーム／管理画面 共通スタイル
   コーポレートサイト（site/）の配色（黒×白）に合わせる。ビルド不要の素のCSS
   ========================================================= */
:root {
  --bg: #f2f2ef; --surface: #ffffff; --text: #141414; --sub: #5f5f5b; --line: #d4d4cf;
  --dark: #101010; --dark-2: #1c1c1c; --on-dark: #f5f5f2;
  --accent: #141414; --danger: #b42318; --danger-soft: #fdecea; --ok: #1f7a3f; --ok-soft: #e7f5ec;
  --warn: #8a5a00; --warn-soft: #fff4d6;
  --radius: 10px;
  --font: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
  --font-en: "Outfit", var(--font);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.8; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- 共通部品 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 22px;
  border-radius: 999px; border: 1.5px solid var(--accent); background: var(--accent); color: #fff; font: inherit; font-weight: 700;
  text-decoration: none; cursor: pointer; }
.btn:hover { opacity: .88; }
.btn--ghost { background: transparent; color: var(--accent); }
.btn--sm { min-height: 34px; padding: 0 14px; font-size: 13px; }
.btn--danger { background: var(--danger); border-color: var(--danger); }
.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 20px; }
.alert--ok { background: var(--ok-soft); color: var(--ok); }
.alert--error { background: var(--danger-soft); color: var(--danger); }
.alert--warn { background: var(--warn-soft); color: var(--warn); }
.badge { display: inline-block; padding: 1px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #fff; white-space: nowrap; }
.chip { display: inline-block; padding: 0 8px; margin: 2px 2px 2px 0; border-radius: 6px; background: #ececea; font-size: 12px; }
.muted { color: var(--sub); }
.small { font-size: 13px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card + .card { margin-top: 20px; }
.card h2 { font-size: 17px; margin-bottom: 14px; }

/* ---------- フォーム ---------- */
.field { margin-bottom: 22px; }
.field > label, .field > .label { display: block; font-weight: 700; margin-bottom: 6px; }
.req { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 4px; background: var(--text); color: #fff; font-size: 11px; vertical-align: 2px; }
.opt { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 4px; background: #e2e2de; color: var(--sub); font-size: 11px; vertical-align: 2px; }
.hint { font-size: 13px; color: var(--sub); margin-top: 4px; }
.error { font-size: 13px; color: var(--danger); margin-top: 4px; font-weight: 700; }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=date], input[type=password], input[type=search], select, textarea {
  width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font: inherit; color: inherit; }
textarea { min-height: 120px; resize: vertical; }
input[aria-invalid=true], select[aria-invalid=true], textarea[aria-invalid=true] { border-color: var(--danger); background: #fffafa; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices label { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; cursor: pointer; font-weight: 400; }
.choices label:has(input:checked) { border-color: var(--text); background: var(--text); color: #fff; }
.choices input { accent-color: var(--text); }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.consent { padding: 16px; border-radius: var(--radius); background: #ececea; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 28px; }

/* ---------- 公開フォームの外枠 ---------- */
.pub-header { background: var(--dark); color: var(--on-dark); }
.pub-header__inner { max-width: 880px; margin: 0 auto; padding: 18px 20px; display: flex; justify-content: space-between; align-items: center; }
.pub-logo { font-family: var(--font-en); font-weight: 600; font-size: 22px; letter-spacing: -.03em; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.pub-logo::before { content: ""; width: 18px; height: 18px; border: 4px solid currentColor; border-radius: 50%; }
.pub-hero { background: var(--dark); color: var(--on-dark); padding: 40px 20px 56px; }
.pub-hero__inner { max-width: 880px; margin: 0 auto; }
.pub-hero h1 { font-family: var(--font-en); font-size: clamp(36px, 7vw, 64px); line-height: 1; letter-spacing: -.03em; font-weight: 600; }
.pub-hero p { margin-top: 14px; color: #c9c9c5; }
.steps { display: flex; gap: 8px; margin-top: 22px; font-size: 13px; }
.steps span { padding: 2px 12px; border-radius: 999px; border: 1px solid #444; color: #aaa; }
.steps span.is-current { background: var(--on-dark); color: var(--dark); border-color: var(--on-dark); font-weight: 700; }
.pub-main { max-width: 880px; margin: -24px auto 64px; padding: 0 16px; }
.pub-footer { text-align: center; font-size: 12px; color: var(--sub); padding: 24px; }
.confirm-table { width: 100%; border-collapse: collapse; }
.confirm-table th, .confirm-table td { text-align: left; vertical-align: top; padding: 12px 0; border-bottom: 1px solid var(--line); }
.confirm-table th { width: 32%; padding-right: 16px; color: var(--sub); font-weight: 700; }
@media (max-width: 640px) {
  .row { grid-template-columns: 1fr; }
  .confirm-table th, .confirm-table td { display: block; width: 100%; }
  .confirm-table th { border-bottom: 0; padding-bottom: 0; }
}

/* ---------- 管理画面 ---------- */
.adm { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.adm-side { background: var(--dark); color: var(--on-dark); padding: 20px 14px; position: sticky; top: 0; height: 100vh; }
.adm-side .pub-logo { font-size: 18px; margin: 0 8px 4px; }
.adm-side .sub { font-size: 12px; color: #9a9a96; margin: 0 8px 20px; }
.adm-nav a { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: #d6d6d2; font-size: 14px; }
.adm-nav a:hover, .adm-nav a[aria-current=page] { background: #2a2a2a; color: #fff; }
.adm-nav .group { margin: 18px 10px 4px; font-size: 11px; color: #7d7d79; letter-spacing: .08em; }
.adm-nav .count { background: #b42318; color: #fff; border-radius: 999px; font-size: 11px; padding: 0 7px; }
.adm-user { position: absolute; left: 14px; right: 14px; bottom: 16px; font-size: 13px; color: #bdbdb9; }
.adm-user button { margin-top: 6px; background: none; border: 1px solid #444; color: #ddd; border-radius: 999px; padding: 2px 12px; cursor: pointer; font: inherit; font-size: 12px; }
.adm-main { padding: 28px 32px 64px; min-width: 0; }
.adm-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.adm-head h1 { font-size: 22px; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th, table.list td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.list th { background: #fafaf8; font-size: 12px; color: var(--sub); white-space: nowrap; }
table.list tr:last-child td { border-bottom: 0; }
table.list tbody tr:hover { background: #fafaf8; }
.filters { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 18px; }
.filters summary { cursor: pointer; font-weight: 700; }
.filters__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px 18px; margin-top: 14px; }
.filters__grid .field { margin: 0; }
.filters__grid .field > label, .filters__grid .field > .label { font-size: 13px; }
.filters .choices label { padding: 2px 10px; font-size: 13px; }
.multi { max-height: 150px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; background: #fff; font-size: 13px; }
.multi label { display: block; font-weight: 400; }
.searchbar { display: flex; gap: 10px; }
.searchbar input { flex: 1; }
.dl { display: grid; grid-template-columns: 180px 1fr; gap: 0; }
.dl dt, .dl dd { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--line); }
.dl dt { color: var(--sub); font-size: 13px; font-weight: 700; padding-right: 12px; }
.cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 20px; align-items: start; }
.timeline { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.timeline li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 36px; padding: 4px 10px; border-radius: 8px; border: 1px solid var(--line); background: #fff; text-align: center; text-decoration: none; font-size: 13px; }
.pagination .is-current { background: var(--text); color: #fff; border-color: var(--text); }
.pagination .is-disabled { color: #bbb; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; background: var(--dark); padding: 20px; }
.login-card { width: 100%; max-width: 400px; }
@media (max-width: 900px) {
  .adm { grid-template-columns: 1fr; }
  .adm-side { position: static; height: auto; }
  .adm-user { position: static; margin-top: 16px; }
  .cols { grid-template-columns: 1fr; }
  .dl { grid-template-columns: 1fr; }
  .dl dt { border-bottom: 0; padding-bottom: 0; }
  .adm-main { padding: 20px 16px 48px; }
}

/* 一覧表：狭い画面では表ごと横スクロールさせ、氏名などが1文字ずつ折り返さないようにする */
table.list--wide { min-width: 1080px; }
table.list--wide td:first-child, table.list--wide td:nth-child(4) { white-space: nowrap; }
table.list--wide td:nth-child(2) .chip, table.list--wide td:nth-child(3) .chip { white-space: nowrap; }

/* ---------- PDF表示ダイアログ ---------- */
.link-button { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; text-align: left; }
.pdf-dialog { width: min(1100px, 94vw); height: min(92vh, 1200px); padding: 0; border: 0; border-radius: var(--radius); background: var(--surface); box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.pdf-dialog[open] { display: flex; flex-direction: column; }
.pdf-dialog::backdrop { background: rgba(0, 0, 0, .6); }
.pdf-dialog__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.pdf-dialog__title { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdf-dialog__actions { display: flex; gap: 8px; flex-shrink: 0; }
.pdf-dialog__frame { flex: 1; width: 100%; border: 0; background: #525659; }
