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

    :root {
      --accent: #4ea8ff;
      --accent-2: #8fe0ff;
      --accent-glow: rgba(78,168,255,0.2);
      --control-height-sm: 36px;
      --control-height-md: 42px;
      --control-height-lg: 48px;
      --sidebar-control-height: 40px;
      --control-pad-x-sm: 12px;
      --control-pad-x-md: 16px;
      --control-radius: 10px;
      --bg: #0c0e14;
      --bg-elev: #111318;
      --border: #1f2433;
      --text: #e4e8f0;
      --text-sub: #9ba3b6;
      --text-muted: #555e72;
    }

    html { scroll-behavior: smooth; }

    body {
      font-family: "Inter", -apple-system, sans-serif;
      background: var(--bg);
      color: var(--text);
      line-height: 1.6;
      -webkit-font-smoothing: antialiased;
    }

    /* ── Navbar ─────────────────────────────── */
    nav {
      position: sticky;
      top: 0;
      z-index: 100;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 48px;
      height: 64px;
      background: rgba(12,14,20,0.85);
      backdrop-filter: blur(12px);
      border-bottom: 1px solid var(--border);
    }

    .nav-logo {
      display: flex;
      align-items: center;
      gap: 10px;
      text-decoration: none;
    }

    .nav-logo-icon {
      width: 36px;
      height: 36px;
      display: block;
      border-radius: 50%;
      object-fit: contain;
      flex-shrink: 0;
      overflow: hidden;
    }

    .nav-logo-name {
      font-size: 1.1rem;
      font-weight: 700;
      color: var(--text);
    }

    .nav-actions {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .nav-menu-btn {
      display: none;
      width: 40px;
      height: 40px;
      border: 1px solid var(--border);
      border-radius: 10px;
      background: rgba(255,255,255,0.02);
      color: var(--text);
      align-items: center;
      justify-content: center;
      cursor: pointer;
    }

    .mobile-drawer-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.45);
      z-index: 110;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.2s ease;
    }

    .mobile-drawer {
      position: fixed;
      top: 0;
      left: 0;
      width: min(84vw, 320px);
      height: 100vh;
      background: var(--bg-elev);
      border-right: 1px solid var(--border);
      z-index: 111;
      padding: 20px;
      display: flex;
      flex-direction: column;
      gap: 12px;
      transform: translateX(-100%);
      transition: transform 0.2s ease;
    }

    .mobile-drawer-logo {
      margin-bottom: 8px;
    }

    .mobile-drawer .nav-link,
    .mobile-drawer .btn-nav {
      width: 100%;
      justify-content: flex-start;
      text-align: left;
    }

    .mobile-nav-open .mobile-drawer-overlay {
      opacity: 1;
      pointer-events: auto;
    }

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

    .nav-link {
      min-height: var(--control-height-sm);
      line-height: 1;
      color: var(--text-sub);
      text-decoration: none;
      font-size: 0.9rem;
      font-weight: 600;
      padding: 0 var(--control-pad-x-sm);
      border-radius: var(--control-radius);
      transition: color 0.15s, background 0.15s;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }

    .nav-link:hover { color: var(--text); background: rgba(255,255,255,0.05); }

    .btn-nav {
      min-height: var(--control-height-sm);
      line-height: 1;
      padding: 0 var(--control-pad-x-md);
      background: linear-gradient(135deg, var(--accent), var(--accent-2));
      border: none;
      border-radius: var(--control-radius);
      color: #fff;
      font-family: inherit;
      font-size: 0.9rem;
      font-weight: 600;
      cursor: pointer;
      text-decoration: none;
      transition: opacity 0.15s;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }

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

    /* ── Hero ────────────────────────────────── */
    .hero {
      text-align: center;
      padding: 120px 24px 80px;
      position: relative;
      overflow: hidden;
    }

    .hero::before {
      content: '';
      position: absolute;
      top: -200px;
      left: 50%;
      transform: translateX(-50%);
      width: 800px;
      height: 800px;
      background: radial-gradient(ellipse at center, rgba(78,168,255,0.16) 0%, transparent 65%);
      pointer-events: none;
    }

    .hero-badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 5px 14px;
      border: 1px solid rgba(78,168,255,0.45);
      border-radius: 99px;
      background: rgba(78,168,255,0.12);
      color: #9fddff;
      font-size: 0.78rem;
      font-weight: 600;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      margin-bottom: 28px;
    }

    .hero h1 {
      font-size: clamp(2.4rem, 6vw, 4rem);
      font-weight: 800;
      line-height: 1.15;
      letter-spacing: -0.02em;
      color: var(--text);
      max-width: 780px;
      margin: 0 auto 22px;
    }

    .hero h1 span {
      background: linear-gradient(135deg, var(--accent), var(--accent-2));
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    .hero p {
      font-size: 1.15rem;
      color: var(--text-sub);
      max-width: 540px;
      margin: 0 auto 42px;
    }

    .hero-ctas {
      display: flex;
      gap: 14px;
      justify-content: center;
      flex-wrap: wrap;
    }

    .btn-primary {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      min-height: var(--control-height-lg);
      line-height: 1;
      padding: 0 24px;
      background: linear-gradient(135deg, var(--accent), var(--accent-2));
      border: none;
      border-radius: calc(var(--control-radius) + 2px);
      color: #fff;
      font-family: inherit;
      font-size: 0.96rem;
      font-weight: 600;
      text-decoration: none;
      cursor: pointer;
      transition: opacity 0.15s, transform 0.1s;
      box-shadow: 0 4px 24px rgba(78,168,255,0.3);
    }

    .btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }

    .btn-ghost {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      min-height: var(--control-height-lg);
      line-height: 1;
      padding: 0 24px;
      background: transparent;
      border: 1px solid var(--border);
      border-radius: calc(var(--control-radius) + 2px);
      color: var(--text-sub);
      font-family: inherit;
      font-size: 0.96rem;
      font-weight: 600;
      text-decoration: none;
      cursor: pointer;
      transition: border-color 0.15s, color 0.15s, background 0.15s;
    }

    .btn-ghost:hover {
      border-color: var(--accent);
      color: var(--text);
      background: var(--accent-glow);
    }

    /* ── App Preview ─────────────────────────── */
    .preview {
      max-width: 1100px;
      margin: 0 auto;
      padding: 0 24px 80px;
    }

    .preview-frame {
      border: 1px solid var(--border);
      border-radius: 16px;
      overflow: hidden;
      box-shadow: 0 24px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(78,168,255,0.12);
      background: var(--bg-elev);
    }

    .preview-bar {
      background: #0e1016;
      border-bottom: 1px solid var(--border);
      padding: 12px 16px;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .preview-dot {
      width: 10px;
      height: 10px;
      border-radius: 50%;
    }

    .preview-dot.red    { background: #f87171; }
    .preview-dot.yellow { background: #fbbf24; }
    .preview-dot.green  { background: #34d399; }

    .preview-url {
      margin-left: 12px;
      background: #181c24;
      border-radius: 6px;
      padding: 3px 14px;
      font-size: 0.75rem;
      color: var(--text-muted);
    }

    .preview-img {
      display: flex;
      gap: 0;
      padding: 20px;
      overflow: hidden;
      min-height: 260px;
      position: relative;
    }

    /* Simulated Strats board in CSS */
    .fake-sidebar {
      width: 200px;
      flex-shrink: 0;
      background: #0e1016;
      border-radius: 8px;
      padding: 16px;
      margin-right: 20px;
    }

    .fake-logo {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 20px;
    }

    .fake-logo-dot {
      width: 22px;
      height: 22px;
      background: linear-gradient(135deg, #8fe0ff, #4ea8ff);
      border-radius: 6px;
    }

    .fake-logo-text {
      font-size: 0.8rem;
      font-weight: 700;
      color: var(--text);
    }

    .fake-proj {
      padding: 6px 8px;
      border-radius: 6px;
      font-size: 0.75rem;
      color: var(--text-sub);
      margin-bottom: 4px;
      cursor: default;
    }

    .fake-proj.active {
      background: rgba(78,168,255,0.16);
      color: #9fddff;
      font-weight: 600;
    }

    .fake-board {
      flex: 1;
      display: flex;
      gap: 12px;
    }

    .fake-col {
      flex: 1;
      background: #0e1016;
      border-radius: 8px;
      padding: 12px;
    }

    .fake-col-head {
      display: flex;
      align-items: center;
      gap: 6px;
      margin-bottom: 10px;
    }

    .fake-col-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
    }

    .fake-col-name {
      font-size: 0.7rem;
      font-weight: 600;
      color: var(--text);
    }

    .fake-card {
      background: #181c24;
      border: 1px solid #1f2433;
      border-radius: 6px;
      padding: 8px 10px;
      margin-bottom: 6px;
      font-size: 0.68rem;
      color: var(--text-sub);
    }

    /* ── Features ────────────────────────────── */
    .features {
      max-width: 1100px;
      margin: 0 auto;
      padding: 80px 24px;
    }

    .section-label {
      text-align: center;
      font-size: 0.78rem;
      font-weight: 700;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: var(--accent);
      margin-bottom: 12px;
    }

    .section-title {
      text-align: center;
      font-size: clamp(1.6rem, 4vw, 2.2rem);
      font-weight: 800;
      letter-spacing: -0.02em;
      color: var(--text);
      margin-bottom: 14px;
    }

    .section-sub {
      text-align: center;
      color: var(--text-sub);
      font-size: 1rem;
      max-width: 500px;
      margin: 0 auto 60px;
    }

    .features-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
      gap: 20px;
    }

    .feature-card {
      background: var(--bg-elev);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 28px;
      transition: border-color 0.2s, transform 0.2s;
    }

    .feature-card:hover {
      border-color: rgba(78,168,255,0.45);
      transform: translateY(-2px);
    }

    .feature-icon {
      width: 44px;
      height: 44px;
      background: rgba(78,168,255,0.12);
      border-radius: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #9fddff;
      font-size: 1.1rem;
      margin-bottom: 18px;
    }

    .feature-title {
      font-size: 1rem;
      font-weight: 700;
      color: var(--text);
      margin-bottom: 8px;
    }

    .feature-text {
      font-size: 0.88rem;
      color: var(--text-sub);
      line-height: 1.65;
    }

    /* ── CTA section ─────────────────────────── */
    .cta-section {
      text-align: center;
      padding: 100px 24px;
      position: relative;
      overflow: hidden;
    }

    .cta-section::before {
      content: '';
      position: absolute;
      bottom: -100px;
      left: 50%;
      transform: translateX(-50%);
      width: 600px;
      height: 600px;
      background: radial-gradient(ellipse, rgba(78,168,255,0.14) 0%, transparent 65%);
      pointer-events: none;
    }

    .cta-section h2 {
      font-size: clamp(1.8rem, 4vw, 2.6rem);
      font-weight: 800;
      letter-spacing: -0.02em;
      margin-bottom: 16px;
    }

    .cta-section p {
      color: var(--text-sub);
      font-size: 1rem;
      margin-bottom: 36px;
    }

    /* ── Footer ──────────────────────────────── */
    footer {
      border-top: 1px solid var(--border);
      padding: 28px 48px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-size: 0.82rem;
      color: var(--text-muted);
    }

    footer a { color: var(--text-muted); text-decoration: none; }
    footer a:hover { color: var(--text-sub); }

    @media (max-width: 640px) {
      nav { padding: 0 20px; }
      .nav-actions { display: none; }
      .nav-menu-btn { display: inline-flex; }
      .hero { padding: 80px 20px 60px; }
      footer { flex-direction: column; gap: 12px; text-align: center; }
    }

    html.landing-page,
    body[data-page="landing"] {
      height: auto !important;
      min-height: 100%;
      overflow-x: hidden !important;
      overflow-y: auto !important;
    }

/* App Styles */
    :root {
      --radius-xl: 4px;
      --radius-lg: 4px;
      --radius-md: 4px;
      --radius-sm: 4px;
      --radius-xs: 4px;
    }

    body[data-theme="dark"] {
      --bg: #0c0e14;
      --bg-elev: #111318;
      --panel: #111318;
      --sidebar-bg: #0e1016;
      --card: #181c24;
      --card-hover: #1d2230;
      --text: #e4e8f0;
      --text-sub: #9ba3b6;
      --text-muted: #555e72;
      --border: #1f2433;
      --border-strong: #2a3045;
      --accent: #4ea8ff;
      --accent-2: #8fe0ff;
      --accent-glow: rgba(78,168,255,0.18);
      --danger: #f87171;
      --danger-bg: rgba(248,113,113,0.1);
      --danger-border: rgba(248,113,113,0.25);
      --shadow-sm: 0 1px 3px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
      --shadow-md: 0 4px 12px rgba(0,0,0,0.35), 0 2px 4px rgba(0,0,0,0.2);
      --shadow-lg: 0 10px 30px rgba(0,0,0,0.4), 0 4px 8px rgba(0,0,0,0.2);
    }

    body[data-theme="light"] {
      --bg: #f4f6fa;
      --bg-elev: #ffffff;
      --panel: #ffffff;
      --sidebar-bg: #fafbfd;
      --card: #ffffff;
      --card-hover: #f8faff;
      --text: #0f1424;
      --text-sub: #4b5568;
      --text-muted: #9ca3b0;
      --border: #e8ecf2;
      --border-strong: #d4dae6;
      --accent: #4ea8ff;
      --accent-2: #8fe0ff;
      --accent-glow: rgba(78,168,255,0.1);
      --danger: #ef4444;
      --danger-bg: rgba(239,68,68,0.06);
      --danger-border: rgba(239,68,68,0.2);
      --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
      --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
      --shadow-lg: 0 10px 30px rgba(0,0,0,0.1), 0 4px 8px rgba(0,0,0,0.05);
    }

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

    html, body {
      width: 100%;
      height: 100%;
      margin: 0;
    }

    body {
      font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      font-size: 14px;
      line-height: 1.5;
      background: var(--bg);
      color: var(--text);
      -webkit-font-smoothing: antialiased;
      transition: background-color 0.4s ease, color 0.3s ease;
    }

    /* Theme transition on all elements (fallback when View Transitions not available) */
    .theme-transitioning, .theme-transitioning * {
      transition: background-color 0.4s ease, border-color 0.4s ease,
                  color 0.3s ease, box-shadow 0.4s ease !important;
    }

    /* View Transitions ripple */
    ::view-transition-old(root) {
      animation: none;
    }
    ::view-transition-new(root) {
      animation: theme-reveal 0.5s ease-out;
      clip-path: inset(0);
    }
    @keyframes theme-reveal {
      from { opacity: 0; }
      to   { opacity: 1; }
    }

    button, input {
      font: inherit;
    }

    /* ── Layout ─────────────────────────────────────────── */

    .frame {
      width: 100%;
      height: 100vh;
      display: grid;
      grid-template-columns: 258px 1fr;
      overflow: hidden;
    }

    /* ── Sidebar ─────────────────────────────────────────── */

    .sidebar {
      display: flex;
      flex-direction: column;
      gap: 0;
      background: var(--sidebar-bg);
      border-right: 1px solid var(--border);
      overflow-y: auto;
      overflow-x: hidden;
    }

    .sidebar-top {
      height: 75px;
      padding: 0 16px;
      border-bottom: 1px solid var(--border);
      display: flex;
      align-items: center;
      flex-shrink: 0;
    }

    .brand-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      width: 100%;
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 9px;
    }

    .brand-icon {
      width: 30px;
      height: 30px;
      display: block;
      border-radius: 50%;
      object-fit: contain;
      flex-shrink: 0;
      overflow: hidden;
    }

    .brand-name {
      font-size: 0.92rem;
      font-weight: 700;
      letter-spacing: -0.01em;
      color: var(--text);
    }

    .brand-badge {
      font-size: 0.62rem;
      font-weight: 600;
      padding: 2px 6px;
      border-radius: 99px;
      background: var(--accent-glow);
      color: var(--accent);
      border: 1px solid var(--accent-glow);
    }

    .theme-btn {
      width: 30px;
      height: 30px;
      border-radius: var(--radius-sm);
      border: 1px solid var(--border);
      background: transparent;
      color: var(--text-sub);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 14px;
      transition: background 0.15s, border-color 0.15s, color 0.15s;
    }

    .theme-btn:hover {
      background: var(--card);
      border-color: var(--border-strong);
      color: var(--text);
    }

    .search-wrap {
      position: relative;
    }

    .search-icon {
      position: absolute;
      left: 10px;
      top: 50%;
      transform: translateY(-50%);
      color: var(--text-muted);
      pointer-events: none;
      font-size: 13px;
    }

    .search {
      width: 100%;
      border: 1px solid var(--border);
      background: var(--bg-elev);
      color: var(--text);
      border-radius: var(--control-radius);
      height: var(--sidebar-control-height);
      padding: 0 var(--control-pad-x-sm) 0 32px;
      outline: none;
      font-size: 0.85rem;
      line-height: 1;
      transition: border-color 0.15s, box-shadow 0.15s;
    }

    .search::placeholder {
      color: var(--text-muted);
    }

    .search:focus {
      border-color: var(--accent);
      box-shadow: 0 0 0 3px var(--accent-glow);
    }

    .sidebar-section {
      padding: 16px 12px 8px;
      min-width: 0;
    }

    .sidebar-section + .sidebar-section {
      border-top: 1px solid var(--border);
      padding-top: 14px;
    }

    .nav-title {
      margin: 0 0 8px 4px;
      color: var(--text-muted);
      font-size: 0.68rem;
      text-transform: uppercase;
      letter-spacing: 0.09em;
      font-weight: 600;
    }

    .project-list {
      list-style: none;
      margin: 0;
      padding: 0;
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .project-item {
      display: grid;
      grid-template-columns: 1fr auto;
      align-items: center;
      border: 1px solid transparent;
      background: transparent;
      border-radius: var(--control-radius);
      transition: background 0.12s, border-color 0.12s;
      height: var(--sidebar-control-height);
    }

    .project-item:hover {
      background: var(--card);
      border-color: var(--border);
    }

    .project-item.active {
      background: var(--accent-glow);
      border-color: rgba(78,168,255,0.35);
    }

    .project-item.active .project-select {
      color: var(--accent);
      font-weight: 600;
    }

    .project-select {
      border: none;
      background: transparent;
      color: var(--text-sub);
      text-align: left;
      display: flex;
      align-items: center;
      width: 100%;
      height: 100%;
      line-height: 1;
      padding: 0 var(--control-pad-x-sm);
      border-radius: var(--control-radius);
      cursor: pointer;
      font-size: 0.86rem;
      font-weight: 500;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      transition: color 0.12s;
    }

    .project-tools {
      display: flex;
      gap: 3px;
      padding-right: 6px;
      align-items: center;
    }

    .icon-btn {
      width: calc(var(--sidebar-control-height) - 4px);
      height: calc(var(--sidebar-control-height) - 4px);
      line-height: 1;
      border: 1px solid transparent;
      border-radius: var(--control-radius);
      background: transparent;
      color: var(--text-muted);
      cursor: pointer;
      padding: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 13px;
      transition: background 0.12s, color 0.12s, border-color 0.12s;
    }

    .icon-btn:hover {
      background: var(--card);
      border-color: var(--border);
      color: var(--text);
    }

    .icon-btn.favorited {
      color: #f59e0b;
    }

    .project-create {
      margin-top: 8px;
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 6px;
      min-width: 0;
    }

    .mini-input {
      min-width: 0;
    }

    .mini-input,
    .add-input {
      border: 1px solid var(--border);
      border-radius: var(--control-radius);
      background: var(--bg-elev);
      color: var(--text);
      height: var(--sidebar-control-height);
      padding: 0 var(--control-pad-x-sm);
      outline: none;
      font-size: 0.85rem;
      line-height: 1;
      transition: border-color 0.15s, box-shadow 0.15s;
    }

    .mini-input::placeholder,
    .add-input::placeholder {
      color: var(--text-muted);
    }

    .mini-input:focus,
    .add-input:focus {
      border-color: var(--accent);
      box-shadow: 0 0 0 3px var(--accent-glow);
    }

    .mini-btn {
      border: none;
      background: var(--accent);
      color: #fff;
      border-radius: var(--control-radius);
      height: var(--sidebar-control-height);
      line-height: 1;
      padding: 0 var(--control-pad-x-sm);
      font-weight: 600;
      font-size: 0.82rem;
      cursor: pointer;
      transition: opacity 0.15s, transform 0.1s;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      white-space: nowrap;
    }

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

    .mini-btn:active {
      transform: scale(0.97);
    }

    .empty-side {
      color: var(--text-muted);
      font-size: 0.82rem;
      padding: 6px 4px;
    }

    .side-action-btn {
      width: 100%;
      justify-content: flex-start;
      margin-top: 2px;
    }

    .side-action-btn.active {
      border-color: var(--accent);
      color: var(--accent);
      background: var(--accent-glow);
    }

    .sidebar-account {
      display: grid;
      gap: 8px;
      margin-top: auto;
      padding-bottom: 12px;
    }

    .sidebar-footer {
      margin-top: auto;
      padding: 8px 16px;
      border-top: 1px solid var(--border);
      font-size: 0.75rem;
      color: var(--text-muted);
      display: flex;
      align-items: center;
      gap: 6px;
    }

    /* ── Main ─────────────────────────────────────────────── */

    .main {
      display: flex;
      flex-direction: column;
      gap: 0;
      overflow: hidden;
      background: var(--bg);
    }

    .topbar {
      height: 75px;
      padding: 0 24px;
      background: var(--bg-elev);
      border-bottom: 1px solid var(--border);
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 16px;
      flex-shrink: 0;
    }

    .mobile-menu-btn {
      display: none;
      width: var(--control-height-md);
      height: var(--control-height-md);
      line-height: 1;
      border-radius: var(--control-radius);
      border: 1px solid var(--border);
      background: var(--bg-elev);
      color: var(--text-sub);
      cursor: pointer;
      align-items: center;
      justify-content: center;
      font-size: 15px;
      flex-shrink: 0;
    }

    .mobile-menu-btn:hover {
      color: var(--text);
      background: var(--card);
      border-color: var(--border-strong);
    }

    .title-breadcrumb {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 0.82rem;
      color: var(--text-muted);
      margin-bottom: 2px;
    }

    .title-breadcrumb svg {
      width: 12px;
      height: 12px;
      opacity: 0.5;
    }

    .title h1 {
      margin: 0;
      font-size: 1.2rem;
      font-weight: 700;
      letter-spacing: -0.02em;
      color: var(--text);
      line-height: 1.2;
      cursor: default;
    }

    .title h1[title] {
      cursor: text;
    }

    .title p {
      margin: 3px 0 0;
      color: var(--text-muted);
      font-size: 0.82rem;
    }

    .actions {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      justify-content: flex-end;
      align-items: center;
    }

    .user-chip {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 4px 4px 4px 8px;
      border: 1px solid var(--border);
      border-radius: 99px;
      background: var(--bg-elev);
    }

    .sidebar-account .user-chip {
      width: 100%;
      min-height: var(--control-height-md);
      border-radius: var(--control-radius);
      padding: 6px 8px;
      cursor: pointer;
      transition: border-color 0.15s, background 0.15s;
    }

    .sidebar-account .user-chip:hover {
      border-color: var(--border-strong);
      background: var(--card);
    }

    .user-avatar {
      width: 26px;
      height: 26px;
      border-radius: 50%;
      background: var(--accent);
      color: #fff;
      font-size: 0.75rem;
      font-weight: 700;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }

    .user-pseudo {
      font-size: 0.82rem;
      font-weight: 600;
      color: var(--text);
    }

    .sidebar-logout-btn {
      width: 100%;
      justify-content: flex-start;
    }

    .sidebar-logout-btn:hover {
      border-color: var(--danger-border);
      color: var(--danger);
      background: var(--danger-bg);
    }

    .btn {
      border: 1px solid var(--border);
      background: transparent;
      color: var(--text-sub);
      border-radius: var(--control-radius);
      height: var(--control-height-md);
      line-height: 1;
      padding: 0 var(--control-pad-x-md);
      font-weight: 600;
      font-size: 0.84rem;
      cursor: pointer;
      transition: background 0.15s, border-color 0.15s, color 0.15s;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      white-space: nowrap;
    }

    .btn:hover {
      background: var(--card);
      border-color: var(--border-strong);
      color: var(--text);
    }

    .btn.primary {
      border: none;
      background: var(--accent);
      color: #fff;
      font-weight: 600;
    }

    .btn.primary:hover {
      opacity: 0.88;
      background: var(--accent);
      border-color: transparent;
      color: #fff;
    }

    .btn.fav-active {
      border-color: rgba(245,158,11,0.4);
      color: #f59e0b;
      background: rgba(245,158,11,0.08);
    }

    /* ── Board area ───────────────────────────────────────── */

    .board-area {
      flex: 1;
      min-height: 0;
      overflow-x: auto;
      overflow-y: hidden;
      padding: 16px 0 20px 24px;
      display: flex;
      flex-direction: column;
      gap: 12px;
      cursor: grab;
      user-select: none;
    }

    .board-area.panning {
      cursor: grabbing;
    }

    .board-stats {
      display: flex;
      gap: 10px;
      flex-shrink: 0;
    }

    .stat-chip {
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 5px 12px;
      border-radius: 99px;
      border: 1px solid var(--border);
      background: var(--bg-elev);
      font-size: 0.78rem;
      font-weight: 500;
      color: var(--text-sub);
    }

    .stat-chip-btn {
      font: inherit;
      cursor: pointer;
      transition: border-color 0.15s, color 0.15s, background 0.15s;
    }

    @media (hover: hover) and (pointer: fine) {
      .stat-chip-btn:hover {
        border-color: var(--border-strong);
        color: var(--text);
        background: var(--card);
      }
    }

    .stat-dot {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      flex-shrink: 0;
    }

    .board {
      flex: 1;
      min-height: 0;
      display: flex;
      flex-wrap: nowrap;
      gap: 16px;
      align-items: stretch;
    }
    .board::after {
      content: '';
      display: block;
      min-width: 8px;
      flex-shrink: 0;
    }

    .board-dots {
      display: none;
      justify-content: center;
      align-items: center;
      gap: 8px;
      padding: 4px 0 0;
      flex-shrink: 0;
    }

    .board-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      border: none;
      padding: 0;
      background: var(--border-strong);
      opacity: 0.55;
      cursor: pointer;
      transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease;
    }

    .board-dot.active {
      background: var(--accent);
      opacity: 1;
      transform: scale(1.18);
    }

    .sidebar-backdrop {
      display: none;
    }

    .mobile-drag-zone {
      display: none;
      pointer-events: none;
    }

    .column {
      display: flex;
      flex-direction: column;
      min-height: 0;
      width: 290px;
      flex-shrink: 0;
      border: 1px solid var(--border);
      border-radius: var(--radius-xl);
      background: var(--bg-elev);
      overflow: hidden;
      box-shadow: var(--shadow-sm);
      transition: opacity 0.18s, border-color 0.15s, box-shadow 0.15s;
    }

    .column.col-dragging {
      opacity: 0.35;
      border-style: dashed;
    }

    .column.col-over {
      border-color: var(--accent);
      box-shadow: 0 0 0 2px var(--accent-glow), var(--shadow-sm);
    }

    .task.task-dragging {
      opacity: 0.35;
    }

    .task.mobile-drag-source {
      opacity: 0.28;
    }

    .mobile-drag-ghost {
      position: fixed;
      z-index: 2000;
      pointer-events: none;
      width: 290px;
      max-width: calc(100vw - 24px);
      transform: translate(-50%, -50%);
      margin: 0;
      box-shadow: var(--shadow-lg);
      border: 1px solid var(--accent);
    }

    .column-head {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 0 12px 0 6px;
      height: 44px;
      border-bottom: 1px solid var(--border);
      gap: 6px;
    }

    .col-handle {
      width: 24px;
      height: 44px;
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--text-muted);
      cursor: grab;
      font-size: 15px;
      border-radius: var(--radius-xs);
      flex-shrink: 0;
      transition: color 0.12s, background 0.12s;
    }

    .col-handle:hover {
      color: var(--text-sub);
      background: var(--bg);
    }

    .col-del-btn {
      font-size: 16px;
      line-height: 1;
    }

    /* ── Add column ─────────────────────────────────────────── */

    .add-col-wrap {
      width: 220px;
      flex-shrink: 0;
      align-self: stretch;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      gap: 0;
    }

    .add-col-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      padding: 10px 14px;
      border: 1px dashed var(--border);
      border-radius: var(--radius-xl);
      background: transparent;
      color: var(--text-muted);
      font-size: 0.85rem;
      font-weight: 500;
      cursor: pointer;
      width: 100%;
      height: 100%;
      transition: border-color 0.15s, color 0.15s, background 0.15s;
    }

    .add-col-btn:hover {
      border-color: var(--accent);
      color: var(--accent);
      background: var(--accent-glow);
    }

    .add-col-form {
      flex-direction: column;
      gap: 8px;
      border: 1px solid var(--accent);
      border-radius: var(--radius-xl);
      padding: 12px;
      background: var(--bg-elev);
      box-shadow: 0 0 0 3px var(--accent-glow);
    }

    .add-col-input {
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
      background: var(--bg);
      color: var(--text);
      padding: 8px 10px;
      outline: none;
      font: inherit;
      font-size: 0.85rem;
      width: 100%;
      transition: border-color 0.15s, box-shadow 0.15s;
    }

    .add-col-input:focus {
      border-color: var(--accent);
      box-shadow: 0 0 0 3px var(--accent-glow);
    }

    .col-label {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .col-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      flex-shrink: 0;
    }

    .col-dot.todo   { background: var(--col-todo); box-shadow: 0 0 6px var(--col-todo); }
    .col-dot.doing  { background: var(--col-doing); box-shadow: 0 0 6px var(--col-doing); }
    .col-dot.done   { background: var(--col-done); box-shadow: 0 0 6px var(--col-done); }

    .col-name {
      font-size: 0.86rem;
      font-weight: 600;
      color: var(--text);
      letter-spacing: -0.01em;
    }

    .count {
      font-size: 0.75rem;
      font-weight: 600;
      padding: 2px 8px;
      border-radius: 99px;
      border: 1px solid var(--border);
      background: var(--bg);
      color: var(--text-muted);
      min-width: 26px;
      text-align: center;
    }

    .cards {
      flex: 1;
      min-height: 0;
      overflow-y: auto;
      display: flex;
      flex-direction: column;
      gap: 8px;
      padding: 12px;
      transition: background-color 0.15s ease;
      cursor: grab;
    }

    .cards.over {
      background: var(--accent-glow);
    }

    .drop-indicator {
      height: 0;
      border-top: 2px dashed var(--accent);
      border-radius: 99px;
      margin: 2px 0;
      pointer-events: none;
      opacity: 0.8;
      position: relative;
    }

    .drop-indicator::before,
    .drop-indicator::after {
      content: '';
      position: absolute;
      top: -5px;
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--accent);
    }

    .drop-indicator::before { left: 0; }
    .drop-indicator::after  { right: 0; }

    .task {
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      background: var(--card);
      padding: 12px 13px;
      cursor: grab;
      box-shadow: var(--shadow-sm);
      animation: reveal 0.18s ease;
      transition: border-color 0.15s, box-shadow 0.15s, background 0.15s, transform 0.1s;
      position: relative;
    }

    @media (hover: hover) and (pointer: fine) {
      .task:hover {
        border-color: var(--border-strong);
        background: var(--card-hover);
        box-shadow: var(--shadow-md);
        transform: translateY(-1px);
      }
    }

    .task:active {
      cursor: grabbing;
    }

    .task-tags {
      display: flex;
      gap: 5px;
      flex-wrap: wrap;
      margin-bottom: 8px;
    }

    .tag {
      border-radius: var(--radius-xs);
      font-size: 0.67rem;
      border: 1px solid transparent;
      padding: 2px 7px;
      font-weight: 600;
      letter-spacing: 0.02em;
      text-transform: uppercase;
    }

    .tag.todo   { background: var(--tag-todo-bg);  border-color: var(--tag-todo-border);  color: var(--tag-todo-text); }
    .tag.doing  { background: var(--tag-doing-bg); border-color: var(--tag-doing-border); color: var(--tag-doing-text); }
    .tag.done   { background: var(--tag-done-bg);  border-color: var(--tag-done-border);  color: var(--tag-done-text); }

    .task-text {
      margin: 0;
      color: var(--text);
      font-size: 0.9rem;
      line-height: 1.5;
      white-space: pre-wrap;
      word-break: break-word;
      font-weight: 450;
      cursor: default;
      border-radius: 4px;
      outline: none;
    }
    .task-text.editing {
      cursor: text;
      background: var(--input-bg);
      box-shadow: 0 0 0 2px var(--accent);
      padding: 2px 4px;
    }

    .task-foot {
      margin-top: 10px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-size: 0.75rem;
      color: var(--text-muted);
    }

    .task-date {
      display: flex;
      align-items: center;
      gap: 4px;
    }

    .task-date.due {
      color: var(--accent);
    }

    .task-date.overdue {
      color: var(--danger);
    }

    .task-assignees {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 5px;
      margin-left: 8px;
    }

    .assignee-chip {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 22px;
      height: 22px;
      border-radius: 50%;
      border: 1px solid transparent;
      color: #fff;
      font-size: 0.66rem;
      font-weight: 700;
      line-height: 1;
      letter-spacing: 0.01em;
      box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
    }

    .remove {
      border: 1px solid var(--danger-border);
      color: var(--danger);
      background: var(--danger-bg);
      border-radius: var(--radius-xs);
      padding: 3px 8px;
      cursor: pointer;
      font-size: 0.75rem;
      font-weight: 500;
      transition: opacity 0.15s;
      opacity: 0;
    }

    @media (hover: hover) and (pointer: fine) {
      .task:hover .remove {
        opacity: 1;
      }
    }

    /* ── Task modal ─────────────────────────────────────────── */

    .task-modal-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.5);
      display: none;
      align-items: center;
      justify-content: center;
      z-index: 2100;
      padding: 16px;
    }

    .task-modal-overlay.open {
      display: flex;
    }

    .task-modal {
      width: min(680px, 100%);
      max-height: calc(100vh - 32px);
      overflow: auto;
      overflow-x: hidden;
      background: var(--panel);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      box-shadow: var(--shadow-lg);
      padding: 18px;
    }

    .task-modal-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 14px;
    }

    .task-modal-head-right {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .task-modal-title {
      margin: 0;
      font-size: 1rem;
      color: var(--text);
    }

    .task-modal-close {
      width: 30px;
      height: 30px;
    }

    .task-modal-grid {
      display: grid;
      gap: 12px;
      align-content: start;
      align-items: start;
      grid-auto-rows: max-content;
      overflow-x: hidden;
    }

    .task-modal-grid > div {
      min-width: 0;
      align-self: start;
    }

    .task-modal-label {
      display: block;
      font-size: 0.78rem;
      font-weight: 700;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      color: var(--text-sub);
      margin-bottom: 6px;
    }

    .task-modal-section-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      margin-bottom: 6px;
    }

    .task-modal-section-head .task-modal-label {
      margin-bottom: 0;
    }

    .task-inline-edit-btn {
      font-size: 0.75rem;
      padding: 5px 8px;
      line-height: 1.1;
      display: inline-flex;
      align-items: center;
      gap: 5px;
    }

    .task-modal-input,
    .task-modal-textarea {
      width: 100%;
      max-width: 100%;
      min-width: 0;
      box-sizing: border-box;
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
      background: var(--bg-elev);
      color: var(--text);
      padding: 9px 10px;
      outline: none;
      font-size: 0.9rem;
      transition: border-color 0.15s, box-shadow 0.15s;
    }

    .task-modal-input[type="date"] {
      display: block;
      width: 100%;
      max-width: 100%;
      min-width: 0;
      -webkit-appearance: none;
      appearance: none;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .task-modal-input[type="date"]::-webkit-date-and-time-value {
      min-height: 1.2em;
      text-align: left;
    }

    .task-modal-input[type="date"]::-webkit-calendar-picker-indicator {
      margin-left: 8px;
      flex-shrink: 0;
    }

    .task-modal-textarea {
      min-height: 120px;
      resize: vertical;
      line-height: 1.45;
    }

    .task-modal-input:focus,
    .task-modal-textarea:focus {
      border-color: var(--accent);
      box-shadow: 0 0 0 3px var(--accent-glow);
    }

    .task-modal-actions {
      margin-top: 14px;
      display: flex;
      justify-content: flex-end;
      gap: 8px;
    }

    .task-modal-error {
      margin-top: 10px;
      padding: 8px 10px;
      border-radius: var(--radius-sm);
      border: 1px solid var(--danger-border);
      background: var(--danger-bg);
      color: var(--danger);
      font-size: 0.8rem;
      display: none;
    }

    .task-assignee-picker {
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
      background: var(--bg-elev);
      padding: 8px;
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      min-height: 44px;
    }

    .task-assignee-option {
      border: 1px solid var(--border);
      border-radius: 999px;
      background: transparent;
      color: var(--text-sub);
      padding: 5px 9px;
      font-size: 0.76rem;
      cursor: pointer;
      transition: all 0.12s ease;
    }

    .task-assignee-option:hover {
      border-color: var(--border-strong);
      color: var(--text);
      background: var(--card);
    }

    .task-assignee-option.active {
      border-color: var(--accent);
      color: var(--accent);
      background: var(--accent-glow);
    }

    .task-assignee-empty {
      color: var(--text-muted);
      font-size: 0.78rem;
      padding: 2px;
    }

    .task-blocks {
      display: grid;
      gap: 8px;
      margin-top: 10px;
    }

    .task-block-empty {
      border: 1px dashed var(--border);
      border-radius: var(--radius-md);
      color: var(--text-muted);
      padding: 14px;
      font-size: 0.82rem;
      text-align: center;
      background: var(--bg-elev);
    }

    .task-block {
      border: 0;
      background: transparent;
      padding: 4px 0;
      display: grid;
      gap: 8px;
    }

    .task-block.drag-over {
      box-shadow: 0 0 0 2px var(--accent-glow);
      border-radius: var(--radius-sm);
    }

    .task-block-input {
      width: 100%;
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      background: var(--panel);
      color: var(--text);
      padding: 8px 10px;
      font-size: 0.88rem;
      line-height: 1.45;
      outline: none;
    }

    .task-block-input:focus {
      border-color: var(--accent);
      box-shadow: 0 0 0 2px var(--accent-glow);
    }

    .task-block.heading .task-block-input {
      font-size: 1rem;
      font-weight: 700;
    }

    .task-block.paragraph .task-block-input {
      min-height: 90px;
      resize: vertical;
    }

    .task-block-todo-row {
      display: grid;
      grid-template-columns: auto 1fr;
      gap: 8px;
      align-items: center;
      padding: 8px 10px;
    }

    .task-block-todo-list {
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      background: var(--panel);
      overflow: hidden;
    }

    .task-block-todo-row + .task-block-todo-row {
      border-top: 1px solid var(--border);
    }

    .task-block-todo-list .task-block-input {
      border: none;
      background: transparent;
      padding: 0;
      border-radius: 0;
      box-shadow: none;
    }

    .task-block-todo-list .task-block-input:focus {
      border: none;
      box-shadow: none;
    }

    .task-block-todo-row:focus-within {
      background: var(--bg-elev);
    }

    .task-block-read {
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      background: var(--panel);
      padding: 10px;
      color: var(--text);
      line-height: 1.45;
      white-space: pre-wrap;
      word-break: break-word;
    }

    .task-block-read.heading {
      font-size: 1rem;
      font-weight: 700;
    }

    .task-block-read.todo { border: none; background: transparent; padding: 0; }

    .task-block-read.note {
      border-left: 4px solid var(--accent);
      background: var(--bg-elev);
    }

    .task-block-read.link a {
      color: var(--accent);
      word-break: break-all;
      text-decoration: none;
    }

    .task-block-read.link a:hover {
      text-decoration: underline;
    }

    .task-block-divider {
      height: 1px;
      background: var(--border-strong);
      margin: 2px 0;
    }

    .task-block-youtube {
      display: grid;
      gap: 8px;
    }

    .task-block-youtube iframe {
      width: 100%;
      aspect-ratio: 16 / 9;
      border: none;
      border-radius: var(--radius-sm);
      background: #000;
    }

    .task-block-adder {
      margin-top: 10px;
      position: relative;
    }

    .task-block-adder.hidden {
      display: none;
    }

    .task-block-add-trigger {
      width: 100%;
      justify-content: center;
      border-style: dashed;
    }

    .task-block-add-menu {
      position: absolute;
      left: 0;
      right: 0;
      bottom: calc(100% + 8px);
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
      background: var(--panel);
      box-shadow: var(--shadow-lg);
      padding: 8px;
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 6px;
      max-height: min(46vh, 320px);
      overflow: auto;
      z-index: 2;
    }

    .task-block-add-menu .btn {
      width: 100%;
      justify-content: center;
      padding: 6px 8px;
      font-size: 0.75rem;
      line-height: 1.2;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .task-assignee-option .assignee-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      flex-shrink: 0;
      margin-right: 6px;
      box-shadow: 0 0 0 1px rgba(255,255,255,0.12);
    }

    .task-block-add-menu.hidden {
      display: none;
    }

    /* ── Add form ─────────────────────────────────────────── */

    .add-form {
      display: grid;
      gap: 8px;
      padding: 12px;
      border-top: 1px solid var(--border);
      background: var(--bg);
    }

    .add-input {
      width: 100%;
    }

    .add-btn {
      border: none;
      background: var(--accent);
      color: #fff;
      border-radius: var(--radius-md);
      padding: 8px 12px;
      font-weight: 600;
      font-size: 0.82rem;
      cursor: pointer;
      transition: opacity 0.15s, transform 0.1s;
    }

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

    .add-btn:active {
      transform: scale(0.97);
    }

    /* ── Footer ────────────────────────────────────────────── */

    .footer-hint {
      flex-shrink: 0;
      padding: 8px 24px;
      color: var(--text-muted);
      font-size: 0.75rem;
      border-top: 1px solid var(--border);
      background: var(--bg-elev);
      display: flex;
      align-items: center;
    }

    /* ── Empty states ─────────────────────────────────────── */

    .empty-board {
      grid-column: 1 / -1;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 10px;
      padding: 64px 32px;
      text-align: center;
      color: var(--text-muted);
    }

    .empty-board-icon {
      font-size: 2.5rem;
      opacity: 0.4;
      margin-bottom: 4px;
    }

    .empty-board-title {
      font-size: 1rem;
      font-weight: 600;
      color: var(--text-sub);
    }

    .empty-board-text {
      font-size: 0.85rem;
      max-width: 280px;
    }

    .tagged-page {
      width: 100%;
      display: grid;
      gap: 12px;
      align-content: start;
      padding-right: 24px;
    }

    .tagged-project-group {
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      background: var(--bg-elev);
      overflow: hidden;
    }

    .tagged-project-head {
      padding: 10px 12px;
      border-bottom: 1px solid var(--border);
      font-size: 0.85rem;
      font-weight: 700;
      color: var(--text);
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .tagged-project-count {
      color: var(--text-muted);
      font-size: 0.75rem;
      font-weight: 600;
    }

    .tagged-task-list {
      padding: 10px;
      display: grid;
      gap: 8px;
    }

    .tagged-task-item {
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
      background: var(--card);
      padding: 9px 10px;
      cursor: pointer;
      transition: border-color 0.12s, background 0.12s;
    }

    .tagged-task-item:hover {
      border-color: var(--border-strong);
      background: var(--card-hover);
    }

    .tagged-task-title {
      color: var(--text);
      font-size: 0.86rem;
      font-weight: 600;
      margin: 0 0 5px;
      word-break: break-word;
    }

    .tagged-task-meta {
      color: var(--text-muted);
      font-size: 0.76rem;
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }

    .account-page {
      width: 100%;
      display: flex;
      justify-content: center;
      padding: 0 24px 16px 0;
    }

    .account-card {
      width: min(620px, 100%);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      background: var(--bg-elev);
      box-shadow: var(--shadow-md);
      padding: 18px;
    }

    .account-title {
      margin: 0;
      font-size: 1.05rem;
      font-weight: 700;
      color: var(--text);
    }

    .account-subtitle {
      margin: 6px 0 16px;
      font-size: 0.84rem;
      color: var(--text-muted);
    }

    .account-form {
      display: grid;
      gap: 12px;
    }

    .account-form .field {
      margin: 0;
    }

    .account-form label {
      display: block;
      margin-bottom: 6px;
      color: var(--text-sub);
      font-size: 0.76rem;
      font-weight: 700;
      letter-spacing: 0.04em;
      text-transform: uppercase;
    }

    .account-form .input-wrap {
      position: relative;
    }

    .account-form .input-icon {
      position: absolute;
      left: 10px;
      top: 50%;
      transform: translateY(-50%);
      color: var(--text-muted);
      font-size: 0.82rem;
      pointer-events: none;
    }

    .account-form input {
      width: 100%;
      height: var(--control-height-md);
      border: 1px solid var(--border);
      border-radius: var(--control-radius);
      background: var(--bg);
      color: var(--text);
      padding: 0 12px 0 34px;
      outline: none;
      font-size: 0.88rem;
      transition: border-color 0.15s, box-shadow 0.15s;
    }

    .account-form input:focus {
      border-color: var(--accent);
      box-shadow: 0 0 0 3px var(--accent-glow);
    }

    .account-form .field-readonly input {
      opacity: 0.7;
      cursor: not-allowed;
    }

    .account-save-btn {
      width: 100%;
    }

    .account-error,
    .account-success {
      border-radius: var(--radius-md);
      padding: 10px 12px;
      font-size: 0.82rem;
      margin-bottom: 12px;
      display: none;
    }

    .account-error {
      border: 1px solid var(--danger-border);
      background: var(--danger-bg);
      color: var(--danger);
    }

    .account-success {
      border: 1px solid rgba(34,197,94,0.3);
      background: rgba(34,197,94,0.12);
      color: #4ade80;
    }

    /* ── Animations ───────────────────────────────────────── */

    @keyframes reveal {
      from { opacity: 0; transform: translateY(5px); }
      to   { opacity: 1; transform: translateY(0); }
    }

    /* ── Responsive ───────────────────────────────────────── */

    @media (max-width: 1100px) {
      .frame {
        grid-template-columns: 1fr;
        overflow: auto;
        height: auto;
        min-height: 100vh;
      }

      .main {
        overflow: visible;
      }

      .board-area {
        overflow: visible;
        padding: 16px;
      }

      .sidebar {
        border-right: none;
        border-bottom: 1px solid var(--border);
      }

      .board {
        flex-direction: column;
      }

      .account-page {
        padding: 0;
      }
    }

    @media (max-width: 768px) {
      html, body {
        width: 100%;
        height: 100dvh;
        overflow: hidden;
      }

      body {
        max-width: 100vw;
      }

      .frame {
        width: 100vw;
        max-width: 100vw;
        height: 100dvh;
        min-height: 100dvh;
        overflow: hidden;
      }

      .main {
        min-height: 0;
        overflow: hidden;
      }

      .topbar {
        height: auto;
        min-height: 72px;
        padding: 12px 14px;
      }

      .mobile-menu-btn {
        display: inline-flex;
      }

      .actions {
        gap: 6px;
      }

      .actions .btn {
        height: 38px;
        padding: 0 12px;
      }

      .account-card {
        border-radius: var(--radius-md);
        padding: 14px;
      }

      #focus-project-btn,
      #project-subtitle {
        display: none;
      }

      #toggle-favorite-btn span {
        display: none;
      }

      #toggle-favorite-btn {
        padding: 7px 9px;
        min-width: 38px;
        justify-content: center;
      }

      .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(84vw, 320px);
        z-index: 1200;
        transform: translateX(-100%);
        transition: transform 0.22s ease;
        border-right: 1px solid var(--border);
        border-bottom: none;
        pointer-events: none;
      }

      .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        border: none;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
        z-index: 1100;
      }

      .frame.sidebar-open .sidebar {
        transform: translateX(0);
        pointer-events: auto;
      }

      .frame.sidebar-open .sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
      }

      .board-area {
        min-width: 0;
        padding: 12px;
        overflow: hidden;
        gap: 10px;
        cursor: default;
      }

      .board {
        width: 100%;
        max-width: 100%;
        flex-direction: row;
        gap: 10px;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
      }

      .board::after {
        min-width: 0;
      }

      .column,
      .add-col-wrap {
        width: 100%;
        min-width: 100%;
        scroll-snap-align: start;
      }

      input,
      textarea,
      select {
        font-size: 16px !important;
      }

      .task,
      .task * {
        user-select: none;
        -webkit-user-select: none;
        -webkit-touch-callout: none;
      }

      .add-col-wrap {
        align-self: auto;
      }

      .board-dots {
        display: flex;
      }

      .mobile-drag-zone {
        position: fixed;
        top: 0;
        bottom: 0;
        width: 20vw;
        z-index: 1500;
        align-items: center;
        justify-content: center;
        opacity: 0;
        transition: opacity 0.14s ease, background-color 0.14s ease;
      }

      .mobile-drag-zone.left {
        left: 0;
      }

      .mobile-drag-zone.right {
        right: 0;
      }

      .mobile-drag-zone-label {
        padding: 7px 8px;
        border-radius: var(--radius-md);
        background: rgba(0, 0, 0, 0.52);
        color: #fff;
        font-size: 0.74rem;
        font-weight: 600;
      }

      .frame.mobile-dragging .mobile-drag-zone {
        display: flex;
        opacity: 0.66;
      }

      .frame.mobile-dragging .mobile-drag-zone.active {
        opacity: 1;
        background: rgba(99, 102, 241, 0.18);
      }

      .footer-hint {
        padding: 8px 12px;
      }

      .task-modal-overlay {
        padding: 0;
        align-items: stretch;
        justify-content: stretch;
      }

      .task-modal {
        width: 100vw;
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
        border: none;
        padding: 12px;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        overflow-x: hidden;
      }

      #task-modal-form {
        flex: 1;
        min-height: 0;
        display: block;
        overflow-y: auto;
        overflow-x: hidden;
      }

      .task-modal-grid {
        min-height: auto;
        overflow-y: visible;
        overflow-x: hidden;
      }
    }

    /* ── Scrollbar ─────────────────────────────────────────── */
    ::-webkit-scrollbar { width: 5px; height: 5px; }
    ::-webkit-scrollbar-track { background: transparent; }
    ::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 99px; }
    ::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
