    :root {
      --bg: #050816;
      --bg-alt: #0b1120;
      --card-bg: #111827;
      --accent: #DBBCDF;
      --accent-soft: #DBBCDF;
      --text: #0b1120;
      --muted: #9ca3af;
      --danger: #e758d1;
    }

    * {
      box-sizing: border-box;
    }

    body {
      margin: 0;
      font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      background: linear-gradient(
        to bottom right,
        #F4E3F6 0%,
        #DBBCDF 25%,
        #BC8BC2 50%,
        #916496 75%,
        #704A74 100%
      );
      background-attachment: fixed;
      color: var(--text);
      min-height: 100vh;
    }

    header {
      position: sticky;
      top: 0;
      z-index: 20;
      background: linear-gradient(
        to right,
        #F4E3F6,
        #DBBCDF,
        #BC8BC2
      );
      backdrop-filter: blur(10px);
      border-bottom: 1px solid rgba(255,255,255,0.2);
      padding: 0.6rem 1.5rem;
      display: flex;
      align-items: center;
      gap: 1rem;
    }

    .logo {
      font-weight: 800;
      letter-spacing: 0.04em;
      font-size: 2rem;
      color: #916496;
      cursor: pointer;
    }

    .top-search {
      flex: 1;
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    .top-search input[type="text"] {
      flex: 1;
      padding: 0.35rem 0.6rem;
      border-radius: 999px;
      border: 1px solid #d2a7d8;
      background: #BC8BC2;
      color: var(--text);
      font-size: 0.9rem;
    }

    .top-buttons {
      display: flex;
      gap: 0.4rem;
    }

    .icon-btn {
      border-radius: 999px;
      border: 1px solid #d2a7d8;
      background: #BC8BC2;
      color: var(--text);
      padding: 0.25rem 0.7rem;
      font-size: 0.85rem;
      display: flex;
      align-items: center;
      gap: 0.3rem;
      cursor: pointer;
    }

    .icon-btn.primary {
      background: #916496;
      border-color: var(--accent-soft);
      color: #0b1120;
      font-weight: 600;
    }

    .icon-btn:hover {
      border-color: var(--accent);
    }

    .icon {
      font-size: 1rem;
    }

    #filter-panel {
      display: none;
      background: linear-gradient(
        to right,
        #DBBCDF,
        #BC8BC2,
        #916496
      );
      border-bottom: 1px solid rgba(255,255,255,0.2);
      padding: 0.6rem 1.5rem;
    }

    #filter-panel.open {
      display: block;
    }

    #filter-panel .controls {
      display: flex;
      flex-wrap: wrap;
      gap: 0.7rem;
      align-items: flex-end;
      font-size: 0.85rem;
    }

    label {
      font-size: 0.8rem;
      color: var(--text);
      display: block;
    }

    select,
    input[type="url"],
    input[type="text"] {
      padding: 0.3rem 0.5rem;
      border-radius: 0.4rem;
      border: 1px solid #d2a7d8;
      background: #BC8BC2;
      color: var(--text);
      font-size: 0.85rem;
      min-width: 140px;
    }

    main {
      padding: 0.9rem 1.5rem 2rem;
      max-width: 1400px;
      margin: 0 auto;
    }

    #stats-strip {
      display: grid;
      grid-template-columns: repeat(5, 1fr);
      gap: 0.75rem;
      margin-bottom: 1rem;
    }

    #stats-strip .pill {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      white-space: nowrap;
      min-width: 6.5ch;
    }

    #stats-strip .badge {
      margin-left: 0;
      align-self: flex-start;
    }

    #stat-tags .stat-main,
    #stat-categories .stat-main {
      min-height: 2.6rem;
    }

    .stat-card {
      background: #ffffff;
      /* #00ff1e; */
      color: #020617;
      /* #00ff1e; */
      border-radius: 0.75rem;
      padding: 0.7rem 0.9rem;
      border: 1px solid #e5e7eb;
      box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12);
      font-size: 0.8rem;
      align-self: stretch;
    }

    .stat-title {
      font-weight: 600;
      margin-bottom: 0.25rem;
      color: var(--text);
      text-transform: uppercase;
      letter-spacing: 0.06em;
      font-size: 0.75rem;
    }

    .stat-main {
      font-size: 0.9rem;
      margin-bottom: 0.15rem;
    }

    #stats-strip .stat-main {
      display: flex;
      flex-direction: column;
      gap: 0.25rem;
      align-items: flex-start;
    }

    #stats-strip .stat-line {
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .stat-sub {
      color: var(--text);
      font-size: 0.78rem;
    }

    .stat-overlay {
      margin-top: 0.35rem;
      background: #F4E3F6;
      border: 1px solid #DBBCDF;
      border-radius: 0.65rem;
      padding: 0.6rem 0.65rem;
      box-shadow: 0 4px 10px rgba(15, 23, 42, 0.10);
    }

    .stat-overlay .post-header {
      margin-bottom: 0.35rem;
    }

    .stat-overlay .post-user {
      font-weight: 700;
      font-size: 0.9rem;
    }

    .stat-overlay .post-meta {
      font-size: 0.72rem;
      color: var(--muted);
      white-space: nowrap;
    }

    .stat-overlay .post-text {
      font-size: 0.9rem;
      margin: 0.35rem 0;
      white-space: pre-wrap;
    }

    .stat-overlay .post-tags {
      font-size: 0.78rem;
      color: var(--muted);
      margin: 0.25rem 0 0;
    }

    .stat-overlay .post-reactions {
      display: inline-flex;
      gap: 0.5rem;
      align-items: center;
      margin-top: 0.35rem;
    }

    .stat-overlay .post-reactions .pill {
      margin-top: 0;
    }

    .pill {
      background:#ba8ebf;
      border: 1px solid #bdb9f2;
      color:#2A3550;
      border-radius: 999px;
      padding: 0.1rem 0.55rem;
      font-size: 0.75rem;
      margin-top: 0.15rem;
    }

    .stat-card .pill {
      background: #DBBCDF;
      border: 1px solid #B9CCF2;
      color: #2A3550;
    }

    .stat-main .icon-pill {
      display: inline-flex;
      align-items: center;
      gap: 0.3rem;
      margin-top: 0.2rem;
    }

    .stat-main .icon-pill svg {
      width: 14px;
      height: 14px;
    }

    #stats-strip .stat-card {
      display: flex;
      flex-direction: column;
    }

    #stats-strip .stat-main {
      flex: 1;
      display: flex;
      flex-direction: column;
      gap: 0.35rem;
      align-items: flex-start;
    }

    #stats-strip .stat-head {
      display: inline-flex;
      align-items: center;
      gap: 0.45rem;
      flex-wrap: wrap;
    }

    #stats-strip .stat-bottom {
      margin-top: auto;
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
    }

    #feed-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 0.75rem;
      align-items: flex-start;
    }

    @media (max-width: 1200px) {
      #feed-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }
    }

    @media (max-width: 900px) {
      #feed-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }

    @media (max-width: 650px) {
      #feed-grid {
        grid-template-columns: 1fr;
      }
    }

    .post-card {
      background: #F4E3F6;
      border: 1px solid #DBBCDF;
      color: #020617;      
      border-radius: 0.75rem;
      padding: 0.75rem 0.8rem;
      box-shadow: 0 6px 14px rgba(15, 23, 42, 0.15);
      word-wrap: break-word;
    }

    .post-header {
      display: flex;
      justify-content: space-between;
      align-items: baseline;
      margin-bottom: 0.4rem;
    }

    .post-user {
      font-weight: 600;
      font-size: 0.9rem;
    }

    .badge {
      border: 1px solid #d2a7d8;
      background: #BC8BC2;
      border-radius: 999px;
      padding: 0.1rem 0.5rem;
      font-size: 0.75rem;
      margin-left: 0.4rem;
      text-transform: lowercase;
      color: var(--text);;
    }

    .post-meta {
      font-size: 0.72rem;
      color: var(--muted);
      white-space: nowrap;
    }

    .post-text {
      font-size: 0.9rem;
      margin: 0.4rem 0;
      white-space: pre-wrap;
    }

    .post-tags {
      font-size: 0.78rem;
      color: var(--muted);
      margin-bottom: 0.25rem;
    }

    .post-counts {
      font-size: 0.78rem;
      color: var(--muted);
    }

    .reaction-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-top: 0.35rem;
    }

    .reaction-buttons {
      display: flex;
      align-items: center;
      gap: 0.25rem;
    }

    .btn-sm {
      border: 1px solid #d2a7d8;
      background: #BC8BC2;
      border-radius: 999px;
      color: var(--text);
      padding: 0.15rem 0.55rem;
      font-size: 0.75rem;
      cursor: pointer;
    }

    .btn-sm:hover {
      border-color: var(--accent);
    }

    .btn-sm:disabled {
      opacity: 0.4;
      cursor: default;
    }

    .reaction-btn {
      border: none;
      background: transparent;
      padding: 0;
      font-size: 1.1rem;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }

    .reaction-btn:disabled {
      opacity: 0.4;
      cursor: default;
    }

    .reaction-btn svg {
      width: 18px;
      height: 18px;
    }

    .like-icon path {
      stroke: #f97373;
      stroke-width: 2;
      fill: none;
      stroke-linejoin: round;
      stroke-linecap: round;
    }

    .reaction-btn.heart.active .like-icon path {
      fill: #f973e5;
    }

    .broken-icon .outline,
    .broken-icon .crack {
      stroke: #000000;
      stroke-width: 2;
      fill: none;
      stroke-linejoin: round;
      stroke-linecap: round;
    }

    .reaction-btn.broken-heart.active .broken-icon .outline {
      fill: #f973e5;
    }

    .muted {
      color: var(--text);
      font-size: 0.8rem;
    }

    .status-block {
      margin-top: 0.4rem;
      background: #BC8BC2;
      border-radius: 0.5rem;
      padding: 0.4rem 0.6rem;
      font-size: 0.75rem;
      color: var(--text);
      max-height: 160px;
      overflow: auto;
      font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
      white-space: pre-wrap;
    }

    #modal-overlay {
      position: fixed;
      inset: 0;
      background: rgba(15, 23, 42, 0.35);
      display: none;
      align-items: center;
      justify-content: center;
      z-index: 30;
    }

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

    .modal {
      background: #BC8BC2;
      border-radius: 0.9rem;
      border: 1px solid #1f2937;
      padding: 1rem 1.2rem;
      width: 100%;
      max-width: 460px;
      box-shadow: 0 18px 40px rgba(0, 0, 0, 0.9);
    }

    .modal-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 0.6rem;
    }

    .modal-header h3 {
      margin: 0;
      font-size: 1rem;
    }

    .modal-close {
      border: none;
      background: transparent;
      color: var(--text);
      font-size: 1.2rem;
      cursor: pointer;
    }

    .field-group {
      margin-bottom: 0.6rem;
      font-size: 0.85rem;
    }

    textarea {
      width: 100%;
      min-height: 70px;
      resize: vertical;
      padding: 0.4rem 0.5rem;
      border-radius: 0.5rem;
      border: 1px solid #f0d4f4;
      background: #e2bae7;
      color: var(--text);
      font-size: 0.9rem;
    }

    .primary-btn {
      background: var(--accent-soft);
      color: #020617;
      border-radius: 0.6rem;
      border: none;
      padding: 0.4rem 0.9rem;
      font-size: 0.9rem;
      cursor: pointer;
      font-weight: 600;
    }

    .primary-btn:hover {
      background: var(--accent);
    }

    .danger-btn {
      background: var(--danger);
      color: #fee2e2;
      border-radius: 0.6rem;
      border: none;
      padding: 0.4rem 0.9rem;
      font-size: 0.85rem;
      cursor: pointer;
    }

    .btn-row {
      display: flex;
      gap: 0.45rem;
      margin-top: 0.4rem;
      flex-wrap: wrap;
    }
  
