/* MyBoard。落ち着いた青灰の地に、濃い藍を1色だけ差す。パネルは白い板、情報は表のように整える */
:root {
  --bg: #eef1f5; --surface: #ffffff; --sunk: #f6f8fb; --fg: #16202b; --muted: #556170; --line: #d5dbe3;
  --accent: #2442b8; --accent-fg: #ffffff; --accent-soft: #e3e8fa; --good: #18744a; --bad: #b0352d; --warn: #835500;
  --f-head: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", "Yu Gothic", "Meiryo", system-ui, sans-serif;
  --f-body: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", "Meiryo", system-ui, sans-serif;
  --f-num: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --r: 10px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f141b; --surface: #17202a; --sunk: #121a23; --fg: #e7ecf2; --muted: #9ba7b6; --line: #2a3542;
    --accent: #93a8ff; --accent-fg: #0f141b; --accent-soft: #212b47; --good: #5cc98d; --bad: #f2867c; --warn: #e2b553;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--f-body); font-size: 16px; line-height: 1.75; overflow-wrap: break-word; }
a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--f-head); line-height: 1.4; margin: 0; }
p { margin: 0; }
.wrap { max-width: 1160px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }

/* ヘッダーとフッター */
.top { background: var(--surface); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; font-family: var(--f-head); font-weight: 700; font-size: 21px; letter-spacing: .01em; }
.brand img { width: 30px; height: 30px; }
.nav { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.nav a { color: var(--fg); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-size: 15px; }
.nav a:hover { background: var(--sunk); }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.foot { margin-top: 56px; border-top: 1px solid var(--line); background: var(--surface); }
.foot .wrap { padding-top: 24px; padding-bottom: 32px; display: grid; gap: 10px; font-size: 14px; color: var(--muted); }
.foot nav { display: flex; gap: 8px 18px; flex-wrap: wrap; }
.foot a { color: var(--muted); }

/* ボタン */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 700; font-size: 16px; border-radius: 8px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-fg); padding: 10px 20px; min-height: 46px; cursor: pointer; text-decoration: none; }
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .65; cursor: wait; }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.small { min-height: 38px; padding: 6px 14px; font-size: 14px; }
.btn.danger { background: transparent; color: var(--bad); border-color: var(--bad); }
.chip { font: inherit; font-size: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); border-radius: 8px; padding: 6px 12px; min-height: 38px; cursor: pointer; }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.btnrow { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* 入力 */
label { font-weight: 700; }
input[type="text"], input[type="url"], input[type="date"], textarea { font: inherit; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--fg); }
textarea { resize: vertical; min-height: 70px; }
.field { display: grid; gap: 6px; }
.status { font-size: 14px; color: var(--muted); min-height: 1.75em; }
.status.ok { color: var(--good); }
.status.ng { color: var(--bad); }
.note { font-size: 14px; color: var(--muted); }

/* 区切り */
.sec { display: grid; gap: 14px; }
.sec + .sec { margin-top: 32px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; }
.bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.count { font-size: 14px; color: var(--muted); }
main { padding-top: 24px; }

