:root {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", sans-serif;
  color: #e5e7eb;
  background: #0b1220;
  --panel: #151f30;
  --line: #29374d;
  --muted: #94a3b8;
  --accent: #10b981;
  --accent-dark: #047857;
  --danger: #fda4af;
  --warn: #fbbf24;
}
* { box-sizing: border-box; }
body { margin: 0; background: #0b1220; padding-bottom: env(safe-area-inset-bottom); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; border: 0; border-radius: 12px; padding: 11px 14px; background: #263348; color: #fff; min-height: 44px; }
button.primary { background: var(--accent); color: #052b22; font-weight: 700; }
button.danger { background: #4c1d24; color: #fecdd3; }
button.ghost { background: transparent; border: 1px solid #3b4b61; }
button:disabled { opacity: .5; cursor: default; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid #34d399; }
header.top { padding: calc(20px + env(safe-area-inset-top)) 16px 8px; max-width: 1050px; margin: auto; }
h1 { font-size: 24px; margin: 0 0 6px; }
nav { display: flex; gap: 8px; overflow-x: auto; padding: 10px 16px; max-width: 1050px; margin: auto; position: sticky; top: 0; background: #0b1220; z-index: 5; }
nav button { white-space: nowrap; }
nav button.active { background: var(--accent-dark); }
main { max-width: 1050px; margin: auto; padding: 8px 16px 80px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 18px; margin-bottom: 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.badge { display: inline-block; border-radius: 99px; background: #273b50; padding: 4px 10px; font-size: 12px; white-space: nowrap; }
.badge.s-下書き { background: #3a3320; color: #fde68a; }
.badge.s-生成中 { background: #1e3a5f; color: #bfdbfe; }
.badge.s-エラー { background: #4c1d24; color: #fecdd3; }
.badge.s-確認済 { background: #134e4a; color: #99f6e4; }
.badge.s-予約済 { background: #312e81; color: #c7d2fe; }
.badge.s-公開済 { background: #14532d; color: #bbf7d0; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
input, select, textarea { width: 100%; background: #0b1525; border: 1px solid #3b4b61; color: #fff; border-radius: 10px; padding: 11px; margin: 6px 0 12px; min-height: 44px; font-size: 16px; }
input[type=checkbox] { width: auto; min-height: 0; margin: 0 4px 0 0; }
textarea { min-height: 130px; line-height: 1.7; }
textarea.body { min-height: 50vh; }
label { display: block; font-size: 13px; color: #b9c7d7; }
.days { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 12px; }
.days label { display: flex; align-items: center; font-size: 15px; color: #e5e7eb; }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.filters input, .filters select { margin: 0; }
h2 { font-size: 18px; margin: 0 0 13px; }
h3 { margin: 0 0 6px; font-size: 16px; }
.item { border-top: 1px solid #304058; padding: 13px 0; }
.item:first-of-type { border-top: 0; }
.item.clickable { cursor: pointer; }
.item.clickable:hover h3 { text-decoration: underline; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.notice { border-left: 3px solid var(--warn); padding: 10px 12px; background: #292619; border-radius: 6px; margin: 10px 0; }
.notice.error { border-color: #f43f5e; background: #2a1419; }
.stat { font-size: 30px; font-weight: 800; margin: 6px 0; }
.error { color: var(--danger); }
.success { color: #6ee7b7; }
a { color: #6ee7b7; }
footer { max-width: 1050px; margin: auto; padding: 12px 16px 30px; color: var(--muted); font-size: 12px; }
#toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; z-index: 20; width: min(92vw, 520px); }
.toast { background: #1f2d44; border: 1px solid #3b4b61; border-radius: 12px; padding: 12px 14px; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.toast.error { border-color: #f43f5e; }
.toast.success { border-color: var(--accent); }
.login { text-align: center; padding: 40px 18px; }
.login #gsiButton { display: inline-block; margin-top: 16px; }
.loading { opacity: .6; pointer-events: none; }
@media (min-width: 720px) { h1 { font-size: 28px; } }
details.meta { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin: 8px 0 14px; background: #101a2a; }
details.meta summary { cursor: pointer; font-weight: 700; font-size: 14px; }
details.meta ul { margin: 8px 0; padding-left: 20px; line-height: 1.7; }
.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 12px; }
.img-card { border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: #101a2a; }
.img-card label { margin-top: 8px; }
.img-slot img, .preview figure img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; display: block; background: #0b1525; }
.img-ph { display: flex; align-items: center; justify-content: center; text-align: center; aspect-ratio: 16 / 9; border-radius: 10px; border: 1px dashed #3b4b61; color: var(--muted); font-size: 13px; padding: 10px; margin: 0; }
.img-ph.error { border-color: #f43f5e; color: var(--danger); }
.preview { background: #fff; color: #222; border-radius: 14px; padding: 20px 18px; margin: 10px 0 16px; line-height: 1.9; font-size: 16px; }
.preview h1 { font-size: 22px; line-height: 1.5; margin: 16px 0; }
.preview h2 { font-size: 19px; margin: 28px 0 10px; color: #222; }
.preview figure { margin: 16px 0; }
.preview .img-ph { color: #667; border-color: #ccd; }
.preview a { color: #0a7f5c; }
.preview .tags { color: #0a7f5c; font-size: 14px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 10px 0; }
.cal-head { text-align: center; font-size: 12px; color: var(--muted); }
.cal-day { min-height: 52px; padding: 6px 2px; border-radius: 10px; background: #101a2a; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 14px; }
.cal-day.today { outline: 1px solid var(--accent); }
.cal-day.selected { background: var(--accent-dark); }
.dots { display: flex; gap: 3px; flex-wrap: wrap; justify-content: center; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #64748b; }
.dot.done { background: #22c55e; }
.dot.reserved { background: #818cf8; }
.dot.draft { background: #fbbf24; }
.dot.empty { background: transparent; border: 1px solid #94a3b8; }
.dot.missed { background: #f43f5e; }
.dot.confirm { background: #fb923c; }
.dot.skip { background: #475569; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.legend .lg { white-space: nowrap; }
.legend .dot { margin-right: 4px; }
.badge.alert-missed { background: #4c1d24; color: #fecdd3; }
.badge.alert-confirm { background: #431407; color: #fed7aa; }
.badge.alert-urgent { background: #3a3320; color: #fde68a; }
.step label.check { display: flex; align-items: center; gap: 8px; font-size: 15px; color: #e5e7eb; }
.step label.check input { width: 22px; height: 22px; }
.step.done { opacity: .6; }
.post-imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.post-img { border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: #101a2a; }
.table-wrap { overflow-x: auto; }
.table-wrap table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.table-wrap th, .table-wrap td { text-align: left; padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); }
.table-wrap th { color: var(--muted); font-weight: 600; }
