* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
  background: #050814;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #e2e8f0;
  user-select: none;
  -webkit-user-select: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.noscript-banner {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
  background: #050814;
  color: #e2e8f0;
}

#sky-container {
  position: relative;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at 50% 100%, #101935 0%, #070b1a 55%, #03050d 100%);
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}

button, select, input {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

input, textarea {
  user-select: text;
  -webkit-user-select: text;
}

.btn-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  flex-shrink: 0;
}

.ui-icon {
  width: 14px;
  height: 14px;
  display: block;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mobile-only-text {
  display: none;
}

.drawer-backdrop {
  display: none;
}

.drawer-backdrop.hidden {
  display: none !important;
}

canvas.lighter-cursor {
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'><path d='M16 2 C19 6 19 9 16 11 C13 9 13 6 16 2 Z' fill='%23f97316'/><path d='M16 5 C17.5 7 17.5 9 16 10.5 C14.5 9 14.5 7 16 5 Z' fill='%23fde047'/><rect x='11' y='12' width='10' height='14' rx='2' fill='%23ef4444' stroke='%231e293b' stroke-width='1.5'/><rect x='11' y='11' width='10' height='3' rx='1' fill='%23cbd5e1'/></svg>") 16 4, pointer;
}

canvas.grabbing {
  cursor: grabbing;
}

.hud-bar {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
  z-index: 10;
  flex-wrap: wrap;
}

.hud-left-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}

.hud-home-link {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 5px;
  border-radius: 10px;
  background: rgba(11, 18, 34, 0.84);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(148, 163, 184, 0.28);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  color: #ffffff;
  text-decoration: none;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.hud-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 55%, #e11d48 100%);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.45);
  font-size: 13px;
  font-weight: 900;
  color: #ffffff;
  line-height: 1;
}

.hud-brand-text {
  display: inline-flex;
  align-items: baseline;
  color: #ffffff;
}

.hud-brand-accent {
  color: #fbbf24;
}

.hud-brand-tld {
  font-size: 8.5px;
  font-weight: 700;
  color: #94a3b8;
  margin-left: 1px;
}

.hud-home-link:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.36), rgba(234, 88, 12, 0.28));
  border-color: rgba(253, 224, 71, 0.85);
  color: #ffffff;
  transform: translateY(-1px);
}

.hud-pill {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(148, 163, 184, 0.18);
  font-size: 13px;
  line-height: 1;
  color: #cbd5e1;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.status-dot.ready {
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
}

.status-dot.burst {
  background: #f43f5e;
  box-shadow: 0 0 12px #f43f5e;
}

.controls {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.controls button.hud-icon-btn {
  width: 36px;
  min-width: 36px;
  height: 36px;
  padding: 0;
  justify-content: center;
}

.controls button.install-highlight-btn {
  padding: 8px 13px;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.34), rgba(245, 158, 11, 0.28));
  border-color: rgba(52, 211, 153, 0.85);
  color: #a7f3d0;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.45), inset 0 0 8px rgba(251, 191, 36, 0.22);
  animation: installBtnPulse 2.1s ease-in-out infinite;
}

.controls button.install-highlight-btn:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.52), rgba(245, 158, 11, 0.42));
  border-color: #fde047;
  color: #ffffff;
}

@keyframes installBtnPulse {
  0%, 100% {
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.38), 0 0 0 0 rgba(52, 211, 153, 0.42);
    border-color: rgba(52, 211, 153, 0.82);
  }
  50% {
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.58), 0 0 0 4px rgba(52, 211, 153, 0.16);
    border-color: rgba(253, 224, 71, 0.95);
    color: #fef08a;
  }
}

.first-install-prompt {
  position: fixed;
  inset: 0;
  z-index: 85;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(3, 6, 18, 0.58);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.first-install-prompt.hidden {
  display: none !important;
}

.install-app-dialog {
  width: min(440px, calc(100vw - 28px));
  padding: 24px 26px 22px;
  border-radius: 20px;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: installDialogPop 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes installDialogPop {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.install-app-illustration {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4px 0 6px;
}

.install-laptop-svg {
  width: 196px;
  height: 105px;
  display: block;
}

.install-app-title {
  font-size: 21px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
  margin: 0;
}

.install-app-subtitle {
  font-size: 13.5px;
  color: #475569;
  line-height: 1.4;
  margin: -4px 0 4px;
}

.install-app-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 0 10px;
}

.install-app-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
  flex-shrink: 0;
}

.install-app-meta-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.install-app-meta-text strong {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.install-app-meta-text span {
  font-size: 13px;
  color: #64748b;
}

.install-app-learn-box {
  padding: 10px 12px;
  border-radius: 10px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-size: 12.5px;
  line-height: 1.45;
}

.install-app-learn-box.hidden {
  display: none !important;
}

.install-app-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
}

.install-app-footer-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.install-btn-learn {
  padding: 9px 18px !important;
  border-radius: 9999px !important;
  border: 1.5px solid #c7d2fe !important;
  background: #ffffff !important;
  color: #3730a3 !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.install-btn-learn:hover {
  background: #eef2ff !important;
}

.install-btn-next {
  padding: 9px 26px !important;
  border-radius: 9999px !important;
  border: none !important;
  background: #e0e7ff !important;
  color: #1e1b4b !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.install-btn-next:hover {
  background: #c7d2fe !important;
}

.install-btn-cancel {
  padding: 9px 22px !important;
  border-radius: 9999px !important;
  border: 2px solid #312e81 !important;
  background: #4338ca !important;
  color: #ffffff !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #4338ca !important;
  backdrop-filter: none !important;
}

.install-btn-cancel:hover {
  background: #3730a3 !important;
}

.hud-submenu-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.hud-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  min-width: 192px;
  padding: 6px;
  border-radius: 14px;
  background: linear-gradient(155deg, rgba(15, 23, 42, 0.96), rgba(9, 13, 28, 0.98));
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.68), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.hud-dropdown.hidden {
  display: none !important;
}

.hud-dropdown-item {
  width: 100%;
  display: flex !important;
  align-items: center;
  justify-content: flex-start !important;
  gap: 9px !important;
  padding: 9px 12px !important;
  min-height: 36px !important;
  border-radius: 10px !important;
  background: rgba(30, 41, 59, 0.65) !important;
  border: 1px solid rgba(148, 163, 184, 0.18) !important;
  color: #e2e8f0 !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}

.hud-dropdown-item:hover {
  background: rgba(51, 65, 85, 0.9) !important;
  border-color: rgba(251, 191, 36, 0.45) !important;
  color: #ffffff !important;
}

.hud-dropdown-item[role="menuitemcheckbox"][aria-pressed="false"] {
  color: #94a3b8 !important;
  opacity: 0.78;
}

button {
  appearance: none;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #f8fafc;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 9px 14px;
  border-radius: 9999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.14s ease, background 0.2s ease, border-color 0.2s ease;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

button:hover {
  background: rgba(30, 41, 59, 0.88);
  border-color: rgba(248, 250, 252, 0.38);
}

button:active {
  transform: scale(0.96);
}

button.primary {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.92), rgba(234, 88, 12, 0.92));
  border-color: rgba(251, 191, 36, 0.55);
  color: #fff;
}

button.primary:hover {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.96), rgba(249, 115, 22, 0.96));
}

button.active-toggle {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.85), rgba(5, 150, 105, 0.85));
  border-color: rgba(52, 211, 153, 0.7);
  color: #fff;
}

.mobile-only-btn {
  display: none;
}

.panel-close-btn,
.modal-close-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  justify-content: center;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.92), rgba(185, 28, 28, 0.92));
  border: 1px solid rgba(252, 165, 165, 0.55);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(220, 38, 38, 0.35);
  flex-shrink: 0;
}

.panel-close-btn:hover,
.modal-close-btn:hover {
  background: linear-gradient(135deg, #f87171, #dc2626);
  border-color: rgba(254, 202, 202, 0.85);
}

.cracker-menu {
  position: absolute;
  top: 66px;
  bottom: 64px;
  left: 0;
  z-index: 11;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 244px;
  padding: 12px 11px;
  border-radius: 0 16px 16px 0;
  background: rgba(15, 23, 42, 0.84);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-left: none;
  box-shadow: 10px 0 28px rgba(0, 0, 0, 0.45);
  transform: translateX(0);
  transition: opacity 0.24s ease, transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}

.cracker-menu.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-105%);
}

.cracker-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px;
}

.cracker-menu-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
}

.random-btn {
  padding: 4px 9px;
  font-size: 11px;
  border-radius: 999px;
  background: rgba(51, 65, 85, 0.55);
  box-shadow: none;
}

.auto-btn-row {
  display: flex;
  gap: 6px;
  width: 100%;
}

.cat-auto-icon-btn {
  padding: 3px 6px;
  font-size: 11px;
  line-height: 1;
  border-radius: 999px;
  background: rgba(51, 65, 85, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: none;
  color: #cbd5e1;
}

.cat-auto-icon-btn:hover {
  background: rgba(71, 85, 105, 0.85);
  color: #fef3c7;
}

.cat-auto-icon-btn.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.9), rgba(5, 150, 105, 0.9));
  border-color: rgba(52, 211, 153, 0.8);
  color: #ffffff;
}

.cracker-search {
  width: 100%;
  padding: 7px 10px;
  border-radius: 9px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(2, 6, 23, 0.55);
  color: #f8fafc;
  font-family: inherit;
  font-size: 12px;
  outline: none;
}

.cracker-search:focus {
  border-color: rgba(251, 191, 36, 0.6);
}

.cracker-search::placeholder {
  color: #64748b;
}

.acc-group {
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.56);
  border: 1px solid rgba(148, 163, 184, 0.16);
  overflow: hidden;
  flex-shrink: 0;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.acc-group:hover {
  border-color: rgba(148, 163, 184, 0.30);
}

.acc-group.open {
  background: rgba(15, 23, 42, 0.78);
  border-color: rgba(251, 191, 36, 0.44);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

.acc-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 9px 10px;
  border-radius: 0;
  font-size: 12.5px;
  font-weight: 600;
  background: transparent;
  border: none;
  color: #e2e8f0;
  box-shadow: none;
  flex-shrink: 0;
  transition: background 0.18s ease, color 0.18s ease;
}

.acc-header:hover {
  background: rgba(51, 65, 85, 0.36);
  border-color: transparent;
  color: #ffffff;
}

