.tag-search-shell{max-width:1120px;margin:0 auto;padding:28px 18px 70px}
.tag-search-head{margin-bottom:22px}
.tag-search-form{display:flex;gap:9px;flex-wrap:wrap;max-width:800px}
.tag-search-form input[type=search]{flex:1;min-width:240px}
.tag-cloud-panel{margin:22px 0 34px;padding:18px;border:1px solid #432b3d;border-radius:16px;background:#1d141e;color:#fff8fc}
.tag-cloud-panel h2{margin-top:0}
.tag-cloud{display:flex;gap:9px;flex-wrap:wrap}
.tag-chip,.post-tag{display:inline-flex;align-items:center;gap:7px;text-decoration:none;border-radius:999px;padding:7px 11px;border:1px solid #674459;background:#281b29;color:#ffcee3;font-weight:700}
.tag-chip span{display:inline-grid;place-items:center;min-width:22px;height:22px;padding:0 5px;border-radius:999px;background:#100b11;color:#cdb9c7;font-size:.78rem}
.tag-chip.active{background:#f25c9b;color:#160b11;border-color:#f25c9b}
.tag-results{display:grid;grid-template-columns:repeat(auto-fit,minmax(290px,1fr));gap:18px}
.tag-result-card{background:#1d141e;color:#fff8fc;border:1px solid #432b3d;border-radius:18px;padding:18px;overflow:hidden}
.tag-result-card h3 a{color:#fff8fc;text-decoration:none}
.result-meta{display:flex;gap:8px;flex-wrap:wrap;color:#cdb9c7;font-size:.85rem}
.result-meta a{color:#ff9fc7}
.search-preview{display:block;position:relative;margin:12px 0;border-radius:12px;overflow:hidden;background:#100b11}
.search-preview img{display:block;width:100%;aspect-ratio:16/10;object-fit:cover}
.search-lock{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:52px;height:52px;display:grid;place-items:center;border-radius:50%;background:rgba(16,11,17,.85)}
.video-search-preview{display:grid;place-items:center;min-height:170px;margin:12px 0;border-radius:12px;background:#100b11;color:#ff9fc7;text-decoration:none;font-weight:800}
.post-tag-list{display:flex;flex-wrap:wrap;gap:6px;margin:14px 0}
.post-tag{font-size:.82rem;padding:5px 9px}
.locked-summary{color:#cdb9c7}
.empty-result{text-align:center;grid-column:1/-1}
.results-heading{display:flex;justify-content:space-between;align-items:center}
.full-post-tags{display:flex;flex-wrap:wrap;gap:7px;margin:10px 0 18px}
.creator-post-tags{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0 14px}

/* STAGE 9.3D8C5L SEARCH LIGHT THEME */
html[data-theme="light"] .tag-cloud-panel,
html[data-theme="light"] .tag-result-card {
  background: #ffffff;
  color: var(--h4u-text);
  border-color: var(--h4u-border);
}
html[data-theme="light"] .tag-result-card h3 a {
  color: var(--h4u-text);
}
html[data-theme="light"] .tag-chip,
html[data-theme="light"] .post-tag {
  background: #fff7e8;
  color: #8f0e2a;
  border-color: var(--h4u-gold);
}
html[data-theme="light"] .tag-chip span {
  background: #ffffff;
  color: #3b2c16;
}
html[data-theme="light"] .tag-chip.active {
  background: #a9102a;
  color: #ffffff;
  border-color: var(--h4u-gold);
}
html[data-theme="light"] .tag-chip.active span {
  color: #3b2c16;
}
html[data-theme="light"] .result-meta,
html[data-theme="light"] .locked-summary {
  color: var(--h4u-muted);
}
html[data-theme="light"] .result-meta a {
  color: #8f0e2a;
}
html[data-theme="light"] .search-preview,
html[data-theme="light"] .video-search-preview {
  background: #f7f4f2;
}
html[data-theme="light"] .video-search-preview {
  color: #8f0e2a;
}
/* END STAGE 9.3D8C5L */

/* STAGE 9.3D8C5M LIGHT BUTTON CONTRAST */
html[data-theme="light"] .tag-search-form > a.button {
  background: #fff7e8 !important;
  color: #8f0e2a !important;
  border: 1px solid #d4af37 !important;
}
html[data-theme="light"] .tag-result-card > a.button {
  background: linear-gradient(135deg, #a9102a, #c5162e) !important;
  color: #ffffff !important;
  border: 1px solid #d4af37 !important;
}
/* END STAGE 9.3D8C5M */

/* SEARCH PAGE LIGHT BUTTON CONTRAST */
html[data-theme="light"] a.button[href="/search.php"],
html[data-theme="light"] .tag-result-card a.button,
html[data-theme="light"] #clear-selected-tags {
  background: #fff7e8 !important;
  color: #8f0e2a !important;
  border-color: #d4af37 !important;
}
html[data-theme="light"] a.button[href="/search.php"]:hover,
html[data-theme="light"] .tag-result-card a.button:hover,
html[data-theme="light"] #clear-selected-tags:hover {
  background: #f8e8cd !important;
  color: #720b22 !important;
}
