/* =========================================================================
   団体のお申込み（㉖ /group と、入口・専用URL・完了の画面）。クラス名は ug- で始める。
   共通部品は ui.css（u-）。UI案: docs/ui_proposal_20261030/project/GroupGuide.dc.html ほか
   ========================================================================= */

/* ---------- ㉖ 流れとよくある質問 ---------- */
.ug-pagehead { padding: 28px 24px 34px; }
.u-pagehead .ug-pagehead h1 { margin-top: 14px; font-size: 32px; line-height: 1.35; }
.u-pagehead .ug-pagehead p { max-width: 720px; font-size: 16px; line-height: 1.9; color: var(--u-sub); }
.ug-crumb { font-size: 13px; color: var(--u-muted); display: flex; flex-wrap: wrap; gap: 6px; }
.u .ug-crumb a { color: var(--u-muted); }
.u .ug-crumb a:hover { color: var(--u-accent); }
.ug-h2 { font-size: 22px; }

.ug-steps { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 16px; }
.ug-step { flex: 1 1 220px; min-width: 0; border: 1px solid var(--u-line); border-radius: 12px; padding: 18px 18px 20px; background: #fff; box-sizing: border-box; }
.ug-step-n, .ug-flow-n {
  width: 28px; height: 28px; border-radius: 50%; background: var(--u-accent); color: #fff; font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex: none;
}
.ug-step-title { margin-top: 12px; font-size: 16px; font-weight: 700; }
.u .ug-step-text { margin-top: 6px; font-size: 14px; line-height: 1.8; color: var(--u-muted); }

.u-section.ug-faq-wrap { max-width: 860px; padding-top: 44px; }
.ug-faq { border-top: 1px solid var(--u-line); }
.ug-faq-item { border-bottom: 1px solid var(--u-line); padding: 4px 0; }
.ug-faq-item summary { cursor: pointer; padding: 16px 4px; font-size: 16px; font-weight: 700; line-height: 1.6; }
.ug-faq-a { padding: 0 4px 18px; font-size: 15px; line-height: 1.9; color: var(--u-sub); }
.u .ug-faq-more { margin-top: 22px; font-size: 14px; color: var(--u-muted); }

/* ---------- 入口・専用URL・完了（中央の白いカード） ---------- */
.u .ug-note { margin-top: 14px; text-align: center; }

/* 進み具合（3列の帯。文言が長いので u-stepper とは別） */
.ug-flow { list-style: none; margin: 0 0 24px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ug-flow li {
  display: flex; gap: 8px; align-items: flex-start; font-size: 13px; line-height: 1.6; color: var(--u-muted);
  padding: 10px 4px 0; border-top: 3px solid var(--u-line);
}
.ug-flow .ug-flow-n { width: 22px; height: 22px; font-size: 12px; background: #fff; color: var(--u-muted); border: 1.5px solid var(--u-line-strong); box-sizing: border-box; }
.ug-flow li.is-done { border-top-color: #A9D3C1; }
.ug-flow li.is-current { border-top-color: var(--u-accent); color: var(--u-ink); font-weight: 700; }
.ug-flow li.is-done .ug-flow-n, .ug-flow li.is-current .ug-flow-n { background: var(--u-accent); color: #fff; border-color: var(--u-accent); }
@media (max-width: 600px) { .ug-flow { grid-template-columns: 1fr; } }

.ug-panel .u-form { gap: 26px; }
.ug-sec { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.u-panel-body > .ug-sec + .ug-sec, .u-panel-body > .u-errors + .ug-sec { margin-top: 28px; }
.ug-sec-h, .u .ug-sec-h { font-size: 17px; font-weight: 700; }
.ug-tel { max-width: 300px; }
.ug-dates { max-width: 520px; }

/* 入口で入力した3項目 */
.ug-orghead { margin: 0; padding: 12px 16px; border: 1px solid var(--u-line); border-radius: 8px; background: var(--u-soft);
  display: grid; grid-template-columns: 8em minmax(0, 1fr); gap: 2px 12px; font-size: 14px; line-height: 1.8; }
.ug-orghead dt { font-weight: 700; color: var(--u-muted); }
.ug-orghead dd { margin: 0; word-break: break-word; }

/* 商品と数量 */
.ug-items { margin-top: 4px; }
.ug-items caption { caption-side: top; text-align: start; padding: 10px 16px; font-size: 14px; font-weight: 700; color: var(--u-accent); background: #fff; border-bottom: 1px solid var(--u-line); }
.ug-items td small { display: block; font-size: 12px; }
.ug-th-note { font-weight: 400; font-size: 12px; color: var(--u-muted); margin-left: 8px; }
.u a.ug-item-name { font-weight: 500; }
body.site input.u-input.ug-qty { width: 6em; height: 36px; padding: 0 8px; display: inline-block; text-align: right; }
.ug-option { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px 18px; align-items: center;
  padding: 12px 16px; border: 1px solid var(--u-line); border-radius: 12px; background: var(--u-soft); font-size: 14px; }
.ug-option-price { white-space: nowrap; }
@media (max-width: 600px) { .ug-option { grid-template-columns: 1fr; } }

/* 受検者名簿 */
.ug-roster-box { border: 1px solid var(--u-line); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; }
.ug-template-links { display: flex; flex-wrap: wrap; gap: 10px; }
.u a.ug-template-links a, .ug-template-links a.u-btn2 { color: var(--u-accent); }
.ug-file { font-size: 14px; font-family: inherit; }

.ug-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: center; margin-top: 8px; }
.ug-actions form { margin: 0; }
.u-panel-body > .ug-actions { margin-top: 32px; }

/* 確認画面 */
.u-errors.ug-minimum { margin-bottom: 4px; }
.ug-minimum-note { display: block; margin-top: 4px; }
.ug-minimum-note a { color: inherit; text-decoration: underline; }
.ug-roster-errors ul { margin-top: 4px; }
.ug-roster-wrap { max-height: 520px; overflow: auto; }
table.u-table.ug-roster td { padding: 8px 16px; font-size: 13.5px; }
table.u-table.ug-roster tr.is-error td { color: var(--u-danger); font-weight: 700; background: var(--u-danger-soft); }
table.u-table.ug-lines tfoot th, table.u-table.ug-lines tfoot td { padding: 12px 16px; background: var(--u-hero); border-top: 1px solid var(--u-line); font-size: 14px; }
table.u-table.ug-lines tfoot th { text-align: left; }

/* 完了画面 */
.ug-invoice { border: 1px solid var(--u-line); border-radius: 12px; padding: 6px 18px 18px; }
.ug-invoice .u-dl { border-top: 0; }
.ug-invoice-amount { font-size: 22px; }
.u-dl dd.ug-bank { white-space: normal; }
.ug-next { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ug-next li { display: flex; gap: 12px; align-items: flex-start; }
.ug-next h3 { font-size: 15px; }
.u .ug-next p { font-size: 14px; color: var(--u-muted); line-height: 1.8; }
.ug-sec .u-dl { margin: 0; }
table.u-table.ug-lines tfoot th, table.u-table.ug-lines tfoot td { border-bottom: 0; }

/* スマホでは商品の表を横にはみ出させない（見出しの注記を隠し、余白を詰める） */
@media (max-width: 600px) {
  .ug-items table.u-table th { white-space: normal; padding: 8px 10px; }
  .ug-items table.u-table td { padding: 10px; }
  .ug-th-note { display: none; }
  body.site input.u-input.ug-qty { width: 4.5em; }
}

/* ---------- 団体の成績ページ（/group/orders/:token。UI案: Report.dc.html） ---------- */
.u .ug-report-kicker { margin: 0 0 6px !important; font-size: 13px; font-weight: 700; color: var(--u-accent); }
.u-section.ug-report-sec { padding-top: 32px; }
.u-section.ug-report-sec + .ug-report-sec { padding-top: 40px; }
.ug-report-h2 { font-size: 20px; }
.ug-report-dl { margin-top: 14px; }
.ug-report-items { margin-top: 20px; }
.ug-report-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.u .ug-report-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.u .ug-report-note { margin-top: 10px; line-height: 1.7; }
.ug-report-wrap { margin-top: 12px; }
table.u-table.ug-report-table { min-width: 640px; }
table.u-table.ug-report-table th, table.u-table.ug-report-table td { padding: 9px 12px; white-space: nowrap; border-right: 1px solid var(--u-line); }
table.u-table.ug-report-table th:last-child, table.u-table.ug-report-table td:last-child { border-right: 0; }
table.u-table.ug-report-table tbody td { font-size: 13.5px; }
table.u-table.ug-report-table th.ug-report-group { text-align: center; }
table.u-table.ug-report-table thead tr + tr th { font-weight: 500; color: var(--u-sub); }
table.u-table.ug-report-table td.ug-report-id { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
table.u-table.ug-report-table tbody td.ug-report-avg { background: var(--u-soft); }
table.u-table.ug-report-table .is-muted { color: var(--u-muted); }
table.u-table.ug-report-table tfoot th, table.u-table.ug-report-table tfoot td {
  background: var(--u-hero); border-top: 2px solid var(--u-accent); font-weight: 700; padding: 10px 12px;
}
.u .ug-report-caution { margin-top: 18px; }
