.theme-library { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 10px; }
.theme-choice { position: relative; display: flex; align-items: center; gap: 12px; min-width: 0; padding: 10px; border: 1px solid #dce2ed; border-radius: 12px; background: #fff; color: var(--text-strong, #1e325c); text-align: left; font: inherit; cursor: pointer; }
.theme-choice:hover { border-color: var(--accent, #1c58d9); background: #f8faff; }
.theme-choice[aria-checked="true"] { border-color: var(--accent, #1c58d9); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent, #1c58d9) 18%, transparent); }
.theme-choice-delete { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border: 0; border-radius: 50%; background: rgba(30, 50, 92, 0.08); color: #5d6d84; display: flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0; pointer-events: none; transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.15s ease; padding: 0; z-index: 2; }
.theme-choice:hover .theme-choice-delete { opacity: 1; pointer-events: auto; }
.theme-choice-delete:hover { background: #e5484d; color: #ffffff; transform: scale(1.08); }
.theme-choice-delete svg { display: block; pointer-events: none; }
.theme-choice-preview { display: flex; width: 56px; height: 48px; flex: none; overflow: hidden; border-radius: 8px; background: var(--preview-sidebar); }
.theme-choice-rail { width: 12px; background: var(--preview-rail); }
.theme-choice-side { display: flex; flex: 1; flex-direction: column; gap: 4px; padding: 7px; }
.theme-choice-head { height: 7px; border-radius: 2px; background: var(--preview-head); }
.theme-choice-line { height: 6px; border-radius: 2px; background: rgba(255,255,255,.28); }
.theme-choice-line:last-child { width: 70%; background: var(--preview-accent); }
.theme-choice-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.theme-upload-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; border-top: 1px solid #edf0f5; padding-top: 12px; }
.theme-json-tools { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; }
.theme-json-tools.hidden { display: none; }
.settings-card .theme-json-tools .btn,
.theme-json-tools .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  min-width: 168px;
  min-height: 42px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  box-sizing: border-box;
}
.theme-upload-input { position: absolute; width: 1px; height: 1px; padding: 0; opacity: 0; overflow: hidden; }
