/* =========================================================================
   承認済みUI案（docs/ui_proposal_20261030）の共通部品。クラス名は u- で始める。
   新しい画面は本文を <div class="u"> で包み、この部品だけで組む。
   UI案はライトのみなので、application レイアウトで data-theme="light" に固定している。

   外枠（max-width: 1120px）は、UI案と同じく「中身が1120px＋左右の余白」で数える（box-sizing: content-box）。
   既存の application.css は body.site の要素（input・h2 など）に直接スタイルを当てているため、
   ここでは .u の中で打ち消したうえで、必要なものは body.site を付けて詳しさをそろえている。
   ========================================================================= */

:root {
  --u-accent: #0E7C55; --u-accent-hover: #0A5C40;
  --u-ink: #101A1E; --u-muted: #5A6B6C; --u-sub: #3F4F50; --u-faint: #8A9795;
  --u-line: #DCE3E1; --u-line-strong: #9AAAA5; --u-soft: #F6F8F7; --u-hero: #EAF5F0;
  --u-warn: #C2410C; --u-danger-soft: #FBEAEA; --u-danger: #A33;
  --u-shadow: 0 1px 3px rgba(16,26,30,.06); --u-shadow-hover: 0 8px 22px rgba(16,26,30,.14);
  --u-font: "Noto Sans JP", system-ui, sans-serif;
}