.acc-header.open {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(234, 88, 12, 0.08));
  border-bottom: 1px solid rgba(251, 191, 36, 0.20);
  color: #fef3c7;
}

.acc-header-left {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  overflow: hidden;
}

.acc-cat-icon {
  font-size: 14px;
  line-height: 1;
  flex-shrink: 0;
}

.acc-cat-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acc-header-right {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.acc-count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  background: rgba(2, 6, 23, 0.52);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #94a3b8;
  line-height: 1.2;
}

.acc-header.open .acc-count-pill {
  background: rgba(245, 158, 11, 0.22);
  border-color: rgba(251, 191, 36, 0.45);
  color: #fde68a;
}

.acc-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), color 0.18s ease;
}

.acc-chevron .ui-icon {
  width: 13px;
  height: 13px;
}

.acc-header.open .acc-chevron {
  transform: rotate(90deg);
  color: #fbbf24;
}

.acc-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 7px;
  margin: 0;
  background: rgba(2, 6, 23, 0.28);
  animation: accBodyReveal 0.16s ease-out;
}

@keyframes accBodyReveal {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cracker-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-right: 3px;
  flex: 1;
  min-height: 120px;
}

.cracker-list::-webkit-scrollbar {
  width: 5px;
}

.cracker-list::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.28);
  border-radius: 999px;
}

.cracker-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  padding: 7px 9px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 500;
  background: rgba(30, 41, 59, 0.48);
  border: 1px solid rgba(148, 163, 184, 0.12);
  color: #e2e8f0;
  box-shadow: none;
  text-align: left;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.cracker-btn:hover {
  background: rgba(51, 65, 85, 0.68);
  border-color: rgba(248, 250, 252, 0.24);
  color: #ffffff;
}

.cracker-btn.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.26), rgba(234, 88, 12, 0.22));
  border-color: rgba(251, 191, 36, 0.62);
  box-shadow: inset 3px 0 0 #fbbf24;
  color: #fef3c7;
  font-weight: 600;
}

.cracker-btn .icon {
  font-size: 13.5px;
  line-height: 1;
  flex-shrink: 0;
}

.cracker-btn .name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cracker-dots {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
  margin-left: auto;
}

.cracker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.acc-load-more {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 8px;
  margin-top: 2px;
  border-radius: 8px;
  border: 1px dashed rgba(251, 191, 36, 0.45);
  background: rgba(245, 158, 11, 0.10);
  color: #fde68a;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.acc-load-more:hover {
  background: rgba(245, 158, 11, 0.22);
  border-color: rgba(251, 191, 36, 0.78);
  color: #ffffff;
}

.settings-panel {
  position: absolute;
  top: 66px;
  bottom: 64px;
  right: 0;
  z-index: 11;
  width: 280px;
  padding: 12px 13px;
  border-radius: 16px 0 0 16px;
  background: rgba(15, 23, 42, 0.84);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-right: none;
  box-shadow: -10px 0 28px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  gap: 9px;
  overflow: hidden;
  transform: translateX(0);
  transition: opacity 0.24s ease, transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}

.settings-scroll-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-right: 3px;
  display: flex;
  flex-direction: column;
}

.settings-scroll-body::-webkit-scrollbar {
  width: 5px;
}

.settings-scroll-body::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.28);
  border-radius: 999px;
}

.settings-panel > .settings-header,
.settings-panel > .cracker-spec-card,
.settings-panel > .settings-tabs,
.settings-panel > .settings-actions {
  flex-shrink: 0;
}

.cracker-spec-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.52);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.spec-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  line-height: 1.25;
}

.spec-key {
  color: #94a3b8;
  font-weight: 600;
  flex-shrink: 0;
}

.spec-val {
  color: #fde68a;
  font-weight: 700;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.spec-swatches {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  flex-wrap: wrap;
}

.spec-swatch {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.45);
  flex-shrink: 0;
}

.settings-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 3px;
  background: rgba(2, 6, 23, 0.45);
  padding: 3px;
  border-radius: 10px;
}

.settings-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 2px;
  font-size: 10.2px;
  font-weight: 600;
  white-space: nowrap;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: #94a3b8;
  box-shadow: none;
  min-width: 0;
}

.settings-tab:hover {
  color: #e2e8f0;
  background: rgba(51, 65, 85, 0.35);
  border-color: transparent;
}

.settings-tab.active {
  background: rgba(245, 158, 11, 0.25);
  border-color: rgba(251, 191, 36, 0.5);
  color: #fef3c7;
}

.tab-pane {
  display: none;
  flex-direction: column;
  gap: 9px;
}

.tab-pane.active {
  display: flex;
}

.slider-row.hidden,
.ctrl-count-pills.hidden,
.ctrl-color-pickers.hidden,
.ctrl-rainbow-bar.hidden {
  display: none;
}

.ctrl-text-input {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 9px;
  border-radius: 9px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(2, 6, 23, 0.65);
  color: #f8fafc;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ctrl-text-input:focus {
  border-color: rgba(251, 191, 36, 0.72);
  box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.18);
}

.ctrl-color-mode-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

.ctrl-mode-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5px 4px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.6);
  color: #cbd5e1;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: none;
}

.ctrl-mode-pill:hover {
  border-color: rgba(251, 191, 36, 0.45);
  color: #f8fafc;
}

.ctrl-mode-pill.active {
  background: rgba(245, 158, 11, 0.26);
  border-color: rgba(251, 191, 36, 0.68);
  color: #fef3c7;
}

.ctrl-count-pills {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 3px;
}

.ctrl-count-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 24px;
  padding: 0;
  border-radius: 7px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.62);
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
}

.ctrl-count-pill:hover {
  border-color: rgba(251, 191, 36, 0.5);
  color: #ffffff;
}

.ctrl-count-pill.active {
  background: rgba(245, 158, 11, 0.3);
  border-color: rgba(251, 191, 36, 0.78);
  color: #fef3c7;
}

.ctrl-color-pickers {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.ctrl-color-chip {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  overflow: hidden;
  cursor: pointer;
  background: rgba(2, 6, 23, 0.5);
}

.ctrl-color-chip input[type="color"] {
  width: 140%;
  height: 140%;
  border: none;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: pointer;
}

.ctrl-color-chip-idx {
  position: absolute;
  bottom: 1px;
  right: 3px;
  font-size: 9px;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.92);
  pointer-events: none;
}

.ctrl-rainbow-bar {
  height: 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: linear-gradient(90deg, #ff3b5c, #ff8a1f, #fde047, #22c55e, #38bdf8, #a855f7, #ec4899);
}

.ctrl-toggles-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

.ctrl-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  gap: 4px;
  padding: 5px 6px;
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.ctrl-toggle-btn[aria-pressed="true"] {
  background: rgba(245, 158, 11, 0.28);
  border-color: rgba(251, 191, 36, 0.72);
  color: #fef3c7;
}

.settings-panel.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(105%);
}

.side-drawer-tab {
  position: absolute;
  top: 86px;
  transform: translateX(0);
  z-index: 14;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 10px 6px;
  min-width: 30px;
  background: rgba(15, 23, 42, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(251, 191, 36, 0.36);
  color: #fde68a;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), background 0.18s ease, border-color 0.18s ease, opacity 0.2s ease;
}

.side-drawer-tab:hover {
  background: rgba(30, 41, 59, 0.96);
  border-color: rgba(251, 191, 36, 0.72);
  color: #ffffff;
}

.side-drawer-tab--left {
  left: 0;
  border-left: none;
  border-radius: 0 12px 12px 0;
}

.side-drawer-tab--left.drawer-open {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-100%);
}

.side-drawer-tab--right {
  right: 0;
  border-right: none;
  border-radius: 12px 0 0 12px;
}

.side-drawer-tab--right.drawer-open {
  opacity: 0;
  pointer-events: none;
  transform: translateX(100%);
}

.drawer-tab-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.drawer-tab-ico .ui-icon {
  width: 16px;
  height: 16px;
}

.drawer-tab-label {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 10px;
  line-height: 1;
}

.side-drawer-tab--left .drawer-tab-label {
  transform: rotate(180deg);
}

.drawer-tab-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  color: #fbbf24;
}

.drawer-tab-arrow .ui-icon {
  width: 13px;
  height: 13px;
}

#sky-container.fullscreen-active,
#sky-container.zen-mode {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 999;
}

.mobile-fs-prompt {
  position: fixed;
  top: calc(54px + env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 46;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 6px 5px 10px;
  border-radius: 9999px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 27, 75, 0.92));
  border: 1px solid rgba(251, 191, 36, 0.65);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.65), 0 0 18px rgba(245, 158, 11, 0.28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: fsPromptPulse 2s ease-in-out infinite;
}

.mobile-fs-prompt.hidden {
  display: none !important;
}

@keyframes fsPromptPulse {
  0%, 100% {
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.65), 0 0 14px rgba(245, 158, 11, 0.25);
    border-color: rgba(251, 191, 36, 0.6);
  }
  50% {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.72), 0 0 24px rgba(251, 191, 36, 0.52);
    border-color: rgba(253, 224, 71, 0.95);
  }
}

.mobile-fs-enter-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 9999px;
  border: none;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(234, 88, 12, 0.45);
}

.mobile-fs-enter-btn .ui-icon {
  width: 14px;
  height: 14px;
}

.mobile-fs-dismiss-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(30, 41, 59, 0.75);
  color: #cbd5e1;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
}

.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
}

.slider-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.slider-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #e2e8f0;
}

.slider-val {
  font-variant-numeric: tabular-nums;
  color: #fbbf24;
  font-weight: 600;
  font-size: 12px;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.25);
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #f59e0b;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #f59e0b;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  cursor: pointer;
}

.settings-actions {
  display: flex;
  gap: 8px;
  padding-top: 2px;
}

.mini-btn {
  flex: 1;
  justify-content: center;
  padding: 7px 10px;
  border-radius: 9px;
  font-size: 12px;
  background: rgba(30, 41, 59, 0.65);
  box-shadow: none;
}

