/* SNS自動投稿 管理画面 v1
   地は生成り、差し色はお客様のブランド色（--accent）。PC は左メニュー、スマホは下のタブ。 */
:root {
  --accent: #54BFA1;
  --accent-ink: #268068;
  --bg: #F5F3EE;
  --surface: #FFFFFF;
  --surface-2: #FAF9F6;
  --line: #E5E1D8;
  --line-2: #EFECE6;
  --ink: #1D2320;
  --ink-2: #4A524E;
  --muted: #7B827E;
  --warn: #9A6A12; --warn-bg: #FBF2DF;
  --stop: #A9473A; --stop-bg: #FBECE8;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(29, 35, 32, .04), 0 6px 20px rgba(29, 35, 32, .05);
  --font: "BIZ UDPGothic", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  --side: 252px;
  --top: 56px;
  --tab: 64px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
/* 差し色から作る薄い色は body で計算する（お客様ごとの --accent を反映させるため） */
body, .login-body { --accent-soft: color-mix(in srgb, var(--accent) 12%, #fff); --accent-line: color-mix(in srgb, var(--accent) 40%, #fff); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.7 var(--font); letter-spacing: .01em; }
a { color: var(--accent-ink); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.4; margin: 0; font-weight: 700; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent-line); outline-offset: 2px; border-radius: 8px; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 99; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.grow { flex: 1; }
[hidden] { display: none !important; }
.ic { width: 20px; height: 20px; flex: none; }
.ic.sm { width: 17px; height: 17px; }
.ic.xs { width: 14px; height: 14px; }

/* ---------------------------------------------------------------- 骨組み */
.shell { min-height: 100vh; display: grid; grid-template-columns: var(--side) 1fr; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 18px;
  padding: 22px 16px; background: var(--surface-2); border-right: 1px solid var(--line); overflow-y: auto; }
.top, .tabbar { display: none; }
.main { padding: 36px clamp(24px, 4vw, 56px) 80px; max-width: 1180px; width: 100%; }

.prod { display: flex; align-items: center; gap: 10px; padding: 2px 8px; }
.prod-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--ink); position: relative; flex: none; }
.prod-mark::before, .prod-mark::after { content: ""; position: absolute; background: #fff; border-radius: 2px; }
.prod-mark::before { left: 8px; top: 8px; width: 14px; height: 3px; box-shadow: 0 5.5px 0 #fff, 0 11px 0 rgba(255,255,255,.55); }
.prod-mark::after { right: 6px; bottom: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.prod-name { display: block; font-weight: 700; font-size: 15px; line-height: 1.3; }
.prod-by { display: block; font-size: 10.5px; letter-spacing: .14em; color: var(--muted); }

.swatch { width: 12px; height: 12px; border-radius: 4px; background: var(--accent); flex: none; display: inline-block; }
.switch { border: 1px solid var(--line); background: var(--surface); border-radius: 12px; }
.switch summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; }
.switch summary::-webkit-details-marker { display: none; }
.switch-text { flex: 1; min-width: 0; }
.switch-label { display: block; font-size: 11px; color: var(--muted); line-height: 1.3; }
.switch-name { display: block; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.switch-list { list-style: none; margin: 0; padding: 4px; border-top: 1px solid var(--line-2); }
.switch-list a { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; text-decoration: none; color: var(--ink); }
.switch-list a:hover, .switch-list a[aria-current] { background: var(--accent-soft); }

.nav, .side-foot { display: flex; flex-direction: column; gap: 2px; }
.nav a, .side-foot a, .side-foot .linklike { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px;
  color: var(--ink-2); text-decoration: none; font-weight: 500; }
.nav a:hover, .side-foot a:hover, .side-foot .linklike:hover { background: #EFEDE7; color: var(--ink); }
.nav a[aria-current], .side-foot a[aria-current] { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); font-weight: 700; }
.nav a[aria-current] .ic { color: var(--accent-ink); }
.nav span, .side-foot span { flex: 1; }
.nav .swatch { flex: none; }
.count { font-style: normal; font-size: 12px; color: var(--muted); background: #EBE8E1; border-radius: 999px; padding: 0 8px; line-height: 20px; }
.nav-h { font-size: 11.5px; color: var(--muted); margin: 0 12px 4px; letter-spacing: .06em; }
.side-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.linklike { background: none; border: 0; cursor: pointer; width: 100%; text-align: left; }

/* ---------------------------------------------------------------- 見出し・共通部品 */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; letter-spacing: .02em; }
.lead { margin: 6px 0 0; color: var(--ink-2); max-width: 46em; }
.lead.small { font-size: 13.5px; }
.back { display: inline-flex; align-items: center; gap: 4px; font-size: 13.5px; text-decoration: none; margin-bottom: 6px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.card h2 { font-size: 16px; display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.card h2 .ic { color: var(--accent-ink); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 0 16px;
  border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600;
  font-size: 14px; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s; }
.btn:hover { background: var(--surface-2); border-color: #D6D1C6; }
.btn.primary { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; }
.btn.primary:hover { background: color-mix(in srgb, var(--accent-ink) 88%, #000); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: #ECE9E2; }
.btn.danger { color: var(--stop); border-color: color-mix(in srgb, var(--stop) 30%, #fff); }
.btn.danger.ghost { border-color: transparent; }
.btn.icon-only { width: 42px; padding: 0; font-size: 20px; }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 13px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .35; cursor: default; }

.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; line-height: 1; padding: 6px 10px;
  border-radius: 999px; white-space: nowrap; background: #EEECE6; color: var(--ink-2); }
.pill.is-plan { background: var(--accent-soft); color: var(--accent-ink); }
.pill.is-done { background: #E8F1EC; color: #2C6B54; }
.pill.is-wait { background: var(--warn-bg); color: var(--warn); }
.pill.is-stop { background: var(--stop-bg); color: var(--stop); }
.pill.is-empty { background: #EEECE6; color: var(--muted); }
.tag { font-size: 11px; font-weight: 600; color: var(--accent-ink); background: var(--accent-soft); border-radius: 6px; padding: 2px 6px; margin-left: 8px; }

.toast { display: flex; align-items: center; gap: 8px; padding: 11px 16px; margin: 0 0 20px; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent-ink); border: 1px solid var(--accent-line); font-weight: 600; transition: opacity .4s; }
.toast.is-err { background: var(--stop-bg); color: var(--stop); border-color: color-mix(in srgb, var(--stop) 25%, #fff); }
.notice { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px; margin-bottom: 20px; }
.notice.is-warn { background: var(--warn-bg); color: var(--warn); }
.empty { text-align: center; padding: 56px 20px; color: var(--muted); border: 1.5px dashed var(--line); border-radius: var(--radius); }
.empty .ic { width: 34px; height: 34px; margin: 0 auto 8px; }
.note { font-size: 13px; color: var(--warn); background: var(--warn-bg); border-radius: 8px; padding: 6px 10px; margin: 8px 0 0; }
.note.is-info { color: var(--accent-ink); background: var(--accent-soft); margin: 0 0 10px; }

/* フォーム */
.field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 18px; border: 0; padding: 0; min-width: 0; }
.field > span, .field > legend { font-weight: 700; font-size: 14px; padding: 0; }
.field input[type=text], .field input[type=email], .field input[type=password], .field input[type=number], .field input[type=time],
.field select, .field textarea { width: 100%; padding: 11px 13px; border: 1px solid #D9D4C9; border-radius: 10px; background: #fff;
  line-height: 1.6; transition: border-color .15s, box-shadow .15s; }
.field textarea { resize: vertical; min-height: 48px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field input[readonly] { background: var(--surface-2); color: var(--muted); }
.field.narrow { max-width: 260px; }
.hint { color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.counter { color: var(--muted); font-size: 12px; text-align: right; min-height: 1em; margin-top: -4px; }
.counter.is-soft { color: var(--warn); }
.counter.is-over { color: var(--stop); font-weight: 700; }
.radio, .check { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-weight: 500; }
.radio input, .check input { width: 18px; height: 18px; accent-color: var(--accent-ink); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
.form-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.opt { font-weight: 400; color: var(--muted); font-size: 12.5px; margin-left: 4px; }

.switch-row { display: flex; align-items: flex-start; gap: 14px; padding: 4px 0 16px; cursor: pointer; }
.switch-row input { appearance: none; -webkit-appearance: none; flex: none; width: 46px; height: 28px; border-radius: 999px;
  background: #D7D2C7; position: relative; cursor: pointer; transition: background .2s; margin-top: 2px; }
.switch-row input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.switch-row input:checked { background: var(--accent-ink); }
.switch-row input:checked::after { transform: translateX(18px); }
.switch-row b { display: block; }
.switch-row small { display: block; color: var(--muted); font-size: 13px; line-height: 1.6; }
fieldset:disabled .switch-row, fieldset:disabled .field { opacity: .7; }

/* ---------------------------------------------------------------- 予定 */
.week-nav { display: flex; gap: 4px; align-items: center; }
.week { list-style: none; padding: 0; margin: 0 0 10px; display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.day-chip { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px 12px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; }
.day-chip:hover { border-color: var(--accent-line); transform: translateY(-1px); }
.day-chip.is-today { border-color: var(--accent); background: var(--accent-soft); }
.day-chip .wd { font-size: 12px; color: var(--muted); }
.day-chip .dn { font-size: 20px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.day-chip .dots { display: flex; gap: 4px; height: 8px; margin-top: 4px; }
.dots i, .legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.st-planned { background: var(--accent); }
.st-posted { background: #2C6B54; }
.st-waiting { background: transparent; box-shadow: inset 0 0 0 1.5px var(--accent); }
.st-stopped { background: #C3BDB0; }
.st-empty, .st-none { background: var(--line); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--muted); margin: 0 0 22px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

.posts { display: flex; flex-direction: column; gap: 18px; }
.post { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
.post.st-stopped { border-style: dashed; border-color: #C9C3B6; background: var(--surface-2); box-shadow: none; }
.post.st-stopped .post-visual { opacity: .45; filter: grayscale(.6); }
.post-when { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 14px 22px; border-bottom: 1px solid var(--line-2); background: var(--surface-2); }
.post-when .date { font-weight: 700; font-size: 16px; }
.post-when .time { display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; font-weight: 600; }
.post-when .slot, .post-when .kind { font-size: 13px; color: var(--muted); }
.post-when .slot::before { content: ""; display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: #C9C3B6; margin-right: 10px; vertical-align: middle; }
.post-when .pill { margin-left: auto; }
.post-body { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 28px; padding: 22px; }
.post-visual, .post-detail { min-width: 0; }
.post-title { font-size: 17px; margin-bottom: 14px; }
.txt { margin-bottom: 14px; }
.txt h3 { font-size: 12.5px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.txt-body { white-space: pre-wrap; word-break: break-word; font-size: 14px; line-height: 1.75; background: var(--surface-2);
  border: 1px solid var(--line-2); border-radius: 10px; padding: 12px 14px; color: var(--ink-2); }
.clamp { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.clamp.sm { -webkit-line-clamp: 3; }
.clamp.open { display: block; -webkit-line-clamp: unset; }
.more { background: none; border: 0; color: var(--accent-ink); font-weight: 600; font-size: 13px; padding: 6px 2px; cursor: pointer; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.actions form { display: contents; }
.links { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.links .btn { border-color: var(--line); }

.placeholder { aspect-ratio: 4 / 5; border: 1.5px dashed var(--accent-line); border-radius: 16px; background: var(--accent-soft);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 24px; text-align: center; color: var(--ink-2); }
.placeholder .ic { width: 30px; height: 30px; color: var(--accent-ink); }
.placeholder p { margin: 0; font-size: 14px; }
.placeholder .small { color: var(--muted); }

/* 画像がまだ無い日（記事の公開待ち・お休み）は1行の小さなカードにする */
.post.is-compact .post-body { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 14px 22px; }
.post.is-compact .placeholder { aspect-ratio: auto; flex-direction: row; justify-content: flex-start; text-align: left; gap: 14px;
  padding: 12px 16px; border-width: 1px; border-radius: 12px; }
.post.is-compact .placeholder .ic { width: 22px; height: 22px; }
.post.is-compact .placeholder .btn { margin-left: auto; }
.post.is-compact .ph-text { flex: 1; min-width: 0; }
.post.is-compact .post-detail:not(:has(.txt, .links, .post-title)) .actions { margin: 0; padding: 0; border: 0; }
.fallback-thumb { width: 44px; aspect-ratio: 4 / 5; height: auto; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); flex: none; }
.ph-text p + p { margin-top: 2px; }

/* スマホの中での見え方 */
.phone { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: 0 2px 10px rgba(29,35,32,.06); }
.phone-head { display: flex; align-items: center; gap: 8px; padding: 9px 12px; font-size: 13px; font-weight: 700; }
.avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--accent-line); }
.carousel { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; background: #F1EFEA; aspect-ratio: 4 / 5; }
.carousel::-webkit-scrollbar { display: none; }
.carousel img { flex: 0 0 100%; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; scroll-snap-align: start; align-self: flex-start; }
.phone-dots { display: flex; justify-content: center; gap: 5px; padding: 9px 0 4px; }
.phone-dots i { width: 6px; height: 6px; border-radius: 50%; background: #D5D1C8; transition: background .2s; }
.phone-dots i.on { background: var(--accent-ink); }
.phone-cap { font-size: 12.5px; padding: 2px 12px 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ダイアログ（スマホでは下から出るシート） */
.sheet { border: 0; padding: 0; border-radius: 18px; width: min(640px, 92vw); max-height: 88vh; box-shadow: 0 20px 60px rgba(0,0,0,.25); color: var(--ink); }
.sheet::backdrop { background: rgba(29, 35, 32, .45); }
.sheet form { padding: 0 22px 18px; display: flex; flex-direction: column; }
.sheet-head { position: sticky; top: 0; background: #fff; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0 12px; z-index: 1; }
.sheet-head h2 { font-size: 17px; }
.sheet-foot { position: sticky; bottom: 0; background: #fff; display: flex; gap: 8px; align-items: center; padding: 12px 0 2px; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.choices { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--accent-ink); flex: none; }
.choice b { display: block; font-weight: 600; }
.choice small { color: var(--muted); font-size: 12.5px; }

/* ---------------------------------------------------------------- ネタ帳 */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 22px; }
.stats > div { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; }
.stat-n { display: block; font-size: 24px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat-l { font-size: 12.5px; color: var(--muted); }
.tip-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.tip { display: grid; grid-template-columns: 28px 76px minmax(0, 1fr) auto; gap: 16px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px 12px 16px; }
.tip.is-off { background: var(--surface-2); }
.tip.is-off .tip-thumb, .tip.is-off .tip-main { opacity: .5; }
.tip-no { font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; text-align: center; }
.tip-thumb img { width: 76px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 8px; background: var(--accent-soft); }
.tip-title { display: block; font-weight: 700; color: var(--ink); text-decoration: none; font-size: 15.5px; line-height: 1.5; }
.tip-title:hover { color: var(--accent-ink); }
.tip-points { list-style: none; padding: 0; margin: 4px 0 8px; display: flex; flex-wrap: wrap; gap: 2px 14px; color: var(--ink-2); font-size: 13px; }
.tip-points li::before { content: "・"; color: var(--accent); }
.tip-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.hash { font-size: 12px; color: var(--muted); }
.tip-actions { display: flex; align-items: center; gap: 2px; }
.tip-actions form { margin: 0; }

.editor { display: grid; grid-template-columns: minmax(0, 1fr) 340px; grid-template-areas: "form preview"; gap: 28px; align-items: start; }
.editor-form { grid-area: form; min-width: 0; }
.editor-preview { grid-area: preview; position: sticky; top: 24px; }
.editor-preview-inner { display: flex; flex-direction: column; gap: 10px; }
.preview-state { font-size: 12.5px; color: var(--muted); margin: 0; text-align: center; min-height: 1.6em; }
.cap-preview summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--accent-ink); padding: 4px 0; }
.cap-preview .txt-body { margin-top: 6px; font-size: 13px; max-height: 320px; overflow: auto; }
.point { border: 1px solid var(--line-2); border-radius: 12px; padding: 14px 16px 2px; margin: 0 0 18px; background: var(--surface-2); }
.point legend { font-weight: 700; padding: 0 6px; font-size: 14px; }
.point .field { margin-bottom: 14px; }
.danger-zone { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.danger-zone form { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.danger-zone small { color: var(--muted); }
.pc-only { display: inline; }
.sp-only { display: none; }

/* ---------------------------------------------------------------- 4コマ */
.upload { margin-bottom: 26px; }
.drop { display: flex; align-items: center; gap: 14px; border: 1.5px dashed var(--accent-line); background: var(--accent-soft); border-radius: 12px;
  padding: 18px; cursor: pointer; margin-bottom: 14px; position: relative; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop-text b { display: block; color: var(--accent-ink); }
.drop-text small { color: var(--ink-2); font-size: 13px; }
.drop:focus-within { outline: 3px solid var(--accent-line); }
.upload-thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.upload-thumbs:empty { display: none; }
.upload-thumbs img { width: 72px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.comic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 480px), 1fr)); gap: 18px; }
.comic { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 18px; padding: 16px; }
.comic.st-posted { opacity: .75; }
.comic-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.comic-head h2 { font-size: 15.5px; margin: 0; }
.comic .actions { margin-top: 12px; padding-top: 12px; }

/* ---------------------------------------------------------------- 履歴 */
.table-card { padding: 0; overflow: hidden; }
.hist { width: 100%; border-collapse: collapse; }
.hist th { text-align: left; font-size: 12.5px; color: var(--muted); font-weight: 600; padding: 12px 18px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.hist td { padding: 14px 18px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.hist tr:last-child td { border-bottom: 0; }
.hist .is-practice { background: repeating-linear-gradient(135deg, #fff, #fff 10px, var(--surface-2) 10px, var(--surface-2) 20px); }
.h-date b { display: block; white-space: nowrap; }
.h-date small, .h-title small { display: block; color: var(--muted); font-size: 12.5px; }
.h-title .kind { display: block; font-size: 12px; color: var(--accent-ink); font-weight: 600; }
.h-link a { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.h-link { width: 120px; }

/* ---------------------------------------------------------------- 設定・メンバー */
.settings-grid { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; min-width: 0; }
.span-2 { grid-column: 1 / -1; }
.sticky-foot { position: sticky; bottom: 12px; z-index: 4; margin: 18px 0 0; padding: 10px 12px; border-radius: 14px;
  background: rgba(255, 255, 255, .88); backdrop-filter: blur(8px); border: 1px solid var(--line); box-shadow: var(--shadow); }
.conn { margin-top: 26px; }
.conn-list { list-style: none; margin: 14px 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.conn-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 10px; flex-wrap: wrap; }
.conn-name { font-weight: 600; }
.member-list { display: flex; flex-direction: column; gap: 10px; }
.member { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.5fr) auto; gap: 16px; align-items: center; padding: 14px 18px; }
.member.is-off { opacity: .6; }
.member-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.member-main h2 { font-size: 15px; margin: 0; display: flex; align-items: center; }
.member-main p { margin: 0; word-break: break-all; }
.member-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.avatar-letter { width: 38px; height: 38px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; flex: none; }
.narrow-card { max-width: 520px; }

/* ログイン */
.login-body { min-height: 100vh; display: grid; place-items: center; padding: 24px; background:
  radial-gradient(1200px 500px at 50% -10%, color-mix(in srgb, var(--accent) 14%, transparent), transparent), var(--bg); }
.login { width: min(420px, 100%); display: flex; flex-direction: column; gap: 22px; align-items: center; }
.login-card { width: 100%; padding: 30px 28px; }
.login-card h1 { font-size: 20px; margin-bottom: 18px; }
.login-card .muted { margin: 14px 0 0; text-align: center; }
.prod-lg .prod-mark { width: 38px; height: 38px; border-radius: 11px; }
.prod-lg .prod-mark::before { left: 10px; top: 11px; width: 18px; }
.prod-lg .prod-name { font-size: 19px; }

/* ---------------------------------------------------------------- 連携の期限・練習中・本番投稿 */
.notice.is-alert { align-items: flex-start; background: var(--stop-bg); color: var(--stop); border: 1px solid color-mix(in srgb, var(--stop) 25%, #fff); }
.notice.is-alert .ic { margin-top: 3px; }
.notice.is-alert p { margin: 0; }
.notice.is-alert a { color: var(--stop); font-weight: 600; }
.notice-h { font-weight: 700; }
.notice-list { margin: 4px 0 6px; padding-left: 1.2em; font-size: 14px; }
.notice.is-info { background: var(--surface); color: var(--ink-2); border: 1px solid var(--line); font-size: 13.5px; padding: 10px 14px; gap: 8px; }
.notice.is-info .ic { color: var(--muted); }
.live { margin-top: 26px; }
.live.is-on { border-color: color-mix(in srgb, #2C6B54 35%, #fff); }
.live-state { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; }
.live-form { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.live-form .hint { margin: 0 0 8px; }
.inline-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.choices.two { display: grid; grid-template-columns: 1fr 1fr; }

/* 投稿画像の見た目 */
.brand-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 360px); gap: 24px; align-items: start; }
.brand-sample { margin: 0; }
.brand-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.brand-thumbs img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); }
.brand-sample figcaption { margin-top: 6px; }
.color-row { display: flex; align-items: center; gap: 10px; }
.color-row input[type=color] { width: 56px; height: 42px; padding: 3px; border: 1px solid #D9D4C9; border-radius: 10px; background: #fff; cursor: pointer; }
.color-row code { font-size: 13px; color: var(--ink-2); }
.field input[type=file] { width: 100%; padding: 9px; border: 1px dashed #D0CABD; border-radius: 10px; background: var(--surface-2); font-size: 13.5px; }
.field input[type=url] { width: 100%; padding: 11px 13px; border: 1px solid #D9D4C9; border-radius: 10px; background: #fff; line-height: 1.6; }

/* お客様を追加 */
.tenant-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 14px; }
.cover-sample { --c: #2F6FB0; aspect-ratio: 4 / 5; max-width: 240px; border-radius: 12px; background: var(--c); color: #fff; padding: 18px 16px;
  display: flex; flex-direction: column; gap: 12px; margin: 6px 0 8px; overflow: hidden; }
.cs-top { display: flex; align-items: center; gap: 8px; padding-bottom: 10px; border-bottom: 1.5px solid rgba(255,255,255,.9); min-height: 40px; }
.cs-logo { font-weight: 700; font-size: 15px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%; }
.cs-logo img { max-height: 28px; width: auto; filter: grayscale(1) invert(1) contrast(1.6); mix-blend-mode: screen; }
.cs-tag { font-size: 10px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-kicker { align-self: flex-start; background: #fff; color: var(--c); font-size: 10px; font-weight: 700; padding: 3px 10px; border-radius: 999px; margin-top: 8px;
}
.cs-title { font-size: 21px; font-weight: 700; line-height: 1.4; }

/* 一時パスワード */
.temp-card { text-align: left; }
.temp-label { margin: 0; font-size: 13px; color: var(--muted); font-weight: 600; }
.temp-value { margin: 6px 0 12px; }
.temp-value code { display: inline-block; font-size: 26px; letter-spacing: .08em; font-weight: 700; padding: 10px 16px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--line); font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; word-break: break-all; }
.temp-notes { margin: 18px 0 6px; padding-left: 1.2em; color: var(--ink-2); font-size: 13.5px; }
.temp-notes li + li { margin-top: 4px; }
.reset-box { border-top: 1px solid var(--line-2); padding-top: 14px; align-items: flex-start; }
.reset-box p { margin: 0 0 6px; }

/* ---------------------------------------------------------------- 幅ごとの調整 */
@media (max-width: 1180px) {
  .post-body { grid-template-columns: 260px minmax(0, 1fr); gap: 22px; }
  .editor { grid-template-columns: minmax(0, 1fr) 300px; }
}
@media (max-width: 960px) {
  .shell { display: block; }
  .side { display: none; }
  .top { display: flex; position: sticky; top: 0; z-index: 20; height: var(--top); align-items: center; justify-content: space-between;
    padding: 0 8px 0 16px; background: rgba(250, 249, 246, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
  .top-tenant { display: flex; align-items: center; gap: 8px; font-weight: 700; }
  .top-menu summary { list-style: none; width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer; border-radius: 10px; }
  .top-menu summary::-webkit-details-marker { display: none; }
  .top-menu-panel { position: absolute; right: 8px; top: 52px; background: #fff; border: 1px solid var(--line); border-radius: 14px;
    box-shadow: 0 12px 32px rgba(0,0,0,.12); padding: 8px; min-width: 230px; display: flex; flex-direction: column; }
  .top-menu-panel a, .top-menu-panel .linklike { display: flex; align-items: center; gap: 10px; padding: 11px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; }
  .top-menu-panel hr { border: 0; border-top: 1px solid var(--line-2); margin: 6px 0; width: 100%; }
  .top-menu-h { font-size: 12px; color: var(--muted); margin: 4px 10px; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    height: calc(var(--tab) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--muted); text-decoration: none; }
  .tabbar a[aria-current] { color: var(--accent-ink); }
  .tabbar a[aria-current] .ic { stroke-width: 2.1; }
  .main { padding: 20px 16px calc(var(--tab) + 32px + env(safe-area-inset-bottom)); }
  html { scroll-padding-top: calc(var(--top) + 16px); }
  .page-head h1 { font-size: 22px; }
  .page-head { margin-bottom: 18px; position: relative; }
  .page-head .week-nav { position: absolute; right: -8px; top: -4px; }
  .page-head:has(.week-nav) h1 { padding-right: 110px; }
  .settings-grid, .tenant-grid { grid-template-columns: 1fr; }
  .sticky-foot { bottom: calc(var(--tab) + 10px + env(safe-area-inset-bottom)); }
  .shell:not(:has(.tabbar)) .sticky-foot { bottom: calc(12px + env(safe-area-inset-bottom)); }
  .shell:not(:has(.tabbar)) .main { padding-bottom: 40px; }
  .sticky-foot .btn { width: 100%; }
  .editor { grid-template-columns: minmax(0, 1fr); grid-template-areas: "preview" "form"; gap: 16px; }
  .editor-preview { position: sticky; top: var(--top); z-index: 5; margin: 0 -16px; padding: 10px 16px 8px; background: rgba(245, 243, 238, .96);
    backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
  .editor-preview .phone { border: 0; box-shadow: none; background: transparent; border-radius: 0; }
  .editor-preview .phone-head, .editor-preview .phone-dots { display: none; }
  .editor-preview .carousel { aspect-ratio: auto; gap: 8px; background: transparent; scroll-snap-type: x proximity; padding: 4px; }
  .editor-preview .carousel img { flex: 0 0 116px; width: 116px; border-radius: 8px; border: 1px solid var(--line); transition: box-shadow .2s; }
  .editor-preview .carousel img.is-focus { box-shadow: 0 0 0 3px var(--accent); }
  .editor-preview .cap-preview { display: none; }
  .preview-state { text-align: left; }
  .pc-only { display: none; }
  .sp-only { display: inline; }
}
@media (max-width: 720px) {
  .post-when { padding: 12px 16px; gap: 4px 10px; }
  .post-when .pill { margin-left: 0; }
  .post-when .kind { width: 100%; order: 5; }
  .post-body { grid-template-columns: minmax(0, 1fr); padding: 16px; gap: 16px; }
  .post-visual { max-width: 400px; width: 100%; margin: 0 auto; }
  .post.is-compact .post-body { grid-template-columns: 1fr; padding: 12px 16px 16px; gap: 12px; }
  .post.is-compact .post-visual { max-width: none; }
  .post.is-compact .placeholder > .ic { display: none; }
  .post.is-compact .placeholder { padding: 12px 14px; }
  .actions { flex-direction: column; align-items: stretch; }
  .actions .btn { width: 100%; }
  .week { gap: 5px; }
  .day-chip { padding: 8px 2px 10px; border-radius: 10px; }
  .day-chip .dn { font-size: 17px; }
  .week-nav .btn.ghost:not(.icon-only) { padding: 0 10px; }
  .tip { grid-template-columns: 64px minmax(0, 1fr); grid-template-areas: "thumb main" "act act"; gap: 10px 14px; padding: 12px; align-items: start; }
  .tip-no { display: none; }
  .tip-thumb { grid-area: thumb; }
  .tip-thumb img { width: 64px; }
  .tip-main { grid-area: main; }
  .tip-actions { grid-area: act; justify-content: flex-end; border-top: 1px solid var(--line-2); padding-top: 8px; }
  .stats { gap: 8px; }
  .stats > div { padding: 10px 12px; }
  .stat-n { font-size: 20px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .comic { grid-template-columns: 1fr; }
  .comic .phone { max-width: 320px; width: 100%; margin: 0 auto; }
  .card { padding: 18px 16px; }
  .hist thead { display: none; }
  .hist, .hist tbody, .hist tr, .hist td { display: block; width: 100%; }
  .hist tr { padding: 14px 16px; border-bottom: 1px solid var(--line-2); display: flex; flex-wrap: wrap; gap: 6px 22px; }
  .hist td { padding: 0; border: 0; }
  .hist .h-date, .hist .h-title { flex: 0 0 100%; }
  .hist .h-link { width: auto; flex: 0 0 auto; }
  .h-link { width: auto; }
  .card.table-card { padding: 0; }
  .hist tr:last-child { border-bottom: 0; }
  .member { grid-template-columns: 1fr auto; }
  .member-meta { grid-column: 1 / -1; grid-row: 2; }
  .sheet { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: 18px 18px 0 0; }
  .sheet form { padding: 0 16px 14px; padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .sheet-foot .btn { flex: 1; }
  .sheet-foot .grow { display: none; }
  .page-head > .btn { width: 100%; }
  .brand-grid, .tenant-grid, .choices.two { grid-template-columns: 1fr; }
  .tenant-grid .span-2 { grid-column: auto; }
  .temp-value code { font-size: 22px; }
  .live-form .btn { width: 100%; }
  .notice { font-size: 14px; }
  .notice.is-info { font-size: 13px; align-items: flex-start; }
  .notice.is-info .ic { margin-top: 3px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
.sheet-head h2:focus { outline: none; }
