  :root, html[data-style="yotsuba-b"] {
    --bg: #eef2ff;  --fade: #d6daf0;
    --text: #000000; --muted: #707070;
    --link: #34345c; --hover: #dd0000;
    --title: #af0a0f; --subject: #0f0c5d; --name: #117743;
    --reply: #d6daf0; --border: #b7c5d9; --block: #9988ee;
    --input: #ffffff; --focus: #34345c;
  }
  html[data-style="futaba"] {
    --bg: #ffffee;  --fade: #f7efe6;
    --text: #800000; --muted: #86694f;
    --link: #0000ee; --hover: #dd0000;
    --title: #af0a0f; --subject: #cc1105; --name: #117743;
    --reply: #f4e8dd; --border: #d8c9b7; --block: #ea8f81;
    --input: #ffffff; --focus: #800000;
  }
  html[data-style="tomorrow"] {
    --bg: #1d1f21;  --fade: #282a2e;
    --text: #c5c8c6; --muted: #8a8e8c;
    --link: #81a2be; --hover: #de935f;
    --title: #c5c8c6; --subject: #b294bb; --name: #b5bd68;
    --reply: #282a2e; --border: #111111; --block: #373b41;
    --input: #1d1f21; --focus: #81a2be;
  }
  * { box-sizing: border-box; }
  html { color-scheme: light; }
  html[data-style="tomorrow"] { color-scheme: dark; }
  body {
    margin: 0; padding: 0 8px 24px;
    background: var(--bg) linear-gradient(to bottom, var(--fade), var(--bg) 220px) no-repeat;
    color: var(--text);
    font: 13px/1.4 arial, helvetica, sans-serif;
  }
  a { color: var(--link); text-decoration: none; }
  a:hover { color: var(--hover); }
  hr { border: 0; border-top: 1px solid var(--border); margin: 10px 0; }
  main { max-width: 760px; margin: 0 auto; }
  .topbar { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px; padding: 6px 0; font-size: 11px; }
  .topbar select { font-size: 11px; }
  .board-title {
    margin: 14px 0 0; text-align: center; color: var(--title);
    font: bold 28px/1.2 tahoma, sans-serif; letter-spacing: -2px;
  }
  .board-sub { margin: 2px 0 0; text-align: center; font-size: 10px; }
  .reply {
    background: var(--reply); border: 1px solid var(--border); border-left: 0; border-top: 0;
    padding: 4px 8px 8px; margin: 8px 0;
    overflow-x: auto;   /* wide tables scroll in place, never out of the card */
  }
  .subject { color: var(--subject); font-weight: bold; }
  .name { color: var(--name); font-weight: bold; }
  .reply h2 { margin: 2px 0 6px; font-size: 13px; }
  .small { font-size: 11px; color: var(--muted); }
  .sw { display: inline-block; width: 9px; height: 9px; margin-right: 4px; border: 1px solid rgba(0,0,0,0.45); vertical-align: baseline; }
  .favicon { width: 16px; height: 16px; margin-right: 4px; vertical-align: middle; }
  table.data { border-collapse: separate; border-spacing: 2px; width: 100%; }
  table.data th {
    background: var(--block); color: #000; font-weight: bold; text-align: right;
    border: 1px solid var(--border); padding: 3px 8px; white-space: nowrap;
  }
  html[data-style="tomorrow"] table.data th { color: var(--text); }
  table.data th:first-child, table.data td:first-child { text-align: left; }
  table.data td { padding: 3px 8px; text-align: right; white-space: nowrap; background: var(--bg); border: 1px solid var(--border); }
  .empty { margin: 0; padding: 40px 8px; text-align: center; color: var(--muted); }
  footer { margin-top: 18px; text-align: center; font-size: 10px; color: var(--muted); }
