/* Root Variables for Light Theme */
[data-theme="light"] {
  --bg-color: #ffffff;
  --text-color: #111111;
  --header-bg: #f6f6f6;
  --card-bg: #ffffff;
  --button-bg: #eeeeee;
  --button-border: #cccccc;
}

/* Root Variables for Dark Theme */
[data-theme="dark"] {
  --bg-color: #121212;
  --text-color: #eeeeee;
  --header-bg: #1a1a1a;
  --card-bg: #222222;
  --button-bg: #333333;
  --button-border: #444444;
}

[data-theme="aurora-glass"] {
  --bg-color: #050916;
  --text-color: #e2e8f0;
  --header-bg: rgba(6, 10, 22, 0.92);
  --card-bg: rgba(7, 11, 23, 0.9);
  --button-bg: rgba(15, 23, 42, 0.82);
  --button-border: rgba(148, 163, 184, 0.3);
}

/* Global Styles */
html, body {
  background: var(--bg-color, #ffffff);
  color: var(--text-color, #111111);
  transition: background 0.3s ease, color 0.3s ease;
}

@import url('https://fonts.googleapis.com/css2?family=Fraunces:wght@600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* Auth Page Styles */
body.auth-page {
  background: linear-gradient(145deg, var(--auth-bg-start, #111), var(--auth-bg-end, #1c1c1c));
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  font-family: 'Segoe UI', sans-serif;
}

.form-container {
  background: #1e1e1e;
  padding: 40px;
  border-radius: 16px;
  box-shadow: 0 0 30px rgba(0, 255, 255, 0.1);
  width: 100%;
  max-width: 400px;
}

.form-container h1 {
  margin-bottom: 30px;
  font-size: 28px;
  text-align: center;
  color: #09f;
}

.input-group {
  margin-bottom: 20px;
}

.input-group label {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
  color: #aaa;
}

.input-group input {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: none;
  outline: none;
  background: #2a2a2a;
  color: #fff;
  font-size: 16px;
  transition: 0.2s;
}

.password-field {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.password-field input {
  flex: 1;
  padding-right: 44px;
  position: relative;
  z-index: 1;
}

.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  padding: 6px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: #cbd5f5;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  z-index: 2;
}

.password-toggle svg {
  width: 18px;
  height: 18px;
  display: block;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  background: #2a2a2a;
  color: #ffffff;
  border-color: rgba(59, 130, 246, 0.6);
  outline: none;
}

.input-group input:focus {
  background: #333;
  box-shadow: 0 0 0 2px #09f;
}

.auth-button {
  width: 100%;
  padding: 14px;
  background: #09f;
  color: white;
  font-size: 16px;
  font-weight: bold;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
}

.auth-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-button:hover {
  background: #0077cc;
}

.auth-social {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.google-signin {
  display: flex;
  justify-content: center;
  width: 100%;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 6px 0 22px;
  color: #9aa3b2;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.auth-helper {
  margin-top: 12px;
  text-align: center;
  color: #9aa3b2;
  font-size: 13px;
}

.toast-stack {
  position: fixed;
  top: 16px;
  right: 16px;
  display: grid;
  gap: 10px;
  z-index: 9999;
  max-width: min(360px, 92vw);
}

.toast {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.95);
  color: #e2e8f0;
  font-size: 13px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.is-leaving {
  opacity: 0;
  transform: translateY(-6px);
}

.toast--success {
  border-color: rgba(34, 197, 94, 0.4);
  background: rgba(12, 28, 18, 0.95);
  color: #bbf7d0;
}

.toast--error {
  border-color: rgba(248, 113, 113, 0.4);
  background: rgba(30, 16, 16, 0.95);
  color: #fecaca;
}

.toast--info {
  border-color: rgba(94, 234, 212, 0.35);
  background: rgba(10, 26, 30, 0.95);
  color: #99f6e4;
}

.password-strength {
  margin-top: 10px;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 12px;
  display: none;
  gap: 8px;
  font-size: 12px;
  color: #9aa3b2;
}

.password-strength.is-visible {
  display: grid;
}

.password-strength__bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.password-strength__fill {
  display: block;
  height: 100%;
  width: 0%;
  background: #ef4444;
  transition: width 0.2s ease, background 0.2s ease;
}

.password-strength__text {
  font-weight: 600;
  color: #cbd5f5;
}

.password-strength__rules {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 4px;
}

.password-strength__rules li {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #9aa3b2;
}

.password-strength__rules li::before {
  content: '•';
  color: #475569;
}

.password-strength__rules li.is-valid {
  color: #7dd3fc;
}

.password-strength__rules li.is-valid::before {
  content: '✓';
  color: #22c55e;
}

.password-strength.is-weak .password-strength__fill {
  background: #ef4444;
}

.password-strength.is-fair .password-strength__fill {
  background: #f59e0b;
}

.password-strength.is-good .password-strength__fill {
  background: #3b82f6;
}

.password-strength.is-strong .password-strength__fill {
  background: #22c55e;
}

.username-status {
  margin-top: 8px;
  font-size: 12px;
  color: #9aa3b2;
  min-height: 16px;
}

.username-status.is-checking {
  color: #94a3b8;
}

.username-status.is-available {
  color: #22c55e;
}

.username-status.is-taken {
  color: #ef4444;
}

.confirm-status {
  margin-top: 8px;
  font-size: 12px;
  color: #9aa3b2;
  min-height: 16px;
}

.confirm-status.is-match {
  color: #22c55e;
}

.confirm-status.is-mismatch {
  color: #ef4444;
}

.auth-link {
  margin-top: 20px;
  text-align: center;
  color: #aaa;
}

.auth-link a {
  color: #09f;
  text-decoration: none;
}

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

/* Login page redesign */
body.auth-page.auth-page--login {
  background: radial-gradient(circle at 12% 18%, rgba(59, 130, 246, 0.22), transparent 46%),
              radial-gradient(circle at 82% 12%, rgba(45, 212, 191, 0.2), transparent 44%),
              radial-gradient(circle at 78% 82%, rgba(249, 115, 22, 0.16), transparent 40%),
              #060b1a;
  color: #e2e8f0;
  min-height: 100vh;
  display: block;
  padding: 48px 20px;
  font-family: 'Space Grotesk', 'Segoe UI', sans-serif;
  margin: 0;
  overflow-x: hidden;
}

body.auth-page.auth-page--login .auth-shell {
  max-width: 520px;
  margin: 0 auto;
  display: grid;
  gap: 24px;
}

body.auth-page.auth-page--login .auth-panel {
  border-radius: 24px;
  padding: 32px;
  background: rgba(12, 18, 34, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.6);
  backdrop-filter: blur(16px);
}

body.auth-page.auth-page--login .auth-panel--form .form-container {
  width: 100%;
  max-width: none;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

body.auth-page.auth-page--login .auth-form-header {
  text-align: center;
}

body.auth-page.auth-page--login .auth-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  margin-bottom: 8px;
}

body.auth-page.auth-page--login .auth-brand__logo {
  height: 36px;
  width: auto;
  display: block;
}

body.auth-page.auth-page--login .auth-form-header h1 {
  margin: 0 0 6px;
  font-size: 28px;
  color: #f8fafc;
  font-family: 'Fraunces', 'Space Grotesk', serif;
  letter-spacing: -0.01em;
}

body.auth-page.auth-page--login .auth-form-header p {
  margin: 0 0 18px;
  color: rgba(226, 232, 240, 0.72);
}

body.auth-page.auth-page--login .form-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

body.auth-page.auth-page--login .auth-social {
  margin-bottom: 16px;
  width: 100%;
}

body.auth-page.auth-page--login .google-signin {
  justify-content: flex-start;
  width: 100%;
}

body.auth-page.auth-page--login .auth-divider {
  color: rgba(148, 163, 184, 0.72);
}

body.auth-page.auth-page--login .auth-divider::before,
body.auth-page.auth-page--login .auth-divider::after {
  background: rgba(148, 163, 184, 0.22);
}

body.auth-page.auth-page--login .input-group label {
  color: rgba(226, 232, 240, 0.78);
}

body.auth-page.auth-page--login .input-group {
  width: 100%;
  max-width: 454px;
  margin-left: auto;
  margin-right: auto;
}

body.auth-page.auth-page--login .input-group input {
  box-sizing: border-box;
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: #f8fafc;
}

body.auth-page.auth-page--login .input-group input:focus {
  background: rgba(15, 23, 42, 0.94);
  box-shadow: 0 0 0 2px rgba(45, 212, 191, 0.4);
}

body.auth-page.auth-page--login .password-toggle {
  color: rgba(226, 232, 240, 0.75);
}

body.auth-page.auth-page--login .password-toggle:hover,
body.auth-page.auth-page--login .password-toggle:focus-visible {
  background: rgba(15, 23, 42, 0.92);
  color: #ffffff;
  border-color: rgba(59, 130, 246, 0.65);
}

body.auth-page.auth-page--login .auth-button {
  background: linear-gradient(135deg, #2dd4bf, #3b82f6);
  border: none;
  color: #041018;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 18px 36px rgba(14, 116, 144, 0.4);
}

body.auth-page.auth-page--login .auth-button:hover {
  background: linear-gradient(135deg, #5eead4, #60a5fa);
}

body.auth-page.auth-page--login .auth-button:disabled {
  background: rgba(148, 163, 184, 0.22);
  color: rgba(226, 232, 240, 0.7);
  box-shadow: none;
}

body.auth-page.auth-page--login .auth-helper {
  color: rgba(148, 163, 184, 0.88);
}

body.auth-page.auth-page--login .auth-link {
  color: rgba(148, 163, 184, 0.84);
  font-size: 13px;
}

body.auth-page.auth-page--login .auth-link a {
  color: rgba(125, 211, 252, 0.92);
}

.auth-link--inline {
  margin-top: 12px;
}

@media (max-width: 600px) {
  body.auth-page.auth-page--login {
    padding: 24px 16px;
  }

  body.auth-page.auth-page--login .auth-panel {
    padding: 24px;
  }
}

/* Forgot password redesign */
body.auth-page.auth-page--forgot {
  background: radial-gradient(circle at 14% 18%, rgba(59, 130, 246, 0.2), transparent 48%),
              radial-gradient(circle at 84% 14%, rgba(45, 212, 191, 0.18), transparent 44%),
              radial-gradient(circle at 76% 84%, rgba(249, 115, 22, 0.14), transparent 42%),
              #050916;
  color: #e2e8f0;
  min-height: 100vh;
  display: block;
  padding: 48px 20px;
  font-family: 'Space Grotesk', 'Segoe UI', sans-serif;
  margin: 0;
  overflow-x: hidden;
}

body.auth-page.auth-page--forgot .auth-shell {
  max-width: 520px;
  margin: 0 auto;
  display: grid;
  gap: 24px;
}

body.auth-page.auth-page--forgot .auth-panel {
  border-radius: 24px;
  padding: 32px;
  background: rgba(10, 16, 32, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.62);
  backdrop-filter: blur(16px);
}

body.auth-page.auth-page--forgot .auth-panel--form .form-container {
  width: 100%;
  max-width: none;
  background: transparent;
  padding: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

body.auth-page.auth-page--forgot .auth-form-header {
  text-align: center;
}

body.auth-page.auth-page--forgot .auth-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  margin-bottom: 8px;
}

body.auth-page.auth-page--forgot .auth-brand__logo {
  height: 36px;
  width: auto;
  display: block;
}

body.auth-page.auth-page--forgot .auth-form-header h1 {
  margin: 0 0 6px;
  font-size: 28px;
  color: #f8fafc;
  font-family: 'Fraunces', 'Space Grotesk', serif;
  letter-spacing: -0.01em;
}

body.auth-page.auth-page--forgot .auth-form-header p {
  margin: 0 0 18px;
  color: rgba(226, 232, 240, 0.72);
}

body.auth-page.auth-page--forgot .input-group {
  width: 100%;
  max-width: 454px;
  margin-left: auto;
  margin-right: auto;
}

body.auth-page.auth-page--forgot .input-group label {
  color: rgba(226, 232, 240, 0.78);
}

body.auth-page.auth-page--forgot .input-group input {
  box-sizing: border-box;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: #f8fafc;
}

body.auth-page.auth-page--forgot .input-group input:focus {
  background: rgba(15, 23, 42, 0.96);
  box-shadow: 0 0 0 2px rgba(45, 212, 191, 0.4);
}

body.auth-page.auth-page--forgot .auth-button {
  max-width: 454px;
  margin-left: auto;
  margin-right: auto;
  background: linear-gradient(135deg, #2dd4bf, #3b82f6);
  border: none;
  color: #041018;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 18px 36px rgba(14, 116, 144, 0.4);
}

body.auth-page.auth-page--forgot .auth-button:hover {
  background: linear-gradient(135deg, #5eead4, #60a5fa);
}

body.auth-page.auth-page--forgot .auth-button:disabled {
  background: rgba(148, 163, 184, 0.22);
  color: rgba(226, 232, 240, 0.7);
  box-shadow: none;
}

body.auth-page.auth-page--forgot .auth-helper {
  color: rgba(148, 163, 184, 0.88);
}

body.auth-page.auth-page--forgot .auth-link {
  color: rgba(148, 163, 184, 0.84);
  font-size: 13px;
}

body.auth-page.auth-page--forgot .auth-link a {
  color: rgba(125, 211, 252, 0.92);
}

@media (max-width: 600px) {
  body.auth-page.auth-page--forgot {
    padding: 24px 16px;
  }

  body.auth-page.auth-page--forgot .auth-panel {
    padding: 24px;
  }
}

/* Register page redesign */
body.auth-page--register {
  background: radial-gradient(circle at 15% 20%, rgba(45, 212, 191, 0.18), transparent 45%),
              radial-gradient(circle at 80% 10%, rgba(59, 130, 246, 0.2), transparent 46%),
              radial-gradient(circle at 80% 80%, rgba(249, 115, 22, 0.18), transparent 42%),
              #0b1020;
  color: #e2e8f0;
  min-height: 100vh;
  display: block;
  padding: 48px 20px;
  font-family: 'Space Grotesk', 'Segoe UI', sans-serif;
  margin: 0;
  overflow-x: hidden;
}

body.auth-page--register .auth-shell {
  max-width: 520px;
  margin: 0 auto;
  display: grid;
  gap: 24px;
}

body.auth-page--register .auth-panel {
  border-radius: 24px;
  padding: 32px;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.55);
  backdrop-filter: blur(16px);
}

body.auth-page--register .auth-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

body.auth-page--register .auth-panel--form .form-container {
  width: 100%;
  max-width: none;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

body.auth-page--register .auth-form-header h1 {
  margin: 0 0 8px;
  font-size: 26px;
  color: #f8fafc;
}

body.auth-page--register .auth-form-header p {
  margin: 0 0 18px;
  color: rgba(226, 232, 240, 0.7);
}

body.auth-page--register .auth-form-header .auth-brand {
  display: inline-flex;
  margin-bottom: 8px;
  justify-content: center;
}

body.auth-page--register .auth-brand__logo {
  height: 36px;
  width: auto;
  display: block;
}

body.auth-page--register .auth-form-header {
  text-align: center;
}

body.auth-page--register .form-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

body.auth-page--register .auth-social {
  margin-bottom: 16px;
  width: 100%;
}

body.auth-page--register .google-signin {
  justify-content: flex-start;
  width: 100%;
}

body.auth-page--register .auth-divider {
  color: rgba(148, 163, 184, 0.7);
}

body.auth-page--register .auth-divider::before,
body.auth-page--register .auth-divider::after {
  background: rgba(148, 163, 184, 0.2);
}

body.auth-page--register .input-group label {
  color: rgba(226, 232, 240, 0.75);
}

body.auth-page--register .input-group input {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #f8fafc;
}

body.auth-page--register #username,
body.auth-page.auth-page--register #username,
body.auth-page--register #email,
body.auth-page.auth-page--register #email {
  width: 454px;
  max-width: 100%;
}

body.auth-page--register .input-group input:focus {
  background: rgba(15, 23, 42, 0.9);
  box-shadow: 0 0 0 2px rgba(45, 212, 191, 0.4);
}

body.auth-page--register .password-strength {
  background: rgba(15, 23, 42, 0.8);
  border-color: rgba(148, 163, 184, 0.2);
}

body.auth-page--register .auth-button {
  background: linear-gradient(135deg, #2dd4bf, #3b82f6);
  border: none;
  color: #041018;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 18px 36px rgba(14, 116, 144, 0.4);
}

body.auth-page--register .auth-button:hover {
  background: linear-gradient(135deg, #5eead4, #60a5fa);
}

body.auth-page--register .auth-button:disabled {
  background: rgba(148, 163, 184, 0.2);
  color: rgba(226, 232, 240, 0.7);
  box-shadow: none;
}

body.auth-page--register .auth-helper {
  color: rgba(148, 163, 184, 0.85);
}

body.auth-page--register .auth-link,
body.auth-page--register .auth-legal {
  color: rgba(148, 163, 184, 0.8);
  font-size: 13px;
}

body.auth-page--register .auth-legal {
  margin-top: 10px;
  text-align: center;
}

body.auth-page--register .auth-legal a {
  color: rgba(125, 211, 252, 0.9);
  text-decoration: none;
}

body.auth-page--register .auth-legal a:hover,
body.auth-page--register .auth-legal a:focus-visible {
  text-decoration: underline;
}

@media (max-width: 600px) {
  body.auth-page--register {
    padding: 24px 16px;
  }

  body.auth-page--register .auth-panel {
    padding: 24px;
  }
}

/* Aurora Glass across auth and onboarding */
body.theme-aurora.auth-page,
body.theme-aurora.onboarding-page {
  background:
    radial-gradient(circle at 12% 18%, rgba(59, 130, 246, 0.28), transparent 46%),
    radial-gradient(circle at 84% 12%, rgba(45, 212, 191, 0.24), transparent 44%),
    radial-gradient(circle at 78% 84%, rgba(248, 113, 113, 0.16), transparent 42%),
    linear-gradient(160deg, #0b1020 0%, #020617 100%);
  color: #e2e8f0;
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  color: #000;
  padding: 15px 30px;
  border-bottom: 1px solid #ccc;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-weight: bold;
  font-size: 20px;
}

nav {
  display: flex;
  gap: 20px;
}

nav a {
  text-decoration: none;
  color: #111;
  font-weight: bold;
}

nav a:hover {
  text-decoration: underline;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 5px;
}

.search-bar input {
  padding: 6px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.search-bar button {
  padding: 6px 10px;
  background: #eee;
  border: 1px solid #ccc;
  border-radius: 6px;
  cursor: pointer;
}

/* Layout wrapper */
.layout {
  display: flex;
}

/* Ensure the navbar stays on top */
.navbar {
  position: sticky;
  top: 0;
  height: 30px;
  z-index: 100;
}

/* Rito only */
.rito-card .collapsible-text {
  max-height: 90px;
  overflow: hidden;
}

.rito-card .collapsible-text.expanded {
  max-height: none;
}

.rito-card .see-more-btn {
  cursor: pointer;
  background: none;
  border: 0;
  color: #1b82f1;
  font-weight: 600;
  padding: 0;
}

.rito-card .rito-carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 12px;
  background: #000;
  border: 1px solid #1f2937;
}

.rito-card .rito-carousel-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.rito-card .rito-carousel img,
.rito-card .rito-carousel video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.rito-card .rito-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 9999px;
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
  background: rgba(0,0,0,.55);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity .2s ease, transform .2s ease;
  opacity: .9;
}

.rito-card .rito-carousel-btn:hover,
.rito-card .rito-carousel-btn:focus-visible {
  opacity: 1;
  transform: translateY(-50%) scale(1.04);
}

.rito-card .rito-carousel-btn.prev {
  left: .65rem;
}

.rito-card .rito-carousel-btn.next {
  right: .65rem;
}

.rito-card .rito-carousel-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: .35rem;
  padding: .35rem .65rem;
  background: rgba(0,0,0,.4);
  border-radius: 9999px;
  backdrop-filter: blur(4px);
}

.rito-card .rito-carousel-dots > span {
  width: .5rem;
  height: .5rem;
  border-radius: 9999px;
  background: rgba(255,255,255,.35);
  opacity: 1;
  transition: transform .2s ease, background-color .2s ease;
}

.rito-card .rito-carousel-dots > span.active {
  background: #fff;
  transform: scale(1.15);
}

.rito-card .rito-carousel-count {
  position: absolute;
  top: .8rem;
  right: .8rem;
  padding: .25rem .65rem;
  border-radius: 9999px;
  background: rgba(0,0,0,.6);
  color: #fff;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .01em;
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
}

/* Flex layout for page below navbar */
.page-layout {
  display: flex;
  width: 100%;
  min-height: calc(100vh - 60px);
  gap: 20px;
  align-items: flex-start;
}

/* Sidebar on the left */
.sidebar {
  position: sticky;
  top: 70px;
  align-self: flex-start;
  width: 220px;
  padding: 20px 18px;
  background: #1a1a1a;
  color: #fff;
  transition: width 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  max-height: calc(100vh - 70px);
  overflow-y: auto;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 4px 0 18px rgba(0, 0, 0, 0.25);
}

.sidebar.collapsed {
  width: 60px;
  padding: 20px 10px;
}

#sidebarToggle {
  width: 100%;
  padding: 10px;
  background: #111;
  color: white;
  border: none;
  cursor: pointer;
}

.sidebar-icons {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 18px;
  margin-top: 8px;
}

.sidebar .icon {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  font-size: 18px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.sidebar .icon:hover {
  background: rgba(255, 255, 255, 0.08);
}

.sidebar .icon a {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
  flex: 1;
}

.sidebar .icon a:hover,
.sidebar .icon a:focus-visible {
  text-decoration: underline;
}

.sidebar.collapsed .icon {
  justify-content: center;
  padding: 10px 0;
}

.sidebar.collapsed .icon a {
  display: none;
}

.sidebar.collapsed .icon [class$='__label'] {
  display: none;
}

.sidebar.collapsed .sidebar-section-heading {
  display: none;
}

/* Main content beside sidebar */
.main-content {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  min-width: 0;
}

/* Right Sidebar */
.right-sidebar {
  position: sticky;
  top: 70px;
  align-self: flex-start;
  width: 220px;
  background: #1a1a1a;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 10px 0;
  transition: width 0.3s ease;
  max-height: calc(100vh - 90px);
  overflow-y: auto;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.35);
}


.right-sidebar.collapsed { 
  width: 60px; 
  max-height: none;
  overflow: visible;
}

.right-sidebar button#rightSidebarToggle {
  width: 100%;
  background: #111;
  color: #fff;
  border: none;
  padding: 5px;
  cursor: pointer;
  text-align: center;
}

/* Notes page */
.notes-layout {
  gap: 24px;
}

.notes-main {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-bottom: 48px;
}

.notes-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.notes-hero__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notes-hero__eyebrow {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #1d4ed8;
}

.notes-hero__title {
  margin: 0;
  font-size: 34px;
  font-weight: 700;
  color: #0f172a;
}

.notes-hero__subtitle {
  margin: 0;
  max-width: 560px;
  color: #475569;
  font-size: 16px;
  line-height: 1.5;
}

.notes-hero__meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 120px;
}

.notes-total {
  font-size: 42px;
  font-weight: 700;
  line-height: 1;
  color: #0f172a;
}

.notes-total__label {
  font-size: 14px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.notes-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 20px 24px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.notes-toolbar__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.notes-filter-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 220px;
}

.notes-filter-label {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
}

.notes-filter-field input,
.notes-filter-field select {
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: #f8fafc;
  color: #0f172a;
}

.notes-filter-field input:focus,
.notes-filter-field select:focus {
  outline: 2px solid rgba(59, 130, 246, 0.5);
  outline-offset: 2px;
}

.notes-toolbar__actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.notes-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #ffffff;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.notes-btn:hover,
.notes-btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.35);
}

.notes-btn--ghost {
  background: transparent;
  border: 1px solid rgba(37, 99, 235, 0.4);
  color: #2563eb;
  box-shadow: none;
}

.notes-btn--ghost:hover,
.notes-btn--ghost:focus-visible {
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.25);
}

.notes-counters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.notes-counter {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  min-width: 120px;
  padding: 16px 18px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.4);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.notes-counter__value {
  font-size: 24px;
  font-weight: 700;
  color: #0f172a;
}

.notes-counter__label {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #475569;
}

.notes-counter:hover,
.notes-counter:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.12);
}

.notes-counter.is-active {
  border-color: rgba(37, 99, 235, 0.7);
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.2);
}

.notes-filters {
  display: grid;
  gap: 20px;
}

.notes-tag-manager {
  background: #ffffff;
  border-radius: 18px;
  padding: 20px 24px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.notes-tag-manager__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.notes-tag-manager__title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #0f172a;
}

.notes-tag-manager__hint {
  margin: 6px 0 0;
  font-size: 0.9rem;
  color: #64748b;
}

.notes-tag-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.notes-tag-form__row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 12px;
}

