* { box-sizing: border-box; }

html {
  min-width: 320px;
  min-height: 100%;
  background: #000;
  color-scheme: dark;
  /* Silver-ratio rhythm: each second step is approximately x1.414. */
  --font-size-meta: 10px;
  --font-size-small: 12px;
  --font-size-base: 14px;
  --font-size-emphasis: 17px;
  --font-size-display: 20px;
  --line-height-base: 1.414;
  --space-3xs: 2px;
  --space-2xs: 3px;
  --space-xs: 4px;
  --space-sm: 6px;
  --space-md: 8px;
  --space-lg: 11px;
  --space-xl: 16px;
  --space-2xl: 23px;
  --space-3xl: 32px;
  --space-4xl: 45px;
  --control-height: 32px;
  --angora-font-family: "MS PGothic", "ＭＳ Ｐゴシック", Osaka, Arial, sans-serif;
}

html[data-font="gothic"] {
  --angora-font-family: system-ui, "Yu Gothic", "游ゴシック", Meiryo, sans-serif;
}

html[data-font="mincho"] {
  --angora-font-family: "Yu Mincho", "游明朝", "Hiragino Mincho ProN", serif;
}

html[data-font="monospace"] {
  --angora-font-family: "MS Gothic", "ＭＳ ゴシック", Osaka-Mono, monospace;
}

body {
  min-height: 100vh;
  margin: 0;
  color: #d7d7d7;
  background: #000;
  font-family: var(--angora-font-family);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
}

a {
  color: #eee;
  text-decoration: none;
}

a:visited { color: #eee; }
a:hover, a:focus { color: #fff; text-decoration: underline; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 1px dotted #bbb;
  outline-offset: var(--space-3xs);
}

main {
  position: relative;
  width: 100%;
  min-height: 100vh;
  padding: var(--space-xl);
  background: #000;
}

.account-link {
  position: absolute;
  top: var(--space-3xs);
  right: var(--space-xl);
  color: #aaa;
  font-size: var(--font-size-small);
  line-height: var(--font-size-base);
}

.account-link:visited { color: #aaa; }

.board-tools {
  position: absolute;
  top: var(--space-3xs);
  left: var(--space-xl);
  display: flex;
  gap: var(--space-lg);
  font-size: var(--font-size-small);
  line-height: var(--font-size-base);
}

.board-tools a { color: #aaa; }
.board-tools a:visited { color: #aaa; }

.site-nav {
  display: flex;
  min-height: 24px;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  border-bottom: 1px solid #303030;
  color: #aaa;
  font-size: var(--font-size-small);
}

.site-nav a {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  color: #aaa;
}

.site-nav a:visited { color: #aaa; }

.site-footer {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  padding: var(--space-xl) 0 var(--space-xs);
  font-size: var(--font-size-small);
}

.site-footer a,
.site-footer a:visited {
  color: #aaa;
}

.topics {
  margin: 0;
  padding: 0;
  list-style: none;
  min-height: calc(100vh - var(--space-3xl));
  background: #161616;
  border-top: 1px solid #303030;
  border-right: 1px solid #303030;
  border-left: 1px solid #303030;
}

.topics li {
  position: relative;
  min-height: var(--space-4xl);
  padding: var(--space-sm) var(--space-lg);
  border-bottom: 1px solid #303030;
  background: #171717;
}

.topics li:nth-child(even) { background: #1a1a1a; }

.topics li:hover { background: #232323; }
.topics .empty-topic:hover { background: #171717; }

.title {
  min-height: var(--font-size-display);
  color: #e3e3e3;
  font-size: var(--font-size-base);
  line-height: var(--font-size-display);
}

.meta {
  margin-top: var(--space-3xs);
  color: #8e8e8e;
  font-family: Tahoma, Arial, "MS PGothic", sans-serif;
  font-size: var(--font-size-meta);
  line-height: var(--font-size-base);
}

.meta a {
  color: #aaa;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.mark {
  display: inline-block;
  width: var(--font-size-base);
  height: var(--font-size-base);
  border: 1px outset #777;
  color: #fff;
  background: #3b3b3b;
  font: bold var(--font-size-meta)/var(--font-size-small) Arial, sans-serif;
  text-align: center;
  vertical-align: 1px;
}

@media (max-width: 600px) {
  main { padding: var(--space-sm); }
  .account-link { right: var(--space-xs); }
  .board-tools { left: var(--space-xs); }
  .topics { min-height: calc(100vh - 20px); }
  .topics li { padding-right: var(--space-sm); padding-left: var(--space-md); }
}
