
:root{
  --bg:#0b1020;                 
  --panel:rgba(255,255,255,.06);
  --text:#e6e8ef;               
  --muted:#a7b0c0;              
  --brand:#7c5cff;              
  --brand-2:#36d6c4;            
  --ring:rgba(124,92,255,.5);   
  --shadow:0 10px 30px rgba(0,0,0,.25);

  
  --ev-writing:   #67e08a;
  --ev-freezing:  #6282ff;
  --ev-emf:       #ff6d73;
  --ev-uv:        #8c4aff;
  --ev-radiation: #ff7d4a;
  --ev-audio:     #42d1a1;

  --blob1: #7c5cff; 
  --blob2: #36d6c4; 
}



body.light-mode {
  --bg: #f9fafc; 
  --panel: rgba(255, 255, 255, 0.85); 
  --text: #1e1e2e; 
  --muted: #5f6b7a; 
  --brand: #7c5cff; 
  --brand-2: #36d6c4; 
  --ring: rgba(124, 92, 255, 0.3); 
  --shadow: 0 6px 20px rgba(0, 0, 0, 0.08);

  background: linear-gradient(180deg, #f9fafc 0%, #eef1f7 100%);
  color: var(--text);
}


body.light-mode .sidebar {
  background: var(--panel);
  border-right: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: var(--shadow);
}


body.light-mode .sidebar button,
body.light-mode .sidebar .toggle-dark-mode {
  background: #ffffff;
  color: var(--text);
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

body.light-mode .sidebar button:hover,
body.light-mode .sidebar .toggle-dark-mode:hover {
  background: #f0f3f9;
}


body.light-mode .card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}


body.light-mode .chip {
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.08);
}


body.light-mode h1,
body.light-mode h2,
body.light-mode .traits h2 {
  color: var(--text);
}




*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:"Inter",system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";
  color:var(--text);
  line-height:1.6;

  
  background:
    radial-gradient(1200px 800px at 80% -10%,
      color-mix(in srgb, var(--blob1) 25%, transparent), transparent 55%),
    radial-gradient(1200px 800px at -10% 110%,
      color-mix(in srgb, var(--blob2) 20%, transparent), transparent 45%),
    var(--bg);
  background-attachment: fixed;

  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}



.container{display:flex;position:relative;min-height:100dvh;z-index:1}
.sidebar{
  width:260px;
  padding:22px 18px;
  background:var(--panel);
  backdrop-filter:saturate(140%) blur(10px);
  border-right:1px solid rgba(255,255,255,.12);
  box-shadow:var(--shadow);
  position:sticky; top:0; align-self:flex-start; height:100dvh; overflow:auto; z-index:10;
  border-radius:0 18px 18px 0;
}
.sidebar.hidden{display:none}
.content{
  flex:1; padding:28px 28px 40px; display:flex; flex-direction:column; align-items:center; min-width:0;
}


.toggle-sidebar{position:fixed; left:270px; top:20px; z-index:30; transition:left .3s ease, transform .2s ease}
.sidebar.hidden ~ .toggle-sidebar{left:16px}


h1,h2{margin:0 0 12px; text-align:center}
h1{letter-spacing:.2px; font-weight:900}


.legend{display:flex; flex-wrap:wrap; gap:10px; margin:6px 0 12px}


#searchBar{
  width:100%; padding:12px 14px; margin-bottom:16px; font-size:15px; color:var(--text);
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.18);
  border-radius:12px; outline:0; transition:border-color .2s, box-shadow .2s, background .2s;
}
#searchBar:focus{outline:3px solid var(--ring); border-color:transparent}


button,.toggle-dark-mode{
  appearance:none; border:0; border-radius:12px; padding:12px 16px;
  font-weight:800; letter-spacing:.2px; cursor:pointer;
  color:#fff;
  background:linear-gradient(135deg,var(--brand),var(--brand-2));
  box-shadow:0 6px 16px rgba(0,0,0,.25);
  transition:transform .08s ease, filter .12s ease, box-shadow .12s ease, background .3s ease;
}
button:hover,.toggle-dark-mode:hover{transform:translateY(-2px)}
button:active{transform:translateY(0); filter:brightness(.98)}
button:focus-visible{outline:3px solid var(--ring); outline-offset:2px}


.sidebar .toggle-dark-mode{
  background:var(--panel); color:var(--text);
  border:1px solid rgba(255,255,255,.14);
}
.sidebar .toggle-dark-mode:hover{background:rgba(255,255,255,.1)}


.ghost-list{
  display:grid;
  grid-template-columns:repeat(3, minmax(280px,1fr));
  gap:22px;
  padding:12px 0 0;
  width:100%; max-width:1120px;
}


.ghost-item{width:100%; border-radius:20px; padding:0; background:transparent; box-shadow:none; transition:transform .18s ease, filter .18s ease}
.ghost-item:hover{transform:translateY(-3px) scale(1.01)}
.ghost-item.hidden{display:none}

.card{
  position:relative; border-radius:20px; padding:18px 18px 16px;
  background:linear-gradient(to bottom right, rgba(255,255,255,.08), rgba(255,255,255,.03));
  border:1px solid rgba(255,255,255,.10);
  box-shadow:var(--shadow); backdrop-filter:saturate(130%) blur(8px);
}
.ghost-item.match .card{
  box-shadow:0 10px 28px rgba(124,92,255,.35), 0 0 0 1px rgba(124,92,255,.30), inset 0 1px 0 rgba(255,255,255,.06);
  border-color:rgba(124,92,255,.35);
}


.card-front{
  display:grid; gap:12px 16px; align-items:start;
  grid-template-columns:1fr auto;
  grid-template-rows:auto auto;
  grid-template-areas:"title actions" "chips actions";
}
.card-front h3{
  grid-area:title; margin:0; font-size:1.15rem; font-weight:900; letter-spacing:.2px; color:#f0f0f0; text-shadow:0 1px 0 rgba(0,0,0,.25);
}
.card-front .chips{grid-area:chips; justify-content:flex-start}
.card-front button{grid-area:actions; align-self:center}