.notes-tag-color {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.notes-tag-color__value {
  font-size: 0.85rem;
  color: #64748b;
}

.notes-tag-form__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.notes-tag-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notes-tag-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.notes-tag-item__info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.notes-tag-swatch {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--tag-color, #38bdf8);
  box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.2);
}

.notes-tag-name {
  margin: 0;
  font-weight: 600;
  color: #0f172a;
}

.notes-tag-meta {
  margin: 2px 0 0;
  font-size: 0.82rem;
  color: #64748b;
}

.notes-tag-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.notes-btn--danger {
  border-color: rgba(239, 68, 68, 0.35);
  color: #ef4444;
}

.notes-btn--danger:hover,
.notes-btn--danger:focus-visible {
  background: rgba(239, 68, 68, 0.12);
}

/* Onboarding page */
.onboarding-page {
  min-height: 100vh;
  margin: 0;
  padding: 0;
  background:
    radial-gradient(circle at 10% 10%, rgba(59, 130, 246, 0.25), transparent 45%),
    radial-gradient(circle at 85% 15%, rgba(45, 212, 191, 0.2), transparent 40%),
    radial-gradient(circle at 50% 90%, rgba(248, 113, 113, 0.18), transparent 50%),
    linear-gradient(160deg, #0b1020 0%, #020617 100%);
  color: #e2e8f0;
  font-family: 'Space Grotesk', 'Segoe UI', sans-serif;
  overflow-x: hidden;
}

.onboarding-backdrop {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 6vh, 72px) clamp(16px, 4vw, 56px);
  box-sizing: border-box;
}

