/* ═══════════════════════════════════════════════════════
   Swiftgrounds — Main Stylesheet (v2)
   Extracted from design prototype
═══════════════════════════════════════════════════════ */

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

:root {
  --green:  #5EBD3E;
  --yellow: #FFB900;
  --orange: #F78200;
  --red:    #E23838;
  --purple: #973999;
  --blue:   #009CDF;

  --accent: #F78200;
  --accent-light: #FEF3E8;
  --accent-mid:   #FDDBB4;

  --text-1: #1A1A18;
  --text-2: #6B6B68;
  --text-3: #ABABAA;

  --bg:         #FFFFFF;
  --bg-warm:    #F9F8F6;
  --bg-card:    #FFFFFF;
  --border:     rgba(0,0,0,0.07);
  --border-mid: rgba(0,0,0,0.12);

  --f:    'DM Sans', system-ui, sans-serif;
  --mono: 'DM Mono', monospace;

  --r:    12px;
  --r-sm: 8px;
  --r-xs: 6px;

  --nav-w: 220px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04);
}

html { font-size: 15px; }
body {
  font-family: var(--f);
  background: var(--bg-warm);
  color: var(--text-1);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

/* ── Layout shell ── */
.shell {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar nav ── */
.sidebar {
  width: var(--nav-w);
  flex-shrink: 0;
  background: var(--bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-logo {
  padding: 28px 20px 24px;
  border-bottom: 1px solid var(--border);
  display: block;
}

.sidebar-logo img {
  width: 60%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.sidebar-logo-sub {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-top: 10px;
}

.sidebar-nav {
  padding: 16px 10px;
  flex: 1;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 0 10px;
  margin: 16px 0 6px;
}

.nav-section-label:first-child {
  margin-top: 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: var(--r-xs);
  font-size: 13px;
  font-weight: 400;
  color: var(--text-2);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  text-decoration: none;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: var(--f);
}

.nav-link:hover { background: var(--bg-warm); color: var(--text-1); }

.nav-link.active {
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 500;
}

.nav-link svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  opacity: 0.6;
}

.nav-link.active svg { opacity: 1; }

.nav-link svg.icon-swift,
.mobile-menu-item svg.icon-swift {
  width: 18px;
  height: 18px;
}

.nav-link-playgrounds {
  gap: 6px;
  padding-left: 10px;
}

.sidebar-bottom {
  padding: 16px 10px 20px;
  border-top: 1px solid var(--border);
}

.sidebar-bottom .nav-link {
  font-size: 12px;
}

/* Sidebar logged-in state */
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
  text-decoration: none;
}

.sidebar-user:hover { background: var(--bg-warm); }

.sidebar-user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--bg-warm);
}

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

.sidebar-user-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-handle {
  font-size: 10px;
  color: var(--text-3);
  font-family: var(--mono);
}

/* ── Rainbow accent bar ── */
.rainbow-bar {
  height: 3px;
  background: linear-gradient(90deg, #5EBD3E 0%, #FFB900 19.6%, #F78200 39.7%, #E23838 59.6%, #973999 79.7%, #009CDF 100%);
  flex-shrink: 0;
}

/* ── Main content ── */
.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ── Page header ── */
.page-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 32px 40px 28px;
}

.page-eyebrow {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.eyebrow-dot {
  width: 5px; height: 5px;
  background: var(--accent);
  border-radius: 50%;
}

.page-title {
  font-size: 28px;
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text-1);
  margin-bottom: 6px;
}

.page-title em {
  font-style: italic;
  color: var(--text-2);
}

.page-desc {
  font-size: 13px;
  color: var(--text-2);
  max-width: 480px;
}

/* ── Filter bar ── */
.filter-bar {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 12px 40px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.chip {
  font-family: var(--f);
  font-size: 11px;
  font-weight: 400;
  color: var(--text-2);
  background: transparent;
  border: 1px solid var(--border-mid);
  border-radius: 100px;
  padding: 4px 12px;
  cursor: pointer;
  transition: all 0.12s;
  white-space: nowrap;
  text-decoration: none;
}

.chip:hover { color: var(--accent); border-color: var(--accent-mid); background: var(--accent-light); }
.chip.active { color: var(--accent); border-color: var(--accent-mid); background: var(--accent-light); font-weight: 500; }

.filter-count {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-3);
  font-family: var(--mono);
}

/* ── Search (inline in filter bar) ── */
.search-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  max-width: 260px;
  min-width: 140px;
  padding: 5px 10px;
  background: var(--bg-warm);
  border: 1px solid var(--border-mid);
  border-radius: 100px;
  transition: border-color 0.12s;
}

.search-inner:focus-within {
  border-color: var(--accent) !important;
}

.search-inner input {
  flex: 1;
  font-family: var(--f);
  font-size: 12px;
  color: var(--text-1);
  background: transparent;
  border: none;
  outline: none;
  min-width: 0;
}