/* トップ */
.hero { padding: 48px 0 36px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 36px; align-items: center; }
.hero h1 { font-size: 40px; letter-spacing: .01em; }
.hero .lead { font-size: 18px; color: var(--muted); margin-top: 14px; max-width: 34em; }
.hero .btnrow { margin-top: 24px; }
.hero .small { font-size: 14px; color: var(--muted); margin-top: 10px; }
.preview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.steps .card h3 { font-size: 18px; margin-bottom: 6px; }
.steps .num { font-family: var(--f-num); color: var(--accent); font-size: 14px; display: block; margin-bottom: 4px; }
.kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.kinds .card h3 { font-size: 16px; }
.kinds .card p { font-size: 14px; color: var(--muted); }
.faq { display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 18px; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { margin-top: 8px; }
.cta { text-align: center; padding: 36px 16px; }
.cta p { margin: 10px 0 18px; color: var(--muted); }

/* アプリ */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.tab { font: inherit; font-weight: 700; border: 1px solid transparent; background: transparent; color: var(--muted); border-radius: 8px; padding: 6px 14px; min-height: 40px; cursor: pointer; }
.tab[aria-selected="true"] { background: var(--surface); color: var(--fg); border-color: var(--line); }
.tab.add { color: var(--accent); font-weight: 500; }
.today ol { margin: 0; padding-left: 1.4em; display: grid; gap: 4px; }
.today .date { font-family: var(--f-num); font-size: 13px; color: var(--muted); }
.askrow { display: flex; gap: 10px; flex-wrap: wrap; }
.askrow textarea { flex: 1 1 420px; min-width: 0; min-height: 64px; width: auto; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chips > span { font-size: 14px; color: var(--muted); }
.needs { display: grid; gap: 10px; }
.need { border: 1px dashed var(--accent); border-radius: var(--r); padding: 12px 14px; display: grid; gap: 8px; background: var(--surface); }
.need .row { display: flex; gap: 8px; flex-wrap: wrap; }
.need .row input { flex: 1 1 240px; min-width: 0; width: auto; }
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.cat { font: inherit; text-align: left; border: 1px solid var(--line); background: var(--sunk); color: var(--fg); border-radius: 8px; padding: 10px 12px; cursor: pointer; display: grid; gap: 2px; }
.cat:hover, .cat[aria-pressed="true"] { border-color: var(--accent); }
.cat b { font-family: var(--f-head); font-size: 15px; }
.cat span { font-size: 13px; color: var(--muted); }
.addform { display: grid; gap: 8px; }
.addform .row { display: flex; gap: 8px; flex-wrap: wrap; }
.addform .row > * { flex: 1 1 200px; min-width: 0; }
.addform .row > .btn { flex: 0 0 auto; }

/* パネル */
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; grid-auto-flow: dense; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: grid; gap: 10px; align-content: start; min-width: 0; }
.panel.w2 { grid-column: span 2; }
.panel.drag { opacity: .45; }
.panel.over { box-shadow: 0 0 0 3px var(--accent); }
.ph { display: grid; gap: 6px; }
.kind { font-size: 12px; letter-spacing: .06em; color: var(--muted); }
.ph h3 { font-size: 17px; }
.tools { display: flex; gap: 4px; flex-wrap: wrap; }
.pbtn { font: inherit; font-size: 13px; border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: 6px; min-width: 40px; min-height: 36px; cursor: pointer; padding: 0 8px; }
.pbtn:hover { color: var(--fg); border-color: var(--fg); }
.pbtn:disabled { opacity: .4; cursor: default; }
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.list li { display: grid; gap: 2px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; padding-bottom: 0; }
.list a { color: var(--fg); text-decoration: none; }
.list a:hover { color: var(--accent); text-decoration: underline; }
.meta { font-size: 13px; color: var(--muted); }
.new { display: inline-block; font-size: 12px; border-radius: 4px; padding: 0 6px; background: var(--accent-soft); color: var(--accent); margin-right: 6px; }
.src { font-size: 12px; color: var(--muted); }
.src a { color: var(--muted); }
.big { font-family: var(--f-num); font-size: 32px; line-height: 1.15; }
.wx { display: grid; gap: 6px; }
.wx .d { display: grid; grid-template-columns: 3.2em minmax(0, 1fr); gap: 8px; }
.wx .d b { font-weight: 700; }
.nums { font-size: 14px; }
.nums span { font-family: var(--f-num); }
.memo { white-space: pre-wrap; }
.empty { border: 1px dashed var(--line); border-radius: var(--r); padding: 22px; text-align: center; color: var(--muted); display: grid; gap: 12px; justify-items: center; }

/* みんなのボード */
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.gcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: grid; gap: 8px; align-content: start; }
.gcard h3 { font-size: 17px; }
.gcard h3 a { color: var(--fg); text-decoration: none; }
.gcard h3 a:hover { color: var(--accent); }
.gcard p { font-size: 14px; }
.gfoot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }

/* 文書 */
.doc { max-width: 760px; }
.doc h1 { font-size: 28px; margin-bottom: 14px; }
.doc h2 { font-size: 20px; margin: 26px 0 8px; }
.doc p + p { margin-top: 10px; }
.doc ul { padding-left: 1.3em; }

@media (max-width: 980px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { grid-template-columns: minmax(0, 1fr); padding-top: 32px; }
}
@media (max-width: 640px) {
  .grid, .gallery, .steps, .preview { grid-template-columns: minmax(0, 1fr); }
  .panel.w2 { grid-column: auto; }
  .tools .size { display: none; }
  .hero h1 { font-size: 30px; }
  .hero .btnrow, .cta .btnrow { justify-content: center; }
  .hero .btnrow .btn, .askrow .btn, .cta .btn { width: 100%; }
  .nav a { padding: 6px 10px; }
  .btnrow, .gfoot { justify-content: center; }
  .gfoot { flex-direction: column; }
  .foot nav { display: grid; grid-template-columns: repeat(2, max-content); }
  .report { justify-content: center; }
  .bar { flex-direction: column; align-items: stretch; }
  .bar .namefield { max-width: none; }
  .bar .btnrow { flex-direction: column; }
  #account .btn { width: 100%; }
}
@media (prefers-reduced-motion: no-preference) {
  .panel.fresh { animation: pop .35s ease; }
  @keyframes pop { from { transform: translateY(8px); opacity: .3; } to { transform: none; opacity: 1; } }
}

/* 追加 */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.lead2 { color: var(--muted); }
.bar .namefield { flex: 1 1 260px; max-width: 360px; width: auto; min-height: 46px; font-weight: 700; }
.confirm { border-color: var(--bad); display: grid; gap: 12px; }
.today h2 { font-size: 18px; }
.preview .panel { pointer-events: none; }
.sample { font-size: 12px; color: var(--muted); grid-column: 1 / -1; }
.pubhead { display: grid; gap: 8px; }
.pubhead h1 { font-size: 26px; }
.report { grid-column: 1 / -1; display: flex; justify-content: flex-end; }
#pub-form { display: grid; gap: 12px; }
.card > .status:empty { display: none; }
@media (max-width: 640px) { .pubhead .btn { width: 100%; } }
.cta .btnrow { justify-content: center; }
@media (max-width: 640px) { .bar .namefield { flex: 0 0 auto; } .askrow textarea { min-height: 110px; flex-basis: auto; } }
