/* The Wicked Wand: crimson velvet, gold filigree and emerald magic, from the company crest. */
:root {
  --night: #12040c;
  --velvet: #2a0716;
  --panel: rgba(46, 10, 30, 0.86);
  --panel2: rgba(70, 16, 44, 0.7);
  --line: rgba(232, 184, 92, 0.3);
  --gold: #e8b85c;
  --gold2: #ffe3a3;
  --rose: #ff3d8b;
  --emerald: #3ee08f;
  --text: #f6e9ef;
  --muted: #c4a3b4;
  --bad: #ff6b6b;
  --serif: "Cinzel", "Trajan Pro", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { background: var(--night); }
html, body { margin: 0; min-height: 100%; }
body {
  font: 15px/1.45 var(--sans);
  color: var(--text);
  background: radial-gradient(ellipse at 15% -10%, #5a0c2e 0%, transparent 55%),
              radial-gradient(ellipse at 100% 0%, #0d3a28 0%, transparent 45%),
              linear-gradient(180deg, var(--velvet), var(--night) 65%);
  background-attachment: fixed;
}
#app { max-width: 1180px; margin: 0 auto; padding: 0 14px 40px; }
a { color: var(--gold); }
a:hover { color: var(--gold2); }
h1, h2, h3 { font-family: var(--serif); letter-spacing: .04em; margin: 0 0 8px; }
h2 { font-size: 1.15rem; color: var(--gold); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.mono { font-family: var(--mono); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.grow { flex: 1 1 auto; }
.boot { min-height: 60vh; display: grid; place-items: center; color: var(--muted); font-family: var(--serif); }

.crest { display: block; width: 100%; max-height: 300px; object-fit: cover; object-position: center 40%; border-radius: 0 0 16px 16px; border: 1px solid var(--line); border-top: 0; box-shadow: 0 10px 40px rgba(255, 61, 139, .18); }
.crest.big { max-height: none; border-radius: 16px; border-top: 1px solid var(--line); margin-top: 18px; }
.bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 12px 0 16px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab { background: transparent; color: var(--muted); border: 1px solid transparent; border-radius: 999px; padding: 7px 14px; font: 600 .95rem var(--serif); cursor: pointer; }
.tab:hover { color: var(--gold2); }
.tab.on { color: var(--gold2); border-color: var(--line); background: var(--panel2); }
.who { margin-left: auto; color: var(--muted); font-size: .9rem; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 14px; backdrop-filter: blur(4px); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 820px) { .grid2 { grid-template-columns: 1fr; } }

input, select, button { font: inherit; }
input[type=text], input[type=password], input[type=search], input[type=number] {
  background: rgba(10, 2, 8, .55); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; min-width: 0;
}
input:focus { outline: 2px solid var(--rose); outline-offset: 1px; }
.btn { background: linear-gradient(180deg, #f0c76e, #c9922f); color: #2a0716; border: 0; border-radius: 10px; padding: 9px 16px; font-weight: 700; cursor: pointer; }
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.ghost { background: transparent; color: var(--gold); border: 1px solid var(--line); }
.err { color: var(--bad); }

.search { position: relative; }
.search input { width: 100%; font-size: 1.05rem; padding: 12px 14px; }
.sugg { position: absolute; z-index: 5; left: 0; right: 0; top: 100%; margin-top: 4px; background: #2a0716; border: 1px solid var(--line); border-radius: 10px; max-height: 320px; overflow: auto; }
.sugg button { display: flex; width: 100%; gap: 10px; align-items: center; text-align: left; background: none; border: 0; color: var(--text); padding: 8px 12px; cursor: pointer; }
.sugg button:hover, .sugg button.hi { background: var(--panel2); }
.sugg img { width: 38px; height: 19px; object-fit: contain; }

.best { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.stat { background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.stat b { display: block; font: 700 1.25rem var(--serif); color: var(--gold2); }
.stat span { color: var(--muted); font-size: .85rem; }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 7px 8px; border-bottom: 1px solid rgba(232, 184, 92, .14); text-align: left; vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.cheap td { background: rgba(62, 224, 143, .08); }
.tag { display: inline-block; font-size: .72rem; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.tag.live { color: var(--emerald); border-color: rgba(62, 224, 143, .5); }
.tag.w3b { color: var(--rose); border-color: rgba(255, 61, 139, .5); }
.tag.mkt { color: var(--gold); }
.good { color: var(--emerald); }
.over { color: var(--bad); }
.wrap { overflow-x: auto; }
.progress { height: 4px; background: rgba(255, 255, 255, .08); border-radius: 4px; overflow: hidden; margin: 8px 0; }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--rose), var(--gold)); transition: width .2s; }

.login { max-width: 640px; margin: 0 auto; }
.login input { width: 100%; }
.tos td, .tos th { font-size: .85rem; }

#toast { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); background: #3a0a22; border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; opacity: 0; pointer-events: none; transition: opacity .2s; }
#toast.on { opacity: 1; }
footer { text-align: center; color: var(--muted); font-size: .8rem; margin-top: 24px; }
