/* 点あり塚 (塚 U+FA10) 専用グリフ。Google Fonts版Shippori MinchoはU+FA10を別サブセットchunkで
   遅延読込するため、未ロード時にフォールバック(游明朝)が点なし字形を描いてしまう。
   ここで同family名にU+FA10だけの自前グリフ(font-display:block, data URI)を常時ロードし、
   後勝ち(Googleリンクより後)で確実に点あり字形を描かせる。weight 500/600/700。 */
@font-face{font-family:"Shippori Mincho";font-style:normal;font-weight:500;font-display:block;src:url(data:font/woff2;base64,d09GMgABAAAAAALoAA8AAAAABMgAAAKVAAMcKAAAAAAAAAAAAAAAAAAAAAAAAAAAGyAcIAZgADQRCAqEEINJATYCJAMGCwYABCAFBgcgFyQYBht0AyCOwra1c1wICPOmDGVEPJTL39tsfuvIKlGiNI0FITH2BufPORR9PKrGoLyqglFnIfO1ZyE5gZY7/QNqHlD4yAm1LEgogd/CWJr3QmEYSEs8Qkl3yNjoG5Oq5wlM7TNAnUbEpUGqQmsAI+PMh9QXA8ojnQW4iUdxB5ewAxiyOSadp4WlIuiXEidk0/8OakcZAQLimb4FOMagAGcPIzCsY1ApyrdS+y82+ChAj9YQUEAVerxCrtjsxLiYq505dyY3VsA0QuhMdT5tllnGykyGLDNz2e7OUcMZx09jSM0M3MPMtdzY/fsxbZraKt5KY6OrnMCTMWuoYd2V103VZ2vLp92KQysJEdLXXrcVMETIKt5LSFdbtkvr2q0Msi9OEDDEW806RRZYzMigBG7sTM211014Pk3jeuYKnTk6uZpjo7nd+nrojEbneio5FuZyPF3+Rv08czTOxa3Wng6le7MlXawsIIQLUK9Em1PcuOqWGHORdcmpXBMDk013JoseWrgPyCW8V5OI2shhueQbroxYXCySpH++dBvmuWTHoFYfHWQbZKCUqqhy+YBpuMeHPIt+zHE7MooVLwqXSE6SZ+rtFtkX/ZL10oMUWKK6OMNucuySgRzryQv3ZuSVK6rul67cFhUasSvPWzu3+tNkO8bxboiCYo7YijvqrqFcap8YfrqzwqC+37uzhh2x2pftlKTXEG+RFPy6qtNwaoTv6NzvNf4D5hMjDUdynPyM6qaUx1MuT6OdNOp9pVPMZ/vKAwRy3+ry4XH1hYp+X6Ur5gXAU37VTID3MnocHNumPMqEAEYKCGr37wHkJxyZ51FQrEe+QD8cUSh6sKtN26HkbT0XMtagvv7l8gUvwoFVHgLEy7CeHAAA) format("woff2");unicode-range:U+FA10;}
@font-face{font-family:"Shippori Mincho";font-style:normal;font-weight:600;font-display:block;src:url(data:font/woff2;base64,d09GMgABAAAAAALkAA8AAAAABMwAAAKRAAMcKAAAAAAAAAAAAAAAAAAAAAAAAAAAGyAcIAZgADQRCAqEFINLATYCJAMGCwYABCAFBgcgFyQYBht2AwjG4N+z5jVZpQuTJ7tn/BFdd3ygJAsP1BZaInV70PLEootnmUUcYCAt8QA1KG88m5EYi5y8ngcCgIEilEE8vQMjwQ8aALhcAADYjKJesGLBA7D6pwYCjkgyzIkhAPChKVVIeEd6RsD1t2gsoEq5vQDdS1QBEAAgr1lPAKiCAsAChJKgQJgGjOHSIMBvUS7X4vkEAgBMbpUBLCSgKWE/vAZkeu+np5HGFMwszLAHOJhkGAQESN2JnJWM3h9DMWs0zddasUlbNOciWiU1wS6Z2cweOHoUk5OSG+7oSi+PEZxC6wmmfxNpM1h/T4M9JycU5QyUluREbb+nwEErU+WO7XGp5JojincfRjNHAjkctN7R3XCBWaY/fUib7OWwB2QW7qnfuRMpfS9mepP0vHwF1Mgc1Lvnoa+/vhfC7PE0PxsldN9jWv6K75zclKRIutXqWlrA1ZvtIpXz2/OeQVN2U7TXG5PSBV8FedXWK+1vTmpYNQsGe4tm8tGV8if5Qh5bWPLydtrxRX153u1nu2LdFxmfMl4h2/2K4tNiUvQxTXcL4WabcmrB+1QvzXurhs9F+qVonk7KTpuwByn+QjyMxHCU7g6/pZZEvRtvb0YkxQuJnmGvf+Pv6XMwyVY2Po8+acrvXrvjrIi4Dy0n2fdNJE4mxP1SaY5iUpNdTX4bCZbICtGLVS4K1QtwedHXE3rGzXFOMd+hWXPYU6UtXsTmo+J4VhAx/ODfYVRnI/g9I1AeAAACgFLUTQ1y5EsRcfzGL0K9B4DHSbkzAPA2kzUIA+4W6izlAYAPrGdB9/5/DlDvVaCBBiBoTEBtgkEiC/tBdwlkeEHBy90Lc0giCvL1vyD1Pi7CCJrUGQDkb3QkIwA=) format("woff2");unicode-range:U+FA10;}
@font-face{font-family:"Shippori Mincho";font-style:normal;font-weight:700;font-display:block;src:url(data:font/woff2;base64,d09GMgABAAAAAALsAA8AAAAABMwAAAKYAAMcKAAAAAAAAAAAAAAAAAAAAAAAAAAAGyAcIAZgADQRCAqEFINOATYCJAMGCwYABCAFBgcgFyQYBht5A0DGoPfsZ5uc0h5MPUtfRP/fmfaBeh5GWZEGmlDYjhOP+/lxik91Fg5oYiMZqUx3SGz0JVNNnwcCgIEClEA8vAIiwA8aALhcAAAurinqOesQeABWHysGgL96RZJgRgwAgB+FVXCEV4RHOFR+i8CSKuH2AHQPUQFAAIC8Zj03AJWxAEUlQIGwNFQA0Ij0v0W4XAo8n0AAwJBpzwDw9wCNDnvhLSCg1XPq+ikC9dMb2f2HD2NiQmLdLR2p+WjOLFqOMX0bSKv+2pPqkrOKggXT89Ps/tuYYBjstdaWvBVxbhu1N5piVmmYrbZkk9ao2+fRIqEBdjGTy4cxuB259a58pKz7pM5FJC+x65LCnQdRzKH7t9FyS2fdLaZVby6K7L7N7p+Wnr9Lbt2KkLobPbVBbkqK8y160vt177rnb8BdZ2aXhdnpSMF7znKHbCZlJ2FhruUZxct7f4gv6svHM0E229dskglPEhew3KUk9UFK2m9Lksu27ooUmaUae/toAY8QtrNk1scjDud1SzI702Wvlll1yvhKSyiGLLSdblWxbuIEhYq+4qM75E4QGz3P1700r+QGPmPpJ6IFqmEpJoH3KzOqBZn2uBRVt/G2VD214e8BqQF8nMucLg9tfw+/I4lWMjG+Wh7iFsa5z93FOGI+lCz7puYJIX+TEMcLWdlyAY32VbnHPcKUZcJ1/aULfLSC3Ixjqo59c3HxGs6xbFdrcFGqjXlqOvKoLTOQqL9wFIy9cb8/U1sYAAACgFLQGZ3w+5Ys7PCNX5h6BwCPEnOmAeBNBmsAWtx11DnKBwR8YAEACED3/H8GUO+gBRXqHAjKkF3WCC1SFvaCPiUIwgsKSu5umOFIREC+/udQ75BC56MUINrt6AAAAA==) format("woff2");unicode-range:U+FA10;}

