
:root {
  --link: #0000ff;
  --border: #aaa;
  --text: #111;
  --thread-list-font-size: 14px;
  --thread-title-font-size: 24px;
  --post-body-font-size: 18px;
  --post-meta-font-size: 14px;
  --thread-title-font-size-mobile: 20px;
  --post-body-font-size-mobile: 16px;
  --post-meta-font-size-mobile: 12px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font-family: Arial, "Yu Gothic", "Meiryo", sans-serif;
}

a {
  color: var(--link);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

.bbs-shell {
  max-width: 1680px;
  margin: 0 auto;
  padding: 12px 28px 70px;
}

.status {
  max-width: 460px;
  margin: 0 auto 8px;
  padding: 5px 8px;
  text-align: center;
  font-size: 12px;
  color: #666;
}

.status.error {
  color: #a40000;
  background: #fff3f3;
  border: 1px solid #e0baba;
}

.bbs-header {
  width: 320px;
  margin: 0 auto;
  text-align: center;
  font-size: 13px;
  line-height: 1.25;
}

.bbs-header .title { font-size: 14px; }
.top-links { margin-top: 4px; }

.thread-list {
  width: 320px;
  margin: 9px auto 0;
}

.thread-card {
  display: block;
  position: relative;
  min-height: 47px;
  padding: 8px 28px 7px 4px;
  border-top: 1px solid #eee;
  font-size: var(--thread-list-font-size);
  line-height: 1.3;
}

.thread-card:last-child {
  border-bottom: 1px solid #eee;
}

.thread-card::after {
  content: "›";
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: #aaa;
  font-size: 22px;
}

.count {
  color: #111;
  font-size: 11px;
  margin-left: 4px;
}

.empty {
  width: 320px;
  margin: 18px auto;
  font-size: 13px;
  line-height: 1.6;
}

.search-panel,
.compose-panel,
.reply-form {
  max-width: 720px;
  margin: 14px auto;
  padding: 12px;
  border: 1px solid #ddd;
  background: #fafafa;
}

.search-panel input {
  width: min(500px, 68%);
  padding: 7px;
}

.compose-panel label,
.reply-form label {
  display: block;
  margin-bottom: 10px;
}

.compose-panel input,
.compose-panel textarea,
.reply-form input,
.reply-form textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid #bbb;
  background: #fff;
  font: inherit;
}

button {
  min-height: 38px;
  padding: 5px 16px;
  border: 1px solid #d8d8d8;
  border-radius: 3px;
  background: linear-gradient(#fff, #f2f2f2);
  color: #444;
  font: inherit;
  cursor: pointer;
}

button:hover { background: #f5f5f5; }
button:disabled { opacity: .55; cursor: default; }

.note {
  margin: 8px 0 0;
  color: #666;
  font-size: 12px;
}

.thread-view {
  width: 100%;
}

.thread-title-row {
  margin-bottom: 18px;
  font-size: 15px;
}

.thread-title-row > div {
  margin-top: 14px;
}

.thread-title-link {
  font-size: 18px;
}

.post {
  position: relative;
  padding: 10px 0 26px;
  border-bottom: 1px solid var(--border);
}

.post-head {
  line-height: 1.45;
  margin-bottom: 6px;
}

.post-number,
.post-name {
  font-size: 18px;
}

.device {
  margin-left: 6px;
  font-size: 16px;
}

.date {
  font-size: 16px;
  color: #333;
}

.post-body {
  margin-top: 4px;
  padding-right: 190px;
  font-size: 21px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.post-controls {
  position: absolute;
  right: 10px;
  bottom: 20px;
  display: flex;
  gap: 18px;
  font-size: 18px;
}

.rule-group {
  margin: 12px 0 18px;
}
.rule-group hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 12px 0;
}

.thread-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 210px));
  gap: 8px;
  justify-content: center;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

.edit-area {
  width: calc(100% - 190px);
  min-height: 160px;
  padding: 8px;
  font-size: 20px;
  line-height: 1.55;
  font-family: inherit;
}

