@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  color-scheme: light;
  --bg: #F2F4F7;
  --surface: #FFFFFF;
  --surface-2: #EAECF1;
  --text: #0D1326;
  --text-muted: #5B6472;
  --text-faint: #8A93A1;
  --border: #E1E5EB;
  --border-strong: #CBD2DC;
  --accent: #2563EB;
  --accent-strong: #1D4ED8;
  --accent-soft: #E4ECFD;
  --violet: #7C3AED;
  --violet-soft: #EFE6FD;
  --gradient: linear-gradient(135deg, var(--accent), var(--violet));
  --success: #22C55E;
  --success-soft: #E4F9EC;
  --amber: #D97706;
  --amber-soft: #FCEDD3;
  --brick: #DC2626;
  --brick-soft: #FBE2E1;
  --slate: #8A93A1;
  --slate-soft: #EAECF1;
  --shadow: rgba(13, 19, 38, 0.08);
  --shadow-strong: rgba(13, 19, 38, 0.24);
  --focus: #2563EB;
  --sidebar-bg: #0D1326;
  --sidebar-bg-2: #171E38;
  --sidebar-text: #C6CCDA;
  --sidebar-text-dim: #7C879C;
  --sidebar-active-bg: rgba(255, 255, 255, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B0E17;
    --surface: #141826;
    --surface-2: #1B2032;
    --text: #ECEEF5;
    --text-muted: #A2A9BC;
    --text-faint: #6C7387;
    --border: #262C40;
    --border-strong: #343B54;
    --accent: #5B8DF6;
    --accent-strong: #83A9FA;
    --accent-soft: rgba(91, 141, 246, 0.16);
    --violet: #A480F5;
    --violet-soft: rgba(164, 128, 245, 0.16);
    --success: #4ADE80;
    --success-soft: rgba(74, 222, 128, 0.14);
    --amber: #F0A93E;
    --amber-soft: rgba(240, 169, 62, 0.15);
    --brick: #F0685F;
    --brick-soft: rgba(240, 104, 95, 0.15);
    --slate: #9AA2B6;
    --slate-soft: rgba(154, 162, 182, 0.14);
    --shadow: rgba(0, 0, 0, 0.35);
    --shadow-strong: rgba(0, 0, 0, 0.6);
    --focus: #83A9FA;
  }
}
:root[data-theme="dark"] {
  --bg: #0B0E17;
  --surface: #141826;
  --surface-2: #1B2032;
  --text: #ECEEF5;
  --text-muted: #A2A9BC;
  --text-faint: #6C7387;
  --border: #262C40;
  --border-strong: #343B54;
  --accent: #5B8DF6;
  --accent-strong: #83A9FA;
  --accent-soft: rgba(91, 141, 246, 0.16);
  --violet: #A480F5;
  --violet-soft: rgba(164, 128, 245, 0.16);
  --success: #4ADE80;
  --success-soft: rgba(74, 222, 128, 0.14);
  --amber: #F0A93E;
  --amber-soft: rgba(240, 169, 62, 0.15);
  --brick: #F0685F;
  --brick-soft: rgba(240, 104, 95, 0.15);
  --slate: #9AA2B6;
  --slate-soft: rgba(154, 162, 182, 0.14);
  --shadow: rgba(0, 0, 0, 0.35);
  --shadow-strong: rgba(0, 0, 0, 0.6);
  --focus: #83A9FA;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent-soft); }
a { color: var(--accent-strong); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
button { font-family: inherit; }
.mono { font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, monospace; }
.rw-icon { width: 17px; height: 17px; flex-shrink: 0; }

/* ---------- App shell: sidebar + main ---------- */
.rw-shell { display: flex; min-height: 100vh; align-items: stretch; }
.rw-sidebar {
  width: 232px; flex-shrink: 0; background: var(--sidebar-bg);
  display: flex; flex-direction: column; padding: 18px 14px;
  position: sticky; top: 0; height: 100vh;
}
.rw-sidebar-brand {
  display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none;
  font-weight: 700; font-size: 16px; padding: 6px 8px 22px;
}
.rw-sidebar-brand img { border-radius: 6px; }
.rw-sidebar-nav { display: flex; flex-direction: column; gap: 2px; }
.rw-sidebar-nav a {
  display: flex; align-items: center; gap: 11px; color: var(--sidebar-text);
  text-decoration: none; font-size: 13.5px; font-weight: 500;
  padding: 9px 10px; border-radius: 8px; transition: background 0.12s ease, color 0.12s ease;
}
.rw-sidebar-nav a:hover { background: rgba(255,255,255,0.05); color: #fff; }
.rw-sidebar-nav a.active { background: var(--sidebar-active-bg); color: #fff; }
.rw-sidebar-nav a.active .rw-icon { color: #8FB4FF; }
.rw-sidebar-divider { height: 1px; background: rgba(255,255,255,0.08); margin: 14px 4px; }
.rw-sidebar-nav-secondary { margin-bottom: auto; }
.rw-sidebar-footer { display: flex; align-items: center; gap: 6px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.08); margin-top: 14px; }
.rw-theme-toggle {
  width: 32px; height: 32px; border-radius: 8px; border: none; background: rgba(255,255,255,0.06);
  color: var(--sidebar-text); cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.rw-theme-toggle:hover { background: rgba(255,255,255,0.12); color: #fff; }
.rw-theme-icon-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .rw-theme-icon-light { display: none; }
  :root:not([data-theme="light"]) .rw-theme-icon-dark { display: flex; }
}
:root[data-theme="dark"] .rw-theme-icon-light { display: none; }
:root[data-theme="dark"] .rw-theme-icon-dark { display: flex; }
.rw-sidebar-whoami {
  display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--sidebar-text);
  flex: 1; min-width: 0; padding: 4px 6px; border-radius: 8px;
}
.rw-sidebar-whoami:hover, .rw-sidebar-whoami.active { background: rgba(255,255,255,0.06); color: #fff; }
.rw-sidebar-whoami-name { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rw-sidebar-logout { color: var(--sidebar-text-dim); text-decoration: none; font-size: 15px; padding: 4px 6px; border-radius: 8px; flex-shrink: 0; }
.rw-sidebar-logout:hover { color: #fff; background: rgba(255,255,255,0.06); }

.rw-main { flex: 1; min-width: 0; }

/* ---------- Topbar (Dashboard / board pages) ---------- */
.rw-topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px 28px; flex-wrap: wrap; border-bottom: 1px solid var(--border);
}
.rw-topbar-title { font-size: 22px; font-weight: 800; margin: 0; letter-spacing: -0.01em; }
.rw-topbar-sub { color: var(--text-muted); font-size: 13px; margin: 3px 0 0; }
.rw-topbar-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.rw-platform-select {
  font-family: inherit; font-size: 12.5px; font-weight: 600; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  padding: 7px 12px;
}
.rw-peers { display: flex; align-items: center; }
.rw-peer-dot {
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: #fff;
  border: 2px solid var(--bg); margin-left: -8px;
  font-family: 'IBM Plex Mono', monospace;
}
.rw-peer-dot:first-child { margin-left: 0; }
.rw-toggle { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-muted); cursor: pointer; user-select: none; }
.rw-toggle input { accent-color: var(--accent); width: 14px; height: 14px; }

.rw-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  font-size: 10px; font-weight: 700; font-family: 'IBM Plex Mono', monospace;
  flex-shrink: 0;
}

.rw-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 15px; border-radius: 9px; border: 1px solid transparent;
  font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.05s ease, box-shadow 0.12s ease;
}
.rw-btn:active { transform: translateY(1px); }
.rw-btn-primary { background: var(--gradient); color: #fff; box-shadow: 0 2px 8px rgba(37, 99, 235, 0.28); }
.rw-btn-primary:hover { filter: brightness(1.06); box-shadow: 0 4px 14px rgba(37, 99, 235, 0.36); }
.rw-btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.rw-btn-ghost:hover { border-color: var(--border-strong); background: var(--surface-2); }
.rw-btn-danger { color: var(--brick); border-color: var(--brick-soft); }
.rw-btn-danger:hover { background: var(--brick-soft); }
.rw-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.rw-btn-accent { background: var(--violet-soft); color: var(--violet); border: 1px solid var(--violet); }
.rw-btn-accent:hover { background: var(--violet); color: #fff; }
.rw-btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 7px; }

/* ---------- Auth pages ---------- */
.rw-auth-wrap { min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--bg); }
.rw-auth-card { max-width: 360px; width: 100%; }
.rw-auth-logo { display: flex; justify-content: center; margin-bottom: 14px; }
.rw-auth-logo img { border-radius: 12px; box-shadow: 0 6px 18px var(--shadow-strong); }
.rw-auth-brand { font-size: 26px; font-weight: 800; margin: 0 0 4px; text-align: center; letter-spacing: -0.01em; }
.rw-auth-tag { text-align: center; color: var(--text-muted); font-size: 12.5px; margin: 0 0 26px; }
.rw-auth-form { display: flex; flex-direction: column; gap: 14px; }
.rw-auth-field { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--text-muted); }
.rw-auth-field input {
  font-family: inherit; font-size: 14px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 9px;
  padding: 10px 12px;
}
.rw-auth-field input:focus { border-color: var(--accent); outline: none; }
.rw-auth-submit { justify-content: center; margin-top: 4px; padding: 11px 14px; }
.rw-auth-hint { color: var(--text-faint); font-size: 12px; text-align: center; margin-top: 16px; }

.rw-alert { border-radius: 9px; padding: 9px 13px; font-size: 12.5px; margin-bottom: 14px; }
.rw-alert-error { background: var(--brick-soft); color: var(--brick); border: 1px solid var(--brick); }
.rw-alert-success { background: var(--success-soft); color: #158a45; border: 1px solid var(--success); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .rw-alert-success { color: var(--success); }
}
:root[data-theme="dark"] .rw-alert-success { color: var(--success); }

/* ---------- Page wrap (Team / Account / Settings) ---------- */
.rw-page-wrap { max-width: 640px; padding: 32px 28px 60px; }
.rw-page-wrap-wide { max-width: 760px; }
.rw-page-title { font-size: 24px; font-weight: 800; margin: 0 0 6px; letter-spacing: -0.01em; }
.rw-page-sub { color: var(--text-muted); font-size: 13px; margin: 0 0 20px; }
.rw-section-title { font-size: 15.5px; font-weight: 700; margin: 26px 0 10px; }
.rw-team-list { display: flex; flex-direction: column; gap: 10px; }
.rw-team-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface);
}
.rw-team-name { font-weight: 600; font-size: 13.5px; }
.rw-team-username { color: var(--text-faint); font-size: 12px; margin-left: auto; }
.rw-inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.rw-inline-form-stacked { flex-direction: column; align-items: stretch; max-width: 340px; }
.rw-inline-form input {
  font-family: inherit; font-size: 13.5px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 7px;
  padding: 9px 11px; flex: 1; min-width: 140px;
}
.rw-inline-form input:focus { border-color: var(--accent); outline: none; }
.rw-form-label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 12px; flex: 1; }
.rw-form-label input, .rw-form-label select, .rw-form-label textarea {
  font-family: inherit; font-size: 13.5px; font-weight: 400; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 9px 11px; resize: vertical;
}
.rw-form-label input:focus, .rw-form-label select:focus, .rw-form-label textarea:focus { border-color: var(--accent); outline: none; }
.rw-form-label-narrow { max-width: 110px; }
.rw-form-row { display: flex; gap: 12px; }
.rw-form-row .rw-form-label { min-width: 0; }
.rw-checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); margin-bottom: 14px; font-weight: 500; }
.rw-checkbox-row input { accent-color: var(--accent); width: 15px; height: 15px; }
.rw-hint { font-size: 11.5px; color: var(--text-faint); margin: -6px 0 12px; }