.chips{display:flex; flex-wrap:wrap; gap:10px}
.chip{
  display:inline-flex; align-items:center; padding:6px 12px; border-radius:999px; font-size:.9rem; font-weight:800; letter-spacing:.2px;
  background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.14); color:#dcdcdc; box-shadow:inset 0 -1px 0 rgba(0,0,0,.2);
  user-select:none; white-space:nowrap;
}
.chip.none{opacity:.6; font-weight:700}


.ev-writing   { color:var(--ev-writing);   border-color:color-mix(in srgb, var(--ev-writing) 45%, transparent);   background:color-mix(in srgb, var(--ev-writing) 16%, transparent) }
.ev-freezing  { color:var(--ev-freezing);  border-color:color-mix(in srgb, var(--ev-freezing) 45%, transparent);  background:color-mix(in srgb, var(--ev-freezing) 16%, transparent) }
.ev-emf       { color:var(--ev-emf);       border-color:color-mix(in srgb, var(--ev-emf) 45%, transparent);       background:color-mix(in srgb, var(--ev-emf) 16%, transparent) }
.ev-uv        { color:var(--ev-uv);        border-color:color-mix(in srgb, var(--ev-uv) 45%, transparent);        background:color-mix(in srgb, var(--ev-uv) 16%, transparent) }
.ev-radiation { color:var(--ev-radiation); border-color:color-mix(in srgb, var(--ev-radiation) 45%, transparent); background:color-mix(in srgb, var(--ev-radiation) 16%, transparent) }
.ev-audio     { color:var(--ev-audio);     border-color:color-mix(in srgb, var(--ev-audio) 45%, transparent);     background:color-mix(in srgb, var(--ev-audio) 16%, transparent) }


.edit-evidence{display:flex; flex-wrap:wrap; gap:10px; justify-content:flex-start}
.edit-evidence .chip{cursor:pointer; transition:transform .08s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease}
.edit-evidence .chip:hover{transform:translateY(-1px)}
.edit-evidence .chip.active{
  background:rgba(255,255,255,.12);
  border-color:rgba(255,255,255,.26);
  box-shadow:0 0 0 2px rgba(255,255,255,.08);
}

.hint{font-size:.88rem; color:var(--muted)}
.hidden{display:none !important}


.modal{position:fixed; inset:0; display:grid; place-items:center; z-index:1000}
.modal.hidden{display:none}
.modal-content{
  position:relative; max-width:980px; width:min(94vw,980px); max-height:92vh; overflow:auto;
  border-radius:20px; padding:24px; background:var(--panel); color:var(--text);
  box-shadow:var(--shadow), inset 0 1px 0 rgba(255,255,255,.06);
  z-index:2; backdrop-filter:saturate(130%) blur(10px);
  border:1px solid rgba(255,255,255,.12);
}
.modal-backdrop{position:absolute; inset:0; background:rgba(0,0,0,.5); backdrop-filter:blur(2px); z-index:1}
.modal-close{position:sticky; top:0; margin-left:auto; background:transparent; color:var(--text); border:0; font-size:28px; line-height:1; cursor:pointer}
.modal h2{margin:0 0 6px; font-size:1.35rem}
.behaviors{display:grid; grid-template-columns:1fr 1fr; gap:16px}
.beh-col h4{margin:8px 0 6px; font-size:1.05rem}
.beh-section ul{margin:6px 0 0 18px}
.beh-pills{display:flex; flex-wrap:wrap; gap:8px; margin-top:6px}
.beh-pill{background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.14); padding:6px 10px; border-radius:999px; font-size:.9em}
.beh-pill span{opacity:.8; margin-right:6px}


.acc{
  border:1px solid rgba(255,255,255,.12);
  border-radius:16px;
  background:rgba(255,255,255,.06);
  margin:10px 0; overflow:hidden; box-shadow:var(--shadow)
}
.acc-summary{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  list-style:none; cursor:pointer; padding:14px 16px; font-weight:900; letter-spacing:.2px; user-select:none
}
.acc-summary::-webkit-details-marker{display:none}
.acc-chevron{width:10px;height:10px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(-45deg);transition:transform .18s ease;opacity:.8}
.acc[open] .acc-chevron{transform:rotate(45deg)}
.acc-body{display:grid; grid-template-columns:1fr 1fr; gap:14px; padding:12px 16px 16px}
.acc-list{margin:6px 0 0 18px}
.acc-empty{opacity:.7; font-style:italic}


.traits{margin-top:20px; padding-top:10px; border-top:1px solid rgba(255,255,255,.18)}
.traits h2{font-size:1.1rem; margin-bottom:10px; color:var(--text); font-weight:900}
.traits label{display:block; font-size:14px; cursor:pointer; color:var(--muted)}
.traits hr{border:0; border-top:1px solid rgba(255,255,255,.14); margin:10px 0}


.toggle-dark-mode.small{padding:8px 12px}
#resetFiltersBtn{width:100%; margin-top:10px}
.admin h2{margin:14px 0 8px; font-size:1rem; color:var(--muted)}
.admin{display:none !important}


@media (max-width:1280px){
  .ghost-list{grid-template-columns:repeat(2,minmax(260px,1fr)); gap:22px}
  .toggle-sidebar{left:18px}
}
@media (max-width:860px){
  .container{display:block}
  .sidebar{position:static; height:auto; width:100%; border-right:0; border-bottom:1px solid rgba(255,255,255,.12); border-radius:0}
  .content{margin:0 auto; padding:20px 16px 40px}
  .ghost-list{grid-template-columns:1fr; gap:18px; max-width:760px}
  .modal-content{width:96vw}
  .behaviors{grid-template-columns:1fr}
}
@media (max-width:720px){
  .acc-body{grid-template-columns:1fr}
}