:root {
  color-scheme: light;
  --bg: #f5f3ee;
  --panel: #ffffff;
  --ink: #211f1a;
  --muted: #6e6a60;
  --faint: #a39e92;
  --line: #e0dcd2;
  --line-strong: #cfc9bb;
  --accent: #2f6f5e;
  --accent-dark: #1f4c40;
  --accent-soft: #eaf2ef;
  --danger: #9a342f;
  --amber-bg: #fdf6e6;
  --amber-ink: #8a5a14;
  --shadow: 0 1px 2px rgba(33, 30, 24, 0.04), 0 12px 32px rgba(33, 30, 24, 0.06);
  --shadow-lift: 0 2px 6px rgba(33, 30, 24, 0.06), 0 18px 44px rgba(33, 30, 24, 0.1);
  --radius: 10px;
  --font-ui: "Zen Kaku Gothic New", -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", sans-serif;
  --font-serif: "Shippori Mincho", "游明朝", "Yu Mincho", "YuMincho", "HiraMinProN-W3", "Hiragino Mincho Pro", serif;
  font-family: var(--font-ui);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(47, 111, 94, 0.05), transparent 60%),
    var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

/* ---------- Topbar ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px clamp(18px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(6px);
}

.topbarActions,
.headerSession {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.headerSession {
  color: var(--muted);
  font-size: 12px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(22px, 3.4vw, 30px);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.02em;
}

h2 {
  font-size: 17px;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 4px;
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.label::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--accent);
  transform: rotate(45deg);
}

#homeLink {
  cursor: pointer;
  transition: opacity 0.15s ease;
}

#homeLink:hover {
  opacity: 0.7;
}

/* ---------- Layout shells ---------- */

.shell {
  padding: 30px clamp(18px, 4vw, 48px) 60px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(340px, 560px);
  gap: 24px;
  align-items: start;
}

.submissionNav {
  grid-column: 1 / -1;
}

.adminWorkspace {
  grid-template-columns: minmax(260px, 440px);
  justify-content: center;
}

.adminWorkspace.authed {
  grid-template-columns: minmax(300px, 1fr) minmax(300px, 1fr);
  justify-content: stretch;
}

.startPanel {
  display: grid;
  place-items: start center;
}

.startPanel.hidden {
  display: none;
}

.loginCard {
  width: min(100%, 640px);
}