.qty-bar {
  position: absolute;
  bottom: calc(15px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 12;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  flex-wrap: nowrap;
  padding: 3px 6px;
  border-radius: 9999px;
  background: rgba(11, 18, 34, 0.90);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(148, 163, 184, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 24px rgba(0, 0, 0, 0.54);
  width: max-content;
  max-width: calc(100vw - 16px);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.qty-bar::-webkit-scrollbar {
  display: none;
}

.qty-bar-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  flex-shrink: 0;
  padding: 0;
  border: none;
  background: transparent;
}

.qty-bar-divider {
  width: 1px;
  height: 15px;
  background: rgba(148, 163, 184, 0.24);
  flex-shrink: 0;
}

.qty-stepper {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 24px;
  background: rgba(2, 6, 23, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 9999px;
  padding: 1px 2px;
}

.step-btn {
  height: 20px;
  padding: 0 6px;
  font-size: 11px;
  line-height: 1;
  border-radius: 9999px;
  border-color: transparent;
  background: rgba(30, 41, 59, 0.85);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
}

.qty-num {
  width: 24px;
  padding: 0 2px;
  border: none;
  background: transparent;
  color: #fbbf24;
  font-family: inherit;
  font-size: 11px;
  line-height: 1;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: center;
  outline: none;
  -moz-appearance: textfield;
}

.qty-num::-webkit-outer-spin-button,
.qty-num::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.multi-btn {
  height: 26px;
  padding: 0 9px;
  font-size: 11px;
  line-height: 1;
  gap: 5px;
  border-radius: 9999px;
  white-space: nowrap;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  color: #e2e8f0;
  background: rgba(30, 41, 59, 0.78);
  border-color: rgba(148, 163, 184, 0.22);
}

.multi-btn:hover {
  color: #ffffff;
  background: rgba(51, 65, 85, 0.92);
  border-color: rgba(203, 213, 225, 0.36);
}

.multi-btn.hidden {
  display: none;
}

.multi-btn.active {
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(148, 163, 184, 0.34);
  color: #f1f5f9;
}

#prev-autoshow-btn {
  background: rgba(30, 41, 59, 0.78);
  border-color: rgba(148, 163, 184, 0.24);
  color: #e2e8f0;
  font-weight: 600;
  box-shadow: none;
}

#prev-autoshow-btn:hover {
  background: rgba(51, 65, 85, 0.92);
  border-color: rgba(203, 213, 225, 0.36);
  color: #ffffff;
  box-shadow: none;
}

#next-autoshow-btn {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.95), rgba(234, 88, 12, 0.95));
  border-color: rgba(253, 224, 71, 0.82);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.42);
}

#next-autoshow-btn:hover {
  background: linear-gradient(135deg, #fbbf24, #f97316);
  border-color: #fef08a;
  box-shadow: 0 0 18px rgba(251, 191, 36, 0.60);
}

.autoshow-combo {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  flex-shrink: 0;
  height: 26px;
  border-radius: 9999px;
  background: rgba(30, 41, 59, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.24);
  overflow: hidden;
  box-shadow: none;
}

.autoshow-combo.active-toggle {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.92), rgba(5, 150, 105, 0.92));
  border-color: rgba(52, 211, 153, 0.82);
  color: #ffffff;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.42);
}

.autoshow-combo-main {
  height: 100%;
  border: none;
  border-radius: 9999px 0 0 9999px;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  padding: 0 8px 0 9px;
  font-size: 11px;
  line-height: 1;
  gap: 5px;
  color: inherit;
  white-space: nowrap;
  flex-shrink: 0;
}

.autoshow-combo-main:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: transparent;
}

.autoshow-cat-select {
  appearance: none;
  -webkit-appearance: none;
  height: 100%;
  border: none;
  border-left: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 0 9999px 9999px 0;
  background-color: rgba(2, 6, 23, 0.38);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'><path d='M2 3.5 L5 6.8 L8 3.5' fill='none' stroke='%23e2e8f0' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 7px center;
  color: #f8fafc;
  font-family: inherit;
  font-size: 10.5px;
  line-height: 1;
  font-weight: 600;
  padding: 0 20px 0 8px;
  cursor: pointer;
  outline: none;
  flex-shrink: 0;
}

.autoshow-combo.active-toggle .autoshow-cat-select {
  background-color: rgba(6, 78, 59, 0.42);
  color: #ecfdf5;
  border-left-color: rgba(255, 255, 255, 0.28);
}

.autoshow-cat-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  max-width: 118px;
  transition: background-color 0.15s ease;
}

.autoshow-cat-btn:hover {
  background-color: rgba(30, 41, 59, 0.72);
}

.autoshow-cat-btn.open {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'><path d='M2 6.8 L5 3.5 L8 6.8' fill='none' stroke='%23fde68a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
}

#autoshow-cat-btn-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.autoshow-cat-menu {
  position: fixed;
  z-index: 48;
  width: min(292px, calc(100vw - 20px));
  padding: 10px;
  border-radius: 16px;
  background: linear-gradient(155deg, rgba(15, 23, 42, 0.92), rgba(7, 11, 24, 0.96));
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.62), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(18px) saturate(165%);
  -webkit-backdrop-filter: blur(18px) saturate(165%);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.autoshow-cat-menu.hidden {
  display: none;
}

.scenery-menu {
  width: min(252px, calc(100vw - 20px));
}

.scenery-menu-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

#objects-toggle-btn.open {
  border-color: rgba(251, 191, 36, 0.75);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.35);
}

.cat-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px;
}

.cat-menu-title {
  font-size: 12px;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: 0.02em;
}

.cat-menu-badge {
  font-size: 10.5px;
  font-weight: 700;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(251, 191, 36, 0.36);
  padding: 2px 7px;
  border-radius: 999px;
}

.cat-menu-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  max-height: min(46vh, 260px);
  overflow-y: auto;
  padding-right: 2px;
}

.cat-menu-list::-webkit-scrollbar {
  width: 4px;
}

.cat-menu-list::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.32);
  border-radius: 999px;
}

.cat-check-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 9px;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.16);
  color: #e2e8f0;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.cat-check-row:hover {
  background: rgba(51, 65, 85, 0.72);
  border-color: rgba(251, 191, 36, 0.45);
}

.cat-check-row.checked {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(251, 191, 36, 0.5);
  color: #fef3c7;
}

.cat-check-all {
  background: rgba(15, 23, 42, 0.75);
  border-color: rgba(148, 163, 184, 0.24);
}

.cat-check-row input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.cat-check-box {
  width: 15px;
  height: 15px;
  border-radius: 4.5px;
  border: 1.5px solid rgba(148, 163, 184, 0.55);
  background: rgba(2, 6, 23, 0.55);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.cat-check-row input[type="checkbox"]:checked + .cat-check-box {
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  border-color: #fde68a;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}

.cat-check-row input[type="checkbox"]:checked + .cat-check-box::after {
  content: "";
  width: 4px;
  height: 8px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(42deg) translate(-0.5px, -0.5px);
}

.cat-check-row input[type="checkbox"]:indeterminate + .cat-check-box {
  background: rgba(245, 158, 11, 0.42);
  border-color: #fbbf24;
}

.cat-check-row input[type="checkbox"]:indeterminate + .cat-check-box::after {
  content: "";
  width: 8px;
  height: 2px;
  border-radius: 2px;
  background: #ffffff;
}

.cat-check-ico {
  font-size: 13px;
  line-height: 1;
  flex-shrink: 0;
}

.cat-check-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.cat-menu-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.cat-menu-foot-btn {
  flex: 1;
  padding: 5px 8px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(30, 41, 59, 0.65);
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.cat-menu-foot-btn:hover {
  background: rgba(51, 65, 85, 0.85);
  color: #ffffff;
}

.cat-menu-done-btn {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.88), rgba(234, 88, 12, 0.88));
  border-color: rgba(253, 230, 138, 0.6);
  color: #ffffff;
}

.cat-menu-done-btn:hover {
  background: linear-gradient(135deg, #f59e0b, #ea580c);
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  z-index: 30;
  background: rgba(3, 5, 13, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop.hidden {
  display: none;
}

.modal-card {
  width: 100%;
  max-width: 480px;
  max-height: 88dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 18px 20px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.24);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lineup-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 48dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-right: 2px;
}

.modal-title {
  font-size: 15px;
  font-weight: 600;
  color: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.modal-title-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.modal-presets {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.preset-btn {
  flex: 1;
  justify-content: center;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 12px;
  background: rgba(30, 41, 59, 0.75);
  box-shadow: none;
  white-space: nowrap;
}

.preset-btn.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.32), rgba(245, 158, 11, 0.28));
  border-color: rgba(125, 211, 252, 0.65);
  color: #f8fafc;
}

.wind-modal-card {
  max-width: 380px;
}

.wind-presets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

canvas.pointer-cursor {
  cursor: pointer;
}

.bg-nav-btn {
  position: fixed;
  top: clamp(216px, 34%, calc(100dvh - 270px));
  transform: translateY(-50%);
  z-index: 12;
  width: 36px;
  height: 36px;
  border-radius: 9999px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(10, 15, 30, 0.56);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: rgba(226, 232, 240, 0.82);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  opacity: 0.72;
  transition: left 0.26s cubic-bezier(0.22, 1, 0.36, 1), right 0.26s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.18s ease, background-color 0.18s ease, transform 0.14s ease, border-color 0.18s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.32);
}

.bg-nav-btn:hover {
  opacity: 1;
  color: #ffffff;
  background: rgba(30, 41, 59, 0.84);
  border-color: rgba(251, 191, 36, 0.5);
}

.bg-nav-btn:active {
  transform: translateY(-50%) scale(0.92);
}

.bg-nav-btn .ui-icon {
  width: 17px;
  height: 17px;
}

.bg-nav-prev {
  left: 12px;
}

.bg-nav-next {
  right: 12px;
}

#sky-container.has-left-panel .bg-nav-prev {
  left: 256px;
}

#sky-container.has-right-panel .bg-nav-next {
  right: 292px;
}

@media (max-width: 768px), (max-height: 540px) and (orientation: landscape) {
  .bg-nav-btn {
    top: clamp(124px, 32%, calc(100dvh - 220px));
    width: 32px;
    height: 32px;
    opacity: 0.62;
  }
  .bg-nav-prev,
  #sky-container.has-left-panel .bg-nav-prev {
    left: 8px;
  }
  .bg-nav-next,
  #sky-container.has-right-panel .bg-nav-next {
    right: 8px;
  }
  .bg-nav-btn .ui-icon {
    width: 15px;
    height: 15px;
  }
}