.onboarding-panel {
  width: min(1040px, 100%);
  min-height: clamp(640px, 82vh, 880px);
  padding: clamp(24px, 4vw, 56px);
  box-sizing: border-box;
  margin: 0 auto;
  display: grid;
  gap: clamp(16px, 2.5vw, 28px);
  background: linear-gradient(160deg, rgba(12, 18, 34, 0.92) 0%, rgba(5, 9, 20, 0.96) 70%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: clamp(24px, 4vw, 40px);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow:
    0 40px 100px -56px rgba(8, 47, 73, 0.7),
    0 22px 60px -40px rgba(59, 130, 246, 0.45);
}

.onboarding-panel__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.onboarding-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.onboarding-brand__logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.onboarding-panel__hero {
  max-width: 720px;
  display: grid;
  gap: 10px;
}

.onboarding-panel__hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  color: #f8fafc;
  font-family: 'Fraunces', 'Space Grotesk', serif;
  letter-spacing: -0.01em;
}

.onboarding-panel__hero p {
  margin: 0;
  color: rgba(226, 232, 240, 0.75);
  font-size: 1.05rem;
  line-height: 1.6;
}

.onboarding-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: rgba(148, 163, 184, 0.85);
}

.onboarding__progress {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.55);
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.85);
}

.onboarding-panel__header {
  display: grid;
  gap: 8px;
  max-width: 720px;
}

