/* 物件ウォッチ: 物件チラシ (マイソク) と路線図をもとにした画面 */
:root {
  --paper: #f3eee4;
  --paper-2: #fbf8f2;
  --paper-3: #ebe4d6;
  --ink: #1d1b18;
  --ink-2: #4a453d;
  --muted: #8a8173;
  --rule: #d8cfbf;
  --shu: #cf3f26;        /* 朱: 良い・新着・現在地 */
  --ai: #24486e;         /* 藍: 路線・保留 */
  --sumi: #4b463e;       /* 墨: 否 */
  --board: #151411;      /* 発車標 */
  --board-line: #2a2722;
  --amber: #ffb547;
  --led-green: #8ee39a;
  --led-dim: #6f675a;
  --radius: 14px;
  --shadow: 0 1px 0 rgba(29, 27, 24, .04), 0 10px 30px -18px rgba(29, 27, 24, .35);
  --font-body: "Zen Kaku Gothic New", "Hiragino Sans", "Noto Sans JP", sans-serif;
  --font-display: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #14130f;
    --paper-2: #1d1b16;
    --paper-3: #26231d;
    --ink: #ece4d4;
    --ink-2: #c9c0ae;
    --muted: #8f8676;
    --rule: #36322a;
    --shu: #ff6b4b;
    --ai: #8db0dc;
    --sumi: #b8af9f;
    --board: #0c0b09;
    --board-line: #24211c;
    --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 12px 30px -16px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font: 15px/1.7 var(--font-body);
  background-color: var(--paper);
  /* 方眼紙 */
  background-image:
    linear-gradient(color-mix(in srgb, var(--rule) 45%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--rule) 45%, transparent) 1px, transparent 1px);
  background-size: 28px 28px;
  background-attachment: fixed;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.num { font-family: var(--font-display); font-feature-settings: "palt"; }
.mono { font-family: var(--font-mono); font-size: .92em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- 見出し部 ---------- */
.masthead {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.masthead-inner {
  max-width: 1120px; margin: 0 auto; padding: 12px 16px 6px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.brand-seal {
  flex: none; width: 34px; height: 34px; display: grid; place-items: center;
  border: 2px solid var(--shu); border-radius: 6px; color: var(--shu);
  font: 800 19px/1 var(--font-display); transform: rotate(-4deg);
}
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font: 800 19px/1.2 var(--font-display); letter-spacing: .06em; }
.brand-sub { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.pill {
  flex: none; display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px; text-decoration: none;
  background: var(--paper-2); border: 1px solid var(--rule); font-size: 13px; white-space: nowrap;
}
.pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.pill.running { border-color: var(--shu); }
.pill.running i { background: var(--shu); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.75); } }

.tabs {
  max-width: 1120px; margin: 0 auto; padding: 0 16px;
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
}
.tabs a, .tab-logout {
  position: relative; padding: 8px 12px 10px; text-decoration: none; color: var(--ink-2);
  font-weight: 500; background: none; border: 0; cursor: pointer; white-space: nowrap;
}
.tabs a.on { color: var(--ink); }
.tabs a.on::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 3px;
  border-radius: 3px 3px 0 0; background: var(--shu);
}
.tab-logout { margin-left: auto; color: var(--muted); font-size: 13px; }

main { max-width: 1120px; margin: 0 auto; padding: 20px 16px 64px; }
.page-title { font: 800 26px/1.3 var(--font-display); margin: 4px 0 4px; letter-spacing: .04em; }
.page-lead { color: var(--muted); margin: 0 0 18px; font-size: 13.5px; }
.section-title {
  display: flex; align-items: baseline; gap: 10px;
  font: 800 18px/1.4 var(--font-display); margin: 28px 0 12px; letter-spacing: .04em;
}
.section-title small { font: 400 12.5px var(--font-body); color: var(--muted); }

