/* v10.2: responsive reading while retaining the retro textboard palette. */
:root {
  font-family: "MS PGothic", "ＭＳ Ｐゴシック", Meiryo, sans-serif;
  color: #111;
  background: #efefe9;
  --text-body: clamp(1.125rem, 1.08rem + .2vw, 1.25rem);
  --text-small: clamp(.875rem, .84rem + .14vw, 1rem);
  --text-title: clamp(1.375rem, 1.15rem + 1vw, 1.875rem);
  --text-section: clamp(1.125rem, 1.03rem + .35vw, 1.375rem);
  --page-width: 68rem;
  --page-gutter: clamp(.5rem, 2vw, 1.5rem);
  --post-inset: clamp(0rem, 1vw, .875rem);
}
html[data-text-size="large"] {
  --text-body: clamp(1.25rem, 1.2rem + .25vw, 1.5rem);
  --text-small: clamp(1rem, .95rem + .2vw, 1.125rem);
  --text-title: clamp(1.5rem, 1.25rem + 1vw, 2.125rem);
  --text-section: clamp(1.25rem, 1.12rem + .4vw, 1.5rem);
}
html[data-text-size="xlarge"] {
  --text-body: clamp(1.375rem, 1.3rem + .35vw, 1.75rem);
  --text-small: clamp(1.125rem, 1.05rem + .25vw, 1.25rem);
  --text-title: clamp(1.625rem, 1.35rem + 1.1vw, 2.375rem);
  --text-section: clamp(1.375rem, 1.2rem + .5vw, 1.75rem);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 1rem; }