.onboarding__title {
  margin: 0;
  font-size: 1.55rem;
  color: #f8fafc;
}

.onboarding__subtitle {
  margin: 0;
  color: rgba(226, 232, 240, 0.7);
  font-size: 1rem;
}

.onboarding__count {
  font-size: 0.9rem;
  color: rgba(148, 163, 184, 0.9);
}

.onboarding__status {
  font-size: 0.9rem;
  color: rgba(148, 163, 184, 0.7);
}

.onboarding__status.is-error {
  color: #fca5a5;
}

.onboarding__options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.onboarding__custom {
  grid-column: 1 / -1;
  order: 999;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px;
  margin-top: 6px;
  border-radius: 18px;
  border: 1px solid rgba(59, 130, 246, 0.35);
  background:
    linear-gradient(135deg, rgba(59, 130, 246, 0.18), rgba(45, 212, 191, 0.12)),
    rgba(15, 23, 42, 0.72);
  align-items: center;
  box-shadow: 0 24px 44px -34px rgba(59, 130, 246, 0.65);
}

.onboarding__custom-input {
  flex: 1 1 260px;
  min-width: min(100%, 260px);
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.42);
  background: rgba(2, 6, 23, 0.62);
  color: #e2e8f0;
  font-family: inherit;
  font-size: 0.98rem;
}

.onboarding__custom-input:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.72);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.onboarding__custom-input::placeholder {
  color: rgba(148, 163, 184, 0.85);
}

.onboarding__custom-btn {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid rgba(45, 212, 191, 0.6);
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.9), rgba(59, 130, 246, 0.92));
  color: #041018;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  white-space: nowrap;
}

.onboarding__custom-btn:hover,
.onboarding__custom-btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px -18px rgba(59, 130, 246, 0.78);
  outline: none;
}

.onboarding__custom-hint {
  width: 100%;
  font-size: 0.88rem;
  color: rgba(148, 163, 184, 0.9);
  margin-top: 2px;
}

.onboarding__chip {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  padding: 14px 16px;
  background: rgba(15, 23, 42, 0.5);
  color: #e2e8f0;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.onboarding__chip:hover {
  transform: translateY(-2px);
  border-color: rgba(59, 130, 246, 0.55);
  box-shadow: 0 16px 30px -24px rgba(59, 130, 246, 0.7);
}

.onboarding__chip.is-selected {
  border-color: rgba(45, 212, 191, 0.75);
  background: rgba(45, 212, 191, 0.18);
  color: #f8fafc;
  box-shadow: 0 18px 34px -24px rgba(45, 212, 191, 0.7);
}

.onboarding__chip:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.8);
  outline-offset: 2px;
}

.onboarding__actions {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}

.onboarding__btn {
  border-radius: 999px;
  padding: 12px 22px;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  text-align: center;
  font-family: inherit;
}