.lead {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.sectionHead {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.panel,
.previewWrap {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel {
  padding: 26px;
}

.panel.slim {
  max-width: 440px;
}

.grow {
  min-height: 320px;
}

.previewWrap {
  position: sticky;
  top: 18px;
  padding: 26px 24px 30px;
  overflow: auto;
  container-type: inline-size;
  background:
    repeating-linear-gradient(-45deg, rgba(33, 30, 24, 0.016) 0 2px, transparent 2px 6px),
    #e5e2da;
}

.previewHeader,
.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.previewHeader {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin-bottom: 18px;
}

.previewHeader h2 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.actions {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin: 16px 0 0;
}

.submitRow {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.submitRow {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.submitRow button {
  padding: 11px 28px;
  font-size: 14px;
  font-weight: 700;
}

/* 保存ボタン: 未保存の変更がないときはグレーアウト */
#saveButton[disabled] {
  opacity: 0.55;
  cursor: default;
}

.confirmHint,
.confirmedNote {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted, #6b7280);
}

.confirmedNote {
  color: #92400e;
}

/* 版セレクタ・確定バッジ */
.editorStatus {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.versionSelectWrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted, #6b7280);
}

.confirmedBadge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  font-size: 12px;
  font-weight: 700;
}

/* 確定済みエディタはロック (操作不可・淡色) */
.editorLocked .entryStack,
.editorLocked .editorMeta,
.editorLocked .actions:not(.submitRow) {
  pointer-events: none;
  opacity: 0.6;
}

/* ---------- Editor meta row ---------- */

.editorMeta {
  display: flex;
  align-items: end;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding: 14px 16px;
  background: #faf9f5;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.eventLabel {
  flex: 1;
  min-width: 200px;
  margin-top: 0;
}

.layoutBadgeWrap {
  display: grid;
  gap: 4px;
}

.layoutBadgeLabel {
  color: var(--muted);
  font-size: 12px;
}

.layoutBadge {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  background: var(--accent-soft);
  border: 1px solid rgba(47, 111, 94, 0.25);
  border-radius: 99px;
  color: var(--accent-dark);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

/* ---------- Form elements ---------- */

label {
  display: block;
  margin-top: 10px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

/* 文字数の上限は動的カウンタ(.fieldLimitNotice)に集約し、静的注記は非表示にする */
.charLimit {
  display: none;
}

.linkFieldTitle {
  margin: 10px 0 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

/* 公式サイト/SNS: 種別セレクト + URL 入力を横並びにする */
.linkInputRow {
  display: flex;
  gap: 8px;
  margin-top: 4px;
  align-items: stretch;
}

.linkInputRow .linkTypeSelect {
  flex: 0 0 auto;
  width: auto;
  min-width: 130px;
  margin-top: 0;
}

.linkInputRow > input,
.linkInputRow .richEditor {
  flex: 1;
  min-width: 0;
  margin-top: 0;
}

label > input,
label > select,
label > textarea {
  display: block;
  margin-top: 4px;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  padding: 6px 10px;
  font-size: 13.5px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 111, 94, 0.14);
}

input::placeholder,
textarea::placeholder {
  color: #b9b4a8;
}

textarea {
  resize: vertical;
  line-height: 1.7;
}

button {
  border: 1px solid var(--accent);
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.08s ease, box-shadow 0.15s ease;
}

button:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

button:active {
  transform: translateY(1px);
}

button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

button.ghost {
  background: transparent;
  color: var(--accent-dark);
  border-color: rgba(47, 111, 94, 0.35);
}

button.ghost:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

button.compact {
  padding: 5px 10px;
  min-height: 30px;
  font-size: 12px;
}

/* ---------- Entry cards ---------- */

.entryStack {
  display: grid;
  gap: 14px;
}

.entryCard {
  position: relative;
  margin: 14px 0 0;
  padding: 18px 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fdfdfb;
}

.entryCard legend {
  padding: 2px 10px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border: 1px solid rgba(47, 111, 94, 0.2);
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.entryActions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 4px 0 12px;
  flex-wrap: wrap;
}

.entryRemove {
  color: var(--danger);
  border-color: rgba(154, 52, 47, 0.3);
}

.entryRemove:hover {
  background: #fbf0ef;
  border-color: var(--danger);
}

.fieldGroupLabel {
  margin: 14px 0 2px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.fieldGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 14px;
  row-gap: 6px;
  align-items: start;
}

/* 各フィールド (ラベル+入力+文字数表示) を1つのグリッドセルにまとめる */
.field {
  display: grid;
  gap: 2px;
  align-content: start;
}

.field > label {
  margin-top: 0;
}

.fieldGrid .span2 {
  grid-column: 1 / -1;
}

/* ---------- Messages / status ---------- */

.message {
  min-height: 22px;
  margin-top: 12px;
  color: var(--accent-dark);
  font-size: 14px;
}

.message.error {
  color: var(--danger);
}

.autoSaveStatus {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
  align-self: center;
  background: #f3f1e9;
  padding: 4px 10px;
  border-radius: 99px;
  border: 1px solid var(--line);
  white-space: nowrap;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.autoSaveStatus::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--faint);
}

.autoSaveStatus.saving {
  color: var(--accent-dark);
  border-color: rgba(47, 111, 94, 0.35);
  background: var(--accent-soft);
}

.autoSaveStatus.saving::before {
  background: var(--accent);
  animation: autoSavePulse 0.9s ease-in-out infinite;
}

.autoSaveStatus.saved {
  color: #065f46;
  border-color: rgba(6, 95, 70, 0.2);
  background: #d1fae5;
  animation: autoSaveFlash 0.8s ease-out;
}

.autoSaveStatus.error {
  color: var(--danger);
  border-color: var(--danger);
  background: #fdf2f2;
}

.autoSaveStatus.error::before {
  background: var(--danger);
}

@keyframes autoSavePulse {
  0%, 100% { transform: scale(0.8); opacity: 0.45; }
  50% { transform: scale(1.25); opacity: 1; }
}

@keyframes autoSaveFlash {
  0% { box-shadow: 0 0 0 0 rgba(47, 111, 94, 0.22); }
  100% { box-shadow: 0 0 0 10px rgba(47, 111, 94, 0); }
}

/* ---------- Done panel ---------- */

.doneCard {
  text-align: center;
  padding: 44px 32px 38px;
}

.doneIcon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1.5px solid rgba(47, 111, 94, 0.35);
  color: var(--accent);
  animation: donePop 0.45s cubic-bezier(0.18, 1.2, 0.4, 1);
}

@keyframes donePop {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.doneCard .lead {
  margin-top: 10px;
}

.idChip {
  display: inline-block;
  padding: 2px 10px;
  background: #f3f1e9;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  color: var(--ink);
}

.doneActions {
  justify-content: center;
  margin-top: 26px;
}

/* ---------- History / admin rows ---------- */

.history,
.adminList {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.historyToolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.row:hover {
  border-color: var(--line-strong);
  box-shadow: 0 2px 10px rgba(33, 30, 24, 0.05);
}

.row small {
  color: var(--muted);
}

.row button,
.row a {
  align-self: center;
  white-space: nowrap;
}

.rowActions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.detailEmpty,
.detailBlock,
.detailEntry {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.detailEntry {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--ink);
}

.detailEntry h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.detailEntry p {
  margin: 8px 0;
  overflow-wrap: anywhere;
}

.imageLinks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.figmaHint {
  margin-top: 8px;
  color: var(--faint);
  font-size: 11.5px;
  line-height: 1.6;
}

.adminPreview {
  margin-top: 16px;
  padding: 12px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8f7f3;
}

.adminPreview .sheet {
  width: min(100%, 148mm);
  height: auto;
  aspect-ratio: unset;
  overflow: visible;
  margin: 0;
  box-shadow: none;
}

.hidden {
  display: none;
}

.srOnly {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Preview sheet (A5 magazine) ---------- */

.sheet {
  width: 148mm;
  aspect-ratio: 148 / 210;
  overflow: hidden;
  margin: 0 auto;
  padding: 14.3mm 13mm;
  background: #fffefb;
  border: 1px solid #d8d2c4;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08), 0 16px 36px rgba(0, 0, 0, 0.14);
  color: #1f1f1c;
  font-family: var(--font-serif);
}

.sheetEmptyHint {
  color: #777166;
  font-size: 8pt;
  font-family: var(--font-ui);
}

.sheetEntries {
  display: grid;
  gap: 6mm;
  height: 100%;
  align-content: start;
}

/* 2施設: 上下に縦並び */
.sheetEntries.two {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 0;
}

.sheetEntries.two .sheetEntry + .sheetEntry {
  border-top: 0.35mm solid #1f1f1c;
  padding-top: 4.5mm;
}

.sheetEntries.two .sheetEntry:first-child {
  padding-bottom: 4.5mm;
}

/* 原稿ページ: 上から流し込み */
.sheetEntries.articleFlow {
  grid-template-rows: none;
  align-content: start;
  gap: 7mm;
}

.sheetEntry {
  overflow: hidden;
  min-height: 0;
}

.sheetEntry h3 {
  margin: 0 0 2.5mm;
  font-size: 16.9pt;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.04em;
}

.sheetEntries.two .sheetEntry h3 {
  font-size: 14.95pt;
  margin-bottom: 2mm;
}

.sheetEntry p {
  margin: 1.6mm 0;
  font-size: 8.5pt;
  line-height: 1.75;
  overflow: hidden;
}

/* 2施設: 写真と情報を左右に */
.sheetEntries.two .entryBody {
  display: flex;
  gap: 4mm;
  align-items: flex-start;
}

.sheetEntries.two .entryMedia {
  width: 46mm;
  flex-shrink: 0;
}

.sheetEntries.two .infoTable {
  flex: 1;
  min-width: 0;
}

/* ---------- 施設情報テーブル（アイコン付き） ---------- */

.infoTable {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7mm 4mm;
  margin: 2.2mm 0;
  padding: 1.7mm 0;
  border-top: 0.45mm solid #1f1f1c;
  border-bottom: 0.15mm solid #b9b2a0;
}

/* 2施設レイアウトでは写真横の狭い領域に入るため1カラム */
.sheetEntries.two .infoTable {
  grid-template-columns: 1fr;
}

.infoRow {
  display: flex;
  align-items: center;
  gap: 1.4mm;
  font-size: 8pt;
  line-height: 1.3;
}

/* 住所・アクセスなど長い項目は2カラムぶち抜き */
.infoRow--wide {
  grid-column: 1 / -1;
}

.infoIcon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: #2f6f5e;
}

.infoIcon svg {
  display: block;
  width: 3.72mm;
  height: 3.72mm;
  transform: translateY(0.3mm); /* 字形の光学中心に合わせて微調整 */
}

.infoLabel {
  flex-shrink: 0;
  min-width: 11mm;
  font-family: var(--font-ui);
  font-size: 6.8pt;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #57524a;
}

.infoValue {
  flex: 1;
  min-width: 0;
  font-size: 8pt;
  overflow-wrap: anywhere;
}

.entryDesc {
  text-align: justify;
  letter-spacing: 0.02em;
  white-space: pre-line; /* 説明文の改行を文書に反映する */
  font-size: 8.5pt;
}

.sheetEntries.two .entryDesc {
  font-size: 8pt;
  line-height: 1.65;
}

.entryNote {
  padding: 1.6mm 2.2mm;
  background: #f6f4ec;
  border-radius: 1mm;
  font-size: 7.5pt;
  color: #57524a;
  font-family: var(--font-ui);
}

.entryNote strong {
  font-size: 6.8pt;
  letter-spacing: 0.08em;
  margin-right: 1.2mm;
}

/* ---------- 原稿ページ プレビュー ---------- */

.articleEntry {
  overflow: hidden;
}

.articleTitle {
  position: relative;
  margin: 0 0 3.2mm;
  padding-left: 3.6mm;
  font-size: 14.5pt;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.4;
}

.articleTitle::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6mm;
  bottom: 0.6mm;
  width: 1.2mm;
  background: #2f6f5e;
}

.articleBody p {
  margin: 0 0 1.8mm;
  font-size: 9pt;
  line-height: 1.7;
  text-align: justify;
  text-indent: 1em;
  letter-spacing: 0.03em;
}

/* 文字数が多いページは 8.5pt に縮小 */
.sheetEntries.articleDense .articleBody p {
  font-size: 8.5pt;
  line-height: 1.65;
}

/* ---------- Photos ---------- */

.photoGrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2mm;
  margin: 2.5mm 0;
  overflow: hidden;
}

.photoGrid.one {
  grid-template-columns: 1fr;
}

.photoGrid.three {
  grid-template-columns: repeat(3, 1fr);
}

/* 1施設レイアウト: 写真1枚は本文幅いっぱいに大きく表示 */
.sheetEntries:not(.two) .photoGrid.one .photoFrame,
.sheetEntries:not(.two) .photoGrid.one .photoPlaceholder {
  display: block;
  height: 64mm;
  width: 100%;
  aspect-ratio: unset;
}

/* 写真は固定枠 (.photoFrame) でクリップし、内側の img を crop に応じて拡大/移動する */
.photoFrame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 3px;
  border: 1px solid #ded8cc;
}

.photoFrame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* #preview 内のみ操作可能にする。ダブルクリックで拡大編集、ドラッグで並べ替え。 */
#preview .photoFrame {
  cursor: grab;
}

#preview .photoFrame:active {
  cursor: grabbing;
}

