@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

:root {
  --aim-blue: #1C4587;
  --aim-blue-light: #4A86C8;
  --aim-blue-dark: #0D2B5E;
  --aim-yellow: #FFCC00;
  --aim-yellow-dark: #CC9900;
  --aim-gray: #C0C0C0;
  --aim-gray-light: #D4D0C8;
  --aim-gray-dark: #808080;
  --aim-white: #FFFFFF;
  --aim-black: #000000;
  --aim-bg: #008080;
  --aim-link: #0000FF;
  --aim-visited: #800080;
  --aim-online: #00CC00;
  --aim-away: #FFAA00;
  --aim-offline: #CC0000;
  --aim-chat-bg: #F5F5DC;
  --aim-input-bg: #FFFFFF;
  --aim-titlebar: linear-gradient(to right, #0A246A, #3A6EA5);
  --aim-titlebar-inactive: linear-gradient(to right, #808080, #B0B0B0);
  --font-system: Tahoma, Verdana, 'Segoe UI', Geneva, sans-serif;
  --font-pixel: 'VT323', monospace;
  --border-raised: 2px outset #D4D0C8;
  --border-sunken: 2px inset #D4D0C8;
  --border-groove: 2px groove #D4D0C8;
  --border-ridge: 2px ridge #D4D0C8;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  border-radius: 0 !important;
}

html {
  font-size: 13px;
}

body {
  font-family: var(--font-system);
  background: var(--aim-bg);
  color: var(--aim-black);
  min-height: 100vh;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0,0,0,0.03) 2px,
      rgba(0,0,0,0.03) 4px
    );
}

a {
  color: var(--aim-link);
  text-decoration: underline;
}
a:visited {
  color: var(--aim-visited);
}
a:hover {
  color: var(--aim-offline);
}

/* ===== WINDOW CHROME ===== */
.window {
  background: var(--aim-gray-light);
  border: var(--border-raised);
  margin: 8px auto;
  max-width: 600px;
  width: calc(100% - 16px);
}

.window-titlebar {
  background: var(--aim-titlebar);
  padding: 3px 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: default;
  user-select: none;
}

.window-titlebar-text {
  color: white;
  font-size: 12px;
  font-weight: 700;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.3);
}

