:root {
  --ink: #eaeaea;
  --void: #0a0a0a;
  --panel: #131313;
  --line: #2a2a2a;
  --accent: #eaeaea;
  --amber: #b08a3e;
}

* { box-sizing: border-box; }

body {
  background: var(--void);
  color: var(--ink);
  font-family: "Courier New", Courier, monospace;
  font-size: 15px;
  margin: 0;
  line-height: 1.55;
}

/* ---------- header / nav ---------- */

.site-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line);
  letter-spacing: 0.06em;
  position: relative;
}

.wordmark {
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  opacity: 0.75;
}
.wordmark:hover { opacity: 1; }
.wordmark-svg {
  height: 20px;
  width: auto;
  display: block;
}

.hamburger {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}
.hamburger span {
  width: 20px;
  height: 2px;
  background: var(--ink);
  transition: all 0.2s;
  opacity: 0.75;
}
.hamburger:hover span { opacity: 1; }
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }

.site-header nav {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  width: 240px;
  height: 100vh;
  background: var(--void);
  border-left: 1px solid var(--line);
  padding: 4rem 1.5rem 1.5rem;
  flex-direction: column;
  gap: 0.6rem;
  z-index: 1000;
}
.site-header nav.nav-open { display: flex; }

.site-header nav a, .nav-dropdown-toggle {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.8rem;
  text-transform: lowercase;
  opacity: 0.75;
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
  padding: 0.5rem 0;
  text-align: left;
  width: 100%;
  line-height: inherit;
  letter-spacing: inherit;
}
.site-header nav a:hover, .nav-dropdown-toggle:hover { opacity: 1; }

.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  display: none;
  flex-direction: column;
  gap: 0.4rem;
  padding-left: 1rem;
  margin-top: 0.4rem;
}
.nav-dropdown-menu.open { display: flex; }
.nav-dropdown-menu a {
  padding: 0.4rem 0;
  font-size: 0.75rem;
}
.nav-logout-form { margin: 0; }
.nav-logout-btn {
  background: none; border: none; color: var(--ink); font-family: inherit;
  font-size: 0.75rem; opacity: 0.75; cursor: pointer; padding: 0.4rem 0;
  text-align: left; width: 100%; text-transform: lowercase;
}
.nav-logout-btn:hover { opacity: 1; }

.nav-divider {
  height: 1px;
  background: var(--line);
  margin: 0.5rem 0;
  display: block;
}

/* ---------- layout ---------- */

main { padding: 1.5rem 1.25rem; max-width: 900px; margin: 0 auto; }

/* ---------- landing ---------- */

.landing {
  text-align: center;
  padding: 3.5rem 0.5rem;
}
.landing-line {
  font-family: Georgia, serif;
  font-size: clamp(1.25rem, 5vw, 1.8rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.landing-instructions {
  font-size: 0.8rem;
  opacity: 0.7;
  font-style: italic;
  padding: 0 0.5rem;
}
.landing-address {
  margin-top: 1.5rem;
  font-size: 0.8rem;
  opacity: 0.65;
  line-height: 1.6;
  letter-spacing: 0.05em;
}
.landing-links {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  justify-content: center;
}
.landing-links a {
  color: var(--ink);
  text-decoration: none;
  opacity: 0.75;
  font-size: 0.8rem;
  text-transform: lowercase;
  letter-spacing: 0.05em;
}
.landing-links a:hover { opacity: 1; }

/* ---------- forms ---------- */

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 100%;
  width: 100%;
}
/* Compose areas next to content (forum reply, wall comment, DM box)
   stretch to the full content width instead of the auth-form cap. */
.auth-form.compose { max-width: none; }
.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.8rem;
  text-transform: lowercase;
}
.auth-form input, .auth-form textarea {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 0.65rem;
  font-family: inherit;
  font-size: 0.95rem; /* iOS zooms in on inputs below 16px; keep close to that */
  width: 100%;
}
.auth-form button, .thread + form button {
  background: var(--ink);
  color: var(--void);
  border: none;
  padding: 0.7rem 1rem;
  cursor: pointer;
  text-transform: lowercase;
  font-size: 0.9rem;
}

