.appearance-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font: inherit;
  color: var(--text);
}
.appearance-trigger svg { width: 16px; height: 16px; color: #7dd3fc; }
.appearance-trigger[aria-expanded="true"] {
  border-color: rgba(125, 211, 252, 0.55);
  box-shadow: 0 0 24px var(--glow), inset 0 1px 0 rgba(255,255,255,0.15);
}
.appearance-panel {
  position: fixed;
  z-index: 60;
  top: 72px;
  right: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100dvh - 88px);
  overflow-y: auto;
  padding: 10px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 16px;
  background: rgba(7, 11, 24, 0.9);
  backdrop-filter: blur(28px) saturate(145%);
  -webkit-backdrop-filter: blur(28px) saturate(145%);
  box-shadow: 0 24px 70px rgba(0,0,0,0.52), inset 0 1px 0 rgba(255,255,255,0.1);
  transform-origin: 100% 0;
  animation: panel-in 0.2s ease both;
}
.appearance-panel[hidden] { display: none; }
@keyframes panel-in {
  from { opacity: 0; transform: translateY(-8px) scale(0.97); }
  to { opacity: 1; transform: none; }
}
.appearance-head { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; }
.appearance-head strong { font-size: 13px; letter-spacing: 0.04em; }
.appearance-head span { color: var(--muted); font-size: 10px; }
.appearance-group + .appearance-group { margin-top: 0; }
.appearance-group.wide { grid-column: 1 / -1; }
.appearance-group h3 {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.12em;
}
.choice-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
#skinChoices { grid-template-columns: repeat(4, minmax(0, 1fr)); }
#trailChoices { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.choice {
  min-width: 0;
  padding: 5px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: var(--muted);
  background: rgba(255,255,255,0.035);
  cursor: pointer;
  font: inherit;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.choice:hover { transform: translateY(-2px); border-color: rgba(255,255,255,0.28); }
