/*
 * Every .space site: the calm of a launch broadcast. True black, real stars, the thin blue line of the
 * atmosphere, plain hairlines and quiet capitals. No photos, no glass, nothing moves (Rick, 2026-11-06).
 */
@font-face { font-family: Barlow; font-weight: 400; font-display: swap; src: url("/shared/font/barlow-400.woff2") format("woff2"); }
@font-face { font-family: Barlow; font-weight: 500; font-display: swap; src: url("/shared/font/barlow-500.woff2") format("woff2"); }
:root { color-scheme: dark; --ink: #fff; --dim: rgba(255, 255, 255, 0.62); --line: rgba(255, 255, 255, 0.2); --link: #fff; --sky: url("/shared/bg/stars.svg"); }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: #000; overscroll-behavior: none; }
/* A phone never zooms the page out, so the sky always fills the screen edge to edge. */
html, body { width: 100%; overflow-x: clip; }
html, body { margin: 0; min-height: 100%; color: var(--ink); font-family: Barlow, -apple-system, system-ui, "Segoe UI", sans-serif; -webkit-text-size-adjust: 100%; }

.space { position: fixed; top: 0; left: 0; right: 0; height: 100lvh; z-index: -1; background: var(--sky) center / 700px 700px #000; }
.space::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% calc(100% + 140vmax - 7dvh), #02050b 139.8vmax, rgba(150, 205, 255, 0.85) 140vmax, rgba(70, 140, 255, 0.32) 140.35vmax, rgba(40, 90, 200, 0.1) 142vmax, transparent 147vmax); }

/* A plain panel: black over the stars, one hairline, no blur. */
.glass { position: relative; background: rgba(0, 0, 0, 0.6); border: 1px solid var(--line); }

/* Six tiles, two across and three down, and nothing else to take in. */
.apps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; width: min(100%, calc(66svh - 40px)); margin: 0 auto; padding: 76px 20px 16px; list-style: none; }
.app { display: grid; gap: 7px; justify-items: center; width: 100%; padding: 0; color: inherit; background: none; border: 0; font: inherit; cursor: pointer; }
.app-box { display: block; width: 100%; aspect-ratio: 1; padding: 13%; border-radius: 3px; overflow: hidden; transition: background-color 0.2s ease; }
.app:active .app-box { background: #fff; color: #000; }
@media (hover: hover) { .app:hover .app-box { background: #fff; color: #000; } }
.app-label { display: block; width: 62%; height: 7px; border-radius: 4px; background: rgba(255, 255, 255, 0.34); }

/* The signature: same place on every page, like ric.space. Right goes in, left comes back. */
.circle { position: fixed; top: max(12px, env(safe-area-inset-top)); z-index: 30; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; color: var(--ink); border-radius: 50%; cursor: pointer; }
.circle[hidden] { display: none; }
.circle-left { left: 12px; }
.circle-right { right: 12px; }
.circle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* Search stays put at the top: type and press Enter. No suggestions, ever. */
.seek { position: fixed; z-index: 30; display: flex; align-items: center; left: 50%; transform: translateX(-50%); top: max(12px, env(safe-area-inset-top)); width: min(calc(100% - 32px), 720px); border-radius: 3px; }
body:has(.circle-left:not([hidden])) .seek, body:has(.circle-right:not([hidden])) .seek { width: calc(100% - 132px); }
.seek input { display: block; flex: 1; min-width: 0; width: 100%; height: 48px; padding: 0 18px; color: var(--ink); font: inherit; font-size: 16px; background: none; border: 0; outline: 0; -webkit-appearance: none; }
.seek input::placeholder { color: var(--dim); }
.seek input, .seek-why { letter-spacing: 0.04em; }
.why-alone { position: fixed; z-index: 30; left: 50%; transform: translateX(-50%); top: max(12px, env(safe-area-inset-top)); }
.why-alone .seek-why { padding: 0 18px; }
.seek-why { flex: none; min-height: 48px; padding: 0 18px 0 8px; color: var(--dim); font: inherit; font-size: 15px; background: none; border: 0; cursor: pointer; }

/* The one thing to read: glass over the tiles, and a tap anywhere closes it. */
.thesis { width: min(calc(100vw - 32px), 460px); max-height: calc(100dvh - 48px); padding: 24px; color: var(--ink); font-size: 17px; line-height: 1.55; background: #000; border: 1px solid var(--line); border-radius: 3px;  }
.thesis::backdrop { background: rgba(0, 0, 0, 0.4); }
.thesis p { margin: 0 0 12px; }
.thesis p:last-of-type { margin: 0; font-weight: 600; }
.thesis-share { display: block; min-height: 44px; margin: 16px 0 0; padding: 0 18px; color: inherit; font: inherit; font-weight: 600; background: rgba(255, 255, 255, 0.14); border: 1px solid var(--line); border-radius: 3px; cursor: pointer; }

/* A face and a hi: the word waits, then appears where it was, so nothing moves. */
.face-app .app-box { padding: 0; }
.face-app .nobody { border-radius: 0; }
.app-hi { min-height: 24px; font-size: 17px; font-weight: 600; opacity: 0; transition: opacity 0.2s ease; }
.face-app.said .app-hi { opacity: 1; }

/* The empty profile card: sky on top, a round face over its edge, then name, handle, and links, and no counts. */
.nobody { display: block; width: 100%; aspect-ratio: 1; border-radius: 3px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.12)); }
.nobody circle, .nobody path { fill: rgba(255, 255, 255, 0.82); }

.card { width: min(calc(100vw - 48px), 320px); padding: 0 0 18px; color: var(--ink); border-radius: 3px; overflow: hidden; }
.card::backdrop { background: rgba(0, 0, 0, 0.36);  }
.card[open] { animation: open 0.2s ease; }
@keyframes open { from { opacity: 0; } }
.card-sky { height: 112px; background: var(--sky) center / 700px 700px #000; }
.card .nobody { position: relative; width: 88px; margin: -44px 0 0 18px; border-radius: 50%; background-color: #23252d; box-shadow: 0 0 0 3px #000; }
.card-lines { display: grid; gap: 11px; margin: 16px 18px 20px; }
.card-lines span { height: 10px; border-radius: 5px; background: var(--link); }
.card-lines span:nth-child(1) { width: 44%; height: 16px; background: var(--ink); }
.card-lines span:nth-child(2) { width: 30%; background: var(--dim); opacity: 0.6; }
.card-lines span:nth-child(3) { width: 56%; }
.card-lines span:nth-child(4) { width: 40%; }
.card-close { display: block; width: calc(100% - 36px); min-height: 46px; margin: 0 18px; color: inherit; font: inherit; font-weight: 600; background: rgba(255, 255, 255, 0.16); border: 1px solid var(--line); border-radius: 3px; cursor: pointer; }

.credit { margin: 8px 0 24px; padding: 0 16px; text-align: center; font-size: 11px; line-height: 1.5; color: var(--dim); }
/* A page of tiles keeps the horizon past them: scroll down for the fine print, over the atmosphere. */
body:has(.apps, .icons) .space::after { display: none; }
body:has(.apps, .icons) .credit { display: flex; flex-wrap: wrap; gap: 4px 12px; align-content: flex-end; justify-content: center; align-items: center; min-height: 70svh; margin: 12px 0 0; padding: 0 16px calc(32px + env(safe-area-inset-bottom)); background: radial-gradient(circle at 50% calc(100% + 140vmax - 18svh), #02050b 139.8vmax, rgba(150, 205, 255, 0.85) 140vmax, rgba(70, 140, 255, 0.32) 140.35vmax, rgba(40, 90, 200, 0.1) 142vmax, transparent 147vmax); }
.credit a { display: inline-block; padding: 4px 2px; color: inherit; }

@media (prefers-reduced-motion: reduce) { .card[open] { animation: none; } .app-box { transition: none; } }

/* Little icons, the exact marks. Your own sit four across; choosing fits five. */
.icons { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; width: min(100%, 520px); margin: 0 auto; padding: 88px 20px 16px; list-style: none; }
.picking { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; padding-bottom: 112px; }
.picking li:has(.mark-head) { grid-column: 1 / -1; }
.mark-head { margin: 14px 0 0; font-size: 11px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); }
li:first-child > .mark-head { margin-top: 0; }
.mark { display: block; width: 100%; aspect-ratio: 1; padding: 0; color: var(--ink); background: none; border: 0; border-radius: 22%; cursor: pointer; }
.mark img { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: 22%; }
.mark:active { opacity: 0.7; }
.mark[aria-pressed="true"] { outline: 2px solid #fff; outline-offset: 3px; }
.mark-add { display: grid; place-items: center; border: 1px solid var(--line); border-radius: 22%; }
.mark-add svg { width: 40%; height: 40%; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: square; }

/* Done: a plain rectangle above the atmosphere, in the same place every time. */
.done { position: fixed; z-index: 30; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(calc(100% - 40px), 280px); min-height: 48px; color: #000; font: inherit; font-size: 13px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; background: #fff; border: 0; border-radius: 3px; cursor: pointer; }
.done[hidden] { display: none; }

/* love.space: you are the space man in ASCII art until you add a face. Two quiet rows under every face, so nothing moves. */
.face-tile { display: grid; gap: 2px; justify-items: center; }
.face-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.app-link { display: block; min-height: 20px; max-width: 100%; font-size: 13px; line-height: 20px; color: var(--dim); text-align: center; overflow-wrap: anywhere; }
.app-link a { color: inherit; text-decoration: none; }
.you-box { display: block; padding: 8%; }
.you-box:has(.face-img), .you-box:has(.nobody) { padding: 0; }
.you-box .face-img, .you-box .nobody { border-radius: 0; }
.ascii-man { display: block; width: 100%; height: 100%; object-fit: contain; user-select: none; filter: brightness(1.25) saturate(1.2) drop-shadow(0 0 6px rgba(255, 89, 21, 0.4)); }
.app-you { min-height: 24px; font-size: 17px; font-weight: 600; }

.me-card { width: min(calc(100vw - 32px), 360px); padding: 0; background: #000; border: 1px solid var(--line); }
.me-sky { position: relative; height: 112px; background: var(--sky) center / 700px 700px #000; border-bottom: 1px solid var(--line); }
.me-sky .ascii-man { position: absolute; top: 10px; right: 14px; width: 64px; height: 92px; }
.me-face { position: relative; width: 96px; height: 96px; margin: -48px 0 0 18px; border-radius: 50%; overflow: hidden; background: #23252d; box-shadow: 0 0 0 3px #000, 0 0 0 4px var(--line); }
.me-face .nobody { border-radius: 0; }
.me-body { display: grid; gap: 12px; padding: 18px; }
.me-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.me-btn, .me-quiet, .me-save { display: grid; place-items: center; min-height: 46px; padding: 0 12px; color: var(--ink); font: inherit; font-size: 15px; font-weight: 500; text-align: center; background: rgba(255, 255, 255, 0.08); border: 1px solid var(--line); border-radius: 3px; cursor: pointer; }
.me-btn:active, .me-quiet:active { background: #fff; color: #000; }
.me-anon.on { background: #fff; color: #000; }
.me-link { width: 100%; min-height: 46px; padding: 0 14px; color: var(--ink); font: inherit; font-size: 16px; background: none; border: 1px solid var(--line); border-radius: 3px; outline: 0; -webkit-appearance: none; }
.me-link:focus { border-color: rgba(255, 255, 255, 0.6); }
.me-link::placeholder { color: var(--dim); }
.me-note { min-height: 22px; margin: 0; font-size: 14px; line-height: 22px; color: var(--dim); text-align: center; }
.me-save { font-weight: 600; color: #000; background: #fff; border-color: #fff; }
.me-save:disabled { opacity: 0.6; }
.me-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.me-row:has(.me-gone[hidden]) { grid-template-columns: 1fr; }
.me-quiet { background: none; color: var(--dim); }
.me-gone[hidden] { display: none; }