.welcome-banner {
  position: fixed;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  z-index: 32;
  width: min(350px, calc(100vw - 32px));
  padding: 20px 22px 18px;
  border-radius: 20px;
  background: linear-gradient(155deg, rgba(15, 23, 42, 0.94), rgba(30, 18, 54, 0.94));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(251, 191, 36, 0.52);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.65), 0 0 36px rgba(245, 158, 11, 0.22);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  opacity: 1;
  transition: opacity 0.32s ease, transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.welcome-banner.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -46%) scale(0.94);
}

.welcome-kicker {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: #fbbf24;
  text-transform: uppercase;
}

.welcome-title {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 14px rgba(251, 191, 36, 0.35);
}

.welcome-sub {
  font-size: 13px;
  color: #cbd5e1;
  line-height: 1.4;
}

.welcome-sub strong {
  color: #fde047;
  font-size: 15px;
}

.welcome-progress-track {
  width: 100%;
  height: 6px;
  margin-top: 4px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.22);
  overflow: hidden;
}

.welcome-progress-fill {
  height: 100%;
  width: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #f59e0b, #fde047, #fb7185);
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.65);
  transition: width 0.1s linear;
}

.welcome-launch-btn {
  margin-top: 6px;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(253, 224, 71, 0.65);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.92), rgba(234, 88, 12, 0.92));
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(234, 88, 12, 0.42);
}

.welcome-launch-btn:hover {
  filter: brightness(1.1);
}

.onboarding-prompt {
  position: fixed;
  top: 48%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  z-index: 28;
  width: min(360px, calc(100vw - 36px));
  padding: 20px 22px 16px;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.54), rgba(30, 41, 59, 0.38));
  backdrop-filter: blur(22px) saturate(165%);
  -webkit-backdrop-filter: blur(22px) saturate(165%);
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.52), inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 0 34px rgba(251, 191, 36, 0.18);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  opacity: 1;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.onboarding-prompt.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -44%) scale(0.94);
}

.onboarding-prompt-ico {
  font-size: 26px;
  line-height: 1;
  filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.55));
}

.onboarding-prompt-text {
  font-size: 13.5px;
  color: #f1f5f9;
  line-height: 1.45;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

.onboarding-prompt-text strong {
  color: #fde047;
  font-weight: 700;
}

.onboarding-prompt-bar {
  width: 100%;
  height: 4px;
  margin-top: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
}

.onboarding-prompt-fill {
  height: 100%;
  width: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #fbbf24, #f472b6, #38bdf8);
  transition: width 5s linear;
}

.onboarding-dismiss-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(15, 23, 42, 0.48);
  color: #e2e8f0;
  font-size: 11px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: none;
}

.onboarding-dismiss-btn:hover {
  background: rgba(239, 68, 68, 0.85);
  border-color: rgba(252, 165, 165, 0.6);
  color: #ffffff;
}

.onboarding-pulse-btn {
  border-color: rgba(253, 224, 71, 0.92) !important;
  box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.72);
  animation: onboardingNextPulse 1.4s ease-in-out infinite;
}

@keyframes onboardingNextPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.72);
  }
  70% {
    box-shadow: 0 0 0 9px rgba(251, 191, 36, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(251, 191, 36, 0);
  }
}

.cracker-banner {
  position: fixed;
  top: 44%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  z-index: 22;
  pointer-events: none;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  max-width: min(84vw, 420px);
  padding: 13px 20px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.05) 58%, rgba(15, 23, 42, 0.24));
  backdrop-filter: blur(20px) saturate(175%);
  -webkit-backdrop-filter: blur(20px) saturate(175%);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.36),
    inset 0 -1px 0 rgba(255, 255, 255, 0.08);
  opacity: 0;
  transition: opacity 0.22s ease-out, transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.cracker-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.04) 38%, transparent 62%);
  pointer-events: none;
}

.cracker-banner.visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.cracker-banner.fading {
  opacity: 0;
  transform: translate(-50%, calc(-50% - 8px)) scale(0.97);
  transition: opacity 0.55s ease-out, transform 0.55s ease-out;
}

.cracker-banner-icon {
  position: relative;
  font-size: 30px;
  line-height: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 10px rgba(255, 255, 255, 0.28));
}

.cracker-banner-meta {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cracker-banner-name {
  color: #ffffff;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
  overflow-wrap: break-word;
}

.cracker-banner-cat {
  color: rgba(254, 243, 199, 0.86);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.38);
}

@media (max-width: 768px) {
  .cracker-banner {
    top: 42%;
    max-width: min(76vw, 320px);
    padding: 10px 14px;
    gap: 10px;
    border-radius: 15px;
  }
  .cracker-banner-icon {
    font-size: 24px;
  }
  .cracker-banner-name {
    font-size: 12.5px;
  }
  .cracker-banner-cat {
    font-size: 10px;
  }
}

.modal-input {
  width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(2, 6, 23, 0.65);
  color: #f8fafc;
  font-family: inherit;
  font-size: 14px;
  outline: none;
}

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: nowrap;
  padding-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.modal-actions-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.modal-actions button {
  padding: 7px 10px;
  font-size: 11.5px;
  white-space: nowrap;
}

.lineup-select {
  width: 100%;
  min-width: 0;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(2, 6, 23, 0.72);
  color: #f8fafc;
  font-family: inherit;
  font-size: 12px;
  outline: none;
}

.lineup-row {
  display: grid;
  grid-template-columns: 76px 98px minmax(0, 1fr) 32px;
  gap: 8px;
  align-items: center;
  flex-wrap: nowrap;
}

.lineup-label {
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  white-space: nowrap;
}

.lineup-row-remove {
  width: 32px;
  height: 32px;
  padding: 0;
  justify-content: center;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1;
  flex-shrink: 0;
  background: rgba(127, 29, 29, 0.45);
  border-color: rgba(248, 113, 113, 0.35);
  box-shadow: none;
}

.lineup-row-remove:hover:not(:disabled) {
  background: rgba(185, 28, 28, 0.75);
  border-color: rgba(252, 165, 165, 0.65);
}

.lineup-row-remove:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.lineup-text-wrap {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 9px;
  border-radius: 9px;
  background: rgba(245, 158, 11, 0.10);
  border: 1px solid rgba(251, 191, 36, 0.34);
}

.lineup-text-wrap.hidden {
  display: none;
}

.lineup-text-label {
  font-size: 11.5px;
  font-weight: 700;
  color: #fde68a;
  white-space: nowrap;
  flex-shrink: 0;
}

.lineup-text-input {
  flex: 1;
  min-width: 0;
  padding: 5px 8px;
  border-radius: 7px;
  border: 1px solid rgba(251, 191, 36, 0.38);
  background: rgba(2, 6, 23, 0.78);
  color: #f8fafc;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  outline: none;
}

.lineup-text-input:focus {
  border-color: rgba(253, 224, 71, 0.85);
  box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.18);
}

