/* Settings */
.app-settings .set-side { width: 236px; padding: 12px 10px; }
.set-search { margin-bottom: 10px; }
.set-search .input { height: 32px; background: var(--tile); box-shadow: none; }
.set-user { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border: 0; background: none; border-radius: 12px; text-align: left; color: var(--text); margin-bottom: 6px; }
.set-user:hover { background: var(--hover); }
.set-user.on { background: var(--tile-hover); }
.set-sep { height: 1px; background: var(--line); margin: 8px 10px; flex: 0 0 auto; }
.set-nav { height: 34px; }
.set-nav-ic { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 18%, transparent); flex: 0 0 auto; }
.set-nav .ic { color: inherit; }
.side-item.set-nav.on { background: var(--tile-hover); }

.set-head { height: 52px; flex: 0 0 auto; display: flex; align-items: center; padding: 0 28px; border-bottom: 1px solid var(--line); }
.set-head h2 { margin: 0; font-size: 17px; font-weight: 700; }
.set-main { flex: 1; overflow-y: auto; padding: 20px 28px 32px; display: flex; flex-direction: column; gap: 20px; }
.set-main > * { width: 100%; max-width: 680px; margin-left: auto; margin-right: auto; }
.set-intro { margin: 0; color: var(--text-2); font-size: 13.5px; max-width: 62ch; }
.set-note { color: var(--text-2); font-size: 13px; text-align: center; padding: 16px; }