.card-front .chips{gap:8px}
.chip{padding:4px 10px; font-size:.85rem; letter-spacing:.15px}
.card-front{
  grid-template-columns:1fr;
  grid-template-rows:auto auto auto;
  grid-template-areas:"title" "chips" "actions";
}
.card-front button{justify-self:start; margin-top:4px}


.evidence {
  display: flex;
  flex-direction: column;
  gap: 6px;              
}


.ev-label {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  user-select: none;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,.04);
  border: 2px solid transparent;      
}


.ev-label.include {
  border-color: rgba(124,92,255,.9);  
  box-shadow: 0 0 0 3px rgba(124,92,255,.25);
}


.ev-label.exclude {
  text-decoration: line-through;
  opacity: .55;
  border-color: transparent;
  box-shadow: none;
}


.ev-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.35);
}
.ev-label.include .ev-dot { background: #31d0aa; }
.ev-label.exclude .ev-dot { background: #ff6d73; }


.traits {
  display: flex;
  flex-direction: column;
  gap: 8px;                     
}


.traits label {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,.06);
  border: 2px solid transparent;     
  box-shadow: 0 6px 16px rgba(0,0,0,.18);
  color: var(--text);
  cursor: pointer;
  user-select: none;
}


.traits label:hover {
  background: rgba(255,255,255,.09);
}


.traits label:has(input:checked) {
  border-color: rgba(124,92,255,.9);  
  box-shadow: 0 0 0 3px rgba(124,92,255,.22),
              0 6px 16px rgba(0,0,0,.22);
}


.traits input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 2px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.06);
  display: inline-grid;
  place-content: center;
  transition: border-color .15s ease, background .15s ease;
}


.traits input[type="checkbox"]::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  transform: scale(0);
  transition: transform .12s ease;
}


.traits input[type="checkbox"]:checked {
  border-color: rgba(124,92,255,.9);
  background: rgba(124,92,255,.12);
}
.traits input[type="checkbox"]:checked::after {
  transform: scale(1);
}


.traits hr {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.16), transparent);
  margin: 12px 0 6px;
}


.traits h2 {
  margin: 2px 0 8px;
  font-size: 1.1rem;
  font-weight: 900;
  text-align: center;
}


.sidebar button,
.sidebar .toggle-dark-mode {
  width: 100%;                  
  text-align: center;
  padding: 12px 0;
  margin-bottom: 10px;          
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255,255,255, 0.12);
  color: var(--text);
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  transition: background 0.2s ease, transform 0.15s ease;
}


.sidebar button:hover,
.sidebar .toggle-dark-mode:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}


.sidebar button:last-of-type {
  margin-bottom: 0;
}



.theme-box{
  margin-top:14px; padding:12px;
  border-radius:12px; background:var(--panel);
  border:1px solid rgba(255,255,255,.12); box-shadow:var(--shadow);
}
.theme-box h2{ margin:0 0 10px; font-size:1.05rem; font-weight:900; text-align:center; color:var(--text); }

.theme-grid{
  display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:10px 0;
}
.theme-grid label{
  display:flex; align-items:center; justify-content:space-between; gap:8px;
  padding:8px 10px; border-radius:10px;
  background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.12); color:var(--text);
}
.theme-row{
  display:flex; align-items:center; justify-content:space-between; gap:10px; margin:8px 0; color:var(--muted);
}
.theme-actions{ display:flex; gap:10px; justify-content:space-between; margin-top:8px; }
.theme-actions .small{ flex:1; text-align:center }

.theme-box input[type="color"]{
  appearance:none; width:40px; height:28px; padding:0; border:0; border-radius:8px; background:transparent; cursor:pointer;
}
.theme-box input[type="range"]{
  width: 52%;
  accent-color: var(--brand);
}


body.light-mode .theme-box{ border-color:rgba(17,24,39,.10) }
body.light-mode .theme-grid label{
  background:rgba(17,24,39,.04); border-color:rgba(17,24,39,.10);
}


.cpicker{
  --radius: 12px;
  --border: 1px solid rgba(255,255,255,.14);
  position: relative;
  width: 180px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  user-select: none;
}