.onboarding__btn--primary {
  background: linear-gradient(135deg, #2dd4bf, #3b82f6);
  color: #041018;
  box-shadow: 0 20px 36px -24px rgba(59, 130, 246, 0.7);
}

.onboarding__btn--ghost {
  background: transparent;
  border-color: rgba(148, 163, 184, 0.35);
  color: rgba(226, 232, 240, 0.9);
}

.onboarding__btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.onboarding__btn:focus-visible,
.onboarding__skip:focus-visible {
  outline: 2px solid rgba(45, 212, 191, 0.8);
  outline-offset: 3px;
}

.onboarding__skip {
  border: none;
  background: transparent;
  color: rgba(148, 163, 184, 0.8);
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: underline;
  justify-self: start;
}

.onboarding__complete {
  display: grid;
  gap: 8px;
  text-align: center;
  padding-top: 8px;
}

.onboarding__complete[hidden] {
  display: none !important;
}

.onboarding__complete h3 {
  margin: 0;
  color: #f8fafc;
}

.onboarding__complete p {
  margin: 0 0 8px;
  color: rgba(148, 163, 184, 0.8);
  font-size: 0.95rem;
}

@media (max-width: 720px) {
  .onboarding-backdrop {
    padding: 20px 14px 32px;
    align-items: center;
    justify-content: center;
  }
  .onboarding-panel {
    padding: 20px 18px 32px;
    min-height: auto;
    width: 100%;
    max-width: 560px;
    border-radius: 28px;
  }
  .onboarding-panel__top {
    flex-direction: column;
    align-items: flex-start;
  }
  .onboarding__actions {
    flex-direction: column;
    align-items: stretch;
  }
  .onboarding__btn {
    width: 100%;
  }
  .onboarding__options {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }
  .onboarding__custom {
    flex-direction: column;
    align-items: stretch;
  }
  .onboarding__custom-input {
    min-width: 0;
    width: 100%;
  }
  .onboarding__custom-btn {
    width: 100%;
  }
}

.notes-tag-empty {
  margin: 0;
  color: #64748b;
}

.notes-filter-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 24px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.notes-filter-heading {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #0f172a;
}

.notes-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.notes-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: #f1f5f9;
  color: #0f172a;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.notes-chip__swatch {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--chip-color, #38bdf8);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.7);
}

.notes-chip__count {
  font-variant-numeric: tabular-nums;
  color: #475569;
}

.notes-chip:hover,
.notes-chip:focus-visible {
  background: #dbeafe;
  border-color: rgba(37, 99, 235, 0.5);
  color: #1d4ed8;
}

.notes-chip.is-active {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 12px 26px rgba(124, 58, 237, 0.28);
}

.notes-chip.is-active .notes-chip__count {
  color: rgba(255, 255, 255, 0.85);
}

.notes-chip-empty {
  margin: 0;
  font-size: 13px;
  color: #64748b;
}

.notes-status {
  padding: 12px 18px;
  border-radius: 14px;
  background: rgba(148, 163, 184, 0.12);
  color: #0f172a;
  font-size: 14px;
  font-weight: 500;
}

.notes-status--success {
  background: rgba(34, 197, 94, 0.16);
  color: #15803d;
}

.notes-status--error {
  background: rgba(239, 68, 68, 0.16);
  color: #b91c1c;
}

.notes-status--muted {
  background: rgba(148, 163, 184, 0.12);
  color: #475569;
}

.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.notes-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.08);
}

.notes-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.notes-card__title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #0f172a;
}

.notes-card__meta-line {
  display: flex;
  gap: 12px;
  align-items: baseline;
  font-size: 13px;
  color: #64748b;
}

.notes-card__updated {
  font-style: italic;
}

.notes-card__actions {
  display: flex;
  gap: 8px;
}

.notes-action {
  border: none;
  background: rgba(148, 163, 184, 0.16);
  color: #0f172a;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.notes-action:hover,
.notes-action:focus-visible {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.notes-action--danger {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

.notes-action--danger:hover,
.notes-action--danger:focus-visible {
  background: rgba(239, 68, 68, 0.2);
  color: #991b1b;
}

.notes-card__tags,
.notes-card__hashtags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.notes-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--tag-color, rgba(37, 99, 235, 0.4));
}

.notes-hashtag {
  border: none;
  background: rgba(14, 165, 233, 0.12);
  color: #0ea5e9;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.notes-hashtag:hover,
.notes-hashtag:focus-visible {
  background: rgba(14, 165, 233, 0.2);
  color: #0284c7;
}

.notes-card__content {
  font-size: 15px;
  line-height: 1.6;
  color: #1e293b;
}

.notes-card__content br {
  content: '';
  display: block;
  margin-top: 8px;
}

.notes-card__empty {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(148, 163, 184, 0.16);
  color: #475569;
  font-size: 13px;
}

.notes-placeholder {
  padding: 30px;
  border-radius: 16px;
  background: rgba(148, 163, 184, 0.12);
  color: #475569;
  font-weight: 500;
}

.notes-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px 24px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px dashed rgba(148, 163, 184, 0.4);
  text-align: center;
  color: #475569;
}

.notes-empty__icon {
  font-size: 42px;
}

.notes-empty__title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #0f172a;
}

.notes-empty__subtitle {
  margin: 0;
  font-size: 15px;
}

.notes-editor {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(8, 11, 20, 0.68);
  z-index: 1200;
}

.notes-editor[hidden] {
  display: none !important;
}

