:root {
  --bg: #07060a;
  --card: #120f17;
  --line: #2a2331;
  --text: #f4efe6;
  --muted: #9a90a6;
  --pumpkin: #ff6a13;
  --slime: #24dfa5;
  --blood: #e5323b;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 16px/1.5 Inter, system-ui, sans-serif; min-height: 100vh; overflow-x: hidden; }
a { color: var(--slime); }
.fog {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(60% 40% at 50% -5%, rgba(255, 106, 19, .28), transparent 70%),
    radial-gradient(50% 35% at 100% 100%, rgba(36, 223, 165, .12), transparent 70%);
}
main { position: relative; z-index: 1; max-width: 520px; margin: 0 auto; padding: 28px 16px 48px; }
header { text-align: center; margin-bottom: 20px; }
.eyebrow { display: inline-block; margin: 0 0 6px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 99px;
  font-size: 12px; letter-spacing: .04em; color: var(--muted); }
h1 { font: 400 76px/1 Creepster, Inter, cursive; margin: 6px 0 8px; color: var(--pumpkin);
  text-shadow: 0 0 24px rgba(255, 106, 19, .45), 0 3px 0 #5a1c00; letter-spacing: .02em; }
.lead { margin: 0; color: var(--muted); font-size: 17px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px; margin: 14px 0; }
h2 { font-size: 16px; font-weight: 800; margin: 0 0 12px; display: flex; align-items: center; gap: 10px; }
.n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--pumpkin); color: #140700; font-size: 13px; }
.drop { border: 1.5px dashed var(--line); border-radius: 14px; min-height: 180px; display: grid; place-items: center;
  text-align: center; color: var(--muted); overflow: hidden; margin-bottom: 12px; }
.drop .big { font-size: 40px; }
.drop p { margin: 4px 16px; font-size: 14px; }
#preview { width: 100%; max-height: 320px; object-fit: contain; display: block; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }
.btn { appearance: none; border: 0; border-radius: 14px; padding: 14px 16px; font: 700 16px Inter, sans-serif; cursor: pointer;
  text-align: center; text-decoration: none; display: inline-block; color: var(--text); }
.btn.primary { background: var(--pumpkin); color: #140700; width: 100%; font-size: 18px; box-shadow: 0 6px 24px rgba(255, 106, 19, .35); }
.btn.primary:disabled { opacity: .35; box-shadow: none; cursor: not-allowed; }
.btn.ghost { background: #1c1722; border: 1px solid var(--line); }
.btn.small { padding: 10px 12px; font-size: 14px; flex: 0 0 auto; }
.btn.wide { width: 100%; margin-top: 10px; }
.looks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.look { position: relative; border: 2px solid var(--line); border-radius: 14px; overflow: hidden; aspect-ratio: 3 / 4;
  background: #1c1722 center / cover no-repeat; cursor: pointer; padding: 0; color: var(--text); }
.look span { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 6px 6px; font: 700 13px Inter, sans-serif;
  background: linear-gradient(transparent, rgba(0, 0, 0, .85)); }
.look .emo { position: absolute; top: 6px; left: 8px; font-size: 18px; }
.look[aria-pressed="true"] { border-color: var(--slime); box-shadow: 0 0 0 3px rgba(36, 223, 165, .25); }
.meta { color: var(--muted); font-size: 13px; margin: 10px 0 0; text-align: center; }
details { margin-top: 10px; }
summary { color: var(--muted); font-size: 14px; cursor: pointer; text-align: center; }
details .row { margin-top: 10px; }
input#code { background: #0c0a10; border: 1px solid var(--line); border-radius: 12px; color: var(--text); padding: 10px 12px;
  font: 600 16px Inter, sans-serif; text-transform: uppercase; min-width: 0; }
#wait { text-align: center; padding: 28px 16px; }
.waitmsg { font: 400 28px/1.2 Creepster, cursive; color: var(--slime); margin: 16px 0 0; letter-spacing: .03em;
  animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }
.candle { width: 18px; height: 54px; margin: 0 auto; background: #e9e0cf; border-radius: 4px; position: relative; }
.candle span { position: absolute; left: 50%; top: -26px; width: 14px; height: 24px; margin-left: -7px;
  background: radial-gradient(circle at 50% 70%, #fff6c8, #ffb02e 45%, rgba(255, 106, 19, 0) 70%);
  border-radius: 50% 50% 40% 40%; animation: flicker .18s infinite alternate; }
@keyframes flicker { to { transform: scale(.9, 1.08) rotate(3deg); opacity: .85; } }
#result img { width: 100%; border-radius: 12px; display: block; margin-bottom: 12px; }
.err { background: rgba(229, 50, 59, .12); border: 1px solid rgba(229, 50, 59, .5); color: #ffb3b6; border-radius: 12px;
  padding: 12px 14px; font-size: 14px; }
footer { text-align: center; color: var(--muted); font-size: 12px; margin-top: 28px; }
footer p { margin: 4px 0; }
.shake { animation: shake .5s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@media (max-width: 380px) { h1 { font-size: 62px; } .looks { gap: 8px; } }
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: #0c0a10; border: 1px solid var(--line);
  border-radius: 12px; padding: 4px; margin-bottom: 14px; }
.tabs button { appearance: none; border: 0; background: none; color: var(--muted); font: 700 14px Inter, sans-serif;
  padding: 9px 4px; border-radius: 9px; cursor: pointer; }
.tabs button[aria-selected="true"] { background: #231c2b; color: var(--text); box-shadow: inset 0 -2px 0 var(--slime); }
.pane { margin-bottom: 14px; }
.pane .meta { text-align: left; }
.pool { margin: 0 0 8px; font-size: 15px; }
.pool b { font-size: 22px; color: var(--slime); }
.bar { height: 8px; border-radius: 99px; background: #0c0a10; border: 1px solid var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--pumpkin), var(--slime));
  transition: width .6s; }
input#key { background: #0c0a10; border: 1px solid var(--line); border-radius: 12px; color: var(--text); padding: 10px 12px;
  font: 600 16px Inter, sans-serif; min-width: 0; }
.meta.ok { color: var(--slime); }
.meta.bad { color: #ffb3b6; }
.meta.inline { display: inline; margin: 0 0 0 auto; font-weight: 400; }
.histList { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.histList a { display: block; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; border: 1px solid var(--line);
  background: #1c1722 center / cover no-repeat; }