.cpicker .swatch{
  height: 28px;
  border-radius: 8px;
  border: var(--border);
  background: repeating-conic-gradient(#0000 0% 25%, #00000010 0% 50%) 50% / 12px 12px,
              var(--current, #7c5cff);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}

.cpicker .sv{
  position: relative;
  height: 140px;
  border-radius: var(--radius);
  border: var(--border);
  background:
    linear-gradient(to top, #000, transparent),
    linear-gradient(to right, #fff, hsl(var(--h), 100%, 50%));
  cursor: crosshair;
  box-shadow: 0 6px 16px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.06);
}

.cpicker .sv .knob, .cpicker .hue .knob{
  position: absolute;
  width: 14px; height: 14px;
  border-radius: 999px;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,.35);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.cpicker .hue{
  position: relative;
  height: 12px;
  border-radius: 999px;
  border: var(--border);
  background: linear-gradient(90deg,
    #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000);
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}

.cpicker .row{
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.cpicker .hex{
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
  color: var(--text);
  font-weight: 700;
  letter-spacing: .4px;
  outline: none;
}

body.light-mode .cpicker .sv,
body.light-mode .cpicker .hue,
body.light-mode .cpicker .swatch,
body.light-mode .cpicker .hex{
  border-color: rgba(17,24,39,.12);
  background-color: rgba(17,24,39,.04);
}



.theme-drawer{position:fixed; inset:0; display:none; z-index:1000}
.theme-drawer:not(.hidden){display:block}


.theme-backdrop{
  position:absolute; inset:0;
  background:rgba(0,0,0,.45);
  backdrop-filter: blur(2px);
  z-index:1;
}


.theme-panel{
  position:absolute; right:0; top:0; height:100%; width:min(520px, 96vw);
  
  background: var(--panel);
  color: var(--text);
  border-left: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
  box-shadow: 0 20px 50px rgba(0,0,0,.35);
  display:flex; flex-direction:column; overflow:hidden; z-index:2;

  
  border-top-left-radius: 18px;
  border-bottom-left-radius: 18px;
  contain: paint;
}




.theme-panel .panel-header{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:14px 16px;
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--brand) 16%, transparent),
      transparent 55%);
  border-bottom: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
}
.theme-panel h2{ margin:0; font-size:1.05rem; font-weight:900; letter-spacing:.2px }


#closeThemeBtn{
  appearance:none; border:0; background:transparent;
  width:36px; height:36px; border-radius:10px; display:grid; place-items:center;
  font-size:22px; line-height:1; color:var(--text);
  transition: background .15s ease, transform .06s ease;
}
#closeThemeBtn:hover{ background: color-mix(in srgb, var(--brand) 20%, transparent) }
#closeThemeBtn:active{ transform: translateY(1px) }
#closeThemeBtn:focus-visible{ outline:3px solid var(--ring); outline-offset:2px }


.theme-panel .panel-body{
  padding:16px; flex:1; overflow:auto;
}


.theme-panel .panel-footer{
  display:flex; gap:12px; padding:14px 16px;
  border-top: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
  background:
    linear-gradient(0deg,
      color-mix(in srgb, var(--brand-2) 10%, transparent),
      transparent 55%);
}
.theme-panel .panel-footer .small{ flex:1 }


.theme-panel .theme-grid{
  display:grid;
  grid-template-columns: 1fr;
  gap:12px; margin:8px 0 12px;
}
@media (min-width: 520px){
  .theme-panel .theme-grid{ grid-template-columns: 1fr 1fr; }
}


.theme-panel .theme-grid label{
  display:grid; grid-template-columns: 110px 1fr; align-items:center; gap:12px;
  padding:12px; border-radius:12px;
  background: color-mix(in srgb, var(--bg) 70%, #ffffff0C);
  border: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
  box-shadow: 0 6px 16px rgba(0,0,0,.18);
}
.theme-panel .theme-grid label > span{
  font-weight:800; letter-spacing:.2px; opacity:.9;
}


.theme-panel .theme-row{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:12px; border-radius:12px; margin:12px 0;
  background: color-mix(in srgb, var(--bg) 70%, #ffffff0C);
  border: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
  box-shadow: 0 6px 16px rgba(0,0,0,.18);
}
#themePanelOpacity{
  width: 56%;
  accent-color: var(--brand);
}


.cpicker{ width:100%; max-width: 240px }
.cpicker .sv{ height: 130px }
.cpicker .hue{ height: 12px }
.cpicker .hex{
  font-size:.9rem; border-radius:10px;
  border:1px solid color-mix(in srgb, var(--text) 12%, transparent);
  background: color-mix(in srgb, var(--bg) 50%, #ffffff12);
}


.theme-panel .toggle-dark-mode.small{
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,.2);
}


.cpicker{
  width: 100%;
  max-width: 200px;                  
}
.cpicker .sv{ height: 120px; }       
.cpicker .hue{ height: 10px; }
.cpicker .hex{ font-size: .9rem; }


#themePanelOpacity{ width: 56%; accent-color: var(--brand); }


.theme-panel { z-index: 2; }
.theme-backdrop { z-index: 1; }



#closeThemeBtn{
  appearance:none; border:0; background:transparent;
  width:36px; height:36px; border-radius:10px;
  display:grid; place-items:center;
  font-size:22px; line-height:1; color:var(--text);
  transition: background .15s ease, transform .08s ease;
}
#closeThemeBtn:hover{ background:rgba(255,255,255,.08) }
body.light-mode #closeThemeBtn:hover{ background:rgba(17,24,39,.08) }



body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
  mix-blend-mode: screen;
  filter: blur(80px); 
  opacity: 0.18; 
  border-radius: 50%;
  z-index: 0;
  will-change: transform, opacity;
  transition: opacity 0.4s ease;
}


body::before {
  width: 500px;
  height: 500px;
  right: -140px;
  top: -100px;

  background: conic-gradient(
    from 0deg at 50% 50%,
    var(--blob1) 0%,
    color-mix(in srgb, var(--blob1) 60%, var(--brand) 40%) 20%,
    var(--brand) 35%,
    color-mix(in srgb, var(--brand) 40%, var(--brand-2) 60%) 55%,
    var(--brand-2) 70%,
    color-mix(in srgb, var(--brand-2) 40%, var(--blob2) 60%) 85%,
    var(--blob2) 100%
  );

  
  -webkit-mask: radial-gradient(closest-side, #000 45%, #0000 80%);
          mask: radial-gradient(closest-side, #000 45%, #0000 80%);

  animation: orbSpinA 38s linear infinite, orbBobA 26s ease-in-out infinite;
}


body::after {
  width: 420px;
  height: 420px;
  left: -100px;
  bottom: -80px;

  background: conic-gradient(
    from 120deg at 50% 50%,
    var(--blob2) 0%,
    color-mix(in srgb, var(--blob2) 60%, var(--brand-2) 40%) 18%,
    var(--brand-2) 36%,
    color-mix(in srgb, var(--brand-2) 40%, var(--brand) 60%) 58%,
    var(--brand) 76%,
    color-mix(in srgb, var(--brand) 45%, var(--blob1) 55%) 90%,
    var(--blob1) 100%
  );

  -webkit-mask: radial-gradient(closest-side, #000 45%, #0000 80%);
          mask: radial-gradient(closest-side, #000 45%, #0000 80%);

  animation: orbSpinB 42s linear infinite, orbBobB 30s ease-in-out infinite;
}


@keyframes orbSpinA {
  to { transform: rotate(360deg); }
}
@keyframes orbSpinB {
  to { transform: rotate(-360deg); }
}
@keyframes orbBobA {
  0%,100% { transform: translateY(0) }
  50% { transform: translateY(20px) }
}
@keyframes orbBobB {
  0%,100% { transform: translate(0,0) }
  50% { transform: translate(15px,-15px) }
}





.ghost-item {
  transition: opacity .2s ease, filter .2s ease, transform .18s ease;
}


.ghost-item .card {
  cursor: pointer;
}


.ghost-item.mark-1 .card{
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--brand) 70%, transparent),
    0 10px 28px rgba(124,92,255,.35);
  border-color: color-mix(in srgb, var(--brand) 60%, transparent);
  transform: translateY(-2px);
}


.ghost-item.mark-2{
  opacity: .28;           
  filter: saturate(.6);
}
.ghost-item.mark-2 .card{
  box-shadow: none;
  border-color: rgba(255,255,255,.06);
}



:root{
  
  --accent-strong: color-mix(in srgb, var(--brand) 90%, transparent);
  --accent-med:    color-mix(in srgb, var(--brand) 60%, transparent);
  --accent-soft:   color-mix(in srgb, var(--brand) 30%, transparent);
  --accent-faint:  color-mix(in srgb, var(--brand) 22%, transparent);
}


.ghost-item.match .card{
  
  box-shadow:
    0 10px 28px var(--accent-soft),
    0 0 0 1px var(--accent-med),
    inset 0 1px 0 rgba(255,255,255,.06);
  border-color: var(--accent-med);
}


.ev-label.include{
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 3px var(--accent-soft);
}


.traits label:has(input:checked){
  border-color: var(--accent-strong);
  box-shadow:
    0 0 0 3px var(--accent-soft),
    0 6px 16px rgba(0,0,0,.22);
}


.traits input[type="checkbox"]:checked{
  border-color: var(--accent-strong);
  background: color-mix(in srgb, var(--brand) 18%, transparent);
}


.ghost-item.mark-1 .card{
  box-shadow:
    0 0 0 2px var(--accent-med),
    0 10px 28px var(--accent-soft);
  border-color: var(--accent-med);
}



.ghost-item.selected .card{
  border-color: color-mix(in srgb, var(--brand-2) 65%, transparent);
  box-shadow:
    0 12px 30px color-mix(in srgb, var(--brand-2) 42%, transparent),
    0 0 0 2px color-mix(in srgb, var(--brand-2) 70%, transparent),
    inset 0 1px 0 rgba(255,255,255,.08);
  transform: translateY(-2px) scale(1.01);
}


.ghost-item.selected.match .card{
  border-color: color-mix(in srgb, var(--brand-2) 70%, transparent);
  box-shadow:
    0 14px 34px color-mix(in srgb, var(--brand-2) 46%, transparent),
    0 0 0 2px color-mix(in srgb, var(--brand-2) 72%, transparent),
    inset 0 1px 0 rgba(255,255,255,.08);
}



.ghost-item.selected .card::after{
  content: "Picked";
  position: absolute;
  top: 10px;
  left: 290px;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .2px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #0b1020;
  background: var(--brand-2);
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}


/* ===============================
   Light Mode – Visual Polish Pack
   (append at end of styles.css)
   =============================== */


body.light-mode {
  --bg: #f7f8fb;
  --panel: rgba(255, 255, 255, 0.92);
  --text: #1b2130;
  --muted: #5a6576;
  --shadow: 0 10px 24px rgba(0, 0, 0, 0.06);

  
  --ring: rgba(124, 92, 255, 0.34);

  background:
    radial-gradient(1200px 800px at 85% -10%, rgba(124, 92, 255, 0.09), transparent 55%),
    radial-gradient(1200px 800px at -10% 110%, rgba(54, 214, 196, 0.08), transparent 45%),
    linear-gradient(180deg, #fbfcfe 0%, #eef2f9 100%);
  color: var(--text);
}


body.light-mode::before,
body.light-mode::after {
  opacity: 0.10;            
  filter: blur(70px);
  mix-blend-mode: normal;    
}


body.light-mode .sidebar {
  background: var(--panel);
  border-right: 1px solid rgba(20, 28, 40, 0.08);
  box-shadow: var(--shadow);
}

body.light-mode #searchBar {
  background: #ffffff;
  border: 1px solid rgba(20, 28, 40, 0.12);
  color: var(--text);
}
body.light-mode #searchBar::placeholder {
  color: color-mix(in srgb, var(--text) 55%, transparent);
}


body.light-mode button,
body.light-mode .toggle-dark-mode {
  color: #10141e;
  background: linear-gradient(135deg, #ffffff, #f4f6fb);
  border: 1px solid rgba(20, 28, 40, 0.10);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}
body.light-mode button:hover,
body.light-mode .toggle-dark-mode:hover {
  background: linear-gradient(135deg, #ffffff, #eef2f9);
}
body.light-mode button:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
}


body.light-mode .card {
  background: linear-gradient(to bottom right, #ffffff, #fafbff);
  border: 1px solid rgba(20, 28, 40, 0.10);
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}
body.light-mode .ghost-item.match .card {
  box-shadow:
    0 10px 26px color-mix(in srgb, var(--brand) 18%, transparent),
    0 0 0 1px color-mix(in srgb, var(--brand) 30%, transparent),
    inset 0 1px 0 rgba(255,255,255,.7);
  border-color: color-mix(in srgb, var(--brand) 32%, transparent);
}


body.light-mode .card-front h3 {
  color: #151a28;
  text-shadow: none;
}


body.light-mode .chip {
  color: #1e2432;
  background: #ffffff;
  border: 1px solid rgba(20, 28, 40, 0.10);
  box-shadow: inset 0 -1px 0 rgba(0,0,0,0.04);
}
body.light-mode .ev-writing   { color: var(--ev-writing);   border-color: color-mix(in srgb, var(--ev-writing) 40%, transparent);   background: color-mix(in srgb, var(--ev-writing) 12%, #ffffff) }
body.light-mode .ev-freezing  { color: var(--ev-freezing);  border-color: color-mix(in srgb, var(--ev-freezing) 40%, transparent);  background: color-mix(in srgb, var(--ev-freezing) 12%, #ffffff) }
body.light-mode .ev-emf       { color: var(--ev-emf);       border-color: color-mix(in srgb, var(--ev-emf) 40%, transparent);       background: color-mix(in srgb, var(--ev-emf) 12%, #ffffff) }
body.light-mode .ev-uv        { color: var(--ev-uv);        border-color: color-mix(in srgb, var(--ev-uv) 40%, transparent);        background: color-mix(in srgb, var(--ev-uv) 12%, #ffffff) }
body.light-mode .ev-radiation { color: var(--ev-radiation); border-color: color-mix(in srgb, var(--ev-radiation) 40%, transparent); background: color-mix(in srgb, var(--ev-radiation) 12%, #ffffff) }
body.light-mode .ev-audio     { color: var(--ev-audio);     border-color: color-mix(in srgb, var(--ev-audio) 40%, transparent);     background: color-mix(in srgb, var(--ev-audio) 12%, #ffffff) }


body.light-mode .ev-label {
  background: rgba(17,24,39,0.035);
  border: 2px solid transparent;
}
body.light-mode .ev-label.include {
  border-color: color-mix(in srgb, var(--brand) 75%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 30%, transparent);
}
body.light-mode .ev-label.exclude {
  text-decoration: line-through;
  opacity: .6;
}


body.light-mode .traits label {
  background: rgba(17,24,39,.035);
  border: 2px solid rgba(17,24,39,.08);
  color: var(--text);
  box-shadow: 0 6px 14px rgba(0,0,0,.05);
}
body.light-mode .traits label:hover {
  background: rgba(17,24,39,.055);
}
body.light-mode .traits label:has(input:checked) {
  border-color: color-mix(in srgb, var(--brand) 70%, transparent);
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--brand) 26%, transparent),
    0 8px 18px rgba(0,0,0,.06);
}
body.light-mode .traits input[type="checkbox"] {
  border: 2px solid rgba(17,24,39,.35);
  background: #fff;
}
body.light-mode .traits input[type="checkbox"]:checked {
  border-color: color-mix(in srgb, var(--brand) 70%, transparent);
  background: color-mix(in srgb, var(--brand) 16%, #ffffff);
}


body.light-mode .modal-backdrop {
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(1.5px);
}
body.light-mode .modal-content {
  background: #ffffff;
  color: var(--text);
  border: 1px solid rgba(20, 28, 40, 0.10);
  box-shadow: 0 14px 36px rgba(0,0,0,.08);
}
body.light-mode .acc {
  background: #ffffff;
  border: 1px solid rgba(20,28,40,.10);
  box-shadow: 0 6px 16px rgba(0,0,0,.06);
}


body.light-mode .theme-panel {
  background: #ffffff;
  border-left: 1px solid rgba(20, 28, 40, 0.10);
  box-shadow: 0 20px 50px rgba(0,0,0,.08);
}
body.light-mode .theme-panel .theme-grid label,
body.light-mode .theme-panel .theme-row {
  background: #fbfcff;
  border: 1px solid rgba(20, 28, 40, 0.10);
  box-shadow: 0 6px 14px rgba(0,0,0,.05);
}


body.light-mode .ghost-item.selected .card{
  border-color: color-mix(in srgb, var(--brand-2) 60%, transparent);
  box-shadow:
    0 12px 28px color-mix(in srgb, var(--brand-2) 28%, transparent),
    0 0 0 2px color-mix(in srgb, var(--brand-2) 60%, transparent),
    inset 0 1px 0 rgba(255,255,255,.8);
}
body.light-mode .ghost-item.mark-2 {
  opacity: .34;
  filter: saturate(.65);
}


body.light-mode .ghost-item.selected .card::after{
  color: #ffffff;
  background: color-mix(in srgb, var(--brand-2) 86%, #2a2a2a 14%);
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}


body.light-mode .toggle-dark-mode {
  
  
}








.holiday-deco { position: fixed; inset: 0; pointer-events: none; z-index: 3; }


.halloween-web{
  position: absolute;
  width: 240px; height: 240px;
  color: rgba(255,255,255,.22);
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.18));
}
.halloween-web svg{ width:100%; height:100%; display:block; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; }
.halloween-web.tl{ top:12px; left:12px; }
.halloween-web.tr{ top:12px; right:12px; transform: scaleX(-1); }


.spider-wrap{
  --len: 160px;                  
  position:absolute; top:0; right:140px;
  width:2px; height:0;           
  transform-origin: top center;
  animation: lineGrow .8s ease-out forwards, spiderSwing 6s ease-in-out 1.1s infinite alternate;
}
.spider-line{
  position:absolute; inset:0 auto auto 0;
  width:2px; height:100%;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,.55) 0 6px, rgba(255,255,255,.18) 6px 12px);
}
.spider{
  position:absolute; left:-14px; bottom:-10px;
  width:32px; height:24px; color:#1c1230;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,.35));
}
.spider svg{ width:100%; height:100%; display:block; fill:currentColor; }


.halloween-glow{
  position:absolute; width:340px; height:340px; border-radius:50%;
  filter: blur(90px); opacity:.25; background: radial-gradient(closest-side, #ff7a00 25%, transparent 60%);
}
.halloween-glow.bl{ left:-120px; bottom:-120px; }
.halloween-glow.br{ right:-120px; bottom:-120px; }

@keyframes lineGrow{ from{ height:0 } to{ height:var(--len) } }
@keyframes spiderSwing{
  0%   { transform: rotate(-6deg) }
  100% { transform: rotate(6deg) }
}


@media (prefers-reduced-motion: reduce){
  .spider-wrap{ animation: lineGrow .6s ease-out forwards; }
}



.snowflake { position: absolute; top:-10px; font-size:12px; opacity:.8; animation: snow 10s linear infinite; }
@keyframes snow {
  to { transform: translateY(110vh); opacity:.95; }
}
.holiday-badge {
  position: fixed; right: 16px; bottom: 16px; z-index: 4;
  padding: 8px 12px; border-radius: 999px; font-weight: 900;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color:#fff;
  box-shadow: 0 8px 20px rgba(0,0,0,.2);
}


.confetti {
  position: absolute;
  width: 8px;
  height: 14px;
  background: currentColor;
  opacity: 0.95;
  pointer-events: none;
  will-change: transform, opacity;
  animation: confettiFall var(--dur, 4.6s) linear both;
}

@keyframes confettiFall {
  0%   { transform: translate3d(0, 0, 0) rotate(0deg);     opacity: 0.95; }
  100% { transform: translate3d(var(--drift, 0px), 140vh, 0) rotate(720deg); opacity: 0; }
}



.heart {
  position:absolute; width:14px; height:14px; background: currentColor; color:#ff4d6d;
  transform: rotate(45deg); opacity:.28; animation: hearts 8s ease-in infinite;
}
.heart:before, .heart:after {
  content:""; position:absolute; width:14px; height:14px; background: currentColor; border-radius:50%;
}
.heart:before { left:-7px; }
.heart:after { top:-7px; }
@keyframes hearts {
  0% { transform: translateY(0) rotate(45deg); }
  100% { transform: translateY(-90vh) rotate(45deg); }
}


@media (prefers-reduced-motion: reduce) {
  .snowflake, .confetti, .heart, .halloween-bat { animation: none !important; }
}



.spider-thread {
  position: fixed;
  top: -30vh;
  left: 40vw;
  width: 2px;
  height: 50vh;
  background: linear-gradient(#ffffff55, #ffffff11);
  animation: spiderDrop 11s ease-in-out infinite;
  z-index: 20;
}

.spider {
  position: absolute;
  bottom: 0;
  left: -10px;
  width: 20px;
  height: 20px;
  background: #1b1027;
  border-radius: 50%;
  box-shadow: 0 0 8px #00000080;
}

.spider::before,
.spider::after {
  content: "";
  position: absolute;
  top: 6px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ff7a00;
  box-shadow: 0 0 8px #ff7a0044;
}

.spider::before { left: 4px; }
.spider::after  { right: 4px; }

@keyframes spiderDrop {
  0%, 100% { transform: translateY(-8vh); }
  50%      { transform: translateY(30vh); }
}


.halloween-ghost{
  position:absolute;
  top:-12vh;                        
  left: var(--left, 50vw);
  pointer-events:none;
  opacity: var(--alpha, .75);
  animation: ghostFall var(--dur, 12s) linear infinite;
  animation-delay: var(--delay, 0s);
  will-change: top, transform;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.25));
  z-index: 0;                       
  opacity: var(--alpha, .75);
}


.halloween-ghost .g{
  display:block;
  width: var(--size, 28px);
  height: auto;
  animation: ghostWobble calc(var(--dur, 12s) * .6) ease-in-out infinite alternate;
}


.halloween-ghost .g path.body { fill:#fff; }
.halloween-ghost .g .eye     { fill:#1c1230; opacity:.9; }

@keyframes ghostFall{
  0%   { top:-12vh; }
  100% { top:110vh; }              
}


@keyframes ghostWobble{
  0%   { transform: translateX(calc(-1 * var(--amp, 18px))); }
  100% { transform: translateX(var(--amp, 18px)); }
}


@media (prefers-reduced-motion: reduce){
  .halloween-ghost{ animation-duration: 8s; }
  .halloween-ghost .g{ animation: none; }
}


.theme-section{
  border: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg) 70%, #ffffff0C);
  box-shadow: 0 6px 16px rgba(0,0,0,.18);
  margin-bottom: 12px;
  overflow: hidden;
}
.theme-section > summary{
  list-style: none;
  cursor: pointer;
  padding: 12px 14px;
  font-weight: 900;
  letter-spacing: .2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.theme-section > summary::-webkit-details-marker{ display: none; }
.theme-section .summary-note{ opacity: .75; font-weight: 700; }

.theme-panel select{
  width: 56%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--text) 12%, transparent);
  background: color-mix(in srgb, var(--bg) 50%, #ffffff12);
  color: var(--text);
  font-weight: 700;
  outline: none;
}
body.light-mode .theme-panel select{
  border: 1px solid rgba(20, 28, 40, .10);
  background: #fff;
  color: var(--text);
}





.sidebar .theme-box .theme-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}


#themeDrawer .theme-grid {
  display: grid;
  grid-template-columns: 1fr;          
  gap: 12px;
}

@media (min-width: 640px) {            
  #themeDrawer .theme-grid { grid-template-columns: 1fr 1fr; }
}


#themeDrawer .theme-grid > label {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr); 
  align-items: start;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  overflow: hidden;                     
  min-height: 190px;                    
  
}


#themeDrawer .cpicker {
  width: 100%;
  max-width: none;                       
}

#themeDrawer .cpicker .sv  { height: 140px; }
#themeDrawer .cpicker .hue { height: 12px; }
#themeDrawer .cpicker .hex { width: 100%; }


#themeDrawer .theme-grid > label > span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}



#holidaySection.theme-section{
  background: transparent;   
  border: 0;
  box-shadow: none;
  overflow: visible;          
  padding: 0;
}


#holidaySection > summary{
  list-style: none;
  cursor: pointer;
  padding: 12px 14px;
  border-radius: 12px;
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--brand) 16%, transparent),
      transparent 55%);
  border: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
  box-shadow: 0 6px 16px rgba(0,0,0,.18);
}
#holidaySection > summary::-webkit-details-marker{ display:none; }


#holidaySection[open] > summary{
  margin-bottom: 10px;        
}


#holidaySection > :not(summary){
  margin: 6px 0;
}


#holidaySection .theme-row{
  padding: 12px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg) 70%, #ffffff0C);
  border: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
  box-shadow: 0 6px 16px rgba(0,0,0,.18);
}