.inline-edit-buttons {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.hidden { display: none !important; }

.loading {
  color: #666;
  font-size: 13px;
}

@media (max-width: 700px) {
  .bbs-shell {
    width: 100%;
    padding: 12px 10px 60px;
  }

  .bbs-header,
  .thread-list,
  .empty {
    width: min(100%, 320px);
  }

  .thread-title-link { font-size: 16px; }

  .post {
    padding: 9px 0 38px;
  }

  .post-number,
  .post-name {
    font-size: 15px;
  }

  .device,
  .date {
    font-size: 13px;
  }

  .post-body {
    padding-right: 0;
    font-size: 16px;
    line-height: 1.6;
  }

  .post-controls {
    right: 0;
    bottom: 9px;
    gap: 14px;
    font-size: 14px;
  }

  .thread-actions {
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
  }

  .thread-actions button {
    min-width: 0;
    padding: 4px;
    font-size: 14px;
  }

  .edit-area {
    width: 100%;
    min-height: 130px;
    font-size: 16px;
  }
}


.admin-panel {
  width: min(100%, 520px);
  margin: 12px auto;
  padding: 12px;
  border: 1px solid #bbb;
  background: #fafafa;
  font-size: 14px;
  line-height: 1.6;
}

.admin-thread-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  margin: 0 0 12px;
  padding: 8px 10px;
  border: 1px solid #cfcfcf;
  background: #fafafa;
  font-size: 13px;
}

.admin-thread-tools button {
  min-height: 30px;
  padding: 3px 10px;
  font-size: 13px;
}

@media (max-width: 700px) {
  .admin-thread-tools { font-size: 12px; }
  .admin-thread-tools button { font-size: 12px; }
}


.admin-account-box {
  margin-top: 12px;
  padding: 12px 0 0;
  border-top: 1px solid #ddd;
}

.admin-account-box label {
  display: block;
  margin: 8px 0;
}

.admin-account-box input {
  width: 100%;
  max-width: 420px;
  padding: 7px;
  border: 1px solid #bbb;
  font: inherit;
}

.admin-account-box button {
  margin: 4px 6px 4px 0;
}

.small-admin-button {
  margin-top: 12px;
}


.recovery-active {
  border: 1px solid #999;
  background: #fff;
  padding: 12px;
}


.bbs-footer {
  width: min(100%, 320px);
  margin: 28px auto 0;
  padding-top: 14px;
  border-top: 1px solid #ddd;
  text-align: center;
  font-size: 13px;
  line-height: 1.8;
}

.bbs-footer a {
  display: block;
}

.bbs-footer .admin-link {
  font-size: 12px;
}


.image-picker-block {
  margin: 10px 0 12px;
}

.image-picker-block input[type="file"] {
  margin-top: 6px;
  padding: 5px 0;
  border: 0;
  background: transparent;
}

.image-preview-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.selected-image {
  position: relative;
  width: 110px;
  height: 82px;
  border: 1px solid #bbb;
  background: #f3f3f3;
}

.selected-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.image-remove {
  position: absolute;
  top: -7px;
  right: -7px;
  min-height: 0;
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 50%;
  background: #fff;
  font-size: 17px;
  line-height: 24px;
}


/* v27.7: edit attached images after posting */
.edit-image-section {
  width: calc(100% - 190px);
  margin: 14px 0 4px;
  padding: 12px;
  border: 1px solid #ddd;
  background: #fafafa;
}

.edit-image-title {
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
}

.edit-image-preview-list {
  margin-bottom: 8px;
}

.edit-existing-image,
.edit-new-image {
  overflow: visible;
}

.edit-image-removed img {
  opacity: .28;
  filter: grayscale(1);
}

.edit-image-badge {
  position: absolute;
  left: 4px;
  bottom: 4px;
  max-width: calc(100% - 8px);
  padding: 2px 5px;
  border: 1px solid #aaa;
  border-radius: 3px;
  background: rgba(255, 255, 255, .92);
  color: #555;
  font-size: 10px;
  line-height: 1.2;
}

.edit-image-add-badge {
  border-color: #9bb9a0;
  color: #35603d;
}

.edit-image-status {
  margin: 5px 0 7px;
  color: #555;
  font-size: 12px;
}

.edit-image-input {
  display: block;
  width: 100%;
  margin: 4px 0 6px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  font: inherit;
}

@media (max-width: 700px) {
  .edit-image-section {
    width: 100%;
  }
}

.post-images {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 190px 2px 0;
}