.hint {
  position: absolute;
  bottom: max(2px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  line-height: 1.1;
  color: rgba(148, 163, 184, 0.66);
  pointer-events: none;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

@media (pointer: coarse) {
  input[type="range"] {
    height: 7px;
  }
  input[type="range"]::-webkit-slider-thumb {
    width: 22px;
    height: 22px;
  }
  input[type="range"]::-moz-range-thumb {
    width: 22px;
    height: 22px;
  }
}

@media (max-width: 1024px) and (min-width: 769px) {
  .hud-bar {
    top: max(12px, env(safe-area-inset-top));
    left: max(12px, env(safe-area-inset-left));
    right: max(12px, env(safe-area-inset-right));
    gap: 8px;
  }
  .cracker-menu {
    top: calc(92px + env(safe-area-inset-top));
    left: max(12px, env(safe-area-inset-left));
    width: 214px;
    max-height: calc(100dvh - 188px);
  }
  .settings-panel {
    top: calc(92px + env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
    width: 214px;
    max-height: calc(100dvh - 188px);
  }
  .qty-bar {
    bottom: calc(15px + env(safe-area-inset-bottom));
  }
  .hint {
    bottom: max(2px, env(safe-area-inset-bottom));
  }
}

@media (max-width: 768px) {
  .mobile-only-btn {
    display: inline-flex;
  }
  .desktop-only-text {
    display: none;
  }
  .mobile-only-text {
    display: inline;
  }
  .drawer-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 15;
    background: rgba(3, 5, 13, 0.52);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    transition: opacity 0.2s ease;
  }
  .hud-bar {
    top: max(8px, env(safe-area-inset-top));
    left: max(8px, env(safe-area-inset-left));
    right: max(8px, env(safe-area-inset-right));
    gap: 6px;
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    z-index: 25;
  }
  .hud-left-group {
    flex: 1;
    min-width: 0;
    gap: 5px;
    overflow: hidden;
  }
  .hud-home-link {
    padding: 6px 9px;
    font-size: 10.5px;
    gap: 4px;
  }
  .hud-pill {
    flex: 1;
    min-width: 0;
    width: auto;
    padding: 6px 9px;
    gap: 5px;
    font-size: 11px;
    overflow: hidden;
  }
  #status-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .controls {
    width: auto;
    flex-shrink: 0;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 4px;
    padding-bottom: 0;
  }
  .controls::-webkit-scrollbar {
    display: none;
  }
  .controls button {
    padding: 6px 8px;
    font-size: 11.5px;
    gap: 4px;
    white-space: nowrap;
    flex-shrink: 0;
    min-height: 32px;
  }
  .controls button.hud-icon-mobile {
    width: 32px;
    min-width: 32px;
    height: 32px;
    padding: 0;
    justify-content: center;
    font-size: 14px;
  }
  .cracker-menu,
  .settings-panel {
    top: calc(48px + env(safe-area-inset-top));
    bottom: calc(50px + env(safe-area-inset-bottom));
    width: min(296px, calc(100vw - 24px));
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 12px;
    gap: 9px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(148, 163, 184, 0.28);
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.62);
    z-index: 22;
    transition: opacity 0.22s ease, transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .cracker-menu {
    left: 0;
    right: auto;
    width: min(296px, calc(100vw - 28px));
    border-radius: 0 16px 16px 0;
    border-left: none;
    transform: translateX(0);
  }
  .cracker-menu.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-106%);
  }
  .settings-panel {
    right: 0;
    left: auto;
    width: min(304px, calc(100vw - 28px));
    border-radius: 16px 0 0 16px;
    border-right: none;
    transform: translateX(0);
  }
  .settings-panel.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(106%);
  }
  .side-drawer-tab {
    top: calc(58px + env(safe-area-inset-top));
    padding: 9px 5px;
    min-width: 28px;
    z-index: 16;
  }
  .side-drawer-tab .drawer-tab-label {
    display: none;
  }
  .side-drawer-tab.drawer-open,
  .side-drawer-tab.mobile-drawer-hidden {
    opacity: 0;
    pointer-events: none;
  }
  .panel-close-btn {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
  .cracker-menu-title,
  .settings-header {
    font-size: 12px;
  }
  .cracker-search {
    padding: 10px 12px;
    font-size: 16px;
    border-radius: 11px;
  }
  .cracker-list {
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 120px;
    gap: 6px;
  }
  .acc-header {
    padding: 10px 11px;
    font-size: 13px;
    min-height: 42px;
  }
  .acc-header-left {
    gap: 7px;
    min-width: 0;
    overflow: hidden;
  }
  .acc-header-right {
    gap: 6px;
    flex-shrink: 0;
  }
  .cat-auto-icon-btn {
    padding: 5px 8px;
    font-size: 11px;
    min-width: 28px;
    min-height: 26px;
    justify-content: center;
  }
  .acc-body {
    padding: 7px;
    margin: 0;
    gap: 5px;
  }
  .cracker-btn {
    width: 100%;
    padding: 9px 11px;
    font-size: 13px;
    border-radius: 10px;
    min-height: 40px;
  }
  .settings-tabs {
    gap: 3px;
    padding: 3px;
  }
  .settings-tab {
    padding: 8px 2px;
    font-size: 11px;
    white-space: nowrap;
    min-height: 34px;
  }
  .ctrl-text-input {
    font-size: 16px;
    padding: 8px 10px;
  }
  .ctrl-count-pill {
    height: 28px;
    font-size: 12px;
  }
  .ctrl-color-chip {
    height: 30px;
  }
  .ctrl-toggle-btn {
    padding: 8px 4px;
    font-size: 11.5px;
  }
  .slider-row {
    gap: 8px;
  }
  .slider-label,
  .slider-val {
    font-size: 13px;
  }
  .lineup-select {
    font-size: 16px;
    padding: 9px 10px;
    min-height: 40px;
  }
  .mini-btn {
    padding: 10px 12px;
    font-size: 13px;
    min-height: 40px;
  }
  .qty-bar {
    bottom: 0;
    gap: 4px;
    padding: 5px 8px calc(5px + env(safe-area-inset-bottom));
    border-radius: 14px 14px 0 0;
    border-bottom: none;
    flex-wrap: nowrap;
    justify-content: flex-start;
    max-width: 100vw;
    z-index: 25;
  }
  .qty-bar-group {
    flex-shrink: 0;
    gap: 4px;
    padding: 0;
  }
  .qty-bar-divider {
    height: 16px;
  }
  .qty-stepper {
    display: none;
  }
  .step-btn {
    padding: 2px 7px;
    font-size: 12px;
    min-height: 22px;
  }
  .multi-btn {
    height: 28px;
    padding: 0 8px;
    font-size: 11px;
  }
  .multi-btn.qty-icon-mobile {
    width: 28px;
    min-width: 28px;
    height: 28px;
    padding: 0;
    justify-content: center;
    font-size: 14px;
  }
  .autoshow-combo {
    height: 28px;
  }
  .autoshow-combo-main.qty-icon-mobile {
    width: 28px;
    min-width: 28px;
    height: 28px;
    padding: 0;
    justify-content: center;
    font-size: 13px;
  }
  .autoshow-cat-select {
    height: 28px;
    padding: 0 16px 0 6px;
    font-size: 11px;
  }
  .qty-num {
    width: 24px;
    font-size: 11.5px;
  }
  .hint {
    bottom: max(2px, env(safe-area-inset-bottom));
    font-size: 9.5px;
    max-width: calc(100vw - 14px);
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .modal-card {
    padding: 15px;
    gap: 11px;
  }
  .lineup-row {
    grid-template-columns: 64px 96px minmax(0, 1fr) 36px;
    gap: 6px;
  }
  .lineup-label {
    font-size: 12px;
  }
  .lineup-row-remove {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }
  .modal-actions {
    gap: 6px;
    flex-wrap: wrap;
  }
  .modal-actions button {
    padding: 9px 11px;
    font-size: 12.5px;
    min-height: 38px;
  }
}

@media (max-width: 768px) and (orientation: portrait) {
  .qty-bar {
    left: 0;
    right: 0;
    bottom: 0;
    transform: none;
    width: 100%;
    max-width: none;
    border-radius: 14px 14px 0 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
    justify-content: space-between;
    padding: 6px max(10px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
    gap: 6px;
  }
  .qty-bar-group {
    gap: 6px;
  }
  .qty-bar-group--auto {
    flex: 1;
    min-width: 0;
    justify-content: center;
    gap: 6px;
  }
  .autoshow-combo {
    flex: 1;
    min-width: 0;
    height: 34px;
  }
  .autoshow-combo-main.qty-icon-mobile {
    width: 34px;
    min-width: 34px;
    height: 34px;
  }
  .autoshow-cat-btn {
    flex: 1;
    min-width: 0;
    max-width: none;
    height: 34px;
    justify-content: center;
    padding: 0 20px 0 8px;
    font-size: 12px;
  }
  .multi-btn.qty-icon-mobile {
    width: 34px;
    min-width: 34px;
    height: 34px;
  }
  .qty-bar-divider {
    height: 20px;
  }
}

@media (max-width: 960px) and (orientation: landscape) {
  .controls {
    gap: 10px;
  }
  .qty-bar {
    bottom: 0;
    gap: 14px;
    padding: 5px 12px calc(5px + env(safe-area-inset-bottom));
    border-radius: 14px 14px 0 0;
    border-bottom: none;
  }
  .qty-bar-group {
    gap: 10px;
  }
}

@media (max-width: 540px) {
  .hud-pill {
    display: none;
  }
  .controls {
    gap: 3px;
  }
  .controls button {
    padding: 5px 8px;
    font-size: 11px;
    min-height: 30px;
  }
  .controls button.hud-icon-mobile {
    width: 30px;
    min-width: 30px;
    height: 30px;
    font-size: 13.5px;
  }
}

@media (max-width: 390px) {
  .hud-home-link {
    padding: 5px 7px;
    font-size: 10px;
  }
  .controls {
    gap: 2.5px;
  }
  .controls button {
    padding: 5px 7px;
    font-size: 10.5px;
    min-height: 28px;
  }
  .controls button.hud-icon-mobile {
    width: 28px;
    min-width: 28px;
    height: 28px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .lineup-row {
    grid-template-columns: minmax(0, 1fr) 32px;
    gap: 6px;
    padding: 8px;
    border-radius: 10px;
    background: rgba(30, 41, 59, 0.45);
    border: 1px solid rgba(148, 163, 184, 0.14);
  }
  .lineup-label {
    grid-column: 1 / 2;
  }
  .lineup-row-remove {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
  }
  .lineup-row .lineup-select {
    grid-column: 1 / -1;
  }
  .modal-actions {
    justify-content: center;
  }
  .modal-actions-group {
    width: 100%;
    justify-content: space-between;
  }
  .modal-actions-group button {
    flex: 1;
    justify-content: center;
  }
}

@media (max-height: 540px) and (orientation: landscape) {
  .mobile-only-btn {
    display: inline-flex;
  }
  .desktop-only-text {
    display: none;
  }
  .mobile-only-text {
    display: inline;
  }
  .drawer-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 15;
    background: rgba(3, 5, 13, 0.48);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
  }
  .hud-bar {
    top: max(6px, env(safe-area-inset-top));
    left: max(8px, env(safe-area-inset-left));
    right: max(8px, env(safe-area-inset-right));
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
    z-index: 25;
  }
  .hud-pill {
    width: auto;
    max-width: 30vw;
    padding: 5px 10px;
    font-size: 11px;
    overflow: hidden;
  }
  #status-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .controls {
    width: auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 10px;
  }
  .controls button {
    padding: 5px 9px;
    font-size: 11px;
    min-height: 30px;
    gap: 4px;
    white-space: nowrap;
  }
  .controls button.hud-icon-mobile {
    width: 30px;
    min-width: 30px;
    height: 30px;
    padding: 0;
    justify-content: center;
    font-size: 13px;
  }
  .cracker-menu,
  .settings-panel {
    top: calc(42px + env(safe-area-inset-top));
    bottom: calc(46px + env(safe-area-inset-bottom));
    max-height: none;
    margin: 0;
    padding: 8px 9px;
    gap: 5px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(148, 163, 184, 0.28);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
    z-index: 22;
    transition: opacity 0.2s ease, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .cracker-menu {
    left: 0;
    right: auto;
    width: min(262px, 44vw);
    border-radius: 0 14px 14px 0;
    border-left: none;
    transform: translateX(0);
  }
  .cracker-menu.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-106%);
  }
  .settings-panel {
    right: 0;
    left: auto;
    width: min(276px, 46vw);
    border-radius: 14px 0 0 14px;
    border-right: none;
    transform: translateX(0);
  }
  .settings-panel.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(106%);
  }
  .side-drawer-tab {
    top: calc(48px + env(safe-area-inset-top));
    padding: 7px 4px;
    min-width: 26px;
    z-index: 16;
  }
  .side-drawer-tab .drawer-tab-label {
    display: none;
  }
  .side-drawer-tab.drawer-open,
  .side-drawer-tab.mobile-drawer-hidden {
    opacity: 0;
    pointer-events: none;
  }
  .panel-close-btn {
    width: 26px;
    height: 26px;
    font-size: 12px;
  }
  .cracker-menu-title,
  .settings-header {
    font-size: 10.5px;
  }
  .cracker-search {
    padding: 5px 8px;
    font-size: 13px;
    border-radius: 8px;
  }
  .cracker-list {
    gap: 4px;
    min-height: 0;
  }
  .acc-header {
    padding: 6px 8px;
    font-size: 11.5px;
    min-height: 30px;
  }
  .acc-body {
    gap: 4px;
    padding: 5px;
    margin: 0;
  }
  .cracker-btn {
    padding: 5px 8px;
    font-size: 11.5px;
    min-height: 28px;
    border-radius: 7px;
  }
  .cat-auto-icon-btn {
    padding: 3px 6px;
    font-size: 10.5px;
    min-width: 24px;
    min-height: 22px;
  }
  .qty-bar {
    bottom: 0;
    gap: 14px;
    padding: 5px 12px calc(5px + env(safe-area-inset-bottom));
    border-radius: 14px 14px 0 0;
    border-bottom: none;
    z-index: 25;
  }
  .qty-bar-group {
    gap: 10px;
  }
  .qty-stepper {
    display: none;
  }
  .multi-btn.qty-icon-mobile {
    width: 30px;
    min-width: 30px;
    height: 30px;
    padding: 0;
    justify-content: center;
    font-size: 13px;
  }
  .autoshow-combo {
    height: 30px;
  }
  .autoshow-combo-main.qty-icon-mobile {
    width: 30px;
    min-width: 30px;
    height: 30px;
    padding: 0;
    justify-content: center;
    font-size: 12px;
  }
  .autoshow-cat-select {
    height: 30px;
    padding: 0 20px 0 9px;
    font-size: 11px;
  }
  .hint {
    bottom: max(1px, env(safe-area-inset-bottom));
    font-size: 9px;
  }
}

