/* World4ch 1.2 - intentionally old-fashioned 2ch/world2ch-inspired text BBS.
   No gradients, shadows, hero blocks, cards, webfonts, icons or JavaScript.
   A 120px BBS menu + simple document content instead of deprecated frames. */
html { color-scheme: light; }
body {
  margin: 0;
  padding: 0;
  color: #111;
  background: #efefef;
  font: 13px/1.35 "MS PGothic", "ＭＳ Ｐゴシック", "MS Gothic", Osaka, Arial, sans-serif;
}
a, a:link { color: #0000cc; text-decoration: underline; }
a:visited { color: #551a8b; }
a:hover { color: #cc0000; }
a:focus-visible, input:focus-visible, textarea:focus-visible, button:focus-visible {
  outline: 2px solid #0000bb;
  outline-offset: 1px;
}
h1, h2, h3, h4 { line-height: 1.22; }
h1 { font-size: 23px; margin: 13px 0 10px; }
h2 { font-size: 18px; margin: 13px 0 8px; }
h3 { font-size: 15px; margin: 12px 0 4px; }
p { margin: 8px 0; }
hr { height: 0; border: 0; border-top: 1px solid #888; margin: 14px 0; }
small { font-size: 11px; }
input, textarea, button { font: 13px "MS PGothic", "ＭＳ Ｐゴシック", Arial, sans-serif; }
button { cursor: pointer; }
input, textarea { max-width: 100%; box-sizing: border-box; }
textarea { vertical-align: top; resize: vertical; }
code { font-family: monospace; font-size: 12px; }
/* The reference used a frameset cols="120,*".  We retain the exact visual split
   without frames, so URLs/history/post anchors keep working. */
.site-shell { display: grid; grid-template-columns: 120px minmax(0, 1fr); min-height: 100vh; }
.bbs-menu {
  box-sizing: border-box;
  border-right: 1px solid #999;
  background: #e1e1e1;
  padding: 4px 5px 12px;
  overflow-wrap: anywhere;
  font-size: 12px;
}
.menu-site { font-size: 14px; margin: 6px 0 8px; font-weight: bold; text-align: center; }
.sidebar-caption { text-align: center; font-weight: bold; margin: 7px 0 8px; border-bottom: 1px solid #aaa; }
.sidebar-section { margin: 12px 0 4px; background: #c9c9c9; color: #333; font-weight: bold; padding: 2px 3px; }
.sidebar-links a { display: block; margin: 2px 0; padding: 0 1px; line-height: 1.3; }
.sidebar-links a.active { color: #111; font-weight: bold; }
.sidebar-copyright { border-top: 1px solid #bbb; margin-top: 22px; padding-top: 5px; font-size: 10px; color: #555; }
.bbs-content { min-width: 0; display: flex; flex-direction: column; }
.site-header { margin: 0; padding: 8px 12px 5px; border-bottom: 1px solid #c2c2c2; background: #f5f5f5; font-size: 12px; }
.main-container { padding: 10px 18px 30px; flex: 1; overflow-wrap: anywhere; }
.site-footer { font-size: 11px; text-align: center; padding: 3px 18px 10px; }
.site-footer hr { border-top: 1px solid #aaa; }
.site-footer p { color: #555; }
/* Front page: old BBS welcome, plain link directory, and update bulletin. */
.home-top { text-align: center; margin: 14px 0 22px; }
.home-top h1 { font-size: 29px; color: #006000; margin: 4px 0; }
.home-top p { margin: 5px 0; }
.bbs-welcome { text-align: center; margin: 12px 0 20px; }
.bbs-welcome h2 { color: #006000; }
.home-directory { max-width: 830px; margin: 15px auto 24px; }
.home-directory h2 { text-align: center; }
.home-directory h3 { color: #333; }
.home-directory ul { margin: 6px 0 16px 15px; padding: 0 0 0 18px; }
.home-directory li { margin: 5px 0; }
.home-directory small { color: #555; }
.bbs-news { max-width: 830px; margin: 18px auto 36px; }
.bbs-news h2 { font-size: 18px; }
/* Board index: thread list first, plain text excerpts, no cards. */
.board-heading h1 { font-size: 23px; color: #006000; }
.board-heading p { margin: 6px 0; }
.thread-index { padding: 5px 0; line-height: 1.55; }
.thread-card { margin: 13px 0 20px; padding: 0 0 12px; border-bottom: 1px dotted #aaa; }
.thread-card h2 { font-size: 17px; color: #a00000; margin: 5px 0 10px; font-weight: bold; }
.thread-card h2 a, .thread-card h2 a:visited { color: #a00000; }
.thread-card h2 small { font-weight: normal; font-size: 12px; color: #555; }
.lock-label { color: #a00000 !important; font-weight: bold !important; }
.post { margin: 8px 0 12px; padding: 0; background: transparent; border: 0; }
.post-header { font-size: 13px; line-height: 1.35; }
.post-number { font-weight: normal; padding-right: 3px; }
.post-prefix { color: #111; }
.poster-name { color: #008000; font-weight: bold; }
.post-date { color: #444; }
.post-permalink { font-size: 11px; padding-left: 5px; }
.post-message { margin: 3px 0 10px 30px; font-size: 13px; line-height: 1.42; white-space: normal; overflow-wrap: anywhere; }
.quotelink, .quotelink:visited { color: #0000cc; }
.greentext { color: #008000; }
.read-more { margin: 4px 0 6px 30px; }
.thread-links { padding-left: 28px; font-size: 12px; }
.full-thread { padding: 3px 0 10px; }
.full-thread .post { margin: 10px 0 15px; }
.breadcrumbs { margin: 5px 0 14px; }
.thread-title { font-size: 20px; color: #a00000; }
.thread-info { font-size: 12px; }
.pagination { text-align: center; padding: 13px 0; font-size: 13px; }
.locked-notice { margin: 14px 0; color: #a00000; }
/* Forms deliberately look like browser-native BBS input tables. */
.composer { margin: 12px 0 24px; padding: 0; background: transparent; border: 0; max-width: 850px; }
.composer h2 { margin: 0 0 10px; font-size: 17px; color: #006000; }
.post-form { border-collapse: separate; border-spacing: 4px 5px; font-size: 13px; }
.post-form th { text-align: right; vertical-align: top; padding: 4px 5px; white-space: nowrap; font-weight: normal; }
.post-form td { vertical-align: top; }
.post-form input { width: auto; max-width: min(100%, 450px); }
.post-form textarea { width: min(100%, 650px); min-height: 100px; }
.post-form small { display: inline-block; color: #555; padding-left: 5px; }
.trap { display: none !important; }
/* Existing admin.php classes share this primitive theme. */
.page-heading { margin: 4px 0 13px; }
.page-heading h1 { color: #006000; }
.page-heading p { margin: 4px 0; }
.heading-aside { color: #555; }
.section-title { margin: 18px 0 9px; padding: 0 0 3px; border-bottom: 1px solid #888; }
.section-title h2 { font-size: 17px; margin: 2px 0 5px; }
.section-title span { color: #555; font-size: 11px; }
.composer-title { margin: 10px 0; }
.composer-title h2 { display: inline-block; margin-right: 10px; }
.composer-title span { font-size: 11px; color: #555; }
.composer label { display: block; margin: 7px 0; }
.composer label input, .composer label textarea { display: block; margin: 2px 0 7px; padding: 2px 3px; }
.composer .form-row { display: block; }
.composer-bottom { margin: 6px 0; }
.composer-bottom > span { margin-right: 8px; color: #555; font-size: 11px; }
.button-primary, .button-secondary, .button-danger { font-size: 13px; color: #111; padding: 2px 8px; background: #e5e5e5; border: 2px outset #dedede; text-decoration: none; display: inline-block; border-radius: 0; box-shadow: none; }
.button-danger { color: #8b0000; }
.button-primary:hover, .button-secondary:hover, .button-danger:hover { background: #ddd; }
.form-error, .destructive-warning { color: #8b0000; }
.flash, .notice { border: 1px solid #aaa; background: #ffffee; padding: 7px 9px; }
.admin-top-row { margin: 8px 0 18px; }
.admin-top-row form { display: inline; }
.admin-login { max-width: 400px; }
.admin-login input { width: min(100%, 360px); }
.moderation-item { border-bottom: 1px dotted #aaa; padding: 9px 0; }
.moderation-summary p { margin: 5px 0; white-space: pre-wrap; }
.moderation-summary small { color: #555; }
.mod-line span { margin: 0 5px; }
.mod-buttons { margin: 5px 0; display: flex; gap: 7px; }
.mod-buttons form { margin: 0; }
.confirm-delete { border: 1px solid #a00; padding: 8px; margin: 12px 0; }
.confirm-actions { display: flex; gap: 6px; }
.empty-state { padding: 12px 0; }
.empty-state h3 { margin: 5px 0; }
/* Only the navigation changes on narrow screens; text, links and forms remain native. */
@media (max-width: 600px) {
  .site-shell { display: block; min-height: 100vh; }
  .bbs-menu { border-right: 0; border-bottom: 1px solid #aaa; padding: 5px 8px; }
  .menu-site, .sidebar-caption, .sidebar-section, .sidebar-copyright { display: none; }
  .sidebar-links { display: inline; }
  .sidebar-links a { display: inline-block; margin: 1px 6px 1px 0; }
  .site-header { display: none; }
  .main-container { padding: 8px 9px 20px; }
  .home-directory small { display: block; }
  .post-message { margin-left: 13px; }
  .post-form { max-width: 100%; width: 100%; }
  .post-form th { padding: 3px; }
  .post-form td { width: 100%; }
  .post-form input, .post-form textarea { width: 100%; min-width: 0; }
  .post-form small { padding: 5px 0 0; }
}
