/* postTXT desktop layout — additive only.
   New chrome classes are hidden by default so mobile is unchanged.
   All layout overrides live inside min-width media queries. */

.desktop-nav,
.desktop-rail {
  display: none;
}

@media (min-width: 1000px) {
  /* Expand the app shell into a two-column desktop frame */
  .phone.phone-app {
    max-width: 980px;
    width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 220px minmax(0, 640px);
    column-gap: 28px;
    align-items: start;
    box-shadow: none;
    overflow: visible;
    padding-bottom: 0;
    background: transparent;
  }

  .phone.phone-app .topbar,
  .phone.phone-app .main {
    grid-column: 2;
    width: 100%;
    max-width: 640px;
    background: var(--bg);
  }

  .phone.phone-app .topbar {
    border-left: 1px solid #121212;
    border-right: 1px solid #121212;
    border-radius: 0;
  }

  .phone.phone-app .main {
    border-left: 1px solid #121212;
    border-right: 1px solid #121212;
    min-height: calc(100dvh - 52px);
    padding-bottom: 48px;
  }

  /* Left sidebar */
  .phone.phone-app .desktop-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    grid-column: 1;
    grid-row: 1 / span 20;
    position: sticky;
    top: 0;
    align-self: start;
    height: 100dvh;
    padding: 18px 12px 24px;
    box-sizing: border-box;
  }

  .desktop-nav-brand {
    display: inline-flex;
    align-items: baseline;
    gap: 0;
    padding: 8px 12px 20px;
    font-weight: 800;
    font-size: 22px;
    letter-spacing: 0.04em;
  }

  .desktop-nav-brand .wordmark-txt {
    color: var(--accent);
  }

  .desktop-nav .dnav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 999px;
    color: var(--text);
    font-size: 18px;
    font-weight: 600;
    transition: background 0.15s ease;
  }

  .desktop-nav .dnav-link:hover {
    background: rgba(255, 255, 255, 0.06);
  }

  .desktop-nav .dnav-link.is-active {
    color: var(--accent);
  }

  .desktop-nav .dnav-link svg {
    flex-shrink: 0;
  }

  .desktop-nav .dnav-compose {
    margin-top: 10px;
    justify-content: center;
    background: var(--accent);
    color: var(--accent-ink);
    font-weight: 700;
  }

  .desktop-nav .dnav-compose:hover {
    background: #67e8f9;
    color: var(--accent-ink);
  }

  .desktop-nav .dnav-compose.is-active {
    color: var(--accent-ink);
  }

  .desktop-nav-spacer {
    flex: 1;
  }

  .desktop-nav .dnav-logout {
    color: var(--muted);
    font-size: 15px;
    font-weight: 500;
  }

  .desktop-nav .dnav-logout button {
    all: unset;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 12px 14px;
    border-radius: 999px;
    box-sizing: border-box;
  }

  .desktop-nav .dnav-logout button:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
  }

  /* Hide mobile bottom tabbar + keyboard filler on desktop app chrome */
  .phone.phone-app .tabbar,
  .phone.phone-app .kb-fill {
    display: none !important;
  }

  /* Auth / welcome / compose (no app chrome): keep centered narrow shell */
  .phone:not(.phone-app) {
    max-width: 480px;
  }
}

@media (min-width: 1200px) {
  .phone.phone-app {
    max-width: 1220px;
    grid-template-columns: 240px minmax(0, 640px) 300px;
    column-gap: 24px;
  }

  .phone.phone-app .desktop-rail {
    display: block;
    grid-column: 3;
    grid-row: 1 / span 20;
    position: sticky;
    top: 16px;
    align-self: start;
    margin-top: 12px;
    padding: 16px 16px 12px;
    background: #0a0a0a;
    border: 1px solid #161616;
    border-radius: 16px;
    max-height: calc(100dvh - 32px);
    overflow: auto;
  }

  .desktop-rail-title {
    font-size: 18px;
    font-weight: 800;
    margin: 0 0 12px;
    padding: 0 4px;
  }

  .desktop-rail .rail-tag {
    display: block;
    padding: 10px 8px;
    border-radius: 10px;
    transition: background 0.15s ease;
  }

  .desktop-rail .rail-tag:hover {
    background: rgba(255, 255, 255, 0.05);
  }

  .desktop-rail .rail-tag .hash {
    display: block;
    color: var(--accent);
    font-weight: 700;
    font-size: 15px;
  }

  .desktop-rail .rail-tag .muted {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-top: 2px;
  }

  .desktop-rail-empty {
    color: var(--muted);
    font-size: 13px;
    padding: 4px 8px 8px;
    margin: 0;
  }

  .desktop-rail-more {
    display: inline-block;
    margin-top: 8px;
    padding: 8px;
    color: var(--accent);
    font-size: 14px;
    font-weight: 600;
  }
}
