.beta-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 0;
  margin: 0 0 14px;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--cream-border);
}
.beta-nav a {
  display: inline;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--wood) !important;
  text-decoration: none !important;
  font-size: 0.95rem;
  font-weight: 600;
}
.beta-nav a:not(:last-child)::after {
  content: "·";
  margin: 0 10px;
  color: rgba(92, 64, 40, 0.45);
  font-weight: 400;
  text-decoration: none;
  pointer-events: none;
}
.beta-nav a:hover {
  text-decoration: underline !important;
}
.beta-nav a.active {
  font-weight: 800;
  text-decoration: underline !important;
}

.beta-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
}
@media (max-width: 900px) {
  .beta-layout { grid-template-columns: 1fr; }
}

.beta-wiki-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}
.beta-wiki-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
}
.beta-wiki-links img {
  width: 22px;
  height: 22px;
}

.live-chat {
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #fffdf8, #f7efe3);
  border: 1px solid var(--cream-border);
  border-radius: 16px;
  overflow: hidden;
  min-height: 420px;
  max-height: 620px;
}
.live-chat-head {
  padding: 12px 14px;
  background: var(--wood);
  color: #fff;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.live-chat-head .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #c4b5a5;
  box-shadow: none;
  opacity: 0.75;
  display: inline-block; margin-right: 6px;
  vertical-align: middle;
}
.live-chat-head .dot.online {
  background: #7dcea0;
  box-shadow: 0 0 0 3px rgba(125,206,160,0.25);
  opacity: 1;
}
.live-chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(255,255,255,0.35);
}
.chat-bubble {
  max-width: 88%;
  padding: 9px 12px;
  border-radius: 14px;
  font-size: 0.92rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.chat-bubble.tester {
  align-self: flex-end;
  background: #d7ebf8;
  border: 1px solid #b7d5ea;
  border-bottom-right-radius: 4px;
}
.chat-bubble.admin {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--cream-border);
  border-bottom-left-radius: 4px;
}
.chat-meta {
  display: block;
  font-size: 0.7rem;
  color: var(--text-light);
  margin-top: 4px;
}
.live-chat-compose {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--cream-border);
  background: #fffaf2;
}
.live-chat-compose textarea {
  flex: 1;
  min-height: 44px;
  max-height: 120px;
  resize: vertical;
  margin: 0;
}
.live-chat-compose button { align-self: flex-end; }

.chat-fab {
  display: none;
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  border: none;
  border-radius: 999px;
  padding: 14px 18px;
  background: var(--wood);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(92,61,46,0.28);
  cursor: pointer;
}
.chat-drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(40, 24, 16, 0.45);
  z-index: 50;
}
.chat-drawer {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 51;
  max-height: 85vh;
  padding: 10px;
}
.chat-drawer .live-chat {
  max-height: calc(85vh - 20px);
  min-height: 360px;
  box-shadow: 0 -8px 30px rgba(0,0,0,0.18);
}
@media (max-width: 900px) {
  .beta-layout .chat-desktop { display: none; }
  .chat-fab { display: inline-flex; align-items: center; gap: 8px; }
  .chat-drawer.open,
  .chat-drawer-backdrop.open { display: block; }
}

.issue-comments {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--cream-border);
}
.issue-comments h3 {
  margin-top: 0;
  margin-bottom: 12px;
}

.issue-list, .feature-list { display: flex; flex-direction: column; gap: 10px; }
.issue-row, .feature-row {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--cream-border);
  background: rgba(255,255,255,0.55);
  text-decoration: none !important;
  color: inherit !important;
}
.issue-row:hover, .feature-row:hover {
  border-color: var(--sky-deep);
  background: #fff;
}
.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.badge-open { background: #e8f5e9; color: #2e7d32; }
.badge-looking { background: #e3f2fd; color: #1565c0; }
.badge-fixed { background: #ede7f6; color: #5e35b1; }
.badge-wontfix { background: #fce4ec; color: #c62828; }
.badge-pending { background: #fff8e1; color: #f57f17; }

.token-box {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: #fff;
  border: 1px dashed var(--cream-border);
  border-radius: 10px;
  padding: 10px 12px;
  word-break: break-all;
}

/* Long profile links / emails stay inside the card */
.beta-profile-card,
.beta-profile-card p,
.beta-profile-card a {
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}
.beta-profile-card a {
  display: inline;
}

.form .check-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 8px 0;
}
.form .check-row input { margin-top: 4px; }
.form .check-row label { font-weight: 600; color: var(--text); }

.admin-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 16px;
}
@media (max-width: 860px) {
  .admin-grid { grid-template-columns: 1fr; }
}
.admin-side-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 70vh;
  overflow: auto;
}
.admin-side-list button {
  text-align: left;
  border: 1px solid var(--cream-border);
  background: rgba(255,255,255,0.7);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  color: var(--wood);
}
.admin-side-list button.active {
  border-color: var(--sky-deep);
  background: #eaf4fb;
}
.thumb-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.thumb-row img {
  width: 120px; height: 90px; object-fit: cover;
  border-radius: 8px; border: 1px solid var(--cream-border); cursor: zoom-in;
}

.break-long-text,
.break-long-text a {
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}

/* Download description Markdown (admin preview still uses bordered box) */
.dl-md-wrap {
  margin-top: 10px;
  max-height: 480px;
  overflow: auto;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--cream-border);
  border-radius: 12px;
  padding: 14px 16px;
}

/* Tester downloads page: one active build inside a single white tile */
.beta-download-body {
  margin-top: 8px;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid var(--cream-border);
  background: #fff;
}
.beta-download-body:empty {
  display: none;
}
.beta-download-body .dl-md-wrap {
  margin-top: 0;
  max-height: none;
  overflow: visible;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
}
.beta-download-actions {
  margin-top: 16px;
}
.dl-md {
  color: var(--wood);
  font-size: 0.95rem;
  line-height: 1.55;
}
.dl-md p { margin: 0 0 0.85em; }
.dl-md p:last-child { margin-bottom: 0; }
.dl-md-h {
  margin: 1.1em 0 0.45em;
  color: var(--wood);
  font-weight: 800;
  line-height: 1.25;
}
.dl-md h2.dl-md-h { font-size: 1.25rem; }
.dl-md h3.dl-md-h { font-size: 1.1rem; }
.dl-md h4.dl-md-h { font-size: 1rem; }
.dl-md-list {
  margin: 0.4em 0 0.9em;
  padding-left: 1.35em;
}
.dl-md-list li { margin: 0.25em 0; }
.dl-md-quote {
  margin: 0.6em 0 1em;
  padding: 8px 12px;
  border-left: 3px solid var(--sky-deep);
  background: #eaf4fb;
  border-radius: 0 8px 8px 0;
}
.dl-md-hr {
  border: 0;
  border-top: 1px solid var(--cream-border);
  margin: 1em 0;
}
.dl-md-code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.88em;
  background: rgba(0, 0, 0, 0.06);
  padding: 1px 5px;
  border-radius: 4px;
}
.dl-md-pre {
  margin: 0.6em 0 1em;
  padding: 10px 12px;
  overflow: auto;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 8px;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.86rem;
  line-height: 1.45;
}
.dl-md a {
  color: var(--sky-deep);
  text-decoration: underline;
  overflow-wrap: anywhere;
}
.dl-md-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 8px;
}
.dl-md-toolbar button {
  font-size: 0.85rem;
  padding: 4px 10px;
}
.dl-md-preview {
  margin-top: 10px;
  display: none;
}
.dl-md-preview.is-open { display: block; }