*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
body.no-scroll { overflow: hidden; }
h1 { font-size: clamp(1.7rem, 4vw, 2.2rem); line-height: 1.2; margin: 0; letter-spacing: -.02em; }
h2 { font-size: 1.2rem; margin: 1.6rem 0 .6rem; letter-spacing: -.01em; }
h3 { font-size: 1rem; margin: 1.2rem 0 .5rem; }
p { margin: .3rem 0; }
a { color: var(--accent); text-decoration: none; }
img, video { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--mute); } .small { font-size: .86rem; } .big { font-size: 1.3rem; } .error { color: var(--danger); min-height: 1.2em; }
.icon { display: inline-flex; flex: none; } .spacer { flex: 1; } .grow { flex: 1; }
.row { display: flex; align-items: center; } .row.gap { gap: 10px; } .row.wrap { flex-wrap: wrap; } .row.between { justify-content: space-between; } .row.center { justify-content: center; } .row.end { justify-content: flex-end; }
.link { font-size: .95rem; }
.glass { background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(22px); backdrop-filter: saturate(180%) blur(22px); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

button, select, input, textarea { font: inherit; color: inherit; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 0; background: var(--surface-2); cursor: pointer; font-weight: 500; transition: filter .15s, transform .1s; }
.btn:hover { filter: brightness(.96); } .btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); color: var(--on-accent); } .btn.danger { background: var(--danger); color: #fff; } .btn.ghost { background: transparent; color: var(--accent); }
.btn:disabled, .icon-btn:disabled { opacity: .4; cursor: default; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; cursor: pointer; color: inherit; }
.icon-btn:hover { background: var(--surface-2); } .icon-btn.danger { color: var(--danger); } .icon-btn.on { color: var(--fav); } .icon-btn.on svg { fill: currentColor; }
input[type=text], input[type=search], input[type=url], input[type=password], textarea, select {
  min-height: 40px; padding: 8px 12px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); width: 100%; }
select { width: auto; } textarea { resize: vertical; }
input[type=checkbox][role=switch] { appearance: none; width: 50px; height: 30px; border-radius: 999px; background: var(--surface-2); position: relative; cursor: pointer; border: 1px solid var(--line); }
input[type=checkbox][role=switch]::after { content: ""; position: absolute; top: 2px; inset-inline-start: 2px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.35); transition: inset-inline-start .15s; }
input[type=checkbox][role=switch]:checked { background: #34c759; } input[type=checkbox][role=switch]:checked::after { inset-inline-start: 22px; }
input[type=range] { accent-color: var(--accent); width: 120px; }
.form { display: grid; gap: 12px; } .form label { display: grid; gap: 4px; font-size: .9rem; color: var(--mute); } .form.narrow { max-width: 420px; }
.seg { display: inline-flex; padding: 3px; background: var(--surface-2); border-radius: 999px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 0 14px; min-height: 34px; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; }
.seg button[aria-pressed=true] { background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.2); font-weight: 600; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; } .chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.progress-bar { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin-top: 8px; } .progress-bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; } .progress-bar.slim { height: 6px; }
.card { background: var(--surface); border-radius: var(--r-lg); padding: 6px 20px 18px; margin: 18px 0; } .card > h2 { margin-top: 14px; }
.field { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); } .field:last-child { border-bottom: 0; }
.notice { display: flex; gap: 14px; padding: 16px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); margin: 16px 0; align-items: flex-start; }
.list { background: var(--surface); border-radius: var(--r-md); overflow: hidden; } .list-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; color: inherit; border-bottom: 1px solid var(--line); } .list-row:last-child { border-bottom: 0; } .list-row > div { flex: 1; }
.vis { display: inline-flex; align-items: center; gap: 4px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; cursor: pointer; padding: 0; color: var(--mute); }
.avatar img { width: 100%; height: 100%; object-fit: cover; } .avatar.xl { width: 96px; height: 96px; cursor: default; }
.profile-head { display: flex; gap: 20px; align-items: center; margin: 12px 0 18px; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin: 14px 0; }
.stat { background: var(--surface); border-radius: var(--r-md); padding: 14px 16px; display: grid; gap: 2px; } .stat strong { font-size: 1.6rem; letter-spacing: -.02em; } .stat.wide { grid-column: span 2; }