#holidaySection .theme-row select{
  width: 56%;
}


#holidaySection .hint{ margin-top: 8px; }


#customThemeSection.theme-section{
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
  padding: 0;
}


#customThemeSection > summary{
  list-style: none;
  cursor: pointer;
  padding: 12px 14px;
  border-radius: 12px;
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--brand) 16%, transparent),
      transparent 55%);
  border: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
  box-shadow: 0 6px 16px rgba(0,0,0,.18);
}
#customThemeSection > summary::-webkit-details-marker{ display:none; }
#customThemeSection[open] > summary{ margin-bottom: 10px; }


#customThemeSection > :not(summary){ margin: 6px 0; }


#customThemeSection .theme-row{
  padding: 12px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg) 70%, #ffffff0C);
  border: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
  box-shadow: 0 6px 16px rgba(0,0,0,.18);
}


#customThemeSection .theme-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 640px){
  #customThemeSection .theme-grid{ grid-template-columns: 1fr 1fr; }
}


#customThemeSection .theme-grid > label{
  display: grid;
  grid-template-columns: 110px minmax(0,1fr); 
  align-items: start;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  min-height: 190px;      
  overflow: hidden;       
  background: color-mix(in srgb, var(--bg) 70%, #ffffff0C);
  border: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
  box-shadow: 0 6px 16px rgba(0,0,0,.18);
}
#customThemeSection .theme-grid > label > span{
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


