/* MyTANA — 比較リスト管理画面
   色はすべて :root の変数で定義する。ダークはメディアクエリと data-theme の両方で
   「変数の再定義だけ」を行い、部品側の CSS には素の色を書かない。
   角丸は 3px（ダイアログ・パレットのみ 8px）。影はパレットとダイアログだけ薄く残す。 */

:root {
  /* 面と文字 */
  --bg: #eef1f0;
  --surface: #ffffff;
  --surface-2: #f6f8f7;
  --surface-3: #eceeed;
  --border: #e1e5e3;
  --border-strong: #c6cecb;
  --text: #141a19;
  --text-muted: #68726f;
  --text-faint: #98a19e;

  /* アクセント */
  --accent: #1b5464;
  --accent-hover: #153f4c;
  --accent-soft: #e3ecef;
  --accent-on: #ffffff;

  /* 行の状態（ホバー・選択は背景 bg で示す） */
  --row-hover: #eef1f0;
  --row-selected: #eef1f0;
  --row-resolved: #f7f9f8;

  /* アーカイブ帯（琥珀） */
  --amber-bg: #fdf3dd;
  --amber-fg: #7a5310;
  --amber-border: #e6cd97;

  /* 評価の色は既存運用の標準。テーマに関係なく固定する（他の資料と見た目を揃えるため） */
  --rate-a-bg: #f4cccc;
  --rate-a-fg: #cc0000;
  --rate-b-bg: #fce5a6;
  --rate-b-fg: #5c4405;
  --rate-c-bg: #d9ead3;
  --rate-c-fg: #38761d;

  --danger: #b3261e;
  --overlay: rgba(16, 23, 23, .38);
  /* 影はパレット・ダイアログ専用 */
  --shadow-pop: 0 8px 24px rgba(16, 23, 23, .14);

  --font-body: "IBM Plex Sans JP", system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", sans-serif;
  --font-head: "Murecho", "IBM Plex Sans JP", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --topbar-h: 48px;
  --tabs-h: 40px;
  --sidebar-w: 200px;
  --detail-w: 360px;
  --radius: 3px;
  --radius-lg: 8px;
}

@media (min-width: 1440px) {
  :root { --detail-w: 420px; }
}

/* OS の設定がダークのとき（明示的にライトを選んでいない場合だけ効かせる） */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101717;
    --surface: #182121;
    --surface-2: #1d2726;
    --surface-3: #233030;
    --border: #2c3939;
    --border-strong: #3d4a49;
    --text: #e4ebea;
    --text-muted: #93a1a0;
    --text-faint: #73817f;

    --accent: #76b3c5;
    --accent-hover: #8fc4d4;
    --accent-soft: #1c2f36;
    --accent-on: #0f1a1d;

    --row-hover: #101717;
    --row-selected: #101717;
    --row-resolved: #141c1c;

    --amber-bg: #3a2d13;
    --amber-fg: #f0ce86;
    --amber-border: #5d4a22;

    --danger: #f2b8b5;
    --overlay: rgba(0, 0, 0, .55);
    --shadow-pop: 0 8px 24px rgba(0, 0, 0, .5);
  }
}

/* 明示的にダークを選んだとき（OS がライトでも勝つ） */
:root[data-theme="dark"] {
  --bg: #101717;
  --surface: #182121;
  --surface-2: #1d2726;
  --surface-3: #233030;
  --border: #2c3939;
  --border-strong: #3d4a49;
  --text: #e4ebea;
  --text-muted: #93a1a0;
  --text-faint: #73817f;

  --accent: #76b3c5;
  --accent-hover: #8fc4d4;
  --accent-soft: #1c2f36;
  --accent-on: #0f1a1d;

  --row-hover: #101717;
  --row-selected: #101717;
  --row-resolved: #141c1c;

  --amber-bg: #3a2d13;
  --amber-fg: #f0ce86;
  --amber-border: #5d4a22;

  --danger: #f2b8b5;
  --overlay: rgba(0, 0, 0, .55);
  --shadow-pop: 0 8px 24px rgba(0, 0, 0, .5);
}

:root[data-theme="dark"] { color-scheme: dark; }
:root[data-theme="light"] { color-scheme: light; }

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  /* 上部バー / ジャンルタブ / 作業領域。ページ自体は縦にも横にもスクロールさせない */
  display: grid;
  grid-template-rows: var(--topbar-h) var(--tabs-h) minmax(0, 1fr);
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-head); font-weight: 700; margin: 0; }

button, input, select, textarea { font: inherit; color: inherit; }

a { color: var(--accent); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* 数字（件数・価格・日付）は mono＋タブラー数字で右揃えにする */
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* 線画アイコン共通 */
.icon { width: 16px; height: 16px; flex: none; display: block; }

.kbd {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 1px 4px;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-muted);
}

/* ---------- 上部バー ---------- */

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  min-width: 0;
}

.brand {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: .16em;
  color: var(--text);
  padding-right: 4px;
  flex: none;
}

.searchbox {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 120px;
  max-width: 460px;
  height: 30px;
  padding: 0 8px 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text-faint);
  text-align: left;
  cursor: text;
}
.searchbox:hover { border-color: var(--accent); color: var(--text-muted); }
.searchbox__label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.badges { display: flex; gap: 6px; flex: none; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
}
.badge:hover { border-color: var(--accent); color: var(--text); }
/* 鮮度は0件のとき app.js が hidden を立てる。[hidden] は .badge と詳細度が同じで
   後勝ちも当てにできないので、ここで明示して消す（他の [hidden] と同じ扱い）。 */
.badge[hidden] { display: none; }
.badge[aria-current="true"] {
  background: var(--bg);
  border-color: var(--border-strong);
  color: var(--text);
}
.badge__n { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 600; color: var(--text); }
.badge--warn .badge__n { color: var(--amber-fg); }
.badge--zero { opacity: .55; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 28px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { border-color: var(--accent); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--accent-on); }
.btn--primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn--small { height: 24px; padding: 0 8px; font-size: 12px; }
.btn--mini { height: 18px; padding: 0 4px; font-size: 10px; border-color: var(--border); color: var(--text-muted); }
.btn--mini:hover { color: var(--text); }
.btn--danger { color: var(--danger); }
.btn--danger:hover { border-color: var(--danger); background: var(--surface-2); }
.btn[disabled] { opacity: .5; cursor: default; }
.btn[disabled]:hover { border-color: var(--border-strong); }

.iconbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  flex: none;
}
.iconbtn:hover { background: var(--surface-2); color: var(--text); }
/* 畳んでいる間は、そのトグルを押された形で見せる。畳んだ本人にとっては
   「どこから戻すのか」が分からないのがいちばん困るので、戻す場所が
   ひと目で分かるようにしておく（aria-pressed="false" ＝いま畳んでいる）。 */
.iconbtn[aria-pressed="false"] {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text);
}
.iconbtn[aria-pressed="false"]:hover { background: var(--bg); }

/* ---------- ジャンルタブ ---------- */

