/* Shapley community site: dark, blue accent, Segoe UI. */
:root {
  --bg: #0a1017; --side: #0c131b; --panel: #121a24; --panel2: #0e151e; --border: #223041; --line: #1f2b39;
  --text: #e8eef5; --muted: #a7b4c4; --faint: #8292a5; --blue: #1668d8; --blue-hover: #1f78f0; --blue-txt: #5aa2ff; --blue-soft: #13284a;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; font-size: 14px; color: var(--text); color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
a { color: var(--blue-txt); text-decoration: none; } a:hover { color: #8cc0ff; }
button, input, select, textarea { font: inherit; color: inherit; }
svg { flex: none; }
h1, h2, p { margin: 0; }
hr { border: 0; height: 1px; background: var(--line); margin: 8px 6px; width: calc(100% - 12px); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.grow { flex: 1; min-width: 0; } .col { display: flex; flex-direction: column; } .gap6 { gap: 6px; } .gap8 { gap: 8px; } .gap14 { gap: 14px; } .min0 { min-width: 0; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 12px; } .lg { font-size: 17px; } .text { color: var(--text); }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .self-start { align-self: flex-start; } .self-center { align-self: center; } .pre { white-space: pre-wrap; }
.link { color: var(--blue-txt); }

.app { display: flex; flex-wrap: wrap; min-height: 100vh; min-height: 100dvh; } /* dvh: the height you can actually see on phones */
.side { flex: 0 1 200px; min-width: 180px; background: var(--side); border-right: 1px solid #1a2532; padding: 14px 10px; display: flex; flex-direction: column; gap: 4px; }
@media (min-width: 900px) { .side { position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; } }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 6px 14px; color: var(--text); font-size: 18px; font-weight: 700; line-height: 1.05; }
.brand:hover { color: var(--text); }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 9px; color: var(--text); }
.nav-item:hover { background: #162231; color: var(--text); }
.nav-item.on { background: var(--blue); color: #fff; font-weight: 600; }
.nav-label { padding: 0 12px 2px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.account { position: relative; }
.account-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border-radius: 10px; background: transparent; border: 0; cursor: pointer; font-size: 15px; font-weight: 600; text-align: left; }
.account-btn:hover { background: #162231; }
.account-menu { position: absolute; left: 0; right: 0; bottom: 54px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 6px; display: flex; flex-direction: column; gap: 2px; box-shadow: 0 16px 40px rgba(0,0,0,.5); z-index: 5; }
.account-menu[hidden] { display: none; }
.account-menu a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--text); }
.account-menu a:hover { background: #1a2636; }
.menu-note { padding: 6px 10px 4px; color: var(--faint); font-size: 12px; border-top: 1px solid var(--line); margin-top: 4px; }
.avatar { border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; }

.main { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 10px 20px 10px 24px; border-bottom: 1px solid #1a2532; }
.search { flex: 1 1 320px; max-width: 900px; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 14px; border-radius: 10px; background: var(--panel2); border: 1px solid #2a3a4d; }
.search:focus-within { border-color: var(--blue-txt); }
.search input { flex: 1; background: transparent; border: 0; outline: none; font-size: 15px; }
.icon-btn { width: 40px; height: 40px; border-radius: 9px; background: transparent; border: 0; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.icon-btn:hover { background: #162231; }
.content { padding: 16px 20px 40px 24px; outline: none; }

/* buttons */
.btn-primary, .btn-soft, .btn-ghost, .btn-outline, .btn-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 9px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn-primary { background: var(--blue); color: #fff; border: 0; } .btn-primary:hover { background: var(--blue-hover); color: #fff; }
.btn-danger { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 9px; font-weight: 600; cursor: pointer; white-space: nowrap; background: #b83a3a; color: #fff; border: 0; } .btn-danger:hover { background: #cc4545; } .btn-danger:disabled { opacity: .6; cursor: default; }
.danger-zone { border-color: #5a2a2a; }
.btn-primary.lg { height: 48px; font-size: 16px; } .btn-primary.sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-soft { background: var(--blue-soft); border: 1px solid #2f6fd0; color: #cfe3ff; } .btn-soft:hover { color: #fff; background: #183463; }
.btn-ghost { background: transparent; border: 1px solid #2f3e52; color: var(--text); } .btn-ghost:hover { background: #162231; color: var(--text); }
.btn-ghost.danger { color: #ff9aa6; border-color: #5a2f38; }
.btn-outline { height: 30px; padding: 0 10px; border-radius: 7px; border: 1px solid #2f6fd0; color: var(--blue-txt); font-size: 13px; background: transparent; }
.btn-toggle { flex: 1; background: var(--panel); border: 1px solid #2f3e52; color: var(--text); }
.btn-toggle.on-like { background: #3a1f2a; border-color: #f07f9a; color: #f7a8bb; }
.btn-toggle.on-save { background: var(--blue-soft); border-color: #2f6fd0; color: #8cc0ff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; } .btn-row.end { justify-content: flex-end; }
.link-btn { background: none; border: 0; padding: 0; color: var(--faint); cursor: pointer; font-size: 13px; align-self: flex-start; } .link-btn:hover { color: var(--text); }

/* layout */
.cols { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.col-main { flex: 999 1 600px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.col-side { flex: 1 1 340px; max-width: 470px; display: flex; flex-direction: column; gap: 14px; }
.col-side-first { flex: 1 1 340px; max-width: 470px; }
.top-gap { margin-top: 24px; }
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.panel h2 { font-size: 18px; }
.panel.accepted { border: 2px solid #2f6fd0; }
.panel-head { display: flex; align-items: center; gap: 10px; } .panel-head h2 { font-size: 17px; }
.panel-sub { color: var(--muted); margin-top: -4px; }
.hero-text h1 { font-size: 34px; line-height: 1.15; } .hero-text p { font-size: 20px; color: var(--muted); margin-top: 2px; }
.page-head { display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; } .page-head h1 { font-size: 30px; }

/* Wiki */
.wiki { width: min(100%, 1120px); margin: 0 auto; }
.pub .wiki { padding: 24px 0 40px; }
.wiki [hidden] { display: none; }
.wiki-hero { position: relative; isolation: isolate; overflow: hidden; padding: clamp(24px, 4vw, 54px); border: 1px solid #29425e; border-radius: 18px; background: linear-gradient(112deg, #142840, #101c2e); }
.wiki-hero::before { position: absolute; z-index: -1; inset: 0 0 0 45%; content: ''; background: linear-gradient(90deg, #14243a 0%, transparent 64%), url('site/img/landing-studio-close.jpg') center 48% / cover; }
.wiki-hero > div { max-width: 470px; }
.wiki-hero h1 { font-size: clamp(34px, 4.5vw, 54px); line-height: 1.08; letter-spacing: -.025em; }
.wiki-hero p { font-size: 17px; line-height: 1.5; color: #c5d3e4; margin: 12px 0 22px; max-width: 340px; }
.wiki-search { width: 100%; height: 48px; color: #aac7e7; background: #0c1725; }
.wiki-search input { min-width: 0; width: 100%; color: var(--text); }
.wiki-topics { columns: 2; column-gap: 16px; margin-top: 20px; }
.wiki-topics .wiki-topic { break-inside: avoid; margin-bottom: 16px; }
.wiki-topic { min-width: 0; background: var(--panel); border: 1px solid var(--border); border-radius: 13px; padding: 8px 18px; }
.wiki-topic h2, .wiki-menu h2 { display: flex; align-items: center; gap: 10px; padding: 13px 0; font-size: 18px; }
.wiki-topic h2 svg, .wiki-menu h2 svg { color: var(--blue-txt); }
.wiki-row { display: flex; gap: 12px; min-height: 52px; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); color: var(--text); padding: 11px 0; }
.wiki-row span { display: grid; gap: 4px; min-width: 0; }
.wiki-row strong { font-size: 15px; line-height: 1.35; }
.wiki-row small { font-size: 14px; line-height: 1.4; color: var(--muted); }
.wiki-row svg { color: var(--faint); }
.wiki-row:hover, .wiki-row:hover svg { color: var(--blue-txt); }
.wiki-results { margin-top: 20px; }
.wiki-results [data-wiki-count] { padding-bottom: 12px; }
.wiki-crumb { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 20px; color: var(--muted); }
.wiki-crumb svg { transform: rotate(-90deg); }
.wiki-layout { display: grid; grid-template-columns: 218px minmax(0, 1fr); gap: clamp(20px, 4vw, 54px); align-items: start; }
.wiki-menu { position: sticky; top: 20px; background: var(--panel2); border: 1px solid var(--border); border-radius: 12px; padding: 5px 11px 12px; }
.pub .wiki-menu { top: 86px; }
.wiki-menu h2 { font-size: 15px; padding-inline: 7px; }
.wiki-menu a { display: block; padding: 9px 8px; line-height: 1.35; border-radius: 7px; color: var(--muted); }
.wiki-menu a:hover { color: var(--text); background: var(--panel); }
.wiki-menu [aria-current="page"] { color: #c7deff; background: var(--blue-soft); }
.wiki-article { max-width: 730px; }
.wiki-article header h1 { font-size: clamp(29px, 4vw, 41px); letter-spacing: -.02em; line-height: 1.14; }
.wiki-article header p { font-size: 17px; line-height: 1.55; color: var(--muted); margin-top: 10px; }
.wiki-contents { margin: 24px 0; padding: 14px 18px; background: var(--panel2); border: 1px solid var(--border); border-radius: 10px; }
.wiki-contents ul { margin: 8px 0 0; padding-left: 18px; line-height: 1.75; }
.wiki-section { scroll-margin-top: 86px; margin: 0 0 28px; }
.wiki-section:focus { outline: none; }
.wiki-section h2, .wiki-related h2 { font-size: 22px; line-height: 1.3; margin-bottom: 9px; }
.wiki-section p, .wiki-section li { color: var(--muted); font-size: 16px; line-height: 1.65; }
.wiki-section p + p, .wiki-section li + li { margin-top: 7px; }
.wiki-section strong { color: var(--text); }
.wiki-section ul, .wiki-section ol { margin: 8px 0 0; padding-left: 23px; }
.wiki-section kbd { font: inherit; font-size: .9em; padding: 1px 4px; background: var(--panel); border: 1px solid var(--border); border-radius: 4px; }
.wiki-section .wiki-catalog { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); list-style: none; padding: 0; gap: 7px 16px; }
.wiki-section .wiki-catalog li + li { margin: 0; }
.wiki-catalog a { display: block; padding: 8px 12px; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; }
.wiki-definitions { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(0, 2.2fr); margin: 0; font-size: 15px; line-height: 1.55; }
.wiki-definitions dt, .wiki-definitions dd { padding: 10px 8px; border-top: 1px solid var(--line); margin: 0; overflow-wrap: anywhere; }
.wiki-definitions dt { font-weight: 600; }
.wiki-definitions dd { color: var(--muted); }
.wiki-related { padding: 14px 18px 4px; background: var(--panel2); border: 1px solid var(--border); border-radius: 12px; }
.wiki a:focus-visible { outline: 2px solid var(--blue-txt); outline-offset: 3px; }
@media (max-width: 800px) {
  .wiki-layout { grid-template-columns: minmax(0, 1fr); }
  .wiki-menu { position: static; order: 1; }
  .wiki-hero::before { inset-inline-start: 50%; }
}
@media (max-width: 590px) {
  .wiki-topics { columns: 1; }
  .wiki-hero::before { display: none; }
  .wiki-hero p { font-size: 16px; }
}
.row-between { flex-direction: row; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.tabs { display: flex; gap: 6px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.tab { height: 34px; padding: 0 16px; border-radius: 999px; display: inline-flex; align-items: center; font-size: 15px; font-weight: 600; color: #c9d4e0; }
.tab:hover { background: #162231; color: #fff; } .tab.on { background: var(--blue); color: #fff; }
.section-head { display: flex; align-items: center; gap: 10px; } .section-head h2 { font-size: 22px; } .section-head.sep { padding-top: 8px; border-top: 1px solid var(--line); }
.view-all { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; }
.filters, .chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; } .filters { margin-bottom: 16px; }
.chip { height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid #2f3e52; color: #c9d4e0; display: inline-flex; align-items: center; font-size: 13px; }
.chip:hover { color: #fff; background: #162231; } .chip.on { background: #e8eef5; color: #0a1017; border-color: #e8eef5; }
.crumbs { color: var(--faint); margin-bottom: 14px; } .crumbs span { color: var(--text); }

/* cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.card { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; color: var(--text); transition: border-color .15s, transform .15s; }
.card:hover { border-color: #3a5576; color: var(--text); transform: translateY(-2px); }
.card-img { position: relative; display: block; aspect-ratio: 1.38; background: var(--panel2); overflow: hidden; min-height: 0; }
.card-img img { position: absolute; inset: 0; }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pill { position: absolute; display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px; background: rgba(8,13,19,.82); border: 1px solid rgba(255,255,255,.14); color: var(--text); font-size: 12px; font-weight: 600; }
.pill.tl { top: 8px; left: 8px; } .pill.tr { top: 8px; right: 8px; } .pill.bl { bottom: 8px; left: 8px; }
.card-body { padding: 9px 12px 11px; display: flex; flex-direction: column; gap: 5px; } .card-body strong { font-size: 15px; }
.card-remix { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12px; }
.card-meta { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; } .card-meta .grow { color: var(--text); }
.stat { display: inline-flex; align-items: center; gap: 4px; }

/* rows */
.rows { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 10px; background: var(--panel); border: 1px solid var(--border); color: var(--text); }
.row:hover { border-color: #3a5576; color: var(--text); }
.row > .grow { display: flex; flex-direction: column; gap: 1px; flex: 1 1 200px; }
.row-img { width: 88px; height: 48px; border-radius: 7px; object-fit: cover; }
.row-title { flex: 0 1 220px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; min-width: 0; }
.tag { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px; background: #1b2633; color: var(--text); font-size: 12px; }
.row-flat { display: flex; align-items: center; gap: 12px; } .row-flat.sep { padding-top: 10px; border-top: 1px solid var(--line); } .row-flat.wrap { flex-wrap: wrap; }
.sq36 { width: 36px; height: 36px; border-radius: 7px; object-fit: cover; }
.draft-img { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 7.6; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: var(--panel2); color: var(--faint); }
.draft-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.draft-img > span { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.help-item { display: flex; gap: 12px; align-items: center; padding-top: 10px; border-top: 1px solid var(--line); }
.help-item img, .help-ph { width: 72px; height: 64px; border-radius: 8px; object-fit: cover; flex: none; }
.help-item .grow { display: flex; flex-direction: column; gap: 4px; }
.help-ph { display: flex; align-items: center; justify-content: center; background: #1b2633; color: var(--faint); }
.help-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.challenge { display: flex; flex-wrap: wrap; gap: 12px; } .challenge img { flex: 1 1 150px; width: 170px; aspect-ratio: 5 / 4; border-radius: 8px; object-fit: cover; } .challenge > div { flex: 1 1 150px; }
.challenge p { line-height: 1.45; }
.help-row { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--border); color: var(--text); }
.help-row:hover { border-color: #3a5576; color: var(--text); } .help-row img { width: 64px; height: 56px; border-radius: 8px; object-fit: cover; } .help-row .help-ph { width: 64px; height: 56px; }
.badge { flex: none; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; color: #c9d4e0; border: 1px solid #2f3e52; }
.badge.solved { color: #fff; background: var(--blue); border-color: var(--blue); } .badge.open { color: #1f1407; background: #f5b26b; border-color: #f5b26b; }

/* creation page */
.viewer { position: relative; height: 540px; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: var(--panel2); }
.viewer img { width: 100%; height: 100%; object-fit: cover; display: block; }
.title { font-size: 32px; line-height: 1.2; }
.desc { color: #c9d4e0; line-height: 1.6; }
.remixed-from { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); } .remixed-from strong { color: var(--text); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--border); }
.stats span { display: flex; flex-direction: column; gap: 2px; } .stats strong { font-size: 20px; } .stats span span { color: var(--faint); font-size: 13px; }
.fam, .fam-self { display: flex; align-items: center; gap: 12px; color: var(--text); }
.fam img, .fam-self img { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; } .fam-self img { border: 2px solid var(--blue); }
.fam-tree { display: flex; flex-direction: column; gap: 12px; margin-left: 25px; padding-left: 25px; border-left: 2px solid #2a3a4d; }
.comment { display: flex; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); } .comment.reply { margin-left: 44px; }
.comment p { color: #c9d4e0; line-height: 1.55; }
.node-pin { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: #f5c48f; border: 1px solid #5a4630; background: #2a2219; padding: 3px 9px; border-radius: 6px; }
.attached { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; padding: 14px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--border); }
.attached img { width: 88px; height: 88px; border-radius: 10px; object-fit: cover; }
.fix { display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--border); }
.fix-imgs { display: flex; flex-wrap: wrap; gap: 12px; } .fix-imgs figure { margin: 0; flex: 1 1 200px; display: flex; flex-direction: column; gap: 6px; }
.fix-imgs img { width: 100%; aspect-ratio: 1.3; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); } .fix-imgs figcaption { color: var(--faint); font-size: 13px; }
.steps { margin: 0; padding-left: 20px; line-height: 1.7; }

/* forms */
.form label { display: flex; flex-direction: column; gap: 6px; color: var(--muted); }
.form input:not([type=radio]), .form textarea, .form select, form textarea, form input[name=node] { background: var(--panel2); border: 1px solid #2a3a4d; border-radius: 9px; padding: 9px 11px; color: var(--text); outline: none; }
.form input:focus, .form textarea:focus, .form select:focus, form textarea:focus { border-color: var(--blue-txt); }
.form textarea, form textarea { resize: vertical; }
.form-row { display: flex; flex-wrap: wrap; gap: 14px; } .form-row label { flex: 1 1 220px; }
.form.narrow { max-width: 560px; }
.swatches { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; } .swatches legend { color: var(--muted); margin-bottom: 6px; }
.swatches label { position: relative; } .swatches input { position: absolute; opacity: 0; }
.swatches span { display: block; width: 30px; height: 30px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; }
.swatches input:checked + span { border-color: #fff; } .swatches input:focus-visible + span { outline: 2px solid var(--blue-txt); }
.profile-head { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-bottom: 20px; } .profile-head h1 { font-size: 28px; }
.coming { align-items: center; text-align: center; padding: 40px; gap: 14px; color: var(--muted); max-width: 640px; }
.empty { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 36px 20px; border: 1px dashed #2f3e52; border-radius: 12px; color: var(--muted); }
.empty strong { color: var(--text); font-size: 16px; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: #1b2a3c; border: 1px solid #2f6fd0; color: var(--text); padding: 10px 16px; border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,.5); transition: opacity .3s; z-index: 50; }
.toast.out { opacity: 0; }

/* Material renders are spheres on the preview's backdrop colour: show them whole. */
.card-img.fit, .viewer.fit { background: #1a2129; }
.card-img.fit img, .viewer.fit img { object-fit: contain; }

/* Sign in */
.account-btn.signin { color: var(--text); text-decoration: none; background: #162231; justify-content: flex-start; }
.account-btn.signin:hover { background: var(--blue); }
.menu-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font: inherit; font-size: 14px; cursor: pointer; text-align: left; }
.menu-btn:hover { background: #1b2a3c; }
.auth { max-width: 440px; margin: 24px auto 0; display: flex; flex-direction: column; gap: 14px; }
.auth .form { display: flex; flex-direction: column; gap: 14px; }
.auth .btn-primary { justify-content: center; }
.auth-msg { margin: 0; min-height: 0; color: var(--blue-txt); font-size: 14px; }
.auth-msg:empty { display: none; }
.auth-msg.error { color: #ff8a8a; }
.auth-alt { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.btn-link { background: none; border: 0; color: var(--blue-txt); cursor: pointer; font: inherit; font-size: 14px; padding: 6px 2px; }
.btn-link:hover { text-decoration: underline; }
.field-hint { font-size: 12px; color: var(--faint); }

/* ---------------------------------------------------------------- forum, messages, feedback */
.count { flex: none; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #e5484d; color: #fff; font-size: 11.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.count[hidden] { display: none; }
.has-count { position: relative; color: var(--text); } .has-count .count { position: absolute; top: 3px; right: 1px; min-width: 17px; height: 17px; font-size: 10.5px; padding: 0 4px; }
.feedback-btn { background: transparent; border: 0; cursor: pointer; text-align: left; width: 100%; color: var(--muted); font: inherit; }
.feedback-btn:hover { color: var(--text); }
.pin-mark { color: var(--blue-txt); margin-right: 6px; vertical-align: -2px; display: inline-flex; }
.cat-tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--blue-soft); color: var(--blue-txt); margin-right: 2px; }
.badge svg { vertical-align: -2px; }
.locked-note { flex-direction: row; align-items: center; color: var(--muted); }
.menu-wrap { position: relative; }
.pop-menu { position: absolute; right: 0; top: 46px; min-width: 190px; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 5px; display: flex; flex-direction: column; box-shadow: 0 16px 40px rgba(0,0,0,.5); z-index: 6; }
.pop-menu[hidden] { display: none; }
.pop-menu button { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 7px; background: none; border: 0; cursor: pointer; text-align: left; color: var(--text); white-space: nowrap; }
.pop-menu button:hover { background: #1a2636; }
.dm-list { display: flex; flex-direction: column; gap: 6px; max-width: 760px; }
.dm-row { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--border); color: var(--text); }
.dm-row:hover { border-color: #3a5576; color: var(--text); }
.dm-row.unread { border-color: #2f6fd0; } .dm-row.unread .muted { color: var(--text); }
.row-flat.tight { gap: 8px; }
.dm-wrap { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; height: calc(100vh - 130px); height: calc(100dvh - 130px); min-height: 420px; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.dm-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.dm-head a.col { color: var(--text); }
.dm-thread { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.dm-empty { margin: auto; text-align: center; max-width: 360px; }
.dm-day { align-self: center; color: var(--faint); font-size: 12px; margin: 10px 0 4px; }
.bubble { position: relative; max-width: min(72%, 560px); padding: 8px 12px 6px; border-radius: 16px; display: flex; flex-direction: column; gap: 2px; line-height: 1.4; overflow-wrap: anywhere; }
.bubble.me { align-self: flex-end; background: var(--blue); color: #fff; border-bottom-right-radius: 5px; }
.bubble.them { align-self: flex-start; background: #1b2735; border-bottom-left-radius: 5px; }
.bubble-time { font-size: 11px; opacity: .7; align-self: flex-end; }
.bubble-report { position: absolute; right: -28px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--faint); cursor: pointer; opacity: 0; padding: 4px; }
.bubble:hover .bubble-report, .bubble-report:focus { opacity: 1; }
.dm-compose { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; border-top: 1px solid var(--line); }
.dm-compose textarea { flex: 1; resize: none; max-height: 160px; background: var(--panel2); border: 1px solid #2a3a4d; border-radius: 12px; padding: 10px 12px; color: var(--text); outline: none; line-height: 1.4; }
.dm-compose textarea:focus { border-color: var(--blue-txt); }
.dm-compose .btn-primary { width: 44px; padding: 0; }
.dm-note { padding: 14px; border-top: 1px solid var(--line); color: var(--muted); display: flex; align-items: center; gap: 8px; justify-content: center; }
/* ---------------------------------------------------------------- moderation, avatars, post actions */
.mod-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; border-radius: 10px; background: #1d1a10; border: 1px solid #4a3f1d; color: #f0cf7a; font-size: 13px; font-weight: 600; }
.btn-ghost.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.mod-tag { display: inline-flex; align-items: center; gap: 4px; color: #f0cf7a; font-weight: 600; }
.mod-act { color: #d8b65e; display: inline-flex; align-items: center; gap: 3px; }
.post-acts { display: inline-flex; gap: 12px; align-items: center; margin-left: auto; }
.link-btn.danger { color: #ff9aa6; }
.mod-item.is-new { border-color: #2f6fd0; }
.mod-item select { background: var(--panel2); border: 1px solid #2a3a4d; border-radius: 8px; padding: 5px 8px; color: var(--text); }
.mod-info { font: 12px/1.4 ui-monospace, Consolas, monospace; color: var(--faint); background: var(--panel2); border-radius: 8px; padding: 8px 10px; white-space: pre-wrap; overflow-x: auto; margin: 6px 0 0; }
.file-btn { cursor: pointer; }
img.avatar { display: inline-block; background: #1b2633; }
.avatar-edit { position: relative; display: inline-flex; border-radius: 50%; cursor: pointer; }
.avatar-edit input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.avatar-edit-overlay { position: absolute; inset: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(5,10,16,.55); color: #fff; opacity: 0; transition: opacity .15s; }
.avatar-edit:hover .avatar-edit-overlay, .avatar-edit:focus-within .avatar-edit-overlay { opacity: 1; }
.avatar-edit:focus-within { outline: 2px solid var(--blue-txt); outline-offset: 3px; }
.center-x { align-items: center; }
.center-x > .link-btn { align-self: center; }
.nav-item.soon { opacity: .72; }
.nav-item.soon:hover { opacity: 1; }
.soon-tag { font-size: 10px; letter-spacing: .04em; text-transform: uppercase; padding: 2px 6px; border-radius: 999px; background: rgba(90,162,255,.14); color: #9cc5ff; }
.soon-list { margin: 4px auto 8px; padding-left: 18px; text-align: left; color: var(--muted); line-height: 1.7; }

/* ---------- home ---------- */
.home .col-side { flex: 1 1 420px; max-width: 540px; }
.greet { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 14px; }
.greet h1 { font-size: 34px; margin: 0; letter-spacing: -.01em; }
.greet p { margin: 2px 0 0; font-size: 19px; color: var(--muted); }
.greet-people { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: 15px; }
.stack { display: inline-flex; } .stack > * { margin-left: -9px; box-shadow: 0 0 0 2px var(--bg, #0b1018); border-radius: 50%; } .stack > *:first-child { margin-left: 0; }
.dot-on { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #3fcf6e; margin-right: 7px; vertical-align: 1px; }
.grid-home { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.card-who { min-width: 0; line-height: 1.2; }
.acts { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.act { display: flex; align-items: center; gap: 12px; padding: 10px 14px; color: inherit; text-decoration: none; }
.act + .act { border-top: 1px solid var(--line); } .act:hover { background: rgba(255,255,255,.03); }
.act-ic { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.act-ic.remix { color: #5aa2ff; } .act-ic.new { color: #9cc5ff; } .act-ic.ok { color: #3fcf6e; } .act-ic.ask { color: #f4b860; }
.act-img { width: 86px; height: 52px; object-fit: cover; border-radius: 8px; flex: none; background: #1a2230; }
.act .stat { min-width: 50px; }
.jump-img { display: block; border-radius: 12px; overflow: hidden; background: #111824; border: 1px solid var(--line); aspect-ratio: 16 / 7; margin-bottom: 10px; }
.jump-img img { width: 100%; height: 100%; object-fit: cover; display: block; } .jump-img > span { display: grid; place-items: center; height: 100%; color: var(--muted); }
.sq56 { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex: none; } .sq56.ph { display: grid; place-items: center; background: #1a2230; color: var(--muted); }
.convos { display: flex; flex-direction: column; }
.convo { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; } .convo + .convo { border-top: 1px solid var(--line); }
.convo-title { font-weight: 650; font-size: 16px; color: inherit; text-decoration: none; } .convo-title:hover { text-decoration: underline; }
.convo-img { width: 70px; height: 70px; border-radius: 10px; object-fit: cover; flex: none; background: #1a2230; }
.convo-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.chip-sm { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 4px 9px; border-radius: 999px; background: #1c2635; color: #c9d6e6; }
.btn-outline.sm { padding: 4px 10px; font-size: 12.5px; }
.gap4 { gap: 4px; } .ok { color: #3fcf6e; }
.challenge-row { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 12px; }
.challenge-row img { width: 180px; height: 140px; object-fit: cover; border-radius: 12px; flex: none; }
.row-flat.tight { gap: 8px; padding: 0; }
.btn-primary.wide { width: 100%; justify-content: center; }
.spotlight { display: flex; align-items: center; gap: 14px; color: inherit; text-decoration: none; }
.spotlight:hover { border-color: #2f5f9e; } .spot-label { font-size: 15px; line-height: 1.2; margin-right: 6px; }
@media (max-width: 700px) { .challenge-row { flex-direction: column; } .challenge-row img { width: 100%; height: 160px; } .act-img { display: none; } }
.grid-home .card-img { aspect-ratio: 16 / 11; height: auto; }
.grid-home .card-img img { width: 100%; height: 100%; object-fit: cover; }
.panel.spotlight { flex-direction: row; align-items: center; }

/* ---------- forum ---------- */
.forum .col-side { flex: 1 1 340px; max-width: 400px; }
.crumbs { display: flex; gap: 8px; font-size: 15px; margin-bottom: 6px; color: var(--muted); } .crumbs a { color: #5aa2ff; text-decoration: none; }
.forum-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 14px; }
.forum-head h1 { font-size: 32px; margin: 0; } .forum-head .btn-primary { margin-left: auto; margin-top: 14px; white-space: nowrap; }
.lg-p { font-size: 18px; margin: 2px 0 10px; } .greet-people.left { margin-left: 0; }
.cat-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.ft { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--panel); }
.ft-head, .ft-row { display: grid; grid-template-columns: 96px 1fr 80px 100px; align-items: center; gap: 0 14px; }
.ft-head { grid-template-columns: 1fr 80px 100px; padding: 10px 16px; font-weight: 650; background: rgba(255,255,255,.03); border-bottom: 1px solid var(--line); }
.ft-row { padding: 8px 16px 8px 10px; } .ft-row + .ft-row { border-top: 1px solid var(--line); } .ft-row:hover { background: rgba(255,255,255,.025); }
.ft-pic { width: 96px; height: 64px; border-radius: 10px; overflow: hidden; background: #172030; border: 1px solid var(--line); display: block; }
.ft-pic img { width: 100%; height: 100%; object-fit: cover; display: block; } .ft-pic > span { display: grid; place-items: center; height: 100%; color: #5aa2ff; }
.ft-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ft-title { font-weight: 700; font-size: 16px; color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; } .ft-title:hover { text-decoration: underline; }
.ft-main > .tag { align-self: flex-start; }
.ft-line { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ft-meta { display: flex; align-items: center; gap: 8px; font-size: 13.5px; flex-wrap: wrap; }
.cat-pill { font-size: 12.5px; padding: 2px 9px; border-radius: 999px; background: #17325a; color: #9cc5ff; text-decoration: none; }
.ft-proj { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); padding-left: 6px; }
.ft-meta .link { display: inline-flex; align-items: center; gap: 4px; padding-left: 8px; border-left: 1px solid var(--line); }
.ft-replies { display: inline-flex; align-items: center; gap: 6px; } .ft-when { color: var(--muted); }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.tag.ok { background: rgba(63,207,110,.14); color: #57d985; border: 1px solid rgba(63,207,110,.35); }
.tag.warm { background: rgba(244,184,96,.12); color: #f4b860; border: 1px solid rgba(244,184,96,.35); }
.ft-foot { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-top: 1px solid var(--line); }
.side-hero { width: 100%; height: 150px; object-fit: cover; border-radius: 10px; margin-bottom: 8px; }
.helper { display: flex; align-items: center; gap: 12px; padding: 8px 0; color: inherit; text-decoration: none; } .helper + .helper { border-top: 1px solid var(--line); }
.btn-outline.wide { width: 100%; justify-content: center; }
@media (max-width: 760px) { .ft-row { grid-template-columns: 64px 1fr; } .ft-pic { width: 64px; height: 48px; } .ft-head, .ft-replies, .ft-when { display: none; } .forum-head { flex-direction: column; } .forum-head .btn-primary { margin-left: 0; } }
.cat-chips .chip.on { background: #2563eb; border-color: #2563eb; color: #fff; }

/* ---------- public main page (signed out) ---------- */
body.public .side, body.public .main > .top { display: none; }
body.public .main { margin: 0; width: 100%; } body.public .content { padding: 0; max-width: none; margin: 0; }
.pub { min-height: 100vh; display: flex; flex-direction: column; background: radial-gradient(1200px 500px at 70% -10%, rgba(47,124,246,.16), transparent 70%), var(--bg, #0b1018); }
.pub-top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px; padding: 14px 32px; background: rgba(11,16,24,.82); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
@media (max-width: 430px) {
  .pub .pub-top { flex-wrap: wrap; gap: 8px; padding-inline: 12px; }
  .pub-top .btn-primary, .pub-top .btn-ghost { padding-inline: 10px; }
}
@media (max-width: 350px) { .pub .wiki-section { scroll-margin-top: 112px; } }
.pub-brand { display: flex; align-items: center; gap: 10px; font-weight: 750; font-size: 19px; color: inherit; text-decoration: none; } .pub-brand svg { color: #4a8ff8; }
.pub-links { display: flex; gap: 22px; margin-left: 28px; } .pub-links a { color: var(--muted); text-decoration: none; } .pub-links a:hover, .pub-links a.on { color: var(--text, #fff); }
body.public .beta-bar { display: none; } /* (it's about your account's saved work) */
.pub-page { padding: 24px 0 40px; } .hero-look { margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 6px 18px; } .hero-look a { color: var(--blue-txt, #6aa8ff); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.pub-inner { flex: 1; width: min(1180px, 100%); margin: 0 auto; padding: 0 32px; box-sizing: border-box; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 48px; align-items: center; padding: 64px 0 48px; }
.beta-tag { display: inline-block; font-size: 13px; font-weight: 650; color: #9cc5ff; background: rgba(47,124,246,.14); border: 1px solid rgba(90,162,255,.3); padding: 4px 12px; border-radius: 999px; margin-bottom: 18px; }
.hero h1 { font-size: 50px; line-height: 1.06; letter-spacing: -.02em; margin: 0 0 18px; }
.lead { font-size: 19px; line-height: 1.55; color: var(--muted); margin: 0 0 26px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.hero-shot img { width: 100%; height: auto; border-radius: 16px; border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.03); display: block; }
.pub-sec { padding: 48px 0; border-top: 1px solid var(--line); } .pub-sec h2 { font-size: 30px; margin: 0 0 24px; letter-spacing: -.01em; }
.feat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feat article { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 14px 14px 18px; display: flex; flex-direction: column; }
.feat article > img, .feat-mats, .feat-comm { width: 100%; aspect-ratio: 16 / 10; border-radius: 12px; object-fit: cover; margin-bottom: 14px; background: #121924; box-sizing: border-box; }
.feat-mats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; overflow: hidden; } .feat-mats img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; min-height: 0; }
.feat-comm { display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 14px; }
.feat-comm > div { display: flex; gap: 10px; align-items: center; background: rgba(255,255,255,.04); border-radius: 10px; padding: 9px 11px; } .feat-comm svg { color: #6aa8ff; flex: none; }
.feat-comm span { display: flex; flex-direction: column; } .feat-comm small { color: var(--muted); font-size: 12px; }
.feat h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 18px; } .feat h3 svg { color: #6aa8ff; } .feat p { margin: 0; color: var(--muted); line-height: 1.55; }
.steps { list-style: none; counter-reset: s; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding: 0; margin: 0; }
.steps li { counter-increment: s; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.steps li::before { content: counter(s); width: 34px; height: 34px; border-radius: 50%; background: #2f7cf6; color: #fff; display: grid; place-items: center; font-weight: 700; margin-bottom: 8px; }
.steps span { color: var(--muted); line-height: 1.5; }
.plans { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; align-items: stretch; }
.plan { width: min(420px, 100%); background: var(--panel); border: 1px solid #2f5f9e; border-radius: 18px; padding: 26px; box-shadow: 0 20px 60px rgba(47,124,246,.12); display: flex; flex-direction: column; gap: 14px; box-sizing: border-box; }
.plan-name { font-weight: 700; color: #9cc5ff; text-transform: uppercase; letter-spacing: .08em; font-size: 13px; }
.plan-price strong { font-size: 52px; letter-spacing: -.02em; } .plan-price span { color: var(--muted); margin-left: 6px; font-size: 18px; }
.plan ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 9px; } .plan li { display: flex; gap: 9px; align-items: center; } .plan li svg { color: #57d985; flex: none; }
.btn-primary.wide { width: 100%; justify-content: center; }
#faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin-bottom: 10px; }
#faq summary { cursor: pointer; font-weight: 650; } #faq details p { color: var(--muted); margin: 10px 0 0; line-height: 1.55; }
.pub-cta { text-align: center; padding: 56px 0 72px; border-top: 1px solid var(--line); } .pub-cta h2 { font-size: 32px; margin: 0 0 18px; }
.pub-foot { display: flex; align-items: center; gap: 18px; padding: 18px 32px; border-top: 1px solid var(--line); font-size: 14px; } .pub-foot a { color: var(--muted); text-decoration: none; } .pub-foot span:first-child { display: flex; gap: 8px; align-items: center; font-weight: 650; }
.pub .auth { max-width: 460px; margin: 48px auto; }
.btn-ghost.lg { padding: 12px 18px; font-size: 16px; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; padding-top: 36px; } .hero h1 { font-size: 38px; } .feat, .steps { grid-template-columns: 1fr; } .pub-links { display: none; } .pub-top { padding: 12px 16px; } .pub-inner { padding: 0 16px; } }

/* Material cards ("colour glow"): the card is lit by a blurred copy of the material itself, the sphere floats on
   it, and the title sits on the card with no separate box. */
.card.glow { position: relative; isolation: isolate; background: #10151b; border-color: rgba(255,255,255,.06); border-radius: 16px; }
.card.glow .glow-bg { position: absolute; inset: -35%; z-index: -1; background-size: cover; background-position: center; filter: blur(34px) saturate(1.5) brightness(.55); opacity: 0; transition: opacity .5s; }
.card.glow.ready .glow-bg { opacity: 1; }
.card.glow::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(transparent 55%, rgba(0,0,0,.55)); pointer-events: none; }
.card.glow .card-img, .grid-home .card.glow .card-img { background: none; aspect-ratio: 1 / .78; overflow: visible; }
.card.glow .sph-src { position: absolute; width: 1px !important; height: 1px !important; opacity: 0; pointer-events: none; }
.card.glow .sph { position: absolute; left: 50%; top: 14%; height: 80%; aspect-ratio: 1; transform: translateX(-50%); border-radius: 50%; background-repeat: no-repeat; box-shadow: 0 28px 36px -20px rgba(0,0,0,.85); transition: transform .35s cubic-bezier(.3,.7,.2,1); }
.card.glow:hover .sph { transform: translateX(-50%) translateY(-3%) scale(1.05); }
.card.glow .card-body { background: none; }
.card.glow .pill { z-index: 2; background: rgba(8,11,16,.5); backdrop-filter: blur(6px); border-color: rgba(255,255,255,.14); }
.card.glow:hover { border-color: rgba(255,255,255,.18); }

/* Shapley wordmark: bold geometric sans next to the gradient cube. */
.wordmark { font-family: 'Montserrat', 'Poppins', 'Segoe UI Variable Display', 'Segoe UI', system-ui, sans-serif; font-weight: 700; letter-spacing: -0.015em; }
.brand .wordmark { font-size: 22px; line-height: 1; }
.pub-brand .wordmark { font-size: 22px; } .pub-brand svg { width: 30px; height: 30px; }
.foot-brand { display: inline-flex; align-items: center; gap: 6px; } .foot-brand svg { width: 18px; height: 18px; } .foot-brand .wordmark { font-size: 14px; }

/* ---------- phones and small tablets: app-style layout ----------
   Top bar with a menu button, the sidebar slides in from the left, a tab bar along the bottom. */
.menu-toggle, .brand-m, .tabbar, .side-scrim { display: none; }
.phone-note { position: fixed; inset: 0; z-index: 90; background: rgba(5,8,12,.6); display: flex; align-items: flex-end; justify-content: center; padding: 12px; }
.phone-note-card { width: 100%; max-width: 440px; background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.phone-note-card strong { font-size: 17px; } .phone-note-card .row-actions { display: flex; gap: 8px; justify-content: flex-end; }
@media (max-width: 900px) {
  .app { display: block; min-height: 0; }
  html, body { min-height: 100%; }
  .dm-wrap { height: calc(100dvh - 180px - env(safe-area-inset-bottom)); min-height: 320px; }
  .side { position: fixed; z-index: 60; top: 0; bottom: 0; left: 0; width: 272px; max-width: 86vw; transform: translateX(-102%); transition: transform .22s ease; overflow-y: auto; box-shadow: 10px 0 40px rgba(0,0,0,.5); padding-top: max(14px, env(safe-area-inset-top)); }
  body.side-open .side { transform: none; }
  body.side-open { overflow: hidden; }
  .side-scrim { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(4,7,11,.55); }
  .side-scrim[hidden] { display: none; }
  .top { position: sticky; top: 0; z-index: 40; background: rgba(10,16,23,.92); backdrop-filter: blur(10px); flex-wrap: nowrap; gap: 8px; padding: 8px 10px; padding-top: max(8px, env(safe-area-inset-top)); }
  .menu-toggle, .brand-m { display: inline-flex; }
  .brand-m { padding: 0; }
  .top .search { flex: 1; min-width: 0; }
  .top .search input { min-width: 0; width: 100%; }
  .top .open-studio, .top > .grow { display: none; }
  .content { padding: 14px 12px calc(84px + env(safe-area-inset-bottom)); }
  .tabbar { display: flex; position: fixed; z-index: 45; left: 0; right: 0; bottom: 0; background: rgba(12,19,27,.96); backdrop-filter: blur(10px); border-top: 1px solid #1a2532; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0; color: var(--faint); font-size: 11px; position: relative; border-radius: 10px; }
  .tabbar a.on { color: #fff; } .tabbar a.on svg { color: var(--blue-txt); }
  .tabbar .count { position: absolute; top: 0; left: 52%; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #e5484d; color: #fff; font-size: 10px; display: inline-flex; align-items: center; justify-content: center; }
  .tabbar .count[hidden] { display: none; }
  .grid, .grid-home { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  h1 { font-size: 24px; }
  input, textarea, select { font-size: 16px; } /* stops phones zooming in when you tap a field */
}
@media (max-width: 900px) {
  .top [data-browser-settings] { display: none; } /* the full-screen preference is for computers */
  .tabs { overflow-x: auto; scrollbar-width: none; } .tabs > * { white-space: nowrap; flex: none; }
  .section-head h2 { font-size: 18px; } .section-head a { white-space: nowrap; }
  .grid .card-meta .avatar, .grid-home .card-meta .avatar { display: none; }
  .card-meta { gap: 6px; } .card-who .ellipsis { font-size: 12.5px; }
  .greet { flex-wrap: wrap; gap: 8px; }
}
.check-row input[type="checkbox"] { width: 16px !important; min-width: 16px; height: 16px; margin: 3px 0 0; }
@media (max-width: 380px) { .grid, .grid-home { grid-template-columns: 1fr; } }

/* ---------- online now ---------- */
.as-btn { background: none; border: 0; padding: 4px 8px; margin: -4px -8px; border-radius: 10px; cursor: pointer; font: inherit; color: inherit; }
.as-btn:hover { background: rgba(255,255,255,.05); } .as-btn:hover .muted { color: var(--text, #e7eaef); }
.online-pop { position: fixed; z-index: 80; width: 340px; max-width: calc(100vw - 20px); max-height: min(480px, calc(100vh - 120px)); display: flex; flex-direction: column; background: var(--panel, #161b22); border: 1px solid var(--border, #2a313b); border-radius: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.5); padding: 12px 12px 10px; }
.online-pop .op-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.online-pop .op-x { background: none; border: 0; color: var(--faint, #7a8491); cursor: pointer; }
.online-pop .op-list { overflow: auto; display: flex; flex-direction: column; gap: 2px; }
.online-pop .op-row { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 10px; }
.online-pop .op-row:hover { background: rgba(255,255,255,.04); }
.online-pop .op-row > a.col { text-decoration: none; color: inherit; }
.online-pop .op-where { display: inline-flex; align-items: center; gap: 4px; }
.online-pop .btn-ghost.sm { padding: 4px 10px; font-size: 12.5px; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.online-pop .op-foot { margin: 8px 4px 0; border-top: 1px solid var(--border, #2a313b); padding-top: 8px; }
.form label.check-row, .check-row { display: flex; flex-direction: row; gap: 10px; align-items: flex-start; cursor: pointer; }
.check-row > span { display: flex; flex-direction: column; gap: 2px; color: var(--text); }
.flash { animation: flash 1.6s ease-out 1; border-radius: 10px; }
@keyframes flash { 0% { box-shadow: 0 0 0 3px rgba(74,143,248,.8); } 100% { box-shadow: 0 0 0 3px rgba(74,143,248,0); } }
/* ---- live sessions ---- */
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #ff4d4d; margin-right: 6px; vertical-align: 1px; animation: live-pulse 1.6s infinite; }
@keyframes live-pulse { 50% { opacity: .45; } }
.live-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.live-row.big { padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--panel); }
.live-list { display: flex; flex-direction: column; gap: 10px; max-width: 760px; }
.live-panel { border-color: rgba(255,77,77,.35); }
.live-cat { flex: none; font-size: 11.5px; padding: 2px 9px; border-radius: 999px; background: var(--panel2); color: var(--muted); border: 1px solid var(--border); }
.live-cat.c-help { color: #ffd08a; border-color: rgba(255,208,138,.35); } .live-cat.c-teaching { color: #9fd0ff; border-color: rgba(159,208,255,.35); }
.live-cat.c-hangout { color: #c9b6ff; border-color: rgba(201,182,255,.35); } .live-cat.c-games { color: #8fe0b5; border-color: rgba(143,224,181,.35); }
.live-row:not(.big) .live-cat { display: none; }
/* ---- friends ---- */
.fr-me { display: flex; align-items: center; gap: 10px; padding: 12px 16px; margin-bottom: 14px; } .fr-handle { font-size: 16px; }
.fr-find { display: flex; align-items: center; gap: 8px; margin-top: 8px; max-width: 520px; } .fr-at { color: var(--muted); font-size: 18px; }
.fr-find input { flex: 1; min-width: 0; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel2); color: inherit; font: inherit; font-size: 15px; }
.fr-result { margin-top: 12px; max-width: 620px; } .fr-row { display: flex; align-items: center; gap: 10px; min-width: 0; } .fr-row a.grow { min-width: 0; color: inherit; text-decoration: none; }
.panel + .panel { margin-top: 14px; } .chip-sm.ok { color: #8fe0b5; }
.field-hint.good { color: #8fe0b5; } .field-hint.bad { color: #ffb4a8; }
.panel.fr-me { flex-direction: row; align-items: center; justify-content: flex-start; text-align: left; gap: 10px; }
.create-wrap { position: relative; } .cw-caret { font-size: 11px; margin-left: 2px; opacity: .85; }
.create-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; width: 300px; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 6px; box-shadow: 0 16px 40px rgba(0,0,0,.45); }
.create-menu a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: inherit; text-decoration: none; }
.create-menu a:hover, .create-menu a:focus-visible { background: var(--panel2); }
.create-menu span { display: flex; flex-direction: column; } .create-menu small { color: var(--muted); font-size: 12.5px; }
.earned { margin: 6px 0 4px; } .earned-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.earned-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; }
.earned-pic { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 8px 4px; border-radius: 12px; border: 1px solid var(--border); background: var(--panel2); color: inherit; font: inherit; font-size: 11.5px; text-align: center; cursor: pointer; }
.earned-pic img { width: 56px; height: 56px; border-radius: 50%; } button.earned-pic:hover { border-color: #5aa0ff; }
.earned-pic.locked { cursor: default; color: var(--faint, #7d8b9c); } .earned-pic .lock { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.04); border: 1px dashed var(--border); }

/* Home: the launcher */
.launch { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 6px 0 4px; }
.launch-card { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 6px 14px; align-items: center; padding: 18px 18px 16px; border-radius: 16px; border: 1px solid var(--border); background: var(--panel); text-decoration: none; color: inherit; transition: border-color .15s, transform .15s, background .15s; }
.launch-card:hover { transform: translateY(-2px); border-color: #3b5577; }
.launch-card strong { font-size: 18px; } .launch-card small { color: var(--muted); }
.launch-ic { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; grid-row: span 2; }
.l3d .launch-ic { background: linear-gradient(140deg, #2f7cf0, #1a4aa8); color: #fff; }
.llab .launch-ic { background: linear-gradient(140deg, #d8862f, #9a4a14); color: #fff; }
.launch-go { grid-column: 2; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; color: #8fb8ff; }
.llab .launch-go { color: #f2b77a; }
.recents { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.rec { display: flex; flex-direction: column; border-radius: 12px; border: 1px solid var(--border); background: var(--panel); overflow: hidden; text-decoration: none; color: inherit; transition: border-color .15s; }
.rec:hover { border-color: #3b5577; }
.rec-img { aspect-ratio: 16 / 10; display: grid; place-items: center; background: var(--panel2); color: var(--muted); overflow: hidden; }
.rec-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rec-t { display: flex; flex-direction: column; gap: 2px; padding: 9px 11px 10px; min-width: 0; }
.learn-ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: #183150; color: #8fb8ff; flex: none; }
.learn-bar { height: 6px; border-radius: 4px; background: var(--panel2); overflow: hidden; } .learn-bar span { display: block; height: 100%; background: linear-gradient(90deg, #2f7cf0, #5fd0a4); border-radius: 4px; }
@media (max-width: 700px) { .launch { grid-template-columns: 1fr; } }

/* Explore: rows you scroll sideways (drag or wheel). Trending: four big cards; the row under it: six small ones. */
.xrow { margin-bottom: 8px; } .xrow .section-head { margin-bottom: 8px; }
.xrow-tabs { border: 0; margin: 0; padding: 0; } .xrow-tabs .tab { border: 0; cursor: pointer; font: inherit; } .xrow-tabs .tab:not(.on) { background: none; }
.xrow-track { display: grid; grid-auto-flow: column; gap: 12px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; cursor: grab; user-select: none; overscroll-behavior-x: contain; }
.xrow-track.big { grid-auto-columns: calc((100% - 36px) / 4); }
.xrow-track.small { grid-auto-columns: calc((100% - 50px) / 6); gap: 10px; }
.xrow-track.dragging { cursor: grabbing; } .xrow-track.dragging a { pointer-events: none; }
.xrow-track[hidden] { display: none; }
.xrow-track img { -webkit-user-drag: none; }
.xrow-track > * { min-width: 0; }
.xrow-track .card-img { aspect-ratio: 1 / 1; height: auto; }
.xrow-track .card-img img { width: 100%; height: 100%; object-fit: cover; }
.xrow-empty { grid-column: 1 / -1; padding: 18px 0; }
.acts-panel { margin-top: 14px; } .acts-panel .acts { border: 0; border-radius: 0; }
.acts-panel .act { padding: 8px 2px; gap: 10px; } .acts-panel .act + .act { border-top: 1px solid var(--line); }
.act-who { position: relative; flex: none; }
.act-who .act-ic { position: absolute; right: -4px; bottom: -4px; width: 16px; height: 16px; background: var(--panel); border: 1px solid var(--line); }
.act-t { min-width: 0; gap: 2px; } .act-t .small svg { vertical-align: -2px; }
.acts-panel .act-img { width: 44px; height: 44px; border-radius: 8px; }
.act-ph { display: grid; place-items: center; color: var(--muted); }
@media (max-width: 900px) { .xrow-track { grid-auto-columns: calc((100% - 12px) / 2); } }
/* Compact cards inside Explore rows */
.xrow-track .pill { font-size: 10.5px; padding: 2px 7px; } .xrow-track.small .pill.tl { display: none; } .xrow-track.small .pill { font-size: 9.5px; padding: 1px 6px; } .xrow-track .pill svg { width: 10px; height: 10px; }
.xrow-track .card-body { padding: 8px 10px 10px; gap: 6px; }
.xrow-track .card-body > strong { font-size: 14px; }
.xrow-track .card-meta { gap: 6px; font-size: 12.5px; }
.xrow-track .card-meta .avatar { width: 20px !important; height: 20px !important; font-size: 10px; }
.xrow-track .card-who .small { display: none; }
.xrow-track .stat { font-size: 12px; gap: 3px; } .xrow-track .stat svg { width: 13px; height: 13px; }

.xrow-track.small .card-body { padding: 6px 8px 8px; gap: 4px; } .xrow-track.small .card-body > strong { font-size: 12.5px; }
.xrow-track.small .card-meta { font-size: 11.5px; } .xrow-track.small .stat:last-child { display: none; }
@media (max-width: 900px) { .xrow-track.big { grid-auto-columns: calc((100% - 12px) / 2); } .xrow-track.small { grid-auto-columns: calc((100% - 20px) / 3); } }
.earned.beta { margin-top: 14px; }
/* Emblem: an earned badge on the corner of an avatar */
.av-wrap { position: relative; display: inline-block; flex: none; line-height: 0; }
.av-wrap > .avatar { width: 100% !important; height: 100% !important; }
.av-emblem { position: absolute; right: -12%; bottom: -12%; border-radius: 50%; box-shadow: 0 0 0 2px var(--bg, #0b1118); pointer-events: none; }
.earned-pic.on { border-color: #5aa0ff; box-shadow: inset 0 0 0 1px #5aa0ff; }
/* Friends page tabs and profile follower counts */
.fr-tabs { margin-bottom: 12px; } .fr-tabs .tab .muted { margin-left: 6px; font-weight: 500; } .fr-tabs .tab.on .muted { color: #dbe8ff; }
.prof-counts a { color: inherit; } .prof-counts a:hover { color: #fff; } .prof-counts b { color: #e6edf5; }
.feed-tabs { border: 0; padding: 0; margin: 0 0 0 4px; } .feed-tabs .tab { height: 30px; padding: 0 12px; font-size: 14px; cursor: pointer; border: 0; font-family: inherit; } .feed-tabs .tab:not(.on) { background: none; }

/* ---------------------------------------------------------------- education mode */
.side [data-nav][hidden], .tabbar [data-nav][hidden], #top-messages[hidden], #menu-teach[hidden] { display: none !important; }
.edu-student .search, .edu-student .create-wrap, .edu-student .nav-label + .nav .soon { display: none !important; }
.edu-form { max-width: 560px; }
.edu-form h2, .panel h2 { margin: 0; font-size: 17px; }
.edu-classes { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 14px; }
.edu-class { color: var(--text); text-decoration: none; } .edu-class:hover { border-color: var(--blue); }
.edu-roster, .edu-logins { width: 100%; border-collapse: collapse; font-size: 14px; }
.edu-roster th, .edu-roster td, .edu-logins th, .edu-logins td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.edu-roster th, .edu-logins th { color: var(--muted); font-weight: 600; font-size: 12px; }
.edu-roster .row-actions { display: flex; gap: 4px; justify-content: flex-end; flex-wrap: wrap; }
.edu-add label small { display: block; font-weight: 400; margin-top: 2px; }
.edu-settings label { display: flex; flex-direction: column; gap: 4px; max-width: 460px; }
.edu-settings select, .edu-basics input { max-width: 460px; background: var(--panel2); border: 1px solid #2a3a4d; border-radius: 9px; padding: 9px 11px; color: var(--text); outline: none; font: inherit; }
.edu-settings select:focus, .edu-basics input:focus { border-color: var(--blue-txt); }
.edu-settings > label, .edu-basics label { color: var(--muted); }
.edu-check span { color: var(--text); }
.edu-home { display: flex; flex-direction: column; gap: 22px; } .edu-home h2 { margin: 0 0 4px; font-size: 18px; }
.edu-check { flex-direction: row !important; align-items: flex-start; gap: 10px !important; cursor: pointer; }
.edu-check input { margin-top: 3px; } .edu-check small { display: block; color: var(--muted); font-size: 12px; }
.edu-check input:disabled + span { opacity: .5; }
.edu-apps { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; max-width: 460px; }
.edu-apps legend { color: var(--muted); font-size: 13px; padding: 0 4px; }
.edu-basics { gap: 12px; align-items: flex-end; }
.btn-ghost.danger { color: #ff8a80; }
.edu-work { display: flex; flex-direction: column; gap: 6px; }
.edu-apps-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.edu-app { align-items: center; justify-content: center; gap: 8px; min-height: 96px; color: var(--text); text-decoration: none; padding: 18px; } .edu-app:hover { border-color: var(--blue); }
.edu-sheet { position: fixed; inset: 0; z-index: 80; background: rgba(8,12,18,.75); display: grid; place-items: center; padding: 20px; }
.edu-sheet-card { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 20px; width: min(760px, 100%); max-height: 90vh; overflow: auto; display: flex; flex-direction: column; gap: 12px; }
.edu-sheet-card h2 { margin: 0 0 4px; }
.edu-logins code, .edu-roster code { font-size: 14px; }
.edu-sheet-btns { justify-content: flex-end; display: flex; gap: 8px; } .edu-sheet-btns .btn-outline { height: 40px; padding: 0 14px; font-size: 14px; }
.toast.error { border-color: #d04a3f; background: #3a1e1e; }
@media print {
  body.printing-logins > *:not(.edu-sheet) { display: none !important; }
  body.printing-logins .edu-sheet { position: static; background: #fff; padding: 0; display: block; }
  body.printing-logins .edu-sheet-card { border: 0; background: #fff; color: #000; max-height: none; width: 100%; }
  body.printing-logins .edu-sheet-card .muted, body.printing-logins .edu-logins th { color: #333; }
  body.printing-logins .edu-logins td, body.printing-logins .edu-logins th { border-bottom: 1px solid #999; font-size: 15px; padding: 10px; }
  body.printing-logins .edu-sheet-btns { display: none; }
}
.edu-apps-row > .panel, .edu-classes > .panel { margin: 0; }
/* Students: their teacher names them, and they're never shown as online. */
.edu-student label:has(> input[name="name"]), .edu-student label:has(> input[name="handle"]), .edu-student label:has(> input[name="showOnline"]), .edu-student .check-row:has(input[name="showOnline"]) { display: none !important; }

/* ---------------------------------------------------------------- my assets */
.asset-upload { cursor: pointer; }
.asset-drop { display: flex; gap: 12px; align-items: center; border: 1px dashed #2f3e52; border-radius: 12px; padding: 14px 16px; color: var(--muted); margin-bottom: 16px; }
.asset-drop strong { color: var(--text); } .asset-drop.over { border-color: var(--blue-txt); background: var(--blue-soft); } .asset-drop.busy { opacity: .75; pointer-events: none; }
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.asset-card { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.asset-pic { aspect-ratio: 4 / 3; display: grid; place-items: center; background: #1a2433; color: var(--faint); }
.asset-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.asset-info { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 4px; min-width: 0; }
.asset-acts { display: flex; gap: 6px; padding: 8px 12px 12px; flex-wrap: wrap; align-items: center; }
.asset-acts .btn-primary.sm, .asset-acts .btn-soft.sm { height: 32px; padding: 0 10px; font-size: 13px; gap: 6px; }
.asset-acts .btn-ghost.sm { height: 32px; padding: 0 8px; }

.plan li { align-items: flex-start; } .plan li svg { margin-top: 3px; }
.plan-edu { border-color: #6a4fd0; box-shadow: 0 20px 60px rgba(124,79,246,.12); }
.plan > .btn-primary { margin-top: auto; }
.pub-sec { scroll-margin-top: 84px; }

/* Account type on sign-in / create account */
.kind-pick { display: flex; gap: 4px; padding: 4px; background: var(--panel2); border: 1px solid var(--border); border-radius: 11px; margin: 4px 0 12px; }
.kind-pick .kind { flex: 1; text-align: center; padding: 8px 10px; border-radius: 8px; color: var(--muted); font-weight: 600; text-decoration: none; }
.kind-pick .kind:hover { color: var(--text); } .kind-pick .kind.on { background: var(--blue-soft); color: #cfe3ff; box-shadow: inset 0 0 0 1px #2f6fd0; }

.edu-seats { display: flex; gap: 8px; align-items: center; color: var(--muted); margin: 0 0 12px; } .edu-seats strong { color: var(--text); }

/* will it run? */
.perf-box { display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }
.perf-run { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.perf-prog { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 220px; }
.perf-bar { flex: 1; max-width: 320px; height: 8px; border-radius: 4px; background: var(--line, #262b33); overflow: hidden; }
.perf-bar i { display: block; height: 100%; width: 0; background: var(--blue, #2f7cf6); transition: width .25s; }
.perf-out.dim { opacity: .45; }
.perf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.perf-app { border: 1px solid var(--line, #262b33); border-radius: 14px; padding: 14px; background: var(--panel, #1b1f26); display: flex; flex-direction: column; gap: 6px; }
.perf-app p { margin: 0; font-size: 13px; color: var(--muted, #a1a9b4); line-height: 1.4; }
.perf-top { display: flex; align-items: center; gap: 8px; } .perf-top .soon { font-size: 11px; padding: 1px 6px; border-radius: 6px; background: #26303d; color: var(--blue-txt, #6aa8ff); }
.perf-meter { display: flex; gap: 4px; } .perf-meter i { width: 34px; height: 6px; border-radius: 3px; background: #2a303a; }
.perf-app.r-slow .perf-meter i.on { background: #e0a43a; } .perf-app.r-good .perf-meter i.on { background: #4fae6d; } .perf-app.r-excellent .perf-meter i.on { background: #36c46d; }
.perf-rating { font-weight: 650; } .r-none .perf-rating { color: #ff8a8a; } .r-slow .perf-rating { color: #e8b25a; } .r-good .perf-rating { color: #6fcf8b; } .r-excellent .perf-rating { color: #4fe08a; }
.perf-dev { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 2px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; }
.perf-dev div { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .perf-dev dt { font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; }
.perf-dev dd { margin: 0; color: var(--text); display: flex; align-items: center; gap: 8px; }
.perf-kind { font-size: 11px; padding: 1px 7px; border-radius: 6px; background: var(--blue-soft); color: var(--blue-txt); }

/* Privacy policy and terms */
.legal { max-width: 760px; margin: 0 auto; line-height: 1.6; }
.legal h2 { margin: 26px 0 8px; font-size: 18px; } .legal h3 { margin: 16px 0 6px; font-size: 15px; }
.legal ul { padding-left: 20px; } .legal li { margin: 4px 0; }

/* Beta note above the page content */
.beta-bar { display: flex; align-items: center; gap: 10px; margin: 10px 18px 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel2, #0e151e); color: var(--muted); font-size: 13px; }
.beta-bar[hidden] { display: none; }
.beta-bar > span:nth-child(2) { flex: 1; min-width: 0; }
.beta-pill { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 2px 7px; border-radius: 6px; background: var(--blue-soft, #13284a); color: var(--blue-txt, #5aa2ff); }
.beta-x { border: 0; background: none; color: var(--faint); cursor: pointer; font-size: 14px; padding: 2px 4px; } .beta-x:hover { color: var(--text); }

/* Community lessons (lessons.ts) */
.lesson-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-top: 14px; }
.lesson-card { display: flex; flex-direction: column; gap: 8px; padding: 14px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s; }
.lesson-card:hover { border-color: var(--blue-txt); transform: translateY(-1px); }
.lc-top { display: flex; align-items: center; gap: 8px; font-size: 15px; } .lc-top svg { color: var(--blue-txt); flex: none; }
.lc-desc { margin: 0; color: var(--muted); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lc-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; }
.lc-by { display: flex; align-items: center; gap: 7px; font-size: 13px; border-top: 1px solid var(--line); padding-top: 8px; }
.ls-stars { display: inline-flex; gap: 1px; line-height: 1; } .ls-stars i { font-style: normal; color: #3a4757; } .ls-stars i.on { color: #ffc24a; }
.ls-stars i.half { background: linear-gradient(90deg, #ffc24a 50%, #3a4757 50%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ls-search { width: 100%; max-width: 420px; background: var(--panel2); border: 1px solid var(--border); border-radius: 9px; padding: 8px 11px; color: var(--text); font: inherit; outline: none; }
.ls-search:focus { border-color: var(--blue-txt); }
.lesson-detail { display: flex; flex-direction: column; gap: 10px; max-width: 760px; }
.ls-rate { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding-top: 10px; }
.ls-pick { display: inline-flex; } .ls-pick button { background: none; border: 0; font-size: 24px; line-height: 1; color: #3a4757; cursor: pointer; padding: 0 2px; }
.ls-pick button.on, .ls-pick:hover button { color: #ffc24a; } .ls-pick button:hover ~ button { color: #3a4757; }
/* My Projects › Drafts */
.card.draft .card-img img { width: 100%; height: 100%; object-fit: cover; }
.card.draft .draft-ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--faint, #6b7785); }
.card.draft .card-meta { gap: 6px; align-items: center; }
.card.draft .btn-ghost.small { padding: 4px 8px; font-size: 12.5px; }
.card.draft .card-meta .grow { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

/* YouTube videos in posts */
.yt { margin: 12px 0 4px; max-width: 640px; }
.yt-play { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: #000; cursor: pointer; }
.yt-play img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.yt-play:hover img { transform: scale(1.02); }
.yt iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 12px; background: #000; }
.yt-btn { position: absolute; left: 50%; top: 50%; width: 68px; height: 48px; margin: -24px 0 0 -34px; border-radius: 14px; background: rgba(0,0,0,.72); transition: background .15s; }
.yt-btn::after { content: ''; position: absolute; left: 27px; top: 14px; border-style: solid; border-width: 10px 0 10px 17px; border-color: transparent transparent transparent #fff; }
.yt-play:hover .yt-btn { background: #e62117; }
.yt-btn.small { width: 34px; height: 24px; margin: -12px 0 0 -17px; border-radius: 7px; }
.yt-btn.small::after { left: 13px; top: 7px; border-width: 5px 0 5px 9px; }
.yt-out { display: inline-block; margin-top: 6px; font-size: 13px; }
.ft-pic.ft-vid { position: relative; overflow: hidden; }
.ft-pic.ft-vid img { width: 100%; height: 100%; object-fit: cover; }
