/* Cosmetics page (cosmetics.html / cosmetics.js). Each theme swatch carries data-theme="<id>", so the [data-theme]
   blocks in style.css give it that theme's BASE colours; swatches use only base colours (--bg --panel --card
   --accent --gold --text). Everything around them follows the page's current theme. */
main.cos-main { max-width: 900px; }
.cos-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cos-sec-head h2 { margin: 0; }
.cos-back { padding: 8px 14px; font-size: 13px; }
.cos-back:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.cos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); gap: 14px; margin-top: 14px; }

.cos-th { position: relative; display: flex; flex-direction: column; padding: 0; text-align: left; font-weight: 400;
  background: transparent; color: var(--text); border: 2px solid var(--line); border-radius: 12px; overflow: hidden; }
.cos-th:hover { border-color: var(--line-strong); }
.cos-th:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.cos-th[aria-checked="true"] { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }

/* the little preview: page, card, a tag chip and a gold button in THAT theme's colours */
.cos-sw { display: block; height: 96px; padding: 10px; background: var(--bg);
  background-image: radial-gradient(ellipse 90% 70% at 50% -20%, color-mix(in srgb, var(--accent) 45%, transparent), transparent 75%); }
.cos-sw-panel { display: flex; flex-direction: column; gap: 7px; height: 100%; padding: 9px 10px; border-radius: 8px;
  background: var(--card); border: 1px solid color-mix(in srgb, var(--accent) 55%, var(--bg)); }
.cos-sw-title { font-size: 12px; font-weight: 700; color: var(--gold); letter-spacing: .5px; }
.cos-sw-text { font-size: 11px; color: var(--text); }
.cos-sw-row { display: flex; gap: 6px; align-items: center; margin-top: auto; }
.cos-sw-chip { font-size: 10px; padding: 2px 8px; border-radius: 10px; color: var(--text); background: color-mix(in srgb, var(--accent) 60%, transparent); }
.cos-sw-btn { font-size: 10px; font-weight: 700; padding: 3px 9px; border-radius: 6px; color: var(--bg); background: var(--gold); margin-left: auto; }

.cos-info { display: block; padding: 10px 12px 12px; background: var(--panel); flex: 1 1 auto; }
.cos-name { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; color: var(--text); }
.cos-state { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--gold); }
.cos-desc { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); line-height: 1.4; }

.cos-th.cos-locked .cos-sw { filter: saturate(.55) brightness(.7); }
.cos-lock { position: absolute; top: 8px; right: 8px; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  color: var(--on-scrim); background: color-mix(in srgb, var(--scrim) 70%, transparent); }
.cos-th.cos-previewing { border-color: var(--line-strong); border-style: dashed; }
.cos-th.cos-previewing .cos-sw { filter: none; }
