/* Desktop 3-column shell (>=1024px). Mobile/tablet layout stays as it is today.
   Sticky / grid utilities are not in the compiled tailwind.css sheet. */

.desk-left,
.desk-right,
.desk-only { display: none; }

@media (min-width: 1024px) {
  #site-topnav,
  #site-footer,
  .desk-hide { display: none !important; }

  .desk-only { display: block; }
  .desk-only-flex { display: flex !important; }

  .desk-shell {
    display: grid;
    grid-template-columns: 16.5rem minmax(0, 1fr) 20rem;
    gap: 1.5rem;
    max-width: 90rem;
    margin: 0 auto;
    padding: 0 1.25rem;
    width: 100%;
    flex: 1 1 auto;
    min-width: 0;
    align-items: start;
  }

  .desk-left,
  .desk-right {
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    padding: 0.75rem 0 1.25rem;
    scrollbar-width: thin;
  }

  .desk-mid { min-width: 0; padding-bottom: 3rem; }

  /* Home/Following sticky tabs (X-style). */
  .home-tabs {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 30;
    border-bottom: 1px solid rgb(255 255 255 / 0.15);
    background-color: rgb(15 23 42 / 0.88);
    background-image: linear-gradient(135deg, rgb(15 23 42 / 0.92) 0%, rgb(30 27 75 / 0.88) 50%, rgb(76 29 149 / 0.55) 100%);
    backdrop-filter: blur(12px);
  }
  .home-tab {
    flex: 1 1 0;
    text-align: center;
    padding: 1rem 0.75rem;
    min-height: 44px;
    font-weight: 700;
    font-size: 1.05rem;
    text-decoration: none;
    color: rgb(156 163 175);
    border-bottom: 3px solid transparent;
  }
  .home-tab:hover { color: rgb(252 211 77); }
  .home-tab.is-on {
    color: rgb(252 211 77);
    border-bottom-color: rgb(245 158 11);
  }

  /* Left nav */
  .desk-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
  }
  .desk-brand:hover { opacity: 0.9; text-decoration: none; }
  .desk-brand-name {
    font-size: 1.25rem;
    font-weight: 900;
    color: rgb(252 211 77);
  }
  .desk-scribes { margin: 0.5rem 0 0; font-size: 0.875rem; color: rgb(252 211 77); }
  .desk-nav {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-top: 1.1rem;
  }
  .desk-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.9rem;
    min-height: 44px;
    border-radius: 9999px;
    color: rgb(252 211 77);
    font-weight: 700;
    font-size: 1.05rem;
    text-decoration: none;
    line-height: 1.2;
  }
  .desk-nav-item:hover { background: rgb(245 158 11 / 0.15); color: rgb(251 191 36); text-decoration: none; }
  .desk-nav-item.is-on { background: rgb(255 255 255 / 0.1); }
  .desk-nav-ico { width: 1.35rem; height: 1.35rem; flex-shrink: 0; }
  .desk-badge {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 1.5rem;
    padding: 0 0.35rem;
    border-radius: 9999px;
    background: #dc2626;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
  }
  .desk-badge[hidden],
  .desk-badge.hidden { display: none !important; }
  .desk-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    object-fit: cover;
    border: 2px solid rgb(245 158 11);
    box-shadow: 0 0 20px rgba(251, 158, 11, 0.45);
    flex-shrink: 0;
  }
  .desk-weave {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background-image: linear-gradient(to right, #f59e0b, #ea580c);
    color: #000;
    font-weight: 700;
    font-size: 1.25rem;
    text-decoration: none;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(251, 158, 11, 0.4);
  }
  .desk-weave:hover { text-decoration: none; color: #000; }
  .desk-signed { margin: 0.75rem 0 0; color: rgb(156 163 175); font-size: 0.875rem; }
  .desk-account { margin-top: 0.5rem; }
  .desk-account summary {
    list-style: none;
    cursor: pointer;
    color: rgb(252 211 77);
    font-weight: 700;
    padding: 0.4rem 0.9rem;
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .desk-account summary::-webkit-details-marker { display: none; }
  .desk-account a,
  .desk-account button.desk-switch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.4rem 0.9rem;
    min-height: 44px;
    color: rgb(252 211 77);
    font-weight: 700;
    text-decoration: none;
    border-radius: 9999px;
    font-size: 0.95rem;
  }
  .desk-account a:hover,
  .desk-account button.desk-switch:hover { background: rgb(245 158 11 / 0.15); text-decoration: none; }
  .desk-account a.desk-logout { color: rgb(252 165 165); }
  .desk-account form { margin: 0; }
  .desk-account button.desk-switch {
    width: 100%;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
  }

  /* Right rail */
  .desk-search {
    width: 100%;
    margin-bottom: 0.75rem;
    padding: 0.7rem 1rem;
    min-height: 44px;
    background: rgb(255 255 255 / 0.08);
    border: 1px solid rgb(255 255 255 / 0.15);
    border-radius: 9999px;
    color: rgb(229 231 235);
    font-size: 1rem;
    font-family: Georgia, serif;
    outline: none;
  }
  .desk-search:focus { border-color: #fbbf24; }
  .desk-rail-card {
    background: rgb(255 255 255 / 0.08);
    border: 1px solid rgb(255 255 255 / 0.15);
    border-radius: 20px;
    padding: 0.85rem 1rem;
    margin-bottom: 0.75rem;
  }
  .desk-rail-card h2 {
    margin: 0 0 0.35rem;
    font-size: 1.1rem;
    font-weight: 900;
    color: rgb(252 211 77);
  }
  .desk-trend-list { list-style: none; padding: 0; margin: 0; }
  .desk-trend-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    min-height: 1.85rem;
  }
  .desk-trend-list a {
    color: rgb(252 211 77);
    font-weight: 700;
    text-decoration: none;
    font-size: 0.95rem;
  }
  .desk-wtf-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.7rem; }
  .desk-wtf-row { display: flex; align-items: center; gap: 0.6rem; }
  .desk-wtf-row .meta { min-width: 0; flex: 1; }
  .desk-wtf-row .meta p { margin: 0; line-height: 1.25; }
  .desk-follow-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 0.9rem;
    border-radius: 9999px;
    border: 0;
    cursor: pointer;
    background-image: linear-gradient(to right, #f59e0b, #ea580c);
    color: #000;
    font-weight: 700;
    font-family: Georgia, serif;
    font-size: 0.9rem;
    text-decoration: none;
  }
  .desk-follow-btn:hover { color: #000; text-decoration: none; }
  .desk-rail-footer { padding-top: 0.25rem; color: rgb(156 163 175); font-size: 0.875rem; }
  .desk-rail-footer nav { display: flex; flex-wrap: wrap; gap: 0.25rem 0.75rem; margin: 0.5rem 0; }
  .desk-rail-footer a { color: rgb(252 211 77); font-weight: 700; text-decoration: none; }
  .desk-rail-footer a:hover { color: rgb(253 230 138); }

  /* Compact verse picker under the home tabs. */
  .desk-picker-wrap { margin: 0.75rem 0 1rem; }
  .desk-picker-wrap .flex.flex-col.sm\:flex-row { gap: 0.55rem; padding: 0.45rem; }
  .desk-picker-wrap .verseweave-input,
  .desk-picker-wrap select {
    min-height: 44px;
    padding: 0.45rem 0.7rem;
    font-size: 1rem;
  }
  .desk-picker-wrap button[type="submit"] {
    font-size: 1.05rem;
    padding: 0.4rem 1.15rem;
  }

  /* Prev/Next under the Verse of the Hour card (desktop). Same look as weave.html. */
  .verse-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 1.25rem;
  }
  .verse-nav-prev,
  .verse-nav-next {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1.25rem;
    min-height: 44px;
    border-radius: 1rem;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
  }
  .verse-nav-prev {
    background: rgb(255 255 255 / 0.1);
    color: rgb(252 211 77);
    border: 2px solid transparent;
  }
  .verse-nav-prev:hover { background: rgb(255 255 255 / 0.2); border-color: rgb(252 211 77); text-decoration: none; }
  .verse-nav-next {
    background-image: linear-gradient(to right, #f59e0b, #ea580c);
    color: #000;
    border: 0;
    box-shadow: 0 8px 25px rgba(251, 158, 11, 0.4);
  }
  .verse-nav-next:hover { color: #000; text-decoration: none; }
  .verse-nav .ref { font-size: 0.95rem; font-weight: 400; }

  /* Home already drew a trending sidebar from 1024px; the right rail replaces it. */
  .tn-aside { display: none !important; }

  /* Sign-in pages: keep today's mobile card, use the site background on desktop. */
  body.account-page {
    display: flex;
    flex-direction: column;

    background-image: var(--page-image, linear-gradient(135deg, #0f172a 0%, #1e1b4b 30%, #4c1d95 70%, #0f172a 100%));
    background-attachment: fixed;
    color: rgb(229 231 235);
  }
}
