/* Tool entry covers are presentation-only; keep existing buttons, categories and permissions. */
html[data-theme="light"] #toolsGrid :is(.tools-feature-grid, .tools-secondary-grid) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

html[data-theme="light"] #toolsGrid :is(.tool-feature-card, .tool-secondary-card) {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 28px minmax(0, 1fr);
  align-items: start;
  align-content: normal;
  gap: 8px;
  width: 100%;
  height: auto;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 1;
  padding: 12px;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 15%);
  border-radius: 35px;
  background: #315f69;
  color: #fff;
  text-align: left;
  letter-spacing: 0;
  box-shadow: 0 5px 14px rgb(32 41 74 / 7%);
}

html[data-theme="light"] #toolsGrid [data-tool-action][hidden] { display: none !important; }
html[data-theme="light"] #toolsGrid :is(.tool-feature-card, .tool-secondary-card)::after { content: none; }
html[data-theme="light"] #toolsGrid .tool-hub-cover {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: inherit;
  opacity: 0;
}
html[data-theme="light"] #toolsGrid .has-tool-cover > .tool-hub-cover { opacity: 1; }
html[data-theme="light"] #toolsGrid .tool-hub-cover[hidden] { display: none; }
html[data-theme="light"] #toolsGrid .has-tool-cover::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, transparent 15%, rgb(0 0 0 / 18%) 40%, rgb(0 0 0 / 82%) 100%);
  content: "";
  pointer-events: none;
}

html[data-theme="light"] #toolsGrid :is(.tool-feature-card, .tool-secondary-card) > i {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 8px;
  color: #fff;
  background: rgb(255 255 255 / 15%);
  box-shadow: none;
}
html[data-theme="light"] #toolsGrid .has-tool-cover > i { visibility: hidden; }
html[data-theme="light"] #toolsGrid :is(.tool-feature-card, .tool-secondary-card) > i .app-icon { width: 18px; height: 18px; }
html[data-theme="light"] #toolsGrid :is(.tool-feature-card, .tool-secondary-card) > div {
  position: relative;
  display: grid;
  align-self: end;
  gap: 3px;
  min-width: 0;
  min-height: 0;
}
html[data-theme="light"] #toolsGrid :is(.tool-feature-card, .tool-secondary-card) small {
  color: rgb(255 255 255 / 80%);
  font-size: 10px;
  line-height: 1.4;
}
html[data-theme="light"] #toolsGrid :is(.tool-feature-card, .tool-secondary-card) strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: #fff;
  font-size: 16px;
  font-weight: 750;
  line-height: 1.3;
  white-space: normal;
}
html[data-theme="light"] #toolsGrid :is(.tool-feature-card, .tool-secondary-card) div > span {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  max-width: none;
  padding-right: 26px;
  color: rgb(255 255 255 / 85%);
  font-size: 11px;
  line-height: 1.4;
  white-space: normal;
}
html[data-theme="light"] #toolsGrid :is(.tool-feature-card, .tool-secondary-card) > b {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  color: #344751;
}
html[data-theme="light"] #toolsGrid [data-tool-cover-id="poster-master"] { background: #3b526d; }
html[data-theme="light"] #toolsGrid [data-tool-cover-id="flyer-design"] { background: #8a4d45; }
html[data-theme="light"] #toolsGrid [data-tool-cover-id="illustration-design"] { background: #436b5b; }
html[data-theme="light"] #toolsGrid [data-tool-cover-id="xhs-assistant"] { background: #51428b; }
html[data-theme="light"] #toolsGrid [data-tool-cover-id="product-detail-page"] { background: #237569; }
html[data-theme="light"] #toolsGrid [data-tool-cover-id="creation-plan"] { background: #a2543b; }
html[data-theme="light"] #toolsGrid [data-tool-cover-id="product-photography"] { background: #306e74; }
html[data-theme="light"] #toolsGrid [data-tool-cover-id="diagnosis"] { background: #3d6778; }
html[data-theme="light"] #toolsGrid [data-tool-cover-id="copywriter"] { background: #715475; }
html[data-theme="light"] #toolsGrid [data-tool-cover-id="calendar-poster"] { background: #806140; }
html[data-theme="light"] #toolsGrid [data-tool-cover-id="store-archive"] { background: #4e6764; }

@media (max-width: 360px) {
  html[data-theme="light"] #toolsGrid :is(.tool-feature-card, .tool-secondary-card) small { display: none; }
  html[data-theme="light"] #toolsGrid :is(.tool-feature-card, .tool-secondary-card) div > span { -webkit-line-clamp: 1; }
}