.genretabs {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 0 8px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  /* ジャンルは第一階層なので「その他▾」に畳まず、入り切らなければ横スクロールさせる */
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  scrollbar-width: thin;
}
.genretabs::-webkit-scrollbar { height: 4px; }
.genretabs::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 2px; }

.tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  flex: none;
}
.tab:hover { color: var(--text); background: var(--surface-2); }
/* 選択中は太字＋下線 2px（ink 色） */
.tab[aria-current="true"] { color: var(--text); border-bottom-color: var(--text); font-weight: 700; }
/* 物品購入はアクティブがほぼ無い（買い切りで役目を終えたリスト群）ので控えめに置く */
.tab--muted { color: var(--text-faint); }
.tab__n {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  color: var(--text-faint);
}
.tab[aria-current="true"] .tab__n { color: var(--text-muted); }
/* ジャンルタブ末尾の「＋」。他のタブと同じ高さで、アイコンだけの控えめな見た目にする */
.tab--add { color: var(--text-faint); padding: 0 10px; }
.tab--add:hover { color: var(--text); background: var(--surface-2); }

/* ---------- 作業領域 ---------- */

.workspace {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 0;
  min-width: 0;
}
.workspace.has-detail { grid-template-columns: var(--sidebar-w) minmax(0, 1fr) var(--detail-w); }

/* ---------- 左サイドバー ---------- */

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 12px 8px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  min-height: 0;
}

/* 見出しと、その右端の「畳む」ボタン（右パネルの閉じるボタンと同じ形・同じ位置） */
.sidebar__head {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  padding: 0 8px 10px;
}
.sidebar__headmain { flex: 1 1 auto; min-width: 0; }
.sidebar__title { font-family: var(--font-head); font-weight: 700; font-size: 14px; }
.sidebar__def { color: var(--text-faint); font-size: 11px; }
.sidebar__def::before { content: "／"; }

.listrow {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 5px 8px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.listrow:hover { background: var(--bg); }
/* 選択中は太字・背景 bg・左端に 2px の ink バー */
.listrow[aria-current="true"] {
  background: var(--bg);
  color: var(--text);
  font-weight: 600;
  box-shadow: inset 2px 0 0 var(--text);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.listrow__name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.listrow__n { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 11px; color: var(--text-faint); text-align: right; }
.listrow--archived .listrow__name { color: var(--text-muted); }

/* ダブルクリック／Enter でのリスト名リネーム。行のボタンとほぼ同じ寸法で差し替わるので
   ガタつかない（Finderのリネームボックスと同じ見た目のつもり） */
.listrow--renaming {
  display: block;
  width: 100%;
  padding: 4px 7px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

/* ① ドラッグ＆ドロップ: 表の行をドラッグしている間、全リスト行に薄いドロップ枠を出し、
   実際にホバーしている行だけ強調する（誤操作対策として「ここに置ける」を常に見せる） */
body.dragging-row .listrow { outline: 1px dashed var(--border-strong); outline-offset: -1px; }
.listrow--dragover { outline: 2px solid var(--accent) !important; outline-offset: -2px; background: var(--accent-soft); }

/* 表の行をリストへドラッグする時の、ブラウザ既定より小さい代わりのドラッグ画像。
   setDragImage に渡すためだけの一時要素で、画面には実質映らない（showRowDragGhost参照）。
   単発は評価チップ＋名前、複数選択はFinderの複数ファイル移動に寄せてアイコン＋件数。 */
.drag-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  max-width: 220px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
  font-size: 12px;
  color: var(--text);
  white-space: nowrap;
}
.drag-ghost__name { overflow: hidden; text-overflow: ellipsis; }
.drag-ghost__chip {
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
}
.drag-ghost__chip--none { border: 1px solid var(--border-strong); }
.drag-ghost__chip[data-rating="A"] { background: var(--rate-a-bg); color: var(--rate-a-fg); }
.drag-ghost__chip[data-rating="B"] { background: var(--rate-b-bg); color: var(--rate-b-fg); }
.drag-ghost__chip[data-rating="C"] { background: var(--rate-c-bg); color: var(--rate-c-fg); }
.drag-ghost__stack {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
}
.drag-ghost__badge {
  flex: none;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* 左サイドバーの並び替えハンドル。ホバー時だけ出す（常時出すと見出しの左揃えが崩れて見える） */
.listrow__handle {
  display: flex;
  align-items: center;
  flex: none;
  color: var(--text-faint);
  opacity: 0;
  cursor: grab;
}
.listrow:hover .listrow__handle { opacity: 1; }
.listrow__handle:active { cursor: grabbing; }
body.dragging-listrow { cursor: grabbing; }
/* タッチ端末（ホバーが無い環境）はネイティブ HTML5 D&D 自体が効かないので、ハンドルを
   出さない。opacity:0 のまま残すと見えないのにタップだけ受けて、リスト行のクリック
   （onclick）まで stopPropagation で止めてしまい、その場所だけリストを開けなくなる。
   display:none にしてクリックの対象から外し、タップはそのまま親の行に通す。 */
@media (hover: none) {
  .listrow__handle { display: none; }
}
/* ドロップ先の行に、挿す位置（前 or 後）を上端・下端の線で示す。選択中の行
   （.listrow[aria-current="true"]、詳細度が高く独自の box-shadow を持つ）に
   対しても効くよう、同じ詳細度の組み合わせを別途書いて上書きする */
.listrow--before,
.listrow[aria-current="true"].listrow--before { box-shadow: inset 0 2px 0 0 var(--accent); }
.listrow--after,
.listrow[aria-current="true"].listrow--after { box-shadow: inset 0 -2px 0 0 var(--accent); }

.sidebar__sep { height: 1px; margin: 8px 4px; background: var(--border); border: 0; }

.archtoggle {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 5px 8px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-muted);
  text-align: left;
  cursor: pointer;
}
.archtoggle:hover { background: var(--bg); color: var(--text); }
.archtoggle__mark { width: 10px; font-family: var(--font-mono); }

.sidebar__empty { padding: 8px; color: var(--text-faint); font-size: 12px; }

/* ---------- 中央 ---------- */

.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--bg);
}

