/* 画面 */
* { box-sizing: border-box; }
body { margin: 0; background: #EFEBE4; color: #2B2626; font-family: "Noto Sans JP", sans-serif; font-size: 14px; }
.app { max-width: 1440px; margin: 0 auto; padding: 24px; }
.app-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.app-head h1 { margin: 0; font-size: 20px; }
.app-actions { display: flex; gap: 8px; }
.app-msg { min-height: 20px; margin: 8px 0 16px; font-size: 13px; color: #C2385E; }
.app-grid { display: grid; grid-template-columns: minmax(480px, 1fr) 648px; gap: 24px; align-items: start; }

.panel { background: #fff; border-radius: 12px; padding: 8px 24px 24px; }
.app-grid > .panel { position: sticky; top: 24px; max-height: calc(100vh - 112px); overflow: auto; }
.sec { padding: 20px 0; border-bottom: 1px solid #EEE7E0; }
.sec:last-child { border-bottom: 0; }
.sec-title { margin: 0 0 16px; font-size: 15px; }
.row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; }
.row--end { justify-content: flex-end; margin-top: 16px; }
.field { display: block; margin-bottom: 12px; font-size: 12px; font-weight: 700; }
.field--s { width: 120px; }
.field--m { width: 160px; }
.field input, .field textarea, .field select { display: block; width: 100%; margin-top: 4px; padding: 8px 10px; border: 1px solid #D8CFC6; border-radius: 6px; font: 400 14px/1.6 "Noto Sans JP", sans-serif; color: #2B2626; background: #fff; }
.field textarea { resize: vertical; }
.up { display: flex; gap: 8px; align-items: flex-end; }
.up input { flex: 1; }
.up .btn { flex: none; white-space: nowrap; }
.help { margin: 8px 0 12px; font-size: 12px; line-height: 1.7; color: #8A8080; }
.help--warn { margin-top: 0; color: #C2385E; }

.btn { display: inline-block; text-decoration: none; padding: 8px 14px; border: 1px solid #D8CFC6; border-radius: 6px; background: #fff; font: 700 13px/1.4 "Noto Sans JP", sans-serif; color: #2B2626; cursor: pointer; }
.btn:hover { background: #F7F2EC; }
.btn--primary { border-color: #F25C84; background: #F25C84; color: #fff; }
.btn--primary:hover { background: #E04B74; }
.btn--danger { border-color: #5A5555; background: #5A5555; color: #fff; }
.btn--danger:hover { background: #433F3F; }

/* ツールバー */
.toolbar { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; gap: 6px 12px; padding: 8px; background: #FAF7F3; border: 1px solid #D8CFC6; border-bottom: 0; border-radius: 8px 8px 0 0; }
.tool-group { display: flex; gap: 4px; }
.toolbar button { padding: 6px 8px; border: 1px solid #D8CFC6; border-radius: 5px; background: #fff; font: 400 12px/1.2 "Noto Sans JP", sans-serif; color: #2B2626; cursor: pointer; }
.toolbar button:hover { background: #F7F2EC; }
.toolbar button.is-active { border-color: #F25C84; background: #F25C84; color: #fff; }
.mk { background: #FBD3DE; font-weight: 700; }

/* 本文エディタ */
.editor { border: 1px solid #D8CFC6; border-radius: 0 0 8px 8px; background: #FCF6E3 url(assets/noise.jpg) repeat; }
.editor .ProseMirror { min-height: 480px; padding: 24px 32px 40px; outline: none; font-size: 14px; line-height: 2; color: #4A4343; }
.editor .ProseMirror > * + * { margin-top: 16px; }
.editor p { margin: 0; }
.editor h2 { margin: 32px 0 0; padding-bottom: 10px; border-bottom: 3px solid #F25C84; font-size: 20px; line-height: 1.5; color: #2B2626; }
.editor h2::before { content: "● "; color: #F25C84; }
.editor h3 { margin: 24px 0 0; font-size: 16px; line-height: 1.6; color: #2B2626; }
.editor strong { color: #2B2626; }
.editor mark { background: #FBD3DE; color: #2B2626; font-weight: 700; }
.editor a { color: #F25C84; font-weight: 700; }
.editor ul, .editor ol { margin: 0; padding-left: 1.4em; }
.editor li::marker { color: #F25C84; }
.editor li p { margin: 0; }
.editor blockquote { margin: 0; padding: 18px 22px; background: #FFFEFA; font-size: 14px; line-height: 1.9; font-weight: 700; color: #2B2626; }
.editor blockquote .cite { margin-top: 8px; font-size: 12px; font-weight: 400; color: #8A8080; }
.editor hr { margin: 24px 0; border: 0; border-top: 2px solid #F25C84; }
.editor hr.ProseMirror-selectednode { outline: 2px solid #7FB0FF; }
.editor .ProseMirror > img { display: block; max-width: 100%; }
.editor .tableWrapper table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 13px; line-height: 1.7; }
.editor .tableWrapper td, .editor .tableWrapper th { padding: 8px 12px; border: 1px solid #F5A9BC; background: #FBF8F3; vertical-align: top; text-align: left; position: relative; }
.editor .tableWrapper th { width: 120px; background: #F25C84; color: #FFF6F0; border-color: #F25C84; }
.editor .selectedCell::after { content: ""; position: absolute; inset: 0; background: rgba(127,176,255,.25); pointer-events: none; }
.editor .column-resize-handle { display: none; }
.editor .blk { cursor: pointer; border-radius: 4px; }
.editor .blk:hover { outline: 2px dashed #F5A9BC; outline-offset: 4px; }
.editor .ProseMirror-selectednode.blk, .editor .ProseMirror-selectednode > .blk { outline: 2px solid #7FB0FF; outline-offset: 4px; }
.editor .blk > table { margin: 0 auto; }
.editor .blk--wide { margin-left: -28px; margin-right: -28px; }

/* プレビュー */
.preview-wrap { position: sticky; top: 24px; max-height: calc(100vh - 112px); overflow: auto; padding: 24px; background: #fff; border-radius: 12px; }
.preview { width: 600px; margin: 0 auto; }

/* ヘッダー・フッター（画像に書き出す部分） */
.disp { font-family: "peckham-press", sans-serif; font-weight: 400; color: #F25C84; white-space: nowrap; }
.hd { position: relative; width: 600px; height: 478px; background: #FCF6E3 url(assets/noise.jpg) repeat; overflow: hidden; }
.hd-t1 { position: absolute; left: 0; top: 16px; width: 600px; text-align: center; font-size: 128px; line-height: .86; letter-spacing: -3px; }
.hd-row { position: absolute; left: 24px; right: 24px; height: 24px; }
.hd-row1 { top: 124px; }
.hd-row2 { top: 152px; }
.hd-row img { position: absolute; top: 4px; width: 44px; height: 13px; }
.hd-row .sub { position: absolute; top: 0; font-family: "peckham-press", sans-serif; font-weight: 400; font-size: 15px; line-height: 24px; color: #F25C84; white-space: nowrap; }
.hd-copy { position: absolute; left: 24px; top: 418px; font: 900 28px/1.4 "Noto Sans JP", sans-serif; color: #F25C84; white-space: nowrap; }
.hd-t2 { position: absolute; left: 16px; font-size: 122px; line-height: .86; letter-spacing: -4px; }
.hd-t2.a { top: 190px; }
.hd-t2.b { top: 298px; }
.hd-spark { position: absolute; left: 320px; top: 201px; }
.hd-vol { position: absolute; left: 454px; top: 190px; width: 126px; height: 194px; }
.hd-vol > svg { position: absolute; left: 0; top: 0; }
.hd-vol .k { position: absolute; left: 0; top: 18px; width: 126px; text-align: center; font-family: "peckham-press", sans-serif; font-weight: 400; font-size: 12px; letter-spacing: .14em; color: #F25C84; }
.hd-vol .n { position: absolute; left: 0; top: 50px; width: 126px; text-align: center; font-size: 54px; line-height: .9; letter-spacing: -3px; }
.hd-vol .s { position: absolute; left: 0; top: 114px; width: 126px; text-align: center; font-family: "peckham-press", sans-serif; font-weight: 400; font-size: 14px; letter-spacing: .06em; color: #F25C84; }
.hd-vol .d { position: absolute; left: 13px; bottom: 16px; width: 100px; height: 26px; }
.hd-vol .d svg { position: absolute; left: 0; top: 0; }
.hd-vol .d span { position: absolute; left: 0; top: 0; width: 100px; text-align: center; font-family: "peckham-press", sans-serif; font-weight: 400; font-size: 9px; line-height: 26px; letter-spacing: .04em; color: #F25C84; }
.ft { position: relative; width: 600px; height: 250px; background: #FCF6E3 url(assets/noise.jpg) repeat; overflow: hidden; }
.ft-box { position: absolute; left: 20px; top: 20px; width: 560px; height: 210px; border-radius: 18px; background: #F25C84; }
.ft-tag { position: absolute; left: 0; top: 46px; width: 560px; text-align: center; font-family: "peckham-press", sans-serif; font-weight: 400; font-size: 14px; color: #FFF6F0; }
.ft-tag img { position: absolute; top: 2px; width: 40px; height: 12px; }
.ft-logo { position: absolute; left: 0; top: 94px; width: 560px; text-align: center; font-size: 72px; line-height: .86; letter-spacing: -2px; color: #FFF6F0; }

/* 入力フォーム */
.modal { position: fixed; inset: 0; z-index: 10; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(43,38,38,.45); }
.modal[hidden] { display: none; }
.modal-box { width: 100%; max-width: 520px; max-height: calc(100vh - 48px); overflow: auto; padding: 24px; border-radius: 12px; background: #fff; }
.modal-title { margin: 0 0 16px; font-size: 16px; }
#modalDelete { margin-right: auto; color: #C2385E; }

/* 一覧・表示 */
.app--narrow { max-width: 880px; }
.app--narrow .panel { padding: 8px 24px; }
.issues { margin: 0; padding: 0; list-style: none; }
.issues li + li { border-top: 1px solid #EEE7E0; }
.issue { display: grid; grid-template-columns: 80px 100px 1fr auto; gap: 16px; align-items: center; padding: 16px 4px; color: #2B2626; text-decoration: none; }
.issue:hover { background: #FAF7F3; }
.issue-vol { font-weight: 900; color: #F25C84; }
.issue-date { font-size: 13px; }
.issue-title { font-weight: 700; line-height: 1.6; }
.issue-meta { font-size: 12px; color: #8A8080; white-space: nowrap; }
.issues-empty { padding: 24px 4px; color: #8A8080; }
.mail { width: 600px; max-width: 100%; margin: 0 auto; background: #fff; }

/* 送信の完了 */
.steps { margin: 0 0 8px; padding-left: 1.4em; line-height: 1.8; }
.steps li + li { margin-top: 14px; }
.copybox { display: flex; gap: 8px; margin-top: 6px; }
.copybox input { flex: 1; padding: 8px 10px; border: 1px solid #D8CFC6; border-radius: 6px; font: 400 13px/1.6 "Noto Sans JP", sans-serif; background: #FAF7F3; }
.copybox .btn { flex: none; }
.note-s { margin: 4px 0 0; font-size: 12px; color: #8A8080; }

/* 下部の操作バー */
.app:has(+ .actionbar) { padding-bottom: 96px; }
.actionbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 8px; padding: 12px 24px; background: rgba(255,255,255,.96); border-top: 1px solid #E5DDD5; }
.actionbar-msg { flex: 1; margin: 0 8px; font-size: 13px; color: #C2385E; text-align: right; }
.actionbar .btn { padding: 10px 18px; }
