:root {
  --bg: #0b0f17; --bg2: #0e131d; --panel: #121925; --panel2: #18202e; --line: #222c3c; --line2: #2f3b4f;
  --text: #e8edf5; --muted: #9ba7b9; --faint: #6f7c90;
  --ember: #8fd3ff; --ember-hi: #cdeeff; --ember-deep: #3f8fd0; --gold: #e9dcb0; --ash: #7f8898; --frost: #b9a9ef;
  --tint: #141c2b;
  --display: "Cormorant Garamond", Garamond, Georgia, serif; --display-weight: 500; --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 10px; --wrap: 1240px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--body); -webkit-font-smoothing: antialiased; min-height: 100vh; }
a { color: var(--ember-hi); text-decoration: none; }
a:hover { color: #ffffff; }
button, input, select, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--display); font-weight: var(--display-weight); margin: 0; letter-spacing: .01em; line-height: 1.05; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; border-radius: 4px; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 30; background: rgba(14, 19, 29, .88); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); flex: none; }
.brand:hover { color: var(--text); }
.brand svg { width: 38px; height: 38px; filter: drop-shadow(0 0 10px rgba(143, 211, 255, .35)); }
.brand span { font-family: "Grenze Gotisch", var(--display); font-weight: 500; font-size: 30px; letter-spacing: .01em; white-space: nowrap; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; justify-content: center; gap: 4px; padding: 6px 12px calc(6px + env(safe-area-inset-bottom)); background: rgba(14, 19, 29, .92); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border-top: 1px solid var(--line); }
.tabbar a { flex: 0 1 120px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 4px; min-height: 52px; border-radius: 10px; color: var(--muted); font-size: 12px; font-weight: 500; position: relative; }
.tabbar a svg { width: 24px; height: 24px; }
.tabbar a:hover { color: var(--text); background: rgba(255, 255, 255, .03); }
.tabbar a.on { color: var(--ember-hi); }
.tabbar a.on svg { filter: drop-shadow(0 0 6px rgba(143, 211, 255, .8)); }
.tabbar a.on::before { content: ""; position: absolute; top: -7px; left: 30%; right: 30%; height: 2px; border-radius: 2px; background: var(--ember); box-shadow: 0 0 10px var(--ember); }
body { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
.toast { bottom: calc(90px + env(safe-area-inset-bottom)) !important; }
.nav { display: flex; gap: 6px; }
.nav a { color: var(--muted); padding: 8px 12px; border-radius: 8px; font-weight: 500; position: relative; }
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, .03); }
.nav a.on { color: var(--text); }
.nav a.on::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -15px; height: 2px; background: var(--ember); box-shadow: 0 0 12px var(--ember); border-radius: 2px; }
.top .tools { flex: 1; display: flex; justify-content: flex-end; align-items: center; gap: 14px; min-width: 0; }
.search { position: relative; width: 280px; max-width: 100%; }
.search input { width: 100%; height: 40px; padding: 0 14px 0 38px; border-radius: 9px; border: 1px solid var(--line2); background: var(--bg); color: var(--text); }
.search input::placeholder { color: var(--faint); }
.search input:focus { border-color: var(--ember-deep); outline: none; box-shadow: 0 0 0 3px rgba(143, 211, 255, .15); }
.search svg { position: absolute; left: 12px; top: 11px; width: 18px; height: 18px; color: var(--faint); pointer-events: none; }
.me-btn { width: 40px; height: 40px; border-radius: 50%; padding: 0; border: 2px solid var(--ember); background: #1d2a3d; cursor: pointer; overflow: hidden; flex: none; }
.menu { position: absolute; right: 32px; top: 62px; min-width: 200px; background: var(--panel2); border: 1px solid var(--line2); border-radius: 12px; padding: 6px; box-shadow: 0 20px 50px rgba(0, 0, 0, .6); }
.menu a, .menu button { display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 8px; color: var(--text); background: none; border: 0; cursor: pointer; }
.menu a:hover, .menu button:hover { background: rgba(255, 255, 255, .05); color: var(--text); }
.menu .who { padding: 10px 12px 8px; color: var(--muted); font-size: 13px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }

/* ---------- avatars ---------- */
.av { border-radius: 50%; background: #1d2a3d; color: var(--ember-hi); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; overflow: hidden; flex: none; position: relative; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av.live { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ember), 0 0 18px rgba(143, 211, 255, .55); }

/* ---------- buttons, inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 9px; border: 1px solid var(--line2); background: transparent; color: var(--text); font-weight: 500; cursor: pointer; transition: background .15s, border-color .15s, transform .1s; white-space: nowrap; }
.btn:hover { border-color: #45556e; background: rgba(255, 255, 255, .03); color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--ember); border-color: var(--ember); color: #06121e; font-weight: 600; }
.btn.primary:hover { background: #b3e2ff; border-color: #b3e2ff; color: #06121e; }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn.ghost { border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); }
.btn[disabled] { opacity: .5; cursor: default; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; color: var(--muted); font-weight: 500; }
.input, textarea.input, select.input { width: 100%; min-height: 44px; padding: 10px 14px; border-radius: 9px; border: 1px solid var(--line2); background: var(--bg); color: var(--text); }
textarea.input { resize: vertical; min-height: 110px; line-height: 1.55; }
.input:focus { border-color: var(--ember-deep); outline: none; box-shadow: 0 0 0 3px rgba(143, 211, 255, .15); }
select.input { appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23a89c90' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.hint { font-size: 13px; color: var(--muted); }
.error { color: #ff9b85; font-size: 14px; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--tint); transition: background .6s; }
.hero .art { position: absolute; inset: 0; background-size: cover; background-position: center 25%; opacity: .55; transform: scale(1.04); filter: saturate(115%); }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11, 15, 23, .96) 0%, rgba(11, 15, 23, .82) 40%, rgba(11, 15, 23, .35) 100%), linear-gradient(0deg, var(--bg) 0%, rgba(11, 15, 23, 0) 45%); pointer-events: none; }
.hero .wrap { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 44px; align-items: flex-end; padding-top: 56px; padding-bottom: 48px; }
.hero .cover-big { flex: 0 0 260px; }
.hero .info { flex: 999 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.kicker { font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--ember); font-weight: 600; }
.hero h1 { font-size: clamp(42px, 6.6vw, 76px); line-height: 1.02; text-shadow: 0 4px 30px rgba(0, 0, 0, .6); }
.meta { color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 14px; }
.meta span + span::before { content: "·"; margin-right: 14px; color: var(--faint); }
.embers { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.embers i { position: absolute; bottom: -12px; width: var(--sz, 4px); height: var(--sz, 4px); border-radius: 50%; background: #e6f6ff; box-shadow: 0 0 8px 3px rgba(143, 211, 255, .75), 0 0 22px 6px rgba(79, 179, 255, .35); opacity: 0; animation: rise ease-in-out infinite; }
@keyframes rise { 0% { transform: translate(0, 0) scale(.6); opacity: 0; } 15% { opacity: .95; } 40% { transform: translate(calc(var(--dx, 20px) * .6), -170px) scale(1); } 65% { transform: translate(calc(var(--dx, 20px) * -.3), -300px) scale(.9); opacity: .6; } 100% { transform: translate(var(--dx, 20px), -440px) scale(.4); opacity: 0; } }
.flowers { position: absolute; left: 0; right: 0; bottom: -2px; height: 110px; z-index: 1; pointer-events: none; display: flex; justify-content: space-around; align-items: flex-end; }
.flowers svg { flex: none; filter: drop-shadow(0 0 3px #7fd6ff) drop-shadow(0 0 10px rgba(79, 195, 255, .6)); animation: bloom 4.5s ease-in-out infinite alternate; }
@keyframes bloom { from { opacity: .7; filter: drop-shadow(0 0 2px #7fd6ff) drop-shadow(0 0 6px rgba(79, 195, 255, .35)); } to { opacity: 1; filter: drop-shadow(0 0 4px #9fe2ff) drop-shadow(0 0 16px rgba(79, 195, 255, .75)); } }
.mist { position: absolute; inset: auto 0 0 0; height: 160px; z-index: 0; background: radial-gradient(ellipse at 50% 100%, rgba(79, 179, 255, .16), rgba(79, 179, 255, 0) 70%); pointer-events: none; }
.flutter, .ledges { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.fly { position: absolute; animation: drift ease-in-out infinite alternate; opacity: .9; }
.fly svg { width: 100%; height: 100%; filter: drop-shadow(0 0 4px #bdeeff) drop-shadow(0 0 14px rgba(79, 195, 255, .85)); animation: flap ease-in-out infinite alternate; transform-origin: 50% 50%; }
.fly.near { opacity: .55; }
.fly.near svg { filter: blur(5px) drop-shadow(0 0 22px rgba(120, 210, 255, 1)); }
@keyframes drift { from { transform: translate(0, 0) rotate(var(--rot, 0deg)); } to { transform: translate(var(--dx, 40px), var(--dy, -30px)) rotate(calc(var(--rot, 0deg) * -1)); } }
@keyframes flap { from { transform: scaleX(1); } to { transform: scaleX(.55); } }
.ledge { position: absolute; display: block; animation: bob ease-in-out infinite alternate; filter: drop-shadow(0 -2px 10px rgba(110, 190, 255, .25)) drop-shadow(0 12px 18px rgba(0, 0, 0, .55)); }
.ledge svg { width: 100%; height: auto; display: block; }
@keyframes bob { from { transform: translateY(-5px); } to { transform: translateY(6px); } }
@media (max-width: 860px) { .fly:nth-child(n+9) { display: none; } .ledge { transform-origin: center; scale: .65; } .ledge:nth-child(n+3) { display: none; } }
@media (prefers-reduced-motion: reduce) { .embers { display: none; } * { transition: none !important; animation: none !important; } }

/* ---------- covers ---------- */
.cover { position: relative; aspect-ratio: 3 / 4; border-radius: 8px; overflow: hidden; background: linear-gradient(160deg, #1a2333, #121925); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0, 0, 0, .45); transform-style: preserve-3d; transition: transform .25s ease, box-shadow .25s ease; }
.cover img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.cover .badge-status, .cover .badge-mc { z-index: 2; }
.cover .ph { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 14px; font-family: var(--display); font-weight: var(--display-weight); font-size: 17px; line-height: 1.15; color: #dbe6f3; }
.cover-big .cover { box-shadow: 0 30px 70px rgba(0, 0, 0, .7); }
.cover-big .cover .ph { font-size: 26px; }
.tilt { will-change: transform; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 24px 18px; }
.card { display: flex; flex-direction: column; gap: 8px; color: var(--text); min-width: 0; }
.card:hover { color: var(--text); }
.card:hover .cover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0, 0, 0, .6), 0 0 0 1px rgba(143, 211, 255, .35); }
.card .t { font-weight: 600; font-size: 14px; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.card .sub { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.card .rate { color: var(--ember); font-weight: 600; }
.badge-status { position: absolute; top: 8px; left: 8px; padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; letter-spacing: .04em; background: rgba(11, 15, 23, .82); backdrop-filter: blur(6px); }
.badge-mc { position: absolute; top: 8px; right: 8px; }
.s-playing { color: var(--ember); } .s-frozen { color: #d6f4ff; } .s-finished { color: var(--gold); } .s-backlog { color: var(--frost); } .s-dropped { color: var(--ash); }
.plats { display: inline-flex; gap: 4px; }
.plat { font-size: 10px; font-weight: 700; letter-spacing: .06em; padding: 2px 6px; border-radius: 4px; border: 1px solid var(--line2); color: var(--muted); }

/* ---------- metascore ---------- */
.mc { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 26px; padding: 0 6px; border-radius: 6px; font-weight: 700; font-size: 13px; color: #0b0f17; }
.mc.big { min-width: 54px; height: 54px; font-size: 24px; border-radius: 9px; }
.mc.good { background: #66cc33; } .mc.mixed { background: #ffcc33; } .mc.bad { background: #ff6874; }
.mc.critic { background: transparent; color: var(--text); border: 1px solid var(--line2); }
.scorebox { display: flex; align-items: center; gap: 12px; }
.scorebox .lbl { font-size: 12px; line-height: 1.3; color: var(--muted); }
.scorebox .lbl strong { display: block; font-size: 13px; color: var(--text); font-weight: 600; }

/* ---------- stars ---------- */
.stars { display: inline-flex; gap: 2px; touch-action: none; user-select: none; -webkit-user-select: none; }
.stars.rinput { cursor: pointer; padding: 4px 0; }
.star { position: relative; width: 26px; height: 26px; flex: none; }
.stars.sm .star { width: 13px; height: 13px; }
.stars.md .star { width: 18px; height: 18px; }
.star svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.star .fill { position: absolute; inset: 0; overflow: hidden; }
.star .fill svg { width: 26px; height: 26px; }
.stars.sm .star .fill svg { width: 13px; height: 13px; }
.stars.md .star .fill svg { width: 18px; height: 18px; }
.star .base path { fill: #2f3b4f; }
.star .fill path { fill: var(--ember); filter: drop-shadow(0 0 4px rgba(143, 211, 255, .5)); }
.stars.preview .star .fill path { fill: var(--ember-hi); }
.ratebox { display: flex; flex-direction: column; gap: 4px; }
.ratebox .val { font-size: 13px; color: var(--muted); }
.ratebox .val strong { color: var(--text); font-size: 15px; }

/* ---------- status buttons ---------- */
.statuses { display: flex; flex-wrap: wrap; gap: 8px; }
.sbtn { --c: var(--ember); position: relative; overflow: hidden; display: inline-flex; flex-direction: row; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line2); background: rgba(18, 25, 37, .72); color: var(--muted); font: 500 14px/1.1 var(--body); cursor: pointer; transition: color .2s, background .2s, border-color .2s, box-shadow .2s, transform .12s; -webkit-tap-highlight-color: transparent; }
.sbtn:hover { color: var(--text); border-color: color-mix(in srgb, var(--c) 45%, var(--line2)); }
.sbtn:active { transform: scale(.96); }
.sbtn svg { opacity: .8; }
.sbtn.frozen { --c: #bfeaff; } .sbtn.backlog { --c: var(--frost); } .sbtn.finished { --c: var(--gold); } .sbtn.dropped { --c: var(--ash); }
.sbtn.on { color: var(--c); border-color: var(--c); background: color-mix(in srgb, var(--c) 16%, rgba(14, 19, 29, .9)); box-shadow: 0 0 0 1px var(--c) inset, 0 0 18px color-mix(in srgb, var(--c) 35%, transparent); font-weight: 600; }
.sbtn.on svg { opacity: 1; filter: drop-shadow(0 0 4px color-mix(in srgb, var(--c) 70%, transparent)); }
.sbtn.dropped.on span { text-decoration: line-through; text-decoration-thickness: 1.5px; }
/* frozen: the tile ices over, frost creeping in from the edges with icicles along the top */
.sbtn .frost { position: absolute; inset: 0; pointer-events: none; opacity: 0; border-radius: inherit;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, .55) 0 1.2px, transparent 1.6px),
    radial-gradient(circle at 78% 30%, rgba(255, 255, 255, .5) 0 1px, transparent 1.4px),
    radial-gradient(circle at 34% 82%, rgba(255, 255, 255, .45) 0 1px, transparent 1.4px),
    radial-gradient(circle at 90% 76%, rgba(255, 255, 255, .5) 0 1.2px, transparent 1.6px),
    linear-gradient(135deg, rgba(255, 255, 255, .28), transparent 38%, transparent 62%, rgba(255, 255, 255, .22)),
    radial-gradient(ellipse at 50% 50%, transparent 45%, rgba(214, 244, 255, .38) 100%); }
.sbtn .frost::before { content: ""; position: absolute; left: 6%; right: 6%; top: 0; height: 9px; background: linear-gradient(180deg, rgba(235, 250, 255, .95), rgba(190, 234, 255, .6));
  clip-path: polygon(0 0, 100% 0, 100% 30%, 94% 30%, 91% 100%, 88% 30%, 76% 30%, 73% 70%, 70% 30%, 57% 30%, 54% 100%, 51% 30%, 38% 30%, 35% 65%, 32% 30%, 20% 30%, 17% 90%, 14% 30%, 0 30%); filter: drop-shadow(0 0 2px #fff); }
.sbtn.frozen.on { color: #f2fbff; background: linear-gradient(160deg, rgba(160, 220, 255, .38), rgba(70, 140, 200, .28)); border-color: #d6f4ff; text-shadow: 0 0 8px rgba(190, 234, 255, .9); }
.sbtn.frozen.on .frost { opacity: 1; }
.sbtn.frozen.on.fresh .frost { animation: freeze .7s cubic-bezier(.2, .8, .2, 1) both; }
.sbtn.frozen.on.fresh { animation: crack .45s ease-out; }
@keyframes freeze { from { opacity: 0; clip-path: inset(50% 50% 50% 50% round 10px); filter: brightness(2); } 60% { opacity: 1; filter: brightness(1.5); } to { opacity: 1; clip-path: inset(0 0 0 0 round 10px); filter: none; } }
@keyframes crack { 0% { transform: scale(1); } 30% { transform: scale(.94) rotate(-1deg); } 55% { transform: scale(1.03) rotate(.6deg); } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) { .sbtn.frozen.on.fresh, .sbtn.frozen.on.fresh .frost { animation: none; } }

/* ---------- layout bits ---------- */
main.page { padding: 40px 0 80px; }
.cols { display: flex; flex-wrap: wrap; gap: 44px; }
.cols > .main { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.cols > .side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sec-head h2 { font-size: 32px; }
.sec-head .hint { font-size: 13px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }

.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filters .input { width: auto; min-height: 38px; padding: 6px 12px; font-size: 14px; }
.filters select.input { padding-right: 34px; }
.empty { text-align: center; padding: 56px 20px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 14px; }
.empty h3 { font-size: 22px; color: var(--text); }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--panel2); border: 1px solid var(--line2); padding: 12px 18px; border-radius: 10px; box-shadow: 0 16px 40px rgba(0, 0, 0, .6); z-index: 50; max-width: calc(100% - 32px); }
.toast.bad { border-color: #7a3340; }

/* ---------- feed ---------- */
.feed { display: flex; flex-direction: column; gap: 12px; }
.fitem { display: flex; gap: 14px; padding: 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); align-items: flex-start; }
.fitem .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.fitem .when { color: var(--faint); font-size: 12px; }
.fitem .quote { color: var(--muted); font-style: italic; border-left: 2px solid var(--line2); padding-left: 10px; overflow-wrap: anywhere; }
.fitem .thumb { width: 52px; flex: none; }
.fitem .thumb .cover { border-radius: 5px; box-shadow: none; }
.fitem .thumb .cover .ph { font-size: 9px; padding: 5px; }

/* ---------- members ---------- */
.circle { display: flex; gap: 22px; overflow-x: auto; padding: 8px 4px 16px; scrollbar-width: thin; }
.member { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 92px; flex: none; color: var(--text); text-align: center; }
.member:hover { color: var(--text); }
.member .nm { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.member .np { font-size: 11px; color: var(--ember); line-height: 1.25; max-height: 2.5em; overflow: hidden; }
.campfire { position: relative; padding: 36px 0 12px; }
.campfire .glow { position: absolute; left: 50%; bottom: -60px; width: 640px; max-width: 100%; height: 200px; transform: translateX(-50%); background: radial-gradient(ellipse at center, rgba(79, 179, 255, .2), rgba(79, 179, 255, 0) 70%); pointer-events: none; }

/* ---------- reviews ---------- */
.review { padding: 20px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.review.mine { border-color: rgba(143, 211, 255, .35); }
.review .head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.review .head .who { display: flex; flex-direction: column; }
.review .head .who a { color: var(--text); font-weight: 600; }
.review .text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; font-size: 15.5px; }
.notes { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; margin-left: 4px; }
.note { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.note .nb { flex: 1; min-width: 0; }
.note .nb .nt { white-space: pre-wrap; overflow-wrap: anywhere; }
.note .nb .when { color: var(--faint); font-size: 12px; }
.note .x { background: none; border: 0; color: var(--faint); cursor: pointer; padding: 4px 8px; border-radius: 6px; min-height: 30px; }
.note .x:hover { color: #ff9b85; }
.addnote { display: flex; gap: 8px; }
.addnote .input { min-height: 40px; }

/* ---------- profile ---------- */
.prof-head { display: flex; gap: 28px; align-items: flex-end; flex-wrap: wrap; }
.prof-head .av { width: 128px; height: 128px; font-size: 46px; border: 3px solid var(--bg); box-shadow: 0 0 0 2px var(--ember), 0 20px 50px rgba(0, 0, 0, .6); }
.stats { display: flex; gap: 0; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 12px; background: rgba(18, 25, 37, .8); }
.stat { padding: 14px 22px; display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat b { font-family: var(--display); font-size: 30px; line-height: 1.1; }
.stat span { font-size: 12px; color: var(--muted); }
.favs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }

/* ---------- settings ---------- */
.settings { display: flex; flex-direction: column; gap: 24px; max-width: 760px; }
.settings .panel { display: flex; flex-direction: column; gap: 16px; }
.settings h2 { font-size: 22px; }
.conn { display: flex; gap: 16px; align-items: flex-start; }
.conn .logo { width: 56px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex: none; background: var(--panel2); border: 1px solid var(--line2); font-weight: 700; font-size: 10px; letter-spacing: .05em; }
.conn .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row .input { flex: 1 1 240px; }
ol.steps { margin: 0; padding-left: 20px; color: var(--muted); font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
ol.steps code, .hint code { background: var(--bg); border: 1px solid var(--line); padding: 1px 6px; border-radius: 5px; color: var(--text); font-size: 13px; overflow-wrap: anywhere; }
.ok { color: #9fd58a; }

/* ---------- welcome ---------- */
.welcome { min-height: calc(100vh - 68px); display: flex; align-items: center; justify-content: center; padding: 40px 16px; position: relative; overflow: hidden; }
.welcome .card-w { position: relative; z-index: 2; width: 100%; max-width: 480px; background: rgba(18, 25, 37, .92); border: 1px solid var(--line2); border-radius: 16px; padding: 32px; display: flex; flex-direction: column; gap: 18px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.welcome h1 { font-size: 38px; }
.photo-pick { display: flex; gap: 16px; align-items: center; }
.photo-pick .av { width: 84px; height: 84px; font-size: 32px; }

/* ---------- discover ---------- */
.results { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.res { display: flex; gap: 14px; padding: 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); align-items: flex-start; }
.res .thumb { width: 72px; flex: none; }
.res .thumb .cover { box-shadow: none; }
.res .thumb .cover .ph { font-size: 10px; padding: 6px; }
.res .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.res .grow b { line-height: 1.3; }
.res .row .input { flex: 1 1 100px; min-height: 36px; padding: 4px 30px 4px 10px; font-size: 13px; background-position: right 10px center; }

/* ---------- skeleton ---------- */
.skel { background: linear-gradient(90deg, #121925 0%, #1c2638 50%, #121925 100%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 8px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

footer.foot { border-top: 1px solid var(--line); color: var(--faint); font-size: 12px; padding: 22px 0 40px; }
footer.foot .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- phone ---------- */
@media (max-width: 860px) {
  .wrap { padding: 0 16px; }
  .top .wrap { height: auto; flex-wrap: wrap; gap: 10px 14px; padding-top: 10px; padding-bottom: 10px; }
  .nav { order: 3; width: 100%; overflow-x: auto; margin: 0 -4px; }
  .nav a { padding: 10px 12px; }
  .nav a.on::after { bottom: 0; }
  .top .tools { gap: 10px; }
  .search { width: auto; flex: 1; }
  .menu { right: 16px; top: 58px; }
  .hero .wrap { gap: 24px; padding-top: 28px; padding-bottom: 28px; }
  .hero .cover-big { flex: 0 0 140px; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 12px; }
  .card .sub .plats { display: none; }
  .favs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prof-head .av { width: 96px; height: 96px; font-size: 36px; }
  .stat { padding: 10px 14px; }
  .stat b { font-size: 20px; }
  .star { width: 24px; height: 24px; }
  .star .fill svg { width: 24px; height: 24px; }
  main.page { padding: 24px 0 64px; }
}
@media (max-width: 420px) {
  .brand span { font-size: 25px; }
  .star { width: 22px; height: 22px; }
  .star .fill svg { width: 22px; height: 22px; }
}

.hero h1.small { font-size: clamp(30px, 4.2vw, 46px); }
@media (max-width: 860px) {
  .hero .art { bottom: auto; height: min(62vw, 340px); transform: none; background-position: center 30%; -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent); mask-image: linear-gradient(180deg, #000 55%, transparent); }
  .stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; margin-left: 0 !important; }
  .stat { border-right: 0; border-bottom: 1px solid var(--line); }
  .stat:nth-child(n+4) { border-bottom: 0; }
  .prof-head { gap: 18px; }
  .ledges { display: none; }
}

/* flowers stay on the right, clear of the hero text */
.flowers { display: block; height: auto; top: 0; bottom: 0; }
.flowers svg { position: absolute; bottom: 0; }
.statbar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 22px; }
.statbar div { padding: 14px 18px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.statbar div + div { border-left: 1px solid var(--line); }
.statbar b { font-family: var(--display); font-weight: 500; font-size: 26px; line-height: 1.1; color: var(--text); }
.statbar span { color: var(--muted); font-size: 13px; }
@media (max-width: 860px) {
  .flowers svg:nth-child(n+3) { display: none; }
  .statbar b { font-size: 21px; }
  .statbar div { padding: 12px 14px; }
}

/* ---------- quick rate ---------- */
.stars.lg { gap: 3px; }
.stars.lg .star, .stars.lg .star .fill svg { width: 30px; height: 30px; }
.rate-page { padding-top: 24px; }
.rate-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.rate-stage { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.rate-card { width: min(280px, 68vw); touch-action: pan-y; transition: transform .25s ease, opacity .22s ease; }
.rate-card a { display: block; -webkit-user-drag: none; }
.rate-card img { -webkit-user-drag: none; pointer-events: none; }
.rate-card.in-next { animation: rate-in .32s ease; }
.rate-card.in-back { animation: rate-back .32s ease; }
@keyframes rate-in { from { transform: translateX(60px) scale(.96); opacity: 0; } }
@keyframes rate-back { from { transform: translateX(-60px) scale(.96); opacity: 0; } }
.rate-info h2 { font-size: clamp(24px, 4vw, 34px); }
.rate-info .meta { justify-content: center; margin: 6px 0 0; }
.rate-stage .ratebox { align-items: center; }
.rate-btns { justify-content: center; gap: 10px; }

/* home banner keeps its original look: a row of flowers on the right, effects in fixed spots */
.hero.classic .flowers { display: flex; top: auto; bottom: -2px; height: 110px; justify-content: flex-end; align-items: flex-end; gap: 4%; padding-right: 3%; }
.hero.classic .flowers svg { position: static; }
@media (max-width: 860px) { .hero.classic .flowers { gap: 0; padding-right: 0; } }
.rate-stage .statuses { justify-content: center; }
.icon-btn { width: 40px; height: 40px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
h1, h2, h3, .stat b, .statbar b, .brand span { font-variant-numeric: lining-nums; }
@media (max-width: 860px) { .brand { gap: 8px; } }
@media (max-width: 860px) { .rate-card { width: min(220px, 56vw); } .rate-stage { gap: 12px; } }

/* ---------- library shelves ---------- */
.shelves { display: flex; flex-direction: column; gap: 30px; }
.shelf { --c: var(--ember); }
.shelf.frozen { --c: #bfeaff; } .shelf.backlog { --c: var(--frost); } .shelf.finished { --c: var(--gold); } .shelf.dropped { --c: var(--ash); } .shelf.none { --c: var(--muted); }
.shelf-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.shelf-head h3 { display: flex; align-items: center; gap: 9px; font-size: 24px; color: var(--text); }
.shelf-head h3 svg { color: var(--c); filter: drop-shadow(0 0 5px color-mix(in srgb, var(--c) 60%, transparent)); }
.shelf-head .n { font: 500 13px var(--body); color: var(--faint); }
.shelf-row { display: grid; grid-auto-flow: column; grid-auto-columns: 150px; gap: 16px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.shelf-row > * { scroll-snap-align: start; }
@media (max-width: 860px) {
  .shelf-row { grid-auto-columns: calc((100% - 24px) / 3); gap: 12px; }
  .grid .card .t, .shelf-row .card .t { font-size: 13px; }
  .shelf-head h3 { font-size: 21px; }
}
.with-side { display: grid !important; grid-template-columns: 200px minmax(0, 1fr); gap: 28px !important; align-items: start; }
.sidelist { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 90px; }
.sidelist button { --c: var(--ember); all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--muted); cursor: pointer; font-size: 15px; }
.sidelist .all { --c: var(--text); } .sidelist .frozen { --c: #bfeaff; } .sidelist .backlog { --c: var(--frost); } .sidelist .finished { --c: var(--gold); } .sidelist .dropped { --c: var(--ash); }
.sidelist button:hover { background: rgba(255, 255, 255, .04); color: var(--text); }
.sidelist button:focus-visible { outline: 2px solid var(--ember); }
.sidelist button.on { color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); box-shadow: inset 2px 0 0 var(--c); font-weight: 600; }
.sidelist .n { margin-left: auto; font-size: 12px; color: var(--faint); }
@media (max-width: 860px) { .with-side { grid-template-columns: minmax(0, 1fr); gap: 18px !important; } .sidelist { display: none; } }
.lib-title { font-size: clamp(30px, 4vw, 40px); margin: 0 0 14px; }
main.page.home { padding-top: 22px; }
.lib-head { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; }
.lib-head .lib-title { font-size: 30px; margin: 0; line-height: 1.1; }
.with-side:has(> .lib-head) { row-gap: 16px !important; }
.lib-body { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
@media (max-width: 860px) {
  main.page.home { padding-top: 16px; }
  .lib-head .lib-title { font-size: 26px; }
  .lib-body .filters { gap: 8px; }
  .lib-head { flex-wrap: nowrap; }
  .lib-head input.input { width: 150px; flex: none; min-height: 32px; padding: 5px 12px; font-size: 13px; }
  .lib-body .filters select { flex: 1 1 40%; min-width: 0; }
  .lib-body .filters .input { min-height: 34px; font-size: 13px; }
  .with-side:has(> .lib-head) { row-gap: 12px !important; }
}
.restprog { display: flex; flex-direction: column; gap: 10px; width: min(380px, 100%); }
.restprog h1.small { font-size: clamp(28px, 3.6vw, 40px); }
.restprog .bar { height: 8px; border-radius: 99px; background: rgba(143, 211, 255, .12); border: 1px solid rgba(143, 211, 255, .2); overflow: hidden; }
.restprog .bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #3f8fd0, #8fd3ff, #e6f6ff); box-shadow: 0 0 12px rgba(143, 211, 255, .8); }
.restprog .hint { color: var(--muted); }
.restprog .hint strong { color: var(--ember-hi); }
@media (max-width: 860px) { .restprog { width: min(230px, 62%); } }

/* ---------- resting: journeys, snapshots ---------- */
.resting { display: flex; flex-direction: column; gap: 36px; }
.resting h2 { font-size: clamp(26px, 3vw, 32px); }
.resting .sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.resting-feed { display: flex; flex-direction: column; gap: 16px; max-width: 820px; }
@media (max-width: 860px) { .pc-only { display: none !important; } }
.resting .feed { gap: 8px; } .resting .fitem { padding: 8px 10px 8px 14px; align-items: center; } .resting .fitem .thumb { width: 34px; } .resting .fitem .body { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }

/* ================= magic library look (the only look; set by data-theme on <html>) ================= */

/* ---------- Magic library: a candlelit arcane library, gold leaf, violet spellwork ---------- */
[data-theme="arcane"] {
  --bg: #0e0a12; --bg2: #130e18; --panel: #18111d; --panel2: #201827; --line: #2c2233; --line2: #3e3147;
  --text: #f1e6d0; --muted: #b9a88e; --faint: #85766a;
  --ember: #e8c170; --ember-hi: #ffe2a6; --ember-deep: #a97b34; --gold: #e8c170; --ash: #8b7f86; --frost: #b89cff;
  --tint: #1b1220; --display: "Cinzel", "Cormorant Garamond", Georgia, serif; --display-weight: 400;
}
[data-theme="arcane"] body { background: radial-gradient(1200px 600px at 50% -10%, rgba(120, 70, 160, .16), transparent 70%), var(--bg); background-attachment: fixed; }
[data-theme="arcane"] a { color: var(--ember-hi); }
[data-theme="arcane"] .top { background: rgba(16, 11, 20, .9); }
[data-theme="arcane"] .brand-book { display: block; width: 46px !important; height: 36px !important; filter: drop-shadow(0 0 6px rgba(232, 193, 112, .55)); }
[data-theme="arcane"] .brand span { font-family: "Cinzel Decorative", "Cinzel", serif; font-weight: 700; font-size: 27px; letter-spacing: .04em; color: #f6e7c6; text-shadow: 0 0 14px rgba(232, 193, 112, .35); }
[data-theme="arcane"] .me-btn { border-color: var(--ember); background: #2a1f30; }
[data-theme="arcane"] .av { background: #2a1f30; color: var(--ember-hi); }
[data-theme="arcane"] .av.live { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ember), 0 0 18px rgba(232, 193, 112, .55); }
[data-theme="arcane"] .search input:focus, [data-theme="arcane"] .input:focus { box-shadow: 0 0 0 3px rgba(232, 193, 112, .15); }
[data-theme="arcane"] .btn.primary { color: #1c1206; background: linear-gradient(#f2d08a, #d9a956); border-color: #e8c170; }
[data-theme="arcane"] .btn.primary:hover { background: linear-gradient(#ffe2a6, #e8b965); color: #1c1206; }
[data-theme="arcane"] .kicker { color: var(--ember); letter-spacing: .26em; }
[data-theme="arcane"] .hero h1, [data-theme="arcane"] .sec-head h2, [data-theme="arcane"] .lib-title { color: #f6e7c6; }
[data-theme="arcane"] .hero::after { background: linear-gradient(90deg, rgba(14, 10, 18, .96) 0%, rgba(14, 10, 18, .82) 40%, rgba(14, 10, 18, .35) 100%), linear-gradient(0deg, var(--bg) 0%, rgba(14, 10, 18, 0) 45%); }
[data-theme="arcane"] .hero.classic, [data-theme="arcane"] .hero:not(:has(.art)) { background: radial-gradient(700px 260px at 82% 105%, rgba(255, 170, 70, .16), transparent 70%), radial-gradient(500px 300px at 70% 20%, rgba(150, 110, 255, .1), transparent 70%), var(--tint); }
/* soft candlelight on the floor instead of the blue mist */
[data-theme="arcane"] .mist { background: radial-gradient(ellipse at 70% 100%, rgba(255, 176, 80, .2), rgba(255, 176, 80, 0) 70%); }
/* golden dust motes */
[data-theme="arcane"] .embers i { background: #fff3cf; box-shadow: 0 0 6px 2px rgba(255, 210, 120, .7), 0 0 16px 4px rgba(232, 160, 60, .3); }
/* floating spell books: a slow sway instead of wing flaps */
[data-theme="arcane"] .fly svg { overflow: visible; filter: drop-shadow(0 0 3px rgba(255, 220, 150, .55)) drop-shadow(0 0 12px rgba(232, 160, 60, .35)); animation-name: page; }
[data-theme="arcane"] .fly.closed svg { animation-name: tumble; animation-timing-function: ease-in-out; }
@keyframes tumble { from { transform: rotate(-10deg) translateY(-2px); } to { transform: rotate(8deg) translateY(3px); } }
[data-theme="arcane"] .fly.near svg { filter: blur(2px) drop-shadow(0 0 16px rgba(255, 200, 120, .9)); }
@keyframes page { from { transform: rotate(-5deg) scaleY(1); } to { transform: rotate(5deg) scaleY(.88); } }
/* rune circles turning slowly */
/* elemental circles: each layer turns at its own speed, the centre sign pulses */
[data-theme="arcane"] .ledge { --rc: 232, 193, 112; filter: drop-shadow(0 0 2px rgba(var(--rc), .9)) drop-shadow(0 0 12px rgba(var(--rc), .5)); opacity: .9; }
[data-theme="arcane"] .ledge svg { overflow: visible; }
[data-theme="arcane"] .ledge .rl { transform-box: view-box; transform-origin: 60px 60px; animation: spin linear infinite; }
[data-theme="arcane"] .ledge .rl.rev { animation-direction: reverse; }
[data-theme="arcane"] .ledge .core { transform-box: view-box; transform-origin: 60px 60px; animation: pulse 3.5s ease-in-out infinite alternate; }
@keyframes pulse { from { opacity: .7; transform: scale(.96); } to { opacity: 1; transform: scale(1.03); } }
@keyframes spin { to { transform: rotate(360deg); } }
/* candles with flickering flames */
[data-theme="arcane"] .flowers svg { filter: drop-shadow(0 0 6px rgba(255, 190, 90, .55)); animation: candle 3.2s ease-in-out infinite alternate; }
[data-theme="arcane"] .flowers .flame { transform-box: fill-box; transform-origin: 50% 100%; animation: flicker .18s ease-in-out infinite alternate; }
[data-theme="arcane"] .flowers .glow { animation: halo 2.4s ease-in-out infinite alternate; }
@keyframes candle { from { filter: drop-shadow(0 0 4px rgba(255, 190, 90, .45)); } to { filter: drop-shadow(0 0 10px rgba(255, 190, 90, .8)); } }
@keyframes flicker { from { transform: scale(1, 1) skewX(-2deg); } to { transform: scale(.92, 1.08) skewX(2deg); } }
@keyframes halo { from { opacity: .16; } to { opacity: .3; } }
/* covers framed in thin gold, like plates in an old tome */
[data-theme="arcane"] .cover { border-color: rgba(232, 193, 112, .28); }
[data-theme="arcane"] .card:hover .cover { box-shadow: 0 18px 40px rgba(0, 0, 0, .6), 0 0 0 1px rgba(232, 193, 112, .6), 0 0 22px rgba(232, 193, 112, .25); }
[data-theme="arcane"] .card .rate, [data-theme="arcane"] .s-playing { color: var(--ember); }
[data-theme="arcane"] .cover .ph { color: #f1e6d0; }
[data-theme="arcane"] .panel, [data-theme="arcane"] .fitem, [data-theme="arcane"] .review, [data-theme="arcane"] .res, [data-theme="arcane"] .statbar, [data-theme="arcane"] .stats { background: linear-gradient(180deg, rgba(36, 26, 42, .9), rgba(24, 17, 29, .9)); border-color: var(--line2); }
[data-theme="arcane"] .review.mine { border-color: rgba(232, 193, 112, .4); }
[data-theme="arcane"] .star .base path { fill: #3e3147; }
[data-theme="arcane"] .star .fill path { fill: var(--ember); filter: drop-shadow(0 0 4px rgba(232, 193, 112, .55)); }
[data-theme="arcane"] .stars.preview .star .fill path { fill: var(--ember-hi); }
[data-theme="arcane"] .sbtn { --c: var(--ember); }
[data-theme="arcane"] .sbtn.backlog { --c: var(--frost); } [data-theme="arcane"] .sbtn.finished { --c: #9fd3a0; } [data-theme="arcane"] .sbtn.dropped { --c: var(--ash); }
[data-theme="arcane"] .s-finished { color: #9fd3a0; }
[data-theme="arcane"] .restprog .bar { background: rgba(232, 193, 112, .1); border-color: rgba(232, 193, 112, .25); }
[data-theme="arcane"] .restprog .bar i { background: linear-gradient(90deg, #8a5a1e, #e8c170, #fff0c8); box-shadow: 0 0 12px rgba(232, 193, 112, .7); }
[data-theme="arcane"] .restprog .hint strong { color: var(--ember-hi); }
[data-theme="arcane"] .tabbar { background: rgba(16, 11, 20, .94); }
[data-theme="arcane"] .tabbar a.on { color: var(--ember-hi); }
[data-theme="arcane"] .tabbar a.on svg { filter: drop-shadow(0 0 6px rgba(232, 193, 112, .8)); }
[data-theme="arcane"] .tabbar a.on::before { background: var(--ember); box-shadow: 0 0 10px var(--ember); }
[data-theme="arcane"] .sidelist button { --c: var(--ember); }
[data-theme="arcane"] .sidelist .backlog { --c: var(--frost); } [data-theme="arcane"] .sidelist .finished { --c: #9fd3a0; } [data-theme="arcane"] .sidelist .all { --c: var(--text); }
[data-theme="arcane"] .shelf { --c: var(--ember); } [data-theme="arcane"] .shelf.backlog { --c: var(--frost); } [data-theme="arcane"] .shelf.finished { --c: #9fd3a0; }
[data-theme="arcane"] .campfire .glow { background: radial-gradient(ellipse at center, rgba(255, 176, 80, .18), rgba(255, 176, 80, 0) 70%); }
[data-theme="arcane"] .prof-head .av { box-shadow: 0 0 0 2px var(--ember), 0 20px 50px rgba(0, 0, 0, .6); }
@media (max-width: 860px) { [data-theme="arcane"] .brand-book { width: 36px !important; height: 28px !important; } [data-theme="arcane"] .brand span { font-size: 23px; } }
@media (max-width: 860px) { [data-theme="arcane"] .ledges { display: block; } [data-theme="arcane"] .ledge:nth-child(n+2) { display: none; } }
@media (max-width: 860px) { [data-theme="arcane"] .ledge { width: 74px !important; scale: 1; } [data-theme="arcane"] .fly.book { width: 44px !important; height: 44px !important; } [data-theme="arcane"] .fly.book.near { display: none; } }

/* ---------- Magic library: each status casts its own spell when it's on ---------- */
[data-theme="arcane"] .sbtn { isolation: isolate; }
[data-theme="arcane"] .sbtn > svg, [data-theme="arcane"] .sbtn > span { position: relative; z-index: 2; }
[data-theme="arcane"] .sbtn .frost { z-index: 1; }
[data-theme="arcane"] .sbtn.playing { --c: #ffcf6e; --spark: 255, 214, 130; }
[data-theme="arcane"] .sbtn.frozen { --spark: 214, 244, 255; }
[data-theme="arcane"] .sbtn.backlog { --spark: 190, 160, 255; }
[data-theme="arcane"] .sbtn.finished { --spark: 170, 230, 170; }
[data-theme="arcane"] .sbtn.dropped { --spark: 160, 150, 160; }
/* a rune band running round the edge: a turning conic light behind, the button face on top */
[data-theme="arcane"] .sbtn.on::before { content: ""; position: absolute; z-index: -2; left: 50%; top: 50%; width: 260%; aspect-ratio: 1; translate: -50% -50%; background: conic-gradient(from 0deg, transparent 0 18%, var(--c) 25%, transparent 32% 68%, var(--c) 75%, transparent 82%); animation: spin 3.2s linear infinite; }
[data-theme="arcane"] .sbtn.on::after { content: ""; position: absolute; z-index: -1; inset: 1.5px; border-radius: 9px; background-color: color-mix(in srgb, var(--c) 16%, #150f1a);
  background-image: radial-gradient(circle, rgba(var(--spark), .95) 0 .9px, transparent 1.4px), radial-gradient(circle, rgba(var(--spark), .7) 0 .7px, transparent 1.2px), radial-gradient(circle, rgba(var(--spark), .8) 0 1px, transparent 1.5px);
  background-size: 23px 19px, 31px 27px, 17px 29px; background-position: 0 0, 9px 5px, 4px 13px; animation: motes 2.6s linear infinite; }
@keyframes motes { to { background-position: 0 -19px, 9px -22px, 4px -16px; } }
[data-theme="arcane"] .sbtn.on { border-color: transparent; background: transparent; box-shadow: 0 0 18px color-mix(in srgb, var(--c) 40%, transparent), 0 0 4px color-mix(in srgb, var(--c) 60%, transparent); text-shadow: 0 0 8px color-mix(in srgb, var(--c) 80%, transparent); }
/* playing: warm firelight flickering on the face */
[data-theme="arcane"] .sbtn.playing.on::after { background-image: radial-gradient(circle, rgba(var(--spark), .95) 0 .9px, transparent 1.4px), radial-gradient(circle, rgba(255, 140, 50, .8) 0 .8px, transparent 1.3px), radial-gradient(ellipse at 50% 120%, rgba(255, 150, 60, .35), transparent 70%); background-size: 23px 19px, 29px 23px, 100% 100%; animation: motes 1.8s linear infinite, warm 1.1s ease-in-out infinite alternate; }
@keyframes warm { from { filter: brightness(.95); } to { filter: brightness(1.18); } }
/* backlog: violet sigils drifting slowly sideways, the ring turns lazily */
[data-theme="arcane"] .sbtn.backlog.on::before { animation-duration: 7s; animation-direction: reverse; }
[data-theme="arcane"] .sbtn.backlog.on::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='34' height='22'%3E%3Cg fill='none' stroke='%23c6aaff' stroke-width='1' stroke-linecap='round' opacity='.32'%3E%3Cpath d='M5 6l3 5 3-5M5 11h6'/%3E%3Cpath d='M22 13a3 3 0 1 0 6 0 3 3 0 1 0-6 0M25 10v-3'/%3E%3C/g%3E%3C/svg%3E"), radial-gradient(circle, rgba(var(--spark), .8) 0 .8px, transparent 1.3px); background-size: 46px 26px, 19px 17px; animation: sigils 9s linear infinite; }
@keyframes sigils { to { background-position: 92px 0, -19px -17px; } }
/* finished: a seal of light pulses once in a while */
[data-theme="arcane"] .sbtn.finished.on::after { background-image: radial-gradient(circle at 50% 50%, rgba(var(--spark), .35), transparent 60%), radial-gradient(circle, rgba(255, 226, 150, .9) 0 .9px, transparent 1.4px); background-size: 100% 100%, 21px 18px; animation: seal 2.4s ease-in-out infinite, motes 3s linear infinite; }
@keyframes seal { 0%, 100% { background-size: 60% 60%, 21px 18px; background-position: center, 0 0; } 50% { background-size: 160% 160%, 21px 18px; background-position: center, 0 -9px; } }
/* dropped: no ring, just ash smoke curling up from a dimmed face */
[data-theme="arcane"] .sbtn.dropped.on::before { display: none; }
[data-theme="arcane"] .sbtn.dropped.on { border-color: #5a4f5c; box-shadow: none; text-shadow: none; }
[data-theme="arcane"] .sbtn.dropped.on::after { background-color: #17121a; background-image: radial-gradient(ellipse at 20% 110%, rgba(170, 160, 170, .35), transparent 55%), radial-gradient(ellipse at 70% 120%, rgba(150, 140, 155, .3), transparent 55%), radial-gradient(ellipse at 45% 130%, rgba(190, 180, 190, .25), transparent 50%); background-size: 100% 200%; animation: smoke 4s ease-in-out infinite; }
@keyframes smoke { 0% { background-position: 0 100%, 0 100%, 0 100%; } 100% { background-position: 6px 0, -8px 0, 3px 0; } }
/* frozen keeps its ice, with a frost-blue ring */
[data-theme="arcane"] .sbtn.frozen.on::after { background-color: rgba(70, 120, 170, .35); }
/* the moment you tap it: a flash of light bursting out */
[data-theme="arcane"] .sbtn.on.fresh { animation: cast .6s ease-out; }
@keyframes cast { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c) 90%, transparent); transform: scale(.95); } 40% { box-shadow: 0 0 0 10px color-mix(in srgb, var(--c) 0%, transparent), 0 0 30px var(--c); transform: scale(1.04); } 100% { transform: none; } }
[data-theme="arcane"] .sbtn.frozen.on.fresh { animation: crack .45s ease-out, cast .6s ease-out; }
/* status tags on covers glow faintly in their colour */
[data-theme="arcane"] .badge-status { background: rgba(20, 14, 26, .85); box-shadow: 0 0 10px color-mix(in srgb, currentColor 35%, transparent), inset 0 0 0 1px color-mix(in srgb, currentColor 45%, transparent); }
[data-theme="arcane"] .s-backlog { color: var(--frost); } [data-theme="arcane"] .s-frozen { color: #d6f4ff; }
@media (prefers-reduced-motion: reduce) { [data-theme="arcane"] .sbtn.on::before, [data-theme="arcane"] .sbtn.on::after { animation: none; } }
