/* まにあう神戸 — 駅の案内板 × 小さな案内所（織の主案の色と書体を、外部の CSS 生成に頼らず書き起こした物） */
:root {
  --paper: #F7F6F2;
  --page: #EAE8E1;
  --card: #FFFFFF;
  --line: #E2E0D8;
  --ink: #1E2226;
  --subink: #545B63;
  --port: #1D4E6E;
  --port-light: #EEF4F8;
  --terra: #B8412A;
  --terra-light: #FDF2EF;
  --amber: #96570B;
  --amber-light: #FEF8EE;
  --calm: #245E9C;
  --calm-light: #F0F6FA;
  --report: #8A4B06;
  --report-bg: #FFFBEB;
  --radius: 10px;
  --tap: 44px;
  --font: "Noto Sans JP", "Hiragino Sans", "Yu Gothic UI", "Meiryo", sans-serif;
  --num: "Inter", "Noto Sans JP", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font-family: var(--font); font-size: 15px; line-height: 1.6;
  font-feature-settings: "palt"; -webkit-tap-highlight-color: transparent;
}
a { color: var(--port); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--port); outline-offset: 2px; }
.num { font-family: var(--num); font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.shell { max-width: 480px; margin: 0 auto; min-height: 100vh; background: var(--paper);
  border-inline: 1px solid var(--line); display: flex; flex-direction: column; }

/* 試作の明示 */
.demo-bar { background: var(--ink); color: var(--paper); font-size: 14px; padding: 6px 14px; display: flex; gap: 8px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.demo-bar a { color: #F5D9A8; }

/* 季節のカウントダウン（主機能の邪魔をしない細い帯。点滅・動きなし） */
.season { display: flex; align-items: baseline; justify-content: center; gap: 8px; flex-wrap: wrap;
  padding: 6px 14px; background: var(--port-light); border-bottom: 1px solid var(--line); font-size: 14px; color: var(--port); }
.season[hidden] { display: none; }
.season .big { font-size: 15px; font-weight: 700; color: var(--ink); }
.season .sub { color: var(--subink); }

/* ヘッダー */
header.top { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px 8px; }
.brand a { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); }
.brand h1 { margin: 0; font-size: 18px; line-height: 1.1; letter-spacing: .01em; }
.brand p { margin: 2px 0 0; font-size: 14px; color: var(--subink); }
.clock { font-size: 14px; color: var(--subink); background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; }
nav.tabs { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
nav.tabs a { min-height: var(--tap); display: grid; place-items: center; font-size: 14px; font-weight: 700; color: var(--subink); text-decoration: none; border-bottom: 3px solid transparent; }
nav.tabs a[aria-current="page"] { color: var(--port); border-bottom-color: var(--port); background: rgba(238,244,248,.5); }

main { flex: 1; padding: 14px; display: flex; flex-direction: column; gap: 14px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.label { font-size: 14px; font-weight: 700; color: var(--subink); margin: 0 0 6px; display: flex; justify-content: space-between; align-items: center; gap: 6px; }

/* 選択ボタン */
.seg { display: grid; gap: 6px; }
.seg.cols4 { grid-template-columns: repeat(4, 1fr); }
.seg.cols2 { grid-template-columns: repeat(2, 1fr); background: #DCD9CF; padding: 4px; border-radius: var(--radius); }
.chip { min-height: 40px; border: 1px solid var(--line); background: var(--paper); border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; padding: 4px 6px; }
.chip[aria-pressed="true"] { background: var(--port); border-color: var(--port); color: #fff; font-weight: 700; }
.layer { min-height: 52px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; padding: 6px; line-height: 1.3; color: var(--subink); }
.layer b { display: block; font-size: 14px; }
.layer small { font-size: 14px; }
.layer[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.scroller { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.scroller::-webkit-scrollbar { display: none; }
.scroller .chip { flex: 0 0 auto; padding: 4px 12px; }
.help { font-size: 14px; color: var(--subink); margin: 6px 2px 0; }

.list-head { display: flex; justify-content: space-between; align-items: baseline; padding: 0 2px; }
.list-head h2 { margin: 0; font-size: 14px; }
.count { font-size: 14px; color: var(--subink); }

/* カード */
.cards { display: flex; flex-direction: column; gap: 12px; padding: 0; margin: 0; list-style: none; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.badge { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; border-radius: 8px; padding: 6px 10px; border: 1px solid; flex-wrap: wrap; }
.badge .left { display: flex; align-items: baseline; gap: 8px; }
.badge .tag { font-size: 14px; font-weight: 700; background: #fff; border: 1px solid currentColor; border-radius: 4px; padding: 0 6px; }
.badge .rem { font-size: 26px; font-weight: 700; letter-spacing: -.01em; }
.badge .abs { font-size: 14px; color: var(--ink); }
.u-today { background: var(--terra-light); border-color: rgba(184,65,42,.35); color: var(--terra); }
.u-soon { background: var(--amber-light); border-color: rgba(150,87,11,.35); color: var(--amber); }
.u-later { background: var(--calm-light); border-color: rgba(36,94,156,.3); color: var(--calm); }
.u-none { background: var(--paper); border-color: var(--line); color: var(--subink); }
.meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; font-size: 14px; color: var(--subink); align-items: center; }
.pill { font-size: 14px; font-weight: 700; border: 1px solid var(--line); background: var(--paper); border-radius: 4px; padding: 0 6px; color: var(--subink); }
.pill.pr { border-color: var(--amber); color: var(--amber); background: var(--amber-light); }
.pill.before { border-color: var(--calm); color: var(--calm); }
.card h3 { margin: 0; font-size: 16px; line-height: 1.45; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--port); text-decoration: underline; }
.card p.sum { margin: 6px 0 0; font-size: 14px; color: var(--subink); }
.checked { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 14px; color: var(--port); display: flex; justify-content: space-between; gap: 6px; flex-wrap: wrap; }
.report-strip { margin-top: 10px; background: var(--report-bg); border: 1px dashed var(--report); border-radius: 8px; padding: 6px 10px; font-size: 14px; }
.report-strip b { color: var(--report); }
.actions { margin-top: 12px; display: flex; gap: 6px; }
.btn { min-height: var(--tap); border-radius: 8px; border: 1px solid var(--line); background: var(--paper); font-size: 14px; font-weight: 700; padding: 0 12px; cursor: pointer; text-decoration: none; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn.primary { background: var(--port); border-color: var(--port); color: #fff; flex: 1; }
.btn.block { width: 100%; }
.btn svg { width: 16px; height: 16px; flex: none; }

.empty { text-align: center; padding: 24px 14px; }
.empty b { display: block; margin-bottom: 4px; }
.empty p { margin: 0 0 10px; font-size: 14px; color: var(--subink); }

/* 詳細 */
.back { align-self: flex-start; min-height: var(--tap); display: inline-flex; align-items: center; font-weight: 700; font-size: 14px; text-decoration: none; }
.dl { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin: 0; }
.dl > div { padding: 12px; border-bottom: 1px solid var(--line); }
.dl > div:last-child { border-bottom: 0; }
.dl dt { font-size: 14px; font-weight: 700; color: var(--subink); }
.dl dd { margin: 2px 0 0; font-size: 14px; }
.dl .warn dt { color: var(--terra); }
table.sched { width: 100%; border-collapse: collapse; font-size: 14px; }
table.sched th, table.sched td { padding: 8px 0; border-bottom: 1px solid var(--line); text-align: left; }
table.sched td { text-align: right; font-weight: 700; }
.note { font-size: 14px; color: var(--subink); }

/* ガイド */
.guide h2 { font-size: 17px; margin: 0 0 6px; }
.guide h3 { font-size: 14px; margin: 14px 0 6px; }
.guide ol, .guide ul { margin: 0; padding-left: 1.3em; font-size: 14px; }
.guide li { margin: 4px 0; }
.checklist { list-style: none; padding: 0 !important; }
.checklist label { display: flex; gap: 8px; align-items: flex-start; min-height: 36px; cursor: pointer; }
.checklist input { width: 20px; height: 20px; margin-top: 2px; flex: none; }
.official { background: var(--port-light); border: 1px solid rgba(29,78,110,.25); border-radius: 8px; padding: 8px 10px; font-size: 14px; margin-top: 10px; }
.tip { background: var(--calm-light); border-radius: 8px; padding: 8px 10px; font-size: 14px; margin-top: 8px; }
details.mini { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
details.mini summary { min-height: var(--tap); padding: 10px 12px; font-weight: 700; font-size: 14px; cursor: pointer; }
details.mini > div { padding: 0 12px 12px; font-size: 14px; }

/* フォーム */
form.f { display: flex; flex-direction: column; gap: 10px; }
form.f label { font-size: 14px; font-weight: 700; display: flex; flex-direction: column; gap: 4px; }
form.f input[type=text], form.f input[type=url], form.f input[type=date], form.f select, form.f textarea {
  font: inherit; font-size: 16px; padding: 8px 10px; border: 1px solid #BDB9AD; border-radius: 8px; background: #fff; min-height: var(--tap); }
form.f .hint { font-weight: 400; font-size: 14px; color: var(--subink); }
.hp { position: absolute; left: -9999px; }

/* ダイアログ */
dialog { border: 0; border-radius: 14px; padding: 0; width: min(440px, calc(100vw - 24px)); }
dialog::backdrop { background: rgba(30,34,38,.5); }
.dlg-head { padding: 12px 14px; background: var(--paper); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.dlg-head h2, .dlg-head h3 { margin: 0; font-size: 15px; }
.dlg-body { padding: 14px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.dlg-body .opt { text-align: left; justify-content: flex-start; width: 100%; }
.x { min-width: var(--tap); min-height: var(--tap); border: 0; background: transparent; font-size: 18px; cursor: pointer; }

.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 8px; font-size: 14px; max-width: 90vw; z-index: 60; }
.toast[hidden] { display: none; }

footer.foot { border-top: 1px solid var(--line); background: var(--card); padding: 16px 14px 24px; font-size: 14px; color: var(--subink); }
footer.foot p { margin: 4px 0; }
footer.foot .links { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; }
footer.foot .links a { min-height: 32px; display: inline-flex; align-items: center; }

@media (min-width: 720px) {
  body { padding: 24px 0; }
  .shell { border-radius: 14px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,.06); min-height: calc(100vh - 48px); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* 2026-12-05 ui-ux の点検を受けた直し */
.brand a { min-width: 0; }
.clock { white-space: nowrap; flex: none; }
@media (max-width: 400px) { .brand p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 52vw; } }
.chip { min-height: var(--tap); }
footer.foot .links a, .checklist label { min-height: var(--tap); }
.actions { gap: 8px; }
.badge .abs { flex-basis: 100%; font-size: 14px; }
.badge .tag { font-size: 14px; line-height: 1.5; }
.badge .rem { font-size: 28px; }
.season .big { font-size: 14px; color: var(--port); }
.toast { bottom: calc(20px + env(safe-area-inset-bottom)); }
@media (min-width: 720px) { .shell { overflow: clip; } }

/* ======================================================================
   2026-12-05 織のエディトリアル案の採用（律の推奨）：
   カード枠を減らし水平罫線と余白で区切る／見出しは明朝／紙面色と藍鉄色／
   PC は左に絞り込み・右に締切の非対称構図／スマホは締切に早く届く（絞り込みは横1行に畳む）。
   機能・データ・時刻処理・保存・カウントダウンは変えない。14px 未満を使わない・操作領域 44px 以上。
   ====================================================================== */
:root {
  --paper: #F9F8F5; --page: #F9F8F5; --card: #FFFFFF; --subtle: #F2EFE9;
  --ink: #1C232B; --subink: #5A6472;
  --line: #E2DFD7; --line-strong: #C9C4B8;
  --port: #1E4E68; --port-light: #EAF1F5;          /* 藍鉄色 */
  --terra: #B8412A; --terra-light: #FDF3F0;
  --serif: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", Georgia, serif;
}
body { background: var(--page); }
.shell { max-width: 1080px; background: transparent; border: 0; box-shadow: none; }
@media (min-width: 720px) { body { padding: 0; } .shell { border-radius: 0; box-shadow: none; } }
.season { background: transparent; border-bottom: 1px solid var(--line); }

/* ヘッダー：枠をやめ、余白と書体で */
header.top { position: sticky; top: 0; background: rgba(249,248,245,.97); border-bottom: 1px solid var(--line); }
.brand { padding: 14px 20px 6px; align-items: baseline; }
.brand a { gap: 10px; align-items: baseline; }
.brand h1 { margin: 0; font-family: var(--serif); font-size: 24px; font-weight: 700; letter-spacing: .04em; color: var(--port); display: flex; align-items: baseline; gap: 6px; }
.brand h1 .w2 { font-family: var(--font); font-size: 14px; font-weight: 600; color: var(--subink); letter-spacing: .08em; }
.brand p { font-family: var(--serif); font-size: 14px; color: var(--ink); margin: 2px 0 0; }
.clock { background: transparent; border: 0; padding: 0; }
nav.tabs { display: flex; gap: 24px; padding: 0 20px; border-top: 0; }
nav.tabs a { min-height: var(--tap); padding: 0 2px; place-items: center; font-weight: 500; border-bottom: 2px solid transparent; background: none !important; }
nav.tabs a[aria-current="page"] { color: var(--ink); font-weight: 700; border-bottom-color: var(--port); }

main { padding: 16px 20px 40px; gap: 16px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 8px; }

/* 一覧の構図 */
.ed-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.side { display: flex; flex-direction: column; gap: 10px; }
.side .label { font-size: 14px; color: var(--subink); letter-spacing: .06em; margin: 0 0 4px; }
/* スマホ：絞り込みは横1行に畳み、締切までの距離を短く */
.side .seg.cols4 { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.side .seg.cols4::-webkit-scrollbar { display: none; }
.side .chip { flex: 0 0 auto; padding: 4px 14px; border-radius: 999px; background: var(--card); font-weight: 500; }
.side .chip[aria-pressed="true"] { background: var(--port-light); color: var(--port); border-color: var(--port); font-weight: 700; }
.side .seg.cols2 { background: none; padding: 0; gap: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.side .layer { border-radius: 0; border-bottom: 2px solid transparent; min-height: var(--tap); padding: 4px; }
.side .layer small { display: none; }
.side .layer[aria-pressed="true"] { background: none; box-shadow: none; color: var(--ink); border-bottom-color: var(--port); }
.side .panel { background: none; border: 0; padding: 0; }
.list-head { padding: 8px 0 10px; border-bottom: 1px solid var(--line-strong); }
.list-head h2 { font-family: var(--serif); font-size: 18px; }

/* 締切：カード枠をやめ、罫線で区切る。左に残り時間（主役）、右に本文 */
.cards { gap: 0; }
.card { background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 20px 0; display: grid; grid-template-columns: 1fr; gap: 8px; }
.card .tcol, .card .bcol { min-width: 0; }
.badge { background: none !important; border: 0; padding: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.badge .left { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.badge .tag { background: none; border: 0; padding: 0; font-size: 14px; font-weight: 700; letter-spacing: .04em; }
.badge .rem { font-size: 16px; font-weight: 800; color: var(--ink); letter-spacing: -.01em; }
.badge .rem .n { font-size: 30px; line-height: 1.1; padding: 0 1px; }
.badge .abs { font-size: 14px; color: var(--subink); }
.u-today .tag { color: var(--terra); }  /* 赤は「今日」の札と、1時間を切った数字だけ（巨大な赤い面にしない） */
.u-today.unit-min .rem { color: var(--terra); }
.u-soon .tag { color: #96570B; } .u-later .tag, .u-none .tag { color: var(--port); }
.meta { margin: 0; gap: 4px 8px; }
.meta .pill { border: 0; background: none; padding: 0; font-weight: 500; }
.meta .pill + .pill::before { content: "・"; color: var(--line-strong); margin-right: 4px; }
.meta .pill.pr, .meta .pill.before { border: 1px solid var(--line-strong); border-radius: 3px; padding: 0 6px; color: var(--subink); background: none; }
.meta .pill.pr::before, .meta .pill.before::before { content: none; }
.card h3 { font-size: 17px; line-height: 1.5; margin-top: 2px; }
.card p.sum { line-height: 1.7; }
.checked { border-top: 0; padding-top: 0; margin-top: 4px; color: var(--subink); }
/* 操作：主は1つ（くわしく）。ほかは文字の操作。どれも高さ 44px 以上 */
.card .actions { margin-top: 4px; gap: 4px 20px; flex-wrap: wrap; align-items: center; }
.card .actions .btn { flex: 0 0 auto; background: none; border: 0; padding: 0 2px; color: var(--subink); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.card .actions .btn.primary { order: 9; margin-left: auto; flex: 0 0 auto; background: var(--card); border: 1px solid var(--line-strong); border-radius: 6px; padding: 0 18px; color: var(--ink); font-weight: 700; text-decoration: none; }
.card .actions .btn.primary:hover { border-color: var(--port); color: var(--port); background: var(--port-light); }

/* 詳細・ガイドなどの読み物にも同じ原理（枠を減らし、罫線・余白・明朝の見出し） */
main h2, .guide h2 { font-family: var(--serif); }
.dl { background: none; border: 0; border-top: 1px solid var(--line-strong); border-radius: 0; }
.dl > div { padding: 12px 0; }
details.mini { background: none; border: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0; }
details.mini summary { padding: 10px 0; }
details.mini > div { padding: 0 0 12px; }
.official { background: var(--port-light); border: 0; border-left: 3px solid var(--port); border-radius: 0; }
.tip { background: var(--subtle); border-radius: 0; }
.btn { background: var(--card); border-color: var(--line-strong); border-radius: 6px; }
.btn.primary { background: var(--port); border-color: var(--port); }
footer.foot { background: transparent; padding: 28px 20px 40px; }

/* PC：左に絞り込み（静かな索引）・右に締切。読み物は読みやすい幅 */
@media (min-width: 960px) {
  .brand { padding: 28px 24px 8px; }
  .brand h1 { font-size: 28px; }
  nav.tabs { padding: 0 24px; gap: 28px; }
  main { padding: 32px 24px 64px; }
  .ed-grid { grid-template-columns: 232px 1fr; gap: 56px; align-items: start; }
  .side { position: sticky; top: 140px; gap: 24px; }
  .side .seg.cols4, .side .seg.cols2 { display: flex; flex-direction: column; gap: 4px; overflow: visible; border: 0; }
  .side .chip, .side .layer { text-align: left; justify-content: flex-start; border: 0; border-radius: 6px; background: none; padding: 6px 12px; min-height: var(--tap); }
  .side .layer { border-bottom: 0; display: block; }
  .side .layer small { display: inline; margin-left: 6px; color: var(--subink); }
  .side .layer b { display: inline; }
  .side .chip[aria-pressed="true"], .side .layer[aria-pressed="true"] { background: var(--port-light); color: var(--port); font-weight: 700; }
  .side .scroller { flex-wrap: wrap; }
  .card { grid-template-columns: 176px 1fr; gap: 32px; padding: 28px 0; }
  .badge .rem .n { font-size: 34px; }
  .card h3 { font-size: 19px; }
  #view[data-r="item"], #view[data-r="guide"], #view[data-r="about"], #view[data-r="request"], #view[data-r="correct"] { max-width: 760px; margin-inline: auto; width: 100%; }
}
@media (max-width:520px){ .brand p .tl{display:none} }
/* 読み物の画面も枠を減らす：箱をやめ、上の罫線と余白で区切る */
#view:not([data-r="list"]) .panel { background: none; border: 0; border-top: 1px solid var(--line-strong); border-radius: 0; padding: 16px 0 4px; }
#view:not([data-r="list"]) .panel.empty { border-top: 0; }
[hidden] { display: none !important; }