.mainhead {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 16px 10px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.mainhead__row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mainhead__title { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; }
.mainhead__title .icon { color: var(--text-muted); }
.mainhead__desc { color: var(--text-muted); font-size: 12px; margin: 0; }
.mainhead__spacer { flex: 1; }
.mainhead__count { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 12px; color: var(--text-faint); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 20px;
  padding: 0 8px;
  border-radius: var(--radius);
  background: var(--surface-3);
  color: var(--text-muted);
  font-size: 11px;
  border: 1px solid transparent;
}
.chip .icon { width: 12px; height: 12px; }
.chip--archive { background: var(--amber-bg); color: var(--amber-fg); border-color: var(--amber-border); }
.chip--filter { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.chip--action { font: inherit; cursor: pointer; transition: background-color .1s, border-color .1s; }
.chip--action:hover { background: var(--border); }
.chip--action:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.chip__x {
  display: inline-flex; align-items: center;
  border: 0; background: transparent; color: inherit; cursor: pointer;
  padding: 0 0 0 2px; line-height: 1;
}
.chip__x .icon { width: 11px; height: 11px; }

.pills { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius); overflow: hidden; }
.pill {
  height: 24px;
  padding: 0 9px;
  border: 0;
  border-right: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
}
.pill:last-child { border-right: 0; }
.pill:hover { background: var(--surface-2); color: var(--text); }
.pill[aria-pressed="true"] { background: var(--bg); color: var(--text); font-weight: 600; }

.filterinput {
  height: 24px;
  width: 180px;
  padding: 0 8px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
}

/* 行を追加する簡易フォーム（リストのヘッダー内） */
.addrow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.addrow__input {
  height: 24px;
  padding: 0 8px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
}
.addrow__input:focus { border-color: var(--accent); }
.addrow__input--name { width: 240px; }
.addrow__input--url { width: 260px; }
.addrow__hint { font-size: 11px; color: var(--text-faint); }

/* ---------- 表 ---------- */

.tablewrap {
  flex: 1;
  min-height: 0;
  /* 列は固定6本に畳んであるので、横には流さない（ページ全体も横スクロールさせない） */
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--surface);
}

.grid {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  table-layout: fixed;
  background: var(--surface);
}

.grid th, .grid td {
  border-bottom: 1px solid var(--border);
  padding: 4px 10px;
  text-align: left;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: var(--surface);
}
.grid td { height: 44px; }

.grid thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface);
  border-bottom: 1px solid var(--border-strong);
  font-weight: 500;
  color: var(--text-muted);
  font-size: 11px;
  height: auto;
  padding-top: 6px;
  padding-bottom: 6px;
}

.grid tbody tr { cursor: pointer; }
/* ホバーと選択は背景 bg で示す */
.grid tbody tr:hover td { background: var(--row-hover); }
.grid tbody tr[aria-selected="true"] td { background: var(--row-selected); }
.grid tbody tr.row--resolved td { background: var(--row-resolved); color: var(--text-faint); }
/* 追加したばかりで、まだサーバの返事を待っている行 */
.grid tbody tr.row--pending td { color: var(--text-muted); font-style: italic; }

/* 数字セル（件数・価格・日付）は mono・右揃え */
.grid .cell-num, .grid th.cell-num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  text-align: right;
}

.grid .c-rating { padding-left: 12px; padding-right: 6px; }

/* ④ 一括移動のチェック列・② 行メニュー(…)の操作列。評価送りモード中はどちらも出さない */
.grid .c-select { width: 30px; padding-left: 10px; padding-right: 2px; }
.grid .c-actions { width: 26px; padding-left: 2px; padding-right: 8px; text-align: right; }
.rowcheck { width: 14px; height: 14px; cursor: pointer; accent-color: var(--accent); vertical-align: middle; }
.rowmenu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
}
.rowmenu-btn:hover { background: var(--surface-2); color: var(--text); }
/* チェック済みの行は選択中の行と同じ背景で分かるようにする */
.grid tbody tr:has(.rowcheck:checked) td { background: var(--row-selected); }

/* 名前セル（2段組: 上段=名前 / 下段=要約） */
/* 名前列は残りの幅を全部もらうので、画面が広いほど1行が長く伸びる。長い名前が
   端まで一直線に流れると目で追えないので、読みやすい幅で止めて折り返す。
   2行に収まらない分は省略し、全文は title（マウスオーバー）で読める。 */
.ncell { min-width: 0; max-width: 620px; }
.ncell__top { display: flex; align-items: flex-start; gap: 6px; min-width: 0; }
.ncell__name {
  font-weight: 600;
  font-size: 13.5px;
  line-height: 1.45;
  /* .grid td の nowrap を打ち消す。継承したままだと折り返せず、1行のまま
     ただ切られる（省略記号も出ない）。 */
  white-space: normal;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  /* URL のような切れ目の無い文字列でも器の外へ出さない */
  overflow-wrap: anywhere;
  min-width: 0;
}
.ncell__link { flex: none; display: inline-flex; color: var(--text-faint); text-decoration: none; }
.ncell__link:hover { color: var(--accent); }
.ncell__link .icon { width: 13px; height: 13px; }
.ncell__sub {
  font-size: 11px;
  line-height: 1.4;
  color: var(--text-faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 確認日セル（鮮度ビューでは下段に「今日にする」を置く） */
.datecell { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }

.listlink {
  border: 0; background: transparent; padding: 0; cursor: pointer;
  color: var(--accent); text-align: left; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 5px;
}
.listlink:hover { text-decoration: underline; }
.listlink .icon { width: 12px; height: 12px; }
.listlink__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* 評価セル。着色するのはこのチップだけで、行全体には色を付けない */
.rate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--surface-3);
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
}
.rate:hover { border-color: var(--accent); }
.rate[data-rating="A"] { background: var(--rate-a-bg); color: var(--rate-a-fg); }
.rate[data-rating="B"] { background: var(--rate-b-bg); color: var(--rate-b-fg); }
.rate[data-rating="C"] { background: var(--rate-c-bg); color: var(--rate-c-fg); }
/* 評価が無い行は 14x14 の枠線だけの空チップ（—は描かない） */
.rate--none {
  width: 14px;
  height: 14px;
  background: transparent;
  border-color: var(--border-strong);
}
.rate--lg { width: 44px; height: 28px; font-size: 14px; }
.rate--lg.rate--none { width: 16px; height: 16px; }

.state {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
  padding: 28px 20px;
  color: var(--text-muted);
}
.state__title { font-family: var(--font-head); font-weight: 700; font-size: 15px; color: var(--text); }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
  padding: 16px;
  overflow-y: auto;
}
.card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  text-align: left;
  color: var(--text);
}
.card:hover { border-color: var(--accent); }
.card .icon { color: var(--text-faint); width: 14px; height: 14px; }
.card__name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card__n { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 12px; color: var(--text-faint); }


/* ---------- 右パネル ---------- */

.detail {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--surface);
  border-left: 1px solid var(--border);
  overflow: hidden;
}
/* [hidden] は詳細度がクラスセレクタと同じなので、後勝ちを当てにせず明示する。
   これが無いと、1200px未満で「何も選んでいない」ときに fixed 配置の空パネルが
   画面右3分の1を覆ったまま残る。 */
.detail[hidden] { display: none; }
/* ログイン画面表示中、MyTANA本体側を同じ理由で明示的に隠す（showLoginScreen 参照）。 */
.topbar[hidden], .genretabs[hidden], .workspace[hidden], .login-screen[hidden] { display: none; }

