/* コラム（/column）の見た目。モックアップ「note ベース改良案」の最終版（Apple のデザインの考え方で整えたもの）に合わせる。
   色は文字の黒とグレーだけ。青は「書く」「公開」とリンクだけ。紫はロゴだけ。押せる場所は高さ 44px 以上 */
*, *::before, *::after { box-sizing: border-box; }
:root {
  --ink: #1d1d1f; --sub: #6e6e73; --mute: #86868b; --line: #d2d2d7; --fill: #f5f5f7;
  --blue: #0071e3; --link: #0066cc; --red: #ff2d55; --danger: #d70015;
  --font: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif;
}
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #fff; color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.5; -webkit-font-smoothing: antialiased; word-break: auto-phrase; overflow-wrap: anywhere; }
body.grouped { background: var(--fill); }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, textarea, select { font: inherit; color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid rgba(0, 113, 227, .45); outline-offset: 2px; border-radius: 6px; }

/* ヘッダー（半透明） */
.bar { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .8); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-bottom: .5px solid var(--line); }
.bar-in { max-width: 980px; margin: 0 auto; min-height: 52px; padding: 0 22px; display: flex; align-items: center; gap: 4px; }
.brand { flex-shrink: 0; display: flex; align-items: center; gap: 8px; margin-right: 12px; color: var(--ink); font-weight: 600; font-size: 15px; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand img { flex-shrink: 0; max-width: none; }
.nav-link { display: flex; align-items: center; min-height: 44px; padding: 0 10px; font-size: 13px; color: var(--sub); white-space: nowrap; }
.nav-link:hover { color: var(--ink); text-decoration: none; }
.nav-link[aria-current="page"] { color: var(--ink); font-weight: 600; }
.nav-me { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; }
.grow { flex: 1 1 auto; }
@media (max-width: 640px) {
  .bar-in { padding: 0 12px; }
  .brand { font-size: 0; gap: 0; margin-right: 4px; }
  .nav-link { padding: 0 6px; font-size: 13px; }
  .bar-in .btn-sm { padding: 0 12px; }
}

/* ボタン（青は大事な 1 つだけ） */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 22px; border: 0; border-radius: 980px; background: var(--blue); color: #fff; font-size: 17px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.btn:hover { text-decoration: none; background: #0077ed; }
.btn-sm { min-height: 32px; padding: 0 16px; font-size: 13px; margin-right: 4px; }
.btn-plain { background: var(--fill); color: var(--ink); }
.btn-plain:hover { background: #ebebf0; }
.btn-danger { background: var(--fill); color: var(--danger); }
.btn:disabled { opacity: .45; cursor: default; }
.link-btn { background: none; border: 0; padding: 0; min-height: 44px; color: var(--link); cursor: pointer; font-size: 17px; }

/* 本文の幅 */
.main { max-width: 720px; margin: 0 auto; padding: 0 22px 96px; }
.narrow { max-width: 560px; margin: 0 auto; padding: 0 16px 96px; }
.title { margin: 40px 0 8px; font-size: 34px; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; }
.sub { margin: 0 0 24px; color: var(--sub); font-size: 15px; }
.av { display: inline-block; flex-shrink: 0; border-radius: 50%; object-fit: cover; vertical-align: middle; }

/* 設定の画面などの、白いまとまり（iPhone の設定と同じ形） */
.group-label { margin: 32px 16px 6px; font-size: 13px; color: var(--sub); }
.group-note { margin: 6px 16px 0; font-size: 13px; color: var(--sub); }
.group { background: #fff; border-radius: 12px; overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 16px; position: relative; }
.row + .row::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: .5px solid var(--line); }
.row > label, .row > .k { flex-shrink: 0; min-width: 88px; }
.row input[type="text"], .row textarea { flex: 1 1 auto; min-width: 0; border: 0; outline: 0; background: transparent; padding: 11px 0; text-align: right; font-size: 17px; }
.row textarea { text-align: left; resize: vertical; min-height: 88px; line-height: 1.5; }
.row.stack { flex-direction: column; align-items: stretch; gap: 0; padding-top: 11px; }
.row.stack textarea, .row.stack input[type="text"] { text-align: left; padding-top: 4px; }
.row .v { margin-left: auto; color: var(--sub); }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; padding: 12px 0; }
.swatches input { position: absolute; opacity: 0; pointer-events: none; }
.swatches label { width: 32px; height: 32px; border-radius: 50%; cursor: pointer; box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .1); }
.swatches input:checked + label { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--blue); }
.swatches input:focus-visible + label { outline: 3px solid rgba(0, 113, 227, .45); outline-offset: 4px; }
.sheet-head { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: center; min-height: 44px; margin: 32px 0 8px; }
.sheet-head > :first-child { justify-self: start; }
.sheet-head > :nth-child(2) { justify-self: center; font-weight: 600; }
.sheet-head > :last-child { justify-self: end; }
.sheet-head button { background: none; border: 0; color: var(--link); font-size: 17px; font-weight: 600; cursor: pointer; min-height: 44px; padding: 0; }
.error { margin: 12px 16px 0; color: var(--danger); font-size: 15px; }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; font-size: 15px; }
.check input { margin-top: 4px; width: 18px; height: 18px; }

