/* GENESIS archive — styled after the FM TOWNS "GENESIS ver 1.4" viewer on the Fujitsu Habitat CD.
   Menu: olive panel, double green border, cyan GENESIS title. Text view: white on black. */
:root {
  --olive: #808000;
  --frame: #005800;
  --frame-hi: #00a000;
  --cyan: #00ffff;
  --green: #00ff00;
  --yellow: #ffff00;
  --white: #f2f2f2;
  --grey: #808080;
  --dim: #8a8a8a;
  --black: #000;
  --mono: "MS Gothic", "ＭＳ ゴシック", "Osaka-Mono", "Noto Sans Mono CJK JP", "Noto Sans JP",
          "Source Han Code JP", "BIZ UDGothic", "IPAGothic", "VL Gothic", monospace;
}
* { box-sizing: border-box; }
html { background: var(--black); }
body {
  margin: 0;
  color: var(--white);
  background: var(--black);
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: none;
}
a { color: var(--cyan); }
a:visited { color: #6fd6d6; }

/* ---------- language switching (body.lang-ja | lang-en | lang-both) ---------- */
body.lang-ja .en, body.lang-en .ja { display: none; }
body.lang-both .hdr .ja + .en::before,
body.lang-both .pagetitle .ja + .en::before,
body.lang-both .room .ja + .en::before,
body.lang-both .day .ja + .en::before,
body.lang-both .tabs .ja + .en::before { content: " / "; color: var(--grey); }
body.lang-both .menu .ja + .en::before { content: "\A"; white-space: pre; }
body.lang-both .menu .en { color: #e0e0a0; font-size: .85em; }

/* ---------- top bar (window chrome) ---------- */
.bar {
  position: sticky; top: 0; z-index: 10;
  display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; justify-content: space-between;
  padding: .4rem .8rem;
  background: var(--olive);
  border-bottom: 4px double var(--frame);
  box-shadow: 0 2px 0 var(--black);
}
.tabs { display: flex; flex-wrap: wrap; gap: .3rem; }
.tabs a {
  color: var(--white); text-decoration: none; padding: .15rem .55rem;
  border: 1px solid var(--frame); background: rgba(0,0,0,.15);
}
.tabs a small { color: #e8e8b0; font-size: .75em; }
.tabs a:hover { background: rgba(0,0,0,.35); }
.tabs a[aria-current] { background: var(--black); color: var(--yellow); border-color: var(--frame-hi); }
.tabs a.menu { color: var(--cyan); font-weight: bold; letter-spacing: .15em; }
.controls { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.lang-switch { display: inline-flex; border: 2px solid var(--frame); }
.lang-switch button {
  font: inherit; font-size: .85em; cursor: pointer;
  background: var(--black); color: var(--white); border: 0; padding: .2rem .6rem;
}
.lang-switch button + button { border-left: 1px solid var(--frame); }
.lang-switch button[aria-checked="true"] { background: var(--cyan); color: var(--black); font-weight: bold; }
.staff-switch { cursor: pointer; font-size: .9em; }
.staff-switch input { accent-color: var(--yellow); }

/* ---------- text screen ---------- */
.screen { max-width: 62rem; margin: 0 auto; padding: 1rem 1rem 4rem; }
.pagetitle { font-size: 1.15rem; color: var(--cyan); font-weight: normal; letter-spacing: .1em; }
.room {
  font-size: 1rem; font-weight: normal; color: var(--black); background: var(--olive);
  padding: .3rem .6rem; border: 4px double var(--frame); margin: 2rem 0 1rem;
}
.room small { color: #202000; }
.day {
  font-size: 1.05rem; font-weight: bold; color: var(--green);
  margin: 2.6rem 0 1.2rem; padding: .35rem 0; text-align: center; letter-spacing: .08em;
  border-top: 1px solid #0a5a0a; border-bottom: 1px solid #0a5a0a;
  background: linear-gradient(90deg, transparent, rgba(0,255,0,.07) 30%, rgba(0,255,0,.07) 70%, transparent);
  text-shadow: 0 0 6px rgba(0,255,0,.35);
}
.post + .post, .post + .vol-anchor + .post { border-top: 1px solid #1c1c1c; padding-top: 1.6rem; }
.post { margin: 0 0 1.6rem; padding-left: .8rem; border-left: 4px solid transparent; scroll-margin-top: 5rem; }
.post:target { background: #0d1a1a; outline: 1px dashed var(--cyan); }
.hdr { white-space: pre-wrap; word-break: break-all; }
.hdr .l1 { color: var(--white); }
.hdr .l2 { color: var(--white); }
.hdr .nid { color: #c8c8c8; }
.body {
  white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere;
  margin: 1.1rem 0 .6rem;
}
.body.en { font-family: "Courier Prime", "Courier New", var(--mono); }
.body.pending { color: var(--dim); }
.pend, .tnote { display: block; color: #d0b060; font-size: .85em; margin-bottom: .4rem; }
.tnote { margin-top: -.2rem; }
.foot { font-size: .8em; color: var(--grey); }
.foot a { color: #5fb0b0; }
.foot .cite { color: var(--grey); text-decoration: none; }
.foot .cite:hover { text-decoration: underline; }
body.lang-both .post .body.ja + .body.en { border-top: 1px dashed #333; padding-top: .9rem; }
@media (min-width: 1100px) {
  body.lang-both .screen { max-width: 110rem; }
  body.lang-both .post { display: grid; grid-template-columns: 1fr 1fr; column-gap: 2rem; }
  body.lang-both .post > .hdr, body.lang-both .post > .badge, body.lang-both .post > .foot,
  body.lang-both .post > .tnote { grid-column: 1 / -1; }
  body.lang-both .post .body.ja + .body.en { border-top: 0; padding-top: 0; border-left: 1px dashed #333; padding-left: 1.5rem; }
  body.lang-both .post .body.en { font-size: .8rem; line-height: 1.6; }
}

/* placeholders & deletions */
.st-omitted .hdr { color: var(--dim); }
.st-omitted .l1 * { color: var(--dim); }
.st-self_deleted .subj, .st-sysop_deleted .subj { color: var(--dim); }

/* ---------- Fujitsu staff highlight ---------- */
.post.staff { border-left-color: var(--yellow); }
.post.staff .hdr .handle, .post.staff .hdr .nid { color: var(--yellow); }
.post.affiliate { border-left: 4px dotted var(--cyan); }
.badge {
  display: inline-block; margin-top: .35rem; font-size: .78em; line-height: 1.35;
  padding: .15rem .5rem; color: var(--black); background: var(--yellow);
}
.badge b { letter-spacing: .08em; }
.badge .who { font-weight: normal; }
.post.affiliate .badge { background: var(--cyan); }
body.staff-only .post:not(.staff), body.staff-only .day.empty { display: none; }

/* ---------- menu screen (index) ---------- */
body.menu-page { background: var(--grey); min-height: 100vh; padding: 2.5rem 0; }
.menu-wrap { max-width: 60rem; margin: 0 auto; padding: 0 1rem; }
.menu-panel {
  background: var(--olive);
  border: 3px solid var(--black);
  outline: 6px solid var(--frame); outline-offset: -9px;
  padding: 2.2rem 3.2rem 2rem;
  box-shadow: 0 0 0 1px var(--black);
}
.menu-panel.secondary { margin-top: 1.5rem; padding-top: 1.5rem; }
.menu-panel h2 { font-weight: normal; font-size: 1.05rem; color: var(--green); margin: .2rem 0 .6rem 1.4rem; }
.title-row { margin: 0 0 1.4rem 3.5rem; display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 2.5rem; }
.genesis {
  font-family: "Times New Roman", "Noto Serif", serif; font-weight: bold;
  font-size: 2.6rem; letter-spacing: .45em; color: var(--cyan);
  text-shadow: 3px 3px 0 #003838;
}
.tagline { color: var(--green); font-size: 1.15rem; }
.menu { list-style: none; margin: 0; padding: 0 0 0 1.4rem; }
.menu li { margin: .05rem 0; }
.menu a { color: var(--white); text-decoration: none; display: inline-block; padding: .05rem .3rem; }
.menu a:hover, .menu a:focus { background: var(--black); color: var(--yellow); outline: none; }
.menu small { color: #e8e8b0; font-size: .75em; }
.prompt { text-align: right; margin: 1rem 2rem 0 0; color: var(--white); }
.stats { font-size: .8em; color: #202000; margin: 1rem 0 0 1.4rem; }
.menu-lang { margin: 1rem 0 0 1.4rem; }

/* ---------- prose (about) ---------- */
.prose { font-family: Georgia, "Noto Serif", serif; line-height: 1.6; max-width: 48rem; }
.prose h2 { font-family: var(--mono); font-weight: normal; color: var(--green); font-size: 1.05rem; margin-top: 2rem; }
.prose code { color: var(--cyan); }
.staff-table { border-collapse: collapse; font-size: .85em; width: 100%; }
.staff-table th, .staff-table td { border: 1px solid #333; padding: .3rem .5rem; vertical-align: top; text-align: left; }
.staff-table tr.staff td:first-child { border-left: 4px solid var(--yellow); }
.staff-table tr.affiliate td:first-child { border-left: 4px dotted var(--cyan); }

.foot-page { border-top: 4px double var(--frame); color: var(--grey); font-size: .8em; padding: 1rem; text-align: center; }
.vol-anchor { display: block; position: relative; top: -5rem; }

@media (max-width: 640px) {
  body { font-size: 14px; }
  .menu-panel { padding: 1.5rem 1rem; }
  .title-row { margin-left: 0; }
  .genesis { font-size: 1.8rem; }
  .menu { padding-left: 0; }
}

.credit { text-align: center; color: #e8e8b0; font-size: .85em; margin: 1.5rem 0 0; }
.credit a { color: var(--cyan); }
.badge a { color: #003a8c; text-decoration: underline; }

/* ---------- replies ---------- */
.post.reply { margin-left: 2.2rem; }
.replyto { font-size: .82em; margin: 0 0 .35rem; }
.replyto a {
  display: inline-block; text-decoration: none; color: var(--cyan);
  background: rgba(0,255,255,.07); border: 1px solid rgba(0,255,255,.35);
  padding: .1rem .55rem; border-radius: 2px;
}
.replyto a:hover { background: rgba(0,255,255,.18); }
.replyto .ja, .replyto .en { white-space: normal; }
body.lang-both .replyto .ja + .en::before { content: " / "; color: var(--grey); }
@media (max-width: 640px) { .post.reply { margin-left: 1rem; } }