/* ホバー時に画像を減光し「ダブルクリックで編集」を重ねる */
#preview .photoFrame::after {
  content: "ダブルクリックで編集";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 4px;
  background: rgba(20, 18, 14, 0.42);
  color: #fff;
  font-family: var(--font-ui, sans-serif);
  font-size: 9pt;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}

#preview .photoFrame:hover::after {
  opacity: 1;
}

#preview .photoFrame.dragging {
  opacity: 0.4;
}

#preview .photoFrame.dragOver {
  outline: 2px solid var(--accent, #2f6f5e);
  outline-offset: -2px;
}

.photoPlaceholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  background:
    repeating-linear-gradient(-45deg, rgba(33, 30, 24, 0.03) 0 3px, transparent 3px 8px),
    #eeece4;
  border-radius: 3px;
  border: 1px dashed #c5c0b4;
}

/* サブ写真行 */
.photoSubRow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5mm;
  margin: 1.5mm 0 2mm;
}

.photoSubRow .photoFrame {
  border-radius: 2px;
}

.photoPlaceholder--sub {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #ebe9e2;
  border-radius: 2px;
  border: 1px dashed #c5c0b4;
}

/* フォーム: 画像入力エリア */
.imageInputWrap {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: #fbfaf7;
}

.imageInputWrap label {
  margin-top: 0;
}

