/* MAIA HR — maia.co.jp のトーン（白基調・#222・ブルーグラデーション・Montserrat + Noto Sans JP） */
:root {
  --ink: #222; --ink-2: #555; --muted: #888; --line: #e6e8ee; --bg: #f5f7fb; --card: #fff;
  --blue-1: #068EFF; --blue-2: #0639E3; --blue-3: #000085; --green: #1fb85a; --red: #d93a3a; --amber: #e8a100;
  --grad: linear-gradient(135deg, var(--blue-1), var(--blue-2) 55%, var(--blue-3));
  --radius: 14px; --shadow: 0 1px 2px rgba(20,30,80,.04), 0 6px 24px rgba(20,30,80,.06);
  --en: 'Montserrat', 'Noto Sans JP', sans-serif;
  --ja: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--ja); color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.7; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--blue-2); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.35; margin: 0 0 .6em; }
code { background: #eef1f8; padding: 1px 6px; border-radius: 4px; font-size: .9em; }

/* ── ヘッダー ── */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 24px; padding: 0 28px; height: 68px; background: #fff; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand-sub { font-family: var(--en); font-weight: 700; font-size: 12px; letter-spacing: .2em; color: #fff; background: var(--grad); padding: 2px 8px; border-radius: 4px; }
.nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.nav > a, .nav summary { color: var(--ink); font-weight: 500; padding: 8px 14px; border-radius: 999px; font-size: 14px; cursor: pointer; white-space: nowrap; }
.nav > a:hover, .nav summary:hover { background: #f0f3fa; text-decoration: none; }
.nav > a.on, .nav summary.on { color: var(--blue-2); background: #eaf0ff; }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
details.menu { position: relative; }
details.menu summary { list-style: none; display: flex; align-items: center; gap: 6px; }
details.menu summary::-webkit-details-marker { display: none; }
details.menu > summary::after { content: ''; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); margin-left: 4px; }
.menu-pop { position: absolute; top: calc(100% + 8px); left: 0; min-width: 220px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 8px; display: flex; flex-direction: column; z-index: 40; }
.menu-pop.right { left: auto; right: 0; }
.menu-pop a, .menu-pop .linklike { padding: 8px 12px; border-radius: 8px; color: var(--ink); font-size: 14px; text-align: left; width: 100%; }
.menu-pop a:hover, .menu-pop .linklike:hover { background: #f0f3fa; text-decoration: none; }
.menu-meta { padding: 8px 12px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; font-size: 12px; color: var(--muted); word-break: break-all; }
.avatar { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 700; font-size: 14px; flex-shrink: 0; }
.avatar.xl { width: 84px; height: 84px; font-size: 34px; border: 4px solid #fff; box-shadow: var(--shadow); }
.uname { max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; font-family: var(--en); font-size: 12px; font-weight: 600; }
.lang-switch a { padding: 4px 10px; color: var(--muted); }
.lang-switch a.on { background: var(--ink); color: #fff; }
.lang-switch a:hover { text-decoration: none; }
.lang-switch.center { display: flex; width: max-content; margin: 18px auto 0; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; width: 44px; height: 44px; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; height: 1.5px; background: var(--blue-2); margin: 6px 0; transition: .2s; }

/* ── レイアウト ── */
.main { width: 100%; max-width: 1240px; margin: 0 auto; padding: 32px 28px 64px; flex: 1; }
.main.bare { max-width: none; padding: 0; display: flex; }
.narrow { max-width: 720px; margin: 0 auto; }
.center-block { text-align: center; padding: 80px 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head.tight { margin-bottom: 16px; align-items: center; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.eyebrow { font-family: var(--en); font-weight: 600; font-size: 12px; letter-spacing: .25em; color: var(--blue-2); margin: 0 0 6px; text-transform: uppercase; }
.eyebrow a { color: inherit; letter-spacing: .05em; text-transform: none; font-family: var(--ja); }
.page-title { font-size: 26px; font-weight: 700; margin: 0; letter-spacing: .02em; }
.section-title { font-size: 20px; margin: 0; }
.hero { margin-bottom: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin-bottom: 20px; border: 1px solid rgba(0,0,0,.02); }
.card-accent { border-top: 3px solid transparent; border-image: var(--grad) 1; border-image-slice: 1 0 0 0; }
.card-title { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.card-title.big { font-size: 22px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; }
.more { font-family: var(--en); font-size: 12px; font-weight: 600; letter-spacing: .1em; }
.sub-title { font-size: 13px; color: var(--ink-2); margin: 16px 0 6px; }
.count { font-family: var(--en); font-size: 13px; font-weight: 600; color: var(--blue-2); background: #eaf0ff; padding: 1px 10px; border-radius: 999px; vertical-align: middle; }

/* ── 統計 ── */
.stats { margin-bottom: 20px; }
.stat { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; color: var(--ink); }
.stat:hover { text-decoration: none; transform: translateY(-1px); }
.stat.hot { box-shadow: inset 0 0 0 2px var(--blue-1), var(--shadow); }
.stat-label { font-size: 12px; color: var(--muted); font-weight: 500; }
.stat-num { font-family: var(--en); font-size: 32px; font-weight: 700; line-height: 1.1; }
.stat-num small { font-size: 14px; color: var(--muted); font-weight: 500; }
.stat-num.ok { color: var(--green); } .stat-num.ng { color: var(--red); }
.stats.compact .stat { box-shadow: none; background: var(--bg); }
progress.bar { width: 100%; height: 6px; appearance: none; border: 0; border-radius: 99px; overflow: hidden; background: #edf0f6; }
progress.bar::-webkit-progress-bar { background: #edf0f6; }
progress.bar::-webkit-progress-value { background: var(--grad); border-radius: 99px; }
progress.bar::-moz-progress-bar { background: var(--grad); }
.progress-line { display: grid; gap: 8px; }

/* ── ボタン ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 20px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); font: 500 14px/1.2 var(--ja); cursor: pointer; transition: .15s; white-space: nowrap; }
.btn:hover { text-decoration: none; border-color: var(--blue-2); color: var(--blue-2); }
.btn-primary { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 4px 14px rgba(6,57,227,.25); }
.btn-primary:hover { color: #fff; filter: brightness(1.08); }
.btn-ghost { background: transparent; }
.btn-danger-ghost { background: transparent; color: var(--red); border-color: #f2c9c9; }
.btn-danger-ghost:hover { color: #fff; background: var(--red); border-color: var(--red); }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-block { width: 100%; }
.linklike { background: none; border: 0; padding: 0; color: var(--blue-2); font: inherit; cursor: pointer; }
.linklike:hover { text-decoration: underline; }
.danger, .linklike.danger { color: var(--red); }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

/* ── フォーム ── */
.form { display: grid; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; border: 0; padding: 0; margin: 0; }
.field > span, .field > legend { font-size: 13px; font-weight: 500; color: var(--ink-2); padding: 0; }
.req { color: var(--red); font-style: normal; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=date], input[type=time], input:not([type]), select, textarea {
  width: 100%; padding: 10px 14px; border: 1px solid #d8dce6; border-radius: 10px; font: 15px/1.5 var(--ja); background: #fff; color: var(--ink); transition: .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue-1); box-shadow: 0 0 0 3px rgba(6,142,255,.15); }
textarea { resize: vertical; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--blue-2); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.form-grid .wide, .kv .wide { grid-column: 1 / -1; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.row-3 { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 16px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.form-actions.sticky { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--bg) 30%); padding: 20px 0 8px; }
.readonly { padding: 10px 14px; background: var(--bg); border-radius: 10px; min-height: 44px; word-break: break-all; }
.filters { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; padding: 18px 20px; }
.filters .field { flex: 0 1 170px; }
.filters .field.grow { flex: 1 1 260px; }
.self-end { align-self: flex-end; padding-bottom: 8px; }
.filters .self-end:last-child { padding-bottom: 0; }
.inline-form { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.inline-form .field { min-width: 180px; }
.inline-center { text-align: center; margin-top: 16px; font-size: 14px; }
form.inline { display: inline; }
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 2px dashed #c8d2ea; border-radius: var(--radius); padding: 32px 16px; text-align: center; color: var(--ink-2); cursor: pointer; background: #fafbff; }
.dropzone:hover { border-color: var(--blue-1); }
.dropzone input { max-width: 100%; }
.upload-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
.upload-row select { width: auto; }
.grade-pick { display: flex; gap: 8px; }
.grade-pick input { position: absolute; opacity: 0; }
.grade-pick label { cursor: pointer; }
.grade-pick .grade { width: 46px; height: 46px; font-size: 18px; opacity: .35; transition: .15s; }
.grade-pick input:checked + .grade { opacity: 1; transform: scale(1.08); box-shadow: 0 0 0 3px #fff, 0 0 0 5px #222; }
.grade-pick input:focus-visible + .grade { outline: 2px solid var(--blue-1); }
.otp-input { font-family: var(--en); font-size: 28px !important; letter-spacing: .5em; text-align: center; }
.mail-button-preview { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }

/* ── テーブル ── */
.table-wrap { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto; margin-bottom: 20px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 500; font-size: 12px; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #fafbfd; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafcff; }
.clip { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clip2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.break { word-break: break-all; }
.strong { font-weight: 700; color: var(--ink); }
.pager { display: flex; gap: 6px; justify-content: center; }
.pager a { padding: 6px 12px; border-radius: 8px; background: #fff; }
.pager a.on { background: var(--grad); color: #fff; }

/* ── バッジ ── */
.code { font-family: var(--en); font-size: 12px; font-weight: 600; color: var(--ink-2); background: #f0f2f7; padding: 2px 8px; border-radius: 6px; letter-spacing: .02em; }
.tag { display: inline-block; font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: 999px; vertical-align: middle; }
.tag-blue { background: #eaf0ff; color: var(--blue-2); } .tag-green { background: #e5f7ec; color: #12823d; } .tag-gray { background: #eef0f4; color: #666; } .tag-hot { background: #fff1e0; color: #b45f00; }
.role-badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: #eef0f4; color: #555; }
.role-management { background: #1b1f3b; color: #fff; } .role-sales { background: #e8f3ff; color: #0563c1; } .role-consultant { background: #efeaff; color: #5a3cc8; }
.role-hr { background: #e5f7ec; color: #12823d; } .role-user { background: #f3f4f7; color: #555; }
.role-badge.admin { background: var(--grad); color: #fff; }
.status { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.st-pending, .st-invited { background: #fff4dc; color: #a26b00; }
.st-approved, .st-accepted, .st-created, .st-sent { background: #e5f7ec; color: #12823d; }
.st-rejected, .st-declined, .st-error, .st-failed { background: #fde9e9; color: var(--red); }
.st-withdrawn, .st-skip, .st-logged { background: #eef0f4; color: #666; }
.grade { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; font-family: var(--en); font-weight: 700; color: #fff; }
.grade-A { background: #068EFF; color: #fff; } .grade-B { background: #1fb85a; } .grade-C { background: #e8a100; } .grade-D { background: #d93a3a; }
.lock { color: var(--amber); font-size: 9px; margin-left: 4px; vertical-align: super; }

/* ── リスト・KV ── */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list li.dim { opacity: .6; }
.list .grow { flex: 1; min-width: 0; }
.li-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.li-actions.col { flex-direction: column; align-items: stretch; }
.li-actions form { display: inline; }
.msg { background: var(--bg); padding: 8px 12px; border-radius: 8px; margin: 6px 0 0; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 0 0 14px; }
.kv dt { font-size: 13px; color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }
.kv.cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.kv-item { padding: 12px 0; border-bottom: 1px solid var(--line); }
.kv-item dt { margin-bottom: 2px; }
.pre { white-space: pre-wrap; }
.nil { color: #c4c8d2; }
.muted { color: var(--muted); } .small { font-size: 12px; } .right { text-align: right; } .center { text-align: center; }
.empty { color: var(--muted); text-align: center; padding: 20px; }
.bullets { padding-left: 1.2em; margin: 0 0 16px; } .bullets li { margin-bottom: 6px; }
.file-list { list-style: none; padding: 0; margin: 0; }
.file-list li { display: flex; gap: 12px; align-items: center; padding: 6px 0; flex-wrap: wrap; }
.device-list { list-style: none; padding: 0; margin: 0 0 16px; }
.device-list li { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid #e1e6f2; }
.timeline li { position: relative; padding: 0 0 22px 18px; }
.timeline li::before { content: ''; position: absolute; left: -26px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--blue-2); }
.tl-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.timeline p { margin: 8px 0; }
.role-help { background: var(--bg); padding: 12px 16px; border-radius: 10px; display: grid; gap: 4px; }
.admin-box { border: 1px dashed #c8d2ea; box-shadow: none; }

/* ── フラッシュ ── */
.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; }
.flash-success { background: #e5f7ec; color: #0f6e33; }
.flash-error { background: #fde9e9; color: #b42323; }
.flash-info { background: #eaf0ff; color: #1b3a9a; }

/* ── 案件カード ── */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.project-card { display: flex; flex-direction: column; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; color: var(--ink); transition: .18s; border: 1px solid transparent; }
.project-card:hover { text-decoration: none; transform: translateY(-2px); border-color: #cfdcff; }
.pc-top { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.pc-title { font-size: 17px; margin-bottom: 12px; }
.pc-meta { margin: 0 0 12px; display: grid; gap: 4px; font-size: 13px; flex: 1; }
.pc-meta div { display: grid; grid-template-columns: 56px 1fr; gap: 8px; }
.pc-meta dt { color: var(--muted); } .pc-meta dd { margin: 0; }
.pc-foot { display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 10px; }

/* ── プロフィール（SuccessFactors 個人プロファイル準拠：左セクションナビ） ── */
.profile-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; align-items: start; }
.profile-side { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; position: sticky; top: 88px; }
.profile-cover { height: 84px; background: var(--grad); position: relative; overflow: hidden; }
.profile-cover::after { content: ''; position: absolute; right: -30px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: rgba(255,255,255,.12); }
.profile-id { padding: 0 20px 16px; margin-top: -42px; position: relative; display: grid; gap: 4px; }
.profile-name { font-size: 20px; margin: 6px 0 0; }
.section-nav { display: flex; flex-direction: column; border-top: 1px solid var(--line); padding: 8px; }
.section-nav a { padding: 10px 14px; border-radius: 10px; color: var(--ink); font-size: 14px; }
.section-nav a:hover { background: #f3f6fd; text-decoration: none; }
.section-nav a.on { background: #eaf0ff; color: var(--blue-2); font-weight: 700; }

/* ── 認証画面 ── */
body.auth { background: #fff; }
.auth-wrap { display: grid; grid-template-columns: 1.1fr 1fr; min-height: calc(100vh - 92px); width: 100%; }
.auth-wrap.single { grid-template-columns: 1fr; place-items: center; background: var(--bg); padding: 32px 16px; }
.auth-art { background: var(--grad); color: #fff; padding: 64px; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; }
.auth-art::before, .auth-art::after { content: ''; position: absolute; border-radius: 50%; background: rgba(255,255,255,.08); }
.auth-art::before { width: 480px; height: 480px; right: -160px; bottom: -160px; }
.auth-art::after { width: 220px; height: 220px; right: 120px; top: -80px; }
.auth-art .eyebrow { color: rgba(255,255,255,.75); }
.display { font-family: var(--en); font-size: clamp(36px, 5vw, 64px); font-weight: 600; line-height: 1.05; letter-spacing: .01em; margin: 8px 0 20px; }
.auth-art .lead { font-size: 16px; opacity: .9; }
.auth-card { width: 100%; max-width: 440px; margin: auto; padding: 48px 36px; }
.auth-wrap.single .auth-card { background: #fff; border-radius: 20px; box-shadow: var(--shadow); }
.auth-logo { display: block; margin-bottom: 28px; }
.auth-card h2 { font-size: 22px; }

/* ── 案件アサイン回答 ── */
.respond-actions { display: flex; gap: 12px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }
.mail-copy { margin-top: 12px; background: var(--bg); border-radius: 10px; padding: 10px 14px; }
.mail-copy summary { cursor: pointer; font-size: 13px; color: var(--ink-2); }

/* ── 管理 ── */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs a { padding: 8px 16px; border-radius: 999px; background: #fff; color: var(--ink); font-size: 14px; box-shadow: var(--shadow); }
.tabs a.on { background: var(--grad); color: #fff; }
.mail-item { padding: 14px 20px; margin-bottom: 10px; }
.mail-item summary { cursor: pointer; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mail-body { white-space: pre-wrap; font-family: var(--ja); font-size: 13px; background: var(--bg); padding: 14px; border-radius: 10px; margin: 12px 0 0; }

/* ── フッター ── */
.footer { background: #101433; color: rgba(255,255,255,.7); display: flex; gap: 16px; align-items: center; justify-content: center; padding: 24px 16px; font-family: var(--en); font-size: 12px; letter-spacing: .1em; flex-wrap: wrap; }
body.auth .footer { display: none; }

/* ── レスポンシブ ── */
@media (max-width: 1080px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-layout > aside { order: -1; }
}
@media (max-width: 900px) {
  .topbar { padding: 0 16px; height: 60px; }
  .nav-toggle { display: block; }
  .nav { display: none; position: fixed; top: 60px; left: 0; right: 0; bottom: 0; background: #fff; flex-direction: column; align-items: stretch; padding: 16px; gap: 2px; overflow-y: auto; }
  .nav.open { display: flex; }
  .nav > a, .nav summary { padding: 14px 16px; border-radius: 10px; font-size: 16px; }
  .nav-right { margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--line); flex-direction: column; align-items: stretch; }
  .menu-pop, .menu-pop.right { position: static; box-shadow: none; border: 0; padding: 0 0 0 12px; }
  .lang-switch { align-self: flex-start; }
  .profile-layout { grid-template-columns: 1fr; }
  .profile-side { position: static; }
  .section-nav { flex-direction: row; overflow-x: auto; gap: 4px; -webkit-overflow-scrolling: touch; }
  .section-nav a { white-space: nowrap; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-art { padding: 40px 24px; }
  .display { font-size: 36px; }
}
@media (max-width: 680px) {
  body { font-size: 14px; }
  .main { padding: 20px 16px 48px; }
  .page-title { font-size: 21px; }
  .grid-2, .grid-3, .form-grid, .row-2, .row-3, .kv.cols { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat-num { font-size: 26px; }
  .card { padding: 18px 16px; }
  .filters .field { flex: 1 1 calc(50% - 8px); }
  .filters .field.grow { flex: 1 1 100%; }
  .stats.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .stats.grid-3 .stat { padding: 12px; }
  .stats.grid-3 .stat-num { font-size: 22px; }
  .project-grid { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .auth-card { padding: 32px 20px; }
  .list li { flex-wrap: wrap; }
  /* テーブルをカード表示に */
  .table-wrap { background: transparent; box-shadow: none; overflow: visible; }
  .rtable thead { display: none; }
  .rtable, .rtable tbody, .rtable tr, .rtable td { display: block; width: 100%; }
  .rtable tr { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 12px; padding: 8px 16px; }
  .rtable td { border: 0; padding: 6px 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
  .rtable td::before { content: attr(data-label); font-size: 12px; color: var(--muted); flex: 0 0 100px; }
  .rtable td:not([data-label])::before { display: none; }
  .rtable td > div { flex-basis: 100%; padding-left: 108px; }
  .clip { max-width: none; white-space: normal; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
  .form-actions { justify-content: stretch; } .form-actions .btn { flex: 1; }
}
