:root {
  --sidebar-width: 18rem;
  --bg: var(--theme-page-bg, #010304);
  --panel: var(--theme-surface, #030506);
  --panel-strong: var(--theme-surface-strong, #070a0c);
  --ink: var(--text, #f2f5f7);
  --muted: var(--canva-white-soft, #aab2ba);
  --line: var(--canva-line, rgba(242, 245, 247, 0.16));
  --accent: var(--canva-gold, #f2f5f7);
  --accent-2: var(--accent-secondary, #dfe6eb);
  --accent-3: var(--accent-strong, #ffffff);
  --shadow: 0 20px 50px rgba(31, 27, 23, 0.08);
  --radius: 24px;
  --font-body: "Segoe UI", Arial, sans-serif;
  --font-display: Georgia, "Times New Roman", serif;
}

.canva-homepage {
  isolation: isolate;
}

.canva-homepage__main {
  max-width: 1940px;
  margin: 0 auto;
  padding: 10px 18px 44px !important;
}

.canva-homepage__sidebar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 247, 255, 0.98)),
    #ffffff;
  border-right: 1px solid rgba(225, 225, 239, 0.95);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.9);
}

.canva-homepage__sidebar::before {
  top: 172px;
  width: 10px;
  height: 10px;
  border-left: 3px solid #a5a1b9;
  border-bottom: 3px solid #a5a1b9;
  transform: rotate(45deg);
  background: none;
  border-radius: 0;
  box-shadow: none;
}

.canva-homepage__sidebar::after {
  top: auto;
  bottom: 148px;
  width: 10px;
  height: 10px;
  border-right: 3px solid #a5a1b9;
  border-top: 3px solid #a5a1b9;
  transform: rotate(45deg);
  background: none;
  border-radius: 0;
  box-shadow: none;
}

.canva-sidebutton,
.canva-sidenav__item,
.canva-quickrow__item,
.canva-quickrow__next,
#homepage-see-all,
.homepage-template-card,
.canva-helpfab {
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    opacity 160ms ease;
}

.canva-sidebutton:hover,
.canva-sidebutton:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(94, 101, 148, 0.14);
}

.canva-sidebutton--menu {
  width: 44px;
  height: 44px;
  border-radius: 15px;
}

.canva-sidebutton--menu::before {
  inset: 9px;
}

.canva-sidebutton--create {
  width: 44px;
  height: 44px;
  background: linear-gradient(180deg, #a855ff 0%, #7a4df6 100%);
}

.canva-sidebutton__plus {
  font-size: 1.95rem;
  font-weight: 300;
}

.canva-sidebutton__text {
  font-size: 11.5px;
  letter-spacing: -0.01em;
}

.canva-sidenav {
  gap: 10px;
  margin-top: 20px;
}

.canva-sidenav__item {
  gap: 7px;
  color: #6f6986;
}

.canva-sidenav__item:hover,
.canva-sidenav__item:focus-visible {
  color: #5236df;
  transform: translateY(-1px);
}

.canva-sidenav__icon {
  width: 40px;
  height: 40px;
  border-radius: 15px;
}

.canva-sidenav__item:not(.canva-sidenav__item--active) .canva-sidenav__icon {
  background: linear-gradient(180deg, #ffffff 0%, #fbf8ff 100%);
  box-shadow: 0 8px 18px rgba(110, 120, 164, 0.07);
}

.canva-sidenav__item--active .canva-sidenav__icon {
  background: linear-gradient(180deg, #9652ff 0%, #7d46f6 100%);
}

.canva-sidenav__icon::before {
  inset: 10px;
}

.canva-sidenav__icon--brand::after {
  content: "";
  width: 13px;
  height: 13px;
  right: -2px;
  top: -3px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23f2b24a' d='m12 2.5 2.22 4.97 5.41.48-4.08 3.61 1.2 5.34L12 14.04 7.25 16.9l1.2-5.34-4.08-3.61 5.41-.48z'/%3E%3C/svg%3E") center/11px 11px no-repeat,
    #fff;
  font-size: 0;
}

.canva-sidebutton--bell {
  width: 44px;
  height: 44px;
  margin-bottom: 8px;
}

.canva-homepage__hero-panel {
  position: relative;
  border-radius: 30px;
  border: 1px solid rgba(234, 225, 252, 0.92);
  box-shadow:
    0 12px 28px rgba(92, 103, 150, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
  padding: 62px 34px 34px;
  overflow: hidden;
}

.canva-homepage__hero-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36);
  pointer-events: none;
}

.canva-homepage__hero-panel h2 {
  font-size: clamp(3.3rem, 4vw, 4.35rem);
  letter-spacing: -0.055em;
  line-height: 0.98;
  text-wrap: balance;
}

.canva-homepage__search {
  width: min(100%, 1000px);
  min-height: 88px;
  margin-top: 32px;
  grid-template-columns: 58px 1fr;
  padding: 0 28px;
  border-radius: 31px;
  background: rgba(255, 255, 255, 0.965);
  border: 1px solid #eddfff;
  box-shadow:
    inset 0 0 0 1px rgba(247, 241, 255, 0.95),
    0 10px 22px rgba(164, 132, 255, 0.06);
}

.canva-homepage__search:hover,
.canva-homepage__search:focus-within {
  border-color: #ddc7ff;
  box-shadow:
    inset 0 0 0 1px rgba(243, 234, 255, 0.98),
    0 14px 28px rgba(164, 132, 255, 0.11);
}

.canva-homepage__search input {
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.canva-homepage__search input::placeholder {
  color: #85889a;
}

.canva-homepage__search-icon {
  width: 27px;
  height: 27px;
}

.canva-quickrow {
  gap: 12px;
  padding: 18px 48px 12px 20px;
}

.canva-quickrow__divider {
  margin-top: 13px;
}

.canva-quickrow__item {
  flex-basis: 74px;
  gap: 10px;
  font-size: 11px;
  letter-spacing: -0.012em;
  color: #565d6f;
}

.canva-quickrow__item:hover,
.canva-quickrow__item:focus-visible {
  color: #1e2536;
  transform: translateY(-2px);
}

.canva-quickrow__icon {
  width: 56px;
  height: 56px;
  background-size: 25px 25px;
  box-shadow: 0 12px 24px rgba(87, 96, 148, 0.16);
}

.canva-quickrow__item--templates .canva-quickrow__icon,
.canva-quickrow__item--custom .canva-quickrow__icon {
  box-shadow: 0 10px 20px rgba(98, 108, 152, 0.08);
}

.canva-quickrow__item--photo .canva-quickrow__icon {
  border-radius: 18px;
}

.canva-quickrow__next {
  top: 13px;
  right: 4px;
  width: 52px;
  height: 52px;
  position: absolute;
  font-size: 0;
}

.canva-quickrow__next::before {
  content: "";
  display: block;
  width: 18px;
  height: 18px;
  margin: 0 auto;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m9 5 7 7-7 7' fill='none' stroke='%231d2435' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
}

.canva-quickrow__next:hover,
.canva-quickrow__next:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 14px 26px rgba(98, 108, 152, 0.13);
}

.canva-shelf {
  padding: 10px 18px 0;
}

.canva-shelf__header {
  margin-bottom: 20px;
}

.canva-shelf__titleblock {
  display: grid;
  gap: 6px;
}

.canva-shelf__header h3 {
  font-size: clamp(2.35rem, 3vw, 3.15rem);
  letter-spacing: -0.05em;
}

#homepage-results-summary {
  margin: 0;
  font-size: 1.02rem;
  color: #7f8191;
}

#homepage-see-all {
  padding: 6px 2px;
  border: 0;
  background: transparent;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

#homepage-see-all:hover,
#homepage-see-all:focus-visible {
  color: #5236df;
  transform: translateY(-1px);
}

#homepage-template-grid {
  gap: 16px !important;
}

.homepage-template-card {
  border-radius: 20px;
  border: 1px solid rgba(230, 230, 239, 0.9);
  box-shadow:
    0 10px 24px rgba(86, 95, 138, 0.07),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.homepage-template-card:hover,
.homepage-template-card:focus-visible {
  transform: translateY(-4px);
  box-shadow:
    0 18px 36px rgba(86, 95, 138, 0.13),
    0 1px 0 rgba(255, 255, 255, 0.92) inset;
}

.homepage-template-card__media {
  border-radius: 20px;
}

.homepage-template-card__overlay {
  background: linear-gradient(180deg, rgba(9, 12, 20, 0) 0%, rgba(9, 12, 20, 0.72) 100%);
}

.homepage-template-card__caption {
  gap: 4px;
}

.homepage-template-card__caption h4 {
  font-size: 1rem;
  letter-spacing: -0.025em;
}

.homepage-template-card__caption p {
  color: rgba(255, 255, 255, 0.88);
}

.homepage-template-card__pill {
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 20px rgba(14, 19, 28, 0.12);
}

.canva-helpfab {
  right: 24px;
  bottom: 20px;
  width: 54px;
  height: 54px;
  font-size: 1.5rem;
  background: linear-gradient(180deg, #9c4cff 0%, #7e45f6 100%);
}

.canva-helpfab:hover,
.canva-helpfab:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 22px 34px rgba(122, 73, 245, 0.34);
}

@media (max-width: 1320px) {
  .canva-homepage__main {
    padding-inline: 14px !important;
  }

  .canva-homepage__hero-panel {
    padding: 54px 22px 28px;
  }

  .canva-homepage__search {
    min-height: 80px;
  }

  .canva-quickrow {
    padding-inline: 12px 44px;
    gap: 10px;
  }

  .canva-quickrow__item {
    flex-basis: 68px;
  }
}

@media (min-width: 1180px) {
  .canva-homepage__sidebar {
    padding-bottom: 30px;
  }

  .canva-sidenav__icon--brand::after {
    content: "";
    position: absolute;
    right: -3px;
    top: -4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background:
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23f3b02d' d='M12 2.8 14.7 8l5.8.8-4.2 4.1 1 5.8-5.3-2.8-5.2 2.8 1-5.8-4.2-4.1 5.8-.8z'/%3E%3C/svg%3E") center/12px 12px no-repeat,
      #fff;
    box-shadow: 0 4px 10px rgba(86, 92, 130, 0.16);
  }

  .canva-sidebutton--bell {
    margin-bottom: 10px;
  }

  .canva-sidebutton--bell::before {
    inset: 10px;
    border: 0;
    border-radius: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 20a2.6 2.6 0 0 0 2.4-1.6M18 16H6l1.3-1.8V10a4.7 4.7 0 1 1 9.4 0v4.2Z' fill='none' stroke='%237b7f92' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
  }

  .canva-quickrow__next {
    color: transparent;
    font-size: 0;
    line-height: 0;
    text-indent: -9999px;
    overflow: hidden;
  }

  .canva-quickrow__next::before {
    content: "";
    position: absolute;
    inset: 12px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m9 5 7 7-7 7' fill='none' stroke='%231f2430' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
  }

  .canva-shelf {
    position: relative;
  }

  .canva-shelf__titleblock p {
    margin: 8px 0 0;
    font-size: 0.98rem;
    color: #6f7487;
  }

  .canva-shelf__card {
    border: 1px solid rgba(229, 231, 242, 0.9);
    transition: transform 180ms ease, box-shadow 180ms ease;
  }

  .canva-shelf__card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 32px rgba(82, 93, 130, 0.12);
  }

  .canva-shelf__card--pitch img {
    object-position: 36% center;
  }

  .canva-shelf__card--eye img,
  .canva-shelf__card--fashion img,
  .canva-shelf__card--resume img {
    object-position: center top;
  }

  .canva-shelf__card--boots img {
    object-position: center center;
  }

  .canva-shelf__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
  }

  .canva-shelf__grid .canva-shelf__card {
    aspect-ratio: auto;
    min-height: 286px;
    position: relative;
    border-radius: 22px;
    overflow: hidden;
    background: #fff;
  }

  .canva-shelf__grid .canva-shelf__card img {
    width: 100%;
    height: 100%;
    min-height: 286px;
    object-fit: cover;
    object-position: center top;
  }

  .canva-shelf__grid .canva-shelf__card::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 34%;
    background: linear-gradient(180deg, rgba(10, 16, 32, 0) 0%, rgba(10, 16, 32, 0.74) 100%);
    pointer-events: none;
  }

  .homepage-template-card {
    cursor: pointer;
  }

  .homepage-template-card__meta {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 16px;
    z-index: 1;
    display: grid;
    gap: 8px;
    color: #fff;
  }

  .homepage-template-card__eyebrow {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    opacity: 0.92;
  }

  .homepage-template-card__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #9ef0d7;
    box-shadow: 0 0 0 4px rgba(158, 240, 215, 0.18);
  }

  .homepage-template-card__title {
    margin: 0;
    font-size: 1.16rem;
    font-weight: 700;
    line-height: 1.18;
  }

  .homepage-template-card__subline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .homepage-template-card__pill {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    font-size: 0.76rem;
    font-weight: 600;
  }

  .homepage-template-card--light::after {
    height: 26%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(19, 25, 37, 0.22) 100%);
  }

  .homepage-template-card--light .homepage-template-card__meta {
    color: #1b2030;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
  }

  .homepage-template-card--light .homepage-template-card__pill {
    background: rgba(255, 255, 255, 0.76);
    border-color: rgba(201, 207, 230, 0.7);
  }

  .homepage-template-card--light .homepage-template-card__dot {
    background: #6a4dff;
    box-shadow: 0 0 0 4px rgba(106, 77, 255, 0.12);
  }

  .canva-helpfab {
    color: transparent;
    font-size: 0;
    line-height: 0;
  }

  .canva-helpfab::before {
    content: "";
    position: absolute;
    inset: 16px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9.7 9.1a2.9 2.9 0 1 1 4.9 2.1c-.9.8-1.8 1.3-1.8 2.6M12 17.8h.1' fill='none' stroke='white' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
  }
}

#homepage-template-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 18px !important;
  align-items: stretch !important;
}

#homepage-template-grid .canva-shelf__card {
  position: relative;
  min-height: 280px;
  aspect-ratio: auto !important;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(229, 231, 242, 0.9);
  background: #fff;
  box-shadow: 0 10px 24px rgba(82, 93, 130, 0.08);
}

#homepage-template-grid .canva-shelf__card img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  object-position: center top;
}

#homepage-template-grid .homepage-template-card {
  cursor: pointer;
}

#homepage-template-grid .homepage-template-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 34%;
  background: linear-gradient(180deg, rgba(10, 16, 32, 0) 0%, rgba(10, 16, 32, 0.74) 100%);
  pointer-events: none;
}

.homepage-template-card__meta {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  z-index: 1;
  display: grid;
  gap: 8px;
  color: #fff;
}

.homepage-template-card__eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  opacity: 0.92;
}

.homepage-template-card__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9ef0d7;
  box-shadow: 0 0 0 4px rgba(158, 240, 215, 0.18);
}

.homepage-template-card__title {
  margin: 0;
  font-size: 1.16rem;
  font-weight: 700;
  line-height: 1.18;
}

.homepage-template-card__subline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.homepage-template-card__pill {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  font-size: 0.76rem;
  font-weight: 600;
}

#homepage-template-grid .homepage-template-card--light::after {
  height: 26%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(19, 25, 37, 0.22) 100%);
}

#homepage-template-grid .homepage-template-card--light .homepage-template-card__meta {
  color: #1b2030;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
}

#homepage-template-grid .homepage-template-card--light .homepage-template-card__pill {
  background: rgba(255, 255, 255, 0.76);
  border-color: rgba(201, 207, 230, 0.7);
}

#homepage-template-grid .homepage-template-card--light .homepage-template-card__dot {
  background: #6a4dff;
  box-shadow: 0 0 0 4px rgba(106, 77, 255, 0.12);
}

body {
  background: #f7f7fb;
}

.app-shell {
  grid-template-columns: 1fr;
  min-height: 100vh;
  background: #f7f7fb;
}

.sidebar,
#gallery-view > :not(.canva-homepage),
.help-fab {
  display: none !important;
}

.main-content,
#gallery-view {
  padding: 0 !important;
}

.canva-homepage {
  display: grid !important;
  grid-template-columns: 84px minmax(0, 1fr);
  min-height: 100vh;
  background: #f7f7fb;
}

.canva-homepage__sidebar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 14px 6px 24px;
  background: linear-gradient(180deg, #ffffff 0%, #faf9ff 100%);
  border-right: 1px solid #ececf6;
  position: relative;
}

.canva-homepage__sidebar::before {
  content: "";
  position: absolute;
  left: 76px;
  top: 168px;
  width: 7px;
  height: 332px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0 6%, #8c8c93 6% 32%, rgba(255, 255, 255, 0) 32%);
}

.canva-homepage__sidebar::after {
  content: "";
  position: absolute;
  left: 74px;
  bottom: 118px;
  width: 10px;
  height: 10px;
  border-right: 2px solid #8d92a2;
  border-bottom: 2px solid #8d92a2;
  transform: rotate(45deg);
}

.canva-sidebutton {
  border: 0;
  background: transparent;
}

.canva-sidebutton--menu,
.canva-sidebutton--bell {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #ececf5;
  box-shadow: 0 10px 24px rgba(98, 108, 152, 0.08);
  position: relative;
}

.canva-sidebutton--menu {
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(98, 108, 152, 0.08);
}

.canva-sidebutton--menu::before {
  content: "";
  position: absolute;
  inset: 10px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%237b61ff' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='2.5' width='17' height='19' rx='4.3'/%3E%3Cpath d='M10 2.8v18.4'/%3E%3C/g%3E%3C/svg%3E") center/contain no-repeat;
}

.canva-sidebutton--create {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(180deg, #a84dff 0%, #6a4dff 100%);
  box-shadow: 0 10px 24px rgba(122, 73, 245, 0.26);
  color: #fff;
  display: grid;
  place-items: center;
  margin-top: 6px;
}

.canva-sidebutton__plus {
  font-size: 2rem;
  line-height: 1;
}

.canva-sidebutton__text {
  margin-top: -5px;
  font-size: 12px;
  font-weight: 600;
  color: #7a49f5;
}

.canva-sidenav {
  display: grid;
  gap: 8px;
  width: 100%;
  margin-top: 22px;
}

.canva-sidenav__item {
  border: 0;
  background: transparent;
  display: grid;
  justify-items: center;
  gap: 8px;
  color: #6f5aa8;
  font-size: 11px;
  font-weight: 600;
}

.canva-sidenav__icon {
  width: 36px;
  height: 36px;
  border-radius: 14px;
  position: relative;
}

.canva-sidenav__item--active {
  color: #6b45f5;
}

.canva-sidenav__item--active .canva-sidenav__icon {
  background: #8a3ffc;
  box-shadow: 0 10px 24px rgba(122, 73, 245, 0.26);
}

.canva-sidenav__icon::before {
  content: "";
  position: absolute;
  inset: 9px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.canva-sidenav__icon--home::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M4 11.2 12 4l8 7.2V20a2 2 0 0 1-2 2h-4v-6H10v6H6a2 2 0 0 1-2-2z'/%3E%3C/svg%3E");
}

.canva-sidenav__item:not(.canva-sidenav__item--active) .canva-sidenav__icon--home::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%237c49f4' d='M4 11.2 12 4l8 7.2V20a2 2 0 0 1-2 2h-4v-6H10v6H6a2 2 0 0 1-2-2z'/%3E%3C/svg%3E");
}

.canva-sidenav__icon--folder::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23767590' stroke-width='2.2' stroke-linejoin='round' d='M3.5 8.5h6l1.8-2h9.2v11.8A1.7 1.7 0 0 1 18.8 20H5.2A1.7 1.7 0 0 1 3.5 18.3z'/%3E%3C/svg%3E");
}

.canva-sidenav__icon--templates::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%237c49f4' stroke-width='2.2' stroke-linejoin='round'%3E%3Crect x='5' y='3.5' width='14' height='17' rx='4'/%3E%3Cpath d='M12 3.5v17'/%3E%3C/g%3E%3C/svg%3E");
}

.canva-sidenav__icon--shop::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%23767590' stroke-width='2.1' stroke-linejoin='round'%3E%3Cpath d='M6 9h12v9a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2z'/%3E%3Cpath d='M8 5h8v4H8z'/%3E%3Cpath d='M6 12h12'/%3E%3C/g%3E%3C/svg%3E");
}

.canva-sidenav__icon--brand::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='7.5' fill='none' stroke='%23767590' stroke-width='2.2'/%3E%3C/svg%3E");
}

.canva-sidenav__icon--brand::after {
  content: "";
  position: absolute;
  right: -3px;
  top: -4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23f3b02d' d='M12 2.8 14.7 8l5.8.8-4.2 4.1 1 5.8-5.3-2.8-5.2 2.8 1-5.8-4.2-4.1 5.8-.8z'/%3E%3C/svg%3E") center/12px 12px no-repeat, #fff;
  box-shadow: 0 4px 10px rgba(86, 92, 130, 0.16);
}

.canva-sidenav__icon--more::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='%23767590'%3E%3Ccircle cx='6' cy='12' r='2'/%3E%3Ccircle cx='12' cy='12' r='2'/%3E%3Ccircle cx='18' cy='12' r='2'/%3E%3C/g%3E%3C/svg%3E");
}

.canva-sidebutton--bell {
  margin-top: auto;
  margin-bottom: 10px;
}

.canva-sidebutton--bell::before {
  content: "";
  position: absolute;
  inset: 10px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 20a2.6 2.6 0 0 0 2.4-1.6M18 16H6l1.3-1.8V10a4.7 4.7 0 1 1 9.4 0v4.2Z' fill='none' stroke='%237b7f92' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
}

.canva-homepage__main {
  padding: 10px 14px 24px;
  position: relative;
}

.canva-homepage__hero-panel {
  border: 1px solid #ebe6fb;
  border-radius: 28px;
  background:
    radial-gradient(circle at 12% 18%, rgba(141, 240, 236, 0.9), rgba(141, 240, 236, 0) 28%),
    radial-gradient(circle at 88% 18%, rgba(198, 139, 255, 0.5), rgba(198, 139, 255, 0) 24%),
    linear-gradient(90deg, #f7fdff 0%, #eef6ff 35%, #f4efff 70%, #f3e8ff 100%);
  box-shadow: 0 10px 28px rgba(82, 93, 130, 0.08);
  padding: 54px 24px 34px;
}

.canva-homepage__hero-panel h2 {
  margin: 0;
  text-align: center;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 3.35rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: #4d41f2;
}

.canva-homepage__search {
  width: min(100%, 960px);
  min-height: 78px;
  margin: 24px auto 0;
  display: grid;
  grid-template-columns: 50px 1fr;
  align-items: center;
  gap: 4px;
  padding: 0 22px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #eadfff;
  box-shadow: inset 0 0 0 1px rgba(240, 232, 255, 0.7);
}

.canva-homepage__search input {
  border: 0;
  background: transparent;
  font-size: 1.08rem;
  color: #23283a;
  outline: none;
}

.canva-homepage__search-icon {
  width: 24px;
  height: 24px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%231f2430' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='m16 16 4.5 4.5'/%3E%3C/g%3E%3C/svg%3E") center/contain no-repeat;
}

.canva-quickrow {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 16px 44px 6px 16px;
  justify-content: space-between;
}

.canva-quickrow__divider {
  width: 1px;
  flex: 0 0 1px;
  height: 60px;
  background: #e6e6ee;
  margin-top: 12px;
}

.canva-quickrow__item,
.canva-quickrow__next {
  border: 0;
  background: transparent;
}

.canva-quickrow__item {
  min-width: 0;
  flex: 0 0 72px;
  display: grid;
  justify-items: center;
  gap: 8px;
  color: #555b69;
  font-weight: 600;
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
}

.canva-quickrow__icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 24px 24px;
  box-shadow: 0 10px 24px rgba(79, 86, 145, 0.16);
}

.canva-quickrow__item--templates .canva-quickrow__icon {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%237b4df4' stroke-width='2.4' stroke-linejoin='round'%3E%3Crect x='4.5' y='2.5' width='15' height='19' rx='4.2'/%3E%3Cpath d='M12 2.5v19'/%3E%3C/g%3E%3C/svg%3E") center/30px 30px no-repeat,
    #fff;
  border: 1px solid #ececf5;
  box-shadow: 0 10px 24px rgba(98, 108, 152, 0.08);
}

.canva-quickrow__item--magic .canva-quickrow__icon {
  border-radius: 18px;
  box-shadow: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 92 76'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop stop-color='%236e48f5'/%3E%3Cstop offset='.6' stop-color='%23a04fff'/%3E%3Cstop offset='1' stop-color='%238ce8f0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M22 49 46 13l24 36-24 14Z' fill='url(%23g)'/%3E%3Cpath d='M28 55 52 19l24 36-24 14Z' fill='url(%23g)' opacity='.72'/%3E%3Crect x='39' y='18' width='18' height='12' rx='3' fill='white' fill-opacity='.76'/%3E%3C/svg%3E") center/44px 36px no-repeat;
}

.canva-quickrow__item--print .canva-quickrow__icon { background-color: #8f31ff; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='white' stroke-width='2.2' stroke-linejoin='round'%3E%3Cpath d='M6 8h12v9a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2z'/%3E%3Cpath d='M8 5h8v3H8z'/%3E%3Cpath d='M6 11h12'/%3E%3C/g%3E%3C/svg%3E"); }
.canva-quickrow__item--presentation .canva-quickrow__icon { background-color: #ff6c0d; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='white'%3E%3Ccircle cx='12' cy='12' r='8'/%3E%3Cpath fill='%23ff7b1f' d='M11 6h2v6h5v2h-7z'/%3E%3C/g%3E%3C/svg%3E"); }
.canva-quickrow__item--social .canva-quickrow__icon { background-color: #ff3f57; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M12 20s-6-3.8-6-8.4C6 8.5 8.2 7 10.2 7c1.3 0 2.3.6 2.8 1.4C13.5 7.6 14.5 7 15.8 7 17.8 7 20 8.5 20 11.6 20 16.2 14 20 14 20z'/%3E%3C/svg%3E"); }
.canva-quickrow__item--video .canva-quickrow__icon { background-color: #d94cf4; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='white' stroke-width='2.2' stroke-linejoin='round' d='M5 7h9a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2Z'/%3E%3Cpath fill='white' d='m11 12-4 2.5v-5z'/%3E%3Cpath fill='none' stroke='white' stroke-width='2.2' d='m16 10 5-3v10l-5-3'/%3E%3C/svg%3E"); }
.canva-quickrow__item--doc .canva-quickrow__icon { background-color: #21a7bf; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='white' stroke-width='2.1' stroke-linejoin='round'%3E%3Crect x='5' y='4.5' width='14' height='15' rx='2.5'/%3E%3Cpath d='M8 8h8M8 12h8M8 16h8'/%3E%3C/g%3E%3C/svg%3E"); }
.canva-quickrow__item--whiteboard .canva-quickrow__icon { background-color: #18ab42; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 4H5a1 1 0 0 0-1 1v3M16 4h3a1 1 0 0 1 1 1v3M8 20H5a1 1 0 0 1-1-1v-3M16 20h3a1 1 0 0 0 1-1v-3' fill='none' stroke='white' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.canva-quickrow__item--sheet .canva-quickrow__icon { background-color: #2688ff; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='white' stroke-width='2.1' stroke-linejoin='round'%3E%3Crect x='4.5' y='5' width='15' height='14' rx='2.5'/%3E%3Cpath d='M8.2 5v14M15.8 5v14M4.5 10h15M4.5 14h15'/%3E%3C/g%3E%3C/svg%3E"); }
.canva-quickrow__item--code .canva-quickrow__icon { background-color: #9a20d2; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m8 7 4 5-4 5M16 7l-4 5 4 5' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.canva-quickrow__item--website .canva-quickrow__icon { background-color: #4f52f6; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='4.5' y='5.5' width='15' height='13' rx='2.8' fill='none' stroke='white' stroke-width='2.2'/%3E%3Cpath d='M7.5 9h9' stroke='white' stroke-width='2.2'/%3E%3C/svg%3E"); }
.canva-quickrow__item--email .canva-quickrow__icon { background-color: #5f46f2; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4.8 7.5h14.4a1.7 1.7 0 0 1 1.7 1.7v5.6a1.7 1.7 0 0 1-1.7 1.7H4.8A1.7 1.7 0 0 1 3.1 14.8V9.2A1.7 1.7 0 0 1 4.8 7.5Z' fill='none' stroke='white' stroke-width='2.2'/%3E%3Cpath d='m4.8 8 7.2 5.4L19.2 8' fill='none' stroke='white' stroke-width='2.2'/%3E%3C/svg%3E"); }

.canva-quickrow__item--photo .canva-quickrow__icon {
  background: linear-gradient(135deg, #f6a769, #e46993);
  border-radius: 16px;
}

/* Scrollable template library: make browsing the work comfortable, with each
   preview and its practical canvas size easy to understand at a glance. */
@media (min-width: 701px) {
  html,
  body {
    height: auto !important;
    min-height: 100%;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  .app-shell,
  .main-content,
  #gallery-view,
  .canva-homepage {
    height: auto !important;
    min-height: 100dvh !important;
    overflow: visible !important;
  }

  .canva-homepage { align-items: start !important; }

  .canva-homepage__sidebar {
    position: sticky !important;
    top: 0 !important;
    height: 100dvh !important;
  }

  body .canva-homepage__main {
    height: auto !important;
    min-height: 100dvh !important;
    grid-template-rows: 270px 62px auto !important;
    padding: 18px 30px 46px !important;
    overflow: visible !important;
  }

  body .canva-shelf {
    display: block !important;
    overflow: visible !important;
  }

  body .canva-shelf__header {
    display: flex !important;
    align-items: end !important;
    justify-content: space-between !important;
    margin: 20px 0 18px !important;
  }

  body .canva-shelf__header h3 { font-size: 1.8rem !important; }

  body #homepage-results-summary {
    display: block !important;
    margin: 6px 0 0 !important;
    color: #74717e !important;
    font-size: .88rem !important;
  }

  body #homepage-template-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-template-rows: none !important;
    grid-auto-rows: auto !important;
    width: 100% !important;
    height: auto !important;
    gap: 34px 24px !important;
    overflow: visible !important;
  }

  body #homepage-template-grid .homepage-template-card,
  body #homepage-template-grid .homepage-template-card:nth-child(n + 6),
  body #homepage-template-grid .homepage-template-card:nth-child(n + 9),
  body #homepage-template-grid .homepage-template-card:nth-child(n + 11) {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    background: transparent !important;
  }

  body #homepage-template-grid .homepage-template-card > img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 4 / 3 !important;
    border-radius: 14px !important;
    background: transparent !important;
    object-fit: contain !important;
    object-position: center !important;
  }

  body #homepage-template-grid .homepage-template-card__meta {
    display: block !important;
    min-width: 0 !important;
    padding: 10px 2px 0 !important;
    color: #202027 !important;
  }

  body #homepage-template-grid .homepage-template-card__eyebrow,
  body #homepage-template-grid .homepage-template-card__description { display: none !important; }

  body #homepage-template-grid .homepage-template-card__title {
    display: block !important;
    margin: 0 !important;
    overflow: hidden !important;
    color: #202027 !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body #homepage-template-grid .homepage-template-card__subline {
    display: block !important;
    margin: 5px 0 0 !important;
    color: #74717e !important;
    font-size: .78rem !important;
    font-weight: 600 !important;
  }
}

@media (min-width: 1200px) {
  body #homepage-template-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 38px 28px !important; }
}

/* Final independent-scroll panels. */
@media (min-width: 701px) {
  html, body { width: 100% !important; height: 100% !important; overflow: hidden !important; }
  .app-shell, .main-content, #gallery-view, .canva-homepage { width: 100% !important; height: 100dvh !important; min-height: 0 !important; overflow: hidden !important; }
  .canva-homepage { display: grid !important; grid-template-columns: 72px minmax(0, 1fr) !important; align-items: stretch !important; }
  .canva-homepage__sidebar { position: static !important; height: 100% !important; min-height: 0 !important; overflow-x: hidden !important; overflow-y: auto !important; overscroll-behavior: contain; }
  body .canva-homepage__main { display: grid !important; grid-template-columns: minmax(0, 1fr) !important; grid-template-rows: 270px 62px auto !important; width: 100% !important; height: 100% !important; min-height: 0 !important; padding: 18px 30px 46px !important; overflow-x: hidden !important; overflow-y: auto !important; overscroll-behavior: contain; }
  body .canva-shelf, body #homepage-template-grid { min-height: 0 !important; overflow: visible !important; }
}

@media (min-width: 701px) {
  body #homepage-template-grid .homepage-template-card:nth-child(n) {
    display: flex !important;
  }
}

/* Independent application panels: the browser page is fixed, while the
   navigation rail and the Templates content area can scroll on their own. */
@media (min-width: 701px) {
  html,
  body {
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
  }

  .app-shell,
  .main-content,
  #gallery-view,
  .canva-homepage {
    width: 100% !important;
    height: 100dvh !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  .canva-homepage {
    display: grid !important;
    grid-template-columns: 72px minmax(0, 1fr) !important;
    align-items: stretch !important;
  }

  .canva-homepage__sidebar {
    position: static !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
  }

  body .canva-homepage__main {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 270px 62px auto !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    padding: 18px 30px 46px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
  }

  body .canva-shelf,
  body #homepage-template-grid {
    min-height: 0 !important;
    overflow: visible !important;
  }
}

/* Artwork-only template gallery.  A template is its own preview: no coloured
   tile, border, label, or shadow should sit behind it. */
@media (min-width: 701px) {
  body #homepage-template-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    grid-template-rows: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-rows: 0 !important;
    align-items: center !important;
    gap: 22px !important;
    overflow: hidden !important;
  }

  body #homepage-template-grid .homepage-template-card,
  body #homepage-template-grid .homepage-template-card:nth-child(n + 6) {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
  }

  body #homepage-template-grid .homepage-template-card:nth-child(n + 9) {
    display: none !important;
  }

  body #homepage-template-grid .homepage-template-card > img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 14px !important;
    background: transparent !important;
    box-shadow: none !important;
    object-fit: contain !important;
    object-position: center !important;
  }

  body #homepage-template-grid .homepage-template-card__meta,
  body #homepage-template-grid .homepage-template-card::after {
    display: none !important;
  }

  body #homepage-template-grid .homepage-template-card:hover,
  body #homepage-template-grid .homepage-template-card:focus-visible {
    transform: none !important;
    border: 0 !important;
    box-shadow: none !important;
    outline: 2px solid #8b5cf6 !important;
    outline-offset: 4px !important;
  }

  html, body { width: 100% !important; height: 100% !important; overflow: hidden !important; }
  .app-shell, .main-content, #gallery-view, .canva-homepage { width: 100% !important; height: 100dvh !important; min-height: 0 !important; overflow: hidden !important; }
  .canva-homepage { display: grid !important; grid-template-columns: 72px minmax(0, 1fr) !important; align-items: stretch !important; }
  .canva-homepage__sidebar { position: static !important; top: auto !important; height: 100% !important; min-height: 0 !important; overflow-x: hidden !important; overflow-y: auto !important; overscroll-behavior: contain; }
  body .canva-homepage__main { height: 100% !important; min-height: 0 !important; grid-template-rows: 270px 62px auto !important; padding: 18px 30px 46px !important; overflow-x: hidden !important; overflow-y: auto !important; overscroll-behavior: contain; }
  body .canva-shelf { display: block !important; overflow: visible !important; }
  body .canva-shelf__header { display: flex !important; align-items: end !important; justify-content: space-between !important; margin: 20px 0 18px !important; }
  body .canva-shelf__header h3 { font-size: 1.8rem !important; }
  body #homepage-results-summary { display: block !important; margin: 6px 0 0 !important; color: #74717e !important; font-size: .88rem !important; }
  body #homepage-template-grid { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; grid-template-rows: none !important; grid-auto-rows: auto !important; width: 100% !important; height: auto !important; gap: 34px 24px !important; overflow: visible !important; }
  body #homepage-template-grid .homepage-template-card, body #homepage-template-grid .homepage-template-card:nth-child(n + 6), body #homepage-template-grid .homepage-template-card:nth-child(n + 9), body #homepage-template-grid .homepage-template-card:nth-child(n + 11) { display: flex !important; flex-direction: column !important; width: 100% !important; height: auto !important; min-height: 0 !important; overflow: visible !important; background: transparent !important; }
  body #homepage-template-grid .homepage-template-card > img { display: block !important; width: 100% !important; height: auto !important; aspect-ratio: 4 / 3 !important; border-radius: 14px !important; background: transparent !important; object-fit: contain !important; object-position: center !important; }
  body #homepage-template-grid .homepage-template-card__meta { display: block !important; min-width: 0 !important; padding: 10px 2px 0 !important; color: #202027 !important; }
  body #homepage-template-grid .homepage-template-card__eyebrow, body #homepage-template-grid .homepage-template-card__description { display: none !important; }
  body #homepage-template-grid .homepage-template-card__title { display: block !important; margin: 0 !important; overflow: hidden !important; color: #202027 !important; font-size: 1rem !important; font-weight: 700 !important; line-height: 1.25 !important; text-overflow: ellipsis !important; white-space: nowrap !important; }
  body #homepage-template-grid .homepage-template-card__subline { display: block !important; margin: 5px 0 0 !important; color: #74717e !important; font-size: .78rem !important; font-weight: 600 !important; }
  body #homepage-template-grid .homepage-template-card:nth-child(n + 9) { display: flex !important; }
}

