/* =====================================================================
   411 Editing · styles for parts that are new in the real app
   (the prototype styles live in app.css)
   ===================================================================== */
.linkish { border: 0; background: none; padding: 0; color: var(--fg-2, var(--fg)); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.loading-dots { display: flex; gap: 6px; justify-content: center; padding: 60px 0; }
.loading-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); animation: ld 1s infinite ease-in-out; }
.loading-dots i:nth-child(2) { animation-delay: .15s; } .loading-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes ld { 0%, 80%, 100% { opacity: .25; transform: scale(.8); } 40% { opacity: 1; transform: scale(1); } }
body.modal-open { overflow: hidden; }
.logo[data-nav] { cursor: pointer; }
.nav-l { flex: 1; text-align: left; }

/* auth */
.auth-oauth { display: grid; gap: 8px; }
.auth-oauth .ghost { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 11px; border-radius: 12px; }
.auth-oauth svg { width: 18px; height: 18px; }
.auth-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12.5px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.check-row { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--fg-2, var(--fg)); line-height: 1.45; }
.check-row input { margin-top: 3px; }
.mfa-qr { display: grid; place-items: center; padding: 12px; border-radius: 14px; background: #fff; justify-self: center; }
.mfa-qr img { width: 180px; height: 180px; }
.more-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.more-grid button { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); text-align: left; }
.more-grid svg { width: 18px; height: 18px; }

/* uploads */
.drop { display: grid; place-items: center; gap: 4px; padding: 28px 16px; border-radius: 14px; border: 1.5px dashed var(--line-2, var(--line)); background: var(--surface); text-align: center; cursor: pointer; color: var(--fg); }
.drop:hover { border-color: var(--fg-2, var(--fg)); }
.drop svg { width: 26px; height: 26px; color: var(--muted); }
.drop.small { padding: 14px; grid-auto-flow: column; justify-content: start; text-align: left; }
.drop.small svg { width: 18px; height: 18px; }
.drop.has { padding: 0; overflow: hidden; border-style: solid; }
.drop img { width: 100%; max-height: 280px; object-fit: cover; display: block; }
.dc-imgprev { position: relative; border-radius: 12px; overflow: hidden; }
.dc-imgprev img { width: 100%; max-height: 300px; object-fit: cover; display: block; }
.dc-imgprev .dc-x { position: absolute; top: 8px; right: 8px; }

/* post bits */
.gp-in { margin-bottom: 4px; }
.pd-anc .post { border-bottom: 0; }

/* profile */
.pf-banner { height: 190px; }
.pf-head { padding: 0 20px 16px; display: grid; gap: 6px; }
.pf-top { display: flex; align-items: flex-end; justify-content: space-between; margin-top: -48px; position: relative; z-index: 1; }
.pf-top > .avatar { width: 104px; height: 104px; font-size: 40px; box-shadow: 0 0 0 4px var(--bg); }
.pf-acts { display: flex; gap: 8px; align-items: center; padding-bottom: 6px; }
.pf-acts .cta, .pf-acts .ghost { border-radius: 999px; padding: 8px 18px; }
.pf-more { padding: 8px 14px !important; }
.pf-name { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.pf-name h1 { margin: 0; font-size: 26px; letter-spacing: -.02em; }
.pf-name .check { width: 20px; height: 20px; }
.pf-h { color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pf-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.pf-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; border-radius: 999px; font-size: 12px; font-weight: 600; box-shadow: inset 0 0 0 1px var(--line); }
.pf-badge .badge { width: 20px; height: 20px; }
.pf-bio { margin: 6px 0 0; font-size: 15px; line-height: 1.55; color: var(--fg-2, var(--fg)); white-space: pre-line; }
.pf-socials { display: flex; flex-wrap: wrap; gap: 6px; }
.soc { font-size: 12.5px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--fg); text-decoration: none; box-shadow: inset 0 0 0 1px var(--line); }
.soc:hover { box-shadow: inset 0 0 0 1px var(--fg-2, var(--fg)); }
.gp-stats button { border: 0; background: none; padding: 0; color: var(--muted); font: inherit; font-size: 13.5px; cursor: pointer; }
.gp-stats button b { color: var(--fg); }
@media (max-width: 820px) { .pf-banner { height: 130px; } .pf-top > .avatar { width: 80px; height: 80px; } .pf-head { padding: 0 16px 14px; } .pf-acts { flex-wrap: wrap; justify-content: flex-end; } }