/* ---------- 発車標 (巡回の状態) ---------- */
.board {
  background: var(--board); color: #f3ead8; border-radius: var(--radius);
  padding: 18px 18px 14px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.board::before {
  /* LED の走査線 */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 3px);
}
.board-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.board-title { font: 800 15px var(--font-display); letter-spacing: .18em; color: #d9cdb6; }
.board-title b { color: var(--amber); font-weight: 800; margin-left: 8px; letter-spacing: .08em; }
.board-actions { display: flex; gap: 8px; }
.board-btn {
  border: 1px solid #4a443a; background: #201e1a; color: #f3ead8; border-radius: 8px;
  padding: 6px 14px; cursor: pointer; font-size: 13px; text-decoration: none;
}
.board-btn.go { background: var(--shu); border-color: var(--shu); color: #fff; }
.board-btn:disabled { opacity: .4; cursor: default; }
.board-rows { display: grid; gap: 6px; font-family: var(--font-mono); font-size: 13.5px; }
.board-row { display: grid; grid-template-columns: 7.5em 1fr; gap: 12px; align-items: baseline; padding: 6px 0; border-top: 1px solid var(--board-line); }
.board-row dt { color: var(--led-dim); letter-spacing: .1em; }
.board-row dd { margin: 0; color: var(--amber); }
.board-row dd .g { color: var(--led-green); }
.board-row dd .w { color: #f3ead8; }
.board-log { margin: 12px 0 0; padding: 0; list-style: none; font-family: var(--font-mono); font-size: 12.5px; color: #b9ad97; max-height: 15em; overflow: auto; }
.board-log li { display: grid; grid-template-columns: 4.2em 1fr; gap: 10px; padding: 2px 0; }
.board-log time { color: var(--led-dim); }
.board-log .warn { color: var(--amber); }
.board-log .error { color: #ff8a73; }
.board-foot { margin-top: 10px; font-size: 12px; color: var(--led-dim); }
.board-foot a { color: #d9cdb6; }

/* 路線図 (巡回の段階) */
.rail { list-style: none; margin: 4px 0 16px; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); position: relative; }
.rail::before {
  content: ""; position: absolute; left: calc(100% / 14); right: calc(100% / 14); top: 9px; height: 4px;
  background: #3a362e; border-radius: 4px;
}
.rail::after {
  content: ""; position: absolute; left: calc(100% / 14); top: 9px; height: 4px; border-radius: 4px;
  width: calc((100% - 100% / 7) * var(--progress, 0)); background: #6f9bd0; transition: width .6s ease;
}
.rail li { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.rail .dot { width: 22px; height: 22px; border-radius: 50%; background: var(--board); border: 4px solid #3a362e; }
.rail .done .dot { border-color: #6f9bd0; background: #6f9bd0; }
.rail .now .dot { border-color: var(--amber); background: var(--board); box-shadow: 0 0 0 6px rgba(255, 181, 71, .16); animation: beacon 2s ease-in-out infinite; }
.rail .fail .dot { border-color: #ff8a73; background: #ff8a73; }
@keyframes beacon { 50% { box-shadow: 0 0 0 10px rgba(255, 181, 71, 0); } }
.rail .name { font-size: 12px; color: #8f8574; line-height: 1.3; }
.rail .done .name { color: #c9bea9; }
.rail .now .name { color: var(--amber); font-weight: 700; }

.meter { height: 6px; border-radius: 6px; background: #2c2924; overflow: hidden; margin-top: 6px; }
.meter i { display: block; height: 100%; background: var(--amber); border-radius: 6px; transition: width .6s ease; }

/* ---------- 集計 / 絞り込み ---------- */
.filters { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: none; margin-top: 22px; }
.filter {
  flex: none; display: inline-flex; align-items: baseline; gap: 8px; text-decoration: none;
  padding: 8px 14px; border-radius: 12px; background: var(--paper-2); border: 1px solid var(--rule);
  color: var(--ink-2); font-size: 13.5px; transition: transform .15s ease, border-color .15s ease;
}
.filter:hover { transform: translateY(-1px); border-color: var(--ink-2); }
.filter b { font: 800 18px/1 var(--font-display); color: var(--ink); }
.filter.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.filter.on b { color: var(--paper); }

/* ---------- 物件カード ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; margin-top: 8px; }
.card {
  display: flex; flex-direction: column; background: var(--paper-2);
  border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
  animation: rise .5s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 45ms);
}
.card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -22px rgba(29, 27, 24, .55); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.photo { position: relative; aspect-ratio: 4 / 3; background: var(--paper-3); overflow: hidden; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo.empty {
  display: grid; place-items: center; color: var(--muted); font-size: 13px;
  background-image:
    linear-gradient(var(--rule) 1px, transparent 1px), linear-gradient(90deg, var(--rule) 1px, transparent 1px);
  background-size: 18px 18px;
}
.stamp {
  position: absolute; top: 12px; right: 12px; width: 60px; height: 60px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 2.5px solid var(--shu); color: var(--shu); background: color-mix(in srgb, var(--paper-2) 82%, transparent);
  transform: rotate(-9deg); font-family: var(--font-display); line-height: 1;
}
.stamp b { font-size: 24px; font-weight: 800; }
.stamp small { font-size: 11px; margin-top: 3px; font-weight: 600; }
.stamp.HOLD { border-color: var(--ai); color: var(--ai); }
.stamp.NG { border-color: var(--sumi); color: var(--sumi); }
.stamp.none { border-color: var(--muted); color: var(--muted); border-style: dashed; }
.stamp.inline { position: static; transform: rotate(-6deg); width: 72px; height: 72px; flex: none; }
.stamp.inline b { font-size: 28px; }

.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-station { font-weight: 700; font-size: 15.5px; }
.card-station span { font-weight: 400; color: var(--ink-2); margin-left: 6px; }
.price { font-family: var(--font-display); font-size: 15px; color: var(--ink-2); }
.price b { font-size: 26px; font-weight: 800; color: var(--ink); letter-spacing: .01em; }
.spec { font-size: 13.5px; color: var(--ink-2); }
.times { list-style: none; margin: 4px 0 2px; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.times li {
  display: inline-flex; align-items: baseline; gap: 6px; padding: 3px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--ai) 9%, var(--paper-2)); font-size: 12.5px; color: var(--ink-2);
}
.times li b { font: 800 15px var(--font-display); color: var(--ai); }
.summary { font-size: 13.5px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.reason { font-size: 13px; color: var(--muted); }
.card-meta { margin-top: auto; padding-top: 6px; font-size: 12px; color: var(--muted); }
.empty-state {
  text-align: center; padding: 48px 16px; color: var(--muted); border: 1.5px dashed var(--rule); border-radius: var(--radius);
}
.empty-state b { display: block; font: 800 18px var(--font-display); color: var(--ink-2); margin-bottom: 4px; }

/* ---------- パネル・表 ---------- */
.panel { background: var(--paper-2); border: 1px solid var(--rule); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.panel + .panel { margin-top: 16px; }
.settings .panel + .panel { margin-top: 0; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.table th { font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: .06em; }
.table tr.link { cursor: pointer; transition: background .15s ease; }
.table tr.link:hover { background: var(--paper-3); }
.table .r { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
.tag { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 12px; background: var(--paper-3); color: var(--ink-2); white-space: nowrap; }
.tag.ok { background: color-mix(in srgb, var(--ai) 14%, var(--paper-2)); color: var(--ai); }
.tag.run { background: color-mix(in srgb, var(--shu) 14%, var(--paper-2)); color: var(--shu); }
.tag.ng { background: color-mix(in srgb, var(--shu) 18%, var(--paper-2)); color: var(--shu); }

/* ---------- 物件の詳細 ---------- */
.back { display: inline-block; margin-bottom: 12px; font-size: 13.5px; color: var(--muted); text-decoration: none; }
.back:hover { color: var(--ink); }
.detail-head { display: flex; gap: 18px; align-items: flex-start; }
.detail-head .price b { font-size: 34px; }
.detail-title { font: 800 22px/1.4 var(--font-display); margin: 0 0 4px; }
.links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 10px; border: 1px solid var(--rule);
  background: var(--paper-2); text-decoration: none; cursor: pointer; font-weight: 500;
}
.btn.primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn:disabled { opacity: .5; cursor: default; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.gallery button { padding: 0; border: 0; background: none; cursor: zoom-in; text-align: left; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; background: var(--paper-3); }
.gallery span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 4px; line-height: 1.4; }
.points { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.points h3 { font: 800 14px var(--font-display); margin: 0 0 6px; letter-spacing: .06em; }
.points ul { margin: 0; padding-left: 1.2em; font-size: 14px; color: var(--ink-2); }
.facts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
dl.kv { display: grid; grid-template-columns: 9em 1fr; gap: 8px 16px; margin: 0; font-size: 14px; }
dl.kv dt { color: var(--muted); font-size: 12.5px; }
dl.kv dd { margin: 0; white-space: pre-wrap; }
.viewer {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0;
  border: 0; background: transparent; overflow: hidden; cursor: zoom-out;
}
.viewer[open] { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.viewer::backdrop { background: rgba(10, 9, 7, .9); }
/* 実際の大きさは画面に合わせて JS で決める (小さい写真も引き伸ばす) */
.viewer img { display: block; max-width: none; border-radius: 6px; cursor: default; background: #222; image-rendering: auto; }
.viewer-caption { margin: 0; padding: 0 16px; color: #efe6d4; text-align: center; font-size: 13.5px; cursor: default; }
.viewer-caption span + span { margin-left: 10px; }
.viewer-hint { margin: 0; color: #8f8676; font-size: 11.5px; }

/* ---------- 条件の設定 ---------- */
.settings { display: grid; gap: 16px; }
.setting-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.setting-head h2 { font: 800 18px var(--font-display); margin: 0; letter-spacing: .04em; }
.help { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.field input, .field select, .field textarea, .search-box {
  font: inherit; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--rule);
  background: var(--paper); color: var(--ink); width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus, .search-box:focus { outline: 2px solid color-mix(in srgb, var(--ai) 45%, transparent); outline-offset: 1px; }
.unit { display: flex; align-items: center; gap: 8px; }
.unit input { width: 100%; }
.unit em { font-style: normal; color: var(--muted); font-size: 13px; white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span {
  display: inline-block; padding: 6px 13px; border-radius: 999px; border: 1px solid var(--rule);
  background: var(--paper); font-size: 13.5px; transition: all .15s ease; user-select: none;
}
.chip input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip input:focus-visible + span { outline: 2px solid var(--ai); outline-offset: 2px; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.switch input { appearance: none; width: 42px; height: 24px; border-radius: 999px; background: var(--rule); position: relative; cursor: pointer; transition: background .2s ease; flex: none; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s ease; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.switch input:checked { background: var(--shu); }
.switch input:checked::after { transform: translateX(18px); }
details.more { margin-top: 14px; border-top: 1px dashed var(--rule); padding-top: 12px; }
details.more summary { cursor: pointer; font-weight: 500; color: var(--ink-2); }
.group { margin-top: 12px; }
.group h3 { font-size: 12.5px; color: var(--muted); font-weight: 500; margin: 0 0 6px; }
.save-row { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.saved { font-size: 13px; color: var(--ai); }
.saved.err { color: var(--shu); }
.impact { display: flex; gap: 24px; flex-wrap: wrap; }
.impact div { display: flex; flex-direction: column; }
.impact b { font: 800 28px/1.1 var(--font-display); }
.impact span { font-size: 12.5px; color: var(--muted); }

/* ---------- 駅 ---------- */
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 16px 0 12px; }
.toolbar .search-box { max-width: 260px; }
.st-name b { font-weight: 700; }
.st-name small { display: block; color: var(--muted); font-size: 11.5px; line-height: 1.4; }
.st-off td { color: var(--muted); }
.walk-input { width: 64px; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--rule); background: var(--paper); color: var(--ink); font: inherit; }

/* ---------- ログイン ---------- */
.login-wrap { min-height: 80vh; display: grid; place-items: center; }
.login {
  width: min(380px, 100%); background: var(--paper-2); border: 1px solid var(--rule); border-radius: 18px;
  padding: 32px 28px; box-shadow: var(--shadow); text-align: center;
}
.login .brand-seal { width: 52px; height: 52px; font-size: 28px; margin: 0 auto 14px; }
.login h1 { font: 800 24px var(--font-display); margin: 0 0 4px; letter-spacing: .08em; }
.login p { color: var(--muted); font-size: 13px; margin: 0 0 20px; }
.login .field { text-align: left; margin-bottom: 14px; }
.login .btn { width: 100%; justify-content: center; }
.error { color: var(--shu); font-size: 13px; min-height: 1.4em; margin: 4px 0 10px; }

.loading { color: var(--muted); padding: 40px 0; text-align: center; }

@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .page-title { font-size: 22px; }
  .board { padding: 16px 14px 12px; border-radius: 12px; }
  .board-row { grid-template-columns: 6.2em 1fr; }
  .rail .name { font-size: 10.5px; }
  .rail .dot { width: 18px; height: 18px; border-width: 3px; }
  .rail::before, .rail::after { top: 7px; height: 3px; }
  .detail-head { flex-direction: column-reverse; gap: 8px; }
  .points { grid-template-columns: 1fr; }
  dl.kv { grid-template-columns: 1fr; gap: 2px; }
  dl.kv dd { margin-bottom: 10px; }
  .brand-sub { max-width: 52vw; }
  /* 駅の表はスマホでは行をカード状に積む */
  .stations-table thead { display: none; }
  .stations-table tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
  .stations-table td { border: 0; padding: 2px 0; }
  .stations-table td[data-k]::before { content: attr(data-k) " "; color: var(--muted); font-size: 11.5px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* 余白の小道具 (CSP で style 属性が使えないため) */
.grow { flex: 1; min-width: 0; }
.mt0 { margin-top: 0; }
.mb0 { margin-bottom: 0; }
.mt8 { margin-top: 8px; }
.mt12 { margin-top: 12px; }
.mt16 { margin-top: 16px; }
.mt20 { margin-top: 20px; }
.switches { margin-top: 14px; display: flex; gap: 18px; flex-wrap: wrap; }

.field textarea { min-height: 110px; resize: vertical; line-height: 1.6; }
.action-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }

/* ---------- 自分の判断 (気になる / ナシ) ---------- */
.card-link { display: flex; flex-direction: column; flex: 1; text-decoration: none; color: inherit; }
.card-actions { display: flex; gap: 8px; padding: 0 16px 14px; }
.mark-btn {
  flex: 1; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--rule); background: var(--paper);
  font-size: 13px; font-weight: 500; color: var(--ink-2); cursor: pointer; transition: all .15s ease;
}
.mark-btn:hover { border-color: var(--ink-2); }
.mark-btn[data-mark="like"].on, .mark-btn[data-set="like"].on { background: var(--shu); border-color: var(--shu); color: #fff; }
.mark-btn[data-mark="dismissed"].on, .mark-btn[data-set="dismissed"].on { background: var(--sumi); border-color: var(--sumi); color: var(--paper); }
.mark-btn.big { flex: none; min-width: 120px; padding: 10px 18px; font-size: 14.5px; }
.manage-marks { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.link-btn { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: 13px; }
.mark {
  position: absolute; top: 12px; left: 12px; z-index: 1; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
}
.mark.like { background: var(--shu); color: #fff; }
.mark.dismissed { background: var(--sumi); color: var(--paper); }
.card.is-dismissed .photo img { filter: grayscale(.8); opacity: .7; }
.card.leaving { opacity: 0; transform: scale(.96); transition: opacity .25s ease, transform .25s ease; }
.note { font-size: 13px; color: var(--ink-2); background: var(--paper-3); border-radius: 8px; padding: 6px 10px; margin: 4px 0 0; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50;
  display: flex; align-items: center; gap: 14px; padding: 10px 14px 10px 18px; border-radius: 12px;
  background: var(--ink); color: var(--paper); box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .5); font-size: 14px;
  animation: rise .25s ease both;
}
.toast button { background: none; border: 1px solid color-mix(in srgb, var(--paper) 40%, transparent); color: var(--paper); border-radius: 8px; padding: 4px 10px; cursor: pointer; }
.times-note { font-size: 11.5px; color: var(--muted); margin-top: -2px; }
.new-tag { align-self: flex-start; font-size: 11px; font-weight: 700; color: var(--shu); border: 1px solid var(--shu); border-radius: 4px; padding: 0 6px; letter-spacing: .08em; }
.re-tag { align-self: flex-start; font-size: 11px; color: var(--ai); border: 1px dashed var(--ai); border-radius: 4px; padding: 0 6px; }
.filter-lead { margin: 4px 0 12px; font-size: 13px; color: var(--muted); }
