/* broadcast-join-v1 — 加入做主播：規則 + 驗證 gate（規則同 Premium 一致）. Self-contained. */

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-sans); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* ============ APP SHELL ============ */
.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 720px);
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

/* ============ SIDEBAR ============ */
.sidebar { position: sticky; top: 24px; height: calc(100vh - 48px); display: flex; flex-direction: column; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 14px; font-size: 32px; font-weight: 800; margin-bottom: 36px; color: var(--text); }
.brand img { width: 42px; height: 42px; object-fit: contain; }
.sidebar nav { display: flex; flex-direction: column; gap: 8px; }
.sidebar nav a {
  padding: 14px 18px;
  color: var(--text-soft);
  border-radius: 999px;
  font-weight: 600;
  font-size: 16px;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.sidebar nav a.active,
.sidebar nav a:hover {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-card);
}
.new-post {
  border-radius: 999px;
  background: var(--cta-bg);
  color: var(--cta-text);
  font-weight: 700;
  padding: 14px 22px;
  font-size: 16px;
}

/* ============ MAIN ============ */
.main { min-width: 0; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  min-height: 44px;
  gap: 12px;
}
.topbar .back {
  display: none;
  width: 36px; height: 36px;
  align-items: center; justify-content: center;
  font-size: 22px;
  color: var(--text);
}
.topbar h1 { font-size: 26px; margin: 0; font-weight: 700; letter-spacing: -0.01em; flex: 1; }
.topbar-brand { display: none; align-items: center; gap: 8px; color: var(--text); font-weight: 800; font-size: 22px; letter-spacing: -0.01em; }
.topbar-brand img { width: 24px; height: 24px; object-fit: contain; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 16px 18px;
  margin-bottom: 14px;
}

/* ============ HERO ============ */
.hero-card { display: flex; align-items: center; gap: 12px; }
.hero-ic {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid; place-items: center;
  flex-shrink: 0;
  background: var(--primary-soft);
  color: var(--primary-dark);
}
.hero-body { flex: 1; min-width: 0; }
.hero-body b { display: block; font-size: 15px; font-weight: 800; }
.hero-body small { display: block; margin-top: 2px; font-size: 12px; color: var(--text-soft); line-height: 1.5; }

/* ============ 規則 / 驗證（同 profile-v1 Premium gate 一套） ============ */
.rules-card h4,
.checks-card h4 {
  font-size: 11px;
  margin: 0 0 8px;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}
.rules-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rules-card li {
  font-size: 13px;
  line-height: 1.55;
  padding-left: 20px;
  position: relative;
}
.rules-card li.ok::before {
  content: "✓";
  position: absolute;
  left: 0; top: 0;
  color: var(--success);
  font-weight: 800;
}
.rules-card li.bad::before {
  content: "✕";
  position: absolute;
  left: 0; top: 0;
  color: var(--error);
  font-weight: 800;
}
.rules-card li b { font-weight: 700; }

.check-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}
.check-row:last-child { border-bottom: 0; padding-bottom: 2px; }
.check-row .check-ic {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--surface-soft);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.check-row .check-text { flex: 1; min-width: 0; }
.check-row .check-text b { display: block; font-size: 13px; font-weight: 700; }
.check-row .check-text small { display: block; font-size: 11px; color: var(--text-soft); margin-top: 2px; }
.check-row .check-status {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--warning);
  color: white;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}
.check-row .check-status.done { background: var(--success); }

/* ============ CTA ============ */
.primary-btn {
  display: block;
  width: 100%;
  padding: 13px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.35);
  transition: opacity 0.15s, background 0.15s, transform 0.05s;
}
.primary-btn:hover { transform: translateY(-1px); }
.primary-btn.warn {
  background: linear-gradient(135deg, var(--warning), #d97706);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.35);
}

.info-note {
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-soft);
  line-height: 1.6;
  text-align: center;
}
.info-note a { color: var(--primary-dark); font-weight: 600; }

/* ============ MOBILE NAV ============ */
.mobile-nav { display: none; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .app-shell { grid-template-columns: 220px minmax(0, 1fr); padding: 16px; gap: 18px; }
}

@media (max-width: 720px) {
  .app-shell { grid-template-columns: 1fr; padding: 0; gap: 0; }
  .sidebar { display: none; }
  .main { padding: 14px 16px 90px; }
  .topbar { padding: 4px 0 10px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
  .topbar .back { display: inline-flex; }
  .topbar h1 { font-size: 18px; text-align: center; }
  .topbar-brand { display: none; }

  .mobile-nav {
    position: fixed;
    left: 12px; right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: center;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow-card);
    padding: 10px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 20;
  }
  .mobile-nav a { text-align: center; font-size: 12px; color: var(--text-soft); padding: 8px 4px; }
  .mobile-nav a.active { color: var(--text); font-weight: 600; }
  .mobile-nav .compose-btn {
    width: 46px; height: 46px;
    margin: auto; padding: 0;
    border-radius: 50%;
    background: var(--cta-bg); color: var(--cta-text);
    display: grid; place-items: center; line-height: 1;
  }
}