.search-inner input::placeholder { color: var(--text-3); }

.search-inner svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  color: var(--text-3);
}

/* ── Playground grid ── */
.grid-wrap {
  padding: 0;
  flex: 1;
}

.playground-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  background: transparent;
  padding: 20px;
}

.pg-card {
  background: var(--bg-card);
  transition: background 0.12s, box-shadow 0.15s, transform 0.15s;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
}

.pg-card:hover {
  background: var(--bg-warm);
  box-shadow: 0 2px 8px rgba(0,0,0,0.07), 0 8px 24px rgba(0,0,0,0.06);
  transform: translateY(-1px);
}

.pg-thumb {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  background: var(--bg-warm);
}

.pg-body {
  padding: 14px 16px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.pg-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-1);
  margin-bottom: 3px;
  line-height: 1.3;
}

.pg-sub {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.45;
  flex: 1;
}

.pg-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.badge {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 100px;
  padding: 3px 8px;
}

.badge-beginner    { background: #EAF6E3; color: #2D6A1A; }
.badge-intermediate { background: #FEF3E8; color: #8C4A00; }
.badge-advanced    { background: #FEECEC; color: #8C1A1A; }
.badge-expert      { background: #F3ECFE; color: #5A1A8C; }

.pg-author {
  font-size: 11px;
  color: var(--text-3);
  margin-left: auto;
}

/* ── Detail page ── */
.detail-wrap {
  max-width: 740px;
  padding: 0 0 64px;
  width: 100%;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-3);
  padding: 20px 32px 0;
  margin-bottom: 0;
}

.breadcrumb a { cursor: pointer; text-decoration: none; color: var(--text-3); }
.breadcrumb a:hover { color: var(--text-2); }
.breadcrumb .sep { color: var(--text-3); }
.breadcrumb .current { color: var(--text-2); }

/* ── Hero banner ── */
.detail-hero {
  position: relative;
  margin: 16px 32px 0;
  border-radius: 16px;
  overflow: hidden;
  height: 140px;
  background: var(--bg-warm);
  border: 1px solid var(--border);
}

.detail-hero-bg {
  position: absolute;
  inset: -20px;
  background-size: cover;
  background-position: center;
  filter: blur(28px) saturate(1.4) brightness(1.05);
  transform: scale(1.1);
}

.detail-hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.18);
}

.detail-rainbow {
  height: 3px;
  background: linear-gradient(90deg, #5EBD3E 0%, #FFB900 19.6%, #F78200 39.7%, #E23838 59.6%, #973999 79.7%, #009CDF 100%);
  margin: 0 32px;
  border-radius: 0 0 3px 3px;
}

/* ── Title block ── */
.detail-title-area {
  padding: 24px 32px 0;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.detail-cover-thumb {
  width: 240px;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-warm);
  margin-top: 2px;
  box-shadow: var(--shadow);
}

.detail-cover-thumb img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}

.detail-title-block { flex: 1; }

.detail-title {
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--text-1);
  margin-bottom: 4px;
}

.detail-sub {
  font-size: 14px;
  color: var(--text-2);
  margin-bottom: 14px;
  font-weight: 300;
}

.detail-byline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}

.detail-byline-text {
  font-size: 12px;
  color: var(--text-3);
}

.detail-byline a {
  color: var(--accent);
  text-decoration: none;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--f);
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: var(--r-xs);
  padding: 9px 18px;
  cursor: pointer;
  transition: opacity 0.12s;
  text-decoration: none;
}

.btn-download:hover { opacity: 0.88; }

.btn-share {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--f);
  font-size: 13px;
  font-weight: 400;
  color: var(--text-2);
  background: transparent;
  border: 1px solid var(--border-mid);
  border-radius: var(--r-xs);
  padding: 8px 16px;
  cursor: pointer;
  transition: color 0.12s, border-color 0.12s;
}

.btn-share:hover { color: var(--text-1); }

.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Description ── */
.detail-desc-area {
  padding: 20px 32px 0;
}

.detail-section-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 10px;
}

.detail-desc {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.8;
}

/* ── Preview strip ── */
.detail-previews-area {
  padding: 24px 32px 0;
}

.detail-previews {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.preview-img {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 4/3;
  background: var(--bg-warm);
  transition: transform 0.15s, box-shadow 0.15s;
}

.preview-img:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.preview-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Metadata grid ── */
.detail-meta-area {
  padding: 24px 32px 0;
}

.detail-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}

.meta-cell {
  background: var(--bg-card);
  padding: 14px 18px;
}

.meta-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 4px;
}

.meta-value {
  font-size: 13px;
  color: var(--text-1);
}

.meta-value a {
  color: var(--accent);
  text-decoration: none;
}

.meta-value a:hover { text-decoration: underline; }

