/* The base theme's look: 2010 nostalgia. Fixed-width, centered, boxed, small
   Verdana text, square corners everywhere except form buttons and fields.
   Every color is a theme token (var(--c-...)), set per theme in /theme/<id>.css. */

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--c-page-bg);
  color: var(--c-text);
  font-family: Verdana, Geneva, Tahoma, Arial, sans-serif;
  font-size: 13px;
  line-height: 1.5;
}

a { color: var(--c-link); text-decoration: none; }
a:hover { color: var(--c-link-hover); text-decoration: underline; }

h1, h2, h3, h4 { color: var(--c-heading); margin: 0 0 8px; line-height: 1.25; }
h1 { font-size: 20px; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }

img { max-width: 100%; height: auto; }

.muted { color: var(--c-muted); }

/* ── Layout ─────────────────────────────────────────────────────────────── */

#wrap {
  width: var(--layout-width, 900px);
  max-width: 100%;
  margin: 0 auto;
  background: var(--c-box-bg);
  border-left: 1px solid var(--c-border);
  border-right: 1px solid var(--c-border);
}

#header { text-align: center; background: var(--c-box-alt-bg); }
#header img.header-img { display: block; margin: 0 auto; }

#columns { display: flex; align-items: flex-start; gap: 0; }
#content { flex: 1; min-width: 0; padding: 12px; }
.sidebar {
  width: 200px;
  flex: 0 0 200px;
  padding: 10px 8px;
  background: var(--c-box-alt-bg);
}
#sidebar-left { border-right: 1px dashed var(--c-border); }
#sidebar-right { border-left: 1px dashed var(--c-border); }

#footer {
  border-top: 3px solid var(--c-nav-bg);
  background: var(--c-box-alt-bg);
  padding: 10px 12px;
  text-align: center;
  font-size: 11px;
  color: var(--c-muted);
}
#footer .credit { margin: 6px 0 0; }

/* ── Boxes and blocks ───────────────────────────────────────────────────── */

.box {
  background: var(--c-box-bg);
  border: 1px solid var(--c-border);
  padding: 10px 12px;
  margin: 0 0 12px;
}

.block { margin: 0 0 14px; }
.block h2 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: var(--c-sidebar-heading-bg);
  color: var(--c-sidebar-heading-text);
  padding: 4px 6px;
  margin: 0 0 6px;
  border-bottom: 1px solid var(--c-border);
}
.block ul { list-style: none; margin: 0; padding: 0; }
.block li { padding: 2px 4px; }
.block li::before { content: "x "; color: var(--c-muted); }
.block li.current > a { font-weight: bold; }

#header .block, #footer .block { margin: 0; }

/* ── Notices ─────────────────────────────────────────────────────────────── */

.flash, .notice {
  margin: 10px 12px 0;
  padding: 8px 10px;
  background: var(--c-notice-bg);
  color: var(--c-notice-text);
  border: 1px solid var(--c-border);
}
.flash-error, .notice-error { color: var(--c-error); }
.flash-ok { color: var(--c-success); }
.error-text { color: var(--c-error); }
.ok-text { color: var(--c-success); }
.error-details { white-space: pre-wrap; font-size: 11px; overflow: auto; }

.preview-bar {
  background: var(--c-notice-bg);
  color: var(--c-notice-text);
  text-align: center;
  padding: 6px;
  font-size: 12px;
}
.preview-bar form { display: inline; }

/* ── Forms (the only rounded corners) ─────────────────────────────────────── */

input[type="text"], input[type="email"], input[type="url"], input[type="password"], input[type="number"],
input[type="search"], input[type="date"], input[type="datetime-local"], select, textarea {
  font: inherit;
  color: var(--c-text);
  background: var(--c-field-bg);
  border: 1px solid var(--c-field-border);
  border-radius: 4px;
  padding: 4px 6px;
  max-width: 100%;
}
textarea { width: 100%; min-height: 90px; }
input[type="text"], input[type="email"], input[type="url"], input[type="password"], input[type="search"] { width: 100%; }

button, .button, input[type="submit"] {
  font: inherit;
  font-weight: bold;
  cursor: pointer;
  background: var(--c-button-bg);
  color: var(--c-button-text);
  border: 0;
  border-radius: 4px;
  padding: 4px 12px;
  display: inline-block;
}
button:hover, .button:hover { background: var(--c-button-hover); color: var(--c-button-text); text-decoration: none; }
button[disabled] { opacity: .5; cursor: default; }
button.link-button { background: none; color: var(--c-link); padding: 0; font-weight: normal; }
button.link-button:hover { color: var(--c-link-hover); text-decoration: underline; }