/* ---------- flashes ---------- */

.flashes { list-style: none; padding: 0; }
.flash { padding: 0.6rem 1rem; border: 1px solid var(--line); margin-bottom: 0.5rem; font-size: 0.85rem; }
.flash-error { border-color: #7a2a2a; }
.flash-success { border-color: #2a5a2a; }

/* ---------- image grids (wall, gallery) ---------- */

.postcard-grid, .gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.5rem;
}
.postcard img, .gallery-image img { width: 100%; display: block; }

/* ---------- lists ---------- */

.post-list, .conversation-list, .event-list { list-style: none; padding: 0; }
.post-list li, .event-list li { padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
.post-author { opacity: 0.6; font-size: 0.8rem; }

.conversation-list li { padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
.conversation-list a { color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 0.6rem; }
.convo-handle { opacity: 0.75; }
.conversation-list li.unread .convo-handle { font-weight: bold; opacity: 1; }
.convo-preview { margin: 0.3rem 0 0; font-size: 0.8rem; opacity: 0.55; }
.new-message-link { color: var(--ink); text-decoration: none; opacity: 0.8; font-size: 0.85rem; }
.new-message-link:hover { opacity: 1; }

.handle-results { list-style: none; padding: 0; margin-top: 0.75rem; display: flex; flex-direction: column; gap: 0.4rem; }
.handle-results a {
  display: block; color: var(--ink); text-decoration: none; border: 1px solid var(--line);
  padding: 0.5rem 0.75rem; font-size: 0.9rem;
}
.handle-results a:hover { border-color: var(--ink); }

.thread { display: flex; flex-direction: column; gap: 0.6rem; margin: 1.5rem 0; }
.message-row { position: relative; max-width: 75%; }
.message-row.mine { align-self: flex-end; }
.message-row.theirs { align-self: flex-start; }
.message-row p {
  padding: 0.6rem 0.9rem; border: 1px solid var(--line); margin: 0; font-size: 0.9rem;
}
.message-row.mine p { background: var(--panel); }
.deleted-message { opacity: 0.45; font-style: italic; }
.inline-delete-form { position: absolute; top: -9px; right: -9px; margin: 0; }
.tiny-delete-btn {
  background: var(--void); border: 1px solid var(--line); border-radius: 50%;
  width: 18px; height: 18px; display: flex; align-items: center; justify-content: center;
  color: var(--ink); opacity: 0.55; cursor: pointer; font-size: 0.7rem; line-height: 1;
  padding: 0; font-family: inherit;
}
.tiny-delete-btn:hover { opacity: 1; border-color: var(--ink); }

.char-count { font-size: 0.7rem; opacity: 0.5; margin: 0.3rem 0 0; }

h1 a { color: var(--ink); text-decoration: underline; opacity: 0.9; }
h1 a:hover { opacity: 1; }

.conversation-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; }
.conversation-header form { margin: 0; }
.conversation-actions { display: flex; flex-wrap: wrap; gap: 1rem; }
.conversation-actions form { margin: 0; }

.message-search { display: flex; gap: 0.5rem; margin: 1rem 0 1.5rem; }
.message-search input {
  flex: 1; background: var(--panel); border: 1px solid var(--line); color: var(--ink);
  padding: 0.6rem; font-family: inherit; font-size: 0.9rem;
}

.nav-glow {
  font-weight: bold;
  opacity: 1 !important;
  text-shadow: 0 0 6px rgba(234, 234, 234, 0.85), 0 0 14px rgba(234, 234, 234, 0.5);
}

.tag-filter { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; }
.tag-filter a {
  color: var(--ink);
  opacity: 0.6;
  text-decoration: none;
  font-size: 0.8rem;
}

.quoted {
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.8rem;
  border-left: 2px solid var(--line);
  padding: 0.6rem 0.75rem;
  margin: 0 0 0.75rem;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- forum ---------- */

.mini-avatar {
  width: 20px;
  height: 20px;
  object-fit: cover;
  border: 1px solid var(--line);
  vertical-align: -4px;
  margin-right: 0.3rem;
}
.post-author { display: flex; align-items: center; gap: 0.3rem; opacity: 0.6; font-size: 0.8rem; }

.reply, .forum-post { display: flex; flex-direction: column; gap: 0.5rem; background: var(--panel); border-left: 2px solid var(--line); padding: 1rem; margin: 0 0 1.25rem; }
.forum-post h1 { margin: 0 0 0.75rem; font-size: 1.2rem; line-height: 1.4; border-bottom: 1px solid var(--line); padding-bottom: 0.75rem; }

.post-meta, .reply-author { display: flex; flex-direction: row; align-items: center; gap: 0.5rem; opacity: 0.75; font-size: 0.8rem; margin: 0; }
.post-meta .mini-avatar, .reply-author .mini-avatar { width: 56px; height: 56px; margin-right: 0; }
.post-content { flex: 1; min-width: 0; }

.post-body, .reply-body {
  line-height: 1.6;
}
.reply-body { margin: 0; }
.author-date { font-size: 0.65rem; opacity: 0.5; }
.edited-mark { font-size: 0.65rem; opacity: 0.45; font-style: italic; }
.author-link { color: var(--ink); text-decoration: none; }
.author-link:hover { text-decoration: underline; }
.reply-content { flex: 1; min-width: 0; }

.forum-images { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.75rem 0 0; }
.forum-image {
  width: 120px; height: 120px; object-fit: cover;
  border: 1px solid var(--line); cursor: zoom-in;
}
.forum-image:hover { border-color: var(--ink); }
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: none; border: 1px solid var(--line); color: var(--ink);
  font-size: 1.5rem; cursor: pointer; padding: 0.5rem 0.75rem;
  opacity: 0.7; z-index: 1001; font-family: inherit; line-height: 1;
}
.lightbox-nav:hover { opacity: 1; border-color: var(--ink); }
.lightbox-nav.prev { left: 0.75rem; }
.lightbox-nav.next { right: 0.75rem; }
#forum-lightbox img { max-width: 92%; max-height: 92%; border: 1px solid var(--line); }

.pinned-section { margin-bottom: 0.5rem; }
.pinned-section .section-head { margin-bottom: 0.5rem; }

.convo-subtitle { font-size: 0.8rem; opacity: 0.6; margin: 0 0 1rem; }
.thread-rename-form { display: flex; gap: 0.5rem; margin: 0 0 1rem; }
.thread-rename-form input {
  background: var(--panel); border: 1px solid var(--line); color: var(--ink);
  padding: 0.4rem 0.6rem; font-family: inherit; font-size: 0.85rem; width: 260px;
}
.convo-partner { opacity: 0.6; }

.message-time { font-size: 0.65rem; opacity: 0.5; margin: 0; }
/* Override the message-bubble <p> styling: the timestamp sits directly
   below the bubble, no box of its own, aligned to its side. */
.message-row p.message-time {
  font-size: 0.65rem; opacity: 0.5; margin: 0.2rem 0 0;
  padding: 0; border: none; background: none;
}
.message-row.mine .message-time { text-align: right; }

.alert-list { list-style: none; padding: 0; }
.alert-list li { padding: 0.75rem 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.alert-link { color: var(--ink); text-decoration: none; opacity: 0.7; }
.alert-link:hover { opacity: 1; text-decoration: underline; }
.alert-item.unread .alert-link { opacity: 1; font-weight: bold; text-shadow: 0 0 6px rgba(234, 234, 234, 0.5); }
.alert-date { font-size: 0.7rem; opacity: 0.5; white-space: nowrap; }
.alert-meta { display: flex; align-items: center; gap: 0.75rem; }

.flavor-note { font-size: 0.75rem; opacity: 0.55; font-style: italic; margin: 0; }

.auth-form input[type="file"] {
  border: none; background: none; padding: 0.4rem 0; font-size: 0.85rem;
}

.bb-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem; margin: 0 0 0.4rem; }
/* Higher specificity than .auth-form button / .thread + form button, so the
   toolbar keeps its small dark-chip look even inside those forms (notably
   the DM compose form, which follows a .thread div). */
main .bb-toolbar button {
  background: var(--panel); border: 1px solid var(--line); color: var(--ink);
  padding: 0.15rem 0.55rem; cursor: pointer; font-family: inherit; font-size: 0.8rem;
}
main .bb-toolbar button:hover { border-color: var(--ink); }
.bb-toolbar-colors { display: inline-flex; gap: 0.25rem; }
.bb-color-red { color: #d45a5a; }
.bb-color-amber { color: #c9a227; }
.bb-color-green { color: #6fae6f; }
.bb-color-blue { color: #7a9fd4; }
.bb-color-purple { color: #b07ad4; }

.video-embed {
  border: 1px solid var(--line); background: var(--panel);
  padding: 0.5rem; margin: 0.75rem 0;
}
.video-embed iframe {
  width: 100%; aspect-ratio: 16 / 9; border: 0; display: block;
}

.card-thread-image { display: inline-block; margin: 0 0 0.75rem; }
.card-thread-image img {
  max-width: min(100%, 420px); border: 1px solid var(--line);
}
.card-thread-image:hover img { border-color: var(--ink); }

.post-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.5rem 0 0; }
.post-tags .tag-chip { background: rgba(255, 255, 255, 0.06); }
.post-content .post-tags { border-bottom: 1px solid var(--line); padding-bottom: 0.75rem; }
.tag-chip {
  color: var(--ink); text-decoration: none;
  border: 1px solid var(--line);
  padding: 0.08rem 0.5rem;
  font-size: 0.7rem;
  line-height: 1.4;
  opacity: 0.8;
  letter-spacing: 0.05em;
  display: inline-block;
}
a.tag-chip:hover { opacity: 1; border-color: var(--ink); }
.tag-chip.active { border-color: var(--ink); opacity: 1; }
.tag-toggle { display: inline-flex; cursor: pointer; }
.tag-toggle input { display: none; }
.tag-toggle input:checked + .tag-chip { border-color: var(--ink); opacity: 1; }
.tag-toggle-group { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.page-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.page-head h1 { font-size: 1.5rem; margin: 0; }
.page-head h1 a { color: var(--ink); text-decoration: none; }
.page-head h1 a:hover { text-decoration: underline; }
.new-thread-link {
  color: var(--ink); opacity: 0.8; font-size: 0.85rem; text-decoration: none;
  border: 1px solid var(--line); padding: 0.3rem 0.7rem;
}
.new-thread-link:hover { opacity: 1; border-color: var(--ink); }

.tag-filter { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem; }
.tag-filter a { color: var(--ink); text-decoration: none; opacity: 0.7; }
.tag-filter a:hover { opacity: 1; }

.category-filter { display: flex; flex-wrap: wrap; gap: 0.4rem; }

/* board chips live in a bordered panel with a title riding the top edge */
.chip-panel {
  border: 1px solid var(--line);
  padding: 0.9rem 0.75rem 0.6rem;
  margin-bottom: 0.75rem;
  position: relative;
}
.chip-panel-title {
  position: absolute;
  top: 0;
  left: 0.6rem;
  transform: translateY(-50%);
  background: var(--void);
  padding: 0 0.35rem;
  font-size: 0.7rem;
  opacity: 0.6;
  text-transform: lowercase;
  letter-spacing: 0.05em;
}

/* board chips on the forum home: hover shows the board's short description
   via a pure-CSS tooltip (data-tip + ::after). No wrapper elements, so
   every chip is a bare flex child with an identical box. */
.tag-chip[data-tip] { position: relative; }
.tag-chip[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.7rem;
  font-style: italic;
  padding: 0.3rem 0.5rem;
  max-width: 240px;
  width: max-content;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
  z-index: 20;
}
.tag-chip[data-tip]:hover::after { opacity: 1; }

/* board description banner on /forum/?category= pages */
.category-description {
  margin: 0.4rem 0;
  background-color: darkslategray;
  padding: 5px;
  font-weight: bold;
}
.category-rule { border: none; border-top: 1px solid var(--line); margin: 0.6rem 0; }
.child-chip { opacity: 0.55; }
.child-chip:hover { opacity: 1; }
.thread-breadcrumb { font-size: 0.75rem; opacity: 0.6; margin: 0 0 0.75rem; }
.thread-views { font-size: 0.7rem; opacity: 0.5; margin: 0 0 0.75rem; }
.mention { color: var(--amber); text-decoration: none; }
.mention:hover { text-decoration: underline; }

.forum-search { display: flex; gap: 0.5rem; margin: 1rem 0 1rem; }
.forum-search input {
  flex: 1; background: var(--panel); border: 1px solid var(--line); color: var(--ink);
  padding: 0.6rem; font-family: inherit; font-size: 0.9rem;
}
.forum-search button {
  background: var(--ink); color: var(--void); border: none; padding: 0.6rem 0.9rem;
  cursor: pointer; font-family: inherit; font-size: 0.85rem; text-transform: lowercase;
}

.covet-btn {
  color: var(--ink); opacity: 0.7; font-size: 0.75rem; text-decoration: none;
  border: 1px solid var(--line); padding: 0.15rem 0.5rem;
  background: none; cursor: pointer; font-family: inherit; line-height: inherit;
}
.covet-btn:hover { opacity: 1; border-color: var(--ink); }
.covet-btn.coveted { border-color: var(--amber); color: var(--amber); opacity: 1; }

.tag-index { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr; gap: 0 1.25rem; }
.tag-index li { display: flex; align-items: center; gap: 0.75rem; padding: 0.4rem 0; border-bottom: 1px solid var(--line); min-width: 0; }
.tag-count { font-size: 0.75rem; opacity: 0.5; }

.post-list .post-row { display: flex; flex-direction: column; gap: 0.45rem; padding: 1rem 16px; }
.post-row-head { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; align-self: flex-start; max-width: 100%; }
.post-row-title { color: var(--ink); text-decoration: none; font-size: 1.05rem; line-height: 1.45; min-width: 0; }
.post-row-title:hover { text-decoration: underline; }
.post-list .post-row:nth-child(even) { background: rgba(255, 255, 255, 0.03); }
.post-list .post-row.pinned { background: rgba(255, 255, 255, 0.04); }
.post-row-sub { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.3rem 1rem; font-size: 0.8rem; }
.post-row-author { display: flex; align-items: center; gap: 0.35rem; opacity: 0.65; }
.post-row-author .mini-avatar { width: 56px; height: 56px; margin-right: 0; }
.post-row-stats { opacity: 0.5; font-size: 0.75rem; }
.empty-note { opacity: 0.55; font-style: italic; margin: 0; }

.post-actions, .reply-actions { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 0.6rem; }
.reply-actions { border-top: 1px solid var(--line); padding-top: 0.6rem; }
.action-group { display: flex; align-items: center; gap: 1rem; }
.delete-btn {
  color: var(--ink); opacity: 0.7; font-size: 0.75rem; text-decoration: none;
  border: 1px solid #7a2a2a; padding: 0.15rem 0.5rem;
  background: none; cursor: pointer; font-family: inherit; line-height: inherit;
}
.delete-btn:hover { opacity: 1; border-color: #9a3a3a; }
.chip-btn {
  color: var(--ink); opacity: 0.7; font-size: 0.75rem; text-decoration: none;
  border: 1px solid var(--line); padding: 0.15rem 0.5rem;
  background: none; cursor: pointer; font-family: inherit; line-height: inherit;
}
.chip-btn:hover { opacity: 1; border-color: var(--ink); }
.reply-quote {
  color: var(--ink); opacity: 0.55; font-size: 0.75rem; text-decoration: none;
  border: 1px solid var(--line); padding: 0.15rem 0.5rem;
}
.reply-quote:hover { opacity: 1; border-color: var(--ink); }

.section-head {
  font-size: 0.75rem;
  font-weight: normal;
  letter-spacing: 0.15em;
  opacity: 0.55;
  border-top: 1px solid var(--line);
  padding-top: 0.9rem;
  margin: 1rem 0 1.25rem;
}
.section-head::before { content: "\2726  "; }
/* The messages section on the alerts page sits above the alerts section —
   it keeps its ✦ but drops the rule so only one bar shows. */
.section-head-plain { border-top: none; padding-top: 0; }

.tag-fieldset { border: 1px solid var(--line); padding: 0.75rem; }
.tag-fieldset legend { font-size: 0.75rem; opacity: 0.6; text-transform: uppercase; letter-spacing: 0.1em; padding: 0 0.4rem; }
.tag-checkbox { display: flex; flex-direction: row; align-items: center; gap: 0.4rem; font-size: 0.85rem; }
.tag-create-form { display: flex; gap: 0.5rem; margin: 0 0 1.25rem; }
.tag-create-form input {
  flex: 1; max-width: 240px; background: var(--panel); border: 1px solid var(--line);
  color: var(--ink); padding: 0.5rem; font-family: inherit; font-size: 0.9rem;
}
.tag-create-form button {
  background: var(--ink); color: var(--void); border: none; padding: 0.5rem 0.9rem;
  cursor: pointer; font-family: inherit; font-size: 0.85rem; text-transform: lowercase;
}
.tag-edit-form { display: flex; gap: 0.4rem; align-items: center; }
.tag-edit-form input {
  width: 140px; background: var(--panel); border: 1px solid var(--line);
  color: var(--ink); padding: 0.3rem 0.5rem; font-family: inherit; font-size: 0.85rem;
}
.tag-actions { display: flex; gap: 0.6rem; }

/* ---------- admin ---------- */

.admin-nav { list-style: none; padding: 0; }
.admin-nav li { padding: 0.5rem 0; }
.admin-note { opacity: 0.55; font-size: 0.8rem; font-style: italic; margin-top: 2rem; }

.table-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.admin-table { width: 100%; min-width: 480px; border-collapse: collapse; font-size: 0.85rem; }
.admin-table th, .admin-table td { text-align: left; padding: 0.5rem; border-bottom: 1px solid var(--line); white-space: nowrap; }

.checkbox-label { flex-direction: row !important; align-items: center; gap: 0.5rem !important; }
.checkbox-label input { width: auto; }

.link-button {
  background: none; border: none; color: var(--ink); opacity: 0.6;
  text-decoration: underline; cursor: pointer; font-family: inherit; font-size: inherit; padding: 0;
}
.link-button:hover { opacity: 1; }

.credential-block { border: 1px solid var(--line); padding: 1.25rem; max-width: min(400px, 100%); }
.credential-block dt { font-size: 0.75rem; opacity: 0.6; text-transform: uppercase; letter-spacing: 0.1em; margin-top: 1rem; }
.credential-block dt:first-child { margin-top: 0; }
.temp-password { font-family: "Courier New", monospace; font-size: 1.3rem; letter-spacing: 0.05em; word-break: break-all; }

.postcard-preview { max-width: min(400px, 100%); margin-top: 1.5rem; }
.postcard-preview img { width: 100%; }

.admin-reply-list { list-style: none; padding: 0; }
.admin-reply-list li {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1rem;
  padding: 0.4rem 0; border-bottom: 1px solid var(--line); font-size: 0.85rem;
}

.restriction-fieldset { border: 1px solid var(--line); padding: 1rem; display: flex; flex-direction: column; gap: 0.6rem; }
.restriction-fieldset legend { font-size: 0.75rem; opacity: 0.6; text-transform: uppercase; letter-spacing: 0.1em; padding: 0 0.4rem; }

.password-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.password-row input { flex: 1 1 160px; }
.password-row button {
  background: none; border: 1px solid var(--line); color: var(--ink);
  padding: 0.6rem 0.9rem; cursor: pointer; font-family: inherit; font-size: 0.8rem; text-transform: lowercase;
}
.password-row button:hover { border-color: var(--ink); }

.admin-warning { color: #c98a4b; opacity: 0.9; }

.badge {
  display: inline-block; border: 1px solid var(--line); font-size: 0.7rem;
  padding: 0.1rem 0.4rem; margin-right: 0.3rem; opacity: 0.75; text-transform: lowercase;
}

/* ---------- postcard management ---------- */

.postcard-manage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}
.postcard-manage-item { border: 1px solid var(--line); padding: 0.5rem; font-size: 0.75rem; }
.postcard-manage-item img { width: 100%; display: block; margin-bottom: 0.4rem; }
.postcard-manage-item a { color: var(--ink); }
.postcard-manage-item .interaction-count { opacity: 0.55; margin: 0.2rem 0; }

.section-divider { border: none; border-top: 1px solid var(--line); margin: 2.5rem 0; }

/* ---------- postcard interactions ---------- */

.interaction-count {
  font-size: 0.7rem;
  opacity: 0.6;
  text-align: center;
  margin-top: 0.3rem;
}

.postcard-detail-image { max-width: min(500px, 100%); margin: 0 auto 1.5rem; }
.postcard-detail-image img { width: 100%; display: block; border: 1px solid var(--line); }

.like-row { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 2rem; }
/* chip look, matching the forum's covet buttons */
.like-button {
  background: none; border: 1px solid var(--line); color: var(--ink);
  padding: 0.15rem 0.5rem; cursor: pointer; font-family: inherit;
  font-size: 0.75rem; text-transform: lowercase; opacity: 0.7; line-height: inherit;
}
.like-button:hover { opacity: 1; border-color: var(--ink); }
.like-button.liked { border-color: var(--amber); color: var(--amber); opacity: 1; }
.like-count { font-size: 0.8rem; opacity: 0.7; }

.comment-list { list-style: none; padding: 0; margin: 1rem 0 2rem; }
.comment-list li { border-bottom: 1px solid var(--line); padding: 0.7rem 0; font-size: 0.85rem; }
.comment-author { opacity: 0.6; font-size: 0.75rem; display: block; margin-bottom: 0.2rem; }

.guest-prompt { opacity: 0.6; font-size: 0.85rem; font-style: italic; }

.back-link { display: inline-block; margin-bottom: 1.5rem; opacity: 0.7; font-size: 0.85rem; text-decoration: none; color: var(--ink); }
.back-link:hover { opacity: 1; }

.comment-author { color: var(--ink); text-decoration: underline; }

.admin-comment-list { list-style: none; padding: 0; margin-top: 1rem; }
.admin-comment-list li { border-bottom: 1px solid var(--line); padding: 0.75rem 0; display: flex; flex-direction: column; gap: 0.5rem; }
.admin-comment-edit-form { display: flex; flex-direction: column; gap: 0.4rem; }
.admin-comment-edit-form textarea {
  background: var(--panel); border: 1px solid var(--line); color: var(--ink);
  font-family: inherit; padding: 0.5rem; width: 100%;
}
.admin-comment-actions { display: flex; gap: 0.5rem; }

.small-button {
  background: none; border: 1px solid var(--line); color: var(--ink);
  padding: 0.4rem 0.8rem; cursor: pointer; font-family: inherit; font-size: 0.8rem; text-transform: lowercase;
}
.small-button:hover { border-color: var(--ink); }

/* ---------- profile ---------- */

.profile-header {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.profile-avatar {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border: 1px solid var(--line);
  flex-shrink: 0;
}
.profile-info { flex: 1; min-width: 0; }
.bio { opacity: 0.8; font-style: italic; margin: 0.5rem 0; }

.social-links { margin: 1.5rem 0; }
.social-links h3 { font-size: 0.85rem; text-transform: lowercase; opacity: 0.7; margin-bottom: 0.5rem; }
.social-links-display { list-style: none; padding: 0; }
.social-links-display li { padding: 0.3rem 0; font-size: 0.85rem; }
.platform-name { opacity: 0.6; text-transform: lowercase; }
.platform-handle { opacity: 0.9; }

.entry-postcard {
  max-width: clamp(160px, 55vw, 300px);
  margin: 1.25rem auto;
}
.entry-postcard img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--line);
}
.entry-postcard figcaption {
  text-align: center;
  font-size: 0.7rem;
  opacity: 0.55;
  margin-top: 0.4rem;
  text-transform: lowercase;
  letter-spacing: 0.05em;
}

/* ---------- userCP ---------- */

.usercp-sections {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.usercp-section {
  border: 1px solid var(--line);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.usercp-section h2 {
  font-size: 0.85rem;
  text-transform: lowercase;
  opacity: 0.9;
  margin: 0 0 0.25rem;
}
.usercp-section p {
  font-size: 0.75rem;
  opacity: 0.6;
  margin: 0;
}
.usercp-link {
  color: var(--ink);
  text-decoration: underline;
  opacity: 0.75;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}
.usercp-link:hover { opacity: 1; }

.avatar-preview {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border: 1px solid var(--line);
  margin: 0.5rem 0;
}

.current-avatar {
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
}
.current-avatar img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.cancel-link {
  color: var(--ink);
  text-decoration: none;
  opacity: 0.6;
  font-size: 0.85rem;
  margin-top: 0.5rem;
  display: inline-block;
}
.cancel-link:hover { opacity: 1; }

.auth-form small {
  opacity: 0.6;
  font-size: 0.7rem;
  margin-top: -0.2rem;
}

.inline-form {
  display: inline;
  margin: 0;
}

.danger-button, .toggle-button {
  background: none;
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.75rem;
  text-transform: lowercase;
  opacity: 0.7;
  height: 2rem;
  line-height: 1;
}
.danger-button:hover {
  border-color: #7a2a2a;
  opacity: 1;
}
.toggle-button:hover {
  border-color: var(--ink);
  opacity: 1;
}

.social-links-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1rem 0 2rem;
}
.social-link-item {
  border: 1px solid var(--line);
  padding: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}
.link-info {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: baseline;
  flex: 1;
}
.link-info strong { opacity: 0.9; }
.link-handle { opacity: 0.7; font-size: 0.85rem; }
.link-status {
  font-size: 0.7rem;
  text-transform: lowercase;
  opacity: 0.5;
}
.link-status.visible { opacity: 0.6; }
.link-status.hidden { opacity: 0.4; }

.link-actions {
  display: flex;
  gap: 0.5rem;
}

/* ---------- lightbox ---------- */

.gallery-grid .gallery-image img { cursor: zoom-in; }

.pagination {
  display: flex; align-items: center; justify-content: center; gap: 1.5rem;
  margin-top: 2rem; font-size: 0.8rem;
}
.pagination a { color: var(--ink); text-decoration: none; opacity: 0.75; border: 1px solid var(--line); padding: 0.25rem 0.6rem; }
.pagination a:hover { opacity: 1; border-color: var(--ink); }
.pagination span { opacity: 0.55; }

.lightbox {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.92);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem; z-index: 1000; cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: 100%; max-height: 100%; object-fit: contain;
}

/* =========================================================
   Desktop enhancements — mobile styles above are the baseline
   ========================================================= */

@media (min-width: 640px) {
  body { font-size: 16px; }

  .site-header { padding: 1.5rem 2rem; letter-spacing: 0.08em; }
  .wordmark-svg { height: 24px; }

  .hamburger { display: none; }

  .site-header nav {
    display: flex !important;
    position: static;
    width: auto;
    height: auto;
    background: transparent;
    border: none;
    padding: 0;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem 1.1rem;
  }

  .site-header nav a, .nav-dropdown-toggle {
    font-size: 0.85rem;
    padding: 0;
    width: auto;
  }

  .nav-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--void);
    border: 1px solid var(--line);
    padding: 0.75rem;
    margin-top: 0.5rem;
    min-width: 140px;
  }

  main { padding: 3rem 2rem; }

  .landing { padding: 8rem 0; }
  .landing-line { letter-spacing: 0.2em; }
  .landing-instructions { font-size: 0.85rem; }

  .auth-form { max-width: 320px; }

  .reply, .forum-post { flex-direction: row; gap: 1rem; }
  .reply-author, .post-meta { flex-direction: column; align-items: center; width: 64px; flex-shrink: 0; gap: 0.25rem; }
  .post-content { flex: 1; min-width: 0; }

  .postcard-grid, .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
  }

  .lightbox { padding: 2rem; }

  .entry-postcard { margin: 1.5rem auto; }

  .profile-avatar {
    width: 100px;
    height: 100px;
  }

  .profile-header {
    gap: 1.5rem;
  }
}

@media (min-width: 960px) {
  main { max-width: 900px; }
  /* sigils page: three columns on wide screens */
  .tag-index { grid-template-columns: repeat(3, 1fr); }
}