/* ── Lightbox ── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 12px;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: rgba(255,255,255,0.12);
  border: none;
  color: #fff;
  font-size: 22px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s;
}

.lightbox-close:hover { background: rgba(255,255,255,0.22); }

/* ── FAQ ── */
.faq-wrap {
  max-width: 700px;
  padding: 0 32px 64px;
}

.faq-group {
  margin-bottom: 8px;
}

.faq-group-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 0 10px;
}

.faq-group-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.faq-group-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  white-space: nowrap;
  flex-shrink: 0;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-q {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-1);
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-family: var(--f);
  line-height: 1.5;
  transition: color 0.12s;
}

.faq-q:hover { color: var(--accent); }
.faq-q.open { color: var(--accent); }

.faq-icon-wrap {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--border-mid);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  transition: background 0.15s, border-color 0.15s;
}

.faq-q:hover .faq-icon-wrap,
.faq-q.open .faq-icon-wrap {
  background: var(--accent-light);
  border-color: var(--accent-mid);
}

.faq-icon {
  width: 10px;
  height: 10px;
  color: var(--text-3);
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), color 0.12s;
  flex-shrink: 0;
}

.faq-q:hover .faq-icon,
.faq-q.open .faq-icon { color: var(--accent); }

.faq-icon.open { transform: rotate(45deg); }

.faq-a {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.8;
  padding-bottom: 18px;
  display: none;
  animation: faqIn 0.18s ease-out;
}

@keyframes faqIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.faq-a.open { display: block; }

.faq-a p + p { margin-top: 10px; }

.faq-a strong {
  color: var(--text-1);
  font-weight: 500;
}

.faq-a a {
  color: var(--accent);
  text-decoration: none;
}

.faq-a a:hover { text-decoration: underline; }

.faq-code {
  display: block;
  font-family: var(--mono);
  font-size: 11.5px;
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: var(--r-xs);
  padding: 14px 16px;
  margin: 12px 0;
  color: var(--text-1);
  overflow-x: auto;
  white-space: pre;
  line-height: 1.65;
  position: relative;
  transition: background 0.2s;
}

.faq-code:hover {
  background: #fff;
}

.faq-code-label {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--text-3);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 7px;
  margin-bottom: 6px;
}

.faq-a code {
  font-family: var(--mono);
  font-size: 12px;
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--accent);
}

.faq-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 8px 0;
}

.faq-step-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-light);
  border: 1px solid var(--accent-mid);
  color: var(--accent);
  font-size: 10px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.faq-step-text {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.7;
  flex: 1;
}

.faq-video-card {
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  background: #000;
}

.faq-video-player {
  width: 100%;
  aspect-ratio: 16/9;
  display: block;
  background: #000;
}

.faq-video-meta {
  background: var(--bg-warm);
  border-top: 1px solid var(--border);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.faq-video-session {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 3px;
}

.faq-video-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-1);
  margin-bottom: 3px;
  line-height: 1.4;
}

.faq-video-speakers {
  font-size: 11px;
  color: var(--text-3);
}

.faq-video-links {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  align-items: center;
  flex-wrap: wrap;
}

.faq-video-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 400;
  color: var(--text-2);
  border: 1px solid var(--border-mid);
  border-radius: var(--r-xs);
  padding: 5px 10px;
  text-decoration: none;
  transition: color 0.12s, border-color 0.12s, background 0.12s;
  white-space: nowrap;
}

.faq-video-link:hover {
  color: var(--accent);
  border-color: var(--accent-mid);
  background: var(--accent-light);
}

.faq-doc-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 11.5px;
  color: var(--text-3);
  flex-wrap: wrap;
}

.faq-doc-link svg {
  flex-shrink: 0;
  color: var(--text-3);
}

.faq-doc-link span {
  color: var(--text-3);
}

.faq-doc-link a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid var(--accent-mid);
  padding-bottom: 1px;
  transition: border-color 0.12s;
}

.faq-doc-link a:hover {
  border-color: var(--accent);
  text-decoration: none;
}

/* ── Page body ── */
.page-body {
  flex: 1;
  overflow-y: auto;
}

/* ── Auth pages ── */
.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg-warm);
}

.auth-card-wrap {
  position: relative;
  width: 100%;
  max-width: 400px;
}

.auth-card-rainbow {
  position: absolute;
  top: -4px;
  left: 0;
  right: 0;
  height: 100%;
  border-radius: 20px;
  background: linear-gradient(90deg, #5EBD3E 0%, #FFB900 19.6%, #F78200 39.7%, #E23838 59.6%, #973999 79.7%, #009CDF 100%);
}

.auth-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06), 0 16px 48px rgba(0,0,0,0.08);
}

.auth-card-body {
  padding: 32px 32px 28px;
}

.auth-logo {
  display: block;
  height: auto;
  margin-bottom: 24px;
}

