.page-templates .catalog-desk {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: stretch;
}

@media (min-width: 960px) {
  .page-templates .catalog-desk {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 13.5rem;
    gap: 2.25rem;
    align-items: start;
  }

  .page-templates .catalog-desk .catalog-rail {
    order: 2;
  }

  .page-templates .catalog-desk .tpl-grid {
    order: 1;
  }
}

.catalog-count {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 0.65rem;
  min-width: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #3a342f;
  box-shadow: none;
}

.catalog-count strong {
  font-family: var(--font-serif, 'Cormorant Garamond', serif);
  font-size: 2.4rem;
  font-weight: 600;
  line-height: 1;
  color: #a67c78;
}

.catalog-count span {
  margin-top: 0;
  font-size: 0.75rem;
  opacity: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a8178;
}

.catalog-rail {
  padding: 0 0 0.25rem;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 0;
  border-top: 1px solid rgba(58, 52, 47, 0.14);
  box-shadow: none;
}

@media (min-width: 960px) {
  .catalog-rail {
    position: sticky;
    top: 5.1rem;
    border-top: 0;
    border-left: 1px solid rgba(58, 52, 47, 0.14);
    padding: 0 0 0 1.25rem;
  }
}

.catalog-rail-block + .catalog-rail-block {
  margin-top: 1.15rem;
  padding-top: 1.05rem;
  border-top: 1px solid rgba(58, 52, 47, 0.14);
}

.catalog-rail .filter-label {
  margin-bottom: 0.45rem;
}

.catalog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
}

@media (min-width: 960px) {
  .catalog-tags {
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
  }

  .catalog-tags .filter-tag {
    width: 100%;
    text-align: left;
    padding-left: 0;
  }

  .catalog-tags .filter-tag.is-active {
    box-shadow: inset 2px 0 0 #a67c78;
    padding-left: 0.55rem;
    border-bottom-color: transparent;
    color: #8c645f;
  }
}

.page-templates .tpl-grid {
  margin: 0;
}

.tpl-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

@media (min-width: 720px) {
  .tpl-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
  }
}

@media (min-width: 1120px) {
  .tpl-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.tpl-card {
  position: relative;
  border-top: 1px solid rgba(58, 52, 47, 0.14);
}

@media (min-width: 720px) {
  .tpl-card:nth-child(odd) {
    padding-right: 1.25rem;
    border-right: 1px solid rgba(58, 52, 47, 0.14);
  }

  .tpl-card:nth-child(even) {
    padding-left: 1.25rem;
  }
}

.tpl-card-glow {
  display: none;
}

.tpl-card-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 0.95rem;
  padding: 1.15rem 0 1.35rem;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 0;
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
  transition: none;
}

@media (min-width: 720px) {
  .page-plaza:not(.page-templates) .tpl-grid {
    grid-template-columns: 1fr;
  }

  .page-plaza:not(.page-templates) .tpl-card:nth-child(odd),
  .page-plaza:not(.page-templates) .tpl-card:nth-child(even) {
    padding-left: 0;
    padding-right: 0;
    border-right: 0;
  }

  .page-plaza:not(.page-templates) .tpl-card-inner {
    grid-template-columns: 13rem minmax(0, 1fr);
    gap: 1.35rem;
    align-items: center;
  }

  .page-plaza:not(.page-templates) .tpl-shot {
    height: 14.5rem;
  }
}

.tpl-card:hover .tpl-card-inner,
.tpl-card.is-active .tpl-card-inner {
  transform: none;
  border-color: transparent;
  box-shadow: none;
}

.tpl-shot {
  position: relative;
  width: 100%;
  height: 16.5rem;
  flex-shrink: 0;
  background: #faf6f1;
  border: 1px solid rgba(58, 52, 47, 0.14);
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.tpl-shot::before {
  content: '';
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 3px;
  background: #a67c78;
  z-index: 4;
}

.tpl-card:hover .tpl-shot {
  transform: none;
  border-color: #a67c78;
}

.tpl-info {
  flex: 1;
  width: 100%;
  min-width: 0;
  text-align: left;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.tpl-badge-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.tpl-chip {
  padding: 0;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rose-deep, #8c645f);
  background: transparent;
  border: 0;
  border-radius: 0;
}

.tpl-chip-icon {
  color: #b08986;
  font-size: 0.7rem;
}

.tpl-title {
  font-family: 'Cormorant Garamond', 'Noto Serif SC', serif;
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #3a342f;
  line-height: 1.2;
}

.tpl-desc {
  margin-top: 0.4rem;
  font-size: 0.86rem;
  font-weight: 400;
  color: #5c544c;
  line-height: 1.65;
}

.tpl-rule {
  display: block;
  width: 2.25rem;
  height: 1px;
  border: 0;
  background: #a67c78;
  margin: 0.75rem 0 0.65rem;
}

.tpl-feats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.95rem;
  margin: 0 0 0.95rem;
}

.tpl-feats span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 550;
  color: #8a8178;
}