/* 表（運営の画面） */
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th, .table td { text-align: left; padding: 10px 12px 10px 0; border-bottom: .5px solid var(--line); vertical-align: top; }
.table th { color: var(--sub); font-weight: 600; font-size: 13px; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 980px; background: #fde9e6; color: var(--danger); font-size: 12px; }
.link-btn.small-inline { min-height: 32px; font-size: 15px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; }

/* 一覧（記事の行）・空のとき */
.empty { padding: 64px 0; text-align: center; color: var(--sub); }

/* ---- 一覧 ---- */
.search { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px; margin-top: 16px; background: var(--fill); border-radius: 10px; color: var(--mute); }
.search input { flex: 1 1 auto; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 17px; color: var(--ink); }
.chips { display: flex; gap: 8px; margin: 16px 0 8px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex-shrink: 0; display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border-radius: 980px; background: var(--fill); color: var(--ink); font-size: 15px; white-space: nowrap; }
.chip:hover { text-decoration: none; background: #ebebf0; }
.chip[aria-current="page"] { background: var(--ink); color: #fff; font-weight: 600; }
.post { display: flex; gap: 16px; align-items: center; padding: 16px 0; border-bottom: .5px solid var(--line); color: var(--ink); }
.post:hover { text-decoration: none; }
.post:hover .post-title { text-decoration: underline; text-decoration-thickness: 1px; }
.post-main { flex: 1 1 auto; min-width: 0; }
.post-title { display: block; font-size: 17px; font-weight: 600; line-height: 1.45; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; font-size: 13px; color: var(--sub); }
.post-cover { flex: 0 0 88px; width: 88px; height: 88px; border-radius: 12px; object-fit: cover; background: var(--fill); }
.more { text-align: center; margin: 24px 0; }
.join-note { margin: 40px 0 0; text-align: center; font-size: 13px; color: var(--sub); }

/* ---- 記事 ---- */
.article { max-width: 680px; margin: 0 auto; }
.notice { margin: 24px 0 0; padding: 12px 16px; border-radius: 12px; background: var(--fill); font-size: 15px; color: var(--sub); }
.kicker { margin: 48px 0 8px; font-size: 13px; font-weight: 600; }
.kicker a { color: var(--sub); }
.article-title { margin: 48px 0 0; font-size: 34px; font-weight: 700; line-height: 1.3; letter-spacing: -.01em; }
.kicker + .article-title { margin-top: 0; }
.notice + .kicker, .notice + .article-title { margin-top: 32px; }
.byline { display: flex; align-items: center; gap: 12px; margin: 20px 0 28px; }
.byline-main { flex: 1 1 auto; min-width: 0; line-height: 1.35; }
.byline-name { display: block; color: var(--ink); font-size: 15px; font-weight: 600; }
.byline-meta { font-size: 13px; color: var(--sub); }
.follow { flex-shrink: 0; min-height: 32px; padding: 0 16px; border: 0; border-radius: 980px; background: var(--fill); color: var(--link); font-size: 15px; font-weight: 600; cursor: pointer; }
.follow[aria-pressed="true"] { color: var(--sub); }
.cover { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 18px; margin-bottom: 36px; background: var(--fill); }
.prose { font-size: 18px; line-height: 1.9; letter-spacing: .01em; }
.prose[data-size="0"] { font-size: 16px; }
.prose[data-size="2"] { font-size: 21px; }
.prose p { margin: 0 0 1.3em; }
.prose h2 { margin: 2.2em 0 .7em; font-size: 1.3em; font-weight: 700; line-height: 1.35; }
.prose ul { margin: 0 0 1.3em; padding-left: 1.4em; }
.prose li { margin: .2em 0; }
.prose blockquote { margin: 0 0 1.3em; padding: 0 0 0 1em; border-left: 3px solid var(--line); color: var(--sub); }
.prose figure { margin: 2em 0; }
.prose figure img { display: block; width: 100%; height: auto; border-radius: 12px; }
.prose figcaption { margin-top: 8px; text-align: center; font-size: 13px; color: var(--sub); }
.prose hr { border: 0; border-top: .5px solid var(--line); margin: 2.5em 0; }
.tags { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 32px 0 0; font-size: 15px; }
.actions { display: flex; align-items: center; gap: 4px; margin: 40px 0 0; padding: 6px 0; border-top: .5px solid var(--line); border-bottom: .5px solid var(--line); font-size: 15px; color: var(--sub); }
.like { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 10px 0 0; border: 0; background: none; color: var(--sub); font-size: 15px; cursor: pointer; }
.like[aria-pressed="true"] { color: var(--red); }
.like svg { transition: transform .12s; }
.like:active svg { transform: scale(.88); }
.action { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 10px; color: var(--sub); }
.action:hover { text-decoration: none; color: var(--ink); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; color: var(--sub); cursor: pointer; }
.icon-btn:hover { background: var(--fill); color: var(--ink); }
.author { display: flex; align-items: center; gap: 14px; padding: 18px 0; color: var(--ink); }
.author:hover { text-decoration: none; }
.author-main { flex: 1 1 auto; line-height: 1.4; }
.author-name { display: block; font-size: 17px; font-weight: 600; }
.author-status { font-size: 13px; color: var(--sub); }
.comments { margin-top: 32px; }
.comments h2, .next h2 { margin: 0 0 4px; font-size: 17px; font-weight: 700; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment { display: flex; gap: 12px; padding: 14px 0; border-bottom: .5px solid var(--line); }
.comment-main { flex: 1 1 auto; min-width: 0; }
.comment-head { margin: 0; display: flex; align-items: baseline; gap: 8px; font-size: 15px; }
.comment-head a { color: var(--ink); font-weight: 600; }
.comment-head span { font-size: 13px; color: var(--sub); }
.comment-body { margin: 4px 0 0; font-size: 16px; line-height: 1.7; white-space: pre-wrap; }
.comment-tools { margin: 2px 0 0; display: flex; gap: 12px; }
.comment-tools button { min-height: 32px; padding: 0; border: 0; background: none; color: var(--sub); font-size: 13px; cursor: pointer; }
.comment-tools button:hover { color: var(--ink); }
.comment-form { display: flex; flex-direction: column; gap: 8px; margin: 16px 0 0; }
.comment-form textarea { width: 100%; padding: 12px 14px; border: .5px solid var(--line); border-radius: 12px; font-size: 16px; line-height: 1.6; resize: vertical; outline: 0; }
.comment-form textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 113, 227, .15); }
.comment-form .btn { align-self: flex-end; }
.comment-login { margin: 16px 0 0; font-size: 15px; color: var(--sub); }
.next { margin-top: 48px; }

/* ---- 書き手のページ ---- */
.profile { padding: 48px 0 24px; text-align: center; border-bottom: .5px solid var(--line); }
.profile-name { margin: 12px 0 2px; font-size: 28px; font-weight: 700; }
.profile-status { margin: 0; font-size: 15px; color: var(--sub); }
.profile-bio { max-width: 480px; margin: 12px auto 0; font-size: 15px; line-height: 1.7; }
.profile-counts { display: flex; justify-content: center; gap: 16px; margin: 16px 0; font-size: 13px; color: var(--sub); }
.profile-counts b { color: var(--ink); font-size: 15px; }
.link-btn.small { display: block; margin: 8px auto 0; min-height: 32px; font-size: 13px; color: var(--sub); }

/* ---- 文字の大きさ（記事のページのヘッダー） ---- */
.sizes { display: flex; padding: 2px; margin-right: 8px; background: var(--fill); border-radius: 9px; }
.sizes button { width: 32px; height: 28px; border: 0; border-radius: 7px; background: transparent; color: var(--sub); font-weight: 600; cursor: pointer; }
.sizes button:nth-child(1) { font-size: 11px; }
.sizes button:nth-child(2) { font-size: 14px; }
.sizes button:nth-child(3) { font-size: 17px; }
.sizes button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
@media (max-width: 640px) { .sizes { display: none; } }

/* ---- 小さなお知らせ・通報の画面 ---- */
.toast { position: fixed; left: 50%; bottom: 32px; z-index: 50; transform: translateX(-50%); padding: 10px 18px; border-radius: 980px; background: rgba(29, 29, 31, .92); color: #fff; font-size: 15px; pointer-events: none; }
dialog.sheet { width: min(420px, calc(100% - 32px)); padding: 0; border: 0; border-radius: 14px; background: var(--fill); box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
dialog.sheet::backdrop { background: rgba(0, 0, 0, .3); }
dialog.sheet form { padding: 8px 16px 16px; }
dialog.sheet .sheet-head { margin-top: 0; }
dialog.sheet label.row { cursor: pointer; }
dialog.sheet textarea { width: 100%; margin-top: 12px; padding: 10px 12px; border: 0; border-radius: 12px; font-size: 15px; resize: vertical; outline: 0; }

/* ---- 登録・プロフィール（見出しを上に置いた、ふつうの入力欄） ---- */
.form-page { max-width: 440px; margin: 0 auto; padding: 40px 0 64px; }
.pv { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 16px; background: var(--fill); }
.pv-main { min-width: 0; line-height: 1.35; }
.pv-main b { display: block; font-size: 19px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-main span { font-size: 14px; color: var(--sub); }
.pv .is-empty { color: var(--mute); }
.form-title { margin: 28px 0 4px; font-size: 28px; font-weight: 700; line-height: 1.25; }
.form-lead { margin: 0; font-size: 15px; color: var(--sub); }
.form { margin-top: 24px; }
.field { margin-bottom: 22px; }
.field > label, .field-label { display: block; margin-bottom: 8px; font-size: 15px; font-weight: 600; }
.field input[type="text"], .field textarea { display: block; width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-size: 17px; line-height: 1.4; outline: 0; transition: border-color .15s, box-shadow .15s; }
.field textarea { resize: vertical; min-height: 88px; }
.field input[type="text"]:focus, .field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 113, 227, .15); }
.field input::placeholder, .field textarea::placeholder { color: #c7c7cc; }
.field .swatches { padding: 2px 0; }
.field-hint { margin: 6px 0 0; font-size: 13px; color: var(--sub); }
.picks { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.picks-gap { flex-basis: 100%; height: 0; }
.pick { min-height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 980px; background: #fff; color: var(--ink); font-size: 15px; cursor: pointer; }
.pick[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.prefixed { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; }
.prefixed:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 113, 227, .15); }
.prefixed span { flex-shrink: 1; min-width: 0; padding-left: 14px; font-size: 14px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prefixed input[type="text"] { flex: 1 0 120px; border: 0; box-shadow: none; padding-left: 2px; }
.prefixed input[type="text"]:focus { box-shadow: none; }
.agree { display: flex; align-items: center; gap: 10px; margin: 4px 0 24px; font-size: 15px; cursor: pointer; }
.agree input { width: 20px; height: 20px; accent-color: var(--blue); }
.btn-block { display: flex; width: 100%; min-height: 50px; font-size: 17px; font-weight: 600; }
.form-error { margin: 20px 0 0; padding: 12px 14px; border-radius: 12px; background: #fff0f0; color: var(--danger); font-size: 15px; }
.form-ok { margin: 16px 0 0; font-size: 15px; color: #1f8a4c; }
.form-cancel { margin: 16px 0 0; text-align: center; font-size: 15px; }
.account-box { margin-top: 40px; padding-top: 24px; border-top: .5px solid var(--line); }
.account-mail { margin: 0 0 12px; font-size: 15px; color: var(--sub); overflow-wrap: anywhere; }
.account-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; font-size: 15px; }
.account-actions form { display: contents; }
.account-actions .link-btn { font-size: 15px; min-height: 44px; }
.danger-link { color: var(--danger); }
@media (max-width: 640px) { .nav-login { display: none; } .form-page { padding-top: 24px; } }
