/* Block Chain — 2005 social network chrome, painted in the chain's six colours. */
:root {
  --r: #E8352E; --o: #F7841E; --y: #F9C80E; --g: #3DB54A; --b: #2F7BEA; --p: #8E44E0;
  --r-d: #B8231D; --o-d: #C9620A; --y-d: #9A7A00; --g-d: #23863A; --b-d: #1C5BBF; --p-d: #6A2CB0;
  --ink: #1E1E24; --ink-2: #4A4B55; --muted: #7A7C88; --line: #D9DCE4; --dot: #C9CCD6;
  --paper: #FFFFFF; --wash: #F4F6FB; --page: #2F7BEA;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Courier New", monospace;
  --body: Verdana, Tahoma, "DejaVu Sans", Geneva, sans-serif;
  --head: Arial, "Helvetica Neue", Helvetica, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); font: 13px/1.5 var(--body);
  background-color: var(--page);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48'%3E%3Cg fill='%23fff' fill-opacity='.07'%3E%3Crect x='4' y='4' width='14' height='14' rx='2'/%3E%3Crect x='28' y='28' width='14' height='14' rx='2'/%3E%3C/g%3E%3Cg fill='%23000' fill-opacity='.06'%3E%3Crect x='6' y='16' width='12' height='3'/%3E%3Crect x='30' y='40' width='12' height='3'/%3E%3C/g%3E%3C/svg%3E");
}
a { color: var(--b-d); text-decoration: none; font-weight: 700; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--y); outline-offset: 2px; }
img { max-width: 100%; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- page frame ---------- */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.topbar { background: var(--paper); border-bottom: 1px solid #0002; position: relative; z-index: 5; }
.topbar .wrap { display: flex; align-items: center; gap: 14px; min-height: 40px; }
.brand { display: flex; align-items: center; flex: none; }
.brand img { width: 28px; height: 28px; border-radius: 5px; display: block; }
.brand:hover { text-decoration: none; }
.nav { display: flex; flex-wrap: nowrap; align-items: center; font: 700 13px/1 var(--head); flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; }
.nav a { color: var(--ink); padding: 4px 0; }
.nav a + a::before { content: "|"; color: var(--dot); font-weight: 400; margin: 0 6px; }
.nav a { flex: none; }
.nav a.on { color: var(--b-d); text-decoration: underline; text-underline-offset: 3px; }
.acct { display: flex; align-items: center; gap: 6px; font: 700 13px/1 var(--head); white-space: nowrap; flex: none; }
.more { position: relative; flex: none; margin-left: -8px; }
.more-btn { border: 0; background: none; padding: 4px 0; font: 700 13px/1 var(--head); color: var(--ink); cursor: pointer; white-space: nowrap; }
.more-btn::before { content: "|"; color: var(--dot); font-weight: 400; margin: 0 6px; }
.more-btn.on { color: var(--b-d); }
.more-menu { position: absolute; right: 0; top: calc(100% + 10px); min-width: 170px; background: #fff; border: 2px solid var(--ink); border-radius: 6px; box-shadow: 5px 5px 0 rgba(30,30,36,.15); padding: 6px; display: grid; z-index: 20; }
.more-menu[hidden] { display: none; }
.more-menu a { color: var(--ink); padding: 7px 10px; border-radius: 4px; font: 700 13px var(--head); }
.more-menu a:hover { background: var(--wash); text-decoration: none; }
.more-menu a.on { color: var(--b-d); }
.acct a { color: var(--ink); }
.acct .sep { color: var(--dot); font-weight: 400; }
.badge { display: inline-block; min-width: 18px; padding: 2px 5px; border-radius: 9px; background: var(--r); color: #fff; font: 700 10px/1.2 var(--body); text-align: center; }
.menu-btn { display: none; border: 0; background: none; font: 700 13px var(--head); cursor: pointer; padding: 6px 0; }
.rainbow { display: grid; grid-template-columns: repeat(6, 1fr); height: 5px; }
.rainbow i:nth-child(1) { background: var(--r); } .rainbow i:nth-child(2) { background: var(--o); }
.rainbow i:nth-child(3) { background: var(--y); } .rainbow i:nth-child(4) { background: var(--g); }
.rainbow i:nth-child(5) { background: var(--b); } .rainbow i:nth-child(6) { background: var(--p); }

.sheet { background: var(--paper); border-left: 1px solid #0003; border-right: 1px solid #0003; min-height: calc(100vh - 46px); padding-bottom: 28px; }
.statusbar { background: #FFF8DC; border-bottom: 1px solid #F1E3A6; color: var(--ink-2); font-size: 12px; padding: 6px 16px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.statusbar b { color: var(--ink); }
.statusbar .live::before { content: ""; display: inline-block; width: 8px; height: 8px; background: var(--g); margin-right: 5px; vertical-align: 0; animation: blink 2s steps(2) infinite; }
@keyframes blink { 50% { opacity: .35; } }
.page { padding: 16px; }
.foot { text-align: center; color: var(--muted); font-size: 11px; padding: 18px 16px 6px; }
.foot a { color: var(--ink-2); font-weight: 400; margin: 0 4px; }

/* ---------- type ---------- */
h1 { font: 900 24px/1.15 var(--head); margin: 0 0 6px; letter-spacing: -.2px; }
h2 { font: 700 18px/1.2 var(--head); margin: 0 0 8px; }
h3 { font: 700 14px/1.3 var(--head); margin: 0 0 6px; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 11px; }
.mono { font-family: var(--mono); font-size: 12px; }
.online { color: var(--g-d); font-weight: 700; }
.online::before { content: ""; display: inline-block; width: 8px; height: 8px; background: var(--g); margin-right: 5px; }
.offline { color: var(--muted); }
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- boxes (the MySpace module) ---------- */
.box { border: 1px solid var(--c, var(--b)); background: var(--paper); margin-bottom: 14px; }
.box > .hd { background: var(--c, var(--b)); color: #fff; font: 700 15px/1.2 var(--head); padding: 7px 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.box > .hd .aside { font: 400 12px var(--body); opacity: .92; }
.box > .hd a { color: inherit; }
.box > .bd { padding: 10px 12px; }
.box.c-r { --c: var(--r); --cd: var(--r-d); } .box.c-o { --c: var(--o); --cd: var(--o-d); }
.box.c-y { --c: var(--y); --cd: var(--y-d); } .box.c-g { --c: var(--g); --cd: var(--g-d); }
.box.c-b { --c: var(--b); --cd: var(--b-d); } .box.c-p { --c: var(--p); --cd: var(--p-d); }
.box.c-k { --c: var(--ink); --cd: var(--ink); }
.box.c-y > .hd { color: var(--ink); }
.box .bd a:not(.btn) { color: var(--cd, var(--b-d)); }
.linkrow { display: flex; flex-wrap: wrap; gap: 4px 0; }
.linkrow > * + *::before { content: "|"; color: var(--dot); font-weight: 400; margin: 0 8px; }
.linkrow button.lk { border: 0; background: none; padding: 0; cursor: pointer; font-weight: 700; color: var(--cd, var(--b-d)); }
.linkrow button.lk:hover { text-decoration: underline; }
button.lk { border: 0; background: none; padding: 0; cursor: pointer; font-weight: 700; color: var(--b-d); }
button.lk:hover { text-decoration: underline; }

.kv { width: 100%; border-collapse: collapse; }
.kv th, .kv td { text-align: left; padding: 5px 8px; border-bottom: 1px dotted var(--dot); vertical-align: top; }
.kv th { color: var(--muted); font-weight: 400; width: 32%; white-space: nowrap; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font: 700 11px var(--body); color: var(--muted); padding: 6px 8px; border-bottom: 2px solid var(--line); white-space: nowrap; }
.tbl td { padding: 6px 8px; border-bottom: 1px dotted var(--dot); vertical-align: middle; }
.tbl tr.new td { animation: rowIn 1.2s ease-out; }
@keyframes rowIn { from { background: #FFF3B0; } to { background: transparent; } }
.tbl-scroll { overflow-x: auto; }

.grid2 { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 16px; align-items: start; }
.grid2r { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.grid2 > *, .grid2r > *, .cols2 > *, .cols3 > * { min-width: 0; }
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cols3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

/* ---------- buttons: little blocks you press ---------- */
.btn { --bc: var(--b); --bd: var(--b-d); display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--bc); color: #fff; border: 0; border-radius: 4px; --edge: 3px; box-shadow: 0 var(--edge) 0 var(--bd); margin-bottom: var(--edge);
  padding: 7px 13px 6px; font: 700 13px/1.2 var(--head); cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .06s, box-shadow .06s, filter .15s; }
.btn:hover { filter: brightness(1.06); text-decoration: none; }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--bd); }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: 0 var(--edge) 0 var(--bd); }
.btn.r { --bc: var(--r); --bd: var(--r-d); } .btn.o { --bc: var(--o); --bd: var(--o-d); }
.btn.y { --bc: var(--y); --bd: #C99E00; color: var(--ink); } .btn.g { --bc: var(--g); --bd: var(--g-d); }
.btn.p { --bc: var(--p); --bd: var(--p-d); } .btn.k { --bc: var(--ink); --bd: #000; }
.btn.ghost { --bd: #C9CED8; background: var(--paper); color: var(--ink); border: 1px solid var(--line); }
.btn.sm { padding: 4px 9px 3px; font-size: 12px; }
.btn.lg { padding: 12px 22px 11px; font-size: 16px; --edge: 4px; border-radius: 6px; }
.btn.on { background: var(--paper); color: var(--bd); box-shadow: inset 0 0 0 2px var(--bc), 0 var(--edge) 0 var(--bd); }

/* ---------- forms ---------- */
.field { display: block; margin-bottom: 10px; }
.field > span { display: block; font-weight: 700; font-size: 12px; margin-bottom: 3px; }
.field small { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }
input[type=text], input[type=search], input[type=number], select, textarea {
  width: 100%; border: 1px solid #B8BCC8; border-radius: 3px; background: #fff; padding: 6px 8px; font-size: 13px; }
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--b); outline: 2px solid #2F7BEA33; }
.err { color: var(--r-d); font-weight: 700; font-size: 12px; margin: 6px 0; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.spacer { flex: 1; }

/* ---------- avatars + glyphs ---------- */
.glyph { image-rendering: pixelated; display: block; background: #fff; }
.av { display: inline-block; vertical-align: middle; border: 1px solid #0002; image-rendering: pixelated; background: #fff; }
.who { display: inline-flex; align-items: center; gap: 6px; vertical-align: middle; }
.who .av { flex: none; }
.pic { border: 3px solid var(--ink); background: #fff; display: block; }

/* ---------- top-8 friend space ---------- */
.top8 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 8px; text-align: center; }
.top8 a { display: block; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top8 canvas, .top8 img { width: 100% !important; height: auto !important; max-width: 84px; aspect-ratio: 1; margin: 0 auto 4px; border: 1px solid #0002; }

/* ---------- comments / posts ---------- */
.cmt { display: grid; grid-template-columns: 64px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px dotted var(--dot); }
.cmt:last-child { border-bottom: 0; }
.cmt .meta { font-size: 11px; color: var(--muted); margin-bottom: 3px; }
.cmt .body { white-space: pre-wrap; overflow-wrap: anywhere; }
.post { display: grid; grid-template-columns: 150px 1fr; border: 1px solid var(--line); margin-bottom: 10px; }
.post .side { background: var(--wash); padding: 10px; font-size: 11px; text-align: center; border-right: 1px solid var(--line); }
.post .side canvas { width: 72px; height: 72px; margin: 4px auto; }
.post .main { padding: 10px 12px; min-width: 0; }
.post .main .meta { font-size: 11px; color: var(--muted); border-bottom: 1px dotted var(--dot); padding-bottom: 5px; margin-bottom: 8px; }
.post .main .body { white-space: pre-wrap; overflow-wrap: anywhere; }
.post.mine { border-color: var(--y); }

/* ---------- the live chain ---------- */
.chainstage { position: relative; background: linear-gradient(#FDFEFF, #EEF3FC); border-bottom: 1px solid var(--line); overflow: hidden; }
.chainstage canvas.chain { display: block; width: 100%; height: 100%; cursor: pointer; }
.chainstage .overlay { position: absolute; left: 16px; top: 12px; right: 16px; display: flex; justify-content: space-between; align-items: flex-start; pointer-events: none; gap: 12px; }
.chainstage .overlay > * { pointer-events: auto; }
.chainstage .ttl { font: 900 13px var(--head); color: var(--ink); background: #fffc; padding: 4px 8px; border: 1px solid var(--line); }
.chainstage .ttl .live { color: var(--r); }
.chainstage .ttl .live::before { content: "\25CF "; animation: blink 1.4s steps(2) infinite; }
.next-pill { background: var(--ink); color: #fff; font: 700 12px var(--head); padding: 6px 10px; border-radius: 4px; display: flex; align-items: center; gap: 8px; }
.next-pill .ring { width: 18px; height: 18px; }
/* hover card for a block (lives on <body>, never cropped) */
.chain-tip { position: fixed; z-index: 70; pointer-events: none; width: 248px; background: #fff; border: 2px solid var(--ink); border-radius: 6px; box-shadow: 5px 5px 0 rgba(30,30,36,.18); font-size: 12px; }
.chain-tip.in { animation: tipIn .16s cubic-bezier(.2, 1.3, .4, 1); }
@keyframes tipIn { from { opacity: 0; transform: translateY(-4px) scale(.97); } }
.chain-tip.above.in { animation-name: tipInUp; }
@keyframes tipInUp { from { opacity: 0; transform: translateY(4px) scale(.97); } }
.chain-tip::before { content: ""; position: absolute; left: var(--caret, 50%); top: -8px; width: 12px; height: 12px; background: var(--ink); transform: translateX(-50%) rotate(45deg); z-index: -1; }
.chain-tip.above::before { top: auto; bottom: -8px; }
.chain-tip .ct-hd { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; border-radius: 4px 4px 0 0; font: 700 12px var(--head); }
.chain-tip .ct-hd b { font-size: 14px; }
.chain-tip .ct-bd { padding: 10px; background: #fff; border-radius: 0 0 4px 4px; }
.chain-tip .ct-top { display: grid; grid-template-columns: 60px minmax(0, 1fr); gap: 10px; align-items: center; }
.chain-tip .ct-top canvas { border: 2px solid var(--ink); }
.chain-tip .ct-who { display: flex; align-items: center; gap: 6px; min-width: 0; }
.chain-tip .ct-memo { margin-top: 5px; line-height: 1.35; overflow-wrap: anywhere; }
.chain-tip .ct-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 8px; }
.chain-tip .ct-stats div { background: var(--wash); border: 1px solid var(--line); border-radius: 4px; padding: 4px 6px; display: grid; }
.chain-tip .ct-stats b { font: 700 13px var(--mono); }
.chain-tip .ct-stats span { color: var(--muted); font-size: 10px; }
.chain-tip .ct-hash { color: var(--muted); font-size: 11px; }
.chain-tip .ct-foot { margin-top: 6px; padding-top: 6px; border-top: 1px dotted var(--dot); color: var(--ink-2); font-size: 11px; }
.tickrow { display: flex; gap: 8px; padding: 10px 16px; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--paper); }
.tick { flex: none; display: grid; grid-template-columns: 34px auto; gap: 2px 8px; align-items: center; padding: 5px 8px 5px 5px; border: 1px solid var(--line); border-bottom: 3px solid var(--c); font-size: 11px; min-width: 150px; color: var(--ink); font-weight: 400; }
.tick:hover { text-decoration: none; background: var(--wash); }
.tick canvas { grid-row: span 2; width: 32px; height: 32px; border: 1px solid #0001; }
.tick b { font: 700 12px var(--mono); }
.tick.fresh { animation: tickIn .7s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes tickIn { from { transform: translateX(-30px) scale(.9); opacity: 0; } }

/* ---------- next block panel ---------- */
.forming { display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: center; }
.forming .preview { position: relative; }
.forming .preview canvas { width: 120px; height: 120px; border: 3px solid var(--ink); }
.forming .count { font: 900 30px/1 var(--mono); }
.meter { height: 10px; background: var(--wash); border: 1px solid var(--line); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--c, var(--g)); transition: width .4s; }
.queue { list-style: none; margin: 0; padding: 0; }
.queue li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px dotted var(--dot); }
.queue li:last-child { border-bottom: 0; }
.queue li canvas { width: 30px; height: 30px; border: 1px solid #0002; }
.queue li.lead { background: linear-gradient(90deg, #FFF6C9, transparent); }
.queue li.bump { animation: bump .5s; }
@keyframes bump { 30% { background: #E5F7E8; } }
.queue .sc { font: 700 12px var(--mono); text-align: right; }
.queue .memo { font-size: 11px; color: var(--muted); }

/* ---------- pixel editor ---------- */
.editor { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; }
.pixgrid { display: grid; grid-template-columns: repeat(8, 1fr); width: min(336px, 80vw); aspect-ratio: 1; border: 3px solid var(--ink); background:
  conic-gradient(#EEF0F4 25%, #fff 0 50%, #EEF0F4 0 75%, #fff 0) 0 0 / 21px 21px; touch-action: none; user-select: none; }
.pixgrid div { border-right: 1px solid #0000000f; border-bottom: 1px solid #0000000f; cursor: crosshair; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.sw { width: 32px; height: 32px; border: 2px solid #0003; border-radius: 4px; cursor: pointer; position: relative; }
.sw.on { border-color: var(--ink); box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ink); }
.sw.empty { background: conic-gradient(#ddd 25%, #fff 0 50%, #ddd 0 75%, #fff 0) 0 0 / 10px 10px; }

/* ---------- modal + toast ---------- */
.modal-bg { position: fixed; inset: 0; background: #1E1E2499; display: grid; place-items: center; z-index: 50; padding: 16px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--paper); border: 1px solid var(--c, var(--b)); box-shadow: 8px 8px 0 #0003; animation: pop .2s cubic-bezier(.2, 1.3, .4, 1); }
@keyframes pop { from { transform: scale(.96); opacity: 0; } }
.modal > .hd { background: var(--c, var(--b)); color: #fff; font: 700 15px var(--head); padding: 8px 12px; display: flex; justify-content: space-between; align-items: center; }
.modal > .hd button { background: none; border: 0; color: inherit; font: 700 18px/1 var(--head); cursor: pointer; padding: 0 4px; }
.modal > .bd { padding: 14px; }
#toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 60; max-width: min(360px, calc(100vw - 32px)); }
.toast { background: var(--ink); color: #fff; padding: 10px 12px; border-bottom: 4px solid var(--c, var(--g)); font-size: 12px; box-shadow: 4px 4px 0 #0003; animation: pop .25s cubic-bezier(.2, 1.3, .4, 1); }
.toast.bad { --c: var(--r); }

/* ---------- misc ---------- */
.pager { display: flex; gap: 8px; justify-content: center; margin-top: 10px; }
.empty { padding: 18px; text-align: center; color: var(--muted); border: 1px dashed var(--line); }
.tag { display: inline-block; font: 700 10px var(--body); padding: 2px 6px; border-radius: 3px; background: var(--wash); border: 1px solid var(--line); color: var(--ink-2); }
.tag.g { background: #E5F7E8; border-color: #B9E6C1; color: var(--g-d); }
.tag.r { background: #FDE8E7; border-color: #F5BFBC; color: var(--r-d); }
.tag.y { background: #FFF6CC; border-color: #F2DD82; color: #7A6000; }
.tag.b { background: #E6F0FD; border-color: #B7D0F7; color: var(--b-d); }
.tag.p { background: #F1E8FC; border-color: #D6BEF4; color: var(--p-d); }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: 7px 0; border-bottom: 1px dotted var(--dot); }
.list > li:last-child { border-bottom: 0; }
.pill-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.code { background: #1E1E24; color: #E8EAF0; font: 12px/1.5 var(--mono); padding: 10px 12px; overflow: auto; max-height: 340px; white-space: pre; }
.dot { display: inline-block; width: 10px; height: 10px; border: 1px solid #0003; vertical-align: -1px; }
.votebar { display: flex; height: 12px; border: 1px solid var(--line); overflow: hidden; }
.votebar i { display: block; height: 100%; transition: width .5s; }
.hero-note { font-size: 12px; color: var(--ink-2); }
.feed { list-style: none; margin: 0; padding: 0; max-height: 360px; overflow: hidden; }
.feed li { display: flex; gap: 8px; align-items: center; padding: 5px 0; border-bottom: 1px dotted var(--dot); font-size: 12px; }
.feed li.new { animation: rowIn 1.2s ease-out; }
.feed li .t { color: var(--muted); font-size: 11px; margin-left: auto; white-space: nowrap; }

/* ---------- front-page construction scene ---------- */
.chainstage.scene { background: linear-gradient(#F8FAFE, #EEF3FC 70%); border-bottom: 0; }

@media (max-width: 960px) {
  .grid2, .grid2r { grid-template-columns: minmax(0, 1fr); }
  .cols3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .menu-btn { display: block; }
  .topbar .wrap { flex-wrap: wrap; }
  .nav { display: none; order: 3; flex-basis: 100%; padding: 6px 0 10px; flex-wrap: wrap; white-space: normal; overflow: visible; }
  .nav a { padding: 6px 0; }
  .nav.open { display: flex; }
  .wrap { padding: 0; }
  .topbar .wrap { padding: 0 16px; }
  .sheet { border: 0; }
  .cols2, .cols3 { grid-template-columns: 1fr; }
  .editor { grid-template-columns: 1fr; }
  .post { grid-template-columns: 1fr; }
  .post .side { border-right: 0; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: center; text-align: left; }
  .post .side canvas { width: 40px; height: 40px; margin: 0; }
  .forming { grid-template-columns: 90px 1fr; }
  .forming .preview canvas { width: 90px; height: 90px; }
  .page { padding: 16px; }
  .kv th { width: 40%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- community pages ---------- */
.row.center { justify-content: center; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.tbl td.num, .tbl th.num { text-align: right; font-family: var(--mono); font-size: 12px; }
.tbl th.right { text-align: right; }
.okc { color: var(--g-d); font-weight: 700; }
.loading { padding: 24px 0; }
code.ic { font: 12px var(--mono); background: var(--wash); border: 1px solid var(--line); padding: 1px 5px; border-radius: 3px; overflow-wrap: anywhere; }

/* page head: a pixel badge in the page colour with a hard block shadow */
.phead { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; margin: 0 0 16px; padding-bottom: 14px; border-bottom: 1px dotted var(--dot); }
.pbadge { display: block; padding: 5px; background: #fff; border: 2px solid var(--c); box-shadow: 4px 4px 0 var(--c); }
.pbadge canvas { display: block; }
.ptitle h1 { margin: 0 0 2px; }
.ptitle p { margin: 0; font-size: 12px; max-width: 70ch; }
.pacts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.crumbs { font-size: 12px; margin: -4px 0 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 2px 6px; min-width: 0; }
.crumbs > span:last-child { color: var(--ink-2); overflow-wrap: anywhere; }
.crumbs .sep { color: var(--dot); }

/* text */
.prose { font-size: 13px; line-height: 1.65; max-width: 72ch; }
.prose p { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 12px; }
blockquote.q { margin: 4px 0 8px; padding: 6px 10px; border: 1px solid var(--line); background: var(--wash); color: var(--ink-2); white-space: pre-wrap; font-size: 12px; }
.whocard { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.whocard .av { flex: none; }

/* mail */
.mailtbl tr.unread td { font-weight: 700; background: #F3F7FF; }
.mailtbl td.msubj { min-width: 180px; max-width: 460px; }
.mailtbl td.msubj .ell { font-weight: 400; max-width: 420px; }
.mailtbl td.mfrom { white-space: nowrap; }
.mailhead { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; align-items: start; margin-bottom: 14px; }
.mailbody { border-top: 1px dotted var(--dot); padding-top: 12px; }
.mailacts { border-top: 1px dotted var(--dot); padding-top: 10px; margin-top: 4px; }

/* blog */
.bloglist { list-style: none; margin: 0; padding: 0; }
.bpost { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px dotted var(--dot); margin-bottom: 4px; }
.bpost:last-child { border-bottom: 0; }
.bpost h2 { font-size: 16px; margin: 0 0 2px; }
.bpost .bex { margin: 6px 0; color: var(--ink-2); max-width: 70ch; }
.rank { counter-reset: r; }
.rank > li { counter-increment: r; padding-left: 26px; position: relative; }
.rank > li::before { content: counter(r); position: absolute; left: 0; top: 7px; width: 18px; height: 18px; background: var(--y); color: var(--ink); font: 700 11px/18px var(--head); text-align: center; }
.article .byline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px dotted var(--dot); }
.blogbody { font-size: 14px; }
.kudosrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0 12px; padding: 10px 0; border-top: 1px dotted var(--dot); }

/* comments */
.cmt .cside a { display: block; }
.cmt.fresh, .post.fresh .main { animation: rowIn 2.4s ease-out; }
.cform { padding: 10px 0 4px; }
.cform textarea { min-height: 70px; margin-bottom: 6px; }
.none { padding: 6px 0; }

/* forum */
.board { display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: 10px; align-items: start; }
.bdot { display: block; width: 12px; height: 12px; margin-top: 3px; border: 1px solid #0002; }
.bname { font-size: 14px; }
.tbl td.last { min-width: 160px; max-width: 260px; }
.tbl tr.pinned td { background: #FFFBEA; }
.thead { margin-bottom: 12px; }
.thead h1 { margin-bottom: 4px; overflow-wrap: anywhere; }
.post .side a { overflow-wrap: anywhere; }
.prank { color: var(--p-d); font-weight: 700; }
.post .pacts { margin-top: 10px; padding-top: 6px; border-top: 1px dotted var(--dot); }
.post.fresh { border-color: var(--g); }

/* groups */
.ggrid { align-items: stretch; }
.ggrid > .box { display: flex; flex-direction: column; margin-bottom: 0; }
.ggrid > .box > .bd { flex: 1; display: flex; flex-direction: column; }
.gdesc { flex: 1; color: var(--ink-2); }
.ghead { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.gswatch { display: block; width: 34px; height: 34px; border: 2px solid var(--ink); box-shadow: 3px 3px 0 #0002; }
.glinks { margin-top: 12px; }
.gmembers .top8 .av { width: 100% !important; max-width: 84px; height: auto !important; aspect-ratio: 1; display: block; margin: 0 auto 4px; }

/* events: a calendar block per event */
.ev { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 14px; padding: 14px 0; border-bottom: 1px dotted var(--dot); scroll-margin-top: 16px; }
.ev:last-child { border-bottom: 0; }
.caltile { border: 2px solid var(--c); background: #fff; text-align: center; box-shadow: 3px 3px 0 var(--c); align-self: start; }
.caltile .m { background: var(--c); color: #fff; font: 700 11px/1.6 var(--head); }
.caltile .d { font: 900 26px/1.1 var(--head); padding-top: 2px; }
.caltile .t { font-size: 10px; color: var(--muted); padding-bottom: 4px; }
.ev.past .caltile { filter: grayscale(.7); opacity: .8; }
.ev h3 { font-size: 15px; margin: 0 0 2px; }
.evkv { margin: 8px 0; max-width: 460px; }
.evkv th { width: 70px; }
.evdesc { color: var(--ink-2); max-width: 70ch; }
.evacts { gap: 12px; }
.evcmts { margin-top: 10px; padding: 4px 12px; background: var(--wash); border: 1px solid var(--line); }
.hit { animation: hit 2.4s ease-out; }
@keyframes hit { 0%, 30% { background: #FFF3B0; } 100% { background: transparent; } }

/* developers */
.eps { display: grid; gap: 0; }
.ep { padding: 14px 0; border-bottom: 1px dotted var(--dot); }
.ep:last-child { border-bottom: 0; }
.ephead { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.ephead h3 { margin: 0; }
.epsig { display: flex; gap: 8px; align-items: center; margin: 6px 0; }
.epsig input { flex: 1; min-width: 0; font-family: var(--mono); font-size: 12px; }
.epparams { margin: 4px 0 6px; }
.epparams th { width: 90px; color: var(--ink-2); }
.epfoot { gap: 10px; margin-bottom: 6px; }
.sse { list-style: none; margin: 8px 0 0; padding: 8px; background: #1E1E24; color: #E8EAF0; font: 11px/1.45 var(--mono); min-height: 140px; max-height: 330px; overflow: hidden; }
.sse li { display: grid; grid-template-columns: 58px 62px minmax(0, 1fr); gap: 6px; padding: 2px 0; border-bottom: 1px solid #ffffff10; }
.sse li.new { animation: sseIn .8s ease-out; }
@keyframes sseIn { from { background: #ffffff22; } }
.sse .t { color: #9A9CA8; }
.sse .sev { color: var(--c); font-weight: 700; }
.sse .msg { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.livedot::before { content: ""; display: inline-block; width: 8px; height: 8px; background: var(--g); margin-right: 5px; animation: blink 1.4s steps(2) infinite; }
.pal { display: flex; flex-wrap: wrap; gap: 6px; }
.palsw { display: inline-flex; align-items: center; gap: 3px; font: 11px var(--mono); }
.palsw i { display: inline-block; width: 14px; height: 14px; border: 1px solid #0003; }
code.ca { word-break: break-all; }

/* governance */
.bcips > li { padding: 12px 0; }
.bciphead { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.bcip h3 { font-size: 15px; margin: 0 0 4px; }
.vote { margin: 8px 0; }
.votebar { height: 14px; background: var(--wash); }
.votebar i.vf, .vlegend i.vf { background: var(--g); }
.votebar i.va, .vlegend i.va { background: var(--r); }
.votebar i.vx, .vlegend i.vx { background: #B8BCC8; }
.vlegend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; color: var(--ink-2); }
.vlegend i { display: inline-block; width: 10px; height: 10px; margin-right: 4px; vertical-align: -1px; }
.votebtns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0 8px; }
.votebtns .btn { padding-left: 8px; padding-right: 8px; }
.btn.k.on { color: var(--ink); }
.steps2 { margin: 0; padding-left: 18px; }
.steps2 li { margin-bottom: 6px; }

/* classifieds */
.cl { padding: 14px 0; border-bottom: 1px dotted var(--dot); margin-bottom: 4px; scroll-margin-top: 16px; }
.cl:last-child { border-bottom: 0; }
.clhead { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.clhead h3 { margin: 0 0 2px; font-size: 15px; overflow-wrap: anywhere; }
.price { font: 700 13px var(--mono); color: var(--g-d); white-space: nowrap; }
a.tag { font-weight: 700; }
.clbody { margin-top: 8px; }
.clbody p { margin-bottom: 8px; }

/* search */
.sform { display: flex; gap: 8px; margin-bottom: 16px; max-width: 640px; }
.sform input { flex: 1; min-width: 0; font-size: 15px; padding: 8px 10px; }
.tryq { text-align: center; padding: 8px 0; }
.bresrow { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 10px; align-items: center; }
.bresrow > span { display: grid; min-width: 0; }
.bglyph { border: 1px solid #0002; }

/* settings */
.pvrow { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.pvframe { padding: 4px; border: 4px solid var(--b); background: #fff; line-height: 0; }
.pv { width: 96px; height: 96px; }
.pvs { width: 24px; height: 24px; border: 1px solid #0002; }
.edwrap { margin: 4px 0; }
.edbtns { margin-top: 6px; }
.cpick .sw { width: 40px; height: 40px; }
.savebar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 0 0 14px; padding: 12px; background: var(--wash); border: 1px solid var(--line); position: sticky; bottom: 0; z-index: 3; }

/* help */
.faq { display: grid; }
.faqi { border-bottom: 1px dotted var(--dot); }
.faqi:last-child { border-bottom: 0; }
.faqi > summary { cursor: pointer; font: 700 14px/1.3 var(--head); padding: 10px 0 10px 22px; position: relative; list-style: none; }
.faqi > summary::-webkit-details-marker { display: none; }
.faqi > summary::before { content: ""; position: absolute; left: 2px; top: 13px; width: 10px; height: 10px; background: var(--g); transition: transform .15s; }
.faqi[open] > summary::before { transform: rotate(45deg); }
.faqa { padding: 0 0 10px 22px; max-width: 70ch; }
.formula { font: 700 14px var(--mono); background: var(--wash); border: 1px solid var(--line); padding: 8px 10px; }
.about { scroll-margin-top: 16px; }
.lore { font: 700 17px/1.45 var(--head); max-width: 56ch; }
.lore.q { color: var(--p-d); font-size: 20px; }
.rainbow.mini { height: 8px; margin-top: 14px; }
.carow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.carow code.ca { flex: 1; min-width: 0; font: 12px var(--mono); background: var(--wash); border: 1px solid var(--line); padding: 6px 8px; }
.reports .staff { margin-top: 4px; padding: 6px 8px; background: #E5F7E8; border: 1px solid #B9E6C1; }

@media (max-width: 760px) {
  .hide-sm { display: none; }
  .phead { grid-template-columns: auto minmax(0, 1fr); }
  .pacts { grid-column: 1 / -1; justify-content: flex-start; }
  .mailtbl td.msubj { min-width: 140px; }
  .bpost { grid-template-columns: 40px minmax(0, 1fr); padding-left: 10px; }
  .bpost .bav .av { width: 40px !important; height: 40px !important; }
  .cmt { grid-template-columns: 44px 1fr; }
  .cmt .cside .av { width: 40px !important; height: 40px !important; }
  .ev { grid-template-columns: 56px minmax(0, 1fr); gap: 10px; }
  .caltile .d { font-size: 20px; }
  .sse li { grid-template-columns: 52px minmax(0, 1fr); }
  .sse .t { display: none; }
  .votebtns .btn.lg { font-size: 14px; padding: 10px 6px 8px; }
  .clhead { flex-direction: column; gap: 2px; }
  .post .side { flex-wrap: wrap; }
  .posts .post .side .av { width: 40px !important; height: 40px !important; margin: 0; }
}

/* ---------- front-door construction scene ---------- */
.scene-hud { background: rgba(255,255,255,.9); border: 2px solid var(--ink); border-radius: 6px; box-shadow: 4px 4px 0 rgba(30,30,36,.12); padding: 8px 10px; width: 228px; font: 11px/1.5 var(--mono); color: var(--ink-2); }
.scene-hud .r { display: flex; justify-content: space-between; gap: 10px; white-space: nowrap; }
.scene-hud .r > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.scene-hud b { color: var(--ink); }
.scene-hud .bar { height: 5px; background: var(--wash); border: 1px solid var(--line); margin: 3px 0 5px; overflow: hidden; }
.scene-hud .bar i { display: block; height: 100%; transition: width .25s linear; }
@media (max-width: 760px) {
  .scene-hud { width: 170px; padding: 5px 7px; font-size: 9.5px; }
  .scene-hud .r:nth-child(4), .scene-hud .r:nth-child(5) { display: none; }
}
.prof-head { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 14px; align-items: start; }
.prof-head > .pic { width: 100% !important; height: auto !important; aspect-ratio: 1; max-width: 170px; }
@media (max-width: 760px) { .prof-head { grid-template-columns: 112px minmax(0, 1fr); } }
/* wallet-verified tick next to a handle; badges row */
.vf { display: inline-grid; place-items: center; width: 13px; height: 13px; margin-left: 3px; border-radius: 50%; background: var(--g); color: #fff; font: 700 9px/1 var(--head); vertical-align: 1px; }
.badges { display: inline-flex; gap: 4px; flex-wrap: wrap; vertical-align: middle; }