.imageEditHint {
  margin: 2px 0 0;
  color: var(--faint);
  font-size: 11.5px;
  line-height: 1.4;
}

/* 写真 crop エディタ */
.cropDialog .cropStage {
  position: relative;
  width: 100%;
  max-width: 360px;
  margin: 4px auto 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: #1f1f1c;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.cropDialog .cropStage.panning {
  cursor: grabbing;
}

.cropDialog .cropStage img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.cropZoomLabel {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

.cropZoomLabel input[type="range"] {
  width: 100%;
}

.savedImageSummary {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

/* 写真スロット: サムネ自体がアップロード面のタイル。
   空 = 破線ドロップゾーン / 選択済 = 実線の写真カード。クリックで選択・差し替え。 */
.imgSlotsHead {
  margin: 0 0 2px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.imgSlotsHead span {
  margin-left: 6px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--faint);
}

.imgSlotGrid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.imgSlot {
  position: relative;
  display: flex;
  flex-direction: column;
  margin-top: 0;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  overflow: hidden;
  background: var(--panel, #fff);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  width: 102px;
  flex: 0 0 auto;
}

/* 空スロットは破線ドロップゾーンとして見せる (フォーム全体の破線モチーフを踏襲) */
.imgSlot:has(.imgThumbEmpty) {
  border-style: dashed;
  background: #faf9f5;
}

.imgSlot:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 10px rgba(47, 111, 94, 0.14);
}

.imgSlot:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.imgSlot input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  opacity: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* サムネ枠 = タイルの画像領域 */
.imgSlot .imgSlotThumb {
  width: 100%;
  aspect-ratio: 4 / 3;
}

.imgThumb {
  position: relative;
  width: 100%;
  height: 100%;
}

.imgThumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #f0eee7;
}

/* 選択済タイルにホバーで「変更」を示すスクリム */
.imgThumb::after {
  content: "変更";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: rgba(31, 76, 64, 0.45);
  opacity: 0;
  transition: opacity 0.15s;
  pointer-events: none;
}

.imgSlot:hover .imgThumb::after {
  opacity: 1;
}

/* 空状態 = カメラ「＋」のドロップゾーン */
.imgSlot .imgThumbEmpty {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  width: 100%;
  height: 100%;
  margin: 0;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  transition: color 0.15s;
}

.imgSlot:hover .imgThumbEmpty {
  color: var(--accent-dark);
}

.imgThumbEmptyIcon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}

