[hidden] { display: none !important; }
.topnav { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px clamp(14px, 3vw, 32px); border-bottom: 1px solid var(--line); }
.topnav a { text-decoration: none; padding: 8px 13px; border-radius: 8px; color: var(--text); }
.topnav a:hover, .topnav a[aria-current] { background: #392b54; color: #ddcaff; }
.workspace { max-width: 1180px; padding: 24px clamp(14px, 3vw, 30px); margin: auto; min-height: 70vh; }
.workspace h2 { margin: 0 0 8px; }
.workspace p { color: var(--muted); }
.bar { display: flex; flex-wrap: wrap; gap: 8px; }
.box, .command-card { background: var(--panel); border: 1px solid var(--line); padding: 16px; border-radius: 12px; margin: 12px 0; min-width: 0; }
.box h3, .command-card h3 { margin: 0 0 6px; }
.command-card p { margin: 4px 0 10px; }
.command-card code { font-size: 13px; }
.command-list, .form-grid, .output-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.workspace label { display: grid; gap: 6px; margin-bottom: 10px; font-size: 14px; }
.workspace input:not([type=checkbox]), .workspace select, .workspace textarea { min-width: 0; max-width: 100%; }
.workspace .check {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 10px;
  cursor: pointer;
}
.workspace .check input[type="checkbox"] {
  flex: 0 0 16px;
  width: 16px;
  min-width: 0;
  height: 16px;
  margin: 3px 0 0;
  padding: 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.workspace textarea { width: 100%; resize: vertical; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px; font: 14px monospace; }
.workspace pre { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--bg); border-radius: 8px; padding: 12px; }
.workspace .error { color: #ffb6b6; }
.workspace .hint, .workspace .sources { font-size: 13px; }
@media (max-width: 720px) { .command-list, .form-grid, .output-grid { grid-template-columns: 1fr; } }

/* Winter decorations */
.winter-lights {
  display: flex;
  justify-content: space-around;
  position: relative;
  height: 15px;
  background: #241a38;
  overflow: hidden;
  pointer-events: none;
}

.winter-lights::before {
  content: "";
  position: absolute;
  inset: 2px 0 auto;
  height: 1px;
  background: #696076;
}

.winter-bulb {
  position: relative;
  top: 3px;
  width: 6px;
  height: 8px;
  border-radius: 2px 2px 50% 50%;
  color: #ba9cff;
  background: currentColor;
  box-shadow: 0 0 7px currentColor;
  animation: winter-glow 4s ease-in-out infinite alternate;
  animation-delay: var(--delay);
}

.winter-bulb:nth-child(4n + 2) { color: #ffc774; }
.winter-bulb:nth-child(4n + 3) { color: #8deed4; }
.winter-bulb:nth-child(4n + 4) { color: #ffa0bb; }

.winter-snow {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 4;
  pointer-events: none;
}

.winter-flake {
  position: absolute;
  top: 0;
  left: var(--x);
  color: #f4efff;
  font-size: var(--size);
  line-height: 1;
  opacity: var(--opacity);
  animation: winter-fall var(--duration) linear infinite;
  animation-delay: var(--delay);
}

@keyframes winter-glow {
  from { opacity: 0.6; }
  to { opacity: 1; }
}

@keyframes winter-fall {
  from { transform: translate3d(0, -1rem, 0); }
  to { transform: translate3d(var(--drift), calc(100vh + 1rem), 0); }
}

@media (max-width: 600px) {
  .winter-flake:nth-child(even), .winter-bulb:nth-child(even) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .winter-snow { display: none; }
  .winter-bulb { animation: none; }
}