.post-images a {
  display: block;
  border: 1px solid #bbb;
  background: #f7f7f7;
}

.post-images img {
  display: block;
  width: auto;
  height: auto;
  max-width: 220px;
  max-height: 180px;
  object-fit: contain;
}

.retention-note {
  margin: 12px 0 0;
  font-size: 10px;
  color: #888;
}

@media (max-width: 700px) {
  .selected-image {
    width: 92px;
    height: 72px;
  }

  .post-images {
    margin-right: 0;
  }

  .post-images img {
    max-width: min(42vw, 170px);
    max-height: 150px;
  }
}


.deleted-log-list {
  margin-top: 12px;
}

.deleted-log-item {
  padding: 10px 0;
  border-top: 1px solid #ddd;
}

.deleted-log-head {
  font-weight: bold;
  font-size: 13px;
}

.deleted-log-body {
  margin: 7px 0;
  padding: 8px;
  background: #fff;
  border: 1px solid #e2e2e2;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 160px;
  overflow: auto;
}


.thread-actions-top {
  margin-top: 10px;
  margin-bottom: 12px;
}

.thread-back-bottom {
  padding: 18px 0 8px;
  font-size: 15px;
}


/* v10: title/body hierarchy and the action bar between post 1 and post 2 */
.thread-title-row {
  margin: 8px 0 14px;
}

.thread-title-row > div {
  margin-top: 0;
}