/* キャプションバー (タイル下端) */
.imgSlotCaption {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 8px;
  border-top: 1px solid var(--line);
}

.imgSlotName {
  min-width: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.imgSlotReq {
  flex: 0 0 auto;
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 9.5px;
  font-weight: 700;
}

/* 削除 ✕ (写真の上に重ねる) */
.imgThumbRemove {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 2;
  width: 20px;
  height: 20px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(154, 52, 47, 0.92);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.imgThumbRemove:hover {
  background: var(--danger);
}

@media (prefers-reduced-motion: reduce) {
  .imgSlot,
  .imgThumb::after,
  .imgSlot .imgThumbEmpty {
    transition: none;
  }
}

.fieldLimitNotice {
  margin-top: 0;
  color: var(--faint);
  font-size: 10.5px;
  line-height: 1.3;
}

.fieldLimitNotice.over .limitCount {
  color: var(--danger);
  font-weight: 700;
}

/* 異字体インライン編集 (contenteditable) */
/* 値保持役のネイティブ入力は隠す。値は JS が読み書きする。 */
.richSource {
  display: none !important;
}

/* ネイティブ input/textarea と同じ見た目の編集ボックス */
.richEditor {
  width: 100%;
  min-height: 33px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  padding: 6px 10px;
  margin-top: 4px;
  font-size: 13.5px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  cursor: text;
}
.richEditor.multiline {
  min-height: 92px;
}
.richEditor:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 111, 94, 0.14);
}
/* 空のときプレースホルダを表示 */
.richEditor:empty::before {
  content: attr(data-placeholder);
  color: #b9b4a8;
}

/* 入力欄内の登録字。クリックで切替できることを示す */
.vchar {
  cursor: pointer;
  border-radius: 3px;
  padding: 0 1px;
  box-shadow: inset 0 -2px 0 rgba(47, 111, 94, 0.25);
}
.vchar:hover {
  background: var(--accent-soft);
}
/* 異字体 (点あり等) が選択されている字は塗りで強調し、多数の中でも一目で分かるように */
.vchar.isVariant {
  background: var(--accent);
  color: #fff;
  box-shadow: none;
}

.overflowPreview {
  margin-top: 4px;
  padding: 8px;
  border: 1px solid rgba(154, 52, 47, 0.25);
  border-radius: 6px;
  background: #fffdf8;
  white-space: pre-wrap;
}

.overflowPreview mark {
  background: #ffe08a;
  color: inherit;
  padding: 0 1px;
}

input.overLimit,
textarea.overLimit {
  border-color: var(--danger);
  background: #fffafa;
}

/* 写真なしチェックボックス */
.noPhotoLabel {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}

.noPhotoLabel input[type="checkbox"] {
  width: auto;
  margin: 0;
  accent-color: var(--accent);
}

/* プレビュー: 未入力プレースホルダー文字 */
.placeholderText {
  color: #b9b4a8 !important;
}

/* ---------- Responsive / container scale ---------- */

@media (max-width: 980px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .adminWorkspace {
    grid-template-columns: 1fr;
  }

  .previewWrap {
    position: static;
  }
}

/* アートボードをプレビュー枠に収める自動スケール */
@container (max-width: 603px) { .previewWrap .sheet { zoom: 0.95; } }
@container (max-width: 566px) { .previewWrap .sheet { zoom: 0.89; } }
@container (max-width: 524px) { .previewWrap .sheet { zoom: 0.83; } }
@container (max-width: 482px) { .previewWrap .sheet { zoom: 0.76; } }
@container (max-width: 441px) { .previewWrap .sheet { zoom: 0.70; } }
@container (max-width: 400px) { .previewWrap .sheet { zoom: 0.63; } }
@container (max-width: 358px) { .previewWrap .sheet { zoom: 0.56; } }

