/* Home customizer — wallpaper, icons, labels via double-tap */

.home .wallpaper.cust-has-image {
  background: var(--cust-wp) center/cover no-repeat !important;
}

.home .app-item .icon.cust-has-image {
  background: var(--cust-icon-bg) center/cover no-repeat !important;
  color: transparent !important;
  font-size: 0 !important;
}
.home .app-item .icon.cust-has-image > * { display: none !important; }
.home .app-item .icon.cust-has-image::before,
.home .app-item .icon.cust-has-image::after { content: none !important; }

.home .app-item.cust-tappable { cursor: pointer; }

.home .app-item.cust-has-size {
  font-size: var(--cust-label-size) !important;
}
.home .app-item.cust-has-size > span:last-child {
  white-space: normal !important;
  word-break: break-word;
  text-align: center;
  line-height: 1.1;
  max-width: 200px;
}

.cust-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
.cust-modal.open { display: flex; }

.cust-backdrop {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.cust-card {
  position: relative;
  background: #1c1f2a;
  color: #fff;
  border-radius: 24px;
  padding: 22px 22px 18px;
  width: min(420px, 90vw);
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  box-sizing: border-box;
}

.cust-title {
  margin: 0 0 14px;
  font-size: 19px;
  font-weight: 600;
  text-align: center;
}

.cust-subtitle {
  margin: -8px 0 16px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
}

.cust-preview-wrap {
  display: flex;
  justify-content: center;
  margin: 0 0 18px;
}

.cust-preview {
  width: 168px;
  height: 168px;
  border-radius: 24px;
  background-color: #2a2d38;
  background-size: cover;
  background-position: center;
  border: 2px dashed rgba(255, 255, 255, 0.18);
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.4);
  font-size: 13px;
  text-align: center;
  padding: 8px;
  box-sizing: border-box;
}
.cust-preview.wallpaper {
  width: 220px;
  height: 168px;
  border-radius: 16px;
}
.cust-preview.has-image {
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.12);
  color: transparent;
}

.cust-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.cust-row > span {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 500;
}

.cust-checkrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  cursor: pointer;
  user-select: none;
}
.cust-checkrow input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #5b8bff;
  cursor: pointer;
  margin: 0;
}
.cust-checkrow span {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}
.cust-input {
  background: #2a2d38;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 16px;
  outline: none;
  font-family: inherit;
  box-sizing: border-box;
  width: 100%;
}
.cust-input:focus { border-color: #5b8bff; }

.cust-size-row .cust-row-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.cust-size-row .cust-size-value {
  color: #93b1ff;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.cust-size-input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  width: 100%;
  height: 28px;
  padding: 0;
  border: 0;
  margin: 0;
}
.cust-size-input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  background: #2a2d38;
  border-radius: 3px;
}
.cust-size-input[type="range"]::-moz-range-track {
  height: 6px;
  background: #2a2d38;
  border-radius: 3px;
}
.cust-size-input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  background: linear-gradient(135deg, #6a8fff, #4d6dff);
  border-radius: 50%;
  margin-top: -8px;
  cursor: pointer;
  border: 2px solid #1c1f2a;
}
.cust-size-input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: linear-gradient(135deg, #6a8fff, #4d6dff);
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid #1c1f2a;
}

.cust-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.cust-actions.three { grid-template-columns: 1fr 1fr; }
.cust-actions-bottom { margin-top: 14px; }

.cust-btn {
  background: #2a2d38;
  color: #fff;
  border: 0;
  padding: 13px 14px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.08s ease;
  -webkit-tap-highlight-color: transparent;
}
.cust-btn:active { transform: scale(0.97); }
.cust-btn.primary {
  background: linear-gradient(135deg, #6a8fff, #4d6dff);
  color: #fff;
  font-weight: 600;
}
.cust-btn.accent {
  background: rgba(106, 143, 255, 0.16);
  color: #93b1ff;
}
.cust-btn.danger {
  background: rgba(255, 90, 90, 0.14);
  color: #ff8888;
}

.cust-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 16px 0 14px;
}

.cust-hint {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
  margin: 10px 0 0;
}
