/* ui-kit.css v1 — ui-kit.js の見た目の土台（色は tokens.css の変数。無ければ控えめな既定）
   サイトの見た目（色・角丸・影）は site.css で上書きしてよい */

html { scroll-padding-top: calc(var(--ui-header-h, 72px) + 12px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
html.ui-lock { overflow: hidden; }

/* 押せるものは押せる見た目・大きさに（指で 44px 以上） */
a, button, summary, [role="button"] { -webkit-tap-highlight-color: transparent; }
button, summary { cursor: pointer; }
.ui-tap { min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; }

/* 今いるセクション */
[data-ui="spy"] a[aria-current="true"] { color: var(--color-brand-strong, #0b57d0); }

/* お知らせ */
.ui-toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 1000; translate: -50% 16px;
  max-width: min(92vw, 440px); padding: 12px 18px; border-radius: 10px;
  background: var(--color-text, #111); color: var(--color-surface, #fff); font-size: 15px; line-height: 1.6;
  box-shadow: 0 8px 28px rgb(0 0 0 / .18); opacity: 0; pointer-events: none;
  transition: opacity .2s ease, translate .2s ease;
}
.ui-toast.is-show { opacity: 1; translate: -50% 0; }

/* 上へ戻る */
[data-ui="totop"] {
  position: fixed; right: 16px; bottom: 16px; z-index: 900; width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; border: 0; background: var(--color-brand, #0b57d0); color: var(--color-on-brand, #fff);
  box-shadow: 0 6px 18px rgb(0 0 0 / .18); opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s;
}
[data-ui="totop"].is-show { opacity: 1; visibility: visible; }

/* 開閉（details） */
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }

/* フォーム */
.field { display: grid; gap: 6px; }
.field__error { margin: 0; min-height: 0; color: var(--color-danger, #c62828); font-size: 14px; font-weight: 600; }
.field__error:empty { display: none; }
[aria-invalid="true"] { border-color: var(--color-danger, #c62828) !important; background: color-mix(in oklab, var(--color-danger, #c62828) 5%, transparent); }
.req { display: inline-block; margin-left: .4em; padding: 0 .45em; border-radius: 4px; background: var(--color-danger, #c62828); color: #fff; font-size: 12px; line-height: 1.6; vertical-align: middle; }
.form-done { padding: 28px; border-radius: 12px; background: var(--color-surface2, #f3f7fc); text-align: center; }
.form-done:focus { outline: none; }

/* 読み上げだけに出す */
.u-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