body { margin: 0; font-size: var(--text-body); line-height: 1.75; }
a { color: #0000ee; text-underline-offset: .12em; }
a:visited { color: #551a8b; }
button, input, textarea, select { font: inherit; max-inline-size: 100%; }
button, select { min-block-size: 2.75rem; }
button { background: #e5e5e5; border: 1px solid #777; border-radius: 0; color: #111; padding: .4em .9em; cursor: pointer; overflow-wrap: anywhere; }
button:hover { background: #d4d4d4; }
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid #2c64af; outline-offset: 3px; }
.site-header { background: #e4e7dc; border-bottom: 2px solid #888; }
.header-inner { max-inline-size: var(--page-width); margin-inline: auto; padding: .65rem var(--page-gutter); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .4rem 1.5rem; }
.site-brand { display: flex; align-items: baseline; flex-wrap: wrap; gap: .1rem 1rem; min-inline-size: 0; }
.site-brand > a { font-size: var(--text-title); font-weight: bold; color: #173d83; text-decoration: none; }
.site-brand span { font-size: var(--text-small); color: #555; overflow-wrap: anywhere; }
.home-link { display: inline-flex; align-items: center; min-block-size: 2.75rem; font-size: var(--text-small); }
.skip-link { position: absolute; left: -9999px; top: 0; background: #fff; padding: .6rem; z-index: 20; }
.skip-link:focus { left: .5rem; }
main { max-inline-size: var(--page-width); margin: 1rem auto; padding-inline: var(--page-gutter); }
h1 { font-size: var(--text-title); line-height: 1.5; margin: .65em 0; overflow-wrap: anywhere; }
h2 { font-size: var(--text-section); line-height: 1.5; margin: .4em 0 .75em; overflow-wrap: anywhere; }
.muted { font-size: var(--text-small); color: #555; }
.reading-toolbar { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: .35rem .75rem; margin-block: 0 .9rem; font-size: var(--text-small); }
.reading-label { color: #444; }
.text-size-options { display: flex; flex-wrap: wrap; gap: .3rem; }
.text-size-button { min-inline-size: 2.75rem; padding: .35em .65em; font-size: inherit; background: #f5f5f0; }
.text-size-button[aria-pressed="true"] { background: #d1dbc5; border-color: #607652; box-shadow: inset 0 -3px #607652; font-weight: bold; }
.sr-only { position: absolute; inline-size: 1px; block-size: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.boards { display: flex; flex-wrap: wrap; gap: .35rem; margin: .6rem 0 .8rem; }
.boards a { display: inline-flex; align-items: center; min-block-size: 2.75rem; padding: .3em .65em; background: #e5e5d6; border: 1px solid #aaa; text-decoration: none; overflow-wrap: anywhere; }
.boards a[aria-current="page"] { background: #d1dbc5; border-color: #6d8161; color: #173b21; font-weight: bold; }
.boards a:hover, .thread:hover { background: #f7f8e9; }
.panel { min-inline-size: 0; background: #f5f5f0; border: 1px solid #aaa; padding: clamp(.5rem, 1.4vw, .9rem); margin-block: .9rem; }
.section-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .3rem .8rem; background: #dce5d6; border: 1px solid #b7c4af; padding: .35em .5em; margin-bottom: .5rem; }
.section-heading h2 { margin: 0; flex: 1 1 12em; }
.section-heading > a { display: inline-flex; align-items: center; min-block-size: 2.75rem; font-size: var(--text-small); overflow-wrap: anywhere; }
.thread-list { padding-inline: .15rem; }
.thread { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2em .5em; min-block-size: 2.75rem; padding: .5em .25em; border-bottom: 1px dotted #aaa; text-decoration: none; }
.thread strong { flex: 1 1 16rem; min-inline-size: 0; font-weight: normal; text-decoration: underline; overflow-wrap: anywhere; }
.thread-number { flex: 0 0 1.5em; color: #555; font-size: var(--text-small); }
.thread small { font-size: var(--text-small); color: #555; text-align: right; overflow-wrap: anywhere; }
.breadcrumb { font-size: var(--text-small); overflow-wrap: anywhere; }
.thread-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-block: .75rem; }
.thread-actions a { display: inline-flex; align-items: center; justify-content: center; min-block-size: 2.75rem; background: #e7e9de; border: 1px solid #bbb; padding: .4em .7em; font-size: var(--text-small); text-align: center; overflow-wrap: anywhere; }
.posts-panel { padding-block: .35rem; }
.post { min-inline-size: 0; padding: .8rem .25rem 1rem; border-bottom: 1px dotted #bbb; scroll-margin-top: .75rem; }
.post:last-of-type { border-bottom: 0; }
.meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: .2em .35em; color: #555; font-size: var(--text-small); line-height: 1.7; margin-bottom: .5em; overflow-wrap: anywhere; }
.meta time { max-inline-size: 100%; overflow-wrap: anywhere; }
.res-number { color: #333; text-decoration: none; font-weight: bold; }
.ai, .human { font-size: inherit; color: #555; background: transparent; border: 1px solid #aaa; padding-inline: .25em; line-height: 1.4; }
.body { max-inline-size: 48em; margin-inline-start: var(--post-inset); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.75; font-size: inherit; tab-size: 4; }
.anchor { color: #0000ee; text-decoration: underline; }
.post:target { background: #fff8ce; outline: 1px solid #d7bb66; }
.report { margin-top: .4rem; color: #555; font-size: var(--text-small); }
.report summary { cursor: pointer; inline-size: fit-content; max-inline-size: 100%; min-block-size: 2.75rem; padding-block: .45em; }
.report form { padding-block: .5rem; }
form { display: grid; gap: .65rem; inline-size: 100%; max-inline-size: 100%; min-inline-size: 0; }
label { display: grid; gap: .25rem; min-inline-size: 0; }
input, textarea { inline-size: 100%; min-inline-size: 0; border: 1px solid #888; background: #fff; padding: .4em .5em; border-radius: 0; }
input, textarea, select { font-size: max(1rem, var(--text-body)); }
textarea { min-block-size: 8rem; resize: vertical; }
form button { justify-self: start; }
.panel select { display: block; inline-size: 100%; max-inline-size: 100%; min-inline-size: 0; padding: .4em; margin-block: .3rem .75rem; }
.trap { position: absolute; left: -9999px; opacity: 0; }
footer { max-inline-size: var(--page-width); margin: 1.5rem auto; padding: .8rem var(--page-gutter); border-top: 1px solid #bbb; font-size: var(--text-small); color: #555; overflow-wrap: anywhere; }
.anchor-preview { position: fixed; z-index: 50; max-inline-size: min(30rem, calc(100vw - 1.5rem)); max-block-size: min(24rem, 60vh); overflow: auto; background: #fffde9; border: 1px solid #a99855; box-shadow: 2px 3px 7px #0003; padding: .6em .8em; font-size: var(--text-body); line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; pointer-events: none; }
#latest-post { block-size: 1px; }
.captcha-slot { max-inline-size: 100%; min-inline-size: 0; margin-block: .4rem; }
.captcha-slot p { margin-block: .3em; overflow-wrap: anywhere; }
@media (max-width: 40rem) {
  .site-brand span { flex-basis: 100%; }
  .thread { align-items: flex-start; }
  .thread strong { flex-basis: calc(100% - 2.5em); }
  .thread small { margin-inline-start: 2em; text-align: left; }
  .thread-actions a { flex: 1 1 9rem; }
  .body { margin-inline-start: 0; }
}
@media (hover: none), (pointer: coarse) { .anchor-preview { display: none !important; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Optional public names and site-local tripcodes, shared by both display styles. */
.post-author { color: #126b37; min-inline-size: 0; overflow-wrap: anywhere; }
.tripcode, .poster-id { font-family: Consolas, "MS Gothic", monospace; }
.tripcode { font-size: .95em; color: #395a39; overflow-wrap: anywhere; }
.poster-id, .poster-id:visited { color: #454545; display: inline-flex; flex-wrap: wrap; gap: .2em; overflow-wrap: anywhere; }
.identity-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.identity-help { color: #555; font-size: var(--text-small); margin: 0; overflow-wrap: anywhere; }
.identity-filter { background: #e6ecde; border: 1px solid #8c9e7b; padding: .7em 1em; font-size: var(--text-small); margin-block: 1rem; overflow-wrap: anywhere; }
.identity-filter p { margin: 0 0 .4em; }
.identity-filter > a { display: inline-flex; align-items: center; min-block-size: 2.75rem; }
@media (max-width: 40rem) { .identity-fields { grid-template-columns: minmax(0, 1fr); } }