@media (min-width: 1200px) {
  body #homepage-template-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 28px !important;
  }

  body #homepage-template-grid .homepage-template-card:nth-child(n + 9) {
    display: block !important;
  }

  body #homepage-template-grid .homepage-template-card:nth-child(n + 11) {
    display: none !important;
  }
}

/* Final scrollable-library precedence. */
@media (min-width: 701px) {
  html, body { height: auto !important; min-height: 100%; overflow-x: hidden !important; overflow-y: auto !important; }
  .app-shell, .main-content, #gallery-view, .canva-homepage { height: auto !important; min-height: 100dvh !important; overflow: visible !important; }
  .canva-homepage { align-items: start !important; }
  .canva-homepage__sidebar { position: sticky !important; top: 0 !important; height: 100dvh !important; }
  body .canva-homepage__main { height: auto !important; min-height: 100dvh !important; grid-template-rows: 270px 62px auto !important; padding: 18px 30px 46px !important; overflow: visible !important; }
  body .canva-shelf { display: block !important; overflow: visible !important; }
  body .canva-shelf__header { display: flex !important; align-items: end !important; justify-content: space-between !important; margin: 20px 0 18px !important; }
  body .canva-shelf__header h3 { font-size: 1.8rem !important; }
  body #homepage-results-summary { display: block !important; margin: 6px 0 0 !important; color: #74717e !important; font-size: .88rem !important; }
  body #homepage-template-grid { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; grid-template-rows: none !important; grid-auto-rows: auto !important; width: 100% !important; height: auto !important; gap: 34px 24px !important; overflow: visible !important; }
  body #homepage-template-grid .homepage-template-card, body #homepage-template-grid .homepage-template-card:nth-child(n + 6), body #homepage-template-grid .homepage-template-card:nth-child(n + 9), body #homepage-template-grid .homepage-template-card:nth-child(n + 11) { display: flex !important; flex-direction: column !important; width: 100% !important; height: auto !important; min-height: 0 !important; overflow: visible !important; background: transparent !important; }
  body #homepage-template-grid .homepage-template-card > img { display: block !important; width: 100% !important; height: auto !important; aspect-ratio: 4 / 3 !important; border-radius: 14px !important; background: transparent !important; object-fit: contain !important; object-position: center !important; }
  body #homepage-template-grid .homepage-template-card__meta { display: block !important; min-width: 0 !important; padding: 10px 2px 0 !important; color: #202027 !important; }
  body #homepage-template-grid .homepage-template-card__eyebrow, body #homepage-template-grid .homepage-template-card__description { display: none !important; }
  body #homepage-template-grid .homepage-template-card__title { display: block !important; margin: 0 !important; overflow: hidden !important; color: #202027 !important; font-size: 1rem !important; font-weight: 700 !important; line-height: 1.25 !important; text-overflow: ellipsis !important; white-space: nowrap !important; }
  body #homepage-template-grid .homepage-template-card__subline { display: block !important; margin: 5px 0 0 !important; color: #74717e !important; font-size: .78rem !important; font-weight: 600 !important; }
}

@media (min-width: 1200px) {
  body #homepage-template-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 38px 28px !important; }
}

/* Final independent-scroll panels. */
@media (min-width: 701px) {
  html, body { width: 100% !important; height: 100% !important; overflow: hidden !important; }
  .app-shell, .main-content, #gallery-view, .canva-homepage { width: 100% !important; height: 100dvh !important; min-height: 0 !important; overflow: hidden !important; }
  .canva-homepage { display: grid !important; grid-template-columns: 72px minmax(0, 1fr) !important; align-items: stretch !important; }
  .canva-homepage__sidebar { position: static !important; height: 100% !important; min-height: 0 !important; overflow-x: hidden !important; overflow-y: auto !important; overscroll-behavior: contain; }
  body .canva-homepage__main { display: grid !important; grid-template-columns: minmax(0, 1fr) !important; grid-template-rows: 270px 62px auto !important; width: 100% !important; height: 100% !important; min-height: 0 !important; padding: 18px 30px 46px !important; overflow-x: hidden !important; overflow-y: auto !important; overscroll-behavior: contain; }
  body .canva-shelf, body #homepage-template-grid { min-height: 0 !important; overflow: visible !important; }
}

.canva-quickrow__item--custom .canva-quickrow__icon {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 10V5h5M19 14v5h-5M10 19H5v-5M14 5h5v5' fill='none' stroke='%231f2430' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/24px 24px no-repeat, #fff;
  border: 1px solid #ececf5;
  box-shadow: 0 10px 24px rgba(98, 108, 152, 0.08);
}

.canva-quickrow__next {
  position: absolute;
  right: 0;
  top: 10px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #ececf5;
  box-shadow: 0 10px 24px rgba(98, 108, 152, 0.08);
  color: transparent;
  font-size: 0;
  line-height: 0;
  text-indent: -9999px;
  overflow: hidden;
}

.canva-quickrow__next::before {
  content: "";
  position: absolute;
  inset: 12px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m9 5 7 7-7 7' fill='none' stroke='%231f2430' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
}

.canva-shelf {
  position: relative;
  padding: 6px 18px 0;
}

.canva-shelf__header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.canva-shelf__titleblock p {
  margin: 8px 0 0;
  font-size: 0.98rem;
  color: #6f7487;
}

.canva-shelf__header h3 {
  margin: 0;
  font-size: 2.65rem;
  line-height: 1;
  font-weight: 700;
  color: #121725;
}

.canva-shelf__header button {
  border: 0;
  background: transparent;
  font-size: 17px;
  font-weight: 700;
  color: #1c2230;
}

#homepage-template-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 18px !important;
  align-items: stretch !important;
}

#homepage-template-grid .canva-shelf__card {
  position: relative;
  min-height: 280px;
  aspect-ratio: auto !important;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(229, 231, 242, 0.9);
  background: #fff;
  box-shadow: 0 10px 24px rgba(82, 93, 130, 0.08);
  cursor: pointer;
}

#homepage-template-grid .canva-shelf__card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 32px rgba(82, 93, 130, 0.12);
}

#homepage-template-grid .canva-shelf__card img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  object-position: center top;
}

#homepage-template-grid .canva-shelf__card--pitch img {
  object-position: 36% center;
}

#homepage-template-grid .canva-shelf__card--boots img {
  object-position: center center;
}

#homepage-template-grid .homepage-template-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 34%;
  background: linear-gradient(180deg, rgba(10, 16, 32, 0) 0%, rgba(10, 16, 32, 0.74) 100%);
  pointer-events: none;
}

#homepage-template-grid .homepage-template-card--light::after {
  height: 26%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(19, 25, 37, 0.22) 100%);
}

.homepage-template-card__meta {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  z-index: 1;
  display: grid;
  gap: 8px;
  color: #fff;
}

#homepage-template-grid .homepage-template-card--light .homepage-template-card__meta {
  color: #1b2030;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
}

.homepage-template-card__eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  opacity: 0.92;
}

.homepage-template-card__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9ef0d7;
  box-shadow: 0 0 0 4px rgba(158, 240, 215, 0.18);
}

#homepage-template-grid .homepage-template-card--light .homepage-template-card__dot {
  background: #6a4dff;
  box-shadow: 0 0 0 4px rgba(106, 77, 255, 0.12);
}

.homepage-template-card__title {
  margin: 0;
  font-size: 1.16rem;
  font-weight: 700;
  line-height: 1.18;
}

.homepage-template-card__subline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.homepage-template-card__pill {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  font-size: 0.76rem;
  font-weight: 600;
}

#homepage-template-grid .homepage-template-card--light .homepage-template-card__pill {
  background: rgba(255, 255, 255, 0.76);
  border-color: rgba(201, 207, 230, 0.7);
}

.canva-helpfab {
  position: fixed;
  right: 28px;
  bottom: 26px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 0;
  background: linear-gradient(180deg, #9f50ff 0%, #7a49f5 100%);
  color: transparent;
  font-size: 0;
  line-height: 0;
  box-shadow: 0 18px 32px rgba(122, 73, 245, 0.28);
}

.canva-helpfab::before {
  content: "";
  position: absolute;
  inset: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9.7 9.1a2.9 2.9 0 1 1 4.9 2.1c-.9.8-1.8 1.3-1.8 2.6M12 17.8h.1' fill='none' stroke='white' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: linear-gradient(180deg, #efe9df 0%, #f8f5ef 100%);
  color: var(--ink);
  font-family: var(--font-body);
}

body {
  min-height: 100vh;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: #f0e8dc;
  border-right: 1px solid rgba(31, 27, 23, 0.08);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar__brand {
  display: flex;
  gap: 0.85rem;
  align-items: center;
}

.sidebar__logo {
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border-radius: 1rem;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-3) 100%);
  color: #fff;
  font-weight: 700;
  font-size: 1.35rem;
}

.sidebar__eyebrow,
.eyebrow {
  margin: 0 0 0.3rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
}

.sidebar h1,
.hero h2,
.editor-header h2 {
  margin: 0;
  font-family: var(--font-display);
  line-height: 1;
}

.sidebar__nav {
  display: grid;
  gap: 0.65rem;
}

.nav-item {
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  padding: 0.95rem 1rem;
  border-radius: 1rem;
  color: var(--ink);
}

.nav-item--active,
.nav-item:hover,
.nav-item:focus-visible {
  background: rgba(255, 255, 255, 0.76);
  border-color: rgba(13, 122, 99, 0.16);
  outline: none;
}

.sidebar__status {
  margin-top: auto;
  padding: 1rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid rgba(31, 27, 23, 0.08);
  display: grid;
  gap: 0.25rem;
}

.sidebar__status span {
  color: var(--muted);
  font-size: 0.9rem;
}

.editor-status {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.main-content {
  padding: 1.5rem;
}

.view {
  display: none;
}

.view--active {
  display: block;
}

.hero,
.editor-header,
.controls-panel,
.results-bar,
.editor-layout,
.details-dialog__card {
  background: rgba(255, 253, 249, 0.88);
  border: 1px solid rgba(31, 27, 23, 0.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero {
  padding: 2rem;
  display: grid;
  gap: 1.5rem;
  background:
    radial-gradient(circle at top right, rgba(243, 156, 107, 0.18), transparent 30%),
    radial-gradient(circle at 10% 0%, rgba(13, 122, 99, 0.16), transparent 28%),
    rgba(255, 253, 249, 0.92);
}

.hero__copy {
  max-width: 52rem;
}

.hero h2 {
  font-size: clamp(2.2rem, 4vw, 4rem);
  margin-bottom: 0.8rem;
}

.hero__lede {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-chip,
.button,
.template-card__badge {
  border-radius: 999px;
  border: 1px solid rgba(31, 27, 23, 0.1);
}

.hero-chip {
  padding: 0.75rem 1rem;
  background: #fff;
}

.hero-chip.is-active,
.hero-chip:hover,
.hero-chip:focus-visible {
  background: var(--accent);
  color: #fff;
  outline: none;
}

.controls-panel {
  margin-top: 1.25rem;
  padding: 1.2rem;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
}

.controls-panel label,
.inspector-form label {
  display: grid;
  gap: 0.45rem;
  font-size: 0.92rem;
}

.controls-panel span,
.inspector-form span {
  color: var(--muted);
}

.controls-panel input,
.controls-panel select,
.inspector-form input,
.inspector-form textarea {
  border: 1px solid var(--line);
  border-radius: 0.95rem;
  background: #fff;
  padding: 0.85rem 0.95rem;
  color: var(--ink);
}

.controls-panel input:focus,
.controls-panel select:focus,
.button:focus-visible,
.template-card__preview:focus-visible,
.template-card__details:focus-visible,
.template-card__use:focus-visible,
.category-browser__button:focus-visible,
.page-item:focus-visible,
.recent-item:focus-visible,
.inspector-form input:focus,
.inspector-form textarea:focus,
.nav-item:focus-visible {
  outline: 3px solid rgba(13, 122, 99, 0.18);
  outline-offset: 2px;
}

.search-field {
  grid-column: span 2;
}

.results-bar {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.results-bar p {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

.button {
  background: var(--accent);
  color: #fff;
  border: 0;
  padding: 0.75rem 1rem;
}

.button--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid rgba(31, 27, 23, 0.1);
}

.gallery-layout {
  margin-top: 1.25rem;
  display: grid;
  grid-template-columns: 18rem minmax(0, 1fr);
  gap: 1.25rem;
}

.category-browser,
.editor-panel,
.canvas-stage,
.template-card,
.state-banner {
  background: rgba(255, 253, 249, 0.88);
  border: 1px solid rgba(31, 27, 23, 0.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.category-browser {
  padding: 1.25rem;
  align-self: start;
  position: sticky;
  top: 1.5rem;
}

.category-browser h3,
.panel-header h3 {
  margin: 0 0 0.9rem;
  font-size: 1rem;
}

.category-browser__list,
.page-list,
.recent-list {
  display: grid;
  gap: 0.55rem;
}

.category-browser__button,
.page-item,
.recent-item {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(31, 27, 23, 0.08);
  border-radius: 1rem;
  padding: 0.85rem 0.95rem;
  background: #fff;
  color: var(--ink);
}

.category-browser__button.is-active,
.page-item.is-active,
.recent-item:hover {
  border-color: rgba(13, 122, 99, 0.35);
  background: rgba(13, 122, 99, 0.08);
}

.recent-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.6rem;
  align-items: stretch;
}

.recent-remove,
.recent-empty {
  border-radius: 1rem;
}

.recent-remove {
  border: 1px solid rgba(31, 27, 23, 0.08);
  padding: 0.85rem 0.9rem;
  background: rgba(31, 27, 23, 0.04);
  color: var(--ink);
  font: inherit;
}

.recent-remove:hover,
.recent-remove:focus-visible {
  border-color: rgba(166, 61, 43, 0.35);
  background: rgba(166, 61, 43, 0.1);
}

.recent-empty {
  border: 1px dashed rgba(31, 27, 23, 0.12);
  padding: 0.9rem 1rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
}

.template-area {
  min-width: 0;
}

.state-banner {
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  gap: 1rem;
}

.template-card {
  overflow: hidden;
}

.template-card__preview {
  width: 100%;
  padding: 0;
  border: 0;
  background: #e9ece8;
  aspect-ratio: 4 / 3;
  display: block;
}

.template-card__preview img,
#details-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.template-card__body {
  padding: 1rem;
  display: grid;
  gap: 0.7rem;
}

.template-card__topline,
.template-card__meta,
.template-card__actions,
.details-actions,
.panel-header,
.canvas-toolbar,
.editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.template-card__badge {
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  background: rgba(13, 122, 99, 0.1);
  color: var(--accent);
}

.template-card h3,
#details-title {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.3;
}

.template-card__description,
#details-description {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.template-card__meta {
  flex-wrap: wrap;
  justify-content: flex-start;
}

.meta-pill {
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  background: rgba(36, 76, 99, 0.08);
  color: var(--accent-3);
  font-size: 0.78rem;
}

.grid-actions {
  display: flex;
  justify-content: center;
  margin: 1.25rem 0 2rem;
}

.editor-header {
  padding: 1.25rem 1.5rem;
}

.editor-layout {
  margin-top: 1.25rem;
  padding: 1.25rem;
  display: grid;
  grid-template-columns: 18rem minmax(0, 1fr) 20rem;
  gap: 1rem;
}

.editor-panel {
  padding: 1rem;
  min-height: 70vh;
}

.editor-canvas-shell {
  min-width: 0;
  display: grid;
  gap: 1rem;
}

.canvas-toolbar {
  padding: 0.8rem 1rem;
  border: 1px solid rgba(31, 27, 23, 0.08);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.78);
}

.canvas-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.canvas-stage {
  min-height: 70vh;
  display: grid;
  place-items: center;
  padding: 1rem;
  overflow: auto;
}

.artboard {
  position: relative;
  background: #fff;
  border-radius: 1rem;
  border: 1px solid rgba(31, 27, 23, 0.1);
  box-shadow: 0 30px 60px rgba(31, 27, 23, 0.16);
  transform-origin: top left;
}

.artboard-element {
  position: absolute;
  border: 1px solid transparent;
}

.artboard-element.is-selected {
  border-color: #0d7a63;
  box-shadow: 0 0 0 3px rgba(13, 122, 99, 0.18);
}

.artboard-element.is-locked {
  box-shadow: inset 0 0 0 2px rgba(31, 27, 23, 0.18);
}

.artboard-element--text {
  display: flex;
  align-items: flex-start;
  white-space: pre-wrap;
  overflow: hidden;
}

.artboard-element--shape,
.artboard-element--image-frame,
.artboard-element--video-frame {
  overflow: hidden;
}

.artboard-element--image-frame {
  background-size: cover;
  background-position: center;
}

.artboard-element__label {
  position: absolute;
  bottom: 0.45rem;
  left: 0.55rem;
  font-size: 0.75rem;
  color: rgba(0, 0, 0, 0.65);
}

.artboard-element__label--floating {
  top: -1.35rem;
  bottom: auto;
  left: 0;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
}

.chart-card,
.table-card {
  width: 100%;
  height: 100%;
  padding: 0.75rem;
  display: grid;
  gap: 0.55rem;
  text-align: left;
}

.chart-card__title {
  font-size: 0.82rem;
}

.chart-card__bars {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 0.4rem;
  height: 100%;
}

.chart-card__bar-wrap {
  flex: 1;
  display: grid;
  align-items: end;
  gap: 0.35rem;
  height: 100%;
}

.chart-card__bar-wrap span,
.table-card__row span {
  font-size: 0.72rem;
  color: var(--muted);
}

.chart-card__bar {
  width: 100%;
  border-radius: 0.6rem 0.6rem 0.2rem 0.2rem;
}

.table-card__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  padding: 0.3rem 0;
  border-bottom: 1px solid rgba(31, 27, 23, 0.08);
}

.table-card__row--head span {
  font-weight: 700;
  color: var(--ink);
}

.inspector-empty {
  color: var(--muted);
  line-height: 1.6;
}

.inspector-form {
  display: grid;
  gap: 0.9rem;
}

.details-dialog {
  border: 0;
  padding: 0;
  background: transparent;
}

.details-dialog::backdrop {
  background: rgba(31, 27, 23, 0.5);
}

.details-dialog__card {
  width: min(64rem, calc(100vw - 3rem));
  padding: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(20rem, 1fr);
  position: relative;
}

.details-dialog__copy {
  padding: 1.5rem;
}

.details-meta {
  margin: 1rem 0 0;
  padding-left: 1rem;
  color: var(--muted);
  display: grid;
  gap: 0.55rem;
}

.dialog-close {
  position: absolute;
  right: 1rem;
  top: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.92);
  font-size: 1.25rem;
}

.toast-region {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  display: grid;
  gap: 0.75rem;
  z-index: 30;
}

.toast {
  min-width: 16rem;
  max-width: 24rem;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  background: rgba(31, 27, 23, 0.92);
  color: #fff;
  box-shadow: 0 18px 32px rgba(31, 27, 23, 0.22);
}

.toast--success {
  background: rgba(13, 122, 99, 0.96);
}

.toast--error {
  background: rgba(160, 52, 52, 0.96);
}

[hidden] {
  display: none !important;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .controls-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-layout,
  .editor-layout,
  .details-dialog__card {
    grid-template-columns: 1fr;
  }

  .category-browser {
    position: static;
  }
}

@media (max-width: 720px) {
  .main-content {
    padding: 1rem;
  }

  .controls-panel,
  .editor-header,
  .editor-layout {
    padding: 1rem;
  }

  .controls-panel {
    grid-template-columns: 1fr;
  }

  .search-field {
    grid-column: span 1;
  }

  .results-bar,
  .template-card__topline,
  .template-card__actions,
  .editor-header,
  .canvas-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Canva-style home override */
:root {
  --sidebar-width: 96px;
  --bg: #f7f7fb;
  --panel: #ffffff;
  --panel-strong: #ffffff;
  --ink: #1e1f25;
  --muted: #6e7484;
  --line: #e7e8f2;
  --accent: #7b3ff2;
  --accent-2: #56ccf2;
  --accent-3: #5b3df5;
  --shadow: 0 10px 28px rgba(82, 93, 130, 0.08);
  --radius: 26px;
  --font-body: "Segoe UI", Arial, sans-serif;
  --font-display: "Segoe UI", Arial, sans-serif;
}

html,
body {
  background: #f7f7fb;
}

body {
  color: var(--ink);
}

.app-shell {
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  background: #f7f7fb;
}

.sidebar {
  background: linear-gradient(180deg, #ffffff 0%, #faf9ff 100%);
  border-right: 1px solid #ececf6;
  padding: 16px 10px 18px;
  align-items: center;
  gap: 14px;
}

.sidebar__brand {
  width: 100%;
  justify-content: center;
  margin-bottom: 4px;
}

.sidebar__brand > div:last-child {
  display: none;
}

.sidebar__logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #fff;
  color: transparent;
  border: 1px solid #ececf5;
  box-shadow: 0 8px 20px rgba(98, 108, 152, 0.1);
  font-size: 1rem;
  position: relative;
}

.sidebar__logo::before {
  content: "";
  position: absolute;
  inset: 7px 9px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%237b61ff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4.5' y='2.5' width='15' height='19' rx='4.5'/%3E%3Cpath d='M12 4.5v15'/%3E%3C/g%3E%3C/svg%3E") center/contain no-repeat;
}

.create-button {
  border: 0;
  background: transparent;
  display: grid;
  justify-items: center;
  gap: 10px;
  color: #7a49f5;
  padding: 6px 0 12px;
}

.create-button__icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(180deg, #8c48ff 0%, #7a49f5 100%);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(122, 73, 245, 0.26);
}

.create-button__label {
  font-size: 13px;
  font-weight: 600;
}

.sidebar::before {
  content: "";
  position: absolute;
  left: 90px;
  top: 216px;
  width: 13px;
  height: 118px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0) 0 12%, #8b8b8f 12% 74%, rgba(255, 255, 255, 0) 74%);
}

.sidebar::after {
  content: "";
  position: absolute;
  left: 94px;
  bottom: 156px;
  width: 10px;
  height: 10px;
  border-right: 2px solid #8d92a2;
  border-bottom: 2px solid #8d92a2;
  transform: rotate(45deg);
}

.sidebar__nav {
  width: 100%;
  gap: 6px;
}

.nav-item[data-view-target="editor"] {
  display: none;
}

.nav-item {
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 10px 0;
  border-radius: 18px;
  color: #6f5aa8;
}

.nav-item--muted {
  color: #7b7f92;
}

.nav-item__icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: transparent;
  font-size: 0;
  position: relative;
}

.nav-item__icon::before {
  content: "";
  display: block;
  width: 20px;
  height: 20px;
  box-sizing: border-box;
  color: currentColor;
}

.nav-item:nth-child(1) .nav-item__icon::before {
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 5px;
  clip-path: polygon(50% 0, 100% 38%, 100% 100%, 0 100%, 0 38%);
}

.nav-item:nth-child(2) .nav-item__icon::before {
  width: 22px;
  height: 16px;
  border: 2px solid currentColor;
  border-radius: 4px;
  clip-path: polygon(0 18%, 28% 18%, 34% 0, 100% 0, 100% 100%, 0 100%);
}

.nav-item:nth-child(3) .nav-item__icon::before {
  width: 18px;
  height: 22px;
  border: 2px solid currentColor;
  border-radius: 5px;
  background: linear-gradient(currentColor, currentColor) center/2px 18px no-repeat;
}

.nav-item:nth-child(4) .nav-item__icon::before {
  width: 20px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 5px;
  background:
    linear-gradient(currentColor, currentColor) 50% 26%/14px 2px no-repeat,
    linear-gradient(currentColor, currentColor) 50% 50%/14px 2px no-repeat,
    linear-gradient(currentColor, currentColor) 50% 74%/14px 2px no-repeat;
}