.set-group { display: flex; flex-direction: column; gap: 8px; }
.set-group-title { margin: 0 4px; font-size: 13px; font-weight: 700; color: var(--text-2); }
.set-card { background: var(--surface-2); border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.set-card > .set-row + .set-row { border-top: 1px solid var(--line); }
.set-card > :is(.set-themes, .set-wps, .set-iconstyles, .set-layouts) { padding: 14px; }
.set-card > :is(.set-wps, .set-layouts) + .set-row { border-top: 1px solid var(--line); }
.set-row { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 9px 14px; }
.set-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: 0 0 auto; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); }
.set-appic { display: grid; place-items: center; flex: 0 0 auto; }
.set-label { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.set-label b { font-weight: 600; font-size: 13.5px; }
.set-label small { color: var(--text-2); font-size: 12px; }
.set-ctl { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }
.set-ctl .range { width: 220px; }
.set-ctl-btns { gap: 6px; }

.set-hero { display: flex; align-items: center; gap: 18px; }
.set-hero h2 { margin: 0; font-size: 22px; }
.set-hero p { margin: 2px 0 0; }
.set-avatar { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-size: 32px; color: #fff; background: linear-gradient(140deg, var(--accent), #2b2a68); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .2); flex: 0 0 auto; }
.set-avatar.sm { width: 38px; height: 38px; font-size: 17px; font-family: var(--font); font-weight: 700; }

/* theme cards */
.set-themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.set-theme, .set-layout, .set-iconstyle { border: 0; background: none; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--text); font-size: 13px; }
.set-theme b, .set-layout b, .set-iconstyle b { font-weight: 600; }
.set-layout small, .set-iconstyle small { color: var(--text-2); font-size: 11.5px; margin-top: -4px; text-align: center; }
.set-theme-prev { position: relative; width: 100%; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line-2); transition: box-shadow .15s; }
.set-theme.on .set-theme-prev, .set-layout.on .set-layout-prev, .set-iconstyle.on .set-iconstyle-prev { box-shadow: 0 0 0 2.5px var(--accent); }
.set-theme-prev.t-light { background: linear-gradient(160deg, #c8dcf5, #f6f8fc); }
.set-theme-prev.t-dark { background: linear-gradient(160deg, #141a3d, #2b2a68); }
.set-theme-prev.t-auto { background: linear-gradient(110deg, #c8dcf5 0 50%, #141a3d 50% 100%); }
.set-theme-prev i { position: absolute; border-radius: 4px; }
.set-theme-prev i:nth-child(1) { left: 0; right: 0; top: 0; height: 9%; }
.set-theme-prev i:nth-child(2) { left: 14%; top: 22%; width: 58%; height: 56%; border-radius: 6px; }
.set-theme-prev i:nth-child(3) { left: 30%; right: 30%; bottom: 6%; height: 11%; border-radius: 5px; }
.t-light i { background: rgba(255, 255, 255, .85); box-shadow: 0 2px 6px rgba(0, 0, 0, .12); }
.t-dark i { background: rgba(30, 36, 50, .9); box-shadow: 0 2px 6px rgba(0, 0, 0, .4); }
.t-auto i:nth-child(1) { background: linear-gradient(110deg, rgba(255, 255, 255, .85) 50%, rgba(30, 36, 50, .9) 50%); }
.t-auto i:nth-child(2) { background: linear-gradient(110deg, #fff 0 62%, #1e2432 62%); }
.t-auto i:nth-child(3) { background: rgba(120, 130, 150, .6); }

/* wallpapers */
.set-wps { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.set-wp { position: relative; aspect-ratio: 16 / 10; border: 0; border-radius: 12px; padding: 0; overflow: hidden; background-size: cover !important; box-shadow: inset 0 0 0 1px var(--line-2); display: grid; place-items: center; color: var(--text-2); transition: box-shadow .15s, transform .15s; }
.set-wp:hover { transform: translateY(-1px); }
.set-wp.on { box-shadow: 0 0 0 2.5px var(--accent); }
.set-wp span { position: absolute; left: 6px; bottom: 6px; font-size: 11px; font-weight: 600; color: #fff; padding: 2px 7px; border-radius: 99px; background: rgba(0, 0, 0, .35); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.set-wp-own { background: var(--tile); border: 1.5px dashed var(--line-2); }
.set-wps + .set-row { border-top: 1px solid var(--line); }

/* swatches */
.set-swatches { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.set-sw { width: 24px; height: 24px; border-radius: 50%; border: 0; padding: 0; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); display: grid; place-items: center; color: #fff; }
.set-sw.on { box-shadow: 0 0 0 2px var(--surface-2), 0 0 0 4px var(--c); }
.set-sw.auto { background: conic-gradient(#2cb7ae, #7c6cff, #e2566f, #f08a2e, #2cb7ae); }

/* icon style cards */
.set-iconstyles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.set-iconstyle-prev { width: 100%; display: grid; grid-template-columns: repeat(2, auto); justify-content: center; gap: 10px; padding: 16px 10px; border-radius: 12px; background: linear-gradient(160deg, #2b2a68, #7a4a7c 55%, #1c5a70); box-shadow: inset 0 0 0 1px var(--line-2); transition: box-shadow .15s; }
.set-iconstyle-prev .appicon { --s: 34px; }
.set-iconstyle-prev .rt-badge { display: none; }
/* each preview forces its own style regardless of the current system choice */
.app-settings .set-iconstyle-prev.p-flat .appicon { color: #fff; background: color-mix(in srgb, var(--a) 40%, var(--b)); -webkit-backdrop-filter: none; backdrop-filter: none; border-radius: 26%; box-shadow: none; }
.app-settings .set-iconstyle-prev.p-flat .appicon::before { display: none; }
.app-settings .set-iconstyle-prev.p-flat .appicon > svg { filter: none; width: 52%; height: 52%; }
.app-settings .set-iconstyle-prev.p-classic .appicon { color: #fff; background: linear-gradient(150deg, var(--a), var(--b)); -webkit-backdrop-filter: none; backdrop-filter: none; border-radius: 26%; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -1px 2px rgba(0, 0, 0, .18), 0 2px 6px -1px rgba(0, 0, 0, .3); }
.app-settings .set-iconstyle-prev.p-classic .appicon::before { display: block; background: radial-gradient(120% 80% at 20% 0%, rgba(255, 255, 255, .28), transparent 55%); opacity: 1; }
.app-settings .set-iconstyle-prev.p-classic .appicon > svg { filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .25)); width: 54%; height: 54%; }
.app-settings .set-iconstyle-prev.p-glass .appicon {
  color: color-mix(in srgb, var(--a) 22%, #fff); border-radius: 26%;
  background: radial-gradient(70% 70% at 50% 60%, color-mix(in srgb, var(--a) 72%, transparent) 0%, color-mix(in srgb, var(--b) 40%, transparent) 52%, transparent 78%), linear-gradient(165deg, rgba(255, 255, 255, .30) 0%, rgba(255, 255, 255, .08) 52%, rgba(255, 255, 255, .14) 100%);
  -webkit-backdrop-filter: blur(14px) saturate(1.8); backdrop-filter: blur(14px) saturate(1.8);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .20), inset 0 1.5px 0 rgba(255, 255, 255, .55), inset 0 -8px 16px -8px color-mix(in srgb, var(--b) 75%, transparent), 0 8px 18px -8px rgba(0, 0, 0, .55);
}
.app-settings .set-iconstyle-prev.p-glass .appicon::before { display: block; background: radial-gradient(110% 60% at 28% -8%, rgba(255, 255, 255, .55), transparent 58%); opacity: .75; }
.app-settings .set-iconstyle-prev.p-glass .appicon > svg { filter: drop-shadow(0 0 6px color-mix(in srgb, var(--a) 95%, transparent)); width: 54%; height: 54%; }
.app-settings .set-iconstyle-prev.p-themed .appicon { color: var(--accent); background: color-mix(in srgb, var(--accent) 20%, #1a1f2b); -webkit-backdrop-filter: none; backdrop-filter: none; border-radius: 50%; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 25%, transparent), 0 4px 12px -6px rgba(0, 0, 0, .4); }
.app-settings .set-iconstyle-prev.p-themed .appicon::before { display: none; }
.app-settings .set-iconstyle-prev.p-themed .appicon > svg { filter: none; width: 50%; height: 50%; }

/* layout cards */
.set-layouts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.set-layout-prev { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: linear-gradient(160deg, #2b2a68, #7a4a7c 55%, #1c5a70); box-shadow: inset 0 0 0 1px var(--line-2); transition: box-shadow .15s; }
.set-layout-prev i { position: absolute; }
.lp-win { left: 18%; top: 20%; width: 52%; height: 50%; border-radius: 6px; background: rgba(30, 36, 50, .85); box-shadow: 0 4px 12px rgba(0, 0, 0, .35); }
.l-dock .lp-top { left: 0; right: 0; top: 0; height: 7%; background: rgba(0, 0, 0, .25); }
.l-dock .lp-bar { left: 30%; right: 30%; bottom: 5%; height: 11%; border-radius: 6px; background: rgba(255, 255, 255, .28); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3); }
.l-taskbar .lp-top { display: none; }
.l-taskbar .lp-bar { left: 0; right: 0; bottom: 0; height: 10%; background: rgba(26, 31, 44, .85); }
.set-layout-prev :is(.lp-pill, .lp-tab) { display: none; }
.l-island .lp-top { display: none; }
.l-island .lp-win { top: 16%; }
.l-island .lp-bar { left: 3%; right: 3%; bottom: 4%; height: 12%; border-radius: 5px; background: rgba(26, 31, 44, .72); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.l-island .lp-pill { display: block; left: 40%; right: 40%; top: 4%; height: 7%; border-radius: 9px; background: rgba(8, 10, 16, .92); }
.l-island .lp-tab { display: block; left: 44%; width: 12%; bottom: 6.5%; height: 7%; border-radius: 3px; background: rgba(255, 255, 255, .2); box-shadow: inset 0 -1.5px 0 var(--accent); }

/* runtimes */
.rt-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.rt-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 16px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.rt-card .btn { align-self: flex-start; margin-top: auto; }
.rt-card-top { display: flex; align-items: center; gap: 12px; }
.rt-card-ic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex: 0 0 auto; color: var(--rc); background: color-mix(in srgb, var(--rc) 16%, transparent); }
.rt-web { --rc: #8f82ff; } .rt-android { --rc: #22a565; } .rt-windows { --rc: #2f7cf6; } .rt-linux { --rc: #d29500; }
.rt-card:not(.on) .rt-card-ic { filter: grayscale(1); opacity: .6; }
.rt-card-desc { margin: 0; font-size: 13px; color: var(--text-2); }
.rt-card-how { display: flex; gap: 6px; align-items: flex-start; font-size: 12px; color: var(--text-3); }
.rt-card-how .ic { margin-top: 2px; }

/* storage */
.set-storage { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.set-storage-top b { font-family: var(--font-display); font-size: 30px; font-weight: 400; margin-right: 8px; }
.set-storage-bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; gap: 2px; background: var(--surface-3); }
.set-storage-bar i { min-width: 3px; }
.set-storage-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; }
.set-storage-legend span { display: inline-flex; align-items: center; gap: 6px; }
.set-storage-legend i { width: 9px; height: 9px; border-radius: 3px; }
.set-storage-legend small { color: var(--text-3); }

/* about */
.set-about { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 0 6px; text-align: center; }
.set-about-logo { width: 96px; height: 96px; border-radius: 28px; display: grid; place-items: center; color: #e8fbf9; --sun: #ffb27a; background: radial-gradient(80% 80% at 50% 40%, color-mix(in srgb, var(--accent) 70%, #141a3d), #141a3d); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 14px 30px -12px rgba(0, 0, 0, .55); margin-bottom: 6px; }
.set-about h2 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 30px; letter-spacing: .02em; }
.set-about p { margin: 0 0 8px; }

@container (max-width: 640px) { .rt-grid, .set-iconstyles, .set-themes { grid-template-columns: 1fr 1fr; } }
.app-settings .app-main { container-type: inline-size; }
[data-layout="mobile"] .app-settings .set-side { display: none; }
[data-layout="mobile"] .app-settings.list-mode .set-side { display: flex; width: 100%; border-right: 0; }
[data-layout="mobile"] .app-settings.list-mode .app-main { display: none; }
.set-back { display: none; margin-left: -10px; }
[data-layout="mobile"] .set-back { display: inline-grid; }
[data-layout="mobile"] .set-main { padding: 16px; }
[data-layout="mobile"] .set-ctl .range { width: 140px; }
[data-layout="mobile"] .rt-grid { grid-template-columns: 1fr; }
[data-layout="mobile"] .set-layouts { grid-template-columns: 1fr 1fr; }
@container (max-width: 520px) { .set-layouts { grid-template-columns: 1fr 1fr; } }