.notes-editor__dialog {
  position: relative;
  width: min(640px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: #ffffff;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 40px 80px rgba(15, 23, 42, 0.25);
}

.notes-editor__header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.notes-editor__title {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  color: #0f172a;
}

.notes-editor__subtitle {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 14px;
}

.notes-editor__close {
  border: none;
  background: rgba(148, 163, 184, 0.16);
  color: #475569;
  font-size: 20px;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  cursor: pointer;
}

.notes-editor__body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.notes-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.notes-field__label {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
}

.notes-field input,
.notes-field textarea,
.notes-field select {
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: #f8fafc;
  padding: 10px 12px;
  font-size: 14px;
  color: #0f172a;
}

.notes-field textarea {
  resize: vertical;
  min-height: 160px;
}

.notes-field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.notes-editor__footer {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

body.notes-editor-open {
  overflow: hidden;
}

body.notes-editor-open #navbar,
body.notes-editor-open .navbar {
  display: none !important;
}

body.dark .notes-hero,
body.dark .notes-toolbar,
body.dark .notes-filter-group,
body.dark .notes-tag-manager,
body.dark .notes-card,
body.dark .notes-empty,
body.dark .notes-editor__dialog {
  background: #1f2340;
  border-color: #2b3158;
  color: #e2e8f0;
  box-shadow: 0 24px 40px rgba(2, 6, 23, 0.55);
}

body.dark .notes-hero__eyebrow {
  color: #60a5fa;
}

body.dark .notes-hero__title,
body.dark .notes-total,
body.dark .notes-empty__title,
body.dark .notes-card__title {
  color: #f8fafc;
}

body.dark .notes-hero__subtitle,
body.dark .notes-total__label,
body.dark .notes-summary,
body.dark .notes-card__content,
body.dark .notes-chip-empty,
body.dark .notes-filter-label,
body.dark .notes-field__label {
  color: #cbd5f5;
}

body.dark .notes-tag-manager__hint,
body.dark .notes-tag-color__value,
body.dark .notes-tag-meta,
body.dark .notes-tag-empty {
  color: #cbd5f5;
}

body.dark .notes-tag-manager__title,
body.dark .notes-tag-name {
  color: #f8fafc;
}

body.dark .notes-tag-item {
  background: rgba(15, 23, 42, 0.9);
  border-color: #2b3158;
}

body.dark .notes-filter-field input,
body.dark .notes-filter-field select,
body.dark .notes-field input,
body.dark .notes-field textarea,
body.dark .notes-field select {
  background: #0f172a;
  border-color: #27324d;
  color: #f8fafc;
}

body.dark .notes-counter {
  background: #13172b;
  border-color: #27324d;
}

body.dark .notes-counter__value {
  color: #f8fafc;
}

body.dark .notes-counter__label {
  color: #94a3c6;
}

body.dark .notes-chip {
  background: #101427;
  border-color: #27324d;
  color: #cbd5f5;
}

body.dark .notes-chip__count {
  color: #94a3c6;
}

body.dark .notes-chip:hover,
body.dark .notes-chip:focus-visible {
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
}

body.dark .notes-chip.is-active {
  box-shadow: 0 12px 26px rgba(124, 58, 237, 0.35);
}

body.dark .notes-status {
  background: rgba(59, 130, 246, 0.18);
  color: #bfdbfe;
}

body.dark .notes-status--success {
  background: rgba(34, 197, 94, 0.22);
  color: #86efac;
}

body.dark .notes-status--error {
  background: rgba(239, 68, 68, 0.25);
  color: #fecaca;
}

body.dark .notes-card__content {
  color: #e2e8f0;
}

body.dark .notes-card__date,
body.dark .notes-card__updated {
  color: #94a3c6;
}

body.dark .notes-tag {
  background: rgba(59, 130, 246, 0.22);
  color: #bfdbfe;
}

body.dark .notes-hashtag {
  background: rgba(14, 165, 233, 0.22);
  color: #67e8f9;
}

body.dark .notes-placeholder {
  background: rgba(30, 41, 59, 0.5);
  color: #cbd5f5;
}

body.dark .notes-editor {
  background: rgba(2, 6, 23, 0.65);
}

body.dark .notes-editor__close {
  background: rgba(59, 130, 246, 0.22);
  color: #bfdbfe;
}

@media (max-width: 1024px) {
  .notes-hero,
  .notes-toolbar,
  .notes-filter-group,
  .notes-tag-manager,
  .notes-card,
  .notes-empty,
  .notes-editor__dialog {
    border-radius: 16px;
  }

  .notes-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .notes-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .notes-tag-form__row {
    grid-template-columns: 1fr;
  }

  .notes-toolbar__filters {
    width: 100%;
  }

  .notes-toolbar__actions {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .notes-counter {
    min-width: calc(50% - 12px);
  }

  .notes-filter-field {
    min-width: 100%;
  }

  .notes-editor__dialog {
    padding: 18px;
  }
}

.right-sidebar-icons {
  width: 100%;
  display: flex;
  flex-direction: column;
  margin-top: 10px;
}

.right-sidebar-icons + .right-sidebar-icons {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 18px;
  padding-top: 8px;
}

.right-sidebar .sidebar-section-heading {
  width: 100%;
  padding: 4px 15px 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.55);
}

.right-sidebar.collapsed .sidebar-section-heading {
  display: none;
}


.right-sidebar .icon {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  gap: 10px;
  cursor: pointer;
  transition: background 0.2s;
}

.right-sidebar .icon:hover {
  background: #333;
}

.note-widget__toggle {
  width: 100%;
  padding: 10px 15px;
  border: none;
  background: transparent;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: background 0.2s ease, color 0.2s ease;
}

.note-widget__toggle:hover,
.note-widget__toggle:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}

.note-widget__toggle.is-active {
  background: rgba(148, 163, 184, 0.16);
}

.note-widget__glyph {
  width: 24px;
  display: inline-flex;
  justify-content: center;
  font-size: 1.1rem;
}

.note-widget__text {
  flex: 1;
  white-space: nowrap;
}

.right-sidebar.collapsed .note-widget__text {
  display: none;
}

.note-widget__composer {
  position: absolute;
  width: min(420px, calc(100vw - 48px));
  max-width: calc(100vw - 24px);
  box-sizing: border-box;
  padding: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(8px);
  border-radius: 16px;
  margin: 0;
  box-shadow: 0 18px 30px rgba(15, 23, 42, 0.28);
  display: none;
  z-index: 2000;
}

.note-widget__composer.is-open {
  display: block;
}

.note-widget__form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  box-sizing: border-box;
}

.note-widget__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: rgba(226, 232, 240, 0.88);
  width: 100%;
  box-sizing: border-box;
}

.note-widget__field-label {
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.9);
}

.note-widget__input,
.note-widget__textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  background: rgba(15, 23, 42, 0.6);
  color: #e2e8f0;
  padding: 10px 12px;
  font: inherit;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.note-widget__input:focus,
.note-widget__textarea:focus {
  outline: none;
  border-color: #38bdf8;
  background: rgba(15, 23, 42, 0.9);
}

.note-widget__textarea {
  resize: vertical;
  min-height: 96px;
  max-height: 240px;
}

.note-widget__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.note-widget__cancel,
.note-widget__submit {
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 600;
  font-size: 13px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.note-widget__cancel {
  background: transparent;
  color: rgba(226, 232, 240, 0.8);
  border-color: rgba(148, 163, 184, 0.32);
}

.note-widget__cancel:hover,
.note-widget__cancel:focus-visible {
  border-color: rgba(148, 163, 184, 0.6);
  color: #e2e8f0;
}

.note-widget__submit {
  background: linear-gradient(135deg, #38bdf8, #818cf8);
  color: #0f172a;
  border: none;
}

.note-widget__submit:hover,
.note-widget__submit:focus-visible {
  transform: translateY(-1px);
}

.note-widget__submit:disabled {
  opacity: 0.6;
  cursor: progress;
}

.note-widget__status {
  font-size: 12px;
  margin: 2px 0 0;
  color: rgba(226, 232, 240, 0.8);
}

.note-widget__status--success {
  color: #34d399;
}

.note-widget__status--error {
  color: #f87171;
}

@media (max-width: 768px) {
  .note-widget__composer {
    width: min(360px, calc(100vw - 24px));
    padding: 12px;
  }
}

body.dark .note-widget__toggle:hover,
body.dark .note-widget__toggle:focus-visible {
  background: rgba(255, 255, 255, 0.08);
}

body.dark .note-widget__toggle.is-active {
  background: rgba(148, 163, 184, 0.2);
}

body.dark .note-widget__composer {
  background: rgba(2, 6, 23, 0.95);
  border-top-color: rgba(51, 65, 85, 0.4);
}

body.dark .note-widget__field {
  color: rgba(203, 213, 225, 0.95);
}

body.dark .note-widget__field-label {
  color: rgba(148, 163, 184, 0.85);
}

body.dark .note-widget__input,
body.dark .note-widget__textarea {
  background: rgba(15, 23, 42, 0.75);
  border-color: rgba(148, 163, 184, 0.32);
  color: #e2e8f0;
}

body.dark .note-widget__input:focus,
body.dark .note-widget__textarea:focus {
  background: rgba(15, 23, 42, 0.95);
  border-color: #38bdf8;
}

body.dark .note-widget__cancel {
  color: rgba(226, 232, 240, 0.85);
  border-color: rgba(148, 163, 184, 0.4);
}

body.dark .note-widget__cancel:hover,
body.dark .note-widget__cancel:focus-visible {
  border-color: rgba(148, 163, 184, 0.7);
  color: #f8fafc;
}

body.dark .note-widget__status {
  color: rgba(226, 232, 240, 0.85);
}

body.dark .note-widget__status--error {
  color: #fca5a5;
}

body.dark .note-widget__status--success {
  color: #4ade80;
}

.right-sidebar .icon a {
  color: inherit;
  text-decoration: none;
}

.right-sidebar .icon a:hover,
.right-sidebar .icon a:focus-visible {
  text-decoration: underline;
}

.right-sidebar .label {
  white-space: nowrap;
  overflow: hidden;
  transition: opacity 0.2s ease;
}

.right-sidebar.collapsed .label {
  opacity: 0;
}

@media (max-width: 1200px) {
  .sidebar {
    width: 190px;
    padding: 18px 14px;
  }

  .sidebar.collapsed {
    width: 56px;
  }
}

@media (max-width: 1024px) {
  .page-layout {
    flex-direction: column;
    height: auto;
  }

  .main-content {
    margin-right: 0;
  }

  .sidebar {
    position: static;
    width: 100%;
    order: 1;
    max-height: none;
    padding: 16px;
    border-right: none;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  }

  .sidebar.collapsed {
    width: 100%;
    padding: 16px;
  }
}



@media (max-width: 1200px) {
  .page-layout {
    gap: 16px;
  }

  .right-sidebar {
    width: 200px;
  }
}

@media (max-width: 1024px) {
  .page-layout {
    flex-direction: column;
    min-height: 0;
  }

  .main-content {
    order: 2;
    overflow: visible;
  }

  .right-sidebar {
    position: static;
    order: 3;
    width: 100%;
    max-height: none;
    overflow: visible;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: none;
  }

  .right-sidebar.collapsed {
    width: 100%;
  }

  .right-sidebar button#rightSidebarToggle {
    text-align: left;
    padding-left: 15px;
  }

  .right-sidebar .right-sidebar-icons {
    padding: 0 15px;
  }
}

/*Rito in feed post*/
#ritoForm {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

#ritoForm textarea {
  padding: 10px;
  font-size: 16px;
  resize: vertical;
}