.window-titlebar-icon {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.window-controls {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}

.window-btn {
  width: 16px;
  height: 14px;
  border: var(--border-raised);
  background: var(--aim-gray-light);
  font-size: 9px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  font-family: var(--font-system);
  color: var(--aim-black);
}
.window-btn:active {
  border: var(--border-sunken);
}

.window-menubar {
  background: var(--aim-gray-light);
  border-bottom: 1px solid var(--aim-gray-dark);
  padding: 2px 0;
  display: flex;
  gap: 0;
}

.window-menu-item {
  padding: 2px 8px;
  font-size: 12px;
  cursor: pointer;
  user-select: none;
}
.window-menu-item:hover {
  background: var(--aim-blue);
  color: white;
}

.window-body {
  padding: 8px;
}

.window-statusbar {
  background: var(--aim-gray-light);
  border-top: var(--border-sunken);
  padding: 2px 6px;
  font-size: 11px;
  color: var(--aim-gray-dark);
  display: flex;
  justify-content: space-between;
}

/* ===== HEADER / MASTHEAD ===== */
.masthead {
  text-align: center;
  padding: 12px 8px 8px;
  border-bottom: var(--border-groove);
  margin-bottom: 8px;
}

.masthead-logo-img {
  width: 80px;
  height: 80px;
  image-rendering: auto;
  margin-bottom: 4px;
  border: var(--border-raised);
}

.masthead-logo {
  font-family: var(--font-pixel);
  font-size: 32px;
  color: var(--aim-blue);
  letter-spacing: 2px;
  line-height: 1;
}

.masthead-sub {
  font-size: 11px;
  color: var(--aim-gray-dark);
  margin-top: 2px;
}

.masthead-tagline {
  font-family: var(--font-pixel);
  font-size: 16px;
  color: var(--aim-yellow-dark);
  margin-top: 4px;
  background: var(--aim-blue-dark);
  display: inline-block;
  padding: 2px 10px;
  border: 1px solid var(--aim-blue);
}

/* ===== TOOLBAR ===== */
.toolbar {
  background: var(--aim-gray-light);
  border: var(--border-raised);
  padding: 4px;
  margin-bottom: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.toolbar-btn {
  border: var(--border-raised);
  background: var(--aim-gray-light);
  padding: 3px 8px;
  font-size: 11px;
  font-family: var(--font-system);
  cursor: pointer;
  color: var(--aim-black);
  white-space: nowrap;
}
.toolbar-btn:hover {
  background: var(--aim-blue-light);
  color: white;
}
.toolbar-btn:active {
  border: var(--border-sunken);
}
.toolbar-btn.active {
  border: var(--border-sunken);
  background: white;
  font-weight: 700;
}

/* ===== BUDDY LIST STYLE ===== */
.buddy-list {
  background: white;
  border: var(--border-sunken);
}

.buddy-group {
  border-bottom: 1px solid var(--aim-gray);
}
.buddy-group:last-child {
  border-bottom: none;
}

.buddy-group-header {
  background: var(--aim-gray-light);
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 4px;
  border-bottom: 1px solid var(--aim-gray);
}

.buddy-group-header:hover {
  background: var(--aim-gray);
}

.buddy-group-toggle {
  font-size: 9px;
  width: 12px;
  display: inline-block;
  text-align: center;
}

.buddy-group-count {
  color: var(--aim-gray-dark);
  font-weight: 400;
  margin-left: auto;
  font-size: 10px;
}

.buddy-item {
  padding: 6px 8px 6px 24px;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border-bottom: 1px dotted var(--aim-gray);
  transition: background 0.05s;
}
.buddy-item:last-child {
  border-bottom: none;
}
.buddy-item:hover {
  background: var(--aim-blue);
  color: white;
}
.buddy-item:hover .buddy-meta,
.buddy-item:hover .buddy-status-text,
.buddy-item:hover .buddy-blurb {
  color: rgba(255,255,255,0.8);
}
.buddy-item:hover .buddy-stars {
  color: var(--aim-yellow);
}

.buddy-status {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  margin-top: 3px;
  border: 1px solid var(--aim-gray-dark);
}
.buddy-status.online {
  background: var(--aim-online);
}
.buddy-status.away {
  background: var(--aim-away);
}
.buddy-status.offline {
  background: var(--aim-offline);
}

.buddy-info {
  flex: 1;
  min-width: 0;
}

.buddy-name {
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.buddy-blurb {
  font-size: 11px;
  color: var(--aim-gray-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.buddy-meta {
  font-size: 10px;
  color: var(--aim-gray-dark);
  margin-top: 2px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.buddy-stars {
  color: var(--aim-yellow-dark);
  font-size: 12px;
  letter-spacing: 1px;
}

.buddy-tag {
  border: 1px solid var(--aim-gray);
  background: var(--aim-gray-light);
  padding: 0 4px;
  font-size: 10px;
  display: inline-block;
}
.buddy-item:hover .buddy-tag {
  border-color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.15);
  color: white;
}

/* ===== PLATFORM DETAIL / BLOG POST ===== */
.post-header {
  border-bottom: var(--border-groove);
  padding-bottom: 8px;
  margin-bottom: 8px;
}

.post-title {
  font-family: var(--font-pixel);
  font-size: 28px;
  color: var(--aim-blue);
  line-height: 1.1;
}

.post-meta-bar {
  font-size: 11px;
  color: var(--aim-gray-dark);
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.post-rating-big {
  font-family: var(--font-pixel);
  font-size: 22px;
  color: var(--aim-yellow-dark);
}

.post-author {
  font-weight: 700;
  color: var(--aim-blue);
}

/* Fact sections */
.fact-section {
  margin-bottom: 8px;
}

.fact-section-title {
  background: var(--aim-titlebar);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.fact-table {
  width: 100%;
  border-collapse: collapse;
  border: var(--border-sunken);
  background: white;
}

.fact-table tr {
  border-bottom: 1px solid var(--aim-gray);
}
.fact-table tr:last-child {
  border-bottom: none;
}
.fact-table tr:nth-child(even) {
  background: #F0F0E8;
}

.fact-table td {
  padding: 4px 8px;
  font-size: 12px;
  vertical-align: top;
}

.fact-label {
  font-weight: 700;
  width: 40%;
  color: var(--aim-blue-dark);
  white-space: nowrap;
}

.fact-value {
  color: var(--aim-black);
}

/* Subjective sections */
.subj-block {
  border: var(--border-sunken);
  background: white;
  margin-bottom: 8px;
}

.subj-block-title {
  background: var(--aim-gray-light);
  border-bottom: 1px solid var(--aim-gray);
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--aim-blue-dark);
}

.subj-block-body {
  padding: 8px;
  font-size: 12px;
  line-height: 1.5;
}

/* Red flags */
.red-flag {
  background: #FFF0F0;
  border-left: 3px solid var(--aim-offline);
  padding: 4px 8px;
  font-size: 12px;
  margin-bottom: 4px;
}
.red-flag::before {
  content: "⚠ ";
  color: var(--aim-offline);
}

/* Good things */
.green-flag {
  background: #F0FFF0;
  border-left: 3px solid var(--aim-online);
  padding: 4px 8px;
  font-size: 12px;
  margin-bottom: 4px;
}
.green-flag::before {
  content: "✓ ";
  color: var(--aim-online);
  font-weight: 700;
}

/* Gossip / away message */
.away-message {
  background: var(--aim-chat-bg);
  border: var(--border-sunken);
  padding: 10px 12px;
  font-style: italic;
  font-size: 12px;
  line-height: 1.6;
  position: relative;
}
.away-message::before {
  content: "Away Message:";
  display: block;
  font-style: normal;
  font-weight: 700;
  font-size: 10px;
  color: var(--aim-gray-dark);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

/* ===== CHAT / REVIEWS ===== */
.chat-area {
  background: white;
  border: var(--border-sunken);
  min-height: 100px;
}

.chat-message {
  padding: 6px 10px;
  font-size: 12px;
  border-bottom: 1px dotted var(--aim-gray);
  line-height: 1.5;
}
.chat-message:last-child {
  border-bottom: none;
}

.chat-screenname {
  font-weight: 700;
  color: var(--aim-blue);
}

.chat-screenname.them {
  color: var(--aim-offline);
}

.chat-timestamp {
  font-size: 10px;
  color: var(--aim-gray-dark);
  margin-left: 4px;
}

.chat-stars {
  color: var(--aim-yellow-dark);
  font-size: 11px;
}

.chat-text {
  margin-top: 2px;
}

/* Chat input */
.chat-input-area {
  border-top: var(--border-groove);
  padding: 8px;
  background: var(--aim-gray-light);
}

.chat-input-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.chat-input-field {
  width: 100%;
  border: var(--border-sunken);
  padding: 4px 6px;
  font-family: var(--font-system);
  font-size: 12px;
  background: white;
  resize: vertical;
}

.chat-input-field:focus {
  outline: 1px dotted var(--aim-blue);
}

.chat-input-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.star-picker {
  display: flex;
  gap: 2px;
  cursor: pointer;
}

.star-picker span {
  font-size: 18px;
  color: var(--aim-gray);
  transition: color 0.05s;
}
.star-picker span.lit {
  color: var(--aim-yellow-dark);
}

/* ===== BUTTONS ===== */
.btn {
  border: var(--border-raised);
  background: var(--aim-gray-light);
  padding: 4px 16px;
  font-size: 12px;
  font-family: var(--font-system);
  cursor: pointer;
  color: var(--aim-black);
  white-space: nowrap;
}
.btn:hover {
  background: #E0E0D4;
}
.btn:active {
  border: var(--border-sunken);
}
.btn-primary {
  background: var(--aim-blue);
  color: white;
  font-weight: 700;
}
.btn-primary:hover {
  background: var(--aim-blue-light);
}

/* ===== FORM FIELDS ===== */
.form-group {
  margin-bottom: 8px;
}

.form-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 2px;
  color: var(--aim-blue-dark);
}

.form-hint {
  font-size: 10px;
  color: var(--aim-gray-dark);
  margin-bottom: 2px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  border: var(--border-sunken);
  padding: 4px 6px;
  font-family: var(--font-system);
  font-size: 12px;
  background: white;
}
.form-textarea {
  min-height: 60px;
  resize: vertical;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: 1px dotted var(--aim-blue);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.form-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
}

.form-checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
}

.form-divider {
  background: var(--aim-titlebar);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  margin: 12px 0 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ===== TABS ===== */
.tab-row {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--aim-gray-dark);
  margin-bottom: 8px;
}

.tab {
  border: var(--border-raised);
  border-bottom: none;
  background: var(--aim-gray);
  padding: 4px 12px;
  font-size: 11px;
  cursor: pointer;
  margin-bottom: -2px;
  font-family: var(--font-system);
  color: var(--aim-black);
}
.tab:hover {
  background: var(--aim-gray-light);
}
.tab.active {
  background: white;
  font-weight: 700;
  border-bottom: 2px solid white;
  position: relative;
  z-index: 1;
}

/* ===== NAV LINK ===== */
.back-link {
  font-size: 11px;
  cursor: pointer;
  margin-bottom: 8px;
  display: inline-block;
  color: var(--aim-link);
}
.back-link:hover {
  color: var(--aim-offline);
}

/* ===== SCROLLBAR (webkit) ===== */
::-webkit-scrollbar {
  width: 16px;
}
::-webkit-scrollbar-track {
  background: var(--aim-gray-light);
  border: 1px solid var(--aim-gray);
}
::-webkit-scrollbar-thumb {
  background: var(--aim-gray);
  border: var(--border-raised);
}

/* ===== MARQUEE ===== */
.marquee-bar {
  background: var(--aim-blue-dark);
  color: var(--aim-yellow);
  font-family: var(--font-pixel);
  font-size: 14px;
  padding: 3px 0;
  overflow: hidden;
  white-space: nowrap;
}

.marquee-content {
  display: inline-block;
  animation: marquee 20s linear infinite;
}

@keyframes marquee {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* ===== UTILITIES ===== */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mb-4 { margin-bottom: 4px; }
.mb-8 { margin-bottom: 8px; }

/* ===== MOBILE ===== */
@media (max-width: 480px) {
  html { font-size: 13px; }

  .window {
    margin: 4px;
    width: calc(100% - 8px);
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .toolbar {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .fact-label {
    width: 45%;
  }

  .buddy-item {
    padding-left: 12px;
  }

  .tab {
    padding: 4px 8px;
    font-size: 10px;
  }

  .masthead-logo {
    font-size: 24px;
  }
}

/* ===== VISITOR COUNTER ===== */
.visitor-counter {
  text-align: center;
  font-size: 10px;
  color: var(--aim-gray-dark);
  padding: 8px;
  font-family: var(--font-pixel);
  font-size: 13px;
}

.counter-img {
  display: inline-flex;
  background: black;
  color: #00FF00;
  font-family: var(--font-pixel);
  font-size: 16px;
  padding: 2px 8px;
  border: 1px solid var(--aim-gray-dark);
  letter-spacing: 2px;
  margin: 0 4px;
}

/* ===== LOADING ===== */
.loading-dots::after {
  content: '';
  animation: dots 1.5s infinite;
}
@keyframes dots {
  0%, 20% { content: '.'; }
  40% { content: '..'; }
  60%, 100% { content: '...'; }
}

/* ===== 88x31 BUTTONS ===== */
.micro-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  padding: 8px;
}

.micro-btn {
  border: 1px solid var(--aim-gray-dark);
  background: var(--aim-gray-light);
  font-size: 8px;
  font-family: var(--font-pixel);
  padding: 2px 6px;
  text-align: center;
  min-width: 80px;
  color: var(--aim-black);
  text-decoration: none;
  font-size: 10px;
}

/* ===== THEME TOGGLE ===== */
.theme-toggle {
  position: fixed;
  bottom: 12px;
  right: 12px;
  z-index: 100;
  border: var(--border-raised);
  background: var(--aim-gray-light);
  padding: 4px 10px;
  font-family: var(--font-pixel);
  font-size: 14px;
  cursor: pointer;
  color: var(--aim-black);
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 2px 2px 0 rgba(0,0,0,0.2);
}
.theme-toggle:hover {
  background: var(--aim-gray);
}
.theme-toggle:active {
  border: var(--border-sunken);
  box-shadow: none;
}

/* ===========================================================
   CAMPFIRE THEME — Night sky + warm campfire glow
   WCAG AA compliant: all text ≥ 4.5:1 contrast ratio
   =========================================================== */
body.theme-campfire {
  --aim-blue: #6AADE4;
  --aim-blue-light: #8FC4ED;
  --aim-blue-dark: #1A3050;
  --aim-yellow: #F5C842;
  --aim-yellow-dark: #E8A820;
  --aim-gray: #3D4A5C;
  --aim-gray-light: #1E2B40;
  --aim-gray-dark: #8896A8;
  --aim-white: #F0E8DA;
  --aim-black: #F0E8DA;
  --aim-bg: #0C1222;
  --aim-link: #6CB8E6;
  --aim-visited: #C49BE8;
  --aim-online: #4ADE6F;
  --aim-away: #F5C842;
  --aim-offline: #E85555;
  --aim-chat-bg: #1A1D10;
  --aim-input-bg: #14203A;
  --aim-titlebar: linear-gradient(to right, #2A1A08, #5C3310);
  --aim-titlebar-inactive: linear-gradient(to right, #1A2030, #2A3448);
  --border-raised: 2px outset #2E3D55;
  --border-sunken: 2px inset #2E3D55;
  --border-groove: 2px groove #2E3D55;
  --border-ridge: 2px ridge #2E3D55;

  background: #0C1222;
  color: #F0E8DA;
  background-image:
    radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.15), transparent),
    radial-gradient(1px 1px at 30% 60%, rgba(255,255,255,0.1), transparent),
    radial-gradient(1px 1px at 50% 10%, rgba(255,255,255,0.12), transparent),
    radial-gradient(1px 1px at 70% 40%, rgba(255,255,255,0.08), transparent),
    radial-gradient(1px 1px at 85% 75%, rgba(255,255,255,0.14), transparent),
    radial-gradient(1px 1px at 15% 85%, rgba(255,255,255,0.1), transparent),
    radial-gradient(1px 1px at 60% 90%, rgba(255,255,255,0.12), transparent),
    radial-gradient(1px 1px at 90% 15%, rgba(255,255,255,0.1), transparent),
    radial-gradient(1px 1px at 40% 35%, rgba(255,255,255,0.08), transparent),
    radial-gradient(1.5px 1.5px at 25% 45%, rgba(255,210,130,0.12), transparent),
    radial-gradient(1.5px 1.5px at 75% 55%, rgba(255,210,130,0.1), transparent);
}

/* ----- Window chrome ----- */
body.theme-campfire .window {
  background: #162038;
  border-color: #2E3D55;
}

body.theme-campfire .window-titlebar {
  background: var(--aim-titlebar);
}

body.theme-campfire .window-titlebar-text {
  color: #F5C842;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.5);
}

body.theme-campfire .window-btn {
  background: #2A3A52;
  color: #B8AA94;
  border-color: #3D4A5C;
}

body.theme-campfire .window-menubar {
  background: #162038;
  border-bottom-color: #2E3D55;
}

body.theme-campfire .window-menu-item {
  color: #B8AA94;
}

body.theme-campfire .window-menu-item:hover {
  background: #E8863A;
  color: #0C1222;
}

body.theme-campfire .window-statusbar {
  background: #162038;
  border-top-color: #2E3D55;
  color: #8896A8;
}

body.theme-campfire .window-body {
  color: #F0E8DA;
}

/* ----- Marquee ----- */
body.theme-campfire .marquee-bar {
  background: #1A1005;
  color: #E8863A;
}

/* ----- Masthead ----- */
body.theme-campfire .masthead {
  border-bottom-color: #2E3D55;
}

body.theme-campfire .masthead-logo {
  color: #E8863A;
}

body.theme-campfire .masthead-sub {
  color: #8896A8;
}

body.theme-campfire .masthead-tagline {
  background: #2A1A08;
  color: #F5C842;
  border-color: #5C3310;
}

/* ----- Toolbar ----- */
body.theme-campfire .toolbar {
  background: #162038;
  border-color: #2E3D55;
}

body.theme-campfire .toolbar-btn {
  background: #1E2B40;
  border-color: #2E3D55;
  color: #B8AA94;
}

body.theme-campfire .toolbar-btn:hover {
  background: #E8863A;
  color: #0C1222;
}

body.theme-campfire .toolbar-btn.active {
  background: #2A1A08;
  color: #F5C842;
  border-color: #5C3310;
}

/* ----- Buddy list ----- */
body.theme-campfire .buddy-list {
  background: #14203A;
  border-color: #2E3D55;
}

body.theme-campfire .buddy-group-header {
  background: #1A2744;
  color: #B8AA94;
  border-bottom-color: #2E3D55;
}

body.theme-campfire .buddy-group-header:hover {
  background: #1E2B40;
}

body.theme-campfire .buddy-group-count {
  color: #6A7A90;
}

body.theme-campfire .buddy-group {
  border-bottom-color: #2E3D55;
}

body.theme-campfire .buddy-item {
  border-bottom-color: #2E3D55;
  color: #F0E8DA;
}

body.theme-campfire .buddy-item:hover {
  background: #E8863A;
  color: #0C1222;
}

body.theme-campfire .buddy-item:hover .buddy-meta,
body.theme-campfire .buddy-item:hover .buddy-blurb {
  color: rgba(12,18,34,0.7);
}

body.theme-campfire .buddy-item:hover .buddy-tag {
  border-color: rgba(12,18,34,0.3);
  background: rgba(12,18,34,0.15);
  color: #0C1222;
}

body.theme-campfire .buddy-name {
  color: #F0E8DA;
}

body.theme-campfire .buddy-blurb {
  color: #8896A8;
}

body.theme-campfire .buddy-meta {
  color: #6A7A90;
}

body.theme-campfire .buddy-stars {
  color: #F5C842;
}

body.theme-campfire .buddy-tag {
  background: #1A2744;
  border-color: #2E3D55;
  color: #8896A8;
}

body.theme-campfire .buddy-status {
  border-color: #2E3D55;
}

/* ----- Post / detail page ----- */
body.theme-campfire .post-title {
  color: #E8863A;
}

body.theme-campfire .post-meta-bar {
  color: #8896A8;
}

body.theme-campfire .post-author {
  color: #6AADE4;
}

body.theme-campfire .post-rating-big {
  color: #F5C842;
}

/* ----- Tabs ----- */
body.theme-campfire .tab-row {
  border-bottom-color: #2E3D55;
}

body.theme-campfire .tab {
  background: #1A2744;
  border-color: #2E3D55;
  color: #8896A8;
}

body.theme-campfire .tab:hover {
  background: #1E2B40;
  color: #B8AA94;
}

body.theme-campfire .tab.active {
  background: #14203A;
  color: #F0E8DA;
  border-bottom-color: #14203A;
}

/* ----- Fact tables ----- */
body.theme-campfire .fact-section-title {
  background: var(--aim-titlebar);
  color: #F5C842;
}

body.theme-campfire .fact-table {
  background: #14203A;
  border-color: #2E3D55;
}

body.theme-campfire .fact-table tr {
  border-bottom-color: #1E2B40;
}

body.theme-campfire .fact-table tr:nth-child(even) {
  background: #1A2744;
}

body.theme-campfire .fact-label {
  color: #E8863A;
}

body.theme-campfire .fact-value {
  color: #D8CCBA;
}

/* ----- Subjective blocks ----- */
body.theme-campfire .subj-block {
  background: #14203A;
  border-color: #2E3D55;
}

body.theme-campfire .subj-block-title {
  background: #1A2744;
  border-bottom-color: #2E3D55;
  color: #E8863A;
}

body.theme-campfire .subj-block-body {
  color: #D8CCBA;
}

/* ----- Flags ----- */
body.theme-campfire .red-flag {
  background: #2A1210;
  border-left-color: #E85555;
  color: #F0C4C0;
}

body.theme-campfire .green-flag {
  background: #0F2218;
  border-left-color: #4ADE6F;
  color: #C0F0D0;
}

/* ----- Away message / gossip ----- */
body.theme-campfire .away-message {
  background: #1A1D10;
  border-color: #2E3A1E;
  color: #D8CCBA;
}

body.theme-campfire .away-message::before {
  color: #6A7A4A;
}

/* ----- Chat / reviews ----- */
body.theme-campfire .chat-area {
  background: #14203A;
  border-color: #2E3D55;
}

body.theme-campfire .chat-message {
  border-bottom-color: #1E2B40;
  color: #D8CCBA;
}

body.theme-campfire .chat-screenname {
  color: #6AADE4;
}

body.theme-campfire .chat-screenname.them {
  color: #E8863A;
}

body.theme-campfire .chat-timestamp {
  color: #6A7A90;
}

body.theme-campfire .chat-stars {
  color: #F5C842;
}

body.theme-campfire .chat-input-area {
  background: #162038;
  border-top-color: #2E3D55;
}

/* ----- Forms & inputs ----- */
body.theme-campfire .form-input,
body.theme-campfire .form-select,
body.theme-campfire .form-textarea,
body.theme-campfire .chat-input-field {
  background: #14203A;
  color: #F0E8DA;
  border-color: #2E3D55;
}

body.theme-campfire .form-input:focus,
body.theme-campfire .form-select:focus,
body.theme-campfire .form-textarea:focus,
body.theme-campfire .chat-input-field:focus {
  outline-color: #E8863A;
}

body.theme-campfire .form-label {
  color: #E8863A;
}

body.theme-campfire .form-hint {
  color: #6A7A90;
}

body.theme-campfire .form-divider {
  background: var(--aim-titlebar);
  color: #F5C842;
}

body.theme-campfire .form-radio-group,
body.theme-campfire .form-checkbox-group {
  color: #B8AA94;
}

/* ----- Buttons ----- */
body.theme-campfire .btn {
  background: #1E2B40;
  border-color: #2E3D55;
  color: #D8CCBA;
}

body.theme-campfire .btn:hover {
  background: #2A3A52;
}

body.theme-campfire .btn-primary {
  background: #A85A20;
  color: #F0E8DA;
  border-color: #C06A28;
}

body.theme-campfire .btn-primary:hover {
  background: #C06A28;
}

/* ----- Back link ----- */
body.theme-campfire .back-link {
  color: #6CB8E6;
}

body.theme-campfire .back-link:hover {
  color: #E8863A;
}

/* ----- Links ----- */
body.theme-campfire a {
  color: #6CB8E6;
}

body.theme-campfire a:visited {
  color: #C49BE8;
}

body.theme-campfire a:hover {
  color: #E8863A;
}

/* ----- Visitor counter ----- */
body.theme-campfire .visitor-counter {
  color: #6A7A90;
}

body.theme-campfire .counter-img {
  background: #0A0E18;
  color: #E8863A;
  border-color: #2E3D55;
}

/* ----- Micro buttons ----- */
body.theme-campfire .micro-btn {
  background: #1A2744;
  border-color: #2E3D55;
  color: #8896A8;
}

/* ----- Star picker ----- */
body.theme-campfire .star-picker span {
  color: #2E3D55;
}

body.theme-campfire .star-picker span.lit {
  color: #F5C842;
}

/* ----- Scrollbar (dark) ----- */
body.theme-campfire ::-webkit-scrollbar-track {
  background: #0C1222;
  border-color: #1E2B40;
}

body.theme-campfire ::-webkit-scrollbar-thumb {
  background: #2A3A52;
  border-color: #2E3D55;
}

/* ----- Theme toggle in campfire ----- */
body.theme-campfire .theme-toggle {
  background: #1E2B40;
  color: #E8863A;
  border-color: #2E3D55;
  box-shadow: 2px 2px 0 rgba(0,0,0,0.4);
}

body.theme-campfire .theme-toggle:hover {
  background: #2A3A52;
}

/* ----- Focus outline accessibility ----- */
body.theme-campfire *:focus-visible {
  outline: 2px solid #E8863A;
  outline-offset: 2px;
}

/* ===== ACCESSIBILITY: both themes ===== */
@media (prefers-reduced-motion: reduce) {
  .marquee-content { animation: none; }
  * { transition: none !important; }
}

*:focus-visible {
  outline: 2px solid var(--aim-blue);
  outline-offset: 2px;
}

/* ===== CONTENT BLOCKS (used on static pages) ===== */
.content-block {
  background: white;
  border: var(--border-sunken);
  padding: 10px;
}

body.theme-campfire .content-block {
  background: #14203A;
  color: #D8CCBA;
  border-color: #2E3D55;
}

body.theme-campfire .content-block a {
  color: #6CB8E6;
}

body.theme-campfire .content-block a:visited {
  color: #C49BE8;
}

body.theme-campfire .content-block em {
  color: #E8863A;
}