@media (max-width: 680px) {
  .fieldGrid {
    grid-template-columns: 1fr;
  }

  .editorMeta {
    align-items: stretch;
    flex-direction: column;
  }
}

@page {
  size: 148mm 210mm;
  margin: 0;
}

@media print {
  body {
    margin: 0;
    background: #fff;
  }

  .topbar,
  .panel,
  .previewHeader,
  .submissionNav,
  .fab {
    display: none !important;
  }

  .shell,
  .previewWrap {
    display: block;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: #fff;
  }

  /* プレビュー用の自動縮小(@container + zoom)を無効化 */
  .previewWrap {
    container-type: normal;
  }

  .previewWrap .sheet,
  .sheet {
    width: 148mm;
    height: 210mm;
    aspect-ratio: unset;
    overflow: hidden;
    margin: 0;
    border: 0;
    box-shadow: none;
    zoom: 1;
  }
}

/* 一覧からの印刷/PDF: 隠しコンテナ #printRoot のみを印刷する。 */
#printRoot {
  display: none;
}

@media print {
  body.printing > *:not(#printRoot) {
    display: none !important;
  }

  body.printing #printRoot {
    display: block;
  }

  #printRoot .previewWrap {
    container-type: normal;
    padding: 0;
  }
}

/* ---------- Admin ---------- */

.adminFilterRow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--line);
}

.adminFilterRow label {
  margin-top: 0;
  font-weight: 600;
  white-space: nowrap;
}

.adminFilterRow select {
  max-width: 320px;
}

.adminTabs {
  display: flex;
  gap: 4px;
}

.tabBtn {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  padding: 7px 14px;
  font-size: 13px;
  cursor: pointer;
}

.tabBtn:hover {
  background: var(--bg);
}

.tabBtn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.addEventForm {
  display: flex;
  gap: 8px;
  margin: 14px 0;
}

.addEventForm input {
  flex: 1;
  margin-top: 0;
}

.addEventForm button {
  white-space: nowrap;
  margin-top: 0;
}

.statusBadge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
}

.statusBadge.active {
  background: #d1fae5;
  color: #065f46;
}

.statusBadge.inactive {
  background: #f3f4f6;
  color: var(--muted);
}

button.ghost.danger {
  color: var(--danger);
  border-color: rgba(154, 52, 47, 0.3);
}

button.ghost.danger:hover {
  background: #fbf0ef;
  border-color: var(--danger);
}

/* ---------- Modals ---------- */

.loadingOverlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: rgba(28, 26, 21, 0.45);
  backdrop-filter: blur(2px);
}

.loadingOverlay.hidden {
  display: none;
}

.loadingSpinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}

.loadingText {
  margin: 0;
  color: #fff;
  font-weight: 600;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.confirmDoneIcon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: rgba(46, 160, 67, 0.14);
  color: #2ea043;
  animation: donePop 0.32s cubic-bezier(0.2, 0.9, 0.3, 1);
}

#confirmDoneModal h2 {
  text-align: center;
  margin: 0 0 8px;
}

#confirmDoneModal .lead {
  text-align: center;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.hidden {
  display: none;
}

.modalBackdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 26, 21, 0.45);
  backdrop-filter: blur(2px);
}

.modalDialog {
  position: relative;
  background: var(--panel);
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22);
  padding: 28px;
  width: min(100%, 640px);
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn 0.22s cubic-bezier(0.2, 0.9, 0.3, 1);
}

