:root {
  color-scheme: light dark; /* 日付選びなどブラウザが描く部品も、ダークモードに合わせる */
  --bg: #f4f6f5;
  --surface: #ffffff;
  --text: #1c2523;
  --muted: #66736f;
  --line: #dde3e1;
  --accent: #ff6600;
  --accent-ink: #c24e00;
  --accent-text: #ffffff;
  --accent-soft: #fdebd9;
  --danger: #b3261e;
  --danger-solid: #d0342c; /* 白い文字を乗せる赤（件数の丸）。ダークモードでも同じ色 */
  --open: #b25c00;
  --open-bg: #fdf0dc;
  --doing: #1d5fa8;
  --doing-bg: #e2eefb;
  --done: #2c7a3f;
  --done-bg: #e2f3e6;
  --declined: #66736f;
  --declined-bg: #e9eeec;
  --glow: #2fbf5f;
  --glow-soft: rgba(47, 191, 95, .45);
  --review: #6b3fa0;
  --review-bg: #efe6fa;
  --returned-bg: #fbe4e2;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121716;
    --surface: #1c2422;
    --text: #e8eeec;
    --muted: #9aa8a4;
    --line: #2f3a37;
    --accent: #ff6600;
    --accent-ink: #ff944d;
    --accent-text: #ffffff;
    --accent-soft: #3d2710;
    --danger: #f2b8b5;
    --open: #f5b860;
    --open-bg: #3a2c14;
    --doing: #8dbcf2;
    --doing-bg: #1a2c42;
    --done: #86d19a;
    --done-bg: #183222;
    --declined: #9aa8a4;
    --declined-bg: #2a3331;
    --review: #cdb2f0;
    --review-bg: #2e2440;
    --returned-bg: #40201e;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif;
  overflow-wrap: anywhere;
}
a { color: var(--accent-ink); }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }

.bar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 8px;
  padding: calc(8px + env(safe-area-inset-top)) 12px 8px;
  background: var(--accent); color: var(--accent-text);
}
.bar h1 { flex: 1; font-size: 18px; font-weight: 600; }
.bar .back { color: inherit; text-decoration: none; font-size: 30px; line-height: 1; padding: 0 10px 4px 2px; }
.bar-actions { display: flex; gap: 4px; }
.icon-btn {
  background: none; border: 0; color: inherit; font-size: 14px; text-decoration: none;
  padding: 8px 10px; border-radius: 8px; cursor: pointer;
}
.icon-btn:active { background: rgba(255, 255, 255, .18); }

main { max-width: 640px; margin: 0 auto; padding: 14px 16px calc(110px + env(safe-area-inset-bottom)); display: grid; gap: 16px; }
.muted { color: var(--muted); font-size: 14px; }
.center { text-align: center; }
.empty { padding: 40px 0; }
.time { margin-left: auto; white-space: nowrap; font-size: 13px; }