/* ---------- Settings ---------- */
.rw-settings-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 22px 24px; margin-bottom: 20px;
}
.rw-settings-form { margin-top: 14px; }
.rw-platform-table { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.rw-platform-row {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border: 1px solid var(--border); border-radius: 9px; background: var(--bg);
}
.rw-platform-swatch { width: 14px; height: 14px; border-radius: 5px; flex-shrink: 0; }
.rw-platform-name { font-weight: 600; font-size: 13px; }
.rw-platform-prefix { font-size: 11px; color: var(--text-faint); }
.rw-platform-count { font-size: 11.5px; color: var(--text-muted); margin-left: auto; }
.rw-platform-row-editing { background: var(--accent-soft); }
.rw-platform-name-input { flex: 1; font-family: inherit; font-size: 13px; padding: 6px 10px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.rw-color-input { width: 30px; height: 30px; border: 1px solid var(--border); border-radius: 7px; padding: 0; background: none; cursor: pointer; flex-shrink: 0; }

/* ---------- Dashboard ---------- */
.rw-dash-wrap { padding: 24px 28px 50px; }
.rw-stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 26px; }
.rw-stat-tile {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 16px 18px; text-decoration: none; color: var(--text); display: flex; flex-direction: column; gap: 6px;
  transition: box-shadow 0.15s ease, transform 0.1s ease;
}
.rw-stat-tile:hover { box-shadow: 0 6px 18px var(--shadow); transform: translateY(-1px); }
.rw-stat-dot { width: 9px; height: 9px; border-radius: 50%; }
.rw-stat-num { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.rw-stat-label { font-size: 12.5px; color: var(--text-muted); font-weight: 500; }
.rw-dash-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.rw-dash-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 6px 0 10px; }
.rw-dash-panel-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px 10px; }
.rw-dash-panel-head h3 { font-size: 13.5px; font-weight: 700; margin: 0; }
.rw-dash-panel-head a { font-size: 12px; font-weight: 600; text-decoration: none; }
.rw-dash-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 18px; text-decoration: none; color: var(--text); border-top: 1px solid var(--border);
}
.rw-dash-row:hover { background: var(--bg); }
.rw-dash-row-title { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rw-dash-row-comment { flex-direction: column; align-items: flex-start; gap: 3px; }
.rw-dash-row-comment .rw-dash-row-title { font-weight: 500; }
.rw-dash-row-snippet { font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }

/* ---------- Board ---------- */
.rw-board-wrap { padding: 20px 28px 40px; }
.rw-banner {
  display: none; align-items: center; gap: 8px;
  background: var(--amber-soft); color: var(--text); border: 1px solid var(--amber);
  padding: 8px 14px; border-radius: 9px; font-size: 12.5px; margin-bottom: 16px;
}
.rw-board { display: flex; gap: 16px; align-items: flex-start; overflow-x: auto; padding-bottom: 8px; }
.rw-col {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px;
  min-width: 280px; max-width: 340px; flex: 1 1 300px;
  display: flex; flex-direction: column; max-height: calc(100vh - 170px);
}
.rw-col-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.rw-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.rw-col-title { font-weight: 700; font-size: 13px; }
.rw-col-count {
  margin-left: auto; font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--text-faint);
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 1px 7px;
}
.rw-col-body { padding: 10px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.rw-empty { color: var(--text-faint); font-size: 12.5px; padding: 16px 6px; text-align: center; }

.rw-card {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid var(--card-accent, var(--slate)); border-radius: 10px;
  padding: 11px 13px; cursor: pointer; box-shadow: 0 1px 2px var(--shadow);
  transition: box-shadow 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.rw-card:hover { box-shadow: 0 6px 16px var(--shadow); border-color: var(--border-strong); transform: translateY(-1px); }
.rw-card-top { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }
.rw-num { font-family: 'IBM Plex Mono', monospace; font-size: 10.5px; color: var(--text-faint); }
.rw-platform-badge {
  font-size: 9.5px; font-weight: 700; padding: 1px 6px; border-radius: 4px; color: #fff;
}
.rw-type-badge {
  font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  padding: 1px 6px; border-radius: 4px;
}
.rw-type-feature { background: var(--accent-soft); color: var(--accent-strong); }
.rw-type-bug { background: var(--brick-soft); color: var(--brick); }
.rw-card-title { font-size: 13.5px; font-weight: 600; margin: 0 0 6px; text-wrap: balance; }
.rw-card-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 11px; color: var(--text-muted); }
.rw-chip { font-size: 10.5px; font-weight: 600; padding: 1px 7px; border-radius: 999px; display: inline-block; }
.rw-chip-neutral { background: var(--slate-soft); color: var(--slate); }
.rw-chip-amber { background: var(--amber-soft); color: var(--amber); }
.rw-chip-brick { background: var(--brick-soft); color: var(--brick); }
.rw-meta-icon { display: inline-flex; align-items: center; gap: 3px; }

/* ---------- Overlay / Drawer ---------- */
.rw-backdrop {
  position: fixed; inset: 0; background: rgba(10, 13, 22, 0.42);
  z-index: 30; opacity: 0; pointer-events: none; transition: opacity 0.15s ease;
}
.rw-backdrop.open { opacity: 1; pointer-events: auto; }
.rw-drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: min(760px, 96vw);
  background: var(--surface); border-left: 1px solid var(--border);
  box-shadow: -8px 0 24px var(--shadow-strong);
  z-index: 31; transform: translateX(100%); transition: transform 0.18s ease;
  display: flex; flex-direction: column;
}
.rw-drawer.open { transform: translateX(0); }
.rw-drawer-head { display: flex; align-items: flex-start; gap: 10px; padding: 18px 20px 14px; border-bottom: 1px solid var(--border); }
.rw-drawer-head-main { flex: 1; min-width: 0; }
.rw-drawer-title { font-weight: 700; font-size: 18px; margin: 4px 0 0; text-wrap: balance; }
.rw-close { background: transparent; border: none; color: var(--text-faint); cursor: pointer; font-size: 18px; line-height: 1; padding: 4px; }
.rw-close:hover { color: var(--text); }
.rw-drawer-body { flex: 1; overflow-y: auto; padding: 16px 24px 90px; }