#ritoForm input[type="file"] {
  padding: 5px;
}

#ritoForm button {
  padding: 8px 16px;
  border-radius: 5px;
  cursor: pointer;
  background-color: var(--button-bg);
  color: var(--text-color);
  border: 1px solid var(--button-border);
}

/*media in post sizing*/
.post-image, .post-video {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-top: 10px;
  display: block;
}

.collage {
  display: grid;
  gap: 6px;
  border-radius: 14px;
  overflow: hidden;
}

.collage.collage-1 {
  grid-template-columns: 1fr;
}

.collage.collage-2 {
  grid-template-columns: 1fr 1fr;
}

.collage.collage-3 {
  grid-template-columns: 1.25fr 0.75fr;
  grid-auto-rows: 180px;
}

.collage.collage-3 > :first-child {
  grid-row: 1/3;
}

.collage.collage-4 {
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: 160px;
}

.collage.collage-5 {
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: 160px;
}

.collage.collage-5 > :first-child {
  grid-column: 1/3;
}

.tile {
  position: relative;
  background: #0b1220;
}

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

.play-badge {
  position: absolute;
  right: 8px;
  bottom: 8px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border-radius: 999px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
}

.more {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-weight: 800;
}

.post-video {
  max-height: 400px;
  width: 100%;
}


.post-embed {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  border-radius: 8px;
  margin-top: 10px;
  display: block;
  background: #000;
}

.post-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.post-body--collapsible {
  position: relative;
}

.post-body--collapsed {
  max-height: 10.5rem;
  overflow: hidden;
}

.post-body--collapsed::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3.5rem;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0) 0%, var(--card-bg, rgba(15, 23, 42, 0.96)) 100%);
  pointer-events: none;
}

.post-body__toggle {
  align-self: flex-start;
  background: none;
  border: none;
  color: var(--feed-accent, #6366f1);
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  font-size: 0.95rem;
}

.post-body__toggle:hover,
.post-body__toggle:focus {
  text-decoration: underline;
}

.post-body p {
  margin: 0;
}

.post-body ul,
.post-body ol,
.post-content ul,
.post-content ol {
  margin: 0.3rem 0;
  padding-left: 1.25rem;
  display: grid;
  gap: 0.35rem;
}

.post-body li,
.post-content li {
  margin: 0;
  line-height: 1.5;
}

.post-body li::marker,
.post-content li::marker {
  color: var(--feed-accent, #6366f1);
}

.post-body blockquote,
.post-content blockquote {
  margin: 0.6rem 0;
  padding: 0.6rem 0.9rem;
  border-left: 4px solid rgba(99, 102, 241, 0.3);
  background: rgba(148, 163, 184, 0.12);
  border-radius: 12px;
  color: var(--text-dim, rgba(148, 163, 184, 0.85));
}

.post-body code,
.post-content code {
  font-family: "JetBrains Mono", "Fira Code", "Menlo", monospace;
  font-size: 0.95em;
  background: rgba(99, 102, 241, 0.12);
  color: inherit;
  padding: 0.1rem 0.35rem;
  border-radius: 6px;
}

.post-body pre,
.post-content pre {
  margin: 0.6rem 0;
  padding: 0.8rem 1rem;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.9);
  color: #e2e8f0;
  overflow-x: auto;
  font-family: "JetBrains Mono", "Fira Code", "Menlo", monospace;
  font-size: 0.95em;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.15);
}

.post-body hr,
.post-content hr {
  margin: 1rem 0;
  border: none;
  border-top: 1px solid rgba(148, 163, 184, 0.35);
}

.share-caption {
  margin: 0 0 10px;
  color: var(--text-dim, rgba(148, 163, 184, 0.85));
}

.share-caption p {
  margin: 0;
}

.post-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.post-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

/* Feed wrapper - centers posts on page */
#feed {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px;
  max-width: 800px;         /* control width - not too wide */
  margin: 0 auto;           /* center horizontally */
  width: 100%;              /* responsive on small screens */
  box-sizing: border-box;
}

/* Single Post Card */
.post {
  background-color: var(--card-bg);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  border: 1px solid var(--button-border);
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;              /* fill feed width */
  box-sizing: border-box;
}

/* Header section with avatar and user info */
.post-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #999;
}

/* Post content - text and media layout */
.post-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.post-content h4 {
  margin: 0;
  font-size: 18px;
  color: var(--text-color);
}

.post-content p {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-color);
}

/* Media - images and videos responsive sizing */
.post-image, .post-video {
  width: 100%;          /* fill card */
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  object-fit: contain;  /* prevents weird cropping */
  margin-top: 8px;
  border: 1px solid #ddd;
  background-color: #000; /* fallback for videos */
}

.post-video {
  max-height: 450px;
}

/* Footer with votes and actions */
.post-footer {
  border-top: 1px solid #ddd;
  margin-top: 10px;
  padding-top: 10px;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.vote-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vote-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.vote-btn .icon-chevron {
  width: 20px;
  height: 20px;
  fill: #666;
}

.vote-btn:hover .icon-chevron {
  fill: #09f;
  transform: scale(1.1);
}

.vote-btn:active .icon-chevron {
  fill: #0077cc;
}

.vote-count {
  font-size: 16px;
  font-weight: bold;
  color: #444;
}

.other-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 20px;
  color: #777;
  cursor: pointer;
}

.other-actions span:hover {
  color: #09f;
}

.vote-btn.voted {
  color: #09f;
}

/*darkl*/
body {
  background-color: var(--bg-color);
  color: var(--text-color);
}

/* new post nanvbar style*/
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  background-color: var(--card-bg);
  border-bottom: 1px solid #ccc;
}

.navbar .logo {
  font-weight: bold;
  font-size: 20px;
  color: var(--text-color);
}

.navbar nav {
  display: flex;
  gap: 20px;
}

.navbar nav a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: bold;
  transition: color 0.2s;
}

.navbar nav a:hover {
  color: var(--button-bg);
}

.navbar-right button {
  padding: 6px 12px;
  background: var(--button-bg);
  color: #fff;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.3s;
}

.navbar-right button:hover {
  background: var(--button-hover);
}

@media (max-width: 768px) {
  body.auth-page {
    flex-direction: column;
    padding: 20px;
  }
}


/*app.js style*/
/* Avatar sizes */
.avatar { border-radius: 50%; object-fit: cover; cursor: pointer; display: inline-block; }
.avatar--sm { width: 28px; height: 28px; }
.avatar--md { width: 40px; height: 40px; }
.avatar--lg { width: 64px; height: 64px; }

/* Profile menu */
.profile-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.profile-name {
  font-weight: 600;
  color: var(--text-color, #111827);
}

body.dark .profile-name {
  color: #e2e8f0;
}

.profile-avatar-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(248, 250, 252, 0.92);
  color: #0f172a;
  cursor: pointer;
  font: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

body.dark .profile-avatar-btn {
  background: rgba(15, 23, 42, 0.88);
  border-color: rgba(71, 85, 105, 0.45);
  color: #e2e8f0;
}

.profile-avatar-btn:hover,
.profile-avatar-btn:focus-visible,
.profile-menu.open .profile-avatar-btn {
  outline: none;
  transform: translateY(-1px);
  border-color: var(--feed-accent, rgba(99, 102, 241, 0.85));
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.18);
  background: rgba(99, 102, 241, 0.12);
}