.thread-title-link {
  font-size: var(--thread-title-font-size);
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.post {
  padding-top: 12px;
}

.post-head {
  margin-bottom: 7px;
  line-height: 1.45;
}

.post-number,
.post-name {
  font-size: var(--post-meta-font-size);
  font-weight: 500;
}

.device {
  margin-left: 7px;
  font-size: var(--post-meta-font-size);
  font-weight: 400;
}

.date {
  margin-top: 1px;
  font-size: var(--post-meta-font-size);
  color: #555;
}

.post-body {
  margin-top: 6px;
  font-size: var(--post-body-font-size);
  line-height: 1.7;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.post-before-inline-actions {
  border-bottom: 0;
  padding-bottom: 24px;
}

.thread-actions-inline {
  margin: 0 0 8px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

@media (max-width: 700px) {
  .thread-title-row {
    margin: 6px 0 11px;
  }

  .thread-title-link {
    font-size: var(--thread-title-font-size-mobile);
    line-height: 1.4;
  }

  .post-number,
  .post-name {
    font-size: var(--post-meta-font-size-mobile);
  }

  .device,
  .date {
    font-size: var(--post-meta-font-size-mobile);
  }

  .post-body {
    margin-top: 5px;
    font-size: var(--post-body-font-size-mobile);
    line-height: 1.65;
    font-weight: 500;
  }

  .post-before-inline-actions {
    padding-bottom: 18px;
  }

  .thread-actions-inline {
    margin-bottom: 7px;
    padding: 11px 0;
  }
}


/* v12: long posts, spoiler, quotes and response anchors */
.compose-help {
  margin: -2px 0 12px;
  color: #666;
  font-size: 12px;
  line-height: 1.65;
}

.compose-help code {
  font-family: Consolas, "Courier New", monospace;
  color: #333;
}

.body-line {
  min-height: 1.55em;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.blank-line {
  min-height: 1.2em;
}

.quote-line {
  margin: 2px 0;
  padding-left: 9px;
  border-left: 3px solid #b7d6b7;
  color: #087308;
}

.post-anchor-link {
  font-weight: 600;
}

.more-toggle,
.spoiler-toggle {
  min-height: 0;
  margin: 7px 0 3px;
  padding: 1px 2px;
  border: 0;
  background: transparent;
  color: var(--link);
  font-size: 0.82em;
  line-height: 1.5;
}

.more-toggle:hover,
.spoiler-toggle:hover {
  background: transparent;
  text-decoration: underline;
}

.post-more {
  margin-top: 3px;
}

.spoiler-box {
  margin: 5px 0;
}

.spoiler-content {
  margin: 4px 0 7px;
  padding: 7px 10px;
  border-left: 3px solid #bbb;
  background: #f7f7f7;
}

.anchor-highlight {
  animation: anchorFlash 1.8s ease-out;
}

@keyframes anchorFlash {
  0%, 35% { background: #fff4a8; }
  100% { background: transparent; }
}

.edit-help {
  margin-top: 5px;
  color: #666;
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 700px) {
  .compose-help,
  .edit-help {
    font-size: 11px;
  }

  .quote-line {
    padding-left: 7px;
  }

  .spoiler-content {
    padding: 6px 8px;
  }
}


/* v13: public-facing cleanup */
.status.admin-status {
  width: max-content;
  max-width: 320px;
  margin: 0 0 8px auto;
  padding: 2px 7px;
  border: 1px solid #ddd;
  background: #fafafa;
  color: #666;
  font-size: 11px;
}

.bbs-header .title {
  font-weight: 700;
}

.bbs-footer {
  margin-top: 24px;
}

.retention-note {
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}


/* v15: light anti-spam helpers */
.honeypot {
  position: absolute !important;
  left: -99999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.spam-note {
  margin: 8px 0 0;
  color: #666;
  font-size: 12px;
  line-height: 1.6;
}

.spam-note.warning {
  color: #9b1c1c;
}

@media (max-width: 700px) {
  .spam-note {
    font-size: 11px;
  }
}


/* v16: basic settings display */
.board-description {
  margin-top: 5px;
  color: #666;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.top-notice {
  width: min(100%, 520px);
  margin: 12px auto 0;
  padding: 9px 11px;
  border: 1px solid #ddd;
  background: #fafafa;
  color: #444;
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

@media (max-width: 700px) {
  .board-description { font-size: 11px; }
  .top-notice {
    width: min(100%, 360px);
    font-size: 12px;
  }
}


/* v19: configurable reading font sizes */


/* v20: operation settings */
.operation-notice {
  width: min(100%, 520px);
  margin: 10px auto 0;
  padding: 9px 11px;
  border: 1px solid #e0c88a;
  background: #fffaf0;
  color: #654b00;
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.thread-operation-notice {
  width: min(100%, 720px);
  margin: 0 0 14px;
}

.disabled-link {
  color: #888;
  text-decoration: none;
}

.thread-list-limit-note {
  padding: 9px 4px;
  color: #777;
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
  border-top: 1px solid #eee;
}

@media (max-width: 700px) {
  .operation-notice {
    width: min(100%, 360px);
    font-size: 12px;
  }
  .thread-operation-notice {
    width: 100%;
  }
}

/* v21: thread reading / NEW / unread */
.thread-new-badge,
.thread-unread-badge {
  display: inline-block;
  margin-left: 7px;
  font-size: 11px;
  line-height: 1.25;
  vertical-align: middle;
}

.thread-new-badge {
  color: #c40000;
  font-weight: 700;
}

.thread-unread-badge {
  color: #174d9b;
  font-weight: 700;
}

.thread-pager {
  margin: 10px 0 14px;
  padding: 9px 0;
  border-top: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
  font-size: 13px;
}

.thread-pager-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: center;
}

.thread-pager-controls button,
.thread-pager-jump button {
  min-height: 32px;
  padding: 4px 10px;
  font-size: 13px;
}

.thread-pager-status {
  min-width: 150px;
  text-align: center;
  color: #444;
}

.thread-pager-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
}

.thread-pager-jump input {
  width: 100px;
  padding: 6px 7px;
  border: 1px solid #bbb;
  font: inherit;
}

.thread-search-empty {
  padding: 18px 0;
  color: #666;
  font-size: 13px;
}

@media (max-width: 700px) {
  .thread-pager {
    font-size: 12px;
  }

  .thread-pager-controls {
    gap: 4px;
  }

  .thread-pager-controls button,
  .thread-pager-jump button {
    min-height: 30px;
    padding: 3px 7px;
    font-size: 12px;
  }

  .thread-pager-status {
    flex-basis: 100%;
    order: -1;
    min-width: 0;
    margin-bottom: 2px;
  }

  .thread-pager-jump input {
    width: 88px;
  }
}


/* v22 age / sage */
.reply-form .sage-option {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 2px;
  cursor: pointer;
}

.reply-form .sage-option input[type="checkbox"] {
  width: auto;
  margin: 0;
  padding: 0;
}

.sage-help {
  margin: 0 0 12px;
  color: #666;
  font-size: 12px;
  line-height: 1.55;
}


/* v23: 管理人固定スレッド */
.thread-pinned-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 0 4px;
  border: 1px solid #777;
  background: #f5f5f5;
  color: #333;
  font-size: 0.78em;
  font-weight: 700;
  line-height: 1.35;
  vertical-align: 0.08em;
}
\n\n/* v24: access counter / analytics */\n.rom-counter {\n  margin-top: 5px;\n  font-size: 13px;\n  color: #555;\n}\n\n.public-access-stats {\n  margin: 14px 0 10px;\n  padding: 8px 0;\n  border-top: 1px solid #ddd;\n  border-bottom: 1px solid #ddd;\n  font-size: 13px;\n  line-height: 1.75;\n}\n\n.access-stat-line {\n  min-height: 1.4em;\n}\n\n.access-admin-summary {\n  display: grid;\n  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));\n  gap: 8px;\n  margin: 12px 0 18px;\n}\n\n.access-admin-metric {\n  border: 1px solid #d8d8d8;\n  border-radius: 6px;\n  padding: 10px;\n  background: #fafafa;\n}\n\n.access-admin-metric span,\n.access-admin-metric strong {\n  display: block;\n}\n\n.access-admin-metric span {\n  font-size: 12px;\n  color: #666;\n}\n\n.access-admin-metric strong {\n  margin-top: 3px;\n  font-size: 18px;\n}\n\n.access-admin-list {\n  margin-bottom: 18px;\n  border-top: 1px solid #e1e1e1;\n}\n\n.access-admin-row {\n  display: flex;\n  justify-content: space-between;\n  gap: 14px;\n  padding: 7px 2px;\n  border-bottom: 1px solid #e9e9e9;\n}\n\n.access-admin-row > :first-child {\n  min-width: 0;\n  overflow-wrap: anywhere;\n}\n\n.access-admin-row strong {\n  white-space: nowrap;\n}\n\n.access-admin-breakdowns {\n  display: grid;\n  grid-template-columns: repeat(2, minmax(0, 1fr));\n  gap: 18px;\n}\n\n@media (max-width: 640px) {\n  .access-admin-breakdowns {\n    grid-template-columns: 1fr;\n    gap: 0;\n  }\n}\n
/* v26: longform threads */
.compose-panel select {
  width: 100%;
  padding: 8px;
  border: 1px solid #bbb;
  background: #fff;
  font: inherit;
}

.compose-help,
.edit-help {
  white-space: pre-line;
}

.compose-help-inline {
  display: block;
  margin-top: 4px;
  color: #777;
  font-size: 11px;
  line-height: 1.5;
}

.thread-longform-badge,
.thread-type-badge {
  display: inline-block;
  padding: 1px 5px;
  border: 1px solid #d9a8b8;
  border-radius: 999px;
  background: #fff4f7;
  color: #8a3f59;
  font-size: 0.72em;
  font-weight: 700;
  line-height: 1.45;
  vertical-align: 0.1em;
}

.thread-longform-badge {
  margin-left: 6px;
}

.thread-type-badge {
  margin-right: 8px;
}

.longform-thread-view .thread-title-row,
.longform-thread-view .admin-thread-tools,
.longform-thread-view .thread-operation-notice,
.longform-thread-view .thread-pager,
.longform-thread-view #posts,
.longform-thread-view > .rule-group,
.longform-thread-view > .thread-actions,
.longform-thread-view .reply-form,
.longform-thread-view .thread-search-panel,
.longform-thread-view .thread-back-bottom {
  width: min(100%, 780px);
  margin-left: auto;
  margin-right: auto;
}

.longform-thread-view .thread-title-row {
  margin-top: 20px;
  margin-bottom: 26px;
  padding-bottom: 18px;
  border-bottom: 1px solid #ececec;
}

.longform-thread-view .thread-title-main {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px;
}

.longform-thread-view .thread-title-link {
  color: #171717;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "Times New Roman", serif;
  font-size: 34px;
  line-height: 1.3;
  letter-spacing: 0;
  text-decoration: none;
}

.longform-thread-view .thread-title-link:hover {
  text-decoration: none;
}

.longform-post {
  max-width: 780px;
  margin: 0 auto 54px;
  padding: 0 0 42px;
  border-bottom: 1px solid #e5e5e5;
}

.longform-post:last-of-type {
  margin-bottom: 30px;
}

.longform-post-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: #777;
}

.longform-post-head .date,
.longform-post-head .post-number {
  margin: 0;
  color: #777;
  font-size: 13px;
  font-weight: 400;
}

.longform-post-head .post-number {
  text-decoration: none;
}

.longform-post-body {
  margin-top: 0;
  padding-right: 0;
  color: #222;
  font-size: 18px;
  line-height: 1.85;
  font-weight: 400;
  letter-spacing: 0.012em;
}

.longform-paragraph {
  margin: 0 0 1.45em;
}

.longform-heading {
  color: #161616;
  font-weight: 700;
  letter-spacing: 0;
}

.longform-heading-2 {
  margin: 2.3em 0 0.85em;
  padding-bottom: 0.38em;
  border-bottom: 1px solid #e4e4e4;
  font-size: 1.45em;
  line-height: 1.45;
}

.longform-heading-3 {
  margin: 1.9em 0 0.7em;
  font-size: 1.17em;
  line-height: 1.5;
}

.longform-strong {
  font-weight: 750;
  color: #111;
}

.longform-list {
  margin: 0.4em 0 1.55em 1.35em;
  padding: 0;
}

.longform-list li {
  margin: 0.38em 0;
  padding-left: 0.18em;
}

.longform-quote {
  margin: 1.35em 0 1.55em;
  padding: 0.75em 1em;
  border-left: 4px solid #b8b8b8;
  background: #f7f7f7;
  color: #4c4c4c;
}

.longform-color-box {
  margin: 1.55em 0;
  padding: 16px 18px 3px;
  border: 1px solid transparent;
  border-left-width: 5px;
  border-radius: 8px;
}

.longform-color-box .longform-paragraph:last-child,
.longform-color-box .longform-list:last-child,
.longform-color-box .longform-quote:last-child {
  margin-bottom: 1em;
}

.longform-pink {
  border-color: #e9b7c6;
  border-left-color: #d97998;
  background: #fff3f7;
}

.longform-blue {
  border-color: #b7d8eb;
  border-left-color: #62a9d0;
  background: #f2f9fd;
}

.longform-yellow {
  border-color: #ead7a0;
  border-left-color: #d7a833;
  background: #fffaf0;
}

.longform-gray {
  border-color: #d5d5d5;
  border-left-color: #9a9a9a;
  background: #f7f7f7;
}

.longform-spoiler-box {
  margin: 1.4em 0;
}

.longform-thread-view .post-images {
  margin: 18px 0 4px;
  gap: 10px;
}

.longform-thread-view .post-images img {
  max-width: min(100%, 520px);
  max-height: 420px;
}

.longform-post .post-controls {
  position: static;
  justify-content: flex-end;
  margin-top: 18px;
  gap: 16px;
  font-size: 13px;
}

.longform-thread-view .thread-actions-inline {
  margin-top: -10px;
  margin-bottom: 34px;
}

.longform-public-actions {
  grid-template-columns: repeat(3, minmax(120px, 210px));
}

@media (max-width: 700px) {
  .longform-thread-view .thread-title-row {
    margin-top: 10px;
    margin-bottom: 20px;
    padding-bottom: 14px;
  }

  .longform-thread-view .thread-title-link {
    font-size: 24px;
    line-height: 1.45;
  }

  .longform-post {
    margin-bottom: 38px;
    padding-bottom: 32px;
  }

  .longform-post-head {
    margin-bottom: 14px;
  }

  .longform-post-head .date,
  .longform-post-head .post-number {
    font-size: 12px;
  }

  .longform-post-body {
    font-size: 17px;
    line-height: 1.82;
  }

  .longform-heading-2 {
    margin-top: 2em;
    font-size: 1.32em;
  }

  .longform-heading-3 {
    font-size: 1.12em;
  }

  .longform-color-box {
    margin: 1.35em 0;
    padding: 13px 14px 2px;
    border-left-width: 4px;
    border-radius: 7px;
  }

  .longform-thread-view .post-images img {
    max-width: 100%;
    max-height: 320px;
  }

  .longform-public-actions {
    grid-template-columns: repeat(3, 1fr);
  }
}


/* v27.1: simple blog-like longform card library */
.longform-thread-view.longform-index-mode .thread-title-row,
.longform-thread-view.longform-index-mode .admin-thread-tools,
.longform-thread-view.longform-index-mode .thread-operation-notice,
.longform-thread-view.longform-index-mode #posts,
.longform-thread-view.longform-index-mode > .rule-group,
.longform-thread-view.longform-index-mode > .thread-actions,
.longform-thread-view.longform-index-mode .reply-form,
.longform-thread-view.longform-index-mode .thread-search-panel,
.longform-thread-view.longform-index-mode .thread-back-bottom {
  width: min(100%, 1120px);
}

.longform-thread-view.longform-index-mode .thread-title-row {
  margin-top: 24px;
  margin-bottom: 22px;
}

.longform-thread-view.longform-index-mode .thread-title-main {
  align-items: center;
  gap: 10px;
}

.longform-thread-view.longform-index-mode .thread-title-link {
  font-size: 52px;
}

.longform-thread-view.longform-index-mode #posts {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.longform-library-head {
  display: block;
  margin-bottom: 14px;
}

.longform-library-title {
  margin: 0 0 8px;
  color: #181818;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.35;
}

.longform-library-note {
  margin: 6px 0 0;
  color: #666;
  font-size: 15px;
  line-height: 1.85;
}

.longform-new-entry-button {
  flex: 0 0 auto;
  min-width: 252px;
  min-height: 54px;
  padding: 12px 20px;
  border: 1px solid #e6789f;
  border-radius: 8px;
  background: linear-gradient(180deg, #f05f91, #ea4d84);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 8px 16px rgba(227, 89, 137, 0.18);
}

.longform-new-entry-button:hover {
  background: linear-gradient(180deg, #f26f9d, #ec588c);
}

.longform-card-list {
  display: grid;
  gap: 18px;
}

.longform-card {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  min-height: 196px;
  padding: 22px;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.longform-card:hover {
  transform: translateY(-1px);
  border-color: #d9d9d9;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  text-decoration: none;
}

.longform-card-thumb {
  position: relative;
  width: 100%;
  min-height: 156px;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid #ececec;
  background: #fff;
}


.longform-card-thumb.is-empty {
  background: #fff;
  border-color: #e5e5e5;
}

.longform-card-thumb.is-empty .longform-card-placeholder {
  background: #fff;
}

.longform-card-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 156px;
  object-fit: cover;
}

.longform-card-placeholder {
  position: absolute;
  inset: 0;
  display: block;
}

.longform-card-content {
  min-width: 0;
  align-self: center;
}

.longform-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 10px;
  color: #6f6f6f;
  font-size: 14px;
  font-weight: 600;
}

.longform-card-type {
  display: none;
}

.longform-card-new {
  color: #df4a81;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.longform-card-title {
  margin: 0 0 10px;
  color: #212121;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "Times New Roman", serif;
  font-size: 28px;
  line-height: 1.35;
}

.longform-card-summary {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #5d5d5d;
  font-size: 17px;
  line-height: 1.8;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.longform-card-pager {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  padding: 16px 0 6px;
  border-top: 1px solid #ececec;
}

.longform-card-pager button {
  justify-self: start;
  min-height: 40px;
  padding: 8px 13px;
  border: 1px solid #dfdfdf;
  border-radius: 8px;
  background: #fff;
  color: #575757;
}

.longform-card-pager button:last-child {
  justify-self: end;
}

.longform-card-pager button:disabled {
  opacity: 0.35;
  cursor: default;
}

.longform-card-pager span {
  color: #777;
  font-size: 13px;
}

.longform-library-empty {
  padding: 42px 24px;
  border: 1px dashed #d9d9d9;
  border-radius: 10px;
  background: #fafafa;
  color: #666;
  text-align: center;
}

.longform-thread-view.longform-detail-mode #posts {
  width: min(100%, 820px);
}

.longform-detail-topnav {
  margin: 0 0 24px;
}

.longform-back-link {
  color: #666;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.longform-back-link:hover {
  text-decoration: underline;
}

.longform-detail-article {
  margin-bottom: 24px;
}

.longform-article-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  margin: 28px 0 10px;
  padding: 18px 0 4px;
  border-top: 1px solid #e5e5e5;
  font-size: 13px;
}

.longform-article-nav a,
.longform-nav-disabled {
  color: #666;
  text-decoration: none;
}

.longform-article-nav > :last-child {
  justify-self: end;
  text-align: right;
}

.longform-nav-index {
  justify-self: center;
  padding: 6px 14px;
  border: 1px solid #e0e0e0;
  border-radius: 999px;
  background: #fff;
}

.longform-nav-disabled {
  opacity: 0.35;
}

@media (max-width: 900px) {
  .longform-thread-view.longform-index-mode .thread-title-link {
    font-size: 42px;
  }

  .longform-card {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 20px;
  }

  .longform-card-thumb,
  .longform-card-thumb img {
    min-height: 138px;
  }

  .longform-card-title {
    font-size: 24px;
  }

  .longform-card-summary {
    font-size: 15px;
  }
}

@media (max-width: 700px) {
  .longform-thread-view.longform-index-mode .thread-title-link {
    font-size: 34px;
  }

  .longform-library-head {
    display: block;
    margin-bottom: 18px;
  }

  .longform-library-title {
    font-size: 22px;
  }

  .longform-library-note {
    font-size: 14px;
  }

  .longform-new-entry-button {
    width: 100%;
    min-width: 0;
    margin-top: 14px;
  }

  .longform-card {
    grid-template-columns: 1fr;
    gap: 14px;
    min-height: 0;
    padding: 14px;
  }

  .longform-card-thumb,
  .longform-card-thumb img {
    min-height: 170px;
    max-height: 220px;
  }

  .longform-card-title {
    font-size: 21px;
  }

  .longform-card-summary {
    font-size: 14px;
    line-height: 1.75;
  }

  .longform-card-pager {
    gap: 7px;
  }

  .longform-card-pager button {
    padding: 7px 9px;
    font-size: 11px;
  }

  .longform-article-nav {
    gap: 8px;
    font-size: 11px;
  }
}


/* v27.9: image lightbox */
body.image-lightbox-open {
  overflow: hidden;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(0, 0, 0, .82);
}

.image-lightbox.hidden {
  display: none;
}

.image-lightbox-dialog {
  width: min(96vw, 1440px);
  max-height: 96vh;
}

.image-lightbox-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-height: 42px;
  color: #fff;
  font-size: 13px;
}

.image-lightbox-toolbar [data-lightbox-count] {
  margin-right: auto;
}

.image-lightbox-toolbar a {
  color: #fff;
  text-decoration: underline;
}

.image-lightbox-close,
.image-lightbox-nav {
  border: 1px solid rgba(255, 255, 255, .7);
  background: rgba(20, 20, 20, .72);
  color: #fff;
  cursor: pointer;
}

.image-lightbox-close {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  font-size: 25px;
  line-height: 34px;
}

.image-lightbox-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
}

.image-lightbox-stage img {
  display: block;
  max-width: 94vw;
  max-height: calc(96vh - 58px);
  object-fit: contain;
  background: #fff;
  box-shadow: 0 4px 24px rgba(0, 0, 0, .35);
}

.image-lightbox-nav {
  position: absolute;
  top: 50%;
  z-index: 1;
  width: 46px;
  height: 58px;
  padding: 0;
  transform: translateY(-50%);
  border-radius: 6px;
  font-size: 36px;
  line-height: 48px;
}

.image-lightbox-prev {
  left: 8px;
}

.image-lightbox-next {
  right: 8px;
}

.image-lightbox-nav:disabled {
  opacity: .25;
  cursor: default;
}

@media (max-width: 700px) {
  .image-lightbox {
    padding: 8px;
  }

  .image-lightbox-dialog {
    width: 100%;
  }

  .image-lightbox-toolbar {
    gap: 8px;
    font-size: 12px;
  }

  .image-lightbox-stage img {
    max-width: 96vw;
    max-height: calc(100vh - 72px);
  }

  .image-lightbox-nav {
    width: 40px;
    height: 52px;
    font-size: 32px;
  }

  .image-lightbox-prev {
    left: 4px;
  }

  .image-lightbox-next {
    right: 4px;
  }
}
