/* Showcase: project gallery, project pages, devlog banner. Built on the Float tokens in float.css. */
.px-devlog { background: color-mix(in oklab, #f97316 16%, transparent); color: #ea580c; }

/* covers: a real image, or a soft gradient with the project's initial */
.sc-cover, .sc-hero-art, .sc-banner-art, .sc-mini-art { position: relative; overflow: hidden; background: var(--surface-2); }
.sc-cover img, .sc-hero-art img, .sc-banner-art img, .sc-mini-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sc-blank { display: grid; place-items: center; color: rgb(255 255 255 / .9);
  background: radial-gradient(120% 90% at 15% 10%, hsl(var(--h) 85% 62%), transparent 60%),
              radial-gradient(90% 90% at 95% 95%, hsl(calc(var(--h) + 60) 85% 58%), transparent 60%), hsl(calc(var(--h) + 20) 55% 32%); }
.sc-blank span { font: 800 clamp(1.4rem, 5vw, 3rem)/1 var(--font-display); letter-spacing: var(--track-tight); text-shadow: 0 4px 24px rgb(0 0 0 / .25); }

/* gallery */
.sc-head { padding-bottom: var(--s-5); }
.sc-seg { flex-wrap: wrap; }
.sc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--gap-float); }
.sc-card { display: flex; flex-direction: column; overflow: hidden; color: inherit; text-decoration: none; }
.sc-card .sc-cover { aspect-ratio: 16 / 9; }
.sc-card .sc-cover img { transition: transform var(--t-slow) var(--ease-liquid); }
@media (hover: hover) { .sc-card:hover .sc-cover img { transform: scale(1.04); } }
.sc-card-body { display: flex; flex-direction: column; gap: 6px; padding: var(--s-4) var(--s-5) var(--s-5); flex: 1; }
.sc-card-top { display: flex; align-items: center; justify-content: space-between; }
.sc-card h3 { margin: 2px 0 0; font: 700 var(--fs-lg, 1.15rem)/1.2 var(--font-display); letter-spacing: var(--track-tight); }
.sc-card p { margin: 0; color: var(--text-muted); font-size: var(--fs-sm); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sc-card-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: var(--s-3); font-size: var(--fs-xs); color: var(--text-muted); }
.sc-by { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-nums { margin-left: auto; display: flex; gap: 10px; white-space: nowrap; }
.sc-following { color: var(--accent); font-size: var(--fs-sm); }
.sc-plats { display: flex; flex-wrap: wrap; gap: 4px; }
.sc-plat { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: var(--r-pill); font: 600 11px/1 var(--font-ui); color: var(--text-muted); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); }