#customThemeSection .cpicker{ width: 100%; max-width: none; }
#customThemeSection .cpicker .sv{ height: 140px; }
#customThemeSection .cpicker .hue{ height: 12px; }
#customThemeSection .cpicker .hex{ width: 100%; }


#customThemeSection .theme-actions{
  display: flex;
  gap: 10px;
}
#customThemeSection .theme-actions .small{ flex: 1; }


#customThemeSection #themePanelOpacity{ width: 56%; }


#customThemeSection select{ min-width: 220px; }





#customThemeSection .theme-grid,
#holidaySection .theme-grid { 
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}


#customThemeSection .theme-grid > label {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr;
  align-items: start;
  gap: 10px;
  padding: 14px;
  min-height: 260px;           
  overflow: hidden;            
}


#customThemeSection .cpicker {
  width: 100%;
  max-width: none;
}
#customThemeSection .cpicker .swatch { height: 26px; border-radius: 10px; }
#customThemeSection .cpicker .sv     { height: 180px; }   
#customThemeSection .cpicker .hue    { height: 14px; }
#customThemeSection .cpicker .row    { margin-top: 6px; }
#customThemeSection .cpicker .hex {
  width: 100%;
  font-size: 0.95rem;
  padding: 10px 12px;
  border-radius: 10px;
}