body.dark .profile-avatar-btn:hover,
body.dark .profile-avatar-btn:focus-visible,
body.dark .profile-menu.open .profile-avatar-btn {
  background: rgba(99, 102, 241, 0.22);
  border-color: rgba(129, 140, 248, 0.8);
  box-shadow: 0 18px 36px rgba(2, 6, 23, 0.6);
}

.profile-avatar-btn img {
  border-radius: 50%;
  display: block;
}

.profile-avatar-caret {
  font-size: 0.75rem;
  transition: transform 0.2s ease;
}

.profile-menu.open .profile-avatar-caret {
  transform: rotate(180deg);
}

.profile-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 200px;
  padding: 12px;
  background: var(--card-bg, rgba(15, 23, 42, 0.96));
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 24px 44px rgba(15, 23, 42, 0.3);
  display: flex;
  flex-direction: column;
  gap: 6px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 30;
}

.profile-menu.open .profile-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.profile-dropdown__header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding-bottom: 10px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.3);
  width: 100%;
}

body.dark .profile-dropdown__header {
  border-color: rgba(100, 116, 139, 0.35);
}

.profile-dropdown__eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(71, 85, 105, 0.78);
}

body.dark .profile-dropdown__eyebrow {
  color: rgba(148, 163, 184, 0.78);
}

.profile-dropdown__name {
  color: inherit;
}

.profile-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-color, #0f172a);
  background: transparent;
  border: none;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
  font: inherit;
  text-align: left;
}

.profile-menu-item:hover,
.profile-menu-item:focus-visible {
  background: rgba(99, 102, 241, 0.14);
  color: var(--feed-accent, #6366f1);
  outline: none;
}

.profile-menu-item--danger {
  color: #dc2626;
}

body.dark .profile-menu-item {
  color: #e2e8f0;
}

body.dark .profile-menu-item:hover,
body.dark .profile-menu-item:focus-visible {
  background: rgba(129, 140, 248, 0.22);
}

body.dark .profile-menu-item--danger {
  color: #f87171;
}

.auth-buttons { display: inline-flex; gap: 10px; }
.btn { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--button-border, #333); background: #0a84ff; color: #fff; text-decoration: none; }
.btn--ghost { background: transparent; color: var(--text-color, #eee); border-color: var(--button-border, #333); }

/*save post style*/

.save-post {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1em;
}

.save-post.saved {
  color: gold;
}/* Rito gallery */
.rito-card .rito-gallery {
  position: relative;
  display: grid;
  grid-auto-flow: dense;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(120px, 1fr);
  gap: 6px;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(15, 23, 42, 0.75));
  padding: 6px;
}

.rito-card .rito-gallery[data-count="1"] {
  grid-template-columns: 1fr;
}

.rito-card .rito-gallery[data-count="2"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rito-card .rito-gallery[data-count="3"] {
  grid-template-columns: 2fr 1fr;
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.rito-card .rito-gallery[data-count="3"] .rito-gallery__cell:nth-child(1) {
  grid-row: span 2;
}

.rito-card .rito-gallery[data-count="4"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.rito-card .rito-gallery__cell {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.55);
  cursor: pointer;
  display: block;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.rito-card .rito-gallery__cell::before {
  content: '';
  display: block;
  padding-bottom: 100%;
}

.rito-card .rito-gallery[data-count="3"] .rito-gallery__cell:nth-child(1)::before {
  padding-bottom: 200%;
}

.rito-card .rito-gallery__cell > img,
.rito-card .rito-gallery__cell > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rito-card .rito-gallery__cell:focus-visible,
.rito-card .rito-gallery__cell:hover {
  outline: none;
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.45);
  border-color: rgba(148, 163, 184, 0.35);
}

.rito-card .rito-gallery__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.72);
  color: #f8fafc;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.rito-card .rito-gallery__chip {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.75);
  color: #e2e8f0;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.45);
}

.rito-card .rito-gallery__chip-icon {
  font-size: 0.9rem;
}

.rito-card .rito-gallery__chip-label {
  line-height: 1;
}

@media (min-width: 768px) {
  .rito-card .rito-gallery {
    grid-auto-rows: minmax(160px, 1fr);
    gap: 8px;
    padding: 10px;
  }
}

/* Rito viewer */
.rito-viewer {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: clamp(16px, 5vw, 40px);
  background: rgba(15, 23, 42, 0.72);
  z-index: 1050;
}

.rito-viewer.is-open {
  display: grid;
}

body.rito-viewer-open {
  overflow: hidden;
}

.rito-viewer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
}

.rito-viewer__dialog {
  position: relative;
  z-index: 1;
  width: min(960px, 100%);
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 26px;
  box-shadow: 0 28px 68px rgba(15, 23, 42, 0.55);
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: clamp(16px, 4vw, 28px);
  color: #f8fafc;
  gap: clamp(16px, 3vw, 24px);
}

.rito-viewer__stage {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: clamp(12px, 3vw, 24px);
  align-items: center;
}

.rito-viewer__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(12px, 3vw, 24px);
}

.rito-viewer__vote {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rito-viewer__vote-btn {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: none;
  background: rgba(59, 130, 246, 0.18);
  color: #f8fafc;
  font-size: 1.35rem;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.rito-viewer__vote-btn.is-active {
  background: rgba(59, 130, 246, 0.38);
}

.rito-viewer__vote-btn:hover,
.rito-viewer__vote-btn:focus-visible {
  outline: none;
  background: rgba(37, 99, 235, 0.75);
  transform: translateY(-1px);
}

.rito-viewer__vote-count {
  font-weight: 600;
  font-size: 1.1rem;
  color: #e2e8f0;
}

.rito-viewer__buttons {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2.5vw, 18px);
}

.rito-viewer__action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  background: rgba(15, 23, 42, 0.55);
  color: #f8fafc;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.rito-viewer__action-btn:hover,
.rito-viewer__action-btn:focus-visible {
  outline: none;
  background: rgba(96, 165, 250, 0.55);
  transform: translateY(-1px);
}

.rito-viewer__action-btn span {
  display: inline-block;
  min-width: 1.5em;
  text-align: center;
}

.rito-viewer__media {
  position: relative;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.7);
  display: grid;
  place-items: center;
  min-height: clamp(240px, 60vh, 600px);
  overflow: hidden;
}

.rito-viewer__media img,
.rito-viewer__media video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.rito-viewer__nav {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: none;
  background: rgba(30, 64, 175, 0.7);
  color: #f8fafc;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.rito-viewer__nav:hover,
.rito-viewer__nav:focus-visible {
  outline: none;
  background: rgba(37, 99, 235, 0.85);
  transform: translateY(-1px);
}

.rito-viewer__nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.rito-viewer__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: none;
  background: rgba(15, 23, 42, 0.75);
  color: #f8fafc;
  font-size: 1.5rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s ease, transform 0.2s ease;
}

.rito-viewer__close:hover,
.rito-viewer__close:focus-visible {
  outline: none;
  background: rgba(239, 68, 68, 0.85);
  transform: scale(1.05);
}

.rito-viewer__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 0 clamp(8px, 2.5vw, 16px);
}

.rito-viewer__dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: none;
  background: rgba(148, 163, 184, 0.45);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.rito-viewer__dot.is-active {
  background: #38bdf8;
  transform: scale(1.1);
}

.rito-viewer__dot:hover,
.rito-viewer__dot:focus-visible {
  outline: none;
  background: #60a5fa;
  transform: scale(1.08);
}


@media (max-width: 768px) {
  body.auth-page {
    margin: 0;
    padding: 1.5rem 1rem;
    overflow-x: hidden;
    min-height: 100vh;
    justify-content: flex-start;
    align-items: stretch;
    height: auto;
  }

  .form-container {
    position: static;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    border-radius: 16px;
    padding: 1.25rem 1rem;
    box-sizing: border-box;
  }

  .form-container h1 {
    margin-bottom: 1rem;
    font-size: clamp(1.4rem, 6vw, 1.8rem);
  }

  .input-group input,
  .auth-button {
    width: 100%;
    box-sizing: border-box;
  }

  .auth-link {
    text-align: center;
  }
}