/* ==========================================================================
   Capture (Video / GIF / Snapshot) & Social Share UI
   ========================================================================== */
.capture-hud-btn.recording {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.92), rgba(220, 38, 38, 0.92)) !important;
  border-color: rgba(252, 165, 165, 0.85) !important;
  color: #ffffff !important;
  box-shadow: 0 0 18px rgba(239, 68, 68, 0.55);
  animation: recBtnPulse 1.2s ease-in-out infinite;
}

@keyframes recBtnPulse {
  0%, 100% { box-shadow: 0 0 12px rgba(239, 68, 68, 0.48); }
  50% { box-shadow: 0 0 22px rgba(248, 113, 113, 0.82); }
}

.capture-popover {
  position: fixed;
  top: calc(58px + env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  width: min(290px, calc(100vw - 24px));
  z-index: 45;
  padding: 12px;
  border-radius: 16px;
  background: linear-gradient(155deg, rgba(15, 23, 42, 0.86), rgba(9, 13, 28, 0.92));
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
}

.capture-popover.hidden {
  display: none;
}

.capture-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: 0.01em;
}

.capture-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.capture-opt-btn {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(30, 41, 59, 0.55);
  color: #f8fafc;
  text-align: left;
  cursor: pointer;
  transition: transform 0.14s ease, background 0.16s ease, border-color 0.16s ease;
}

.capture-opt-btn:hover {
  background: rgba(51, 65, 85, 0.78);
  border-color: rgba(251, 191, 36, 0.52);
  transform: translateY(-1px);
}

.capture-opt-ico {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
}

.capture-opt-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.capture-opt-copy strong {
  font-size: 13px;
  font-weight: 700;
  color: #f8fafc;
}

.capture-opt-copy small {
  font-size: 11px;
  color: #94a3b8;
}

.rec-indicator {
  position: fixed;
  top: calc(60px + env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 42;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px 7px 14px;
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.84);
  border: 1px solid rgba(248, 113, 113, 0.55);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45), 0 0 20px rgba(239, 68, 68, 0.25);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  max-width: calc(100vw - 24px);
}

.rec-indicator.hidden {
  display: none;
}

.rec-indicator.encoding {
  border-color: rgba(251, 191, 36, 0.6);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45), 0 0 20px rgba(251, 191, 36, 0.22);
}

.rec-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 10px #ef4444;
  flex-shrink: 0;
  animation: recDotBlink 0.9s ease-in-out infinite;
}

.rec-indicator.encoding .rec-dot {
  background: #f59e0b;
  box-shadow: 0 0 10px #f59e0b;
}

@keyframes recDotBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}

.rec-indicator-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 118px;
}

.rec-status-text {
  font-size: 12px;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.rec-progress-track {
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.25);
  overflow: hidden;
}

.rec-progress-track.hidden {
  display: none;
}

.rec-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #f59e0b, #ef4444);
  transition: width 0.18s linear;
}

.rec-stop-btn {
  padding: 5px 11px;
  border-radius: 9999px;
  border: 1px solid rgba(252, 165, 165, 0.65);
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.12s ease, filter 0.14s ease;
}

.rec-stop-btn:hover {
  filter: brightness(1.1);
  transform: scale(1.03);
}

.rec-stop-btn.hidden {
  display: none;
}

/* Preview & Social Share Modal */
.share-modal-card {
  width: min(520px, calc(100vw - 24px));
  max-height: min(90vh, 720px);
  overflow-y: auto;
}

.share-preview-box {
  width: 100%;
  background: #020617;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  max-height: 290px;
}

.share-preview-media {
  width: 100%;
  max-height: 290px;
  object-fit: contain;
  display: block;
}

.share-preview-media.hidden {
  display: none;
}

.share-primary-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.share-primary-actions button {
  flex: 1;
  min-width: 110px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.share-native-btn {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.28), rgba(99, 102, 241, 0.34)) !important;
  border-color: rgba(56, 189, 248, 0.5) !important;
  color: #e0f2fe !important;
}

.share-native-btn.hidden {
  display: none;
}

.social-share-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.social-share-heading {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
}

.social-share-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 6px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(30, 41, 59, 0.65);
  color: #f1f5f9;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.12s ease, border-color 0.15s ease, background 0.15s ease;
}

.social-btn:hover {
  transform: translateY(-1px);
  background: rgba(51, 65, 85, 0.85);
}

.social-whatsapp:hover { border-color: rgba(37, 211, 102, 0.75); color: #86efac; }
.social-instagram:hover { border-color: rgba(236, 72, 153, 0.75); color: #fbcfe8; }
.social-tiktok:hover { border-color: rgba(34, 211, 238, 0.75); color: #a5f3fc; }
.social-x:hover { border-color: rgba(226, 232, 240, 0.75); color: #ffffff; }
.social-facebook:hover { border-color: rgba(59, 130, 246, 0.75); color: #bfdbfe; }
.social-telegram:hover { border-color: rgba(56, 189, 248, 0.75); color: #bae6fd; }
.social-reddit:hover { border-color: rgba(249, 115, 22, 0.75); color: #fed7aa; }
.social-copy:hover { border-color: rgba(251, 191, 36, 0.75); color: #fef08a; }

.share-toast {
  margin: 0;
  min-height: 16px;
  font-size: 11.5px;
  color: #fde68a;
  text-align: center;
}

@media (max-width: 520px) {
  .social-share-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .capture-popover {
    top: calc(96px + env(safe-area-inset-top));
    right: 12px;
  }
  .rec-indicator {
    top: calc(96px + env(safe-area-inset-top));
  }
}

/* ==========================================================================
   Custom Cracker Studio Modal & Saved Crackers UI
   ========================================================================== */
.create-hud-btn {
  border-color: rgba(148, 163, 184, 0.28) !important;
  background: rgba(15, 23, 42, 0.78) !important;
  color: #e2e8f0 !important;
}

.create-hud-btn:hover {
  border-color: rgba(203, 213, 225, 0.5) !important;
  background: rgba(30, 41, 59, 0.92) !important;
  color: #ffffff !important;
}

.skytext-hud-btn {
  border-color: rgba(56, 189, 248, 0.88) !important;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.42), rgba(139, 92, 246, 0.46)) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

.skytext-hud-btn:hover {
  border-color: #bae6fd !important;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.62), rgba(139, 92, 246, 0.64)) !important;
  box-shadow: 0 0 22px rgba(56, 189, 248, 0.62), inset 0 1px 0 rgba(255, 255, 255, 0.28) !important;
}

#hud-capture-menu-btn {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.9), rgba(185, 28, 28, 0.92)) !important;
  border-color: rgba(248, 113, 113, 0.82) !important;
  color: #ffffff !important;
  box-shadow: 0 0 12px rgba(220, 38, 38, 0.42);
}

#hud-capture-menu-btn:hover {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  border-color: #fca5a5 !important;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.6);
}

.skytext-modal-card {
  width: min(600px, calc(100vw - 20px));
  padding: 14px 16px !important;
  gap: 9px !important;
  overflow-x: hidden;
  overflow-y: auto;
  max-height: 94vh;
}

.skytext-random-highlight-btn {
  padding: 5px 11px;
  border-radius: 9999px;
  border: 1px solid rgba(192, 132, 252, 0.85);
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.45), rgba(56, 189, 248, 0.45));
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.4);
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.12s ease, box-shadow 0.16s ease;
}

.skytext-random-highlight-btn:hover {
  border-color: #e9d5ff;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.7), rgba(56, 189, 248, 0.65));
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.62);
  transform: translateY(-1px);
}

.skytext-preview {
  position: relative;
  height: 196px;
  padding: 0;
  border-radius: 11px;
  background: radial-gradient(circle at 50% 45%, #0f172a, #020617);
  border: 1px solid rgba(56, 189, 248, 0.32);
  overflow: hidden;
  flex-shrink: 0;
}

@media (max-height: 700px) {
  .skytext-preview {
    height: 150px;
  }
}

.skytext-preview-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.skytext-preview-badge {
  position: absolute;
  top: 6px;
  right: 8px;
  padding: 2px 7px;
  border-radius: 9999px;
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: #bae6fd;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  pointer-events: none;
}

.skytext-mode-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 3px;
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.24);
}

.skytext-mode-btn {
  padding: 6px 6px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: #94a3b8;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.skytext-mode-btn:hover {
  color: #e2e8f0;
  background: rgba(30, 41, 59, 0.55);
}

.skytext-mode-btn.active {
  color: #f8fafc;
  background: rgba(51, 65, 85, 0.85);
  border-color: rgba(148, 163, 184, 0.48);
  box-shadow: none;
}

.skytext-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.skytext-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.skytext-add-line-btn {
  padding: 3px 9px !important;
  min-height: 24px !important;
  font-size: 11px !important;
}

.skytext-textarea {
  width: 100%;
  min-height: 54px;
  max-height: 92px;
  resize: none;
  padding: 7px 10px;
  border-radius: 9px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(2, 6, 23, 0.78);
  color: #f8fafc;
  font-family: "Orbitron", "Inter", sans-serif;
  font-size: 12.5px;
  letter-spacing: 1px;
  line-height: 1.4;
  text-transform: uppercase;
  outline: none;
  box-sizing: border-box;
}

.skytext-textarea:focus {
  border-color: rgba(56, 189, 248, 0.8);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.skytext-options-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px 8px;
}