.whoami { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.role { font-size: 12px; font-weight: 500; padding: 1px 8px; border-radius: 999px; background: var(--declined-bg); color: var(--muted); }
.role-admin { background: var(--accent-soft); color: var(--accent-ink); }
.role-secretary { background: var(--review-bg); color: var(--review); }
.role-giin { background: var(--doing-bg); color: var(--doing); }
.role-pick { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.role-pick select { width: auto; padding: 6px 8px; }
.member-locked { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }

.picker-buttons { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.share-add { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.share-card { gap: 8px; }
.file-item { display: grid; gap: 4px; justify-items: start; }
.file-item.wide { width: 100%; }
.file-item.wide > .doc { width: 100%; }
.file-remove { padding: 3px 10px; font-size: 13px; color: var(--muted); }
.detail .picker { margin-top: 4px; }

/* 各自のアイコン（画像が無い人は名前の頭文字） */
.avatar { width: 32px; height: 32px; border-radius: 50%; flex: none; object-fit: cover; background: var(--accent-soft); border: 1px solid var(--line); }
.avatar.initial { display: inline-flex; align-items: center; justify-content: center; color: var(--accent-ink); font-weight: 700; font-size: 15px; line-height: 1; }
.avatar.small { width: 22px; height: 22px; font-size: 11px; }
.avatar.large { width: 72px; height: 72px; font-size: 30px; }
.icon-edit { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.card-meta, .with-avatar { align-items: center; }
.with-avatar { display: flex; gap: 6px; }
.bar-logo { border-radius: 50%; background: #fff; border: 2px solid #fff; flex: none; }
.login .logo { background: #fff; border: 3px solid var(--accent); }
/* バーにロゴ・アプリ名・「設定」「ログアウト」が1行で並ぶよう、アプリ名は少し小さくして折り返さない */
.brand-main { display: block; font-size: min(15px, 4vw); white-space: nowrap; }
.bar .icon-btn { padding: 8px 6px; white-space: nowrap; }
.bar h1 { min-width: 0; }
/* 小さめのスマホ（幅 360px 未満）では、バーが1行に収まるよう少し詰める */
@media (max-width: 359px) {
  .bar { gap: 6px; padding-left: 8px; padding-right: 8px; }
  .bar .icon-btn { font-size: 12px; padding: 8px 3px; }
  .brand-main { font-size: 3.7vw; }
}
.brand-sub { display: block; font-size: 11px; font-weight: 500; line-height: 1.2; opacity: .9; }
.bar h1 { line-height: 1.25; }
.share-del { margin-left: auto; }
.share-link { display: grid; gap: 2px; text-decoration: none; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.share-link-name { font-weight: 700; color: var(--accent-ink); }
.share-link-url { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc { width: 100%; display: grid; gap: 6px; }
.doc-preview img { display: block; width: 100%; max-height: 320px; object-fit: contain; object-position: left top; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.share-filter { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.share-filter select { width: auto; max-width: 8.5em; }
input[type=search] { width: 100%; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
a.btn { text-decoration: none; color: inherit; }
.topnav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 4px; gap: 4px; }
.topnav a {
  display: flex; align-items: center; justify-content: center; text-align: center; min-height: 44px;
  text-decoration: none; color: var(--muted); padding: 4px 2px; border-radius: 9px;
  /* いちばん長い「未割当タスク」（6文字）が1行に収まるよう、狭い画面では文字を少し小さくする */
  font-weight: 600; font-size: min(14px, 3.25vw); line-height: 1.25; white-space: nowrap;
}

.pool-card { gap: 10px; }
.pool-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pool-actions .task-del { margin-left: auto; }
select.assign { width: auto; padding: 5px 8px; font-size: 14px; }
.pool-add { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 0; }
.topnav a.on { background: var(--accent-soft); color: var(--accent-ink); }

.people { display: grid; gap: 12px; }
.person { display: grid; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.person-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* 件数の行は長くなる（差し戻しがあると5項目）ので、1行に押し込まず、名前の下の段で折り返せるようにする */
.person-head .time { flex-basis: 100%; margin-left: 0; white-space: normal; text-align: right; }
.task { display: flex; align-items: baseline; gap: 8px; color: inherit; text-decoration: none; padding: 6px 0; border-top: 1px solid var(--line); }
.task-title { flex: 1; }

/* タスクの画面では自分の枠全体を緑にする */
.person.mine { background: var(--done-bg); border-color: var(--glow); box-shadow: 0 0 0 1px var(--glow); }
.person.mine .task { border-top-color: var(--glow-soft); }
.t-todo { color: var(--open); background: var(--open-bg); }
.t-doing { color: var(--doing); background: var(--doing-bg); }
.t-done { color: var(--done); background: var(--done-bg); }
.t-review { color: var(--review); background: var(--review-bg); }
.t-returned { color: var(--danger); background: var(--returned-bg); }
select.status { width: auto; border: 1px solid currentColor; padding: 3px 6px; font-size: 13px; }
a.task-title { display: grid; color: inherit; text-decoration: none; }
.task-meta { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 13px; }
.overdue { color: var(--danger); font-weight: 600; }
.finished-on { color: var(--done); font-weight: 600; }
.task.finished .task-name { color: var(--muted); text-decoration: line-through; }
.done-group { border-top: 1px solid var(--line); padding-top: 6px; }
.person.mine .done-group { border-top-color: var(--glow-soft); }
.done-group summary { cursor: pointer; font-size: 14px; color: var(--muted); font-weight: 600; padding: 4px 0; }
.done-group .task { margin-left: 14px; }
.done-group .task:first-of-type { border-top: 0; }
.task-del { border: 0; background: none; color: var(--muted); font-size: 20px; line-height: 1; padding: 2px 8px; cursor: pointer; min-width: 40px; min-height: 40px; flex: none; }
.task-add { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 6px; align-items: center; }
.task-add[hidden], .add-open[hidden], .share-add[hidden] { display: none; }
.task-add-wrap { margin-top: 6px; }
.add-open { color: var(--accent-ink); border-style: dashed; font-weight: 600; }
.task-add-buttons { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; }
.task-add .due-pick { grid-column: 1 / -1; }
.task-add input[type=text] { grid-column: 1 / -1; padding: 7px 10px; }
.task-add .picker { grid-column: 1 / -1; }
.task-add .picker .btn { padding: 7px 10px; font-size: 14px; }
.task-note { font-size: 13px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.note-form { gap: 8px; }
.note-form .btn { justify-self: start; }
.due-pick { display: flex; align-items: center; gap: 8px; }
input[type=date] { padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); min-height: 36px; min-width: 9.5em; }
/* iPhone は、16px より小さい文字の入力欄や選択欄を押すと画面を拡大してしまうので、指で使う端末では 16px にする */
@media (pointer: coarse) {
  select, input[type=date], input[type=search], .task-add input[type=text] { font-size: 16px; }
}
.task-edit { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.task-edit label { display: grid; gap: 4px; font-size: 14px; color: var(--muted); justify-items: start; }
.task-edit select.status { font-size: 15px; padding: 7px 10px; }
.task-edit .release { grid-column: 1 / -1; justify-self: start; color: var(--muted); }

.like-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.like { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 14px; cursor: pointer; font-weight: 600; }
.like.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }
.liked { color: var(--accent-ink); font-weight: 600; }

.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.tabs button {
  flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: 999px;
  padding: 6px 12px; font-size: 14px; cursor: pointer;
}
.tabs button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
/* 上のバーと、選択中の絞り込みに水玉模様（オレンジのベタ塗りがのっぺりしないように。2026-10-14 案D） */
.bar {
  background:
    radial-gradient(circle, rgba(255, 255, 255, .22) 2.6px, transparent 3px) 0 0 / 16px 16px,
    radial-gradient(circle, rgba(255, 255, 255, .22) 2.6px, transparent 3px) 8px 8px / 16px 16px,
    var(--accent);
}
.tabs button.on { background: radial-gradient(circle, rgba(255, 255, 255, .25) 1.8px, transparent 2.2px) 0 0 / 10px 10px, var(--accent); }
.count { margin-left: 6px; opacity: .75; font-variant-numeric: tabular-nums; }

.list { display: grid; gap: 10px; }
.card {
  display: grid; gap: 4px; padding: 12px 14px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); color: inherit; text-decoration: none;
}
.card.unread { border-color: var(--accent); }
.card-top { display: flex; align-items: center; gap: 8px; }
.card-title { font-weight: 600; }
.card.unread .card-title { font-weight: 700; }
.card-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }

.status { font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.s-open { color: var(--open); background: var(--open-bg); }
.s-doing { color: var(--doing); background: var(--doing-bg); }
.s-done { color: var(--done); background: var(--done-bg); }
.s-declined { color: var(--declined); background: var(--declined-bg); }

.fab {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(18px + env(safe-area-inset-bottom));
  background: var(--accent); color: var(--accent-text); text-decoration: none; font-weight: 600;
  padding: 14px 26px; border-radius: 999px; box-shadow: 0 4px 14px rgba(0, 0, 0, .25); white-space: nowrap;
}

.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 4px; font-size: 14px; color: var(--muted); }
input[type=text], input[type=password], textarea, select {
  width: 100%; padding: 11px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
}
textarea { resize: vertical; }
input:focus-visible, textarea:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.btn {
  border: 1px solid var(--line); background: var(--surface); border-radius: 10px;
  padding: 11px 16px; cursor: pointer; font-weight: 600;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn.ghost { border-style: dashed; font-weight: 500; color: var(--muted); }
.btn.small { padding: 5px 12px; font-size: 14px; font-weight: 500; }
button:disabled { opacity: .55; cursor: default; }
.icon-btn.danger { opacity: .9; }

.picker { display: grid; gap: 8px; border-radius: 10px; transition: background .15s; }
.picker .drop-hint { margin: 0; font-size: 12px; }
.picker.dragging { outline: 2px dashed #FF6600; outline-offset: 4px; background: #FFF1E6; }
@media (hover: none) { .picker .drop-hint { display: none; } }
.picked { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 4px; max-width: 100%;
  background: var(--accent-soft); border-radius: 999px; padding: 3px 4px 3px 12px; font-size: 14px;
}
.chip button { border: 0; background: none; font-size: 18px; line-height: 1; padding: 4px 8px; cursor: pointer; }

.detail { display: grid; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.detail h2 { font-size: 19px; line-height: 1.4; }
.text { white-space: pre-wrap; }
h3 { font-size: 14px; color: var(--muted); font-weight: 600; margin-bottom: 8px; }

.files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.thumb img { display: block; width: 96px; height: 96px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.filelink {
  display: flex; gap: 8px; align-items: baseline; width: 100%; text-decoration: none;
  padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg);
}
.filename { flex: 1; }

.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.seg button { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 10px 2px; font-size: 14px; cursor: pointer; }
.seg button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-text); opacity: 1; font-weight: 600; }

.thread { display: grid; gap: 10px; }
.thread h3 { margin: 0; }
.comment { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; display: grid; gap: 4px; }
.comment.mine { background: var(--accent-soft); border-color: transparent; }
.comment-head { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.event { text-align: center; font-size: 13px; }

.members { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.members li {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px;
}
.members li.off .member-name { opacity: .5; text-decoration: line-through; }
.member-name { display: flex; align-items: center; gap: 8px; }
.member-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.members li { display: block; }
.members summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; cursor: pointer; list-style: none; }
.members summary::-webkit-details-marker { display: none; }
.members details[open] summary { margin-bottom: 10px; }
.members details > * + * { margin-top: 8px; }
.member-id { font-size: 13px; }
.form.inline-id { grid-template-columns: 1fr auto; align-items: center; }
.form.member-add { grid-template-columns: 1fr 1fr; }
.form.member-add .btn { grid-column: 1 / -1; }
.notice { background: var(--open-bg); color: var(--open); border-radius: 10px; padding: 10px 12px; font-size: 14px; font-weight: 600; }
section > .notice { margin: 8px 0 10px; }
a.notice { display: block; text-decoration: none; }
.btn.danger { color: var(--danger); }
.form.inline { grid-template-columns: 1fr auto auto; align-items: center; margin-bottom: 8px; }
.form.inline select { width: auto; }
.form.pass { margin-top: 14px; }
.form label.check { display: flex; align-items: center; gap: 8px; color: var(--text); }
.check input { width: 18px; height: 18px; }

.login { min-height: 100dvh; align-content: center; justify-items: center; text-align: center; padding-bottom: 40px; }
.login .logo { border-radius: 18px; }
.login h1 { font-size: 24px; }
.login form, .names { display: grid; gap: 10px; width: 100%; max-width: 320px; }
.login input { text-align: center; }
.btn.name { font-size: 17px; padding: 14px; }

/* タブの右上に出す件数（新着の数）。タブの幅を変えないよう、角に重ねて置く */
.topnav a { position: relative; }
.badge {
  position: absolute; top: -5px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--danger-solid); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}
.badge.quiet { background: var(--muted); }
.badge[hidden] { display: none; }
.task-name .dot { display: inline-block; margin-right: 6px; vertical-align: middle; }

/* スタッフ向け: 確認が必要なものへの入口と、その一覧 */
.staff-strip {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; text-decoration: none; font-size: 14px; font-weight: 600;
  padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--muted);
}
.staff-strip.has { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.staff-strip.on { box-shadow: 0 0 0 1px var(--accent); }
.staff-strip .go { margin-left: auto; font-size: 13px; white-space: nowrap; }
.check-item { display: grid; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); }
.check-item .task-meta { align-items: center; }
.check-actions { display: flex; gap: 8px; }
dialog.ask textarea { margin-top: 12px; }

/* 使い方の画面 */
.help-section { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; }
.help-section summary { cursor: pointer; font-weight: 700; padding: 13px 0; font-size: 16px; }
.help-section[open] { padding-bottom: 12px; }
.help-section[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.help-section h4 { margin: 14px 0 6px; font-size: 15px; color: var(--accent-ink); }
.help-section p { margin: 0 0 8px; }
.help-section ol, .help-section ul { margin: 0 0 8px; padding-left: 1.4em; display: grid; gap: 8px; }
.help-section dl { margin: 0; display: grid; gap: 4px; }
.help-section dt { font-weight: 600; margin-top: 8px; }
.help-section dd { margin: 0; }
.help-tabs dt { margin-top: 10px; }
.help-shot { margin: 12px auto; max-width: 280px; text-align: center; }
.help-shot img { display: block; width: 100%; height: auto; max-height: 520px; object-fit: cover; object-position: top; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 2px 10px rgba(0, 0, 0, .12); }
.help-shot figcaption { margin-top: 6px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.help-note { background: var(--open-bg); color: var(--open); border-radius: 10px; padding: 10px 12px; font-size: 14px; font-weight: 600; }
.key { display: inline-block; border: 1px solid var(--line); background: var(--bg); border-radius: 6px; padding: 0 6px; font-size: .92em; font-weight: 600; white-space: nowrap; }
.help-link { display: block; text-align: center; font-weight: 600; }
.login .help-link { width: 100%; max-width: 320px; }
.help-entry { margin-left: auto; font-size: 14px; font-weight: 600; text-decoration: none; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); white-space: nowrap; }

dialog.lightbox { border: 0; padding: 12px; background: var(--surface); border-radius: 14px; max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); }
dialog.lightbox[open] { display: grid; gap: 10px; justify-items: center; }
dialog.lightbox::backdrop { background: rgba(0, 0, 0, .75); }
dialog.lightbox img { display: block; max-width: 100%; max-height: calc(100dvh - 110px); object-fit: contain; border-radius: 8px; }
dialog.ask { border: 0; border-radius: 14px; padding: 20px; width: min(340px, calc(100% - 40px)); background: var(--surface); color: var(--text); box-shadow: 0 10px 40px rgba(0, 0, 0, .3); }
dialog.ask::backdrop { background: rgba(0, 0, 0, .45); }
.ask-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }

#toast {
  position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px);
  max-width: calc(100% - 32px); background: #26302e; color: #fff; padding: 10px 16px; border-radius: 10px;
  font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 10;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.error { background: #8c1d18; }
@media (prefers-reduced-motion: reduce) { #toast { transition: none; } }

/* ==== 2026-10-14 デザインの見直し（Codex と相談。「安っぽい」の解消）====
   オレンジは要所だけに絞り、白・薄いグレー・控えめな影で落ち着かせる。水玉・状態色の意味・ロゴは維持。 */
:root {
  --bg: #f6f8f7;
  --surface: #ffffff;
  --text: #17211f;
  --muted: #687773;
  --line: #d9e1de;

  --accent: #ff6600;
  --accent-ink: #b94700;
  --accent-soft: #fff0e5;

  --card-radius: 8px;
  --control-radius: 10px;
  --shadow-card: 0 1px 2px rgba(23, 33, 31, .05), 0 8px 22px rgba(23, 33, 31, .06);
  --shadow-fab: 0 8px 22px rgba(184, 73, 0, .28);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101615;
    --surface: #19211f;
    --text: #edf3f1;
    --muted: #a0aea9;
    --line: #33403c;

    --accent: #ff6600;
    --accent-ink: #ffb07a;
    --accent-soft: #332417;

    --shadow-card: 0 1px 2px rgba(0, 0, 0, .22), 0 10px 26px rgba(0, 0, 0, .28);
    --shadow-fab: 0 8px 24px rgba(0, 0, 0, .36);
  }
}

.bar {
  padding: calc(9px + env(safe-area-inset-top)) 14px 9px;
  background:
    radial-gradient(circle, rgba(255, 255, 255, .18) 1.8px, transparent 2.2px) 0 0 / 14px 14px,
    radial-gradient(circle, rgba(255, 255, 255, .13) 1.8px, transparent 2.2px) 7px 7px / 14px 14px,
    var(--accent);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .08);
}

.brand-main {
  font-weight: 750;
  letter-spacing: 0;
}

.brand-sub {
  opacity: .86;
}

.bar-logo {
  box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
}

.topnav {
  border-radius: var(--card-radius);
  padding: 5px;
  border-color: color-mix(in srgb, var(--line) 82%, var(--text));
  box-shadow: var(--shadow-card);
}

.topnav a {
  border-radius: 6px;
  font-weight: 700;
}

.topnav a.on {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.card,
.detail,
.comment,
.person,
.share-add,
.pool-add,
.help-section,
.members li {
  border-radius: var(--card-radius);
  border-color: color-mix(in srgb, var(--line) 86%, var(--text));
  box-shadow: var(--shadow-card);
}

.card,
.detail,
.comment,
.person {
  padding: 14px 16px;
}

.card.unread {
  border-color: rgba(255, 102, 0, .55);
  box-shadow:
    inset 3px 0 0 var(--accent),
    var(--shadow-card);
}

.card-title,
.task-name,
.detail h2 {
  font-weight: 750;
  letter-spacing: 0;
}

.card-title {
  font-size: 16.5px;
  line-height: 1.45;
}

.detail h2 {
  font-size: 20px;
  line-height: 1.45;
}

.card-meta,
.task-meta,
.muted,
.time {
  color: var(--muted);
}

.time {
  font-size: 12.5px;
}

.status,
.role {
  font-weight: 750;
  border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28);
}

.s-open,
.t-todo {
  color: #9a4c00;
  background: #fff3df;
}

.s-doing,
.t-doing {
  color: #155a9d;
  background: #eaf3fc;
}

.s-done,
.t-done {
  color: #276f39;
  background: #e9f6ed;
}

.t-review {
  color: #684095;
  background: #f2eafb;
}

.btn,
.like,
.tabs button,
.seg button,
input[type=text],
input[type=password],
input[type=search],
input[type=date],
textarea,
select {
  border-radius: var(--control-radius);
  border-color: color-mix(in srgb, var(--line) 84%, var(--text));
}

.btn.primary,
.tabs button.on,
.seg button.on {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 750;
}

select.status {
  background-color: color-mix(in srgb, currentColor 9%, var(--surface));
}

.fab {
  padding: 14px 30px;
  font-weight: 750;
  box-shadow: var(--shadow-fab);
}

.fab:active {
  transform: translateX(-50%) translateY(1px);
}

.person.mine {
  background: linear-gradient(180deg, #f1fbf4 0%, #eaf8ef 100%);
  border-color: rgba(47, 191, 95, .7);
  box-shadow:
    inset 0 0 0 1px rgba(47, 191, 95, .18),
    var(--shadow-card);
}

.person.mine .task {
  border-top-color: rgba(47, 191, 95, .25);
}

@media (prefers-color-scheme: dark) {
  .person.mine {
    background: linear-gradient(180deg, #17261c 0%, #16231b 100%);
    border-color: rgba(134, 209, 154, .55);
  }

  .s-open,
  .t-todo {
    color: #ffc078;
    background: #332515;
  }

  .s-doing,
  .t-doing {
    color: #9bc9ff;
    background: #172b42;
  }

  .s-done,
  .t-done {
    color: #9be0aa;
    background: #173321;
  }

  .t-review {
    color: #d8b9ff;
    background: #2d223f;
  }
}

.thumb img,
.doc-preview img,
.filelink,
.share-link {
  border-radius: var(--card-radius);
  border-color: color-mix(in srgb, var(--line) 84%, var(--text));
}

.thumb img {
  box-shadow: 0 1px 5px rgba(23, 33, 31, .12);
}

.filelink,
.share-link {
  background: color-mix(in srgb, var(--bg) 65%, var(--surface));
}

.share-link-name,
.filename {
  font-weight: 750;
}

/* ==== 2026-10-14 案2「和紙」＋柄A「青海波うす線」（Codex と相談。水玉から変更・ダークの読みにくい所も修正）==== */
:root {
  --bg: #f6efe5;
  --surface: #fffaf3;
  --text: #241c17;
  --muted: #6f6258;
  --line: #e1d3c2;
  --accent: #ff6600;
  --accent-ink: #9d3e00;
  --accent-soft: #ffe7d3;
  --card-radius: 8px;
  --control-radius: 10px;
  --shadow-card: 0 1px 0 rgba(83, 55, 31, .08), 0 8px 20px rgba(83, 55, 31, .07);
  --shadow-fab: 0 10px 22px rgba(158, 62, 0, .3);
}

body {
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(116, 86, 55, .035) 1px, transparent 1px) 0 0 / 18px 18px,
    linear-gradient(180deg, #fbf5ec 0%, var(--bg) 260px);
  color: var(--text);
}

main {
  gap: 15px;
}

.bar {
  background:
    radial-gradient(circle, rgba(255, 255, 255, .24) 1.8px, transparent 2.2px) 1px 1px / 13px 13px,
    var(--accent);
  box-shadow: 0 2px 0 rgba(115, 45, 0, .16);
}

.brand-main {
  font-weight: 800;
}

.brand-sub {
  opacity: .88;
}

.topnav {
  background: #fffaf3;
  border: 1px solid #d9c7b2;
  border-radius: 8px;
  padding: 5px;
  box-shadow: var(--shadow-card);
}

.topnav a {
  border-radius: 6px;
  color: #67564a;
  font-weight: 800;
}

.topnav a.on {
  background: #ffe6d1;
  color: var(--accent-ink);
  box-shadow: inset 0 -2px 0 rgba(255, 102, 0, .22);
}

.card,
.detail,
.person,
.comment,
.pool-card,
.share-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-card);
}

.card,
.detail,
.person {
  padding: 15px 16px;
}

.comment {
  padding: 12px 14px;
  background: #fffdf8;
}

.card.unread {
  border-color: #ff8d33;
  background:
    linear-gradient(90deg, rgba(255, 102, 0, .1), transparent 48px),
    var(--surface);
}

.card-title,
.task-name,
.detail h2,
.person-head strong {
  font-weight: 850;
  letter-spacing: 0;
}

.card-title {
  font-size: 16.5px;
  line-height: 1.48;
}

.detail h2 {
  font-size: 20px;
  line-height: 1.45;
}

h3 {
  color: #66594f;
  font-size: 13px;
  font-weight: 850;
}

.muted,
.time,
.card-meta,
.task-meta {
  color: var(--muted);
}

.tabs {
  gap: 7px;
}

.tabs button {
  min-height: 36px;
  padding: 6px 13px;
  background: #fffaf3;
  border: 1px solid #d9c7b2;
  border-radius: 999px;
  color: #5f5046;
  font-weight: 800;
}

.tabs button.on {
  background:
    radial-gradient(circle, rgba(255, 255, 255, .26) 1.3px, transparent 1.7px) 0 0 / 9px 9px,
    var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.btn,
select,
input,
textarea {
  border-radius: var(--control-radius);
  border-color: #d8c7b3;
  background: #fffdf8;
}

.btn {
  color: #352920;
  font-weight: 800;
}

.btn.primary,
.fab {
  background:
    radial-gradient(circle, rgba(255, 255, 255, .24) 1.4px, transparent 1.8px) 0 0 / 10px 10px,
    var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  font-weight: 850;
}

.add-open {
  background: #fff7ee;
  color: var(--accent-ink);
  border-color: #f3b27c;
  border-style: dashed;
}

.fab {
  padding: 14px 30px;
  box-shadow: var(--shadow-fab);
}

.status,
.role {
  border: 1px solid currentColor;
  font-weight: 850;
}

.s-open,
.t-todo {
  color: #8c4b00;
  background: #fff0cf;
}

.s-doing,
.t-doing {
  color: #155b9c;
  background: #e6f2ff;
}

.s-done,
.t-done {
  color: #286d39;
  background: #e8f5df;
}

.t-review {
  color: #6d3b98;
  background: #f1e7fb;
}

.s-declined,
.t-returned {
  color: #a8322a;
  background: #f9e2dc;
}

.person.mine {
  background: #f2fae9;
  border-color: #58ad5d;
  box-shadow:
    inset 0 0 0 1px rgba(88, 173, 93, .18),
    var(--shadow-card);
}

.person.mine .task,
.person.mine .done-group {
  border-top-color: rgba(88, 173, 93, .3);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14110e;
    --surface: #201a15;
    --text: #f3eee7;
    --muted: #b9aa9a;
    --line: #44372b;
    --accent-ink: #ffb077;
    --accent-soft: #3b2617;
    --shadow-card: 0 1px 0 rgba(0, 0, 0, .34), 0 10px 24px rgba(0, 0, 0, .28);
  }

  body {
    background:
      linear-gradient(90deg, rgba(255, 236, 210, .025) 1px, transparent 1px) 0 0 / 18px 18px,
      #14110e;
  }

  .topnav,
  .tabs button,
  .btn,
  select,
  input,
  textarea {
    background: #201a15;
    border-color: #4a3c30;
  }

  .topnav a {
    color: #c8b8a6;
  }

  .topnav a.on {
    background: #3a2819;
    color: #ffb077;
  }

  .card,
  .detail,
  .person,
  .comment,
  .pool-card,
  .share-card {
    background: #201a15;
    border-color: #44372b;
  }

  .comment {
    background: #231d17;
  }

  h3,
  .muted,
  .time,
  .card-meta,
  .task-meta {
    color: #b9aa9a;
  }

  .add-open {
    background: #241c15;
    color: #ffb077;
    border-color: #7d4b29;
  }

  .s-open,
  .t-todo {
    color: #ffc777;
    background: #382711;
  }

  .s-doing,
  .t-doing {
    color: #9dcbff;
    background: #162d44;
  }

  .s-done,
  .t-done {
    color: #a5df9e;
    background: #1c321b;
  }

  .t-review {
    color: #dbb9ff;
    background: #30213e;
  }

  .s-declined,
  .t-returned {
    color: #ffb3aa;
    background: #3b1f1a;
  }

  .person.mine {
    background: #1b2b18;
    border-color: #72bd68;
  }
}

.bar {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='18' viewBox='0 0 36 18'%3E%3Cg fill='none' stroke='%23fff' stroke-opacity='.16' stroke-width='1.2'%3E%3Cpath d='M-18 18a18 18 0 0 1 36 0M0 18a18 18 0 0 1 36 0M18 18a18 18 0 0 1 36 0'/%3E%3Cpath d='M-12 18a12 12 0 0 1 24 0M6 18a12 12 0 0 1 24 0M24 18a12 12 0 0 1 24 0'/%3E%3C/g%3E%3C/svg%3E") 0 100% / 36px 18px repeat,
    var(--accent);
  box-shadow: 0 2px 0 rgba(115, 45, 0, .16);
}

.tabs button.on {
  background: linear-gradient(180deg, rgba(255, 255, 255, .16), transparent 70%), var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn.primary,
.fab {
  background: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(145, 48, 0, .08)), var(--accent);
  border-color: var(--accent);
  color: #fff;
}

@media (prefers-color-scheme: dark) {
  .tabs button {
    background: #282019;
    border-color: #5a4636;
    color: #f0e3d6;
  }

  .btn:not(.primary),
  .btn.small:not(.primary),
  .btn.ghost:not(.primary),
  .link-btn {
    background: #282019;
    border-color: #5a4636;
    color: #f0e3d6;
  }

  .btn.ghost:not(.primary),
  .link-btn {
    color: #ffbd86;
    border-color: #8a5732;
  }

  .btn.danger:not(.primary) {
    color: #ffb3aa;
  }
}

/* パソコンの幅でも、上のバーの中身（アイコン・設定・ログアウト）を下の列の幅にそろえ、スマホと同じ見た目にする（2026-10-14） */
@media (min-width: 700px) {
  .bar {
    padding-left: max(12px, calc((100% - 640px) / 2 + 8px));
    padding-right: max(12px, calc((100% - 640px) / 2 + 8px));
  }
}

/* 設定の「操作の記録」（2026-10-14） */
.audit { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 0; }
.audit li { display: grid; gap: 2px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.audit li:first-child { border-top: 0; }

/* 設定の「削除したもの」（2026-10-21） */
.trash { list-style: none; margin: 8px 0 0; padding: 0; }
.trash li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.trash li:first-child { border-top: 0; }
.trash-main { flex: 1; min-width: 0; display: grid; gap: 2px; font-size: 14px; }
.trash-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: 800; font-size: 15px; }

/* ---- プロフィール（2026-10-21） ---- */
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 13px; font-weight: 700; padding: 3px 11px; border-radius: 999px; border: 1px solid #f0b483; background: #fff1e4; color: #9d3e00; line-height: 1.5; }
.tag.policy { border-color: #c9b9a6; background: #f7efe4; color: #5a4636; }
.pick .tag { cursor: pointer; font: inherit; font-size: 13px; background: var(--surface); border-color: var(--line); color: var(--muted); font-weight: 600; padding: 5px 12px; }
.pick .tag.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 800; }
.pick .tag.policy.on { background: #5a4636; border-color: #5a4636; color: #fff; }
.only-staff { font-size: 12px; color: var(--muted); font-weight: 600; }
.members { display: grid; gap: 10px; }
.roster { display: grid; gap: 10px; }
.mem { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow-card); color: inherit; text-decoration: none; }
.mem > .avatar { grid-row: span 5; width: 44px; height: 44px; font-size: 18px; }
.mem > :not(.avatar) { grid-column: 2; }
.mem-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mem-top strong { font-size: 16px; }
.mem-school { font-size: 13px; }
.mem .tag { font-size: 12px; padding: 1px 9px; }
.nowtag { justify-self: start; font-size: 12px; font-weight: 800; color: #286d39; background: #e3f3dc; border-radius: 999px; padding: 1px 9px; }
.person-name { color: inherit; text-decoration: none; }
.person-name strong { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; }
.meishi { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-card); }
.meishi .band { height: 64px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='18' viewBox='0 0 36 18'%3E%3Cg fill='none' stroke='%23fff' stroke-opacity='.18' stroke-width='1.2'%3E%3Cpath d='M-18 18a18 18 0 0 1 36 0M0 18a18 18 0 0 1 36 0M18 18a18 18 0 0 1 36 0'/%3E%3Cpath d='M-12 18a12 12 0 0 1 24 0M6 18a12 12 0 0 1 24 0M24 18a12 12 0 0 1 24 0'/%3E%3C/g%3E%3C/svg%3E") 0 100% / 36px 18px, var(--accent); }
.meishi > .avatar.large { position: absolute; top: 26px; left: 18px; border: 3px solid var(--surface); width: 78px; height: 78px; font-size: 32px; }
.meishi-body { padding: 46px 18px 18px; display: grid; gap: 12px; }
.meishi-name { font-size: 22px; font-weight: 850; }
.quote { border-left: 3px solid var(--accent); padding: 4px 0 4px 12px; font-size: 15px; line-height: 1.7; white-space: pre-wrap; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 14px; margin: 0; }
.facts dt { color: var(--muted); font-weight: 700; padding-top: 2px; }
.facts dd { margin: 0; }
.joined-edit { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.joined-edit select { width: auto; padding: 6px 8px; }
.today-line { font-size: 15px; font-weight: 800; color: #286d39; margin-bottom: 8px; }
.today-line.none { color: var(--muted); }
.timeline { display: grid; gap: 5px; font-size: 12px; }
.tl-head, .tl-row { display: grid; grid-template-columns: 22px 1fr; gap: 6px; align-items: center; }
.tl-scale { position: relative; height: 14px; color: var(--muted); }
.tl-scale span { position: absolute; transform: translateX(-50%); }
.tl-track { position: relative; height: 24px; border-radius: 6px; background: #f6efe5; border: 1px solid var(--line); }
.tl-bar { position: absolute; top: 2px; bottom: 2px; border-radius: 4px; background: #7cc47a; color: #10361a; font-weight: 800; font-size: 11px; display: flex; align-items: center; justify-content: center; white-space: nowrap; overflow: hidden; }
.tl-row b { font-weight: 800; }
.tl-row.today b { color: var(--accent-ink); }
.tl-row.today .tl-track { border-color: #f0b483; box-shadow: 0 0 0 1px #f0b483; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.small-note { font-size: 13px; margin-bottom: 8px; }
.dayrows { display: grid; gap: 8px; }
.dayrow { display: grid; grid-template-columns: 58px 1fr; gap: 8px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.dayrow.off { background: transparent; border-style: dashed; }
.daytoggle { display: flex; align-items: center; gap: 6px; font: inherit; font-weight: 800; font-size: 16px; padding: 6px 0; background: none; border: 0; color: inherit; cursor: pointer; }
.daytoggle .box { width: 22px; height: 22px; border-radius: 6px; border: 2px solid #c9b9a6; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; color: #fff; }
.dayrow:not(.off) .box { background: var(--accent); border-color: var(--accent); }
.ranges { display: grid; gap: 6px; }
.range { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.range select.time { width: auto; padding: 6px 8px; font-size: 15px; }
.range .x { background: none; border: 0; color: var(--muted); font-size: 20px; padding: 0 6px; cursor: pointer; }
.addrange { justify-self: start; background: none; border: 0; padding: 2px 0; font: inherit; font-size: 13px; color: var(--accent-ink); font-weight: 700; cursor: pointer; text-align: left; }
.offtext { color: var(--muted); font-size: 14px; padding-top: 8px; }
@media (prefers-color-scheme: dark) {
  .tag { background: #3a2617; border-color: #7d4b29; color: #ffbd86; }
  .tag.policy { background: #2c241d; border-color: #5a4636; color: #e6d6c4; }
  .pick .tag { background: #241c15; border-color: #4a3c30; color: #c8b8a6; }
  .pick .tag.policy.on { background: #e6d6c4; border-color: #e6d6c4; color: #241c15; }
  .nowtag { background: #1c321b; color: #a5df9e; }
  .today-line { color: #a5df9e; }
  .tl-track { background: #241c15; }
  .tl-bar { background: #4f9a4c; color: #fff; }
  .daytoggle .box { border-color: #6a5848; }
}

/* 自分の名前の行：名前を押すと自分のプロフィール。狭い幅では「メンバー」「使い方」が次の行に回る */
.whoami { flex-wrap: wrap; row-gap: 8px; }
.whoami-me { display: inline-flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; white-space: nowrap; }
.whoami .role { white-space: nowrap; }
.whoami-links { margin-left: auto; display: flex; gap: 6px; }
.whoami-links .help-entry { margin-left: 0; }

/* 政策分野の色（名刺ダッシュボードと同じ14色。--c に入る）2026-10-21 */
.tag.policy { --c: #8a7a6a; border-color: color-mix(in srgb, var(--c) 45%, white); background: color-mix(in srgb, var(--c) 11%, white); color: color-mix(in srgb, var(--c) 78%, black); }
.pick .tag.policy { border-color: color-mix(in srgb, var(--c) 35%, white); background: var(--surface); color: color-mix(in srgb, var(--c) 70%, black); }
.pick .tag.policy.on { background: color-mix(in srgb, var(--c) 88%, black); border-color: color-mix(in srgb, var(--c) 88%, black); color: #fff; }
.policy-tabs { align-items: center; }
.policy-label { font-size: 12px; font-weight: 800; color: var(--muted); padding-right: 2px; white-space: nowrap; }
.policy-tabs button.policy { --c: #8a7a6a; border-color: color-mix(in srgb, var(--c) 40%, white); color: color-mix(in srgb, var(--c) 75%, black); }
.policy-tabs button.policy::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--c); margin-right: 6px; vertical-align: 1px; }
.policy-tabs button.policy.on { background: color-mix(in srgb, var(--c) 88%, black); border-color: color-mix(in srgb, var(--c) 88%, black); color: #fff; }
.policy-tabs button.policy.on::before { background: #fff; }
@media (prefers-color-scheme: dark) {
  .tag.policy { border-color: color-mix(in srgb, var(--c) 55%, black); background: color-mix(in srgb, var(--c) 22%, #201a15); color: color-mix(in srgb, var(--c) 45%, white); }
  .pick .tag.policy { background: #241c15; border-color: color-mix(in srgb, var(--c) 45%, black); color: color-mix(in srgb, var(--c) 50%, white); }
  .pick .tag.policy.on { background: color-mix(in srgb, var(--c) 75%, black); border-color: color-mix(in srgb, var(--c) 75%, black); color: #fff; }
  .policy-tabs button.policy { border-color: color-mix(in srgb, var(--c) 50%, black); color: color-mix(in srgb, var(--c) 45%, white); }
  .policy-tabs button.policy.on { background: color-mix(in srgb, var(--c) 75%, black); border-color: color-mix(in srgb, var(--c) 75%, black); color: #fff; }
}

/* PC の広い画面：左側にプロフィール（左320px＋本文640px を1組にして真ん中に置く）2026-10-21 */
.side-profile { display: none; }
@media (min-width: 1180px) {
  #app.with-side main { margin-left: calc(50% - 150px); margin-right: auto; }
  #app.with-side .bar { padding-left: calc(50% - 490px + 8px); padding-right: calc(50% - 490px + 8px); }
  #app.with-side .fab { left: calc(50% + 170px); }
  #app.with-side .side-profile { display: grid; align-content: start; gap: 12px; position: fixed; top: 74px; left: calc(50% - 490px);
    width: 320px; max-height: calc(100vh - 90px); overflow-y: auto; padding: 0 4px 16px 0; }
  .side-head { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 800; color: var(--muted); }
  .side-links { display: flex; gap: 12px; }
  .side-links a, .side-links button { font: inherit; font-size: 13px; font-weight: 700; color: var(--accent-ink); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
  .side-profile .meishi-name { font-size: 20px; }
  .side-profile .tl-bar { font-size: 10px; }
  .person-name.side-on strong { text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
  .mem.side-on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow-card); }
}

/* 左側のプロフィールの「閉じる」と、閉じたときの「› プロフィール」ボタン */
.side-open { display: none; }
@media (min-width: 1180px) {
  .side-links .side-close { text-decoration: none; font-size: 18px; line-height: 1; color: var(--muted); padding: 0 2px; }
  .side-open { display: block; position: fixed; top: 74px; left: 0; z-index: 4; font: inherit; font-size: 13px; font-weight: 800;
    color: var(--accent-ink); background: var(--surface); border: 1px solid var(--line); border-left: 0; border-radius: 0 999px 999px 0;
    padding: 8px 14px 8px 10px; box-shadow: var(--shadow-card); cursor: pointer; }
}
