/* Page-only styles. Sheet cells retain their real content; colours follow the shell theme. */
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery,
.tg-public #template-gallery {
  color: var(--fg-ink);
  font: 13px/1.45 var(--font-body);
  width: 100%;
  min-width: 0;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery *,
.tg-public #template-gallery * {
  box-sizing: border-box;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery [hidden],
.tg-public #template-gallery [hidden] {
  display: none !important;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery :is(a, button, input, [tabindex]):focus-visible,
.tg-public #template-gallery :is(a, button, input, [tabindex]):focus-visible {
  outline: 2px solid var(--fg-focus);
  outline-offset: 3px;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery a,
.tg-public #template-gallery a {
  color: inherit;
  text-decoration: none;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery svg,
.tg-public #template-gallery svg {
  flex: none;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery h1,
.tg-public #template-gallery h1 {
  margin: 0 0 4px;
  font: 600 22px/1.2 var(--font-body);
  letter-spacing: -.01em;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery h1::after,
.tg-public #template-gallery h1::after {
  display: none;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-sub,
.tg-public #template-gallery .tg-sub {
  color: var(--fg-muted);
  margin: 0;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-head,
.tg-public #template-gallery .tg-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-search,
.tg-public #template-gallery .tg-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  width: 280px;
  flex: none;
  padding: 0 12px;
  background: var(--fg-surface);
  border: 1px solid var(--fg-control-border);
  border-radius: var(--radius-sm);
  color: var(--fg-muted);
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-search input,
.tg-public #template-gallery .tg-search input {
  width: 100%;
  min-width: 0;
  height: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--fg-ink);
  font: inherit;
  box-shadow: none;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-search input::placeholder,
.tg-public #template-gallery .tg-search input::placeholder {
  color: var(--fg-muted);
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-filters,
.tg-public #template-gallery .tg-filters {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  margin-bottom: 16px;
  padding: 3px;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-chip,
.tg-public #template-gallery .tg-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 12px;
  border: 0 !important;
  border-radius: var(--radius-pill) !important;
  background: transparent !important;
  color: var(--fg-ink);
  white-space: nowrap;
  cursor: pointer;
  font: inherit;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-chip[aria-pressed="true"],
.tg-public #template-gallery .tg-chip[aria-pressed="true"] {
  background: color-mix(in srgb, var(--fg-ink) 10%, var(--fg-canvas)) !important;
  font-weight: 600;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-chip [data-count],
.tg-public #template-gallery .tg-chip [data-count] {
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery :is(.tg-chip, .tg-pill, .tg-button) span,
.tg-public #template-gallery :is(.tg-chip, .tg-pill, .tg-button) span {
  line-height: 1;
  text-box: trim-both cap alphabetic;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-grid,
.tg-public #template-gallery .tg-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-card,
.tg-public #template-gallery .tg-card {
  min-width: 0;
  background: var(--fg-surface);
  border: 1px solid var(--fg-line);
  border-radius: var(--radius-md);
  overflow: hidden;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-card > a,
.tg-public #template-gallery .tg-card > a {
  display: flex;
  flex-direction: column;
  height: 100%;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-card > a:focus-visible,
.tg-public #template-gallery .tg-card > a:focus-visible {
  outline-offset: -3px;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-card-body,
.tg-public #template-gallery .tg-card-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-card h2,
.tg-public #template-gallery .tg-card h2 {
  font: 600 13.5px/1.3 var(--font-body);
  margin: 0;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-card p,
.tg-public #template-gallery .tg-card p {
  margin: 0;
  color: var(--fg-muted);
  font-size: 12.5px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-meta,
.tg-public #template-gallery .tg-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding-top: 6px;
  font-size: 12px;
  color: var(--fg-muted);
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-meta > span,
.tg-public #template-gallery .tg-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-pill,
.tg-public #template-gallery .tg-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 20px;
  padding: 0 8px;
  border-radius: var(--radius-pill);
  background: var(--fg-surface-alt);
  color: var(--fg-ink);
  font: 600 11px/1 var(--font-body);
  text-box: trim-both cap alphabetic;
  white-space: nowrap;
  flex: none;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-pill--free,
.tg-public #template-gallery .tg-pill--free {
  background: var(--fg-status-matched-bg);
  color: var(--fg-status-matched-ink);
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-pill--included,
.tg-public #template-gallery .tg-pill--included {
  background: var(--fg-selected-bg);
  color: var(--fg-selected-ink);
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-pill--credits,
.tg-public #template-gallery .tg-pill--credits {
  background: var(--fg-status-review-bg);
  color: var(--fg-status-review-ink);
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-pill svg,
.tg-public #template-gallery .tg-pill svg {
  width: 10px;
  height: 10px;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-back,
.tg-public #template-gallery .tg-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--fg-muted);
  margin-bottom: 12px;
  font-weight: 600;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-detail,
.tg-public #template-gallery .tg-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-large,
.tg-public #template-gallery .tg-large {
  min-width: 0;
  background: var(--fg-surface);
  border: 1px solid var(--fg-line);
  border-radius: var(--radius-md);
  overflow: hidden;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-caption,
.tg-public #template-gallery .tg-caption {
  padding: 10px 14px;
  margin: 0;
  color: var(--fg-muted);
  font-size: 12px;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-panel,
.tg-public #template-gallery .tg-panel {
  position: sticky;
  top: 24px;
  background: var(--fg-surface);
  border: 1px solid var(--fg-line);
  border-radius: var(--radius-md);
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-panel section,
.tg-public #template-gallery .tg-panel section {
  padding: 16px 18px;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-panel section + section,
.tg-public #template-gallery .tg-panel section + section {
  border-top: 1px solid var(--fg-line);
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-panel h1,
.tg-public #template-gallery .tg-panel h1 {
  display: block;
  font-size: 20px;
  margin: 8px 0 4px;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-panel h2,
.tg-public #template-gallery .tg-panel h2 {
  font: 600 12px/1.3 var(--font-body);
  margin: 0 0 8px;
  color: var(--fg-muted);
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-tags,
.tg-public #template-gallery .tg-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-button,
.tg-public #template-gallery .tg-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 10px 14px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--fg-surface-alt);
  color: var(--fg-ink);
  font-weight: 600;
  line-height: 1;
  width: 100%;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-button--primary,
.tg-public #template-gallery .tg-button--primary {
  background: var(--fg-primary-bg);
  color: var(--fg-primary-ink);
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-cost,
.tg-public #template-gallery .tg-cost {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding-left: 10px;
  border-left: 1px solid color-mix(in srgb, currentColor 30%, transparent);
  min-height: 16px;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-cost svg,
.tg-public #template-gallery .tg-cost svg {
  width: 12px;
  height: 12px;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-button + .tg-button,
.tg-public #template-gallery .tg-button + .tg-button {
  margin-top: 8px;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-panel ul,
.tg-public #template-gallery .tg-panel ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-panel li,
.tg-public #template-gallery .tg-panel li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-panel li svg,
.tg-public #template-gallery .tg-panel li svg {
  color: var(--fg-status-matched-ink);
  margin-top: 1px;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-checked,
.tg-public #template-gallery .tg-checked {
  display: flex;
  gap: 8px;
  color: var(--fg-status-matched-ink);
  margin: 0;
}
html:root:root body.app-layout.shell-v3.shell-bench #app-shell-content#app-shell-content #template-gallery .tg-dock,
.tg-public #template-gallery .tg-dock {
  display: none;
}