#customThemeSection .theme-grid > label > span {
  font-weight: 800;
  letter-spacing: .2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


#customThemeSection .theme-actions { gap: 12px; }
#customThemeSection #themePanelOpacity { width: 60%; }



.corner-btn{
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 40;
  appearance: none;
  border: 0;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: .2px;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 8px 18px rgba(0,0,0,.25);
  transition: transform .08s ease, filter .12s ease;
}
.corner-btn:hover{ transform: translateY(-2px); }
.corner-btn:active{ transform: translateY(0); filter: brightness(.98); }
.corner-btn:focus-visible{ outline: 3px solid var(--ring); outline-offset: 2px; }


@media (max-width: 520px){
  .corner-btn{ top: 12px; right: 12px; padding: 9px 12px; }
}


.changelog-body{ display: grid; gap: 12px; }
.changelog-entry{
  padding: 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
}
.changelog-entry h3{
  margin: 0 0 6px;
  font-size: 1rem;
  letter-spacing: .2px;
}
.changelog-entry ul{ margin: 6px 0 0 18px; }
.changelog-entry li{ margin: 2px 0; }


body.light-mode .changelog-entry{
  background: #ffffff;
  border: 1px solid rgba(20,28,40,.10);
  box-shadow: 0 6px 14px rgba(0,0,0,.05);
}