/* シリーズ色（config/series.yml の color / soft と同じ値） */
/* --s-dark（少し濃い色）は UI案の各シリーズのページで使われている値 */
.u-s-tamatebako { --s: #0E7C55; --s-soft: #EAF5F0; --s-dark: #0A5C40; }
.u-s-webtesting { --s: #1F6A9E; --s-soft: #E8F1F8; --s-dark: #17537D; }
.u-s-testcenter { --s: #6D4FA8; --s-soft: #F0ECF8; --s-dark: #573D8A; }
.u-s-tokkun     { --s: #B4541A; --s-soft: #FBF0E8; --s-dark: #8F4214; }

body.site { font-family: var(--u-font); color: var(--u-ink); background: #fff; }
/* 旧スタイルの main の余白（24px 16px）を外す。各画面が自分で余白を持つ */
body.site > main { padding: 0; }
/* 外枠（max-width: 1120px）は UI案と同じく「中身が1120px＋左右の余白」。application.css の
   body.site * { box-sizing: border-box } より強くするため、body.site を付けてここでまとめて指定する */
body.site .u-header-inner, body.site .u-cart-body, body.site .u-crumb, body.site .u-env, body.site .u-flash, body.site .u-footer-inner, body.site .u-hero-inner, body.site .u-pagehead-inner, body.site .u-pd-body, body.site .u-section, body.site .u-sr-head-inner, body.site .u-sr-section, body.site .u-wrap, body.site .ua-head-inner, body.site .ua-section, body.site .ua-switch, body.site .us-wide { box-sizing: content-box; }

/* ---------- 本文の器（既存の h1/h2 などの装飾を打ち消す） ---------- */
/* 行の高さは、UI案と同じくブラウザの既定（normal）。UI案で指定のある所だけ、各部品で指定する */
.u { font-family: var(--u-font); color: var(--u-ink); line-height: normal; }
.u-header, .u-footer { line-height: normal; }
.u h1, .u h2, .u h3, .u h4 { margin: 0; padding: 0; border: 0; font-weight: 700; color: inherit; }
.u p { margin: 0; }
.u a { color: var(--u-accent); }
.u a:hover { color: var(--u-accent-hover); }
.u-wrap { max-width: 1120px; margin: 0 auto; padding-inline: 24px; box-sizing: content-box; }
.u-section { max-width: 1120px; margin: 0 auto; padding: 48px 24px 0; box-sizing: content-box; }
.u-section:last-child { padding-bottom: 56px; }
.u-h2 { font-size: 24px; margin-bottom: 20px !important; }
.u-h2 + .u-lead { margin-top: -14px !important; margin-bottom: 18px !important; }
.u-lead { font-size: 15px; color: var(--u-muted); line-height: 1.8; }
.u-muted { color: var(--u-muted); }
.u-small { font-size: 13px; color: var(--u-muted); }
.u-center { text-align: center; }

/* ---------- ヘッダー ---------- */
.u-header { border-bottom: 1px solid var(--u-line); background: #fff; font-family: var(--u-font); }
.u-header-inner {
  max-width: 1120px; margin: 0 auto; padding: 14px 24px; box-sizing: content-box;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 28px;
}
.u-logo { text-decoration: none; color: var(--u-ink); display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.u-logo:hover { color: var(--u-ink); }
.u-logo-name { font-weight: 700; font-size: 19px; }
.u-logo-sub { font-size: 12px; color: var(--u-muted); }
.u-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; font-size: 14px; font-weight: 500; }
.u-nav a { color: var(--u-ink); text-decoration: none; }
.u-nav a:hover { color: var(--u-accent); }
.u-nav a[aria-current="page"] { font-weight: 700; }
.u-nav .u-nav-sub { color: var(--u-muted); font-size: 13px; }
.u-nav form { display: inline; margin: 0; }
.u-nav .u-linkbtn { background: none; border: 0; padding: 0; font: inherit; font-size: 13px; color: var(--u-muted); cursor: pointer; }
.u-nav .u-linkbtn:hover { color: var(--u-accent); }
.u-nav-count { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 999px; background: var(--u-accent); color: #fff; font-size: 11px; font-weight: 700; text-align: center; line-height: 18px; }

/* ---------- ボタン ---------- */
.u-pill, a.u-pill {
  background: var(--u-accent); color: #fff !important; text-decoration: none; font-weight: 700;
  padding: 8px 16px; border-radius: 999px;
}
.u-btn, a.u-btn, body.site button.u-btn, body.site input.u-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; box-sizing: border-box;
  background: var(--u-accent); color: #fff; border: 1.5px solid var(--u-accent); text-decoration: none;
  font-family: var(--u-font); font-size: 16px; font-weight: 700; padding: 13.5px 30px; border-radius: 999px;
  cursor: pointer; line-height: 1.4;
}
.u-btn2, a.u-btn2, body.site button.u-btn2 {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; box-sizing: border-box;
  background: #fff; color: var(--u-accent); border: 1.5px solid var(--u-accent); text-decoration: none;
  font-family: var(--u-font); font-size: 16px; font-weight: 700; padding: 13.5px 30px; border-radius: 999px;
  cursor: pointer; line-height: 1.4;
}
.u-pill:hover, .u-btn:hover, a.u-btn:hover, body.site button.u-btn:hover, body.site input.u-btn:hover {
  background: var(--u-accent-hover); border-color: var(--u-accent-hover); color: #fff;
}
.u-btn2:hover, a.u-btn2:hover, body.site button.u-btn2:hover { background: var(--u-hero); color: var(--u-accent); }
.u-btn--block, body.site button.u-btn--block, body.site input.u-btn--block { width: 100%; height: 50px; padding: 0 20px; }
.u-btn--sm, a.u-btn--sm, body.site button.u-btn--sm { font-size: 13px; padding: 7px 16px; border-radius: 6px; }
.u-btn[disabled], body.site button.u-btn[disabled] { background: #9AAAA5; border-color: #9AAAA5; cursor: not-allowed; }
.u-btn--series, a.u-btn--series, body.site button.u-btn--series { background: var(--s, var(--u-accent)); border-color: var(--s, var(--u-accent)); }
.u-btn--series:hover { filter: brightness(.9); background: var(--s, var(--u-accent-hover)); }
.u-btn:focus-visible, .u-btn2:focus-visible, .u-pill:focus-visible { outline: 2px solid var(--u-accent); outline-offset: 2px; }
.u-btn-row { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

/* ---------- ヒーロー・ページ見出し ---------- */
.u-hero { background: var(--u-hero); border-bottom: 1px solid var(--u-line); overflow: hidden; }
.u-hero-inner { max-width: 1120px; margin: 0 auto; padding: 44px 24px; box-sizing: content-box; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; }
.u-hero h1 { font-size: 38px; line-height: 1.4; }
@media (max-width: 520px) { .u-hero h1 { font-size: 24px; } }
.u-hero-tag { display: inline-block; background: #fff; border: 1.5px solid var(--u-accent); color: var(--u-accent-hover); font-size: 14px; font-weight: 700; padding: 5px 16px; border-radius: 999px; }
.u-hero-sub { font-size: 15px; color: var(--u-muted); line-height: 1.8; }
.u-hero-cta { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 6px; }
.u-hero-cta > div { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.u-hero-cta-label { font-size: 12px; font-weight: 700; color: var(--u-warn); }
.u-pagehead { background: var(--u-hero); border-bottom: 1px solid var(--u-line); }
.u-pagehead-inner { max-width: 1120px; margin: 0 auto; padding: 26px 24px 28px; box-sizing: content-box; }
.u-pagehead h1 { font-size: 28px; }
.u-pagehead p { margin-top: 8px !important; font-size: 15px; color: var(--u-sub); }

/* パンくず */
.u-crumb { max-width: 1120px; margin: 0 auto; padding: 14px 24px 0; box-sizing: content-box; font-size: 13px; color: var(--u-muted); display: flex; flex-wrap: wrap; gap: 6px; }
.u-crumb a { color: var(--u-muted); }
.u-crumb a:hover { color: var(--u-accent); }

/* ---------- カード ---------- */
.u-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.u-grid--260 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.u-grid--220 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.u-card {
  display: flex; flex-direction: column; border: 1px solid var(--u-line); border-radius: 12px; overflow: hidden;
  text-decoration: none; color: var(--u-ink); background: #fff; box-shadow: var(--u-shadow); min-width: 0;
  transition: box-shadow .15s, transform .15s;
}
a.u-card { color: var(--u-ink); }
a.u-card:hover { box-shadow: var(--u-shadow-hover); transform: translateY(-2px); color: var(--u-ink); }
.u-card-body { padding: 22px; }
.u-card-title { font-size: 17px; font-weight: 700; color: var(--u-accent); }
.u-card-text { margin-top: 8px; font-size: 14px; line-height: 1.8; color: var(--u-muted); }
.u-box { background: var(--u-soft); border-radius: 12px; padding: 22px; }
.u-box-step { font-size: 13px; color: var(--u-accent); font-weight: 700; }
.u-box-title { margin-top: 6px; font-weight: 700; font-size: 16px; }

/* シリーズのカード（色つきの見出し部分に、受検画面のサンプル。重ね方は ui_images.css） */
.u-series-head { position: relative; height: 150px; background: var(--s); overflow: hidden; }
.u-series-label { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: #fff; text-align: center; padding: 0 12px; }
.u-series-label small { font-size: 12px; font-weight: 700; }
.u-series-label strong { font-size: 22px; font-weight: 700; line-height: 1.3; }
.u-series-text { padding: 16px 18px 18px; font-size: 15px; line-height: 1.8; }

/* 行のリンク一覧 */
.u-rows { border: 1px solid var(--u-line); border-radius: 12px; overflow: hidden; }
.u-rows > a, .u-rows > div { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--u-line); text-decoration: none; color: var(--u-ink); }
.u-rows > :last-child { border-bottom: 0; }
.u-rows .u-rows-go { font-size: 14px; font-weight: 700; color: var(--s, var(--u-accent)); }
.u-rows > a:hover { background: var(--u-soft); color: var(--u-ink); }

/* お知らせ（左に橙の線） */
.u-notice { border: 1px solid var(--u-line); border-left: 4px solid var(--u-warn); border-radius: 8px; padding: 16px 20px; font-size: 14px; line-height: 1.8; color: var(--u-muted); }
.u-notice a { margin-left: 8px; font-weight: 700; }

/* ---------- 入力フォーム（ログイン・会員登録など、中央の白いカード） ---------- */
.u-page { background: var(--u-soft); padding: 44px 24px 20px; }
.u-page:last-child { padding-bottom: 56px; }
.u-panel { max-width: 460px; margin: 0 auto; background: #fff; border: 1px solid var(--u-line); border-radius: 16px; padding: 34px 34px 36px; box-sizing: border-box; box-shadow: 0 2px 10px rgba(16,26,30,.05); }
.u-panel--wide { max-width: 640px; }
.u-panel--xwide { max-width: 860px; }
.u-panel h1 { font-size: 24px; text-align: center; }
.u-panel-body { margin-top: 22px; }
.u-panel-lead { margin-top: 10px !important; font-size: 14px; color: var(--u-muted); line-height: 1.8; text-align: center; }
@media (max-width: 520px) { .u-panel { padding: 26px 20px 28px; } }

.u-form { display: flex; flex-direction: column; gap: 18px; }
.u-field { display: flex; flex-direction: column; gap: 6px; }
.u-field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 420px) { .u-field-row { grid-template-columns: 1fr; } }
.u-label { font-size: 14px; font-weight: 700; }
.u-req { font-size: 11px; color: var(--u-warn); font-weight: 400; margin-left: 6px; }
.u-opt { font-size: 11px; color: var(--u-muted); font-weight: 400; margin-left: 6px; }
.u-hint { font-size: 12.5px; color: var(--u-muted); line-height: 1.7; }
body.site input.u-input, body.site textarea.u-input, body.site select.u-select {
  height: 46px; box-sizing: border-box; width: 100%; max-width: 100%; border: 1.5px solid var(--u-line-strong);
  border-radius: 8px; padding: 0 12px; font-size: 15px; font-family: inherit; background: #fff; color: var(--u-ink);
}
body.site textarea.u-input { height: auto; min-height: 160px; padding: 10px 12px; line-height: 1.8; }
body.site select.u-select { padding: 0 10px; width: auto; }
body.site input.u-input:focus, body.site textarea.u-input:focus, body.site select.u-select:focus {
  outline: 2px solid var(--u-accent); outline-offset: 1px; border-color: var(--u-line-strong); box-shadow: none;
}
.u-date { display: flex; gap: 8px; align-items: center; font-size: 14px; flex-wrap: wrap; }
.u-check { display: flex; gap: 10px; align-items: center; font-size: 14px; }
body.site .u-check input[type="checkbox"], body.site .u-check input[type="radio"] { width: 18px; height: 18px; accent-color: var(--u-accent); margin: 0; }
.u-choices { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.u-errors { background: var(--u-danger-soft); color: var(--u-danger); border-radius: 8px; padding: 12px 16px; font-size: 14px; line-height: 1.8; }
.u-errors ul { margin: 0; padding-left: 1.2em; }
.u-divider { margin: 26px 0 18px; border-top: 1px solid var(--u-line); position: relative; }
.u-divider span { position: absolute; left: 50%; top: -10px; transform: translateX(-50%); background: #fff; padding: 0 12px; font-size: 12px; color: var(--u-muted); }
.u-hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* 確認画面の内容一覧 */
.u-dl { display: grid; grid-template-columns: 9em 1fr; border-top: 1px solid var(--u-line); font-size: 15px; }
.u-dl dt, .u-dl dd { margin: 0; padding: 12px 4px; border-bottom: 1px solid var(--u-line); }
.u-dl dt { font-weight: 700; color: var(--u-muted); font-size: 14px; }
.u-dl dd { word-break: break-word; white-space: pre-wrap; }
@media (max-width: 520px) { .u-dl { grid-template-columns: 1fr; } .u-dl dt { border-bottom: 0; padding-bottom: 0; } }

/* ステッパー（1 入力 → 2 確認 → 3 完了） */
.u-stepper { display: flex; align-items: center; gap: 10px; justify-content: center; font-size: 13px; margin-bottom: 22px; flex-wrap: wrap; }
.u-step { display: flex; align-items: center; gap: 6px; font-weight: 500; color: var(--u-muted); }
.u-step-n { width: 24px; height: 24px; border-radius: 50%; background: #fff; color: var(--u-muted); border: 1.5px solid var(--u-line-strong); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; box-sizing: border-box; }
/* 済んだ段は丸だけを塗り、文字は控えめのまま（UI案のとおり） */
.u-step.is-current { font-weight: 700; color: var(--u-ink); }
.u-step.is-current .u-step-n, .u-step.is-done .u-step-n { background: var(--u-accent); color: #fff; border-color: var(--u-accent); }
.u-step-sep { width: 28px; height: 2px; background: var(--u-line); }

/* 完了画面の丸いチェック */
.u-done-mark { width: 56px; height: 56px; border-radius: 50%; background: var(--u-hero); color: var(--u-accent); display: flex; align-items: center; justify-content: center; margin: 0 auto; font-size: 28px; font-weight: 700; }

/* ---------- 表・タブ ---------- */
.u-table-wrap { overflow-x: auto; border: 1px solid var(--u-line); border-radius: 12px; }
table.u-table { width: 100%; border-collapse: collapse; background: #fff; }
table.u-table th { padding: 10px 16px; border-bottom: 1px solid var(--u-line); text-align: left; font-size: 13px; font-weight: 700; background: var(--u-soft); white-space: nowrap; }
table.u-table td { padding: 14px 16px; border-bottom: 1px solid var(--u-line); font-size: 14px; vertical-align: middle; }
table.u-table tr:last-child td { border-bottom: 0; }
table.u-table .num { text-align: right; white-space: nowrap; }
table.u-table .c { text-align: center; white-space: nowrap; }
.u-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--u-line); margin-bottom: 18px; }
.u-tab, a.u-tab, body.site button.u-tab { padding: 10px 22px; font-size: 15px; font-weight: 700; border: 0; border-bottom: 3px solid transparent; color: var(--u-muted); background: none; text-decoration: none; cursor: pointer; font-family: inherit; }
.u-tab[aria-selected="true"], .u-tab.is-current { border-bottom-color: var(--u-accent); color: var(--u-accent); }
.u-tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--u-hero); color: var(--u-accent-hover); }
.u-tag--expired { background: var(--u-danger-soft); color: var(--u-danger); }

/* ---------- お知らせ・通知 ---------- */
.u-flash { max-width: 1120px; margin: 16px auto 0; padding: 0 24px; box-sizing: content-box; }
.u-flash p { margin: 0; padding: 12px 16px; border-radius: 8px; font-size: 14px; }
.u-flash .notice { background: var(--u-hero); color: var(--u-accent-hover); }
.u-flash .alert { background: var(--u-danger-soft); color: var(--u-danger); }

/* ---------- フッター ---------- */
.u-footer { margin-top: 0; border-top: 1px solid var(--u-line); background: var(--u-soft); font-family: var(--u-font); }
.u-footer-inner { max-width: 1120px; margin: 0 auto; padding: 24px; box-sizing: content-box; display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 13px; color: var(--u-muted); }
.u-footer a { color: var(--u-muted); }
.u-footer a:hover { color: var(--u-accent); }
.u-footer-copy { margin-left: auto; }
.u-env { max-width: 1120px; margin: 0 auto; padding: 0 24px 24px; box-sizing: content-box; font-size: 12px; color: var(--u-muted); }
