* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body.blank-page {
  min-height: 100vh;
  background: var(--primary-color);
  color: var(--line-color);
  font-family: 'Roboto', sans-serif;

  display: grid;
  grid-template-rows: var(--header-h) 1fr;
  overflow: hidden;
}

/* HEADER */
.topbar {
  height: var(--header-h);

  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;

  width: min(calc(100vw - (var(--side-space) * 2)), 800px);
  margin: 0 auto;

  color: var(--line-color);
}

.topbar__title {
  text-align: center;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.topbar__btn {
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: var(--line-color);
  font-size: 1.4rem;
  cursor: pointer;
  border-radius: 10px;
}

.topbar__actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

/* CONTEÚDO CENTRAL */
.blank-content {
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px 16px;
}

.blank-content__inner {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.cm-theme-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
}

.cm-theme-modal.is-open {
  display: block;
}

.cm-theme-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.28);
}

.cm-theme-modal__panel {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 520px);
  max-height: 80vh;
  overflow-y: auto;

  background: var(--primary-color);
  border: 2px solid var(--line-color);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
}

.cm-theme-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.cm-theme-modal__title {
  margin: 0;
  color: var(--line-color);
  font-size: 1.1rem;
  font-weight: 700;
}

.cm-theme-modal__close {
  width: 40px;
  height: 40px;
  border: 1.5px solid var(--line-color);
  border-radius: 10px;
  background: transparent;
  color: var(--line-color);
  cursor: pointer;
  font-size: 1.1rem;
}

.cm-theme-modal__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.cm-theme-card {
  width: 100%;
  background: transparent;
  border: none;
  border-radius: 14px;
  padding: 12px;
  cursor: pointer;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.cm-theme-card__preview {
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 2px solid var(--line-color);
  border-radius: 12px;
  display: block;
}

.cm-theme-card__label {
  color: var(--line-color);
  font-size: 0.95rem;
  font-weight: 500;
}

.cm-theme-card:hover,
.cm-theme-modal__close:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* RESPONSIVO */
@media (min-width: 900px) {
  .topbar {
    height: 72px;
  }

  .topbar__title {
    font-size: 1.8rem;
  }

  .topbar__btn {
    font-size: 1.9rem;
    width: 48px;
    height: 48px;
  }
}