/* edit profile */
.ep-imgs { position: relative; margin-bottom: 34px; }
.ep-banner { display: grid; place-items: center; height: 140px; border-radius: 14px; cursor: pointer; color: #fff; font-weight: 600; font-size: 13px; }
.ep-banner span { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border-radius: 999px; background: rgba(0,0,0,.5); }
.ep-banner svg, .ep-av > span svg { width: 15px; height: 15px; }
.ep-av { position: absolute; left: 16px; bottom: -30px; cursor: pointer; }
.ep-imgs > .ep-av .avatar, .ep-av .avatar.lg { width: 84px; height: 84px; box-shadow: 0 0 0 4px var(--surface); }
.ep-av > span { position: absolute; right: -2px; bottom: -2px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--fg); color: var(--bg); }
label.ep-av:not(.ep-imgs .ep-av) { position: relative; left: 0; bottom: 0; display: inline-block; }
.ep-links { display: grid; gap: 6px; }
.ep-link { display: flex; gap: 6px; align-items: center; }
.ep-link select { width: 130px; }
.ep-link input { flex: 1; min-width: 0; }
.ep-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.ep-bdg { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; font-size: 12.5px; box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; }
.ep-bdg .badge { width: 18px; height: 18px; }

/* marketplace / academy */
.tops-row { display: grid; grid-auto-flow: column; grid-auto-columns: 160px; gap: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.tops-card { position: relative; display: grid; justify-items: center; gap: 4px; padding: 16px 10px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); text-align: center; }
.tops-card:hover { border-color: var(--line-2, var(--line)); }
.tops-card .avatar { width: 48px; height: 48px; }
.tops-card b { font-size: 13.5px; display: flex; align-items: center; gap: 4px; }
.tops-card small { font-size: 12px; }
.tops-rank { position: absolute; top: 8px; left: 10px; font-size: 11px; color: var(--muted); }
.product .meta { display: grid; gap: 2px; justify-content: stretch; }
.product .meta b { font-size: 14px; }
.product .price, .course .price { font-family: var(--f-mono); font-weight: 600; font-size: 14px; }
.course { text-align: left; color: var(--fg); cursor: pointer; }
.course .meta { display: grid; gap: 3px; }
.cs-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.cs-main { display: grid; gap: 16px; }
.cs-side { position: sticky; top: 70px; }
.cs-buy { display: grid; gap: 12px; padding: 18px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); }
.cs-buy h1 { font-size: 22px; margin: 0; }
.cs-buy .cta { width: 100%; }
.cs-n { flex: none; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: 12px; background: var(--surface-2); }
.cs-n svg { width: 13px; height: 13px; }
.cs-lesson.locked { opacity: .7; }
.cs-cover { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; }
.cs-cover > .cover, .cs-cover > .art { position: absolute; inset: 0; background-size: cover; background-position: center; }
@media (max-width: 900px) { .cs-grid { grid-template-columns: 1fr; } .cs-side { position: static; order: -1; } }
.cr-lessons { display: grid; gap: 6px; }
.cr-lesson { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px; border-radius: 12px; border: 1px solid var(--line); }
.cr-lesson input[data-ltitle] { flex: 1; min-width: 160px; }
.cr-up { padding: 6px 12px !important; font-size: 12.5px; border-radius: 999px; cursor: pointer; }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }

