@import url('https://fonts.googleapis.com/css2?family=Inter+Tight:wght@600;800&family=Noto+Sans+JP:wght@400;500;700;900&display=swap');
/* DR2 の共通の見た目（一覧・案件ページ・管理ページが読む）— 2026-10-29
   色・角・影はここの変数だけで決め、各ページは足りない部品だけを自分の <style> に書く。
   ログイン前のページ（login・register・forgot）・/dd/・/qa/・/market/ は読まない（このファイルは d2_session が要る）。 */
:root {
  --navy: #1F2A48; --navy-2: #2D3A5C; --navy-ink: #2D3A5C;
  --gold: #C49A3C; --gold-2: #8E6C1F; --gold-soft: #FAF6EA; --gold-line: #E8D9AE;
  --ink: #1F2A48; --body: #333A4D; --muted: #666B78; --faint: #8A8F9B; --ghost: #C9CCD3;
  --bg: #F5F5F3; --surface: #fff; --surface-2: #F5F5F3; --hover: #F7F7F5; --sel: #EFF0F4;
  --line: #E6E6E6; --line-2: #EFEFED;
  --ok: #067647; --ok-soft: #ECFDF3; --ok-line: #ABEFC6;
  --warn: #A15C07; --warn-soft: #FFF8EB; --warn-line: #FEDF89;
  --bad: #B42318; --bad-soft: #FEF3F2; --bad-line: #FECDCA;
  --info: #1849A9; --info-soft: #EFF5FF; --info-line: #B2CCFF;
  --r-sm: 0; --r: 0; --r-lg: 0; --r-xl: 0;
  --sh-1: 0 1px 2px rgba(16, 24, 40, .05);
  --sh-2: 0 1px 3px rgba(16, 24, 40, .09), 0 1px 2px rgba(16, 24, 40, .05);
  --sh-3: 0 20px 40px -12px rgba(16, 24, 40, .25), 0 6px 12px -6px rgba(16, 24, 40, .08);
  --font: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  /* 旧名（各ページのインラインの style が使っている） */
  --gray: var(--muted); --border: var(--line);
}
* { box-sizing: border-box; }
body {
  margin: 0; font-family: var(--font); background: var(--bg); color: var(--body);
  font-size: 13.5px; line-height: 1.55; -webkit-font-smoothing: antialiased; font-feature-settings: "palt" 1;
}
a { color: var(--navy); }
.num, .tnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.ico { width: 16px; height: 16px; flex: 0 0 auto; display: inline-block; vertical-align: -3px; }
.ico-sm { width: 14px; height: 14px; vertical-align: -2px; }

