/* Bright, simple, dependency-free */
:root{
  --bg1:#fff1f8;
  --bg2:#e8f7ff;
  --card:#ffffff;
  --text:#102a43;
  --muted:#52606d;
  --shadow: 0 10px 30px rgba(16,42,67,.10);
  --radius: 8px;
  --bar-empty:#e5e7eb;
  --bar-green:#22c55e;
  --bar-yellow:#facc15;
  --bar-red:#fca5a5;
  --accent1:#ff4d9a;
  --accent2:#00c2ff;
  --accent3:#32d583;
  --border: rgba(16,42,67,.12);
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  color:var(--text);
  background: radial-gradient(1200px 600px at 10% 0%, var(--bg2), transparent 60%),
              radial-gradient(1200px 600px at 90% 0%, var(--bg1), transparent 60%),
              linear-gradient(180deg, #ffffff, #f7fbff);
  min-height:100vh;
}

.container{
  width:min(980px, 92vw);
  margin:0 auto;
}

.topbar{
  position:sticky;
  top:0;
  backdrop-filter: blur(10px);
  background: rgba(255,255,255,.70);
  border-bottom: 1px solid rgba(16,42,67,.08);
  z-index:10;
}

.topbar-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}

.icon-btn{
  width:44px;
  height:44px;
  border-radius: 0;
  border: none;
  background: transparent;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px;
}

.icon-btn svg{
  width:20px;
  height:20px;
  fill: var(--text);
}

.icon-img{width:20px;height:20px;display:block}


.search-toggle{display:none}
.has-selection .search-toggle{display:inline-flex}

.icon-btn-inline{
  width:40px;
  height:40px;
  padding:10px;
}
.icon-btn:active{transform: translateY(1px)}


/* Hide search card when a quest is selected; open it via the search icon */
.has-selection .search-card{display:none}
.has-selection.search-open .search-card{display:block}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  padding:14px 0;
}
.title{font-weight:800}

.card{
  background: var(--card);
  box-shadow: var(--shadow);
  border: 1px solid rgba(16,42,67,.06);
  border-radius: var(--radius);
  padding:18px;
  margin:18px 0;
}

.search-card .row{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.label{
  font-weight:700;
}

.search-row{
  margin-top:12px;
  display:flex;
  gap:10px;
}
.input{
  flex:1;
  padding:12px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  outline:none;
  font-size:16px;
  background: rgba(255,255,255,.9);
}
.input:focus{
  border-color: rgba(0,194,255,.55);
  box-shadow: 0 0 0 4px rgba(0,194,255,.18);
}

.btn{
  border:none;
  cursor:pointer;
  border-radius: 6px;
  padding:11px 14px;
  font-weight:700;
  color:white;
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  box-shadow: 0 10px 25px rgba(255,77,154,.18);
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
}
.btn:active{transform: translateY(1px)}
.btn-ghost{
  background: rgba(16,42,67,.04);
  color: var(--text);
  box-shadow:none;
  border: 1px solid rgba(16,42,67,.10);
}
.status{
  margin-top:12px;
  color: var(--muted);
  font-size: 13px;
}

.results{
  margin-top:10px;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.result{
  padding:10px 12px;
  border-radius: 6px;
  border: 1px solid rgba(16,42,67,.08);
  background: linear-gradient(180deg, rgba(0,194,255,.07), rgba(255,77,154,.04));
  cursor:pointer;
}
.result:hover{
  border-color: rgba(0,194,255,.35);
}
.result-title{
  font-weight:800;
}
.result-meta{
  margin-top:4px;
  color: var(--muted);
  font-size: 13px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.badge{
  display:inline-flex;
  align-items:center;
  padding:2px 8px;
  border-radius: 8px;
  border:1px solid rgba(16,42,67,.10);
  background: rgba(255,255,255,.7);
}

.hidden{display:none}

.selected-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.selected-title-row{display:flex; align-items:center; gap:10px}

.quest-title{
  font-size:22px;
  font-weight:900;
  line-height:1.15;
}
.quest-meta{
  margin-top:6px;
  color: var(--muted);
  font-size:13px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.actions{display:flex; gap:10px; flex-wrap:wrap}

.bars{margin-top:14px; display:flex; flex-direction:column; gap:14px}
.bar-head{display:flex; align-items:baseline; justify-content:space-between; gap:12px; flex-wrap:wrap}
.bar-label{font-weight:800}
.bar-value{color:var(--muted); font-weight:700}
.bar-track{
  margin-top:8px;
  height:14px;
  border-radius: 3px;
  background: var(--bar-empty);
  overflow:hidden;
}

.bar-fill{
  height:100%;
  width:0%;
  border-radius: 3px;
  background: var(--bar-red);
}
.bar-fill.is-empty{width:0%}
.bar-fill.is-low{background: var(--bar-red)}
.bar-fill.is-mid{background: var(--bar-yellow)}
.bar-fill.is-full{background: var(--bar-green)}


.nav-row{
  margin-top:16px;
  display:flex;
  gap:10px;
  justify-content:space-between;
  flex-wrap:wrap;
}


.bars-list{display:flex; flex-direction:column; gap:14px}
.total-muted .bar-label{font-weight:700; color: var(--muted)}
.total-muted{opacity:.85}

.nav-icons{justify-content:center; gap:14px}
.icon-action{
  width:44px;
  height:44px;
  border-radius: 0;
  border: none;
  background: transparent;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px;
}
.icon-action svg{width:20px;height:20px;fill:var(--text)}
.icon-action:disabled{opacity:.45; cursor:not-allowed}
.icon-action:active{transform: translateY(1px)}

.icon-action.flash{box-shadow: 0 0 0 4px rgba(0,194,255,.18)}


.icon-btn:hover, .icon-action:hover{opacity:.85}
.icon-btn:active, .icon-action:active{transform: translateY(1px)}
.icon-btn:focus-visible, .icon-action:focus-visible{outline:2px solid rgba(16,42,67,.35); outline-offset:2px}