.detail__head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 12px 10px 16px;
  border-bottom: 1px solid var(--border);
}
.detail__headmain { flex: 1; min-width: 0; }
.detail__eyebrow { font-size: 11px; color: var(--text-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail__title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.4;
  overflow-wrap: anywhere;
  cursor: text;
  border-radius: var(--radius);
  margin: 2px 0 0;
}
.detail__title:hover { background: var(--bg); }
.detail__titleinput {
  width: 100%;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.4;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1px 4px;
  margin: 2px 0 0;
  resize: none;
  overflow: hidden;
}
.detail__meta { display: flex; align-items: center; gap: 10px; margin-top: 7px; }
.detail__fill { font-size: 11px; color: var(--text-faint); }

.banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--amber-bg);
  color: var(--amber-fg);
  border-bottom: 1px solid var(--amber-border);
  font-size: 12px;
}
.banner__text { flex: 1; }
.banner .btn { border-color: var(--amber-border); background: transparent; color: var(--amber-fg); }
.banner .btn:hover { background: var(--surface); }

.detail__body { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; }

/* パネル内のセクション（タブは廃止して縦1本スクロール） */
.dsec { padding: 10px 16px 12px; border-bottom: 1px solid var(--border); }
.dsec:last-of-type { border-bottom: 0; }
.dsec__label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: var(--text-faint);
  margin-bottom: 4px;
}
.dsec__row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.dsec__grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start; }

/* クリックで編集に切り替わる値表示 */
.edwrap { min-width: 0; flex: 1; }
.ed {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 3px 4px;
  margin: 0 -4px;
  text-align: left;
  color: var(--text);
  cursor: text;
  border-radius: var(--radius);
  overflow-wrap: anywhere;
  line-height: 1.5;
}
.ed:hover { background: var(--bg); }
.ed--empty { color: var(--text-faint); }
.ed-input {
  width: 100%;
  padding: 2px 4px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
}

/* 改行を含む項目（シートのメモ列）の編集。中身に合わせて高さを伸ばすので
   自前のリサイズハンドルは要らない。表の行の中で開くため、セルの高さを
   押し広げるぶんの余白は上下に持たせない。 */
.ed-input--multi {
  display: block;
  min-height: 24px;
  resize: none;
  overflow-y: auto;
  line-height: 1.4;
  font: inherit;
  white-space: pre-wrap;
}

/* メモ（常設 textarea・auto-grow） */
.memoarea {
  width: 100%;
  min-height: 64px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  resize: none;
  overflow: hidden;
  field-sizing: content;
}
.memoarea:hover { border-color: var(--border-strong); }
.memoarea:focus { border-color: var(--accent); background: var(--surface); }
.savenote { font-size: 11px; color: var(--text-faint); }

/* スペック */
.spec { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 8px; padding: 3px 0; align-items: start; }
.spec__k { font-size: 11px; color: var(--text-faint); padding-top: 4px; overflow-wrap: anywhere; }
/* 列を消している最中の値。編集欄と同じ位置・同じ行の高さで、押せないだけ */
.spec__frozen { padding: 3px 4px; color: var(--text-muted); overflow-wrap: anywhere; }
.spec-toggle {
  display: block;
  margin-top: 6px;
  padding: 3px 0;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
  text-align: left;
}
.spec-toggle:hover { color: var(--text); }

/* 価格調査（店/価格/日の3列ミニ表） */
.qtable { width: 100%; border-collapse: collapse; font-size: 12px; }
.qtable th {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-faint);
  text-align: left;
  padding: 2px 6px 4px;
  border-bottom: 1px solid var(--border);
}
.qtable td { padding: 4px 6px; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; vertical-align: top; }
.qtable tr:last-child td { border-bottom: 0; }
.qtable .cell-num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
/* 最安の行に細い目印 */
.qrow--min td:first-child { box-shadow: inset 2px 0 0 var(--accent); }
.qrow--memo td { border-bottom: 1px solid var(--border); padding-top: 0; }
.qmemo { color: var(--text-faint); font-size: 11px; white-space: normal; }

/* 評価送りモード（パネル上部の大きな A/B/C/スキップ） */
.ratepad { padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.ratepad__row { display: grid; grid-template-columns: 1fr 1fr 1fr 1.2fr; gap: 6px; }
.ratepad__btn {
  height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
}
.ratepad__btn--a { background: var(--rate-a-bg); color: var(--rate-a-fg); border-color: transparent; }
.ratepad__btn--b { background: var(--rate-b-bg); color: var(--rate-b-fg); border-color: transparent; }
.ratepad__btn--c { background: var(--rate-c-bg); color: var(--rate-c-fg); border-color: transparent; }
.ratepad__btn:hover { border-color: var(--accent); }
.ratepad__skip { font-family: var(--font-body); font-weight: 400; font-size: 12px; }
.ratepad__meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-faint);
}

/* リストのカルテ（行を選んでいないときの右パネル） */
.meter { display: flex; height: 10px; border-radius: var(--radius); overflow: hidden; background: var(--border); }
.meter__seg { display: block; }
.meter__seg--a { background: var(--rate-a-bg); }
.meter__seg--b { background: var(--rate-b-bg); }
.meter__seg--c { background: var(--rate-c-bg); }
.meter__seg--none { background: var(--border); }
.meterlegend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; font-size: 11px; color: var(--text-muted); }
.meterlegend .num { color: var(--text); }
.meterlegend__a { color: var(--rate-a-fg); }
.meterlegend__b { color: var(--rate-b-fg); }
.meterlegend__c { color: var(--rate-c-fg); }

.fillrow { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 3px 0; font-size: 12px; }
.fillrow__k { color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fillrow__n { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 11px; color: var(--text-faint); flex: none; }

.karte__cta { margin: 12px 16px 16px; margin-top: auto; padding-top: 12px; }
.karte__cta .btn { width: 100%; height: 34px; }

/* 行のメタ情報（元タブ・追加/更新時刻）。パネル最下部に薄く出す */
.detail__srcmeta { padding: 10px 16px 16px; font-size: 11px; color: var(--text-faint); }
.detail__srcmeta div { display: flex; justify-content: space-between; gap: 8px; }
.detail__srcmeta .num { font-size: 11px; }

/* 右パネルの足元。削除は取り消せないので、他の操作から離してここに置く */
.detail__foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.detail__footnote { margin-right: auto; font-size: 11px; color: var(--text-faint); }

.field { display: flex; flex-direction: column; gap: 3px; margin-bottom: 0; }
.field__label { font-size: 11px; color: var(--text-faint); }
.field input[type="text"],
.field input[type="date"],
.field select,
.field textarea {
  width: 100%;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
}
.field input:hover, .field textarea:hover, .field select:hover { border-color: var(--border-strong); }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); background: var(--surface); }
.field textarea { resize: vertical; min-height: 60px; }
.field__row { display: flex; gap: 6px; align-items: center; }
.field__row input { flex: 1; min-width: 0; }

.dialog .field { margin-bottom: 10px; }

.note { color: var(--text-faint); font-size: 12px; margin: 0; }

/* ---------- ポップオーバー ---------- */

