/* COMNI Works の見た目（2026-10-08 作り直し）。
   方向：Apple のような「余白でつくる上質さ」。文字は大きすぎず、色は控えめ、境目は細い線。
   オレンジ（ロゴの色）は、未確認・今日・送信など「押してほしい・見てほしい」ところだけに使う。
   状態の色：水色＝相手の確認待ち、緑＝確認済み、赤＝不可・取り消し */
:root {
  --fg: #1d1d1f; --mid: #3a3a3c; --faint: #6e6e73; --hint: #aeaeb2;
  --sep: rgba(60, 60, 67, .16); --line-strong: rgba(60, 60, 67, .28);
  --bg: #fff; --tile: #f5f5f7; --tile-2: #ebebef; --raised: #fff;
  --fill: rgba(120, 120, 128, .12); --fill-2: rgba(120, 120, 128, .2);
  --field: rgba(120, 120, 128, .1); --on-fg: #fff; --seg-on: #fff; --press: rgba(120, 120, 128, .16);
  --glass: rgba(255, 255, 255, .78); --scrim: rgba(0, 0, 0, .28);
  --accent: #e8771a; --accent-ink: #b85a0c; --accent-soft: #fdf0e3;
  --blue: #2563a8; --blue-soft: #e8f0f9; --green: #1e7b3c; --green-soft: #e5f4ea; --red: #c9302c; --red-soft: #fcebea;
  --shadow-s: 0 1px 2px rgba(0, 0, 0, .04), 0 2px 8px rgba(0, 0, 0, .04);
  --shadow-l: 0 12px 40px rgba(0, 0, 0, .14), 0 2px 8px rgba(0, 0, 0, .06);
  --logo: url(/static/logo.png);
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', Meiryo, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --gutter: 20px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --fg: #f5f5f7; --mid: #d1d1d6; --faint: #98989f; --hint: #636366;
  --sep: rgba(84, 84, 88, .55); --line-strong: rgba(84, 84, 88, .8);
  --bg: #000; --tile: #1c1c1e; --tile-2: #2c2c2e; --raised: #1c1c1e;
  --fill: rgba(120, 120, 128, .24); --fill-2: rgba(120, 120, 128, .32);
  --field: rgba(118, 118, 128, .24); --on-fg: #1d1d1f; --seg-on: #636366; --press: rgba(120, 120, 128, .3);
  --glass: rgba(18, 18, 20, .78); --scrim: rgba(0, 0, 0, .55);
  --accent: #ff8a2a; --accent-ink: #ffa45c; --accent-soft: #33210f;
  --blue: #7fb6ec; --blue-soft: #10263d; --green: #30d158; --green-soft: #0f2e18; --red: #ff6961; --red-soft: #3a1512;
  --shadow-s: none; --shadow-l: 0 12px 40px rgba(0, 0, 0, .6);
  --logo: url(/static/logo-dark.png);
  color-scheme: dark;
} }
:root[data-theme="dark"] {
  --fg: #f5f5f7; --mid: #d1d1d6; --faint: #98989f; --hint: #636366;
  --sep: rgba(84, 84, 88, .55); --line-strong: rgba(84, 84, 88, .8);
  --bg: #000; --tile: #1c1c1e; --tile-2: #2c2c2e; --raised: #1c1c1e;
  --fill: rgba(120, 120, 128, .24); --fill-2: rgba(120, 120, 128, .32);
  --field: rgba(118, 118, 128, .24); --on-fg: #1d1d1f; --seg-on: #636366; --press: rgba(120, 120, 128, .3);
  --glass: rgba(18, 18, 20, .78); --scrim: rgba(0, 0, 0, .55);
  --accent: #ff8a2a; --accent-ink: #ffa45c; --accent-soft: #33210f;
  --blue: #7fb6ec; --blue-soft: #10263d; --green: #30d158; --green-soft: #0f2e18; --red: #ff6961; --red-soft: #3a1512;
  --shadow-s: none; --shadow-l: 0 12px 40px rgba(0, 0, 0, .6);
  --logo: url(/static/logo-dark.png);
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body { background: var(--bg); color: var(--fg); font-family: var(--font); -webkit-font-smoothing: antialiased; font-size: 16px; line-height: 1.6; letter-spacing: .01em; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
svg.i { width: 1em; height: 1em; flex-shrink: 0; vertical-align: -.14em; }

/* ── 枠：上の帯（スマホ）・左のメニュー（PC）・下の浮いたタブ ── */
.top { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 8px; padding: env(safe-area-inset-top) 12px 0; height: calc(52px + env(safe-area-inset-top));
  background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px); }
.top .logo { width: 84px; height: 22px; background: var(--logo) left center / contain no-repeat; flex-shrink: 0; margin-left: 8px; }
.top .ttl { flex: 1; min-width: 0; font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.top .back { display: inline-flex; align-items: center; gap: 2px; font-size: 16px; color: var(--accent-ink); flex-shrink: 0; background: none; border: none; cursor: pointer; padding: 8px 6px 8px 2px; max-width: 34%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .back svg { width: 22px; height: 22px; }
.top .act { flex-shrink: 0; display: flex; gap: 4px; }
.top.has-back .ttl { padding-right: 12%; }
.side { display: none; }
main.wrap, .wrap { max-width: 860px; margin: 0 auto; padding: 8px var(--gutter) calc(112px + env(safe-area-inset-bottom)); }

.tabbar { position: fixed; z-index: 14; left: 50%; transform: translateX(-50%); bottom: calc(12px + env(safe-area-inset-bottom)); width: min(420px, calc(100% - 32px)); height: 60px; padding: 6px;
  display: flex; gap: 4px; border-radius: 999px; background: rgba(18, 18, 20, .92); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: var(--shadow-l); }
:root[data-theme="dark"] .tabbar { background: rgba(44, 44, 46, .92); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tabbar { background: rgba(44, 44, 46, .92); } }
.tabbar a { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; border-radius: 999px; color: rgba(255, 255, 255, .6); font-size: 14px; font-weight: 600; position: relative;
  transition: flex .35s var(--ease), background .2s, color .2s; }
.tabbar a svg { width: 22px; height: 22px; }
.tabbar a span:not(.dot) { display: none; }
.tabbar a.on { flex: 1.7; background: #fff; color: #1d1d1f; }
.tabbar a.on span:not(.dot) { display: inline; }
.tabbar .dot { position: absolute; top: 7px; left: 50%; margin-left: 4px; min-width: 17px; height: 17px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; line-height: 17px; text-align: center; }
.tabbar a.on .dot { position: static; margin: 0 0 0 2px; }

@media (min-width: 900px) {
  :root { --gutter: 40px; }
  body.app { padding-left: 248px; }
  .tabbar { display: none; }
  .side { display: flex; flex-direction: column; position: fixed; top: 0; left: 0; bottom: 0; width: 248px; padding: 28px 16px 20px; border-right: .5px solid var(--sep); background: var(--bg); z-index: 16; }
  .side .logo { width: 120px; height: 32px; background: var(--logo) left center / contain no-repeat; margin: 0 12px 4px; }
  .side .app-name { font-size: 12.5px; color: var(--faint); margin: 0 12px 28px; letter-spacing: .08em; }
  .side a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; font-size: 15px; color: var(--mid); position: relative; margin-bottom: 2px; transition: background .15s; }
  .side a:hover { background: var(--fill); }
  .side a svg { width: 20px; height: 20px; color: var(--faint); }
  .side a.on { background: var(--fill); color: var(--fg); font-weight: 600; }
  .side a.on svg { color: var(--accent); }
  .side a .dot { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; line-height: 20px; text-align: center; }
  .side .me { margin-top: auto; padding: 14px 12px 0; border-top: .5px solid var(--sep); font-size: 13px; color: var(--faint); line-height: 1.5; }
  .side .me b { display: block; color: var(--fg); font-weight: 600; font-size: 14.5px; }
  .top .logo { display: none; }
  .top:not(.has-back) { display: none; }
  main.wrap, .wrap { padding-top: 36px; padding-bottom: 72px; }
}

/* ── 文字 ── */
h1 { font-size: 28px; font-weight: 700; line-height: 1.25; letter-spacing: .005em; }
h2 { font-size: 13px; font-weight: 600; color: var(--faint); margin: 36px 4px 10px; letter-spacing: .02em; }
.head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0 22px; }
.head h1 { min-width: 0; }
.sub { font-size: 14px; color: var(--faint); }
.note { font-size: 14px; color: var(--faint); line-height: 1.65; }
.loading { color: var(--faint); font-size: 15px; padding: 32px 4px; }
.empty { text-align: center; color: var(--faint); font-size: 15px; padding: 48px 16px; line-height: 1.7; }
@media (min-width: 900px) { h1 { font-size: 32px; } .head { margin-bottom: 28px; } }

/* ── 面・ボタン・札 ── */
.card { background: var(--tile); border-radius: 18px; padding: 18px 20px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px; border-radius: 999px; background: var(--fg); color: var(--on-fg); font-weight: 600; font-size: 15.5px;
  padding: 0 22px; border: none; cursor: pointer; white-space: nowrap; transition: transform .12s, opacity .15s, background .15s; }
.btn:active { transform: scale(.97); }
.btn svg { width: 18px; height: 18px; }
.btn.small { height: 34px; font-size: 14px; padding: 0 14px; }
.btn.ghost { background: var(--fill); color: var(--fg); }
.btn.accent { background: var(--accent); color: #fff; }
.btn.danger { background: var(--red-soft); color: var(--red); }
.btn.full { width: 100%; }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.link { color: var(--accent-ink); font-weight: 500; font-size: 15px; background: none; border: none; cursor: pointer; }
.icb { width: 38px; height: 38px; border-radius: 50%; border: none; background: none; color: var(--accent-ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; transition: background .15s; }
.icb:hover, .icb:active { background: var(--fill); }
.icb svg { width: 22px; height: 22px; }
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 2px 9px; background: var(--fill); color: var(--faint); white-space: nowrap; line-height: 1.5; letter-spacing: .02em; }
.pill.accent { background: var(--accent-soft); color: var(--accent-ink); }
.pill.green { background: var(--green-soft); color: var(--green); }
.pill.blue { background: var(--blue-soft); color: var(--blue); }
.pill.red { background: var(--red-soft); color: var(--red); }
.pill.solid { background: var(--accent); color: #fff; }
.count { display: inline-block; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; line-height: 20px; text-align: center; flex-shrink: 0; }
.err-box { background: var(--red-soft); color: var(--red); border-radius: 12px; padding: 12px 14px; font-size: 14.5px; margin-top: 14px; }
.ok-box { background: var(--green-soft); color: var(--green); border-radius: 12px; padding: 12px 14px; font-size: 14.5px; }
.toast { position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); transform: translate(-50%, 16px); background: rgba(29, 29, 31, .94); color: #fff; font-size: 14.5px; font-weight: 500;
  padding: 11px 18px; border-radius: 14px; opacity: 0; transition: .35s var(--ease); z-index: 70; pointer-events: none; max-width: calc(100% - 40px); text-align: center; box-shadow: var(--shadow-l); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--red); }

/* ── 検索・絞り込み ── */
.tools { display: grid; gap: 12px; margin-bottom: 20px; }
.search { display: flex; gap: 8px; }
.search input, .search select, .in { font: inherit; font-size: 16px; border: none; background: var(--field); border-radius: 12px; padding: 0 14px; height: 44px; color: var(--fg); -webkit-appearance: none; appearance: none; width: 100%; outline: none; transition: box-shadow .15s; }
textarea.in { height: auto; padding: 11px 14px; resize: vertical; line-height: 1.6; }
.search input { flex: 1; min-width: 0; height: 40px; padding-left: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238e8e93' stroke-width='2'%3E%3Ccircle cx='7' cy='7' r='5.5'/%3E%3Cpath d='m11 11 4 4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 12px 50%; }
.search select, select.in { width: auto; flex-shrink: 0; height: 40px; padding-right: 30px; font-size: 15px; background-image: linear-gradient(45deg, transparent 50%, var(--faint) 50%), linear-gradient(135deg, var(--faint) 50%, transparent 50%); background-position: calc(100% - 16px) 52%, calc(100% - 11px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
select.in.full { width: 100%; height: 44px; font-size: 16px; }
.in:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex-shrink: 0; height: 32px; font-size: 14px; border: none; border-radius: 999px; padding: 0 14px; background: var(--fill); color: var(--fg); cursor: pointer; transition: background .15s; }
.chip b { font-weight: 500; color: var(--faint); margin-left: 4px; font-variant-numeric: tabular-nums; }
.chip.on { background: var(--fg); color: var(--on-fg); }
.chip.on b { color: inherit; opacity: .6; }
.chip.warn b { color: var(--accent-ink); font-weight: 700; }
@media (min-width: 900px) { .chips { margin: 0; padding: 0; flex-wrap: wrap; } }

/* ── まとめの数字 ── */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 24px; }
.stats.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat { background: var(--tile); border-radius: 16px; padding: 14px 16px; border: none; text-align: left; cursor: pointer; transition: transform .12s; }
.stat:active { transform: scale(.98); }
.stat .k { display: block; font-size: 12.5px; color: var(--faint); line-height: 1.4; }
.stat .v { display: block; font-size: 26px; font-weight: 600; line-height: 1.25; font-variant-numeric: tabular-nums; margin-top: 2px; }
.stat.hot .v { color: var(--accent); }
.stat.hot .k { color: var(--accent-ink); }

/* ── 一覧（まとめた面に、細い線で区切った行） ── */
.list { display: grid; grid-template-columns: minmax(0, 1fr); background: var(--tile); border-radius: 18px; overflow: hidden; }
.row { display: block; width: 100%; text-align: left; background: none; border: none; padding: 15px 18px 15px 22px; cursor: pointer; position: relative; transition: background .15s; }
.row + .row::after { content: ''; position: absolute; top: 0; left: 22px; right: 0; height: .5px; background: var(--sep); }
.row:active, .row:hover { background: var(--press); }
.row .l1 { display: flex; align-items: center; gap: 8px; }
.row .name { font-size: 16px; font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .time { font-size: 13px; color: var(--faint); flex-shrink: 0; font-variant-numeric: tabular-nums; }
.row .l2 { display: flex; align-items: center; gap: 8px; margin-top: 3px; font-size: 14px; color: var(--faint); }
.row .l2 .nx { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.row .l2 .nx b { font-weight: 600; color: var(--mid); }
.row .l2 .lm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row.unread::before { content: ''; position: absolute; left: 9px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--accent); }
.row.done { opacity: .55; }
.list > .empty { background: none; }

/* ── 会社・現場の情報 ── */
.info { display: grid; }
.info p { display: flex; gap: 16px; font-size: 15px; padding: 9px 0; }
.info p + p { border-top: .5px solid var(--sep); }
.info p span { color: var(--faint); width: 56px; flex-shrink: 0; }
.info p a { color: var(--accent-ink); }
.acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }

/* ── 設定の行 ── */
.set-list { padding: 0 18px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 0; }
.set-row + .set-row { border-top: .5px solid var(--sep); }
.set-row > span:first-child { min-width: 0; }
.set-row span b { display: block; font-weight: 500; font-size: 15.5px; }
.set-row span small { display: block; font-size: 13px; color: var(--faint); margin-top: 1px; line-height: 1.5; }
.copy-box { display: flex; gap: 8px; margin-top: 12px; }
.copy-box input { flex: 1; min-width: 0; font-size: 14px; }

/* ── フォーム ── */
.f { margin-top: 20px; }
.f > label, .f .lb { display: block; font-size: 13.5px; font-weight: 600; color: var(--mid); margin-bottom: 8px; }
.f .lb small, .f > label small { font-weight: 400; color: var(--faint); margin-left: 6px; }
.f2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kinds { display: flex; flex-wrap: wrap; gap: 8px; }
.kinds button { border: none; background: var(--fill); border-radius: 999px; min-height: 36px; padding: 6px 15px; font-size: 14.5px; cursor: pointer; line-height: 1.3; transition: background .15s; }
.kinds button.on { background: var(--fg); color: var(--on-fg); font-weight: 600; }
.kinds button small.busy { display: block; font-size: 11px; color: var(--accent-ink); }
.kinds button.on small.busy { color: inherit; opacity: .7; }
.pw-wrap { position: relative; }
.pw-wrap .in { padding-right: 64px; }
.pw-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: none; background: none; color: var(--accent-ink); font-size: 14px; font-weight: 500; cursor: pointer; padding: 6px; }
.form-foot { margin-top: 28px; display: grid; gap: 10px; }
.seg { display: inline-flex; background: var(--fill); border-radius: 9px; padding: 2px; flex-shrink: 0; }
.seg label { font-size: 13.5px; padding: 4px 12px; border-radius: 7px; cursor: pointer; color: var(--fg); white-space: nowrap; transition: background .2s; }
.seg input { display: none; }
.seg label:has(input:checked) { background: var(--seg-on); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 0 0 .5px rgba(0, 0, 0, .04); }
.seg-k { font-size: 13px; color: var(--faint); flex-shrink: 0; }

/* ── 別の画面（入力・詳細） ── */
.sub-screen { padding-top: 12px; }
.sub-screen .sub-back { display: inline-flex; align-items: center; gap: 2px; font-size: 15px; font-weight: 500; }
.sub-screen .sub-back svg { width: 20px; height: 20px; }
.sub-screen h1 { font-size: 24px; margin: 10px 0 6px; }

/* ── 一覧の丸いアイコン ── */
.av { position: relative; flex-shrink: 0; width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.av svg { width: 22px; height: 22px; }
.av.chat { background: var(--fg); color: var(--bg); }
.av.chat.inv { background: var(--bg); color: var(--fg); }
.av.site { overflow: hidden; }
.av.site .cover { position: absolute; inset: 0; border-radius: 50%; }
.av.site .cover.art::before { display: none; }
.av.site .cover::after { background: rgba(0, 0, 0, .12); }
.av.site svg { position: relative; z-index: 1; color: rgba(255, 255, 255, .9); }

/* ── トーク（やり取りの一覧） ── */
.talk { margin: 0 calc(var(--gutter) * -1); }
.talk a { display: flex; align-items: center; gap: 14px; padding: 0 var(--gutter); transition: background .15s; }
.talk a:active, .talk a:hover { background: var(--tile); }
.talk .tk { flex: 1; min-width: 0; padding: 13px 0; border-bottom: .5px solid var(--sep); }
.talk a:last-child .tk { border-bottom: none; }
.talk .tk .l1 { display: flex; align-items: baseline; gap: 8px; }
.talk .tk .nm { flex: 1; min-width: 0; font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.talk .tk .tm { font-size: 12.5px; color: var(--faint); flex-shrink: 0; }
.talk .tk .tm.new { color: var(--accent-ink); font-weight: 600; }
.talk .tk .who { font-size: 12.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.talk .tk .l3 { display: flex; align-items: center; gap: 8px; margin-top: 1px; }
.talk .tk .lm { flex: 1; min-width: 0; font-size: 14px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.talk a.unread .lm { color: var(--fg); }
.talk a.done { opacity: .55; }
@media (min-width: 900px) { .talk { margin: 0; background: var(--tile); border-radius: 18px; overflow: hidden; } .talk a { padding: 0 20px; } }

/* ── 現場の表紙：写真か、コンクリートの面に安全柵のテープ ── */
.cover { position: relative; overflow: hidden; background-color: #3c3f42; background-size: cover; background-position: center; }
.cover.art { background-image:
  radial-gradient(circle at 20% 30%, rgba(255, 255, 255, .09) 0 1px, transparent 1.6px),
  radial-gradient(circle at 70% 60%, rgba(0, 0, 0, .22) 0 1.2px, transparent 2px),
  radial-gradient(circle at 40% 80%, rgba(255, 255, 255, .07) 0 .8px, transparent 1.4px),
  linear-gradient(135deg, var(--c1, #5b5f63), var(--c2, #3c3f42));
  background-size: 23px 19px, 31px 27px, 17px 23px, auto; }
.cover.art::before { content: ''; position: absolute; top: -26px; right: -64px; width: 200px; height: 26px; transform: rotate(40deg);
  background: repeating-linear-gradient(90deg, #e8771a 0 22px, #141414 22px 44px); opacity: .95; }
.cover.art.t1 { --c1: #6a6560; --c2: #45413c; } .cover.art.t2 { --c1: #596168; --c2: #363c42; } .cover.art.t3 { --c1: #64625a; --c2: #403f39; }
.cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, .55)); }
.cover .cv-t { position: absolute; left: 18px; right: 18px; bottom: 14px; z-index: 1; color: #fff; }
.cover .cv-t b { display: block; font-size: 18px; font-weight: 600; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cover .cv-t small { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: rgba(255, 255, 255, .85); }
.cover .cv-badge { position: absolute; left: 14px; top: 14px; z-index: 1; display: flex; gap: 6px; }

/* ── 会社のページ：やり取り（チャット＋現場のカード） ── */
.org-hero { margin: 4px 0 28px; }
.org-hero .cat { margin-bottom: 8px; display: flex; gap: 6px; }
.org-hero .quick { display: flex; gap: 10px; margin-top: 18px; }
.org-hero .quick a, .org-hero .quick button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; background: var(--tile); border-radius: 14px; padding: 12px 6px 10px; border: none; cursor: pointer; color: var(--accent-ink); font-size: 12.5px; font-weight: 500; }
.org-hero .quick svg { width: 22px; height: 22px; }
.sites { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
@media (min-width: 900px) { .sites { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.site-card { display: block; border-radius: 18px; overflow: hidden; background: var(--tile); transition: transform .15s var(--ease); }
.site-card:active { transform: scale(.985); }
.site-card .cover { height: 120px; }
.site-card .sc-b { display: flex; align-items: center; gap: 8px; padding: 12px 16px 13px; font-size: 14px; color: var(--faint); }
.site-card .sc-b .nx { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-card .sc-b .nx b { color: var(--fg); font-weight: 600; }
.site-card.done { opacity: .6; }
.chat-card { display: flex; align-items: center; gap: 14px; background: var(--fg); color: var(--bg); border-radius: 18px; padding: 16px 18px; transition: transform .15s var(--ease); }
.chat-card:active { transform: scale(.985); }
.chat-card .av { width: 44px; height: 44px; }
.chat-card .ttl { flex: 1; min-width: 0; }
.chat-card .ttl b { display: block; font-size: 16px; font-weight: 600; }
.chat-card .ttl small { display: block; font-size: 13px; opacity: .65; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-card .chev { opacity: .45; }
.chat-card .chev svg { width: 18px; height: 18px; }
.more-link { display: flex; align-items: center; justify-content: center; gap: 4px; width: 100%; margin-top: 14px; padding: 10px; border: none; background: none; color: var(--accent-ink); font-size: 14.5px; cursor: pointer; }

/* ════ スレッドの画面（2026-10-08） ════ */
body.thread-page .top { display: none; }
.thhead { position: fixed; top: 0; left: 0; right: 0; z-index: 20; background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
  padding-top: env(safe-area-inset-top); transition: transform .38s var(--ease), opacity .3s; box-shadow: 0 .5px 0 var(--sep); }
.thhead.away { transform: translateY(-100%); opacity: 0; pointer-events: none; }
.thhead .bar { display: flex; align-items: center; gap: 4px; height: 52px; padding: 0 8px; max-width: 860px; margin: 0 auto; }
.thhead .back { display: inline-flex; align-items: center; border: none; background: none; color: var(--accent-ink); cursor: pointer; padding: 8px 4px; flex-shrink: 0; }
.thhead .back svg { width: 24px; height: 24px; }
.thhead .ttl { flex: 1; min-width: 0; text-align: center; line-height: 1.25; }
.thhead .ttl b { display: block; font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thhead .ttl small { display: block; font-size: 12px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thhead .acts2 { display: flex; flex-shrink: 0; min-width: 76px; justify-content: flex-end; }
.thhead .tabs-row { max-width: 860px; margin: 0 auto; padding: 2px var(--gutter) 10px; }
@media (min-width: 900px) { body.app .thhead { left: 248px; } }
.tabs2 { display: flex; background: var(--fill); border-radius: 10px; padding: 2px; }
.tabs2 button { flex: 1; height: 32px; border: none; background: none; font-size: 14px; font-weight: 500; color: var(--fg); border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: background .2s; }
.tabs2 button.on { background: var(--seg-on); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 0 0 .5px rgba(0, 0, 0, .04); }
.tabs2 .count { min-width: 18px; height: 18px; line-height: 18px; font-size: 11px; }
body.thread-page main.wrap { max-width: 760px; padding-top: calc(112px + env(safe-area-inset-top)); padding-bottom: calc(120px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) { body.thread-page main.wrap { padding-top: 124px; } }

/* チャットのタブ */
.tl { display: flex; flex-direction: column; gap: 4px; }
.tl .day { align-self: center; font-size: 12px; font-weight: 500; color: var(--faint); margin: 18px 0 8px; }
.msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 78%; margin-top: 6px; }
.msg.me { align-self: flex-end; align-items: flex-end; }
.msg .who { font-size: 12px; color: var(--faint); margin: 0 12px 3px; }
.msg .bb { background: var(--tile); border-radius: 18px; padding: 8px 14px; font-size: 16px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.msg.me .bb { background: var(--fg); color: var(--on-fg); }
.msg.mine:not(.me) .bb { background: var(--bg); box-shadow: inset 0 0 0 1px var(--sep); }
.msg .meta { font-size: 11.5px; color: var(--faint); margin: 3px 12px 0; }
.msg .meta .rd { color: var(--accent-ink); font-weight: 500; }
.src { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; color: var(--blue); margin: 0 12px 3px; }
.src svg { width: 13px; height: 13px; }
.rq { display: inline-flex; align-items: center; gap: 6px; border: none; background: none; color: var(--faint); font-size: 12.5px; padding: 0 12px 4px; cursor: pointer; text-align: left; max-width: 100%; }
.rq svg { width: 14px; height: 14px; color: var(--accent); flex-shrink: 0; }
.rq span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-bottom: 1px solid var(--sep); }
.files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.files img.pic { display: block; max-width: 240px; max-height: 240px; border-radius: 14px; }
.files a.file { display: inline-flex; align-items: center; gap: 8px; background: var(--bg); color: var(--fg); border-radius: 12px; padding: 8px 12px; font-size: 14px; font-weight: 500; }
.files a.file svg { width: 18px; height: 18px; color: var(--red); }
.msg.me .files a.file { background: rgba(255, 255, 255, .12); color: var(--on-fg); }
.files .gone { font-size: 13px; color: var(--faint); }
.sys { align-self: center; font-size: 12.5px; color: var(--faint); text-align: center; margin: 10px 0; }
/* 予定の動き（チャットの中の1行） */
.evn { align-self: center; display: flex; align-items: center; gap: 12px; width: min(100%, 520px); margin: 12px 0; border: none; background: var(--tile); border-radius: 16px; padding: 12px 14px; text-align: left; cursor: pointer; color: var(--fg); transition: transform .12s; }
.evn:active { transform: scale(.985); }
.evn.old { opacity: .5; }
.evn .i { width: 34px; height: 34px; border-radius: 10px; background: var(--bg); display: flex; align-items: center; justify-content: center; color: var(--accent); flex-shrink: 0; }
.evn .i svg { width: 18px; height: 18px; }
.evn .b { flex: 1; min-width: 0; font-size: 14.5px; line-height: 1.45; }
.evn .b b { font-weight: 600; }
.evn .b small { display: block; font-size: 12px; color: var(--faint); }
.evn .chev { color: var(--hint); display: flex; }
.evn .chev svg { width: 16px; height: 16px; }

/* スレッドのタブ：予定のカード */
.evts { display: flex; flex-direction: column; gap: 14px; }
.evt { background: var(--tile); border-radius: 20px; overflow: hidden; transition: box-shadow .4s; }
.evt.flash { box-shadow: 0 0 0 2px var(--accent); }
.ev { padding: 18px 20px 14px; position: relative; }
.ev .eh { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--faint); }
.ev .eh .who { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev .eh .src { margin: 0; }
.ev .ew { font-size: 21px; font-weight: 700; margin-top: 8px; line-height: 1.3; font-variant-numeric: tabular-nums; letter-spacing: .005em; }
.ev .ew s { display: block; color: var(--faint); font-weight: 400; font-size: 14px; text-decoration-thickness: 1px; }
.ev .et { font-size: 15.5px; font-weight: 600; margin-top: 4px; }
.ev .et s, .ev .ed s { color: var(--faint); font-weight: 400; margin-right: 6px; }
.ev .ed { font-size: 14.5px; color: var(--faint); margin-top: 6px; white-space: pre-wrap; }
.ev .staff { margin-top: 8px; }
.ev .en { font-size: 14.5px; color: var(--mid); margin-top: 12px; padding: 10px 14px; background: var(--bg); border-radius: 12px; white-space: pre-wrap; }
.ev .ack { margin-top: 14px; font-size: 13.5px; font-weight: 500; display: flex; align-items: flex-start; gap: 6px; line-height: 1.5; }
.ev .ack svg { width: 16px; height: 16px; margin-top: 2px; flex-shrink: 0; }
.ev .ack.done { color: var(--green); }
.ev .ack.wait { color: var(--blue); }
.ev .ack.ng { color: var(--red); }
.ev .ack.old { color: var(--faint); }
.ev .ack em { display: block; font-style: normal; font-weight: 400; color: var(--mid); }
.ev .ack em.hint { color: var(--red); font-weight: 500; }
.ev .ef { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: .5px solid var(--sep); }
.ev .ef .grow { flex: 1; }
.ev .ef .btn.small { height: 36px; padding: 0 18px; font-size: 14.5px; }
.ev .ef .ng-btn { background: var(--bg); color: var(--red); }
.ev .tb { display: inline-flex; align-items: center; gap: 5px; height: 36px; min-width: 36px; justify-content: center; padding: 0 9px; white-space: nowrap; border: none; background: none; border-radius: 10px; color: var(--faint); font-size: 13.5px; cursor: pointer; transition: background .15s, color .15s; }
.ev .tb:hover { background: var(--fill); }
.ev .tb svg { width: 19px; height: 19px; }
.ev .tb.on { color: var(--accent-ink); }
.ev.cancel .ew, .ev.cancel .et { text-decoration: line-through; color: var(--faint); }
.ev.cancel .ew s { text-decoration: none; }
/* カードのコメント（開いたときだけ） */
.cmts { background: var(--bg); margin: 0 10px 10px; border-radius: 14px; padding: 4px 14px 10px; animation: open .3s var(--ease); }
@keyframes open { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.cm { padding: 10px 0; }
.cm + .cm { border-top: .5px solid var(--sep); }
.cm .cw { font-size: 12px; color: var(--faint); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cm .cw b { color: var(--fg); font-size: 13.5px; font-weight: 600; }
.cm .cb { font-size: 15px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; margin-top: 2px; }
.cm .meta { font-size: 11.5px; color: var(--faint); margin-top: 2px; }
.cm .meta .rd { color: var(--accent-ink); }
.cm.hist { font-size: 12.5px; color: var(--faint); display: flex; flex-direction: column; gap: 2px; }
.cm.hist .h { display: flex; gap: 6px; align-items: flex-start; }
.cm.hist svg { width: 14px; height: 14px; margin-top: 3px; flex-shrink: 0; }
.cm.hist .ok { color: var(--green); }
.cm.hist .ng { color: var(--red); }
.cm-none { font-size: 13.5px; color: var(--faint); padding: 12px 0 4px; }
.cm-in { display: flex; align-items: flex-end; gap: 8px; margin-top: 8px; }
.cm-in textarea { flex: 1; min-width: 0; font: inherit; font-size: 16px; line-height: 1.45; border: none; background: var(--field); border-radius: 18px; padding: 8px 14px; color: var(--fg); resize: none; max-height: 120px; outline: none; }
/* 完了済み */
.done-tg { display: flex; justify-content: space-between; align-items: center; width: 100%; border: none; background: none; padding: 18px 4px 8px; font-size: 13px; font-weight: 600; color: var(--faint); cursor: pointer; letter-spacing: .02em; }
.done-tg span { display: inline-flex; align-items: center; gap: 2px; font-weight: 500; color: var(--accent-ink); font-size: 14px; }
.done-tg svg { width: 16px; height: 16px; transition: transform .25s var(--ease); }
.done-tg.open svg { transform: rotate(90deg); }
.done-list { background: var(--tile); border-radius: 18px; overflow: hidden; animation: open .3s var(--ease); }
.done-row { display: flex; align-items: center; gap: 12px; width: 100%; border: none; background: none; padding: 13px 18px; text-align: left; font-size: 14.5px; cursor: pointer; color: var(--fg); position: relative; }
.done-row + .done-row::before, .done-list .evt + .done-row::before { content: ''; position: absolute; top: 0; left: 18px; right: 0; height: .5px; background: var(--sep); }
.done-row .d { font-weight: 600; flex-shrink: 0; width: 72px; font-variant-numeric: tabular-nums; }
.done-row .t { flex: 1; min-width: 0; color: var(--faint); line-height: 1.45; }
.done-row .n { display: inline-flex; align-items: center; gap: 3px; font-size: 12.5px; color: var(--faint); }
.done-row .n svg { width: 14px; height: 14px; }
.done-list .evt { border-radius: 0; background: var(--bg); margin: 0 10px 10px; border-radius: 16px; }
/* スレッドのタブの下の「予定を追加」 */
.fab { position: fixed; z-index: 14; left: 50%; transform: translateX(-50%); bottom: calc(20px + env(safe-area-inset-bottom)); display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 22px;
  border: none; border-radius: 999px; background: var(--fg); color: var(--on-fg); font-size: 15px; font-weight: 600; cursor: pointer; box-shadow: var(--shadow-l); transition: transform .15s; }
.fab:active { transform: translateX(-50%) scale(.96); }
.fab svg { width: 18px; height: 18px; }
@media (min-width: 900px) { body.app .fab { left: calc(50% + 124px); } }

/* 入力欄（チャットのタブ） */
.composer { position: fixed; left: 0; right: 0; bottom: 0; z-index: 14; background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
  box-shadow: 0 -.5px 0 var(--sep); padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) { body.app .composer { left: 248px; } }
.composer .inner { max-width: 760px; margin: 0 auto; }
.composer .opts { display: flex; align-items: center; gap: 8px; margin: 0 4px 8px; overflow-x: auto; scrollbar-width: none; }
.composer .opts::-webkit-scrollbar { display: none; }
.composer .in-row { display: flex; align-items: flex-end; gap: 4px; }
.composer textarea { flex: 1; min-width: 0; font: inherit; font-size: 16px; border: none; background: var(--bg); box-shadow: inset 0 0 0 1px var(--sep); border-radius: 20px; padding: 8px 15px; color: var(--fg); resize: none; max-height: 140px; outline: none; line-height: 1.45; margin: 0 4px; }
.ic { width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%; border: none; background: none; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--faint); transition: background .15s, color .15s; }
.ic:hover { background: var(--fill); color: var(--fg); }
.ic svg { width: 23px; height: 23px; }
.ic.send { background: var(--accent); color: #fff; width: 34px; height: 34px; margin-bottom: 1px; }
.ic.send svg { width: 18px; height: 18px; }
.ic.send:disabled { opacity: .4; }
.pending-files { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 4px; }
.pending-files:not(:empty) { margin-bottom: 8px; }
.pending-files span { font-size: 13px; background: var(--fill); border-radius: 999px; padding: 3px 6px 3px 12px; display: inline-flex; align-items: center; gap: 2px; }
.pending-files button { border: none; background: none; color: var(--faint); cursor: pointer; width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; }
.pending-files button svg { width: 14px; height: 14px; }
.drop-on::after { content: 'ここにファイルを離すと添付します'; position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent-ink); font-weight: 600; font-size: 18px; border: 2px dashed var(--accent); }

/* ── カレンダー ── */
.cal-head { display: flex; align-items: center; gap: 6px; margin-bottom: 14px; }
.cal-head .mon { font-size: 21px; font-weight: 700; flex: 1; letter-spacing: .01em; font-variant-numeric: tabular-nums; }
.cal-head .nav { width: 36px; height: 36px; border-radius: 50%; border: none; background: none; cursor: pointer; color: var(--accent-ink); display: inline-flex; align-items: center; justify-content: center; }
.cal-head .nav:hover { background: var(--fill); }
.cal-head .nav svg { width: 20px; height: 20px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); row-gap: 2px; }
.cal .wd { text-align: center; font-size: 11.5px; font-weight: 600; color: var(--faint); padding: 4px 0 8px; }
.cal .wd.sun { color: var(--red); } .cal .wd.sat { color: var(--blue); }
.cal .d { min-height: 56px; border: none; background: none; border-radius: 12px; padding: 4px 2px; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; min-width: 0; transition: background .15s; }
.cal .d .n { font-size: 16px; width: 32px; height: 32px; line-height: 32px; border-radius: 50%; font-variant-numeric: tabular-nums; transition: background .15s; }
.cal .d.out .n { color: var(--hint); }
.cal .d.sun .n { color: var(--red); } .cal .d.sat .n { color: var(--blue); }
.cal .d.today .n { color: var(--accent); font-weight: 700; }
.cal .d.sel .n { background: var(--fg); color: var(--bg); font-weight: 600; }
.cal .d.today.sel .n { background: var(--accent); color: #fff; }
.cal .d .dots { display: flex; gap: 3px; flex-wrap: wrap; justify-content: center; height: 6px; }
.cal .d .dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--hint); }
.cal .d .dots i.me { background: var(--accent); }
.cal .d .dots i.wait { background: var(--blue); }
.cal .d .dots i.done { background: var(--green); }
.cal .d .dots i.ng, .cal .d .dots i.cancel { background: var(--red); }
.cal .d .lbl, .cal .d .more { display: none; }
@media (min-width: 900px) {
  .cal { gap: 0; border-top: .5px solid var(--sep); border-left: .5px solid var(--sep); }
  .cal .wd { border-right: .5px solid var(--sep); border-bottom: .5px solid var(--sep); padding: 8px 0; }
  .cal .d { min-height: 112px; align-items: stretch; padding: 6px; border-radius: 0; border-right: .5px solid var(--sep); border-bottom: .5px solid var(--sep); gap: 3px; }
  .cal .d:hover { background: var(--tile); }
  .cal .d.out { background: color-mix(in srgb, var(--tile) 45%, transparent); }
  .cal .d.sel { background: var(--accent-soft); }
  .cal .d .n { align-self: flex-end; font-size: 13.5px; width: 26px; height: 26px; line-height: 26px; }
  .cal .d.sel .n { background: none; color: inherit; }
  .cal .d.today .n { background: var(--accent); color: #fff; }
  .cal .d .dots { display: none; }
  .cal .d .lbl { display: flex; align-items: center; gap: 5px; font-size: 12px; line-height: 1.5; text-align: left; padding: 1px 4px; border-radius: 5px; white-space: nowrap; overflow: hidden; color: var(--mid); }
  .cal .d .lbl::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--hint); flex-shrink: 0; }
  .cal .d .lbl.me::before { background: var(--accent); }
  .cal .d .lbl.wait::before { background: var(--blue); }
  .cal .d .lbl.done::before { background: var(--green); }
  .cal .d .lbl.ng::before, .cal .d .lbl.cancel::before { background: var(--red); }
  .cal .d .lbl.cancel { text-decoration: line-through; color: var(--faint); }
  .cal .d .more { display: block; font-size: 11.5px; color: var(--faint); text-align: left; padding-left: 4px; }
}
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--faint); margin: 16px 2px 0; }
.legend i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; }
.view-seg { margin-left: auto; align-self: center; }
/* 予定の行（その日の一覧・一覧表示） */
.agenda { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.agenda .ad { font-size: 13px; font-weight: 600; color: var(--faint); margin: 22px 4px 0; }
.agenda .ad.today { color: var(--accent-ink); }
.ag { display: flex; gap: 14px; align-items: flex-start; background: var(--tile); border-radius: 16px; padding: 14px 16px; width: 100%; border: none; text-align: left; cursor: pointer; transition: transform .12s; }
.ag:active { transform: scale(.985); }
.ag .tm { width: 56px; white-space: nowrap; flex-shrink: 0; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.45; }
.ag .tm small { display: block; font-weight: 400; color: var(--faint); font-size: 12.5px; }
.ag .bd { flex: 1; min-width: 0; font-size: 15px; line-height: 1.45; }
.ag .bd b { font-weight: 600; }
.ag .bd .o { display: block; font-size: 13px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.ag.cancel .bd b { text-decoration: line-through; color: var(--faint); }
.staff { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; color: var(--faint); flex-wrap: wrap; }
.staff i.ok { font-style: normal; color: var(--green); font-weight: 700; margin-left: 1px; }
.staff b { font-weight: 600; margin-left: 4px; }
.staff.short b, .staff.none { color: var(--accent-ink); font-weight: 500; }

/* その日の予定：PC は右から出る横の面、スマホは下から出る面（2026-10-08） */
.scrim { position: fixed; inset: 0; z-index: 40; background: var(--scrim); opacity: 0; transition: opacity .3s; }
.scrim.on { opacity: 1; }
.daypanel { position: fixed; z-index: 61; background: var(--bg); display: flex; flex-direction: column; box-shadow: var(--shadow-l); transition: transform .42s var(--ease), opacity .3s; }
.daypanel .dp-h { display: flex; align-items: center; gap: 4px; padding: 14px 12px 10px 20px; }
.daypanel .dp-h .dt { flex: 1; min-width: 0; }
.daypanel .dp-h .dt b { display: block; font-size: 19px; font-weight: 700; letter-spacing: .01em; }
.daypanel .dp-h .dt small { display: block; font-size: 12.5px; color: var(--faint); }
.daypanel .dp-b { flex: 1; min-height: 0; display: flex; }
.daypanel .dp-b > .pg-vp { flex: 1; min-height: 0; }
.daypanel .dp-b .pg-track { height: 100%; }
.daypanel .dp-pg { height: 100%; overflow-y: auto; padding: 4px 20px 24px; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.daypanel .dp-f { padding: 12px 20px calc(16px + env(safe-area-inset-bottom)); border-top: .5px solid var(--sep); }
.daypanel .grab { width: 36px; height: 5px; border-radius: 3px; background: var(--fill-2); margin: 8px auto 0; }
@media (max-width: 899px) {
  .daypanel { left: 0; right: 0; bottom: 0; max-height: 82vh; min-height: 55vh; border-radius: 22px 22px 0 0; transform: translateY(105%); }
  .daypanel.on { transform: none; }
}
@media (min-width: 900px) {
  .daypanel { top: 12px; right: 12px; bottom: 12px; width: 400px; border-radius: 22px; transform: translateX(24px); opacity: 0; pointer-events: none; }
  .daypanel.on { transform: none; opacity: 1; pointer-events: auto; }
  .daypanel .grab { display: none; }
  .scrim { background: transparent; }
}
.pg-vp { overflow: hidden; touch-action: pan-y; }
.pg-track { display: flex; width: 300%; transform: translateX(-33.3333%); will-change: transform; }
.pg-track > .pg { width: 33.3333%; flex: none; min-width: 0; }
.daypanel .dp-b.slide-l { animation: slideL .32s var(--ease); }
.daypanel .dp-b.slide-r { animation: slideR .32s var(--ease); }
@keyframes slideL { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes slideR { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }

/* ── 自分の担当 ── */
.job { background: var(--tile); border-radius: 18px; padding: 18px 20px; }
.job.today { box-shadow: inset 0 0 0 1.5px var(--accent); }
.job.past { opacity: .5; }
.job.cancel .jw, .job.cancel .jt { text-decoration: line-through; color: var(--faint); }
.job .jh { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.job .jh:empty { display: none; }
.job .jw { font-size: 20px; font-weight: 700; line-height: 1.35; margin-top: 4px; font-variant-numeric: tabular-nums; }
.job .jt { font-size: 15.5px; font-weight: 600; margin-top: 2px; }
.job .jo { display: flex; align-items: center; gap: 5px; font-size: 14px; color: var(--faint); margin-top: 6px; flex-wrap: wrap; }
.job .jo svg { width: 15px; height: 15px; }
.job .jd { font-size: 14px; color: var(--mid); margin-top: 8px; white-space: pre-wrap; }
.job .jf { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; padding-top: 12px; border-top: .5px solid var(--sep); flex-wrap: wrap; }

/* ── 人員の割り振り ── */
.stepper { display: inline-flex; align-items: center; background: var(--fill); border-radius: 10px; }
.stepper button { width: 38px; height: 34px; border: none; background: none; font-size: 18px; cursor: pointer; color: var(--fg); }
.stepper input { width: 32px; text-align: center; border: none; background: none; font: inherit; font-weight: 600; font-size: 16px; color: var(--fg); -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* ── ログイン ── */
.auth { max-width: 380px; margin: 0 auto; padding: calc(72px + env(safe-area-inset-top)) 24px 48px; }
.auth .logo-big { width: 160px; height: 70px; background: var(--logo) center / contain no-repeat; margin: 0 auto 8px; }
.auth .app-name { text-align: center; font-size: 13px; color: var(--faint); letter-spacing: .14em; margin-bottom: 40px; }

/* ── 案内のカード ── */
.install { position: fixed; left: 16px; right: 16px; bottom: calc(86px + env(safe-area-inset-bottom)); z-index: 30; background: var(--raised); border-radius: 18px; box-shadow: var(--shadow-l); padding: 12px 12px 12px 14px; display: flex; align-items: center; gap: 12px; }
.install img { width: 40px; height: 40px; border-radius: 10px; }
.install p { flex: 1; font-size: 13px; color: var(--faint); line-height: 1.5; }
.install p b { display: block; color: var(--fg); font-size: 14.5px; font-weight: 600; }
.install .x, .push-card .x { border: none; background: none; color: var(--faint); cursor: pointer; width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; }
.install .x svg, .push-card .x svg { width: 16px; height: 16px; }
.push-card { display: flex; align-items: center; gap: 12px; background: var(--tile); border-radius: 16px; padding: 12px 10px 12px 16px; margin-bottom: 20px; }
.push-card p { flex: 1; font-size: 13px; color: var(--faint); line-height: 1.5; }
.push-card p b { display: block; font-size: 14.5px; color: var(--fg); font-weight: 600; }
.wait-card { background: var(--tile); border-radius: 20px; padding: 36px 24px; text-align: center; }
.wait-card .ic3 { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.wait-card .ic3 svg { width: 26px; height: 26px; }
.wait-card h2 { font-size: 19px; color: var(--fg); margin: 0 0 8px; letter-spacing: 0; }
.wait-card p { font-size: 14.5px; color: var(--faint); }
.req-card { display: flex; align-items: center; gap: 12px; background: var(--accent-soft); color: var(--accent-ink); border-radius: 16px; padding: 14px 16px; margin-bottom: 20px; font-weight: 600; font-size: 15px; width: 100%; border: none; cursor: pointer; text-align: left; }
.req-card svg { width: 18px; height: 18px; }
.code-box { font-size: 28px; font-weight: 700; letter-spacing: .16em; text-align: center; background: var(--tile); border-radius: 16px; padding: 18px; font-family: ui-monospace, 'SF Mono', Menlo, monospace; }
.pick { display: grid; gap: 10px; }
.pick label { display: flex; gap: 12px; align-items: flex-start; background: var(--tile); border-radius: 14px; padding: 14px 16px; cursor: pointer; box-shadow: inset 0 0 0 1.5px transparent; transition: box-shadow .15s, background .15s; }
.pick label:has(input:checked) { box-shadow: inset 0 0 0 1.5px var(--accent); background: var(--accent-soft); }
.pick input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--accent); flex-shrink: 0; }
.pick b { display: block; font-size: 15.5px; font-weight: 600; }
.pick small { display: block; font-size: 13px; color: var(--faint); margin-top: 2px; line-height: 1.55; }

/* ── 有料プラン ── */
.plan-card { display: flex; align-items: center; gap: 14px; background: var(--fg); color: var(--bg); border-radius: 18px; padding: 16px 18px; margin-bottom: 24px; transition: transform .15s; }
.plan-card:active { transform: scale(.985); }
.plan-card .ic2 { width: 40px; height: 40px; border-radius: 12px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.plan-card .ic2 svg { width: 20px; height: 20px; }
.plan-card b { display: block; font-size: 15px; font-weight: 600; }
.plan-card small { display: block; font-size: 12.5px; opacity: .65; }
.plan-card .chev { opacity: .45; display: flex; }
.plan-card .chev svg { width: 18px; height: 18px; }
.plan-hero { background: #0b0b0c; color: #fff; border-radius: 22px; padding: 32px 26px; }
.plan-hero .k { font-size: 13px; font-weight: 600; color: #ffa45c; letter-spacing: .08em; }
.plan-hero h1 { color: #fff; font-size: 23px; margin-top: 10px; line-height: 1.35; }
.plan-hero .price { display: flex; align-items: baseline; gap: 4px; margin-top: 22px; }
.plan-hero .price b { font-size: 40px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.plan-hero .price span { font-size: 14px; color: #a1a1a6; }
.points { display: grid; gap: 22px; margin-top: 32px; }
.points div { display: flex; gap: 16px; }
.points i { width: 40px; height: 40px; border-radius: 12px; background: var(--tile); color: var(--accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.points i svg { width: 20px; height: 20px; }
.points b { display: block; font-size: 15.5px; font-weight: 600; }
.points span { font-size: 14px; color: var(--faint); }

/* ── 規約などの文書 ── */
.doc { max-width: 700px; margin: 0 auto; padding: calc(28px + env(safe-area-inset-top)) 24px 72px; font-size: 15.5px; line-height: 1.85; }
.doc h1 { font-size: 26px; margin: 20px 0 6px; }
.doc h2 { font-size: 16px; color: var(--fg); margin: 32px 0 6px; letter-spacing: 0; }
.doc p { margin: 8px 0; }
.th-cover { height: 180px; border-radius: 18px; }
.ev .staff-row { margin-top: 8px; }
.ag .mr { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.ag .mr .as { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; height: 28px; border: none; border-radius: 999px; background: var(--bg); padding: 0 11px; font-size: 12.5px; font-weight: 600; color: var(--accent-ink); cursor: pointer; }
.ag .mr .as svg { width: 15px; height: 15px; }
.ag .mr .as.need { background: var(--accent-soft); }
.large-title .top .ttl { opacity: 0; transition: opacity .25s; }
.large-title.scrolled .top .ttl { opacity: 1; }
.top { transition: box-shadow .25s; }
.scrolled .top, body:not(.large-title) .top { box-shadow: 0 .5px 0 var(--sep); }
/* 下のタブの画面（2026-10-08）：上の帯は出さない。取引先・担当のタブだけ、ロゴを本文と一緒に置く */
body.tabs .top { display: none; }
body.tabs main.wrap { padding-top: calc(4px + env(safe-area-inset-top)); }
.brand { height: 52px; display: flex; align-items: center; }
.brand .logo { width: 84px; height: 22px; background: var(--logo) left center / contain no-repeat; }
@media (min-width: 900px) { .brand { display: none; } body.tabs main.wrap { padding-top: 36px; } }
.tabp:not(.brandless) > .head:first-child { margin-top: 14px; }
.tabbar a { transition: flex .45s cubic-bezier(.34, 1.36, .64, 1), background .25s, color .25s; }
/* ── 添付のサムネイルと拡大表示（2026-10-08） ── */
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; }
.thumbs.strip { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 12px; }
.thumbs .th { position: relative; aspect-ratio: 1; border: none; padding: 0; border-radius: 12px; overflow: hidden; background: var(--fill); cursor: pointer; }
.thumbs .th img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s var(--ease); }
.thumbs .th:hover img { transform: scale(1.04); }
.thumbs .th .pdf { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 8px; color: var(--red); }
.thumbs .th .pdf svg { width: 26px; height: 26px; }
.thumbs .th .pdf small { font-size: 10.5px; color: var(--faint); line-height: 1.3; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thumbs .more-n { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); color: #fff; font-size: 17px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.viewer { position: fixed; inset: 0; z-index: 80; background: #000; color: #fff; opacity: 0; transition: opacity .25s; display: flex; flex-direction: column; }
.viewer.on { opacity: 1; }
.vw-top { display: flex; align-items: center; gap: 6px; padding: calc(8px + env(safe-area-inset-top)) 8px 8px 16px; }
.vw-top .vw-n { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.vw-top .vw-name { flex: 1; min-width: 0; font-size: 13px; color: rgba(255, 255, 255, .6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vw-top .icb { color: #fff; }
.vw-top .icb:hover { background: rgba(255, 255, 255, .12); }
.vw-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 0 calc(16px + env(safe-area-inset-bottom)); }
.vw-stage img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.vw-stage iframe { width: min(100%, 980px); height: 100%; border: none; background: #fff; border-radius: 8px; }
.vw-stage.slide-l { animation: slideL .3s var(--ease); }
.vw-stage.slide-r { animation: slideR .3s var(--ease); }
.vw-doc { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; padding: 24px; }
.vw-doc svg { width: 56px; height: 56px; color: #ff6961; }
.vw-doc b { font-size: 15px; font-weight: 500; max-width: 280px; word-break: break-all; }
.vw-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: none; background: rgba(255, 255, 255, .14); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.vw-nav svg { width: 22px; height: 22px; }
.vw-prev { left: 16px; } .vw-next { right: 16px; }
@media (hover: none) { .vw-nav { display: none; } }
/* ── 予定の詳細（2026-10-08） ── */
.ev[data-detail] { cursor: pointer; }
.ev .addr { display: flex; align-items: center; gap: 5px; font-size: 13.5px; color: var(--faint); margin-top: 8px; }
.ev .addr svg { width: 14px; height: 14px; flex-shrink: 0; }
.detail { padding-top: 4px; }
.dt-head { margin: 8px 0 18px; }
.dt-pills { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dt-pills .src { margin: 0; }
.dt-when { font-size: 26px; font-weight: 700; margin-top: 10px; line-height: 1.3; font-variant-numeric: tabular-nums; }
.dt-what { font-size: 17px; font-weight: 600; margin-top: 2px; }
.dt-ack { padding: 0; margin-bottom: 18px; }
.dt-ack .ack { margin-top: 0; }
.dt-acts { display: flex; gap: 10px; margin-top: 14px; }
.dt-acts .btn { flex: 1; }
.dt-acts .ng-btn { background: var(--red-soft); color: var(--red); }
.dt-info { padding: 4px 20px; }
.dt-info .info p { align-items: baseline; }
.dt-info .info .v { flex: 1; min-width: 0; color: var(--fg); width: auto; }
.dt-info .addr-row { align-items: center !important; }
.dt-info .addr-row .btn { flex-shrink: 0; }
.dt-info .staff { display: inline; font-size: 15px; color: var(--fg); }
.dt-note { margin-top: 12px; font-size: 15px; color: var(--mid); white-space: pre-wrap; padding: 14px 18px; }
.detail .cmts { margin: 0; background: var(--tile); padding: 4px 16px 12px; animation: none; }
.detail .cm-in textarea { background: var(--bg); }
.pic-b { border: none; padding: 0; background: none; cursor: zoom-in; display: block; }
.files button.file { border: none; cursor: pointer; font: inherit; }
/* ── 料金プラン（2026-10-08） ── */
.cyc { display: flex; justify-content: center; margin: 28px 0 16px; }
.cyc .seg label { padding: 6px 16px; font-size: 14px; }
.cyc .save { margin-left: 6px; font-size: 11px; font-weight: 600; color: var(--green); }
.plans { display: grid; gap: 12px; }
@media (min-width: 900px) { .plans { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pl { display: flex; flex-direction: column; gap: 6px; background: var(--tile); border-radius: 18px; padding: 18px 20px; cursor: pointer; box-shadow: inset 0 0 0 1.5px transparent; transition: box-shadow .2s, background .2s; }
.pl input { display: none; }
.pl.on { box-shadow: inset 0 0 0 2px var(--accent); background: var(--accent-soft); }
.pl-n { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 700; }
.pl-p { font-size: 14px; color: var(--faint); }
.pl-p b { font-size: 30px; font-weight: 700; color: var(--fg); font-variant-numeric: tabular-nums; margin-right: 2px; }
.pl-p small { font-size: 12.5px; }
.pl-f { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--mid); }
.pl-f svg { width: 16px; height: 16px; color: var(--faint); }
/* ── 2026-10-08：スレッドとチャットを分けた ── */
body.thread-page main.wrap { padding-top: calc(72px + env(safe-area-inset-top)); }
@media (min-width: 900px) { body.thread-page main.wrap { padding-top: 84px; } }
body.thread-page:not(.dm-page) main.wrap { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
/* 人の丸いアイコン（名前の1文字目） */
.av.person { background: hsl(var(--h, 20) 45% 88%); color: hsl(var(--h, 20) 40% 32%); font-size: 19px; font-weight: 600; }
:root[data-theme="dark"] .av.person { background: hsl(var(--h, 20) 30% 24%); color: hsl(var(--h, 20) 60% 82%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .av.person { background: hsl(var(--h, 20) 30% 24%); color: hsl(var(--h, 20) 60% 82%); } }
.av.person.sm { width: 34px; height: 34px; font-size: 14px; }
button.set-row.pp { width: 100%; border: none; background: none; text-align: left; cursor: pointer; color: var(--fg); }
button.set-row.pp svg { width: 16px; height: 16px; color: var(--hint); }
/* チャットに載せた現場・予定のカード */
.share { display: flex; align-items: center; gap: 12px; width: min(300px, 100%); background: var(--bg); box-shadow: inset 0 0 0 1px var(--sep); border-radius: 16px; padding: 12px 14px; margin-bottom: 4px; color: var(--fg); transition: transform .12s; }
.share:active { transform: scale(.98); }
.share .i { width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.share .i svg { width: 18px; height: 18px; }
.share .b { flex: 1; min-width: 0; line-height: 1.4; }
.share .b small { display: block; font-size: 12px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.share .b b { display: block; font-size: 15px; font-weight: 600; }
.share .b em { display: block; font-style: normal; font-size: 13px; color: var(--mid); }
.share .chev { color: var(--hint); display: flex; }
.share .chev svg { width: 16px; height: 16px; }
.share.none { color: var(--faint); font-size: 13px; }
.msg.me .share { align-self: flex-end; }
/* 地図アプリを選ぶ */
.mapsheet { position: fixed; z-index: 61; left: 50%; bottom: calc(12px + env(safe-area-inset-bottom)); transform: translate(-50%, 120%); width: min(420px, calc(100% - 24px)); background: var(--raised); border-radius: 22px; padding: 18px 16px 14px; box-shadow: var(--shadow-l); transition: transform .38s var(--ease); }
.mapsheet.on { transform: translate(-50%, 0); }
.mapsheet ~ .scrim, .scrim { z-index: 60; }
.ms-t { font-size: 13px; font-weight: 600; color: var(--faint); text-align: center; }
.ms-a { font-size: 15px; text-align: center; margin: 2px 0 14px; }
.ms-list { display: grid; background: var(--tile); border-radius: 14px; overflow: hidden; }
.ms-list button { display: flex; align-items: center; gap: 10px; border: none; background: none; padding: 14px 16px; font-size: 16px; color: var(--accent-ink); cursor: pointer; text-align: left; }
.ms-list button + button { border-top: .5px solid var(--sep); }
.ms-list button svg { width: 18px; height: 18px; }
.ms-keep { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 4px; font-size: 14.5px; cursor: pointer; }
.ms-keep input { width: 18px; height: 18px; accent-color: var(--accent); }
.ms-keep small { flex-basis: 100%; padding-left: 26px; font-size: 12px; color: var(--faint); }
#mapseg { flex-wrap: wrap; }

/* ── 通知のタブ（2026-10-08） ── */
.nt-day { font-size: 13px; font-weight: 600; color: var(--faint); margin: 26px 4px 8px; }
.nt-day:first-child { margin-top: 0; }
.nts { display: block; }
.nt { display: flex; align-items: flex-start; gap: 14px; padding: 14px 16px; margin: 0 0 8px; background: var(--raised); border-radius: 18px; box-shadow: var(--shadow-s); position: relative; transition: background .15s; }
.nt:active { background: var(--press); }
.nt-ic { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--fill); color: var(--faint); }
.nt-ic svg { width: 18px; height: 18px; }
.nt-ic.accent { background: var(--accent-soft); color: var(--accent-ink); }
.nt-ic.blue { background: var(--blue-soft); color: var(--blue); }
.nt-ic.green { background: var(--green-soft); color: var(--green); }
.nt-ic.red { background: var(--red-soft); color: var(--red); }
.nt-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.nt-b .l1 { display: flex; align-items: baseline; gap: 8px; }
.nt-b .l1 b { flex: 1; font-size: 15.5px; font-weight: 600; }
.nt-b .tm { font-size: 12.5px; color: var(--faint); white-space: nowrap; }
.nt-b .l2 { font-size: 13.5px; color: var(--mid); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nt-b .l2 .by { color: var(--faint); margin-left: 8px; }
.nt-b .l3 { font-size: 14px; color: var(--faint); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nt-b .l3 .on { display: block; font-size: 12.5px; }
.nt-b .l3 .q { display: block; color: var(--red); }
.nt-b .chgs { margin-top: 6px; }
.nt:not(.unread) .nt-b .l1 b { font-weight: 500; color: var(--mid); }
.nt-dot { position: absolute; top: 18px; right: 12px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.nt.unread .tm { margin-right: 12px; }

/* 変更点：前 → 後 */
.chgs { display: flex; flex-wrap: wrap; gap: 6px; }
.chg { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; padding: 4px 10px; border-radius: 10px; background: var(--accent-soft); color: var(--fg); max-width: 100%; }
.chg em { font-style: normal; font-size: 11.5px; font-weight: 600; color: var(--accent-ink); }
.chg s { color: var(--faint); text-decoration-thickness: 1px; }
.chg b { font-weight: 700; }
.chg .ar { width: 12px; height: 12px; color: var(--faint); flex-shrink: 0; }
.ev mark { background: linear-gradient(transparent 62%, var(--accent-soft) 62%); color: inherit; padding: 0 1px; }
.ev.upd { box-shadow: inset 3px 0 0 var(--accent); }
.chg-box { margin-top: 12px; }
.chg-h { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 12.5px; font-weight: 600; color: var(--accent-ink); margin-bottom: 6px; }
.chg-h .i { width: 14px; height: 14px; }
.chg-h span { flex-basis: 100%; font-weight: 500; color: var(--mid); }

/* 確認した会社のアイコンを重ねる → 押すと一覧 */
.av.org { border-radius: 30%; }
.ackstack { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 12px; padding: 8px 10px 8px 8px; border: none; border-radius: 14px; background: var(--tile); color: var(--mid); font: inherit; font-size: 13.5px; cursor: pointer; text-align: left; }
.ackstack:active { background: var(--press); }
.ackstack > svg { width: 14px; height: 14px; color: var(--hint); margin-left: auto; flex-shrink: 0; }
.ackstack .avs { display: flex; padding-left: 2px; }
.ackstack .av.st { width: 26px; height: 26px; font-size: 12px; margin-left: -8px; box-shadow: 0 0 0 2px var(--tile); }
.ackstack .av.st:first-child { margin-left: 0; }
.ackstack .av.st.ng { box-shadow: 0 0 0 2px var(--red); }
.ackstack .more { margin-left: 4px; font-size: 12px; color: var(--faint); align-self: center; }
.ackstack .t { font-weight: 500; }
.ackstack .ngc { margin-left: 8px; color: var(--red); }
.mapsheet.aksheet, .mapsheet.aosheet { max-height: calc(100dvh - 80px); overflow-y: auto; }
.ak-h { font-size: 12.5px; font-weight: 600; color: var(--faint); margin: 14px 6px 6px; }
.ak-list { background: var(--tile); border-radius: 14px; padding: 0 14px; }
.ak-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; }
.ak-row + .ak-row { border-top: .5px solid var(--sep); }
.ak-row .b { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ak-row .b b { font-size: 15px; font-weight: 600; }
.ak-row .b small { font-size: 12.5px; color: var(--faint); }
.ak-row .b em { font-style: normal; font-size: 13px; color: var(--red); }
.aksheet > .btn, .aosheet > .btn.ghost { margin-top: 14px; }

/* 会社を選ぶ（現場の作成・会社の追加） */
.pick-orgs { display: grid; background: var(--tile); border-radius: 14px; padding: 0 14px; }
.pick-orgs .po { display: flex; align-items: center; gap: 12px; padding: 10px 0; cursor: pointer; font-size: 15px; }
.pick-orgs .po + .po { border-top: .5px solid var(--sep); }
.pick-orgs .po span:not(.av) { flex: 1; min-width: 0; }
.pick-orgs input { width: 20px; height: 20px; accent-color: var(--accent); }
.org-row a, .org-row .nl { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; color: inherit; }
.org-row .b { display: flex; flex-direction: column; min-width: 0; }
.org-row .b b { font-weight: 600; }
.org-row .b small { font-size: 12px; color: var(--faint); }
.org-row .rm { color: var(--red); font-size: 14px; }

/* 新しい現場・会社の数 */
.pill.new { background: var(--accent); color: #fff; font-size: 10.5px; letter-spacing: .06em; padding: 1px 7px; }
.n-orgs { display: inline-flex; align-items: center; gap: 3px; margin-left: 10px; color: inherit; }
.n-orgs .i { width: 14px; height: 14px; }

/* ── ホーム（2026-10-08）：右上に通知と「＋」 ── */
.home-head .h-acts { display: flex; gap: 10px; }
.icb2 { position: relative; width: 40px; height: 40px; border-radius: 50%; border: none; background: var(--fill); color: var(--fg); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: transform .15s var(--ease), background .15s; }
.icb2:active { transform: scale(.94); }
.icb2 svg { width: 21px; height: 21px; }
.icb2.accent { background: var(--accent); color: #fff; }
.icb2 .dot { position: absolute; top: -3px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--bg); }
.sec-head { margin: 30px 0 12px; }
.sec-head h2 { margin: 0 4px; }
.nt-top { display: flex; justify-content: flex-end; margin: -4px 0 12px; min-height: 8px; }
/* スレッドの作成 */
.to-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.to { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 999px; background: var(--tile); font-size: 15px; font-weight: 500; }
.av.person.xs { width: 26px; height: 26px; font-size: 12px; }
.ns-sum { display: flex; flex-direction: column; gap: 4px; margin-bottom: 20px; }
.ns-sum b { font-size: 17px; }
.ns-sum small { color: var(--faint); font-size: 13.5px; display: flex; align-items: center; gap: 4px; }
/* チャットの「＋」のメニュー */
.act-list button svg { width: 20px; height: 20px; color: var(--accent); }
.actsheet > .btn { margin-top: 12px; }
.composer .ic.plus svg { width: 22px; height: 22px; }
.int-note { display: flex; gap: 8px; align-items: flex-start; background: var(--tile); border-radius: 14px; padding: 12px 14px; margin-bottom: 20px; }
.int-note svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; color: var(--faint); }

/* スレッドの作成：送付先（外せる・足せる） */
.to .x { border: none; background: none; padding: 0 0 0 2px; margin-left: 2px; color: var(--faint); display: flex; cursor: pointer; }
.to .x svg { width: 14px; height: 14px; }
.to.add { border: 1px dashed var(--line-strong); background: none; padding: 5px 14px; color: var(--accent-ink); cursor: pointer; font: inherit; font-size: 15px; gap: 4px; }
/* 現場の写真・PDF（スレッドの上） */
.site-files { margin: 0 0 18px; }
.sf-h { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--faint); margin: 0 4px 8px; }
.sf-h svg { width: 16px; height: 16px; }
.sf-h b { font-weight: 600; margin-left: 2px; }
.thumbs.row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.thumbs.row::-webkit-scrollbar { display: none; }
.thumbs.row .th { flex: 0 0 92px; width: 92px; height: 92px; }
/* 名刺 */
.thhead .ttl.tap { cursor: pointer; }
.pcard-b { display: flex; align-items: center; gap: 12px; border: none; background: none; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; min-width: 0; }
.pcard-b .b { display: flex; flex-direction: column; min-width: 0; }
.pcard-b .b small { font-size: 12.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 4px 0 16px; }
.pcard .av { width: 64px; height: 64px; font-size: 26px; margin-bottom: 8px; }
.pcard b { font-size: 19px; }
.pcard small { font-size: 13.5px; color: var(--faint); }
.ms-list a { display: flex; align-items: center; gap: 10px; padding: 14px 16px; font-size: 16px; color: var(--accent-ink); }
.ms-list a + a, .ms-list a + button, .ms-list button + a, .ms-list p + button, .ms-list p + a { border-top: .5px solid var(--sep); }
.ms-list a svg { width: 18px; height: 18px; flex-shrink: 0; }
.ms-list a span, .ms-list button span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-none { padding: 14px 16px; font-size: 14.5px; color: var(--faint); text-align: center; }
.pcsheet > .btn { margin-top: 12px; }

/* 予定を追加＝スレッドを作る：上に送付先と現場 */
.ef-site { padding: 16px 18px; margin-bottom: 26px; background: var(--tile); border-radius: 18px; }
.ef-site .f { margin: 0 0 18px; }
.ef-site .f:last-child, .ef-site .f[style] { margin-bottom: 0; }
.ef-site + .f, .int-note + .f { margin-top: 0; }
.ef-site .in { background: var(--raised); }
.ef-site.fixed .to { background: var(--raised); }
.ef-sv { font-size: 16px; font-weight: 600; }
.ef-site .to-chips .to.add { background: none; }

/* 作成の画面：スレッド／社内の切り替え・編集者と閲覧者 */
.ef-mode { margin-bottom: 20px; }
.ef-tip { margin: -4px 2px 18px; font-size: 12.5px; }
.to .sw { display: inline-flex; align-items: center; gap: 8px; border: none; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.org-row .or-acts { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
/* 1対1のチャット：返信 */
.tl .msg { -webkit-touch-callout: none; }
@media (hover: none) { .tl .msg { -webkit-user-select: none; user-select: none; } }
.qt { display: flex; align-items: flex-start; gap: 6px; max-width: 100%; margin: 0 0 4px; padding: 6px 10px; border: none; border-left: 3px solid var(--accent); border-radius: 10px; background: var(--tile); color: var(--mid); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.qt svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 2px; color: var(--faint); }
.qt span { min-width: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.qt b { display: block; font-size: 12px; color: var(--accent-ink); }
.msg.me .qt { margin-left: auto; }
.reply-bar { display: flex; align-items: center; gap: 8px; padding: 8px 10px; margin-bottom: 8px; border-radius: 12px; background: var(--tile); font-size: 13px; color: var(--mid); }
.reply-bar > svg { width: 16px; height: 16px; color: var(--accent); flex-shrink: 0; }
.reply-bar span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reply-bar b { margin-right: 8px; color: var(--accent-ink); }
.reply-bar button { border: none; background: none; color: var(--faint); display: flex; cursor: pointer; padding: 2px; }
.reply-bar button svg { width: 16px; height: 16px; }
/* 画面の上のお知らせ */
.banner { position: fixed; z-index: 80; left: 50%; top: calc(10px + env(safe-area-inset-top)); transform: translate(-50%, -140%); width: min(440px, calc(100% - 20px)); display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 20px; background: var(--glass); -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6); box-shadow: var(--shadow-l); color: var(--fg); transition: transform .45s var(--ease); }
.banner.on { transform: translate(-50%, 0); }
.banner .av { width: 40px; height: 40px; font-size: 16px; }
.bn-ic { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.bn-ic svg { width: 20px; height: 20px; }
.bn-b { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bn-b b { font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bn-b span { font-size: 13.5px; color: var(--mid); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seg.ef-mode { display: flex; width: 100%; }
.seg.ef-mode label { flex: 1; text-align: center; padding: 7px 12px; font-size: 14.5px; }
.org-row { flex-wrap: wrap; }
.org-row .or-acts { flex-basis: 100%; padding-left: 46px; justify-content: space-between; margin-top: -2px; }
.seg.sm button { border: none; background: none; font: inherit; font-size: 13px; padding: 4px 14px; border-radius: 7px; color: var(--faint); cursor: pointer; }
.seg.sm button.on { background: var(--seg-on); color: var(--fg); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.08); cursor: default; }
.role-pick button { justify-content: space-between; color: var(--fg) !important; }
.role-pick button span { display: flex; flex-direction: column; gap: 2px; white-space: normal !important; }
.role-pick button b { font-size: 16px; font-weight: 600; }
.role-pick button small { font-size: 13px; color: var(--faint); }
.role-pick button svg { width: 16px !important; height: 16px !important; color: var(--hint) !important; }
