/* ===== MODALS / SETTINGS ===== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 150; display: flex; align-items: center; justify-content: center;
  background: oklch(0.2 0.02 230 / .42); backdrop-filter: blur(4px); padding: 24px;
}
.set-modal {
  display: grid; grid-template-columns: 240px 1fr; width: min(900px, 96vw); height: min(640px, 92vh);
  background: var(--bg); border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-lg);
  transform-origin: center; animation: setIn .2s cubic-bezier(.2,.8,.2,1);
}
@keyframes setIn { from { transform: scale(.97); } to { transform: none; } }

.set-nav { display: flex; flex-direction: column; background: var(--bg-tint); border-right: 1px solid var(--border); padding: 16px 12px; }
.set-nav-head { display: flex; align-items: center; gap: 10px; padding: 6px 8px 16px; }
.set-nav-list { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.set-nav-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-sm); font-size: 14px; font-weight: 600; color: var(--text-2); text-align: left; transition: background .12s, color .12s; }
.set-nav-item:hover { background: var(--surface-2); color: var(--text); }
.set-nav-item.on { background: var(--primary-soft); color: var(--text-on-soft); }
.set-nav-item.danger { color: var(--danger); margin-top: 6px; }
.set-nav-item.danger:hover { background: color-mix(in oklab, var(--danger) 10%, transparent); }

.set-content { position: relative; padding: 30px 34px; }
.set-close { position: absolute; top: 16px; right: 16px; }
.set-pane { max-width: 520px; }
.set-h3 { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); margin: 24px 0 10px; }

.set-profile { display: flex; align-items: center; gap: 18px; margin-bottom: 6px; }
.set-profile h2 { white-space: nowrap; }
.set-av-edit { position: absolute; right: -2px; bottom: -2px; width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: var(--on-primary); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 3px var(--bg); }
.set-group { display: flex; flex-direction: column; gap: 14px; }
.set-group .field label { margin-bottom: 2px; }

.set-list { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-lg); padding: 5px; box-shadow: var(--shadow-sm); }
.set-row { display: flex; align-items: center; gap: 13px; padding: 12px; border-radius: var(--r-sm); transition: background .12s; cursor: pointer; user-select: none; }
.set-row:hover { background: var(--surface-2); }
.set-row.danger { color: var(--danger); }
.set-ic { width: 24px; flex-shrink: 0; }

.theme-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.theme-card { padding: 12px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--border); display: flex; flex-direction: column; gap: 12px; font-weight: 600; font-size: 13.5px; transition: box-shadow .14s; }
.theme-card.on { box-shadow: inset 0 0 0 2px var(--primary); }
.theme-prev { height: 70px; border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.theme-prev.light { background: oklch(0.97 0.005 95); }
.theme-prev.dark { background: oklch(0.22 0.014 218); }
.theme-prev span { height: 9px; border-radius: 5px; }
.theme-prev span:nth-child(1) { width: 70%; background: var(--primary); }
.theme-prev.light span:nth-child(2), .theme-prev.light span:nth-child(3) { background: oklch(0.88 0.006 95); }
.theme-prev.dark span:nth-child(2), .theme-prev.dark span:nth-child(3) { background: oklch(0.34 0.016 218); }
.theme-prev span:nth-child(3) { width: 45%; }

.font-slider { display: flex; align-items: center; gap: 14px; padding: 6px 4px; }
.range { -webkit-appearance: none; appearance: none; flex: 1; height: 5px; border-radius: 99px; background: var(--surface-3); outline: none; }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--primary); cursor: pointer; box-shadow: var(--shadow-md); }
.range::-moz-range-thumb { width: 22px; height: 22px; border: none; border-radius: 50%; background: var(--primary); cursor: pointer; }

.enc-card { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--r-lg); background: color-mix(in oklab, var(--success) 10%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--success) 25%, transparent); }

.dev-row { display: flex; align-items: center; gap: 13px; padding: 12px; border-radius: var(--r-sm); }
.dev-row:hover { background: var(--surface-2); }
.dev-cur { font-size: 10.5px; font-weight: 700; color: var(--primary-strong); background: var(--primary-soft); padding: 1px 7px; border-radius: 5px; vertical-align: middle; }
[data-theme="dark"] .dev-cur { color: var(--primary-bright); }

.lang-row { display: flex; align-items: center; gap: 13px; padding: 13px 12px; border-radius: var(--r-sm); transition: background .12s; }
.lang-row:hover { background: var(--surface-2); }.radio { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--border-2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.radio.on { background: var(--primary); box-shadow: none; color: var(--on-primary); }
.set-flash { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 200; display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 99px; background: var(--text); color: var(--bg); font-size: 13px; font-weight: 600; box-shadow: var(--shadow-lg); }

@media (max-width: 680px) {
  .set-modal { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .set-nav { flex-direction: row; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--border); padding: 10px; }
  .set-nav-head, .set-nav-item.danger { display: none; }
  .set-nav-list { flex-direction: row; }
  .set-nav-item { white-space: nowrap; }
  .set-content { padding: 20px; }
}