.popover {
  position: fixed;
  z-index: 60;
  min-width: 150px;
  padding: 4px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
}
.popitem {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 5px 6px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}
.popitem:hover, .popitem:focus-visible { background: var(--surface-2); }
/* 消す操作。押し間違えると値ごと消えるので、色で他と区別する */
.popitem--danger, .popitem--danger:hover, .popitem--danger:focus-visible { color: var(--danger); }
.popitem__label { flex: 1; font-size: 12px; }
.popitem__kbd { font-family: var(--font-mono); font-size: 10px; color: var(--text-faint); }

/* ---------- 検索パレット ---------- */

.palette-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 10vh;
  background: var(--overlay);
}
.palette-backdrop[hidden] { display: none; }

.palette {
  width: min(680px, calc(100vw - 32px));
  max-height: 74vh;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-pop);
  overflow: hidden;
}
.palette__head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.palette__icon { color: var(--text-faint); }
.palette__head input {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 4px 0;
  font-size: 15px;
  outline: none;
}
.palette__results { flex: 1; overflow-y: auto; padding: 6px; min-height: 80px; }
.palette__group { padding: 8px 8px 2px; font-size: 11px; color: var(--text-faint); }

.pres {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 8px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.pres:hover { background: var(--surface-2); }
.pres[data-active="true"] { background: var(--bg); }
.pres__icon {
  flex: none;
  width: 18px;
  display: inline-flex;
  justify-content: center;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
}
.pres__main { flex: 1; min-width: 0; }
.pres__title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pres__sub { display: block; font-size: 11px; color: var(--text-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pres__tag { flex: none; font-size: 11px; color: var(--text-faint); }

.palette__foot {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 6px 12px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 11px;
  color: var(--text-faint);
}
.palette__hint { margin-left: auto; }

/* ---------- ダイアログ ---------- */

.dialog {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text);
  padding: 16px;
  width: min(420px, calc(100vw - 32px));
  box-shadow: var(--shadow-pop);
}
.dialog::backdrop { background: var(--overlay); }
.dialog__title { font-size: 15px; margin-bottom: 12px; }
.dialog__body { font-size: 13px; color: var(--text); margin: 0; line-height: 1.7; overflow-wrap: anywhere; }
.dialog__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }

/* ---------- マイページ（アカウントダイアログ） ---------- */

.account__head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.account__avatar {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1px solid var(--border);
  object-fit: cover;
  background: var(--surface-2);
}
/* 画像が無い／読めなかった時の受け皿。中の線画アイコンを中央に置く */
.account__avatar--blank { display: grid; place-items: center; color: var(--text-muted); }
.account__avatar--blank .icon { width: 22px; height: 22px; }
.account__who { min-width: 0; }
.account__name { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.account__sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* 定義リストを2列に。値が長いメールアドレスは折り返す */
.account__rows {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 16px;
  margin: 0;
  font-size: 13px;
  align-items: baseline;
}
.account__rows dt { color: var(--text-muted); white-space: nowrap; }
.account__rows dd { margin: 0; overflow-wrap: anywhere; }

/* ---------- 表示モードの切替（「この表を絞り込む」の右） ---------- */

.modeswitch {
  display: flex;
  flex: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  overflow: hidden;
}
.modeswitch__btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 8px;
  border: 0;
  border-right: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
}
.modeswitch__btn:last-child { border-right: 0; }
.modeswitch__btn:hover { background: var(--surface-2); color: var(--text); }
.modeswitch__btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-on); }
/* 狭い画面ではアイコンだけに落とす。文字を残すと絞り込み欄が潰れる */
@media (max-width: 899px) {
  .modeswitch__label { display: none; }
  .modeswitch__btn { padding: 0 7px; }
}

/* ---------- カード表示（行の1件を箱にする）----------
   .cards / .card はジャンル概要のリスト一覧が先に使っているので、
   同じ名前で後から定義すると向こうの見た目を奪ってしまう。別名にする。 */

.itemcardswrap { overflow: auto; min-height: 0; padding: 0 12px 16px; }
.itemcards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
  gap: 8px;
  align-items: start;
}
.itemcard {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 10px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  min-width: 0;
}
.itemcard:hover { border-color: var(--border-strong); background: var(--surface-2); }
.itemcard[aria-selected="true"] { border-color: var(--accent); box-shadow: inset 2px 0 0 var(--accent); }
.itemcard--pending { opacity: .55; }
.itemcard__head { display: flex; align-items: flex-start; gap: 8px; width: 100%; min-width: 0; }
.itemcard__head .ncell { flex: 1; min-width: 0; overflow: hidden; }
/* 表では要約を1行 nowrap で省略しているが、カードでその指定が残ると
   「折り返せない長い1行」が器の幅そのものになり、カードを突き抜けて隣に重なる。
   カードは縦に伸ばせるので、折り返して2行で打ち切る。 */
.itemcard__head .ncell__sub {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* 値を持つ項目だけが並ぶので、ここに空行は出ない */
.itemcard__specs {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 10px;
  margin: 0;
  font-size: 12px;
}
.itemcard__specs dt { color: var(--text-faint); white-space: nowrap; }
.itemcard__specs dd { margin: 0; color: var(--text-muted); overflow-wrap: anywhere; }
.itemcard__more { font-size: 11px; color: var(--text-faint); }
.itemcard__foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 6px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-muted);
}
.itemcard__quotes { color: var(--text-faint); }

/* ---------- パネル表示（右を開いたまま ↑↓ で送る） ---------- */

/* 行が並ぶ形なので、表やシートと同じく白地を敷く。ここだけ地の色（--bg）を
   そのまま見せていたため、他のモードから切り替えると中央だけ暗く沈んで見えた。 */
.panelwrap {
  /* 行が少なくても中央を白で埋めきる（表モードの .tablewrap と同じ形）。
     伸ばさないと最後の行より下だけ地の色が残り、直したいことが直らない。 */
  flex: 1;
  overflow: auto;
  min-height: 0;
  padding: 0 12px 16px;
  background: var(--surface);
}
.panelhint {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 2px 8px;
  font-size: 11px;
  color: var(--text-faint);
}
.panellist { display: flex; flex-direction: column; }
.panelrow {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 8px;
  border-top: 1px solid var(--border);
  cursor: pointer;
  min-width: 0;
}
.panelrow:first-child { border-top: 0; }
.panelrow:hover { background: var(--row-hover); }
.panelrow[aria-selected="true"] { background: var(--accent-soft); box-shadow: inset 2px 0 0 var(--accent); }
.panelrow .ncell { flex: 1; min-width: 0; }
.panelrow__date { flex: none; color: var(--text-muted); font-size: 11px; }
.panelrow--pending { opacity: .55; }

