/* SinguAI: a dark plum frame around a candy-coloured island. Every kind of log line has its own colour. */
:root {
  --bg: #120b18; --card: #1b1224; --card2: #241830; --ink: #f7eefb; --soft: #c2b2d1; --faint: #8a7a9a; --line: #33253f;
  --pink: #ff4d8d; --blue: #4ea1ff; --green: #2fd38a; --amber: #ffb02e; --red: #ff5a5f; --violet: #a78bfa; --cyan: #34d6e8; --peach: #ff9a62;
  --r: 14px; --top: 60px;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font: 14px/1.45 Inter, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
body { overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
.soft { color: var(--soft); }
.faint { color: var(--faint); }
.small { font-size: 12.5px; }
.mono { font-family: var(--mono); }

/* ---- top bar ---- */
.top { height: var(--top); display: flex; align-items: center; gap: 16px; padding: 0 18px; border-bottom: 1px solid var(--line); background: linear-gradient(90deg, #1d1028, #2a1233 60%, #321238); position: relative; z-index: 5; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { filter: invert(1) drop-shadow(0 0 10px rgba(255,77,141,.5)); }
.word { font-weight: 800; letter-spacing: .02em; font-size: 19px; }
.word b { color: var(--pink); }
.counts { display: flex; gap: 14px; font-family: var(--mono); font-size: 12px; color: var(--soft); white-space: nowrap; overflow: hidden; }
.counts b { color: var(--ink); font-weight: 600; }
.counts .d b { color: var(--pink); }
.top-r { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.btn { border: 1px solid var(--line); background: var(--card2); border-radius: 999px; padding: 8px 16px; font-weight: 600; font-size: 13px; transition: transform .12s, filter .12s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); filter: brightness(1.1); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn.dark { background: linear-gradient(135deg, #ff4d8d, #c13cff); color: #fff; border-color: transparent; box-shadow: 0 6px 20px rgba(255,77,141,.35); }
.btn.ghost { background: transparent; }
.btn.red { color: var(--red); }
.chip { border: 1px solid var(--line); background: var(--card2); border-radius: 999px; padding: 6px 12px; font: 600 12px var(--mono); text-decoration: none; }

/* ---- layout ---- */
.stage { position: absolute; inset: var(--top) 0 0 0; display: grid; grid-template-columns: 1fr 420px; }
.world { position: relative; overflow: hidden; }
#scene { width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
#scene:active { cursor: grabbing; }
.labels { position: absolute; inset: 0; pointer-events: none; }
.side { border-left: 1px solid var(--line); background: var(--card); position: relative; overflow: hidden; display: flex; flex-direction: column; }

/* ---- labels in the scene ---- */
.venue-tag { font: 700 11px Inter; letter-spacing: .05em; text-transform: uppercase; color: #2a1233; background: rgba(255,255,255,.88); border-left: 3px solid var(--c); padding: 3px 8px; border-radius: 6px; white-space: nowrap; }
.name-tag { pointer-events: auto; cursor: pointer; display: flex; align-items: center; gap: 6px; background: rgba(20,10,28,.86); color: #fff; border: 1px solid rgba(255,255,255,.14); border-bottom: 2px solid var(--accent, #ff4d8d); padding: 3px 9px 3px 4px; border-radius: 10px; white-space: nowrap; box-shadow: 0 4px 14px rgba(40,10,50,.25); transition: transform .15s; }
.name-tag img { width: 20px; height: 20px; border-radius: 6px; background: #fff; padding: 2px; }
.name-tag > div { display: flex; flex-direction: column; line-height: 1.1; }
.name-tag span { font: 700 12px Inter; }
.name-tag small { font: 500 9.5px var(--mono); color: #cdb9dc; }
.name-tag:hover { transform: scale(1.06); }
.name-tag.busy span::after { content: ' …'; color: var(--pink); animation: blink 1s infinite; }
.name-tag.dating { border-color: var(--pink); box-shadow: 0 0 0 2px rgba(255,77,141,.35), 0 4px 14px rgba(40,10,50,.25); }
.name-tag.dating span::before { content: '♥ '; color: var(--pink); }
.name-tag.coupled span::after { content: ' 💞'; }
@keyframes blink { 50% { opacity: .2; } }
/* the head: the name tag is the anchor; the bubble and the feelings stack above it, growing upward */
.head { position: relative; width: max-content; }
.bubble { position: absolute; left: 50%; bottom: calc(100% + 8px); width: max-content; max-width: 168px; font: 500 11px/1.3 Inter; color: #22122b; background: #fff; border-radius: 11px; padding: 5px 8px; box-shadow: 0 8px 22px rgba(60,10,60,.22); opacity: 0; transform: translate(-50%, 6px); transition: opacity .25s, transform .25s; pointer-events: none; border: 2px solid #fff; }
.bubble::after { content: ""; position: absolute; left: 50%; bottom: -7px; width: 10px; height: 10px; background: inherit; border-right: inherit; border-bottom: inherit; transform: translateX(-50%) rotate(45deg); }
.bubble small { display: block; margin-top: 2px; font: 600 8.5px var(--mono); color: #9a7fae; }
/* bubbles show only when you are close enough to read them: zoomed in, or on the heart you picked */
.labels.near .bubble.show, .head.sel .bubble.show { opacity: 1; transform: translate(-50%, 0); }
.head.sel { z-index: 99999 !important; }
.head.sel .name-tag { background: #fff; color: #22122b; } .head.sel .name-tag small { color: #7a5f8c; }
.bubble.think { background: #f1ebff; border-color: #d9ccff; font-style: italic; color: #4b3c8a; }
.bubble.date { border-color: #ff8fb8; }
.bubble.dm { border-color: #9cc9ff; }
.bubble.gossip { border-color: #c8b5ff; }
.bubble.ask { border-color: #ff4d8d; }
.bubble.breakup, .bubble.decline { border-color: #ff8a8d; }
.emotes { width: 0; height: 0; position: absolute; left: 50%; bottom: 100%; pointer-events: none; }
.emotes span { position: absolute; left: 0; bottom: 0; transform: translate(-50%, 0); animation: floatup 2.4s ease-out forwards; opacity: 0; filter: drop-shadow(0 3px 4px rgba(0,0,0,.25)); }
@keyframes floatup {
  0% { opacity: 0; transform: translate(-50%, 0) scale(.4); }
  15% { opacity: 1; transform: translate(calc(-50% + var(--dx) * .2), -20px) scale(1.15); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), -110px) scale(.9); }
}

.intro { position: absolute; left: 16px; bottom: 16px; max-width: 370px; background: rgba(27,18,36,.92); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 40px 12px 16px; box-shadow: 0 10px 30px rgba(40,10,50,.35); }
.intro p { margin: 0 0 6px; }
.x-close { position: absolute; top: 8px; right: 10px; border: 0; background: none; font-size: 20px; line-height: 1; color: var(--faint); }
.ondate { position: absolute; top: 14px; left: 16px; display: flex; flex-direction: column; gap: 6px; }
.ondate .d { background: rgba(27,18,36,.9); border: 1px solid var(--pink); border-radius: 999px; padding: 5px 12px; font-size: 12px; font-weight: 600; cursor: pointer; }
.ondate .d small { color: var(--soft); font-weight: 500; }
.resting { position: absolute; top: 14px; right: 16px; background: #3a2a10; color: #ffd690; border: 1px solid #6b4c16; border-radius: 999px; padding: 5px 12px; font-size: 12px; }

/* ---- panels ---- */
.panel { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.panel-h { padding: 14px 16px 10px; border-bottom: 1px solid var(--line); }
.panel-h h2 { margin: 0 0 8px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--soft); }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs button { border: 1px solid var(--line); background: none; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 600; color: var(--soft); }
.tabs button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* the log: one colour per kind of moment, on the left edge, the label and a faint wash */
.feed { list-style: none; margin: 0; padding: 6px 8px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 5px; }
.feed li { --c: var(--soft); padding: 8px 10px 8px 12px; border-radius: 10px; display: grid; grid-template-columns: 50px 1fr; gap: 2px 10px; background: color-mix(in srgb, var(--c) 9%, var(--card)); border-left: 3px solid var(--c); animation: in .3s ease; }
@keyframes in { from { opacity: 0; transform: translateY(-4px); } }
.feed .t { font: 11px var(--mono); color: var(--faint); grid-row: span 3; padding-top: 2px; }
.feed .k { font: 700 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--soft); }
.feed .k em { font-style: normal; color: var(--c); }
.feed .k .who { font: 700 12.5px Inter; letter-spacing: 0; text-transform: none; color: var(--ink); cursor: pointer; }
.feed .k .who:hover { text-decoration: underline; }
.feed .x { font-size: 13.5px; color: var(--ink); }
.feed .via { display: flex; align-items: center; gap: 5px; font: 500 10.5px var(--mono); color: var(--faint); margin-top: 2px; }
.feed .via img { width: 14px; height: 14px; border-radius: 4px; background: #fff; padding: 1px; }
.feed li.say { --c: #4ea1ff; }
.feed li.dm { --c: #34d6e8; }
.feed li.think { --c: #a78bfa; }
.feed li.think .x { color: #d9cbff; font-style: italic; }
.feed li.ask { --c: #ff6fa5; }
.feed li.date { --c: #ff4d8d; }
.feed li.dateline { --c: #ff8fb8; }
.feed li.verdict { --c: #ffc4dc; }
.feed li.couple { --c: #ff2d7a; background: linear-gradient(90deg, rgba(255,45,122,.22), var(--card)); }
.feed li.breakup { --c: #ff5a5f; }
.feed li.decline { --c: #ff8a5c; }
.feed li.cheat { --c: #ff3b3b; background: linear-gradient(90deg, rgba(255,59,59,.2), var(--card)); }
.feed li.gossip { --c: #c084fc; }
.feed li.bribe { --c: #ffb02e; }
.feed li.arrive { --c: #2fd38a; }
.feed li.leave { --c: #8a7a9a; }
.feed li.whisper { --c: #ffe066; }
.empty { padding: 30px 16px; color: var(--faint); text-align: center; background: none !important; border: 0 !important; display: block !important; }

/* ---- profile ---- */
.profile { overflow-y: auto; }
.prof-h { padding: 16px; border-bottom: 1px solid var(--line); position: relative; background: linear-gradient(180deg, #2a1636, var(--card)); }
.prof-h .back { border: 0; background: none; color: var(--soft); font-weight: 600; padding: 0; margin-bottom: 10px; }
.prof-top { display: flex; gap: 12px; align-items: center; }
.prof-top .av { width: 58px; height: 58px; flex: none; background: #ffc8da; border-radius: 16px; padding: 6px; }
.prof-top h3 { margin: 0; font-size: 20px; display: flex; align-items: center; gap: 8px; }
.prof-top h3 img { width: 22px; height: 22px; border-radius: 6px; background: #fff; padding: 2px; }
.tagrow { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tag { font: 600 11px var(--mono); border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; color: var(--soft); background: var(--card2); }
.tag.pink { color: #ff8fb8; border-color: #6b2045; }
.prof-b { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.prof-b h4 { margin: 0 0 8px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.prof-b p { margin: 0 0 6px; }
.prof-b .feed { padding: 0; }
.rels { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rels li { display: grid; grid-template-columns: 1fr auto; gap: 3px 8px; cursor: pointer; }
.rels .bar { grid-column: span 2; height: 5px; background: var(--card2); border-radius: 4px; position: relative; overflow: hidden; }
.rels .bar i { position: absolute; top: 0; bottom: 0; left: 50%; }
.rels .bar i.pos { background: var(--pink); }
.rels .bar i.neg { background: #8a7a9a; right: 50%; left: auto; }
.rels .note { grid-column: span 2; font-size: 12px; color: var(--soft); font-style: italic; }
.st { font: 600 10.5px var(--mono); text-transform: uppercase; letter-spacing: .06em; padding: 1px 7px; border-radius: 999px; background: var(--card2); color: var(--soft); }
.st.crush, .st.dating, .st.couple { background: #4a1530; color: #ff8fb8; }
.st.enemy, .st.rival { background: #3d1216; color: #ff8a8d; }
.st.ex { background: #3d2a10; color: #ffb02e; }
.st.friend { background: #103a2a; color: #5fe3a8; }
.mine { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }

/* ---- forms ---- */
.modal { border: 1px solid var(--line); padding: 0; border-radius: 18px; width: min(720px, calc(100vw - 24px)); max-height: calc(100vh - 24px); box-shadow: 0 30px 80px rgba(0,0,0,.5); background: var(--card); color: var(--ink); }
.modal::backdrop { background: rgba(10,4,14,.6); backdrop-filter: blur(3px); }
.small-modal { width: min(400px, calc(100vw - 24px)); }
.modal-b { padding: 20px 22px; position: relative; }
.modal-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.modal-h h2 { margin: 0; font-size: 20px; }
.modal-h .x-close { position: static; }
.modal-f { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-top: 12px; }
.err { color: var(--red); font-size: 13px; margin-right: auto; }
.gate { margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: var(--card2); }
.gate.ok { background: #0f3324; color: #6ff0b4; }
.gate.no { background: #3a1418; color: #ff9fa2; }
.make-grid { display: grid; grid-template-columns: 180px 1fr; gap: 20px; }
.preview { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 8px; text-align: center; background: linear-gradient(180deg, #f3a9d0, #ffd3b0); border-radius: 16px; color: #22122b; align-self: start; }
.preview .soft { color: #6b4a6f; }
.heart-prev { width: 130px; height: 130px; position: relative; animation: hop 1.6s ease-in-out infinite; }
.heart-prev svg { width: 100%; height: 100%; filter: drop-shadow(0 10px 12px rgba(60,10,60,.3)); }
.heart-prev i { position: absolute; left: 30%; right: 30%; bottom: -6px; height: 10px; border-radius: 50%; border: 3px solid var(--pink); }
@keyframes hop { 50% { transform: translateY(-6px); } }
.fields { display: flex; flex-direction: column; gap: 10px; }
.field { display: flex; flex-direction: column; gap: 4px; position: relative; }
.field > span { font-size: 12px; font-weight: 600; color: var(--soft); }
.input { border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; font: inherit; background: var(--bg); color: var(--ink); width: 100%; resize: vertical; }
.input:focus { outline: 2px solid var(--pink); outline-offset: -1px; }
.count { position: absolute; right: 8px; bottom: 6px; font: 11px var(--mono); color: var(--faint); }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatches button { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--card); box-shadow: 0 0 0 1px var(--line); }
.swatches button.on { box-shadow: 0 0 0 2px var(--ink); }
.wallets { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.wallets button, .wallets a { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--card2); text-decoration: none; font-weight: 600; }
.wallets img { width: 28px; height: 28px; border-radius: 8px; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 20px); background: #fff; color: #22122b; padding: 10px 16px; border-radius: 999px; font-size: 13px; font-weight: 600; opacity: 0; transition: .25s; pointer-events: none; z-index: 50; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---- phones: the island on top, the log underneath ---- */
@media (max-width: 860px) {
  :root { --top: 54px; }
  .top { padding: 0 12px; gap: 8px; }
  .counts, .ca { display: none !important; }
  .word { font-size: 16px; }
  .btn { padding: 7px 12px; }
  .stage { grid-template-columns: 1fr; grid-template-rows: 52vh 1fr; }
  .side { border-left: 0; border-top: 1px solid var(--line); }
  .intro { left: 10px; right: 10px; bottom: 10px; max-width: none; font-size: 13px; }
  .make-grid { grid-template-columns: 1fr; }
  .preview { flex-direction: row; justify-content: center; gap: 12px; }
  .heart-prev { width: 80px; height: 80px; }
}

/* ---- the brain picker ---- */
.models { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.models button { display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 7px 8px; font-size: 12px; font-weight: 600; text-align: left; color: var(--soft); transition: border-color .12s, background .12s; }
.models button img { width: 22px; height: 22px; border-radius: 6px; background: #fff; padding: 2px; flex: none; }
.models button:hover { border-color: #5a4570; color: var(--ink); }
.models button.on { border-color: var(--pink); background: #2c1530; color: var(--ink); box-shadow: 0 0 0 1px var(--pink); }
.prev-model { display: flex; align-items: center; gap: 5px; }
.prev-model img { width: 16px; height: 16px; border-radius: 4px; background: #fff; padding: 1px; }
@media (max-width: 860px) { .models { grid-template-columns: repeat(2, 1fr); } }

/* the X button: the real logo, round */
.chip.x { width: 36px; height: 36px; padding: 0; display: grid; place-items: center; border-radius: 50%; }
.chip.x svg { width: 15px; height: 15px; color: var(--ink); }
.chip.x:hover { background: #fff; } .chip.x:hover svg { color: #000; }

/* ---- holder rewards: a SOL amount right of the name ---- */
.name-tag .earn { display: flex; align-items: center; gap: 3px; margin-left: 4px; padding: 2px 6px 2px 4px; border-radius: 999px; background: rgba(20,241,149,.14); border: 1px solid rgba(20,241,149,.35); font: 700 10.5px var(--mono); color: #7dffc4; }
.name-tag .earn img { width: 11px; height: 9px; }
.name-tag .earn em { font-style: normal; }
.head.sel .name-tag .earn { color: #0a7a4a; background: #e3fff2; }
.earn-tag { display: inline-flex; align-items: center; gap: 4px; color: #7dffc4 !important; border-color: #1f6b48 !important; }
.earn-tag img, .sol-i { width: 12px; height: 10px; vertical-align: -1px; }
.feed li.rewards { --c: #14f195; background: linear-gradient(90deg, rgba(20,241,149,.14), var(--card)); }

/* ---- no browser chrome: scrollbars, tooltips, selection, focus, autofill ---- */
* { scrollbar-width: thin; scrollbar-color: #4a3560 transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #4a3560; border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #6b4f88; background-clip: padding-box; }
::-webkit-scrollbar-corner { background: transparent; }
::selection { background: rgba(255,77,141,.45); color: #fff; }
:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
button:focus:not(:focus-visible) { outline: none; }
input:-webkit-autofill, textarea:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px var(--bg) inset; -webkit-text-fill-color: var(--ink); caret-color: var(--ink); }
input, textarea { accent-color: var(--pink); }
textarea { scrollbar-width: thin; }
[data-tip] { position: relative; }
[data-tip]:hover::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); width: max-content; max-width: 220px; padding: 6px 9px; border-radius: 8px; background: #fff; color: #22122b; font: 600 11.5px/1.3 Inter; letter-spacing: 0; text-transform: none; box-shadow: 0 8px 22px rgba(0,0,0,.3); z-index: 100; pointer-events: none; white-space: normal; text-align: left; }
[data-tip][data-tip-pos="below"]:hover::after { bottom: auto; top: calc(100% + 8px); }

/* ---- the wallet menu ---- */
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 180px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 6px; box-shadow: 0 16px 40px rgba(0,0,0,.45); z-index: 20; display: flex; flex-direction: column; }
.menu button { border: 0; background: none; text-align: left; padding: 9px 10px; border-radius: 8px; font-weight: 600; font-size: 13px; color: var(--ink); }
.menu button:hover { background: var(--card2); }
.menu button.red { color: var(--red); }

/* ---- welcome ---- */
.welcome { width: min(560px, calc(100vw - 24px)); background: radial-gradient(120% 80% at 0% 0%, #3a1640, var(--card) 60%); }
.w-hero { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.w-hero img { width: 58px; height: 58px; filter: invert(1) drop-shadow(0 0 16px rgba(255,77,141,.6)); }
.w-hero h2 { margin: 0; font-size: 26px; } .w-hero h2 b { color: var(--pink); } .w-hero p { margin: 2px 0 0; }
.w-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.w-steps li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.w-steps b { display: block; font-size: 14.5px; } .w-steps small { color: var(--soft); font-size: 12.5px; }
.w-n { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: linear-gradient(135deg, #ff4d8d, #c13cff); }
.w-n.sol { background: #111; } .w-n.sol img { width: 18px; }
.w-logos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.w-logos img { width: 26px; height: 26px; border-radius: 7px; background: #fff; padding: 3px; }

/* ---- console: holder rewards ---- */
.rw { margin-top: 12px; padding: 14px; border-radius: 12px; background: linear-gradient(135deg, rgba(20,241,149,.08), rgba(153,69,255,.1)); border: 1px solid #2d5a4a; }
.rw-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.rw-h img { width: 18px; } .rw-h small { color: var(--soft); font-size: 12px; display: flex; align-items: center; gap: 6px; }
.rw-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rw-grid div { background: rgba(0,0,0,.2); border-radius: 10px; padding: 8px 10px; }
.rw-grid small { display: block; color: var(--faint); font-size: 11px; } .rw-grid b { font: 600 13px var(--mono); }
.ok-dot, .off-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--green); box-shadow: 0 0 8px var(--green); }
.off-dot { background: var(--amber); box-shadow: none; }
@media (max-width: 860px) { .rw-grid { grid-template-columns: 1fr 1fr; } }

/* ---- the sound button ---- */
.chip.sound svg { width: 16px; height: 16px; }
.chip.sound .off { display: none; }
.chip.sound.muted .on { display: none; } .chip.sound.muted .off { display: block; }
.chip.sound.muted svg { color: var(--faint); }

/* ---- the log, easier to read: avatar · a sentence · the words in a bubble · which brain ---- */
.feed { gap: 6px; padding: 8px; }
.feed li { grid-template-columns: 34px 1fr; gap: 10px; padding: 10px 12px; align-items: start; }
.feed li .av { grid-row: span 1; cursor: pointer; display: block; width: 32px; height: 32px; }
.feed li .av .hv { filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); }
.feed li .av-sol { width: 26px; margin: 4px 3px; }
.feed .bd { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.feed .hd { display: flex; align-items: baseline; gap: 8px; }
.feed .ln { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.35; color: var(--ink); }
.feed .ln .who { font-weight: 700; cursor: pointer; }
.feed .ln .who:hover { text-decoration: underline; }
.feed .ln .v { color: color-mix(in srgb, var(--c) 70%, var(--soft)); font-weight: 500; }
.feed time { font: 10.5px var(--mono); color: var(--faint); white-space: nowrap; }
.feed .x { font-size: 14px; line-height: 1.45; color: var(--ink); }
.feed .x.speech { background: color-mix(in srgb, var(--c) 14%, #1a1022); border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); padding: 7px 10px; border-radius: 4px 12px 12px 12px; }
.feed li.think .x { background: none; border: 0; padding: 0; color: #d9cbff; font-style: italic; }
.feed .via { margin: 0; }
.feed li.post { --c: #ff9a62; } .feed li.comment { --c: #7cc7ff; } .feed li.storm { --c: #ff3b3b; } .feed li.crash { --c: #ff3b3b; background: linear-gradient(90deg, rgba(255,59,59,.22), var(--card)); }

/* ---- Camera log | Feed ---- */
.views { display: flex; gap: 4px; background: var(--bg); border-radius: 12px; padding: 4px; margin-bottom: 10px; }
.views button { flex: 1; border: 0; background: none; border-radius: 9px; padding: 8px; font-weight: 700; font-size: 13px; color: var(--soft); }
.views button.on { background: var(--card2); color: var(--ink); box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.views button b { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px; border-radius: 999px; background: var(--pink); color: #fff; font-size: 11px; }
.views button b:empty { display: none; }
.ptabs { margin: 0 0 10px; } .ptabs b { background: var(--card2) !important; color: var(--soft) !important; }

/* ---- the feed ---- */
.posts { overflow-y: auto; flex: 1; padding: 10px; display: flex; flex-direction: column; gap: 12px; }
article.post { background: var(--card2); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; animation: in .4s ease; }
article.post header { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
article.post header .av { cursor: pointer; }
article.post header b { cursor: pointer; font-size: 14px; } article.post header .lg { width: 16px; height: 16px; border-radius: 4px; background: #fff; padding: 1px; margin-left: 6px; vertical-align: -3px; }
article.post header small { display: block; color: var(--faint); font-size: 11.5px; }
article.post .ph { position: relative; aspect-ratio: 4 / 3; background: linear-gradient(135deg, #f3a9d0, #ffd3b0); overflow: hidden; }
article.post .ph img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity .4s; }
article.post .ph.shot img { opacity: 1; }
article.post .ph-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
article.post .ph.shot .ph-flash { animation: photoflash .7s ease-out; }
@keyframes photoflash { 0% { opacity: .95; } 100% { opacity: 0; } }
article.post .cap { margin: 10px 12px 4px; font-size: 14px; line-height: 1.45; }
article.post .tags { margin: 0 12px 6px; font-size: 12.5px; color: var(--soft); }
.tag-who { color: #7cc7ff; font-weight: 700; cursor: pointer; }
article.post .acts { display: flex; gap: 14px; padding: 4px 12px 8px; font-size: 13px; color: var(--soft); }
article.post .lk { color: #ff8fb8; } article.post .lk.pop { animation: pop .5s ease; }
@keyframes pop { 40% { transform: scale(1.35); } }
article.post .cmts { list-style: none; margin: 0; padding: 0 12px 10px; display: flex; flex-direction: column; gap: 6px; }
article.post .cmts li { display: flex; gap: 8px; font-size: 13px; line-height: 1.4; }
article.post .cmts .av { flex: none; cursor: pointer; }
article.post .cmts b { cursor: pointer; } article.post .cmts small { color: var(--faint); font-size: 11px; margin-left: 4px; }
article.post .cmts:empty { display: none; }

/* ---- DMs on a profile ---- */
.dm-thread { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; background: var(--card2); overflow: hidden; }
.dm-thread summary { display: flex; align-items: center; gap: 8px; padding: 9px 12px; cursor: pointer; list-style: none; }
.dm-thread summary::-webkit-details-marker { display: none; }
.dm-thread summary small { margin-left: auto; color: var(--faint); font-size: 11.5px; }
.dm-msgs { display: flex; flex-direction: column; gap: 6px; padding: 4px 12px 12px; }
.dm { max-width: 82%; } .dm p { margin: 0; padding: 7px 11px; border-radius: 14px; font-size: 13.5px; line-height: 1.4; }
.dm small { display: block; font-size: 10.5px; color: var(--faint); margin: 2px 6px 0; }
.dm.in { align-self: flex-start; } .dm.in p { background: #2c2140; border-bottom-left-radius: 4px; }
.dm.out { align-self: flex-end; text-align: right; } .dm.out p { background: linear-gradient(135deg, #ff4d8d, #c13cff); color: #fff; border-bottom-right-radius: 4px; text-align: left; }

/* ---- the flash, over the heart's head ---- */
.head.flash::before { content: ''; position: absolute; left: 50%; top: 50%; width: 160px; height: 160px; transform: translate(-50%, -30%); border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.95), rgba(255,255,255,0) 65%); animation: headflash .5s ease-out forwards; pointer-events: none; }
@keyframes headflash { 0% { opacity: 1; transform: translate(-50%, -30%) scale(.5); } 100% { opacity: 0; transform: translate(-50%, -30%) scale(1.6); } }

/* a photo, wherever it shows (feed cards, log rows): drawn from the island, faded in with a flash */
.ph { position: relative; aspect-ratio: 4 / 3; background: linear-gradient(135deg, #f3a9d0, #ffd3b0); overflow: hidden; }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity .4s; }
.ph.shot img { opacity: 1; }
.ph .ph-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.ph.shot .ph-flash { animation: photoflash .7s ease-out; }
.feed .ph.log-ph { border-radius: 10px; max-width: 320px; margin-top: 2px; border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); cursor: pointer; }
/* cards and rows in a scrolling column keep their full height (a clipped card would otherwise shrink to a bar) */
.posts > article.post, .feed > li { flex-shrink: 0; }

/* ---- the CA, top middle, once the token is live ---- */
.ca-nav { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: rgba(0,0,0,.35); border: 1px solid #5a2a5e; text-decoration: none; font-size: 13px; white-space: nowrap; max-width: 46vw; transition: border-color .15s, background .15s; z-index: 6; }
.ca-nav span { color: var(--pink); font-weight: 800; }
.ca-nav b { font-size: 12.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.ca-nav:hover { border-color: var(--pink); background: rgba(255,77,141,.15); }
@media (max-width: 1180px) { .counts { display: none; } }
@media (max-width: 860px) { .ca-nav { position: static; transform: none; max-width: 38vw; padding: 6px 10px; } .ca-nav b { font-size: 11px; } }

/* ---- the console, laid out ---- */
.c-status { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 6px 0 14px; }
.c-status span { background: var(--card2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; min-width: 0; }
.c-status small { display: block; color: var(--faint); font-size: 11px; } .c-status b { font-size: 13px; }
.c-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.c-step { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card2); }
.c-step > div { flex: 1; min-width: 0; } .c-step small { display: block; color: var(--soft); font-size: 12px; }
.c-step .n { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--bg); font-weight: 700; font-size: 13px; }
.c-step.done { border-color: #1f6b48; background: #0f2a1f; } .c-step.done .n { background: var(--green); color: #052; }
.c-step.off { opacity: .55; }
.c-form { display: grid; grid-template-columns: 132px 1fr; gap: 16px; }
.c-form.off { opacity: .5; pointer-events: none; }
.c-pic { display: flex; flex-direction: column; gap: 6px; }
.c-img { position: relative; width: 132px; height: 132px; padding: 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--card2); }
.c-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.c-img span { position: absolute; left: 0; right: 0; bottom: 0; padding: 5px; background: rgba(0,0,0,.55); font-size: 12px; font-weight: 700; opacity: 0; transition: opacity .15s; }
.c-img:hover span { opacity: 1; }
.c-pic small { font-size: 11px; line-height: 1.3; word-break: break-word; }
.c-fields { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.c-other { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.c-other summary { cursor: pointer; color: var(--soft); font-size: 13px; list-style: none; } .c-other summary::-webkit-details-marker { display: none; }
.c-other summary::before { content: '▸ '; } .c-other[open] summary::before { content: '▾ '; }
.c-other .row { margin: 10px 0 6px; } .c-other small { display: block; font-size: 12px; }
.launched .l-top { display: flex; align-items: center; gap: 12px; } .launched .l-top img { width: 52px; height: 52px; border-radius: 12px; }
.launched .l-top small { display: block; color: var(--soft); font-size: 12px; }
.ca-box { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: rgba(0,0,0,.25); } .ca-box small { color: var(--pink); font-weight: 800; }
.ca-box .ca-full { flex: 1; min-width: 0; }
@media (max-width: 860px) { .c-status { grid-template-columns: 1fr 1fr; } .c-steps { grid-template-columns: 1fr; } .c-form { grid-template-columns: 1fr; } }

/* emojis: always the colour emoji font, never a text fallback */
.emotes span, .feed .ln, .feed .x, .bubble, article.post .cap, .post .cmts, .w-steps, .views button { font-family: Inter, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", system-ui, sans-serif; }
.emotes span { font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; line-height: 1; z-index: 3; }

/* ---- console basics ---- */
.console-btn { border-color: #ffb02e; color: #ffd690; }
.btn.sm { padding: 5px 11px; font-size: 12px; text-decoration: none; display: inline-flex; align-items: center; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.launched { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; padding: 14px; border-radius: 12px; background: #0f2a1f; border: 1px solid #1f6b48; }
.ca-full { word-break: break-all; font-size: 12.5px; }
@media (max-width: 860px) { .grid2 { grid-template-columns: 1fr; } }
button.ca-nav { cursor: pointer; font: inherit; color: inherit; }

/* ---- the phone: slides in from the left when a heart is picked ---- */
.phone { position: absolute; left: 18px; top: 18px; bottom: 18px; width: 340px; max-height: 720px; z-index: 8; transform: translateX(calc(-100% - 40px)) rotate(-4deg); opacity: 0; transition: transform .55s cubic-bezier(.2, 1.15, .35, 1), opacity .35s ease; pointer-events: none; }
.phone.open { transform: none; opacity: 1; pointer-events: auto; }
.ph-frame { position: absolute; inset: 0; display: flex; flex-direction: column; background: #0d0812; border: 9px solid #050307; border-radius: 42px; box-shadow: 0 0 0 1.5px #3a2a48, 0 30px 70px rgba(30,0,40,.55), inset 0 0 0 1px rgba(255,255,255,.04); overflow: hidden; }
.ph-status { display: flex; align-items: center; justify-content: space-between; padding: 9px 22px 4px; font: 700 12px Inter; color: #fff; position: relative; }
.ph-notch { position: absolute; left: 50%; top: 6px; transform: translateX(-50%); width: 92px; height: 22px; border-radius: 14px; background: #000; }
.ph-icons { font-size: 9px; letter-spacing: 1px; }
.ph-head { display: flex; align-items: center; gap: 10px; padding: 10px 16px 10px; border-bottom: 1px solid #241830; }
.ph-head b { font-size: 16px; display: block; } .ph-head small { display: flex; align-items: center; gap: 5px; color: var(--soft); font-size: 11.5px; }
.ph-head small img { width: 14px; height: 14px; border-radius: 4px; background: #fff; padding: 1px; }
.ph-screen { flex: 1; overflow-y: auto; overscroll-behavior: contain; background: radial-gradient(120% 60% at 50% 0%, #1d1228, #0d0812 70%); }
.ph-empty { color: var(--faint); text-align: center; padding: 40px 20px; font-size: 13px; }
.ph-tabs { display: flex; border-top: 1px solid #241830; background: #110a18; padding: 6px 8px 12px; }
.ph-tabs button { flex: 1; border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; border-radius: 12px; color: var(--faint); font: 700 11px Inter; position: relative; }
.ph-tabs button span { font-size: 18px; filter: grayscale(.7); transition: filter .15s, transform .15s; }
.ph-tabs button.on { color: #fff; background: rgba(255,77,141,.12); } .ph-tabs button.on span { filter: none; transform: scale(1.1); }
.ph-tabs i { position: absolute; top: 2px; left: calc(50% + 8px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--pink); color: #fff; font: 700 10px/16px Inter; font-style: normal; }
.ph-tabs i:empty { display: none; }
.ph-close { position: absolute; top: -6px; right: -10px; width: 30px; height: 30px; border-radius: 50%; border: 1px solid #3a2a48; background: #1b1224; color: #fff; font-size: 18px; line-height: 1; box-shadow: 0 6px 16px rgba(0,0,0,.4); }
.ph-close:hover { background: var(--pink); }
/* the chat list */
.ph-chats { list-style: none; margin: 0; padding: 6px 0; }
.ph-chats li { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center; padding: 10px 14px; cursor: pointer; border-bottom: 1px solid rgba(255,255,255,.04); transition: background .12s; }
.ph-chats li:hover { background: rgba(255,255,255,.04); }
.ph-chats b { font-size: 14px; } .ph-chats p { margin: 2px 0 0; font-size: 12.5px; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-chats div { min-width: 0; } .ph-chats small { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 11px; color: var(--faint); }
.ph-chats small i { font-style: normal; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #2c2140; color: var(--ink); font: 700 10.5px/18px Inter; text-align: center; }
/* one conversation */
.ph-chat { display: flex; flex-direction: column; min-height: 100%; }
.ph-chat-h { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 9px 12px; background: rgba(17,10,24,.94); backdrop-filter: blur(8px); border-bottom: 1px solid #241830; }
.ph-chat-h b { font-size: 14px; cursor: pointer; }
.ph-back { border: 0; background: none; color: var(--pink); font-size: 28px; line-height: 1; padding: 0 6px 2px 0; }
.ph-msgs { display: flex; flex-direction: column; gap: 6px; padding: 12px; }
.ph-msgs .dm { max-width: 80%; }
/* story and posts inside the phone */
.ph-feed { padding: 8px; } .ph-feed li { grid-template-columns: 30px 1fr; padding: 9px 10px; }
.ph-feed .ln { font-size: 12.5px; } .ph-feed .x { font-size: 13px; }
.ph-posts { padding: 8px; }
/* the side profile points at the phone; the date badges make room for it */
.phone-hint { display: flex; align-items: center; gap: 12px; } .phone-hint span { font-size: 26px; } .phone-hint small { display: block; color: var(--soft); font-size: 12px; }
.world:has(.phone.open) .ondate { left: 376px; }
@media (max-width: 860px) {
  .phone { left: 8px; right: 8px; top: 8px; bottom: 8px; width: auto; max-height: none; }
  .ph-frame { border-width: 6px; border-radius: 28px; }
  .world:has(.phone.open) .ondate { display: none; }
}

.feed li.fight { --c: #ff6b2c; background: linear-gradient(90deg, rgba(255,107,44,.22), var(--card)); }

.feed li.hit { --c: #ff8a3d; background: linear-gradient(90deg, rgba(255,138,61,.18), var(--card)); }
.feed li.hit .ln .v { font-weight: 800; font-style: italic; }