.auth-eyebrow {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.auth-title {
  font-size: 22px;
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1.25;
  color: var(--text-1);
  margin-bottom: 6px;
}

.auth-title em {
  font-style: italic;
  color: var(--text-2);
}

.auth-subtitle {
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 24px;
  line-height: 1.55;
}

.auth-identifier-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--bg-warm);
  border: 1px solid var(--border-mid);
  border-radius: 100px;
  padding: 5px 12px 5px 8px;
  font-size: 12px;
  color: var(--text-1);
  margin-bottom: 20px;
  text-decoration: none;
  transition: border-color 0.12s, background 0.12s;
}

.auth-identifier-chip:hover {
  border-color: var(--accent-mid);
  background: var(--accent-light);
}

.auth-identifier-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #F78200 0%, #E23838 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
}

.auth-field {
  margin-bottom: 14px;
}

.auth-label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-2);
  letter-spacing: 0.01em;
  margin-bottom: 6px;
}

.auth-input {
  width: 100%;
  font-family: var(--f);
  font-size: 14px;
  color: var(--text-1);
  background: var(--bg-warm);
  border: 1px solid var(--border-mid);
  border-radius: var(--r-sm);
  padding: 10px 13px;
  outline: none;
  transition: border-color 0.12s, box-shadow 0.12s;
  -webkit-appearance: none;
}

.auth-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(247, 130, 0, 0.1);
}

.auth-input::placeholder { color: var(--text-3); }

.auth-input-row {
  position: relative;
}

.auth-input-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-3);
  padding: 2px;
  display: flex;
  align-items: center;
  transition: color 0.12s;
}

.auth-input-toggle:hover { color: var(--text-2); }

.auth-hint {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 5px;
}

.auth-hint a {
  color: var(--accent);
  text-decoration: none;
}

.auth-hint a:hover { text-decoration: underline; }

.auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  font-family: var(--f);
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: var(--r-sm);
  padding: 11px;
  cursor: pointer;
  margin-top: 20px;
  transition: opacity 0.12s, transform 0.1s;
  -webkit-appearance: none;
}

.auth-btn:hover { opacity: 0.9; }
.auth-btn:active { transform: scale(0.99); }
.auth-btn svg { flex-shrink: 0; }

.auth-btn-ghost {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  font-family: var(--f);
  font-size: 13px;
  font-weight: 400;
  color: var(--text-2);
  background: transparent;
  border: 1px solid var(--border-mid);
  border-radius: var(--r-sm);
  padding: 10px;
  cursor: pointer;
  margin-top: 8px;
  transition: color 0.12s, border-color 0.12s, background 0.12s;
  -webkit-appearance: none;
}

.auth-btn-ghost:hover {
  color: var(--text-1);
  border-color: var(--border-mid);
  background: var(--bg-warm);
}

.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text-3);
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--f);
  padding: 0;
  margin-bottom: 20px;
  transition: color 0.12s;
  text-decoration: none;
}

.auth-back:hover { color: var(--text-2); }

.auth-terms {
  font-size: 11px;
  color: var(--text-3);
  text-align: center;
  margin-top: 16px;
  line-height: 1.6;
}

.auth-terms a {
  color: var(--text-3);
  text-decoration: underline;
  text-decoration-color: var(--border-mid);
}

.auth-terms a:hover { color: var(--accent); }

.auth-card-footer {
  border-top: 1px solid var(--border);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-3);
}

.auth-card-footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.auth-card-footer a:hover { text-decoration: underline; }

/* Password strength bar */
.auth-strength {
  display: flex;
  gap: 3px;
  margin-top: 6px;
}

.auth-strength-bar {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: var(--border);
  transition: background 0.3s;
}

.auth-strength-bar.weak   { background: var(--red); }
.auth-strength-bar.medium { background: var(--yellow); }
.auth-strength-bar.strong { background: var(--green); }

/* Error state */
.auth-error {
  font-size: 12px;
  color: var(--red);
  background: #FFF0F0;
  border: 1px solid #FFCCCC;
  border-radius: var(--r-xs);
  padding: 9px 12px;
  margin-bottom: 14px;
}

/* ── Account / Feed pages ── */
.acct-wrap {
  max-width: 680px;
  padding: 24px 40px 64px;
  width: 100%;
}

/* Section card */
.acct-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  margin-bottom: 20px;
}

.acct-section-head {
  padding: 18px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.acct-section-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-1);
  letter-spacing: -0.01em;
}

.acct-section-body {
  padding: 20px 24px;
}

/* Profile header with avatar */
.acct-profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.acct-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.acct-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 2px solid var(--border);
  background: var(--bg-warm);
}

.acct-avatar-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.acct-avatar-badge svg {
  width: 10px;
  height: 10px;
  color: var(--text-3);
}

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