.rw-editor-toolbar { display: flex; gap: 4px; margin-bottom: 6px; }
.rw-editor-toolbar button {
  width: 28px; height: 28px; border-radius: 7px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-muted); cursor: pointer;
  font-size: 12.5px; display: inline-flex; align-items: center; justify-content: center;
}
.rw-editor-toolbar button:hover { border-color: var(--border-strong); }
.rw-editor-toolbar button.active { background: var(--accent-soft); color: var(--accent-strong); border-color: var(--accent); }

.rw-editor {
  width: 100%; min-height: 110px; max-height: 280px; overflow-y: auto;
  font-family: inherit; font-size: 13.5px; color: var(--text); line-height: 1.55;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 9px 11px;
}
.rw-editor:focus { border-color: var(--accent); outline: none; }
.rw-editor:empty::before { content: attr(data-placeholder); color: var(--text-faint); }
.rw-editor ul, .rw-editor ol { margin: 4px 0; padding-left: 20px; }
.rw-editor p { margin: 0 0 6px; }

.rw-photo-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.rw-photo-thumb { position: relative; width: 64px; height: 64px; border-radius: 9px; overflow: hidden; border: 1px solid var(--border); }
.rw-photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: pointer; }
.rw-photo-remove {
  position: absolute; top: 2px; right: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: rgba(10, 10, 15, 0.65); color: #fff; border: none; font-size: 10px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.rw-photo-add {
  width: 64px; height: 64px; border-radius: 9px; border: 1px dashed var(--border-strong);
  background: var(--surface-2); color: var(--text-faint); cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.rw-photo-add:hover { border-color: var(--accent); color: var(--accent); }
.rw-photo-add input { display: none; }

.rw-editor-actions { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }

.rw-lightbox {
  position: fixed; inset: 0; z-index: 60; background: rgba(6, 8, 14, 0.85);
  display: none; align-items: center; justify-content: center; padding: 40px; cursor: zoom-out;
}
.rw-lightbox.open { display: flex; }
.rw-lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,0.5); }