/* 名前をページから取っている間の進み具合。ボタンと同じ高さに並べる */
.titlerun { display: inline-flex; align-items: center; gap: 8px; }
.titlerun__count {
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* ---------- シート表示（全列を出してその場で編集する） ---------- */

/* ここだけは横スクロールを許す。全列を見て埋めるための形なので、
   6列に絞る表モードとは目的が違う。 */
.sheetwrap { overflow: auto; min-height: 0; padding: 0 12px 16px; }
/* 列幅は colgroup の <col> が正（app.js の buildSheet）。table-layout: fixed にすると
   中身の長さで勝手に伸び縮みしなくなり、見出しの境目をドラッグした幅がそのまま残る。
   行数が多いほど描画も速い（ブラウザが全セルの中身を測らずに済む）。 */
table.sheet {
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12.5px;
  table-layout: fixed;
}
table.sheet th, table.sheet td {
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 0;
  vertical-align: top;
  background: var(--surface);
}
table.sheet th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 5px 8px;
  background: var(--surface-3);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
  border-top: 1px solid var(--border);
}
table.sheet tr[aria-selected="true"] td { background: var(--row-selected); }
table.sheet tbody tr:hover td { background: var(--row-hover); }
/* 列ごとの幅指定はここには置かない（colgroup 側に持たせている）。
   ここに min-width を書くと、狭く縮めたい列がその値で止まってしまう。 */

/* 見出しの右端にある、幅を変えるための掴む所。線は普段出さず、乗せた時だけ出す。
   th は position: sticky なので、この絶対配置の基準になる。 */
.sheet__grip {
  position: absolute;
  top: 0;
  right: 0;
  width: 9px;
  height: 100%;
  cursor: col-resize;
  touch-action: none;   /* 触って操作する画面で、掴んだ指が縦スクロールに取られないように */
  z-index: 2;
}
.sheet__grip::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: 3px;
  width: 3px;
  background: transparent;
}
.sheet__grip:hover::after { background: var(--accent); }
/* ドラッグ中は表全体で矢印を保ち、文字が選択されないようにする */
.sheet--resizing { cursor: col-resize; user-select: none; }
.sheet--resizing .sheet__grip::after { background: var(--accent); }
/* セルの中身。編集部品は既存の .ed / .ed-input をそのまま使う。
   スプレッドシートは「1行1件」で目が走るのが利点なので、セルは折り返さず
   1行で省略し、全文はマウスオーバー（title）に逃がす。 */
table.sheet td { height: 30px; }
table.sheet td .edwrap { padding: 2px 6px; }
table.sheet td .ed {
  width: 100%;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
table.sheet td .rate { margin: 3px 6px; }

/* 折り返し（ツールバーの「切り詰め／折り返し」で切り替える）。列の幅の中で全文を出す。
   行の高さは中身に合わせて伸ばす。 */
table.sheet--wrap td { height: auto; }
table.sheet--wrap td .ed {
  white-space: pre-wrap;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
}
table.sheet--wrap td .sheetname__static {
  white-space: normal;
  overflow: visible;
  overflow-wrap: anywhere;
}

/* スペック列の見出しは、名前と操作メニューを横に並べる。メニューはホバー中と
   キーボードで辿った時だけ出す（常に出ていると見出しが読みにくい）。 */
.sheet__th--spec { padding: 0 4px 0 6px; }
.sheet__th--spec > * { vertical-align: middle; }
/* 見出しは列の幅に収める（列を狭めた時に、見出しが表を押し広げないように）。
   操作メニューを持つスペック列だけ、その分を引いた幅にする。 */
.sheet__thlabel {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}
.sheet__th--spec .sheet__thlabel { max-width: calc(100% - 26px); }
.sheet__th--spec .rowmenu-btn { opacity: 0; transition: opacity .12s; }
.sheet__th--spec:hover .rowmenu-btn,
.sheet__th--spec .rowmenu-btn:focus-visible { opacity: 1; }
@media (hover: none) {
  /* 触って操作する画面ではホバーが無いので、最初から出しておく */
  .sheet__th--spec .rowmenu-btn { opacity: 1; }
}

/* 名前セルは編集欄とリンクを横に並べる。編集欄が伸び、リンクは右端に寄る。
   min-width:0 を入れないと、長い名前が列幅を押し広げてしまう。 */
table.sheet td .sheetname {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  min-width: 0;
}
table.sheet td .sheetname .edwrap { flex: 1 1 auto; min-width: 0; padding: 0; }
.sheetname__static { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheetname__link {
  flex: 0 0 auto;
  color: var(--text-faint);
  text-decoration: none;
  padding: 0 2px;
  line-height: 1;
}
.sheetname__link:hover { color: var(--accent); }

/* 確認日はセルいっぱいの日付入力。枠を消して他のセルと同じ見え方に揃える */
.sheetdate {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  padding: 2px 6px;
  border-radius: var(--radius);
}
.sheetdate:hover { background: var(--bg); }

/* ---------- 左サイドバーの折りたたみ ---------- */

.workspace--nosidebar { grid-template-columns: minmax(0, 1fr); }
.workspace--nosidebar.has-detail { grid-template-columns: minmax(0, 1fr) var(--detail-w); }
/* [hidden] はクラスセレクタと詳細度が同じなので、後勝ちを当てにせず明示する */
.sidebar[hidden] { display: none; }

/* ---------- 一括操作バー（④ 一括移動。1件以上選択中に画面下へ浮動） ---------- */

.bulkbar {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-pop);
  font-size: 12px;
}
.bulkbar[hidden] { display: none; }
.bulkbar__count { font-weight: 600; }
.bulkbar__spacer { width: 1px; align-self: stretch; background: var(--border); }

/* ---------- トースト ---------- */

.toasts {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  /* 空でも fixed 要素として画面上に居座り、その上のクリックを奪ってしまう。
     幕そのものは触れないようにして、トースト本体だけ触れるようにする。 */
  pointer-events: none;
}
.toasts > * { pointer-events: auto; }
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 380px;
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 12px;
}
.toast--error { border-left-color: var(--danger); }
.toast__text { flex: 1; overflow-wrap: anywhere; }

.loading { padding: 20px; color: var(--text-faint); }

