:root {
  /* 紺の帯・灰緑の紙・青の操作色(デザインのキャンバス「scale」と同じ値) */
  --ink: #18203a; --ink-2: #2a3354; --ink-line: #4a5478; --on-ink: #fff; --on-ink-muted: #b9c0d4;
  --bg: #f3f5f4; --panel: #fff; --text: #18203a; --text-2: #3a4258; --muted: #5a6275; --line: #d9dee5; --line-soft: #eef0f3; --field: #c3cad5;
  --accent: #2b44c8; --accent-weak: #eef1fc; --danger: #b8361f; --ok: #1f7a4d; --warn: #8a5a00; --warn-weak: #fdf1dc;
  --display: "Zen Kaku Gothic New", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", system-ui, sans-serif;
  --figures: "Inter Tight", "Inter", "Segoe UI", system-ui, sans-serif;
  --body: "BIZ UDPGothic", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Meiryo", system-ui, sans-serif;
  font-family: var(--body); color: var(--text);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 24px; background: #17213b; color: #fff; }
/* ロゴ(マークと「LEGAL ENGINEERING / アカウント」の 2 段。brand.js の lockup) */
.brand, .lockup { display: inline-flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; white-space: nowrap; }
.brand .mark, .lockup .mark { width: 32px; height: 32px; flex: none; display: block; border-radius: 7px; }
.lockup-text { display: grid; gap: 2px; line-height: 1.15; }
.lockup-over { font-size: 9.5px; font-weight: 600; letter-spacing: .17em; text-transform: uppercase; color: #a3adc6; }
.lockup-name { font-size: 15px; font-weight: 600; letter-spacing: .06em; color: #fff; }
/* ブランドの管理ページ(#127): 上の帯のロゴ。明るい地用のロゴは白い台に載せる */
.brand .wl-mark { display: flex; align-items: center; height: 32px; max-width: 148px; flex: none; }
.brand .wl-mark.on-light { background: #fff; border-radius: 7px; padding: 4px 8px; }
.brand .wl-divider { width: 1px; height: 22px; background: rgba(255,255,255,.28); }
.brand .wl-mark img { display: block; height: 26px; width: auto; max-width: 132px; object-fit: contain; }
/* 大きさの決まっていない SVG のロゴも出るよう、高さを決めて幅は形に合わせる */
.wl-login-logo img { display: block; height: 40px; width: auto; max-width: 200px; object-fit: contain; object-position: left center; }
.wl-missing { max-width: 520px; margin: 48px auto; padding: 28px; }
.wl-missing h1 { font-size: 20px; margin: 0 0 8px; }
.wl-admin-url { border: 1px solid var(--line); border-left: 3px solid var(--accent, #1f4fd1); border-radius: 8px; padding: 12px 14px; margin: 0 0 16px; }
.wl-admin-url p { margin: 0 0 8px; line-height: 1.6; }
.brand:focus-visible { outline: 2px solid #fff; outline-offset: 4px; border-radius: 8px; }
.user-area { display: flex; gap: 12px; align-items: center; font-size: 14px; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; background: var(--accent-weak); color: var(--accent); }
.badge.admin { background: #fde68a; color: #7c4a03; }
.app { max-width: 1100px; margin: 24px auto; padding: 0 16px; }
.layout { display: grid; grid-template-columns: 240px 1fr; gap: 20px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 16px; }
.panel h2 { font-size: 16px; margin: 0 0 12px; }
.orglist button { display: block; width: 100%; text-align: left; margin-bottom: 4px; }
.orglist button.active { background: var(--accent-weak); border-color: var(--accent); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.tabs button { border: none; border-bottom: 2px solid transparent; border-radius: 0; background: none; padding: 8px 12px; }
.tabs button.active { border-bottom-color: var(--accent); color: var(--accent); font-weight: 600; }
button { font: inherit; padding: 6px 12px; border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; }
button.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
button.danger { color: var(--danger); }
button:disabled { opacity: .5; cursor: default; }
/* 処理中のボタン(#110)。押せないが薄くしすぎず、回る印で動いていることを見せる */
button.is-busy, button.is-busy:disabled { opacity: .85; color: var(--text); cursor: progress; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
button.is-busy::before { content: ""; width: 14px; height: 14px; flex: none; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: btn-spin .7s linear infinite; }
button.primary.is-busy { color: #fff; }
@keyframes btn-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { button.is-busy::before { animation-duration: 2s; } }
input, select, textarea { font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; }
form.inline, div.inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 500; }
.muted { color: var(--muted); }
.copy { font-family: ui-monospace, monospace; font-size: 12px; word-break: break-all; background: var(--bg); padding: 8px; border-radius: 6px; }
.toast { position: fixed; bottom: 20px; right: 20px; background: #111827; color: #fff; padding: 10px 16px; border-radius: 8px; max-width: 420px; }
.toast.error { background: var(--danger); }
.center { text-align: center; padding: 60px 0; }
@media (max-width: 760px) { .layout { grid-template-columns: 1fr; } }
aside form.inline input { flex: 1; min-width: 0; }
.account-page { max-width: 640px; margin: 0 auto; }
.profile { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.profile-avatar { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; flex: none; overflow: hidden; background: var(--accent-weak); color: var(--accent); font-size: 28px; font-weight: 600; }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-text { display: grid; gap: 2px; flex: 1; min-width: 160px; overflow-wrap: anywhere; }
h3 { font-size: 14px; margin: 16px 0 8px; }
.small { font-size: 12px; }
.license { border-top: 1px solid var(--line); padding: 12px 0; }
.license:first-of-type { border-top: none; padding-top: 4px; }
.license-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; margin-bottom: 6px; }
.meter { margin: 8px 0; font-size: 14px; }
.meter-head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.meter-bar { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.meter-bar span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.meter-bar.warn span { background: #d97706; }
.meter-bar.full span { background: var(--danger); }
.stats { display: flex; gap: 12px; flex-wrap: wrap; margin: 12px 0; }
.stat { display: grid; gap: 2px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; min-width: 140px; }
.stat strong { font-size: 20px; font-variant-numeric: tabular-nums; }
details summary { cursor: pointer; font-size: 13px; margin: 4px 0; }
.copy-row { display: flex; gap: 8px; align-items: stretch; margin: 4px 0 8px; }
.copy-row .copy { flex: 1; min-width: 0; }
.copy-button { white-space: nowrap; }
.copy-button.done { color: var(--ok); border-color: var(--ok); }
.invite-form { display: grid; gap: 8px; }
.seat-picks, .signup-verify { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin: 0; display: grid; gap: 6px; }
.seat-picks legend, .signup-verify legend { font-size: 13px; color: var(--muted); padding: 0 4px; }
.seat-pick { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 14px; }
.signup-verify p { margin: 0; }
.invite-result { border: 1px solid var(--line); border-radius: 8px; padding: 4px 12px; margin-bottom: 12px; background: var(--accent-weak); }
.product-link { margin-left: auto; font-size: 13px; color: var(--accent); text-decoration: none; white-space: nowrap; }
.product-link:hover { text-decoration: underline; }
/* 共通の招待リンク(管理) */
.signup-link { border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; margin-bottom: 20px; background: #fbfcfe; }
.signup-link h2 { display: flex; align-items: center; gap: 8px; }
.badge.ok { background: #e3f3e5; color: var(--ok); }
.field { display: grid; gap: 4px; font-size: 14px; }
.notice { padding: 8px 12px; border-radius: 6px; background: var(--accent-weak); font-size: 14px; }
.notice.error { background: #fdecec; color: var(--danger); }
.tag-warn { color: var(--danger); font-weight: 600; }
/* 共通の招待リンク(登録画面) */
.signup-page { max-width: 440px; margin: 32px auto; }
.signup-page .panel { padding: 28px; }
.signup-page h1 { font-size: 22px; margin: 4px 0 12px; }
.eyebrow { margin: 0; font-size: 13px; color: var(--accent); font-weight: 600; }
.signup-products { margin: 8px 0 12px; padding-left: 20px; }
.signup-products li { margin: 2px 0; }
.stack { display: grid; gap: 12px; margin-top: 16px; }
.stack label { display: grid; gap: 4px; font-size: 14px; }
.stack input { padding: 10px 12px; }
.stack p { margin: 0; }
button.wide { width: 100%; padding: 10px 12px; }
button.link { border: none; background: none; padding: 0; color: var(--accent); text-decoration: underline; }
.signup-alt { text-align: center; font-size: 14px; margin: 16px 0 0; }
/* 監査ログ */
.table-scroll { overflow-x: auto; }
table.audit td { vertical-align: top; }
.nowrap { white-space: nowrap; }
table.audit .col-action { min-width: 9em; }
table.audit td:first-child { white-space: nowrap; }
.audit-detail-row td { background: var(--bg); }
.audit-detail { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; margin: 0; font-size: 12px; }
.audit-detail dt { color: var(--muted); }
.audit-detail dd { margin: 0; overflow-wrap: anywhere; }
table.audit [data-audit-detail] { white-space: nowrap; }
table.audit .col-org { min-width: 8em; }
/* ---------------------------------------------------------------- 共通の招待リンクの登録画面(?signup=)
   左は紺の「招待状」(組織とプロダクト)、右は白い紙のフォーム。
   付与されるプロダクトはバインダーの見出し(インデックスタブ)のように、色のタブを紙の端からのぞかせる。 */
body.su-mode { background: #17213b; }
body.su-mode .topbar { display: none; }
body.su-mode .app { max-width: none; margin: 0; padding: 0; }
.su, .home, body.home-mode {
  --su-ink: #17213b; --su-ink-line: rgba(233, 236, 244, .14); --su-on-ink: #eef0f6; --su-on-ink-muted: #a3adc6;
  --su-paper: #ffffff; --su-text: #1b2236; --su-muted: #5d667a; --su-line: #d9dde6;
  --su-accent: #2f55d4; --su-accent-hover: #2546b5; --su-danger: #b3261e; --su-ok: #1f7a4d;
  --su-serif: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", "Noto Serif CJK JP", serif;
  --su-sans: "Hiragino Sans", "Noto Sans JP", "Noto Sans CJK JP", system-ui, sans-serif;
}
.su {
  font-family: var(--su-sans);
  min-height: 100vh; min-height: 100dvh;
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  grid-template-rows: auto auto 1fr;
  grid-template-areas: "top main" "welcome main" "discover main";
  background: var(--su-ink); color: var(--su-on-ink);
}
.su-top { grid-area: top; grid-column: 1 / -1; grid-row: 1; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: 28px clamp(24px, 5vw, 64px) 0; pointer-events: none; }
.su-top > * { pointer-events: auto; }

.su button.su-top-login { white-space: nowrap; border: 1px solid var(--su-line); background: var(--su-paper); color: var(--su-text); border-radius: 999px; padding: 7px 16px; font-size: 13px; }
.su button.su-top-login:hover { border-color: var(--su-accent); color: var(--su-accent); }

/* 招待の内容 */
.su-welcome { grid-area: welcome; position: relative; z-index: 1; padding: clamp(48px, 9vh, 104px) 0 40px clamp(24px, 5vw, 64px); }
.su-welcome > :not(.su-tabs) { padding-right: clamp(24px, 4vw, 56px); max-width: 34em; }
.su-from { margin: 0 0 14px; color: var(--su-on-ink-muted); font-size: 14px; }
.su-org { font-family: var(--su-serif); font-weight: 600; font-size: clamp(32px, 4.2vw, 52px); line-height: 1.25; letter-spacing: .02em; margin: 0 0 18px; overflow-wrap: anywhere; text-wrap: balance; }
.su-lead { margin: 0 0 28px; font-size: 16px; line-height: 1.8; color: var(--su-on-ink); opacity: .9; }

/* 付与されるプロダクト: 紙の端からのぞくインデックスタブ */
.su-tabs { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.su-tabs li {
  position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 12px;
  padding: 14px 24px 14px 22px; background: rgba(255, 255, 255, .06); border-left: 4px solid var(--tab);
}
.su-tabs li::after { content: ""; position: absolute; top: 10px; bottom: 10px; right: -12px; width: 12px; border-radius: 0 6px 6px 0; background: var(--tab); }
.su-tab-name { font-weight: 600; font-size: 16px; }
.su-tab-sub { grid-column: 1; font-size: 13px; color: var(--su-on-ink-muted); margin-top: 2px; }
.su-tab-warn { grid-column: 2; grid-row: 1 / span 2; font-size: 12px; font-weight: 600; color: #ffb4ab; }
.su-tab-open { grid-column: 2; grid-row: 1 / span 2; color: var(--su-on-ink); font-size: 14px; text-decoration: none; border: 1px solid var(--su-ink-line); border-radius: 999px; padding: 6px 14px; }
.su-tab-open:hover { background: rgba(255, 255, 255, .1); }

/* フォーム(白い紙) */
.su-main { grid-area: main; grid-row: 1 / -1; background: var(--su-paper); color: var(--su-text); display: grid; align-content: start; justify-items: center; padding: clamp(104px, 20vh, 200px) clamp(24px, 5vw, 72px) 56px; }
.su-main-body, .su-steps { width: 100%; max-width: 400px; }
.su-h { font-size: 24px; line-height: 1.4; margin: 0 0 8px; font-weight: 700; }
.su-text { margin: 0 0 20px; line-height: 1.8; color: var(--su-muted); overflow-wrap: anywhere; }
.su-text strong { color: var(--su-text); }
.su-form { display: grid; gap: 16px; }
.su-field { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.su-field small { font-weight: 400; color: var(--su-muted); margin-left: 4px; }
.su-form input { width: 100%; font: inherit; font-weight: 400; font-size: 16px; padding: 12px 14px; border: 1px solid var(--su-line); border-radius: 10px; background: #fff; color: var(--su-text); transition: border-color .15s, box-shadow .15s; }
.su-form input:hover { border-color: #b7bdcb; }
.su-form input:focus { outline: none; border-color: var(--su-accent); box-shadow: 0 0 0 3px rgba(47, 85, 212, .18); }
.su-form input::placeholder { color: #a0a6b4; }
.su-pw { position: relative; display: block; }
.su-pw input { padding-right: 64px; }
.su button.su-reveal { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: none; background: none; color: var(--su-accent); font-size: 13px; padding: 6px 8px; border-radius: 6px; }
.su-rules { list-style: none; margin: -8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.su-rules li { font-size: 12px; padding: 3px 10px 3px 8px; border-radius: 999px; background: #f0f2f6; color: var(--su-muted); transition: background .2s, color .2s; }
.su-rules li::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .5; margin-right: 6px; vertical-align: 2px; }
.su-rules li.ok { background: #e3f3ea; color: var(--su-ok); }
.su-rules li.ok::before { opacity: 1; }
.su-code { font-size: 26px !important; letter-spacing: .35em; text-align: center; font-variant-numeric: tabular-nums; }
.su-note { margin: -8px 0 0; font-size: 12px; color: var(--su-muted); }
.su button.su-primary { width: 100%; font: inherit; font-weight: 600; font-size: 16px; padding: 14px 16px; border: none; border-radius: 999px; background: var(--su-accent); color: #fff; margin-top: 4px; transition: background .15s, transform .1s; }
.su button.su-primary:hover:not(:disabled) { background: var(--su-accent-hover); }
.su button.su-primary:active:not(:disabled) { transform: translateY(1px); }
.su button.su-primary.busy { opacity: .7; }
.su-fine { margin: 0; font-size: 12px; line-height: 1.7; color: var(--su-muted); }
.su-fine a { color: inherit; }
.su-alt { margin: 24px 0 0; font-size: 14px; color: var(--su-muted); display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; }
.su button.su-link { border: none; background: none; padding: 0; color: var(--su-accent); font: inherit; text-decoration: underline; text-underline-offset: 3px; }
.su-alert { margin: 0; padding: 12px 14px; border-radius: 10px; background: #fdeceb; color: var(--su-danger); font-size: 14px; line-height: 1.6; }
.su :focus-visible { outline: 2px solid var(--su-accent); outline-offset: 2px; }
.su-welcome :focus-visible, .su-discover :focus-visible { outline-color: #fff; }

/* 手順 */
.su-steps { list-style: none; padding: 0; margin: 0 0 32px; display: flex; gap: 6px; counter-reset: su-step; }
.su-steps li { flex: 1; counter-increment: su-step; font-size: 12px; color: #8b93a5; padding-top: 10px; border-top: 3px solid #e4e7ee; }
.su-steps li::before { content: counter(su-step) " "; font-variant-numeric: tabular-nums; }
.su-steps li.done { border-top-color: var(--su-accent); color: var(--su-muted); }
.su-steps li.now { border-top-color: var(--su-accent); color: var(--su-text); font-weight: 600; }

/* 完了 */
.su-done svg { width: 56px; height: 56px; margin-bottom: 16px; fill: none; stroke: var(--su-ok); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.su-done circle { stroke: #cfe8da; }
.su-done path { stroke-dasharray: 36; stroke-dashoffset: 36; animation: su-check .5s .15s ease-out forwards; }
@keyframes su-check { to { stroke-dashoffset: 0; } }

.su-discover { grid-area: discover; align-self: end; padding: 0 clamp(24px, 4vw, 56px) 40px clamp(24px, 5vw, 64px); max-width: calc(34em + 120px); }
.su-discover-title { font-size: 13px; font-weight: 600; color: var(--su-on-ink-muted); margin: 0 0 4px; padding-top: 24px; border-top: 1px solid var(--su-ink-line); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* スマホ・狭い画面: 招待 → フォーム → ほかのプロダクトの順に 1 列 */
@media (max-width: 900px) {
  .su { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; grid-template-areas: "top" "welcome" "main" "discover"; }
  .su-top { grid-column: 1; padding: 20px 20px 0; gap: 12px; }
  .su button.su-top-login { background: transparent; color: var(--su-on-ink); border-color: var(--su-ink-line); }
  .su-welcome { padding: 32px 20px 28px; }
  .su-welcome > :not(.su-tabs) { padding-right: 0; }
  .su-tabs li { padding-right: 16px; }
  .su-tabs li::after { display: none; }
  .su-main { grid-row: auto; padding: 32px 20px 40px; border-radius: 24px 24px 0 0; align-content: start; }
  .su-discover { padding: 8px 20px 40px; max-width: none; }
  .su-discover-title { border-top: none; }
}
@media (prefers-reduced-motion: reduce) {
  .su-done path { animation: none; stroke-dashoffset: 0; }
  .su *, .su *::before, .su *::after { transition: none !important; }
}
.delete-impacts li { margin: 4px 0; }

/* ---------------------------------------------------------------- ホーム(アカウントのページ)
   登録画面と同じ紺の「招待状」から始まり、使えるプロダクトの紙(上端に色のインデックスタブ)が帯に重なる。 */
body.home-mode { background: #f3f4f7; }
body.home-mode .topbar { background: var(--su-ink); padding: 14px clamp(20px, 5vw, 64px); }
body.home-mode .app { max-width: none; margin: 0; padding: 0; }
.home { font-family: var(--su-sans); color: var(--su-text); padding-bottom: 72px; }
.home-inner { max-width: 1080px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 64px); }
.home-hero { background: var(--su-ink); color: var(--su-on-ink); padding: clamp(32px, 6vh, 64px) 0 112px; }
.home-hello { margin: 0 0 10px; font-size: 14px; color: var(--su-on-ink-muted); }
.home-name { margin: 0 0 12px; font-family: var(--su-serif); font-weight: 600; font-size: clamp(30px, 4vw, 46px); line-height: 1.3; letter-spacing: .02em; overflow-wrap: anywhere; }
.home-orgs { margin: 0; color: var(--su-on-ink-muted); font-size: 15px; min-height: 1.5em; }
.home-body { margin-top: -72px; }
.home-loading { color: var(--su-on-ink-muted); }
.home-h { font-size: 15px; font-weight: 600; margin: 0 0 22px; color: var(--su-muted); }
.home-h-apps { color: var(--su-on-ink); }

/* 使えるプロダクト */
.home-apps { list-style: none; margin: 0; padding: 12px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 28px 20px; }
.home-app { position: relative; display: flex; flex-direction: column; background: var(--su-paper); border-radius: 0 14px 14px 14px; padding: 24px 24px 22px; box-shadow: 0 1px 2px rgba(23, 33, 59, .08), 0 8px 24px rgba(23, 33, 59, .08); border-top: 4px solid var(--tab); }
.home-app::before { content: ""; position: absolute; left: 0; top: -16px; width: 72px; height: 14px; border-radius: 8px 8px 0 0; background: var(--tab); }
.home-app-name { margin: 0 0 4px; font-size: 20px; font-weight: 700; }
.home-app-sub { margin: 0 0 6px; color: var(--su-muted); font-size: 14px; line-height: 1.7; }
.home-app-meta { margin: 0 0 12px; color: #858c9c; font-size: 12px; }
.home-app .meter { font-size: 13px; margin: 0 0 12px; }
.home-open { margin-top: auto; align-self: stretch; text-align: center; font-weight: 600; text-decoration: none; color: #fff; background: var(--su-accent); border-radius: 999px; padding: 12px 16px; transition: background .15s; }
.home-open:hover { background: var(--su-accent-hover); }
.home-empty { background: var(--su-paper); border-radius: 14px; padding: 28px; box-shadow: 0 1px 2px rgba(23, 33, 59, .08); line-height: 1.8; }
.home-empty p { margin: 0; }

.home-discover { margin-top: 64px; }

/* アカウント設定への入口 */
.home-settings { display: flex; justify-content: space-between; align-items: center; margin-top: 48px; padding: 18px 22px; background: var(--su-paper); border: 1px solid var(--su-line); border-radius: 14px; color: var(--su-text); text-decoration: none; }
.home-settings > span { display: grid; gap: 2px; }
.home-settings > span > span { font-size: 13px; color: var(--su-muted); }
.home-settings::after { content: ""; width: 9px; height: 9px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(45deg); opacity: .5; }
.home-settings:hover { border-color: var(--su-accent); }
.home :focus-visible { outline: 2px solid var(--su-accent); outline-offset: 2px; }
.home-hero :focus-visible { outline-color: #fff; }

/* アカウント設定(ホームから分けたページ) */
.back-home { display: inline-block; margin: 0 0 12px; font-size: 14px; color: var(--accent); text-decoration: none; }
.back-home::before { content: "‹ "; }
.settings-title { font-size: 22px; margin: 0 0 16px; }

@media (max-width: 640px) {
  .home-hero { padding-bottom: 96px; }
  .home-apps { grid-template-columns: 1fr; }
}
.delete-confirm { border: 1px solid var(--danger); border-radius: 8px; padding: 12px 16px; margin: 12px 0; }
/* メンバーに再設定のメールを送る(#124)。送った後に何が起きるかを順に見せてから送る */
.notice.ok { background: #e9f5ec; color: var(--ok); }
.pw-help { border: 1px solid var(--accent); border-radius: 8px; padding: 12px 16px 16px; margin: 12px 0; }
.pw-help-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.pw-help-head h3 { margin: 4px 0 10px; font-size: 16px; overflow-wrap: anywhere; }
.pw-help-head .link { white-space: nowrap; }
.pw-steps { margin: 0 0 8px; padding-left: 1.4em; line-height: 1.7; }
.pw-steps li { margin: 2px 0; }
@media (max-width: 640px) { .pw-help .inline button { flex: 1 1 auto; } }

/* アカウント設定のパスキーの一覧 */
.passkey-list { list-style: none; padding: 0; margin: 0 0 12px; }
.passkey-list > li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.passkey-list > li.passkey-confirm { display: block; border-bottom: 0; padding: 0; }
.passkey-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.passkey-text .muted { font-size: 13px; }
td button { white-space: nowrap; }

/* ---------------------------------------------------------------- ほかのプロダクトの紹介(登録画面・ホーム共通)
   場面ごとのタブ → その場面の「手間」の一文とプロダクト。どのプロダクトも、上にプロダクトの色の小さなインデックスタブを付けた紙。
   シリーズ(LE Secure)は 1 枚の大きな紙に、中のプロダクトを並べる。 */
.su-discover { --xs-fg: var(--su-on-ink); --xs-muted: var(--su-on-ink-muted); --xs-line: var(--su-ink-line); --xs-card: rgba(255, 255, 255, .045); --xs-card-hover: rgba(255, 255, 255, .07); --xs-paper: rgba(255, 255, 255, .03); --xs-mix: #fff; --xs-tab-on-bg: var(--su-on-ink); --xs-tab-on-fg: var(--su-ink); --xs-shadow: none; }
.home-discover { --xs-fg: var(--su-text); --xs-muted: var(--su-muted); --xs-line: var(--su-line); --xs-card: var(--su-paper); --xs-card-hover: var(--su-paper); --xs-paper: var(--su-paper); --xs-mix: #1b2236; --xs-tab-on-bg: var(--su-ink); --xs-tab-on-fg: #fff; --xs-shadow: 0 1px 2px rgba(23, 33, 59, .06), 0 6px 18px rgba(23, 33, 59, .06); }
.xs { color: var(--xs-fg); }

/* 場面のタブ(横にスクロール) */
.xs-tabs { display: flex; flex-wrap: wrap; gap: 8px 6px; margin: 4px -4px 18px; padding: 4px; }
@media (max-width: 640px) { .xs-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -20px; padding-right: 20px; } }
.xs-tabs::-webkit-scrollbar { display: none; }
.xs button[role="tab"] { flex: none; display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: 13px; font-weight: 600; padding: 7px 12px 7px 14px; border-radius: 999px; border: 1px solid var(--xs-line); background: transparent; color: var(--xs-muted); cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.xs button[role="tab"]:hover { color: var(--xs-fg); border-color: color-mix(in srgb, var(--xs-fg) 35%, transparent); }
.xs button[role="tab"][aria-selected="true"] { background: var(--xs-tab-on-bg); color: var(--xs-tab-on-fg); border-color: var(--xs-tab-on-bg); }
.xs-count { min-width: 20px; padding: 1px 6px; border-radius: 999px; font-size: 11px; font-variant-numeric: tabular-nums; text-align: center; background: color-mix(in srgb, currentColor 14%, transparent); }
.xs-panel:focus-visible { outline-offset: 6px; border-radius: 8px; }
.xs-panel-lead { margin: 0 0 18px; font-family: var(--su-serif); font-size: 16px; line-height: 1.75; color: var(--xs-muted); }
@media (prefers-reduced-motion: no-preference) {
  .xs-panel:not([hidden]) { animation: xs-in .28s ease-out; }
  @keyframes xs-in { from { opacity: 0; transform: translateY(4px); } }
}

/* プロダクトのカード */
.xs-cards { list-style: none; margin: 0; padding: 14px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 26px 14px; }
.home-discover .xs-cards { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 30px 16px; }
.xs-card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 18px 18px 16px; background: var(--xs-card); border: 1px solid var(--xs-line); border-top: 3px solid var(--tab); border-radius: 0 12px 12px 12px; box-shadow: var(--xs-shadow); transition: background .15s, transform .15s; }
.xs-card::before { content: ""; position: absolute; left: -1px; top: -12px; width: 44px; height: 10px; border-radius: 6px 6px 0 0; background: var(--tab); }
.xs-card:hover { background: var(--xs-card-hover); }
.xs-card-head, .xs-mod-head { display: flex; align-items: center; gap: 10px; }
.xs-icon { flex: none; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: color-mix(in srgb, var(--tab) 16%, transparent); color: color-mix(in srgb, var(--tab) 62%, var(--xs-mix)); }
.xs-icon svg { width: 20px; height: 20px; }
.xs-card-name { font-weight: 700; font-size: 15px; line-height: 1.35; }
.xs-pain { margin: 0; font-family: var(--su-serif); font-size: 15px; line-height: 1.75; flex: 1; }
.home-discover .xs-pain { font-size: 16px; }
.xs-sum { margin: 0; font-size: 12.5px; line-height: 1.6; color: var(--xs-muted); padding-top: 10px; border-top: 1px dashed var(--xs-line); }
.xs-detail { display: block; margin-top: 2px; opacity: .85; }
.xs-cta { align-self: flex-start; white-space: nowrap; font-size: 13px; font-weight: 600; color: var(--xs-fg); text-decoration: none; border: 1px solid var(--xs-line); border-radius: 999px; padding: 6px 14px; transition: border-color .15s, background .15s; }
.xs-cta:hover { border-color: color-mix(in srgb, var(--tab) 70%, var(--xs-mix)); background: color-mix(in srgb, var(--tab) 12%, transparent); }
.xs-cta-small { padding: 5px 12px; font-size: 12px; }
/* 開くページがまだないプロダクト。押せる「詳しく見る」と見分けるよう、枠を点線にして色を落とす */
.xs-soon { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 12.5px; font-weight: 600; color: var(--xs-muted); border: 1px dashed var(--xs-line); border-radius: 999px; padding: 5px 12px; cursor: default; }
.xs-soon::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: color-mix(in srgb, var(--tab) 55%, var(--xs-mix)); }
.xs-soon-small { padding: 4px 10px; font-size: 11.5px; }

/* シリーズ */
.xs-series { position: relative; margin: 14px 0 4px; padding: 24px 22px 22px; border: 1px solid var(--xs-line); border-top: 3px solid var(--tab); border-radius: 0 18px 18px 18px; background: var(--xs-paper); box-shadow: var(--xs-shadow); }
.xs-series::before { content: ""; position: absolute; left: -1px; top: -15px; width: 96px; height: 13px; border-radius: 8px 8px 0 0; background: var(--tab); }
.xs-series-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 20px; }
.xs-series-mark { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--tab); color: #fff; }
.xs-series-mark svg { width: 26px; height: 26px; }
.xs-series-text p { margin: 0; }
.xs-series-name { font-size: 20px; font-weight: 700; letter-spacing: .02em; }
.xs-series-lead { font-family: var(--su-serif); font-size: 15px; line-height: 1.7; color: var(--xs-muted); margin-top: 2px !important; }
.xs-mods { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.xs-mod { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 12px; background: color-mix(in srgb, var(--tab) 5%, transparent); border: 1px solid transparent; transition: border-color .15s; }
.xs-mod:hover { border-color: color-mix(in srgb, var(--tab) 45%, transparent); }
.xs-mod-name { display: grid; font-weight: 700; font-size: 15px; line-height: 1.35; }
.xs-mod-family { font-size: 11px; font-weight: 600; color: var(--xs-muted); letter-spacing: .04em; }
.xs-mod-pain { margin: 0; font-family: var(--su-serif); font-size: 14.5px; line-height: 1.75; flex: 1; }
.xs-mod-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; padding-top: 10px; border-top: 1px dashed var(--xs-line); }
.xs-mod-foot .xs-sum { flex: 1 1 140px; padding-top: 0; border-top: none; font-size: 12px; }
@media (max-width: 1100px) and (min-width: 901px) { .su-discover .xs-mods { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .xs-mods { grid-template-columns: minmax(0, 1fr); } .xs-series { padding: 22px 16px 16px; } }

/* シリーズに含まれるもの(使えるプロダクトの一覧に添える) */
.xs-chips { list-style: none; margin: 4px 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.xs-chips li { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 3px 9px 3px 7px; border-radius: 999px; background: color-mix(in srgb, var(--tab) 12%, transparent); color: inherit; }
.xs-chips svg { width: 14px; height: 14px; color: var(--tab); }
.su-tabs .xs-chips { grid-column: 1; margin-bottom: 0; }
.su-tabs .xs-chips li { background: rgba(255, 255, 255, .08); }
.su-tabs .xs-chips svg { color: color-mix(in srgb, var(--tab) 55%, #fff); }

/* ---------------------------------------------------------------- メンバーの利用状況 */
.member-usage td, .member-usage th { vertical-align: top; min-width: 150px; }
.member-usage td:first-child, .member-usage th:first-child { min-width: 200px; }
.usage-cell .usage-top { display: flex; align-items: flex-end; gap: 8px; }
.usage-cell strong { font-size: 18px; font-variant-numeric: tabular-nums; line-height: 1; }
.spark { display: inline-flex; align-items: flex-end; gap: 2px; height: 20px; padding-bottom: 1px; border-bottom: 1px solid var(--line); }
.spark span { width: 6px; background: var(--accent); border-radius: 2px 2px 0 0; }
.mu-trend { margin: 4px 0 16px; }
.mu-trend summary { cursor: pointer; color: var(--muted); margin-bottom: 8px; }
.trend th.num, .trend td.num { text-align: right; min-width: 72px; font-variant-numeric: tabular-nums; }
.trend-bar { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; margin-bottom: 4px; }
.trend-bar span { display: block; height: 100%; background: var(--accent); }
.stat strong .small { font-weight: 400; }
/* 横に広い表は .table-scroll の中だけで横スクロールさせる(グリッドの子が表の幅まで広がらないように) */
.layout > * { min-width: 0; }
.usage-cell .tag-warn { white-space: nowrap; }
@media (max-width: 760px) {
  .member-usage td, .member-usage th { min-width: 130px; }
  .member-usage td:first-child, .member-usage th:first-child { min-width: 160px; overflow-wrap: anywhere; }
}

/* ---------------------------------------------------------------- ホワイトラベル(LE Admin、#72)
   左に作ったホワイトラベル、右に 1 つを仕上げる 4 段(見た目・ログイン・製品・使い始める)。
   上の帯が進み具合(済み = 塗り、次 = 輪、まだ = 薄い)。 */
.wl { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: start; }
.wl-list { display: grid; gap: 4px; position: sticky; top: 16px; }
.wl-item { display: flex; align-items: center; gap: 10px; text-align: left; border: 1px solid transparent; background: none; padding: 8px 10px; border-radius: 8px; }
.wl-item:hover { background: var(--bg); }
.wl-item.is-on { background: var(--accent-weak); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.wl-item-text { display: grid; min-width: 0; }
.wl-item-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-item-sub { font-size: 12px; color: var(--muted); }
.wl-item-new { color: var(--accent); border-style: dashed; border-color: var(--line); margin-top: 6px; }
.wl-plus { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 7px; background: var(--accent-weak); font-weight: 600; }
.wl-tile { width: var(--s); height: var(--s); flex: none; display: inline-grid; place-items: center; border-radius: calc(var(--s) * .22); background: #fff; border: 1px solid var(--line); overflow: hidden; }
.wl-tile img { max-width: 78%; max-height: 78%; object-fit: contain; }
.wl-tile-letter { background: var(--c); border-color: transparent; color: #fff; font-weight: 700; font-size: calc(var(--s) * .44); }
.wl-head { display: flex; gap: 14px; align-items: center; padding-bottom: 14px; border-bottom: 3px solid var(--c); }
.wl-head h3 { margin: 0 0 2px; font-size: 20px; }
.wl-head p { margin: 0; font-size: 13px; }
.wl-chip { display: inline-block; white-space: nowrap; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; margin-right: 4px; }
.wl-chip-draft { background: #fff4d6; color: #7a5200; }
.wl-chip-active { background: #e3f4ea; color: var(--ok); }
.wl-chip-retired { background: #eceef2; color: var(--muted); }
.wl-rail { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); margin: 18px 0 8px; padding: 0; counter-reset: wl; }
.wl-rail li { position: relative; }
.wl-rail li + li::before { content: ""; position: absolute; top: 13px; left: calc(-50% + 16px); right: calc(50% + 16px); height: 2px; background: var(--line); }
.wl-rail li.wl-rail-done + li::before { background: var(--accent); }
.wl-rail a { display: grid; justify-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-size: 13px; }
.wl-rail-num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: var(--panel); border: 2px solid var(--line); position: relative; z-index: 1; }
.wl-rail-done a { color: var(--text); }
.wl-rail-done .wl-rail-num { background: var(--accent); border-color: var(--accent); color: #fff; }
.wl-rail-current a { color: var(--accent); font-weight: 600; }
.wl-rail-current .wl-rail-num { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 4px var(--accent-weak); }
.wl-step { padding: 18px 0; border-top: 1px solid var(--line); scroll-margin-top: 16px; }
.wl-step:first-of-type { border-top: none; }
.wl-step h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 15px; }
.wl-step > p { margin: 0 0 10px; font-size: 14px; }
.wl-n { width: 22px; height: 22px; border-radius: 6px; display: inline-grid; place-items: center; background: var(--text); color: #fff; font-size: 12px; }
.wl-form { display: grid; gap: 12px; }
.wl-inline { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.wl-field { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.wl-field > span:first-child { font-weight: 600; color: var(--text); }
.wl-field small { font-weight: 400; }
.wl-grow { flex: 1 1 240px; }
.wl-grow input { width: 100%; }
.wl-row { display: flex; gap: 12px; flex-wrap: wrap; }
.wl-actions { display: flex; justify-content: flex-end; }
.wl-look { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 18px; }
.wl-look-fields { display: grid; gap: 12px; }
.wl-previews { display: grid; gap: 8px; align-content: start; }
.wl-preview { height: 88px; border-radius: 10px; display: grid; place-items: center; border: 1px solid var(--line); font-size: 12px; }
.wl-preview img { max-width: 70%; max-height: 56px; object-fit: contain; }
.wl-preview-light { background: #fff; }
.wl-preview-dark { background: #1d2330; border-color: #1d2330; }
.wl-preview-dark .muted { color: #a3adc6; }
.wl-color { display: inline-flex; gap: 6px; align-items: center; }
.wl-color input[type="color"] { width: 40px; height: 34px; padding: 2px; }
.wl-next { margin: 12px 0 8px; padding: 10px 12px; border-left: 3px solid var(--accent); background: var(--accent-weak); border-radius: 0 6px 6px 0; font-size: 14px; }
.wl-cert { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; display: grid; gap: 4px; }
.wl-cert .wl-chip { margin-left: 8px; }
.wl-cert p { margin: 0; }
.wl-dns-rec p { margin: 0; }
.wl-dns { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: dns; }
.wl-dns-rec { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.wl-dns-rec.is-done { background: #f7fbf8; }
.wl-dns-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 14px; }
.wl-dns-head .wl-chip { margin-left: auto; }
.wl-dns dl { display: grid; grid-template-columns: 3em minmax(0, 1fr); gap: 4px 8px; margin: 0; align-items: center; font-size: 13px; }
.wl-dns dt { color: var(--muted); }
.wl-dns dd { margin: 0; }
.wl-dns .copy-row { margin: 0; }
.wl-file { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; }
.wl-file-btn { padding: 6px 12px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font-weight: 600; white-space: nowrap; }
.wl-file:hover .wl-file-btn { border-color: var(--accent); color: var(--accent); }
.wl-file:focus-within .wl-file-btn { outline: 2px solid var(--accent); outline-offset: 2px; }
.wl-file-name { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 16em; }
.wl-add { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.wl-add input, .wl-add select { width: 100%; }
.wl-add button, .wl-inline button, .wl-org-head button { white-space: nowrap; }
.wl-products { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.wl-product { border: 1px solid var(--line); border-radius: 8px; padding: 12px; display: grid; gap: 8px; }
.wl-product p { margin: 0; }
.wl-orgs { display: grid; gap: 12px; margin-top: 12px; }
.wl-org { border: 1px solid var(--line); border-radius: 8px; padding: 12px; display: grid; gap: 10px; }
.wl-org-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.wl-org-head button { margin-left: auto; }
.wl-hero h3 { margin: 0 0 6px; font-size: 18px; }
.wl-hero p { margin: 0 0 16px; max-width: 46em; font-size: 14px; line-height: 1.7; }
.su-logo-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; color: var(--su-on-ink); }
.su-logo-brand img { max-width: 120px; object-fit: contain; background: #fff; border-radius: 6px; padding: 3px; }
@media (max-width: 760px) {
  .wl { grid-template-columns: 1fr; }
  .wl-list { position: static; grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; }
  .wl-look { grid-template-columns: 1fr; }
  .wl-previews { grid-template-columns: 1fr 1fr; }
  .wl-rail a { font-size: 12px; }
  .wl-add { grid-template-columns: 1fr; }
}

/* ホワイトラベルの登録の後: 製品を開くボタン(リンク)。ボタンと同じ見た目(#98) */
.su a.su-primary, .su a.su-secondary { display: block; box-sizing: border-box; width: 100%; text-align: center; text-decoration: none; font-weight: 600; font-size: 16px; padding: 14px 16px; border-radius: 999px; margin-top: 4px; transition: background .15s, transform .1s; }
.su a.su-primary { background: var(--su-accent); color: #fff; }
.su a.su-primary:hover { filter: brightness(.92); }
.su a.su-secondary { margin-top: 10px; border: 1px solid var(--su-accent); color: var(--su-accent); background: transparent; }
.su a.su-primary:active, .su a.su-secondary:active { transform: translateY(1px); }
.su a.su-primary:focus-visible, .su a.su-secondary:focus-visible { outline: 3px solid var(--su-accent); outline-offset: 3px; }

/* 左の「ホワイトラベル」: ブランドごとに組織を並べる(#96) */
.wl-orglist-brand + .wl-orglist-brand { margin-top: 12px; }
.wl-orglist-brand h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--muted, #6b7280); }
.wl-orglist-brand h3 img { height: 18px; width: auto; max-width: 56px; object-fit: contain; }
.wl-org-actions { margin-left: auto; display: inline-flex; gap: 8px; flex-wrap: wrap; }
.badge.warn { background: #fde68a; color: #7c4a03; }
.wl-org-actions button { margin-left: 0; }

/* 読み込み中の形(app.js の skeleton)。色は文字の色から作るので、暗い背景(ホーム)でもそのまま使える */
.skeleton { display: grid; gap: 12px; padding: 4px 0; color: inherit; }
.skeleton span { display: block; height: 14px; border-radius: 4px; background: currentColor; opacity: .08; animation: skeleton-pulse 1.4s ease-in-out infinite; }
.skeleton span:first-child { height: 18px; }
@keyframes skeleton-pulse { 50% { opacity: .16; } }
@media (prefers-reduced-motion: reduce) { .skeleton span { animation: none; } }

/* ---------------------------------------------------------------- 長い ID(#119)
   1 行で出し、入りきらないときは末尾を「…」で省略する。全体はコピーのボタンで写す */
.id-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-width: 0; vertical-align: middle; }
.id-chip code { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, monospace; font-size: 12px; background: var(--bg); padding: 5px 8px; border-radius: 6px; }
.id-chip .copy-button { flex: none; padding: 4px 10px; font-size: 13px; }
form.client-urls { display: grid; gap: 8px; justify-items: start; }
@media (min-width: 641px) { form.client-urls { min-width: 16em; } }
form.client-urls .field { width: 100%; }
form.client-urls textarea { width: 100%; min-width: 0; resize: vertical; field-sizing: content; min-height: 3.2em; }
input, select, textarea { max-width: 100%; }

/* ---------------------------------------------------------------- LE Admin の追加・削除(#126) */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.la { display: grid; gap: 28px; max-width: 760px; }
.la h3 { margin: 0 0 10px; font-size: 15px; display: flex; align-items: baseline; gap: 8px; }
.la-count { font-size: 13px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.la-add { border: 1px solid var(--line); border-left: 3px solid #d4a514; border-radius: 8px; padding: 14px 16px; background: #fffdf5; }
.la-add > p { margin: 0 0 12px; }
.la-form { display: flex; gap: 8px; flex-wrap: wrap; }
.la-form input { flex: 1 1 260px; min-width: 0; padding: 8px 10px; }
.la-add .notice { margin: 0 0 12px; }
.la-add .notice.error { margin: 10px 0 0; }
.la-check p { margin: 0 0 6px; overflow-wrap: anywhere; }
.la-check ul, .la-confirm ul { margin: 0 0 12px; padding-left: 20px; font-size: 14px; color: var(--muted); display: grid; gap: 2px; }
.la-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.la-person { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.la-avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #17213b; color: #fde68a; font-weight: 600; font-size: 15px; }
.la-who { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.la-name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.la-who strong { font-weight: 600; font-size: 14px; }
.la-meta { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.la-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--ok); }
.la-dot.warn { background: #d97706; }
.la-act { justify-self: end; text-align: right; }
.la-confirm { grid-column: 2 / -1; margin-top: 8px; padding: 12px 14px; border-radius: 8px; background: #fdf3f3; border: 1px solid #f3cfcf; }
.la-confirm p { margin: 0 0 6px; overflow-wrap: anywhere; }
.la-history { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.la-history li { display: grid; grid-template-columns: 6.5em minmax(0, 1fr); gap: 8px; overflow-wrap: anywhere; }
.la-history time { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.la-history + p { margin: 8px 0 0; }
@media (max-width: 640px) {
  .la-add { padding: 12px; }
  .la-form button { flex: 1 1 100%; }
  .la-person { grid-template-columns: 36px minmax(0, 1fr); }
  .la-act { grid-column: 2; justify-self: start; text-align: left; }
  .la-confirm { grid-column: 1 / -1; }
  .la-confirm .inline button { flex: 1 1 auto; }
  .la-history li { grid-template-columns: 1fr; gap: 0; }
}

/* ---------------------------------------------------------------- スマートフォンの幅(#119)
   表は 1 行 = 1 枚のカードにし、項目名(app.js の labelTables が th から写す data-label)を左に、値を右に並べる。
   月ごとの推移(.trend)は月が横に並ぶ形に意味があるので、カードにせず表の中だけで横にスクロールする */
@media (max-width: 640px) {
  .topbar { padding: 10px 16px; }
  .app { margin: 12px auto 32px; }
  .layout { gap: 12px; }
  .panel { padding: 14px; margin-bottom: 12px; }

  /* 組織の切り替えは横に並べてスクロール。作成のフォームは中身の後ろへ */
  .layout > aside { display: contents; }
  .layout > #main { order: 1; }
  .layout > aside > .create-org { order: 2; }
  .layout > aside > .orglist { margin-bottom: 0; }
  .orglist h2 { margin-bottom: 8px; }
  .orglist-items { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 0 14px 2px; scroll-padding: 0 14px; }
  .orglist-items::-webkit-scrollbar { display: none; }
  .orglist-items button { flex: none; width: auto; max-width: 78%; margin: 0; text-align: left; line-height: 1.45; padding: 8px 12px; }
  .wl-orglist .orglist-items, .wl-orglist-brand { display: grid; }

  /* タブは 1 行で横にスクロール(端を薄くして続きがあると分かるように) */
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -14px; margin-right: -14px; padding: 0 14px; -webkit-mask-image: linear-gradient(to right, transparent 0, #000 14px, #000 calc(100% - 28px), transparent 100%); mask-image: linear-gradient(to right, transparent 0, #000 14px, #000 calc(100% - 28px), transparent 100%); }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs button { flex: none; white-space: nowrap; padding: 10px 12px; }

  /* 入力欄は画面の幅に収める */
  form.inline > input:not([type="checkbox"]):not([type="radio"]), form.inline > textarea, div.inline > input:not([type="checkbox"]):not([type="radio"]),
  .invite-form .inline > input, .field input, .field textarea { flex: 1 1 100%; width: 100%; min-width: 0; }
  form.inline > label:has(> input[type="month"]), form.inline > label:has(> select) { display: inline-flex; align-items: center; gap: 6px; }
  input, select, textarea, button { min-height: 40px; }
  input[type="checkbox"], input[type="radio"] { min-height: 0; }
  button.link { min-height: 0; }
  .copy-row { flex-wrap: wrap; }
  .copy-row .copy { flex: 1 1 100%; }

  /* 表をカードに */
  table:not(.trend), table:not(.trend) > tbody, table:not(.trend) > tbody > tr, table:not(.trend) > tbody > tr > td { display: block; }
  table:not(.trend) > thead { display: none; }
  table:not(.trend) { font-size: 14px; }
  table:not(.trend) > tbody > tr { border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px; margin-bottom: 10px; background: var(--panel); }
  table:not(.trend) > tbody > tr[hidden] { display: none; }
  table:not(.trend) > tbody > tr > td { border: none; padding: 6px 0; min-width: 0 !important; overflow-wrap: anywhere; }
  table:not(.trend) > tbody > tr > td + td { border-top: 1px dashed var(--line); }
  /* 項目名は左の列に置く(中身が文・改行・部品のどれでも崩れないよう、grid にせず左の余白に置く) */
  table:not(.trend) > tbody > tr > td[data-label] { position: relative; padding-left: calc(30% + 12px); min-height: 32px; }
  table:not(.trend) > tbody > tr > td[data-label]::before { content: attr(data-label); position: absolute; left: 0; top: 8px; width: 30%; color: var(--muted); font-size: 12px; font-weight: 500; line-height: 1.4; }
  table:not(.trend) > tbody > tr > td:empty { display: none; }
  /* 入力のフォームが入るセルは、項目名を上に置いて幅を広く使う */
  table:not(.trend) > tbody > tr > td[data-label]:has(form, textarea, .copy-row, .id-chip) { padding-left: 0; }
  table:not(.trend) > tbody > tr > td[data-label]:has(form, textarea, .copy-row, .id-chip)::before { position: static; display: block; width: auto; margin-bottom: 6px; }
  /* 1 列目はカードの見出し */
  table:not(.trend) > tbody > tr > td:first-child { font-weight: 600; }
  table:not(.trend) > tbody > tr > td:first-child[data-label] { padding-left: 0; }
  table:not(.trend) > tbody > tr > td:first-child[data-label]::before { display: none; }
  table:not(.trend) > tbody > tr > td:first-child .muted, table:not(.trend) > tbody > tr > td:first-child .small { font-weight: 400; }
  /* 何も書かれていない行(「まだありません」など)はふつうの文に */
  table:not(.trend) > tbody > tr:has(> td[colspan]:only-child) { border-style: dashed; }
  table:not(.trend) > tbody > tr > td[colspan]:only-child { font-weight: 400; }
  /* 操作のボタンは左に寄せて並べる */
  table:not(.trend) td:has(> button) { display: flex !important; flex-wrap: wrap; gap: 8px; padding-left: 0 !important; }
  table:not(.trend) td:has(> button)::before { display: none; }
  table:not(.trend) td:has(> button) > button { min-height: 36px; }
  table:not(.trend) td form.inline { display: flex; }
  table:not(.trend) td form.inline > * { flex: 1 1 100%; }
  table:not(.trend) td form.inline > button { flex: 0 0 auto; }
  /* 表の中の横スクロールは要らない */
  .table-scroll:has(> table:not(.trend)) { overflow: visible; }
  table.audit td:first-child { white-space: normal; font-weight: 500; color: var(--muted); font-size: 12px; }
  .audit-detail-row td { background: none; }
  .member-usage .usage-cell { align-items: start; }

  .stat { flex: 1 1 100%; }
  .trend th:first-child, .trend td:first-child { min-width: 7.5em; }
  .toast { left: 16px; right: 16px; bottom: 16px; max-width: none; }
}

/* ---------------------------------------------------------------- 管理ページの形(#141)
   上の帯は「LE 全体 → ブランド → 組織」の入れ子。いちばん上(紺)の中にその段のタブ、下の段(白)は左の折れ線で上の段に含まれることを見せる。
   一覧は画面の幅いっぱいに広げ、文字でしぼる・見出しで並べ替え・100 件ずつ送る。 */
body:not(.su-mode):not(.home-mode) .app { max-width: none; margin: 0; padding: 0; }
.topbar { justify-content: flex-start; flex-wrap: wrap; gap: 6px 20px; min-height: 56px; padding: 0 24px; background: var(--ink); }
.topbar .brand { padding: 10px 0; }
.user-area { margin-left: auto; }
.scope { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; align-self: stretch; min-width: 0; }
.scope:empty { display: none; }
.lvtag { font: 700 11px/1 var(--display); letter-spacing: .06em; padding: 4px 7px; border-radius: 4px; white-space: nowrap; background: var(--line-soft); color: var(--text-2); }
.scope .lvtag { background: #2f3a5e; color: var(--on-ink-muted); }
.scope-name { font: 900 17px/1.2 var(--display); color: var(--on-ink); }
.lvrole { font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.lvrole.warn { color: var(--warn); background: var(--warn-weak); padding: 3px 8px; border-radius: 6px; }
.scope .lvrole { color: var(--on-ink-muted); }
.scope .lvrole.warn { color: #3d2a00; background: #f3c46b; }
.switch select { min-height: 32px; padding: 4px 28px 4px 10px; font-size: 13px; font-weight: 700; border: 1px solid var(--ink-line); border-radius: 8px; background-color: var(--ink-2); color: var(--on-ink); max-width: 16em; }
.t1, .t2 { display: flex; gap: 2px; }
.t1 { align-self: stretch; }
.t1 a, .t2 a { display: flex; align-items: center; gap: 6px; text-decoration: none; white-space: nowrap; border-bottom: 3px solid transparent; font-size: 14px; }
.t1 a { padding: 0 12px; color: var(--on-ink-muted); }
.t1 a:hover { color: var(--on-ink); }
.t1 a[aria-current] { color: var(--on-ink); font-weight: 700; border-bottom-color: #8fb4ff; }
.t1 a .n { color: #8a93ad; }
.t1 a:focus-visible, .t2 a:focus-visible { outline: 2px solid currentColor; outline-offset: -4px; border-radius: 4px; }
.n { font: 600 12px var(--figures); color: #8a91a2; }
.num { font-family: var(--figures); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.bands { background: var(--panel); }
.band { display: flex; background: var(--panel); border-bottom: 1.5px solid var(--line); }
.band-rail { width: 44px; flex: none; position: relative; }
.band-rail::before { content: ""; position: absolute; left: 26px; top: 0; height: 26px; width: 12px; border-left: 2px solid var(--field); border-bottom: 2px solid var(--field); border-bottom-left-radius: 8px; }
.band-deep { background: #f8f9fa; }
.band-deep .band-rail { width: 88px; }
.band-deep .band-rail::before { left: 70px; }
.band-in { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 24px 0 4px; }
.band-name { display: inline-flex; align-items: center; font: 900 20px/1.25 var(--display); }
.band-deep .band-name { font-size: 18px; }
.band-link { color: inherit; text-decoration: none; }
.band-link:hover { color: var(--accent); }
.band-note { font-size: 13px; color: var(--muted); }
.t2 { flex-wrap: wrap; flex-basis: 100%; }
.t2 a { padding: 10px 14px; color: var(--text-2); }
.t2 a:hover { color: var(--text); background: #f5f7ff; }
.t2 a[aria-current] { color: var(--text); font-weight: 700; border-bottom-color: var(--ink); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; margin-right: 7px; vertical-align: 1px; }
.band-name .dot { width: 14px; height: 14px; border-radius: 4px; margin-right: 10px; }

/* 中身 */
.page { padding: 18px 24px 40px; min-width: 0; }
.page-loading { padding: 8px 0; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0 0 12px; }
.page-head h1 { margin: 0; font: 900 21px/1.25 var(--display); }
.page-head h1 .num { font-weight: 600; color: var(--muted); font-size: 18px; margin-left: 2px; }
.page-note:has(.plan-chips) { max-width: none; }
.page-note { font-size: 13px; color: var(--muted); max-width: 62ch; line-height: 1.6; }
.page-actions { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.back { display: inline-block; margin: 0 0 10px; font-size: 14px; color: var(--accent); }
.back::before { content: "‹ "; }
.page > .panel, .page .panel { border: 1.5px solid var(--line); border-radius: 10px; padding: 16px 18px; }
.card { background: var(--panel); border: 1.5px solid var(--line); border-radius: 10px; padding: 16px 18px; margin: 0 0 12px; min-width: 0; }
.card.narrow { max-width: 640px; }
.card h2, .panel h2 { font: 900 16px/1.35 var(--display); margin: 0 0 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.card h2 small { font: 400 12px/1.4 var(--body); color: var(--muted); }
.card h3 { font: 700 14px/1.4 var(--body); margin: 16px 0 8px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); gap: 12px; align-items: start; }
.cards > .card { margin: 0; }
.two-col, .person-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.two-col > .card, .person-grid > .card { margin: 0; }
.row { display: flex; gap: 12px; justify-content: space-between; align-items: center; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.card h2 + .row { border-top: 0; padding-top: 0; }
.row p { margin: 3px 0 0; line-height: 1.55; }
.row > div { min-width: 0; }

/* ボタン・入力 */
button, .btn { font: 700 14px/1 var(--body); border-radius: 8px; padding: 10px 14px; min-height: 40px; border: 1.5px solid var(--field); background: var(--panel); color: var(--text); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; }
.btn { white-space: nowrap; }
button:hover, .btn:hover { border-color: var(--text-2); }
button:focus-visible, .btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .nm:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button.primary, .btn.ink { background: var(--ink); border-color: var(--ink); color: #fff; }
button.primary:hover, .btn.ink:hover { background: #26305a; }
button.danger, .btn.danger { color: var(--danger); border-color: #e7b4aa; }
.btn.sm { padding: 6px 10px; min-height: 32px; font-size: 13px; }
.topbar button, .copy-button, button.link { font-weight: 600; }
.copy-button { padding: 6px 12px; min-height: 34px; font-size: 13px; }
button.link { border: none; background: none; padding: 0; min-height: 0; color: var(--accent); text-decoration: underline; display: inline; }
input, select, textarea { font: 15px/1.4 var(--body); padding: 8px 10px; min-height: 40px; border: 1.5px solid var(--field); border-radius: 8px; background: var(--panel); color: var(--text); }
input[type="checkbox"], input[type="radio"] { min-height: 0; accent-color: var(--ink); width: 18px; height: 18px; }
.form-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 0 0 6px; }
.field { display: grid; gap: 5px; font-size: 14px; }
.field > span:first-child { font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.field.grow { flex: 1 1 240px; }
.field[hidden] { display: none; }
.stack-form { display: grid; gap: 14px; }
.inline-create { display: flex; gap: 8px; }
.inline-create input { width: 16em; }

/* 一覧 */
.list-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 10px; }
.list-search { flex: 1 1 300px; max-width: 460px; display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1.5px solid var(--field); border-radius: 8px; padding: 0 12px; color: var(--muted); }
.list-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak); }
.list-search input { flex: 1; border: 0; outline: 0; padding: 9px 0; min-height: 38px; background: transparent; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border-radius: 999px; padding: 7px 12px; min-height: 36px; font-size: 13px; border: 1.5px solid var(--line); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip[aria-pressed="true"] .num { color: #c9cfe0; }
.list { background: var(--panel); border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; }
.list-scroll { overflow: auto; max-height: max(420px, calc(100vh - 190px)); min-height: 160px; }
.list-table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 14px; }
.list-table th { position: sticky; top: 0; z-index: 1; background: #f8f9fa; border-bottom: 1.5px solid var(--line); padding: 0; white-space: nowrap; color: var(--text-2); font-weight: 700; font-size: 13px; }
.list-table th:not(:has(button)) { padding: 11px 14px; }
.list-table th button { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 6px; width: 100%; padding: 11px 14px; cursor: pointer; }
.list-table th.r button { justify-content: flex-end; }
.list-table th button:hover { color: var(--text); background: var(--line-soft); }
.list-table th button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.sort-mark { font-size: 9px; color: #b4bac6; letter-spacing: -1px; }
.sort-mark.on { color: var(--text); }
.list-table td { padding: 8px 14px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; vertical-align: middle; }
.list-table tbody tr:hover td { background: #f5f7ff; }
.r { text-align: right; }
td.r .actions, .actions { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.list-empty { padding: 44px 24px; text-align: center; line-height: 1.8; color: var(--text-2); }
.list-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 10px 16px; border-top: 1.5px solid var(--line); background: #f8f9fa; font-size: 14px; }
.pager { margin-left: auto; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.pg { min-width: 34px; }
.pg[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.nm { color: var(--text); font-weight: 700; text-decoration: underline; text-decoration-color: var(--field); text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.nm:hover { color: var(--accent); text-decoration-color: var(--accent); }
.subtle { color: var(--text-2); }
.st { font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 6px; display: inline-block; background: var(--line-soft); color: var(--text-2); white-space: nowrap; }
.st-ok { background: #e3f3ea; color: var(--ok); }
.st-warn { background: var(--warn-weak); color: var(--warn); }
.st-info { background: var(--accent-weak); color: var(--accent); }
.st-off { background: #f0f1f3; color: #6b7280; }
table.compact { font-size: 14px; }
table.compact th { font-size: 12.5px; font-weight: 700; color: var(--text-2); background: #f8f9fa; }
table.compact td.actions { display: table-cell; }
table.compact td.actions button + button { margin-left: 6px; }

/* メンバーの上の契約の札 */
.plan-chips { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.plan-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; font-size: 13px; color: var(--text-2); }
.plan-chip .dot { margin: 0; }
.plan-chip.warn { background: var(--warn-weak); border-color: transparent; color: var(--warn); }
.plan-name { font: 700 13px var(--body); color: var(--text-2); background: var(--line-soft); border-radius: 6px; padding: 3px 8px; }
.seat-line { margin: 0 0 12px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; }
.seat-line .big { font-size: 26px; font-weight: 700; }
.cost { font-size: 15px; color: var(--text-2); }
.seat-picks { border: 1.5px solid var(--line); border-radius: 8px; padding: 10px 14px; }
.seat-pick { gap: 8px; }
.seat-pick select { min-height: 34px; padding: 4px 8px; font-size: 13px; }

/* 1 人の画面 */
.person-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin: 0 0 14px; }
.person-head h1 { margin: 0; font: 900 22px/1.25 var(--display); }
.avatar { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; font: 900 22px/1 var(--display); flex: none; }
.person-tags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-left: auto; }
.wl-admin-url.compact { background: var(--panel); margin-bottom: 12px; }
.wl-card { padding: 20px 22px; }
.account-page { padding-top: 20px; }

@media (max-width: 900px) {
  .topbar { padding: 0 16px; }
  .scope { order: 3; flex-basis: 100%; align-self: auto; padding-bottom: 0; }
  .t1 { overflow-x: auto; scrollbar-width: none; max-width: 100%; min-height: 44px; }
  .t1::-webkit-scrollbar, .t2::-webkit-scrollbar { display: none; }
  .t2 { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .band-rail { width: 22px; }
  .band-rail::before { left: 8px; height: 22px; width: 8px; }
  .band-deep .band-rail { width: 40px; }
  .band-deep .band-rail::before { left: 26px; }
  .band-in { padding: 10px 16px 0 4px; }
  .band-note { flex-basis: 100%; }
  .page { padding: 14px 16px 32px; }
  .two-col, .person-grid { grid-template-columns: minmax(0, 1fr); }
  .page-actions { margin-left: 0; }
  .list-search { max-width: none; }
}
@media (max-width: 640px) {
  .list { background: transparent; border: 0; overflow: visible; }
  .list-scroll { max-height: none; min-height: 0; overflow: visible; }
  .list-table td { white-space: normal; }
  .list-table tbody tr:hover td { background: none; }
  .list-table td.r, table td.r { text-align: left; }
  .list-foot { border: 1.5px solid var(--line); border-radius: 10px; }
  .pager { margin-left: 0; }
  .inline-create { flex-wrap: wrap; width: 100%; }
  .inline-create label, .inline-create input { flex: 1 1 100%; width: 100%; }
  .page-actions { width: 100%; }
  .page-actions > .btn { flex: 1 1 auto; }
  .row { flex-wrap: wrap; }
  .person-tags { margin-left: 0; }
}
.card .signup-link { border: 0; padding: 0; margin: 0; background: none; }
.seat-list { margin: 0 0 12px; }
.seat-list summary { font-size: 14px; font-weight: 700; color: var(--accent); margin: 0 0 8px; }
.seat-scroll { max-height: 360px; overflow: auto; border: 1px solid var(--line-soft); border-radius: 8px; }
table.compact td.actions { white-space: nowrap; }
@media (max-width: 640px) {
  /* ロゴとアカウントの札を 1 行に収め、帯の中身(段の名前とタブ)をその下に */
  .topbar { flex-wrap: wrap; column-gap: 8px; padding: 0 12px; }
  .topbar .brand { flex: none; }
  .user-area { min-width: 0; flex: 0 1 auto; }
  le-account-chip::part(chip) { max-width: min(196px, 44vw); }
  .topbar .lockup-over { letter-spacing: .1em; }
  .t1 a { padding: 0 10px; }
}

/* 今後実装(#145): 場所だけを薄く見せる。押せない */
.soon-tag { display: inline-block; font: 700 11px/1 var(--body); padding: 3px 6px; border-radius: 4px; border: 1px dashed #aab1bf; color: #7a8294; background: transparent; white-space: nowrap; vertical-align: 1px; }
.soon-tab { display: flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 14px; padding: 0 12px; color: #6f7894; cursor: not-allowed; }
.soon-tab small { font-size: 10.5px; border: 1px dashed currentColor; border-radius: 4px; padding: 2px 4px; }
.t2 .soon-tab { padding: 10px 14px; color: #9aa1b0; }
.btn.soon-btn, .btn.soon-btn:disabled { opacity: 1; color: #8a91a2; border-style: dashed; border-color: #c9ced8; background: transparent; cursor: not-allowed; }
.soon-card { background: transparent; border-style: dashed; color: #7a8294; }
.soon-card h2 { color: #7a8294; }
.soon-card p { margin: 0; font-size: 14px; line-height: 1.6; }
.soon-line { margin: 10px 0 0; display: flex; align-items: center; gap: 8px; font-size: 13px; color: #8a91a2; }
/* 選択肢の長い select(メールアドレス入り)がカードからはみ出さないように */
.field { min-width: 0; }
.field > select, .field > input { max-width: 100%; min-width: 0; }
@media (max-width: 640px) { .form-row > .field { flex: 1 1 100%; } .form-row > .field > select, .form-row > .field > input { width: 100%; } }

/* ---- 製品ごとの API キー(#160。api-keys.js) ---- */
.ak { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.ak-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.ak-head h2 { margin: 0; }
.ak-month { display: grid; grid-template-columns: auto 1fr; gap: 6px 20px; align-items: end; margin-bottom: 14px; }
.ak-totals { display: grid; gap: 10px; align-content: end; }
.ak-totals div { display: grid; gap: 0; }
.ak-totals strong { font-family: var(--figures); font-size: 26px; font-weight: 600; letter-spacing: -.01em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.ak-totals strong small { font-family: var(--body); font-size: 13px; font-weight: 400; color: var(--muted); }
.ak-totals .ak-rej { color: var(--warn); font-size: 18px; }
.ak-chart { margin: 0; min-width: 0; }
.ak-plot { position: relative; }
.ak-plot svg { display: block; width: 100%; height: 96px; overflow: visible; }
.ak-max { position: absolute; right: 0; top: -2px; font-variant-numeric: tabular-nums; }
.ak-axis { display: flex; justify-content: space-between; margin-top: 4px; font-variant-numeric: tabular-nums; }
.ak-chart .base { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.ak-chart .ok { fill: var(--accent); }
.ak-chart .rej { fill: #d97706; }
.ak-chart .zero { fill: var(--line); }
.ak-chart .hit { fill: transparent; }
.ak-chart .ak-day:hover .hit { fill: var(--accent-weak); }
.ak-chart .ak-day.future .zero { fill: var(--line-soft); }
.ak-legend { display: flex; gap: 14px; margin-top: 4px; color: var(--text-2); }
.ak-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.ak-legend i.ok { background: var(--accent); }
.ak-legend i.rej { background: #d97706; }
.ak-ops { grid-column: 1 / -1; margin: 0; }
.ak-ops b { color: var(--text); font-variant-numeric: tabular-nums; font-weight: 600; }
.ak-table td { vertical-align: top; }
.ak-name { font-weight: 600; }
.ak-prefix { font-family: ui-monospace, monospace; font-size: 12px; color: var(--muted); }
.ak-meter { min-width: 220px; }
.ak-meter .meter-head { font-size: 14px; font-variant-numeric: tabular-nums; }
.ak-limit { display: flex; gap: 6px; margin-top: 8px; }
.ak-limit input { width: 110px; }
.ak-limit button { font-size: 13px; padding: 4px 10px; }
.ak-empty { margin: 4px 0 12px; padding: 12px 14px; border: 1px dashed var(--field); border-radius: 8px; color: var(--text-2); }
.ak-new { margin-top: 12px; align-items: end; }
.ak-fresh { border: 1px solid var(--ok); border-left-width: 4px; background: #f1f8f3; border-radius: 8px; padding: 12px 14px; margin-bottom: 14px; outline: none; }
.ak-fresh p { margin: 0 0 8px; line-height: 1.6; }
.ak-fresh p:last-child { margin: 8px 0 0; }
.ak-revoked { margin-top: 12px; }
.ak-revoked ul { margin: 6px 0 0; padding-left: 18px; font-size: 14px; }
@media (max-width: 640px) {
  .ak-month { grid-template-columns: 1fr; }
  .ak-totals { grid-auto-flow: column; justify-content: start; gap: 20px; }
  .ak-table thead { display: none; }
  .ak-table tr { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .ak-table td { border: none; padding: 0; }
  .ak-table td.ak-meter { grid-column: 1 / -1; grid-row: 2; min-width: 0; }
  .ak-table td.small { grid-column: 1 / -1; grid-row: 3; }
  .ak-new .field { flex: 1 1 100%; }
  .ak-new button { flex: 1 1 100%; }
}
.ak-limit-d summary { display: inline-block; margin-top: 6px; font-size: 13px; color: var(--accent); cursor: pointer; list-style: none; }
.ak-limit-d summary::-webkit-details-marker { display: none; }
.ak-limit-d summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.ak-limit-d[open] summary { color: var(--muted); }