@keyframes modalIn {
  0% { transform: translateY(10px) scale(0.985); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

.modalDialog.slim {
  width: min(100%, 440px);
}

.modalHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.iconBtn {
  padding: 6px 10px;
  font-size: 16px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.iconBtn:hover {
  background: var(--bg);
  color: var(--ink);
}

/* ---------- Layout choice cards ---------- */

.modalEventLabel {
  margin-top: 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.modalSubhead {
  margin: 18px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.layoutChoices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 8px 0 8px;
}

.layoutChoice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 14px;
  background: #fbfaf7;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
}

.layoutChoice:hover {
  border-color: var(--accent);
  background: #f3f8f6;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(47, 111, 94, 0.12);
}

.layoutChoice strong {
  font-size: 13.5px;
  color: var(--ink);
}

.layoutChoice span {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.5;
}

.layoutThumb {
  display: grid;
  gap: 4px;
  width: 62px;
  height: 84px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 7px;
  box-shadow: 0 2px 6px rgba(33, 30, 24, 0.07);
}

.layoutThumb--one {
  grid-template-rows: 1fr;
}

.layoutThumb--two {
  grid-template-rows: 1fr 1fr;
}

.thumbBlock {
  background: linear-gradient(180deg, #d9d4c6, #cfc9ba);
  border-radius: 2px;
}

.layoutThumb--article {
  grid-template-rows: auto auto auto auto;
  align-content: start;
  gap: 6px;
  padding-top: 12px;
}

.thumbLine {
  height: 3px;
  border-radius: 2px;
  background: #cfc9ba;
}

.thumbLine.wide {
  height: 6px;
  width: 70%;
  background: var(--accent);
  opacity: 0.55;
}

.thumbLine.short {
  width: 55%;
}

@media (max-width: 680px) {
  .layoutChoices {
    grid-template-columns: 1fr;
  }

  .layoutThumb {
    height: 56px;
  }
}

/* ---------- Floating chat button ---------- */

.fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 50;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  box-shadow: 0 4px 16px rgba(47, 111, 94, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  padding: 0;
}

.fab:hover {
  background: var(--accent-dark);
  transform: scale(1.06);
}

.fab.hidden {
  display: none;
}

/* ---------- Submission rows / grouping ---------- */

.eventGroup {
  margin-top: 24px;
}

.eventGroupTitle {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  border-left: 3px solid var(--accent);
  padding-left: 9px;
  margin: 0 0 12px;
}

.eventGroupList {
  display: grid;
  gap: 10px;
}

.submissionRow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px;
}

.submissionMain {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.submissionTitleRow {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ステータスピル: 横並びドット＋語。状態色はテーマに依らず固定 (緑=確定 / 琥珀=編集中)。 */
.statusPill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px 3px 7px;
  border-radius: 99px;
  border: 1px solid transparent;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.statusPill__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex: none;
}

.statusPill__ver {
  margin-left: 1px;
  padding-left: 6px;
  border-left: 1px solid currentColor;
  font-size: 10.5px;
  font-weight: 600;
  opacity: 0.7;
}

.statusPill.is-confirmed {
  background: #eaf2ef;
  color: #1f4c40;
  border-color: rgba(47, 111, 94, 0.28);
}

.statusPill.is-confirmed .statusPill__dot {
  background: #2f6f5e;
}

.statusPill.is-draft {
  background: var(--amber-bg);
  color: var(--amber-ink);
  border-color: rgba(138, 90, 20, 0.22);
}

.statusPill.is-draft .statusPill__dot {
  background: #c8861a;
}

/* レイアウトチップ: 短語＋版面グリフ。完全名は title 属性。 */
.layoutChip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px 2px 6px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}

.layoutChip svg {
  flex: none;
  opacity: 0.7;
}

/* ステータスレール: 行の左端を状態色で塗り、読まずに走査できるようにする。 */
.submissionRow.rail-confirmed {
  border-left: 3px solid #2f6f5e;
}

.submissionRow.rail-draft {
  border-left: 3px solid #d8a43c;
}

.facilityNameTitle {
  font-size: 14px;
  color: var(--ink);
}

.submissionMeta {
  color: var(--muted);
  font-size: 12px;
}

/* ---------- 管理一覧の行・一括操作 ---------- */

.adminRow {
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 10px 12px;
}

.adminRow .submissionMain {
  flex: 1 1 240px;
  min-width: 0;
}

.adminRow .adminRowActions {
  margin-left: auto;
}

.rowSelect {
  display: flex;
  align-items: center;
  flex: none;
}

.rowSelect input {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.adminRowActions {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 6px;
}

/* 書き出し系 (PDF/SVG/JSON) を区切り線でひとまとめにする。 */
.exportGroup {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 7px;
  margin: 0 1px;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

/* アンカーをボタン (ghost/compact) と同じ見た目に揃える。 */
.adminRowActions a.ghost,
.detailBlock .actions a.ghost {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  border: 1px solid rgba(47, 111, 94, 0.35);
  border-radius: 7px;
  background: transparent;
  color: var(--accent-dark);
  padding: 5px 10px;
  min-height: 30px;
  font-size: 12px;
  font-weight: 500;
}

.adminRowActions a.ghost:hover,
.detailBlock .actions a.ghost:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.selectAllInline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 0 auto;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.selectAllInline input {
  width: 16px;
  height: 16px;
}

.bulkBar.hidden {
  display: none;
}

.bulkBar {
  position: sticky;
  top: 8px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
  padding: 9px 14px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-lift);
}

.bulkBar__count {
  font-size: 13px;
  font-weight: 700;
}

.bulkBar__actions {
  display: flex;
  gap: 8px;
}

.bulkBar .ghost {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
}

.bulkBar .ghost:hover {
  background: rgba(255, 255, 255, 0.26);
  border-color: #fff;
}

/* 一括バー内の削除は地のアクセント色に映える白ボタン (赤文字)。 */
.bulkBar .danger {
  background: #fff;
  border-color: #fff;
  color: var(--danger);
}

.bulkBar .danger:hover {
  background: #fde8e7;
  border-color: #fde8e7;
}

.detailMetaRow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 12px;
}

.detailEmail {
  color: var(--muted);
  font-size: 13px;
}

/* ---------- Admin mode ---------- */

body.adminMode {
  --accent: #3d5a80;
  --accent-dark: #2c4360;
  --accent-soft: #e8eef5;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(61, 90, 128, 0.08), transparent 60%),
    #eef1f4;
}

body.adminMode .topbar {
  background: #243447;
  border-bottom-color: #1b2838;
  color: #f2f5f8;
}

body.adminMode .topbar .label {
  color: #9fb8d4;
}

body.adminMode .topbar .label::before {
  background: #6f93bd;
}

body.adminMode .topbar .ghost {
  color: #f2f5f8;
  border-color: rgba(255, 255, 255, 0.35);
}

/* 削除済みタブ */
#deletedList .submissionRow {
  justify-content: flex-start;
  gap: 12px;
}

.deletedCheck {
  display: flex;
  align-items: center;
}

.deletedCheck input,
.deletedSelectAll input {
  width: 16px;
  height: 16px;
}

.deletedSelectAll {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  white-space: nowrap;
}
