/* v7 additions: small independent UI layer for public tag discovery/audit. */
#open-tag-explorer {
  flex: 0 0 auto; min-width: 39px; min-height: 39px; display: grid; place-items: center;
  color: #ecd38d; border: 1px solid rgba(212,185,117,.38); border-radius: 11px;
  background: rgba(16, 185, 129, .10); transition: background .2s, border-color .2s;
  pointer-events: auto; touch-action: manipulation;
}
#open-tag-explorer:hover, #open-tag-explorer:focus-visible { background:rgba(212,185,117,.16); border-color:#dbbc76; }
.tag-filter-widget { display: grid; gap: 7px; padding: 12px; border: 1px solid rgba(110,231,183,.22); border-radius: 14px; background:rgba(13,45,34,.45); }
.tag-section-label { color: #bcf7d8; font-size: 12px; font-weight: 750; }
.tag-query-wrap { display: flex; align-items: center; gap: 7px; }
#catalog-tag-search { min-width: 0; flex:1; padding: 10px 11px; color:#effcf8; font-size:13px; border-radius:10px; border:1px solid #456153; background:#0d1c23; outline: none; }
#catalog-tag-search:focus { border-color:#5fe3ab; }
#catalog-tag-clear { padding:9px 10px; color:#f5dbab; font-size:12px; border:1px solid #736141; border-radius:9px; }
.tag-active { font-size: 12px; line-height: 1.5; font-weight: 650; color: #e8c983; }
.tag-suggestion-list { max-height: 260px; overflow-y: auto; border-radius:12px; background:rgba(5,16,21,.67); border:1px solid rgba(83,121,107,.35); }
.tag-suggestion-list.hidden, .tag-active.hidden { display:none !important; }
.tag-status-line { padding:12px; font-size:12px; color:#b4cbbd; }
.tag-result { width:100%; display:flex; gap:10px; justify-content:space-between; align-items:center; padding:11px 12px; color:#e8f3ed; text-align:left; border-bottom:1px solid rgba(120,154,136,.15); }
.tag-result:last-child { border-bottom:0; }
.tag-result:hover, .tag-result:focus-visible { background:rgba(22,139,101,.24); outline:1px solid #5de8b0; }
.tag-result-name { font-weight:700; font-size:13px; overflow-wrap:anywhere; }
.tag-result-count { flex:0 0 auto; font-size:10px; color:#b6a577; }
#drawer-posts-list .article-tag { padding:4px 7px; border-radius:8px; font-size:11px; line-height:1.45; color:#b7dfd3; border:1px solid rgba(56,189,162,.25); background:rgba(16,82,73,.33); overflow-wrap:anywhere; }
#drawer-posts-list .article-tag.missing-tag { color:#ffd69d; border-color:rgba(245,158,11,.43); background:rgba(105,69,22,.25); }
#tag-workspace-backdrop:not([hidden]) { display:block; position:fixed; inset:0; z-index:65; background:rgba(0,7,10,.78); backdrop-filter:blur(6px); }
#tag-workspace[hidden], #tag-workspace-backdrop[hidden] { display:none !important; }
#tag-workspace { position:fixed; z-index:66; top:50%; left:50%; transform:translate(-50%,-50%); width:min(590px,calc(100vw - 28px)); max-height:min(780px,calc(100dvh - 32px)); display:flex; flex-direction:column; overflow:hidden; border-radius:24px; border:1px solid rgba(210,186,114,.35); color:#edf9f2; background:linear-gradient(146deg,#102b27,#081820 60%,#0a161f); box-shadow:0 34px 100px rgba(0,0,0,.8); }
.tag-workspace-header { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:21px 23px 15px; border-bottom:1px solid rgba(208,178,112,.18); }
.tag-eyebrow { color:#e3c27b; font-size:10px; letter-spacing:.14em; font-weight:800; }
#tag-workspace-heading { font-size:21px; font-weight:800; letter-spacing:-.025em; }
.tag-heading-accent { color:#e1be75; }
#tag-workspace-close { flex:0 0 42px; height:42px; border-radius:12px; background:#21392f; color:#e9d5a6; }
.tag-tab-bar { display:flex; gap:8px; padding:12px 20px; border-bottom:1px solid rgba(208,178,112,.11); }
.tag-tab-bar button { flex:1; min-height:42px; padding:7px; border-radius:11px; font-size:12px; font-weight:700; color:#a8beae; border:1px solid #2f4c43; }
.tag-tab-bar button.is-active { color:#071b17; border-color:#d5c082; background:linear-gradient(105deg,#54cf9b,#e1bf79); }
.tag-workspace-body { padding:17px 21px 24px; overflow-y:auto; min-height:0; overscroll-behavior:contain; }
.tag-tab-panel { display:grid; gap:11px; }
.tag-tab-panel.hidden { display:none !important; }
.tag-help { color:#b7cbbf; font-size:12px; line-height:1.7; }
.tag-tab-panel label { color:#e2ddb8; font-size:12px; font-weight:700; }
.tag-field { display:block; box-sizing:border-box; width:100%; min-height:44px; border-radius:11px; padding:10px 12px; background:#10242c; border:1px solid #3b5b53; color:#f1f7f3; font-size:14px; outline:none; }
.tag-field:focus { border-color:#6ee7b7; }
.tag-footnote { font-size:11px; color:#91a99c; line-height:1.7; }
.tag-form-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.tag-form-grid > div { display:grid; gap:7px; }
.tag-audit-actions { display:flex; flex-wrap:wrap; gap:8px; }
.tag-primary-action, .tag-secondary-action { flex: 1 0 auto; border-radius:12px; padding:12px; font-size:12px; font-weight:800; min-height:42px; }
.tag-primary-action { background:linear-gradient(120deg,#40c99b,#d8be7b); color:#102720; }
.tag-secondary-action { background:#1c3d34; color:#e5d6ad; border:1px solid #527464; }
.tag-audit-actions button:disabled { opacity:.36; cursor:not-allowed; }
.tag-audit-progress { display:grid; gap:6px; font-size:13px; color:#ccddd2; }
.tag-audit-progress strong { color:#d9c37f; font-variant-numeric:tabular-nums; }
.tag-audit-progress p { font-size:11px; color:#a6c6b5; }
.tag-audit-bar { height:6px; width:100%; border-radius:99px; background:#0c2228; overflow:hidden; }
#tag-audit-meter { display:block; width:0%; height:100%; background:linear-gradient(90deg,#3ddb9c,#d5bb73); transition:width .28s; }
.tag-audit-results { display:grid; gap:8px; }
.tag-audit-card { padding:12px; border:1px solid #304e44; background:#10262a; border-radius:12px; }
.tag-audit-card a { color:#e8f8ef; font-size:13px; font-weight:700; line-height:1.5; display:block; overflow-wrap:anywhere; }
.tag-audit-card a:hover { color:#88e7bc; }
.tag-audit-card p { color:#9fb8a9; margin-top:6px; font-size:11px; line-height:1.5; overflow-wrap:anywhere; }
@media(max-width:767px) {
  #open-tag-explorer { min-width:38px; min-height:38px; flex:0 0 38px; }
  #tag-workspace { top:auto; bottom:0; left:0; transform:none; width:100vw; max-width:none; max-height:93dvh; border-radius:22px 22px 0 0; padding-bottom:env(safe-area-inset-bottom); }
  .tag-workspace-header { padding:16px 16px 12px; }
  #tag-workspace-heading { font-size:19px; }
  .tag-tab-bar { padding:10px 14px; }
  .tag-workspace-body { padding:13px 15px 22px; }
  .tag-form-grid { grid-template-columns:1fr; }
  #catalog-tag-search { font-size:16px; min-height:44px; }
}
@media(max-width:350px) { #tag-workspace-heading{font-size:17px;} #open-tag-explorer{min-width:35px;flex-basis:35px;} }

.posts-audit-shortcut { padding:7px 9px; color:#eed39b; background:rgba(128,92,32,.18); border:1px solid rgba(222,188,114,.42); border-radius:9px; font-size:11px; font-weight:800; min-height:34px; }
.posts-audit-shortcut:hover { background:rgba(172,127,53,.25); }