.acct-profile-name {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-1);
  letter-spacing: -0.02em;
  margin-bottom: 2px;
}

.acct-profile-username {
  font-size: 12px;
  color: var(--text-3);
  font-family: var(--mono);
}

.acct-gravatar-link {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-3);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--border-mid);
  border-radius: var(--r-xs);
  padding: 5px 10px;
  transition: color 0.12s, border-color 0.12s;
  white-space: nowrap;
}

.acct-gravatar-link:hover {
  color: var(--accent);
  border-color: var(--accent-mid);
}

/* Form rows */
.acct-field {
  margin-bottom: 16px;
}

.acct-field:last-child { margin-bottom: 0; }

.acct-label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-2);
  letter-spacing: 0.01em;
  margin-bottom: 6px;
}

.acct-input {
  width: 100%;
  font-family: var(--f);
  font-size: 13px;
  color: var(--text-1);
  background: var(--bg-warm);
  border: 1px solid var(--border-mid);
  border-radius: var(--r-sm);
  padding: 9px 12px;
  outline: none;
  transition: border-color 0.12s, box-shadow 0.12s;
}

.acct-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(247,130,0,0.1);
}

.acct-input:disabled {
  color: var(--text-3);
  cursor: not-allowed;
}

.acct-hint {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 5px;
  line-height: 1.5;
}

.acct-input-row {
  position: relative;
}

.acct-input-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-3);
  padding: 2px;
  display: flex;
  align-items: center;
  transition: color 0.12s;
}

.acct-input-toggle:hover { color: var(--text-2); }

/* Buttons */
.acct-btn {
  font-family: var(--f);
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: var(--r-sm);
  padding: 9px 18px;
  cursor: pointer;
  transition: opacity 0.12s;
}

.acct-btn:hover { opacity: 0.88; }

.acct-btn-ghost {
  font-family: var(--f);
  font-size: 13px;
  font-weight: 400;
  color: var(--text-2);
  background: transparent;
  border: 1px solid var(--border-mid);
  border-radius: var(--r-sm);
  padding: 8px 16px;
  cursor: pointer;
  transition: color 0.12s, background 0.12s;
}

.acct-btn-ghost:hover { color: var(--text-1); background: var(--bg-warm); }

.acct-btn-danger {
  font-family: var(--f);
  font-size: 13px;
  font-weight: 500;
  color: #C0392B;
  background: transparent;
  border: 1px solid rgba(192,57,43,0.3);
  border-radius: var(--r-sm);
  padding: 8px 16px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.acct-btn-danger:hover {
  background: #FFF0EE;
  color: #A93226;
}

.acct-btn-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 18px;
}

/* Status badges */
.acct-badge-verified {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 500;
  color: #2D6A1A;
  background: #EAF6E3;
  border: 1px solid #C5E8B0;
  border-radius: 100px;
  padding: 3px 9px;
}

.acct-badge-unverified {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 500;
  color: #8C4A00;
  background: #FEF3E8;
  border: 1px solid var(--accent-mid);
  border-radius: 100px;
  padding: 3px 9px;
}

/* Domain display */
.acct-domain-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-warm);
  border: 1px solid var(--border-mid);
  border-radius: var(--r-sm);
  margin-bottom: 10px;
}

.acct-domain-name {
  font-size: 13px;
  color: var(--text-1);
  font-family: var(--mono);
  flex: 1;
}

/* Danger zone */
.acct-danger {
  border-color: rgba(192,57,43,0.25);
}

.acct-danger .acct-section-head {
  border-bottom-color: rgba(192,57,43,0.2);
}

.acct-danger .acct-section-title {
  color: #C0392B;
}

.acct-danger-desc {
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 16px;
  line-height: 1.6;
}

/* ── Feed page ── */
.feed-url-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.feed-url-input {
  flex: 1;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-1);
  background: var(--bg-warm);
  border: 1px solid var(--border-mid);
  border-radius: var(--r-sm);
  padding: 9px 12px;
  outline: none;
  transition: border-color 0.12s;
  min-width: 0;
}

.feed-url-input:focus { border-color: var(--accent); }

.feed-meta-card {
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 16px;
  margin-top: 4px;
}

.feed-meta-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-1);
  letter-spacing: -0.02em;
  margin-bottom: 3px;
}

.feed-meta-sub {
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 10px;
}

.feed-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.feed-identifier {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xs);
  padding: 3px 8px;
}

.feed-publisher {
  font-size: 12px;
  color: var(--text-3);
}

/* Feed playground list */
.feed-pg-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
}

.feed-pg-item:last-child { border-bottom: none; }

.feed-pg-thumb {
  width: 52px;
  height: 39px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-warm);
  border: 1px solid var(--border);
}

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

.feed-pg-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-1);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feed-pg-sub {
  font-size: 11px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.feed-pg-id {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-3);
}