.tpl-feats i {
  color: #8b9a82;
}

.tpl-use-btn {
  width: auto;
  align-self: flex-start;
  height: 2.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: transparent;
  border: 1px solid #3a342f;
  color: #3a342f;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 0;
  cursor: pointer;
  padding: 0 0.95rem;
  margin-top: auto;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.tpl-card:hover .tpl-use-btn,
.tpl-use-btn:hover {
  background: #a67c78;
  color: #fff8f5;
  border-color: #a67c78;
}

.tpl-use-btn:active {
  transform: none;
}

.tpl-name {
  display: none;
}

.tpl-active-badge {
  position: absolute;
  top: 1.2rem;
  right: 0;
  width: auto;
  height: auto;
  padding: 0.15rem 0.45rem;
  background: #a67c78;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff8f5;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  z-index: 5;
}

.tpl-hover-mask {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 0.75rem;
  background: linear-gradient(to top, rgba(58, 52, 47, 0.42), transparent 55%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  z-index: 3;
  pointer-events: none;
}

.tpl-card:hover .tpl-hover-mask {
  opacity: 1;
  visibility: visible;
}

.tpl-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.55rem;
  background: #faf6f1;
  color: #3a342f;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 0;
}

.tpl-preview {
  height: 100%;
  overflow: hidden;
  position: relative;
  background: #fff;
}

.tpl-preview::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 18%;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.95));
  pointer-events: none;
  z-index: 1;
}

.r-doc {
  height: 100%;
  font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: #1f2937;
  line-height: 1.45;
  overflow: hidden;
  font-size: 10.5px;
}

.r-doc * {
  box-sizing: border-box;
}

.r-inner {
  padding: 12px 14px 16px;
}

.r-tac {
  text-align: center;
}

.r-name {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  letter-spacing: 0.02em;
  line-height: 1.25;
}

.r-meta {
  margin: 3px 0 0;
  font-size: 9.5px;
  color: #6b7280;
  line-height: 1.4;
}

.r-summary {
  margin: 6px 0 0;
  font-size: 8.5px;
  color: #6b7280;
  line-height: 1.5;
}

.r-work {
  margin-top: 8px;
}

.r-work-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
  font-size: 10px;
}

.r-work-row strong {
  color: #111827;
  font-weight: 600;
}