/* 1200px 未満では右パネルをオーバーレイにする（行を選んだときだけ JS 側で出す） */
@media (max-width: 1199px) {
  .workspace.has-detail { grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
  /* この幅では詳細がグリッドの外（position: fixed）に出るので、上の1行が
     サイドバーを隠した状態まで巻き戻してしまう。畳んでいるときは1列に保つ。
     でないと本文が 200px の列に押し込まれ、閉じたのに狭くなる。 */
  .workspace--nosidebar, .workspace--nosidebar.has-detail { grid-template-columns: minmax(0, 1fr); }
  .detail {
    position: fixed;
    top: calc(var(--topbar-h) + var(--tabs-h));
    right: 0;
    bottom: 0;
    width: min(360px, calc(100vw - 48px));
    z-index: 40;
    border-left: 1px solid var(--border-strong);
  }
}

/* サイドバー200px＋固定の列(30+46+150+132+88+44+26=516px。評価送りモード中は
   選択・操作の2列(56px)が無いので460px)＝716px（同・580px）で名前列がちょうど
   ゼロ幅になる。境界をそこに合わせると、そのすぐ上（716〜816px）で名前列が
   60px未満まで潰れて実用にならないので、名前列に最低100pxは残る幅
   （716px＋100px＝816px）を境にする。ここから下は横スクロールへ戻す
   （隠すより読めることを優先する）。 */
@media (max-width: 815px) {
  .tablewrap { overflow-x: auto; }
  .grid { min-width: 620px; }
}
/* 上部バーは固定幅の要素が横に並ぶだけなので、幅が足りなくなると右端
   （アカウント）が画面の外へ押し出される。body は overflow:hidden なので
   横スクロールでも救えない。実測（ビューポートを実際に変えて計測）では、
   全部出したままで 755px、バッジを落として 535px、ブランドも落として 436px、
   サイドバートグルも消える幅（519px以下）で 396px、検索を虫めがねだけに
   すると 308px。入り切らなくなる手前で、他からも辿り着けるものから順に落とす。 */
@media (max-width: 767px) {
  /* 横断ビューへの入口はこのバッジだけ。幅が足りないので落とす（#/view/unrated で開ける） */
  .badges { display: none; }
}
@media (max-width: 599px) {
  .brand { display: none; }
}
@media (max-width: 479px) {
  /* 検索は虫めがねだけにする。押して開くパレットは同じものなので、
     入り口の見た目が縮むだけで何も失われない。 */
  .searchbox { min-width: 0; flex: 0 0 auto; }
  .searchbox__label, .searchbox .kbd { display: none; }
}

/* さらに狭い画面ではサイドバーも畳んで、660pxの計算自体を成立させる。
   .detail はこの幅では既に position:fixed（1199px以下のルール）でグリッドの
   トラック計算から外れているため、.sidebar を消すと残るグリッドアイテムは
   .main だけになる。2トラックの定義（0px側 or 200px側）を残したままだと
   .main が最初のトラックへ押し込まれて潰れるので、1トラックに変える。
   has-detail 修飾（1199px以下のルール）の方が詳細度が高く上書きされるので、
   そちらも同じ1トラックに揃えておく。 */
@media (max-width: 519px) {
  .workspace, .workspace.has-detail { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: none; }
  /* この幅ではサイドバーを出す場所がなく常に非表示。押しても何も起きない
     ボタンを置いたままにすると壊れて見えるので、トグルごと隠す。 */
  #sidebar-toggle { display: none; }
}

/* ログイン画面 */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 16px;
}
.login-card {
  width: 100%;
  max-width: 320px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.login-card__brand {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.04em;
}
.login-card__lead { font-size: 12px; color: var(--text-muted); margin: -6px 0 4px; }
.login-card__google { display: flex; align-items: center; justify-content: center; gap: 8px; }
.login-card__google .icon { width: 16px; height: 16px; }
.login-card__divider { display: flex; align-items: center; gap: 8px; color: var(--text-faint); font-size: 11px; }
.login-card__divider::before, .login-card__divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.login-card__form { display: flex; flex-direction: column; gap: 10px; }
.login-card__form[hidden] { display: none; }
.login-card__back {
  background: none; border: none; color: var(--text-muted); font-size: 11px;
  cursor: pointer; text-align: center; padding: 2px;
}
.login-card__back:hover { color: var(--text); }
.login-card__error { font-size: 12px; color: var(--danger); margin: 0; }

/* ---------- 共有リンクの閲覧画面 ---------- */

/* 上部バーもジャンルタブも出さないので、body の3行グリッドを1行に畳む。
   本人用のUI（サイドバー・詳細）も出さないため、作業領域も1トラック。 */
body.is-shared { grid-template-rows: minmax(0, 1fr); }
.workspace--shared,
.workspace--shared.has-detail { grid-template-columns: minmax(0, 1fr); }

.sharedview {
  height: 100%;
  overflow: auto;
  padding: 28px 24px 48px;
  background: var(--surface);
}
.sharedview__head { max-width: 1100px; margin: 0 auto 18px; }
.sharedview__eyebrow { color: var(--text-faint); font-size: 11px; letter-spacing: .04em; }
.sharedview__title {
  margin: 2px 0 0;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 22px;
  text-wrap: balance;
}
.sharedview__desc { margin: 6px 0 0; color: var(--text-muted); }
.sharedview__count { margin: 8px 0 0; color: var(--text-faint); font-size: 12px; }

.sharedtable__wrap {
  max-width: 1100px;
  margin: 0 auto;
  overflow-x: auto;   /* 列が多いときはこの中だけ横に流す */
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
/* 列が少なければ幅いっぱいに、多ければ内容の幅を保って親（.sharedtable__wrap）を
   横に流す。min-width を付けないと、列が増えたぶんだけ各列が潰れ、名前が
   1文字ずつ縦に折り返される。 */
.sharedtable {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  min-width: max-content;
  font-size: 12.5px;
}
.sharedtable th, .sharedtable td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  background: var(--surface);
  /* 1列あたりの下限。これが無いと内容の長さに関わらず極端に細くなる */
  min-width: 96px;
  max-width: 260px;
}
/* 評価は1文字なので詰めてよい。名前は読ませたいので広めに取る。
   何列目かではなく列そのものに印を付ける（評価が1件も無いリストでは
   評価列自体が出ないので、位置で決めると別の列に当たってしまう）。 */
.sharedtable .col-rate { min-width: 0; width: 44px; }
.sharedtable .col-name { min-width: 180px; max-width: 320px; }
.sharedtable th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--text-faint);
  font-weight: 600;
  font-size: 11px;
  white-space: nowrap;
  border-bottom: 1px solid var(--border-strong);
}
.sharedtable tbody tr:last-child td { border-bottom: 0; }
.sharedtable tbody tr:hover td { background: var(--row-hover); }
/* 名前は読ませたいので折り返す。他の列は詰めて出す（全文は title で読める） */
.sharedname { font-weight: 600; overflow-wrap: anywhere; }
.sharedname--link { color: var(--text); text-decoration: none; border-bottom: 1px solid var(--border-strong); }
.sharedname--link:hover { color: var(--accent); border-bottom-color: var(--accent); }
.sharedview__memo { max-width: 320px; color: var(--text-muted); white-space: pre-wrap; }
.sharedview__foot {
  max-width: 1100px;
  margin: 14px auto 0;
  color: var(--text-faint);
  font-size: 11px;
}
/* 押せない見せかけの評価チップ（閲覧画面用） */
.rate--static { cursor: default; }
.rate--static:hover { border-color: transparent; }

/* ---------- 共有リンクの管理（リストのカルテ内） ---------- */

.share { display: flex; flex-direction: column; gap: 8px; }
.sharerow {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}
.sharerow__head { display: flex; align-items: baseline; gap: 8px; }
.sharerow__kind { flex: 1; font-size: 12px; font-weight: 600; }
.sharerow__seen { color: var(--text-faint); font-size: 11px; white-space: nowrap; }
.sharerow__url {
  width: 100%;
  padding: 4px 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 11px;
}
.sharerow__actions { display: flex; gap: 6px; }
.share__actions { display: flex; }