/* ── Flash banners ── */
.flash-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 20px;
  border-radius: var(--r-sm);
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 20px;
  animation: flashIn 0.2s ease-out;
}

@keyframes flashIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.flash-success {
  background: #EAF6E3;
  border: 1px solid #C5E8B0;
  color: #1E5C0E;
}

.flash-error {
  background: #FEECEC;
  border: 1px solid rgba(192,57,43,0.25);
  color: #8C1A1A;
}

.flash-warning {
  background: #FEF3E8;
  border: 1px solid var(--accent-mid);
  color: #7A3A00;
}

.flash-info {
  background: #EBF5FD;
  border: 1px solid #B3D9F5;
  color: #0A4A7A;
}

.flash-banner svg { flex-shrink: 0; margin-top: 1px; }
.flash-banner-body { flex: 1; }
.flash-banner-title { font-weight: 500; margin-bottom: 1px; }
.flash-banner-msg { opacity: 0.85; }

/* ── Empty states ── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 64px 32px;
  flex: 1;
}

.empty-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--bg-warm);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.empty-icon svg { color: var(--text-3); }

.empty-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-1);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.empty-desc {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.65;
  max-width: 320px;
  margin-bottom: 24px;
}

/* ── Domain unverified state ── */
.domain-verify-block {
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  overflow: hidden;
  margin-top: 10px;
}

.domain-verify-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.domain-verify-row:last-child { border-bottom: none; }

.domain-verify-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-1);
  margin-bottom: 6px;
}

.domain-verify-hint {
  font-size: 11px;
  color: var(--text-3);
  margin-bottom: 8px;
}

.domain-verify-code {
  font-family: var(--mono);
  font-size: 11.5px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xs);
  padding: 9px 12px;
  color: var(--accent);
  overflow-x: auto;
  white-space: pre;
  display: block;
}

/* ── Feed blocked state ── */
.feed-blocked {
  border: 1px solid rgba(192,57,43,0.25);
  background: #FFF8F8;
  border-radius: var(--r-sm);
  padding: 16px 18px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.feed-blocked svg { flex-shrink: 0; color: #C0392B; margin-top: 1px; }
.feed-blocked-title { font-size: 13px; font-weight: 500; color: #8C1A1A; margin-bottom: 3px; }
.feed-blocked-desc { font-size: 12px; color: #A03030; line-height: 1.55; }
.feed-blocked-desc a { color: #C0392B; font-weight: 500; text-decoration: underline; }

/* ── Feed blocked with pending domain ── */
.feed-pending {
  border: 1px solid var(--accent-mid);
  background: var(--accent-light);
  border-radius: var(--r-sm);
  padding: 16px 18px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.feed-pending svg { flex-shrink: 0; color: var(--accent); margin-top: 1px; }
.feed-pending-title { font-size: 13px; font-weight: 500; color: #7A3A00; margin-bottom: 3px; }
.feed-pending-desc { font-size: 12px; color: #8C4A00; line-height: 1.55; }
.feed-pending-desc a { color: var(--accent); font-weight: 500; text-decoration: underline; }

/* ── Profile page ── */
.profile-header-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--border);
  background: var(--bg-warm);
}

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

.profile-edit-btn {
  font-family: var(--f);
  font-size: 12px;
  font-weight: 400;
  color: var(--text-2);
  background: transparent;
  border: 1px solid var(--border-mid);
  border-radius: 100px;
  padding: 5px 14px;
  cursor: pointer;
  transition: color 0.12s, border-color 0.12s;
  text-decoration: none;
  margin-bottom: auto;
}

.profile-edit-btn:hover { color: var(--text-1); }

.profile-domain-link {
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.profile-domain-link:hover { text-decoration: underline; }

.profile-grid-wrap {
  padding: 0;
  flex: 1;
}

/* ── Static content pages (About, How to Publish, Legal) ── */
.content-wrap {
  max-width: 660px;
  padding: 24px 40px 72px;
}

.content-body h2 {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-1);
  letter-spacing: -0.02em;
  margin: 32px 0 10px;
}

.content-body h2:first-child { margin-top: 0; }

.content-body p {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.8;
  margin-bottom: 12px;
}

.content-body p:last-child { margin-bottom: 0; }

.content-body a {
  color: var(--accent);
  text-decoration: none;
}

.content-body a:hover { text-decoration: underline; }

.content-body strong {
  color: var(--text-1);
  font-weight: 500;
}

.content-body ul, .content-body ol {
  margin: 0 0 12px 20px;
}

.content-body li {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.8;
  margin-bottom: 4px;
}

.content-body code {
  font-family: var(--mono);
  font-size: 11.5px;
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--accent);
}

/* Steps (How to Publish) */
.publish-steps {
  margin: 4px 0 20px;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.publish-step {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  position: relative;
}

.publish-step-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 32px;
  position: relative;
}

.publish-step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-light);
  border: 1px solid var(--accent-mid);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.publish-step::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 32px;
  bottom: 0;
  width: 1px;
  background: var(--border);
}

.publish-step:last-child::before { display: none; }

.publish-step-line { display: none; }

.publish-step-content {
  padding: 4px 0 24px;
  flex: 1;
}

.publish-step-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-1);
  margin-bottom: 5px;
  letter-spacing: -0.01em;
}

.publish-step-desc {
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.75;
}

.publish-step-desc code {
  font-family: var(--mono);
  font-size: 11.5px;
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--accent);
}