.sc-st-concept { background: var(--surface-2); color: var(--text-muted); }
.sc-st-dev { background: color-mix(in oklab, #8b5cf6 16%, transparent); color: #7c3aed; }
.sc-st-early { background: color-mix(in oklab, #f59e0b 18%, transparent); color: #b45309; }
.sc-st-released { background: color-mix(in oklab, #22c55e 16%, transparent); color: #16a34a; }
.sc-st-paused { background: color-mix(in oklab, #64748b 16%, transparent); color: #64748b; }

/* project page hero */
.sc-hero { position: relative; overflow: hidden; margin: var(--s-5) 0 max(var(--gap-float, 10px), var(--s-4)); min-height: 320px; display: flex; align-items: flex-end; border-radius: var(--r-xl); }
.sc-hero-art { position: absolute; inset: 0; }
.sc-hero-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(8 10 20 / .05) 15%, rgb(8 10 20 / .55) 55%, rgb(8 10 20 / .85)); }
.sc-hero-in { position: relative; padding: var(--s-7) var(--s-6) var(--s-6); color: #fff; width: 100%; }
.sc-hero-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: var(--s-3); }
.sc-hero .sc-plat { color: rgb(255 255 255 / .9); background: rgb(255 255 255 / .14); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .18); backdrop-filter: blur(8px); }
.sc-hero .chip { backdrop-filter: blur(8px); background: rgb(255 255 255 / .9); }
.sc-hero h1 { margin: 0; font: 800 clamp(1.9rem, 4.5vw, 3rem)/1.05 var(--font-display); letter-spacing: var(--track-tight); text-shadow: 0 2px 20px rgb(0 0 0 / .3); }
.sc-tag { margin: 8px 0 0; font-size: var(--fs-md, 1.05rem); color: rgb(255 255 255 / .86); }
.sc-hero-by { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: var(--s-4); font-size: var(--fs-sm); color: rgb(255 255 255 / .86); }
.sc-hero-by .uname { text-shadow: 0 1px 8px rgb(0 0 0 / .35); }
.sc-hero-by .btn { margin-left: auto; }
.sc-hero-follow { display: none; }
@media (max-width: 1079px) { .sc-hero-follow { display: block; margin-left: auto; } .sc-hero-follow + .btn { margin-left: 0; } }

.sc-follow-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); margin-bottom: var(--s-4); }
.sc-follow-form, .sc-follow { width: 100%; }
.sc-follow[aria-pressed="true"] { color: var(--accent); }
.sc-note { margin-top: 10px; }
.sc-links { display: grid; gap: 8px; }
.sc-link { display: flex; align-items: center; justify-content: space-between; height: 40px; padding: 0 14px; border-radius: var(--r-md); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); color: var(--text); font-weight: 600; font-size: var(--fs-sm); text-decoration: none;
  transition: transform var(--t-med) var(--ease-spring), background-color var(--t-fast); }
.sc-link:hover { transform: translateX(2px); background: var(--accent-soft); color: var(--accent); }
.sc-dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin: 0; font-size: var(--fs-sm); }
.sc-dl dt { color: var(--text-faint); }
.sc-dl dd { margin: 0; }

/* screenshots + CSS-only lightbox */
.sc-shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; padding: var(--s-4); }
.sc-shot { display: block; aspect-ratio: 16 / 9; border-radius: var(--r-md); overflow: hidden; box-shadow: var(--rim), var(--e-1); }
.sc-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sc-lightbox { position: fixed; inset: 0; z-index: 90; display: none; place-items: center; padding: 4vmin; background: rgb(6 8 16 / .82); backdrop-filter: blur(10px); }
.sc-lb-radio { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.sc-lb-radio:checked + .sc-lightbox { display: grid; animation: sc-fade var(--t-med) var(--ease-liquid); }
.sc-lb-bg { position: absolute; inset: 0; cursor: zoom-out; }
.sc-lightbox img { position: relative; }
.sc-shot { cursor: zoom-in; }
.sc-lb-close, .sc-lb-nav { cursor: pointer; z-index: 1; }
.sc-lightbox img { max-width: 100%; max-height: 88vh; border-radius: var(--r-lg); box-shadow: 0 30px 80px rgb(0 0 0 / .5); animation: sc-pop var(--t-slow) var(--ease-spring); }
.sc-lb-close, .sc-lb-nav { position: absolute; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: #fff; font-size: 26px; text-decoration: none; background: rgb(255 255 255 / .12); }
.sc-lb-close { top: 16px; right: 16px; }
.sc-lb-nav { top: 50%; transform: translateY(-50%); }
.sc-lb-nav.prev { left: 16px; } .sc-lb-nav.next { right: 16px; }
@keyframes sc-fade { from { opacity: 0; } }
@keyframes sc-pop { from { opacity: 0; transform: scale(.96) translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .sc-lb-radio:checked + .sc-lightbox, .sc-lightbox img { animation: none; } }

/* devlogs */
.sc-tcat { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sc-tcat .btn { text-transform: none; letter-spacing: 0; }
.sc-latest { padding: var(--s-5); border-bottom: 1px solid var(--border); }
.sc-latest h2 { margin: 6px 0 8px; font: 700 var(--fs-lg, 1.2rem)/1.25 var(--font-display); letter-spacing: var(--track-tight); }
.sc-latest h2 a { color: inherit; }
.sc-latest .snippet { margin: 0 0 var(--s-4); color: var(--text-muted); line-height: 1.55; }
.sc-latest-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.sc-kicker { text-transform: uppercase; letter-spacing: .08em; }
.sc-log { display: flex; align-items: center; gap: 12px; padding: 12px var(--s-5); }
.sc-log .c-main { flex: 1; min-width: 0; }
.sc-detach button { border: 0; background: none; padding: 4px 6px; color: var(--text-faint); cursor: pointer; font: 500 var(--fs-xs)/1 var(--font-ui); }
.sc-detach button:hover { color: var(--neg); }
.sc-latest-foot .sc-detach { margin-left: auto; }
.sc-attach { padding: var(--s-3) var(--s-5) var(--s-4); border-top: 1px solid var(--border); }
.sc-attach summary { cursor: pointer; }
.sc-attach-form { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.sc-attach-form select { flex: 1; min-width: 200px; }

/* devlog thread banner */
.sc-banner { display: flex; align-items: center; gap: var(--s-4); padding: 10px var(--s-4) 10px 10px; margin-bottom: max(var(--gap-float, 10px), var(--s-4)); }
.sc-banner-art { flex: none; width: 96px; aspect-ratio: 16 / 9; border-radius: var(--r-md); }
.sc-banner-art.sc-blank span { font-size: 1.3rem; }
.sc-banner-main { flex: 1; min-width: 0; }
.sc-banner-main .xs.muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-banner-title { font: 700 var(--fs-md, 1.05rem)/1.25 var(--font-display); color: var(--text); }
.sc-banner-tools { display: flex; align-items: center; gap: 10px; flex: none; }

/* small project rows: profile box and index panel */
.sc-minis { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.box .sc-minis { padding: var(--s-3); }
.sc-mini { display: flex; align-items: center; gap: 12px; padding: 6px; min-width: 0; border-radius: var(--r-md); color: inherit; text-decoration: none; }
.sc-mini:hover { background: var(--surface-2); }
.sc-mini-art { flex: none; width: 64px; aspect-ratio: 16 / 9; border-radius: 10px; }
.sc-mini-art.sc-blank span { font-size: 1rem; }
.sc-mini-main { display: flex; flex: 1 1 0; flex-direction: column; gap: 2px; min-width: 0; }
.sc-mini-main b { font-size: var(--fs-sm); line-height: 1.3; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.sc-more { margin-top: 10px; }
.sc-clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* create / edit */
.sc-pchecks { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-bottom: var(--s-4); }
.sc-plabel { width: 100%; font-weight: 600; font-size: var(--fs-sm); }
.sc-pcheck { font-size: var(--fs-sm); }
.sc-cur-cover { display: flex; align-items: center; gap: var(--s-4); margin-bottom: var(--s-4); }
.sc-cur-cover .sc-cover { width: 200px; aspect-ratio: 16 / 9; border-radius: var(--r-md); }
.sc-shot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.sc-shot-tile { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-md); overflow: hidden; box-shadow: var(--rim), var(--e-1); }
.sc-shot-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sc-shot-tile form { position: absolute; top: 6px; right: 6px; }
.sc-shot-tile .icon-btn { width: 30px; height: 30px; background: rgb(0 0 0 / .55); color: #fff; font-size: 18px; }
.sc-uploader { display: contents; }
.sc-drop { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; aspect-ratio: 16 / 9; border-radius: var(--r-md); cursor: pointer; text-align: center;
  border: 2px dashed color-mix(in oklab, var(--accent) 40%, var(--border)); color: var(--accent); font-weight: 650; font-size: var(--fs-sm); background: var(--accent-soft); transition: background-color var(--t-fast); }
.sc-drop:hover { background: color-mix(in oklab, var(--accent) 18%, transparent); }
.sc-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

@media (max-width: 700px) {
  .sc-hero { min-height: 260px; border-radius: var(--r-lg); }
  .sc-hero-in { padding: var(--s-6) var(--s-4) var(--s-4); }
  .sc-hero-by .btn { margin-left: 0; }
  .sc-grid { grid-template-columns: 1fr; }
  .sc-shots { grid-template-columns: 1fr 1fr; padding: var(--s-3); }
  .sc-banner { flex-wrap: wrap; }
  .sc-banner-tools { width: 100%; justify-content: space-between; }
}

/* page head: the buttons and tabs sit on the title's centre line and the subtitle runs under the title;
   on phones the tools take their own row under the subtitle */
.sc-head { display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--s-4); row-gap: 6px; }
.sc-head > div:first-child { display: contents; }
.sc-head h1 { flex: 1 1 auto; min-width: 0; margin: 0; }
.sc-head > div:first-child > :not(h1) { order: 2; flex-basis: 100%; min-width: 0; }
.sc-head > .greet-tools { order: 1; margin-left: auto; width: auto; min-width: 0; }
.sc-head > .greet-tools > * { max-width: 100%; }
@media (max-width: 600px) { .sc-head > .greet-tools { order: 3; flex-basis: 100%; margin-left: 0; margin-top: var(--s-2); } }