/* Prygenix Social — black and white only (brand rule). */
:root {
  --ink: #0b0b0b;
  --ink-2: #3a3a3a;
  --muted: #6b6b6b;
  --line: #e3e3e3;
  --line-2: #d0d0d0;
  --bg: #f4f4f3;
  --panel: #ffffff;
  --hover: #efefee;
  --radius: 10px;
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { font: 15px/1.5 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--ink); }
h1, h2, h3 { margin: 0; line-height: 1.25; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- buttons and fields */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--line-2);
  background: var(--panel); color: var(--ink); font: 600 14px var(--font); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--hover); }
.btn:focus-visible, input:focus-visible, .nav a:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.primary:hover { background: #262626; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--hover); }
.btn.small { height: 32px; padding: 0 10px; font-size: 13px; }
.btn.link { border: 0; background: none; height: auto; padding: 4px; font-weight: 500; color: var(--muted); text-decoration: underline; }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }

.field { display: grid; gap: 6px; text-align: left; }
.field span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
input[type=email], input[type=text] { height: 42px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 8px; font: 15px var(--font); color: var(--ink); background: #fff; width: 100%; }
#code { letter-spacing: 6px; font: 600 20px Consolas, "Courier New", monospace; text-align: center; }

.msg { min-height: 1.2em; margin: 0; font-size: 14px; color: var(--ink-2); }
.msg.error { color: var(--ink); font-weight: 600; }
.msg.error::before { content: "! "; }

/* ---------- sign in */
.signin { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.signin-card { width: 100%; max-width: 380px; padding: 32px 28px; display: grid; gap: 16px; text-align: center; }
.signin-card img { margin: 0 auto; border-radius: 8px; }
.signin-card h1 { font-size: 22px; }
.signin-card p { margin: 0; }

/* ---------- app layout */
.app { display: grid; grid-template-columns: 236px 1fr; min-height: 100%; }
.side { background: var(--ink); color: #fff; display: flex; flex-direction: column; padding: 18px 12px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; padding: 4px 8px 20px; font-size: 16px; }
.brand img { border-radius: 6px; border: 1px solid #3a3a3a; }
.nav { display: grid; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; color: #c9c9c9; text-decoration: none; font-weight: 500; }
.nav a:hover { background: #1c1c1c; color: #fff; }
.nav a.on { background: #fff; color: var(--ink); }
.side-foot { margin-top: auto; display: grid; gap: 8px; padding: 12px 4px 0; border-top: 1px solid #262626; }
.who { font-size: 13px; color: #a9a9a9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 8px; }
.side-foot .btn { color: #d9d9d9; justify-content: flex-start; }
.side-foot .btn:hover { background: #1c1c1c; color: #fff; }

.main { padding: 28px 36px 48px; min-width: 0; }
.view-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.view-head h2 { font-size: 24px; }
.lead { max-width: 720px; margin: -8px 0 20px; }

.empty { background: var(--panel); border: 1px dashed var(--line-2); border-radius: 14px; padding: 48px 24px; text-align: center; max-width: 720px; }
.empty h3 { font-size: 18px; margin: 12px 0 8px; }
.empty p { max-width: 520px; margin: 6px auto; }
.empty-icon { width: 36px; height: 36px; stroke-width: 1.4; }

/* ---------- media */
.drop { border: 1.5px dashed var(--line-2); border-radius: var(--radius); padding: 18px; text-align: center; color: var(--muted); font-size: 14px; background: var(--panel); margin-bottom: 12px; }
.drop p { margin: 0; }
.drop.over { border-color: var(--ink); background: var(--hover); color: var(--ink); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-top: 8px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.tile .thumb { aspect-ratio: 1; background: #ececeb; position: relative; overflow: hidden; }
.tile .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.tile .meta { padding: 10px 12px 4px; min-width: 0; }
.tile .name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .dims { font-size: 12px; color: var(--muted); }
.tile .fits { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink-2); background: #fff; }
.pill.solid { background: var(--ink); border-color: var(--ink); color: #fff; }
.pill.dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tile .actions { display: flex; gap: 4px; padding: 6px 8px 10px; }

/* ---------- connections */
.net-list { display: grid; gap: 12px; max-width: 860px; }
.net { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: grid; grid-template-columns: 44px 1fr auto; gap: 16px; align-items: center; }
.net-icon { width: 44px; height: 44px; border-radius: 10px; background: var(--ink); color: #fff; display: grid; place-items: center; }
.net-icon svg { width: 24px; height: 24px; }
.net h3 { font-size: 16px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.net .sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.net .detail { grid-column: 2 / -1; font-size: 13px; color: var(--ink-2); display: grid; gap: 6px; }
.net code, .mono { font: 12.5px Consolas, "Courier New", monospace; background: #f2f2f2; border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; word-break: break-all; }
.copyrow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* ---------- toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 8px; font-size: 14px; box-shadow: 0 8px 30px rgba(0,0,0,.25); z-index: 10; max-width: calc(100% - 32px); }

/* ---------- small screens */
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .side { position: sticky; height: auto; flex-direction: row; align-items: center; padding: 8px 12px; gap: 8px; z-index: 5; }
  .brand { padding: 0; }
  .brand span { display: none; }
  .nav { display: flex; gap: 2px; overflow-x: auto; flex: 1; }
  .nav a { padding: 8px 10px; font-size: 14px; gap: 6px; }
  .nav a svg { display: none; }
  .side-foot { margin: 0; border: 0; padding: 0; }
  .who { display: none; }
  .side-foot .btn { padding: 0 8px; font-size: 0; gap: 0; }
  .side-foot .btn svg { width: 18px; height: 18px; }
  .main { padding: 20px 16px 40px; }
  .net { grid-template-columns: 40px 1fr; }
  .net > .btn { grid-column: 1 / -1; }
  .net .detail { grid-column: 1 / -1; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

/* ---------- public pages (privacy, terms, data deletion) */
.legal { max-width: 760px; margin: 0 auto; padding: 32px 16px 64px; }
.legal-head { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-size: 16px; margin-bottom: 28px; }
.legal-head img { border-radius: 6px; }
.legal article { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 32px 32px 24px; }
.legal h1 { font-size: 26px; margin-bottom: 4px; }
.legal h2 { font-size: 17px; margin: 26px 0 8px; }
.legal p, .legal li { color: var(--ink-2); }
.legal ul { padding-left: 20px; }
.legal footer { margin-top: 20px; font-size: 13px; color: var(--muted); display: flex; gap: 16px; flex-wrap: wrap; }
@media (max-width: 760px) { .legal article { padding: 22px 18px; } }