.rw-status-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.rw-status-btn {
  font-size: 11px; font-weight: 600; padding: 5px 10px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); cursor: pointer;
}
.rw-status-btn[data-active="true"] { border-color: transparent; color: #fff; background: var(--status-color, var(--slate)); }
.rw-status-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.rw-field { margin-bottom: 14px; }
.rw-field label { display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-faint); margin-bottom: 4px; }
.rw-field .rw-value { font-size: 13.5px; white-space: pre-wrap; }
.rw-field input[type="text"], .rw-field input[type="url"], .rw-field textarea, .rw-field select {
  width: 100%; font-family: inherit; font-size: 13.5px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 7px;
  padding: 8px 10px; resize: vertical;
}
.rw-field input:focus, .rw-field textarea:focus, .rw-field select:focus { border-color: var(--accent); outline: none; }
.rw-field textarea { min-height: 80px; }

.rw-divider { border: none; border-top: 1px solid var(--border); margin: 18px 0; }
.rw-drawer-actions { display: flex; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; }

.rw-submitted-box { background: var(--success-soft); border: 1px solid var(--success); border-radius: 9px; padding: 10px 12px; font-size: 12.5px; margin-bottom: 16px; }
.rw-submit-panel { background: var(--accent-soft); border: 1px solid var(--accent); border-radius: 9px; padding: 12px; margin-bottom: 16px; }
.rw-submit-panel .rw-field { margin-bottom: 10px; }
.rw-ai-panel { background: var(--violet-soft); border: 1px solid var(--violet); border-radius: 9px; padding: 12px; margin-bottom: 16px; }
.rw-ai-panel .rw-hint { margin: 6px 0 0; }