.r-work-row span {
  color: #9ca3af;
  font-size: 8.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.r-work-role {
  font-size: 9px;
  color: #6b7280;
  margin-top: 1px;
}

.r-work-bullet {
  margin: 4px 0 0;
  font-size: 9px;
  color: #4b5563;
  line-height: 1.45;
  padding-left: 8px;
  position: relative;
}

.r-work-bullet::before {
  content: '·';
  position: absolute;
  left: 0;
  color: #9ca3af;
}

.r-block {
  margin-top: 8px;
}

.r-block-title {
  margin: 0 0 3px;
  font-size: 9.5px;
  font-weight: 700;
  color: #374151;
}

.r-block-line {
  margin: 0;
  font-size: 9px;
  color: #6b7280;
  line-height: 1.4;
}

.r-photo {
  border-radius: 50%;
  background: linear-gradient(145deg, #e9d5ff, #c4b5fd);
  flex-shrink: 0;
}

.r-photo-sm {
  width: 22px;
  height: 22px;
}

.r-photo-lg {
  width: 28px;
  height: 28px;
  margin: 0 auto 6px;
}

.r-photo-white {
  width: 24px;
  height: 24px;
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.55);
}

.r-divider {
  height: 1px;
  background: #111827;
  margin: 8px 0;
}

.r-divider-double {
  height: 3px;
  border-top: 1px solid #111827;
  border-bottom: 1px solid #111827;
  margin: 8px auto;
  width: 65%;
}

.r-dot {
  width: 20px;
  height: 2px;
  background: #10b981;
  margin: 6px auto 10px;
}

.r-style-minimal .r-accent {
  height: 4px;
  background: #7c6aef;
}

.r-style-minimal .r-block-title {
  color: #7c6aef;
  border-bottom: 1px solid #ede9fe;
  padding-bottom: 2px;
}

.r-style-executive {
  border-left: 3px solid #111827;
}

.r-style-executive .r-name {
  font-family: Georgia, 'Noto Serif SC', serif;
}

.r-style-creative .r-hero {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #6366f1, #818cf8);
  color: #fff;
}

.r-style-creative .r-hero .r-photo {
  width: 26px;
  height: 26px;
  background: rgba(255, 255, 255, 0.35);
}

.r-style-creative .r-hero .r-name {
  color: #fff;
  font-size: 14px;
}

.r-style-creative .r-hero .r-meta {
  color: rgba(255, 255, 255, 0.88);
}

.r-style-creative .r-block-title {
  color: #6366f1;
}

.r-style-academic .r-name {
  color: #065f46;
}

.r-style-academic .r-summary,
.r-style-intern .r-summary,
.r-style-classic .r-summary,
.r-style-teacher .r-summary {
  text-align: center;
}

.r-style-academic .r-block-title {
  color: #059669;
}

.r-style-column {
  display: grid;
  grid-template-columns: 34% 66%;
  height: 100%;
}

.r-style-column .r-aside {
  background: linear-gradient(180deg, #0891b2, #0e7490);
  color: #fff;
  padding: 12px 8px;
  text-align: center;
}

.r-style-column .r-aside .r-name {
  font-size: 11px;
  color: #fff;
}

.r-style-column .r-aside-label {
  font-size: 8.5px;
  opacity: 0.92;
  margin: 2px 0 8px;
}

.r-style-column .r-aside-info {
  font-size: 8px;
  line-height: 1.5;
  opacity: 0.9;
  margin: 0;
}

.r-style-column .r-main {
  padding: 12px 10px;
}

.r-style-column .r-block-title {
  color: #0891b2;
}

.r-style-timeline .r-tl {
  margin-top: 8px;
  padding-left: 10px;
  border-left: 2px solid #fcd34d;
}

.r-style-timeline .r-tl-node {
  position: relative;
  margin-bottom: 10px;
  padding-left: 4px;
}

.r-style-timeline .r-tl-node::before {
  content: '';
  position: absolute;
  left: -13px;
  top: 3px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f59e0b;
  border: 1.5px solid #fff;
  box-shadow: 0 0 0 1px #fcd34d;
}

.r-style-timeline .r-tl-node span {
  display: block;
  font-size: 8px;
  color: #d97706;
}

.r-style-timeline .r-tl-node strong {
  display: block;
  font-size: 9.5px;
  color: #111827;
  margin-top: 1px;
}

.r-style-timeline .r-tl-node p {
  margin: 2px 0 0;
  font-size: 8.5px;
  color: #6b7280;
}

.r-style-classic .r-name {
  font-family: Georgia, 'Noto Serif SC', serif;
}

.r-style-classic .r-meta {
  letter-spacing: 0.05em;
}

.r-style-compact {
  padding: 10px 12px;
}

.r-style-compact .r-compact-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 2px solid #7c6aef;
  padding-bottom: 4px;
  margin-bottom: 8px;
}

.r-style-compact .r-compact-head .r-name {
  font-size: 13px;
}

.r-style-compact .r-compact-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.r-style-compact .r-work,
.r-style-compact .r-block {
  margin-top: 0;
}

.r-style-compact .r-work-row,
.r-style-compact .r-work-role,
.r-style-compact .r-work-bullet,
.r-style-compact .r-block-line {
  font-size: 8px;
}

.r-style-elegant .r-elegant-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.r-style-elegant .r-name {
  font-family: Georgia, 'Noto Serif SC', serif;
}

.r-style-elegant .r-dash {
  margin: 8px 0 4px;
  font-size: 9px;
  color: #a8a29e;
  font-family: Georgia, serif;
}

.r-style-split {
  padding: 12px 14px;
}

.r-style-split .r-split-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 2px solid #111827;
  padding-bottom: 4px;
  margin-bottom: 8px;
}

