/* Thinkora V23.22 — desktop-only layout refinements.
   Deliberately no rules apply at 900px and below: preserve approved mobile UI. */
@media screen and (min-width:901px) {
  /* Use available workspace space, including when desktop sidebar is collapsed. */
  .t-desktop-content .t-menu-main,
  .t-desktop-content .t-home-main,
  .t-desktop-content .t20-hub-main {
    max-width:1560px!important;
    width:100%!important;
    padding-left:clamp(22px,2.3vw,42px)!important;
    padding-right:clamp(22px,2.3vw,42px)!important;
    margin-left:auto!important;
    margin-right:auto!important;
    box-sizing:border-box;
  }
  .t-desktop-content .premium-shell .scrollregion {
    max-width:1560px!important;
    width:100%!important;
  }
  /* A chosen category must occupy the WHOLE workspace, not half a two-column grid. */
  .t-desktop-content .t-menu-main:has(> .t-menu-back) .t-menu-categories {
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:18px;
  }
  .t-desktop-content .t-menu-main:has(> .t-menu-back) .t-category {
    width:100%;min-width:0;
  }
  .t-desktop-content .t-menu-main:has(> .t-menu-back) .t-menu-tiles {
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:15px;
  }
  /* Unfiltered menu remains an even pair of sections, with equal-height tracks. */
  .t-desktop-content .t-menu-main:not(:has(> .t-menu-back)) .t-menu-categories {
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:18px;
    align-items:stretch;
  }
  .t-desktop-content .t-menu-main:not(:has(> .t-menu-back)) .t-menu-tiles {
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:12px;
  }
  .t-desktop-content .t-category {
    min-width:0;
    box-sizing:border-box;
    padding:22px clamp(18px,2vw,30px) 26px;
  }
  /* Center each tile's pictogram, heading and description on a common axis. */
  .t-desktop-content .t-menu-tile,
  .t-desktop-content .t20-hub-tile {
    align-items:center!important;
    justify-content:flex-start!important;
    text-align:center!important;
    min-width:0;
    min-height:168px;
    padding:17px 12px 15px!important;
    gap:8px;
    box-sizing:border-box;
  }
  .t-desktop-content .t-menu-tile-icon,
  .t-desktop-content .t20-hub-tile-icon {
    display:grid!important;
    place-items:center!important;
    justify-content:center!important;
    align-content:center!important;
    width:76px;
    height:76px;
    margin:0 auto!important;
    flex:0 0 76px;
  }
  .t-desktop-content .t-menu-tile-icon .t-illustration,
  .t-desktop-content .t20-hub-tile-icon .t-illustration {
    display:block!important;
    width:68px!important;
    height:68px!important;
    object-fit:contain!important;
    object-position:center!important;
    margin:0 auto!important;
    transform:none!important;
  }
  .t-desktop-content .t-menu-tile-icon .t-emoji-icon,
  .t-desktop-content .t20-hub-tile-icon .t-emoji-icon {
    display:grid!important;
    place-items:center!important;
    margin:auto!important;
  }
  .t-desktop-content .t-menu-tile b,
  .t-desktop-content .t20-hub-tile strong {
    display:block;
    width:100%;
    max-width:100%;
    font-size:clamp(13px,1vw,16px)!important;
    line-height:1.3;
    text-align:center!important;
    overflow-wrap:break-word;
  }
  .t-desktop-content .t-menu-tile small,
  .t-desktop-content .t20-hub-tile small {
    display:block;
    max-width:100%;
    font-size:clamp(11px,.78vw,12px)!important;
    line-height:1.4;
    text-align:center!important;
    overflow-wrap:break-word;
  }
  /* Home shortcuts: even spacing and image alignment on every desktop width. */
  .t-desktop-content .t-quick-grid {gap:22px 16px;align-items:start;}
  .t-desktop-content .t-shortcut {align-items:center!important;text-align:center;min-width:0;}
  .t-desktop-content .t-shortcut-art {margin-inline:auto;place-items:center;}
  .t-desktop-content .t-shortcut-art .t-illustration {display:block;object-fit:contain;object-position:center;margin:auto;}
  .t-desktop-content .t-shortcut b,
  .t-desktop-content .t-shortcut small {margin-inline:auto;text-align:center;}
  .t-desktop-content .t20-hub-grid {gap:16px;}
  .t-desktop-content .t20-hub-tile {min-height:162px;}
  /* Module tabs and action buttons must use the entire width, not stop at 200–255px. */
  .t-desktop-content .premium-shell .v19-module-tabs {display:flex;width:100%;align-items:stretch;gap:12px;overflow-x:auto;}
  .t-desktop-content .premium-shell .v19-module-tab {
    flex:1 1 0;
    width:auto;
    min-width:112px;
    max-width:none!important;
    min-height:70px;
    white-space:normal;
    text-align:center;
    justify-content:center;
  }
  .t-desktop-content .premium-shell .v19-toolstrip {
    display:flex;
    width:100%;
    max-width:100%;
    gap:12px;
    align-items:stretch;
    overflow-x:auto;
  }
  .t-desktop-content .premium-shell .v19-tool {
    flex:1 1 0;
    width:auto;
    min-width:110px;
    max-width:none!important;
    min-height:75px;
    justify-content:center;
    align-items:center;
    text-align:center;
  }
  .t-desktop-content .premium-shell .v19-tool-ico,
  .t-desktop-content .premium-shell .v19-module-tab .ui-icon-bubble {
    display:grid!important;
    place-items:center!important;
    margin-inline:auto;
    text-align:center;
  }
  /* Settings: readable tabs, uniform buttons, no tiny labels stretched over the width. */
  .t-desktop-content .premium-shell .settings-tabs {
    display:grid!important;
    grid-template-columns:repeat(6,minmax(0,1fr));
    width:100%;
    gap:6px;
    overflow:visible!important;
    padding:6px!important;
    box-sizing:border-box;
  }
  .t-desktop-content .premium-shell .settings-tabs button {
    display:flex;
    align-items:center;
    justify-content:center;
    white-space:normal!important;
    text-align:center;
    font-size:12px!important;
    line-height:1.3;
    min-height:46px!important;
    min-width:0;
    padding:9px 8px!important;
  }
  .t-desktop-content .premium-shell .compact-form-panel {width:100%;}
  /* Desktop already exposes AI in the sidebar and settings; avoid covering editor controls. */
  body .thinkora-ai-tools {display:none!important;}
  /* Keep the sidebar compact but scrollable without a conspicuous white track. */
  .t-desktop-sidebar {scrollbar-width:none!important;}
  .t-desktop-sidebar::-webkit-scrollbar {display:none;}
}
@media screen and (min-width:1200px) {
  .t-desktop-content .t-menu-main:has(> .t-menu-back) .t-menu-tiles {grid-template-columns:repeat(4,minmax(0,1fr));}
}
@media screen and (min-width:1550px) {
  .t-desktop-content .t-menu-main:has(> .t-menu-back) .t-menu-tiles {grid-template-columns:repeat(5,minmax(0,1fr));}
}
@media print {
  .t-desktop-sidebar{display:none!important;}
}
