:root {
  --night: #0b0b2e;
  --night2: #1d0f45;
  --ice: #9ffcff;
  --lilac: #c58bff;
  --pink: #ff8bd8;
  --holo: linear-gradient(100deg, #9ffcff 0%, #e6c6ff 30%, #ffb1e6 55%, #c8f7ff 80%, #e6c6ff 100%);
  --edge: linear-gradient(135deg, #7af7ff, #c58bff 50%, #ff8bd8);
  --panel: linear-gradient(160deg, rgba(40, 20, 100, 0.72), rgba(10, 6, 34, 0.82));
  --panel-line: rgba(210, 160, 255, 0.55);
  --silver: linear-gradient(100deg, #ffffff 0%, #dfe6ff 25%, #b9c6ef 45%, #ffffff 55%, #e7dcff 75%, #ffffff 100%);
  --text: #f4f0ff;
  --muted: #b9b0e6;
  --r: 28px;
  --font: 'Fredoka', ui-rounded, system-ui, sans-serif;
  --script: 'Pacifico', cursive;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  background:
    radial-gradient(60% 55% at 42% 55%, rgba(6, 4, 24, 0.55), transparent 75%),
    url(art/bg.jpg) center / cover no-repeat,
    var(--night);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  user-select: none;
  cursor: default;
}
button { font: inherit; color: inherit; cursor: pointer; }
.hidden { display: none !important; }

/* ---------- sky ---------- */
.sky { position: fixed; inset: 0; overflow: hidden; z-index: 0; }
.aurora {
  position: absolute; width: 70vw; height: 50vh; border-radius: 50%;
  filter: blur(80px); mix-blend-mode: screen; opacity: 0.28;
  animation: drift 22s ease-in-out infinite alternate;
}
.a1 { background: radial-gradient(closest-side, #29ffc6, transparent); left: -15vw; top: -12vh; transform: rotate(-18deg); }
.a2 { background: radial-gradient(closest-side, #b65cff, transparent); right: -10vw; top: -8vh; animation-duration: 28s; animation-delay: -8s; }
.a3 { background: radial-gradient(closest-side, #ff6fcf, transparent); left: 25vw; top: 6vh; width: 50vw; height: 30vh; opacity: 0.35; animation-duration: 34s; }
@keyframes drift {
  0% { transform: translate(0, 0) rotate(-14deg) scale(1); }
  50% { transform: translate(6vw, 4vh) rotate(-4deg) scale(1.15); }
  100% { transform: translate(-4vw, 2vh) rotate(-20deg) scale(0.95); }
}
.hang { position: fixed; top: -2vh; height: 34vh; z-index: 1; pointer-events: none; transform-origin: 50% 0; animation: sway 7s ease-in-out infinite alternate; filter: drop-shadow(0 0 18px rgba(170, 200, 255, 0.7)); }
.hang-l { left: 0.5vw; }
.hang-r { right: calc(24vw + 3vw); height: 26vh; animation-delay: -3s; transform: scaleX(-1); opacity: 0.9; }
@keyframes sway { from { rotate: -3deg; } to { rotate: 3deg; } }
#snow { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
#burst { position: fixed; inset: 0; z-index: 60; pointer-events: none; }

/* ---------- layout ---------- */
.app {
  position: relative; z-index: 2; height: 100vh;
  display: grid;
  grid-template-columns: 1fr minmax(300px, 24vw);
  grid-template-rows: auto 1fr;
  grid-template-areas: 'head stash' 'stage stash';
  gap: 1.4vh 2vw;
  padding: 2vh 2vw 2.4vh;
}

.masthead { grid-area: head; text-align: center; position: relative; }
.tiara { display: block; margin: 0 auto -0.4vh; height: clamp(36px, 5.5vh, 70px); filter: drop-shadow(0 0 14px rgba(170, 210, 255, 0.9)); animation: twinkle 3s ease-in-out infinite; }
@keyframes twinkle { 50% { filter: drop-shadow(0 0 26px rgba(220, 170, 255, 1)) brightness(1.15); } }
.title { line-height: 0.9; }
.title .kate {
  display: block; font-family: var(--script); font-size: clamp(34px, 5.4vh, 66px); line-height: 1.25;
  background: var(--holo); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.6)) drop-shadow(0 0 22px rgba(200, 140, 255, 0.9)) drop-shadow(0 2px 0 rgba(60, 20, 120, 0.8));
  animation: shimmer 6s linear infinite;
  transform: rotate(-4deg); margin: -0.2em 0 -0.15em;
  position: relative; z-index: 1;
}
.title .ww {
  display: inline-block; font-weight: 700; font-size: clamp(40px, 7.2vh, 92px); letter-spacing: 0.02em; text-transform: uppercase;
  background: var(--silver); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 18px rgba(170, 120, 255, 0.85)) drop-shadow(0 3px 0 rgba(60, 20, 120, 0.7));
  animation: shimmer 6s linear infinite;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.35);
}
@keyframes shimmer { to { background-position: -200% 0; } }
.ribbon {
  display: inline-block; margin-top: 0.6vh; padding: 0.3em 1.4em;
  font-weight: 600; letter-spacing: 0.32em; font-size: clamp(12px, 1.7vh, 20px);
  border: 1.5px solid var(--panel-line); border-radius: 999px; background: rgba(60, 40, 140, 0.45); backdrop-filter: blur(8px);
  color: #fff; box-shadow: 0 0 20px rgba(160, 100, 255, 0.35) inset, 0 0 24px rgba(160, 120, 255, 0.35);
}

/* ---------- stage ---------- */
.stage { grid-area: stage; display: flex; flex-direction: column; align-items: center; min-height: 0; gap: 1.6vh; }
.preview {
  position: relative; flex: 1; min-height: 0; aspect-ratio: 16 / 9; max-width: 100%;
  border-radius: var(--r); background: #000;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08), 0 0 40px rgba(190, 120, 255, 0.55), 0 0 100px rgba(80, 220, 255, 0.25);
}
.preview::before {
  content: ''; position: absolute; inset: 0; border-radius: var(--r); padding: 4px; z-index: 3; pointer-events: none;
  background: var(--edge); background-size: 200% 200%; animation: shimmer 5s linear infinite;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
#video { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: var(--r); }
.fili { position: absolute; width: clamp(90px, 13vh, 150px); z-index: 4; pointer-events: none; filter: drop-shadow(0 0 8px rgba(200, 220, 255, 0.9)); }
.fili.tl { left: -14px; top: -14px; }
.fili.tr { right: -14px; top: -14px; transform: scaleX(-1); }
.fili.bl { left: -14px; bottom: -14px; transform: scaleY(-1); }
.fili.br { right: -14px; bottom: -14px; transform: scale(-1, -1); }
#video.mirror { transform: scaleX(-1); }
.preview-glow { position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 80px rgba(120, 80, 255, 0.35); border-radius: var(--r); }
.live {
  position: absolute; top: 18px; left: 18px; z-index: 4;
  padding: 6px 14px; border-radius: 999px; background: rgba(10, 8, 30, 0.6); backdrop-filter: blur(6px);
  font-weight: 600; font-size: 15px; letter-spacing: 0.12em; display: flex; align-items: center; gap: 8px;
}
.live i { width: 10px; height: 10px; border-radius: 50%; background: #4dffa0; box-shadow: 0 0 10px #4dffa0; animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: 0.3; } }
.no-camera { position: absolute; inset: 0; z-index: 5; border-radius: var(--r); display: grid; place-content: center; text-align: center; gap: 10px; background: rgba(10, 6, 30, 0.85); }
.big { font-size: 64px; }

.countdown { position: absolute; inset: 0; display: grid; place-items: center; z-index: 6; pointer-events: none; }
.countdown span {
  font-weight: 700; font-size: min(40vh, 340px); line-height: 1;
  background: var(--holo); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 30px rgba(200, 140, 255, 0.95)) drop-shadow(0 8px 0 rgba(50, 10, 110, 0.6));
}
.countdown.go span { animation: count 1s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes count {
  0% { transform: scale(0.2) rotate(-25deg); opacity: 0; }
  35% { transform: scale(1.1) rotate(4deg); opacity: 1; }
  80% { transform: scale(1) rotate(0); opacity: 1; }
  100% { transform: scale(1.5); opacity: 0; }
}
.flash { position: absolute; inset: 0; border-radius: var(--r); background: #fff; opacity: 0; z-index: 7; pointer-events: none; }
.flash.go { animation: flash 0.7s ease-out; }
@keyframes flash { 0% { opacity: 1; } 100% { opacity: 0; } }

.snap-row { display: flex; flex-direction: column; align-items: center; gap: 10px; flex-shrink: 0; }
.snap {
  position: relative; width: clamp(120px, 16vh, 170px); aspect-ratio: 1; border: 0; padding: 0; background: none;
  display: grid; place-items: center; transition: transform 0.15s;
}
.snap-glow {
  position: absolute; inset: -10%; border-radius: 50%;
  background: conic-gradient(from 0deg, #7af7ff, #c58bff, #ff8bd8, #b9c6ef, #7af7ff);
  filter: blur(18px); opacity: 0.85; animation: spin 6s linear infinite, pulse 2.4s ease-in-out infinite;
}
.snap-gem { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 40s linear infinite; filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.6)); }
.snap b {
  position: relative; font-size: clamp(24px, 3.4vh, 38px); font-weight: 700; letter-spacing: 0.02em; color: #fff;
  text-shadow: 0 0 6px rgba(80, 30, 160, 1), 0 0 16px rgba(80, 30, 160, 1), 0 3px 0 rgba(60, 10, 120, 0.9);
}
.snap:hover { transform: scale(1.06); }
.snap:active, .snap.pressed { transform: scale(0.9); }
@keyframes spin { to { rotate: 360deg; } }
@keyframes pulse { 50% { opacity: 1; filter: blur(26px); } }
.hint { color: var(--muted); font-size: 16px; letter-spacing: 0.08em; }
kbd {
  font-family: var(--font); font-weight: 600; padding: 3px 12px; border-radius: 8px; margin: 0 4px;
  background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.3); box-shadow: 0 3px 0 rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* ---------- Snow Stash ---------- */
.stash {
  grid-area: stash; position: relative; min-height: 0; display: flex; flex-direction: column;
  background: var(--panel); border: 1.5px solid var(--panel-line); border-radius: var(--r);
  backdrop-filter: blur(18px) saturate(1.3); box-shadow: 0 0 40px rgba(130, 80, 255, 0.35), inset 0 0 40px rgba(220, 210, 255, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  padding: 34px 14px 14px;
}
.icicles {
  position: absolute; left: 10px; right: 10px; top: -4px; height: 34px; pointer-events: none;
  background:
    radial-gradient(ellipse 14px 30px at 8% 0, rgba(240, 250, 255, 0.95) 45%, transparent 50%),
    radial-gradient(ellipse 10px 20px at 18% 0, rgba(240, 250, 255, 0.9) 45%, transparent 50%),
    radial-gradient(ellipse 12px 34px at 31% 0, rgba(240, 250, 255, 0.95) 45%, transparent 50%),
    radial-gradient(ellipse 9px 18px at 44% 0, rgba(240, 250, 255, 0.85) 45%, transparent 50%),
    radial-gradient(ellipse 14px 28px at 57% 0, rgba(240, 250, 255, 0.95) 45%, transparent 50%),
    radial-gradient(ellipse 10px 22px at 70% 0, rgba(240, 250, 255, 0.9) 45%, transparent 50%),
    radial-gradient(ellipse 13px 32px at 83% 0, rgba(240, 250, 255, 0.95) 45%, transparent 50%),
    radial-gradient(ellipse 9px 18px at 94% 0, rgba(240, 250, 255, 0.85) 45%, transparent 50%),
    linear-gradient(rgba(240, 250, 255, 0.95) 6px, transparent 6px);
  filter: drop-shadow(0 0 6px rgba(160, 220, 255, 0.8));
}
.stash h2 {
  margin: 0 0 12px; text-align: center; font-family: var(--script); font-weight: 400; font-size: clamp(26px, 3.6vh, 40px);
  background: var(--holo); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 12px rgba(200, 140, 255, 0.8)); animation: shimmer 6s linear infinite;
}
.stash-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 4px; scrollbar-width: thin; scrollbar-color: rgba(200, 160, 255, 0.5) transparent; }
.stash-empty { margin: auto; text-align: center; color: var(--muted); padding: 20px; }

.shot {
  border-radius: 18px; padding: 8px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(220, 200, 255, 0.22);
  cursor: pointer; transition: transform 0.15s, border-color 0.15s;
}
.shot:hover { transform: translateY(-2px); border-color: rgba(220, 200, 255, 0.6); }
.shot.new { animation: dropin 0.7s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes dropin { from { transform: translateY(-40px) scale(0.8) rotate(-4deg); opacity: 0; } }
.shot-hero { position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 9; }
.shot-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.count {
  position: absolute; right: 8px; bottom: 8px; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 999px;
  display: grid; place-items: center; font-weight: 600; font-size: 14px; background: rgba(20, 10, 50, 0.75); border: 1px solid rgba(255, 255, 255, 0.3);
}
.shot-versions { display: flex; gap: 6px; margin-top: 8px; overflow-x: auto; scrollbar-width: none; }
.v { position: relative; flex: 0 0 auto; width: 54px; height: 54px; border-radius: 10px; overflow: hidden; border: 1.5px solid rgba(255, 255, 255, 0.2); }
.v img { width: 100%; height: 100%; object-fit: cover; }
.v.working img, .v.queued img { filter: blur(3px) saturate(0.6) brightness(0.6); }
.v .ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.v.error img { filter: grayscale(1) brightness(0.5); }
.v .err { position: absolute; inset: 0; display: grid; place-items: center; color: #ff9db0; font-size: 22px; }
.ring .track { fill: none; stroke: rgba(255, 255, 255, 0.2); stroke-width: 5; }
.ring .bar { fill: none; stroke: url(#rg); stroke-width: 5; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dashoffset 0.5s linear; }
.ring text { font-size: 20px; fill: #fff; }
.working { margin-top: 6px; font-size: 13px; color: var(--muted); animation: blink 1.8s infinite; }

/* ---------- modals ---------- */
.modal {
  position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 3vh 3vw;
  background: rgba(8, 4, 28, 0.7); backdrop-filter: blur(10px);
  animation: fade 0.25s;
}
@keyframes fade { from { opacity: 0; } }
.sheet {
  position: relative; max-width: 100%; max-height: 100%;
  background: linear-gradient(160deg, rgba(70, 50, 160, 0.82), rgba(24, 16, 70, 0.9));
  backdrop-filter: blur(20px) saturate(1.3);
  border: 1.5px solid var(--panel-line); border-radius: 32px; padding: 28px;
  box-shadow: 0 0 60px rgba(160, 100, 255, 0.5), 0 30px 80px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 0 50px rgba(200, 190, 255, 0.12);
  animation: pop 0.45s cubic-bezier(.2, 1.4, .4, 1);
}
@keyframes pop { from { transform: scale(0.85) translateY(30px); opacity: 0; } }
.sheet h3 { margin: 0 0 12px; font-family: var(--script); font-weight: 400; font-size: 34px; color: #fff; text-shadow: 0 0 18px rgba(200, 140, 255, 0.9); }
.sub { margin: -4px 0 14px; color: var(--muted); }
.close { position: absolute; top: 14px; right: 16px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--panel-line); background: rgba(255, 255, 255, 0.08); font-size: 18px; z-index: 2; }

.pill {
  border: 0; border-radius: 999px; padding: 14px 26px; font-weight: 600; font-size: 19px;
  background: rgba(255, 255, 255, 0.1); border: 1.5px solid rgba(255, 255, 255, 0.25); transition: transform 0.12s, filter 0.12s;
}
.pill:hover { transform: translateY(-2px); filter: brightness(1.1); }
.pill:active { transform: scale(0.96); }
.pill.primary { background: linear-gradient(120deg, #ff7fd4, #b04cff 55%, #5fb8ff); border-color: transparent; box-shadow: 0 0 26px rgba(220, 110, 255, 0.7); }
.pill.small { padding: 10px 18px; font-size: 16px; }
.pill.danger { color: #ffb3c4; }

/* review */
.review-sheet { width: min(1600px, 96vw); max-height: 94vh; display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; }
.review-left { justify-content: center; }
.review-left, .review-right { min-width: 0; display: flex; flex-direction: column; }
.review-canvas { width: 100%; aspect-ratio: 16 / 9; border-radius: 20px; box-shadow: 0 0 30px rgba(190, 120, 255, 0.5); background: #000; }
.frame-label { margin: 14px 0 8px; color: var(--muted); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; font-size: 13px; }
.frames { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.chip { padding: 5px; border-radius: 14px; border: 2px solid transparent; background: rgba(255, 255, 255, 0.07); display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 500; white-space: nowrap; }
.chip canvas { width: 100%; aspect-ratio: 16 / 9; border-radius: 9px; display: block; }
.chip.on { border-color: #ff9fe0; background: rgba(255, 140, 220, 0.18); box-shadow: 0 0 18px rgba(255, 140, 220, 0.5); }
.existing .frame-label, .existing .frames { display: none; }

.effects { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; align-content: start; padding: 2px; }
.effect {
  position: relative; text-align: left; padding: 12px 12px 12px; border-radius: 18px; border: 2px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06); display: flex; flex-direction: column; gap: 2px; transition: transform 0.12s, background 0.12s;
}
.effect:hover { transform: translateY(-2px); background: rgba(255, 255, 255, 0.1); }
.effect .icon { width: 60px; height: 60px; margin: -4px 0 2px -4px; filter: drop-shadow(0 0 8px rgba(200, 170, 255, 0.6)); transition: transform 0.2s cubic-bezier(.2, 1.6, .4, 1); }
.effect.on .icon, .effect:hover .icon { transform: scale(1.12) rotate(-6deg); }
.effect b { font-size: 17px; font-weight: 600; }
.effect small { color: var(--muted); font-size: 13px; line-height: 1.25; }
.effect .tick {
  position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 700;
  background: linear-gradient(120deg, #ff7fd4, #b04cff); opacity: 0; transform: scale(0.3); transition: 0.2s cubic-bezier(.2, 1.6, .4, 1);
}
.effect.on { border-color: #ff9fe0; background: rgba(255, 140, 220, 0.2); box-shadow: 0 0 20px rgba(255, 140, 220, 0.45); }
.effect.on .tick { opacity: 1; transform: scale(1); }
.effect.done { opacity: 0.4; cursor: default; }
.review-actions { display: flex; gap: 12px; margin-top: 18px; justify-content: flex-end; }
.review-actions .primary { flex: 1; font-size: 22px; }

/* viewer */
.viewer-sheet { width: min(1500px, 94vw); height: min(92vh, 1000px); display: flex; flex-direction: column; gap: 16px; padding: 22px; }
.viewer-main { flex: 1; min-height: 0; display: flex; align-items: center; gap: 10px; }
.viewer-img-wrap { position: relative; flex: 1; height: 100%; display: grid; place-items: center; min-width: 0; }
.viewer-img-wrap img { max-width: 100%; max-height: calc(min(92vh, 1000px) - 230px); border-radius: 20px; box-shadow: 0 0 40px rgba(190, 120, 255, 0.55); }
.viewer-img-wrap.pending img { filter: blur(10px) brightness(0.7); }
.viewer-img-wrap.pending::after {
  content: attr(data-label); position: absolute; padding: 14px 26px; border-radius: 999px; background: rgba(20, 10, 50, 0.8);
  font-size: 22px; font-weight: 600; border: 1px solid var(--panel-line); animation: blink 2s infinite;
}
.nav { width: 56px; height: 56px; border-radius: 50%; border: 1px solid var(--panel-line); background: rgba(255, 255, 255, 0.08); font-size: 34px; line-height: 1; flex-shrink: 0; }
.viewer-bottom { display: flex; gap: 18px; align-items: center; }
.viewer-strip { flex: 1; display: flex; gap: 10px; overflow-x: auto; padding: 4px; }
.vthumb { position: relative; flex: 0 0 auto; width: 150px; padding: 5px; border-radius: 14px; border: 2px solid transparent; background: rgba(255, 255, 255, 0.07); display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.vthumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 9px; }
.vthumb.working img, .vthumb.queued img { filter: blur(3px) brightness(0.6); }
.vthumb.error img { filter: grayscale(1) brightness(0.5); }
.vthumb .ring { position: absolute; top: 12px; left: 50%; width: 56px; translate: -50% 0; }
.vthumb.on { border-color: #ff9fe0; box-shadow: 0 0 16px rgba(255, 140, 220, 0.5); }
.viewer-side { display: grid; grid-template-columns: auto auto; gap: 8px 14px; align-items: center; }
.qr { width: 120px; height: 120px; background: #fff; border-radius: 12px; padding: 4px; grid-row: span 2; }
.qr svg { width: 100%; height: 100%; display: block; }
.qr-text { font-weight: 600; font-size: 16px; }
.viewer-side .pill { grid-column: 2; }

/* settings */
.gear { position: fixed; right: 10px; bottom: 8px; z-index: 30; border: 0; background: none; color: rgba(255, 255, 255, 0.22); font-size: 20px; }
.gear:hover { color: #fff; }
.settings-sheet { width: min(560px, 92vw); display: flex; flex-direction: column; gap: 14px; user-select: text; }
.settings-sheet label { display: flex; flex-direction: column; gap: 6px; font-weight: 500; }
.settings-sheet label.row { flex-direction: row; align-items: center; gap: 10px; }
.settings-sheet select { font: inherit; padding: 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.1); color: #fff; border: 1px solid var(--panel-line); }
.settings-sheet select option { color: #000; }
.settings-sheet input[type='checkbox'] { width: 20px; height: 20px; accent-color: #c58bff; }
.status { color: var(--muted); font-size: 14px; line-height: 1.5; margin: 6px 0 0; }
code { background: rgba(255, 255, 255, 0.1); padding: 1px 6px; border-radius: 6px; }

/* toasts */
.toasts { position: fixed; left: 50%; bottom: 3vh; translate: -50% 0; z-index: 50; display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 12px; padding: 10px 22px 10px 10px; border-radius: 999px; font-size: 19px;
  background: linear-gradient(120deg, rgba(80, 30, 160, 0.95), rgba(40, 20, 100, 0.95)); border: 1.5px solid var(--panel-line);
  box-shadow: 0 0 30px rgba(190, 120, 255, 0.6); animation: toastin 0.5s cubic-bezier(.2, 1.5, .4, 1);
}
.toast:not(:has(img)) { padding-left: 22px; }
.toast img { width: 64px; height: 40px; object-fit: cover; border-radius: 999px; }
.toast.out { transition: 0.5s; opacity: 0; translate: 0 20px; }
@keyframes toastin { from { translate: 0 40px; opacity: 0; scale: 0.8; } }

@media (max-width: 1100px) {
  .review-sheet { grid-template-columns: 1fr; overflow-y: auto; }
  .effects { grid-template-columns: repeat(2, 1fr); }
}

.locked-sheet { text-align: center; max-width: 520px; }
.locked-gem { width: 140px; animation: spin 30s linear infinite; }

.masthead { display: grid; place-items: center; z-index: 5; }
.masthead::before { content: ''; position: absolute; left: 50%; top: 50%; width: min(70%, 900px); height: 120%; translate: -50% -50%; border-radius: 50%; background: radial-gradient(closest-side, rgba(8, 4, 30, 0.85), rgba(8, 4, 30, 0.5) 55%, transparent); pointer-events: none; }
.title-img {
  height: clamp(150px, 25vh, 290px); width: auto; display: block; margin: -1.5vh auto -3vh; position: relative; z-index: 5;
  filter: drop-shadow(0 0 22px rgba(220, 120, 255, 0.55)) drop-shadow(0 0 50px rgba(90, 200, 255, 0.3));
  animation: titleFloat 5s ease-in-out infinite;
}
@keyframes titleFloat {
  0%, 100% { transform: translateY(0) rotate(-0.4deg); filter: drop-shadow(0 0 22px rgba(220, 120, 255, 0.55)) drop-shadow(0 0 50px rgba(90, 200, 255, 0.3)); }
  50% { transform: translateY(-6px) rotate(0.4deg); filter: drop-shadow(0 0 30px rgba(255, 140, 230, 0.8)) drop-shadow(0 0 70px rgba(90, 220, 255, 0.5)) brightness(1.08); }
}
.stash { border-width: 2px; box-shadow: 0 0 30px rgba(200, 100, 255, 0.55), 0 0 80px rgba(80, 200, 255, 0.2), inset 0 0 40px rgba(160, 100, 255, 0.15); }
.stash h2 { font-size: clamp(30px, 4vh, 44px); filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5)) drop-shadow(0 0 22px rgba(220, 120, 255, 0.95)); }
.sheet { background: linear-gradient(160deg, rgba(46, 22, 110, 0.92), rgba(10, 6, 34, 0.95)); border: 2px solid var(--panel-line); }
.effect { background: rgba(255, 255, 255, 0.05); border-color: rgba(210, 170, 255, 0.25); }
.effect.on { border-color: #ff7fd4; background: linear-gradient(140deg, rgba(255, 110, 210, 0.3), rgba(120, 90, 255, 0.25)); box-shadow: 0 0 24px rgba(255, 110, 210, 0.6); }
.preview { box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12), 0 0 40px rgba(220, 100, 255, 0.75), 0 0 110px rgba(60, 220, 255, 0.4); }