.publish-step-desc a {
  color: var(--accent);
  text-decoration: none;
}

.publish-step-desc a:hover { text-decoration: underline; }

/* CTA card */
.content-cta {
  background: var(--accent-light);
  border: 1px solid var(--accent-mid);
  border-radius: var(--r);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 32px;
}

.content-cta-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-1);
  margin-bottom: 3px;
}

.content-cta-sub {
  font-size: 12px;
  color: var(--text-2);
}

/* Legal last-updated note */
.legal-updated {
  font-size: 11px;
  color: var(--text-3);
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

/* Footer nav links */
.content-footer-nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 32px;
  margin-top: 40px;
  border-top: 1px solid var(--border);
}

.content-footer-nav a {
  font-size: 12px;
  color: var(--text-3);
  text-decoration: none;
  transition: color 0.12s;
}

.content-footer-nav a:hover { color: var(--accent); }

/* ─────────────────────────────────────────────────────
   MOBILE NAVBAR
───────────────────────────────────────────────────── */
.mobile-navbar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 52px;
  background: rgba(255,255,255,0.9);
  border-bottom: 1px solid var(--border);
  z-index: 200;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.mobile-navbar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #5EBD3E 0%, #FFB900 19.6%, #F78200 39.7%, #E23838 59.6%, #973999 79.7%, #009CDF 100%);
}

@media (max-width: 768px) {
  .mobile-navbar { display: flex; }
}

.mobile-navbar-logo {
  height: 18px;
  width: auto;
  margin-top: 10px;
}

.mobile-nav-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 8px;
  color: var(--text-1);
  transition: background 0.12s;
  -webkit-tap-highlight-color: transparent;
}

.mobile-nav-btn:hover { background: var(--bg-warm); }

/* ─────────────────────────────────────────────────────
   FULLSCREEN MOBILE MENU
───────────────────────────────────────────────────── */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 199;
  background: var(--bg-card);
  flex-direction: column;
  padding: 0;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

@media (max-width: 768px) {
  .mobile-menu { display: flex; }
}

.mobile-menu.open {
  transform: translateX(0);
}

.mobile-menu-inner {
  padding: 68px 24px 40px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.mobile-menu-section {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 24px 0 8px;
}

.mobile-menu-section:first-child { margin-top: 0; }

.mobile-menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 0;
  font-family: var(--f);
  font-size: 17px;
  font-weight: 400;
  color: var(--text-1);
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  width: 100%;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.12s;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.mobile-menu-item:last-child { border-bottom: none; }
.mobile-menu-item:active { color: var(--accent); }

.mobile-menu-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--text-3);
}

.mobile-menu-item.active {
  color: var(--accent);
}

.mobile-menu-item.active svg { color: var(--accent); }

/* Auth buttons in menu */
.mobile-menu-auth {
  margin-top: auto;
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mobile-menu-auth-btn {
  font-family: var(--f);
  font-size: 15px;
  font-weight: 500;
  padding: 13px;
  border-radius: var(--r-sm);
  cursor: pointer;
  width: 100%;
  border: none;
  transition: opacity 0.12s;
  text-align: center;
  text-decoration: none;
  display: block;
}

.mobile-menu-auth-btn:active { opacity: 0.8; }

.mobile-menu-auth-btn.primary {
  background: var(--accent);
  color: #fff;
}

.mobile-menu-auth-btn.secondary {
  background: var(--bg-warm);
  color: var(--text-1);
  border: 1px solid var(--border-mid);
}

/* User strip in menu (when logged in) */
.mobile-menu-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
  text-decoration: none;
  color: inherit;
}

.mobile-menu-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--border);
  background: var(--bg-warm);
}

.mobile-menu-user-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-1);
}

.mobile-menu-user-handle {
  font-size: 12px;
  color: var(--text-3);
  font-family: var(--mono);
}

.mobile-menu-legal {
  display: flex;
  gap: 16px;
  padding-top: 20px;
  margin-top: 16px;
  border-top: 1px solid var(--border);
}

.mobile-menu-legal a {
  font-size: 11px;
  color: var(--text-3);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--f);
  text-decoration: none;
  transition: color 0.12s;
}

.mobile-menu-legal a:hover { color: var(--accent); }