.choice[aria-pressed="true"] {
  color: var(--text);
  border-color: rgba(125,211,252,0.9);
  background: rgba(125,211,252,0.1);
  box-shadow: 0 0 18px rgba(56,189,248,0.14);
}
.choice b { display: block; margin-top: 5px; overflow: hidden; font-size: 12px; font-weight: 600; text-overflow: ellipsis; }
.skin-swatch {
  display: block;
  height: 18px;
  border-radius: 6px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.28), inset 0 0 0 1px rgba(255,255,255,0.08);
}
.choice[data-value="auto"] .skin-swatch {
  position: relative; overflow: hidden;
  background:
    radial-gradient(circle at 88% 28%, #e7f2ff 0 1px, transparent 1.5px),
    radial-gradient(circle at 62% 76%, #a7c6e8 0 1px, transparent 1.5px),
    linear-gradient(112deg, #f8eed8 0 48%, #192947 49% 100%);
}
.choice[data-value="auto"] .skin-swatch::before {
  content: ""; position: absolute; left: 24%; top: 50%; width: 14px; height: 14px;
  border-radius: 50%; background: #edb44b; transform: translate(-50%, -50%);
  box-shadow: 0 0 0 3px rgba(237, 180, 75, .2), 0 0 12px rgba(237, 180, 75, .35);
}
.choice[data-value="auto"] .skin-swatch::after {
  content: ""; position: absolute; left: 78%; top: 38%; width: 16px; height: 16px;
  border-radius: 50%; transform: translate(-50%, -50%);
  box-shadow: -5px 3px 0 0 #e7f2ff;
}
.choice[data-value="aurora"] .skin-swatch { background: radial-gradient(circle at 25% 20%, #22d3ee, transparent 42%), radial-gradient(circle at 80% 75%, #a855f7, transparent 48%), #07101f; }
.choice[data-value="cyber"] .skin-swatch { background: linear-gradient(135deg, transparent 38%, rgba(57,255,140,.8) 39% 42%, transparent 43%), radial-gradient(circle at 78% 34%, #ff2eb6, transparent 28%), #010704; }
.choice[data-value="ember"] .skin-swatch { background: radial-gradient(circle at 52% 80%, #ff5a2a, transparent 48%), radial-gradient(circle at 20% 15%, #ffcf58, transparent 34%), #190704; }
.choice[data-value="paper"] .skin-swatch { background: repeating-linear-gradient(8deg, rgba(90,70,40,.08) 0 1px, transparent 1px 7px), radial-gradient(circle at 75% 22%, #d6a66c, transparent 36%), #efe4cc; }
.choice[data-value="nebula"] .skin-swatch { background: radial-gradient(circle at 72% 24%, #f0abfc 0 2%, transparent 3%), radial-gradient(circle at 68% 40%, #7c3aed, transparent 36%), radial-gradient(circle at 22% 70%, #2563eb, transparent 42%), #05051a; }
.choice[data-value="prism"] .skin-swatch { background: conic-gradient(from 210deg at 52% 48%, #07111f, #0ea5e9, #8b5cf6, #ec4899, #07111f); }
.choice[data-value="obsidian"] .skin-swatch { background: radial-gradient(circle at 70% 28%, #eabf67, transparent 22%), linear-gradient(145deg, #252019, #050505 58%, #3a2b15); }
.choice[data-value="abyss"] .skin-swatch { background: radial-gradient(circle at 20% 26%, #67e8f9, transparent 24%), radial-gradient(circle at 76% 74%, #14b8a6, transparent 34%), linear-gradient(160deg, #06283c, #010811); }
.choice[data-value="snow"] .skin-swatch { background: radial-gradient(circle at 25% 20%, #dbe7f7, transparent 46%), radial-gradient(circle at 78% 76%, #d3c9ec, transparent 50%), #f4f7fb; }
.choice[data-value="sakura"] .skin-swatch { background: radial-gradient(circle at 25% 20%, #ffd7e6, transparent 46%), radial-gradient(circle at 78% 76%, #ffe4d1, transparent 50%), #fdf1f5; }
.choice[data-value="celadon"] .skin-swatch { background: radial-gradient(circle at 25% 20%, #cdeade, transparent 46%), radial-gradient(circle at 78% 76%, #d2ecf4, transparent 50%), #f0f7f3; }

.choice[data-value="shuimo"] .skin-swatch { background: url("../themes/shuimo.svg?v=svg2") center 55% / cover; }
.choice[data-value="daiqing"] .skin-swatch { background: url("../themes/daiqing.svg?v=svg2") center 55% / cover; }
.choice[data-value="zhusha"] .skin-swatch { background: url("../themes/zhusha.svg?v=svg2") center 55% / cover; }
.choice[data-value="yemo"] .skin-swatch { background: url("../themes/yemo.svg?v=svg2") center 55% / cover; }

.icon-swatch {
  position: relative;
  display: grid;
  width: 24px;
  height: 24px;
  margin: auto;
  place-items: center;
  border-radius: 7px;
  color: #fff;
  background: linear-gradient(145deg, #0ea5e9, #6d28d9);
  box-shadow: 0 0 14px rgba(56,189,248,0.25), inset 0 1px 0 rgba(255,255,255,0.35);
  font-size: 12px;
  font-weight: 800;
}
.choice[data-value="letter"] .icon-swatch { background: linear-gradient(145deg, #2563eb, #312e81); }
.choice[data-value="glass"] .icon-swatch { background: linear-gradient(145deg, rgba(255,255,255,.38), rgba(56,189,248,.15)); border: 1px solid rgba(255,255,255,.5); backdrop-filter: blur(5px); }
.choice[data-value="neon"] .icon-swatch { border-radius: 50%; background: #07101f; box-shadow: 0 0 4px #22d3ee, 0 0 13px #a855f7, inset 0 0 8px #22d3ee; }
.choice[data-value="gem"] .icon-swatch { transform: rotate(45deg) scale(.75); border-radius: 8px; }
.choice[data-value="gem"] .icon-swatch i { transform: rotate(-45deg); }
.choice[data-value="holo"] .icon-swatch { background: linear-gradient(135deg, #67e8f9, #818cf8 45%, #f0abfc); clip-path: polygon(12% 0,88% 0,100% 25%,78% 100%,22% 100%,0 25%); }
.choice[data-value="mono"] .icon-swatch { color: #dce7f7; background: transparent; border: 1px solid #8fa0c4; box-shadow: inset 0 0 0 3px rgba(143,160,196,.08); }
.choice[data-value="pixel"] .icon-swatch { border-radius: 2px; background: #06120d; border: 2px solid #39ff8c; box-shadow: 4px 4px 0 rgba(255,46,182,.65); font-family: Consolas, monospace; }
.choice[data-value="outline"] .icon-swatch { background: #0f172a; border: 1px dashed #7dd3fc; box-shadow: inset 0 0 0 3px rgba(125,211,252,.12); }
.choice[data-value="halo"] .icon-swatch { border-radius: 50%; background: radial-gradient(circle at 50% 50%, #22d3ee, #312e81); box-shadow: 0 0 8px #a78bfa, inset 0 0 0 3px rgba(147,197,253,.35); }
.choice[data-value="frame"] .icon-swatch { background: linear-gradient(145deg, rgba(56,189,248,.95), rgba(37,99,235,.65)); clip-path: inset(0 round 4px); }
.choice[data-value="badge"] .icon-swatch { color: #fef3c7; background: radial-gradient(circle at 20% 20%, #fef08a, #f59e0b 45%, #0f172a 72%); box-shadow: 0 0 8px rgba(250,204,21,.5); }
.choice[data-value="ink"] .icon-swatch { color: #ecfccb; background: linear-gradient(165deg, #14532d, #052e16); box-shadow: inset 0 0 0 2px rgba(132,204,22,.45); }
.choice[data-value="grain"] .icon-swatch { background: repeating-linear-gradient(80deg, rgba(255,255,255,.35) 0 1px, rgba(15,23,42,.55) 1px 2px); }
.choice[data-value="mirror"] .icon-swatch { border-radius: 50%; background: linear-gradient(160deg, rgba(255,255,255,.8), rgba(255,255,255,.2) 40%, rgba(15,23,42,.25)); box-shadow: inset 0 0 0 4px rgba(255,255,255,.12), inset 0 -3px 5px rgba(15,23,42,.35); }
.choice[data-value="circuit"] .icon-swatch { background: linear-gradient(140deg, rgba(34,211,238,.7), rgba(56,189,248,.2)), repeating-linear-gradient(90deg, rgba(255,255,255,.24) 0 2px, rgba(15,23,42,.3) 2px 4px); box-shadow: inset 0 0 0 2px rgba(125,211,252,.35); }
.layout-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.layout-density { margin-top: 18px; padding: 14px; border: 1px solid var(--stroke); border-radius: 12px; background: rgba(255,255,255,.035); }
.layout-density-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.layout-density-head strong { font-size: 13px; }
.layout-density-head span { color: var(--muted); font-size: 12px; }
.layout-density-controls { display: inline-flex; margin-top: 12px; overflow: hidden; border: 1px solid var(--stroke); border-radius: 8px; }
.layout-density-controls button { min-width: 36px; height: 32px; padding: 0 9px; border: 0; border-left: 1px solid var(--stroke); background: transparent; color: var(--muted); font: 600 15px/1 ui-monospace, SFMono-Regular, Menlo, monospace; cursor: pointer; }
.layout-density-controls button:first-child { border-left: 0; }
.layout-density-controls button:hover { background: var(--glass); color: var(--text); }
.layout-density-controls button:disabled { opacity: .35; cursor: default; }
.layout-density-controls button:focus-visible { position: relative; outline: 2px solid var(--text); outline-offset: -2px; }
.layout-density-controls .layout-density-value { min-width: 56px; font-size: 11px; letter-spacing: .03em; }
.layout-density p { margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.layout-art { display: block; width: 66px; height: 44px; margin: auto; color: #34d399; }
.layout-art svg { width: 100%; height: 100%; }
.motion-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.layout-swatch {
  display: grid;
  width: 40px;
  height: 20px;
  margin: 1px auto 0;
  grid-template-columns: repeat(2, 1fr);
  gap: 3px;
}
.layout-swatch i {
  min-width: 0;
  border: 1px solid rgba(52,211,153,.55);
  border-radius: 3px;
  background: linear-gradient(145deg, rgba(52,211,153,.42), rgba(16,185,129,.18));
}
html:is([data-skin="paper"], [data-skin="snow"], [data-skin="sakura"], [data-skin="celadon"], [data-skin="shuimo"], [data-skin="daiqing"], [data-skin="zhusha"]) .layout-art { color: #047857; }
html:is([data-skin="paper"], [data-skin="snow"], [data-skin="sakura"], [data-skin="celadon"], [data-skin="shuimo"], [data-skin="daiqing"], [data-skin="zhusha"]) .layout-swatch i {
  border-color: rgba(4,120,87,.62);
  background: linear-gradient(145deg, rgba(4,120,87,.48), rgba(5,150,105,.2));
}
.choice[data-value="compact"] .layout-swatch { grid-template-columns: repeat(3, 1fr); gap: 2px; }
.choice[data-value="list"] .layout-swatch { grid-template-columns: 1fr; }
.motion-swatch {
  display: block;
  width: 64px;
  height: 56px;
  margin: auto;
}
.motion-swatch svg { display: block; width: 100%; height: 100%; overflow: visible; }
.motion-swatch .motion-anim { transform-box: fill-box; transform-origin: center; }
.motion-swatch .motion-swing { transform-box: view-box; transform-origin: 50% 14%; }
.choice:is(:hover, :focus-visible, [aria-pressed="true"]) .motion-lift { animation: motion-preview-float 1.4s ease-in-out infinite alternate; }
.choice:is(:hover, :focus-visible, [aria-pressed="true"]) .motion-breathe { animation: motion-preview-pulse 1.3s ease-in-out infinite alternate; }
.choice:is(:hover, :focus-visible, [aria-pressed="true"]) .motion-shine { animation: motion-preview-sweep 1.8s ease-in-out infinite; }
.choice:is(:hover, :focus-visible, [aria-pressed="true"]) .motion-swing { animation: motion-preview-sway 1.4s ease-in-out infinite; }
.choice:is(:hover, :focus-visible, [aria-pressed="true"]) .motion-ball { animation: motion-preview-bounce 1.2s ease-in-out infinite; }
.choice:is(:hover, :focus-visible, [aria-pressed="true"]) .motion-turn { animation: motion-preview-spin 2.4s ease-in-out infinite; }
.choice:is(:hover, :focus-visible, [aria-pressed="true"]) .motion-wave { animation: motion-preview-ripple 1.6s ease-out infinite; }
.choice:is(:hover, :focus-visible, [aria-pressed="true"]) .motion-wave-late { animation-delay: -.8s; }
.choice:is(:hover, :focus-visible, [aria-pressed="true"]) .motion-flip { animation: motion-preview-flip 1.6s ease-in-out infinite; }
.choice:is(:hover, :focus-visible, [aria-pressed="true"]) .motion-jitter { animation: motion-preview-shake .8s ease-in-out infinite; }
.choice:is(:hover, :focus-visible, [aria-pressed="true"]) .motion-focus { animation: motion-preview-zoom 1.2s ease-in-out infinite alternate; }
.choice:is(:hover, :focus-visible, [aria-pressed="true"]) .motion-glide { animation: motion-preview-slide 1.4s ease-in-out infinite; }
.choice:is(:hover, :focus-visible, [aria-pressed="true"]) .motion-twist { animation: motion-preview-twist 1.7s ease-in-out infinite; }
.choice:is(:hover, :focus-visible, [aria-pressed="true"]) .motion-flash { animation: motion-preview-blink 1.3s steps(1, end) infinite; }
.choice:is(:hover, :focus-visible, [aria-pressed="true"]) .motion-drift { animation: motion-preview-drift 2.3s ease-in-out infinite; }
.choice:is(:hover, :focus-visible, [aria-pressed="true"]) .motion-heart { animation: motion-preview-heart 1.15s ease-in-out infinite; }
@keyframes motion-preview-float { to { transform: translateY(-4px); } }
@keyframes motion-preview-pulse { to { transform: scale(1.12); opacity: .72; } }
@keyframes motion-preview-sweep {
  0%, 15% { transform: translateX(-9px); opacity: .25; }
  50% { opacity: 1; }
  85%, 100% { transform: translateX(12px); opacity: .25; }
}
@keyframes motion-preview-sway {
  0%, 70%, 100% { transform: rotate(0); }
  15% { transform: rotate(-15deg); }
  32% { transform: rotate(12deg); }
  50% { transform: rotate(-7deg); }
}
@keyframes motion-preview-bounce {
  0%, 65%, 100% { transform: translateY(0) scale(1); }
  12% { transform: translateY(2px) scale(1.08,.9); }
  32% { transform: translateY(-8px) scale(.96,1.04); }
  50% { transform: translateY(2px) scale(1.1,.9); }
}
@keyframes motion-preview-spin { 0%, 10% { transform: rotate(0); } 85%, 100% { transform: rotate(360deg); } }
@keyframes motion-preview-ripple {
  from { transform: scale(.72); opacity: .8; }
  to { transform: scale(1.12); opacity: .25; }
}
@keyframes motion-preview-flip { 0%, 10% { transform: rotateY(0); } 70%, 100% { transform: rotateY(360deg); } }
@keyframes motion-preview-shake {
  0%, 100% { transform: translateX(0) rotate(0); }
  25% { transform: translateX(-3px) rotate(-7deg); }
  50% { transform: translateX(3px) rotate(7deg); }
  75% { transform: translateX(-2px) rotate(-4deg); }
}
@keyframes motion-preview-zoom { to { transform: scale(1.18); filter: brightness(1.18); } }
@keyframes motion-preview-slide {
  0%, 100% { transform: translateX(-8px); opacity: .45; }
  45%, 65% { transform: translateX(5px); opacity: 1; }
}
@keyframes motion-preview-twist {
  0%, 12%, 100% { transform: rotate(0) scale(1); }
  55% { transform: rotate(205deg) scale(.82, 1.12); }
}
@keyframes motion-preview-blink { 0%, 30%, 58%, 100% { opacity: 1; } 16%, 44% { opacity: .16; } }
@keyframes motion-preview-drift {
  0%, 100% { transform: translate(-3px, 1px) rotate(-2deg); }
  50% { transform: translate(4px, -4px) rotate(3deg); }
}
@keyframes motion-preview-heart {
  0%, 34%, 100% { transform: scale(1); }
  12% { transform: scale(1.16); }
  22% { transform: scale(.96); }
  28% { transform: scale(1.09); }
}
.trail-swatch {
  display: grid;
  width: 24px;
  height: 24px;
  margin: auto;
  place-items: center;
}
.trail-swatch i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.choice[data-value="none"] .trail-swatch i {
  position: relative;
  background: color-mix(in srgb, var(--muted) 10%, transparent);
  border: 2px solid var(--muted);
}
.choice[data-value="none"] .trail-swatch i::after {
  content: "";
  position: absolute;
  inset: calc(50% - 1px) 2px auto;
  height: 2px;
  background: var(--muted);
  transform: rotate(-45deg);
}
.choice[data-value="stardust"] .trail-swatch i {
  background: radial-gradient(circle at 35% 32%, #f0f9ff, #7dd3fc 55%, #38bdf8);
  box-shadow: 0 0 10px rgba(125, 211, 252, 0.6);
}
.choice[data-value="comet"] .trail-swatch i {
  border-radius: 52% 48% 46% 10%;
  background: linear-gradient(75deg, rgba(186, 230, 253, 0.2), #bae6fd 65%, #f8fbff);
  box-shadow: 0 0 10px rgba(125, 211, 252, 0.5);
  transform: rotate(-45deg);
}
.choice[data-value="bubble"] .trail-swatch i {
  border: 1px solid rgba(186, 230, 253, 0.7);
  background: radial-gradient(circle at 32% 30%, rgba(255, 255, 255, 0.85), rgba(125, 211, 252, 0.12) 46%);
  box-shadow: inset 0 0 6px rgba(186, 230, 253, 0.35);
}
.choice[data-value="petal"] .trail-swatch i {
  border-radius: 72% 8% 72% 8%;
  background: linear-gradient(135deg, #fbcfe8, #f9a8d4 62%, #f472b6);
  box-shadow: 0 0 8px rgba(244, 114, 182, 0.4);
  transform: rotate(18deg);
}
.choice[data-value="firefly"] .trail-swatch i {
  background: radial-gradient(circle, #fef9c3 22%, #bef264 58%, transparent 78%);
  box-shadow: 0 0 12px rgba(190, 242, 100, 0.75);
}
.choice[data-value="rainbow"] .trail-swatch i {
  background: conic-gradient(#f87171, #fbbf24, #34d399, #38bdf8, #a78bfa, #f472b6, #f87171);
  box-shadow: 0 0 10px rgba(167, 139, 250, 0.45);
}
.choice[data-value="sparkle"] .trail-swatch {
  position: relative;
  filter: drop-shadow(0 0 5px rgba(251, 191, 36, 0.55));
}
.choice[data-value="sparkle"] .trail-swatch i,
.choice[data-value="sparkle"] .trail-swatch::after {
  border-radius: 0;
  background: linear-gradient(135deg, #fff8da, #fbbf24 58%, #d68a12);
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
}
.choice[data-value="sparkle"] .trail-swatch::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  top: 0;
  right: 0;
}
.choice[data-value="sparks"] .trail-swatch i {
  border-radius: 2px 10px 2px 10px;
  background: linear-gradient(135deg, #fff7ae, #fb923c 52%, #ef4444);
  box-shadow: -8px 7px 0 -3px #fbbf24, 7px -5px 0 -4px #fff7ae, 0 0 9px rgba(249,115,22,.65);
  transform: rotate(45deg);
}
.choice[data-value="ribbon"] .trail-swatch i {
  width: 22px;
  height: 8px;
  border-radius: 70% 12% 70% 12%;
  background: linear-gradient(90deg, #22d3ee, #8b5cf6 52%, #f472b6);
  box-shadow: 0 0 8px rgba(139,92,246,.5);
  transform: rotate(-18deg);
}
.choice[data-value="notes"] .trail-swatch i,
.choice[data-value="crystal"] .trail-swatch i,
.choice[data-value="hearts"] .trail-swatch i {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  background: none;
}
.choice[data-value="notes"] .trail-swatch i::before { content: "♪"; color: #c4b5fd; font: 700 22px/1 serif; text-shadow: 0 0 8px #8b5cf6; }
.choice[data-value="pixels"] .trail-swatch i {
  width: 8px;
  height: 8px;
  border-radius: 1px;
  background: #22d3ee;
  box-shadow: -8px 6px 0 #6366f1, 8px -5px 0 #f472b6, 7px 7px 0 -1px #34d399;
}
.choice[data-value="crystal"] .trail-swatch i::before { content: "✦"; color: #cffafe; font: 24px/1 serif; text-shadow: 0 0 8px #22d3ee; }
.choice[data-value="ink"] .trail-swatch i {
  width: 15px;
  height: 15px;
  border-radius: 62% 38% 58% 42%;
  background: radial-gradient(circle at 35% 30%, #64748b, #111827 68%);
  box-shadow: -7px 6px 0 -5px #475569, 8px 5px 0 -5px #1f2937;
}
.choice[data-value="hearts"] .trail-swatch i::before { content: "♥"; color: #fb7185; font: 22px/1 serif; text-shadow: 0 0 8px #e11d48; }
.choice[data-value="smoke"] .trail-swatch i {
  width: 19px;
  height: 19px;
  background: radial-gradient(circle at 34% 62%, rgba(226,232,240,.9), rgba(148,163,184,.45) 48%, transparent 72%);
  filter: blur(.4px);
}
.trail-grid .choice[aria-pressed="true"]:not([data-value="none"]) .trail-swatch {
  animation: trail-preview-drift 1.5s ease-in-out infinite alternate;
}
@keyframes trail-preview-drift {
  from { transform: translate(-2px, 1px); }
  to { transform: translate(2px, -2px); }
}
.fx-grid { grid-template-columns: repeat(2, 1fr); }
.trail-size-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  padding: 0 2px;
}
.trail-size {
  flex: 1;
  height: 12px;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
}
.trail-size::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(125, 211, 252, 0.55), rgba(255, 255, 255, 0.14));
}
.trail-size::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 11px;
  height: 11px;
  margin-top: -4px;
  border: 0;
  border-radius: 50%;
  background: #7dd3fc;
  box-shadow: 0 0 8px rgba(125, 211, 252, 0.7);
}
.trail-size-label {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 10px;
}
.trail-size-btn {
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid var(--stroke);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}
.trail-size-btn:hover { color: var(--text); border-color: var(--text); }
.trail-size-val {
  min-width: 30px;
  color: var(--muted);
  font-size: 10px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.sky-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sky-swatch {
  display: block;
  height: 18px;
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}
.choice[data-value="auto"] .sky-swatch {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 72% 29%, #fff9dc 0 7%, #ffe6af55 9%, transparent 30%), linear-gradient(155deg, #388aca, #c3dfed);
}
.choice[data-value="auto"] .sky-swatch::after {
  content: "";
  position: absolute;
  inset: -10% -25% -30%;
  background: url("../weather/clouds.svg?v=cloud3") center / 100% 100% no-repeat;
  opacity: .9;
}
.choice[data-value="rain"] .sky-swatch { background: repeating-linear-gradient(76deg, transparent 0 4px, rgba(125,211,252,.75) 4px 5px, transparent 5px 9px), #0b1220; }
.choice[data-value="snow"] .sky-swatch { background: radial-gradient(circle at 3px 4px, #fff 0 1.1px, transparent 1.6px) 0 0 / 9px 9px, #16294a; }
.choice[data-value="stars"] .sky-swatch { background: radial-gradient(circle at 2px 3px, rgba(255,255,255,.95) 0 0.8px, transparent 1.4px) 0 0 / 7px 8px, #050914; }
.choice[data-value="meteor"] .sky-swatch { background: linear-gradient(115deg, transparent 26%, rgba(255,255,255,.92) 40% 44%, transparent 58%), #050914; }
.choice[data-value="fireflies"] .sky-swatch { background: radial-gradient(circle at 28% 42%, rgba(190,242,100,.95) 0 1.6px, transparent 3.2px), radial-gradient(circle at 68% 66%, rgba(190,242,100,.7) 0 1.3px, transparent 2.8px), #0a1a0e; }
.choice[data-value="blossom"] .sky-swatch { background: linear-gradient(135deg, #fbcfe8, #f472b6); }
.choice[data-value="aurora"] .sky-swatch { background: radial-gradient(ellipse at 30% 110%, rgba(34,211,238,.85), transparent 54%), radial-gradient(ellipse at 72% -10%, rgba(192,132,252,.8), transparent 58%), #061326; }
.choice[data-value="bubbles"] .sky-swatch { background: radial-gradient(circle at 22% 66%, transparent 0 3px, rgba(186,230,253,.8) 3.5px 4.5px, transparent 5px), radial-gradient(circle at 68% 34%, transparent 0 5px, rgba(216,180,254,.7) 5.5px 6.5px, transparent 7px), #0b1730; }
.choice[data-value="fireworks"] .sky-swatch { background: repeating-conic-gradient(from 8deg at 30% 58%, transparent 0 9deg, #fbbf24 10deg 12deg, transparent 13deg 24deg), repeating-conic-gradient(from 4deg at 72% 38%, transparent 0 12deg, #f472b6 13deg 15deg, transparent 16deg 28deg), #09071b; }
.choice[data-value="matrix"] .sky-swatch { background: repeating-linear-gradient(90deg, transparent 0 5px, rgba(74,222,128,.8) 6px 7px, transparent 8px 11px), linear-gradient(#07110a, #020704); }
.choice[data-value="nebula"] .sky-swatch { background: radial-gradient(ellipse at 70% 35%, rgba(236,72,153,.7), transparent 38%), radial-gradient(ellipse at 34% 68%, rgba(99,102,241,.85), transparent 48%), #07051a; }
.choice[data-value="ripples"] .sky-swatch { background: repeating-radial-gradient(ellipse at 50% 110%, transparent 0 5px, rgba(56,189,248,.6) 6px 7px, transparent 8px 12px), #07152a; }
.choice[data-value="beams"] .sky-swatch { background: repeating-linear-gradient(112deg, transparent 0 10px, rgba(125,211,252,.7) 11px 13px, transparent 14px 24px), #07101f; }
.choice[data-value="confetti"] .sky-swatch { background: linear-gradient(25deg, transparent 42%, #f472b6 43% 48%, transparent 49%), linear-gradient(145deg, transparent 20%, #fbbf24 21% 27%, transparent 28% 62%, #34d399 63% 68%, transparent 69%), #16203a; }
.choice[data-value="none"] .sky-swatch {
  position: relative;
  background: linear-gradient(135deg, color-mix(in srgb, var(--muted) 8%, var(--bg)), color-mix(in srgb, var(--muted) 20%, var(--bg)));
}
.choice[data-value="none"] .sky-swatch::before,
.choice[data-value="none"] .sky-swatch::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
}
.choice[data-value="none"] .sky-swatch::before {
  width: 26px;
  height: 26px;
  border: 2px solid var(--muted);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.choice[data-value="none"] .sky-swatch::after {
  width: 24px;
  height: 2px;
  background: var(--muted);
  transform: translate(-50%, -50%) rotate(-45deg);
}
.fx-grid .choice { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 30px; }
.fx-grid .choice b { margin: 0; }
.fx-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.choice[data-value="on"] .fx-dot { background: #39ff8c; box-shadow: 0 0 10px #39ff8c; }
.appearance-note { grid-column: 1 / -1; margin: 0 2px; color: var(--muted); font-size: 11px; }
.appearance-menu { display: block; width: min(308px, calc(100vw - 32px)); padding: 14px; }
.appearance-menu .appearance-head { gap: 8px; margin-bottom: 14px; padding: 2px 2px 0; }
.appearance-heading-copy { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.appearance-menu .appearance-head strong { font-size: 15px; line-height: 1.3; letter-spacing: .02em; white-space: nowrap; }
.appearance-menu .appearance-head small { color: var(--muted); font-size: 10px; line-height: 1.3; letter-spacing: 0; white-space: nowrap; }
.appearance-head-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.appearance-service-action { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.appearance-service-action[hidden] { display: none; }
.appearance-service-action svg { width: 16px; height: 16px; }
.appearance-service-action:hover { color: var(--text); background: var(--stroke); }
.appearance-service-action:disabled { opacity: .45; cursor: wait; }
.appearance-categories { display: grid; gap: 8px; }
.appearance-category {
  --menu-accent: #38bdf8;
  position: relative; isolation: isolate; display: flex; align-items: center; gap: 12px;
  width: 100%; min-height: 66px; padding: 8px 12px 8px 8px; overflow: hidden;
  border: 1px solid var(--stroke); border-radius: 13px; color: var(--text);
  background: color-mix(in srgb, var(--menu-accent) 5%, transparent);
  font: inherit; text-align: left; cursor: pointer;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.appearance-category[data-setting="skin"] { --menu-accent: #a78bfa; }
.appearance-category[data-setting="icon"] { --menu-accent: #38bdf8; }
.appearance-category[data-setting="layout"] { --menu-accent: #34d399; }
.appearance-category[data-setting="motion"] { --menu-accent: #fbbf24; }
.appearance-category[data-setting="trail"] { --menu-accent: #fb7185; }
.appearance-category[data-setting="sky"] { --menu-accent: #a78bfa; }
.appearance-category[data-setting="fx"] { --menu-accent: #34d399; }
.appearance-category::before {
  content: ""; position: absolute; z-index: -1; inset: 0;
  background: radial-gradient(ellipse at 8% 50%, color-mix(in srgb, var(--menu-accent) 18%, transparent), transparent 72%);
  opacity: .6; transition: opacity .2s ease;
}
.appearance-category:hover,
.appearance-category[aria-expanded="true"] {
  border-color: color-mix(in srgb, var(--menu-accent) 55%, var(--stroke));
  background: color-mix(in srgb, var(--menu-accent) 10%, transparent);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--menu-accent) 12%, transparent), 0 4px 14px color-mix(in srgb, var(--menu-accent) 9%, transparent);
}
.appearance-category:hover::before,
.appearance-category[aria-expanded="true"]::before { opacity: 1; }
.appearance-art {
  flex: 0 0 54px; display: grid; place-items: center; width: 54px; height: 48px;
  color: var(--menu-accent); filter: drop-shadow(0 3px 6px color-mix(in srgb, var(--menu-accent) 30%, transparent));
  transition: transform .25s cubic-bezier(.2,.8,.2,1);
}
.appearance-art svg { display: block; width: 52px; height: 48px; overflow: visible; }
.appearance-category:hover .appearance-art { transform: translateY(-2px) rotate(-5deg) scale(1.06); }
.appearance-category-copy { flex: 1; min-width: 0; }
.appearance-category b { display: block; font-size: 14px; font-weight: 650; line-height: 1.4; white-space: nowrap; }
.appearance-category small { display: block; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 11px; line-height: 1.4; }
.appearance-category-arrow { flex: 0 0 22px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: var(--muted); background: var(--stroke); transition: transform .2s ease; }
.appearance-category-arrow svg { width: 12px; height: 12px; }
.appearance-category:hover .appearance-category-arrow { transform: translateX(2px); color: var(--text); }
.appearance-category .art-orbit { transform-origin: 26px 24px; }
.appearance-category:hover .art-orbit { animation: appearance-orbit 5s linear infinite; }
@keyframes appearance-orbit { to { transform: rotate(360deg); } }
.appearance-category .art-animated { transform-box: fill-box; transform-origin: center; }
.appearance-category:hover .art-card { animation: appearance-card 2.4s ease-in-out infinite; }
.appearance-category:hover .art-tile { animation: appearance-tile 1.8s ease-in-out infinite; }
.appearance-category:hover .art-tile:nth-child(2) { animation-delay: .15s; }
.appearance-category:hover .art-tile:nth-child(3) { animation-delay: .45s; }
.appearance-category:hover .art-tile:nth-child(4) { animation-delay: .3s; }
.appearance-category:hover .art-bolt { animation: appearance-bolt 1.8s ease-in-out infinite; }
.appearance-category:hover .art-stream { animation: appearance-stream 1.4s linear infinite; }
.appearance-category:hover .art-spark { animation: appearance-breathe 2s ease-in-out infinite; }
.appearance-category:hover .art-power { animation: appearance-breathe 2.4s ease-in-out infinite; }
@keyframes appearance-card {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-3px) rotate(7deg); }
}
@keyframes appearance-tile {
  0%, 65%, 100% { transform: translateY(0); opacity: 1; }
  30% { transform: translateY(-3px); opacity: .55; }
}
@keyframes appearance-bolt {
  0%, 100% { transform: translateY(1px) scale(.94); opacity: .7; }
  50% { transform: translateY(-2px) scale(1.06); opacity: 1; }
}
@keyframes appearance-stream { to { stroke-dashoffset: -28; } }
@keyframes appearance-breathe {
  0%, 100% { transform: scale(.92); opacity: .65; }
  50% { transform: scale(1.08); opacity: 1; }
}
html[data-fx="off"] .appearance-category,
html[data-fx="off"] .appearance-category::before,
html[data-fx="off"] .appearance-category .appearance-art,
html[data-fx="off"] .appearance-category .appearance-category-arrow,
html[data-fx="off"] .appearance-category .art-orbit,
html[data-fx="off"] .appearance-category .art-animated { animation: none; transition: none; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html[data-fx="off"] .appearance-category,
  html[data-fx="off"] .appearance-category::before,
  html[data-fx="off"] .appearance-art,
  html[data-fx="off"] .appearance-category-arrow,
  html[data-fx="off"] .appearance-category .art-orbit,
  html[data-fx="off"] .appearance-category .art-animated { animation: none !important; transition: none !important; transform: none !important; }
}
.appearance-close,
.appearance-back {
  flex: 0 0 32px; width: 32px; height: 32px; padding: 0; border: 1px solid var(--stroke); border-radius: 8px;
  background: transparent; color: var(--text); font: inherit; font-size: 22px; line-height: 1; cursor: pointer;
}
.appearance-close:hover,
.appearance-back:hover { background: var(--stroke); }
.appearance-panel :is(button, input):focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.appearance-detail {
  display: flex; flex-direction: column; right: 340px; width: min(660px, calc(100vw - 372px));
  padding: 0; gap: 0; overflow: hidden;
}
.appearance-detail .appearance-head { flex-shrink: 0; justify-content: flex-start; gap: 12px; padding: 18px 20px 12px; }
.appearance-detail .appearance-head strong { flex: 1; font-size: 18px; }
.appearance-description { flex-shrink: 0; margin: 0; padding: 0 20px 18px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.appearance-body { min-height: 0; padding: 0 20px 20px; overflow-y: auto; overscroll-behavior: contain; }
.appearance-detail [hidden] { display: none !important; }
.appearance-detail .choice-grid,
.appearance-detail #trailChoices { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.appearance-detail .fx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.appearance-detail .layout-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.appearance-detail .choice { min-height: 100px; padding: 12px; border-radius: 12px; }
.appearance-detail .choice b { margin-top: 10px; font-size: 14px; }
.appearance-detail .skin-swatch,
.appearance-detail .sky-swatch { height: 40px; }
.appearance-detail .icon-swatch { width: 40px; height: 40px; font-size: 16px; }
.appearance-detail .layout-swatch { width: 60px; height: 40px; }
.appearance-detail .trail-swatch { width: 40px; height: 40px; }
.appearance-detail #motionChoices .choice { min-height: 112px; }
.appearance-detail .trail-swatch i { width: 30px; height: 30px; }
.appearance-detail .trail-size-row { gap: 10px; margin-top: 18px; }
.appearance-detail .trail-size { min-width: 0; height: 36px; }
.appearance-detail .trail-size-btn { flex: 0 0 36px; width: 36px; height: 36px; font-size: 18px; }
.appearance-detail .trail-size-label { font-size: 14px; }
.appearance-detail .trail-size-val { min-width: 38px; font-size: 13px; }
.appearance-detail .trail-size::-webkit-slider-thumb { width: 18px; height: 18px; margin-top: -7.5px; }
.appearance-detail .fx-grid .choice { min-height: 64px; }
.appearance-detail .fx-grid .choice b { margin: 0; }
.appearance-detail .appearance-note { flex-shrink: 0; margin: 0; padding: 12px 20px; border-top: 1px solid var(--stroke); font-size: 12px; line-height: 1.6; }
.stat {
  padding: 9px 13px;
  color: var(--muted);
  white-space: nowrap;
  border: 1px solid var(--stroke);
  background: rgba(12, 18, 36, 0.42);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}