/* comp */
.prize-line { font-size: 14px; color: var(--fg-2, var(--fg)); }
.wk-card { display: grid; gap: 8px; border: 0; background: none; padding: 0; text-align: left; color: var(--fg); }
.wk-card .wk-thumb { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; border: 0; padding: 0; width: 100%; }
.wk-card .wk-thumb > .cover, .wk-card .wk-thumb > .art { position: absolute; inset: 0; background-size: cover; background-position: center; }
.wk-cap { display: grid; gap: 1px; }
.wk-cap b { font-size: 14px; }
.wk-cap small { font-size: 12.5px; color: var(--muted); }
.wk-rank { position: absolute; top: 8px; left: 8px; padding: 2px 8px; border-radius: 999px; background: rgba(0,0,0,.55); color: #fff; font-size: 11.5px; }
.eow-mini { display: grid; gap: 8px; padding: 8px; text-align: left; color: var(--fg); cursor: pointer; width: 100%; }
.eow-thumb { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; }
.eow-thumb > .cover, .eow-thumb > .art { position: absolute; inset: 0; background-size: cover; background-position: center; }
.eow-mini .txt { display: grid; padding: 0 4px 4px; }
.eow-mini small { color: var(--muted); font-size: 12px; }
.rail-thumb > .cover { position: absolute; inset: 0; background-size: cover; background-position: center; }

/* notifications */
.n-row { width: 100%; border: 0; background: none; color: var(--fg); text-align: left; padding: 12px 10px; align-items: flex-start; cursor: pointer; }
.n-row.unread { background: color-mix(in srgb, #3d8fd1 8%, transparent); }
.n-ic { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--nc); background: color-mix(in srgb, var(--nc) 14%, transparent); }
.n-ic svg { width: 17px; height: 17px; }
.n-body { flex: 1; min-width: 0; display: grid; gap: 4px; }
.n-avs { display: flex; }
.n-avs .avatar { width: 26px; height: 26px; font-size: 10px; box-shadow: 0 0 0 2px var(--bg); }
.n-avs .avatar + .avatar { margin-left: -6px; }
.n-txt { font-size: 14px; line-height: 1.45; }
.n-body time { font-size: 12px; }

/* staff */
.staff-wrap { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; align-items: start; }
.staff-wrap .staff-menu { position: sticky; top: 70px; display: grid; gap: 2px; }
.staff-mh { font-size: 11.5px; color: var(--muted); padding: 12px 10px 4px; }
.staff-wrap .staff-menu button { display: flex; align-items: center; gap: 8px; justify-content: space-between; padding: 8px 10px; border: 0; border-radius: 10px; background: none; color: var(--fg-2, var(--fg)); text-align: left; font-size: 13.5px; }
.staff-wrap .staff-menu button:hover { background: var(--surface-2); }
.staff-wrap .staff-menu button[aria-current="page"] { background: var(--surface-2); color: var(--fg); font-weight: 600; box-shadow: inset 0 0 0 1px var(--line); }
.staff-body { display: grid; gap: 14px; min-width: 0; }
.q-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.q-who { display: flex; }
.st-tile { text-align: left; color: var(--fg); }
button.st-tile { cursor: pointer; border: 1px solid var(--line); }
@media (max-width: 900px) { .staff-wrap { grid-template-columns: 1fr; } .staff-wrap .staff-menu { position: static; grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; scrollbar-width: none; } .staff-mh { display: none; } }

/* support / legal */
.tk-img { max-width: 260px; border-radius: 12px; margin-top: 4px; }
.legal h3 { margin: 14px 0 4px; font-size: 15px; }
.legal p { margin: 0; color: var(--fg-2, var(--fg)); line-height: 1.6; }

/* groups */
.gp-start { flex: 1; text-align: left; border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 999px; padding: 10px 16px; cursor: text; }
.gp-mem { display: flex; align-items: center; gap: 10px; padding: 10px 20px; border-bottom: 1px solid var(--line); }
.gp-mem .who-btn { flex: 1; min-width: 0; }
.gp-side ol { padding-left: 18px; }

.staff-wrap .staff-menu .pill-n { flex: none; margin-left: auto; width: auto; }