.nav-item:nth-child(5) .nav-item__icon::before {
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.nav-item:nth-child(6) .nav-item__icon::before {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: -7px 0 0 currentColor, 7px 0 0 currentColor;
}

.nav-item:nth-child(5) .nav-item__icon::after {
  content: "★";
  position: absolute;
  right: -4px;
  top: -4px;
  width: 14px;
  height: 14px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: #f5b129;
  font-size: 9px;
  box-shadow: 0 4px 10px rgba(86, 92, 130, 0.16);
}

.nav-item__label {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.15;
  text-align: center;
}

.nav-item--active,
.nav-item:hover,
.nav-item:focus-visible {
  background: transparent;
  border-color: transparent;
  color: #6b45f5;
}

.nav-item--active .nav-item__icon,
.nav-item:hover .nav-item__icon,
.nav-item:focus-visible .nav-item__icon {
  background: rgba(126, 87, 255, 0.14);
  color: #7c49f4;
}

.nav-item:first-child.nav-item--active .nav-item__icon {
  background: #8a3ffc;
  color: #fff;
  box-shadow: 0 10px 24px rgba(122, 73, 245, 0.26);
}

.nav-item:first-child.nav-item--active .nav-item__icon::before {
  width: 18px;
  height: 18px;
  border: 0;
  background:
    linear-gradient(#fff, #fff) 50% 72%/10px 3px no-repeat,
    linear-gradient(45deg, transparent 50%, #fff 50%) 23% 42%/10px 10px no-repeat,
    linear-gradient(-45deg, transparent 50%, #fff 50%) 77% 42%/10px 10px no-repeat,
    linear-gradient(#fff, #fff) 50% 56%/14px 10px no-repeat;
}

.nav-item:first-child.nav-item--active {
  color: #6b45f5;
}

.sidebar__status {
  display: none;
}

.sidebar__footer {
  margin-top: auto;
  display: grid;
  justify-items: center;
  gap: 14px;
  padding-top: 12px;
}

.sidebar__utility,
.sidebar__avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 0;
}

.sidebar__utility {
  background: #fff;
  color: transparent;
  box-shadow: 0 10px 24px rgba(98, 108, 152, 0.08);
  position: relative;
}

.sidebar__utility::before {
  content: "";
  width: 18px;
  height: 18px;
  display: block;
  margin: 11px auto 0;
  border: 2px solid #7b7f92;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  box-sizing: border-box;
}

.sidebar__avatar {
  background: #90a9b9;
  color: #fff;
  font-weight: 700;
}

.main-content {
  padding: 8px 12px 24px;
}

.gallery-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.workspace-button,
.trial-pill,
.see-all-button {
  border: 1px solid #e5e5f3;
  background: #fff;
  box-shadow: var(--shadow);
}

.workspace-button {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  color: transparent;
  font-size: 0;
  position: relative;
}

.workspace-button::before {
  content: "";
  position: absolute;
  inset: 10px 12px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%237b61ff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4.5' y='2.5' width='15' height='19' rx='4.5'/%3E%3Cpath d='M12 4.5v15'/%3E%3C/g%3E%3C/svg%3E") center/contain no-repeat;
}

.trial-pill {
  padding: 14px 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  color: #1e2230;
}

.trial-pill::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  vertical-align: -2px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23f2aa44' d='M4 18h16v2H4zm1-11 3 3 4-6 4 6 3-3 1 9H4z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.discovery-hero {
  border: 1px solid #ebe6fb;
  border-radius: 28px;
  box-shadow: var(--shadow);
  background:
    radial-gradient(circle at 12% 18%, rgba(141, 240, 236, 0.9), rgba(141, 240, 236, 0) 28%),
    radial-gradient(circle at 88% 18%, rgba(198, 139, 255, 0.5), rgba(198, 139, 255, 0) 24%),
    linear-gradient(90deg, #f7fdff 0%, #eef6ff 35%, #f4efff 70%, #f3e8ff 100%);
  padding: 38px 26px 28px;
}

.discovery-hero__inner {
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  gap: 16px;
  justify-items: center;
}

.discovery-hero h2 {
  margin: 8px 0 0;
  font-size: clamp(2.6rem, 4.4vw, 3.7rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  color: #4d41f2;
  line-height: 1.08;
  text-align: center;
}

.search-hero-field {
  width: min(100%, 880px);
  min-height: 72px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 4px;
  padding: 0 28px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #eadfff;
  box-shadow: inset 0 0 0 1px rgba(240, 232, 255, 0.7);
}

.search-hero-field__icon {
  font-size: 0;
  color: transparent;
  position: relative;
}

.search-hero-field__icon::before {
  content: "";
  display: block;
  width: 24px;
  height: 24px;
  margin-left: 2px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%231f2430' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='m16 16 4.5 4.5'/%3E%3C/g%3E%3C/svg%3E") center/contain no-repeat;
}

.search-hero-field__icon::after {
  display: none;
}

.search-hero-field input {
  border: 0;
  background: transparent;
  padding: 0;
  font-size: 1.08rem;
  color: #23283a;
}

.search-hero-field input:focus {
  outline: none;
}

.shortcut-strip {
  display: flex;
  gap: 8px;
  overflow: visible;
  justify-content: flex-start;
  padding: 8px 88px 0 18px;
  margin-top: 0;
  position: relative;
  z-index: 2;
}

.shortcut-strip::before {
  content: "";
  position: absolute;
  left: 144px;
  top: 12px;
  width: 1px;
  height: 58px;
  background: #e6e6ee;
}

.shortcut-strip::after {
  content: "›";
  position: absolute;
  right: 10px;
  top: 8px;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid #ececf5;
  box-shadow: 0 10px 24px rgba(98, 108, 152, 0.08);
  background: #fff;
  color: #1f2430;
  font-size: 34px;
  line-height: 1;
}

.shortcut-strip::-webkit-scrollbar,
.category-browser__list::-webkit-scrollbar {
  height: 8px;
}

.shortcut-strip::-webkit-scrollbar-thumb,
.category-browser__list::-webkit-scrollbar-thumb {
  background: rgba(134, 138, 159, 0.3);
  border-radius: 999px;
}

.hero-chip.shortcut-chip {
  min-width: 68px;
  padding: 2px 2px 10px;
  border: 0;
  background: transparent;
  display: grid;
  justify-items: center;
  gap: 8px;
  box-shadow: none;
  color: #515868;
}

.shortcut-chip__icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: transparent;
  font-weight: 700;
  font-size: 0;
  box-shadow: 0 10px 24px rgba(79, 86, 145, 0.16);
  position: relative;
}

.shortcut-chip__icon::before,
.shortcut-chip__icon::after {
  content: "";
  display: block;
  position: absolute;
  box-sizing: border-box;
}

.shortcut-chip__label {
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  line-height: 1.25;
}

.hero-chip.shortcut-chip:first-child {
  min-width: 92px;
}

.hero-chip.shortcut-chip:first-child .shortcut-chip__icon {
  background: #fff;
  border: 1px solid #ececf5;
  box-shadow: 0 10px 24px rgba(98, 108, 152, 0.08);
}

.hero-chip.shortcut-chip:first-child .shortcut-chip__icon::before {
  inset: 13px 15px;
  border: 3px solid #7b4df4;
  border-radius: 7px;
  background: linear-gradient(#7b4df4, #7b4df4) center/3px 20px no-repeat;
}

.hero-chip.shortcut-chip:nth-child(2) {
  min-width: 88px;
}

.hero-chip.shortcut-chip:nth-child(2) .shortcut-chip__icon {
  background: transparent;
  border-radius: 18px;
  box-shadow: none;
}

.hero-chip.shortcut-chip:nth-child(2) .shortcut-chip__icon::before {
  left: 4px;
  top: 9px;
  width: 46px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, #6e48f5 0%, #a04fff 55%, #8ce8f0 100%);
  transform: perspective(64px) rotateX(55deg) rotateZ(-16deg);
  box-shadow: 0 10px 18px rgba(104, 73, 245, 0.22);
}

.hero-chip.shortcut-chip:nth-child(2) .shortcut-chip__icon::after {
  right: 10px;
  top: 9px;
  width: 18px;
  height: 14px;
  border-radius: 4px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.25)),
    #6137f0;
  box-shadow: -7px 9px 0 rgba(255, 255, 255, 0.25);
}

.shortcut-chip__icon--templates { background: linear-gradient(135deg, #7b4df4, #994cff); }
.shortcut-chip__icon--magic { background: linear-gradient(135deg, #8f73ff, #6b45f5); }
.shortcut-chip__icon--print { background: linear-gradient(135deg, #ff8a21, #ff5b00); }
.shortcut-chip__icon--presentation { background: linear-gradient(135deg, #ff7b1f, #ff5400); }
.shortcut-chip__icon--social { background: linear-gradient(135deg, #ff5a72, #ff2f5d); }
.shortcut-chip__icon--video { background: linear-gradient(135deg, #ec67ff, #ca45f4); }
.shortcut-chip__icon--doc { background: linear-gradient(135deg, #21b0d0, #1f8ab9); }
.shortcut-chip__icon--whiteboard { background: linear-gradient(135deg, #21b648, #0f9445); }
.shortcut-chip__icon--sheet { background: linear-gradient(135deg, #2a8cff, #3478f6); }
.shortcut-chip__icon--code { background: linear-gradient(135deg, #a025d7, #7d1bbd); }
.shortcut-chip__icon--website { background: linear-gradient(135deg, #5561ff, #4f43f3); }
.shortcut-chip__icon--email { background: linear-gradient(135deg, #6d48ff, #5542f3); }
.shortcut-chip__icon--photo { background: linear-gradient(135deg, #8aa0b5, #6c8ea6); }
.shortcut-chip__icon--custom { background: linear-gradient(135deg, #f0f2f6, #dfe4ef); color: #222a36; }

.hero-chip.shortcut-chip:nth-child(13) .shortcut-chip__icon {
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(122, 159, 177, 0.65), rgba(108, 142, 166, 0.45)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 80'%3E%3Crect width='80' height='80' rx='16' fill='%2388a0b5'/%3E%3Ccircle cx='58' cy='18' r='12' fill='%23f0d8a3'/%3E%3Crect x='12' y='18' width='56' height='46' rx='10' fill='%236a8496'/%3E%3Ccircle cx='30' cy='36' r='10' fill='%23cfe4ef'/%3E%3Cpath d='M20 56 L36 42 L46 50 L60 34 L68 56Z' fill='%23dd9d72'/%3E%3C/svg%3E") center/cover no-repeat;
}

.hero-chip.shortcut-chip:nth-child(13) .shortcut-chip__icon::before,
.hero-chip.shortcut-chip:nth-child(13) .shortcut-chip__icon::after {
  display: none;
}

.hero-chip.shortcut-chip:nth-child(14) .shortcut-chip__icon {
  background: #fff;
  border: 1px solid #ececf5;
  box-shadow: 0 10px 24px rgba(98, 108, 152, 0.08);
}

.hero-chip.shortcut-chip:nth-child(14) .shortcut-chip__icon::before {
  left: 14px;
  top: 14px;
  width: 14px;
  height: 14px;
  border-top: 3px solid #1f2430;
  border-left: 3px solid #1f2430;
}

.hero-chip.shortcut-chip:nth-child(14) .shortcut-chip__icon::after {
  right: 14px;
  bottom: 14px;
  width: 14px;
  height: 14px;
  border-right: 3px solid #1f2430;
  border-bottom: 3px solid #1f2430;
}

.hero-chip.shortcut-chip:nth-child(3) .shortcut-chip__icon::before,
.hero-chip.shortcut-chip:nth-child(4) .shortcut-chip__icon::before,
.hero-chip.shortcut-chip:nth-child(5) .shortcut-chip__icon::before,
.hero-chip.shortcut-chip:nth-child(6) .shortcut-chip__icon::before,
.hero-chip.shortcut-chip:nth-child(7) .shortcut-chip__icon::before,
.hero-chip.shortcut-chip:nth-child(8) .shortcut-chip__icon::before,
.hero-chip.shortcut-chip:nth-child(9) .shortcut-chip__icon::before,
.hero-chip.shortcut-chip:nth-child(10) .shortcut-chip__icon::before,
.hero-chip.shortcut-chip:nth-child(11) .shortcut-chip__icon::before,
.hero-chip.shortcut-chip:nth-child(12) .shortcut-chip__icon::before,
.hero-chip.shortcut-chip:nth-child(13) .shortcut-chip__icon::before {
  left: 15px;
  top: 15px;
  width: 24px;
  height: 24px;
}

.hero-chip.shortcut-chip:nth-child(3) .shortcut-chip__icon::before {
  border: 3px solid #fff;
  border-bottom-width: 5px;
  border-radius: 6px 6px 10px 10px;
  background:
    linear-gradient(#fff, #fff) 50% 28%/16px 3px no-repeat,
    linear-gradient(#fff, #fff) 50% 58%/16px 3px no-repeat;
}

.hero-chip.shortcut-chip:nth-child(4) .shortcut-chip__icon::before {
  border: 3px solid #fff;
  border-radius: 50%;
  background:
    linear-gradient(#fff, #fff) 50% 26%/6px 6px no-repeat,
    linear-gradient(#fff, #fff) 50% 58%/14px 3px no-repeat,
    linear-gradient(#fff, #fff) 50% 76%/10px 3px no-repeat;
}

.hero-chip.shortcut-chip:nth-child(5) .shortcut-chip__icon::before {
  border: 3px solid #fff;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 46%, #fff 0 3px, transparent 4px),
    linear-gradient(#fff, #fff) 50% 74%/10px 3px no-repeat;
}

.hero-chip.shortcut-chip:nth-child(6) .shortcut-chip__icon::before {
  border: 3px solid #fff;
  border-radius: 8px;
  background: linear-gradient(135deg, transparent 40%, #fff 40% 100%) center/16px 14px no-repeat;
}

.hero-chip.shortcut-chip:nth-child(7) .shortcut-chip__icon::before {
  border: 3px solid #fff;
  border-radius: 6px;
  background:
    linear-gradient(#fff, #fff) 50% 28%/14px 3px no-repeat,
    linear-gradient(#fff, #fff) 50% 52%/14px 3px no-repeat,
    linear-gradient(#fff, #fff) 50% 76%/14px 3px no-repeat;
}

.hero-chip.shortcut-chip:nth-child(8) .shortcut-chip__icon::before {
  border: 3px solid #fff;
  border-radius: 8px;
  background:
    linear-gradient(#fff, #fff) 28% 50%/3px 14px no-repeat,
    linear-gradient(#fff, #fff) 72% 50%/3px 14px no-repeat;
}

.hero-chip.shortcut-chip:nth-child(9) .shortcut-chip__icon::before {
  border: 3px solid #fff;
  border-radius: 5px;
  background:
    linear-gradient(#fff, #fff) 50% 34%/16px 3px no-repeat,
    linear-gradient(#fff, #fff) 50% 50%/16px 3px no-repeat,
    linear-gradient(#fff, #fff) 50% 66%/16px 3px no-repeat,
    linear-gradient(#fff, #fff) 32% 50%/3px 16px no-repeat,
    linear-gradient(#fff, #fff) 68% 50%/3px 16px no-repeat;
}

.hero-chip.shortcut-chip:nth-child(10) .shortcut-chip__icon::before {
  border-radius: 50%;
  background:
    linear-gradient(#fff, #fff) 50% 28%/3px 18px no-repeat,
    linear-gradient(#fff, #fff) 28% 50%/18px 3px no-repeat,
    linear-gradient(45deg, transparent 42%, #fff 42% 58%, transparent 58%) center/18px 18px no-repeat;
}

.hero-chip.shortcut-chip:nth-child(11) .shortcut-chip__icon::before {
  border: 3px solid #fff;
  border-radius: 6px;
  background: linear-gradient(#fff, #fff) 50% 24%/14px 3px no-repeat;
}

.hero-chip.shortcut-chip:nth-child(12) .shortcut-chip__icon::before {
  left: 13px;
  top: 17px;
  width: 28px;
  height: 18px;
  border: 3px solid #fff;
  border-radius: 4px;
  background: linear-gradient(45deg, transparent 46%, #fff 46% 54%, transparent 54%) center/18px 12px no-repeat;
}

.hero-chip.shortcut-chip.is-active {
  color: #282f3a;
}

.hero-chip.shortcut-chip.is-active .shortcut-chip__icon {
  transform: translateY(-1px) scale(1.02);
}

.templates-home {
  margin-top: 0;
  padding: 0 12px 0;
}

.templates-home__header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-end;
  margin: 4px 0 12px;
}

.templates-home__header h3 {
  margin: 0 0 8px;
  font-size: 1.95rem;
  line-height: 1.05;
  font-weight: 700;
}

.templates-home__header strong,
.templates-home__header p {
  display: none;
}

.see-all-button {
  padding: 10px 18px;
  border-radius: 999px;
  color: #1c2230;
  font-weight: 700;
}

.filters-drawer {
  display: none;
}

.category-browser {
  display: none;
}

.template-area {
  min-width: 0;
}

.state-banner {
  border-radius: 20px;
  background: #fff;
  border: 1px solid #ececf5;
}

.template-grid.template-grid--canva {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.template-card {
  border-radius: 22px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.template-card__preview {
  aspect-ratio: 0.78 / 1;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #ececf4;
  box-shadow: 0 12px 28px rgba(77, 84, 125, 0.08);
  background: #f0f0f5;
}

.template-card__preview img {
  object-fit: cover;
  transition: transform 180ms ease;
}

.template-card:hover .template-card__preview img {
  transform: scale(1.015);
}

.template-card__body {
  display: none;
}

.template-card:first-child {
  grid-column: span 2;
}

.template-card:first-child .template-card__preview {
  aspect-ratio: 1.72 / 1;
}

.template-card:nth-child(2) .template-card__preview,
.template-card:nth-child(3) .template-card__preview,
.template-card:nth-child(4) .template-card__preview,
.template-card:nth-child(5) .template-card__preview {
  aspect-ratio: 0.72 / 1;
}

.grid-actions {
  display: none;
}

.filters-drawer {
  margin-top: 18px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid #ececf5;
  box-shadow: 0 8px 24px rgba(82, 93, 130, 0.05);
}

.filters-drawer summary {
  list-style: none;
  padding: 16px 18px;
  font-weight: 700;
  color: #41485b;
  cursor: pointer;
}

.filters-drawer summary::-webkit-details-marker {
  display: none;
}

.controls-panel {
  margin-top: 0;
  border: 0;
  border-top: 1px solid #ececf5;
  border-radius: 0 0 22px 22px;
  box-shadow: none;
  background: #fff;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.search-field--hidden {
  display: none !important;
}

.editor-header,
.editor-layout,
.details-dialog__card {
  border-color: #ececf5;
  box-shadow: var(--shadow);
}

.details-dialog {
  background: transparent;
}

/* Template detail workspace */
.details-dialog { max-width: none; max-height: none; }
.details-dialog::backdrop { background: rgba(20, 22, 35, 0.58); backdrop-filter: blur(7px); }
.details-workspace.details-dialog__card {
  width: min(1160px, calc(100vw - 40px));
  max-height: min(860px, calc(100vh - 40px));
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(355px, .92fr);
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid rgba(28, 27, 43, .1);
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 32px 90px rgba(17, 17, 30, .28);
}
.dialog-close { z-index: 4; right: 18px; top: 18px; color: #242333; box-shadow: 0 4px 14px rgba(23, 23, 38, .12); }
.details-workspace__preview { min-height: 0; padding: 40px 34px 26px; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 16px; background: linear-gradient(145deg, #f5f4fa, #e8ebf5); }
.details-preview-stage { min-height: 360px; position: relative; display: grid; place-items: center; overflow: hidden; border-radius: 20px; background: #fff; box-shadow: 0 18px 36px rgba(47, 48, 75, .14); }
.details-preview-stage img { width: 100%; height: 100%; object-fit: contain; display: block; }
.details-preview-count { position: absolute; right: 14px; bottom: 14px; padding: 7px 10px; border-radius: 999px; background: rgba(25, 24, 40, .78); color: #fff; font-size: .76rem; font-weight: 700; }
.details-thumbnails { display: flex; gap: 10px; overflow-x: auto; padding: 2px; }
.details-thumbnail { position: relative; flex: 0 0 72px; height: 58px; padding: 0; overflow: hidden; border: 2px solid transparent; border-radius: 12px; background: #fff; cursor: pointer; }
.details-thumbnail img { width: 100%; height: 100%; object-fit: cover; opacity: .82; }
.details-thumbnail span { position: absolute; right: 5px; bottom: 4px; width: 17px; height: 17px; display: grid; place-items: center; border-radius: 99px; background: rgba(27, 26, 43, .76); color: #fff; font-size: .64rem; font-weight: 800; }
.details-thumbnail.is-active { border-color: #7b45ff; box-shadow: 0 0 0 2px rgba(123, 69, 255, .14); }
.details-workspace__panel { min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; border-left: 1px solid #ececf2; background: #fff; }
.details-workspace__scroll { min-height: 0; overflow-y: auto; padding: 54px 32px 22px; }
.details-kicker { margin: 0 0 9px; color: #6c40db; font-size: .75rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.details-workspace__panel h3 { margin: 0; max-width: 90%; color: #171721; font-size: clamp(1.55rem, 2.1vw, 2.2rem); line-height: 1.05; letter-spacing: -.045em; }
.details-format { margin: 10px 0 22px; color: #6d6d78; font-size: .94rem; }
.details-creator { display: flex; align-items: center; gap: 10px; padding-bottom: 22px; border-bottom: 1px solid #ececf1; color: #5d5d68; font-size: .88rem; }
.details-creator strong { color: #2b2a38; }
.details-avatar { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(135deg, #f2a86f, #8f5ee8); color: #fff; font-size: .78rem; font-weight: 800; }
.details-follow { margin-left: auto; padding: 7px 11px; border: 1px solid #d9d9e2; border-radius: 9px; background: #fff; color: #302e42; font: inherit; font-weight: 700; cursor: pointer; }
.details-description { margin: 20px 0 16px; color: #555561; font-size: .93rem; line-height: 1.55; }
.details-meta { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; margin: 0; padding: 0; }
.details-meta span { min-width: 0; padding: 10px 8px; border-radius: 10px; background: #f6f6fa; }
.details-meta small, .details-meta strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.details-meta small { color: #797987; font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
.details-meta strong { margin-top: 4px; color: #292836; font-size: .74rem; }
.details-print { margin-top: 24px; }
.details-section-heading { display: flex; justify-content: space-between; align-items: center; margin: 18px 0 9px; color: #262533; font-size: .88rem; font-weight: 800; }
.details-section-heading small { color: #83828d; font-size: .7rem; font-weight: 600; }
.details-option-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.details-choice { min-height: 46px; border: 1px solid #dfdfe7; border-radius: 10px; background: #fff; color: #373642; font: inherit; font-weight: 700; cursor: pointer; }
.details-choice.is-selected, .details-paper-choice.is-selected { border-color: #7b45ff; box-shadow: 0 0 0 1px #7b45ff; }
.details-paper-options { display: grid; gap: 9px; }
.details-paper-choice { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 11px; border: 1px solid #dfdfe7; border-radius: 12px; background: #fff; color: #292836; text-align: left; cursor: pointer; }
.details-paper-choice strong, .details-paper-choice small { display: block; }.details-paper-choice strong { font-size: .81rem; }.details-paper-choice small { margin-top: 3px; color: #6e6d78; font-size: .7rem; line-height: 1.35; }
.details-paper-choice i { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(145deg, #fff, #dfe1e7 49%, #adb2bf 50%, #f3f4f7 54%); }
.details-actions { display: flex; gap: 9px; align-items: center; padding: 15px 25px 20px; border-top: 1px solid #ececf1; background: rgba(255,255,255,.98); }
.details-primary { flex: 1; min-height: 48px; border: 0; border-radius: 12px; background: linear-gradient(110deg, #7847f5, #9b3bf0); color: #fff; font-weight: 800; box-shadow: 0 8px 18px rgba(111, 61, 238, .25); }
.details-icon-button { width: 46px; height: 46px; border: 1px solid #dfdfe7; border-radius: 12px; background: #fff; color: #302e42; font-size: 1.3rem; cursor: pointer; }
.details-related { grid-column: 1 / -1; padding: 20px 32px 27px; border-top: 1px solid #ececf1; background: #fff; }
.details-related__heading { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 12px; }.details-related__heading h4 { margin: 0; color: #1d1c29; font-size: 1.16rem; letter-spacing: -.02em; }.details-related__heading span { color: #898894; font-size: .76rem; }
.details-related__grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.details-related-card { min-width: 0; overflow: hidden; padding: 0; border: 1px solid #e2e2e9; border-radius: 12px; background: #fff; color: #32313e; text-align: left; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease; }.details-related-card:hover { transform: translateY(-3px); box-shadow: 0 9px 18px rgba(42,41,60,.12); }.details-related-card img { width: 100%; aspect-ratio: 1.55; display: block; object-fit: cover; }.details-related-card span { display: block; overflow: hidden; padding: 8px; text-overflow: ellipsis; white-space: nowrap; font-size: .72rem; font-weight: 700; }
@media (max-width: 850px) { .details-workspace.details-dialog__card { width: min(680px, calc(100vw - 24px)); max-height: calc(100vh - 24px); grid-template-columns: 1fr; grid-template-rows: auto minmax(0,1fr) auto; }.details-workspace__preview { min-height: 360px; padding: 46px 24px 16px; }.details-workspace__panel { border-left: 0; border-top: 1px solid #ececf1; }.details-related { grid-column: auto; }.details-related__grid { overflow-x: auto; display: flex; }.details-related-card { flex: 0 0 140px; } }
@media (max-width: 540px) { .details-workspace__preview { min-height: 280px; padding: 44px 16px 14px; }.details-preview-stage { min-height: 210px; }.details-workspace__scroll { padding: 38px 19px 16px; }.details-related { padding: 17px 19px 20px; }.details-actions { padding: 13px 18px 16px; }.details-meta { grid-template-columns: 1fr; }.details-meta span { display: flex; justify-content: space-between; gap: 10px; }.details-meta strong { margin: 0; }.details-workspace__panel h3 { max-width: 100%; } }

/* Full-height template inspector: intentionally mirrors the spacious gallery/
   inspector relationship used by professional template marketplaces. */
@media (min-width: 851px) {
  .details-workspace.details-dialog__card {
    width: min(92vw, 1880px);
    height: min(92vh, 1040px);
    max-height: none;
    grid-template-columns: minmax(0, 1.62fr) minmax(460px, .88fr);
    grid-template-rows: minmax(0, 1fr) 106px;
    border-radius: 38px;
  }
  .details-workspace__preview { grid-column: 1; grid-row: 1; padding: 46px 64px 26px; gap: 24px; }
  .details-preview-stage { min-height: 0; border-radius: 22px; box-shadow: none; background: transparent; }
  .details-preview-stage #details-preview { max-width: 82%; max-height: 88%; width: auto !important; height: 88% !important; object-fit: contain; border-radius: 18px; box-shadow: 0 18px 42px rgba(39, 38, 57, .17); }
  .details-preview-count { right: 8%; bottom: 6%; }
  .details-thumbnails { justify-content: center; gap: 18px; padding: 4px 0; overflow: hidden; }
  .details-thumbnail { flex-basis: 142px; height: 94px; border-radius: 17px; border-width: 3px; background: #fff; }
  .details-thumbnail span { right: 8px; bottom: 7px; width: 22px; height: 22px; font-size: .7rem; }
  .details-workspace__panel { grid-column: 2; grid-row: 1 / 3; min-height: 0; border-left: 1px solid #efeff3; }
  .details-workspace__scroll { padding: 58px 46px 26px; }
  .details-workspace__panel h3 { max-width: calc(100% - 52px); font-size: clamp(2rem, 2.05vw, 2.65rem); }
  .details-format { font-size: 1.02rem; margin-bottom: 27px; }
  .details-creator { padding-bottom: 28px; font-size: .98rem; }
  .details-avatar { width: 39px; height: 39px; font-size: .95rem; }
  .details-description { font-size: 1rem; margin: 24px 0 20px; }
  .details-meta { display: none; }
  .details-print { margin-top: 26px; }
  .details-section-heading { margin: 24px 0 12px; font-size: 1rem; }
  .details-choice { min-height: 68px; font-size: 1.03rem; border-radius: 14px; }
  .details-paper-options { gap: 13px; }
  .details-paper-choice { min-height: 92px; padding: 16px; border-radius: 16px; }
  .details-paper-choice strong { font-size: .98rem; }.details-paper-choice small { font-size: .83rem; max-width: 275px; }
  .details-paper-choice i { flex-basis: 58px; width: 58px; height: 58px; border-radius: 13px; }
  .details-actions { padding: 22px 38px 28px; }
  .details-primary { min-height: 62px; font-size: 1.05rem; border-radius: 16px; }
  .details-icon-button { width: 60px; height: 60px; border-radius: 16px; }
  .details-related { grid-column: 1; grid-row: 2; overflow: hidden; padding: 24px 46px 32px; border-top: 1px solid #efeff3; }
  .details-related__heading { margin-bottom: 15px; }.details-related__heading h4 { font-size: 1.55rem; }
  .details-related__grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 15px; }
  .details-related-card { border-radius: 15px; }.details-related-card img { aspect-ratio: 1.72; }.details-related-card span { padding: 9px 10px; font-size: .78rem; }
  .dialog-close { width: 52px; height: 52px; right: 25px; top: 25px; font-size: 1.75rem; }
}

.help-fab {
  position: fixed;
  right: 24px;
  bottom: 26px;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(180deg, #9f50ff 0%, #7a49f5 100%);
  color: #fff;
  font-size: 1.45rem;
  font-weight: 700;
  box-shadow: 0 18px 32px rgba(122, 73, 245, 0.28);
  z-index: 20;
}

@media (max-width: 1400px) {
  .template-grid.template-grid--canva {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .template-card:first-child {
    grid-column: span 2;
  }
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .template-grid.template-grid--canva {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .template-card:first-child {
    grid-column: span 2;
  }

  .controls-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .sidebar {
    padding-inline: 6px;
  }

  .main-content {
    padding: 12px;
  }

  .discovery-hero {
    padding: 38px 18px 52px;
  }

  .search-hero-field {
    min-height: 78px;
    border-radius: 24px;
  }

  .shortcut-strip {
    overflow-x: auto;
    justify-content: flex-start;
    padding-inline: 10px;
  }

  .template-grid.template-grid--canva {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .template-card:first-child {
    grid-column: span 2;
  }

  .templates-home__header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Shell polish overrides */
.nav-item--home .nav-item__icon::before,
.nav-item--projects .nav-item__icon::before,
.nav-item--templates .nav-item__icon::before,
.nav-item--print .nav-item__icon::before,
.nav-item--brand .nav-item__icon::before,
.nav-item--more .nav-item__icon::before {
  width: 22px;
  height: 22px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  border: 0;
  border-radius: 0;
  clip-path: none;
}

.nav-item--home .nav-item__icon::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%237c49f4' d='M4 11.2 12 4l8 7.2V20a2 2 0 0 1-2 2h-4v-6H10v6H6a2 2 0 0 1-2-2z'/%3E%3C/svg%3E");
}

.nav-item--home.nav-item--active .nav-item__icon::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M4 11.2 12 4l8 7.2V20a2 2 0 0 1-2 2h-4v-6H10v6H6a2 2 0 0 1-2-2z'/%3E%3C/svg%3E");
}

.nav-item--projects .nav-item__icon::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%237b7f92' stroke-width='2.2' stroke-linejoin='round' d='M3.5 8.5h6l1.8-2h9.2v11.8A1.7 1.7 0 0 1 18.8 20H5.2A1.7 1.7 0 0 1 3.5 18.3z'/%3E%3C/svg%3E");
}

.nav-item--templates .nav-item__icon::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%237c49f4' stroke-width='2.2' stroke-linejoin='round'%3E%3Crect x='5' y='3.5' width='14' height='17' rx='4'/%3E%3Cpath d='M12 3.5v17'/%3E%3C/g%3E%3C/svg%3E");
}

.nav-item--print .nav-item__icon::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%237b7f92' stroke-width='2.1' stroke-linecap='round'%3E%3Cpath d='M6 8h12'/%3E%3Cpath d='M6 12h12'/%3E%3Cpath d='M6 16h12'/%3E%3Crect x='4' y='5' width='16' height='14' rx='2.5' stroke-linejoin='round'/%3E%3C/g%3E%3C/svg%3E");
}

.nav-item--brand .nav-item__icon::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='7.5' fill='none' stroke='%237b7f92' stroke-width='2.2'/%3E%3C/svg%3E");
}

.nav-item--more .nav-item__icon::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='%237b7f92'%3E%3Ccircle cx='6' cy='12' r='2'/%3E%3Ccircle cx='12' cy='12' r='2'/%3E%3Ccircle cx='18' cy='12' r='2'/%3E%3C/g%3E%3C/svg%3E");
}

.shortcut-strip::before,
.shortcut-strip::after {
  display: none;
}

.shortcut-strip__divider {
  width: 1px;
  height: 64px;
  margin: 4px 8px 0 6px;
  background: #e6e6ee;
  flex: 0 0 auto;
}

.shortcut-strip__next {
  position: absolute;
  right: 10px;
  top: 8px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid #ececf5;
  background: #fff;
  box-shadow: 0 10px 24px rgba(98, 108, 152, 0.08);
  color: #1f2430;
  font-size: 34px;
  line-height: 1;
}

.gallery-reference,
.gallery-reference-spacer {
  display: none;
}

@media (min-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
    min-height: auto;
    background: #f7f7fb;
  }

  .sidebar {
    display: none;
  }

  .main-content {
    padding: 0;
  }

  #gallery-view {
    display: block;
    padding: 0;
  }

  #gallery-view > :not(.canva-homepage) {
    display: none !important;
  }

  .help-fab {
    display: none !important;
  }

  .gallery-reference,
  .gallery-reference-spacer,
  #gallery-view > .gallery-topbar,
  #gallery-view > .discovery-hero,
  #gallery-view > .shortcut-strip,
  #gallery-view > .templates-home {
    display: none !important;
  }

  .canva-homepage {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    min-height: 100vh;
    background: #f7f7fb;
  }

  .canva-homepage__sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 14px 6px 20px;
    background: linear-gradient(180deg, #ffffff 0%, #faf9ff 100%);
    border-right: 1px solid #ececf6;
    position: relative;
  }

  .canva-homepage__sidebar::before {
    content: "";
    position: absolute;
    left: 76px;
    top: 168px;
    width: 7px;
    height: 332px;
    border-radius: 999px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0) 0 6%, #8c8c93 6% 32%, rgba(255, 255, 255, 0) 32%);
  }

  .canva-homepage__sidebar::after {
    content: "";
    position: absolute;
    left: 74px;
    bottom: 118px;
    width: 10px;
    height: 10px;
    border-right: 2px solid #8d92a2;
    border-bottom: 2px solid #8d92a2;
    transform: rotate(45deg);
  }

  .canva-sidebutton {
    border: 0;
    background: transparent;
  }

  .canva-sidebutton--menu {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid #ececf5;
    background: #fff;
    box-shadow: 0 8px 20px rgba(98, 108, 152, 0.08);
    position: relative;
  }

  .canva-sidebutton--menu::before {
    content: "";
    position: absolute;
    inset: 10px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%237b61ff' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='2.5' width='17' height='19' rx='4.3'/%3E%3Cpath d='M10 2.8v18.4'/%3E%3C/g%3E%3C/svg%3E") center/contain no-repeat;
  }

  .canva-sidebutton--create {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(180deg, #a84dff 0%, #6a4dff 100%);
    box-shadow: 0 10px 24px rgba(122, 73, 245, 0.26);
    color: #fff;
    display: grid;
    place-items: center;
    margin-top: 6px;
  }

  .canva-sidebutton__plus {
    font-size: 2rem;
    line-height: 1;
  }

  .canva-sidebutton__text {
    margin-top: -5px;
    font-size: 12px;
    font-weight: 600;
    color: #7a49f5;
  }

  .canva-sidenav {
    display: grid;
    gap: 8px;
    width: 100%;
    margin-top: 22px;
  }

  .canva-sidenav__item {
    border: 0;
    background: transparent;
    display: grid;
    justify-items: center;
    gap: 8px;
    color: #6f5aa8;
    font-size: 11px;
    font-weight: 600;
  }

  .canva-sidenav__icon {
    width: 36px;
    height: 36px;
    border-radius: 14px;
    position: relative;
  }

  .canva-sidenav__item--active {
    color: #6b45f5;
  }

  .canva-sidenav__item--active .canva-sidenav__icon {
    background: #8a3ffc;
    box-shadow: 0 10px 24px rgba(122, 73, 245, 0.26);
  }

  .canva-sidenav__icon::before {
    content: "";
    position: absolute;
    inset: 9px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
  }

  .canva-sidenav__icon--home::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M4 11.2 12 4l8 7.2V20a2 2 0 0 1-2 2h-4v-6H10v6H6a2 2 0 0 1-2-2z'/%3E%3C/svg%3E");
  }

  .canva-sidenav__item:not(.canva-sidenav__item--active) .canva-sidenav__icon--home::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%237c49f4' d='M4 11.2 12 4l8 7.2V20a2 2 0 0 1-2 2h-4v-6H10v6H6a2 2 0 0 1-2-2z'/%3E%3C/svg%3E");
  }

  .canva-sidenav__icon--folder::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23767590' stroke-width='2.2' stroke-linejoin='round' d='M3.5 8.5h6l1.8-2h9.2v11.8A1.7 1.7 0 0 1 18.8 20H5.2A1.7 1.7 0 0 1 3.5 18.3z'/%3E%3C/svg%3E");
  }

  .canva-sidenav__icon--templates::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%237c49f4' stroke-width='2.2' stroke-linejoin='round'%3E%3Crect x='5' y='3.5' width='14' height='17' rx='4'/%3E%3Cpath d='M12 3.5v17'/%3E%3C/g%3E%3C/svg%3E");
  }

  .canva-sidenav__icon--shop::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%23767590' stroke-width='2.1' stroke-linejoin='round'%3E%3Cpath d='M6 9h12v9a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2z'/%3E%3Cpath d='M8 5h8v4H8z'/%3E%3Cpath d='M6 12h12'/%3E%3C/g%3E%3C/svg%3E");
  }

  .canva-sidenav__icon--brand::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='7.5' fill='none' stroke='%23767590' stroke-width='2.2'/%3E%3C/svg%3E");
  }

  .canva-sidenav__icon--brand::after {
    content: "★";
    position: absolute;
    right: -3px;
    top: -4px;
    width: 14px;
    height: 14px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #fff;
    color: #f3b02d;
    font-size: 9px;
    box-shadow: 0 4px 10px rgba(86, 92, 130, 0.16);
  }

  .canva-sidenav__icon--more::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='%23767590'%3E%3Ccircle cx='6' cy='12' r='2'/%3E%3Ccircle cx='12' cy='12' r='2'/%3E%3Ccircle cx='18' cy='12' r='2'/%3E%3C/g%3E%3C/svg%3E");
  }

  .canva-sidebutton--bell,
  .canva-sidebutton--avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
  }

  .canva-sidebutton--bell {
    margin-top: auto;
    background: #fff;
    border: 1px solid #ececf5;
    box-shadow: 0 10px 24px rgba(98, 108, 152, 0.08);
    position: relative;
  }

  .canva-sidebutton--bell::before {
    content: "";
    position: absolute;
    inset: 10px 12px;
    border: 2px solid #7b7f92;
    border-bottom: 0;
    border-radius: 10px 10px 0 0;
  }

  .canva-sidebutton--avatar {
    background: #90a9b9;
    color: #fff;
    font-weight: 700;
  }

  .canva-homepage__main {
    padding: 10px 14px 24px;
    position: relative;
  }

  .canva-homepage__hero {
    position: relative;
  }

  .canva-homepage__trial {
    position: absolute;
    top: 0;
    z-index: 2;
  }

  .canva-homepage__trial {
    right: 18px;
    border: 1px solid #e5e5f3;
    background: #fff;
    box-shadow: 0 10px 28px rgba(82, 93, 130, 0.08);
    border-radius: 999px;
    padding: 13px 22px;
    font-size: 14px;
    font-weight: 700;
    color: #1e2230;
  }

  .canva-homepage__trial::before {
    content: "♛";
    margin-right: 8px;
    color: #f2aa44;
  }

  .canva-homepage__hero-panel {
    border: 1px solid #ebe6fb;
    border-radius: 28px;
    background:
      radial-gradient(circle at 12% 18%, rgba(141, 240, 236, 0.9), rgba(141, 240, 236, 0) 28%),
      radial-gradient(circle at 88% 18%, rgba(198, 139, 255, 0.5), rgba(198, 139, 255, 0) 24%),
      linear-gradient(90deg, #f7fdff 0%, #eef6ff 35%, #f4efff 70%, #f3e8ff 100%);
    box-shadow: 0 10px 28px rgba(82, 93, 130, 0.08);
    padding: 54px 24px 34px;
  }

  .canva-homepage__trial::before {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 8px;
    vertical-align: -2px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23f2aa44' d='M4 18h16v2H4zm1-11 3 3 4-6 4 6 3-3 1 9H4z'/%3E%3C/svg%3E") center/contain no-repeat;
  }

  .canva-homepage__hero-panel h2 {
    margin: 0;
    text-align: center;
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 3.35rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    color: #4d41f2;
  }

  .canva-homepage__search {
    width: min(100%, 960px);
    min-height: 78px;
    margin: 24px auto 0;
    display: grid;
    grid-template-columns: 50px 1fr;
    align-items: center;
    gap: 4px;
    padding: 0 22px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #eadfff;
    box-shadow: inset 0 0 0 1px rgba(240, 232, 255, 0.7);
  }

  .canva-homepage__search input {
    border: 0;
    background: transparent;
    font-size: 1.08rem;
    color: #23283a;
    outline: none;
  }

  .canva-homepage__search-icon {
    width: 24px;
    height: 24px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%231f2430' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='m16 16 4.5 4.5'/%3E%3C/g%3E%3C/svg%3E") center/contain no-repeat;
  }

  .canva-quickrow {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 16px 44px 6px 16px;
    justify-content: space-between;
  }

  .canva-quickrow__divider {
    width: 1px;
    flex: 0 0 1px;
    height: 60px;
    background: #e6e6ee;
    margin-top: 12px;
  }

  .canva-quickrow__item,
  .canva-quickrow__next {
    border: 0;
    background: transparent;
  }

  .canva-quickrow__item {
    min-width: 0;
    flex: 0 0 72px;
    display: grid;
    justify-items: center;
    gap: 8px;
    color: #555b69;
    font-weight: 600;
    font-size: 11px;
    line-height: 1.2;
    text-align: center;
  }

  .canva-quickrow__icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 24px 24px;
    box-shadow: 0 10px 24px rgba(79, 86, 145, 0.16);
  }

  .canva-quickrow__item--templates .canva-quickrow__icon {
    background:
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%237b4df4' stroke-width='2.4' stroke-linejoin='round'%3E%3Crect x='4.5' y='2.5' width='15' height='19' rx='4.2'/%3E%3Cpath d='M12 2.5v19'/%3E%3C/g%3E%3C/svg%3E") center/30px 30px no-repeat,
      #fff;
    border: 1px solid #ececf5;
    box-shadow: 0 10px 24px rgba(98, 108, 152, 0.08);
  }

  .canva-quickrow__item--magic .canva-quickrow__icon {
    border-radius: 18px;
    box-shadow: none;
    background:
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 92 76'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop stop-color='%236e48f5'/%3E%3Cstop offset='.6' stop-color='%23a04fff'/%3E%3Cstop offset='1' stop-color='%238ce8f0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M22 49 46 13l24 36-24 14Z' fill='url(%23g)'/%3E%3Cpath d='M28 55 52 19l24 36-24 14Z' fill='url(%23g)' opacity='.72'/%3E%3Crect x='39' y='18' width='18' height='12' rx='3' fill='white' fill-opacity='.76'/%3E%3C/svg%3E") center/44px 36px no-repeat;
  }

  .canva-quickrow__item--print .canva-quickrow__icon { background-color: #8f31ff; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='white' stroke-width='2.2' stroke-linejoin='round'%3E%3Cpath d='M6 8h12v9a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2z'/%3E%3Cpath d='M8 5h8v3H8z'/%3E%3Cpath d='M6 11h12'/%3E%3C/g%3E%3C/svg%3E"); }
  .canva-quickrow__item--presentation .canva-quickrow__icon { background-color: #ff6c0d; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='white'%3E%3Ccircle cx='12' cy='12' r='8'/%3E%3Cpath fill='%23ff7b1f' d='M11 6h2v6h5v2h-7z'/%3E%3C/g%3E%3C/svg%3E"); }
  .canva-quickrow__item--social .canva-quickrow__icon { background-color: #ff3f57; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M12 20s-6-3.8-6-8.4C6 8.5 8.2 7 10.2 7c1.3 0 2.3.6 2.8 1.4C13.5 7.6 14.5 7 15.8 7 17.8 7 20 8.5 20 11.6 20 16.2 14 20 14 20z'/%3E%3C/svg%3E"); }
  .canva-quickrow__item--video .canva-quickrow__icon { background-color: #d94cf4; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='white' stroke-width='2.2' stroke-linejoin='round' d='M5 7h9a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2Z'/%3E%3Cpath fill='white' d='m11 12-4 2.5v-5z'/%3E%3Cpath fill='none' stroke='white' stroke-width='2.2' d='m16 10 5-3v10l-5-3'/%3E%3C/svg%3E"); }
  .canva-quickrow__item--doc .canva-quickrow__icon { background-color: #21a7bf; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='white' stroke-width='2.1' stroke-linejoin='round'%3E%3Crect x='5' y='4.5' width='14' height='15' rx='2.5'/%3E%3Cpath d='M8 8h8M8 12h8M8 16h8'/%3E%3C/g%3E%3C/svg%3E"); }
  .canva-quickrow__item--whiteboard .canva-quickrow__icon { background-color: #18ab42; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 4H5a1 1 0 0 0-1 1v3M16 4h3a1 1 0 0 1 1 1v3M8 20H5a1 1 0 0 1-1-1v-3M16 20h3a1 1 0 0 0 1-1v-3' fill='none' stroke='white' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
  .canva-quickrow__item--sheet .canva-quickrow__icon { background-color: #2688ff; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='white' stroke-width='2.1' stroke-linejoin='round'%3E%3Crect x='4.5' y='5' width='15' height='14' rx='2.5'/%3E%3Cpath d='M8.2 5v14M15.8 5v14M4.5 10h15M4.5 14h15'/%3E%3C/g%3E%3C/svg%3E"); }
  .canva-quickrow__item--code .canva-quickrow__icon { background-color: #9a20d2; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m8 7 4 5-4 5M16 7l-4 5 4 5' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
  .canva-quickrow__item--website .canva-quickrow__icon { background-color: #4f52f6; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='4.5' y='5.5' width='15' height='13' rx='2.8' fill='none' stroke='white' stroke-width='2.2'/%3E%3Cpath d='M7.5 9h9' stroke='white' stroke-width='2.2'/%3E%3C/svg%3E"); }
  .canva-quickrow__item--email .canva-quickrow__icon { background-color: #5f46f2; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4.8 7.5h14.4a1.7 1.7 0 0 1 1.7 1.7v5.6a1.7 1.7 0 0 1-1.7 1.7H4.8A1.7 1.7 0 0 1 3.1 14.8V9.2A1.7 1.7 0 0 1 4.8 7.5Z' fill='none' stroke='white' stroke-width='2.2'/%3E%3Cpath d='m4.8 8 7.2 5.4L19.2 8' fill='none' stroke='white' stroke-width='2.2'/%3E%3C/svg%3E"); }

  .canva-quickrow__item--photo .canva-quickrow__icon {
    background: linear-gradient(135deg, #f6a769, #e46993);
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(79, 86, 145, 0.16);
  }

  .canva-quickrow__item--custom .canva-quickrow__icon {
    background:
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 10V5h5M19 14v5h-5M10 19H5v-5M14 5h5v5' fill='none' stroke='%231f2430' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/24px 24px no-repeat,
      #fff;
    border: 1px solid #ececf5;
    box-shadow: 0 10px 24px rgba(98, 108, 152, 0.08);
  }

  .canva-quickrow__next {
    position: absolute;
    right: 0;
    top: 10px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #ececf5;
    box-shadow: 0 10px 24px rgba(98, 108, 152, 0.08);
    color: #1f2430;
    font-size: 30px;
    line-height: 1;
  }

  .canva-shelf {
    padding: 6px 18px 0;
  }

  .canva-shelf__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
  }

  .canva-shelf__header h3 {
    margin: 0;
    font-size: 2.65rem;
    line-height: 1;
    font-weight: 700;
    color: #121725;
  }

  .canva-shelf__header button {
    border: 0;
    background: transparent;
    font-size: 17px;
    font-weight: 700;
    color: #1c2230;
  }

  .canva-shelf__grid {
    display: grid;
    grid-template-columns: 1.95fr 0.82fr 0.82fr 0.96fr 0.72fr;
    gap: 12px;
    align-items: start;
  }

  .canva-shelf__card {
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 10px 24px rgba(82, 93, 130, 0.08);
  }

  .canva-shelf__card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .canva-shelf__card--wide {
    aspect-ratio: 1.48 / 1;
  }

  .canva-shelf__card:not(.canva-shelf__card--wide) {
    aspect-ratio: 0.72 / 1;
  }

  .canva-helpfab {
    position: fixed;
    right: 28px;
    bottom: 26px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 0;
    background: linear-gradient(180deg, #9f50ff 0%, #7a49f5 100%);
    color: #fff;
    font-size: 1.7rem;
    box-shadow: 0 18px 32px rgba(122, 73, 245, 0.28);
  }
}

body .canva-homepage {
  isolation: isolate;
}

body .canva-homepage__main {
  max-width: 1940px;
  margin: 0 auto;
  padding: 10px 18px 44px !important;
}

body .canva-homepage__sidebar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 247, 255, 0.98)),
    #ffffff;
  border-right: 1px solid rgba(225, 225, 239, 0.95);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.9);
}

body .canva-homepage__sidebar::before {
  top: 172px;
  width: 10px;
  height: 10px;
  border-left: 3px solid #a5a1b9;
  border-bottom: 3px solid #a5a1b9;
  transform: rotate(45deg);
  background: none;
  border-radius: 0;
  box-shadow: none;
}

body .canva-homepage__sidebar::after {
  top: auto;
  bottom: 148px;
  width: 10px;
  height: 10px;
  border-right: 3px solid #a5a1b9;
  border-top: 3px solid #a5a1b9;
  transform: rotate(45deg);
  background: none;
  border-radius: 0;
  box-shadow: none;
}

body .canva-sidebutton,
body .canva-sidenav__item,
body .canva-quickrow__item,
body .canva-quickrow__next,
body #homepage-see-all,
body .homepage-template-card,
body .canva-helpfab {
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    opacity 160ms ease;
}

body .canva-sidebutton:hover,
body .canva-sidebutton:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(94, 101, 148, 0.14);
}

body .canva-sidebutton--menu {
  width: 44px;
  height: 44px;
  border-radius: 15px;
}

body .canva-sidebutton--menu::before {
  inset: 9px;
}

body .canva-sidebutton--create {
  width: 44px;
  height: 44px;
  background: linear-gradient(180deg, #a855ff 0%, #7a4df6 100%);
}

body .canva-sidebutton__plus {
  font-size: 1.95rem;
  font-weight: 300;
}

body .canva-sidebutton__text {
  font-size: 11.5px;
  letter-spacing: -0.01em;
}

body .canva-sidenav {
  gap: 10px;
  margin-top: 20px;
}

body .canva-sidenav__item {
  gap: 7px;
  color: #6f6986;
}

body .canva-sidenav__item:hover,
body .canva-sidenav__item:focus-visible {
  color: #5236df;
  transform: translateY(-1px);
}

body .canva-sidenav__icon {
  width: 40px;
  height: 40px;
  border-radius: 15px;
}

body .canva-sidenav__item:not(.canva-sidenav__item--active) .canva-sidenav__icon {
  background: linear-gradient(180deg, #ffffff 0%, #fbf8ff 100%);
  box-shadow: 0 8px 18px rgba(110, 120, 164, 0.07);
}

body .canva-sidenav__item--active .canva-sidenav__icon {
  background: linear-gradient(180deg, #9652ff 0%, #7d46f6 100%);
}

body .canva-sidenav__icon::before {
  inset: 10px;
}

body .canva-sidenav__icon--brand::after {
  content: "";
  width: 13px;
  height: 13px;
  right: -2px;
  top: -3px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23f2b24a' d='m12 2.5 2.22 4.97 5.41.48-4.08 3.61 1.2 5.34L12 14.04 7.25 16.9l1.2-5.34-4.08-3.61 5.41-.48z'/%3E%3C/svg%3E") center/11px 11px no-repeat,
    #fff;
  font-size: 0;
}

body .canva-sidebutton--bell {
  width: 44px;
  height: 44px;
  margin-bottom: 8px;
}

body .canva-homepage__hero-panel {
  position: relative;
  border-radius: 30px;
  border: 1px solid rgba(234, 225, 252, 0.92);
  box-shadow:
    0 12px 28px rgba(92, 103, 150, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
  padding: 62px 34px 34px;
  overflow: hidden;
}

body .canva-homepage__hero-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36);
  pointer-events: none;
}

body .canva-homepage__hero-panel h2 {
  font-size: clamp(3.3rem, 4vw, 4.35rem);
  letter-spacing: -0.055em;
  line-height: 0.98;
  text-wrap: balance;
}

body .canva-homepage__search {
  width: min(100%, 1000px);
  min-height: 88px;
  margin-top: 32px;
  grid-template-columns: 58px 1fr;
  padding: 0 28px;
  border-radius: 31px;
  background: rgba(255, 255, 255, 0.965);
  border: 1px solid #eddfff;
  box-shadow:
    inset 0 0 0 1px rgba(247, 241, 255, 0.95),
    0 10px 22px rgba(164, 132, 255, 0.06);
}

body .canva-homepage__search:hover,
body .canva-homepage__search:focus-within {
  border-color: #ddc7ff;
  box-shadow:
    inset 0 0 0 1px rgba(243, 234, 255, 0.98),
    0 14px 28px rgba(164, 132, 255, 0.11);
}

body .canva-homepage__search input {
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

body .canva-homepage__search input::placeholder {
  color: #85889a;
}

body .canva-homepage__search-icon {
  width: 27px;
  height: 27px;
}

body .canva-quickrow {
  gap: 12px;
  padding: 18px 48px 12px 20px;
}

body .canva-quickrow__divider {
  margin-top: 13px;
}

body .canva-quickrow__item {
  flex-basis: 74px;
  gap: 10px;
  font-size: 11px;
  letter-spacing: -0.012em;
  color: #565d6f;
}

body .canva-quickrow__item:hover,
body .canva-quickrow__item:focus-visible {
  color: #1e2536;
  transform: translateY(-2px);
}

body .canva-quickrow__icon {
  width: 56px;
  height: 56px;
  background-size: 25px 25px;
  box-shadow: 0 12px 24px rgba(87, 96, 148, 0.16);
}

body .canva-quickrow__item--templates .canva-quickrow__icon,
body .canva-quickrow__item--custom .canva-quickrow__icon {
  box-shadow: 0 10px 20px rgba(98, 108, 152, 0.08);
}

body .canva-quickrow__item--photo .canva-quickrow__icon {
  border-radius: 18px;
}

body .canva-quickrow__next {
  top: 13px;
  right: 4px;
  width: 52px;
  height: 52px;
  position: absolute;
  font-size: 0;
}

body .canva-quickrow__next::before {
  content: "";
  display: block;
  width: 18px;
  height: 18px;
  margin: 0 auto;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m9 5 7 7-7 7' fill='none' stroke='%231d2435' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
}

body .canva-quickrow__next:hover,
body .canva-quickrow__next:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 14px 26px rgba(98, 108, 152, 0.13);
}

body .canva-shelf {
  padding: 10px 18px 0;
}

body .canva-shelf__header {
  margin-bottom: 20px;
}

body .canva-shelf__titleblock {
  display: grid;
  gap: 6px;
}

body .canva-shelf__header h3 {
  font-size: clamp(2.35rem, 3vw, 3.15rem);
  letter-spacing: -0.05em;
}

body #homepage-results-summary {
  margin: 0;
  font-size: 1.02rem;
  color: #7f8191;
}

body #homepage-see-all {
  padding: 6px 2px;
  border: 0;
  background: transparent;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

body #homepage-see-all:hover,
body #homepage-see-all:focus-visible {
  color: #5236df;
  transform: translateY(-1px);
}

body #homepage-template-grid {
  gap: 16px !important;
}

body .homepage-template-card {
  border-radius: 20px;
  border: 1px solid rgba(230, 230, 239, 0.9);
  box-shadow:
    0 10px 24px rgba(86, 95, 138, 0.07),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

body .homepage-template-card:hover,
body .homepage-template-card:focus-visible {
  transform: translateY(-4px);
  box-shadow:
    0 18px 36px rgba(86, 95, 138, 0.13),
    0 1px 0 rgba(255, 255, 255, 0.92) inset;
}

body .homepage-template-card__media {
  border-radius: 20px;
}

body .homepage-template-card__overlay {
  background: linear-gradient(180deg, rgba(9, 12, 20, 0) 0%, rgba(9, 12, 20, 0.72) 100%);
}

body .homepage-template-card__caption {
  gap: 4px;
}

body .homepage-template-card__caption h4 {
  font-size: 1rem;
  letter-spacing: -0.025em;
}

body .homepage-template-card__caption p {
  color: rgba(255, 255, 255, 0.88);
}

body .homepage-template-card__pill {
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 20px rgba(14, 19, 28, 0.12);
}

body .canva-helpfab {
  right: 24px;
  bottom: 20px;
  width: 54px;
  height: 54px;
  font-size: 1.5rem;
  background: linear-gradient(180deg, #9c4cff 0%, #7e45f6 100%);
}

body .canva-helpfab:hover,
body .canva-helpfab:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 22px 34px rgba(122, 73, 245, 0.34);
}

@media (max-width: 1320px) {
  body .canva-homepage__main {
    padding-inline: 14px !important;
  }

  body .canva-homepage__hero-panel {
    padding: 54px 22px 28px;
  }

  body .canva-homepage__search {
    min-height: 80px;
  }

  body .canva-quickrow {
    padding-inline: 12px 44px;
    gap: 10px;
  }

  body .canva-quickrow__item {
    flex-basis: 68px;
  }
}

body .canva-homepage__main {
  display: grid;
  grid-template-rows: auto auto auto;
  row-gap: 18px;
}

body .canva-homepage__hero {
  margin: 0;
}

body .canva-homepage__hero-panel {
  padding: 56px 34px 30px;
}

body .canva-homepage__hero-panel h2 {
  margin: 0 auto;
  max-width: 980px;
}

body .canva-homepage__search {
  margin-top: 26px;
}

body .canva-quickrow {
  align-items: start;
  padding: 2px 40px 0 18px;
  gap: 10px;
}

body .canva-quickrow__item {
  min-height: 96px;
  align-content: start;
  justify-items: center;
  grid-template-rows: 56px minmax(24px, auto);
}

body .canva-quickrow__item > span:last-child {
  display: block;
  max-width: 72px;
  line-height: 1.15;
  text-align: center;
}

body .canva-quickrow__divider {
  align-self: center;
  height: 52px;
  margin-top: 0;
}

body .canva-quickrow__next {
  top: 12px;
}

body .canva-shelf {
  padding: 4px 18px 0;
}

body .canva-shelf__header {
  align-items: end;
  margin-bottom: 18px;
  padding-right: 2px;
}

body .canva-shelf__titleblock {
  gap: 4px;
}

body .canva-shelf__header h3 {
  line-height: 0.96;
}

body #homepage-results-summary {
  line-height: 1.2;
}

body #homepage-see-all {
  align-self: start;
  margin-top: 8px;
  line-height: 1;
}

body #homepage-template-grid {
  align-items: start;
}

body .homepage-template-card {
  overflow: hidden;
}

body .homepage-template-card__caption {
  align-content: end;
}

/* Canva-style gallery: the thumbnail is the finished template cover; the title sits below. */
#homepage-template-grid .homepage-template-card::after {
  display: none;
}

#homepage-template-grid .homepage-template-card__meta {
  position: static;
  padding: 12px 2px 4px;
  color: #1f2430;
  text-shadow: none;
}

#homepage-template-grid .homepage-template-card__title {
  font-size: 1rem;
  line-height: 1.18;
  letter-spacing: -0.02em;
}

#homepage-template-grid .homepage-template-card__subline {
  margin-top: 8px;
}

/* Gallery shelves display the designs only; details appear after a template is opened. */
#homepage-template-grid .homepage-template-card__meta {
  display: none;
}

/* Preserve the entire designed artboard in every gallery card. */
#homepage-template-grid .homepage-template-card {
  display: block;
  min-height: 0;
  aspect-ratio: auto !important;
  overflow: hidden;
  background: #fff;
}

#homepage-template-grid .homepage-template-card > img {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 6 / 5;
  object-fit: contain;
  object-position: center;
  background: #f7f7fa;
}

/* Focused template picker: clear hierarchy, one consistent card pattern, and
   an explicit action for starting a fresh design. */
#gallery-view {
  background: #f8f8fb;
}

.discovery-hero {
  background: linear-gradient(135deg, #4b1f83 0%, #6b35b1 50%, #8a53c7 100%);
}

.discovery-hero__inner {
  max-width: 1120px;
}

.search-hero-field {
  box-shadow: 0 14px 32px rgba(28, 9, 62, 0.22);
}

.templates-home {
  max-width: 1240px;
  margin: 0 auto;
  padding: 38px 28px 64px;
}

.templates-home__header {
  margin-bottom: 24px;
}

.templates-home__eyebrow {
  margin: 0 0 7px;
  color: #6653a6;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.templates-home__header h3 {
  color: #20212c;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  letter-spacing: -0.045em;
}

.templates-home__header strong,
.templates-home__header p:not(.templates-home__eyebrow) {
  color: #686a78;
}

.see-all-button {
  min-height: 42px;
  padding: 0 17px;
  color: #50319b;
  border: 1px solid #ddd8ec;
  border-radius: 10px;
  background: #fff;
  font-weight: 750;
}

.see-all-button:hover {
  background: #f3effc;
  border-color: #bdb1db;
}

.category-browser {
  display: grid;
  grid-template-columns: minmax(180px, 0.24fr) 1fr;
  align-items: center;
  gap: 24px;
  margin: 0 0 30px;
  padding: 18px 20px;
  border: 1px solid #e8e7ee;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 3px 15px rgba(27, 20, 46, 0.035);
}

.category-browser__heading {
  display: grid;
  gap: 4px;
}

.category-browser__heading strong {
  color: #292a35;
  font-size: 0.95rem;
}

.category-browser__heading span {
  color: #777987;
  font-size: 0.8rem;
  line-height: 1.35;
}

.category-browser__list {
  gap: 9px;
}

.category-browser__button {
  min-width: max-content;
  padding: 9px 13px;
  border: 1px solid #e5e4eb;
  border-radius: 999px;
  background: #fff;
  color: #434450;
  font-size: 0.82rem;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease;
}

.category-browser__button strong {
  font-weight: 700;
}

.category-browser__button span {
  display: none;
}

.category-browser__button:hover,
.category-browser__button.is-active {
  border-color: #6a42b5;
  background: #f1ecfc;
  color: #4c278f;
}

.template-area {
  display: block;
}

.template-grid.template-grid--canva {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px 18px;
}

.template-card,
.template-card:first-child {
  grid-column: auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #e6e5eb;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 2px 9px rgba(30, 23, 48, 0.035);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.template-card:hover {
  transform: translateY(-4px);
  border-color: #c8bee0;
  box-shadow: 0 14px 30px rgba(38, 24, 70, 0.12);
}

.template-card__preview,
.template-card:first-child .template-card__preview,
.template-card:nth-child(2) .template-card__preview,
.template-card:nth-child(3) .template-card__preview,
.template-card:nth-child(4) .template-card__preview,
.template-card:nth-child(5) .template-card__preview {
  aspect-ratio: 4 / 3;
  min-height: 0;
  background: #f4f3f7;
}

.template-card__preview img {
  object-fit: contain;
  padding: 0;
}

.template-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 15px;
}

.template-card__topline {
  align-items: center;
}

.template-card h3 {
  margin: 10px 0 7px;
  color: #242530;
  font-size: 1rem;
  line-height: 1.25;
}

.template-card__description {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: #737582;
  font-size: 0.84rem;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.template-card__meta {
  display: none;
}

.template-card__actions {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  margin-top: auto;
  padding-top: 15px;
}

.template-card__actions .button {
  min-height: 36px;
  padding: 0 11px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 750;
}

.template-card__use {
  background: #6c3dbc;
  box-shadow: none;
}

.template-card__use:hover {
  background: #56309b;
}

.filters-drawer {
  margin-top: 32px;
  border: 1px solid #e6e5eb;
  border-radius: 14px;
  background: #fff;
}

@media (max-width: 1000px) {
  .template-grid.template-grid--canva { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .category-browser { grid-template-columns: 1fr; gap: 13px; }
}

@media (max-width: 700px) {
  .templates-home { padding: 28px 16px 48px; }
  .templates-home__header { align-items: flex-start; gap: 16px; }
  .template-grid.template-grid--canva { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
  .template-card__body { padding: 12px; }
  .template-card__actions { grid-template-columns: 1fr; }
  .template-card__details { order: 2; }
}

/* The live home shelf is the primary template picker. Keep every option
   informative at a glance and reveal a deliberate choice rather than making
   people guess whether the thumbnail will start a new design. */
#homepage-template-grid .homepage-template-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(31, 27, 44, 0.06);
  cursor: pointer;
}

#homepage-template-grid .homepage-template-card:hover,
#homepage-template-grid .homepage-template-card:focus-visible {
  transform: translateY(-4px);
  border-color: #cfc4e6;
  box-shadow: 0 14px 26px rgba(48, 31, 85, 0.14);
}

#homepage-template-grid .homepage-template-card > img {
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #f4f3f7;
}

#homepage-template-grid .homepage-template-card__meta {
  display: block;
  position: static;
  padding: 13px 13px 14px;
  color: #242530;
  text-shadow: none;
}

#homepage-template-grid .homepage-template-card__title {
  margin: 0;
  color: #242530;
  font-size: 0.95rem;
  line-height: 1.25;
}

#homepage-template-grid .homepage-template-card__eyebrow {
  margin: 0 0 7px;
  color: #6a5b83;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
}

#homepage-template-grid .homepage-template-card__description {
  display: -webkit-box;
  margin: 8px 0 0;
  overflow: hidden;
  color: #62616d;
  font-size: 0.8rem;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

#homepage-template-grid .homepage-template-card__subline {
  margin: 8px 0 0;
  color: #777987;
  font-size: 0.76rem;
  font-weight: 600;
}

#homepage-template-grid .homepage-template-card__pill {
  border: 0;
  background: transparent;
  padding: 0;
  color: #777987;
  font-size: 0.76rem;
  font-weight: 600;
}

#homepage-template-grid .homepage-template-card__pill + .homepage-template-card__pill::before {
  content: "·";
  margin-right: 7px;
}

.homepage-template-card__actions {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  margin-top: 14px;
}

.homepage-template-card__actions button {
  min-height: 35px;
  border-radius: 8px;
  padding: 0 10px;
  font-size: 0.78rem;
  font-weight: 750;
  cursor: pointer;
}

.homepage-template-card__preview {
  border: 1px solid #dddbe5;
  background: #fff;
  color: #4b4c58;
}

.homepage-template-card__preview:hover { background: #f5f3f9; }

.homepage-template-card__use {
  border: 1px solid #6b3dbb;
  background: #6b3dbb;
  color: #fff;
}

.homepage-template-card__use:hover { background: #56309a; }

@media (max-width: 650px) {
  #homepage-template-grid .homepage-template-card__actions { grid-template-columns: 1fr; }
}

/* Premium editor composition: a light studio canvas around a designed page,
   with deliberate whitespace and compact controls. */
#editor-view.view--active { grid-template-rows: 80px minmax(0, 1fr); background: #f8f8fb; }
.editor-header { min-height: 80px; grid-template-columns: 1fr minmax(240px, .8fr) 1fr; padding: 0 22px; background: linear-gradient(100deg, #08c6cd 0%, #277bea 55%, #7020d5 100%); }
.editor-header__menu { gap: 7px; }
.editor-header button { min-height: 40px; border-radius: 10px; font-size: .9rem; }
.editor-header__menu button:first-child { width: 44px; border-radius: 13px; }
.editor-header__title h2 { font-size: 1.02rem; font-weight: 750; }
.editor-header__actions { gap: 8px; }
.editor-header__actions button { min-width: 40px; padding: 0 11px; }
.editor-header #export-button { min-width: 110px; border-radius: 12px; }

.editor-layout { grid-template-columns: 112px minmax(0, 1fr) 0; height: calc(100vh - 80px); background: #f7f8fb; }
.editor-panel--pages { padding: 15px 8px; border-right-color: #e8e8ee; }
.editor-tool-rail { gap: 9px; }
.editor-tool-rail button { min-height: 65px; border-radius: 13px; color: #3f4350; font-size: .69rem; }
.editor-tool-rail button span { width: 27px; height: 27px; }
.editor-tool-rail button svg { width: 24px; height: 24px; stroke-width: 1.7; }
.editor-tool-rail button:hover, .editor-tool-rail button.is-active { background: #f0edfb; color: #5e35b0; }

.editor-canvas-shell { display: block; height: 100%; position: relative; }
.canvas-toolbar { position: absolute; z-index: 12; top: 20px; left: 50%; min-height: 56px; width: auto; transform: translateX(-50%); padding: 8px 14px; border: 1px solid rgba(36, 37, 48, .08); border-radius: 16px; background: rgba(255,255,255,.94); box-shadow: 0 12px 26px rgba(28, 29, 41, .13); backdrop-filter: blur(12px); }
.canvas-toolbar:not(.has-selection) { display: none; }
.canvas-toolbar.has-selection > span { display: none; }
.canvas-toolbar.has-selection .canvas-toolbar__actions { display: flex; }
.canvas-toolbar__actions .button { display: grid; width: 38px; min-width: 38px; min-height: 38px; padding: 0; place-items: center; border-radius: 9px; color: transparent !important; font-size: 0 !important; line-height: 0 !important; }
.canvas-toolbar__actions .button::before { color: #323545; font-size: 18px; font-weight: 700; line-height: 1; }
.canvas-toolbar__actions .button:nth-child(1)::before { content: "⧉"; }
.canvas-toolbar__actions .button:nth-child(2)::before { content: "⌫"; }
.canvas-toolbar__actions .button:nth-child(3)::before { content: "⌑"; }
.canvas-toolbar__actions .button:nth-child(4)::before { content: "⇡"; }
.canvas-toolbar__actions .button:nth-child(5)::before { content: "⇣"; }
.canvas-toolbar__actions .button:nth-child(6)::before { content: "≡"; }
.canvas-toolbar__actions .button:nth-child(7)::before { content: "≡"; }
.canvas-toolbar__actions .button:nth-child(8)::before { content: "↑"; }
.canvas-toolbar__actions .button:nth-child(9)::before { content: "↓"; }
.canvas-toolbar__actions .button:nth-child(10)::before { content: "←"; }
.canvas-toolbar__actions .button:nth-child(11)::before { content: "→"; }
.canvas-toolbar__actions .button:hover { background: #f0edfb; color: #5c36ae; }

.canvas-stage { box-sizing: border-box; height: calc(100vh - 156px); min-height: 0; padding: 84px 60px 34px; background: radial-gradient(circle at 50% 42%, #fff 0, #f7f8fb 45%, #eef0f5 100%); }
.artboard { box-shadow: 0 16px 40px rgba(32, 35, 49, .16); border: 8px solid #fff; }
.editor-bottom-bar { box-sizing: border-box; position: absolute; right: 0; bottom: 0; left: 0; min-height: 76px; padding: 12px 32px; border-top-color: #e7e8ed; box-shadow: 0 -4px 16px rgba(33, 34, 45, .035); }
.editor-bottom-bar > #duplicate-page { min-width: 280px; min-height: 46px; margin-left: 25%; border-color: #d8d9e1; border-radius: 13px; background: #fff; box-shadow: 0 1px 2px rgba(30,30,40,.03); }
.editor-bottom-bar > #duplicate-page:hover { border-color: #9d85ca; background: #f8f5fe; }
.editor-bottom-bar__zoom input { width: 150px; }
.editor-bottom-bar__pages { min-height: 40px !important; padding: 0 12px !important; border: 1px solid #e1e2e8 !important; border-radius: 10px !important; background: #fff !important; }

@media (max-width: 850px) {
  .editor-canvas-shell { height: 100%; }
  .canvas-toolbar { top: 12px; }
  .canvas-stage { height: calc(100vh - 138px); padding: 54px 8px 16px; }
  .editor-bottom-bar > #duplicate-page { min-width: 136px; margin-left: 0; }
}

/* Template editor: reference workspace composition.  Kept at the end of the
   stylesheet so opening any template always uses this focused canvas view. */
@media (min-width: 851px) {
  #editor-view.view--active {
    grid-template-rows: 81px minmax(0, 1fr);
    background: #f4f5f8;
  }

  .editor-header {
    min-height: 81px;
    grid-template-columns: 1fr minmax(250px, .7fr) 1fr;
    padding: 0 17px 0 32px;
    background: linear-gradient(101deg, #06c5c7 0%, #2675e9 54%, #7d1dd3 100%);
  }

  .editor-header__menu { gap: 11px; }
  .editor-header__actions { gap: 12px; }
  .editor-header__title { display: none; }
  .editor-header__menu button:first-child {
    width: 40px;
    border: 0;
    background: transparent;
  }
  .editor-header .editor-icon-button { width: 42px; height: 42px; min-height: 42px; }
  .editor-header #export-button { min-width: 136px; min-height: 54px; border-radius: 13px; }

  .editor-layout {
    grid-template-columns: 112px minmax(0, 1fr);
    height: 100%;
    overflow: hidden;
  }

  .editor-panel--pages {
    z-index: 5;
    padding: 17px 8px;
    border-right: 1px solid #e4e5e9;
    background: #fff;
  }
  .editor-tool-rail { gap: 7px; }
  .editor-tool-rail button {
    min-height: 75px;
    gap: 6px;
    border-radius: 12px;
    color: #3e404b;
    font-size: .88rem;
    font-weight: 600;
  }
  .editor-tool-rail button span { width: 28px; height: 28px; }
  .editor-tool-rail button svg { width: 26px; height: 26px; stroke-width: 1.65; }
  .editor-tool-rail button:hover,
  .editor-tool-rail button.is-active { background: #f3f0fb; color: #5b32aa; }

  .editor-canvas-shell { position: relative; display: block; overflow: hidden; }
  .canvas-stage {
    display: grid;
    height: 100%;
    box-sizing: border-box;
    padding: 100px 64px 88px;
    place-items: center;
    overflow: hidden;
    background: radial-gradient(ellipse at 50% 42%, #fff 0%, #fafafd 43%, #f0f1f5 100%);
  }
  .artboard {
    border: 8px solid #fff;
    box-shadow: 0 17px 39px rgba(23, 28, 44, .17);
  }

  .canvas-toolbar {
    position: absolute;
    z-index: 8;
    top: 20px;
    left: 50%;
    min-height: 58px;
    width: auto;
    padding: 7px 15px;
    transform: translateX(-50%);
    border: 0;
    border-radius: 17px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 7px 17px rgba(26, 30, 43, .13);
  }
  .canvas-toolbar:not(.has-selection) { display: flex; }
  .canvas-toolbar:not(.has-selection) > span { display: none; }
  .canvas-toolbar:not(.has-selection) .canvas-toolbar__actions { display: flex; }
  .canvas-toolbar__actions { gap: 7px; }
  .canvas-toolbar__actions .button {
    display: grid;
    width: 39px;
    min-height: 39px;
    padding: 0;
    place-items: center;
    border-radius: 10px;
  }
  .canvas-toolbar__actions .button svg { width: 23px; height: 23px; stroke: #20232e; stroke-width: 1.9; }
  .canvas-toolbar.has-selection .canvas-toolbar__actions .button:nth-child(n+8),
  .canvas-toolbar:not(.has-selection) .canvas-toolbar__actions .button:nth-child(n+8) { display: none; }

  .editor-bottom-bar {
    position: absolute;
    z-index: 7;
    right: 0;
    bottom: 0;
    left: 0;
    min-height: 76px;
    box-sizing: border-box;
    padding: 12px 40px;
    border-top: 1px solid #e5e6ea;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 -4px 18px rgba(35, 38, 49, .035);
  }
  .editor-bottom-bar > #duplicate-page {
    position: absolute;
    left: 50%;
    min-width: 289px;
    min-height: 46px;
    margin: 0;
    padding-right: 66px;
    transform: translateX(-50%);
    border-color: #d9dae1;
    border-radius: 13px;
  }
  .editor-bottom-bar__notes { margin-right: auto; }
  .editor-bottom-bar__zoom { margin-left: auto; }
  .editor-bottom-bar__pages { order: 3; }
  .editor-bottom-bar strong { order: 4; }
}

/* The gallery can scroll; the fixed editor cannot, so do not leave a dead
   browser scrollbar beside an open design. */
body.editor-open { overflow: hidden; }

/* Home template shelf: preview art only.  Remove the boxed-card treatment so
   the template itself is what users scan and choose. */
#homepage-results-summary,
#homepage-see-all { display: none !important; }

#homepage-template-grid {
  display: flex !important;
  gap: 18px !important;
  padding: 2px 0 12px !important;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

#homepage-template-grid::-webkit-scrollbar { display: none; }

#homepage-template-grid .canva-shelf__card,
#homepage-template-grid .homepage-template-card {
  flex: 0 0 228px;
  width: 228px;
  min-height: 0;
  height: 282px;
  aspect-ratio: auto !important;
  overflow: hidden;
  scroll-snap-align: start;
  border: 0;
  border-radius: 15px;
  background: transparent;
  box-shadow: none;
  padding: 0 !important;
}

/* Keep the home picker to the design previews alone, even if card metadata is
   added elsewhere in the app later. */
#homepage-template-grid .homepage-template-card::after,
#homepage-template-grid .homepage-template-card__meta,
#homepage-template-grid .homepage-template-card__caption,
#homepage-template-grid .homepage-template-card__actions {
  display: none !important;
}

#homepage-template-grid .canva-shelf__card img {
  width: 100%;
  min-height: 0;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  object-position: center;
}

#homepage-template-grid .canva-shelf__card:hover,
#homepage-template-grid .canva-shelf__card:focus-visible {
  transform: translateY(-3px);
  outline: none;
  box-shadow: 0 10px 24px rgba(26, 31, 48, .18);
}

/* Reference-matched desktop workspace refinements. */
#editor-view.view--active { grid-template-rows: 81px minmax(0, 1fr); }
.editor-header { width: 100%; min-height: 81px; margin: 0; padding: 0 22px; border: 0; border-radius: 0; grid-template-columns: 1fr minmax(280px, .8fr) 1fr; background: linear-gradient(98deg, #04c5cb 0%, #2778eb 53%, #7920d9 100%); box-shadow: none; }
.editor-header__menu { gap: 12px; }
.editor-header button { min-height: 44px; padding: 0 11px; border-radius: 12px; }
.editor-header__menu button:first-child { width: 38px; border: 0; background: transparent; font-size: 0; }
.editor-header__menu button:first-child svg { width: 27px; height: 27px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linejoin: round; }
.editor-header .editor-icon-button svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.editor-header .editor-icon-button { display: grid; width: 42px; min-width: 42px; height: 42px; padding: 0; place-items: center; border-radius: 50%; font-size: 1.7rem; font-weight: 400; }
.editor-header .editor-icon-button--round { background: rgba(80, 27, 206, .56); font-size: 2rem; }
.editor-header .editor-icon-button--outline { border: 1px solid rgba(255,255,255,.4); border-radius: 12px; font-size: 1.65rem; }
.editor-header .editor-menu-button { display: none; }
.editor-header__title { opacity: 0; pointer-events: none; }
.editor-header #export-button { display: inline-flex; align-items: center; gap: 9px; min-width: 136px; justify-content: center; border-radius: 13px; font-size: 1rem; }
.editor-header #export-button svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.editor-canvas-shell { display: block; position: relative; height: 100%; }
.canvas-stage { height: calc(100vh - 157px); padding: 100px 64px 50px; overflow: hidden; background: radial-gradient(ellipse at 50% 44%, #fff 0%, #fbfbfd 40%, #f0f1f5 100%); }
.artboard { border: 8px solid #fff; box-shadow: 0 18px 42px rgba(19, 24, 40, .18); }
.canvas-toolbar { top: 20px; min-height: 56px; padding: 8px 14px; border-radius: 17px; }
.canvas-toolbar:not(.has-selection) { display: flex; }
.canvas-toolbar:not(.has-selection) > span { display: none; }
.canvas-toolbar:not(.has-selection) .canvas-toolbar__actions { display: flex; }
.canvas-toolbar.has-selection .canvas-toolbar__actions .button:nth-child(n+9),
.canvas-toolbar:not(.has-selection) .canvas-toolbar__actions .button:nth-child(n+9) { display: none; }
.canvas-toolbar__actions .button::before { display: none; }
.canvas-toolbar__actions .button svg { width: 19px; height: 19px; fill: none; stroke: #323545; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.canvas-toolbar__actions .button:hover svg { stroke: #5c36ae; }
.editor-bottom-bar { min-height: 76px; padding: 12px 40px; gap: 24px; }
.editor-bottom-bar > #duplicate-page { position: absolute; left: 50%; min-width: 288px; margin: 0; transform: translateX(-50%); }
.editor-bottom-bar__notes { display: inline-flex; align-items: center; gap: 9px; min-width: 0 !important; margin-right: auto; border: 0 !important; color: #262938 !important; font-size: .92rem !important; font-weight: 700 !important; }
.editor-bottom-bar__notes:hover { background: transparent !important; }
.editor-bottom-bar__notes svg,
.editor-bottom-bar > #duplicate-page svg,
.editor-bottom-bar__pages svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.editor-bottom-bar > #duplicate-page,
.editor-bottom-bar__pages { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.artboard-element--icon { display: grid; place-items: center; pointer-events: auto; }
.artboard-element--icon svg { width: 72%; height: 72%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Cover-page details deliberately mirror the reference treatment while
   remaining independent editable layers. */
.artboard-element[data-element-id="shape-2"] { border-radius: 0 180px 180px 0 !important; }
.artboard-element[data-element-id="shape-2"] { overflow: hidden; }
.artboard-element[data-element-id="shape-2"]::after { position: absolute; bottom: 48px; left: 66px; width: 210px; height: 150px; background-image: radial-gradient(circle, rgba(181, 159, 255, .85) 1.5px, transparent 1.7px); background-size: 22px 22px; content: ""; opacity: .9; }
.artboard-element[data-element-id="shape-4"] { box-shadow: 0 22px 30px rgba(24, 31, 58, .13); }
.artboard-element[data-element-id="shape-9"] { box-sizing: border-box; }
.editor-bottom-bar > #duplicate-page { overflow: hidden; padding-right: 66px; }
.editor-bottom-bar > #duplicate-page::after { position: absolute; top: 0; right: 0; display: grid; width: 58px; height: 100%; place-items: center; border-left: 1px solid #d8d9e1; color: #2d3040; content: "⌄"; font-size: 1.25rem; font-weight: 700; }
.editor-bottom-bar__expand { margin-left: 0; color: #262938; font-size: 1.3rem; }
.editor-bottom-bar__expand svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.page-item__remove svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.editor-bottom-bar__zoom { margin-left: auto; }
.editor-bottom-bar__pages { order: 3; }
.editor-bottom-bar strong { order: 4; }

@media (max-width: 850px) {
  .editor-header .editor-icon-button:nth-of-type(n+4), .editor-header .editor-icon-button--outline { display: none; }
  .editor-header #export-button { min-width: 92px; }
  .canvas-stage { height: calc(100vh - 138px); padding: 54px 8px 16px; }
  .editor-bottom-bar__notes { display: none !important; }
}

/* Full-screen design workspace: the selected template remains a real editable
   artboard, surrounded by familiar creation controls. */
#editor-view.view--active {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  grid-template-rows: 84px minmax(0, 1fr);
  overflow: hidden;
  background: #f1f2f6;
}

.editor-header {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(260px, 1fr) minmax(300px, 1fr);
  align-items: center;
  gap: 18px;
  padding: 0 16px;
  color: #fff;
  background: linear-gradient(105deg, #00bfd1 0%, #346edd 56%, #7a20d2 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.26) inset;
}

.editor-header__menu,
.editor-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.editor-header__actions { justify-content: flex-end; }

.editor-header button {
  min-height: 38px;
  border: 0;
  border-radius: 9px;
  padding: 0 14px;
  background: transparent;
  color: #fff;
  font-size: 0.98rem;
  font-weight: 750;
  cursor: pointer;
}

.editor-header__menu button:first-child {
  width: 42px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.6);
  font-size: 1.3rem;
}

.editor-header button:hover { background: rgba(255, 255, 255, 0.15); }

.editor-header #save-button {
  border: 1px solid rgba(255,255,255,.45);
  background: rgba(255, 255, 255, 0.12);
}

.editor-header #export-button {
  background: #fff;
  color: #242436;
  box-shadow: 0 3px 10px rgba(37, 21, 73, 0.18);
}

.editor-header__title { text-align: center; }
.editor-header__title h2 { overflow: hidden; margin: 0; color: #fff; font-size: 1.15rem; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.editor-status { margin: 3px 0 0; color: rgba(255,255,255,.76); font-size: .72rem; }

.resize-popover {
  position: fixed;
  z-index: 70;
  top: 72px;
  left: 102px;
  display: grid;
  gap: 8px;
  width: min(365px, calc(100vw - 28px));
  padding: 16px;
  border: 1px solid #e2dff0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(31, 20, 58, .23);
}
.file-popover {
  position: fixed;
  z-index: 70;
  top: 72px;
  left: 72px;
  display: grid;
  gap: 4px;
  width: 210px;
  padding: 8px;
  border: 1px solid #e2dff0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(31, 20, 58, .23);
}
.file-popover button { min-height: 38px; border: 0; border-radius: 8px; background: #fff; color: #40414d; text-align: left; font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; }
.file-popover button:hover { background: #f3f0fb; color: #56309b; }
.apps-popover {
  position: fixed;
  z-index: 70;
  bottom: 74px;
  left: 76px;
  display: grid;
  gap: 5px;
  width: 220px;
  padding: 12px;
  border: 1px solid #e2dff0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(31, 20, 58, .23);
}
.apps-popover strong { padding: 2px 4px 7px; color: #383945; font-size: .84rem; }
.apps-popover button { min-height: 36px; border: 0; border-radius: 8px; background: #fff; color: #464752; text-align: left; font: inherit; font-size: .79rem; font-weight: 700; cursor: pointer; }
.apps-popover button:hover { background: #f3f0fb; color: #56309b; }
.resize-popover strong { color: #292a36; font-size: .98rem; }
.resize-popover > span { color: #747583; font-size: .78rem; line-height: 1.4; }
.resize-popover__options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.resize-popover__options button { min-height: 60px; border: 1px solid #e0ddec; border-radius: 9px; background: #fff; color: #41424d; font: inherit; font-size: .8rem; font-weight: 750; cursor: pointer; }
.resize-popover__options button:hover { border-color: #8c69c8; background: #f4f0fd; color: #5931a4; }
.resize-popover__options small { color: #7d7e8b; font-size: .68rem; font-weight: 600; }

.editor-layout {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) 0;
  gap: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
}

.editor-panel--pages {
  display: flex;
  min-height: 0;
  padding: 11px 6px;
  overflow-y: auto;
  border: 0;
  border-right: 1px solid #e0e1e6;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.editor-tool-rail {
  display: grid;
  align-content: start;
  width: 100%;
  gap: 6px;
}

.editor-tool-rail button {
  display: grid;
  justify-items: center;
  gap: 4px;
  width: 100%;
  min-height: 65px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #545665;
  font-size: .71rem;
  font-weight: 650;
  cursor: pointer;
}

.editor-tool-rail button span { display: grid; width: 25px; height: 25px; place-items: center; line-height: 1; }
.editor-tool-rail button svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.editor-tool-rail button:hover,
.editor-tool-rail button.is-active { background: #f0ebfd; color: #5b31a8; }

.page-list { display: none; }
.page-list.is-open {
  position: fixed;
  z-index: 50;
  bottom: 76px;
  left: 126px;
  display: grid;
  width: min(285px, calc(100vw - 150px));
  max-height: min(60vh, 520px);
  gap: 7px;
  overflow-y: auto;
  padding: 12px;
  border: 1px solid #dedbe7;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(34, 26, 55, .2);
}
.recent-list.is-open {
  position: fixed;
  z-index: 50;
  bottom: 76px;
  left: 126px;
  display: grid;
  width: min(330px, calc(100vw - 150px));
  max-height: min(60vh, 520px);
  gap: 8px;
  overflow-y: auto;
  padding: 12px;
  border: 1px solid #dedbe7;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(34, 26, 55, .2);
}
.recent-list.is-open .recent-item { width: 100%; border: 1px solid #e1deeb; border-radius: 9px; padding: 10px; background: #faf9fc; color: #454651; text-align: left; cursor: pointer; }
.recent-list.is-open .recent-item:hover { border-color: #a98ddd; background: #f0ebfc; }
.recent-list.is-open .recent-item span { color: #7d7e8b; font-size: .68rem; }
.page-list.is-open::before {
  content: "Pages";
  padding: 2px 3px 8px;
  color: #323340;
  font-size: .9rem;
  font-weight: 800;
}
.page-list__row { display: grid; grid-template-columns: minmax(0, 1fr) 30px; gap: 5px; }
.page-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 3px 8px;
  align-items: center;
  min-height: 55px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: #f8f7fa;
  color: #4b4c58;
  text-align: left;
  cursor: pointer;
}
.page-item__remove { border: 0; border-radius: 8px; background: transparent; color: #8a8b96; font-size: 1.18rem; cursor: pointer; }
.page-item__remove:hover:not(:disabled) { background: #fff0f1; color: #b3264d; }
.page-item__remove:disabled { opacity: .35; cursor: not-allowed; }
.page-item:hover, .page-item.is-active { border-color: #a98ddd; background: #f0ebfc; }
.page-item__number { grid-row: span 2; display: grid; width: 26px; height: 26px; place-items: center; border-radius: 6px; background: #fff; color: #6b3dbb; font-size: .75rem; font-weight: 800; }
.page-item strong { font-size: .78rem; }
.page-item > span:last-child { color: #81828d; font-size: .68rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.editor-panel--inspector { display: none; }
.editor-panel--inspector.is-open {
  position: fixed;
  z-index: 55;
  top: 96px;
  right: 16px;
  display: block;
  width: min(306px, calc(100vw - 150px));
  max-height: calc(100vh - 180px);
  overflow-y: auto;
  padding: 18px;
  border: 1px solid #dedbe8;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(34, 26, 55, .2);
}
.editor-panel--inspector .panel-header { margin-bottom: 12px; }
.editor-panel--inspector .panel-header h3 { margin: 0; color: #343542; font-size: 1rem; }
.editor-panel--inspector .inspector-form { gap: 10px; }
.editor-panel--inspector .inspector-form label { gap: 4px; }
.editor-panel--inspector .inspector-form span { color: #6e7080; font-size: .72rem; font-weight: 700; }
.editor-panel--inspector .inspector-form input,
.editor-panel--inspector .inspector-form textarea,
.editor-panel--inspector .inspector-form select { width: 100%; border: 1px solid #dcdae4; border-radius: 7px; padding: 7px; font: inherit; }

.editor-canvas-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  gap: 0;
}

.canvas-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 52px;
  padding: 8px 22px;
  border: 0;
  border-bottom: 1px solid #e2e3e8;
  border-radius: 0;
  background: rgba(255,255,255,.86);
}

.canvas-toolbar > span { margin-right: auto; color: #777987; font-size: .8rem; }
.canvas-toolbar__actions { display: none; flex-wrap: nowrap; gap: 4px; overflow: hidden; }
.canvas-toolbar.has-selection { background: #fff; }
.canvas-toolbar.has-selection .canvas-toolbar__actions { display: flex; }
.canvas-toolbar:not(.has-selection) { justify-content: center; }
.canvas-toolbar:not(.has-selection) > span { margin-right: 0; color: #797481; font-weight: 650; }
.canvas-toolbar__actions .button {
  min-height: 32px;
  padding: 0 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #555765;
  font-size: .73rem;
  white-space: nowrap;
}
.canvas-toolbar__actions .button:hover { background: #ecebf1; }

.canvas-stage {
  display: grid;
  min-height: 0;
  padding: 48px 42px;
  place-items: center;
  overflow: auto;
  background: #f3f4f7;
}

.artboard {
  border: 0;
  border-radius: 0;
  box-shadow: 0 10px 27px rgba(35, 37, 48, 0.18);
}

.artboard-element.is-selected {
  border: 2px solid #7d41d8;
  box-shadow: 0 0 0 2px rgba(125, 65, 216, 0.17);
}

.artboard-element { touch-action: none; cursor: grab; }
.artboard-element:active { cursor: grabbing; }

.editor-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 23px;
  min-height: 64px;
  padding: 10px 22px;
  border-top: 1px solid #e0e1e6;
  background: #fff;
  color: #5d5f6d;
  font-size: .9rem;
}

.editor-bottom-bar button {
  min-width: 270px;
  min-height: 42px;
  border: 1px solid #a9acb6;
  border-radius: 10px;
  background: #fff;
  color: #2c2e3a;
  font-size: 1rem;
  font-weight: 750;
  cursor: pointer;
}

.editor-bottom-bar .editor-bottom-bar__pages {
  min-width: 0;
  min-height: 32px;
  border: 0;
  padding: 0 5px;
  color: #5d5f6d;
  font-size: .9rem;
  font-weight: 600;
}

.editor-bottom-bar button:hover { background: #f5f3f9; }
.editor-bottom-bar__zoom { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; color: #5d5f6d; font-size: .78rem; }
.editor-bottom-bar__zoom input { width: 112px; accent-color: #7440c5; }
.editor-bottom-bar__zoom output { min-width: 34px; text-align: right; font-weight: 750; }
.editor-bottom-bar__zoom { margin-left: auto; }

@media (max-width: 850px) {
  #editor-view.view--active { grid-template-rows: auto minmax(0, 1fr); }
  .editor-header { grid-template-columns: 1fr auto; padding: 8px; }
  .editor-header__title { display: none; }
  .editor-header__menu button:not(:first-child), .editor-header #save-button { display: none; }
  .resize-popover { top: 62px; left: 12px; }
  .file-popover { top: 62px; left: 12px; }
  .apps-popover { bottom: 66px; left: 70px; }
  .editor-layout { grid-template-columns: 64px minmax(0, 1fr) 0; }
  .editor-tool-rail button { min-height: 54px; font-size: .62rem; }
  .canvas-toolbar > span { display: none; }
  .canvas-toolbar { justify-content: center; min-height: 44px; padding: 6px; }
  .canvas-toolbar__actions .button:nth-child(n+3) { display: none; }
  .canvas-stage { padding: 18px 8px; }
  .editor-bottom-bar { justify-content: space-between; gap: 6px; min-height: 58px; padding: 8px 10px; font-size: .72rem; }
  .editor-bottom-bar button { min-width: 136px; min-height: 38px; font-size: .9rem; }
  .editor-bottom-bar__zoom, .editor-bottom-bar > span:last-child { display: none; }
  .editor-bottom-bar__pages { display: inline-flex; align-items: center; }
  .editor-bottom-bar strong { white-space: nowrap; }
}

/* Final desktop override: the open-template workspace matches the supplied
   editor reference while preserving the existing editable artboard. */
@media (min-width: 851px) {
  #editor-view.view--active { grid-template-rows: 64px minmax(0, 1fr); background: #f4f5f8; }
  .editor-header { min-height: 64px; grid-template-columns: 1fr minmax(250px, .7fr) 1fr; padding: 0 14px 0 22px; background: linear-gradient(101deg, #06c5c7 0%, #2675e9 54%, #7d1dd3 100%); }
  .editor-header__menu { gap: 11px; }
  .editor-header__actions { gap: 12px; }
  .editor-header__title { display: none; }
  .editor-header__menu button:first-child { width: 40px; border: 0; background: transparent; }
  .editor-header .editor-icon-button { width: 36px; height: 36px; min-height: 36px; }
  .editor-header #export-button { min-width: 118px; min-height: 43px; border-radius: 11px; }

  .editor-layout { grid-template-columns: 72px minmax(0, 1fr); height: 100%; overflow: hidden; }
  .editor-panel--pages { z-index: 5; padding: 7px 4px; border-right: 1px solid #e4e5e9; background: #fff; }
  .editor-tool-rail { gap: 1px; }
  .editor-tool-rail button { min-height: 52px; gap: 2px; border-radius: 8px; color: #3e404b; font-size: .64rem; font-weight: 600; }
  .editor-tool-rail button span { width: 20px; height: 20px; }
  .editor-tool-rail button svg { width: 20px; height: 20px; stroke-width: 1.65; }
  .editor-tool-rail button:hover, .editor-tool-rail button.is-active { background: #f3f0fb; color: #5b32aa; }

  .editor-canvas-shell { position: relative; display: block; overflow: hidden; }
  .canvas-stage { display: grid; height: 100%; box-sizing: border-box; padding: 82px 54px 70px; place-items: center; overflow: hidden; background: radial-gradient(ellipse at 50% 42%, #fff 0%, #fafafd 43%, #f0f1f5 100%); }
  .artboard { border: 8px solid #fff; box-shadow: 0 17px 39px rgba(23, 28, 44, .17); }

  .canvas-toolbar { position: absolute; z-index: 8; top: 20px; left: 50%; min-height: 58px; width: auto; padding: 7px 15px; transform: translateX(-50%); border: 0; border-radius: 17px; background: rgba(255, 255, 255, .96); box-shadow: 0 7px 17px rgba(26, 30, 43, .13); }
  .canvas-toolbar:not(.has-selection) { display: flex; }
  .canvas-toolbar:not(.has-selection) > span { display: none; }
  .canvas-toolbar:not(.has-selection) .canvas-toolbar__actions { display: flex; }
  .canvas-toolbar__actions { gap: 7px; }
  .canvas-toolbar__actions .button { display: grid; width: 39px; min-height: 39px; padding: 0; place-items: center; border-radius: 10px; }
  .canvas-toolbar__actions .button svg { width: 23px; height: 23px; stroke: #20232e; stroke-width: 1.9; }
  .canvas-toolbar.has-selection .canvas-toolbar__actions .button:nth-child(n+8), .canvas-toolbar:not(.has-selection) .canvas-toolbar__actions .button:nth-child(n+8) { display: none; }

  .editor-bottom-bar { position: absolute; z-index: 7; right: 0; bottom: 0; left: 0; min-height: 52px; box-sizing: border-box; padding: 6px 20px; border-top: 1px solid #e5e6ea; background: rgba(255, 255, 255, .98); box-shadow: 0 -4px 18px rgba(35, 38, 49, .035); }
  .editor-bottom-bar > #duplicate-page { position: absolute; left: 50%; min-width: 210px; min-height: 34px; margin: 0; padding-right: 49px; transform: translateX(-50%); border-color: #d9dae1; border-radius: 9px; font-size: .8rem; }
  .editor-bottom-bar__notes { margin-right: auto; }
  .editor-bottom-bar__zoom { margin-left: auto; }
  .editor-bottom-bar__pages { order: 3; }
  .editor-bottom-bar strong { order: 4; }
}
/* Editor interaction polish: every control is readable, discoverable, and
   clearly changes state when it is being used. */
@media (min-width: 851px) {
  .editor-header__title {
    display: block !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .editor-header__title h2 {
    max-width: 360px;
    margin: 0 auto !important;
    font-size: .95rem !important;
    font-weight: 750;
  }

  .editor-status {
    display: block !important;
    max-width: 360px;
    overflow: hidden;
    margin: 2px auto 0 !important;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .editor-header button[title] {
    position: relative;
    transition: transform 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
  }

  .editor-header button[title]:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(15, 18, 56, .18);
  }

  .editor-header button[title]::after {
    position: absolute;
    z-index: 80;
    top: calc(100% + 10px);
    left: 50%;
    padding: 6px 8px;
    border-radius: 7px;
    background: #23233a;
    color: #fff;
    content: attr(title);
    font-family: var(--font-body);
    font-size: .7rem;
    font-weight: 650;
    line-height: 1;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -4px);
    transition: opacity 140ms ease, transform 140ms ease;
    white-space: nowrap;
  }

  .editor-header button[title]:hover::after,
  .editor-header button[title]:focus-visible::after {
    opacity: 1;
    transform: translate(-50%, 0);
  }

  .editor-header button:focus-visible,
  .editor-tool-rail button:focus-visible,
  .canvas-toolbar__actions .button:focus-visible,
  .editor-bottom-bar button:focus-visible {
    outline: 3px solid rgba(114, 68, 213, .42);
    outline-offset: 2px;
  }

  .editor-panel--pages {
    overflow: visible !important;
  }

  .editor-tool-rail button {
    position: relative;
    overflow: visible;
    isolation: isolate;
    transition: transform 150ms ease, background-color 150ms ease, color 150ms ease, box-shadow 150ms ease;
  }

  .editor-tool-rail button::before {
    position: absolute;
    top: 11px;
    bottom: 11px;
    left: 1px;
    width: 3px;
    border-radius: 999px;
    background: #6d38c7;
    content: "";
    opacity: 0;
    transform: scaleY(.35);
    transition: opacity 150ms ease, transform 150ms ease;
  }

  .editor-tool-rail button:hover,
  .editor-tool-rail button.is-active {
    background: linear-gradient(135deg, #f3edff, #eeeafe) !important;
    color: #5f31ad !important;
    box-shadow: 0 4px 12px rgba(91, 49, 168, .1);
    transform: translateX(2px);
  }

  .editor-tool-rail button:hover::before,
  .editor-tool-rail button.is-active::before {
    opacity: 1;
    transform: scaleY(1);
  }

  .editor-tool-rail button[data-tooltip]::after {
    position: absolute;
    z-index: 60;
    top: 50%;
    left: calc(100% + 10px);
    padding: 7px 9px;
    border-radius: 8px;
    background: #24243a;
    box-shadow: 0 8px 20px rgba(22, 22, 38, .2);
    color: #fff;
    content: attr(data-tooltip);
    font-size: .72rem;
    font-weight: 650;
    line-height: 1;
    opacity: 0;
    pointer-events: none;
    transform: translate(-5px, -50%);
    transition: opacity 140ms ease, transform 140ms ease;
    white-space: nowrap;
  }

  .editor-tool-rail button[data-tooltip]:hover::after,
  .editor-tool-rail button[data-tooltip]:focus-visible::after {
    opacity: 1;
    transform: translate(0, -50%);
  }

  .canvas-toolbar {
    overflow: visible !important;
    border: 1px solid rgba(103, 74, 167, .16) !important;
    box-shadow: 0 14px 30px rgba(26, 30, 43, .16) !important;
    opacity: 1;
    transition: opacity 150ms ease, transform 150ms ease, box-shadow 150ms ease;
  }

  .canvas-toolbar:not(.has-selection) {
    display: flex !important;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -10px);
  }

  .canvas-toolbar.has-selection {
    display: flex !important;
    pointer-events: auto;
    transform: translate(-50%, 0);
  }

  .canvas-toolbar__actions {
    overflow: visible !important;
  }

  .canvas-toolbar.has-selection .canvas-toolbar__actions .button {
    position: relative;
    overflow: visible;
    border: 1px solid transparent;
    transition: transform 140ms ease, background-color 140ms ease, border-color 140ms ease;
  }

  .canvas-toolbar.has-selection .canvas-toolbar__actions .button:hover {
    border-color: #d5c7f4;
    background: #f4f0fe;
    transform: translateY(-1px);
  }

  .canvas-toolbar.has-selection .canvas-toolbar__actions .button[aria-label]::after {
    position: absolute;
    z-index: 70;
    top: calc(100% + 10px);
    left: 50%;
    padding: 6px 8px;
    border-radius: 7px;
    background: #24243a;
    color: #fff;
    content: attr(aria-label);
    font-size: .7rem;
    font-weight: 650;
    line-height: 1;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -4px);
    transition: opacity 140ms ease, transform 140ms ease;
    white-space: nowrap;
  }

  .canvas-toolbar.has-selection .canvas-toolbar__actions .button:hover::after,
  .canvas-toolbar.has-selection .canvas-toolbar__actions .button:focus-visible::after {
    opacity: 1;
    transform: translate(-50%, 0);
  }

  .editor-bottom-bar button {
    transition: transform 150ms ease, background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
  }

  .editor-bottom-bar button:hover {
    border-color: #cbbcf0 !important;
    background: #faf8ff !important;
    box-shadow: 0 6px 14px rgba(70, 52, 119, .1);
    transform: translateY(-1px);
  }
}

/* Standalone website responsive correction: keep the navbar and gallery
   inside the viewport when the browser has a narrower desktop CSS width. */
body.template-viewpoint--standalone .template-navbar,
body.template-viewpoint--standalone .main-content,
body.template-viewpoint--standalone #gallery-view,
body.template-viewpoint--standalone .canva-homepage,
body.template-viewpoint--standalone .canva-homepage__main {
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

body.template-viewpoint--standalone .template-navbar {
  width: 100% !important;
  overflow: hidden !important;
}

body.template-viewpoint--standalone .template-navbar__brand,
body.template-viewpoint--standalone .template-navbar__nav,
body.template-viewpoint--standalone .template-navbar__status,
body.template-viewpoint--standalone .template-navbar__create {
  min-width: 0 !important;
}

body.template-viewpoint--standalone .template-navbar__brand {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body.template-viewpoint--standalone .template-navbar__nav {
  overflow: hidden !important;
}

body.template-viewpoint--standalone.template-view--gallery .canva-homepage__hero-panel {
  width: 100% !important;
  max-width: 100% !important;
}

@media (max-width: 1280px) {
  body.template-viewpoint--standalone .template-navbar {
    grid-template-columns: minmax(0, auto) minmax(0, 1fr) minmax(0, auto) !important;
    gap: 10px !important;
    padding-inline: 16px !important;
  }

  body.template-viewpoint--standalone .template-navbar__status {
    display: none !important;
  }

  body.template-viewpoint--standalone .template-navbar__nav {
    justify-content: center !important;
    gap: 2px !important;
  }

  body.template-viewpoint--standalone .template-navbar__item {
    padding-inline: 10px !important;
  }
}

@media (max-width: 700px) {
  body.template-viewpoint--standalone .template-navbar {
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 8px !important;
    padding-inline: 12px !important;
  }

  body.template-viewpoint--standalone .template-navbar__nav {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    justify-content: flex-start !important;
    overflow-x: auto !important;
  }

  body.template-viewpoint--standalone .template-navbar__create {
    grid-column: 2 !important;
    grid-row: 1 !important;
  }
}

@keyframes layer-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Home cards must show the full designed artboard; cropping would hide the
   very hierarchy and context the card is meant to communicate. */
#homepage-template-grid .homepage-template-card > img {
  object-fit: contain !important;
  object-position: center;
}

/* Templates discovery screen — a calm, deliberately structured starting point
   modelled on the supplied reference. */
@media (min-width: 851px) {
  body .canva-homepage__main {
    grid-template-rows: 270px 62px minmax(0, 1fr);
    padding: 18px 32px 24px !important;
    row-gap: 10px;
    overflow: hidden;
  }

  body .canva-homepage__hero-panel {
    display: grid;
    place-items: center;
    align-content: center;
    min-height: 0;
    height: 100%;
    padding: 26px 30px 20px;
    border-radius: 24px;
    background: radial-gradient(circle at 2% 10%, rgba(116, 235, 234, .6), transparent 35%), linear-gradient(112deg, #eafbfa 0%, #fbf9ff 48%, #ead7ff 100%);
    box-shadow: 0 10px 28px rgba(91, 75, 137, .08);
  }

  body .canva-homepage__hero-panel h2 {
    margin: 0;
    color: #17151d;
    font-size: clamp(2.4rem, 4vw, 3.55rem);
    font-weight: 500;
    letter-spacing: -.065em;
    line-height: 1;
  }

  .canva-homepage__trial {
    position: absolute;
    top: 24px;
    right: 30px;
    min-height: 48px;
    padding: 0 22px;
    border: 1px solid #eee7ff;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 5px 16px rgba(52, 34, 87, .1);
    color: #22202a;
    font-size: 1rem;
    font-weight: 700;
  }

  .canva-homepage__trial:first-letter { color: #eaa624; }

  .canva-homepage__crumbs {
    display: flex;
    gap: 10px;
    margin: 18px 0 14px;
    color: #302d37;
    font-size: .94rem;
  }

  .canva-homepage__crumbs span,
  .canva-homepage__crumbs strong {
    padding: 9px 16px;
    border: 1px solid #e8ddff;
    border-radius: 999px;
    background: rgba(255,255,255,.68);
    font-weight: 500;
  }

  .canva-homepage__crumbs strong {
    border-color: #9748ff;
    background: #f8f1ff;
    color: #331c56;
  }

  body .canva-homepage__search {
    width: min(100%, 880px);
    min-height: 62px;
    margin: 0;
    padding: 0 25px;
    border: 2px solid #9748ff;
    border-radius: 26px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(130, 62, 220, .12);
  }

  body .canva-homepage__search input { font-size: 1.03rem; }

  body .canva-quickrow {
    grid-template-columns: repeat(4, max-content);
    justify-content: center;
    gap: 12px;
    padding: 0;
  }

  body .canva-quickrow__item--presentation,
  body .canva-quickrow__item--social,
  body .canva-quickrow__item--video { display: none; }

  body .canva-quickrow__item--templates,
  body .canva-quickrow__item--magic,
  body .canva-quickrow__item--print,
  body .canva-quickrow__item--presentation {
    display: inline-flex;
    width: auto;
    min-height: 46px;
    padding: 0 17px 0 10px;
    align-items: center;
    gap: 9px;
    border: 1px solid #e8ddff;
    border-radius: 999px;
    background: #fff;
    color: #302d37;
    font-size: .94rem;
    font-weight: 600;
  }

  body .canva-quickrow__item--templates .canva-quickrow__icon,
  body .canva-quickrow__item--magic .canva-quickrow__icon,
  body .canva-quickrow__item--print .canva-quickrow__icon,
  body .canva-quickrow__item--presentation .canva-quickrow__icon {
    width: 26px;
    height: 26px;
    background-size: 15px 15px;
  }

  body .canva-shelf { padding: 0 4px; }
  body .canva-shelf__header { margin-bottom: 12px; }
  body .canva-shelf__header h3 { font-size: 1.55rem; letter-spacing: -.035em; }

  body #homepage-template-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 0;
    gap: 14px !important;
  }

  body #homepage-template-grid .homepage-template-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 43%;
    grid-template-rows: 1fr;
    align-items: stretch;
    border: 0;
    border-radius: 20px;
    background: #efe2ff;
    box-shadow: none;
  }

  body #homepage-template-grid .homepage-template-card:nth-child(5n + 1) { background: #fee3d3; }
  body #homepage-template-grid .homepage-template-card:nth-child(5n + 2) { background: #e8cdfd; }
  body #homepage-template-grid .homepage-template-card:nth-child(5n + 3) { background: #dcd9ff; }
  body #homepage-template-grid .homepage-template-card:nth-child(5n + 4) { background: #f4d4f4; }
  body #homepage-template-grid .homepage-template-card:nth-child(5n + 5) { background: #fff1be; }

  body #homepage-template-grid .homepage-template-card:nth-child(n + 11) { display: none; }

  body #homepage-template-grid .homepage-template-card > img {
    grid-column: 2;
    width: 100%;
    height: 100%;
    padding: 10px 10px 10px 0;
    object-fit: contain !important;
    object-position: right center;
  }

  body #homepage-template-grid .homepage-template-card__meta {
    grid-column: 1;
    grid-row: 1;
    display: grid;
    align-content: center;
    min-width: 0;
    padding: 16px;
  }

  body #homepage-template-grid .homepage-template-card__title {
    font-size: clamp(.78rem, 1.1vw, 1rem);
    font-weight: 700;
    line-height: 1.2;
    -webkit-line-clamp: 3;
  }
}

/* Final templates layout precedence.  This follows the legacy homepage rules
   so the discovery screen has one authoritative responsive composition. */
@media (min-width: 701px) {
  html, body { width: 100%; height: 100%; overflow: hidden !important; }
  .app-shell { grid-template-columns: minmax(0, 1fr) !important; }
  .main-content { grid-column: 1 / -1 !important; }
  .app-shell, .main-content, #gallery-view, .canva-homepage {
    width: 100% !important;
    height: 100dvh !important;
    min-width: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }
  .canva-homepage { grid-template-columns: 72px minmax(0, 1fr) !important; }
  .canva-homepage__sidebar { height: 100% !important; overflow: hidden !important; }
  body .canva-homepage__main {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 248px 56px minmax(0, 1fr) !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 12px 18px 16px !important;
    row-gap: 8px !important;
    overflow: hidden !important;
  }
  body .canva-homepage__hero, body .canva-homepage__hero-panel,
  body .canva-quickrow, body .canva-shelf {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
  body .canva-homepage__hero { height: 100% !important; }
  body .canva-homepage__hero-panel {
    display: grid !important;
    position: relative !important;
    height: 100% !important;
    min-height: 0 !important;
    padding: 22px 22px 16px !important;
    place-items: center !important;
    align-content: center !important;
    overflow: hidden !important;
  }
  body .canva-homepage__hero-panel h2 {
    display: block !important;
    max-width: none !important;
    margin: 0 !important;
    color: #17151d !important;
    font-size: clamp(2.1rem, 5vw, 3.45rem) !important;
    font-weight: 500 !important;
    letter-spacing: -.065em !important;
  }
  .canva-homepage__trial { top: 18px !important; right: 20px !important; min-height: 42px !important; font-size: .88rem !important; }
  .canva-homepage__crumbs { display: flex !important; margin: 14px 0 12px !important; }
  body .canva-homepage__search {
    width: min(100%, 760px) !important;
    min-height: 54px !important;
    margin: 0 !important;
    padding: 0 19px !important;
    border: 2px solid #9748ff !important;
    border-radius: 22px !important;
  }
  body .canva-quickrow {
    display: grid !important;
    grid-template-columns: repeat(4, max-content) !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 9px !important;
    padding: 0 !important;
    overflow: hidden !important;
  }
  body .canva-quickrow__item, body .canva-quickrow__divider, body .canva-quickrow__next { display: none !important; }
  body .canva-quickrow__item--templates, body .canva-quickrow__item--magic,
  body .canva-quickrow__item--print, body .canva-quickrow__item--presentation {
    display: inline-flex !important;
    width: auto !important;
    min-height: 42px !important;
    padding: 0 13px 0 8px !important;
    align-items: center !important;
    gap: 7px !important;
    border: 1px solid #e8ddff !important;
    border-radius: 999px !important;
    background: #fff !important;
    font-size: .8rem !important;
  }
  body .canva-quickrow__icon { width: 24px !important; height: 24px !important; background-size: 14px 14px !important; }
  body .canva-shelf {
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
    min-height: 0 !important;
    padding: 0 2px !important;
    overflow: hidden !important;
  }
  body .canva-shelf__header { margin-bottom: 8px !important; }
  body .canva-shelf__header h3 { margin: 0 !important; font-size: 1.42rem !important; }
  body #homepage-results-summary, body #homepage-see-all { display: none !important; }
  body #homepage-template-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    grid-template-rows: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-rows: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    gap: 10px !important;
    overflow: hidden !important;
  }
  body #homepage-template-grid .homepage-template-card {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 43% !important;
    grid-template-rows: 1fr !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    border: 0 !important;
    border-radius: 17px !important;
    box-shadow: none !important;
    overflow: hidden !important;
  }
  body #homepage-template-grid .homepage-template-card:nth-child(n + 9) { display: none !important; }
  body #homepage-template-grid .homepage-template-card > img {
    grid-column: 2 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    padding: 8px 8px 8px 0 !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
  }
  body #homepage-template-grid .homepage-template-card__meta {
    display: grid !important;
    grid-column: 1 !important;
    grid-row: 1 !important;
    align-content: center !important;
    min-width: 0 !important;
    padding: 12px !important;
  }
  body #homepage-template-grid .homepage-template-card__eyebrow,
  body #homepage-template-grid .homepage-template-card__description,
  body #homepage-template-grid .homepage-template-card__subline { display: none !important; }
  body #homepage-template-grid .homepage-template-card__title { display: -webkit-box !important; margin: 0 !important; font-size: .76rem !important; }
}

@media (min-width: 1200px) {
  body .canva-homepage__main { padding: 18px 32px 22px !important; grid-template-rows: 270px 62px minmax(0, 1fr) !important; }
  body #homepage-template-grid { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; gap: 14px !important; }
  body #homepage-template-grid .homepage-template-card:nth-child(n + 9) { display: grid !important; }
  body #homepage-template-grid .homepage-template-card:nth-child(n + 11) { display: none !important; }
}

/* Final clean-up: the template artwork is the focus, with no decorative card
   furniture competing for attention.  The rail is reduced to simple, stable
   navigation rather than a stack of floating controls. */
@media (min-width: 701px) {
  body .canva-homepage__hero-panel {
    background: linear-gradient(112deg, #eafbfa 0%, #fbf9ff 50%, #ead7ff 100%) !important;
  }

  .canva-homepage__trial,
  .canva-homepage__crumbs,
  .canva-helpfab {
    display: none !important;
  }

  body .canva-homepage__hero-panel h2 {
    margin-bottom: 16px !important;
  }

  .canva-homepage__sidebar {
    padding: 14px 7px !important;
    border-right: 1px solid #ececf1 !important;
    background: #fff !important;
  }

  .canva-homepage__sidebar::before,
  .canva-homepage__sidebar::after {
    display: none !important;
  }

  .canva-sidebutton--menu,
  .canva-sidebutton--bell {
    display: none !important;
  }

  .canva-sidebutton--create {
    width: 38px !important;
    height: 38px !important;
    margin: 5px auto 2px !important;
    border-radius: 12px !important;
    box-shadow: none !important;
  }

  .canva-sidebutton__plus { font-size: 1.6rem !important; }
  .canva-sidebutton__text { margin-bottom: 16px !important; font-size: 10px !important; }

  .canva-sidenav {
    gap: 6px !important;
    margin-top: 0 !important;
  }

  .canva-sidenav__item {
    gap: 4px !important;
    padding: 5px 0 !important;
    color: #656572 !important;
    font-size: .65rem !important;
  }

  .canva-sidenav__icon,
  .canva-sidenav__item:not(.canva-sidenav__item--active) .canva-sidenav__icon {
    width: 34px !important;
    height: 34px !important;
    border-radius: 10px !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .canva-sidenav__item--active .canva-sidenav__icon {
    background: #f0e8ff !important;
    box-shadow: none !important;
  }

  .canva-sidenav__item--active { color: #6e35d7 !important; }
  .canva-sidenav__icon::before { inset: 8px !important; }

  body #homepage-template-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    grid-template-rows: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  body #homepage-template-grid .homepage-template-card {
    display: block !important;
    border: 1px solid #ececf1 !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow: none !important;
  }

  body #homepage-template-grid .homepage-template-card > img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    object-fit: contain !important;
    object-position: center !important;
    background: #f7f7f9 !important;
  }

  body #homepage-template-grid .homepage-template-card__meta,
  body #homepage-template-grid .homepage-template-card::after {
    display: none !important;
  }

  body #homepage-template-grid .homepage-template-card:hover,
  body #homepage-template-grid .homepage-template-card:focus-visible {
    transform: translateY(-2px) !important;
    border-color: #b79afa !important;
    box-shadow: 0 8px 18px rgba(75, 50, 128, .12) !important;
  }
}

@media (min-width: 1200px) {
  body #homepage-template-grid { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
}

/* Viewport-fit homepage: this is a dashboard, so its primary actions and
   featured templates stay in one composed screen instead of becoming a page
   that drifts horizontally or vertically. */
@media (min-width: 851px) {
  html,
  body {
    width: 100%;
    height: 100%;
    overflow: hidden;
  }

  .app-shell,
  .main-content,
  #gallery-view,
  .canva-homepage {
    width: 100%;
    height: 100dvh;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
  }

  .canva-homepage {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .canva-homepage__sidebar {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  body .canva-homepage__main {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto minmax(0, 1fr);
    width: 100%;
    height: 100%;
    max-width: none;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 8px 12px 10px !important;
    row-gap: 6px;
    overflow: hidden;
  }

  body .canva-homepage__hero,
  body .canva-homepage__hero-panel,
  body .canva-quickrow,
  body .canva-shelf {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  body .canva-homepage__hero-panel {
    padding: 24px 26px 18px;
    border-radius: 22px;
  }

  body .canva-homepage__hero-panel h2 {
    font-size: clamp(1.75rem, 3.1vw, 2.65rem);
    line-height: 1.04;
  }

  body .canva-homepage__search {
    width: min(100%, 720px);
    min-height: 50px;
    margin-top: 14px;
    padding: 0 17px;
    border-radius: 17px;
  }

  body .canva-quickrow {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    align-items: start;
    padding: 0 6px;
    gap: 6px;
    overflow: hidden;
  }

  body .canva-quickrow__item,
  body .canva-quickrow__divider,
  body .canva-quickrow__next {
    display: none;
  }

  body .canva-quickrow__item--templates,
  body .canva-quickrow__item--magic,
  body .canva-quickrow__item--print,
  body .canva-quickrow__item--presentation,
  body .canva-quickrow__item--social,
  body .canva-quickrow__item--video {
    display: grid;
    min-width: 0;
    min-height: 58px;
    grid-template-rows: 32px auto;
    gap: 3px;
    font-size: .66rem;
  }

  body .canva-quickrow__icon {
    width: 32px;
    height: 32px;
    background-size: 17px 17px;
  }

  body .canva-shelf {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 0;
    padding: 0 4px;
    overflow: hidden;
  }

  body .canva-shelf__header {
    min-width: 0;
    margin-bottom: 6px;
  }

  body .canva-shelf__header h3 {
    font-size: 1.35rem;
  }

  body #homepage-results-summary,
  body #homepage-see-all {
    display: none;
  }

  body #homepage-template-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-auto-rows: minmax(0, 1fr);
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    padding: 0;
    gap: 10px !important;
    align-items: stretch;
    overflow: hidden;
  }

  body #homepage-template-grid .homepage-template-card {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    width: 100%;
    min-width: 0;
    min-height: 0;
    height: 100%;
    max-width: none;
  }

  body #homepage-template-grid .homepage-template-card:nth-child(n + 6) {
    display: none;
  }

  body #homepage-template-grid .homepage-template-card > img {
    width: 100%;
    height: 100%;
    min-height: 0;
    aspect-ratio: auto;
    object-fit: contain !important;
  }

  body #homepage-template-grid .homepage-template-card__meta {
    min-width: 0;
    padding: 8px 9px 9px;
  }

  body #homepage-template-grid .homepage-template-card__eyebrow,
  body #homepage-template-grid .homepage-template-card__description,
  body #homepage-template-grid .homepage-template-card__subline {
    display: none;
  }

  body #homepage-template-grid .homepage-template-card__title {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    font-size: .76rem;
    line-height: 1.2;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
}

/* Final independent-scroll panel layout. */
@media (min-width: 701px) {
  html, body { width: 100% !important; height: 100% !important; overflow: hidden !important; }
  .app-shell, .main-content, #gallery-view, .canva-homepage { width: 100% !important; height: 100dvh !important; min-height: 0 !important; overflow: hidden !important; }
  .canva-homepage { display: grid !important; grid-template-columns: 72px minmax(0, 1fr) !important; align-items: stretch !important; }
  .canva-homepage__sidebar { position: static !important; top: auto !important; height: 100% !important; min-height: 0 !important; overflow-x: hidden !important; overflow-y: auto !important; overscroll-behavior: contain; }
  body .canva-homepage__main { height: 100% !important; min-height: 0 !important; grid-template-rows: 270px 62px auto !important; padding: 18px 30px 46px !important; overflow-x: hidden !important; overflow-y: auto !important; overscroll-behavior: contain; }
  body .canva-shelf { display: block !important; overflow: visible !important; }
  body .canva-shelf__header { display: flex !important; align-items: end !important; justify-content: space-between !important; margin: 20px 0 18px !important; }
  body .canva-shelf__header h3 { font-size: 1.8rem !important; }
  body #homepage-results-summary { display: block !important; margin: 6px 0 0 !important; color: #74717e !important; font-size: .88rem !important; }
  body #homepage-template-grid { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; grid-template-rows: none !important; grid-auto-rows: auto !important; width: 100% !important; height: auto !important; gap: 34px 24px !important; overflow: visible !important; }
  body #homepage-template-grid .homepage-template-card,
  body #homepage-template-grid .homepage-template-card:nth-child(n + 9) { display: flex !important; flex-direction: column !important; width: 100% !important; height: auto !important; min-height: 0 !important; overflow: visible !important; background: transparent !important; border: 0 !important; box-shadow: none !important; }
  body #homepage-template-grid .homepage-template-card > img { display: block !important; width: 100% !important; height: auto !important; aspect-ratio: 4 / 3 !important; padding: 0 !important; border: 0 !important; border-radius: 14px !important; background: transparent !important; box-shadow: none !important; object-fit: contain !important; object-position: center !important; }
  body #homepage-template-grid .homepage-template-card__meta { display: block !important; min-width: 0 !important; padding: 10px 2px 0 !important; color: #202027 !important; }
  body #homepage-template-grid .homepage-template-card__eyebrow, body #homepage-template-grid .homepage-template-card__description { display: none !important; }
  body #homepage-template-grid .homepage-template-card__title { display: block !important; margin: 0 !important; overflow: hidden !important; color: #202027 !important; font-size: 1rem !important; font-weight: 700 !important; line-height: 1.25 !important; text-overflow: ellipsis !important; white-space: nowrap !important; }
  body #homepage-template-grid .homepage-template-card__subline { display: block !important; margin: 5px 0 0 !important; color: #74717e !important; font-size: .78rem !important; font-weight: 600 !important; }
}

@media (min-width: 1200px) {
  body #homepage-template-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 38px 28px !important; }
}

/* The template library is intentionally longer than the opening view. Keep
   scrolling on the main page rather than trapping it inside the card shelf. */
@media (min-width: 701px) {
  .main-content {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    scrollbar-gutter: stable;
  }

  #gallery-view,
  .canva-homepage {
    height: auto !important;
    min-height: 100dvh !important;
    overflow: visible !important;
  }

  .canva-homepage {
    align-items: start !important;
  }

  .canva-homepage__sidebar {
    position: sticky !important;
    top: 0;
    height: 100dvh !important;
    overflow: hidden !important;
  }

  body .canva-homepage__main {
    height: auto !important;
    min-height: 100dvh !important;
    overflow: visible !important;
  }

  /* Do not cap the library after the first rows; all template cards belong on
     the scrollable main page. */
  body #homepage-template-grid .homepage-template-card:nth-child(n + 11) {
    display: flex !important;
  }
}

/* TronXVI neutral direction. Keep the template artwork intact as content
   while matching the surrounding workspace to the existing TronXVI shell. */
:root {
  --canva-black: var(--theme-page-bg, #010304);
  --canva-black-soft: var(--theme-surface-strong, #070a0c);
  --canva-white: var(--text, #f2f5f7);
  --canva-white-soft: var(--muted, #aab2ba);
  --canva-gold: var(--accent, #f2f5f7);
  --canva-gold-bright: var(--accent-strong, #ffffff);
  --canva-gold-dark: var(--accent-secondary, #aab2ba);
  --canva-line: var(--line, rgba(242, 245, 247, 0.16));
}

html,
body {
  background: var(--canva-black) !important;
  color: var(--canva-white) !important;
}

body .app-shell,
body .main-content,
body #gallery-view {
  background: var(--canva-black) !important;
}

body .canva-homepage {
  grid-template-columns: minmax(0, 1fr) 92px !important;
  background: var(--canva-black) !important;
}

body .canva-homepage__main {
  grid-column: 1 !important;
  grid-row: 1 !important;
  background: var(--canva-black) !important;
  color: var(--canva-white) !important;
}

body .canva-homepage__sidebar {
  grid-column: 2 !important;
  grid-row: 1 !important;
  order: 2 !important;
  background: var(--canva-black) !important;
  border-right: 0 !important;
  border-left: 1px solid var(--canva-line) !important;
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.04) !important;
}

body .canva-homepage__sidebar::before,
body .canva-homepage__sidebar::after {
  display: none !important;
}

body .canva-sidebutton--create {
  background: var(--canva-gold) !important;
  color: var(--canva-black) !important;
  box-shadow: 0 10px 24px rgba(242, 245, 247, 0.12) !important;
}

body .canva-sidebutton__plus,
body .canva-sidebutton__text {
  color: var(--canva-gold) !important;
}

body .canva-sidenav__item {
  color: rgba(255, 255, 255, 0.7) !important;
}

body .canva-sidenav__item:hover,
body .canva-sidenav__item:focus-visible,
body .canva-sidenav__item--active {
  color: var(--canva-gold-bright) !important;
}

body .canva-sidenav__item--active .canva-sidenav__icon {
  background: var(--canva-gold) !important;
  box-shadow: 0 10px 24px rgba(242, 245, 247, 0.14) !important;
}

body .canva-sidenav__icon::before {
  filter: grayscale(1) brightness(2.2) !important;
}

body .canva-sidenav__item--active .canva-sidenav__icon::before {
  filter: grayscale(1) brightness(0.18) !important;
}

body .canva-sidenav__icon--brand::after {
  background-color: var(--canva-white) !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35) !important;
  filter: grayscale(1) brightness(1.4) !important;
}

body .canva-homepage__hero-panel {
  background: var(--canva-white) !important;
  border: 1px solid var(--canva-gold) !important;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32), inset 0 0 0 1px rgba(242, 245, 247, 0.2) !important;
}

body .canva-homepage__hero-panel::after {
  box-shadow: inset 0 0 0 1px rgba(242, 245, 247, 0.34) !important;
}

body .canva-homepage__hero-panel h2 {
  color: var(--canva-black) !important;
}

body .canva-homepage__search {
  background: var(--canva-white) !important;
  border: 2px solid var(--canva-black) !important;
  box-shadow: 0 8px 0 rgba(242, 245, 247, 0.9) !important;
}

body .canva-homepage__search:focus-within {
  border-color: var(--canva-gold-dark) !important;
  box-shadow: 0 8px 0 var(--canva-gold) !important;
}

body .canva-homepage__search input {
  color: var(--canva-black) !important;
}

body .canva-homepage__search input::placeholder {
  color: #6b6b65 !important;
}

body .canva-homepage__search-icon {
  filter: grayscale(1) brightness(0.2) !important;
}

body .canva-quickrow__item {
  color: rgba(255, 255, 255, 0.78) !important;
}

body .canva-quickrow__item:hover,
body .canva-quickrow__item:focus-visible {
  color: var(--canva-gold-bright) !important;
}

body .canva-quickrow__icon {
  border: 1px solid var(--canva-gold) !important;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.34) !important;
  filter: grayscale(1) contrast(1.2) !important;
}

body .canva-quickrow__next {
  border: 1px solid var(--canva-gold) !important;
  background: var(--canva-black-soft) !important;
}

body .canva-quickrow__next::before {
  filter: grayscale(1) brightness(2) !important;
}

body .canva-shelf__header h3,
body .canva-shelf__header strong {
  color: var(--canva-white) !important;
}

body #homepage-results-summary {
  color: rgba(255, 255, 255, 0.66) !important;
}

body #homepage-see-all {
  color: var(--canva-gold-bright) !important;
}

body #homepage-see-all:hover,
body #homepage-see-all:focus-visible {
  color: var(--canva-white) !important;
}

body #homepage-template-grid .homepage-template-card {
  background: var(--canva-white) !important;
  border: 1px solid var(--canva-line) !important;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.28) !important;
}

body #homepage-template-grid .homepage-template-card:hover,
body #homepage-template-grid .homepage-template-card:focus-visible {
  border-color: var(--canva-gold-bright) !important;
  box-shadow: 0 18px 34px rgba(242, 245, 247, 0.12) !important;
}

body #homepage-template-grid .homepage-template-card__meta,
body #homepage-template-grid .homepage-template-card__title {
  color: var(--canva-black) !important;
}

body #homepage-template-grid .homepage-template-card__subline {
  color: #68685f !important;
}

body .templates-home,
body .category-browser,
body .controls-panel,
body .editor-header,
body .editor-layout,
body .editor-panel,
body .editor-canvas-shell,
body .canvas-toolbar,
body .editor-bottom-bar,
body .details-dialog__card,
body .details-workspace__panel,
body .file-popover,
body .apps-popover,
body .resize-popover {
  background: var(--canva-white) !important;
  color: var(--canva-black) !important;
  border-color: var(--canva-line) !important;
}

body .button,
body .editor-menu-button,
body .editor-icon-button,
body .editor-bottom-bar button,
body .details-primary,
body .details-icon-button,
body .resize-popover__options button {
  border-color: var(--canva-gold) !important;
  color: var(--canva-black) !important;
}

body .button:not(.button--ghost),
body .details-primary {
  background: var(--canva-gold) !important;
}

body .button--ghost,
body .editor-icon-button--outline,
body .details-icon-button {
  background: var(--canva-white) !important;
}

body .editor-tool-rail {
  background: var(--canva-black) !important;
  border-color: var(--canva-line) !important;
}

body .editor-tool-rail button {
  color: rgba(255, 255, 255, 0.78) !important;
}

body .editor-tool-rail button:hover,
body .editor-tool-rail button:focus-visible,
body .editor-tool-rail button.is-active {
  color: var(--canva-gold-bright) !important;
  background: rgba(242, 245, 247, 0.08) !important;
}

body .nav-item__icon::before {
  filter: grayscale(1) brightness(1.65) !important;
}

body .nav-item--home.nav-item--active .nav-item__icon::before {
  filter: grayscale(1) brightness(2.2) !important;
}

body .editor-header svg,
body .editor-layout svg,
body .editor-bottom-bar svg,
body .details-dialog__card svg {
  stroke: currentColor;
}

body .templates-home,
body .category-browser,
body .controls-panel,
body .editor-header,
body .editor-layout,
body .editor-panel,
body .canvas-toolbar,
body .editor-bottom-bar,
body .details-dialog__card,
body .details-workspace__panel,
body .file-popover,
body .apps-popover,
body .resize-popover {
  background: var(--canva-black-soft) !important;
  color: var(--canva-white) !important;
  border-color: var(--canva-line) !important;
}

body .editor-canvas-shell,
body .canvas-stage {
  background: var(--canva-black) !important;
  color: var(--canva-white) !important;
}

body .editor-header button,
body .editor-panel button,
body .canvas-toolbar .button,
body .editor-bottom-bar button,
body .editor-bottom-bar output,
body .editor-bottom-bar strong {
  color: var(--canva-white) !important;
}

body .editor-header #export-button,
body .editor-bottom-bar > #duplicate-page,
body .button:not(.button--ghost),
body .details-primary {
  color: var(--canva-black) !important;
}

body .editor-canvas-shell .artboard {
  border-color: #ffffff !important;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.42) !important;
}

body .editor-bottom-bar__zoom input {
  accent-color: #aab2ba !important;
}

body .help-fab,
body .canva-helpfab {
  background: var(--canva-white) !important;
  color: var(--canva-black) !important;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.28) !important;
}

@media (max-width: 700px) {
  body .canva-homepage {
    grid-template-columns: minmax(0, 1fr) 76px !important;
  }

  body .canva-homepage__sidebar {
    padding-inline: 4px !important;
  }

  body .canva-homepage__main {
    padding-inline: 10px !important;
  }
}

/* Final template hero: make the visible search a real library control and
   give the surrounding panel a small, theme-owned template illustration. */
body .canva-homepage__hero-panel {
  isolation: isolate;
  min-height: 270px;
  background: var(--canva-black-soft) !important;
  border-color: var(--canva-line) !important;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32), inset 0 0 0 1px color-mix(in srgb, var(--canva-white) 12%, transparent) !important;
}

body .canva-homepage__hero-panel h2 {
  position: relative;
  z-index: 2;
  color: var(--canva-white) !important;
}

body .canva-homepage__hero-art {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  color: var(--canva-gold);
  opacity: 0.52;
  pointer-events: none;
}

body .canva-homepage__hero-art svg {
  display: block;
  width: 100%;
  height: 100%;
}

body .canva-homepage__hero-art .template-hero-art__card {
  fill: color-mix(in srgb, var(--canva-black) 72%, transparent);
  stroke: var(--canva-gold);
  stroke-width: 2;
}

body .canva-homepage__hero-art .template-hero-art__card--left {
  transform: rotate(-7deg);
  transform-origin: 162px 112px;
}

body .canva-homepage__hero-art .template-hero-art__card--right {
  transform: rotate(7deg);
  transform-origin: 1038px 115px;
}

body .canva-homepage__hero-art .template-hero-art__card--bottom {
  opacity: 0.64;
}

body .canva-homepage__hero-art .template-hero-art__card path,
body .canva-homepage__hero-art .template-hero-art__card circle,
body .canva-homepage__hero-art .template-hero-art__spark {
  fill: none;
  stroke: var(--canva-gold-bright);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

body .canva-homepage__hero-art .template-hero-art__spark {
  opacity: 0.7;
}

body .canva-homepage__search {
  position: relative;
  z-index: 2;
  width: min(100%, 920px);
  min-height: 64px !important;
  margin: 18px auto 0;
  grid-template-columns: 42px minmax(0, 1fr);
  padding: 0 20px;
  border: 1px solid var(--canva-gold) !important;
  border-radius: 16px;
  background: var(--canva-black) !important;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--canva-gold) 12%, transparent), 0 16px 30px rgba(0, 0, 0, 0.28) !important;
}

body .canva-homepage__search:hover,
body .canva-homepage__search:focus-within {
  border-color: var(--canva-gold-bright) !important;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--canva-gold-bright) 18%, transparent), 0 18px 34px rgba(0, 0, 0, 0.34) !important;
}

body .canva-homepage__search input {
  min-width: 0;
  color: var(--canva-white) !important;
  font-size: 1rem;
  font-weight: 600;
}

body .canva-homepage__search input::placeholder {
  color: var(--canva-white-soft) !important;
}

body .canva-homepage__search-icon {
  filter: grayscale(1) brightness(2) !important;
}

@media (max-width: 700px) {
  body .canva-homepage__hero-panel {
    min-height: 230px;
    padding: 38px 18px 24px !important;
  }

  body .canva-homepage__hero-art {
    opacity: 0.34;
  }

  body .canva-homepage__search {
    min-height: 56px !important;
    grid-template-columns: 34px minmax(0, 1fr);
    padding-inline: 14px;
  }
}

/* Final button contrast: keep every foreground readable against its control
   surface when the neutral light appearance is selected. */
body .canva-sidebutton--create {
  background: var(--canva-gold) !important;
  border-color: var(--canva-gold) !important;
  color: var(--canva-black) !important;
}

body .canva-sidebutton--create .canva-sidebutton__plus {
  color: var(--canva-black) !important;
}

body .canva-sidebutton__text {
  color: var(--canva-white) !important;
}

body .canva-quickrow__item {
  background: var(--canva-white) !important;
  border: 1px solid var(--canva-gold) !important;
  color: var(--canva-black) !important;
}

body .canva-quickrow__item > span:last-child {
  color: var(--canva-black) !important;
}

body .canva-quickrow__item:hover,
body .canva-quickrow__item:focus-visible,
body .canva-quickrow__item.is-active {
  background: var(--canva-gold) !important;
  color: var(--canva-black) !important;
}

body .canva-quickrow__item:hover > span:last-child,
body .canva-quickrow__item:focus-visible > span:last-child,
body .canva-quickrow__item.is-active > span:last-child {
  color: var(--canva-black) !important;
}

/* Projects page: a persistent workspace for grouping editable templates. */
body #projects-view {
  min-height: calc(100dvh - 3rem);
  padding: 0 !important;
  overflow: hidden;
  background: var(--canva-black) !important;
  color: var(--canva-white) !important;
}

body .canva-projects-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  min-height: calc(100dvh - 3rem);
  background: var(--canva-black) !important;
}

body .canva-projects-page__sidebar {
  grid-column: 2;
  grid-row: 1;
  order: 2;
  min-height: calc(100dvh - 3rem);
  background: var(--canva-black) !important;
  border-right: 0 !important;
  border-left: 1px solid var(--canva-line) !important;
}

body .canva-projects-page__sidebar .canva-sidenav__item--active .canva-sidenav__icon {
  background: var(--canva-gold) !important;
  box-shadow: 0 10px 24px rgba(242, 245, 247, 0.14) !important;
}

body .projects-page {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  min-height: calc(100dvh - 3rem);
  overflow: auto;
  padding: clamp(28px, 4vw, 64px);
  background: var(--canva-black) !important;
}

body .projects-page__header,
body .project-detail__header,
body .projects-page__section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

body .projects-page__header {
  max-width: 1160px;
  margin: 0 auto 46px;
}

body .projects-page__eyebrow {
  margin: 0 0 10px;
  color: var(--canva-gold) !important;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

body .projects-page h2,
body .projects-page h3,
body .projects-page h4,
body .project-create-dialog h2 {
  margin: 0;
  color: var(--canva-white) !important;
  letter-spacing: -0.04em;
}

body .projects-page h2 {
  font-size: clamp(2.2rem, 5vw, 4.8rem);
  line-height: 0.98;
}

body .projects-page h3 {
  font-size: clamp(1.35rem, 2vw, 2rem);
}

body .projects-page h4 {
  font-size: 1.1rem;
}

body .projects-page p,
body .project-create-dialog p {
  color: var(--canva-white-soft) !important;
}

body .projects-page__header > div > p:last-child {
  max-width: 620px;
  margin: 18px 0 0;
  font-size: 1rem;
  line-height: 1.55;
}

body .projects-page__primary,
body .project-card__open,
body .project-template-card__add,
body .project-template-card__open,
body .project-template-card__remove,
body .projects-page__back {
  border: 1px solid var(--canva-gold) !important;
  border-radius: 999px;
  background: transparent !important;
  color: var(--canva-white) !important;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

body .projects-page__primary {
  flex: 0 0 auto;
  padding: 13px 20px;
  background: var(--canva-gold) !important;
  color: var(--canva-black) !important;
}

body .projects-page__primary:hover,
body .projects-page__primary:focus-visible,
body .project-card__open:hover,
body .project-card__open:focus-visible,
body .project-template-card__add:hover,
body .project-template-card__add:focus-visible,
body .project-template-card__open:hover,
body .project-template-card__open:focus-visible,
body .projects-page__back:hover,
body .projects-page__back:focus-visible {
  transform: translateY(-1px);
  background: var(--canva-gold) !important;
  color: var(--canva-black) !important;
}

body .project-template-card__remove {
  border-color: var(--canva-line) !important;
  color: var(--canva-white-soft) !important;
}

body .project-template-card__remove:hover,
body .project-template-card__remove:focus-visible {
  border-color: var(--canva-white) !important;
  color: var(--canva-white) !important;
}

body .projects-page__library,
body .project-detail {
  max-width: 1160px;
  margin: 0 auto;
}

body .projects-page__section-heading {
  align-items: end;
  margin-bottom: 18px;
}

body .projects-page__section-heading p,
body .project-detail__summary,
body #project-detail-summary {
  margin: 7px 0 0;
  font-size: 0.9rem;
}

body .projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}

body .project-card {
  overflow: hidden;
  border: 1px solid var(--canva-line) !important;
  border-radius: 20px;
  background: var(--canva-black-soft) !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
}

body .project-card.is-active {
  border-color: var(--canva-gold) !important;
}

body .project-card__preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  min-height: 126px;
  gap: 3px;
  overflow: hidden;
  background: color-mix(in srgb, var(--canva-gold) 12%, var(--canva-black));
}

body .project-card__preview img {
  width: 100%;
  height: 100%;
  min-height: 126px;
  object-fit: cover;
}

body .project-card__preview > span {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  color: var(--canva-gold);
  font-size: 3rem;
}

body .project-card__body {
  padding: 20px;
}

body .project-card__body h3 {
  margin-bottom: 9px;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

body .project-card__body > p:not(.projects-page__eyebrow) {
  margin: 0 0 18px;
  font-size: 0.82rem;
}

body .project-card__open,
body .project-template-card__add,
body .project-template-card__open,
body .project-template-card__remove {
  padding: 8px 12px;
  font-size: 0.78rem;
}

body .project-detail {
  margin-top: 54px;
  padding-top: 34px;
  border-top: 1px solid var(--canva-line);
}

body .project-detail__header {
  align-items: center;
  margin-bottom: 36px;
}

body .projects-page__back {
  padding: 10px 14px;
  font-size: 0.8rem;
}

body .project-detail__section + .project-detail__section {
  margin-top: 44px;
}

body .project-template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}

body .project-template-card {
  overflow: hidden;
  border: 1px solid var(--canva-line) !important;
  border-radius: 16px;
  background: var(--canva-black-soft) !important;
}

body .project-template-card__preview {
  display: grid;
  place-items: center;
  aspect-ratio: 1.45;
  overflow: hidden;
  background: color-mix(in srgb, var(--canva-gold) 10%, var(--canva-black));
}

body .project-template-card__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body .project-template-card__placeholder {
  color: var(--canva-gold);
  font-size: 2.5rem;
}

body .project-template-card__body {
  display: grid;
  gap: 7px;
  padding: 15px;
}

body .project-template-card__body strong {
  overflow: hidden;
  color: var(--canva-white) !important;
  font-size: 0.92rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body .project-template-card__body > span {
  overflow: hidden;
  color: var(--canva-white-soft) !important;
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body .project-template-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 7px;
}

body .project-template-card__add:disabled {
  border-color: var(--canva-line) !important;
  color: var(--canva-white-soft) !important;
  cursor: default;
  opacity: 0.8;
}

body .projects-page__empty {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 240px;
  padding: 32px;
  border: 1px dashed var(--canva-line) !important;
  border-radius: 20px;
  color: var(--canva-white-soft) !important;
  text-align: center;
}

body .projects-page__empty strong {
  color: var(--canva-white) !important;
  font-size: 1.1rem;
}

body .projects-page__empty-icon {
  color: var(--canva-gold);
  font-size: 2.6rem;
}

body .project-template-grid__empty {
  grid-column: 1 / -1;
  min-height: 140px;
}

body .project-create-dialog {
  width: min(460px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--canva-line);
  border-radius: 22px;
  background: var(--canva-black-soft);
  color: var(--canva-white);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}

body .project-create-dialog::backdrop {
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(6px);
}

body .project-create-dialog__card {
  display: grid;
  gap: 12px;
  padding: 30px;
}

body .project-create-dialog__card label {
  margin-top: 8px;
  color: var(--canva-white) !important;
  font-size: 0.82rem;
  font-weight: 800;
}

body .project-create-dialog__card input {
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--canva-line);
  border-radius: 12px;
  background: var(--canva-black);
  color: var(--canva-white);
  font: inherit;
}

body .project-create-dialog__card input:focus {
  border-color: var(--canva-gold);
  outline: 3px solid color-mix(in srgb, var(--canva-gold) 22%, transparent);
}

body .project-create-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

@media (max-width: 760px) {
  body .canva-projects-shell {
    grid-template-columns: minmax(0, 1fr) 72px;
  }

  body .canva-projects-page__sidebar {
    min-height: calc(100dvh - 3rem);
  }

  body .projects-page {
    padding: 26px 18px 42px;
  }

  body .projects-page__header,
  body .project-detail__header {
    display: grid;
    gap: 20px;
  }

  body .projects-page__primary {
    justify-self: start;
  }
}

/* Final workspace cleanup: one top navigation, no legacy inner rail, and a
   real catalog browser on the right side of the Template home screen. */
body .app-shell {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  min-height: 100dvh !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

body .template-navbar {
  position: sticky;
  z-index: 30;
  top: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 22px;
  min-height: 68px;
  padding: 0 24px;
  background: var(--canva-black-soft) !important;
  border: 0 !important;
  border-bottom: 1px solid var(--canva-line) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

body .template-navbar__brand {
  color: var(--canva-white) !important;
  font-size: .82rem;
  font-weight: 850;
  letter-spacing: .12em;
  text-decoration: none;
  white-space: nowrap;
}

body .template-navbar__brand span {
  margin-left: 8px;
  color: var(--canva-white-soft) !important;
  font-weight: 650;
  letter-spacing: 0;
}

body .template-navbar__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
}

body .template-navbar__item,
body .template-navbar__create {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--canva-white-soft) !important;
  font: inherit;
  font-size: .84rem;
  font-weight: 750;
  cursor: pointer;
}

body .template-navbar__item {
  padding: 0 14px;
}

body .template-navbar__item:hover,
body .template-navbar__item:focus-visible,
body .template-navbar__item.is-active {
  color: var(--canva-white) !important;
  border-bottom-color: var(--canva-gold) !important;
  outline: none;
}

body .template-navbar__status {
  display: grid;
  justify-items: end;
  gap: 2px;
  color: var(--canva-white-soft) !important;
  font-size: .68rem;
  line-height: 1.1;
  white-space: nowrap;
}

body .template-navbar__status #sidebar-stats {
  color: var(--canva-white) !important;
  font-weight: 750;
}

body .template-navbar__create {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  border-color: var(--canva-gold) !important;
  background: var(--canva-gold) !important;
  color: var(--canva-black) !important;
}

body .template-navbar__create span {
  font-size: 1.35rem;
  font-weight: 350;
  line-height: 1;
}

body .main-content,
body #gallery-view,
body .canva-homepage,
body .canva-homepage__main,
body #projects-view,
body .canva-projects-shell,
body .projects-page,
body #editor-view,
body .editor-header,
body .editor-layout,
body .editor-panel,
body .editor-canvas-shell {
  border-radius: 0 !important;
  box-shadow: none !important;
}

body .main-content {
  grid-row: 2;
  min-width: 0;
  min-height: 0;
  padding: 0 !important;
  border: 0 !important;
}

body .canva-homepage {
  grid-template-columns: minmax(0, 1fr) minmax(270px, 320px) !important;
  min-height: calc(100dvh - 68px) !important;
  background: var(--canva-black) !important;
  border: 0 !important;
}

body .canva-homepage__main {
  grid-column: 1 !important;
  grid-row: 1 !important;
  min-width: 0;
  background: var(--canva-black) !important;
}

body .template-browser-sidebar {
  grid-column: 2 !important;
  grid-row: 1 !important;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: calc(100dvh - 68px);
  padding: 24px 16px 20px;
  overflow: hidden;
  background: var(--canva-black-soft) !important;
  border: 0 !important;
  border-left: 1px solid var(--canva-line) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

body .template-browser-sidebar__header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 16px;
}

body .template-browser-sidebar__eyebrow {
  margin: 0 0 5px;
  color: var(--canva-gold) !important;
  font-size: .64rem;
  font-weight: 850;
  letter-spacing: .13em;
  text-transform: uppercase;
}

body .template-browser-sidebar h2 {
  margin: 0;
  color: var(--canva-white) !important;
  font-size: 1.12rem;
  letter-spacing: -.035em;
}

body #template-browser-count {
  color: var(--canva-white-soft) !important;
  font-size: .75rem;
  font-weight: 750;
}

body .template-browser-sidebar__search {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid var(--canva-line) !important;
  border-radius: 0 !important;
  background: var(--canva-black) !important;
  color: var(--canva-white-soft) !important;
}

body .template-browser-sidebar__search input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--canva-white) !important;
  font: inherit;
  font-size: .78rem;
}

body .template-browser-sidebar__search input::placeholder {
  color: var(--canva-white-soft) !important;
}

body .template-browser-grid {
  display: grid;
  gap: 9px;
  min-height: 0;
  margin-top: 14px;
  overflow-y: auto;
  scrollbar-width: thin;
}

body .template-browser-card {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px;
  border: 1px solid transparent;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--canva-white) !important;
  text-align: left;
  cursor: pointer;
}

body .template-browser-card:hover,
body .template-browser-card:focus-visible {
  border-color: var(--canva-line) !important;
  background: color-mix(in srgb, var(--canva-gold) 8%, transparent) !important;
  outline: none;
}

body .template-browser-card img {
  display: block;
  width: 68px;
  height: 52px;
  border: 1px solid var(--canva-line);
  border-radius: 0 !important;
  background: var(--canva-white);
  object-fit: cover;
}

body .template-browser-card__copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

body .template-browser-card__copy strong {
  overflow: hidden;
  color: var(--canva-white) !important;
  font-size: .75rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body .template-browser-card__copy small,
body .template-browser-sidebar__empty {
  color: var(--canva-white-soft) !important;
  font-size: .66rem;
}

body .template-browser-sidebar__empty {
  margin: 12px 0;
}

body .editor-header {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto !important;
  min-height: 68px !important;
  padding: 0 16px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--canva-line) !important;
  background: var(--canva-black-soft) !important;
}

body .editor-tool-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

body .editor-tool-nav::-webkit-scrollbar {
  display: none;
}

body .editor-tool-nav button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 38px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--canva-white-soft) !important;
  font: inherit;
  font-size: .68rem;
  font-weight: 750;
  white-space: nowrap;
  cursor: pointer;
}

body .editor-tool-nav button span {
  display: inline-grid;
  width: 17px;
  height: 17px;
  place-items: center;
}

body .editor-tool-nav button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

body .editor-tool-nav button:hover,
body .editor-tool-nav button:focus-visible,
body .editor-tool-nav button.is-active {
  color: var(--canva-white) !important;
  border-bottom-color: var(--canva-gold) !important;
  outline: none;
}

body .editor-tool-rail {
  display: none !important;
}

body .editor-layout {
  grid-template-columns: 92px minmax(0, 1fr) 0 !important;
  height: calc(100dvh - 136px) !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

body .editor-panel--pages {
  padding: 12px 5px !important;
  border: 0 !important;
  border-right: 1px solid var(--canva-line) !important;
  background: var(--canva-black-soft) !important;
}

body .editor-canvas-shell {
  min-width: 0;
  border: 0 !important;
}

@media (max-width: 900px) {
  body .template-navbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    padding: 0 12px;
  }

  body .template-navbar__status {
    display: none;
  }

  body .template-navbar__item {
    padding-inline: 8px;
    font-size: .75rem;
  }

  body .template-navbar__brand span {
    display: none;
  }

  body .canva-homepage {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body .template-browser-sidebar {
    grid-column: 1 !important;
    grid-row: 2 !important;
    min-height: 0;
    max-height: 360px;
    border-top: 1px solid var(--canva-line) !important;
    border-left: 0 !important;
  }

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

  body .editor-header {
    grid-template-columns: auto minmax(0, 1fr) !important;
  }

  body .editor-header__actions {
    display: none;
  }

  body .editor-tool-nav {
    justify-content: flex-start;
  }
}

body .template-navbar__item.nav-item--active {
  color: var(--canva-white) !important;
  border-bottom-color: var(--canva-gold) !important;
}

body .editor-tool-sidebar {
  position: absolute;
  z-index: 20;
  top: 68px;
  bottom: 0;
  left: 0;
  display: block;
  width: 92px;
  padding: 14px 7px;
  overflow-y: auto;
  background: var(--canva-black-soft) !important;
  border-right: 1px solid var(--canva-line) !important;
}

body .editor-tool-sidebar .editor-tool-nav {
  display: grid !important;
  width: 100%;
  gap: 8px;
  overflow: visible;
}

body .editor-tool-sidebar .editor-tool-nav button {
  display: grid;
  min-height: 66px;
  grid-template-rows: 24px auto;
  justify-items: center;
  gap: 6px;
  padding: 8px 3px;
  border: 1px solid transparent;
  border-radius: 10px !important;
  background: transparent !important;
  color: var(--canva-white-soft) !important;
  font-size: .62rem;
  font-weight: 750;
  white-space: normal;
}

body .editor-tool-sidebar .editor-tool-nav button span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
}

body .editor-tool-sidebar .editor-tool-nav button strong {
  font: inherit;
  line-height: 1.1;
  text-align: center;
}

body .editor-tool-sidebar .editor-tool-nav button svg {
  width: 21px;
  height: 21px;
}

body .editor-tool-sidebar .editor-tool-nav button:hover,
body .editor-tool-sidebar .editor-tool-nav button:focus-visible,
body .editor-tool-sidebar .editor-tool-nav button.is-active {
  border-color: var(--canva-line) !important;
  background: color-mix(in srgb, var(--canva-gold) 14%, transparent) !important;
  color: var(--canva-white) !important;
  outline: none;
}

body #editor-view.view--active .editor-layout {
  margin-left: 92px !important;
  grid-template-columns: 112px minmax(0, 1fr) 0 !important;
  height: calc(100dvh - 68px) !important;
}

@media (max-width: 900px) {
  body .editor-tool-sidebar { width: 72px; }
  body #editor-view.view--active .editor-layout { margin-left: 72px !important; }
  body .editor-tool-sidebar .editor-tool-nav button { min-height: 54px; font-size: .55rem; }
  body .editor-tool-sidebar .editor-tool-nav button strong { display: none; }
  body .editor-tool-sidebar .editor-tool-nav button { grid-template-rows: 1fr; }
}

/* Final TronXVI host-shell integration. The primary sidebar belongs to the
   host application; Template owns only its library and editing content. */
:root {
  --canva-black: var(--theme-page-bg, #010304) !important;
  --canva-black-soft: var(--theme-surface-strong, #070a0c) !important;
  --canva-white: var(--text, #f2f5f7) !important;
  --canva-white-soft: var(--muted, #aab2ba) !important;
  --canva-gold: var(--accent, #f2f5f7) !important;
  --canva-gold-bright: var(--accent-strong, #ffffff) !important;
  --canva-gold-dark: var(--accent-secondary, #dfe6eb) !important;
  --canva-line: var(--line, rgba(242, 245, 247, 0.16)) !important;
}

html,
body {
  background: var(--theme-page-bg, #010304) !important;
  color: var(--text, #f2f5f7) !important;
}

body .app-shell {
  grid-template-columns: minmax(0, 1fr) !important;
  background: var(--theme-page-bg, #010304) !important;
}

body .template-library-rail {
  display: none !important;
}

body .template-navbar,
body .main-content {
  grid-column: 1 !important;
}

body .template-navbar,
body .editor-header {
  background: var(--theme-surface-strong, #070a0c) !important;
  color: var(--text, #f2f5f7) !important;
  border-color: var(--line, rgba(242, 245, 247, 0.16)) !important;
}

body .template-navbar__brand,
body .template-navbar__item,
body .template-navbar__status,
body .template-navbar__status #sidebar-stats,
body .editor-header__title h2,
body .editor-status {
  color: var(--text, #f2f5f7) !important;
}

body .template-navbar__item:not(.is-active),
body .template-navbar__status,
body .editor-status {
  color: var(--muted, #aab2ba) !important;
}

body .template-navbar__item:hover,
body .template-navbar__item:focus-visible,
body .template-navbar__item.is-active {
  color: var(--text, #f2f5f7) !important;
  border-bottom-color: var(--accent, #f2f5f7) !important;
}

body .template-navbar__create,
body .button:not(.button--ghost),
body .details-primary {
  background: var(--accent, #f2f5f7) !important;
  color: var(--accent-contrast, var(--theme-page-bg, #010304)) !important;
  border-color: var(--accent, #f2f5f7) !important;
}

body .main-content,
body #gallery-view,
body .canva-homepage,
body .canva-homepage__main,
body #projects-view,
body .projects-page,
body #editor-view {
  background: var(--theme-page-bg, #010304) !important;
  color: var(--text, #f2f5f7) !important;
}

body .canva-homepage {
  grid-template-columns: minmax(0, 1fr) minmax(270px, 320px) !important;
}

body .canva-homepage__hero-panel,
body .template-browser-sidebar,
body .templates-home,
body .controls-panel,
body .projects-page__library,
body .project-detail {
  background: var(--theme-surface-strong, #070a0c) !important;
  color: var(--text, #f2f5f7) !important;
  border-color: var(--line, rgba(242, 245, 247, 0.16)) !important;
}

body .canva-homepage__hero-panel h2,
body .canva-shelf__header h3,
body .canva-shelf__header strong,
body .template-browser-sidebar h2,
body .template-browser-card,
body .template-browser-card__copy strong,
body .templates-home__header h3,
body .projects-page h2,
body .projects-page h3,
body .projects-page h4,
body .project-template-card__body strong {
  color: var(--text, #f2f5f7) !important;
}

body .canva-homepage__search,
body .template-browser-sidebar__search,
body .template-browser-card:hover,
body .template-browser-card:focus-visible,
body .button--ghost,
body .editor-icon-button--outline,
body .details-icon-button {
  background: var(--theme-surface, #030506) !important;
  color: var(--text, #f2f5f7) !important;
  border-color: var(--line, rgba(242, 245, 247, 0.16)) !important;
}

body .canva-homepage__search input,
body .template-browser-sidebar__search input,
body .template-browser-sidebar__search input::placeholder {
  color: var(--text, #f2f5f7) !important;
}

body .canva-homepage__search input::placeholder,
body .template-browser-card__copy small,
body .template-browser-sidebar__empty,
body #homepage-results-summary,
body .templates-home__header strong,
body .templates-home__header p:not(.templates-home__eyebrow),
body .projects-page p,
body .project-template-card__body > span {
  color: var(--muted, #aab2ba) !important;
}

body .canva-quickrow__item {
  background: var(--theme-surface, #030506) !important;
  color: var(--text, #f2f5f7) !important;
  border-color: var(--line, rgba(242, 245, 247, 0.16)) !important;
}

body .editor-tool-sidebar,
body .editor-panel--pages,
body .editor-panel--inspector,
body .editor-bottom-bar,
body .canvas-toolbar {
  background: var(--theme-surface-strong, #070a0c) !important;
  color: var(--text, #f2f5f7) !important;
  border-color: var(--line, rgba(242, 245, 247, 0.16)) !important;
}

body .editor-tool-sidebar .editor-tool-nav button,
body .editor-header button,
body .editor-panel button,
body .editor-bottom-bar button,
body .editor-bottom-bar output,
body .editor-bottom-bar strong {
  color: var(--text, #f2f5f7) !important;
}

body .editor-tool-sidebar .editor-tool-nav button:hover,
body .editor-tool-sidebar .editor-tool-nav button:focus-visible,
body .editor-tool-sidebar .editor-tool-nav button.is-active {
  color: var(--text, #f2f5f7) !important;
  background: color-mix(in srgb, var(--accent, #f2f5f7) 12%, transparent) !important;
  border-color: var(--line, rgba(242, 245, 247, 0.16)) !important;
}

body .editor-canvas-shell,
body .canvas-stage {
  background: var(--theme-page-bg, #010304) !important;
  color: var(--text, #f2f5f7) !important;
}

body .editor-bottom-bar__zoom input {
  accent-color: var(--accent, #f2f5f7) !important;
}

body .artboard {
  /* The artboard is user/template content and keeps its own document colors. */
  border-color: var(--text, #f2f5f7) !important;
  box-shadow: 0 18px 42px color-mix(in srgb, var(--theme-page-bg, #010304) 64%, transparent) !important;
}

body .details-workspace__preview,
body .details-workspace__panel,
body .details-dialog__card,
body .file-popover,
body .apps-popover,
body .resize-popover {
  background: var(--theme-surface-strong, #070a0c) !important;
  color: var(--text, #f2f5f7) !important;
  border-color: var(--line, rgba(242, 245, 247, 0.16)) !important;
}

@media (min-width: 851px) {
  body #editor-view.view--active .canvas-stage {
    padding: 66px 46px 46px !important;
  }
}

@media (max-width: 900px) {
  body .canva-homepage {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body .template-browser-sidebar {
    grid-column: 1 !important;
    grid-row: 2 !important;
    border-left: 0 !important;
    border-top-color: var(--line, rgba(242, 245, 247, 0.16)) !important;
  }
}

/* Keep the library rail owned by the editor. The gallery stays focused on
   discovery, while the open design keeps the full template library available
   beside the canvas. */
body:not(.template-view--editor) .template-browser-sidebar {
  display: none !important;
}

body.template-view--editor .template-browser-sidebar {
  display: flex !important;
}

body.template-view--gallery .canva-homepage {
  grid-template-columns: minmax(0, 1fr) !important;
}

body:not(.template-view--gallery) .editor-tool-sidebar {
  display: none !important;
}

body.template-view--gallery .editor-tool-sidebar {
  display: block !important;
}

body.template-view--gallery #gallery-view > .editor-tool-sidebar {
  display: block !important;
}

/* The editor tool rail stays attached to the gallery discovery surface. */
body.template-view--gallery #gallery-view {
  position: relative !important;
  box-sizing: border-box !important;
  padding-right: 92px !important;
}

body.template-view--gallery .editor-tool-sidebar {
  top: 0 !important;
  bottom: 0 !important;
  right: 0 !important;
  left: auto !important;
  width: 92px !important;
  border-right: 0 !important;
  border-left: 1px solid var(--line, rgba(242, 245, 247, 0.16)) !important;
}

body.template-view--editor #editor-view.view--active .editor-layout {
  margin-left: 0 !important;
  grid-template-columns: 72px minmax(0, 1fr) minmax(270px, 320px) !important;
  gap: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

body.template-view--editor #editor-view.view--active .template-browser-sidebar {
  grid-column: 3 !important;
  grid-row: 1 !important;
  min-height: 0;
  padding: 24px 16px 20px;
  overflow: hidden;
  border-right: 0 !important;
  border-left: 1px solid var(--line, rgba(242, 245, 247, 0.16)) !important;
}

body.template-view--editor #editor-view.view--active .editor-panel--pages {
  grid-column: 1 !important;
  grid-row: 1 !important;
}

body.template-view--editor #editor-view.view--active .editor-canvas-shell {
  grid-column: 2 !important;
  grid-row: 1 !important;
  min-width: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

/* The editable artboard is the document surface. Remove the decorative
   board/stage treatment around it without removing the page or its layers. */
body.template-view--editor #editor-view.view--active .canvas-stage {
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

body.template-view--editor #editor-view.view--active .artboard {
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

@media (max-width: 900px) {
  body.template-view--gallery #gallery-view {
    padding-right: 72px !important;
  }

  body.template-view--gallery .editor-tool-sidebar {
    width: 72px !important;
  }

  body.template-view--editor #editor-view.view--active .editor-layout {
    grid-template-columns: 64px minmax(0, 1fr) minmax(220px, 280px) !important;
  }

  body.template-view--editor #editor-view.view--active .template-browser-sidebar {
    padding: 16px 10px 14px;
  }
}

/* Infinity embeds Template inside its own shell, so the iframe uses a quiet
   tool bar. The standalone viewpoint keeps the full workspace navigation. */
body.template-viewpoint--infinity .template-navbar {
  grid-template-columns: minmax(0, 1fr) !important;
  justify-items: start !important;
  gap: 0 !important;
}

body.template-viewpoint--infinity .template-navbar__nav,
body.template-viewpoint--infinity .template-navbar__status,
body.template-viewpoint--infinity .template-navbar__create {
  display: none !important;
}

body.template-viewpoint--standalone .template-navbar {
  grid-template-columns: auto minmax(0, 1fr) auto auto !important;
}

body.template-viewpoint--standalone .template-navbar__brand {
  font-size: .9rem;
}

/* Standalone owns its own dark product surface. Infinity can continue to
   provide these variables from the host theme bridge without being changed by
   the standalone defaults. */
body.template-viewpoint--standalone {
  --theme-page-bg: #010304 !important;
  --theme-surface: #030506 !important;
  --theme-surface-strong: #070a0c !important;
  --theme-surface-soft: #090c0e !important;
  --text: #f2f5f7 !important;
  --muted: #aab2ba !important;
  --line: rgba(242, 245, 247, 0.16) !important;
  --line-strong: rgba(242, 245, 247, 0.3) !important;
  --accent: #f2f5f7 !important;
  --accent-strong: #ffffff !important;
  --accent-contrast: #010304 !important;
  --theme-button-text: #010304 !important;
  background: var(--theme-page-bg) !important;
  color: var(--text) !important;
}

body.template-viewpoint--standalone .template-navbar__nav,
body.template-viewpoint--standalone .template-navbar__item,
body.template-viewpoint--standalone .template-navbar__status {
  background-color: transparent !important;
}

body.template-viewpoint--standalone .template-navbar__create {
  background: #f2f5f7 !important;
  background-color: #f2f5f7 !important;
  color: #010304 !important;
}

/* Final Template workspace cleanup: the gallery rail and the main library
   are separate scroll containers, while the editor keeps its existing
   three-column structure and uses flat, quiet chrome. */
@media (min-width: 701px) {
  html,
  body {
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
  }

  body .app-shell {
    height: 100dvh !important;
    min-height: 0 !important;
    grid-template-rows: 68px minmax(0, 1fr) !important;
  }

  body .main-content {
    grid-row: 2 !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  body.template-view--gallery #gallery-view {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 92px !important;
    grid-template-rows: minmax(0, 1fr) !important;
    height: 100% !important;
    min-height: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  body.template-view--gallery #gallery-view > .canva-homepage {
    grid-column: 1 !important;
    grid-row: 1 !important;
    display: block !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  body.template-view--gallery .canva-homepage__main {
    height: 100% !important;
    min-height: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
  }

  body.template-view--gallery #gallery-view > .editor-tool-sidebar {
    grid-column: 2 !important;
    grid-row: 1 !important;
    position: static !important;
    inset: auto !important;
    width: auto !important;
    height: 100% !important;
    min-height: 0 !important;
    padding: 14px 7px 20px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
  }
}

@media (min-width: 701px) {
  body.template-view--editor #editor-view.view--active {
    height: calc(100dvh - 68px) !important;
    min-height: 0 !important;
    background: var(--theme-page-bg, var(--canva-black)) !important;
  }

  body.template-view--editor #editor-view.view--active .editor-layout,
  body.template-view--editor #editor-view.view--active .editor-canvas-shell,
  body.template-view--editor #editor-view.view--active .editor-panel,
  body.template-view--editor #editor-view.view--active .template-browser-sidebar {
    min-height: 0 !important;
  }

  body.template-view--editor #editor-view.view--active .editor-layout {
    height: 100% !important;
    overflow: hidden !important;
  }

  body.template-view--editor #editor-view.view--active .editor-panel--pages,
  body.template-view--editor #editor-view.view--active .template-browser-sidebar {
    overflow-y: auto !important;
    overscroll-behavior: contain;
  }

  body.template-view--editor #editor-view.view--active .template-browser-grid {
    flex: 1 1 auto;
    min-height: 0 !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
  }

  body.template-view--editor #editor-view.view--active .editor-header,
  body.template-view--editor #editor-view.view--active .editor-bottom-bar,
  body.template-view--editor #editor-view.view--active .canvas-toolbar,
  body.template-view--editor #editor-view.view--active .editor-panel,
  body.template-view--editor #editor-view.view--active .template-browser-sidebar,
  body.template-view--editor #editor-view.view--active .editor-icon-button,
  body.template-view--editor #editor-view.view--active .editor-menu-button,
  body.template-view--editor #editor-view.view--active #export-button,
  body.template-view--editor #editor-view.view--active #duplicate-page,
  body.template-view--editor #editor-view.view--active #toggle-pages {
    box-shadow: none !important;
  }

  body.template-view--editor #editor-view.view--active .editor-header,
  body.template-view--editor #editor-view.view--active .editor-bottom-bar,
  body.template-view--editor #editor-view.view--active .editor-panel,
  body.template-view--editor #editor-view.view--active .template-browser-sidebar {
    background: var(--theme-surface-strong, var(--canva-black-soft)) !important;
  }

  body.template-view--editor #editor-view.view--active .editor-canvas-shell,
  body.template-view--editor #editor-view.view--active .canvas-stage {
    background: var(--theme-page-bg, var(--canva-black)) !important;
  }

  body.template-view--editor #editor-view.view--active .editor-header button:disabled {
    opacity: .58;
  }
}

/* Final workspace correction: inactive views must not remain in the layout.
   The editor owns its canvas and keeps the template library in the right rail. */
.view:not(.view--active) {
  display: none !important;
}

body.template-view--gallery .canva-homepage__hero-art,
body.template-view--gallery .canva-quickrow,
body.template-view--gallery .canva-helpfab {
  display: none !important;
}

body.template-view--gallery .canva-homepage__hero,
body.template-view--gallery .canva-homepage__hero-panel {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

body.template-view--gallery .canva-homepage__hero-panel::after {
  display: none !important;
}

body.template-view--gallery .canva-homepage__hero-panel {
  padding: 28px 0 8px !important;
}

body.template-view--gallery .canva-homepage__search {
  box-shadow: none !important;
}

@media (min-width: 701px) {
  body.template-view--gallery .canva-homepage__main {
    grid-template-rows: 178px auto !important;
  }

  body.template-view--editor #gallery-view {
    display: none !important;
  }

  body.template-view--editor #editor-view.view--active {
    display: grid !important;
    grid-template-rows: 64px minmax(0, 1fr) !important;
  }

  body.template-view--editor #editor-view.view--active .editor-header {
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    background: var(--theme-surface-strong, var(--canva-black-soft)) !important;
  }

  body.template-view--editor #editor-view.view--active .editor-header__title {
    display: block !important;
    min-width: 0;
    text-align: center;
  }

  body.template-view--editor #editor-view.view--active .editor-menu-button {
    display: none !important;
  }

  body.template-view--editor #editor-view.view--active .editor-layout {
    grid-template-columns: 72px minmax(0, 1fr) minmax(280px, 320px) !important;
  }

  body.template-view--editor #editor-view.view--active .template-browser-sidebar {
    grid-column: 3 !important;
    grid-row: 1 !important;
    display: flex !important;
  }

  body.template-view--editor #editor-view.view--active .editor-canvas-shell {
    grid-column: 2 !important;
    grid-row: 1 !important;
  }
}

/* Pointer-focus contract for tabs and select controls. */
:where([role="tab"], [role="option"], select, [aria-selected="true"], [data-state="active"], .active, .selected):focus:not(:focus-visible) {
  outline: none !important;
  box-shadow: none !important;
}

/* Final Template white appearance. Keep the product chrome monochrome while
   leaving user-created artwork and template preview images untouched. */
body.template-viewpoint--standalone,
body.template-viewpoint--infinity {
  --theme-page-bg: #ffffff !important;
  --theme-surface: #ffffff !important;
  --theme-surface-strong: #ffffff !important;
  --theme-surface-soft: #ffffff !important;
  --text: #000000 !important;
  --muted: #000000 !important;
  --line: #000000 !important;
  --line-strong: #000000 !important;
  --accent: #000000 !important;
  --accent-strong: #000000 !important;
  --accent-secondary: #ffffff !important;
  --accent-contrast: #ffffff !important;
  --theme-button-text: #000000 !important;
  --bg: #ffffff !important;
  --panel: #ffffff !important;
  --panel-strong: #ffffff !important;
  --ink: #000000 !important;
  --canva-black: #ffffff !important;
  --canva-black-soft: #ffffff !important;
  --canva-white: #000000 !important;
  --canva-white-soft: #000000 !important;
  --canva-gold: #000000 !important;
  --canva-gold-bright: #000000 !important;
  --canva-gold-dark: #ffffff !important;
  --canva-line: #000000 !important;
  background: #ffffff !important;
  color: #000000 !important;
}

body.template-viewpoint--standalone,
body.template-viewpoint--standalone .app-shell,
body.template-viewpoint--infinity,
body.template-viewpoint--infinity .app-shell,
body.template-viewpoint--standalone .main-content,
body.template-viewpoint--infinity .main-content,
body.template-viewpoint--standalone #gallery-view,
body.template-viewpoint--infinity #gallery-view,
body.template-viewpoint--standalone #projects-view,
body.template-viewpoint--infinity #projects-view,
body.template-viewpoint--standalone #editor-view,
body.template-viewpoint--infinity #editor-view,
body.template-viewpoint--standalone .canva-homepage,
body.template-viewpoint--infinity .canva-homepage,
body.template-viewpoint--standalone .canva-homepage__main,
body.template-viewpoint--infinity .canva-homepage__main,
body.template-viewpoint--standalone .canva-homepage__hero,
body.template-viewpoint--infinity .canva-homepage__hero,
body.template-viewpoint--standalone .canva-homepage__hero-panel,
body.template-viewpoint--infinity .canva-homepage__hero-panel,
body.template-viewpoint--standalone .canva-shelf,
body.template-viewpoint--infinity .canva-shelf,
body.template-viewpoint--standalone .templates-home,
body.template-viewpoint--infinity .templates-home,
body.template-viewpoint--standalone .projects-page,
body.template-viewpoint--infinity .projects-page,
body.template-viewpoint--standalone .projects-page__library,
body.template-viewpoint--infinity .projects-page__library,
body.template-viewpoint--standalone .project-detail,
body.template-viewpoint--infinity .project-detail,
body.template-viewpoint--standalone .editor-layout,
body.template-viewpoint--infinity .editor-layout,
body.template-viewpoint--standalone .editor-tool-sidebar,
body.template-viewpoint--infinity .editor-tool-sidebar,
body.template-viewpoint--standalone .editor-panel,
body.template-viewpoint--infinity .editor-panel,
body.template-viewpoint--standalone .template-browser-sidebar,
body.template-viewpoint--infinity .template-browser-sidebar,
body.template-viewpoint--standalone .editor-canvas-shell,
body.template-viewpoint--infinity .editor-canvas-shell,
body.template-viewpoint--standalone .canvas-stage,
body.template-viewpoint--infinity .canvas-stage,
body.template-viewpoint--standalone .editor-bottom-bar,
body.template-viewpoint--infinity .editor-bottom-bar,
body.template-viewpoint--standalone .canvas-toolbar,
body.template-viewpoint--infinity .canvas-toolbar,
body.template-viewpoint--standalone .details-dialog__card,
body.template-viewpoint--infinity .details-dialog__card,
body.template-viewpoint--standalone .file-popover,
body.template-viewpoint--infinity .file-popover,
body.template-viewpoint--standalone .apps-popover,
body.template-viewpoint--infinity .apps-popover,
body.template-viewpoint--standalone .resize-popover,
body.template-viewpoint--infinity .resize-popover,
body.template-viewpoint--standalone .project-create-dialog__card,
body.template-viewpoint--infinity .project-create-dialog__card {
  background: #ffffff !important;
  background-image: none !important;
  color: #000000 !important;
}

body.template-viewpoint--standalone .template-navbar,
body.template-viewpoint--infinity .template-navbar,
body.template-viewpoint--standalone .editor-header,
body.template-viewpoint--infinity .editor-header {
  background: #ffffff !important;
  background-image: none !important;
  color: #000000 !important;
  border-color: #000000 !important;
  box-shadow: none !important;
}

body.template-viewpoint--standalone .template-navbar *,
body.template-viewpoint--infinity .template-navbar *,
body.template-viewpoint--standalone .editor-tool-sidebar *,
body.template-viewpoint--infinity .editor-tool-sidebar *,
body.template-viewpoint--standalone .canva-homepage *,
body.template-viewpoint--infinity .canva-homepage *,
body.template-viewpoint--standalone #projects-view *,
body.template-viewpoint--infinity #projects-view *,
body.template-viewpoint--standalone .editor-header *,
body.template-viewpoint--infinity .editor-header *,
body.template-viewpoint--standalone .editor-panel *,
body.template-viewpoint--infinity .editor-panel *,
body.template-viewpoint--standalone .editor-bottom-bar *,
body.template-viewpoint--infinity .editor-bottom-bar *,
body.template-viewpoint--standalone .canvas-toolbar *,
body.template-viewpoint--infinity .canvas-toolbar *,
body.template-viewpoint--standalone .template-browser-sidebar *,
body.template-viewpoint--infinity .template-browser-sidebar *,
body.template-viewpoint--standalone .details-dialog__card *,
body.template-viewpoint--infinity .details-dialog__card *,
body.template-viewpoint--standalone .file-popover *,
body.template-viewpoint--infinity .file-popover *,
body.template-viewpoint--standalone .apps-popover *,
body.template-viewpoint--infinity .apps-popover *,
body.template-viewpoint--standalone .resize-popover *,
body.template-viewpoint--infinity .resize-popover *,
body.template-viewpoint--standalone .project-create-dialog__card *,
body.template-viewpoint--infinity .project-create-dialog__card * {
  color: #000000 !important;
  border-color: #000000 !important;
}

body.template-viewpoint--standalone .template-navbar button,
body.template-viewpoint--infinity .template-navbar button,
body.template-viewpoint--standalone .editor-tool-sidebar button,
body.template-viewpoint--infinity .editor-tool-sidebar button,
body.template-viewpoint--standalone .editor-header button,
body.template-viewpoint--infinity .editor-header button,
body.template-viewpoint--standalone .editor-panel button,
body.template-viewpoint--infinity .editor-panel button,
body.template-viewpoint--standalone .editor-bottom-bar button,
body.template-viewpoint--infinity .editor-bottom-bar button,
body.template-viewpoint--standalone .canvas-toolbar button,
body.template-viewpoint--infinity .canvas-toolbar button,
body.template-viewpoint--standalone .canva-quickrow__item,
body.template-viewpoint--infinity .canva-quickrow__item,
body.template-viewpoint--standalone .shortcut-chip,
body.template-viewpoint--infinity .shortcut-chip,
body.template-viewpoint--standalone .button,
body.template-viewpoint--infinity .button,
body.template-viewpoint--standalone .see-all-button,
body.template-viewpoint--infinity .see-all-button,
body.template-viewpoint--standalone .details-follow,
body.template-viewpoint--infinity .details-follow,
body.template-viewpoint--standalone .details-icon-button,
body.template-viewpoint--infinity .details-icon-button,
body.template-viewpoint--standalone .projects-page__primary,
body.template-viewpoint--infinity .projects-page__primary,
body.template-viewpoint--standalone .projects-page__back,
body.template-viewpoint--infinity .projects-page__back {
  background: #ffffff !important;
  background-image: none !important;
  color: #000000 !important;
  border-color: #000000 !important;
  box-shadow: none !important;
}

body.template-viewpoint--standalone .template-navbar__item.is-active,
body.template-viewpoint--infinity .template-navbar__item.is-active,
body.template-viewpoint--standalone .template-navbar__item:hover,
body.template-viewpoint--infinity .template-navbar__item:hover,
body.template-viewpoint--standalone .template-navbar__item:focus-visible,
body.template-viewpoint--infinity .template-navbar__item:focus-visible,
body.template-viewpoint--standalone .editor-tool-nav button.is-active,
body.template-viewpoint--infinity .editor-tool-nav button.is-active,
body.template-viewpoint--standalone .editor-tool-nav button:hover,
body.template-viewpoint--infinity .editor-tool-nav button:hover,
body.template-viewpoint--standalone .editor-tool-nav button:focus-visible,
body.template-viewpoint--infinity .editor-tool-nav button:focus-visible,
body.template-viewpoint--standalone .button:hover,
body.template-viewpoint--infinity .button:hover,
body.template-viewpoint--standalone .button:focus-visible,
body.template-viewpoint--infinity .button:focus-visible {
  background: #ffffff !important;
  color: #000000 !important;
  border-color: #000000 !important;
  box-shadow: inset 0 0 0 1px #000000 !important;
}

body.template-viewpoint--standalone input,
body.template-viewpoint--infinity input,
body.template-viewpoint--standalone select,
body.template-viewpoint--infinity select,
body.template-viewpoint--standalone textarea,
body.template-viewpoint--infinity textarea,
body.template-viewpoint--standalone .canva-homepage__search,
body.template-viewpoint--infinity .canva-homepage__search,
body.template-viewpoint--standalone .template-browser-sidebar__search,
body.template-viewpoint--infinity .template-browser-sidebar__search,
body.template-viewpoint--standalone .search-hero-field,
body.template-viewpoint--infinity .search-hero-field,
body.template-viewpoint--standalone .controls-panel,
body.template-viewpoint--infinity .controls-panel {
  background: #ffffff !important;
  background-image: none !important;
  color: #000000 !important;
  border-color: #000000 !important;
  box-shadow: none !important;
}

body.template-viewpoint--standalone input::placeholder,
body.template-viewpoint--infinity input::placeholder,
body.template-viewpoint--standalone textarea::placeholder,
body.template-viewpoint--infinity textarea::placeholder {
  color: #000000 !important;
  opacity: 1 !important;
}

body.template-viewpoint--standalone .canva-quickrow__icon,
body.template-viewpoint--infinity .canva-quickrow__icon,
body.template-viewpoint--standalone .shortcut-chip__icon,
body.template-viewpoint--infinity .shortcut-chip__icon {
  background-color: #ffffff !important;
  border-color: #000000 !important;
  color: #000000 !important;
  filter: grayscale(1) contrast(1.4) brightness(.7) !important;
}

body.template-viewpoint--standalone .template-card,
body.template-viewpoint--infinity .template-card,
body.template-viewpoint--standalone .homepage-template-card,
body.template-viewpoint--infinity .homepage-template-card,
body.template-viewpoint--standalone .project-template-card,
body.template-viewpoint--infinity .project-template-card,
body.template-viewpoint--standalone .template-browser-card,
body.template-viewpoint--infinity .template-browser-card {
  background: #ffffff !important;
  color: #000000 !important;
  border-color: #000000 !important;
  box-shadow: none !important;
}

body.template-viewpoint--standalone .artboard,
body.template-viewpoint--infinity .artboard {
  /* The page itself remains user content; only the surrounding editor chrome
     is forced into the monochrome workspace theme. */
  box-shadow: none !important;
}

body.template-viewpoint--standalone .toast,
body.template-viewpoint--infinity .toast,
body.template-viewpoint--standalone .state-banner,
body.template-viewpoint--infinity .state-banner {
  background: #ffffff !important;
  color: #000000 !important;
  border: 1px solid #000000 !important;
  box-shadow: none !important;
}

body.template-viewpoint--standalone .editor-header svg,
body.template-viewpoint--infinity .editor-header svg,
body.template-viewpoint--standalone .editor-tool-sidebar svg,
body.template-viewpoint--infinity .editor-tool-sidebar svg,
body.template-viewpoint--standalone .editor-panel svg,
body.template-viewpoint--infinity .editor-panel svg,
body.template-viewpoint--standalone .editor-bottom-bar svg,
body.template-viewpoint--infinity .editor-bottom-bar svg,
body.template-viewpoint--standalone .canvas-toolbar svg,
body.template-viewpoint--infinity .canvas-toolbar svg {
  color: #000000 !important;
  stroke: #000000 !important;
}

/* Template gallery banner: use the supplied wide artwork between the
   workspace navbar and the template shelves. The search field sits centered
   at 15% above the banner's bottom edge. */
body.template-viewpoint--standalone.template-view--gallery .canva-homepage__hero,
body.template-viewpoint--infinity.template-view--gallery .canva-homepage__hero {
  min-height: 270px !important;
  padding: 0 !important;
}

body.template-viewpoint--standalone.template-view--gallery .canva-homepage__main,
body.template-viewpoint--infinity.template-view--gallery .canva-homepage__main {
  grid-template-rows: 270px auto !important;
}

body.template-viewpoint--standalone.template-view--gallery .canva-homepage__hero-panel,
body.template-viewpoint--infinity.template-view--gallery .canva-homepage__hero-panel {
  position: relative !important;
  box-sizing: border-box !important;
  width: 100% !important;
  min-height: 270px !important;
  aspect-ratio: 2426 / 624 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 0 !important;
  background-color: #ffffff !important;
  background-image: url("public/template-banner-white.png?v=20261010-template-sharp-purple") !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: 100% 100% !important;
  box-shadow: none !important;
}

body.template-viewpoint--standalone.template-view--gallery .canva-homepage__hero-panel::after,
body.template-viewpoint--infinity.template-view--gallery .canva-homepage__hero-panel::after {
  display: none !important;
}

body.template-viewpoint--standalone.template-view--gallery .canva-homepage__hero-panel h2,
body.template-viewpoint--infinity.template-view--gallery .canva-homepage__hero-panel h2 {
  position: absolute !important;
  top: 18% !important;
  left: 50% !important;
  z-index: 1 !important;
  margin: 0 !important;
  color: #000000 !important;
  font-size: clamp(2rem, 4vw, 4rem) !important;
  line-height: 1 !important;
  text-align: center !important;
  transform: translateX(-50%) !important;
}

body.template-viewpoint--standalone.template-view--gallery .canva-homepage__hero-art,
body.template-viewpoint--infinity.template-view--gallery .canva-homepage__hero-art {
  display: none !important;
}

body.template-viewpoint--standalone.template-view--gallery .canva-homepage__search,
body.template-viewpoint--infinity.template-view--gallery .canva-homepage__search {
  position: absolute !important;
  bottom: 15% !important;
  left: 50% !important;
  z-index: 2 !important;
  box-sizing: border-box !important;
  width: min(760px, 72%) !important;
  min-height: 58px !important;
  margin: 0 !important;
  padding: 0 22px !important;
  border: 2px solid #000000 !important;
  border-radius: 16px !important;
  background: #ffffff !important;
  color: #000000 !important;
  box-shadow: none !important;
  transform: translateX(-50%) !important;
}

body.template-viewpoint--standalone.template-view--gallery .canva-homepage__search input,
body.template-viewpoint--infinity.template-view--gallery .canva-homepage__search input {
  color: #000000 !important;
  font-size: clamp(.95rem, 1.4vw, 1.2rem) !important;
  font-weight: 600 !important;
}

@media (max-width: 700px) {
  body.template-viewpoint--standalone.template-view--gallery .canva-homepage__hero,
  body.template-viewpoint--infinity.template-view--gallery .canva-homepage__hero {
    min-height: 235px !important;
  }

  body.template-viewpoint--standalone.template-view--gallery .canva-homepage__main,
  body.template-viewpoint--infinity.template-view--gallery .canva-homepage__main {
    grid-template-rows: 235px auto !important;
  }

  body.template-viewpoint--standalone.template-view--gallery .canva-homepage__hero-panel,
  body.template-viewpoint--infinity.template-view--gallery .canva-homepage__hero-panel {
    min-height: 235px !important;
    background-size: cover !important;
  }

  body.template-viewpoint--standalone.template-view--gallery .canva-homepage__search,
  body.template-viewpoint--infinity.template-view--gallery .canva-homepage__search {
    width: 82% !important;
    min-height: 48px !important;
    border-radius: 12px !important;
  }
}
