/* ==========================================================================
   Layout — app shell, page wrapper and grid system
   ========================================================================== */

/* The template is compiled by the runtime; keep its raw markup hidden until then. */
x-dc {
  display: none;
}

.app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.rel {
  position: relative;
}

.content {
  flex: 1;
  overflow-y: auto;
  padding: 24px var(--page-gutter) 56px;
}

.wrap {
  max-width: 1480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--section-gap);
}

.grid {
  display: grid;
  gap: var(--grid-gap);
}

.g2 {
  grid-template-columns: repeat(2,minmax(0,1fr));
}

.g3 {
  grid-template-columns: repeat(3,minmax(0,1fr));
}

.g4 {
  grid-template-columns: repeat(4,minmax(0,1fr));
}

.g6 {
  grid-template-columns: repeat(6,minmax(0,1fr));
}

.g21 {
  grid-template-columns: minmax(0,2fr) minmax(0,1fr);
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.spacer {
  flex: 1;
}

@media (max-width: 1200px) {
  .g4,
  .g6 {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

  .g21 {
    grid-template-columns: minmax(0,1fr);
  }
}

@media (max-width: 900px) {
  .g2,
  .g3 {
    grid-template-columns: minmax(0,1fr);
  }
}

@media (max-width: 760px) {
  .app {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .content {
    padding: 16px 16px 40px;
    overflow: visible;
  }

  .g4,
  .g6 {
    grid-template-columns: minmax(0,1fr);
  }
}