/* ===== 上の帯 ===== */
header.appbar {
  position: sticky; top: 0; z-index: 60; height: 58px; flex: 0 0 auto;
  display: flex; align-items: center; gap: 12px; padding: 0 22px;
  background: linear-gradient(180deg, #213357 0%, var(--navy) 100%); color: #fff;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .06), 0 1px 0 rgba(10, 18, 34, .25);
}
header.appbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, var(--gold) 0, rgba(196, 151, 47, 0) 42%); opacity: .9; }
.appbar a.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; min-width: 0; }
.appbar a.brand:hover { opacity: .9; }
.appbar a.brand img { width: 26px; height: 26px; }
.appbar h1 { margin: 0; font-size: 15px; font-weight: 500; letter-spacing: .2px; white-space: nowrap; }
.appbar h1 b { font-weight: 700; }
.appbar h1 .ver { font-size: 10.5px; font-weight: 700; color: var(--gold); margin-left: 2px; letter-spacing: .5px; }
.appbar .role-badge { font-size: 10px; font-weight: 700; letter-spacing: 1px; color: #F2D594; border: 1px solid rgba(242, 213, 148, .55); background: rgba(196, 151, 47, .14); padding: 3px 8px; border-radius: 999px; }
.appbar .meta { font-size: 11.5px; color: rgba(255, 255, 255, .62); padding-left: 12px; border-left: 1px solid rgba(255, 255, 255, .16); white-space: nowrap; }
.appbar .spacer { flex: 1 1 auto; }
.appbar .nav { display: flex; align-items: center; gap: 2px; }
.appbar .nav a { color: rgba(255, 255, 255, .8); text-decoration: none; font-size: 12.5px; padding: 6px 11px; border-radius: 7px; white-space: nowrap; }
.appbar .nav a:hover { color: #fff; background: rgba(255, 255, 255, .09); }
.appbar .nav a.on { color: #fff; background: rgba(255, 255, 255, .12); }
.appbar .hdr-user { display: flex; align-items: center; gap: 10px; }
.appbar .user-chip { display: flex; align-items: center; gap: 8px; font-size: 12px; color: rgba(255, 255, 255, .86); max-width: 260px; }
.appbar .user-chip .avatar { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #D9B157, var(--gold-2)); color: #fff; font-weight: 700; font-size: 12.5px; display: grid; place-items: center; flex: 0 0 auto; box-shadow: 0 0 0 2px rgba(255, 255, 255, .14); }
.appbar .user-chip .uname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appbar .logout-btn { background: transparent; color: rgba(255, 255, 255, .82); border: 1px solid rgba(255, 255, 255, .22); padding: 5px 11px; border-radius: 7px; font-size: 11.5px; cursor: pointer; font-family: inherit; white-space: nowrap; }
.appbar .logout-btn:hover { background: rgba(255, 255, 255, .1); color: #fff; }

/* ===== ボタン ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 14px;
  border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--body);
  font-family: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap;
  box-shadow: var(--sh-1); transition: background .12s, border-color .12s, color .12s, box-shadow .12s;
}
.btn:hover { background: var(--surface-2); border-color: #D0D5DD; }
.btn:focus-visible, .seg button:focus-visible, .input:focus-visible { outline: 2px solid rgba(196, 151, 47, .55); outline-offset: 1px; }
.btn:disabled { opacity: .5; cursor: default; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 11.5px; border-radius: 7px; }
.btn-primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-ink); border-color: var(--navy-ink); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn-gold:hover { background: var(--gold-2); border-color: var(--gold-2); }
.btn-excel { background: #fff; color: #17663F; border-color: #B7DEC7; }
.btn-excel:hover { background: #F1FAF5; border-color: #8CCBA8; }
.btn-quiet { background: transparent; border-color: transparent; box-shadow: none; color: var(--muted); }
.btn-quiet:hover { background: var(--line-2); color: var(--ink); border-color: transparent; }

/* ===== 入力 ===== */
.input, .select {
  height: 34px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff;
  font-family: inherit; font-size: 13px; color: var(--ink); box-shadow: var(--sh-1); transition: border-color .12s, box-shadow .12s;
}
.input:focus, .select:focus { outline: none; border-color: #C9A85A; box-shadow: 0 0 0 3px rgba(196, 151, 47, .16); }
.select { appearance: none; -webkit-appearance: none; padding-right: 30px; cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center; }
.search-box { position: relative; display: inline-flex; align-items: center; }
.search-box .ico { position: absolute; left: 10px; color: var(--faint); pointer-events: none; }
.search-box .input { padding-left: 32px; }
.field-lbl { font-size: 11.5px; color: var(--muted); font-weight: 500; white-space: nowrap; }

/* ===== 切り替え（セグメント） ===== */
.seg { display: inline-flex; gap: 2px; padding: 3px; background: #EBEEF3; border-radius: 9px; }
.seg button { border: 0; background: transparent; padding: 0 11px; height: 28px; border-radius: 7px; font-family: inherit; font-size: 12px; font-weight: 500; color: var(--muted); cursor: pointer; white-space: nowrap; transition: background .12s, color .12s, box-shadow .12s; }
.seg button:hover { color: var(--ink); }
.seg button.active { background: #fff; color: var(--navy); font-weight: 700; box-shadow: 0 1px 2px rgba(16, 24, 40, .12), 0 0 0 .5px rgba(16, 24, 40, .06); }

/* ===== バッジ ===== */
.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 21px; padding: 0 8px; border-radius: 999px;
  font-size: 11px; font-weight: 600; line-height: 1; white-space: nowrap; letter-spacing: .2px;
  background: #F1F3F6; color: #475467; box-shadow: inset 0 0 0 1px rgba(16, 24, 40, .06);
}
.badge.dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.badge + .badge { margin-left: 3px; }
/* 区分 */
.badge.sale-r, .badge.b-r { background: #FFF5E1; color: #8A4B08; box-shadow: inset 0 0 0 1px #F8DFAE; }
.badge.sale-c, .badge.b-c { background: #EEF3FF; color: #2D46A8; box-shadow: inset 0 0 0 1px #CCD8FB; }
/* 電圧 */
.badge.voltage-lv, .badge.b-lv { background: #E9FAF4; color: #0B6E55; box-shadow: inset 0 0 0 1px #BCEBD9; }
.badge.voltage-hv, .badge.b-hv { background: #F1F3F7; color: #364152; box-shadow: inset 0 0 0 1px #DDE1E8; }
.badge.voltage-ehv, .badge.b-ehv { background: #FDEEF6; color: #9B1C5C; box-shadow: inset 0 0 0 1px #F7C9E0; }
/* 状態 */
.badge.status-on, .badge.b-status-on, .badge.b-active { background: var(--ok-soft); color: var(--ok); box-shadow: inset 0 0 0 1px var(--ok-line); }
.badge.status-talk, .badge.b-status-talk { background: var(--warn-soft); color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn-line); }
.badge.status-prep, .badge.b-status-prep { background: var(--info-soft); color: var(--info); box-shadow: inset 0 0 0 1px var(--info-line); }
.badge.status-restudy, .badge.b-status-restudy { background: var(--info-soft); color: var(--info); box-shadow: inset 0 0 0 1px var(--info-line); }
.badge.status-withdrawn, .badge.b-status-withdrawn { background: var(--bad-soft); color: var(--bad); box-shadow: inset 0 0 0 1px var(--bad-line); }
.badge.status-sold, .badge.b-status-sold, .badge.b-status { background: #F0F1F4; color: #5D6679; box-shadow: inset 0 0 0 1px #DEE1E7; }
/* 回答前の用地と DC 候補の印（owner の一覧だけ） */
.badge.status-pool { background: var(--gold-soft); color: var(--gold-2); box-shadow: inset 0 0 0 1px var(--gold-line); }
.badge.dc-cand { background: var(--info-soft); color: var(--info); box-shadow: inset 0 0 0 1px var(--info-line); }
.badge.dc-talk { background: var(--warn-soft); color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn-line); }
.badge.dc-ok { background: var(--ok-soft); color: var(--ok); box-shadow: inset 0 0 0 1px var(--ok-line); }
.badge.dc-ng { background: #F0F1F4; color: #5D6679; box-shadow: inset 0 0 0 1px #DEE1E7; }
/* 支払い */
.badge.pay-yes, .badge.b-paid { background: var(--ok-soft); color: var(--ok); box-shadow: inset 0 0 0 1px var(--ok-line); }
.badge.pay-no, .badge.b-unpaid { background: var(--bad-soft); color: var(--bad); box-shadow: inset 0 0 0 1px var(--bad-line); }
/* 市街化調整区域（該当＝調整区域の中） */
.badge.zoning-ok { background: var(--ok-soft); color: var(--ok); box-shadow: inset 0 0 0 1px var(--ok-line); }
.badge.zoning-ng { background: var(--bad-soft); color: var(--bad); box-shadow: inset 0 0 0 1px var(--bad-line); }
.badge.zoning-unsure { background: var(--warn-soft); color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn-line); }

/* ===== カード ===== */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); }

/* ===== 管理ページなどの表 ===== */
.dtable-wrap { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); overflow: auto; }
table.dtable { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
table.dtable th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); color: var(--muted); font-weight: 600; font-size: 11px; letter-spacing: .3px; text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.dtable td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.dtable tbody tr:last-child td { border-bottom: 0; }
table.dtable tbody tr:hover td { background: var(--hover); }

/* ===== 数字の小札（集計） ===== */
.stats { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.stat-pill { background: #fff; padding: 9px 14px; border-radius: 10px; border: 1px solid var(--line); font-size: 12px; box-shadow: var(--sh-1); }
.stat-pill .lbl { color: var(--muted); margin-right: 8px; }
.stat-pill .num { color: var(--navy); font-weight: 700; font-size: 14px; }

/* ===== ダイアログ ===== */
.modal-overlay { display: none; position: fixed; inset: 0; z-index: 1000; background: rgba(16, 24, 40, .46); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); justify-content: center; align-items: center; padding: 20px; }
.modal-overlay.show { display: flex; animation: dr2-fade .14s ease-out; }
.modal-overlay.show .modal { animation: dr2-pop .18s cubic-bezier(.2, .9, .3, 1.2); }
.modal { background: #fff; padding: 26px 28px; border-radius: var(--r-xl); width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; box-shadow: var(--sh-3); }
.modal h2 { color: var(--ink); font-size: 16.5px; font-weight: 700; margin: 0 0 16px; padding: 0; border: 0; }
.modal label { display: block; font-size: 12px; color: var(--muted); font-weight: 500; margin: 12px 0 5px; }
.modal input, .modal select, .modal textarea { width: 100%; padding: 9px 11px; font-size: 13px; border: 1px solid var(--line); border-radius: 8px; font-family: inherit; color: var(--ink); background: #fff; box-shadow: var(--sh-1); }
.modal input:focus, .modal select:focus, .modal textarea:focus { outline: none; border-color: #C9A85A; box-shadow: 0 0 0 3px rgba(196, 151, 47, .16); }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.modal-actions button { height: 36px; padding: 0 18px; font-size: 13px; border-radius: 8px; cursor: pointer; font-family: inherit; font-weight: 600; border: 1px solid transparent; }
.modal-actions .btn-cancel { background: #fff; color: var(--body); border-color: var(--line); }
.modal-actions .btn-cancel:hover { background: var(--surface-2); }
.modal-actions .btn-save { background: var(--navy); color: #fff; }
.modal-actions .btn-save:hover { background: var(--navy-ink); }
.modal-actions .btn-save:disabled { opacity: .5; }
@keyframes dr2-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes dr2-pop { from { opacity: 0; transform: translateY(6px) scale(.985); } to { opacity: 1; transform: none; } }

.dim { color: var(--ghost); }
.empty-state { padding: 56px 20px; text-align: center; color: var(--muted); font-size: 13px; }

@media (max-width: 768px) {
  header.appbar { height: auto; min-height: 54px; flex-wrap: wrap; padding: 9px 14px; gap: 8px 10px; position: relative; }
  .appbar .meta { display: none; }
  .appbar .user-chip .uname { display: none; }
}
@media print {
  header.appbar { display: none !important; }
  body { background: #fff !important; }
}

/* ======================================================================
   会社サイト scix.co.jp（案C「大きな X」）に合わせる層 — 2026-11-06 中島「DR2 のデザインが、サイエンス Web ページとあっていない。合わせて統一して」
   白地・紺の字（#1F2A48）・太いゴシック・角は立てる・影なし・金はロゴの X と小さな印だけ。
   元は scix-web の theme.css / header.js。ここは dr2.css を読む画面（一覧・案件・質問・QA・管理）の共通。
   ====================================================================== */
:root { --num: "Inter Tight", "Noto Sans JP", sans-serif; --sh-1: none; --sh-2: none; --sh-3: 0 8px 24px rgba(31, 42, 72, .18); }
h1, h2 { font-weight: 900; letter-spacing: -.01em; }
h3 { font-weight: 700; }
::selection { background: rgba(196, 154, 60, .35); }

/* 角をなくす（丸い印・トグル・地図・回る輪は除く） */
body *:not(img):not(svg *):not(.avatar):not([class*="dot"]):not([class*="ring"]):not(.switch):not([class*="leaflet"]):not([class*="spin"]):not(.dc-bar):not(.dc-bar *):not(.pf *) { border-radius: 0 !important; }   /* .pf（買う・売るの場の画面・public/pf.css）は丸みを付ける（2026-11-15 中島「白黒で四角四角」） */
.switch { border-radius: 999px !important; }
.switch::after { border-radius: 50%; }
.appbar .user-chip .avatar { border-radius: 50% !important; }

/* 上の帯: 白地・紺の太い下線・紺のロゴ（header.js と同じ） */
header.appbar { height: 64px; background: #fff; color: var(--navy); border-bottom: 2px solid var(--navy); box-shadow: none; padding: 0 24px; }
header.appbar::after { display: none; }
.appbar a.brand { color: var(--navy); gap: 12px; }
.appbar a.brand { flex: 0 0 auto; }
.appbar a.brand img { width: auto; height: 38px; }   /* ロゴは img の src（content: での差し替えは幅が 0 になり、OWNER の札と件数が重なった・2026-11-06） */
.appbar h1 { font-family: var(--num); font-size: 15px; font-weight: 800; letter-spacing: .02em; color: var(--navy); padding-left: 12px; border-left: 2px solid var(--line); line-height: 1.2; }
.appbar h1 b { display: none; }
.appbar h1 .ver { color: var(--gold-2); font-weight: 800; }
/* 名前「蓄電所マーケット」（2026-11-15 中島「独立サイトにする」「蓄電所マーケット」）。サイエンスエックスのロゴでなく、場の名前と印。運営はその下に小さく */
.appbar a.brand.site { gap: 10px; }
.appbar a.brand.site .mark { width: 38px; height: 38px; flex: 0 0 auto; display: block; }
.appbar a.brand.site .bt { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.appbar a.brand.site .bt b { font-size: 19px; font-weight: 900; letter-spacing: .03em; color: var(--navy); white-space: nowrap; }
.appbar a.brand.site .bt small { font-size: 10.5px; font-weight: 600; color: var(--muted); white-space: nowrap; margin-top: 2px; }
.appbar .role-badge { font-family: var(--num); font-weight: 800; letter-spacing: .06em; color: #fff; background: var(--navy); border: 0; padding: 4px 9px; }
.appbar .meta { color: var(--muted); border-left: 1px solid var(--line); }
.appbar .nav a { color: #2D3A5C; font-size: 13.5px; font-weight: 700; padding: 8px 11px; background: none; }
.appbar .nav a:hover { color: var(--navy); background: none; box-shadow: inset 0 -2px 0 var(--gold); }
.appbar .nav a.on { color: var(--navy); font-weight: 900; background: none; box-shadow: inset 0 -2px 0 var(--navy); }
/* 上の帯の並び（どの画面でも同じ・2026-11-15 中島「今ある案件をみるときだけ、なんでヘッダーの位置が右に行く」）: ロゴ → OWNER → 入口 → 件数 → すき間 → 言語 → 名前とログアウト */
header.appbar.plat-bar > a.brand { order: 0; } header.appbar.plat-bar > .role-badge { order: 1; } header.appbar.plat-bar > .nav { order: 2; }
header.appbar.plat-bar > .meta { order: 3; } header.appbar.plat-bar > .spacer { order: 4; flex: 1 1 auto; } header.appbar.plat-bar > .lang-sw { order: 5; } header.appbar.plat-bar > .hdr-user { order: 6; }
/* 4つの入口（public/platform-nav.js・2026-11-15 中島「全然メニューが小さくわからない」）。字を大きく・絵を付け・いまの入口は紺で塗る */
.appbar .nav.plat { gap: 2px; align-self: stretch; }
.appbar .nav.plat a.pn { display: inline-flex; align-items: center; gap: 8px; height: 100%; padding: 0 16px; font-size: 16px; font-weight: 800; color: var(--navy); box-shadow: none; white-space: nowrap; }
.appbar .nav.plat a.pn svg { width: 22px; height: 22px; flex: 0 0 auto; color: var(--gold-2); }
.appbar .nav.plat a.pn:hover { background: var(--surface-2); box-shadow: inset 0 -4px 0 var(--gold); }
.appbar .nav.plat a.pn { --pc: var(--navy); }
.appbar .nav.plat a.pn[href="/buy"] { --pc: #2563EB; } .appbar .nav.plat a.pn[href="/sellers"] { --pc: #D4610A; } .appbar .nav.plat a.pn[href="/deals"] { --pc: #138A62; } .appbar .nav.plat a.pn[href="/how"] { --pc: #6D3FD1; }
.appbar .nav.plat a.pn svg { color: var(--pc); }
.appbar .nav.plat a.pn:hover { box-shadow: inset 0 -4px 0 var(--pc); }
.appbar .nav.plat a.pn.on { background: var(--pc); color: #fff; box-shadow: none; }   /* いまの入口は、その入口の色で塗る（買う＝青・売る＝橙・案件＝緑・流れ＝紫） */
.appbar .nav.plat a.pn.on svg { color: #fff; }
.appbar .nav.plat a.pn:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; }
.appbar .nav.plat a.adm { align-self: center; font-size: 12.5px; font-weight: 700; color: var(--muted); }
@media (max-width: 1400px) { .appbar .nav.plat a.pn { padding: 0 11px; font-size: 15px; } }
@media (max-width: 1240px) { header.appbar .meta { display: none; } }   /* 件数と更新日は一覧の中にも出ている */
@media (max-width: 1100px) {   /* 入口は2段目に、帯の幅いっぱいで */
  header.appbar { height: auto; min-height: 56px; flex-wrap: wrap; padding: 8px 14px; row-gap: 4px; }
  header.appbar.plat-bar > .nav.plat { order: 20; }   /* 並びの決め（order: 2）より強く＝狭い画面では入口を2段目に */
  .appbar .nav.plat { order: 20; flex: 0 0 calc(100% + 28px); width: calc(100% + 28px); max-width: none; flex-wrap: wrap; align-self: auto; gap: 0; margin: 6px -14px -8px; border-top: 1px solid var(--line); }
  .appbar .nav.plat a.pn { flex: 1 1 auto; min-width: 0; word-break: keep-all; height: auto; min-height: 58px; flex-direction: column; justify-content: center; gap: 3px; padding: 6px 2px; font-size: 12.5px; line-height: 1.3; text-align: center; white-space: normal; }
  .appbar .nav.plat a.pn svg { width: 20px; height: 20px; }
  .appbar .nav.plat a.adm { flex: 0 0 auto; padding: 8px 12px; }
  .appbar .nav.plat a.adm:first-of-type { margin-left: 0; }
  .appbar .nav.plat a.pn + a.adm { flex-basis: 100%; max-width: max-content; }   /* 当社の管理の入口は次の段へ */
}
.appbar .user-chip { color: var(--navy); }
.appbar .user-chip .avatar { background: var(--navy); color: var(--gold); box-shadow: none; }
.appbar .logout-btn { color: var(--navy); border: 2px solid var(--navy); font-weight: 700; padding: 5px 11px; }
.appbar .logout-btn:hover { background: var(--navy); color: #fff; }
/* ヘッダーの中のボタン（新規案件など）は白地の上なので紺 */
.appbar .btn-gold, .appbar .btn-primary { background: var(--navy); border-color: var(--navy); color: #fff; }

/* ボタン: 角を立て・影なし・主ボタンは紺 */
.btn { border: 1px solid #CFCFCF; box-shadow: none; color: var(--navy); font-weight: 700; }
.btn:hover { background: var(--surface-2); border-color: var(--navy); }
.btn-primary, .btn-gold { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-primary:hover, .btn-gold:hover { background: var(--navy-2); border-color: var(--navy-2); color: #fff; }
.btn-excel { color: #17663F; border-color: #B7DEC7; }
.btn-quiet { border-color: transparent; color: var(--muted); }
.btn:focus-visible, .seg button:focus-visible, .input:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }

/* 入力 */
.input, .select, .modal input, .modal select, .modal textarea { border-color: #CFCFCF; box-shadow: none; }
.input:focus, .select:focus, .modal input:focus, .modal select:focus, .modal textarea:focus { outline: 2px solid var(--gold); outline-offset: 0; border-color: var(--navy); box-shadow: none; }

/* 切り替え */
.seg { background: var(--surface-2); border: 1px solid var(--line); padding: 2px; }
.seg button { font-weight: 700; color: var(--navy-2); }
.seg button.active { background: var(--navy); color: #fff; box-shadow: none; }

/* 札: 四角に（色の意味はそのまま） */
.badge { box-shadow: inset 0 0 0 1px rgba(31, 42, 72, .1); font-weight: 700; }

/* カード・表の外枠: 白地・細い枠・上に紺の線 */
.card, .dtable-wrap, .table-card, .bundle-panel, .kpis { background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--navy); box-shadow: none; }
.stat-pill { box-shadow: none; border-color: var(--line); border-top: 3px solid var(--navy); }
.stat-pill .num { font-family: var(--num); font-weight: 800; }
.hint-bar { background: var(--gold-soft); border: 1px solid var(--gold-line); border-left: 4px solid var(--gold); }

/* 表の見出し: 淡い地に紺の太い線 */
table.dtable th, table.grid th, table.bundle th { background: var(--surface-2); color: var(--navy); font-weight: 800; border-bottom: 2px solid var(--navy); }
table.grid th.sortable:hover { background: #EEEEEC; color: var(--navy); }

/* 数字は Inter Tight */
.kpi .v, .kpi b, .stat-pill .num { font-family: var(--num); letter-spacing: -.02em; }

/* ダイアログ */
.modal { border: 2px solid var(--navy); box-shadow: var(--sh-3); }
.modal-overlay { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(31, 42, 72, .5); }
.modal h2 { font-weight: 900; color: var(--navy); }
.modal-actions .btn-save { background: var(--navy); }
.modal-actions .btn-save:hover { background: var(--navy-2); }

@media (max-width: 768px) {
  header.appbar { height: auto; min-height: 56px; padding: 8px 14px; }
  .appbar a.brand img { height: 30px; }
  .appbar h1 { font-size: 13px; padding-left: 9px; }
  .appbar a.brand.site .mark { width: 32px; height: 32px; }
  .appbar a.brand.site .bt b { font-size: 16px; }
  .appbar a.brand.site .bt small { font-size: 9.5px; }
  .appbar .nav a { font-size: 12.5px; padding: 6px 8px; }
  .appbar .nav, .appbar .hdr-user { flex-wrap: wrap; max-width: 100%; }
  .toolbar .tright { flex-wrap: wrap; gap: 8px; }
}

/* 言語の切り替え：紺の丸枠に国旗（今の言語の旗を紺の丸で囲む）。scix.co.jp と同じ形（2026-11-06 中島「DR２の言語選択も、こんなかんじでもっと目立たせて」） */
.lang-sw { margin: 0 10px 0 6px; display: inline-flex; align-items: center; gap: 3px; padding: 3px; border: 2px solid #1F2A48; border-radius: 100px; background: #fff; flex: 0 0 auto; line-height: 0; }
.lang-sw a, .lang-sw button, .lang-sw span { display: inline-flex; align-items: center; justify-content: center; padding: 5px 7px; border: 0; border-radius: 100px; background: transparent; cursor: pointer; text-decoration: none; }
.lang-sw a:hover, .lang-sw button:not(.on):hover { background: #E9EBF1; }
.lang-sw .on { background: #1F2A48; cursor: default; }
.lang-sw .lf { width: 26px; height: 17px; display: block; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0,0,0,.18); }
.lang-sw .on .lf { box-shadow: 0 0 0 2px #fff; }
@media (max-width: 600px) { .lang-sw .lf { width: 24px; height: 16px; } .lang-sw a, .lang-sw button, .lang-sw span { padding: 4px 6px; } }

#btnLang[hidden] { display: none !important; }   /* 旧の EN ボタンは隠す（携帯の .btn の display が hidden を上書きしていた・2026-11-06） */

/* ログインしていない人の上の帯の札・下の帯（全部の画面・platform-nav.js が入れる・2026-11-15 中島「独立サイトにする」） */
.hdr-user .login-btn { font-weight: 800; color: var(--navy); text-decoration: none; padding: 8px 12px; border-radius: 10px; }
.hdr-user .login-btn:hover { background: #EEF2FF; }
.hdr-user .reg-btn { font-weight: 900; color: #fff; background: #D4610A; text-decoration: none; padding: 9px 16px; border-radius: 999px; box-shadow: 0 6px 16px rgba(212, 97, 10, .25); white-space: nowrap; }
.hdr-user .reg-btn:hover { filter: brightness(1.05); }
footer.site-foot { margin-top: 56px; background: #13203D; color: #CBD5E1; }
footer.site-foot .sf-in { max-width: 1180px; margin: 0 auto; padding: 28px 24px 34px; display: grid; gap: 14px; }
footer.site-foot .sf-brand b { display: block; color: #fff; font-size: 18px; font-weight: 900; letter-spacing: .03em; }
footer.site-foot .sf-brand span { font-size: 13px; }
footer.site-foot .sf-nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
footer.site-foot .sf-nav a, footer.site-foot .sf-op a { color: #E2E8F0; text-decoration: none; font-weight: 700; font-size: 14px; }
footer.site-foot .sf-nav a:hover, footer.site-foot .sf-op a:hover { text-decoration: underline; }
footer.site-foot .sf-op { font-size: 13px; }
footer.site-foot .sf-co { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: #CBD5E1; }
footer.site-foot .sf-co a { color: #E2E8F0; font-weight: 700; text-decoration: none; } footer.site-foot .sf-co a:hover { text-decoration: underline; }
@media (max-width: 640px) { footer.site-foot .sf-in { padding: 22px 16px 28px; } .hdr-user .reg-btn { padding: 8px 12px; font-size: 13px; } }

/* ===== 2段目の札（ログインした人だけ・2026-11-16 中島「メニューが多すぎて混乱する」「買う人、売る人の立場になって見直し」）=====
   上の帯は「買いたい」「売りたい」の2つ。その側の中の画面を、側の色の帯に札で並べる（いまの画面は側の色で塗る） */
nav.subnav { flex: 0 0 auto; border-bottom: 1px solid #E3E8F2; }
nav.subnav.sub-buy { background: #EAF1FF; } nav.subnav.sub-sell { background: #FFF1E3; } nav.subnav.sub-adm { background: #F3F5FA; }
nav.subnav .sn-in { max-width: 1180px; margin: 0 auto; padding: 9px 24px; display: flex; flex-wrap: wrap; gap: 8px; }
nav.subnav a { display: inline-flex; align-items: center; padding: 8px 18px; border-radius: 999px; background: #fff; color: #1F2A48; font-size: 14.5px; font-weight: 800; text-decoration: none; box-shadow: 0 1px 3px rgba(31, 42, 72, .08); white-space: nowrap; }
nav.subnav a:hover { box-shadow: 0 0 0 2px currentColor inset; }
nav.subnav.sub-buy a.on { background: #1D4ED8; color: #fff; } nav.subnav.sub-sell a.on { background: #C2560A; color: #fff; } nav.subnav.sub-adm a.on { background: #1F2A48; color: #fff; }
@media (max-width: 640px) { nav.subnav .sn-in { padding: 8px 12px; gap: 6px; flex-wrap: nowrap; overflow-x: auto; } nav.subnav a { padding: 7px 13px; font-size: 13.5px; } }
/* 当社だけの「管理」: 帯の右に小さく1つ */
.appbar .nav.plat a.adm.adm-one { margin-left: 10px; padding: 6px 13px; border: 2px solid #CBD2DE; border-radius: 999px; color: #1F2A48; font-weight: 800; }
.appbar .nav.plat a.adm.adm-one.on, .appbar .nav.plat a.adm.adm-one:hover { background: #1F2A48; border-color: #1F2A48; color: #fff; }
/* 上の帯の2つの入口の色は、行き先でなく側で決める（ログインした人の「買いたい」は案件を探す /deals へ行くため） */
.appbar .nav.plat a.pn[data-k="buy"] { --pc: #2563EB; } .appbar .nav.plat a.pn[data-k="sell"] { --pc: #D4610A; }
nav.subnav .sn-in { max-width: 1080px; padding-left: 28px; padding-right: 28px; }
/* スマホの上の帯: 名前・言語・ログインを1段にまとめ、2つの入口を2段目に（4段に重なっていた・2026-11-16） */
@media (max-width: 640px) {
  header.appbar { padding: 6px 10px !important; gap: 6px 8px !important; }
  .appbar a.brand.site .mark { width: 32px !important; height: 32px !important; }
  .appbar a.brand.site .bt b { font-size: 16px !important; }
  .appbar a.brand.site .bt small { display: none !important; }
  .appbar .lang-sw { margin: 0 !important; }
  .appbar .hdr-user { gap: 6px !important; }
  .appbar .hdr-user .user-chip .avatar { width: 26px; height: 26px; }
  .appbar .hdr-user .logout-btn, .appbar .hdr-user .login-btn { padding: 4px 8px !important; font-size: 11.5px !important; }
  .appbar .hdr-user .reg-btn { padding: 6px 10px !important; font-size: 12px !important; }
  .appbar .nav.plat a.pn { min-height: 48px !important; }
}
@media (max-width: 640px) {
  .appbar a.brand.site .bt b { font-size: 15px !important; }
  .appbar .lang-sw a, .appbar .lang-sw button { padding: 3px 4px !important; }
  .appbar .lang-sw .lf { width: 21px !important; height: 14px !important; }
  .appbar .hdr-user .user-chip { display: none !important; }   /* 名前の頭文字は出さず、ログアウトだけ（1段に収める） */
  header.appbar.plat-bar > .spacer { flex: 1 1 0 !important; min-width: 0 !important; }
}
@media (max-width: 640px) {   /* 帯の左右の余白（10px）に合わせ、入口の段がはみ出さないように */
  .appbar .nav.plat { flex-basis: calc(100% + 20px) !important; width: calc(100% + 20px) !important; margin: 6px -10px -6px !important; }
}
