html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-preview,
.tg-public #template-gallery .tg-preview {
  container-type: inline-size;
  height: 196px;
  background: var(--fg-surface);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-tabs,
.tg-public #template-gallery .tg-tabs {
  display: flex;
  flex: none;
  /* Sheet tabs shrink to fit, like browser tabs; each keeps its full name as a tooltip. */
  overflow: hidden;
  height: 28px;
  background: var(--fg-surface-alt);
  border-top: 1px solid var(--fg-line);
  font-size: 11px;
  line-height: 1;
  color: var(--fg-muted);
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-tabs span,
.tg-public #template-gallery .tg-tabs span {
  display: block;
  flex: 0 1 auto;
  min-width: 0;
  padding: 0 9px;
  line-height: 28px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-tabs .is-current,
.tg-public #template-gallery .tg-tabs .is-current {
  background: var(--fg-surface);
  flex-shrink: 0;
  color: var(--fg-ink);
  font-weight: 600;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-preview-scroll,
.tg-public #template-gallery .tg-preview-scroll {
  overflow-x: auto;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-preview--detail,
.tg-public #template-gallery .tg-preview--detail {
  height: auto;
}
