/* ===== Keixin Color Switcher ===== */
/* Hidden in production. Remove the two lines below to re-enable. */
#style-switcher,
#switcher-toggle { display: none !important; }

/* Toggle Button — always visible on the right edge */
#switcher-toggle {
  position: fixed;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  z-index: 99999;
  width: 44px;
  height: 44px;
  background: var(--gold-mid, #1976D2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 6px 0 0 6px;
  font-size: 18px;
  box-shadow: -3px 0 12px rgba(0,0,0,0.3);
  transition: background 0.3s;
}

#switcher-toggle i {
  animation: switcher-spin 4s linear infinite;
}

@keyframes switcher-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Panel — slides in from right */
#switcher-panel {
  position: fixed;
  top: 50%;
  right: 44px;
  transform: translateY(-50%) translateX(105%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 99998;
  background: #1a1a1a;
  width: 270px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: -4px 0 24px rgba(0,0,0,0.5);
  border-radius: 10px 0 0 10px;
  font-family: 'Noto Sans JP', sans-serif;
}

#style-switcher.open #switcher-panel {
  transform: translateY(-50%) translateX(0);
}

/* Header */
.switcher-header {
  background: var(--gold-mid, #1976D2);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
}

.switcher-header h6 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#switcher-close {
  background: rgba(255,255,255,0.2);
  border: none;
  color: #fff;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

#switcher-close:hover {
  background: rgba(255,255,255,0.35);
}

/* Sections */
.switcher-section {
  padding: 14px 16px;
  border-bottom: 1px solid #2a2a2a;
}

.switcher-section:last-child {
  border-bottom: none;
}

.switcher-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #888;
  margin: 0 0 10px 0;
}

/* Color Swatches */
.color-swatches {
  list-style: none;
  padding: 0;
  margin: 0 0 12px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.color-swatches li { margin: 0; }

.swatch {
  display: block;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid transparent;
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
  transition: transform 0.2s, border-color 0.2s;
  cursor: pointer;
  text-decoration: none;
}

.swatch:hover { transform: scale(1.15); }

.swatch.active {
  border-color: #fff;
  transform: scale(1.1);
}

/* Custom Color */
.custom-color-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.custom-color-wrap label {
  font-size: 12px;
  color: #aaa;
  font-weight: 600;
  margin: 0;
}

#custom-color-input {
  width: 48px;
  height: 30px;
  border: 2px solid #444;
  border-radius: 6px;
  padding: 2px;
  cursor: pointer;
  background: #222;
}

/* Language Toggle */
.lang-btns {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.lang-btn {
  flex: 1;
  min-width: 60px;
  padding: 7px 4px;
  border: 2px solid #333;
  background: #252525;
  color: #aaa;
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  text-align: center;
}

.lang-btn.active {
  background: var(--gold-mid, #1976D2);
  border-color: var(--gold-mid, #1976D2);
  color: #fff;
}

.lang-btn:hover:not(.active) {
  border-color: #555;
  background: #333;
  color: #ccc;
}

/* Reset Button */
#switcher-reset {
  width: 100%;
  padding: 9px;
  background: #252525;
  border: 2px solid #333;
  color: #aaa;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
  transition: all 0.2s;
}

#switcher-reset:hover {
  background: #333;
  border-color: #555;
  color: #eee;
}
