    :root {
      --black: #080808;
      --surface: #0f0f0f;
      --surface2: #161616;
      --border: #2a2a2a;
      --border-heavy: #444;
      --yellow: #f5e642;
      --red: #ff2244;
      --white: #e8e8e8;
      --muted: #555;
      --mono: 'IBM Plex Mono', monospace;
      --display: 'Bebas Neue', sans-serif;
      --cursor-default: url('/cursors/notwaita-left_ptr-32.png') 4 1;
      --cursor-pointer: url('/cursors/notwaita-hand2-32.png') 10 7;
      --cursor-text: url('/cursors/notwaita-xterm-32.png') 14 15;
      --cursor-crosshair: url('/cursors/notwaita-crosshair-32.png') 15 15;
    }

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

    /* UI chrome should not be text-selectable */
    .logo-main,
    .logo-version,
    .status-key,
    .status-val,
    .tab,
    .stat-key,
    .stat-num,
    .section-label,
    .group-tag,
    .group-meta,
    .btn,
    .btn-refresh,
    .btn-list-toggle,
    .mobile-nav-tab,
    .mobile-quick-btn,
    .view-btn,
    .poll-info,
    .ts,
    .ctx-item,
    .drop-zone-label {
      -webkit-user-select: none;
      user-select: none;
    }

    html {
      cursor: var(--cursor-default), default;
      -webkit-text-size-adjust: 100%;
      text-size-adjust: 100%;
      width: 100%;
      max-width: 100%;
      overflow-x: hidden;
    }

    body {
      cursor: var(--cursor-default), default;
      background: var(--black);
      color: var(--white);
      font-family: var(--mono);
      min-height: 100vh;
      overflow-x: hidden;
      /* Scanline effect */
      background-image: repeating-linear-gradient(0deg,
          transparent,
          transparent 2px,
          rgba(0, 0, 0, 0.15) 2px,
          rgba(0, 0, 0, 0.15) 4px);
    }

    ::-webkit-scrollbar {
      width: 12px;
      height: 12px;
    }

    ::-webkit-scrollbar-track {
      background: var(--black);
      border-left: 1px solid var(--border-heavy);
    }

    ::-webkit-scrollbar-thumb {
      background: var(--surface2);
      border: 1px solid var(--border-heavy);
    }

    ::-webkit-scrollbar-thumb:hover {
      background: var(--yellow);
      border: 1px solid var(--black);
    }

    /* Heavy top bar */
    header {
      background: var(--black);
      padding: 0;
      position: sticky;
      top: 0;
      z-index: 100;
    }

    .header-inner {
      display: flex;
      align-items: stretch;
      max-width: 1600px;
      margin: 0 auto;
      border-bottom: 4px solid var(--yellow);
    }

    .logo-block {
      background: var(--yellow);
      padding: 12px 24px;
      display: flex;
      align-items: center;

      flex-shrink: 0;
    }

    .logo-main {
      font-family: var(--display);
      font-size: 28px;
      color: var(--black);
      letter-spacing: 0.05em;
      line-height: 1;
      margin: 0;
      display: inline-flex;
      align-items: baseline;
      gap: 1px;
    }

    .logo-x {
      position: relative;
    top: 0px;
    font-size: 30px;
    }

    .logo-word {
      display: inline-block;
    }

    .logo-version {
      font-family: var(--mono);
      font-size: 9px;
      font-weight: 700;
      color: var(--black);
      opacity: 0.6;
      letter-spacing: 0.1em;
      line-height: 1;
      margin: 0;
    }

    .logo-copy {
      padding: 12px 22px 11px;
      display: flex;
      flex-direction: column;
      justify-content: center;
      gap: 5px;
    }

    .header-status {
      display: flex;
      align-items: center;
      gap: 0;
      padding: 0 24px;
    }

    .header-status.tab-hidden {
      display: none;
    }

    .status-item {
      display: flex;
      flex-direction: column;
      padding: 8px 20px;
      border-right: 1px solid var(--border);
      gap: 2px;
    }

    .status-item:first-child {
      padding-left: 0;
    }

    .status-key {
      font-size: 8px;
      font-weight: 700;
      letter-spacing: 0.15em;
      text-transform: uppercase;
      color: var(--muted);
    }

    .status-val {
      font-size: 13px;
      font-weight: 700;
      color: var(--yellow);
    }

    #hdr-live-status[data-state="off"] {
      color: var(--muted);
    }

    #hdr-live-status[data-state="connecting"],
    #hdr-live-status[data-state="reconnecting"] {
      color: #f5e642;
    }

    #hdr-live-status[data-state="connected"] {
      color: #00f5a0;
    }

    #hdr-live-status[data-state="error"] {
      color: var(--red);
    }

    .adaptive-help {
      position: relative;
      display: inline-block;
      cursor: help;
    }

    .adaptive-help::after {
      content: attr(data-tooltip);
      position: absolute;
      left: 50%;
      bottom: calc(100% + 8px);
      transform: translateX(-50%);
      background: var(--surface2);
      border: 1px solid var(--border-heavy);
      color: var(--white);
      font-family: var(--mono);
      font-size: 9px;
      letter-spacing: 0.06em;
      text-transform: none;
      line-height: 1.35;
      padding: 8px 10px;
      width: 220px;
      max-width: min(220px, 80vw);
      white-space: pre-line;
      pointer-events: none;
      opacity: 0;
      z-index: 3000;
      box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
      transition: opacity 0.12s ease;
    }

    .adaptive-help:hover::after {
      opacity: 1;
    }

    /* In the top status bar, open tooltip downward to avoid clipping */
    .header-status .adaptive-help::after {
      top: calc(100% + 8px);
      bottom: auto;
    }

    /* In dashboard stats, open tooltip downward so it doesn't cover header actions */
    .stats-strip .adaptive-help::after {
      top: calc(100% + 8px);
      bottom: auto;
    }

    .header-actions {
      margin-left: auto;
      display: flex;
      align-items: center;
      gap: 8px;
      padding-right: 24px;
    }

    .mobile-top-refresh {
      display: none;
    }

    /* Buttons — brutalist flat */
    .btn {
      font-family: var(--mono);
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      padding: 8px 18px;
      border: 2px solid var(--border-heavy);
      background: transparent;
      color: var(--white);
      cursor: var(--cursor-crosshair), crosshair;
      transition: background 0.08s, color 0.08s, border-color 0.08s;
      white-space: nowrap;
    }

    .btn:hover {
      background: var(--white);
      color: var(--black);
      border-color: var(--white);
    }

    .btn-primary {
      background: var(--yellow);
      color: var(--black);
      border-color: var(--yellow);
    }

    .btn-primary:hover {
      background: #fff;
      border-color: #fff;
      color: var(--black);
    }

    .btn-danger {
      background: transparent;
      color: var(--red);
      border-color: var(--red);
      padding: 4px 10px;
      font-size: 10px;
    }

    .btn-danger:hover {
      background: var(--red);
      color: var(--black);
    }

    .btn-icon-only {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      justify-content: center;
    }

    .btn-icon {
      width: 12px;
      height: 12px;
      display: inline-flex;
      flex-shrink: 0;
    }

    .btn-icon svg {
      width: 100%;
      height: 100%;
      fill: currentColor;
      display: block;
    }

    .mobile-iconize {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
    }

    /* Main layout */
    main {
      max-width: 1600px;
      margin: 0 auto;
      padding: 0;
    }

    /* Tab bar */
    .tabbar {
      display: flex;
      border-bottom: 2px solid var(--border-heavy);
      background: var(--surface);
      margin-bottom: 12px;
    }

    .tab {
      font-family: var(--mono);
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.15em;
      text-transform: uppercase;
      padding: 14px 28px;
      cursor: var(--cursor-crosshair), crosshair;
      color: var(--muted);
      border-right: 1px solid var(--border);
      border-bottom: 3px solid transparent;
      margin-bottom: -2px;
      margin-top: 4px;
      transition: color 0.1s, border-color 0.1s;
      user-select: none;
    }

    .tab:hover {
      color: var(--white);
    }

    .tab.active {
      color: var(--yellow);
      border-bottom-color: var(--yellow);
    }

    .tab-panel {
      display: none;
    }

    .tab-panel.active {
      display: block;
      animation: panelIn 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    }

    @keyframes panelIn {
      from {
        opacity: 0;
        transform: translateY(6px);
      }

      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    /* Stats strip */
    .stats-strip {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      border-bottom: 2px solid var(--border-heavy);
    }

    .stat-block {
      padding: 20px 28px;
      border-right: 2px solid var(--border-heavy);
      position: relative;
      animation: statIn 0.45s cubic-bezier(0.22, 1, 0.36, 1);
      animation-fill-mode: both;
    }

    .stat-block:last-child {
      border-right: none;
    }

    .stat-block:nth-child(1) {
      animation-delay: 0.03s;
    }

    .stat-block:nth-child(2) {
      animation-delay: 0.08s;
    }

    .stat-block:nth-child(3) {
      animation-delay: 0.13s;
    }

    .stat-block:nth-child(4) {
      animation-delay: 0.18s;
    }

    @keyframes statIn {
      from {
        opacity: 0;
        transform: translateY(8px);
      }

      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .stat-block::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 3px;
      background: var(--border);
    }

    .stat-block.active::before {
      background: var(--yellow);
    }

    .stat-key {
      font-size: 9px;
      font-weight: 700;
      letter-spacing: 0.2em;
      text-transform: uppercase;
      color: var(--muted);
      margin-bottom: 6px;
    }

    .stat-num {
      font-family: var(--display);
      font-size: 42px;
      color: var(--white);
      line-height: 1;
    }

    .stat-num.yellow {
      color: var(--yellow);
    }

    /* Dashboard content area */
    .dashboard-area {
      padding: 28px;
    }

    .section-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 20px;
      padding-bottom: 10px;
      border-bottom: 1px solid var(--border-heavy);
    }

    .section-label {
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.25em;
      text-transform: uppercase;
      color: var(--muted);
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .section-label::before {
      content: '//';
      color: var(--yellow);
    }

    .view-switch {
      display: inline-flex;
      border: 1px solid var(--border-heavy);
      background: var(--surface2);
      padding: 2px;
      gap: 2px;
    }

    .view-btn {
      border: 1px solid transparent;
      background: transparent;
      color: var(--muted);
      font-family: var(--mono);
      font-size: 9px;
      font-weight: 700;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      min-height: 30px;
      padding: 0 10px;
      cursor: var(--cursor-crosshair), crosshair;
    }

    .view-btn:hover {
      color: var(--white);
      border-color: var(--border);
    }

    .view-btn.active {
      color: var(--yellow);
      border-color: var(--yellow);
      background: rgba(245, 230, 66, 0.08);
    }

    #dashboard-content.view-fill .trackers-grid {
      grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }

    #dashboard-content.view-list .trackers-grid {
      grid-template-columns: 1fr;
      gap: 10px;
    }

    .list-card .card-top {
      padding: 10px 14px;
      border-bottom: 1px solid var(--border);
    }

    .list-meta {
      display: flex;
      align-items: center;
      gap: 10px;
      color: var(--muted);
      font-size: 9px;
      letter-spacing: 0.08em;
      flex-wrap: wrap;
      margin-top: 4px;
    }

    .list-meta strong {
      color: var(--white);
      font-weight: 700;
    }

    .list-controls {
      margin-left: auto;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .list-controls .btn-refresh,
    .list-controls .btn,
    .list-controls .btn-list-toggle {
      min-height: 30px;
      height: 30px;
      padding: 0 10px;
      border-width: 1px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      line-height: 1;
      font-size: 9px;
      letter-spacing: 0.08em;
    }

    .list-controls .btn-refresh {
      gap: 5px;
    }

    .list-controls .btn-icon {
      width: 11px;
      height: 11px;
    }

    .list-controls .btn-danger {
      padding: 0 10px;
      font-size: 9px;
    }

    .btn-subtle {
      border-color: var(--border-heavy);
      color: var(--muted);
      font-size: 9px;
      padding: 5px 10px;
    }

    .btn-list-toggle {
      border: 1px solid var(--border-heavy);
      background: transparent;
      color: var(--muted);
      font-family: var(--mono);
      font-size: 9px;
      font-weight: 700;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      min-height: 28px;
      padding: 0 10px;
      cursor: var(--cursor-crosshair), crosshair;
    }

    .btn-list-toggle:hover {
      border-color: var(--yellow);
      color: var(--yellow);
    }

    .list-details {
      border-top: 1px solid var(--border);
      background: var(--surface2);
      display: none;
    }

    .list-card.open .list-details {
      display: block;
      animation: panelIn 0.18s ease;
    }

    /* Groups */
    .group-section {
      margin-bottom: 36px;
    }

    .group-bar {
      display: flex;
      align-items: center;
      gap: 0;
      margin-bottom: 16px;
      border: 2px solid var(--border-heavy);
      background: var(--surface);
    }

    .group-tag {
      font-family: var(--display);
      font-size: 20px;
      letter-spacing: 0.05em;
      padding: 8px 20px;
      border-right: 2px solid var(--border-heavy);
      color: var(--black);
    }

    .group-meta {
      font-size: 9px;
      font-weight: 700;
      letter-spacing: 0.15em;
      text-transform: uppercase;
      color: var(--muted);
      padding: 0 16px;
    }

    .group-del {
      margin-left: auto;
      margin-right: 12px;
    }

    /* Tracker grid */
    .trackers-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
      gap: 8px;
    }

    /* Card */
    .tracker-card {
      background: var(--surface);
      border: 2px solid var(--border-heavy);
      padding: 0;
      position: relative;
      transition: border-color 0.14s, transform 0.14s, box-shadow 0.14s;
      opacity: 1;
      animation: none;
    }

    .tracker-card.animate-in {
      animation: appear 0.2s ease forwards;
      opacity: 0;
    }

    @keyframes appear {
      from {
        opacity: 0;
        transform: translateY(4px);
      }

      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .tracker-card:hover {
      border-color: var(--yellow);
      transform: translateY(-2px);
      box-shadow: 0 10px 24px rgba(0, 0, 0, 0.26);
    }

    /* Yellow accent stripe on left */
    .tracker-card::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      bottom: 0;
      width: 3px;
      background: var(--border-heavy);
      transition: background 0.1s;
      z-index: 6;
      pointer-events: none;
    }

    .tracker-card:hover::before {
      background: var(--yellow);
    }

    .card-top {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 16px 16px 12px 20px;
      border-bottom: 1px solid var(--border);
    }

    .avatar {
      width: 40px;
      height: 40px;
      background: var(--surface2);
      border: 2px solid var(--border-heavy);
      overflow: hidden;
      display: flex;
      align-items: center;
      justify-content: center;
      font-family: var(--display);
      font-size: 20px;
      color: var(--yellow);
      flex-shrink: 0;
    }

    .avatar img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .card-ident {
      flex: 1;
      min-width: 0;
    }

    .card-name {
      font-family: var(--display);
      font-size: 20px;
      letter-spacing: 0.03em;
      line-height: 1;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      display: flex;
      align-items: center;
      gap: 6px;
      flex-wrap: wrap;
    }

    .card-name-text {
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      min-width: 0;
      flex-shrink: 1;
    }

    .card-handle {
      font-size: 10px;
      color: var(--muted);
      margin-top: 2px;
      letter-spacing: 0.05em;
    }

    .x-badge {
      font-family: var(--display);
      font-size: 14px;
      background: var(--surface2);
      border: 2px solid var(--border-heavy);
      padding: 4px 8px;
      color: var(--muted);
      flex-shrink: 0;
    }

    /* Metrics row */
    .metrics-row {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      border-bottom: 1px solid var(--border);
    }

    .metric {
      padding: 12px 16px;
      border-right: 1px solid var(--border);
      text-align: center;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 4px;
      min-height: 68px;
    }

    .metric-main {
      display: inline-flex;
      align-items: flex-end;
      justify-content: center;
      gap: 8px;
      min-width: 0;
      white-space: nowrap;
    }

    .metric:last-child {
      border-right: none;
    }

    .metric-num {
      font-family: var(--display);
      font-size: 28px;
      color: var(--white);
      line-height: 1;
      display: block;
    }

    .metric-lbl {
      font-size: 8px;
      font-weight: 700;
      letter-spacing: 0.15em;
      text-transform: uppercase;
      color: var(--muted);
      margin-top: 0;
      display: block;
    }

    .delta {
      font-size: 10px;
      font-weight: 700;
      display: block;
      margin-top: 2px;
    }

    .delta.inline {
      display: inline-flex;
      align-items: center;
      margin-top: 0;
      line-height: 1;
    }

    /* Normal card follower delta sizing */
    .tracker-card:not(.list-card) .metric-main .metric-num {
      font-size: 30px;
    }

    .tracker-card:not(.list-card) .delta.inline {
      font-size: 13px;
      font-weight: 700;
      line-height: 1;
    }

    .delta.up {
      color: var(--yellow);
    }

    .delta.down {
      color: var(--red);
    }

    .delta.flat {
      color: var(--muted);
    }

    /* Sparkline */
    .spark-wrap {
      padding: 10px 22px;
      border-bottom: 1px solid var(--border);
      background: var(--surface2);
      position: relative;
      max-width: 100%;
      min-width: 0;
    }

    .spark-row {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      font-size: 8px;
      font-weight: 700;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: var(--muted);
      margin-bottom: 5px;
    }

    .spark-delta-val {
      color: var(--yellow);
      text-align: right;
      white-space: nowrap;
      font-variant-numeric: tabular-nums;
    }

    .spark-delta-val.neg {
      color: var(--red);
    }

    .sparkline-svg {
      width: 100%;
      max-width: 100%;
      height: 32px;
      display: block;
      margin: 0;
      overflow: hidden;
      contain: paint;
    }

    .spark-tip {
      position: absolute;
      left: 12px;
      bottom: calc(100% + 6px);
      background: var(--surface2);
      border: 1px solid var(--border-heavy);
      color: var(--white);
      font-family: var(--mono);
      font-size: 9px;
      letter-spacing: 0.04em;
      text-transform: none;
      line-height: 1.35;
      padding: 7px 9px;
      min-width: 0;
      max-width: calc(100% - 24px);
      white-space: pre-line;
      word-break: break-word;
      pointer-events: none;
      opacity: 0;
      z-index: 40;
      box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
      transition: opacity 0.12s ease;
    }

    .spark-wrap.spark-help:hover .spark-tip {
      opacity: 1;
    }

    /* Card footer */
    .card-foot {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 10px 16px;
      border-bottom: 1px solid var(--border);
    }

    .foot-meta {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .ts {
      font-size: 9px;
      color: var(--muted);
      letter-spacing: 0.05em;
    }

    .poll-info {
      font-size: 9px;
      color: var(--muted);
    }

    .poll-info.fast {
      color: var(--yellow);
    }

    .poll-info.medium {
      color: #aaa;
    }

    .foot-actions {
      display: flex;
      gap: 6px;
      align-items: center;
    }

    .btn-refresh {
      font-family: var(--mono);
      font-size: 9px;
      font-weight: 700;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      background: transparent;
      border: 1px solid var(--border-heavy);
      color: var(--muted);
      padding: 5px 12px;
      cursor: var(--cursor-crosshair), crosshair;
      transition: all 0.08s;
      display: flex;
      align-items: center;
      gap: 5px;
    }

    .btn-refresh:hover {
      border-color: var(--yellow);
      color: var(--yellow);
    }

    .btn-refresh.loading {
      opacity: 0.4;
      pointer-events: none;
    }

    .spinner {
      width: 9px;
      height: 9px;
      border: 1.5px solid currentColor;
      border-top-color: transparent;
      border-radius: 50%;
      animation: spin 0.5s linear infinite;
    }

    @keyframes spin {
      to {
        transform: rotate(360deg);
      }
    }

    /* Tweet feed */
    .tweet-feed {
      border-top: 1px solid var(--border);
    }

    .tweet-feed-hdr {
      font-size: 8px;
      font-weight: 700;
      letter-spacing: 0.2em;
      text-transform: uppercase;
      color: var(--muted);
      padding: 8px 16px;
      background: var(--surface2);
      border-bottom: 1px solid var(--border);
    }

    .tweet-item {
      padding: 10px 16px;
      border-bottom: 1px solid var(--border);
      border-left: 3px solid transparent;
      font-size: 11px;
      line-height: 1.5;
      color: var(--white);
      transition: border-left-color 0.1s, background 0.1s;
      overflow-wrap: anywhere;
      word-break: break-word;
    }

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

    .tweet-item:hover {
      background: var(--surface2);
      border-left-color: var(--border-heavy);
    }

    .tweet-item.is-new {
      border-left-color: var(--yellow);
      background: rgba(245, 230, 66, 0.03);
    }

    .tweet-ts {
      color: var(--muted);
      letter-spacing: 0.04em;
    }

    .tweet-img {
      width: 100%;
      height: auto;
      max-height: 420px;
      object-fit: contain;
      margin-top: 8px;
      border: 1px solid var(--border);
      display: block;
      background: var(--black);
    }

    .tweet-video {
      width: 100%;
      height: auto;
      max-height: 420px;
      margin-top: 8px;
      border: 1px solid var(--border);
      display: block;
      background: var(--black);
    }

    .tweet-media-note {
      margin-top: 6px;
      font-size: 9px;
      color: var(--muted);
      letter-spacing: 0.04em;
    }

    .tweet-media-note a {
      color: var(--yellow);
      text-decoration: none;
    }

    .tweet-media-note a:hover {
      text-decoration: underline;
    }

    .tweet-preview {
      border: 1px solid var(--border-heavy);
      margin-top: 10px;
      display: flex;
      flex-direction: row;
      background: var(--surface2);
      text-decoration: none;
      transition: border-color 0.1s, background 0.1s;
      border-radius: 8px;
      overflow: hidden;
      color: var(--white);
      max-width: 100%;
    }

    .tweet-preview:hover {
      background: rgba(255, 255, 255, 0.05);
    }

    .tweet-preview.no-image {
      flex-direction: column;
    }

    .tweet-preview-img-wrap {
      flex-shrink: 0;
      width: 120px;
      border-right: 1px solid var(--border-heavy);
      background: var(--black);
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .tweet-preview-img {
      width: 100%;
      height: auto;
      object-fit: contain;
      min-height: 0;
      max-height: 220px;
      background: var(--black);
    }

    .tweet-preview-content {
      padding: 12px;
      display: flex;
      flex-direction: column;
      justify-content: center;
      flex: 1;
      min-width: 0;
      max-width: 100%;
    }

    .tweet-preview-vanity {
      font-size: 10px;
      color: var(--muted);
      margin-bottom: 2px;
      overflow-wrap: anywhere;
    }

    .tweet-preview-title {
      font-size: 11px;
      color: var(--white);
      margin-bottom: 2px;
      overflow-wrap: anywhere;
    }

    .tweet-preview-desc {
      font-size: 10px;
      color: var(--muted);
      display: -webkit-box;
      line-clamp: 2;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
      line-height: 1.4;
      overflow-wrap: anywhere;
    }

    .tweet-link {
      color: var(--yellow) !important;
      text-decoration: none;
      overflow-wrap: anywhere;
    }

    .tweet-link:hover {
      text-decoration: underline;
    }

    .tweet-foot {
      display: flex;
      gap: 12px;
      margin-top: 6px;
      font-size: 9px;
      font-weight: 700;
      color: var(--muted);
      letter-spacing: 0.05em;
      align-items: center;
      flex-wrap: wrap;
    }

    .tweet-foot a {
      color: var(--muted);
      text-decoration: none;
    }

    .tweet-foot a:hover {
      color: var(--yellow);
    }

    .tag {
      font-size: 8px;
      font-weight: 700;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      padding: 1px 5px;
      border: 1px solid;
    }

    .tag-new {
      border-color: var(--yellow);
      color: var(--yellow);
    }

    .tag-rt {
      border-color: var(--border-heavy);
      color: var(--muted);
    }

    .tag-reply {
      border-color: var(--red);
      color: var(--red);
    }

    .no-tweets {
      font-size: 10px;
      color: var(--muted);
      text-align: center;
      padding: 16px;
      letter-spacing: 0.1em;
    }

    /* Empty state */
    .empty-state {
      text-align: center;
      padding: 80px;
      border: 2px dashed var(--border-heavy);
      margin: 28px;
      color: var(--muted);
    }

    .empty-state h2 {
      font-family: var(--display);
      font-size: 48px;
      color: var(--border-heavy);
      margin-bottom: 12px;
    }

    .empty-state p {
      font-size: 11px;
      letter-spacing: 0.1em;
    }

    /* Group pill on card */
    .group-chip {
      font-size: 8px;
      font-weight: 700;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      padding: 2px 6px;
      border: 1px solid;
      flex-shrink: 0;
      white-space: nowrap;
      line-height: 1.4;
    }

    /* Modal */
    .modal-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.85);
      z-index: 1000;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .modal {
      background: var(--surface);
      border: 3px solid var(--yellow);
      padding: 32px;
      width: 100%;
      max-width: 500px;
      position: relative;
      animation: popIn 0.15s ease;
    }

    @keyframes popIn {
      from {
        transform: scale(0.96);
        opacity: 0;
      }

      to {
        transform: scale(1);
        opacity: 1;
      }
    }

    .modal-title {
      font-family: var(--display);
      font-size: 32px;
      letter-spacing: 0.05em;
      margin-bottom: 4px;
    }

    .modal-sub {
      font-size: 10px;
      color: var(--muted);
      letter-spacing: 0.1em;
      text-transform: uppercase;
      margin-bottom: 28px;
      padding-bottom: 16px;
      border-bottom: 1px solid var(--border-heavy);
    }

    .form-group {
      margin-bottom: 18px;
    }

    .secret-input-row {
      display: flex;
      gap: 8px;
      align-items: stretch;
    }

    .secret-input-row input {
      flex: 1 1 auto;
    }

    .secret-clear-btn {
      padding-inline: 12px;
      flex: 0 0 auto;
    }

    label {
      display: block;
      font-size: 9px;
      font-weight: 700;
      letter-spacing: 0.2em;
      text-transform: uppercase;
      color: var(--muted);
      margin-bottom: 6px;
    }

    input,
    select,
    textarea {
      width: 100%;
      background: var(--black);
      border: 2px solid var(--border-heavy);
      padding: 10px 14px;
      color: var(--white);
      font-family: var(--mono);
      font-size: 12px;
      outline: none;
      transition: border-color 0.1s;
    }

    input:focus,
    select:focus,
    textarea:focus {
      border-color: var(--yellow);
    }

    select option {
      background: var(--black);
    }

    textarea {
      resize: vertical;
      min-height: 70px;
    }

    .form-hint {
      font-size: 9px;
      color: var(--muted);
      margin-top: 5px;
      line-height: 1.6;
      letter-spacing: 0.03em;
    }

    .toggle-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
      border: 1px solid var(--border-heavy);
      background: var(--black);
      padding: 10px 12px;
    }

    .toggle-meta {
      min-width: 0;
    }

    .toggle-title {
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.08em;
      color: var(--white);
      text-transform: uppercase;
    }

    .toggle-desc {
      margin-top: 4px;
      font-size: 9px;
      color: var(--muted);
      letter-spacing: 0.03em;
      line-height: 1.45;
    }

    .switch {
      position: relative;
      width: 46px;
      height: 24px;
      flex-shrink: 0;
      display: inline-block;
    }

    .switch input {
      position: absolute;
      opacity: 0;
      width: 0;
      height: 0;
    }

    .switch-slider {
      position: absolute;
      inset: 0;
      border: 2px solid var(--border-heavy);
      background: var(--surface2);
      transition: border-color 0.12s, background 0.12s;
      cursor: var(--cursor-pointer), pointer;
    }

    .switch-slider::before {
      content: '';
      position: absolute;
      width: 16px;
      height: 16px;
      top: 2px;
      left: 2px;
      background: var(--muted);
      transition: transform 0.12s, background 0.12s;
    }

    .switch input:checked+.switch-slider {
      border-color: var(--yellow);
      background: rgba(245, 230, 66, 0.09);
    }

    .switch input:checked+.switch-slider::before {
      transform: translateX(22px);
      background: var(--yellow);
    }

    .modal-actions {
      display: flex;
      gap: 8px;
      justify-content: flex-end;
      margin-top: 24px;
      padding-top: 16px;
      border-top: 1px solid var(--border-heavy);
    }

    .modal-close {
      position: absolute;
      top: 12px;
      right: 12px;
      background: none;
      border: none;
      color: var(--muted);
      cursor: var(--cursor-crosshair), crosshair;
      font-family: var(--mono);
      font-size: 16px;
      line-height: 1;
      padding: 4px 8px;
    }

    .modal-close:hover {
      color: var(--red);
    }

    /* Settings */
    .settings-wrap {
      padding: 28px;
    }

    .settings-block {
      border: 2px solid var(--border-heavy);
      margin-bottom: 20px;
    }

    .settings-hdr {
      background: var(--surface2);
      border-bottom: 2px solid var(--border-heavy);
      padding: 12px 20px;
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .settings-hdr-label {
      font-family: var(--display);
      font-size: 18px;
      letter-spacing: 0.05em;
    }

    .settings-body {
      padding: 20px;
    }

    .settings-desc {
      font-size: 10px;
      color: var(--muted);
      line-height: 1.8;
      margin-bottom: 20px;
      letter-spacing: 0.03em;
    }

    .code-block {
      background: var(--black);
      border: 1px solid var(--border-heavy);
      border-left: 3px solid var(--yellow);
      padding: 12px 16px;
      font-size: 10px;
      color: var(--white);
      margin-bottom: 16px;
      line-height: 1.8;
      white-space: pre-wrap;
      word-break: break-all;
      letter-spacing: 0.02em;
    }

    /* Toast */
    .toast {
      position: fixed;
      bottom: 20px;
      right: 20px;
      background: var(--surface);
      border: 2px solid var(--yellow);
      border-left: 5px solid var(--yellow);
      padding: 12px 20px;
      font-size: 11px;
      font-weight: 700;
      color: var(--yellow);
      letter-spacing: 0.08em;
      text-transform: uppercase;
      z-index: 9999;
      animation: toastIn 0.2s ease;
      max-width: 340px;
    }

    .toast.err {
      border-color: var(--red);
      color: var(--red);
    }

    @keyframes toastIn {
      from {
        transform: translateX(20px);
        opacity: 0;
      }

      to {
        transform: translateX(0);
        opacity: 1;
      }
    }

    /* ── Drag & Drop ─────────────────────────────────────────── */
    .tracker-card[draggable="true"] {
      cursor: grab;
    }

    .tracker-card[draggable="true"]:active {
      cursor: grabbing;
    }

    .tracker-card.dragging {
      opacity: 0.35;
      border-color: var(--yellow) !important;
      transform: scale(0.97);
      transition: opacity 0.1s, transform 0.1s;
    }

    .drag-ghost {
      position: fixed;
      pointer-events: none;
      z-index: 9000;
      background: var(--surface);
      border: 3px solid var(--yellow);
      padding: 14px 18px;
      font-family: var(--display);
      font-size: 22px;
      letter-spacing: 0.05em;
      color: var(--yellow);
      white-space: nowrap;
      box-shadow: 0 0 0 1px var(--black), 6px 6px 0 var(--yellow);
      transform: rotate(-1.5deg);
    }

    body.is-dragging .trackers-grid {
      outline: 1px dashed rgba(245, 230, 66, 0.3);
      outline-offset: 4px;
      background: rgba(245, 230, 66, 0.02);
      transition: background 0.15s, outline-color 0.15s;
    }

    .trackers-grid.drop-over {
      outline: 2px dashed var(--yellow) !important;
      background: rgba(245, 230, 66, 0.08) !important;
    }

    .drop-zone-label {
      display: none;
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.2em;
      color: var(--yellow);
      text-align: center;
      padding: 18px;
      border: 2px dashed var(--yellow);
      margin-top: 8px;
      background: rgba(245, 230, 66, 0.04);
      animation: pulse-border 1s ease infinite alternate;
    }

    @keyframes pulse-border {
      from {
        border-color: rgba(245, 230, 66, 0.4);
      }

      to {
        border-color: var(--yellow);
      }
    }

    body.is-dragging .drop-zone-label {
      display: block;
    }

    /* ── Context menu ─────────────────────────────────────────── */
    .ctx-menu {
      position: fixed;
      z-index: 8000;
      background: var(--surface);
      border: 2px solid var(--yellow);
      min-width: 200px;
      box-shadow: 4px 4px 0 var(--yellow);
      animation: popIn 0.1s ease;
    }

    .ctx-header {
      font-size: 9px;
      font-weight: 700;
      letter-spacing: 0.2em;
      text-transform: uppercase;
      color: var(--muted);
      padding: 8px 14px 6px;
      border-bottom: 1px solid var(--border-heavy);
      background: var(--surface2);
    }

    .ctx-item {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 14px;
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      cursor: var(--cursor-crosshair), crosshair;
      border-bottom: 1px solid var(--border);
      transition: background 0.08s, color 0.08s;
      color: var(--white);
    }

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

    .ctx-item:hover {
      background: var(--yellow);
      color: var(--black);
    }

    .ctx-item.active {
      color: var(--yellow);
    }

    .ctx-item.active:hover {
      color: var(--black);
    }

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

    .ctx-item.danger {
      color: var(--red);
    }

    .ctx-item.danger:hover {
      background: var(--red);
      color: var(--black);
    }

    /* Drag handle on card top */
    .drag-handle {
      cursor: grab;
      color: var(--muted);
      font-size: 18px;
      padding: 8px 12px;
      margin: -8px -4px -8px -12px;
      letter-spacing: 0.05em;
      user-select: none;
      transition: color 0.1s, transform 0.1s;
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .drag-handle:active {
      cursor: grabbing;
      transform: scale(1.1);
    }

    .tracker-card:hover .drag-handle {
      color: var(--yellow);
    }

    /* ── Mobile Bottom Nav ─────────────────────────────────────────── */
    .mobile-nav {
      display: none;
    }

    .mobile-quick-actions {
      display: none;
    }

    @media (prefers-reduced-motion: reduce) {
      * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
      }
    }

    /* ── Responsive: Tablet ──────────────────────────────────────────── */
    @media (max-width: 900px) {
      .trackers-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
      }
    }

    /* ── Responsive: Mobile ──────────────────────────────────────────── */
    @media (max-width: 640px) {
      html {
        overflow-x: hidden;
      }

      body {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: contain;
        overflow-x: hidden;
      }

      :root {
        --mobile-nav-h: 64px;
      }

      * {
        -webkit-tap-highlight-color: transparent;
      }

      .header-inner {
        flex-wrap: wrap;
      }

       .logo-x {
         font-size: 24px;
       }
      .logo-main {
        font-size: 22px;
      }

      .logo-version {
        display: none;
      }

      .header-status {
        display: flex;
        order: 3;
        width: 100%;
        padding: 0 10px;
        border-top: 1px solid var(--border);
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
      }

      .status-item {
        flex: 0 0 auto;
        min-width: 88px;
        padding: 7px 10px;
      }

      .status-item:first-child {
        padding-left: 0;
      }

      .status-key {
        font-size: 7px;
        letter-spacing: 0.14em;
      }

      .status-val {
        font-size: 11px;
      }

      .header-actions {
        margin-left: auto;
        padding-right: 10px;
      }

      .header-actions .btn {
        min-height: 42px;
      }

      .header-actions .btn:nth-child(2),
      .header-actions .btn:nth-child(3) {
        display: none;
      }

      .header-actions .mobile-top-refresh {
        display: inline-flex;
        width: 34px;
        min-width: 34px;
        min-height: 34px;
        padding: 0;
        justify-content: center;
        margin-right: 8px;
      }

      .header-actions .mobile-top-refresh .btn-icon {
        width: 13px;
        height: 13px;
      }

      /* Hide desktop tabbar — bottom nav handles this */
      .tabbar {
        display: none;
      }

      /* Stats strip — horizontal scroll on mobile */
      .stats-strip {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        border-bottom: 2px solid var(--border-heavy);
        margin-top: 6px;
        border-top: 1px solid var(--border-heavy);
      }

      
      .stat-block {
        min-width: 0;
        padding: 12px 10px;
      }

      .stat-num {
        font-size: 24px;
      }

      .stat-key {
        font-size: 8px;
        letter-spacing: 0.14em;
      }

      .stat-block::before {
        display: none;
      }

      /* Add bottom padding so content clears the nav bar */
      .dashboard-area {
        padding: 10px 10px calc(var(--mobile-nav-h) + 96px + env(safe-area-inset-bottom));
      }

      .settings-wrap {
        padding: 12px 12px calc(var(--mobile-nav-h) + 20px + env(safe-area-inset-bottom));
      }

      /* Group bar */
      .group-bar {
        flex-wrap: wrap;
        gap: 4px;
        padding: 6px;
      }

      .group-tag {
        font-size: 15px;
        padding: 6px 14px;
      }

      .group-del {
        display: flex;
        gap: 4px;
        margin-left: auto;
        margin-right: 4px;
      }

      /* Single column cards */
      .trackers-grid {
        grid-template-columns: 1fr;
        gap: 8px;
        overflow-x: hidden;
      }

      .tracker-card,
      .tweet-feed,
      .tweet-item,
      .tweet-preview,
      .tweet-img {
        max-width: 100%;
      }

      /* Card top */
      .card-top {
        padding: 12px 12px 10px 14px;
        gap: 10px;
      }

      .card-name {
        font-size: 17px;
      }

      /* Metrics */
      .metric-num {
        font-size: 22px;
      }

      /* Card footer — bigger hit areas */
      .card-foot {
        padding: 12px;
        flex-wrap: wrap;
        gap: 8px;
      }

      .foot-actions {
        width: 100%;
        gap: 6px;
      }

      .foot-actions .btn,
      .foot-actions .btn-refresh {
        flex: 1;
        justify-content: center;
      }

      .btn-refresh {
        padding: 10px 14px;
        font-size: 10px;
        min-height: 44px;
      }

      .btn-danger {
        padding: 8px 14px;
        font-size: 10px;
        min-height: 44px;
      }

      .btn {
        min-height: 40px;
      }

      .foot-actions .btn-icon-only {
        width: 40px;
        min-width: 40px;
        padding: 0;
        gap: 0;
      }

      .foot-actions .btn-icon-only .btn-label {
        display: none;
      }

      .foot-actions .btn-icon-only .btn-icon {
        width: 14px;
        height: 14px;
      }

      .mobile-iconize {
        width: 40px;
        min-width: 40px;
        min-height: 40px;
        padding: 0;
        gap: 0;
      }

      .mobile-iconize .btn-label {
        display: none;
      }

      .mobile-iconize .btn-icon {
        width: 14px;
        height: 14px;
      }

      .group-del .mobile-iconize {
        width: 42px;
        min-width: 42px;
        min-height: 42px;
      }

      .list-card .card-top {
        flex-wrap: wrap;
      }

      .list-controls {
        width: 100%;
        margin-left: 0;
        justify-content: flex-end;
      }

      .list-controls .btn-refresh,
      .list-controls .btn,
      .list-controls .btn-list-toggle {
        min-height: 40px;
        height: 40px;
        font-size: 10px;
        padding: 0 12px;
      }

      .list-controls .btn-icon {
        width: 13px;
        height: 13px;
      }

      body.is-dragging .mobile-nav,
      body.is-dragging .mobile-quick-actions {
        opacity: 0.25;
        pointer-events: none;
      }

      /* Drag handle — bigger touch area */
      .drag-handle {
        font-size: 22px;
        padding: 10px 14px;
        min-width: 44px;
        min-height: 44px;
        touch-action: none;
      }

      /* Tweet items */
      .tweet-item {
        padding: 12px 14px;
        font-size: 12px;
      }

      .tweet-foot {
        gap: 10px;
        font-size: 10px;
      }

      .tweet-preview-img-wrap {
        width: 90px;
      }

      /* Modals — slide up from bottom on mobile */
      .modal-overlay {
        align-items: flex-end;
      }

      .modal {
        width: 100%;
        max-width: 100%;
        max-height: 88vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 0;
        border: none;
        border-top: 4px solid var(--yellow);
        padding: 24px 20px 40px;
        animation: slideUp 0.22s ease;
      }

      @keyframes slideUp {
        from {
          transform: translateY(40px);
          opacity: 0;
        }

        to {
          transform: translateY(0);
          opacity: 1;
        }
      }

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

      .modal-close {
        top: 16px;
        right: 16px;
      }

      /* Context menu — bigger tap targets */
      .ctx-item {
        padding: 14px 16px;
        font-size: 12px;
      }

      /* Section bar */
      .section-bar {
        flex-wrap: wrap;
        gap: 8px;
        position: static;
        top: auto;
        z-index: auto;
        background: transparent;
        border: none;
        padding: 0 0 10px;
        margin: 0 0 10px;
      }

      .section-bar .btn {
        display: none;
      }

      .view-switch {
        width: 100%;
      }

      .view-btn {
        flex: 1;
        min-height: 34px;
      }

      /* Empty state */
      .empty-state {
        padding: 40px 16px;
        margin: 10px;
      }

      .empty-state h2 {
        font-size: 36px;
      }

      /* Mobile bottom navigation */
      .mobile-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 500;
        background: var(--surface);
        border-top: none;
        height: calc(var(--mobile-nav-h) + env(safe-area-inset-bottom));
        padding-bottom: env(safe-area-inset-bottom);
      }

      .mobile-nav-tab {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        font-family: var(--mono);
        font-size: 8px;
        font-weight: 700;
        letter-spacing: 0.15em;
        text-transform: uppercase;
        color: var(--muted);
        cursor: var(--cursor-pointer), pointer;
        border: none;
        border-top: 3px solid transparent;
        background: transparent;
        transition: color 0.1s, background 0.1s;
        padding: 0;
        min-height: var(--mobile-nav-h);
        box-sizing: border-box;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
      }

      .mobile-nav-tab.active {
        color: var(--yellow);
        background: rgba(245, 230, 66, 0.06);
        border-top-color: var(--yellow);
      }

      .mobile-nav-tab:active {
        background: rgba(245, 230, 66, 0.14);
      }

      .mobile-nav-icon {
        font-size: 18px;
        line-height: 1;
      }

      .mobile-quick-actions {
        display: none;
      }

      body.tab-dashboard-active .mobile-quick-actions {
        display: grid;
      }

      .mobile-quick-actions {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: calc(var(--mobile-nav-h) + 8px + env(safe-area-inset-bottom));
        z-index: 520;
        grid-template-columns: 1fr auto;
        gap: 8px;
        pointer-events: none;
        animation: quickActionsIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
      }

      @keyframes quickActionsIn {
        from {
          transform: translateY(14px);
          opacity: 0;
        }

        to {
          transform: translateY(0);
          opacity: 1;
        }
      }

      .mobile-quick-btn {
        pointer-events: auto;
        min-height: 46px;
        border: 2px solid var(--border-heavy);
        background: rgba(15, 15, 15, 0.92);
        color: var(--white);
        font-family: var(--mono);
        font-size: 10px;
        font-weight: 700;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        backdrop-filter: blur(6px);
      }

      .mobile-quick-btn.primary {
        border-color: var(--yellow);
        background: var(--yellow);
        color: var(--black);
        box-shadow: 0 6px 18px rgba(245, 230, 66, 0.28);
      }

      .mobile-quick-btn.square {
        width: 64px;
        min-width: 64px;
        min-height: 46px;
        padding: 0 6px;
        font-size: 9px;
        letter-spacing: 0.08em;
      }

    }

    input,
    textarea,
    [contenteditable="true"] {
      cursor: var(--cursor-text), text;
    }

    #login-overlay {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: var(--black);
      z-index: 2000;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-direction: column;
      padding: 20px;
    }

    .login-box {
      width: 100%;
      max-width: 400px;
      padding: 40px;
      border: 4px solid var(--yellow);
      background: var(--surface);
    }

    .login-title {
      font-family: var(--display);
      font-size: clamp(34px, 7.2vw, 48px);
      line-height: 1;
      letter-spacing: 0.03em;
      white-space: normal;
      overflow-wrap: anywhere;
      color: var(--yellow);
      margin-bottom: 20px;
      text-align: center;
    }

    .login-input {
      width: 100%;
      background: var(--black);
      border: 2px solid var(--border-heavy);
      padding: 12px;
      color: var(--white);
      font-family: var(--mono);
      font-size: 16px;
      margin-bottom: 24px;
      outline: none;
    }

    .login-input:focus {
      border-color: var(--yellow);
    }
  