/* ═══════════════════════════════════════════════════════
   MOBILE LAYOUT  (≤ 768px)
═══════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  .sidebar { display: none; }

  .shell {
    display: block;
    padding-top: 52px;
  }

  .main {
    height: auto;
    min-height: calc(100vh - 52px);
    overflow-y: auto;
  }

  .page-header {
    padding: 24px 20px 20px;
  }

  .page-title {
    font-size: 26px;
  }

  .page-desc {
    font-size: 13px;
  }

  .filter-bar {
    padding: 10px 16px;
    gap: 8px;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .filter-bar::-webkit-scrollbar { display: none; }

  .filter-count { display: none; }

  .playground-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    padding: 14px 16px 32px;
  }

  .detail-hero { margin: 12px 16px 0; }
  .detail-rainbow { margin: 0 16px; }

  .detail-title-area {
    flex-direction: column;
    padding: 16px 16px 0;
    gap: 12px;
  }

  .detail-cover-thumb { display: none; }

  .detail-desc-area,
  .detail-previews-area,
  .detail-meta-area {
    padding-left: 16px;
    padding-right: 16px;
  }

  .detail-actions { flex-wrap: wrap; }

  .acct-wrap {
    padding: 24px 16px 48px;
  }

  .acct-section-head { padding: 14px 16px 12px; }
  .acct-section-body { padding: 16px; }

  .acct-profile-header {
    flex-wrap: wrap;
    padding: 16px;
    gap: 12px;
  }

  .acct-gravatar-link { margin-left: 0; }

  .profile-header-avatar { width: 44px; height: 44px; }

  .faq-wrap { padding: 12px 16px 48px; }

  .content-wrap { padding: 24px 16px 48px; }

  .content-cta {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .auth-shell {
    align-items: flex-start;
    justify-content: flex-start;
    padding: 16px 16px 40px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .auth-card-wrap {
    max-width: 100%;
    margin-top: 8px;
  }

  .auth-card-rainbow {
    border-radius: 16px;
  }

  .auth-card {
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  }

  .auth-card-body {
    padding: 24px 20px 20px;
  }

  .auth-card-footer {
    padding: 14px 20px;
  }

  .domain-verify-code { font-size: 10.5px; }

  .page-body {
    overflow-y: visible;
  }
}

/* ── Utility / extracted inline styles ── */

/* Profile page */
.profile-header-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.profile-title-compact { margin-bottom: 2px; }

.profile-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.text-mono-muted {
  font-size: 12px;
  color: var(--text-3);
  font-family: var(--mono);
}

.text-small-muted {
  font-size: 11px;
  color: var(--text-3);
}

.text-strong { color: var(--text-1); }

/* Filter bar */
.filter-bar-tight {
  gap: 10px;
  flex-wrap: nowrap;
}

.filter-divider {
  width: 1px;
  height: 16px;
  background: var(--border);
  flex-shrink: 0;
}

/* Buttons as links */
.acct-btn-link {
  text-decoration: none;
  white-space: nowrap;
}

/* Auth */
.auth-btn-signup { background: var(--green); }

.auth-input-password { padding-right: 42px; }

.auth-username-preview { color: var(--accent); }

/* Nav */
.nav-link-accent {
  color: var(--accent);
  background: var(--accent-light);
}

.sidebar-legal {
  border-top: 1px solid var(--border);
  margin-top: 14px;
  padding-top: 8px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.sidebar-legal a {
  font-size: 10px;
  color: var(--text-3);
  text-decoration: none;
  transition: color 0.12s;
}

.sidebar-legal a:hover { color: var(--accent); }

.mobile-logout-section {
  margin-top: auto;
  padding-top: 24px;
}

/* Feed page */
.feed-meta-body {
  padding-top: 16px;
  padding-bottom: 16px;
}

.feed-state-margin { margin-top: 20px; }

.form-inline { display: inline; }

/* Account page */
.flash-top { margin-top: 20px; }

.acct-input-danger { border-color: rgba(192,57,43,0.4); }

.acct-danger-confirm-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.acct-btn-danger-confirm {
  background: #C0392B;
  color: #fff;
  border: none;
  padding: 9px 18px;
}

.acct-danger-username { color: #C0392B; }

.acct-input-acct { padding-right: 38px; }

.domain-hint-code {
  font-family: var(--mono);
  font-size: 11px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 4px;
}

.acct-btn-row-flush { margin-top: 0; }
.acct-btn-row-spaced { margin-top: 16px; }
.acct-domain-row-tight { margin-bottom: 10px; }
.acct-hint-spaced { margin-bottom: 16px; }
.acct-hint-tight { margin-bottom: 14px; }

.form-inline-end {
  display: inline;
  margin-left: auto;
}

/* Empty state actions */
.empty-action { margin-top: 8px; }