.rw-section-title-drawer { font-weight: 700; font-size: 14.5px; margin: 0 0 10px; }

.rw-comment { padding: 10px 0; border-bottom: 1px solid var(--border); }
.rw-comment:last-child { border-bottom: none; }
.rw-comment-head { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.rw-comment-author { font-weight: 600; font-size: 12.5px; }
.rw-comment-time { font-size: 11px; color: var(--text-faint); font-family: 'IBM Plex Mono', monospace; }
.rw-comment-text { font-size: 13px; white-space: pre-wrap; }
.rw-comment-empty { color: var(--text-faint); font-size: 12.5px; padding: 6px 0 14px; }

.rw-comment-compose {
  position: sticky; bottom: 0; background: var(--surface); border-top: 1px solid var(--border);
  padding: 12px 20px; display: flex; gap: 8px; align-items: flex-end;
}
.rw-comment-compose textarea {
  flex: 1; font-family: inherit; font-size: 13px; border: 1px solid var(--border);
  border-radius: 9px; padding: 8px 10px; resize: none; min-height: 38px; max-height: 100px;
  background: var(--surface); color: var(--text);
}

.rw-add-platform-row { display: flex; gap: 8px; align-items: center; }

.rw-toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(8px);
  background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 999px;
  font-size: 13px; font-weight: 600; box-shadow: 0 8px 24px var(--shadow-strong);
  z-index: 70; opacity: 0; pointer-events: none; transition: opacity 0.18s ease, transform 0.18s ease;
}
.rw-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .rw-drawer, .rw-backdrop, .rw-card, .rw-toast { transition: none; }
}
@media (max-width: 900px) {
  .rw-shell { flex-direction: column; }
  .rw-sidebar { width: 100%; height: auto; position: static; flex-direction: row; align-items: center; padding: 10px 14px; overflow-x: auto; }
  .rw-sidebar-brand { padding: 6px 10px 6px 0; }
  .rw-sidebar-nav { flex-direction: row; }
  .rw-sidebar-nav span:not(.rw-icon) { display: none; }
  .rw-sidebar-divider { display: none; }
  .rw-sidebar-nav-secondary { margin-bottom: 0; margin-left: auto; }
  .rw-sidebar-footer { border-top: none; margin-top: 0; padding-top: 0; }
  .rw-sidebar-whoami-name { display: none; }
  .rw-stat-row { grid-template-columns: repeat(2, 1fr); }
  .rw-dash-cols { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .rw-topbar { padding: 16px; }
  .rw-board-wrap { padding: 14px 12px 40px; }
  .rw-dash-wrap { padding: 16px; }
  .rw-drawer { width: 100vw; }
}