.field { margin: 0 0 10px; }
.field > label, .field > .label { display: block; font-weight: bold; margin: 0 0 2px; }
.field .help { font-size: 11px; color: var(--c-muted); margin: 2px 0 0; }
.field .error-text { font-size: 11px; }
.check-row { display: flex; gap: 6px; align-items: baseline; }
.inline-fields { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* A search box and its button read as one control. */
.search-box { display: flex; }
.search-box input { border-radius: 4px 0 0 4px; border-right: 0; }
.search-box button { border-radius: 0 4px 4px 0; }
.search-box:focus-within { outline: 2px solid var(--c-link); outline-offset: 1px; border-radius: 4px; }
.search-box input:focus, .search-box button:focus { outline: none; }

/* ── Tags, badges, buttons (88×31) ─────────────────────────────────────────── */

.tag {
  display: inline-block;
  background: var(--c-tag-bg);
  color: var(--c-tag-text);
  border: 1px solid var(--c-border);
  padding: 0 5px;
  font-size: 11px;
  margin: 0 3px 3px 0;
}
a.tag:hover { text-decoration: none; background: var(--c-box-alt-bg); }
.badge-trans { background: var(--c-trans-badge-bg); color: var(--c-trans-badge-text); }
.badge-new { font-weight: bold; }

.button-88 { width: 88px; height: 31px; image-rendering: auto; vertical-align: middle; }
.button-wall { display: flex; flex-wrap: wrap; gap: 4px; }

/* ── Listings ────────────────────────────────────────────────────────────── */

.listing-grid { display: grid; gap: 10px; }
.listing-card { border-bottom: 1px dashed var(--c-border); padding: 0 0 8px; }
.listing-card:last-child { border-bottom: 0; }
.listing-card h3 { margin: 0 0 2px; }
.listing-card .stats { font-size: 11px; color: var(--c-muted); }

.pagination { display: flex; gap: 4px; flex-wrap: wrap; margin: 10px 0; }
.pagination a, .pagination span {
  border: 1px solid var(--c-border);
  padding: 1px 7px;
  background: var(--c-box-bg);
}
.pagination .current { background: var(--c-nav-bg); color: var(--c-nav-text); }

/* ── Footer switches ─────────────────────────────────────────────────────── */

.footer-switches { margin: 8px 0 0; }
.mode-switch, .theme-switcher { display: inline-flex; gap: 4px; align-items: center; flex-wrap: wrap; justify-content: center; }
.mode-switch button, .theme-choice { font-size: 11px; padding: 2px 8px; }
.theme-choice { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; }
.theme-choice.current { outline: 2px solid var(--c-heading); }

/* ── Rich text ───────────────────────────────────────────────────────────── */

.rich blockquote { border-left: 3px solid var(--c-border); margin: 6px 0; padding: 2px 10px; color: var(--c-muted); }
.rich table { border-collapse: collapse; }
.rich td, .rich th { border: 1px solid var(--c-border); padding: 3px 6px; }

/* ── Small screens: the sidebars fold under the content ─────────────────── */

@media (max-width: 700px) {
  #columns { flex-direction: column; }
  .sidebar { width: 100%; flex: none; border: 0 !important; border-top: 1px dashed var(--c-border) !important; }
  #sidebar-left { order: 2; }
  #content { order: 1; }
  #sidebar-right { order: 3; }
}

/* ── Directory pages ─────────────────────────────────────────────────────── */

.breadcrumb { font-size: 11px; margin: 0 0 4px; color: var(--c-muted); }
.totals { font-style: italic; color: var(--c-muted); }
.category-list { margin: 0; padding: 0 0 0 16px; }
.category-list.columns { columns: 2; column-gap: 20px; }
.filters fieldset { border: 1px solid var(--c-border); margin: 6px 0; padding: 4px 8px; }
.filters legend { font-weight: bold; color: var(--c-heading); font-size: 12px; }
.tag-check { display: inline-flex; margin: 0 10px 2px 0; }
.tag-filters summary { cursor: pointer; font-weight: bold; margin: 6px 0 0; }
table.details { border-collapse: collapse; margin: 8px 0; width: 100%; }
table.details th { text-align: left; vertical-align: top; width: 30%; padding: 3px 8px 3px 0; color: var(--c-heading); }
table.details td { padding: 3px 0; border-bottom: 1px dashed var(--c-border); }
.listing-banner img { display: block; margin: 0 auto 8px; }
.random-button { display: block; text-align: center; }
[data-smooth].loading { opacity: .5; transition: opacity .15s; }
.rss-link { font-size: 11px; margin-left: 6px; }

/* ── Plugboard, polls, news ───────────────────────────────────────────────── */

.plugboard-big .button-wall { justify-content: center; }
.plug-form { margin: 8px 0 0; }
.plug-form summary { cursor: pointer; font-weight: bold; }
.poll-results { list-style: none; margin: 0; padding: 0; }
.poll-results li { margin: 0 0 6px; }
.poll-bar { display: block; height: 8px; background: var(--c-box-alt-bg); border: 1px solid var(--c-border); }
.poll-bar > span { display: block; height: 100%; background: var(--c-button-bg); }
.link-counts { margin: 0; padding: 0 0 0 16px; }
.news-item h3 { margin: 0; }
.block-featured ul { display: flex; flex-wrap: wrap; gap: 4px; }
.block-featured li::before { content: none; }

/* ── Reviews ─────────────────────────────────────────────────────────────── */

.review-list { margin: 0; padding: 0 0 0 16px; columns: 2; column-gap: 20px; }
.review-shots { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.review-shots img { width: 260px; height: 180px; object-fit: cover; object-position: top; border: 1px solid var(--c-border); }
.review-shots p { flex-basis: 100%; margin: 0; }
.review-facts th { width: 26%; }
.red-flag-list { padding-left: 18px; }
.red-flag { border-bottom: 1px dashed var(--c-border); margin: 0 0 8px; }
@media (max-width: 700px) { .review-list, .category-list.columns { columns: 1; } .review-shots img { width: 100%; } }

/* ── Playbys ─────────────────────────────────────────────────────────────── */

.playby-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.playby-grid.small-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
.playby-card { border: 1px solid var(--c-border); background: var(--c-box-bg); padding: 6px; }
.playby-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; object-position: top; display: block; }
.playby-card .no-photo { display: flex; aspect-ratio: 1 / 1; align-items: center; justify-content: center; background: var(--c-box-alt-bg); color: var(--c-muted); font-size: 11px; }
.playby-card h3 { font-size: 12px; margin: 4px 0 2px; }
.playby-traits .tag { font-size: 10px; }
.playby-photos { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.playby-photos figure { margin: 0; width: 200px; }
.playby-photos img { width: 200px; height: 240px; object-fit: cover; object-position: top; border: 1px solid var(--c-border); display: block; }
.playby-photos figcaption { margin: 3px 0 0; }
.photo-filter { display: flex; flex-wrap: wrap; gap: 3px; align-items: center; margin: 8px 0; }
.photo-filter .tag { cursor: pointer; font-weight: normal; }
.photo-filter .tag.current { background: var(--c-button-bg); color: var(--c-button-text); }
.photo-slot { border: 1px solid var(--c-border); margin: 0 0 8px; padding: 6px 8px; }
.photo-slot summary { cursor: pointer; }
.family-input { margin: 0 6px 6px 0; max-width: 260px; }
.suggest { max-width: 220px; margin: 2px 0 0; display: block; }

.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.thread-msg.outbound { background: var(--c-box-alt-bg); }

/* Shoutbox */
.shoutbox { font-size: 11px; }
.shout-form input[type="text"], .shout-form input[type="url"] { width: 100%; box-sizing: border-box; margin: 0 0 3px; }
.shout-options { margin: 3px 0; }
.shout-options details { display: inline-block; margin-right: 6px; vertical-align: top; }
.shout-options details[open] { display: block; }
.shout-send { display: flex; gap: 3px; }
.shout-send input { flex: 1; min-width: 0; }
.shout-form p { margin: 2px 0; }
.shout-extras summary, .shout-help summary { cursor: pointer; color: var(--c-link); }
.shout-smilies { display: flex; flex-wrap: wrap; gap: 2px; margin: 3px 0; }
.shout-status { display: block; color: var(--c-muted); min-height: 1em; }
.shout-sticky { background: var(--c-notice-bg); color: var(--c-notice-text); padding: 4px 6px; margin: 0 0 5px; border: 1px solid var(--c-border); }
.shout-sticky p { margin: 0; }
.shout-note { color: var(--c-muted); font-style: italic; margin: 0 0 4px; }
.shout-list { list-style: none; margin: 0 0 5px; padding: 0; height: var(--shout-height, 300px); overflow-y: auto; border: 1px solid var(--c-border); background: var(--c-box-bg); }
.shout-archive { height: auto; }
.block .shout-list li::before { content: none; }
.shout-list li.shout { padding: 3px 5px; border-bottom: 1px dashed var(--c-border); word-wrap: break-word; overflow-wrap: anywhere; }
.shout-list li.shout:nth-child(even) { background: var(--c-box-alt-bg); }
.shout-list li.shout-mention { background: var(--c-shout-mention-bg); }
.shout-waiting { opacity: 0.7; }
.shout-wait { color: var(--c-muted); }
.shout-avatar { object-fit: cover; vertical-align: middle; margin-right: 3px; }
.shout-name { font-weight: bold; }
.shout-role-admin, .shout-role-admin a { color: var(--c-shout-admin); }
.shout-role-mod, .shout-role-mod a { color: var(--c-shout-mod); }
.shout-tag { font-size: 9px; text-transform: uppercase; padding: 0 3px; border: 1px solid currentColor; }
.shout-tag-admin { color: var(--c-shout-admin); }
.shout-tag-mod { color: var(--c-shout-mod); }
.shout-at { font-weight: bold; }
.shout-time { display: block; color: var(--c-muted); font-size: 9px; }
.shout-tool { display: inline; margin-left: 3px; font-size: 10px; }
img.smiley { vertical-align: middle; max-height: 24px; }
.shout-foot { color: var(--c-muted); }
.shout-here-name { font-weight: bold; }
.shout-name-forms { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