.skytext-opt {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11px;
  color: #cbd5e1;
  min-width: 0;
}

.skytext-opt select {
  width: 100%;
  min-width: 0;
  padding: 6px 8px;
  font-size: 11.5px;
}

.skytext-toggles {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.skytext-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #e2e8f0;
  cursor: pointer;
}

.skytext-actions-stack {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 2px;
}

.skytext-actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.skytext-actions-row--secondary {
  justify-content: space-between;
}

.skytext-actions-row--secondary button {
  padding: 6px 12px;
  min-height: 32px;
  font-size: 12px;
}

.skytext-actions-row--primary {
  display: grid;
  grid-template-columns: 1fr 1.65fr;
  gap: 8px;
}

.skytext-actions-row--primary button {
  width: 100%;
  justify-content: center;
  padding: 9px 10px;
  font-size: 12.5px;
  min-height: 38px;
}

@media (max-width: 520px) {
  .skytext-options-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .skytext-actions-row--primary {
    grid-template-columns: 1fr 1.5fr;
  }
  .skytext-actions-row--primary button {
    font-size: 11.5px;
    padding: 8px 8px;
  }
}

.capture-launch-btn {
  padding: 9px 13px;
  border-radius: 10px;
  border: 1px solid rgba(251, 113, 133, 0.85);
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.85), rgba(234, 88, 12, 0.88));
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 0 16px rgba(225, 29, 72, 0.42);
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.12s ease, box-shadow 0.16s ease;
}

.capture-launch-btn:hover {
  border-color: #fda4af;
  background: linear-gradient(135deg, #f43f5e, #f97316);
  box-shadow: 0 0 22px rgba(244, 63, 94, 0.62);
  transform: translateY(-1px);
}

.rec-crop-bar {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px;
  border-radius: 9999px;
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.26);
}

.rec-crop-bar--menu {
  width: 100%;
  justify-content: space-between;
  padding: 4px 6px;
  margin-bottom: 4px;
  border-radius: 9px;
  box-sizing: border-box;
}

.skytext-rec-crop {
  margin-left: auto;
}

.rec-crop-label {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  padding: 0 4px;
}

.rec-crop-btn {
  padding: 4px 8px;
  border-radius: 9999px;
  border: 1px solid transparent;
  background: transparent;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.rec-crop-btn:hover {
  color: #f1f5f9;
  background: rgba(51, 65, 85, 0.55);
}

.rec-crop-btn.active {
  color: #ffffff;
  background: rgba(51, 65, 85, 0.92);
  border-color: rgba(148, 163, 184, 0.5);
}

.create-cracker-btn {
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(251, 191, 36, 0.48);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.24), rgba(234, 88, 12, 0.3));
  color: #fef3c7;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-shrink: 0;
  transition: transform 0.12s ease, background 0.16s ease, border-color 0.16s ease;
}

.create-cracker-btn:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.42), rgba(234, 88, 12, 0.48));
  border-color: rgba(253, 230, 138, 0.85);
  transform: translateY(-1px);
}

.cracker-btn-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
}

.cracker-btn-wrap .cracker-btn {
  flex: 1;
  min-width: 0;
}

.custom-mini-act {
  width: 24px;
  height: 24px;
  min-width: 24px;
  padding: 0;
  border-radius: 7px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(30, 41, 59, 0.65);
  color: #cbd5e1;
  font-size: 11px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.custom-mini-act:hover {
  background: rgba(51, 65, 85, 0.9);
  border-color: rgba(251, 191, 36, 0.55);
  color: #fff;
}

.custom-mini-act.danger:hover {
  background: rgba(220, 38, 38, 0.55);
  border-color: rgba(252, 165, 165, 0.7);
}

.cc-modal-card {
  width: min(640px, calc(100vw - 16px));
  max-width: 640px;
  height: min(92dvh, 620px);
  max-height: min(92dvh, 620px);
  padding: 10px 12px;
  overflow: hidden;
  gap: 6px;
}

.cc-modal-card > .modal-title,
.cc-tabs {
  flex-shrink: 0;
}

.cc-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 14px;
  line-height: 1.1;
}

.cc-header-title {
  white-space: nowrap;
}

.cc-tabs {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 3px;
  padding: 2px;
  border-radius: 9px;
  background: rgba(2, 6, 23, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.cc-tab {
  padding: 4px 10px;
  border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.cc-hdr-btn {
  padding: 4px 8px !important;
  font-size: 11px !important;
}

.cc-tab:hover {
  color: #f1f5f9;
  background: rgba(51, 65, 85, 0.35);
}

.cc-tab.active {
  background: rgba(245, 158, 11, 0.24);
  border-color: rgba(251, 191, 36, 0.52);
  color: #fef3c7;
}

.cc-pane {
  display: none;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.cc-pane.active {
  display: flex;
}

.cc-preview-box {
  position: relative;
  width: 100%;
  height: 162px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: radial-gradient(ellipse at 50% 100%, #101935 0%, #060a18 65%, #02040a 100%);
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.55);
  flex-shrink: 0;
}

.cc-subtabs {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
  padding: 3px;
  border-radius: 9px;
  background: rgba(2, 6, 23, 0.52);
  border: 1px solid rgba(148, 163, 184, 0.16);
  flex-shrink: 0;
}

.cc-subtab {
  padding: 4px 2px;
  border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  color: #94a3b8;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.cc-subtab:hover {
  color: #f1f5f9;
  background: rgba(51, 65, 85, 0.35);
}

.cc-subtab.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.28), rgba(234, 88, 12, 0.24));
  border-color: rgba(251, 191, 36, 0.55);
  color: #fef3c7;
}

.cc-preview-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.cc-preview-overlay {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}

.cc-preview-badge {
  font-size: 10.5px;
  font-weight: 700;
  color: #fde68a;
  background: rgba(2, 6, 23, 0.68);
  border: 1px solid rgba(251, 191, 36, 0.32);
  padding: 3px 8px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: calc(100% - 86px);
}

.cc-preview-replay-btn {
  pointer-events: auto;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: rgba(15, 23, 42, 0.78);
  color: #f8fafc;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.14s ease, border-color 0.14s ease;
}

.cc-preview-replay-btn:hover {
  background: rgba(245, 158, 11, 0.35);
  border-color: rgba(253, 230, 138, 0.72);
}

.cc-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 7px 8px;
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.44);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.cc-section.cc-subpane {
  display: none;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.cc-section.cc-subpane.active {
  display: flex;
}

#cc-subpane-patterns.cc-subpane,
#cc-subpane-effects.cc-subpane {
  overflow: hidden;
}

.cc-section.cc-subpane::-webkit-scrollbar,
.cc-saved-list::-webkit-scrollbar {
  width: 5px;
}

.cc-section.cc-subpane::-webkit-scrollbar-thumb,
.cc-saved-list::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.32);
  border-radius: 999px;
}

.cc-picker-toolbar {
  flex-shrink: 0;
}

.modal-actions.cc-modal-actions {
  flex-shrink: 0;
  margin-top: 0;
  padding-top: 6px;
  gap: 6px;
  flex-wrap: nowrap;
  justify-content: space-between;
}

.modal-actions.cc-modal-actions .modal-actions-group {
  width: auto;
  flex: 0 1 auto;
  gap: 5px;
  flex-wrap: nowrap;
}

.modal-actions.cc-modal-actions button {
  flex: 0 0 auto;
  width: auto;
  min-height: 28px;
  padding: 5px 10px;
  font-size: 11px;
  line-height: 1.1;
  border-radius: 8px;
}

.modal-actions.cc-modal-actions #cc-save-fire-btn {
  border-radius: 999px;
  padding: 5px 12px;
}

#cc-toast {
  flex-shrink: 0;
}

#cc-toast:empty {
  display: none;
}

.cc-name-icon-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.cc-name-compact {
  flex: 0 0 185px;
  padding: 5px 8px !important;
  font-size: 12px !important;
}

.cc-icon-bar {
  display: flex;
  align-items: center;
  gap: 3px;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 1px 0;
}

.cc-icon-bar::-webkit-scrollbar {
  display: none;
}

.cc-icon-pill {
  width: 24px;
  height: 24px;
  min-width: 24px;
  padding: 0;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.65);
  font-size: 12.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.12s ease, border-color 0.14s ease, background 0.14s ease;
}

.cc-icon-pill:hover {
  border-color: rgba(251, 191, 36, 0.58);
  transform: translateY(-1px);
}

.cc-icon-pill.active {
  background: rgba(245, 158, 11, 0.28);
  border-color: #fbbf24;
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.4);
}

.cc-picker-toolbar {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 5px;
}

.cc-picker-toolbar .cc-slot-switch {
  flex: 1 1 auto;
  min-width: 0;
}

.cc-picker-toolbar .cc-mini-search {
  flex: 0 0 170px;
  width: 170px;
  padding: 4px 8px;
  font-size: 11px;
}

.cc-slot-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.cc-color-mode-bar {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cc-color-mode-bar .cc-slot-btn {
  justify-content: center;
  text-align: center;
}

.cc-color-panel.hidden {
  display: none;
}

.cc-color-count-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.cc-color-count-pills {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 5px;
}

.cc-count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5px 0;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.68);
  color: #cbd5e1;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease, transform 0.12s ease;
}

.cc-count-pill:hover {
  border-color: rgba(251, 191, 36, 0.58);
  color: #f8fafc;
  transform: translateY(-1px);
}

.cc-count-pill.active {
  background: rgba(245, 158, 11, 0.25);
  border-color: #fbbf24;
  color: #fef3c7;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.35);
}