/* 作り方を選ぶダイアログ。3つの案を、何が起きるかと一緒に並べる */
.sharepick { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.sharepick__item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  color: var(--text);
}
.sharepick__item:hover, .sharepick__item:focus-visible { border-color: var(--accent); background: var(--bg); }
.sharepick__title { font-weight: 600; font-size: 13px; }
.sharepick__note { color: var(--text-muted); font-size: 11.5px; line-height: 1.5; }
/* 期限切れの共有リンク。もう開けないことが見て分かるようにする */
.sharerow--expired { opacity: .7; border-style: dashed; }
.sharerow__warn { margin: 0; color: var(--danger); font-size: 11px; }

/* ---------- 共有ページの見方の切替と、表以外の4つの形 ---------- */

/* 切替ピル。押されている1つだけ塗りつぶす（本人画面のモード切替と同じ約束） */
.sharedmodes {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  max-width: 1100px;
  margin: 0 auto 14px;
}
.sharedmodes__pill {
  padding: 5px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.sharedmodes__pill:hover { color: var(--text); border-color: var(--accent); }
.sharedmodes__pill.is-on { background: var(--accent); color: var(--accent-on); border-color: var(--accent); }
.sharedview__body { max-width: 1100px; margin: 0 auto; }

/* 「項目｜値」の小さな並び（1件ずつ・カード系で共用） */
.sharedkv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 10px; font-size: 12.5px; }
.sharedkv__k { color: var(--text-faint); white-space: nowrap; }
.sharedkv__v { overflow-wrap: anywhere; white-space: pre-wrap; }

/* 1件ずつ */
.sswipe { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.sswipe__card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 320px;
  touch-action: pan-y;   /* 縦は普通にスクロール、横は自前でめくる */
}
.sswipe__top { display: flex; justify-content: space-between; align-items: center; }
.sswipe__n { font-size: 11px; color: var(--text-faint); }
.sswipe__name .sharedname { font-size: 18px; }
.sswipe__nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sswipe__dots { display: flex; gap: 5px; flex-wrap: wrap; justify-content: center; }
.sswipe__dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--border-strong); }
.sswipe__dots i.is-on { background: var(--accent); }

/* 評価別 */
.sgroup { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.sgroup__head {
  position: sticky; top: 0; z-index: 1;
  display: flex; align-items: center; gap: 8px;
  padding: 7px 12px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  font-size: 12px; color: var(--text-muted);
}
.sgroup__n { margin-left: auto; color: var(--text-faint); }
.sgroup__row { padding: 9px 12px; border-bottom: 1px solid var(--border); }
.sgroup__row:last-child { border-bottom: 0; }
.sgroup__sub { margin-top: 2px; font-size: 11.5px; color: var(--text-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 要点（札） */
.schips { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.schips__row { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.schips__row:last-child { border-bottom: 0; }
.schips__head { display: flex; align-items: flex-start; gap: 8px; }
.schips__name { min-width: 0; }
.schips__chips { display: flex; flex-wrap: wrap; gap: 4px; }
.schip {
  font-size: 11px; padding: 2px 8px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted);
  white-space: nowrap;
}
.schip--k { background: var(--accent-soft); color: var(--accent); border-color: transparent; font-weight: 600; }

/* タイル */
.stiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.stile {
  background: var(--surface); border: 1px solid var(--border); border-radius: 9px;
  padding: 9px 10px; display: flex; flex-direction: column; gap: 5px; min-height: 96px; min-width: 0;
}
.stile__top { min-height: 20px; }
.stile__name .sharedname { font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.stile__price { font-size: 12px; color: var(--text-muted); }
.stile__sub { font-size: 10.5px; color: var(--text-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* スマホでは余白を詰める */
@media (max-width: 599px) {
  .sharedview { padding: 16px 12px 40px; }
  .sharedview__title { font-size: 19px; }
}

/* リンク発行ダイアログ: 選んだ案に印（押しても閉じず「作る」で確定する） */
.sharepick__item.is-on { border-color: var(--accent); background: var(--accent-soft); }
/* 見せ方は5つあるので2列に詰める。縦に積むと「作る」が画面の下に隠れる */
.sharepick--views { margin-top: 6px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.sharepick--views .sharepick__item { padding: 7px 10px; gap: 1px; }
.sharepick--views .sharepick__note { font-size: 11px; }
@media (max-width: 480px) { .sharepick--views { grid-template-columns: 1fr; } }
.dialog .field__label { margin-top: 12px; }

/* ---------- 共有中の印 ---------- */
.listrow__shared { display: inline-flex; color: var(--accent); flex: none; margin-left: 4px; }
.listrow__shared .icon { width: 12px; height: 12px; }
.chip--shared { color: var(--accent); background: var(--accent-soft); border-color: transparent; cursor: pointer; }
.note--shared { display: flex; align-items: center; gap: 6px; color: var(--accent); margin: 0 0 6px; }
.note--shared .icon { width: 13px; height: 13px; flex: none; }

/* ---------- シートの「＋列」 ---------- */
.sheet__addcol { white-space: nowrap; }
.sheet__addcol .btn { font-size: 11.5px; padding: 3px 8px; }

/* ---------- 共有ページの絞り込み ---------- */
.sharedfilter {
  display: flex; gap: 6px; flex-wrap: wrap; align-items: center;
  max-width: 1100px; margin: 0 auto 10px;
}
.sharedfilter__input {
  flex: 1 1 180px; min-width: 0;
  padding: 6px 10px; border: 1px solid var(--border-strong); border-radius: 999px;
  background: var(--surface); color: var(--text); font: inherit; font-size: 13px;
}
.sharedfilter__rate { display: flex; gap: 4px; }
.sharedfilter__rate .pill { padding: 4px 10px; font-size: 12px; }
.sharedfilter__count { color: var(--text-faint); font-size: 12px; white-space: nowrap; }

/* ---------- 電話の幅での本人画面（共有ページの見方を流用） ---------- */
.mobilelist { flex: 1; min-height: 0; overflow: auto; padding: 0 10px 24px; background: var(--bg); }
.mobilelist .sgroup, .mobilelist .schips { border: 0; border-radius: 0; background: transparent; }
.mobilelist .sgroup__row, .mobilelist .schips__row, .mobilelist .stile, .mobilelist .sswipe__card { cursor: pointer; }
/* 選んでいる行（右のドロワーに出ている行）を色で示す */
.mobilelist [aria-selected="true"] { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.mobilelist .stile[aria-selected="true"] { box-shadow: inset 0 0 0 2px var(--accent); }
.mobilelist .sswipe { padding-top: 10px; }
.sharedmodes--owner { margin: 0; flex-wrap: nowrap; overflow-x: auto; }
.sharedmodes--owner .sharedmodes__pill { padding: 4px 11px; font-size: 12px; white-space: nowrap; }
/* 名前セルは表モード用の余白を持つので、札の中では詰める */
.mobilelist .ncell { max-width: none; }
.mobilelist .ncell__sub { display: none; }