/* Top-right Home button */
.home-btn{
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 40;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: .2px;
  padding: 10px 14px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 8px 18px rgba(0,0,0,.25);
  transition: transform .08s ease, filter .12s ease;
}
.home-btn:hover{ transform: translateY(-2px); }
.home-btn:active{ transform: translateY(0); filter: brightness(.98); }
.home-btn:focus-visible{ outline: 3px solid var(--ring); outline-offset: 2px; }

/* (optional) nudge on very small screens */
@media (max-width:520px){
  .home-btn{ top:12px; right:12px; padding:9px 12px; }
}


/* Grey out on 3rd click (state = mark-2) */
.ghost-item.mark-2 .card{
  outline: 0;                                   /* remove dashed outline */
  filter: grayscale(1) brightness(.85);         /* desaturate + dim */
  opacity: .6;                                  /* overall fade */
  transition: filter .15s ease, opacity .15s ease;
}

/* Make chips/title look muted too */
.ghost-item.mark-2 h3,
.ghost-item.mark-2 .chip{ opacity: .75; }

/* Optional: a soft overlay for more “disabled” feel */
.ghost-item.mark-2 .card::after{
  content: "";
  position: absolute; inset: 0; border-radius: 20px;
  background: rgba(0,0,0,.12);
  pointer-events: none;                          /* keep card clickable to cycle */
}
