/* 1カラム。カードは「半券」：上が中身、点線の下が自分の反応 */
:root {
  --bg: #EEF2F0; --surface: #FFFFFF; --fg: #1B2422; --muted: #5B6A65; --line: #D5DDD9;
  --accent: #1D6B57; --accent-ink: #FFFFFF; --accent-soft: #DCEDE6;
  --urgent: #C2410C; --urgent-soft: #FCE8DC; --meh: #B9C4BF; --skip: #E3E8E6; --line-green: #06C755;
  --display: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Yu Gothic", sans-serif;
  --body: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #111816; --surface: #1A2321; --fg: #E4ECE8; --muted: #9AABA5; --line: #2C3835;
  --accent: #5CC4A5; --accent-ink: #0D1A16; --accent-soft: #1F3A32;
  --urgent: #FF9466; --urgent-soft: #3A2419; --meh: #4A5955; --skip: #2A3431; color-scheme: dark } }
:root[data-theme="dark"] {
  --bg: #111816; --surface: #1A2321; --fg: #E4ECE8; --muted: #9AABA5; --line: #2C3835;
  --accent: #5CC4A5; --accent-ink: #0D1A16; --accent-soft: #1F3A32;
  --urgent: #FF9466; --urgent-soft: #3A2419; --meh: #4A5955; --skip: #2A3431; color-scheme: dark }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--body); font-size: 15px; line-height: 1.6; }
.wrap { max-width: 640px; margin: 0 auto; padding-block: 16px 110px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  display: flex; flex-direction: column; gap: 16px; }
section { display: flex; flex-direction: column; gap: 16px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.brand { font-family: var(--display); font-weight: 900; font-size: 1.25rem; color: var(--fg); text-decoration: none; }
.brand small { font-family: var(--body); font-size: .7rem; font-weight: 500; color: var(--muted); letter-spacing: .08em; margin-left: 8px; vertical-align: middle; }
.area { font-size: .8rem; color: var(--muted); }
.proto { margin: 0; font-size: .78rem; color: var(--urgent); background: var(--urgent-soft); border-radius: 8px; padding: 6px 10px; }
.status { font-size: .85rem; color: var(--muted); }
.status[data-kind="warn"] { color: var(--urgent); }

h1 { font-family: var(--display); font-weight: 900; font-size: 1.6rem; line-height: 1.35; margin: 8px 0 0; text-wrap: balance; }
.lead { margin: 0; color: var(--muted); }
.sec { font-size: .8rem; letter-spacing: .08em; color: var(--muted); margin: 8px 0 0; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.form { display: flex; flex-direction: column; gap: 12px; }
.form label, .form legend, .controls label { font-size: .75rem; color: var(--muted); font-weight: 700; }
.form label { display: flex; flex-direction: column; gap: 3px; }
.form fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.form input, .form textarea { font-size: 1rem; font-weight: 400; color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 9px; width: 100%; }
.form textarea { min-height: 72px; resize: vertical; }
.primary { align-self: flex-start; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 10px; padding: 11px 22px; font-weight: 700; }
.primary.small { padding: 8px 16px; font-size: .88rem; }
.note { margin: 8px 0 0; font-size: .78rem; color: var(--muted); }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips button { font-size: .85rem; border: 1px solid var(--line); background: var(--surface); color: var(--fg); border-radius: 999px; padding: 5px 12px; }
.chips button[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.chips .accent { border-color: var(--accent); color: var(--accent); font-weight: 700; }
.chips .accent[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.link { background: none; border: 0; padding: 2px 4px; font-size: .78rem; font-weight: 700; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.invite strong { font-family: var(--display); font-size: 1.05rem; }
.invite p { margin: 2px 0 10px; font-size: .88rem; color: var(--muted); }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row button, .sharebar button { font-size: .85rem; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); }
.row .ghost { border-style: dashed; color: var(--muted); }
.line { background: var(--line-green); color: #fff; font-weight: 700; font-size: .88rem; text-decoration: none; padding: 9px 14px; border-radius: 10px; }
.who { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: .8rem; color: var(--muted); }
.who button { font-size: .8rem; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 3px 10px; color: var(--fg); }
.who button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); font-weight: 700; }

.wish summary { cursor: pointer; font-weight: 700; }
.wish .form { margin-top: 10px; }
.wish-list { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 8px; }
.wish-list li { border-top: 1px solid var(--line); padding-top: 8px; font-size: .88rem; overflow-wrap: anywhere; }
.wish-list .meta { display: flex; justify-content: space-between; gap: 8px; font-size: .75rem; color: var(--muted); }

.filters { display: flex; flex-direction: column; gap: 6px; }
.filters-head, .countrow { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .75rem; color: var(--muted); font-weight: 700; }
.countrow { font-weight: 400; font-size: .8rem; }
.controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.controls label { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.controls select { font-size: .88rem; font-weight: 400; color: var(--fg); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; width: 100%; min-width: 0; }

.list { display: flex; flex-direction: column; gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.card.done { opacity: .6; }
.card.picked { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.band { height: 6px; background: var(--band, var(--accent)); }
.photo { margin: 0; position: relative; background: var(--skip); }
.photo img { display: block; width: 100%; max-height: 340px; object-fit: contain; }
.photo figcaption { position: absolute; right: 6px; bottom: 6px; font-size: .65rem; color: #fff; background: rgba(0,0,0,.55); border-radius: 4px; padding: 0 6px; }
.card-main { padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.meta-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chip { font-size: .72rem; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.chip.urgent { background: var(--urgent-soft); color: var(--urgent); }
.chip.new { background: var(--fg); color: var(--bg); }
.chip.slot { background: transparent; border: 1.5px solid currentColor; color: var(--urgent); }
.chip.match { background: var(--accent); color: var(--accent-ink); }
.chip.member { background: var(--bg); color: var(--fg); border: 1px solid var(--line); font-weight: 500; }
.pick { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; color: var(--muted); cursor: pointer; }
.pick input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.card h3 { font-family: var(--display); font-weight: 700; font-size: 1.1rem; margin: 2px 0 0; line-height: 1.4; text-wrap: balance; }
.pitch { margin: 0; font-size: .92rem; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; font-size: .88rem; margin: 2px 0 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.links { display: flex; gap: 14px; flex-wrap: wrap; font-size: .88rem; }
.links a { color: var(--accent); font-weight: 700; text-decoration: none; }
.src { color: var(--muted); font-weight: 400; font-size: .8rem; }
.controls input[type="date"] { font-size: .88rem; color: var(--fg); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; width: 100%; min-width: 0; }
.pr { display: inline-block; margin-left: 2px; padding: 0 5px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font-weight: 400; font-size: .68rem; line-height: 1.5; vertical-align: 1px; }
.adbox { margin: 20px 0 14px; padding: 8px; border: 1px dashed var(--line); border-radius: 10px; min-height: 60px; }
.adlabel { display: block; font-size: .68rem; color: var(--muted); margin-bottom: 4px; }

/* みんなの反応（%） */
.crowd { display: flex; flex-direction: column; gap: 3px; margin-top: 4px; }
.crowd-head { display: flex; justify-content: space-between; gap: 8px; font-size: .78rem; color: var(--muted); }
.crowd-head b { color: var(--accent); font-size: .95rem; font-variant-numeric: tabular-nums; }
.bar { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: var(--skip); }
.bar i { display: block; height: 100%; }
.bar .w { background: var(--accent); }
.bar .m { background: var(--meh); }
.crowd-legend { font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; }

.stub { border-top: 2px dashed var(--line); padding: 8px 12px 12px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.stub span { grid-column: 1 / -1; font-size: .72rem; color: var(--muted); font-weight: 700; }
.stub button { font-size: .85rem; font-weight: 700; padding: 9px 0; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); }
.stub button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.empty { text-align: center; color: var(--muted); padding: 28px 8px; font-size: .9rem; }

.sharebar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(0,0,0,.08);
  padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.sharebar span { font-size: .85rem; font-weight: 700; margin-right: auto; }
.copybox { position: fixed; left: 16px; right: 16px; bottom: 80px; height: 40vh; z-index: 21; font-size: .85rem; padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); }
@media (prefers-reduced-motion: no-preference) { .stub button, .chips button { transition: background .15s, color .15s; } }
.foot { border-top: 1px solid var(--line); padding-top: 12px; font-size: .72rem; color: var(--muted); }
.foot p { margin: 0 0 4px; }
.foot a { color: var(--accent); }
.roombar { display: flex; gap: 8px; align-items: flex-end; }
.roombar label { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: .75rem; color: var(--muted); font-weight: 700; }
.roombar select { font-size: 1rem; font-weight: 700; color: var(--fg); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px; width: 100%; }
.roombar button { font-size: .85rem; font-weight: 700; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--accent); background: var(--surface); color: var(--accent); white-space: nowrap; }
.sharerow { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .82rem; }
.sharerow label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.sharerow input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.link.quiet { color: var(--muted); font-weight: 400; }
.reportrow { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: .78rem; color: var(--muted); }
.reportrow button { font-size: .78rem; border: 1px solid var(--line); background: var(--bg); color: var(--fg); border-radius: 999px; padding: 3px 10px; }