.cc-color-slot {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.cc-color-slot-idx {
  font-size: 9.5px;
  font-weight: 700;
  color: #94a3b8;
  line-height: 1;
}

.cc-single-picker-wrap {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
}

.cc-single-picker-wrap input[type="color"] {
  width: 38px;
  height: 30px;
  padding: 2px;
  border-radius: 8px;
  border: 1px solid rgba(251, 191, 36, 0.55);
  background: rgba(15, 23, 42, 0.85);
  cursor: pointer;
}

.cc-single-swatches {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.cc-single-swatch {
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.cc-single-swatch:hover {
  transform: scale(1.12);
}

.cc-single-swatch.active {
  border-color: #ffffff;
  transform: scale(1.14);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.75);
}

.cc-rainbow-preview-bar {
  height: 22px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ef4444, #f97316, #fde047, #22c55e, #38bdf8, #a855f7, #f472b6);
  border: 1px solid rgba(255, 255, 255, 0.32);
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.32);
}

.cc-slot-btn {
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.65);
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.cc-slot-btn.active {
  background: rgba(245, 158, 11, 0.22);
  border-color: rgba(251, 191, 36, 0.65);
  color: #fef3c7;
}

.cc-slot-btn.hidden {
  display: none;
}

.cc-mini-search {
  padding: 5px 9px;
  font-size: 11.5px;
}

.cc-visual-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.cc-visual-grid--types {
  overflow: visible;
}

.cc-visual-grid--styles {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.cc-visual-grid--scroll {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  align-content: start;
  padding-right: 3px;
}

.cc-visual-grid::-webkit-scrollbar {
  width: 5px;
}

.cc-visual-grid::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.3);
  border-radius: 999px;
}

.cc-visual-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.72);
  color: #e2e8f0;
  cursor: pointer;
  text-align: center;
  transition: transform 0.12s ease, border-color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease;
}

.cc-visual-card:hover {
  border-color: rgba(251, 191, 36, 0.55);
  background: rgba(30, 41, 59, 0.85);
  transform: translateY(-1px);
}

.cc-visual-card.active {
  border-color: #fbbf24;
  background: rgba(245, 158, 11, 0.22);
  color: #fef3c7;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.35);
}

.cc-thumb-img {
  width: 100%;
  aspect-ratio: 72 / 42;
  border-radius: 6px;
  object-fit: cover;
  display: block;
  background: #030712;
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.cc-visual-card-label {
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1.15;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cc-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.cc-style-chip {
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.68);
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.cc-style-chip:hover {
  border-color: rgba(251, 191, 36, 0.55);
  color: #f8fafc;
}

.cc-style-chip.active {
  background: rgba(245, 158, 11, 0.25);
  border-color: #fbbf24;
  color: #fef3c7;
}

@media (max-width: 520px) {
  .cc-header-bar {
    flex-wrap: wrap;
    gap: 5px;
  }
  .cc-name-icon-row {
    flex-direction: column;
    align-items: stretch;
  }
  .cc-name-compact {
    flex: 1 1 auto;
    width: 100%;
  }
  .cc-picker-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .cc-picker-toolbar .cc-mini-search {
    flex: 1 1 auto;
    width: 100%;
  }
  .cc-subtabs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .cc-visual-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .cc-visual-grid--styles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cc-subtab {
    font-size: 10px;
    padding: 4px 2px;
  }
}

.cc-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fde68a;
}

.cc-field-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.cc-field-grow {
  flex: 1;
  min-width: 0;
}

.cc-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.cc-grid-2.hidden,
.cc-field.hidden {
  display: none;
}

.cc-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.cc-field-span2 {
  grid-column: 1 / -1;
}

.cc-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  color: #cbd5e1;
}

.cc-input {
  width: 100%;
  padding: 7px 10px;
  border-radius: 9px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.85);
  color: #f8fafc;
  font-family: inherit;
  font-size: 12.5px;
  outline: none;
}

.cc-input:focus {
  border-color: rgba(251, 191, 36, 0.72);
}

.cc-icon-select {
  width: 68px;
  text-align: center;
  font-size: 15px;
}

.cc-color-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.cc-color-pickers {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.cc-color-pickers input[type="color"] {
  width: 32px;
  height: 28px;
  padding: 2px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.85);
  cursor: pointer;
}

.cc-palette-presets {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.cc-preset-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 6px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(30, 41, 59, 0.68);
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.14s ease;
}

.cc-preset-chip:hover {
  border-color: rgba(251, 191, 36, 0.7);
  transform: translateY(-1px);
}

.cc-preset-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.cc-sliders-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 12px;
}

.cc-slider {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.cc-toggles-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.cc-toggles-row.hidden {
  display: none;
}

.cc-sfx-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.cc-sfx-presets {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.cc-sfx-preset-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.72);
  color: #e2e8f0;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease, transform 0.12s ease;
}

.cc-sfx-preset-btn:hover {
  border-color: rgba(251, 191, 36, 0.65);
  color: #fef3c7;
  transform: translateY(-1px);
}

.cc-sfx-preset-btn.active {
  background: rgba(245, 158, 11, 0.26);
  border-color: #fbbf24;
  color: #fef3c7;
}

.cc-sfx-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  overflow-y: auto;
  padding-right: 2px;
}

.cc-sfx-card {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 7px 8px;
  border-radius: 9px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.72);
  color: #e2e8f0;
  text-align: left;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease, transform 0.12s ease;
}

.cc-sfx-card:hover {
  border-color: rgba(251, 191, 36, 0.55);
  background: rgba(30, 41, 59, 0.85);
  transform: translateY(-1px);
}

.cc-sfx-card.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.24), rgba(234, 88, 12, 0.18));
  border-color: #fbbf24;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.28);
}

.cc-sfx-ico {
  font-size: 16px;
  line-height: 1.1;
  flex-shrink: 0;
}

.cc-sfx-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.cc-sfx-title {
  font-size: 11px;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.cc-sfx-card.active .cc-sfx-title {
  color: #fef3c7;
}

.cc-sfx-check {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(2, 6, 23, 0.55);
  color: transparent;
  font-size: 9px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cc-sfx-card.active .cc-sfx-check {
  background: #f59e0b;
  border-color: #fef08a;
  color: #020617;
}

.cc-sfx-desc {
  font-size: 9.5px;
  color: #94a3b8;
  line-height: 1.25;
}

.cc-sfx-card.active .cc-sfx-desc {
  color: #fde68a;
}

@media (max-width: 560px) {
  .cc-sfx-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.cc-toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(30, 41, 59, 0.6);
  color: #e2e8f0;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.cc-toggle-pill input[type="checkbox"] {
  accent-color: #f59e0b;
  cursor: pointer;
}

.cc-toggle-pill:has(input:checked) {
  background: rgba(245, 158, 11, 0.22);
  border-color: rgba(251, 191, 36, 0.58);
  color: #fef3c7;
}

.cc-saved-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-right: 2px;
}

#cc-pane-saved .modal-actions {
  flex-shrink: 0;
  padding-top: 6px;
}

#cc-pane-saved .modal-actions button {
  min-height: 28px;
  padding: 5px 12px;
  font-size: 11px;
}

@media (max-height: 700px) {
  .cc-preview-box {
    height: 138px;
  }
}

@media (max-height: 580px) {
  .cc-preview-box {
    height: 118px;
  }
}

.cc-saved-empty {
  padding: 28px 16px;
  text-align: center;
  color: #94a3b8;
  font-size: 12.5px;
  border-radius: 12px;
  border: 1px dashed rgba(148, 163, 184, 0.28);
  background: rgba(2, 6, 23, 0.35);
}

.cc-saved-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 11px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.cc-saved-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.cc-saved-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: #f8fafc;
}

.cc-saved-meta {
  font-size: 11px;
  color: #94a3b8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cc-saved-actions {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.cc-saved-actions button {
  padding: 5px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 640px), (max-height: 540px) and (orientation: landscape) {
  #custom-cracker-modal.modal-backdrop {
    padding: 0;
    align-items: stretch;
    justify-content: stretch;
  }
  #custom-cracker-modal .cc-modal-card {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100dvh;
    border-radius: 0;
    border: none;
    box-shadow: none;
    padding: calc(8px + env(safe-area-inset-top)) calc(10px + env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) calc(10px + env(safe-area-inset-left));
  }
}

@media (max-width: 560px) {
  .cc-grid-2,
  .cc-sliders-grid {
    grid-template-columns: 1fr;
  }
  .cc-saved-card {
    flex-direction: column;
    align-items: stretch;
  }
  .cc-saved-actions {
    justify-content: flex-end;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   Sponsored Ad Hoarding Contact & Inquiry Modal
   ========================================================================== */
.sponsor-modal-card {
  width: min(520px, calc(100vw - 20px));
  max-height: min(92dvh, 680px);
  overflow-y: auto;
  gap: 10px;
}

.sponsor-contact-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(30, 27, 75, 0.72), rgba(15, 23, 42, 0.88));
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.sponsor-contact-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sponsor-contact-heading {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fde047;
}

.sponsor-edit-link {
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(251, 191, 36, 0.4);
  background: rgba(15, 23, 42, 0.65);
  color: #fef3c7;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
}

.sponsor-edit-link:hover {
  background: rgba(245, 158, 11, 0.25);
  border-color: #fbbf24;
}

.sponsor-contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.sponsor-contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 9px;
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.62);
  border: 1px solid rgba(148, 163, 184, 0.22);
  min-width: 0;
}

.sponsor-contact-ico {
  font-size: 17px;
  line-height: 1;
  flex-shrink: 0;
}

.sponsor-contact-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.sponsor-contact-label {
  font-size: 10px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sponsor-contact-val {
  font-size: 12px;
  font-weight: 700;
  color: #38bdf8;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sponsor-contact-val:hover {
  color: #fde047;
  text-decoration: underline;
}

.sponsor-copy-btn {
  flex: 0 0 auto !important;
  padding: 4px 8px !important;
  font-size: 10.5px !important;
  border-radius: 7px !important;
}

.sponsor-owner-editor {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(148, 163, 184, 0.28);
}

.sponsor-owner-editor.hidden {
  display: none;
}

.sponsor-owner-editor-actions {
  display: flex;
  justify-content: flex-end;
}

.sponsor-owner-editor-actions button {
  padding: 5px 12px;
  font-size: 11px;
  border-radius: 8px;
}

.sponsor-inquiry-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.52);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.sponsor-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.sponsor-textarea {
  resize: vertical;
  min-height: 48px;
  max-height: 110px;
}

.sponsor-preview-toggle {
  align-self: flex-start;
  font-size: 11px;
}

@media (max-width: 960px) and (orientation: landscape) {
  .controls {
    gap: 10px;
  }
  .qty-bar {
    bottom: 0;
    gap: 14px;
    padding: 5px 12px calc(5px + env(safe-area-inset-bottom));
    border-radius: 14px 14px 0 0;
    border-bottom: none;
  }
  .qty-bar-group {
    gap: 10px;
  }
}

@media (max-width: 540px) {
  .sponsor-contact-grid,
  .sponsor-form-grid {
    grid-template-columns: 1fr;
  }
}