.r-style-split .r-split-top .r-name {
  font-size: 13px;
}

.r-style-split .r-label {
  display: inline-block;
  background: #111827;
  color: #fff;
  font-size: 8px;
  font-weight: 600;
  padding: 2px 6px;
  margin: 6px 0 4px;
}

.r-style-dev {
  background: #0f172a;
  color: #e2e8f0;
  padding: 12px 14px;
}

.r-style-dev .r-prompt {
  margin: 0 0 4px;
  font-family: 'SF Mono', Menlo, monospace;
  font-size: 8px;
  color: #22d3ee;
}

.r-style-dev .r-name {
  font-size: 13px;
  color: #22d3ee;
  font-family: 'SF Mono', Menlo, monospace;
}

.r-style-dev .r-meta {
  color: #94a3b8;
  font-family: 'SF Mono', Menlo, monospace;
}

.r-style-dev .r-summary {
  color: #94a3b8;
  font-family: 'SF Mono', Menlo, monospace;
  font-size: 8px;
}

.r-style-dev .r-block-title {
  color: #22d3ee;
  font-family: 'SF Mono', Menlo, monospace;
}

.r-style-dev .r-block-line {
  color: #cbd5e1;
  font-family: 'SF Mono', Menlo, monospace;
}

.r-style-fresh {
  background: #f9fafb;
}

.r-style-fresh .r-name {
  color: #7c6aef;
}

.r-style-fresh .r-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  padding: 8px 10px;
  margin-top: 8px;
}

.r-style-fresh .r-card .r-work,
.r-style-fresh .r-card .r-block {
  margin-top: 0;
}

.r-style-fresh .r-block-title {
  color: #7c6aef;
}

.r-style-bold .r-bold-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: #fff;
}

.r-style-bold .r-bold-banner .r-name {
  color: #fff;
  font-size: 14px;
}

.r-style-bold .r-bold-banner .r-meta {
  color: rgba(255, 255, 255, 0.9);
}

.r-style-bold .r-block-title {
  color: #dc2626;
}

.r-style-intern .r-name { color: #2563eb; }
.r-style-intern .r-dot { background: #3b82f6; }
.r-style-intern .r-block-title { color: #2563eb; }

.r-style-product .r-accent { height: 4px; background: #f97316; }
.r-style-product .r-block-title { color: #ea580c; border-bottom: 1px solid #ffedd5; padding-bottom: 2px; }

.r-style-fe .r-fe-bar { height: 4px; background: #0ea5e9; }
.r-style-fe .r-block-title { color: #0284c7; }

.r-style-be .r-aside-dark {
  background: linear-gradient(180deg, #1e293b, #0f172a);
}

.r-style-be .r-block-title { color: #334155; }

.r-style-teacher .r-name { font-family: Georgia, 'Noto Serif SC', serif; color: #78350f; }
.r-style-teacher .r-block-title { color: #92400e; }

.r-style-medical .r-block-title { color: #0d9488; }
.r-style-medical .r-photo-sm { background: linear-gradient(145deg, #99f6e4, #5eead4); }

.r-style-startup .r-hero-warm {
  background: linear-gradient(135deg, #f97316, #fb923c);
}

.r-style-startup .r-hero-warm .r-photo { background: rgba(255,255,255,0.35); }
.r-style-startup .r-hero-warm .r-name { color: #fff; font-size: 14px; }
.r-style-startup .r-hero-warm .r-meta { color: rgba(255,255,255,0.9); }
.r-style-startup .r-block-title { color: #ea580c; }

.r-style-consultant {
  border-left: 3px solid #1e3a5f;
}

.r-style-consultant .r-name { font-family: Georgia, 'Noto Serif SC', serif; }
.r-style-consultant .r-divider { background: #1e3a5f; }
.r-style-consultant .r-block-title { color: #1e3a5f; }

.tpl-empty {
  grid-column: 1 / -1;
  text-align: left;
  padding: 2rem 0;
  color: #8a8178;
  font-size: 0.875rem;
  background: transparent;
  border: 0;
  border-top: 1px dashed rgba(58, 52, 47, 0.16);
  border-radius: 0;
}
